Recommended to use string.Concat() or directly use + operator for better performance.
Test times: 10,000,000
1. PlusOperator: 6825
2. Interpolation: 10037
3. StringFormat: 9940
4. StringConcat: 6822
5. StringJoin: 8255
6. StringBuilder: 7157
熱血人次: 309
Python3
brew install python3
python3 –version
PiP
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
pip –version
Jupyter
pip3 install jupyter
熱血人次: 501
Overview
Copy specific files from one directory to another directory.
熱血人次: 304
Overview
Appearance -> Theme Options -> Design Options Tab -> Custom CSS
body, input, textarea {
font-size: 16px;
}
熱血人次: 240
git config –global core.compression 0
git clone –depth 1
git fetch –unshallow
git pull –all
熱血人次: 651
Problem
An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.
Make sure that `gem install rmagick -v ‘2.13.2’` succeeds before bundling.
Solution
brew install ImageMagick
gem install rmagick
熱血人次: 445
Problem
An error occurred while installing libv8 (3.11.8.17), and Bundler cannot
continue.
Make sure that `gem install libv8 -v ‘3.11.8.17’` succeeds before bundling.
Solution
gem install libv8 -v 3.11.8.17 — –with-system-v8
熱血人次: 265
Problem
An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v ‘1.0.3’` succeeds before bundling.
Solution
brew link openssl –force
熱血人次: 329
Rails
rails new #name
rails destroy
rails s (server)
rails c (console)
rails db (dbconsole)
Rails generate
rails g (generate) #name #parameter
assets
controller
generator
helper
jbuilder
mailer
migration
model
scaffold
task
Rake
rake about
rake stats
rake routes
rake notes
rake test
rake test:models
rake db:create
rake db:drop
rake db:migrate
rake db:rollback
Tag
link_to
button_to
content_tag
javascript_include_tag
stylesheet_link_tag
image_tag
熱血人次: 466
1. 安裝 Homebrew
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
2. 安裝 Ruby
brew install ruby
3. 下載並安裝 RubyGems
ruby setup.rb
4. 安裝 Rails
gem install rails –no-ri –no-rdoc
熱血人次: 629