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
#file ".gitignore", <<-END | |
#.DS_Store | |
#log/*.log | |
#tmp/**/* | |
#config/database.yml | |
#db/*.sqlite3 | |
#END | |
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore" | |
run "cp config/database.yml config/example_database.yml" |
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
#mount a folder | |
mount --bind temp tmp |
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
var startDate:Date=new Date(); | |
startDate.setTime(startDate.getTime() - 6 * 24 * 3600 * 1000); |
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
1. javascript error: line 2, char 1 | |
missed js file |
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
<mx:Style> | |
.gradientBackground { borderStyle: applicationControlBar; fillColors: #EEEEFF, #8888AA; fillAlphas: 0.7, 0.7; highlightAlphas: 0, 0; } | |
</mx:Style> | |
<mx:VBox styleName=”gradientBackground” width=”300″ height=”300″ /> | |
encodeURI: | |
UrlParam = UrlParam + '&name=' + encodeURIComponent(name.text) + | |
'&business=' + encodeURIComponent(buisness.text); | |
navigateToURL(new URLRequest(UrlParams),'_self'); |
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
//bindable getter | |
[Bindable(event='imageStatusChanged')] | |
public function get status():String | |
{ | |
return _status; | |
} | |
public function set status(s:String):void | |
{ | |
__status = s; | |
this.dispatchEvent(new Event('imageStatusChanged')); |
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
>> s = "One\nTwo\nThree\nFour\n" | |
=> "One\nTwo\nThree\nFour\n" | |
>> s.to_a[2..-1].join | |
=> "Three\nFour\n" | |
#delete the first 2 lines. |
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
require 'net/http' | |
require 'rexml/document' | |
# Web search for "madonna" | |
url = 'http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=YahooDemo&query=madonna&results=2' | |
# get the XML data as a string | |
xml_data = Net::HTTP.get_response(URI.parse(url)).body | |
# extract event information |
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
# h = [["a", 100], ["c", 300], ["d", 400]] 怎么转化成 {"c" => 300, "a" => 100, "d" => 400, "c" => 300 }这样一个hash | |
h.flatten! | |
Hash[*h] |
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
<mx:PieChart x="92" y="200" id="pieTeamEffort" dataProvider="{teamEffort}" showDataTips="true"> | |
<mx:series> | |
<mx:PieSeries displayName="Effort" field="effort" nameField="name"> | |
<mx:showDataEffect> | |
<mx:SeriesInterpolate duration="1000"/> | |
</mx:showDataEffect> | |
</mx:PieSeries> | |
</mx:series> | |
</mx:PieChart> |
OlderNewer