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 mysql = require('mysql'); | |
const json2csv = require('json2csv'); | |
const fs = require('fs'); | |
const await = require('asyncawait/await'); | |
const async = require('asyncawait/async'); | |
var knex = require('knex')({ | |
client: 'mysql', | |
connection: { | |
host: '*', |
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'; | |
class Input extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
value: '' | |
}; | |
this.handleChange = this | |
.handleChange |
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 Input from './Input'; | |
class Form extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
fname: '', | |
lname: '' | |
}; | |
this.fields = [ |
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
{ | |
"name": "company_api", | |
"version": "1.0.0", | |
"description": "company api", | |
"main": "index.js", | |
"author": "company", | |
"license": "ISC", | |
"private": true, | |
"scripts": { | |
"start": "nodemon src/index.js --exec babel-node --presets es2015,stage-2", |
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
{ | |
"name": "project-name", | |
"version": "0.0.1", | |
"description": "baebl simple use", | |
"main": "dist/index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"build": "babel source --presets babel-preset-es2015 --out-dir dist", | |
"prepublish": "npm run build" | |
}, |
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 config = { | |
url: 'https://book-store-adonis.herokuapp.com/api', | |
actions: { | |
get:{ | |
method: 'GET', | |
path: '/book/:id' | |
} | |
} | |
} |
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
if (typeof require === 'undefined') { | |
if (!axios) { | |
console.log('axios is a dependency, please include it in the top of the index.html file (<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.17.1/axios.min.js"></script>)') | |
} | |
} else { | |
var axios = require('axios'); | |
} | |
function Server(config) { | |
this.url = config.url; |
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
if (typeof require === 'undefined') { | |
if (!axios) { | |
console.log('axios is a dependency, please include it in the top of the index.html file (<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.17.1/axios.min.js"></script>)') | |
} | |
} else { | |
var axios = require('axios'); | |
} |
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 Server(config) { | |
this.url = config.url; | |
this.actions = config.actions; | |
for (const key in this.actions) { | |
Server.prototype[key] = function(param,data) { | |
var host = this.url.concat(this.actions[key].path); | |
var find_var = host.indexOf(':'); | |
if (find_var>-1 && arguments.length>0) { | |
for (var i = 0; i < arguments.length; i++) { | |
var name=Object.getOwnPropertyNames(arguments[i])[0], |
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
// #1 | |
const str1 = `((())))((()())(())(())((())(()()(((()((()))()()(((((((((()())(()()(((((()()))))))(())(())(()))()()))((()((()(()((()())(()())))(()(()))(()))())))()))(())()()((((((())()))))()()((()((())())((((((()())())()))((()))))()()))(((()))((((()))))))))()((((((()(((())())))()())(()))()()()())(()()))))(()))))(((()(()))(()(()())((())))(()((())(()()((()())(()))()((()()(())((((()((()))(()()))(())()((())(()())()(()()((()(()()()))()((()(()))())((()))(())(((()))(((())((()())(())(())((())()()))()((((((())(()))(((()(((((()))()(())()())))((()))))(((()(()())(())()()()))((((((())))(()((((())()())())()())(((((((((())))(()()()(((()((()((())())(((()()))(()(()((((()((()(()())))()((())()(((((()(((((()()())(()(()()((()))())((((())()()))(()(()(()(()((((())))()((((()))())()((((())))))((((()((((()(())))(()()())((()())))))(()))(())()))())(((()))())(()()))()()((())())()())((()(()())(()))()()((())((()())(()((()((())))(())()())(())(()())()()())((())()((((((())))))))))(()()((())(()))()())((())())()))((())())(((((((()(()))(((()( |
OlderNewer