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
/* | |
* p92.spn | |
* | |
* a solution to Project Euler problem #92 | |
* using the Sparkling scripting language | |
*/ | |
function next(n) | |
{ | |
var s = 0; |
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
/* | |
* p42.spn | |
* Solution to Project Euler problem #42 | |
* | |
* Created by Arpad Goretity on 10/12/2013 | |
*/ | |
function FileSize(file) | |
{ | |
fseek(file, 0, "end"); |
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
/* | |
* Created by Árpád Goretity on 21/10/2013 | |
* | |
* Sparkling demo: solution to Project Euler problem #89 | |
* (http://projecteuler.net/problem=89) | |
* | |
* For demonstration purposes only -- please don't abuse or cheat. | |
*/ | |
function int2roman(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
#!/bin/bash | |
if [ "$#" = "0" ]; then | |
echo "at least one argument is required" | |
exit 1 | |
fi | |
FILE=$1 | |
GUARD="$2$(printf "%s" $FILE | tr '.' '_' | tr '[[:lower:]]' '[[:upper:]]')" |
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
} else if ([option isEqualToString:@"copyFrom"]) { | |
NSLog(@"Copying..."); | |
AFCApplicationDirectory *appDir = [device newAFCApplicationDirectory:[arguments stringForKey:@"app"]]; | |
AFCFileReference *infile = [appDir openForRead:[arguments stringForKey:@"from"]]; | |
if (!infile) { | |
NSLog(@"Error: %@", [appDir lasterror]); | |
} | |
char buf[0x10000]; | |
int outfile = open([arguments stringForKey:@"to"].UTF8String, O_CREAT | O_WRONLY, 0777); |
NewerOlder