##bundler ひな形を生成
bundle gem supergem -b
<Link to="mypage" className="aaa"></Link> |
// item-list.jsx | |
import Item from './item.jsx' | |
propTypes() { | |
itemLimit: React.PropTypes.number | |
} | |
render() { |
##bundler ひな形を生成
bundle gem supergem -b
ssh-add .ssh/xxxxxx_rsa |
プール代数と比較演算
1> true and false.
false
2 > false or true.
true
3 > true xor false.
true
4 > not false.
動く擬似コード
(2..100).each do |candidate| # 2から100までのそれぞれ(each)について、順に素数の候補(candidate)として扱う
sqrt = Math.sqrt(candidate) # 候補の平方根(square root)を取る
factor_found = (2..sqrt).any? {|i| candidate % i == 0} # foctor_found = 2から平方根までのいずれかのanyが、candidate % i == 0となる
if factor_found then
print "#{candidate}は合成数\n"
else
print "#{candidate}は素数\n"
タブ文字を入力 C-q 【TAB】 |