日本語 | 英語 | 例 | 備考 |
---|---|---|---|
自然数 | natural number | 1,2,3... | ものの個数など |
整数 | integer | ...-2,-1,0,1,2,... | 自然数に0とマイナスが加わったもの |
有理数 | rational number | 2/3, -3/4など | 割り算(分数)で表現されるもの。循環小数もOK。分母を1とすれば整数も有理数として表現できる。rationalとは理性的とか合理的とかの意味 |
無理数 | irrational number | π,e,√2など | 有理数では表現できないもの |
実数 | actual number | 有理数+無理数 | |
複素数 | complex number | a+bi | 実数aと実数bと虚数iを用いてa+biの形になる数 |
ベクトル | vector | 大きさに加え向きも持った量 | |
行列 | matrix |
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
open("foo.txt", "r", :encoding => "SJIS") do |f| | |
f.each_line do |l| | |
l.each_char do |c| | |
puts "#{c} : #{c.ord}, #{c.bytes.map {|b| "%02X" % b} }" | |
end | |
end | |
end | |
puts '本'.bytes.map {|b| "%02X" % b } |
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
subscriptions一覧して、pushEndpointがnullじゃないものをフィルタ、nameとpushEndpointを使ってpush-auth-service-accountを設定する(設定にpushEndpointが必須なため取っている) | |
``` | |
gcloud pubsub subscriptions list --format=json \ | |
| jq -r '.[] | select(.pushConfig.pushEndpoint != null) | [.name, .pushConfig.pushEndpoint] | @sh' \ | |
| awk '{ print "gcloud pubsub subscriptions update " $1 " --push-auth-service-account=xxxxxxx@appspot.gserviceaccount.com --push-endpoint=" $2 }' \ | |
| sh | |
``` | |
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
<a href="http://www.google.co.jp">Google</a> |
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
object Main extends App { | |
def decorate[T](x: T)(implicit deco: Decorating[T]) = deco(x) | |
trait Decorating[T] { | |
def apply(x: T): String | |
} | |
implicit val DecoratingString = new Decorating[String] { | |
def apply(x: String) = s"SSS $x SSS" |
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
<html> | |
<body> | |
<h1>toysohima test page</h1> | |
</body> | |
</html> |