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
| for i in [0..n-1] | |
| for j in [i+1..n-1] |
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
| newDate_from_facebook_created_time = (created_time)-> | |
| return new Date((created_time or "").replace(/-/g, "/").replace(/[TZ]/g, " ")) |
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
| newDate_from_tweetCreatedAt = (created_at)-> | |
| created_at = created_at.split ' ' | |
| # 投稿日時変換 "Mon Dec 01 14:24:26 +0000 2008" -> "Dec 01, 2008 14:24:26" | |
| post_date = created_at[1] + " " + created_at[2] + ", " + created_at[5] + " " + created_at[3] | |
| # 日時データ処理 | |
| date = new Date post_date # 日付文字列 -> オブジェクト変換 | |
| date.setHours(date.getHours() + 9) # UTC -> JST (+9時間) | |
| return date |
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 style = element.currentStyle || document.defaultView.getComputedStyle(element, '') |
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
| slicePalamValue = function(url, key){ | |
| return url.split(key+"=")[1].split("&")[0]; | |
| } | |
| var url = http://aaaaaaaaa.com/code=ABCDEFG | |
| console.log(slicePalamValue(url,"code")); //ABCDEFG |
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
| Post.find({}).sort('-created').execFind( function(err, items){ | |
| console.log( err ); | |
| res.render('index.jade', { title: title, posts: items }); | |
| }); |
NewerOlder