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
# Running on iPhone 5s | |
xcodebuild test -scheme YOUR_PROJECT_NAME -destination 'platform=iOS Simulator,name=iPhone 5s' |
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
'use strict'; | |
var keypress = require('keypress'); | |
var Drone = require('rolling-spider'); | |
var colors = require('colors'); | |
// Change this with your drone name... | |
var DRONE_NAME = 'RS_W123456'; | |
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
if (ACTIVE && key) { | |
// Takeoff | |
if (key.name === 't') { | |
try { | |
d.takeOff(function() { | |
console.log('[INFO] Rolling Spider take-off completed'.green); | |
}); | |
} catch(err) { | |
console.log('[ERROR] '.red + err.red); | |
} |
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
- (BOOL)connectedToNetwork { | |
NSURL* url = [[NSURL alloc] initWithString:@"http://google.com/"]; | |
NSData* data = [NSData dataWithContentsOfURL:url]; | |
if (data != nil) | |
return YES; | |
return NO; | |
} |
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
#include <stdio.h> | |
int main() | |
{ | |
printf("Hello, World!\n"); | |
} |
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
/**************************************************************/ | |
/* Trigger jumping if needed, also variable height jump logic */ | |
Man_JumpTrigger() | |
{ | |
if ( Man.JumpFudge ) | |
{ | |
Man.JumpFudge--; | |
} |
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
curl http://w3.org/ -d "hello=world&foo=bar" --trace-ascii /dev/stdout | |
== Info: Trying 128.30.52.45... | |
== Info: Connected to w3.org (128.30.52.45) port 80 (#0) | |
=> Send header, 140 bytes (0x8c) | |
0000: POST / HTTP/1.1 | |
0011: Host: w3.org | |
001f: User-Agent: curl/7.43.0 | |
0038: Accept: */* | |
0045: Content-Length: 19 |
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 static void rangeCheck(int arrayLen, int fromIndex, int toIndex) { | |
if (fromIndex > toIndex) | |
throw new IllegalArgumentException("fromIndex(" + fromIndex + | |
") > toIndex(" + toIndex+")"); | |
if (fromIndex < 0) | |
throw new ArrayIndexOutOfBoundsException(fromIndex); | |
if (toIndex > arrayLen) | |
throw new ArrayIndexOutOfBoundsException(toIndex); | |
} |
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
var msg = new SpeechSynthesisUtterance(); | |
var voices = window.speechSynthesis.getVoices(); | |
msg.voiceURI = "native"; | |
msg.text = "hello world"; | |
msg.lang = "en-US"; | |
window.speechSynthesis.speak(msg); |
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
<?php | |
$start = microtime(true); | |
// Your code starts here | |
$i = 0; | |
while($i < 5000000) { | |
$i++; | |
} | |
// Your cord ends here |
OlderNewer