This file contains 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 pygame | |
class PackNode(object): | |
""" | |
Creates an area which can recursively pack images into itself. | |
""" | |
def __init__(self, area): | |
# if tuple contains two elements, assume they are width and height, | |
# and origin is (0,0) | |
if len(area) == 2: |
This file contains 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
>>>>+>+++>+++>>>>>+++[ | |
>,+>++++[>++++<-]>[<<[-[->]]>[<]>-]<<[ | |
>+>+>>+>+[<<<<]<+>>[+<]<[>]>+[[>>>]>>+[<<<<]>-]+<+>>>-[ | |
<<+[>]>>+<<<+<+<--------[ | |
<<-<<+[>]>+<<-<<-[ | |
<<<+<-[>>]<-<-<<<-<----[ | |
<<<->>>>+<-[ | |
<<<+[>]>+<<+<-<-[ | |
<<+<-<+[>>]<+<<<<+<-[ | |
<<-[>]>>-<<<-<-<-[ |
This file contains 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
/** @private Updates the animation. */ | |
override public function update():void | |
{ | |
if (_anim && !complete) | |
{ | |
_timer += (FP.fixed ? _anim._frameRate : _anim._frameRate * FP.elapsed) * rate; | |
if (_timer >= 1) | |
{ | |
while (_timer >= 1) | |
{ |
This file contains 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 | |
import os.path | |
import xml.dom.minidom | |
import urllib2 | |
try: | |
f = open("profiles-sitemap.xml") | |
except: | |
sys.exit("Error opening file") |
This file contains 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
int incomingByte = 0; | |
void | |
setup() | |
{ | |
Serial.begin(9600); | |
} | |
void | |
loop() |
This file contains 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
int pin = 0; // analog pin | |
int temp = 0; // temperature variable | |
int samples[8]; | |
int ledPins[] = { 2, 3, 4, 5, 6, 7 }; | |
int binaries[] = { B00100000, B00010000, B00001000, B00000100, B00000010, B00000001}; // control bits | |
const int ledCount = 6; | |
void setup() | |
{ | |
Serial.begin(9600); |
This file contains 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
input[type="radio"], input[type="checkbox"] { | |
display: none; | |
} | |
input[type="radio"] + label, input[type="checkbox"] + label { | |
color: #555; | |
border: 1px solid #ccc; | |
border-radius: 4px; | |
padding: 5px 9px; | |
line-height: 22px; |
This file contains 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
.root { | |
padding: 20px; | |
position: relative; | |
} | |
.root .child { | |
display: inline-block; | |
width: 45%; | |
height: 600px; | |
background-color: #fff; | |
position: relative; |
This file contains 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
package ; | |
import com.haxepunk.HXP; | |
import com.haxepunk.Scene; | |
import com.haxepunk.utils.Key; | |
import nme.display.BitmapData; | |
import nme.geom.Point; | |
import nme.geom.Rectangle; | |
class GameScene extends Scene |
This file contains 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
canPlace = 1; | |
for (y in 0...height) | |
{ | |
for (x in 0...width) | |
{ | |
if (mapArr[x][y] != ' ') | |
{ | |
canPlace = 2; | |
break; | |
} |
OlderNewer