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 Animal { | |
constructor(name){ | |
this.name = name; | |
this.subArray = new Array(); | |
Animal.prototype.subArray.push(this); | |
} | |
callName(){ | |
console.log(this.name); | |
} |
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
left top right bottom それぞれ設定してある状態だと、leftとtopが優先されるもよう。 |
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 "selenium-webdriver" | |
describe "TestSpec" do | |
before do | |
#chromeのパスを設定 | |
chrome_path = '/Users/自分のホーム/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome' | |
#Selenium::WebDriver::Chrome::Binary.path = chrome_path | |
@webdriver = Selenium::WebDriver.for :chrome | |
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
go get github.com/elazarl/goproxy |
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
var milkcocoa = new MilkCocoa("https://appID.mlkcca.com:443"); | |
function logIn(){ | |
var id = $('.login-id').val(); | |
var pass = $('.login-pass').val(); | |
if(id != undefined && pass != undefined){ | |
milkcocoa.login(id,pass,function(err,user){ | |
if(err === null){ |
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
var CommentBox = React.createClass({ | |
handleCommentSubmit: function(comment) { | |
var comments = this.state.data; | |
var newComments = comments.concat([comment]); | |
this.setState({data: newComments}); | |
}, | |
getInitialState: function() { | |
return {data: []}; |
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
translateとtransitionを使ってにゅっと出るメニューを作った。 |
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
CSSのtransformとtransitionを使ってスムーズにアニメーションさせる。 | |
transition-propertyでtransformを指定してスムーズにさせる。 | |
transition-propertyのところを外すとスムーズにならなくなる。 |
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
createStar("test",150,100,50,"yellow"); | |
function createStar(selector,x,y,r,color){ | |
//五芒星の時の角度 | |
var c1 = createCordinate(r,-90); | |
var c2 = createCordinate(r,-234); | |
var c3 = createCordinate(r,-18); | |
var c4 = createCordinate(r,-162); | |
var c5 = createCordinate(r,-306); |
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
#五芒星を任意の場所に書き出す関数 | |
円を5分割して得た角度をモトに一筆書きで書く簡単な関数。 | |
ベトナムの国旗っぽいのは何となくそれっぽく見えたから。 |