Skip to content

Instantly share code, notes, and snippets.

View deholic's full-sized avatar

Euigyom Kim deholic

View GitHub Profile
@deholic
deholic / gist:3774193
Created September 24, 2012 04:32
UI control in GCD Code
[NSURLConnection sendAsynchronousRequest:req
queue:[[[NSOperationQueue alloc] init] autorelease]
completionHandler:^(NSURLResponse *response,
NSData *data,
NSError *error) {
NSError* err;
NSDictionary *respJSON = [NSJSONSerialization JSONObjectWithData:data
options:NSJSONReadingMutableContainers
error:&err];
dispatch_async(dispatch_get_main_queue(), ^{
@deholic
deholic / linkedList.js
Created April 27, 2012 09:08
Javascript LinkedList (not tested!)
var node = function(text) {
var pointers = { _next: null };
var data = { text: null };
var _const = function() {
this.data.text = text;
};
if(!!text) _const();
return {
@deholic
deholic / dom_check.js
Created March 23, 2012 02:06
DOM Height Calculator
getData(function (data) {
if(!!data) {
var recursiveExecute = function (data) {
if (data.length) {
// recursive 방식으로 DOM 객체를 순차적으로 작성
getExcute(data, recursiveExecute);
}
else {
// 추가된 Image 객체들의 마지막을 구하여
// 그 마지막 Image 객체가 로드 되면 길이를 재는 방식