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
/////JavaScriptでいう「呼ぶ」とは//// | |
function a (){ console.log('a')}; | |
a();//呼ぶ(callする,関数を実行する,呼び出し元) | |
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
//https://github.com/kenmori/asynchronousSandbox/tree/master/ex2 | |
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import 'babel-polyfill'; | |
class Greet extends Component { | |
render() { | |
function hidouki(url, num){ |
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 promise = function(url) { | |
return new Promise(function (resolve, reject) { | |
var req = new XMLHttpRequest(); | |
req.open('GET', url); | |
req.onload = function () { | |
if (req.status == 200) { | |
resolve(req.response); | |
} else { | |
reject(Error(req.statusText)); | |
} |
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
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import 'babel-polyfill'; | |
class Greet extends Component { | |
render() { | |
function hidouki(url, num){ | |
return new Promise(function(resolve, reject){ | |
var req = new XMLHttpRequest(); |
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
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import 'babel-polyfill'; | |
import co from 'co' | |
class Greet extends Component { | |
render() { | |
co(function *(){ | |
// yield any promise |
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
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import 'babel-polyfill'; | |
import co from 'co' | |
class Greet extends Component { | |
render() { | |
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
let Button; | |
const isOpen = TfCommonUtils.isOpenSaleTime(new Date(), new Date(2017,2,18,0,0,0), new Date(2017,2,21,6,0,0)); | |
if(!isOpen && isRightApplication) { | |
Button = <BtnA url={mailHref} /> | |
} else if (!isOpen && !isRightApplication) { | |
Button = <BtnLink url={registerUrl} /> | |
} else { | |
Button = <noscript /> | |
} |
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
//初期化 | |
ctx.beginPath(); | |
// 開始角度 | |
var s = 0; | |
//求めたい角度 | |
var n = 45; | |
// 円の中心。x座標を100にする | |
// 円の中心。y座標を100にする |
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 Point { | |
x: number; | |
y: number; | |
constructor(x, y){ | |
this.x = x; | |
this.y = y; | |
} | |
add(point) { | |
return new Point(this.x + point.x, this.y + point.y); | |
} |
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
//http://kenjimorita.jp/typescript__extends_new__ | |
var __extends = (this && this.__extends) || function (d, b) { | |
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
var Point = (function () { | |
function Point(x, y) { | |
this.x = x; | |
this.y = y; |