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
class BarChartTest < Test::Unit::TestCase | |
def test_bar_chart | |
@chart = GoogleVisualr::BarChart.new | |
@chart.add_column('string', 'Year') | |
@chart.add_column('number', 'Sales') | |
@chart.add_column('number', 'Expenses') | |
@chart.add_rows(4) | |
@chart.set_value(0, 0, '2004') | |
@chart.set_value(0, 1, 1000) | |
@chart.set_value(0, 2, 400) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<script type="text/javascript" src="js/lastfm.api.md5.js"></script> | |
<script type="text/javascript" src="js/lastfm.api.js"></script> | |
<script type="text/javascript" src="js/lastfm.api.cache.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script> | |
/* Create a LastFM object */ |
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
[master] clifff@~/Programming/code_jam/hangman: rake | |
(in /Users/clifff/Programming/code_jam/hangman) | |
Testing hangman.rb against works/sample.in... | |
Great success! | |
Testing hangman.rb against fails/B-small-attempt0.in... | |
Not a total failure! | |
Testing hangman.rb against fails/B-small-attempt4.in... | |
FAIL. Current program matched a known bad output! |
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
5.times do | j | | |
Story.create(:user => users[:author], :community => com, | |
:title => "This is test story ##{j}", | |
:body => test_body(j), :draft => false, :front_page => true) | |
end |
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
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') |
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
{ | |
"entries":[ | |
{ | |
"body":"<p>Tim Cook announces iOS 6</p>\n", | |
"id":1788, | |
"pinned":false, | |
"sequence":318000, | |
"timestamp":"2012-05-29T15:40:43Z", | |
"published_at":"2012-05-29 14:26:38 -0400" | |
}, |
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
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') |
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
def date_whatever(time,tz=false) | |
return "" if time.nil? | |
if time.kind_of? String | |
time = Time.parse(time) | |
end | |
tz = TzTime.zone unless tz | |
time = tz.utc_to_local(time.utc) | |
month = time.strftime("%B") | |
day = time.day.ordinalize |
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
D/dalvikvm(14127): GC_CONCURRENT freed 1056K, 58% free 5146K/11975K, external 1168K/1313K, paused 3ms+6ms | |
D/skia (14127): purging 193K from font cache [28 entries] | |
D/skia (14127): createPlugin (300,150) screen proportion:(w,h)=(0.791557,0.057826), content ratio:2.000000 mainUrl:http://athleticsnation.local:3000/2012/10/23/3543068/simple-question-giants-or-tigers | |
D/skia (14127): createPlugin F10 typical2 video content (300,150)/(379,2594), url= | |
D/webcore (14127): [WebViewCore::handleMessage] handle msg=[4::120] over 1 sec. (1038.0 | |
D/skia (14127): purging 193K from font cache [27 entries] | |
D/dalvikvm(14127): GC_CONCURRENT freed 1825K, 63% free 4497K/11975K, external 1168K/1313K, paused 3ms+6ms | |
D/webcore (14127): [WebViewCore::checkBlock] mHandleClass=3 mHandleMsgId=1 mHandleStartTime=385.0 hascode-0=1079596336 | |
D/webcore (14127): [WebViewCore::checkBlock] == m_bIsPauseTimes=false, mLastHandleMsg=null --d1=1.352745715978E12 d2=948.0 | |
W/ContentService( 1646): binderDied() at ObserverNode name allowed_geo |
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
11-12 14:37:36.949 497 746 I ActivityManager: Starting: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=http://www.sbnation.com/ cmp=com.android.browser/.BrowserActivity } from pid 3169 | |
11-12 14:37:37.340 3169 3191 V SQLiteDatabaseWrapper: enter SQLiteDatabaseWrapper.update() | |
11-12 14:37:37.340 3169 3192 V SQLiteDatabaseWrapper: enter SQLiteDatabaseWrapper.update() | |
11-12 14:37:37.347 3169 3179 V SQLiteDatabaseWrapper: enter SQLiteDatabaseWrapper.update() | |
11-12 14:37:39.472 3169 3171 D dalvikvm: GC_CONCURRENT freed 1229K, 46% free 4017K/7431K, external 3354K/3560K, paused 3ms+11ms | |
11-12 14:37:39.926 3169 3181 D dalvikvm: GC_FOR_MALLOC freed 653K, 45% free 4235K/7623K, external 3249K/3560K, paused 23ms | |
11-12 14:37:41.597 852 852 I wpa_supplicant: CTRL-EVENT-STATE-CHANGE id=1 state=4 BSSID=00:00:00:00:00:00 | |
11-12 14:37:41.597 497 924 V WifiMonitor: Event [CTRL-EVENT-STATE-CHANGE id=1 state=4 BSSID=00:00:00:00:00:00] | |
11-12 14:37:41.597 497 577 V WifiSt |
OlderNewer