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
char one[8][4] = {{0, 0, 1, 0}, | |
{0, 0, 1, 0}, | |
{0, 0, 1, 0}, | |
{0, 0, 1, 0}, | |
{0, 0, 1, 0}, | |
{0, 0, 1, 0}, | |
{0, 0, 1, 0}, | |
{0, 0, 1, 0}}; | |
char two[8][4] = {{1, 1, 1, 1}, |
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
// to check if the exe is running in debug mode use: | |
#if DEBUG | |
// put code to run in debugmode | |
#endif |
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
--[[ Implementation of MergeSort --]] | |
-- main mergesort algorithm | |
function mergeSort(A, p, r) | |
-- return if only 1 element | |
if p < r then | |
local q = math.floor((p + r)/2) | |
mergeSort(A, p, q) | |
mergeSort(A, q+1, r) | |
merge(A, p, q, r) |
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
$.ajax({ | |
url: "Service/request", | |
async: false, | |
type: "POST", | |
dataType: "json", | |
contentType: "application/json", | |
data: JSON.stringify(obj), | |
cache: false, | |
success: function (data) { | |
alert(data); |
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
// | |
// main.c | |
// | |
// Use an interrupt to set two LEDs on the MSP430 on and off | |
// Created by David Roberts on 06/07/2011. | |
// | |
#include <io.h> | |
#include <signal.h> |
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
// | |
// main.c | |
// BlinkingLEDs | |
// | |
// Created by David Roberts on 30/06/2011. | |
// Copyright 2011 __MyCompanyName__. All rights reserved. | |
// | |
#include <io.h> |
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 <SPI.h> | |
#include <GD.h> | |
#include "alien_sprite.h" | |
struct sprite { | |
int no; | |
int x; | |
int y; | |
int anim; | |
byte rot; |
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 <SPI.h> | |
#include <GD.h> | |
#include "alien_sprite.h" | |
void setup() { | |
// allow for setup | |
delay(250); | |
GD.begin(); | |
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
import sys | |
from PIL import Image | |
from gameduino import prep | |
image_path = "" | |
h_name = "" | |
# retrieve the command line arguments | |
if (len(sys.argv) > 2): |
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
DataContext db = new DataContext(); | |
try { | |
db.table.InsertOnSubmit(obj); | |
db.SubmitChanges(); | |
} | |
catch(Exception) { | |
return false; | |
} | |
return true; |