Skip to content

Instantly share code, notes, and snippets.

{"sig":"ba65e0437d72183fb9347db7e8e91d718698da4de64c3848abf4d05b7d75cd997cfd88621a7ce6abdf3a26200787ed4cbd4960720774fb7236a97a4eaf11fd1c0","msghash":"c3497a99f918ebca7e4cc080e00bf9235e9b241a837ef17e7d17620e50c347de"}
String names[] = {
"name1",
"name2",
"name3",
"name4"
};
String types[] = {
DocDataType, //对应name1
DocDataType,
@liyong03
liyong03 / keybase.md
Created August 6, 2014 03:37
keybase.md

Keybase proof

I hereby claim:

  • I am liyong03 on github.
  • I am liyong03 (https://keybase.io/liyong03) on keybase.
  • I have a public key whose fingerprint is D668 0D53 1C5F 6B68 DDD6 B896 3EE9 917C 61AF 9FA6

To claim this, I am signing this object:

@liyong03
liyong03 / Objective-C Vector
Last active August 29, 2015 14:04
Objective-C Vector
//
// Copyright (c) 2009 Bálint Jánvári
// www.programmaticmagic.com
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@liyong03
liyong03 / download_wwdc_2014
Last active August 29, 2015 14:02
WWDC2014 video download
#!/usr/bin/python
import urllib2
from xml.dom import minidom
from bs4 import BeautifulSoup
import json
import os
import subprocess
#read download session
//
// RSTimingFunction.h
//
// Created by Raphael Schaad on 2013-09-28.
// This is free and unencumbered software released into the public domain.
//
#import <Foundation/Foundation.h>
@liyong03
liyong03 / gist:9734479
Created March 24, 2014 05:13
UILabel With Insects
static const int kUnknownTextColor = 0x666663;
static const CGFloat kUnknownFontSize = 14;
static const CGFloat kUnknownLabelMargin = 20;
@interface SocialUnknownLabel : UILabel
+ (CGFloat)requiredHeightWith:(CGFloat)width;
@end