Skip to content

Instantly share code, notes, and snippets.

View javagg's full-sized avatar
🌴
On vacation

javagg javagg

🌴
On vacation
View GitHub Profile
@javagg
javagg / beerules.r
Created July 4, 2012 10:04 — forked from milktrader/beerules.r
quantstrat implementation of bumblebee rules
bee <- add.rule(
strategy = bee,
name='ruleSignal',
arguments = list(sigcol="fast.gt.up",
sigval=TRUE,
orderqty=100,
ordertype='market',
orderside='long',
osFUN='osMaxPos'),
@javagg
javagg / NSManagedObject+DeepCopying.m
Created April 16, 2012 02:15
Copy and deep copy for NSManagedObject graphs.
/*
This makes some assumptions about your code, for example that you’ve got ownership rules set up properly. If a relationship to another entity uses the cascade deletion rule, it’s considered to be owned by the receiver, and thus will be copied by -deepCopyWithZone:.
*/
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface NSManagedObject (RXCopying) <NSCopying>
-(void)setRelationshipsToObjectsByIDs:(id)objects;