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
9d62e6bb390e38acdddbf1d97fcdf335a5b9a79f
JavaScript
JewelRam/practiceFunction
/prac.js
UTF-8
104
2.734375
3
[]
no_license
function names (name1, name2) { return '${name1} ${name2}' } console.log(names("jewel", "ramirez"))
true
ae5558f60b11a9d879e9c1251ac63fd49996cd2b
JavaScript
rikmarqk/Capstone
/frontend/src/components/CreateForm.js
UTF-8
2,211
2.734375
3
[]
no_license
import React, { Component } from "react"; const PETS_URL = "http://localhost:3000/pets" class CreateForm extends Component { state = { name: "", pet_category: "", breed: "", age: null, sex: "", status: "", cam_link: "", img_url: "" } handleSubmit = (e) => { e.preventDefault();...
true
ef5609f15a049de73da433f3c057804f96b0a79e
JavaScript
meag4n/music-recommender
/js/scripts.js
UTF-8
7,941
2.65625
3
[]
no_license
const modal = document.querySelector('#modal') const button = document.querySelector('#btn') const close = document.querySelector('#close') const submit = document.getElementById('submit'); const video = document.getElementsByClassName('videos'); const makeitbetter = document.querySelector('#makeitbetter'); const up =...
true
c4246dca6085ae3cb7357c793458271dbc21404c
JavaScript
Logert/redux-test
/src/reducers/tracks.js
UTF-8
255
2.515625
3
[]
no_license
const initialState = []; export default function playlist(state = initialState, action) { switch(action.type){ case 'ADD_TRACK': return [...state, action.payload]; case 'DEL_TRACK': return state; default: return state; } }
true
668d6993454970bb4b8c4f8de0cd447583781458
JavaScript
zakerytclarke/emoji-rogue
/rules.js
UTF-8
4,449
3.1875
3
[]
no_license
var ruleTxt=` ๐Ÿ”ฅ๐ŸŸข = ๐Ÿ”ฅ๐Ÿ”ฅ | ๐ŸŸค๐Ÿ”ฅ ; ๐ŸŸข ๐Ÿ”ฅ = ๐Ÿ”ฅ ๐Ÿ”ฅ | ๐ŸŸค ๐Ÿ”ฅ ; ๐ŸŸข๐Ÿ”ฅ = ๐Ÿ”ฅ๐Ÿ”ฅ | ๐Ÿ”ฅ๐ŸŸค ; ๐Ÿ”ฅ ๐ŸŸข = ๐Ÿ”ฅ ๐Ÿ”ฅ | ๐Ÿ”ฅ ๐ŸŸค ; ๐Ÿ”ฅ = ๐ŸŸค | ๐Ÿ”ฅ | ๐Ÿ”ฅ ; ๐Ÿ”ฅ๐ŸงŸ = ๐Ÿ”ฅ๐Ÿ”ฅ | ๐Ÿ”ฅ๐ŸงŸ ; ๐Ÿ”ฅ๐Ÿ˜จ = ๐Ÿ”ฅโ˜ ๏ธ ; ๐Ÿ”ฅ๐Ÿ˜• = ๐Ÿ”ฅ๐Ÿ˜จ ; ๐Ÿ”ฅ๐Ÿ˜ = ๐Ÿ”ฅ๐Ÿ˜• ; ๐Ÿ”ฅ๐Ÿ˜€ = ๐Ÿ”ฅ๐Ÿ˜ ; ๐Ÿ˜จ๐ŸงŸ = โ˜ ๏ธ๐ŸงŸ ; ๐Ÿ˜๐ŸงŸ = ๐Ÿ˜จ๐ŸงŸ ; ๐Ÿ˜€๐ŸงŸ = ๐Ÿ˜๐ŸงŸ ; ๐ŸงŸ๐Ÿ˜จ...
true
4ba7ec59dbb0ab2094fc49113742533384689135
JavaScript
lemonhall/Knwl.js
/test/places.spec.js
UTF-8
1,847
2.6875
3
[ "MIT" ]
permissive
var fs = require('fs'); eval(fs.readFileSync('../knwl.js') + ''); var x = new Knwl(); describe("places", function() { it("should detect places formatted like 'See you in .'", function() { x.init("I will see you in Tesco"); var output = x.get("places") expect(output[0][0]).toBe("Tesco"); ...
true
ff6d1db3e707cc27be025f6ef4d6425459eee0a3
JavaScript
yoannisj/lilo-js
/util/merge.js
UTF-8
370
2.625
3
[]
no_license
'use-strict'; var extend = (typeof window === 'object' ? require('jquery').extend : require('extend')); module.exports = function() { // collect all arguments in an array in ordet to pass them to `extend` var args = Array.prototype.slice.call(arguments); // and 'true' as first one for deep assignment args.uns...
true
76a143e0f9f2282baaac8ceed86e82e3b44c7d57
JavaScript
kinglo3/glogan80.github.io
/studies/string-manipulation.js
UTF-8
1,553
4.71875
5
[]
no_license
/** *STRING MANIPULATON * ** -There are many different methods of string manipulation. They allow us to change and work on a string. Some methods accept arguments that pass inside the parentheses. * * Here are a few string manipulation methods we can use: * * -string.toUpperCase() will take a given string and retu...
true
97c727f769b743583be9921d18e2266c24dbdce1
JavaScript
AAI-USZ/FixJS
/input/100+/after/7331f4edbf81340875bc1f11c1c8ae3b23cb383c_0_1.js
UTF-8
935
3
3
[ "MIT" ]
permissive
function(){ var self = this; this.log("Connecting to " + this.host + " at port " + this.port + "..."); // create and encrypted connection using ssl var stream = this.stream = tls.connect(this.port, this.host, this.keys, function(){ self.log("Connection established."); if (stream.authorized) self.lo...
true
20538f2638e07514795f879ad5d7f0a22a42530a
JavaScript
Hyunse/coding-exercise
/Javascript/designPattern/proxyWrapper.js
UTF-8
1,233
3.6875
4
[]
no_license
/** * ํ”„๋ก์‹œ๋ฅผ ํ™œ์šฉํ•œ ๋ž˜ํผ ๊ธฐ๋Šฅ ๊ตฌํ˜„ * ํ•จ์ˆ˜ ํ˜ธ์ถœ์‹œ ์ „์ฒ˜๋ฆฌ */ (function () { function wrap(func, wrapper) { return function () { var args = [func].concat(Array.prototype.slice.call(arguments)); return wrapper.apply(this, args); }; }; function existingFunction () { console.log('...
true
c85e10ca94c1ec32848242a5e6734d0c4630b5f1
JavaScript
15osvaldo/port
/03-01SintaxisBasicaVariable.js
UTF-8
271
3.28125
3
[]
no_license
//notscion de altas y bajas let nombreCompleto = 'juan Perez'; console.log( nombreCompleto ); let x, y; x= 10, y= 20; let z = x + y; console.log(z); let nombreCompleto2 = 'Juan Perez'; let NombreCompleto = ' Carlos Lara'; console.log(nombreCompleto2); console.log(NombreCompleto);
true
118601ff912f857a3c8dd7ce524db4c55c7e0a62
JavaScript
firstBusiness/algorithms
/leetcode/JavaScript/No225.implement-stack-using-queues.js
UTF-8
2,051
4.53125
5
[]
no_license
/** * Difficulty: * Easy * * Desc: * Implement the following operations of a stack using queues. * - push(x) -- Push element x onto stack. * - pop() -- Removes the element on top of the stack. * - top() -- Get the top element. * - empty() -- Return whether the stack is empty. * * Notes: * - You must use onl...
true
ee98760ff06c97cfaa4546e632f019d9a0b48a18
JavaScript
czheng4/LifeJournal
/src/js/customize_repeat.js
UTF-8
3,253
2.78125
3
[ "MIT" ]
permissive
/* frequency dropdown */ $("#repeatNumberDropDown").click(function(){ let height1 = $("#repeatNumber").css("max-height"); let height2 = $("#repeatType").css("max-height"); $("#repeatNumber").css("max-height", height1 == "0px"? "170px": "0px"); if(height1 == "170px" && height2 == "0px") $(".week").css("top","110...
true
5c0de4b6af920bf04a93f2fba5227079405cf239
JavaScript
peterkogo/Protos
/components/RadialVis/FeatureAxis.js
UTF-8
5,104
2.53125
3
[ "MIT" ]
permissive
import React from 'react' import PropTypes from 'prop-types' import * as d3 from 'd3' import { AXISGAP, AXISCOLOR, AXISSIZE, FONTCOLOR, FONTSIZE, FONTOFFSET, FEATUREFILLCOLOR } from '../Defaults' import Feature from './features/Feature' import style from './RadialVis.css' /** * Axis Element containin...
true
0c51fbbe63581456e665e50c4c29ef1b9116582b
JavaScript
juanmav/camadaitmaster
/clase3/examplesarray.js
UTF-8
400
3.59375
4
[]
no_license
console.log('hola!'); var numeros = [2,5,1,10,20]; numeros.forEach(function (n) { console.log('Me dieron un numero: ', n); }); console.log('---------------------------------------------------'); var suma = numeros.reduce(function(acc, n){ console.log("El Acummulador es: ", acc); console.log("El valor es...
true
63ace1793ba9d8c62e967a996815a4506bb82c95
JavaScript
Jlawlzz/real-time
/test/survey-engine-test.js
UTF-8
1,401
2.5625
3
[]
no_license
'use strict' let assert = require('chai').assert; let Survey = require('../src/survey'); let SurveyStore = require('../src/survey-store'); let SurveyEngine = require('../src/survey-engine'); describe('survey engine functions', function(){ it('creates a survey id', function(){ let id = SurveyEngine.createSurvey...
true
8b5d087f5d923cce486c5a996724862afa6b3d9d
JavaScript
rikitoro/FPwithUndersore
/sec08/actions.js
UTF-8
798
2.71875
3
[]
no_license
exports.actions = actions; exports.mSqr = mSqr; var _ = require('underscore'); var cat = require('./cat.js').cat; var existy = require('./truthy.js').existy; function actions (acts, done) { return function(seed) { var init = { values: [], state: seed }; var intermediate = _.reduce(acts, function(stateObj, ...
true
eb1007fd786ceaf4a33aa5db775b2f190c8d4053
JavaScript
diegolepore/vueschool-forum
/src/helpers/index.js
UTF-8
301
2.671875
3
[]
no_license
export const findById = (resources, id) => { return resources.find((r) => r.id === id) } export const upser = (resources, item) => { const index = resources.findIndex((p) => p.id === item.id) if (item.id && index !== -1) { resources[index] = item } else { resources.push(item) } }
true
292ffec2b9cc8f3fd9ddb98207644aedbacebc99
JavaScript
igorosilva/javascript
/aulas/aula14/ambiente.js
UTF-8
118
2.96875
3
[ "MIT" ]
permissive
var i; console.log('Vai comeรงar...'); for (i = 0; i < 5; i++) { console.log(`For[${i}]`); } console.log('Fim!');
true
cd17c70087553ceb88e879972495a5ea31b2d504
JavaScript
WhatProblem/ES6
/myTapable/src/nine/1_start.js
UTF-8
1,392
3.109375
3
[]
no_license
// ไธฒ่กŒๆ‰ง่กŒ๏ผŒ็ฌฌไธ€ไธชๆ‰ง่กŒๅฎŒๅ†ๆ‰ง่กŒ็ฌฌไบŒไธช๏ผŒ็ฑปไผผexpress็š„next() // const { AsyncSeriesWaterfallHook } = require('tapable') const AsyncSeriesWaterfallHook = require('./1_case.js') // ่‡ชๅฎšไน‰้’ฉๅญ class Lesson { constructor() { this.index = 0 this.arch = { hooks: new AsyncSeriesWaterfallHook(['nameTipsFlag']) // ๆŽงๅˆถcall(...
true
e6c4634842e623d6f139c8d3c5b289b73768c186
JavaScript
ThomasR/isogrammify
/test/cli-test.js
UTF-8
3,824
2.578125
3
[ "Apache-2.0" ]
permissive
'use strict'; const assert = require('assert'); const fs = require('fs'); const mktemp = require('mktemp'); const path = require('path'); const proc = require('child_process'); const rimraf = require('rimraf'); let projectDir = path.resolve(__dirname, '..'); let runSync = function (cmd/*, ...args */) { // dot-notati...
true
a7216bd700a3ba5f1c549c0257aaad25f996630c
JavaScript
Vodok1/to-do-list
/script.js
UTF-8
3,382
3.234375
3
[]
no_license
//containery const noteList = document.querySelector(".note-list"); const inputPlace = document.querySelector("#todo-input"); // inputPlace.focus(); //przyciski const addButton = document.querySelector("#add"); const undoButton = document.querySelector("#undo"); const doneFilterButton = document.querySelector("...
true
dfc17ae19e822ef271e89cccab53999eacdbc8e9
JavaScript
nganmaplun/Cyberbrain
/scripts/launch_cb_server.js
UTF-8
439
2.546875
3
[ "MIT" ]
permissive
const { spawn } = require("child_process"); let cl = console.log; let serverProcess = spawn("python", ["-m", "examples.loop"]); setTimeout(() => { serverProcess.kill(); }, 3000); serverProcess.stdout.on("data", data => { console.log(`stdout: ${data}`); }); serverProcess.stderr.on("data", data => { console.er...
true
978853c8f07215c88292952050ea2913898b76d7
JavaScript
sarafogo/T9-jquery
/Aula 1 - Conceitos/Exercicios/1/script.js
UTF-8
1,349
3.203125
3
[]
no_license
/* Biscoito da sorte - Versรฃo JQuery Ao clicar no biscoito da sorte, troque o texto do parรกgrafo para uma frase aleatรณria que estรก guardada na nossa array 'frases' */ const frases = [ "A vida trarรก coisas boas se tiveres paciรชncia.", "Demonstre amor e alegria em todas as oportunidades e verรกs que a...
true
a723ac7257d0140b18db9ad038e77e8ba8e6354e
JavaScript
DimchoLakov/JS-Advanced
/05. Dom Events/03. Delete-From-Table/app.js
UTF-8
468
3.203125
3
[ "MIT" ]
permissive
function deleteByEmail() { let textToSearchFor = document.querySelector('input[name="email"]').value.trim(); let tds = document.querySelectorAll('tbody td:nth-child(even)'); let result = document.querySelector('#result'); for (const td of tds) { if (td.textContent === textToSearchFor) { ...
true
09b8f4b633cce188185ea418ea46050e53247be0
JavaScript
memxz/EE4717_webDev
/project/static/js/generateContent/itemCategories.js
UTF-8
3,348
2.9375
3
[]
no_license
(function($){ $(document).ready(function(){ selectTab(); addToCartOnClick(); // generateClothingItems(); // $('form.addtomycart').submit(function(e){ // e.preventDefault(); // $.ajax({ // url: "processaddtocart.php", // type: "POST", // data: $('form#myform').serialize(), // ...
true
8b31c0341759494ad2fd43b40dc04f17f5def9a6
JavaScript
ratnak1990/ACD_FE_Session_2_Assignment_3_Main
/ACD_FE_Session_2_Assignment_3_Main.js
UTF-8
376
2.671875
3
[]
no_license
var person={ firstName:"Aamir", lastName:"Khan", email:"aamir.khan@gmail.com", phone:"02228490838" } document.getElementById("fname").innerHTML=person.firstName +"&nbsp" ; document.getElementById("lname").innerHTML=person.lastName +"&nbsp" ; document.getElementById("email").innerHTML=person.email +"&nbs...
true
41ed618b70efa5ce4a70e2eef63651266b58f689
JavaScript
ofthedove/andrewcombs13.info
/games/ancientClock/ancientClock.js
UTF-8
1,639
3.140625
3
[]
no_license
$( document ).ready(function() { window.time = new Date(); window.tickLength = 250; updateTime(); document.addEventListener("visibilitychange", visibilityChanged); startClock(); }); function visibilityChanged() { if(document.hidden) { window.tickLength = 5000; } else { window.tickLength = 250; } stopClock...
true
b10c748d71d113c839017808f2bf404941df06af
JavaScript
AASosnin/landing_ukmyhome
/#src/js/elements/elementInfoList.js
UTF-8
2,818
2.671875
3
[]
no_license
// Template function howToMakeUKTemplate(options) { const elementInfoList = document.querySelector(".element-info-list"); const elementInfoListTemplate = document.createElement("ul"); let i = 1; options.forEach((el) => { elementInfoListTemplate.insertAdjacentHTML('beforeend', ` <li> <div class...
true
8a964b02c9dfc86b173266ab923a12e12a6d359a
JavaScript
with-watson/watson-services-pipeline-app
/server/components/watson-stt-component/models/watson-stt.js
UTF-8
3,099
2.53125
3
[ "Apache-2.0" ]
permissive
'use strict' const fs = require('fs') const formidable = require('formidable') // Configure the Speech To Text Service with the Credentials const SpeechToTextV1 = require('watson-developer-cloud/speech-to-text/v1'); const speechToText = new SpeechToTextV1({ username: process.env.WATSON_STT_USERNAME, password:...
true
f9150eb3d7c7e03d4241c67e92e5fb46bffa8b9e
JavaScript
GoranGit/JS-OOP
/Exams/exam 2015/task1.js
UTF-8
16,386
3.171875
3
[ "MIT" ]
permissive
/** * Created by Goran on 7/9/2015. */ function solve(){ function validateIfUndefined(val, name) { name = name || 'Value'; if (val === undefined) { throw new Error(name + ' cannot be undefined'); } }; function validateStringNonEmpty(val, name) { name = name |...
true
f0fff558758933e060a204b9e4f386b5d2c4139f
JavaScript
shibikr/BusRoutes
/routes/busRouteLib.js
UTF-8
1,754
2.953125
3
[]
no_license
var lib = {}; var City = function(){ this.busRoute = {}; }; lib.getDistinctStops = function(stops){ return stops.filter(function(stop, i, array){ return array.indexOf(stop) === i; }); }; lib.getAllBusStops = function(city){ var allStops = []; for(var busNo in city){ var value = city[busNo]; allStops = a...
true
00f73785269435390c1126ec0aaf1ad9b335524c
JavaScript
BodeiBrouwer/lab-express-drones
/routes/drones.js
UTF-8
1,620
2.5625
3
[]
no_license
const express = require('express'); const DroneModel = require('../models/Drone.model') const router = express.Router(); router.get('/drones', (req, res, next) => { // Iteration #2: List the drones DroneModel.find() .then((drones)=> { res.render('drones/list.hbs', {drones}) }) }); router.get('/dro...
true
97bc29a3c53ef6813a46f0636c7c46ed3c6f685a
JavaScript
johnnymayer/sgac
/src/sgac.js
UTF-8
3,307
3.40625
3
[ "MIT" ]
permissive
export class Sgac { constructor (birthday) { this.birthday = birthday this.convertDate = new Date(this.birthday).getTime() this.today = new Date().getTime() this.age = Math.floor((this.today - this.convertDate)) / 1000 this.year = ((this.age / 31540000)) this.ageExpEarth = 79 - this.year t...
true
f978e54aec208fc2b3ff19cdbfbf8417b149be3d
JavaScript
yash-chugh/assignment-1
/question10.js
UTF-8
247
2.796875
3
[]
no_license
var protectemail= function(emailaddress) { var split = emailaddress.split("@") a=split[0]; b=a.length/1.5; a=a.substring(0,a.length-b); c=split[1] return a + '......@' + c; } console.log(protectemail('yash.chugh0001@gmail.com'))
true
bcb8a41d2b8177752675edf51a5921eaf91359b0
JavaScript
hershdhillon/Firebase-Book-Summary-Feed
/public/js/profile.js
UTF-8
6,323
2.78125
3
[]
no_license
//create firebase references const firebaseConfig = { apiKey: "AIzaSyBQJTSe8sF0EkBfv68xJu1s_M10gfMiMEI", authDomain: "book-project-37efa.firebaseapp.com", projectId: "book-project-37efa", storageBucket: "book-project-37efa.appspot.com", messagingSenderId: "91377771776", appId: "1:91377771776:web...
true
b8b18e480e967abd7409a78f059f0652de7987e2
JavaScript
j4kim/iucn-mpsg
/public/js/main.js
UTF-8
565
2.84375
3
[]
no_license
$(function(){ function aspect(elem){ return elem.width()/elem.height() } function resizeHeaderImage(){ var image = $(".img-header img"); var header = $(".img-header"); if(aspect(header) > aspect(image)){ // cas desktop image.css({"width": "100%", "he...
true
3e06959bdb9fd98ab8d5ff56a44084e41c821e36
JavaScript
CelsoTakafuji/restaurante
/install/validation/install.js
UTF-8
1,715
2.609375
3
[]
no_license
๏ปฟ /***************************************************** Desenvolvedor: Napapapรฃo Email: napapapao@gmail.com COPYRIGHT ยฉ2016 RESTAURANTE DO NAPA. Todos os direitos reservados ******************************************************/ //funรงรฃo para lidar com a validaรงรฃo fo formulรกrio de conexรฃo function validarConexao(co...
true
2084f9d142a4c866cbd06543be81ea8e050bb4da
JavaScript
hobljungberg/genera
/metal/Space.js
UTF-8
1,010
2.90625
3
[]
no_license
/** * Space * * A place to render. */ import GeneraObject from './GeneraObject.js'; class Space extends GeneraObject { constructor(width = 800, height = 600) { super(); this.width = width; this.height = height; this.tick = 0; this._behaviors = { draw: n...
true
7a99ad991a074b1c4adf40de634277704cea7ba4
JavaScript
MMRAuerbach/sd-js-array-two
/js/main.js
UTF-8
1,479
4.25
4
[]
no_license
console.log("main.js file loaded"); /* Create a new empty array for ages */ const agesArray = new Array(); /* Create a new empty array for numbers */ const numbersArray = []; /* Create a new filled array with names */ const namesArray = ["Springer", "Thong", "Van der Linden", "Auerbach"]; /* Get the elements you nee...
true
25a700607a9390110b9605f8c148f1519e6e1bca
JavaScript
neverson-silva/anotacoesCursoWebModernoComJavascript
/2.fundamentos/9.math.js
UTF-8
239
3.46875
3
[]
no_license
//Em vesoes mais recentes o operador ** realiza exponenciacao const raio = 5.6 const area = Math.PI * Math(raio, 2) console.log(area) // ver mais em https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Math
true
240947f7da3c244c4d6ffeeb7fbc5e51a54000d6
JavaScript
vdammur/JavaScriptBasics
/Exercise2/generator.js
UTF-8
159
2.75
3
[]
no_license
let sample = function*(){ console.log("#1"); yield; console.log("#2"); yield; console.log("#3"); } let gen = sample() gen.next(); gen.next(); gen.next();
true
266ca10bc7a2fb2ac4a3f2b86a6e1f7f7670f0f9
JavaScript
willstrasser/cword
/public/prepModel.js
UTF-8
1,360
2.734375
3
[]
no_license
function prepModel(puz){ puz.clues.across = _.map(puz.clues.across,function(str,n){ var clueNum = parseInt(str.substr(0,str.indexOf('.'))); var firstTile = puz.gridnums.indexOf(clueNum); var tilesArr = []; for (var i = 0; i<puz.answers.across[n].length; i++) { tilesArr.push(i+firstTile); }; return({ ...
true
421cbd38ceaa2630b44e99c82dc1aa21ebd3a079
JavaScript
andreamaranesi/dynamic_bubble_cursor
/script.js
UTF-8
7,831
2.8125
3
[]
no_license
/** * @version 1.0 * @author Andrea Maranesi */ (function ($) { /** * defines the jQuery function name * @type {string} */ const name = "drMouseShadow"; /** * defines the borderColor of the bubble cursor * @type {string} */ const color = "red"; /** * defines the...
true
3238db0ee5a32dc9a20995a059b118c2d111580c
JavaScript
kwm4385/PubSpot
/js/reducers/Beer.js
UTF-8
505
2.515625
3
[]
no_license
import * as ActionTypes from '../constants/ActionTypes'; let defaultState = {shouldModalBeOpen:false}; export default function(state = defaultState, action) { switch (action.type) { case ActionTypes.BEER_FETCHED: let newState = {...state}; newState[action.id] = action.data.data; return newStat...
true
547e28b2e90fa5687fa6d146e31ff82154e24dd7
JavaScript
dujuncheng/copy
/index.js
UTF-8
1,643
2.5625
3
[]
no_license
const fse = require('fs-extra') const archiver = require('archiver') const fs = require('fs') const walk = require('walk') var rimraf = require('rimraf'); //่ฎพๅฎšๆบ่ทฏๅพ„ๅ’ŒๅคๅˆถๅŽ็š„็›ฎๆ ‡่ทฏๅพ„ const source = '/Users/dudu/Desktop/test_archive'; const copy_target = '/Users/dudu/Desktop/test_archive_copy'; //่ฎพๅฎš่ฆๆ‰“ๅŒ…็š„่ทฏๅพ„ๅ็งฐ const filter = ['่ฎพ่ฎก็จฟ...
true
ee128437d0455ebe3518c1403bf9543fe647ff53
JavaScript
carlydekock/react-props
/src/components/form/Form.js
UTF-8
587
2.921875
3
[]
no_license
import React from 'react'; export default function Form(props) { async function handleSubmit(e) { e.preventDefault(); // where does this data come from? // inputs? // buttons? // let { value } = e.target; const request = await fetch('https://pokeapi.co/api/v2/pokemon'); const data = a...
true
f6608903039a444c2d3947b8a9065a7d4afca5f9
JavaScript
gokartgo/Google-Code-Jam-Gokart
/2022/CodeJam/Qualification/3d_printing.js
UTF-8
1,677
3.359375
3
[]
no_license
// 2 input question 1 line multiple input data 1 line // example input // 3 // 3 10 // 3 7 2 // 4 100 // 11 10 5 50 // 1 1 // 1 const readline = require('readline'); const rl = readline.createInterface({ input:process.stdin, output:process.stdout }); let expect = 'begin'; let num_test_cases; let input = []; let...
true
3382796e2a5bd909add74f07db07d069260b2c1a
JavaScript
barchart/common-node-js
/aws/dynamo/schema/definitions/ComponentTypeDefinition.js
UTF-8
1,515
2.796875
3
[ "MIT" ]
permissive
const assert = require('@barchart/common-js/lang/assert'); const DataType = require('./DataType'); module.exports = (() => { 'use strict'; /** * A {@link Component} aggregates several fields, this instance describes * a single field used within a {@link Component} * * @public * @param {DataType} - The fi...
true
73d42919c51dde54e679669c8ab4087a97b2e2d2
JavaScript
syqJoker/myblog-version1
/app/js/demo1.js
UTF-8
1,189
2.53125
3
[]
no_license
$(function () { $("#test").click(function () { var $box = popBox('<p class="box-title">้ซ˜็บงๆœ็ดข</p>'); }) function popBox(htm) { if ($(".popBox").length) { console.log("ๅทฒๅญ˜ๅœจ.popBox"); return; } var box = '<div class="popBox"></div>', fa = '<a id...
true
08ed8466290695f49e2db5ceec96d0af03237de7
JavaScript
vivek-bavishi/testcases-react
/src/tests/Login.test.js
UTF-8
3,041
2.53125
3
[]
no_license
import React from 'react'; import 'mutationobserver-shim'; import '@testing-library/jest-dom/extend-expect'; import { BrowserRouter as Router } from 'react-router-dom'; import { fireEvent, render, waitFor } from '@testing-library/react'; import LoginView from '../tests_view/Login.view'; import Login from '../pages/Logi...
true
186bf4ecd884651c261227a00d7c92db3edaa924
JavaScript
arthursiq5/rock-paper-scissors-js
/main.js
UTF-8
4,073
3.21875
3
[]
no_license
"use strict"; window.onload = function(e){ const Options = (function() { function randomizeArray(max){ return Math.floor(Math.random() * max); } let Options = { rock: { option: '[OPTION] ROCK', toHtml: '<i class="fas fa-hand-rock"></i> Rock' }, paper: { option: '[OPTION] PAPER', to...
true
40413d984852156b753e9e5ac5d3230eef60d9a3
JavaScript
calcyu/nodejs
/5spider-girl/index.js
UTF-8
1,834
2.8125
3
[]
no_license
/** * ไธ‹่ฝฝ็™พๅบฆ็š„็พŽๅฅณๅ›พ็‰‡ * 1.nodejsๅฏไปฅๆจกๆ‹Ÿๅ‘้€http่ฏทๆฑ‚ * 2.ไธ‹่ฝฝๆ–‡ไปถ * 3. * 3.ๆŠŠไธ‹่ฝฝๆ–‡ไปถ็š„ไบŒ่ฟ›ๅˆถๆ•ฐๆฎๅ†™ๅ…ฅๆœฌๅœฐ็ฃ็›˜ */ //ๅ‘้€http่ฏทๆฑ‚ๅŒ… const https = require('https'); //ๅฟซ้€Ÿ่งฃๆžhtmlๆ–‡ๆœฌๅ†…ๅฎน,้€š่ฟ‡cheerio่Žทๅ–htmlไธญ็š„img็š„src const cheerio = require('cheerio'); const download = require('download'); const path = require('path'); const url = 'https://image.baidu.com/search/in...
true
78e69212ca869bda139f4799a0175cefbe118fc5
JavaScript
magnushorven/dndapp
/src/components/NpcBlock.js
UTF-8
2,758
2.515625
3
[]
no_license
import React, { useState } from 'react'; import './Block.css'; import LSButtons from './LSButtons'; import { ParseAbilityScoreAndModifier } from './../Util'; function ParseNpc (npcString) { var npcArray = /^(\w+\s?\w+?):\s(\w+)\s(\w{0,}-?\w{0,})\s(\w+),\s(\w+).\sStr\s(\d+),\sDex\s(\d+),\sCon\s(\d+),\sInt\s(\d+...
true
5d47478c6c8b9f77e05c2a84ef4f47193e1c0329
JavaScript
ShawnCarpenter/LAB-04a-refactor-calculator
/app.js
UTF-8
2,220
3.84375
4
[]
no_license
import { add, subtract, multiply, divide, getNumber } from './mathUtils.js'; const addButton = document.getElementById('addButton'); const subtractButton = document.getElementById('subtractButton'); const multiplyButton = document.getElementById('multiplyButton'); const divideButton = document.getElementById('divideBu...
true
ed037a1a3a69b20258bf30cef0918896c1281e45
JavaScript
prashant-mahanta/nodejs-course
/notes-node/playground/arrow-function.js
UTF-8
278
3.46875
3
[]
no_license
var person = { name: 'Prashant', sayHi: () => { console.log(arguments); console.log(`Hi ${this.name}`); }, sayHiAlt () { console.log(arguments); console.log(`Hi ${this.name}`); } }; person.sayHi(); person.sayHiAlt(); person.sayHi(1,2,3); person.sayHiAlt(1,2,3);
true
2962a3dbaf34e176ef24b64a324fd1dd1c19fa4d
JavaScript
EdvinasK/JS-Dev-Env
/JScripts/notes1-1.js
UTF-8
1,720
3.78125
4
[]
no_license
/* * This is a JavaScript Scratchpad. * * Enter some JavaScript, then Right Click or choose from the Execute Menu: * 1. Run to evaluate the selected text (Ctrl+R), * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or, * 3. Display to insert the result in a comment after the selection. (Ctrl+L) ...
true
c704be98ed47c44a637006c108be658da1b9f050
JavaScript
compute-io/kstest
/lib/smirnov.js
UTF-8
1,017
3
3
[ "MIT" ]
permissive
'use strict'; // MODULES // var binomcoefln = require( 'compute-binomcoefln' ), incrspace = require( 'compute-incrspace' ); // FUNCTIONS // var exp = Math.exp, floor = Math.floor, log = Math.log; /** * FUNCTION pKolmogorov1( d, n ) * Evaluates the CDF for the one-sided test statistics, i.e. * the maximum by wh...
true
60799de84b05656d07cf6b4480eb055fbab64a9e
JavaScript
vilislavivanov91/nodejs-express-exercises
/nodejs-web-server/handlers/home.js
UTF-8
533
2.5625
3
[]
no_license
const fs = require('fs') const homeHandler = (req, res) => { if (req.method === 'GET' && req.pathName === '/') { fs.readFile('./views/home.html', 'utf-8', (err, data) => { if (err) { res.writeHead(200, { 'content-type': 'text/plain' }) res.write('error') res.end() ...
true
dfccd6e07da67a5dde0dde36d94735bed88da7bf
JavaScript
thorrsson/markdeck
/index.js
UTF-8
1,864
2.796875
3
[ "MIT" ]
permissive
var marked = require('marked'); var _ = require('lodash'); var SECTION_REGEX = /^={2,}(=(?: .*)?)\n$/mgi var SUBSECTION_REGEX = /^-{2,}(-(?: .*)?)\n$/mgi var buildSlide = function(meta, source, parseSubsections) { if (parseSubsections) { var subsections = [meta].concat(source.split(SUBSECTION_REGEX)); if (...
true
45109ec068c11ff45e4d86abd16d94fdbd3ba635
JavaScript
longtc/minimal-react-app
/app/js/view/component/animation/LoadingIndicator.jsx
UTF-8
593
2.515625
3
[ "MIT" ]
permissive
const SIZE = 44; export function LoadingIndicator({ size = 40, thickness = 3.6, className = "", style = {}, }) { return ( <div className={className} style={Object.assign({ width: size, height: size, }, style)} > <svg className="loader" viewBox={...
true
fef7281a8ca661e4f6c8d07801e8741efdff5ae6
JavaScript
sihyeonn/Sunday
/JS/07_NodeModules/04.fs.js
UTF-8
263
2.84375
3
[]
no_license
const fs = require('fs'); let str = 'I am the best one.'; let file = './readme.txt' // fs.writeFile('./readme.txt', str, err => console.log( err ? err : 'Saved.' ) ); fs.writeFileSync(file, str); let result = fs.readFileSync(file, 'utf8'); console.log(result);
true
f1b47958e557d955c4de1e51b5c2282dccc3e199
JavaScript
jamiehale/farkle-scorecard
/src/state/reducer.js
UTF-8
2,504
2.5625
3
[]
no_license
import * as R from 'ramda'; import * as actionTypes from './action-types'; const initialTurn = { playerId: 0, total: 0, }; const newPlayer = name => ({ name, isOpen: false, rounds: [], }); export const initialState = { mode: 'setup', rules: { minimumPlayerCount: 2, triggerScore: 10000, poin...
true
c952aa0a3f3cbbde2641ce22e7b5f9f5fcdc65fa
JavaScript
chimobi-justice/dev.to_clone
/assets/public/js/post.js
UTF-8
942
2.734375
3
[]
no_license
const postContainer = document.getElementById('postContainer'); const handlePosts = async () => { const res = await fetch('data/post.json'); const data = await res.json(); let allpost = data.map(post => ` <div class="card card-body mb-0 bg-white"> <div class="text-dark pl-2 pt-3 topPo...
true
622abdeb4c9561f41b2ab31d843951013726502b
JavaScript
sahil-kamleshwar/source
/scope-basics.js
UTF-8
177
2.5625
3
[]
no_license
let a='first'; function scopeTest(){ console.log(a); } scopeTest(); //scopetest-a function that defines scope for variables declared using var,let and const.
true
feca60413240e465164f0a7fac8e17251ac4aae3
JavaScript
arhamymr/cbt
/js/bck-cari.js
UTF-8
4,748
2.6875
3
[]
no_license
var host="http://localhost/gema/php/"; //Menampilkan peta pertama kali function initialize() { lat=-7.558672; longi=110.76821 var mapProp = { center:new google.maps.LatLng(lat,longi), zoom:17, mapTypeId:google.maps.MapTypeId.ROADMAP }; //Membuat peta var map=new google.maps.Map(document.getElementById("goo...
true
1d6726b785002aa503b5c7b2091027eaff6130de
JavaScript
bonyiii/3dgame_programing
/stars.js
UTF-8
2,121
3.328125
3
[]
no_license
// The "scene" is where stuff in our game will happen: var scene = new THREE.Scene(); var flat = {flatShading: true}; var light = new THREE.AmbientLight('white', 0.8); scene.add(light); // The "camera" is what sees the stuff: var aspectRatio = window.innerWidth / window.innerHeight; var camera = new THREE.PerspectiveC...
true
72a983c32a2812500edec0ea656bf82903df7141
JavaScript
oolushola/Banka
/UI/staff/javascripts/staff-suspend-account.js
UTF-8
1,147
2.984375
3
[ "MIT" ]
permissive
// Validate all required fields before // posting to the server window.onload = function(){ let customer_id = document.getElementById('customer_id'); let suspendAccountBtn = document.getElementById('suspendAccount'); suspendAccountBtn.onclick = (event)=>{ event.preventDefault(); validateSu...
true
1e1d498f0cf6697e1484752c3444afb00f314782
JavaScript
Lucas-Lameira/SimpleTrivia.js
/index.jquery.js
UTF-8
1,914
2.90625
3
[ "MIT" ]
permissive
/* eslint-disable no-undef */ let score = 0 let trival = {} const colors = { green: '#32d296', red: '#f0506e' } const apiBase = 'https://opentdb.com/api.php?amount=1&type=multiple' const showQuestion = () => { $('#app')[0].hidden = false const questions = [...trival.incorrect_answers, trival.correct_answer].sort...
true
826c5da765b5e284611ad45a99632eeb353bd13d
JavaScript
JeremyBRD/FAQ-accordion-card
/src/index.js
UTF-8
1,217
2.6875
3
[ "MIT" ]
permissive
// Test import of a JavaScript function import { toggleActive } from './js/accordion.js' // Import of styles import './styles/index.scss' // Importing images import illustrationBoxDesktop from './images/illustration-box-desktop.svg' import illustrationWomanOnlineDesktop from './images/illustration-woman-online-deskto...
true
e3f94b82f0bc85ae3c16b13926ba4ad7b7f2fe22
JavaScript
jaamiem/CM2104-CW
/Coursework/public/scripts/findspot.js
UTF-8
4,629
3.046875
3
[]
no_license
// Creates a new map, centres it on Aberdeen and places it in the element with the ID 'map' var service; // For pop-ups which emerge from the markers when they are clicked by the user var infoWindow; // Initialise the map from Aberdeen function initMap() { var abz = new google.maps.LatLng(57.1497, -2.0943); retur...
true
113c33d5374708655baae7f544c33fded3e52af5
JavaScript
alecxisanchez/LearningBox
/public/assets/js/componenteArchivo.js
UTF-8
3,197
2.515625
3
[ "MIT" ]
permissive
//----------Manejo de archivos var idattached = 2; let $form = $('.box'); let droppedFiles = false; var dFiles = []; $(document).ready( function() { $('#file').on( 'change', function( e ) { loadFiles( e.target.files ); }); $form.on('drag dragstart dragend dragover dragenter dragleave drop', funct...
true
9b9135e113c294d38f94677589a1ad1c0825b9be
JavaScript
AlexMachin1997/TheOpenMovieDB-React-Example
/src/components/Core/Listbox/ListboxDisplayValues.jsx
UTF-8
3,796
2.90625
3
[ "MIT" ]
permissive
import * as React from 'react'; import PropTypes from 'prop-types'; import Icon from '../Icon/Icon'; const ListboxDisplayValues = ({ value, isMulti, onChange, displayLimit, showMultiDeleteButton, options, displayName }) => { const onDeleteItem = (event, el) => { if (onChange) { // Prevent event from bubb...
true
67bf239a0c19e7179ea8cb2d311fd7f498a42dc1
JavaScript
DanielAraujoSouza/pontu-module
/test/exemple_assync.js
UTF-8
2,114
2.765625
3
[]
no_license
const pontu = require('../lib/binding.js') // Configuraรงรตes do ICP const th = 0.000001 // Critรฉrios de parada (erro) const k = 10 // Nรบmero mรกximo de iteraรงรตes const max_dist = 4000 // Distรขncia mรกxima entre pontos const closestType = 'bf' // Algorimo de pareamento console.log('Carregando nuvens...') const srcPromise...
true
acf1260133a3cb1743073e1d27077d3e04a6ce51
JavaScript
chenchienhao/Menu_PIA
/app/controllers/memorice.js
UTF-8
13,982
2.515625
3
[ "Apache-2.0" ]
permissive
var win = Ti.UI.createWindow({ backgroundColor:'white', height: '100%', width: '100%', fullscreen: true, exitOnClose: true }); var sonido = Ti.Media.createSound({url:"/images/encabezados/memorice.m4a"}); var encabezado = Ti.UI.createImageView({ image: '/images/encabezados/memorice.png', top: '2%', left: '...
true
024cf8928836293d2e235d4b9aa551d044cade71
JavaScript
minhchau2511/website
/js/app.js
UTF-8
2,994
2.53125
3
[]
no_license
$(document).ready(function(){ $(".num-order").change(function(){ // cแบญp nhแบญt thแบฑng nร o lแบฅy id cแปงa th ฤ‘รณ cแบญp nhแบญt var id = $(this).attr('data-id');//lแบฅy phฦฐฦกng thแปฉc val thรฌ chแป‰ lแบฅy khi lร m viแป‡c trong form var qty =$(this).val();//nhแปฏng phแบงn lร m viแป‡c vแป›i html bรฌnh thฦฐแปn thรฌ lร m viแป‡c vแป›i pt...
true
4092d6880575e28b9a80d2c8f33535bd87079ffb
JavaScript
Rohan175/ecoTransportEditor
/src/canvas/model/Frame.js
UTF-8
1,475
2.53125
3
[ "BSD-3-Clause" ]
permissive
import Backbone from 'backbone'; export default Backbone.Model.extend({ defaults: { wrapper: '', width: '', height: '', head: '', attributes: {} }, initialize() { this.set('head', []); }, getHead() { return [...this.get('head')]; }, setHead(value) { return this.set('hea...
true
f016a42611937290021c8006f9f65e5aae7f6a36
JavaScript
eternalsakura/DIE-corpus
/firefox/jit-test/baseline/try-finally-2.js
UTF-8
503
3.140625
3
[]
no_license
var count = 0; function f() { try { try { try { count += 2; } finally { count += 3; throw 3; } } catch (e) { count += 4; throw 4; } } finally { count += 5; try { count += 6; } catch (e) { count += 7; throw 123; } f...
true
6750710eb0e0506a97607ac2d8620a627c9449c1
JavaScript
eoinwoods/TeachYsJs
/solutions/requirejs-utest/classestests.js
UTF-8
2,684
3.25
3
[ "Apache-2.0" ]
permissive
define([], function () { var Counter = function (initial) { if (!(this instanceof Counter)) { return new Counter(initial); } this._value = initial; this.inc = function() { this._value++; }, this.value = function() { return...
true
4926c6063e63747270bca27b36d959e4910fc196
JavaScript
GrantJenk/ShieldBattery
/server/lib/matchmaking/matchmaker.js
UTF-8
5,696
2.921875
3
[ "MIT" ]
permissive
import { OrderedMap, Record, Set } from 'immutable' import IntervalTree from 'node-interval-tree' export const Interval = new Record({ low: 0, high: 0, }) function findClosestRating(rating, overlappingPlayers) { let current = overlappingPlayers[0].rating let diff = Math.abs(rating - current) for (let i = 0...
true
0518fa37ff4d5d1f420b46984619583c8c74c478
JavaScript
brujoh88/Eloquent-Js
/cap5/2YourOwnLoop.js
UTF-8
190
3.078125
3
[]
no_license
function loop(value, funcTest, funcActua, funcBody) { for (let i = value; funcTest(i); i = funcActua(i)) { funcBody(i) } } loop( 3, (n) => n > 0, (n) => n - 1, console.log )
true
1e83e99e956f936197ca65a612b6d2164a8dc173
JavaScript
laowei321/color2
/miniprogram/js/ball/topball.js
UTF-8
1,372
2.625
3
[]
no_license
import Sprite from '../base/sprite.js' import DataBus from '../databus' let databus = new DataBus() const wjj = databus.wjj; const BALL_IMG_ARRAY = ['', 'images/' + wjj + '/1.png', 'images/' + wjj + '/2.png', 'images/' + wjj + '/3.png', 'images/' + wjj + '/4.png', 'images/' + wjj + '/5.png', 'images/' + wjj + '/6.png'...
true
f3f2428464940dcf1544ac223f6eed65dc1581f2
JavaScript
Kush9182/c-33-debugging
/sketch.js
UTF-8
3,029
2.921875
3
[]
no_license
//numeric var a=19; console.log(a); //string var b="123"; console.log(b); //boolean var c = true; console.log(c); //undefined var d; console.log(d); //null var e = null; console.log(e); //array arr = [2,"abc",true,235,"plm"]; console.log(arr); console.log(arr.length); console.log(arr[1]);...
true
3092a18341363adee658248dfeeb15bd9bbe6117
JavaScript
ldong/github_issues_viewer
/code/views/header.jsx
UTF-8
3,310
2.578125
3
[]
no_license
import React, {Component, PropTypes} from 'react'; export default class Header extends React.Component { static propTypes = { repoNameChange: PropTypes.func.isRequired, onStateChange: PropTypes.func.isRequired }; constructor(props) { super(props); this.state = {issueState: this.props.issueState}...
true
16275dc8d21019fdbe4c2d2d009d1aa03fa2777b
JavaScript
gsc-gsj-aist/3Dviewer3js
/js/project/initialize.js
UTF-8
80,989
2.53125
3
[ "BSD-3-Clause", "MIT" ]
permissive
//**************************************************************************************************** //ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณๅค‰ๆ•ฐ //**************************************************************************************************** var app = {}; //------------------------------------------------------------ //three.js้–ข้€ฃ app.three ...
true
fe93bff9588cadce66e15b3dcc3fddce6f58fd94
JavaScript
mazzur/js-talks-webcomponents
/components/componentInheritance/componentInheritance.js
UTF-8
528
2.515625
3
[]
no_license
(function() { var MBProto = Object.create(HTMLButtonElement.prototype, { createdCallback: { value: function() { this.innerHTML += '<b>Inheritance</b>'; this.addEventListener('click', function() { alert('Tracked click'); }); ...
true
78d09e31e31dc4a8382ccc737db3aaa7f3647e3d
JavaScript
lukillo/ARQUITECTURA-WEB
/src/server/controller/mechanicalComponents.js
UTF-8
5,926
2.6875
3
[]
no_license
const assert = require('assert'); const createError = require('http-errors'); const { create, read, update, deleteItem, readAll } = require('../../services/mechanicalComponents'); /** * @api {post} /addComponent * @apiGroup mechanical-components * @apiVersion 1.0.0 * @apiSuccessExample {json} 201:OK * { * "id"...
true
6e4997445b0995ecd6ba87515dc7492c39697bd3
JavaScript
un44444444/lss.messages
/component-common-service/component/localstorage.service.js
UTF-8
1,596
3.1875
3
[]
no_license
/** * Created by ้ป„ๅฟ ๅ›ญ on 2017/11/28. */ angular.module('service.localstorage', []) .service("LocalstorageService",LocalstorageService) LocalstorageService.$inject = []; function LocalstorageService() { //ๅญ˜ๅ‚จๆ•ฐๆฎ this.setItem = function (name,val) { return localStorage.setItem(name,val); } //่ฏป...
true
b8c5e3806b0ccefd51a1c4809c84ab7e64fc1557
JavaScript
tyeonn/conbrite
/frontend/components/event/event_index.jsx
UTF-8
1,129
2.5625
3
[]
no_license
import React from "react"; import IndexSlider from "./index_slideshow"; import EventIndexItem from "./event_index_item"; class EventIndex extends React.Component { constructor(props) { super(props); this.compareDate = this.compareDate.bind(this); this.sortByDate = this.sortByDate.bind(this); } compo...
true
d8be765019849c72eb921ff843e88ec71ff53bef
JavaScript
dthuytram/BTBao
/Module 1/9. Cแบฅu trรบc ฤ‘iแปu kiแป‡n 2/Bร i tแบญp/Game puzzle/js/puzzleGame.js
UTF-8
1,779
2.65625
3
[]
no_license
function changeImgA() { let imgA = document.getElementById("imgA"); if (imgA.src == "http://127.0.0.1:5500/Game%20puzzle/Images/Hinh1a.png") { imgA.src = "Images/Hinh2a.png"; } else if ( imgA.src == "http://127.0.0.1:5500/Game%20puzzle/Images/Hinh2a.png" ) { imgA.src = "Images/Hinh3a.png"; } else...
true
ef93693733d949cf2aacc4aa7bae0a8cbb7ae964
JavaScript
rajeshmylsamy/javascript
/function.js
UTF-8
460
3.78125
4
[]
no_license
var name = "Allan"; printHello1(name); function printHello1(a) { console.log("Hi " + a); } printHello2(name, "A", "Brown"); //Hi Allan|A|Brown function printHello2(a, b, c) { console.log("Hi " + a + "|" + b + "|" + c); } printHello2(name, "A"); //Hi Allan|A|undefined function printHello4(a) { return "print ret "...
true
d32619c707bfb73fb2f3c1a5fc7fcbac71b6a62a
JavaScript
myuanyuan/note
/66.js
UTF-8
1,333
3.453125
3
[]
no_license
// Function.prototype.bind2 = function (context) { // if (typeof this !== 'function') { // throw Error('') // } // let self = this; // ่ขซ็ปงๆ‰ฟ็š„fn // let Temp = function () { }; // let args = Array.prototype.slice.call(arguments, 1); // let newFn = function () { // let bindArgs = Array.prototype.slice.ca...
true
616ee076080f46d8e72732189cbfc29f90c088fc
JavaScript
KeithBender/techtest
/form/main.js
UTF-8
753
3.03125
3
[]
no_license
let form = document.querySelector('.form'); let formInput = document.querySelectorAll(".form-input"); document.addEventListener("DOMContentLoaded", function() { formInput.forEach(function(input) { //clear on page reload or Document load input.className = input.className.replace(/form-input-error ?/, ""...
true
8206e69e831b5f5c4eb73e7f82922f3e75cf39fe
JavaScript
ktmock13/ProgrammingPractice
/JavaScript/FindPeak.js
UTF-8
651
3.5
4
[]
no_license
/** * @param {number[]} A * @return {number} */ var peakIndexInMountainArray = function(A) { // var highestPeakIndex = 1; // var i = 1; // var isAPeak = function (seq) { // return seq[0] < seq[1] && seq[1] > seq[2]; // }; // //the first potential peak will be at least index 1, and at most...
true
d4ce634e6d485cba7aedc47d362800f5e7395375
JavaScript
Lainweeb/repositorio
/cep/js/cep.js
UTF-8
1,055
3.15625
3
[]
no_license
let botaoBuscar = document.querySelector("button"); botaoBuscar.addEventListener("click", function(){ let cep = document.querySelector("#buscaCep").value; if(cep == ""){ return false; } let api = `http://viacep.com.br/ws/${cep}/json`; let request = new XMLHttpRequest(); request.open("GET", api); request.onlo...
true
146cec3eb1d274a5226115263c4dcd6bbbc66b21
JavaScript
AfterHoursGameDev/Innerspace
/AHGDProject/assets/Scripts/Alien.js
UTF-8
5,289
2.59375
3
[ "MIT" ]
permissive
// Learn cc.Class: // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html // - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/class.html // Learn Attribute: // - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html // - [English] http://www.cocos2d...
true
08dff050a4bf02788949593008dd073bb67e2c32
JavaScript
dminster/Loop-inside-React-JSX
/.js
UTF-8
985
4.0625
4
[]
no_license
Think of it like you're just calling JavaScript functions. You can't use a for loop where the arguments to a function call would go: return tbody( for (var i = 0; i < numrows; i++) { ObjectRow() } ) See how the function tbody is being passed a for loop as an argument โ€“ leading to a syntax error. But ...
true
8edc420638b192823d0e25ad1b35364a646d5ff1
JavaScript
Ortiz99/NodeJS_API
/controllers/StudentController.js
UTF-8
3,424
2.734375
3
[]
no_license
const User = require('../models/Student'); function create(req, res) { var user = new User(); var params = req.body; user.name = params.name; user.lastname = params.lastname; user.age = params.age; user.email = params.email; user.address = params.address; user.phone = params.phone; ...
true
3671466caeb823653de2f535b1958ee0527e88ac
JavaScript
Shazib/SubdivisionJS
/scripts/mesh/vertex.js
UTF-8
1,324
3.25
3
[]
no_license
/** * vertex.js * SubdivisionJS * * Created by shazib hussain on 07/06/2015 * copyright (c) 2015 Shazib Hussain * * This class represents a vertex in a 3D mesh. * The vertex stores vector location and adjacent edge/face lists */ // Load dependancies define ("vertex",["vector"], function(Vector) { "use stric...
true
63253b6c5e57a0585ed40e6bd1da166a23606c21
JavaScript
aminkrJ/permission-geometry
/src/space.js
UTF-8
1,989
2.640625
3
[]
no_license
import { AoTree } from "./aotree"; import { Dimension } from "./dimension"; import lodash from "lodash"; function Space() { this.dimensions = new dimensions(); } Space.prototype.concat = function(operator, space) { const cPoints = this.points(); const nPoints = space.points(); if (operator === "or") { retu...
true