Basic javascript algorithms toolbox: starter kit - hackernoon
Introduction to Algorithms with Ruby -Thomas Roest
Tackling JavaScript Algorithm Challenges(Data Structures and Common Algorithms)
{title: "每天日语十分钟", | |
description: "", | |
start: "2018-2-1", | |
end: "2018-2-22", | |
members: [{id: 1, nickname:"走路兜风", avatar:"", wechat_ref:""},{id: 1, nickname:"走路兜风", avatar:"", wechat_ref:""}]} |
rails new YOUR-APP-NAME-GOES-HERE --skip-turbolinks --skip-spring -d postgresql -T | |
cd YOUR-APP-NAME-GOES-HERE | |
rails g scaffold PostOrSomething title:string content:text author:string # add other fields here as needed | |
rails db:drop # make sure there is no existing DB to cause conflicts | |
rails db:create | |
rails db:migrate | |
rails g controller pages app # create a new controller with a single app action, where your app lives | |
# edit config/routes.rb to add the correct route line for "pages#app" | |
rails s # good to go! |
@places = Place.where('lower(name) like ?', "%#{params[:q].downcase}%").all | |
number_to_currency(1234567890.50) # => $1,234,567,890.50 | |
number_to_currency(1234567890.506) # => $1,234,567,890.51 | |
number_to_currency(1234567890.506, precision: 3) # => $1,234,567,890.506 | |
number_to_currency(1234567890.506, locale: :fr) # => 1 234 567 890,51 ⬠| |
number_to_currency("123a456") # => $123a456 | |
number_to_currency("123a456", raise: true) # => InvalidNumberError | |
number_to_currency(-1234567890.50, negative_format: "(%u%n)") | |
# => ($1,234,567,890.50) |
We can use the numberOfLines
(https://facebook.github.io/react-native/docs/text.html#numberoflines) parameter on a Text
component:
long long long long text
Will produce:
long long long…