This file contains 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
/** | |
* Solution to the following: | |
* Given a dictionary, output all word pairs where both words share all their letters except the last two, which are distinct and reversed. | |
* | |
* Notes: | |
* - Use a reasonable dictionary of your choice | |
* - Potential word pairs are: "ear, era" ; "revies, revise" ; "burglaries, burglarise" | |
* - "shear, era" is not a valid pair because "she" != "e" | |
* - "bell, bell" is not a valid pair because the last two letters are not distinct | |
* - This will be benchmarked |
This file contains 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
# Solution to the following: | |
# Given a dictionary, output all word pairs where both words share all their letters except the last two, which are distinct and reversed. | |
# | |
# Notes: | |
# - Use a reasonable dictionary of your choice | |
# - Potential word pairs are: "ear, era" ; "revies, revise" ; "burglaries, burglarise" | |
# - "shear, era" is not a valid pair because "she" != "e" | |
# - "bell, bell" is not a valid pair because the last two letters are not distinct | |
# - This will be benchmarked | |
# - Work on this problem in C, C++, Java, Perl, PHP, Python or a similar language. |
This file contains 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
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
This file contains 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains 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
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Source+Code+Pro:200,300" media="screen"> | |
<div id="siri"> | |
<div id="spin"></div> | |
<a id="icon"> | |
<span class="highlights"></span> | |
</a> | |
</div> |
This file contains 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
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Source+Code+Pro:200,300" media="screen"> | |
<div id="siri"> | |
<div id="spin"></div> | |
<a id="icon"> | |
<span class="highlights"></span> | |
</a> | |
</div> |
This file contains 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
#<Twitter::Tweet:0x007f8751763768 @attrs={:created_at=>"Tue Jun 18 18:47:34 +0000 2013", :id=>347063051306020864, :id_str=>"347063051306020864", :text=>"Hashtags or hashbrowns? #hashtags #or #hashbrowns", :source=>"web", :truncated=>false, :in_reply_to_status_id=>nil, :in_reply_to_status_id_str=>nil, :in_reply_to_user_id=>nil, :in_reply_to_user_id_str=>nil, :in_reply_to_screen_name=>nil, :user=>{:id=>1525082400, :id_str=>"1525082400", :name=>"Wall-to-Wall Devs", :screen_name=>"WW_webdev", :location=>"", :description=>"", :url=>nil, :entities=>{:description=>{:urls=>[]}}, :protected=>false, :followers_count=>1, :friends_count=>5, :listed_count=>0, :created_at=>"Mon Jun 17 15:16:34 +0000 2013", :favourites_count=>0, :utc_offset=>nil, :time_zone=>nil, :geo_enabled=>false, :verified=>false, :statuses_count=>4, :lang=>"en", :contributors_enabled=>false, :is_translator=>false, :profile_background_color=>"C0DEED", :profile_background_image_url=>"http://a0.twimg.com/images/themes/theme1/bg.png", :profile_background_ |
This file contains 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
# assuming that you got the tweet back and assgined it to "tweet" | |
output = tweet[:text].tap do |t| | |
tweet[:entities][:hashtags].reverse.each do |h| | |
t[h[:indices][0], h[:indices][1] - h[:indices][0]] = "<a href=\"\#\">\##{h[:text]}</a>" | |
end | |
end |
This file contains 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
windowResizeHandler = null; | |
$(window).resize(function() { | |
clearTimeout(windowResizeHandler); | |
windowResizeHandler = setTimeout(function() { | |
var docWidth = $('document').width(); | |
if (docWidth > 200) { | |
// do some'n | |
} | |
}, 250); |
This file contains 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
mixin tabMenu | |
ul.menu.tabs(data-tab role="tablist") | |
if block | |
block | |
mixin tabMenuItem(id, label, active) | |
li(class="tab-title"+(active ? " active" : "") role="presentational") | |
a(href=("#"+id) role="tab" tabindex="0" aria-selected="true" controls=id)=label | |
mixin tabContentContainer |
OlderNewer