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
Floor(N) -> ${N-(N%1)} | |
Ceiling(N) -> ${N+(1-(N%1))%1} | |
Round(N) -> ${N+((N%1>0.5)?(1-(N%1))%1:-(N%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
# Optimized for writes, sort on read | |
# LVC | |
redis.hset("bonds|1", "bid_price", 96.01) | |
redis.hset("bonds|1", "ask_price", 97.53) | |
redis.hset("bonds|2", "bid_price", 95.50) | |
redis.hset("bonds|2", "ask_price", 98.25) | |
redis.sadd("bond_ids", 1) | |
redis.sadd("bond_ids", 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
{ | |
"ecmaVersion": 5, | |
"libs": [ | |
"browser", | |
"jquery" | |
], | |
"plugins": { | |
"complete_strings": {}, | |
"node": {}, | |
"lint": {}, |
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 is sourced by /etc/init.d/sabnzbdplus | |
# | |
# When SABnzbd+ is started using the init script, the | |
# --daemon option is always used, and the program is | |
# started under the account of $USER, as set below. | |
# | |
# Each setting is marked either "required" or "optional"; | |
# leaving any required setting unconfigured will cause | |
# the service to not start. |
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() { | |
function getFrame() { | |
if (!document.getElementById('akami-research-frame')) { | |
var iframe = document.createElement('iframe'); | |
iframe.id = 'akami-research-frame'; | |
iframe.src = 'about:blank'; | |
iframe.style.width = '1px'; |
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
NSLog(@"%@", songTitle); | |
NSLog(@"%@", songDuration); | |
NSLog(@"%f", [songDuration floatValue]); | |
NSLog(@"%d", [songDuration integerValue]); |
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
@implementation WSAppDelegate | |
@synthesize persistentStoreCoordinator = _persistentStoreCoordinator; | |
@synthesize managedObjectModel = _managedObjectModel; | |
@synthesize managedObjectContext = _managedObjectContext; | |
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
{ | |
NSManagedObjectContext *context = [self managedObjectContext]; | |
Names *name = [NSEntityDescription insertNewObjectForEntityForName:@"Names" inManagedObjectContext:context]; |
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
#pragma mark - Core Data stack | |
- (NSManagedObjectContext *)managedObjectContext | |
{ | |
if (_managedObjectContext != nil) { | |
return _managedObjectContext; | |
} | |
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; | |
if (coordinator != nil) { |
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
<script src="mraid.js"></script> | |
<style> | |
body { | |
background: black; | |
margin: 0; | |
padding: 0; | |
} | |
#advert { | |
width: 640px; | |
} |
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
<!--nosandbox--> | |
<div id='div-gpt-ad-1234567891234-728x90'></div><!-- change this elements id so it's unique --> | |
<script type="text/javascript"> | |
var googletag = googletag || {}; | |
googletag.cmd = googletag.cmd || []; | |
(function() { | |
var gads = document.createElement("script"); | |
gads.async = true; | |
gads.type = "text/javascript"; | |
var useSSL = "https:" == document.location.protocol; |
NewerOlder