Skip to content

Instantly share code, notes, and snippets.

View implicit-invocation's full-sized avatar

Dương Thành Đạt implicit-invocation

View GitHub Profile
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/test', {
useNewUrlParser: true,
useUnifiedTopology: true
});
const Score = mongoose.model(
'score',
{
userId: String,
#!/bin/sh
# chkconfig: 2345 90 10
# description: Start or stop the Shadowsocks R server
#
### BEGIN INIT INFO
# Provides: Shadowsocks-R
# Required-Start: $network $syslog
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
const getRepos = (username, cb) => {
setTimeout(() => {
cb([`${username}#1`, `${username}#2`, `${username}#3`, `${username}#4`]);
}, Math.random() * 1000);
};
const getAllRepos = (usernames, cb) => {};
getAllRepos(['google', 'Facebook', 'github'], allRepos =>
console.log(allRepos)
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<input type="text" name="username" />
<ul id="repo-list"></ul>
<script type="text/javascript" src="repo-search-app.js"></script>
</body>
package com.mygdx.game;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import React, { Component } from 'react';
import './App.css';
class App extends Component {
state = {
op1: [100, 100],
op2: [200, 100],
op3: [200, 200],
op4: [100, 200],
{
"port": 8080,
"mongodbUrl": "mongodb://localhost/dike",
"ethUrl": "http://localhost:8545",
"mainEthereumWallet": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
"activationFee": "10000000000000000",
"bodyLimit": "100kb",
"tokenLifespan": 0,
"smtp": {
"host": "smtp.sendgrid.net",
This file has been truncated, but you can view the full file.
"{\"weights\": {\"w1\": [[-0.003534071147441864, -0.014662317931652069, -0.005300592631101608, -0.015453176572918892, -0.019641391932964325, 0.00411992147564888, -0.027185896411538124, -0.015982357785105705, 0.013041283935308456, -0.027790386229753494, 0.025219518691301346, -0.02573699876666069, -0.02171981893479824, -0.023056510835886, 0.021062776446342468, -0.010998493060469627, 0.029418841004371643, 0.004081379622220993, -0.008048983290791512, 0.027718327939510345, -0.015963789075613022, -0.0023658499121665955, 0.022664599120616913, 0.0004080049693584442, -0.026226170361042023, 0.0017168894410133362, -0.009781692177057266, -0.019353065639734268, -0.008649434894323349, 0.018941771239042282, -0.032294511795043945, -0.011897826567292213, -0.0022268593311309814, 0.011378329247236252, 0.0061439089477062225, 0.0008389502763748169, 0.030211191624403, -0.02824271097779274, -0.012300929054617882, -0.024029698222875595, -0.01408340409398079, -0.019565770402550697, -0.007136508822441101, -0.02020026370882988, 0.00197
This file has been truncated, but you can view the full file.
[{"id":"5b5cc0a446b25a00146e897f","records":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-9.558401847797882e-10,-2.8405278129639555e-9,1.9999752964849904e-8,-6.841985111805116e-8,1.4577183549135952e-7,-2.47893439109248e-7,3.7796112906107737e-7,-5.055853762314655e-7,5.876019599782012e-7,-5.434653758129571e-7,2.3557177541988494e-7,6.248671411412943e-7,-0.0000030701037303515477,0.00002268685057060793,0.000011002984138031024,-0.00000542372663403512,0.00003095368811045773,0.000028270518669160083,-0.00003898048817063682,-0.000012236337170179468,0.000022976624677539803,-0.00006003208545735106,-0.000019971048459410667,0.00004987131615052931,-0.00001729610812617466,-0.00001632464955036994,0.00005966815660940483,-0.000049147562094731256,-0.00009089281957130879,0.00007358845323324203,-0.00004852989877690561,-0.00017297723388765007,0.00005026509097660
package com.dongbat.example.game;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.graphics.VertexAttribute;
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;