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
| class Radiko | |
| # channel | |
| # TBS .. TBSラジオ | |
| # RN1 .. ラジオNIKKEI第1 | |
| # RN2 .. ラジオNIKKEI第2 | |
| # RBC .. RBCiラジオ | |
| # CRK .. ラジオ関西 | |
| # RKB .. RKBラジオ | |
| # HBC .. HBCラジオ | |
| # |
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
| font = Font.new(30) | |
| while System.update do | |
| Circle.new(Mouse.pos, 100).draw | |
| # font["こんにちは"].draw | |
| # font[Mouse.pos.to_s].draw | |
| font["マウス座標: #{Mouse.pos}"].draw | |
| # font[Mouse.pos].draw(50, 200) | |
| # font[Mouse.pos].draw(50, 200, Pallete::Orange) | |
| end |
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
| # coding: utf-8 | |
| a = 1 | |
| b = 3 | |
| array = [1, 2, 3] | |
| # array.each { |e| } | |
| r = a + b + array[0] + array[1] + array[2] | |
| println "Hello mruby #{r}" | |
| println "こんにちは, Siv3DRuby" | |
| # wait_key |
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
| # coding: utf-8 | |
| a = 1 | |
| b = 3 | |
| array = [1, 2, 3] | |
| # array.each { |e| } | |
| r = a + b + array[0] + array[1] + array[2] | |
| println "Hello mruby #{r}" | |
| println "こんにちは, Siv3DRuby" | |
| # wait_key |
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
| img = Image.render(1,1) {} | |
| (1..24).each do |i| | |
| puts i | |
| img.save | |
| sleep 0.1 | |
| end |
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
| url = Popup.input "amebloのURLを入力してください" | |
| #todo: amebloアプリからsafariで開いた際に余計なパラメータが付くことがありyqlで失敗する。パラメータを除去する | |
| url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'" + url + "'%20and%20xpath%3D'%2F%2Fimg%5Bcontains(%40src%2C%20%22http%3A%2F%2Fstat.ameba.jp%2Fuser_images%2F%22)%5D%5Bnot(contains(%40src%2C%20%22%3Fcpd%3D%22))%5D'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | |
| json = Browser.json url | |
| #p json | |
| imgs = json['query']['results']['img'] | |
| imgs = [imgs] unless imgs.is_a? Array | |
| num = 0 | |
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
| i = Image.pick_from_library | |
| puts i |
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
| url = Popup.input "amebloのURLを入力してください" | |
| #todo: amebloアプリからsafariで開いた際に余計なパラメータが付くことがありyqlで失敗する。パラメータを除去する | |
| url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'" + url + "'%20and%20xpath%3D'%2F%2Fimg%5Bcontains(%40src%2C%20%22http%3A%2F%2Fstat.ameba.jp%2Fuser_images%2F%22)%5D%5Bnot(contains(%40src%2C%20%22%3Fcpd%3D%22))%5D'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | |
| json = Browser.json url | |
| #p json | |
| imgs = json['query']['results']['img'] | |
| num = 0 | |
| imgs.each do |e| |
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
| puts Image.load "http://stat.ameba.jp/user_images/20170217/23/but-show/0a/41/j/o0480064013871124189.jpg?caw=800" |
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
| url = Popup.input "amebloのURLを入力してください" | |
| #todo: amebloアプリからsafariで開いた際に余計なパラメータが付くことがありyqlで失敗する。パラメータを除去する | |
| url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'" + url + "'%20and%20xpath%3D'%2F%2Fimg%5Bcontains(%40src%2C%20%22http%3A%2F%2Fstat.ameba.jp%2Fuser_images%2F%22)%5D%5Bnot(contains(%40src%2C%20%22%3Fcpd%3D%22))%5D'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys" | |
| json = Browser.json url | |
| #p json | |
| imgs = json['query']['results']['img'] | |
| num = 0 | |
| imgs.each do |e| |