View gist:4168379
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
$(function(){ | |
$('input').live('keypress', function(eInner) { | |
if (eInner.keyCode == 13) | |
{ | |
var el = null; // element to jump to | |
// if we have a tabindex, just jump to the next tabindex | |
var tabindex = $(this).attr('tabindex'); | |
if (tabindex) { | |
tabindex ++; |
View gist:4171243
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
draw2d.layout.connection.NewBezierConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend({ | |
NAME : "draw2d.layout.connection.NewBezierConnectionRouter", | |
init : function() | |
{ | |
this.cheapRouter = null; | |
this.iteration = 5; | |
}, | |
route : function(conn) | |
{ |
View make_ipa.sh
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
#!/bin/sh | |
mkdir Payload | |
mv $1.app Payload/ | |
zip -r $1.ipa Payload | |
rm -fR Paypload |
View csv Parse
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
Method Parse() ' csv parser | |
Local _inc:Bool = False | |
Local afc:Bool = False | |
Local quote:=New Quote | |
Local c:String, c1:String = "" | |
raw = raw + "~n" ' make sure we catch the last one | |
For Local i := 0 To raw.Length | |
c = raw[i..i+1] | |
If i+2 < raw.Length | |
c1 = raw[i+1..i+2] |
View angelfont wrap
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
Method DrawWrap(t:String, x:Float, y:Float, width:Float, align:Int = AngelFont.ALIGN_CENTER) | |
' do some calculations and splitting | |
Local splits:StringList = New StringList | |
Local lw := Floor(width / font.TextWidth("W")) ' about how many letters fit in the width? | |
Local enters:String[] = t.Split("~n") | |
' check if any split string is too long to fit | |
For Local i:=0 Until enters.Length | |
Local s := enters[i] |
View convert Hiero .fnt text to xml
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
#!/usr/bin/perl | |
$f = $ARGV[0]; | |
$pagestart = 0; | |
$charstart = 0; | |
$kernstart = 0; | |
$s = "<?xml version=\"1.0\"?>\n<font>\n"; | |
open(F, $f); |
View gist:5046420
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 mojo | |
Import diddy | |
Class TestScreen Extends Screen | |
Method Start:Void() | |
End | |
Method Update:Void() |
View gist:5098910
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
#!/usr/bin/perl | |
$x = $ARGV[0]; | |
$y = $ARGV[1]; | |
if (not $x or not $y) { | |
print "./cut50.pl width height\n"; | |
exit; | |
} |
View GLES return issue
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
// Parses the client API version string and extracts the version number | |
// | |
static GLboolean parseGLVersion(int* api, int* major, int* minor, int* rev) | |
{ | |
int i, _api = GLFW_OPENGL_API, _major, _minor = 0, _rev = 0; | |
const char* version; | |
const char* prefixes[] = | |
{ | |
"OpenGL ES-CM ", | |
"OpenGL ES-CL ", |
View gist:5159877
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 diddy | |
Import mojo | |
Class TestScreen Extends Screen | |
Method Start:Void() | |
End | |
OlderNewer