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
find . -name '*.js' -not -path "./node_modules/*" | xargs wc -l |
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
from datetime import datetime, time | |
def dateDiffInSeconds(date1, date2): | |
timedelta = date2 - date1 | |
return timedelta.days * 24 * 3600 + timedelta.seconds | |
def daysHoursMinutesSecondsFromSeconds(seconds): | |
minutes, seconds = divmod(seconds, 60) | |
hours, minutes = divmod(minutes, 60) | |
days, hours = divmod(hours, 24) |
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 Youtube = require('Youtube'); | |
var youtube = new Youtube(); | |
var youtubeId = 'HQ1z0Zzqg5U'; | |
youtube.h264videosWithYoutubeURL(youtubeId, function(e) { | |
videoPlayer.url = e.medium; | |
}, function(e) { | |
alert(JSON.stringify(e)); | |
}); |
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 search = Titanium.UI.createSearchBar({ | |
barColor:'#000', | |
showCancel:true, | |
height:43, | |
top:0 | |
}); | |
var tableView = Titanium.UI.createTableView({ | |
top:40, | |
data:{title:'Please perform a search'} |
NewerOlder