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="twitter.com",func]=["tes.com",data=>{console.log(`default is ${data}`)}])=>{fetch(url).then(r=>{return r.text()}).then(data=>{console.log(data+" func is"+func);func(data)})}).bind(null,["example.com",data=>{console.log(data+" fafafafa")}]).bind(null,"sin.com",data=>{console.log(`fa!? ${data}`)})() |
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
//firefoxスクラッチパッド | |
var obj; | |
obj={ | |
a:44, | |
d:4 | |
}; | |
//成功する | |
(function defaulttest({a,b}=obj){ | |
console.log(a) | |
})() |
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
#include<stdlib.h> | |
#include<stdio.h> | |
// void dec2bin(int dec){ | |
// char buf[100]; | |
// printf("%s\n",itoa(dec, buf, 2)); | |
// while(dec>0){ | |
// // printf("%d",dec); | |
// if(dec%2){ | |
// printf("1"); |
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 http=require("http"); | |
var socketio=require("socket.io");//mandatory. | |
var fs=require("fs") | |
var server=http.createServer(function(req, res) { | |
res.writeHead(200, {'Content-Type' : 'text/html'}); | |
res.end(fs.readFileSync(__dirname + '/index.html', 'utf-8')); | |
}); | |
server.listen(3000); |
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 express=require("express"); | |
var app=express(); | |
var strage=[]; | |
/** | |
* wrap in {} in | |
* id:number | |
* title:string | |
* content:string | |
* | |
*/ |
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
#define DEBUG | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<time.h> | |
#include<stdbool.h> | |
#include "lib/MT.h" |
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
const classMap = new Map(); | |
/* | |
MapとObjectの違い。 | |
*/ | |
//ES6では新しくsymbolという型が定義された。こいつの場合は名前なしシンボルで | |
//symbolの引数はそのシンボルの説明。そのsymbol自身にアクセスはできない。 | |
const inheritPrototype = Symbol(); | |
const isAccessModifiers = Symbol(); |
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
0:14.42 --enable-cpp-rtti Enable C++ RTTI | |
実行時に型情報を持って保持。C++における多様性の確保。 | |
___ | |
0:14.42 --enable-gold Enable GNU Gold Linker when it is not already | |
the default | |
goldリンカ。googleの人が作っためっちゃ早いリンカ。linux環境のみ? |
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 a=function(){this.a=4;return {}} | |
var aa=new a(); | |
aa.a//undefined | |
/* | |
newは基本的にreturnを返しても意味ないけど返り値がobjectの場合はそいつが新しいインスタンスの範囲になる。 | |
*/ |
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
#include <stdio.h> | |
int main(void) { | |
// your code goes here | |
char *str="ab"; | |
printf("%p,%d\n",*str,*str); | |
printf("%p,%d\n",str,str); | |
printf("%p,%d\n",&str,&str); | |
return 0; |