This file contains 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
<nicovideo_thumb_response status="ok"> | |
<thumb> | |
<video_id>sm20718817</video_id> | |
<title>【Minecraft】ゆかり「メイジタワー爆破しましょう」part1【VOICEROID+実況】</title> | |
<description> | |
結月ゆかりがお好き? 結構、ではますます好きになりますよ。さあさどうぞ、ゆかりさんです。Minecraft ver1.4.7 難易度ハード使用テクスチャ:Hashibamiにユカリテクスチャ、TEX-D2、LB Photo Realismを混ぜています。目標:黄昏の森のTwilight Lichを落下死させる他、思いつきで追加縛り:松明、グロウストーン、ジャック・オ・ランタン、ほたるの設置禁止(一部の装飾用としては利用します)主な導入Mod:The Twilight Forest、PlayerFormLittleMaid、Balkon's WeaponMod、CrossbowMod2、Cutall系次回:sm20802076 マイクラリスト:mylist/42436169 その他全部:mylist/36876291追記:宣伝ありがとうございます | |
</description> | |
<thumbnail_url>http://tn-skr2.smilevideo.jp/smile?i=20718817</thumbnail_url> | |
<first_retrieve>2013-04-28T23:07:32+09:00</first_retrieve> | |
<length>16:13</length> |
This file contains 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
require "net/http" | |
require "rexml/document" | |
def httpGet(url) | |
ri = URI.parse(url) | |
http = Net::HTTP.start(uri.host) | |
return http.get(uri.path).body | |
end | |
def video_id2user(video_id) |
This file contains 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
<nicovideo_thumb_response status="ok"> | |
<thumb> | |
<video_id>so25033144</video_id> | |
<title>「1秒クッキング 爆速エビフライ」篇</title> | |
<description> | |
どうも仕掛人です!3秒でエビフライを作る人が居るらしいので、1秒で作ってみました。下味を付けるとより美味しいです。コメントが打てない方はこちら→ watch/1417424763相変わらず雑ですが、ご了承下さい。次作:鮭と野菜のチーズグラタン watch/1418994845前作:芋茶巾の作り方 watch/1417248605自分の料理マイリスト:mylist/30919169参考動画「3秒でエビフライを作ってみた」sm25019253仕掛人チャンネル:ch.nicovideo.jp/sikaketwitter:https://twitter.com/sikaken自作ブログ!:http://sikake.main.jp/nin/30秒版:watch/1417616223メイキング動画:watch/1418183648 | |
</description> | |
<thumbnail_url>http://tn-skr1.smilevideo.jp/smile?i=25033144</thumbnail_url> | |
<first_retrieve>2014-12-01T19:19:19+09:00</first_retrieve> | |
<length>0:01</length> |
This file contains 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 Array | |
def remove(val) | |
# ブロックが渡されており、かつvalと等しい要素が見つからなかった場合 | |
return yield if block_given? && !self.include?(val) | |
temp = self.dup | |
temp.delete(val) | |
temp | |
end |
This file contains 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
# Here your code ! | |
class Array | |
def swap(idx1,idx2) | |
temp = self.dup | |
temp[idx1],temp[idx2] = temp[idx2],temp[idx1] | |
temp | |
end | |
def swap!(idx1,idx2) |
This file contains 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","b","c","d"].sliceByIndex([1,3]) => ["b","d"] | |
Array.prototype.sliceByIndex = function(idxs){ | |
var items = this; | |
var slicedVals = idxs.map(function(idx){ | |
return items[idx]; | |
}); | |
return slicedVals; | |
} |
This file contains 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
Array.prototype.sliceByIndex = function(idxs){ | |
var items = this; | |
var slicedVals = idxs.map(function(idx){ | |
return items[idx]; | |
}); | |
return slicedVals; | |
} | |
var range = function(min,max){ | |
var nums = []; |
This file contains 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
Array.prototype.sliceByIndex = function(idxs){ | |
var items = this; | |
var slicedVals = idxs.map(function(idx){ | |
return items[idx]; | |
}); | |
return slicedVals; | |
} | |
var range = function(min,max){ | |
var nums = []; |
This file contains 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
Array.prototype.sliceByIndex = function(idxs){ | |
var items = this; | |
var slicedVals = idxs.map(function(idx){ | |
return items[idx]; | |
}); | |
return slicedVals; | |
} | |
var range = function(min,max){ | |
var nums = []; |
This file contains 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
Array.prototype.sliceByIndex = function(idxs){ | |
var items = this; | |
var slicedVals = idxs.map(function(idx){ | |
return items[idx]; | |
}); | |
return slicedVals; | |
} | |
Array.prototype.allIndexOf = function(val){ | |
var items = this; |