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 arr = [ | |
| { val: 'A' }, | |
| { val: 'B' }, | |
| { val: 'C' }, | |
| { val: 'B' }, | |
| { val: 'D' }, | |
| { val: 'C' }, | |
| { val: 'B' }, | |
| { val: 'D' }, | |
| { val: 'C' }, |
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 audioCtx = new (window.AudioContext || window.webkitAudioContext)(); | |
| var audioElement = document.getElementById('myAudio'); | |
| var audioSrc = audioCtx.createMediaElementSource(audioElement); | |
| var analyser = audioCtx.createAnalyser(); | |
| document.getElementById('file').addEventListener('change', function(event){ | |
| audioElement.src = URL.createObjectURL(this.files[0]); | |
| }); |
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
| import React, { Component } from 'react' | |
| import PropTypes from 'prop-types' | |
| import injectSheet from 'react-jss' | |
| import { connect } from 'react-redux' | |
| import { compose } from 'redux' | |
| import shared from '../../lib/shared-var' | |
| const styles = { | |
| } |
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 path = require('path') | |
| const webpack = require('webpack') | |
| const UglifyJSPlugin = require('uglifyjs-webpack-plugin') | |
| const ExtractTextPlugin = require('extract-text-webpack-plugin') | |
| const prod = process.env.NODE_ENV === 'prod' | |
| const extractStylus = new ExtractTextPlugin('../css/[name].css') |
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
| import numpy as np | |
| def nonlin(x, deriv = False): | |
| if(deriv == True): | |
| return x*(1 - x) | |
| return 1 / ( 1 + np.exp(-x) ) | |
| #input dataset | |
| X = np.array([ | |
| [0,0,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
| const Koa = require('koa'); | |
| const app = new Koa(); | |
| const router = require('koa-router')(); | |
| router.get('/', async (ctx, next) { | |
| const result = await new Promise( resolve => { | |
| setTimeout(() => {resolve('YES!!!') }, 500) | |
| }) | |
| ctx.body = result | |
| }); |
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
| document.onclick= function(event) { | |
| if (event===undefined) event= window.event; // IE hack | |
| var target= 'target' in event? event.target : event.srcElement; // another IE hack | |
| var root= document.compatMode==='CSS1Compat'? document.documentElement : document.body; | |
| var mxy= [event.clientX+root.scrollLeft, event.clientY+root.scrollTop]; | |
| var path= getPathTo(target); | |
| var txy= getPageXY(target); | |
| alert('Clicked element '+path+' offset '+(mxy[0]-txy[0])+', '+(mxy[1]-txy[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 args = { | |
| //xlsx :true , | |
| //dirInDir :true , | |
| splitDir :'' , | |
| splitFile :'_' , | |
| splitXlsx :'1;/;1', | |
| splitBase :'1; ;1,2; ;1', | |
| equalBaseDir :'' , | |
| equalBaseFile :'2;1' , | |
| endDir :'1;_;1:name' , |
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
| let tableSource = document.getElementById('tableSource') | |
| let addEqualIf = document.getElementById('addEqualIf') | |
| let addEqualThen = document.getElementById('addEqualThen') | |
| let clearEqual = document.getElementById('clearEqual') | |
| let saveEqual = document.getElementById('saveEqual') | |
| let divEqual = document.getElementById('divEqual') | |
| const base1 = [ | |
| ['id','name','lvl'], | |
| ['1584 sdf','serg','80'], |
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
| <html> | |
| <head> | |
| <meta charset="utf8"> | |
| <style type="text/css"> | |
| input{ | |
| width: 50px | |
| } | |
| </style> | |
| </head> | |
| <body> |