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
unless ARGV.size == 2 | |
puts "USAGE: ruby guess.rb ACKRCKOOLCWZ 5" | |
exit 1 | |
end | |
letters = ARGV[0].downcase.split(//).sort | |
length = ARGV[1].to_i | |
words = [] | |
File.open('/usr/share/dict/words') do |file| |
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 createPlaylistItemsTable = "CREATE TABLE " + PlaylistItems.TABLE_NAME + " (" | |
+ PlaylistItems.COLUMN_NAME_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " | |
+ PlaylistItems.COLUMN_NAME_GUID + " VARCHAR(50), " + PlaylistItems.COLUMN_NAME_TITLE | |
+ " VARCHAR(255), " + PlaylistItems.COLUMN_NAME_DESCRIPTION + " VARCHAR(1024), " | |
+ PlaylistItems.COLUMN_NAME_PUB_DATE + " INTEGER, " + PlaylistItems.COLUMN_NAME_DURATION | |
+ " INTEGER, " + PlaylistItems.COLUMN_NAME_REGULAR_VIDEO_URL + " VARCHAR(512), " | |
+ PlaylistItems.COLUMN_NAME_HIGH_VIDEO_URL + " VARCHAR(512), " | |
+ PlaylistItems.COLUMN_NAME_HLS_VIDEO_URL + " VARCHAR(512), " | |
+ PlaylistItems.COLUMN_NAME_THUMBNAIL_URL + " VARCHAR(512), " + PlaylistItems.COLUMN_NAME_MORE_XML | |
+ " VARCHAR(512), " + PlaylistItems.COLUMN_NAME_PLAYLIST_ID + " INTEGER, UNIQUE (" |
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
CREATE TABLE playlists (_id INTEGER PRIMARY KEY AUTOINCREMENT, cache_date INTEGER, pubDate INTEGER, guid VARCHAR(255), title VARCHAR(255), description VARCHAR(1024), osplaylistId INTEGER, image_url VARCHAR(1024), feed_url VARCHAR(255), feed_type INTEGER, playlist_type INTEGER, is_default INTEGER, sort_order INTEGER, UNIQUE (title, feed_url) ON CONFLICT REPLACE); | |
CREATE TABLE playlist_items (_id INTEGER PRIMARY KEY AUTOINCREMENT, guid VARCHAR(50), title VARCHAR(255), description VARCHAR(1024), pubDate INTEGER, duration INTEGER, regular_video_url VARCHAR(512), high_video_url VARCHAR(512), hls_video_url VARCHAR(512), thumbnail_url VARCHAR(512), more_xml VARCHAR(512), playlist_id INTEGER, UNIQUE (playlist_id, guid), FOREIGN KEY(playlist_id) REFERENCES playlists(_id) ON DELETE CASCADE); | |
Error inserting guid=4965352 pubDate=1347906812000 thumbnail_url=http://images.1sfx.net/1202735/1202735_DA_OTU1OTEzNTQ=.jpg duration=381000 title=World's Most Beautiful Sunrises and Sunsets more_xml=null _id=399 hls_video_url=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
import sys | |
if __name__ == '__main__': | |
# check command line argument for 25 letters | |
if len(sys.argv[1]) == 25: | |
listOfLetters = list(sys.argv[1]) | |
print listOfLetters | |
# better than readlines as this doesnt include \n | |
dictionary = open('/usr/share/dict/words', 'r').read().splitlines() |
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
chrome.tabs.executeScript(null, {file: "content_script.js"}, function() { | |
chrome.tabs.sendMessage(null, { | |
message: 'dom' | |
}, function(response){ | |
console.log('response', response); | |
screenshot(response); | |
}); | |
}); |
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
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Board: blaze_tablet | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Bootloader: unknown | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Brand: Amazon | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): CPU_ABI: armeabi-v7a | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): CPU_ABI2: armeabi | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Device: D01E | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Display: IML74K | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Fingerprint: Android/tate/tate:4.0.3/IML74K/7.4.3_user_4309320:user/release-keys | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Hardware: bowser | |
07-12 13:32:45.730: E/com.onescreen.popsugar(2779): Host: ip-10-166-55-151 |
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 text = list[i].text.match(/[a-zA-Z0-9,.<>\\?!@#$%^&*()-=_+ "':;{}\[\]]*/, ""); | |
if (text !== undefined) { | |
text = text.toString().replace(/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi, ""); | |
} else { | |
break; | |
} | |
text = text.toString().replace(/^\s+|\s+$/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
com.onescreen.define(['util', 'jquery', 'client', 'sfc', 'css!./main.css'], function(util, $, client, SFC) { | |
function render(configObj, player) { | |
// Build UI | |
// Bind beacon event handlers | |
// Bind UI event handlers | |
} | |
return render; | |
}); |
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
com.onescreen.define(['util', 'jquery', 'client', 'sfc', 'css!./main.css'], function(util, $, client, SFC) { | |
function render(configObj, playlist) { | |
// Build UI | |
// Bind beacon event handlers | |
// Bind UI event handlers | |
} | |
return render; | |
}); |
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
public static void combine( String str ){ | |
int length = str.length(); | |
char[] instr = str.toCharArray(); | |
StringBuilder outstr = new StringBuilder(); | |
doCombine( instr, outstr, length, 0 ); | |
} | |
public static void doCombine( char[] instr, StringBuilder outstr, int length, int start ){ | |
for( int i = start; i < length; i++ ){ | |
outstr.append( instr[i] ); |
OlderNewer