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 from 'react'; | |
var template = function(){return( | |
<form onSubmit={ this.handleFormSubmit.bind(this) } > | |
<input type="text" value={ this.foo } ref="foo" /> | |
<button type="submit">Go!</button> | |
</form> | |
)} |
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
const str = '__key__dfdsafadf[__index__]kjjkl' | |
const regx = /__(\w+)__/g | |
let keys = []; | |
let res; | |
while((res = regx.exec(str)) !== null) { console.log( keys.push(res[1]) ) } |
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
type IItem = { | |
key: number, | |
text: string | |
} | |
const items: IItem[] = [{key: 0, text: ''}] | |
// it says type never[] isn't assignable to type [{ text: string}] | |
for (let index = 1; index < 11; index++) { | |
items.push({ |
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
function createArray(length, value) { | |
return Array.apply(null, new Array(length)).map((i, index) => typeof value === 'function' ? value(i, index) : value) | |
} | |
createArray(10, (item, index) => ({ a: index }) ) | |
createArray(10, 'lala') |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using Node.js <script>document.write(process.versions.node)</script>, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using Node.js <script>document.write(process.versions.node)</script>, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using Node.js <script>document.write(process.versions.node)</script>, |
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
function ready(payload) { | |
const fns = [] | |
let lastReturnValue = payload; | |
function steady(fn) { | |
fns.push(fn) | |
return { | |
steady, go | |
} |
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
Auf V6: | |
hugo: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by hugo) | |
hugo: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by hugo) | |
hugo: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by hugo) | |
hugo: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by hugo) | |
hugo: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by hugo) | |
Auf V7 | |
hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by hugo) | |
hugo: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by hugo) |