(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // (c) 2014 Nate Cook, licensed under the MIT License | |
| /** | |
| Returns a tuple with the closest compound fraction possible with Unicode's built-in "vulgar fractions". | |
| See here: http://www.unicode.org/charts/PDF/U2150.pdf | |
| :param: number The floating point number to convert. | |
| :returns: A tuple (String, Double): the string representation of the closest possible vulgar fraction and the value of that string |
| #! /bin/sh | |
| function print_example() { | |
| echo "Example" | |
| echo " icons ios ~/AppIcon.pdf ~/Icons/" | |
| } | |
| function print_usage() { | |
| echo "Usage" | |
| echo " icons <ios|watch|complication|macos> in-file.pdf (out-dir)" |
| - (void)resetCoreData { | |
| DDLogInfo(@"[RESET-COREDATA] Started."); | |
| [MagicalRecord cleanUp]; | |
| NSURL *storeURL = [NSPersistentStore MR_urlForStoreName:kMobilStoreName]; | |
| NSURL *walURL = [[storeURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"sqlite-wal"]; | |
| NSURL *shmURL = [[storeURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"sqlite-shm"]; | |
| /// Our custom drop-in replacement `precondition`. | |
| /// | |
| /// This will call Swift's `precondition` by default (and terminate the program). | |
| /// But it can be changed at runtime to be tested instead of terminating. | |
| func precondition(@autoclosure condition: () -> Bool, @autoclosure _ message: () -> String = "", file: StaticString = __FILE__, line: UWord = __LINE__) { | |
| preconditionClosure(condition(), message(), file, line) | |
| } | |
| /// The actual function called by our custom `precondition`. | |
| var preconditionClosure: (Bool, String, StaticString, UWord) -> () = defaultPreconditionClosure |
| #!/bin/bash | |
| # | |
| # 通过对比 ping 响应时间,找到本机最快的上传ip | |
| # Travis@fir.im | |
| # | |
| # 使用方法: | |
| # sh -c "$(curl -sSL https://gist.githubusercontent.com/trawor/5dda140dee86836b8e60/raw/turbo-qiniu.sh)" | |
| echo "# 这个脚本理论上可以帮你获取任意域名的最快速的IP" | |
| echo "# 获取IP列表的服务由 17ce.com 提供, 非常感谢有这么好的免费服务!" |
I have tried a lot of solutions for IP-camera streams.
Vitamio.https://github.com/yixia/Vitamio-iOS
Result: random crashes and not working cameras
https://github.com/kolyvan/kxmovie
Result: compile time error. I haven't successfully integrated it to my project.
GStreamer. https://github.com/sdroege/gst-player
| // | |
| // Signal+Extensions.swift | |
| // Khan Academy | |
| // | |
| // Created by Nacho Soto on 10/1/15. | |
| // Copyright © 2015 Khan Academy. All rights reserved. | |
| // | |
| import ReactiveCocoa |