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
| require 'rubygems' | |
| require 'ruby_fann/neural_network' | |
| # Create Training data with 2 each of inputs(array of 3) & desired outputs(array of 1). | |
| # | |
| inputs = [] | |
| (1..100000).each do |i| | |
| inputs << [(Random.rand(100)/100.0).round(1), (Random.rand(100)/100.0).round(1), (Random.rand(100)/100.0).round(1)] |
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
| NSMutableArray *abEmailAddresses = [NSMutableArray array]; | |
| NSMutableArray *abPhoneNumbers = [NSMutableArray array]; | |
| ABAddressBookRef addressBook = ABAddressBookCreate(); | |
| CFArrayRef people = ABAddressBookCopyArrayOfAllPeople(addressBook); | |
| for (CFIndex i = 0; i < CFArrayGetCount(people); ++i) { | |
| ABRecordRef aRecord = CFArrayGetValueAtIndex(people, i); | |
| // phone numbers | |
| ABMutableMultiValueRef phones = ABRecordCopyValue(aRecord, kABPersonPhoneProperty); |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class Player : MonoBehaviour { | |
| int hp = 10; | |
| public Camera mainCam; |
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
| -- Big Legs | |
| health = 10 | |
| attackSpeed = 1 | |
| aggroRange = 20 | |
| attackDamage = 5 | |
| movement = flying | |
| partType = leg | |
| model = "parts/legs/bigLegs.mdl" |
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
| -- Big Legs | |
| health = 10 | |
| attackSpeed = 1 | |
| aggroRange = 20 | |
| attackDamage = 5 | |
| movement = flying | |
| partType = leg | |
| model = "parts/legs/bigLegs.mdl" |
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
| { | |
| "code": 0, | |
| "response": { | |
| "NetworkRequests": [ | |
| { | |
| "Network": { | |
| "_id": "517046e52bb163132b000000", | |
| "created": { | |
| "sec": 1366312677, | |
| "usec": 567000 |
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
| NSLog(@"yes, we truly created a user in userCon called %@", userCon.user.firstname); | |
| [usersConSet addObject:userCon]; | |
| for(UserCon *uc in usersConSet) { | |
| NSLog(@"added object.. heres all: user from con: %@", uc.user.fullName); | |
| } | |
| } | |
| } | |
| NSLog(@"user cons set from dict..."); |
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
| - (void)saveUserConsDetails:(NSArray*)userCons { | |
| NSManagedObjectContext *moc = self.managedObjectContext; | |
| NSMutableSet *usersConSet = [[NSMutableSet alloc] init]; | |
| if ([NSNull null] != (id)userCons && 0 < [userCons count]) { | |
| UserCon *userCon = nil; | |
| NSString *userConId = nil; | |
| for (NSDictionary* userConData in userCons) { | |
| userConId = [userConData valueForKeyPath:@"UserCon._id"]; | |
| NSLog(@"saveUserConsDetails: %@ with id %@", [userConData valueForKeyPath:@"User.firstname"], userConId); |
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
| { | |
| Network = { | |
| "_id" = 517046e52bb163132b000000; | |
| created = { | |
| sec = 1366312677; | |
| usec = 567000; | |
| }; | |
| modified = { | |
| sec = 1366312677; | |
| usec = 566000; |
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
| 4a978a7c1737047f06386c0a396b983a |