This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Robot(robot) {} | |
// well, we need to do something... | |
// whenever our robot is idle, this method gets called. | |
Robot.prototype.onIdle = function(ev) { | |
var robot; | |
robot = ev.robot; | |
robot.ahead(150); | |
robot.rotateCannon(360); | |
robot.back(100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// start a new process | |
Process myProcess = new Process(); | |
try | |
{ | |
// set shell execution | |
myProcess.StartInfo.UseShellExecute = true; | |
// set the url | |
myProcess.StartInfo.FileName = "http://www.mycompany.com/help.htm"; | |
myProcess.Start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script> | |
google.load("gdata", "1"); | |
google.setOnLoadCallback(getMyFeed); | |
var myService; | |
var feedUrl = "[Feed URL ]"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if page.title %}<meta property="og:title" content="{{ page.title }}" /><meta itemprop="name" content="{{ page.title }}" />{% endif %} | |
{% if page.author %}<meta name="author" content="{{ site.author }}" /> | |
<meta property="article:author" content="https://plus.google.com/+JeremyMorgan" /> | |
<meta property="og:type" content="article" />{% endif %} | |
{% if page.date %}<meta property="article:published_time" content="{{ page.date }}" />{% endif %} | |
{% capture category %}{% if page.categories %}{{ page.categories }}{% endif %}{% endcapture %} | |
{% if page.categories %}<meta property="article:section" content="{{ page.categories }}" />{% endif %} | |
{% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} | |
<meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}" /> | |
<meta property="og:description" content="{{ description | strip_html | condense_spaces | truncate:150 }}" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* File: database.class.php | |
* Super simple PDO class | |
* | |
* Author: Jeremy Morgan | |
* | |
* This is just a start. No error handling or parameterization yet | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta itemprop="name" content="[ TITLE ]" /> | |
<meta itemprop="image" content="[ LISTING IMAGE ]" /> | |
<meta itemprop="description" content="[ ARTICLE DESCRIPTION ]" /> | |
<meta name="description" content="[ ARTICLE DESCRIPTION ]" /> | |
<meta name="author" content="[ AUTHOR FULL NAME ]" /> | |
<meta property="article:author" content="[ GOOGLE+ AUTHOR URL ]" /> | |
<meta property="article:published_time" content="[ PUBLISHED TIMESTAMP ]" /> | |
<meta property="article:section" content="[ CATEGORY ]" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Function to return friendly domain name (example.com) from a full URL | |
* @param string $url | |
* @return string | |
*/ | |
function getDomain($url){ | |
// remove the protocol | |
$url = str_replace((array("http://", "https://")), "", $url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [state]( | |
[stateID] [int] IDENTITY(1,1) NOT NULL, | |
[stateCode] [nchar](2) NOT NULL, | |
[stateName] [nvarchar](128) NOT NULL, | |
CONSTRAINT [PK_state] PRIMARY KEY CLUSTERED | |
( [stateID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) | |
ON [PRIMARY] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
class FizzBuzz | |
{ | |
static void Main() | |
{ | |
for (int i = 1; i < 100; i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<stdio.h> | |
int main (void) | |
{ | |
int i; | |
for (i = 1; i <= 100; i++) | |
{ | |
if (!(i % 15)) | |
std::cout << "FizzBuzz \n"; |
OlderNewer