(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.
| ;; | |
| ;; NS CHEATSHEET | |
| ;; | |
| ;; * :require makes functions available with a namespace prefix | |
| ;; and optionally can refer functions to the current ns. | |
| ;; | |
| ;; * :import refers Java classes to the current namespace. | |
| ;; | |
| ;; * :refer-clojure affects availability of built-in (clojure.core) | |
| ;; functions. |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE DeriveDataTypeable #-} | |
| import Data.Aeson | |
| import qualified Data.ByteString.Char8 as BS | |
| import qualified Data.ByteString.Lazy.Char8 as BSL | |
| import Data.ByteString.Lazy (toChunks) | |
| import Data.List | |
| import Data.Maybe | |
| import Data.Typeable (Typeable) |
| @synthesize firstName = _firstName; | |
| @synthesize txtFirstName = _txtFirstName; | |
| [RACAbleSelf(self.firstName) subscribeNext:^(id x) { [self firstNameChanged:x]; }]; | |
| [self rac_bind:RAC_KEYPATH_SELF(self.firstName) to:self.txtFirstName.rac_textSubscribable]; | |
| - (void) firstNameChanged:(id)firstName { | |
| NSLog(@"changed: %@", firstName); | |
| } |
| class people::jfryman { | |
| # Applications | |
| include chrome::stable | |
| include onepassword | |
| include dropbox | |
| include alfred | |
| include macvim | |
| include zsh | |
| include homebrew | |
| include fitbit |
| // | |
| // FGOManagedObjectContextStack.h | |
| // | |
| // Created by Indragie Karunaratne on 2012-12-23. | |
| // | |
| #import <Foundation/Foundation.h> | |
| typedef void (^FGOConfigurationBlock)(id); |
| DIR = File.dirname(__FILE__) | |
| BRIDGESUPPORT_FILE = "BridgeSupport.bridgesupport" | |
| namespace :gen do | |
| desc "Generates the bridgesupport file for RubyMotion" | |
| task :bridgesupport do | |
| Dir.chdir(DIR) do | |
| SHELL_COMMAND=<<-EOS.gsub(/^\s*/, '') |
(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.
| operator infix --> {} | |
| func --> (instance: Any, key: String) -> Any? { | |
| let mirror = reflect(instance) | |
| for index in 0 ..< mirror.count { | |
| let (childKey, childMirror) = mirror[index] | |
| if childKey == key { | |
| return childMirror.value | |
| } | |
| } |
The easiest way to start using the LLVM C++ API by example is to have LLVM generate the API usage for a given code sample. In this example it will emit the code required to rebuild the test.c sample by using LLVM:
$ clang -c -emit-llvm test.c -o test.ll
$ llc -march=cpp test.ll -o test.cpp