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
enum AppState: Equatable { | |
case featureOne(FeatureState) | |
case featureTwo(FeatureState) | |
case featureThree(FeatureState) | |
} | |
enum AppAction: Equatable { | |
case featureOne(FeatureAction) | |
case featureTwo(FeatureAction) | |
case featureThree(FeatureAction) |
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
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> | |
NSArray *missingNumbers(NSArray *a){ | |
if(a.count < 2){ | |
return [NSArray new]; | |
} | |
NSMutableArray *array = [NSMutableArray new]; | |
for (NSInteger i = 0; i < a.count - 1; i ++) { |
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
// | |
// LRUCache.m | |
// ObjCAlg | |
// | |
// Created by Tomasz Kuzma on 20/02/2015. | |
// | |
#import <Foundation/Foundation.h> |
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
// Playground - noun: a place where people can play | |
import Cocoa | |
func eratosthenes(n: Int) -> [Int]{ | |
var results = Array(1...n) | |
for i in 1...(n-1){ | |
var number = results[i] |
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
import Foundation | |
func eratosthenes(n: Int) -> [Int]{ | |
var results = [Int]() | |
for i in 0...(n-1){ | |
results.append(i+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
#import <Foundation/Foundation.h> | |
BOOL isDictionary(id object); | |
BOOL isString(id object); | |
BOOL isArray(id object); | |
void addObjectForKeyToArray(NSString *key, id collection, NSMutableArray *array); | |
void addArrayObjectsForKeyToArray(NSString *searchKey, id collection, NSMutableArray *array); |
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
#!/bin/bash | |
# | |
# (Above line comes out when placing in Xcode scheme) | |
# | |
# Inspired by original script by incanus: | |
# https://gist.github.com/1186990 | |
# | |
# Rewritten by martijnthe: | |
# https://gist.github.com/1379127 | |
# |
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
#Gitignore for files generated by Xilinx ISE | |
*.log | |
*.svf | |
*.scr | |
*.cmd | |
*.bak | |
*.lso | |
*.elf | |
*.ace |