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
| # encoding: utf-8 | |
| require 'net/http' | |
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'json' | |
| GITHUB_URL = "https://github.com" | |
| WIKI_URL = GITHUB_URL + "/" + "mbostock/d3/wiki/" | |
| API_URL = WIKI_URL + "API-Reference" |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Pie Chart</title> | |
| <meta name = "viewport" content = "initial-scale = 1, user-scalable = no"> | |
| </head> | |
| <body> | |
| <canvas id="canvas" height="450" width="450"></canvas> | |
| <button type="button" onclick="createPDF()">Create PDF</button> | |
| <iframe frameborder="0" width="450" height="450"></iframe> |
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 Foo | |
| # attr_*はModuleのprivate methodなので、レシーバは省略する | |
| # ClassはModuleを継承していて、FooはClassを継承している | |
| # ので、Moduleのprivate methodのattr_accessorがFooの中で利用可能 | |
| attr_accessor :value | |
| end | |
| foo = Foo.new | |
| foo.value = 'z' | |
| puts foo.value #=> z |
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 Hoge | |
| def value=(value) | |
| @value = value | |
| end | |
| def value | |
| @value | |
| end | |
| end | |
| hoge = Hoge.new | |
| hoge.value= 'x' |
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
| var TARGET_URL = "https:\/\/www\.skipaas\.com\/"; | |
| (function(){ | |
| function deathStar(elem){ | |
| var children = elem.childNodes; | |
| var child; | |
| for(var i=0; i < children.length; i++){ | |
| child = children.item(i); | |
| if(child.nodeType == 3){ // テキストノード | |
| child.nodeValue = child.nodeValue.replace(/☆/g, "。"); |
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 ChangeLocation{ | |
| static void main(args){ | |
| if (args.size()==2) { | |
| println "config.xmlを読込み、SVNサーバーのロケーションを書き換えます。" | |
| println "置換前:"+ args[0] | |
| println "置換後:"+ args[1] | |
| println "JOB完了後、Jenkinsの管理から設定の再読み込みを行なってください。" | |
| new File("C:/Jenkins/jobs/").eachFile { | |
| def target = it.toString()+"\\config.xml" |
NewerOlder