Depending on your assigned system, read the README-ORACLE.md
or README-POSTGRES.md
file.
You might need to configure user accounts and permissions to accomplish these tasks.
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-31-generic x86_64) | |
* Documentation: https://help.ubuntu.com | |
* Management: https://landscape.canonical.com | |
* Support: https://ubuntu.com/advantage | |
100 packages can be updated. | |
47 updates are security updates. | |
import Cocoa | |
func mergeSort(_ array: [Int]) -> [Int] { | |
guard array.count > 1 else { return array } | |
let middleIndex = array.count / 2 | |
let leftArray = mergeSort(Array(array[0..<middleIndex])) | |
let rightArray = mergeSort(Array(array[middleIndex..<array.count])) | |
return merge(leftPile: leftArray, rightPile: rightArray) | |
} |
def convert(char): | |
return { | |
'M': 1000, | |
'D': 500, | |
'C': 100, | |
'L': 50, | |
'X': 10, | |
'V': 5, | |
'I': 1 | |
}.get(char) |
I hereby claim:
To claim this, I am signing this object:
setTimeout(function () { | |
require('http').createServer(function (req, res) { | |
res.end('yo!') | |
}).listen(process.env.PORT) | |
}, 45000) |
/** | |
* Just call __PBSJC_drain at the end of your code | |
*/ | |
var __PBSJC_funcHandles = [] | |
, __PBSJC_funcHandleCount = 0 | |
, __PBSJC_drain = function __PBSJC_drain () { | |
var extracted, i, ii, cur | |
while (__PBSJC_funcHandles.length) { | |
extracted = __PBSJC_funcHandles |
(function phoneGapRedirect(){ | |
// No infinite loopdeloops using this querystring | |
if(window.originalLocation.indexOf('no_redirect') > -1) return | |
// Only do this on iPhone OR YOU WILL PISS EVERYONE ON DESKTOP OFF WITH PROTOCOL ERRORS | |
// Also don't do this in homescreened apps OR YOU WILL PISS EVERYONE OFF WITH REDIRECTS | |
if ((/iphone|ipod|ipad/gi).test(navigator.platform) && !navigator.standalone) { | |
var redirect = function (location) { | |
// don't use jquery here b/c it's not a global | |
var iframe = document.createElement('iframe') |
If you're interested in my OTA update system for iOS PhoneGap apps, let me know how you think I should release it, and why:
(Sorted in order from "it just works" to "most flexible, but requires deeper knowledge of iOS apps")
platforms/ios
)// This doodad converts absolute paths like "/assets/thing.jpg" into relative ones like "assets/thing.jpg" | |
NSString * (^fixPrefix)(NSString *, NSString *) = ^NSString *(NSString * input, NSString *prefix) { | |
NSString *needle = [[@"/" stringByAppendingString:prefix] stringByAppendingString:@"/"]; | |
NSString *replacement = [prefix stringByAppendingString:@"/"]; | |
input = [input stringByReplacingOccurrencesOfString:[@"'" stringByAppendingString:needle] withString:[@"'" stringByAppendingString:replacement]]; | |
input = [input stringByReplacingOccurrencesOfString:[@"\"" stringByAppendingString:needle] withString:[@"\"" stringByAppendingString:replacement]]; | |
input = [input stringByReplacingOccurrencesOfString:[@"(" stringByAppendingString:needle] withString:[@"(" stringByAppendingString:replacement]]; | |
return input; |