blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
132
path
stringlengths
3
236
src_encoding
stringclasses
29 values
length_bytes
int64
8
7.94M
score
float64
2.52
5.72
int_score
int64
3
5
detected_licenses
listlengths
0
142
license_type
stringclasses
2 values
text
stringlengths
8
7.94M
download_success
bool
1 class
cac194d99f4554b45af5778818009e41866fe31e
JavaScript
GabrielHenriP/freeCodeCamp-projects
/Javascript_Algorithms_and_Data_Structures/Intermediate_Algorithm_Scripting/009-missing_letters.js
UTF-8
1,130
4.4375
4
[]
no_license
//Find the missing letter in the passed letter range and return it. // If all letters are present in the range, return undefined. // minha solução { function fearNotLetter(str) { const alphabet = 'abcdefghijklmnopqrstuvwxyz'; const firstIndex = alphabet.search(...str); const correctPiece = alphabet.slice...
true
9558741766962ebd74f95f0227ad667d669d69ff
JavaScript
fiyc/code-revelation
/algorithm/test/max-subarray-test.js
UTF-8
777
2.96875
3
[]
no_license
/** * @Author: fiyc * @Date : 2018-11-15 17:44 * @FileName : max-subarray-test.js * @Description : - 最大数组问题测试 */ let randomMaker = require('../common/random-maker'); let testArray = randomMaker.randomArray(10000000, -10, 10); // console.log(`[+] 生成测试数组 ${testArray.join(" ")}`); let doFind = function(findFn, find...
true
060e58510ae84d2697a6fae7fc32c0a44eac9669
JavaScript
maxyeo/kirkla
/index.js
UTF-8
1,593
3.21875
3
[]
no_license
var counter = 0; document.getElementById("front-flip").addEventListener("click", function() { counter++; // add classes to trigger flip animation document.getElementById("front").classList.add("toreverse"); document.getElementById("back").classList.add("toreverse"); window.setTimeout(function() { // remove clas...
true
67a558624dd209c580d11e2d251da22153b4a4d0
JavaScript
gauravk268dev/React-Store-App
/src/components/firebase/firebase.js
UTF-8
1,025
3.03125
3
[ "Apache-2.0" ]
permissive
// var docRef = db.collection("about").doc("MQ0YXJYoXnOxJ6xxFtoY"); // // docRef.get().then((doc) => { // if (doc.exists) { // console.log("Document data:", doc.data()); // } else { // // doc.data() will be undefined in this case // console.log("No such document!"); // } // }).catch...
true
2cc1c86fc7f5021fd243898a3af13baeb196ea98
JavaScript
mr-beerkiss/generator-simple-gulp-sass
/app/temlpate/src/js/app.js
UTF-8
301
2.65625
3
[ "MIT" ]
permissive
window.app = window.app || (function(window, undefined) { "use strict"; function ready() { console.debug("App is ready"); } function ready2() { console.debug("App2 is ready"); } // Some changes to the JS return Object.freeze({ ready: ready, ready2: ready2 }); })(window);
true
f8fa2c4eb77c11644b5221ba7fa810c0fed908c8
JavaScript
tkyi/jest-codelab
/src/stackoverflow/58741410/Tester.jsx
UTF-8
350
2.5625
3
[ "MIT" ]
permissive
import AuthService from './AuthService'; import React, { useState, useEffect } from 'react'; export default () => { const Auth = new AuthService(); const [thing, setThing] = useState(''); useEffect(() => { console.count('useEffect'); Auth.fetch('url').then(data => { setThing(data); }); }, [])...
true
3dfe7bbf6c9041dbc8ea151a0e4e8d7ae0923723
JavaScript
annasauciuc/JavascriptHouse
/udemyBootcamp/forLoops/main.js
UTF-8
452
3.796875
4
[]
no_license
//Print all numbers between -10 and 19 for (i = -10; i <= 19; i++) { console.log(i); } //Print all numbers between 10 and 40 for (i = 10; i < 40; i++) { if (i % 2 === 0) { console.log(i); } } //Print all odd numbers between 300 and 333 for (i = 300; i < 333; i++) { if (i % 2 !== 0) { console.log(i);...
true
743e576d724166e134cfb4a3c68329118a8614ca
JavaScript
santoxyz/node-modbus-rtu-tcp
/lib/task.js
UTF-8
4,324
2.640625
3
[ "MIT" ]
permissive
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Task = undefined; var _bluebird = require('bluebird'); var _bluebird2 = _interopRequireDefault(_bluebird); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var logger = require('....
true
33f8f45e47205d37370c35dfbadb296ef459c9a5
JavaScript
srinivasu619/conduit-backend-api
/src/middlewares/validateArticle.js
UTF-8
1,043
2.734375
3
[]
no_license
function validateArticle(req, res, next) { const article = req.body.article; if (!article) { return res.status(422).json({ "status": "422", "error": { title: ['cannot be empty'], description: ['cannot be empty'], body: ['cannot be ...
true
9a1d570a8045a506d60334e1b6be7fac48d94942
JavaScript
NaeemCheema/EazyoApp
/src/reducers/signInReducer.js
UTF-8
445
2.546875
3
[]
no_license
import { SIGN_IN_EMAIL, SIGN_IN_PASSWORD } from '../constants'; const INITIAL_STATE = { signInEmail: '', signInPassword: '' }; export default (state = INITIAL_STATE, action) => { switch(action.type){ case SIGN_IN_EMAIL: return{...state, signInEmail: action.payload}; case SIGN_...
true
0bcb76883d5ca3f07e901ec2c0fd6ecc874b8b8a
JavaScript
kosich/js-tracker-game
/Objects/Exit.js
UTF-8
708
2.609375
3
[]
no_license
(function(){ 'use strict'; var O = helper.defineNS('O'); O.Exit = Backbone.Model.extend({ init: function(){ this.doorRect = game.fieldFromCoordinates(this.coordinates); }, graphics : function(){ var exit = this.g = new createjs.Shape(); exit.gra...
true
a417c3a1fd99c1c5e071f17acd5966a5066cd6e1
JavaScript
pavelspichonak/powerpuff-girls
/src/components/Error/index.js
UTF-8
602
2.609375
3
[]
no_license
import React, { PureComponent } from 'react'; import styled from 'styled-components'; const Root = styled.div` `; const Title = styled.h3` color: red; font-weight: bold; `; const Description = styled.p` color: red; `; export class Error extends PureComponent { static defaultProps = { title: 'Some error'...
true
5aabb38e5e996e93def67512a423a0459fb97d7d
JavaScript
tyler-stowell/node-red-contrib-pi-plates
/dout.js
UTF-8
2,676
2.53125
3
[ "Apache-2.0" ]
permissive
module.exports = function (RED) { function DOUTNode(config) { RED.nodes.createNode(this, config); this.plate = RED.nodes.getNode(config.config_plate).plate; this.output = parseInt(config.output, 10); if (RED.nodes.getNode(config.config_plate).model == "TINKERplate"){ co...
true
a8da709d28c4a8ef2746154c8ab0fdcb9664997c
JavaScript
rodrigocamargo854/nlw
/public/scripts/page-orphanages.js
UTF-8
950
2.671875
3
[]
no_license
// // objeto L esta direcionado para a tag js no html, por sua vez chama function map // // ajuste de visualização coordenadas , escala // create map //coordenadas zoom const map = L.map('mapid').setView([-26.905457, -49.036230], 16); // criando titel layer L.tileLayer( 'https://...
true
f42796d37310f4284cc6e20518e7f3cb42a108b9
JavaScript
sourabhu-cuelogic/toDoApp
/javascript/models.js
UTF-8
1,791
2.9375
3
[]
no_license
var User = function(email, firstName, lastName, gender, address, password, profileImage) { this.email = email; this.firstName = firstName; this.lastName = lastName; this.gender = gender; this.address = address; this.password = password; this.profileImage = profileImage; } var Todo = function(title, date, catego...
true
3bddbc389dd379153e66b9cc68300cc99d403d15
JavaScript
L-glory/Webstorm
/src/Neural network algorithm/js/test.js
UTF-8
637
3.28125
3
[]
no_license
/** * Created by 荣耀 on 2016/4/26. */ function random(min, max, cext) { var range = max - min, rd = min + Math.random() * range; return rd.toFixed(cext); } /*for(var i = 0; i != 20; i++) { console.info(random(-1, 1, 3)); }*/ function twoDimArrayInit(oneDimLength, twoDimLength) { var arr = new...
true
c19beb8436c58d5f2057675300df92961240ed72
JavaScript
cpkenn09y/CodingAlgorithms
/leetcode/letter_combinations_of_a_phone/letter_combinations_of_a_phone_anand.js
UTF-8
1,588
3.890625
4
[]
no_license
// Space Complexity: O(n), where n is the number of digits // Time Complexity: O(n squared) /** * @param {string} digits * @return {string[]} */ const letterCombinations = function(digits) { const numToAlphabets = { 2: ['a','b','c'], 3: ['d','e','f'], 4: ['g','h','i'], 5: ['j','k','l'], ...
true
e960619282dc96829360d45fb080a9a822e130f2
JavaScript
wangzhengbo/fe-demo
/js/rxjs/basic/operators/of.js
UTF-8
283
3.265625
3
[]
no_license
// RxJS v6+ import { of } from 'rxjs'; // 出任意类型值 const source = of({ name: 'Brian' }, [1, 2, 3], function hello() { return 'Hello'; }); // 输出: {name: 'Brian}, [1,2,3], function hello() { return 'Hello' } const subscribe = source.subscribe(val => console.log(val));
true
6dd7d8540f76c4c86c968dbe1beb3db93dbd7d6d
JavaScript
youngjae019/react-pokedex
/src/Pokecard.js
UTF-8
583
2.625
3
[]
no_license
import React from 'react'; import './Pokecard.css'; const POKE_API = 'https://raw.githubusercontent.com/' + 'PokeAPI/sprites/master/sprites/pokemon/'; function Pokecard(props) { let img = `${POKE_API}${props.id}.png`; return ( <div className="Pokecard"> <div className="Pokecard-title">{ p...
true
7b24ef49db63ac12d7f81abafb3647749f2d3527
JavaScript
mmovsissian/JS_training
/Homework3_Movses.js
UTF-8
2,672
4.59375
5
[]
no_license
// Skipped input value type validations // Ex 1 //Write a recursive function to determine whether all digits of the number are odd or not. // Option1 function exercise1(n) { if (Math.floor(n / 10) === 0) { if ((n % 2) === 0) { return false } else { return true } ...
true
6cbb9cbb082e502f60d70a13b1ceda4746c9c1d8
JavaScript
Johnsonj0308/WebFinalProject
/LoveTestMain.js
UTF-8
3,799
3.40625
3
[]
no_license
$(document).ready(function(){ //建立currentQuiz 儲存目前作答到第幾題 var currentQuiz = null; //當按下按鈕後 $("#startButton").click(function(){ //第一次作答 if(currentQuiz == null) { //設定目前做達到第0題 currentQuiz = 0; //顯示題目 $("#question").text(qu...
true
3d617ab58a9b0774402a2d6ac37b81b469bcb208
JavaScript
ruozhao/DataStructAndAlgorithm
/dataStruct/Queue.js
UTF-8
2,250
4.21875
4
[]
no_license
class Queue { constructor() { this.count = 0; this.font = 0; this.items = {}; } enqueue(element) { this.items[this.count] = element; this.count++; } dequeue() { if(this.count == this.font) { return undefined; } let element ...
true
2da8c8a91c732326df66d0746c07cd04f97783e6
JavaScript
JuliyaMiller/lessons_html_julia
/ls39/main.js
UTF-8
654
3.203125
3
[]
no_license
window.addEventListener("load", event => console.log(1)) const url = 'https://fakestoreapi.com/products/'; let list = []; const root = document.querySelector('#root'); const loader = document.querySelector('.load'); fetch(url) //200 .then(res => res.json()) .then(data => { loader.style.display = "...
true
d3ae9a823dc6be52c8310f1d561262262cb6b283
JavaScript
schoolhompy/javascript_designpattern
/StatePattern.js
UTF-8
687
2.765625
3
[]
no_license
function AgreementStep1() { console.log("AgreementStep1"); this.state = new AgreementStep2(); this.nextState = function() { this.state = this.state.nextState(); } } function AgreementStep2() { console.log("AgreementStep2"); this.nextState = function() { return new AgreementStep...
true
b592d48df6c3ebba6fd644687ffa2e46b60fd8ce
JavaScript
VivianaMireles/platzon
/dist/src/platzon.js
UTF-8
2,069
3.78125
4
[ "MIT" ]
permissive
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = platzom; function platzom(str) /*str es una cadena de caracteres*/ { var traslacion = str; /*para poder modificar la palabra se ocupa inicializarla*/ if (str.toLowerCase().endsWith('ar')) /*toLowerCase ponerla en minus...
true
cbc901469662dc1d21ff9adaae7c6e6c2199d35b
JavaScript
Merel-Qwen/Week-1
/Dag 3/W1D3-3/the-movie-database.js
UTF-8
466
3.96875
4
[]
no_license
const myMovie = { title: " The Lord of the Rings", duration: 185, stars: [" Elijah", "Ian", "Viggo"] }; const printMovie = function(movie) { console.log(movie.title + " lasts for " + movie.duration + " minutes"); let starsString = "Stars: "; for (let i = 0; i < movie.stars.length; i++) { starsString +=...
true
16dffb36d11731dcac75a763c335564282a1b9c9
JavaScript
philbier/memory-game
/js/app.js
UTF-8
7,658
3.53125
4
[ "MIT" ]
permissive
//Game Statistics const gameVariables = { winThreshold: 8 } //object that stores helper variables used for each turn the player makes const moveVariables = {} //document objects const deckNode = document.querySelector(".deck"); const cardNodes = document.querySelectorAll(".card"); const restartNode = document.que...
true
d7a1ce912c8e4a3cd6f7bce5d78478dc30d9fcbb
JavaScript
MrGlox/virak
/assets/scripts/WebGL.js
UTF-8
2,842
2.53125
3
[]
no_license
import { AmbientLight, Fog, Mesh, PerspectiveCamera, PlaneGeometry, Scene, ShaderMaterial, } from 'three' import createTouches from 'touches' import Renderer from './renderer' import Tube from './tube' class WebGL { constructor({ $el, width, height, options }) { this.$canvas = $el this.width...
true
cdd0ba1f4852963abd7ac7b1bac4adacb98d4b92
JavaScript
7airdkx/WY
/js/index.js
UTF-8
4,033
2.6875
3
[]
no_license
window.addEventListener('load', function () { let wrap = document.querySelector('.wrap') let imgs = document.querySelectorAll('.imglist>img') let btns = document.querySelectorAll('.btnlist > a') let leftctrl = document.querySelector('.leftctrl') let rightctrl = document.querySelector('.rightctrl') ...
true
17c1208f7d917de864739369706125f3dd362705
JavaScript
domanoz/Zaba
/extension/getWorkingDictionary.js
UTF-8
768
2.96875
3
[ "MIT", "Apache-2.0" ]
permissive
const deleteMapping = (word) => { (chrome || browser).runtime.sendMessage({type: "deleteMapping", word: word}); }; (chrome || browser).runtime.sendMessage({type: "getWorkingDictionary"}, (response) => { console.log(response); Object.entries(JSON.parse(response.workingDictionary)).forEach( ([key, va...
true
4bdc71e1081ea2bd75d95810233a8704fc61e3bb
JavaScript
Clevinpro/bt-13-js
/md_1/index.js
UTF-8
4,434
3.78125
4
[]
no_license
// console.log('work'); // let a = 5; // const b = 6; // console.log('start value a:', a); // console.log('start value b:', b); // a = a + b; // console.log('a:', a); // console.log('b:', b); // let word = ''; // let num; // const age = 30; // const name = 'Alex'; // const message = 'Welcome to the game'; // cons...
true
b0356f59067dbc893273b2177b9d5345ad385339
JavaScript
Tripathi-Shivam/JsonPowerDB-Project
/app.js
UTF-8
1,799
2.703125
3
[]
no_license
const button = document.querySelector(".btn-lg"); button.addEventListener("click", () => { registerUser(); }); function registerUser() { var jsonStr = validateInput(); if (jsonStr === "") { return; } var putReqStr = createPUTRequest( "90935325|-31948798485511681|90934427", ...
true
72d7e81d3e810d763066a888938837759b2ad485
JavaScript
lerio/intercom
/flatten.js
UTF-8
379
3.0625
3
[ "MIT" ]
permissive
const pushInt = (arr, flat) => { arr.forEach(function (item) { if (Number.isInteger(item)) { flat.push(item) } else if (Array.isArray(item)) { pushInt(item, flat) } }) return flat } const flatten = (arr) => { if (Array.isArray(arr)) { return pushI...
true
3f0dc7760c1695bd0a923a417554b980cbcd4f3d
JavaScript
DevyanshKalra/leetcode-js
/easy/1_Two_Sum.js
UTF-8
984
4.09375
4
[ "MIT" ]
permissive
/** * @param {number[]} nums * @param {number} target * @return {number[]} */ // brute force solution time complexity - O(n^2) const twoSumBrute = function (nums, target) { const length = nums.length; for(let i = 0; i < length; i++){ for(let j = 0; j < length; j++){ if(nums[i] + nums[j] === target){ ...
true
f79d0f775a31a26c63f0fa66e8c237bc8e5af7e5
JavaScript
thlorenz/boondocker
/scrape/fs.usda/merge-data.js
UTF-8
2,010
2.609375
3
[ "MIT" ]
permissive
'use strict' const util = require('../lib/util') const path = require('path') const fs = require('fs') const cheerio = require('cheerio') const resultsPath = path.join(__dirname, 'results') const campgroundsDataPath = path.join(resultsPath, 'data.raw.json') if (!util.exists(campgroundsDataPath)) { console.error('...
true
f4440cd6c91cfcdd92d3609dffd866f2eb3d1df8
JavaScript
brycehanscomb/fn-score
/src/models/sound.js
UTF-8
508
2.734375
3
[]
no_license
import AbstractExtendable from './abstract-extendable'; /** * @typedef {Object} Sound * @property {Tone} tone * @property {Duration} duration */ class Sound extends AbstractExtendable { toString() { return `${this.duration.toString()} note ${(this.tone || 'rest').toString()}`; } /** * @pa...
true
cdffdc8238a6da69aaf14968b7487058a6bd6d4d
JavaScript
Lee-ChongMyeong/Algorithm_test
/programmers_javascript/Level1/비밀지도.js
UTF-8
539
3.28125
3
[]
no_license
function solution(n, arr1, arr2){ var answer = []; var password = []; for (let i = 0; i < n; i++) { password.push((arr1[i] | arr2[i]).toString(2).padStart(n, 0)); } console.log(password) for (let i =0; i < n; i++){ console.log(password[i]) let password2 = pass...
true
b571de842d185efa16ffcb5455440557b3e5da0e
JavaScript
nickydraz/Portfolio
/CSC 215/Labs/lab4-whoami/whoAmI.js
UTF-8
3,803
3.359375
3
[]
no_license
<!-- Hide from Old Browsers function checkForCookie() { if (getCookie("username") == "") { createCookie(); } else displayCookie(); }//end function function createCookie() { document.getElementById("main").innerHTML = "<p>Please enter your name: <input type='text' id='username' name = 'username' value = ''/></...
true
f2fc45f9722ae773fae90c9fced2e9df81dbc24a
JavaScript
itsoya/Book_Web_apps
/web_apps/milestone_four/js/app.js
UTF-8
2,743
2.765625
3
[]
no_license
$(document).ready(function() { //search event and actions $(".submit").click(function() { var searchVal = $("#searchTerm").val(); var url = "https://www.googleapis.com/books/v1/volumes?q=" + searchVal; searchBooks(url); $(".view").val('Grid'); $(".pages").html("Pages: ");...
true
a98c55e5d644f9bf19ceab4d6179e49290eee54e
JavaScript
Florencekyarikunda/Javascript-web-assignment-3
/alumn.js
UTF-8
170
2.90625
3
[]
no_license
function name(){ var d="Shadya"; var f="Pamera"; function describe(){ var g= d + " and " + f + " are friends "; console.log(g); } describe(); } name()
true
d51e196e1fec309f09952f5b1bc808b2c4876b3a
JavaScript
rufengch/frontend-nanodegree-arcade-game
/js/app.js
UTF-8
5,827
3.546875
4
[]
no_license
// Enemies our player must avoid // Parameter: row, in which to put the enemy var Enemy = function(row) { // Variables applied to each of our instances go here, // we've provided one for you to get started // The image/sprite for our enemies, this uses // a helper we've provided to easily load i...
true
8e81bc3f73638c4173cb592f184328143960fc51
JavaScript
Beking0912/code_with_bilibili
/React组件通信/demo/src/childToParent.js
UTF-8
938
2.953125
3
[]
no_license
import React from "react"; // 父组件 class App extends React.Component { constructor(props) { super(props); this.state = { data: "" }; } // 自定义的回调事件 childValue = data => { this.setState({ data }); }; render() { return ( <div> 子组件传递过来的值:{this.state.data} <Child transferV...
true
075a2610158820be2259892a6baa5322130c3846
JavaScript
samuel-tonini/my-reads
/src/App.js
UTF-8
2,634
2.8125
3
[]
no_license
import React, { Fragment, Component } from 'react'; import { Route } from 'react-router-dom'; import Library from './Library/Library'; import Search from './Search/Search'; import { getAll, update, get } from './BooksAPI'; class App extends Component { // Books = livros que estam em alguma prateleira // Filter = F...
true
49eba959debc50c50e6c3f534509c68fc828d2c3
JavaScript
soheeyu/js-study
/React/rt37.CrudReact/crudreact/src/component/crud/CrudInput.js
UTF-8
1,036
2.578125
3
[]
no_license
import React, { Component } from 'react' class CrudInput extends React.Component { state = { } constructor(props) { super() // this 바인딩 this.refUserName = React.createRef() this.refUserPower = React.createRef() } handler = (event) => { // 이벤트 핸들러는 화살표 함수로 만...
true
440829eec1854b2c930659b36200bb3cb0b30a53
JavaScript
neetsun/node
/stockquotediy/index.js
UTF-8
1,243
3.078125
3
[]
no_license
const got = require('got'); const readline = require('readline'); const eol = require('os').EOL; readline.emitKeypressEvents(process.stdin); process.stdin.setRawMode(true); const keyMap = new Map(); keyMap.set('a','AAPL'); keyMap.set('b', 'BA'); keyMap.set('c', 'CSCO'); keyMap.set('d', 'DD'); keyMap.set('...
true
b5669dd35b90ead54d7d94602c07d083f47d14aa
JavaScript
seremejvaz/skylab-bootcamp-201901
/staff/marti-malek/array-functions/slice.js
UTF-8
685
3.828125
4
[]
no_license
/** * * Abstraction of slice. * * Returns a copy of a portion of an array. * * @param {Array} arr * @param {number} start * @param {number} end * * @returns {Array} * * @throws {Error} - If too many arguments * @throws {TypeError} - If arr is not an array */ function slice(arr, start, end) { ...
true
6a52d27f27b102b6f0a016a186ae155fa870c68e
JavaScript
alankexp/weixin_smartapplication
/pages/typescore/typescore.transform.js
UTF-8
419
2.703125
3
[]
no_license
function validate(scoreA, scoreB) { if (scoreA == "" || scoreB == "" || scoreA == undefined || scoreB == undefined) { return false } if(scoreA < 0 || scoreB < 0){ return false } if(parseInt(scoreA) != scoreA || parseInt(scoreB) != scoreB){ return false } if(scoreA > 5...
true
974f1c0d35c6a4eaf1e835d7d240a60eb0987ac8
JavaScript
kalyanw/Getfit
/my-app/src/Admin/Users/User.js
UTF-8
662
2.578125
3
[]
no_license
import React,{useEffect,useState} from "react"; import axios from "axios"; const User=props=>{ const[email,setEmail]=useState(""); const[displayName,setdisplayName]=useState(""); useEffect(() =>{ axios.get(`http://localhost:5000/users/${props.match.params.id}`) .then(res => [ ...
true
1198c3cf759afe19a1465723dd6301aa39d7c35a
JavaScript
hastebrot/logic.js
/tests/length.js
UTF-8
494
2.59375
3
[ "MIT" ]
permissive
const {lvar, run, eq, and, or, add, conso, emptyo, succeed} = require ('../lib/logic.js') function length(Arr, N) { return or( and(emptyo(Arr), eq(N, 0)), (Head=lvar(), Rest=lvar(), N1=lvar())=> and( conso(Head, Rest, Arr), length(Rest, N1), add(N1, 1, N) ) ) } const x = lvar('x') //...
true
6e63d01ecc4d9002e8206ed6138ac428ba3d115d
JavaScript
vgenev/central-services-shared
/src/healthCheck/HealthCheck.js
UTF-8
4,898
2.78125
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/***** License -------------- Copyright © 2017 Bill & Melinda Gates Foundation The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the Licens...
true
7c967a3510b7b68c9f2f3343b53cd705fb02ecdb
JavaScript
shokai/iphone-js-console
/iphone/iphone-js-console.js
UTF-8
1,310
2.59375
3
[]
no_license
var JsConsole = {}; JsConsole.ws = null; JsConsole.connected = false; JsConsole.ws_connect_timer = null; JsConsole.start = function(addr){ // addr = "ws://192.168.1.101:8088" var connect = function(){ JsConsole.ws = new WebSocket(addr); JsConsole.ws.onmessage = function(e){ try{ ...
true
766540c671dc7d5be66055a5c828522297f69abd
JavaScript
Sergey-Xursevich/YouTube
/src/views/Slider/Slider.js
UTF-8
1,409
2.828125
3
[]
no_license
export default class Slider { render() { const section = document.createElement('div'); const container = document.createElement('div'); const prevLeft = document.createElement('button'); const prevRight = document.createElement('button'); const divButton = document.createElement('div'); const...
true
2f5fbf3993a3e584b9d7f950ff6c00e4e31fc967
JavaScript
ahallock/node-ironio
/lib/task.js
UTF-8
1,850
2.546875
3
[ "MIT" ]
permissive
/*! * Module dependencies. */ function task(path, api) { var taskPath = path; var schedulePath = path.replace('task', 'schedule'); function queue(taskList, fn) { if (Array.isArray(taskList)) { taskList = { tasks: taskList }; } else { taskList = { tasks: [taskList] }; } api.post(task...
true
c0d51c2badb4806fd31a70de84ebbf81b0280706
JavaScript
lhendriks1/state-drills
/Accordion.js
UTF-8
925
2.578125
3
[]
no_license
import React, { Component } from 'react'; import './Accordion.css'; export default class Accordion extends React.Component { static defaultProps = { sections: [] }; state = { currentIndex: null }; handleClick(index) { this.setState({currentIndex: index}); }; renderItems() { const {cur...
true
ee12addb0a8ab9010d4322e1aa22b726e66dd96b
JavaScript
joestrong/tiny-touchscreen-interface
/app.js
UTF-8
1,232
3.171875
3
[]
no_license
"use strict" const fs = require('fs') const spawn = require('child_process').spawn class Menu { constructor() { this.container = document.querySelector('.container') this.loadConfig(() => { this.constructMenu() }) this.initEvents() } initEvents() { this.container.addEventListener('cli...
true
be2932543814330e68d6f292dcb30a936ae76619
JavaScript
jonnyalexbh/node-server-scaffolding-jabh
/chai/test/matchers.js
UTF-8
473
2.578125
3
[]
no_license
const chai = require('chai'); const { expect } = chai; describe('common comparators', () => { const user = { name: 'tankis', lastname: 'lopez' }; const user2 = { name: 'Daniel', lastname: 'Carmona' }; const user3 = { name: 'tankis', lastname: 'lopez' }; it('equality of elemen...
true
2a763f37bf123bdfb8cf4278d3913481c5bccae1
JavaScript
josemaescartin/triangle_calculator
/js/scripts.js
UTF-8
1,216
3.609375
4
[ "MIT" ]
permissive
var triangle = function(side1, side2, side3) { var output = []; //Metemos un error en el código if (side1 == side2 && side2 == side3 && side2<=20 && side2>=10) { window.alert("buuug") output.push("BUG"); } else if (side1 >= side2 + side3 || side2 >= side1 + side3 || side3 >= side1 +...
true
d7c3d53711774b41ae78442035be4ceb6e10c0e3
JavaScript
emilniklas/loac
/src/errors/ParserError.js
UTF-8
368
2.671875
3
[ "WTFPL" ]
permissive
export default class ParserError extends Error { constructor (filename, code, tokens, cursor, message) { const token = tokens[cursor] super(`ParserError: ${message}, saw ${token.type} "${token.content}"`) this.token = token this.filename = filename this.code = code this.tokens = tokens th...
true
b78b9fcda8d30eb119e9ba29136f3bb3b1119149
JavaScript
zapirius/zaporius
/assets/js/app.js
UTF-8
234
2.984375
3
[]
no_license
const input = new Keys(); let x = 10 const game = () => { ctx.clearRect(0, 0, width, height) ctx.fillRect(x, 300, 150, 150); ctx.fillStyle = 'red'; if(input.press('d') || input.press('в')) { x++ } } gameLoop(game);
true
92322d5901115ca7cec170b1ebd9c3b61cf710cd
JavaScript
jacobitkashala/ApiRobot
/app.js
UTF-8
4,976
2.59375
3
[]
no_license
const fetch = require("node-fetch"); const { check, oneOf, validationResult } = require('express-validator'); const cors = require("cors"); const express = require("express"); const app = express(); let robotDataAll = [{ image: "" }]; let robotDataCurrent = []; app.use(Cors({ origin: ["http://localhost:3000"], ...
true
15f0da8c4617a5048ed848a818a78419bf3bbdaa
JavaScript
schmidtk/opensphere
/src/os/histo/countbin.js
UTF-8
1,204
2.703125
3
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain" ]
permissive
goog.provide('os.data.CountBin'); goog.require('goog.array'); goog.require('os.data.histo.ColorBin'); /** * Histogram bin that only manages a count. * * @param {string} baseColor The base color of the layer represented by this bin * @extends {os.data.histo.ColorBin} * @constructor */ os.data.CountBin = functi...
true
dc1659431ba74e0a9f28239e203e9c8b565832c3
JavaScript
tiksha18/Be-Foody
/public/js/login.js
UTF-8
1,320
2.8125
3
[]
no_license
let email = document.querySelector("#email"); let password = document.querySelector("#pw"); let loginButton = document.querySelector(".loginBtn"); let message = document.querySelector("#message"); let forgetPassword = document.querySelector(".forgetPassword"); forgetPassword.addEventListener("click", async function(e...
true
92d2b57e2ab20745e64182bee55e831308813e42
JavaScript
yangxin1994/farvekonfigurator
/color-modular/color537.js
UTF-8
119
2.53125
3
[]
no_license
(function() { // Make the color #537 HTMLElement.prototype.color537 = function() { this.style.color = '#537' } })()
true
a16d9c8aee0bd9a41d9c8be4e19c67ed49397598
JavaScript
ClaudioCimarelli/cg2015
/20150312-inheritance/exercise01.js
UTF-8
591
2.96875
3
[]
no_license
function Door(){ this.opened = false; } Door.prototype.open = function(){ this.opened = true; }; Door.prototype.close = function(){ this.state = false; }; function SecurityDoor(){ Door.call(this); this.locked = false; } SecurityDoor.prototype = Object.create(Door.prototype); SecurityDoor.prototype.constructor ...
true
cc18eb4e7c318415bdb0b6883ab6ab843ddb481e
JavaScript
functionalfoundry/components
/src/Icon/Icon.js
UTF-8
3,030
2.59375
3
[]
no_license
/* @flow */ import React from 'react' import Theme from 'js-theme' import View from '../View' import sprite from './sprite' type SizeT = 'tiny' | 'small' | 'base' | 'large' | 'huge' type PropsT = { children: React.Children, fill: string, name: string, size: SizeT, stroke: string, theme: Object, } class I...
true
ccf4306b745d1154c8ac9a6f983fec938e4b875c
JavaScript
davincikab/magicsr
/js/main.js
UTF-8
3,754
2.53125
3
[ "MIT" ]
permissive
// Initialize a map object var data_url = "data/places.geojson"; var map = L.map('map',{ center: [11.986744135673385, 79.81807708740236], zoom:13, maxZoom:25, minZoom:9 }); // remove zoom control map.zoomControl.remove(); // Add a tilelayers var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z...
true
bcbc40ec5bd19eba484b81a9295ef5aaa31cb728
JavaScript
codysperoff/artist-to-lyrics-api
/app.js
UTF-8
4,163
3.171875
3
[]
no_license
//API Key: b93f69f6b5070fdea1c558202a18ae1e var resultElement = ""; //1. Take input from user $(document).ready(function () { $('.search-form').submit(function (event) { event.preventDefault(); // get the text the user submitted var userText = $(this).find('#user-text').val(); $(...
true
ba3a4a67688a245162d3ed442902d18912a67772
JavaScript
Wiebsonice/functional-programming
/src/app.js
UTF-8
7,277
3.34375
3
[ "MIT" ]
permissive
import results from './data/results.json' // import cleanData from './lib/cleanYears' const rawData = results.results.bindings // main function function main() { let cleanedData = convertData(rawData); let barChartArrData = createBarChartArr(cleanedData); let staticBarChartArrData = createStaticBarChartArr(c...
true
9eccfa62aa2048f926479892df959efa04b8a195
JavaScript
moonseoklee/bitPrice
/src/constants/test.js
UTF-8
503
2.8125
3
[ "MIT" ]
permissive
/*var request = require('request'); request('https://api.bitfinex.com/v2/tickers?symbols=ALL', function (error, response, body) { console.log('error:', error); // Print the error if one occurred console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received...
true
b3eb3f859708ec4f4cba3ab57a3a8cd6cdaf55c5
JavaScript
KSpadzinski/Toromont-Emergency-Contact
/content/app/geo.js
UTF-8
653
2.578125
3
[]
no_license
function handle_errors(error) { switch (error.code) { case error.PERMISSION_DENIED: CSAPP.openModalViewAlert("user did not share geolocation data"); break; case error.POSITION_UNAVAILABLE: CSAPP.openModalViewAlert("could not detect current position"); break; ca...
true
b82245ef26d9bd08a753461cc6807b68ddf50293
JavaScript
fjedi9/livro-node-mysql-master
/fontes/capitulo-3.js
UTF-8
5,075
4.21875
4
[]
no_license
//3.1 var x = 1 //3.2 x = 'teste' //3.3 let x, y, z //3.4 let x = 1 //3.5 // comentário de uma linha // tudo após as duas barras é considerado comentário //3.6 /* comentário de múltiplas linhas */ //3.7 // Declaracao e inicializacao de duas variaveis, troque os valores se quiser let a = 5 let b = 2 // Varios e...
true
b9968f29a5fc5c27bfaf950d3c2ffc6b637c0af4
JavaScript
Konovaly4/hype-chicco
/src/js/classes/WheelsButtonToggle.js
UTF-8
1,368
3.046875
3
[]
no_license
export default class WheelsButtonToggle { constructor(firstButton, secondButton, activeClass, elements, content) { this.firstButton = firstButton; this.secondButton = secondButton; this.activeClass = activeClass; this.elements = elements; this.content = content; this._firstButtonActive = this....
true
ef94a7f83caa124e703594d562c37cc0729bd392
JavaScript
burntcustard/canvasnake
/src/ai/settings.js
UTF-8
1,514
2.734375
3
[ "MIT" ]
permissive
import { randomWeightedLow } from './functions.js'; import { unAbs } from '../lib/misc.js'; /** * * Population: A group of many snakes. * Snake: An individual AI snake (a phenotype). * Genome: A specific set of weights that define the AI. * NeuralNet: A structure of layers of neurons (a "brain"). * - also refe...
true
9b5f294984d238cdb846346033114ab972a3b27c
JavaScript
EveraertJan/HYFAPI
/src/server.js
UTF-8
1,879
2.515625
3
[]
no_license
const express = require("express"); const http = require("http"); const bodyParser = require("body-parser"); const cors = require("cors");; const app = express(); const server = http.Server(app); const PORT = 3000; class App { constructor(opts) { this.connection = require('knex')({ client: 'mysql', ...
true
fa81ffb378463c62224db6bd4508566224e535a6
JavaScript
samaleksov/d3-chainsaw
/components/D3APIArrays.js
UTF-8
1,814
2.765625
3
[ "MIT" ]
permissive
import React from "react" import { withRouter } from 'react-router' import * as d3 from "d3" class D3APIArrays extends React.Component { componentDidMount () { // Statistics const data = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5...
true
06881e71e096d4ff6f8d890d2a9b6d00f0428405
JavaScript
harsha89/store_mod
/extensions/assets/webapp/themes/store/js/logic/asset/overview/asset-utilization.js
UTF-8
9,242
2.5625
3
[]
no_license
$(function(){ console.info('The subscription widget has been loaded'); var SUBSCRIPTION_TYPE_INDIVIDUAL = "INDIVIDUAL"; var SUBSCRIPTION_TYPE_ENTERPRISE = "ENTERPRISE"; var APP_NAME_FIELD='#subsAppName'; var TIER_FIELD='#subsAppTier'; var API_URL='/store/resources/webapp/v1/subscription/app'...
true
a5be33a0e35ed3cee56f9e0f245cd7bc0a3f2ef5
JavaScript
Coltonwindsor/Project-4-JobSeeker
/client/src/components/HomePage.js
UTF-8
4,900
2.5625
3
[]
no_license
import React, { Component } from 'react' import axios from 'axios' export default class Homepage extends Component { state = { documents: [], events: [], jobs: [], // responses: [], contacts: [], displayDocs: false, displayEvents: false, displayJobs...
true
2a5b604f3e8e7c64ec1c349a3a3f0fb6a9c89899
JavaScript
KyleK86/TrainSchedule
/assets/javascript/logic.js
UTF-8
3,394
3.25
3
[]
no_license
// 1. Initialize Firebase var config = { apiKey: "AIzaSyCgfMV84RbooUW7gL9l7UeHBRJhM-FkURE", authDomain: "train-schedule-a2df8.firebaseapp.com", databaseURL: "https://train-schedule-a2df8.firebaseio.com", projectId: "train-schedule-a2df8", storageBucket: "train-schedule-a2df8.appspot.com", messag...
true
231dbe1fb8ef08d9150aa562ecc9984b8c97daef
JavaScript
Werdffelynir/jslib
/animate-oldver/src/extension.text.js
UTF-8
4,782
2.546875
3
[]
no_license
Animate.Extension(function (instance) { if (!(instance instanceof Animate)) return; /** * @type CanvasRenderingContext2D */ var context = instance.getContext(); instance.text = { _parameters: false }; /** * Create text block * @param x * @param y ...
true
a1eae62e2c5cae09e0eb28a67b6b16e58d4d2797
JavaScript
JosephArcher/CatanApp
/Code/gameBoard.js
UTF-8
6,045
3.15625
3
[]
no_license
///<reference path="ResourceTile.ts"/> var CatanApp; (function (CatanApp) { var GameBoard = (function () { /* * Constructor - Each time a Game Board is created a random * board layout (Resource Tiles + Number Tiles) is created * */ function GameBoard() { ...
true
6e672ea5776c1fe4babca41a65791875074d6b6b
JavaScript
qwop/userscript
/monolith/85/139621.user.js
UTF-8
2,855
2.6875
3
[]
no_license
// ==UserScript== // @name Perfect 4chan image expander and scroller // @version 1.4 // @date 2012-08-27 // @namespace http://userscripts.org/users/471458 // @author pegasusph // @description Replace images with their sources. If a image's width or height is larger than window's, automatically reduce it to fit. A...
true
802bdf9ef0bd06f7e5efc9faaea9e81029bc37b6
JavaScript
KasporskiDzmitry/wg_forge_frontend
/src/model/Order.js
UTF-8
1,432
2.5625
3
[ "Apache-2.0" ]
permissive
import User from "./User"; export default class Order { constructor(data) { this._id = data.id; this._transactionId = data.transaction_id; this._createdAt = data.created_at; this._user = new User(data.user_id); this._total = data.total; this._cardType = data.card_typ...
true
656a23c25f7da1428a88f5692005df0ebbca3f97
JavaScript
mohammed-ashiq-m/service-worker.js
/src/public/main.js
UTF-8
1,277
2.609375
3
[]
no_license
const PUBLIC_VAPID_KEY="< ---------- Drop Your Public Key ---------- >" const subscription = async () => { // Service Worker console.log("Registering a Service worker"); const register = await navigator.serviceWorker.register("/worker.js", { scope: "/" }); console.log("new service worker") ...
true
7056005f12db84840113434262077211527c12cc
JavaScript
naveennallanti/Mantra
/2.js
UTF-8
322
2.5625
3
[]
no_license
var localStorage = require('localStorage'); var axios = require('axios'); let fetch_cached=()=>{ if(!localStorage.getItem('sampleData')){ axios.get('http://time.jsontest.com').then(resp => { localStorage.setItem('sampleData',resp.data) }); }else{ localStorage.getItem('sampleData') } } fetch_cached()...
true
9f1eceeb10460bfd0e1e4992070c60ad0913d1d6
JavaScript
Prerana-sadashiv/PracticeSnippets
/Blackjack/script.js
UTF-8
4,292
3.828125
4
[]
no_license
//Card variables let suits=['Spades','Clubs','Diamonds','Hearts']; let values=['Ace','King','Queen','Jack','Ten','Nine', 'Eight','Seven','Six','Five','Four','Three','Two']; // DOM variables let paragraph= document.getElementById('text-area'); let ngBtn= document . getElementById('newGameButton'); let hBt...
true
e5b420313e93da7c23d5cc9dc2f06ea86d1645f8
JavaScript
edwardspresume/Sandbox
/javaScript/FullStack-Academy/workshops/04-scope/03-sum-things-wrong/sum-things-wrong.js
UTF-8
194
3.375
3
[]
no_license
let sum = 0; const sumThingsWrong = (num1, num2) => num1 + num2; console.log(sumThingsWrong(15, -10)); // function sumThingsWrong(num1, num2) { // sum = num1 + num2; // return sum; // }
true
ee59532c5180106d5cf3d4c3b8f65d589b4b3904
JavaScript
emilyjspencer/mocha-chai
/backend/notes.js
UTF-8
1,142
2.984375
3
[]
no_license
import fs from 'fs'; class Notes { constructor(filepath) { this.filepath = filepath this.notes = filepath ? this.readFromJson() : [] }; readFromJson() { return JSON.parse(fs.readFileSync( __dirname + this.filepath, "utf8", (err, data) => { if (err) throw err }) ...
true
e6522dcbcc169c4155838475f9399148bba4d3e6
JavaScript
SergioCrisostomo/react-onoff-switch
/index.js
UTF-8
3,291
2.515625
3
[]
no_license
import React from 'react'; import {grey, offBackground, onBackground, buttonStyle, setStyles} from './styles.js'; const componentDefaults = { width: 100, buttonColor: '#FFFFFF', passiveColor: '#FFFFFF', activeColor: '#13BF11' } const stopEvent = e => { e.preventDefault(); e.stopPropagation(); } export default...
true
277c91a21ea53a0e8ceea7456499c091732c2867
JavaScript
Graphene-Dev/GrapheneBot
/commands/eval.js
UTF-8
1,176
3.265625
3
[]
no_license
const Discord = require('discord.js'); module.exports.run = async (client, message, args) => { if(message.author.id != "411883159408476160" && message.author.id != "301969699258761216" && message.author.id != "718188351508971542") { return message.reply("you ain't cool enough to use this command.\nhaha"); ...
true
b618855cbc8978385ebe213449e2099370a08326
JavaScript
chchen1124/WordGuessingRepo
/game.js
UTF-8
18,262
3.828125
4
[]
no_license
var words=["apple","pizza","burger","corndog"]; //initialize all wins and losses to zero var wins=0; var losses=0; //computer gets a random word from the words array var random_word=words[Math.floor(Math.random()*words.length)]; //random word is put in the message2 box $(".message2").html(random_word); //the words in ...
true
ef8f3bec816e0409456625683fe2c359ca621318
JavaScript
tristan-training/Simon
/game.js
UTF-8
2,268
3.015625
3
[]
no_license
var gameStarted = false; var ignoreButton = false; var buttonColors = ["red", "blue", "green", "yellow"]; var level = 0; var gamePattern = []; var userClickedPattern = []; $("div.smallbtn").on("click", function () { if (gameStarted === false) { initialise(); } }); $("div.btn").on("click", f...
true
9b4cd2657153d4934a8afaa3529fcef4548075f9
JavaScript
FredCave/cpr_new
/assets/js/gallery.js
UTF-8
2,586
2.609375
3
[]
no_license
var Gallery = { init: function () { console.log("Gallery.init"); this.bindEvents(); this.imagesLoad(); $(".spinner").fadeOut(); }, bindEvents: function () { console.log("Gallery.bindEvents"); $(".gallery_right").on("click", function () { Gallery.nextSlide( $(".gallery") ); }); $(".galler...
true
c1638d6b2c65b887f8d4a2b8cde26a5bea8abf3b
JavaScript
borovsska/js-study
/OOP-drivers.js
UTF-8
632
2.90625
3
[]
no_license
class Driver { run () { console.error('This method is not implemented') } } class ChromeDriver extends Driver { constructor() { super(); this.name = 'ChromeDriver'; } run() { console.log(this.name, 'started') } } class FireFoxDriver extends Driver { constru...
true
64673241ba953c7f3cb9328bb9bf66463e129069
JavaScript
damianCrow/React-dashboard
/src/components/atoms/Temperature/index.js
UTF-8
1,222
2.5625
3
[ "MIT" ]
permissive
import React, { Component } from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { fetchWeather } from 'store/actions' import { fonts } from 'components/globals' import styled from 'styled-components' const Temp = styled.span` text-align: center; color: white; font-family...
true
d31b1ddc3289b47902880291f4e167be1f2896cc
JavaScript
ranjithsanjeeva/UIPepInternship
/Week4/Form-validation/EX1/script.js
UTF-8
826
3.25
3
[]
no_license
let username=document.getElementById("username"); let password=document.getElementById("password"); function validation(){ if(username.value.trim()=="") { alert("Blank username"); username.style.border="solid 2px red"; document.getElementById("lbluser").style.visibility="visible"; r...
true
3bff6632e8c8ea5fbfaa0e4f71d80ac999cb9076
JavaScript
eralha/ionic-ocr
/js/services/main.js
UTF-8
6,179
2.5625
3
[]
no_license
var ServicesModule = angular.module('starter.services', []) ServicesModule.factory('FileService', function($q, OCRService, $ionicPopup, $filter) { // Might use a resource here that returns a JSON array var fileStorage = new Array(); var sup = this; var workerProcessQueue = new Array(); var workerWaitQueue =...
true
5da4eb48eb63c3f221c2be2ecc227d206b18529f
JavaScript
herman113/starter-polish
/server.js
UTF-8
1,126
2.703125
3
[]
no_license
// https://www.w3schools.com/nodejs/nodejs_http.asp // var http = require('http'); // //create a server object: // http.createServer(function (req, res) { // res.write('Hello World!'); //write a response to the client // res.end(); //end the response // }).listen(8080); //the server object listens on port 8080 ...
true
9d8ac53b154dec6e33f64e3fcb274cc66c9e9162
JavaScript
melquiadesvazquez/MelPop
/models/Ad.js
UTF-8
2,644
2.765625
3
[ "MIT" ]
permissive
'use strict'; const mongoose = require('mongoose'); const tags = process.env.ADS_TAGS.split(','); // Defining the schema const adSchema = mongoose.Schema({ name: { type: String, required: true, index: true }, forSale: { type: Boolean, default: true, required: true, index: true }, price: { type: Number, min: 0, ...
true
ee80444d239cc763f72c6e60dc78daffcd4f6364
JavaScript
jis60224/mygit1
/plane/js1/ajax.js
UTF-8
1,626
3.421875
3
[]
no_license
//创建xhr对象的函数 function createXHR(){ if (window.XMLHttpRequest){ //IE7+,谷歌, 火狐等 return new XMLHttpRequest(); } return new ActiveXObject("Microsoft.XMLHTTP"); //IE6 } /* ajax({ type: "get", url: "http://60.205.181.47/myPHPCode2/checkname.php", data: {regname:"张三", age:33}, async: true, ...
true
b414d6600072c2201a30bc7f65b463229c5bc21e
JavaScript
jenzuffer/Sem3
/_reactAllDemo/src/components/liftingUp/StateDemo.js
UTF-8
575
2.625
3
[]
no_license
/** * Created by tha on 23-10-2017. */ import React from "react" import InputComp from './InputComp'; import ShowComp from './ShowComp'; export default class StateDemo extends React.Component{ constructor(){ super(); this.state = {name: ''} } update =(event)=>{ const na...
true