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 bushu = (n, arr) => { | |
if (n < 10) return; | |
if (n > 10000000) return; | |
let newArr = []; | |
for (let i = 1; i <= n; i++) { | |
if (arr.indexOf(i) == -1) { | |
newArr.push(i); | |
} | |
} | |
return newArr; |
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
(base) ➜ my_app cat x.js | |
setTimeout(()=>{ | |
console.log('timer1') | |
Promise.resolve().then(function() { | |
console.log('promise1') | |
}) | |
}) | |
setTimeout(()=>{ |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
all_names = set(data.split("\n")) | |
chars = list(set(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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>CORS</title> | |
<style> | |
button { | |
font-size: 5rem; | |
margin-bottom: 1rem; |
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 http = require('http'); | |
var url = require('url'); | |
http.createServer(server).listen(1337, '127.0.0.1'); | |
var qs = require('querystring'); | |
var WHITE_LIST = new Set(["http://127.0.0.1:63342", "http://localhost:63342"]); | |
function server(request, response) { | |
var req = request; |
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 http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<meta name="keywords" content="property-based testing, scalacheck, scala, java, unit testing, jUnit" /> | |
<meta name="description" content="Property-based testing with ScalaCheck." /> | |
<title>Remark</title> | |
<style type="text/css"> | |
@import url(http://fonts.googleapis.com/css?family=Droid+Serif); | |
@import url(http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
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
package concurrent; | |
import java.util.concurrent.atomic.AtomicInteger; | |
/** | |
* Created by magicalli on 2014/12/13. | |
*/ | |
public class IndexPlusPlusTest { | |
private volatile static int n = 0; | |
private static int m = 0; |