This file contains hidden or 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
getData(function (data) { | |
if(!!data) { | |
var recursiveExecute = function (data) { | |
if (data.length) { | |
// recursive 방식으로 DOM 객체를 순차적으로 작성 | |
getExcute(data, recursiveExecute); | |
} | |
else { | |
// 추가된 Image 객체들의 마지막을 구하여 | |
// 그 마지막 Image 객체가 로드 되면 길이를 재는 방식 |
This file contains hidden or 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
var node = function(text) { | |
var pointers = { _next: null }; | |
var data = { text: null }; | |
var _const = function() { | |
this.data.text = text; | |
}; | |
if(!!text) _const(); | |
return { |
This file contains hidden or 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
[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(), ^{ |
This file contains hidden or 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
var stringForCheck = "hello", patternRegExp = /[0-9][a-z]/; | |
var isCorrect = (new RegExp(stringForRegExp)).test(stringForCheck); |
This file contains hidden or 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
JSON.Parse(targetString.replace(/\n/g, "\\n")); |
This file contains hidden or 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
Meteor.startup(function() { | |
// check twitter authorize | |
var config = Accounts.loginServiceConfiguration.findOne({service: "twitter"}); | |
if(!config) { | |
Accounts.loginServiceConfiguration.insert({ | |
service: "twitter", | |
consumerKey: "YOUR_APP_CONSUMER_KEY", | |
secret: "YOUR_APP_CONSUMER_SECRET" | |
}); | |
}; |
This file contains hidden or 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
$ cd /System/Library/Frameworks/JavaVM.framework/Versions | |
$ sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5 | |
$ sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 |
This file contains hidden or 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
table = [[UITableView alloc] initWithFrame:frame style:UITableViewStyleGrouped]; | |
// UITableView setBackgroundColor method is deprecated! | |
// use setBackgroundView! | |
[table setBackgroundView:nil]; | |
[table setBackgroundColor:[UIColor clearColor]]; |
This file contains hidden or 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
String.format = String.prototype.format = function() { | |
var i=0; | |
var string = (typeof(this) == "function" && !(i++)) ? arguments[0] : this; | |
for (; i < arguments.length; i++) | |
string = string.replace(/\{\d+?\}/, arguments[i]); | |
return string; | |
} |
This file contains hidden or 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
var str = "0000008"; | |
console.log("print : " + parseInt(str)); // print : 0 {or} print : 8 | |
console.log("print : " + parseInt(str, 10)); // print : 8 |
OlderNewer