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
603a3f5865b1fe557e874db1a347c55e041d9020
JavaScript
Nigh7Sh4de/PlayCanvasExperiments
/Experiments/TargetCube/scripts/shoot.js
UTF-8
2,059
2.5625
3
[]
no_license
pc.script.create("shoot", function (context) { var shootScript = function (entity) { this.entity = entity; context.mouse.on(pc.input.EVENT_MOUSEDOWN, this.onMouseDown, this); }; shootScript.prototype = { initialize: function () { }, update: function (dt) { ...
true
e5916e3cc0c8337aa4e9fe660469b327be3db4a5
JavaScript
patrickxrivera/newsletter-manager
/server/app/services/helpers/addTo.js
UTF-8
735
2.671875
3
[]
no_license
const Gmail = require('../gmailAPI'); const addToHashMap = (hashMap) => ([{ value }]) => { const email = extractEmail(value); if (isInvalid(email)) return; const newsletterName = value.split('<')[0].trim(); hashMap.set(newsletterName, email); }; const extractEmail = (value) => { const regExp = /\<([^)]+)...
true
32a460a180750f2991c77214bd4e710b308f2800
JavaScript
Timetime0/Nguyen-nhu-hoang-Tan-b3-js
/js/index.js
UTF-8
2,620
3.59375
4
[]
no_license
/** Author: Nguyen Nhu Hoang Tan Release: 25/01 Function: Bai tạp b10-js */ // Bai 1 // Input // Luong 1 ngay = 100.000; // Nhap so ngay lam // Code function TinhLuong(){ var day = document.getElementById("day").value; var salary = day*100000; // Nhân chia = > number var output1 = document.getElemen...
true
73633d21bbec1264a9c6b1c1a0c50a6c1080a813
JavaScript
mulgey/userAuth
/models/user.js
UTF-8
2,820
2.75
3
[]
no_license
// Giriş bölümü var mongoose = require('mongoose'); var Schema = mongoose.Schema; // bcryptjs zamanı var bcryptjs = require('bcryptjs'); // bcrypt sürüm problemleri nedeniyle olmadı ve vakit kaybetmeden bcryptjs e geçiş yaptık // Çizelge bölümü var userSchema = new Schema({ email: { type: String, ...
true
bf430096bf9ab4395ba72e35b54837bd25bc919c
JavaScript
raphaelSeguin/interactive-form
/js/script.js
UTF-8
12,926
2.828125
3
[]
no_license
'use strict'; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Query elements // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // form element const formElement = document.getElementsByTagName('form')[0]; // name and email const nam...
true
fd3db0b94f739c8a3b4c62e316870a6f24bcdefa
JavaScript
SanthiAP/html-kt
/flex/index.js
UTF-8
840
2.859375
3
[]
no_license
$(document).ready(function() { $(".dropdown").select2(); $("#flexDirection").change(function() { setFlexProp() }); $("#justifyContent").change(function() { setFlexProp(); }); function setFlexProp() { var flexdir = $("#flexDirection").val(); var justCont = $("#justifyContent").val(); ...
true
c935440e74c423591a62ad1b33a6a6b2a817bd98
JavaScript
Timwestberg/CLI-Word-Guess
/index.js
UTF-8
1,600
3.421875
3
[]
no_license
let Word = require("./word"); let inquirer = require("inquirer") let Hangman = function () { this.wordbank = ["Naurto","Magi","DeathNote", "Sinbad", "FairyTail", "Pokemon", "Bleach","Fate"]; this.random = Math.floor(Math.random() * this.wordbank.length); this.selectedWord = this.wordbank[this.random]...
true
cf506c3129c007a844b15a2d004bc70661eed0e6
JavaScript
deepak07031999/try
/bascis/script.js
UTF-8
551
2.765625
3
[]
no_license
process.argv.forEach(function (num) { var count=+(num); for(var i=1;i<count+1;i++) { var output=""; if(i%3==0) { if(i%5==0) { output="fizz-buzz"; } else{output="fizz";} ...
true
31d7be5b0b1129a444cb45b3f5f49d4ca42a3f71
JavaScript
jessijoke/pokemonsimulator
/app/javascript/packs/pokemonmenu.js
UTF-8
344
2.515625
3
[]
no_license
const menuButton = document.getElementById("pokemon_manager_mobile"); const navLinks = document.getElementById("pokemon_manager_largescreens"); menuButton.addEventListener('click', () => { if (navLinks.style.display == "none" ) { navLinks.style.display = "flex"; } else { navLinks.style.displa...
true
1d77aad11a25ae03f4809452976c7f4d6ae4b3a0
JavaScript
agrc/templater
/src/App.jsx
UTF-8
6,070
2.546875
3
[]
no_license
import handlebars from 'handlebars'; import { kebabCase } from 'lodash'; import { useState } from 'react'; import CopyToClipboard from 'react-copy-to-clipboard'; import useLocalStorage from './useLocalStorage'; import postTemplate from './_post.md?raw'; const categories = ['Featured', 'Developer', 'SGID Blog', 'GPS-su...
true
903ca0c90fd34062c8c1c5357c489ac933ca8885
JavaScript
clburdette/BurdetteCurtis_CIS14a_42098
/Proj/tic-tac-toe/controller.js
UTF-8
6,196
2.8125
3
[]
no_license
var stats = { difficultyLevel : 0, playerOneScore : 0, playerTwoScore : 0, drawScore : 0, numberOfPlayers : 1, playerOneTurn : true, playerOneFirst : true }; var controller = { computerMove : function () { if(!stats.playerOneFirst) { model.goFirstAdjust(); } model.difficult...
true
f08df695e6a474bbbabcee1560c73dc5f94d184b
JavaScript
Greenie62/drivingdistancemap
/cloud.js
UTF-8
1,521
3.421875
3
[]
no_license
var inputContainer = document.querySelector(".inputContainer") function generateClouds(){ let puffOne=document.createElement("div") puffOne.className="cloudone" let puffTwo=document.createElement("div") puffTwo.className="cloudtwo" let puffThree=document.createElement("div") puffThree.classNam...
true
e8de362f038e8c8976e3427e906e98e89eb8be30
JavaScript
git-morimori/creating_api_with_express_and_postgresql
/test/app/api/todos/deleteTodo.test.js
UTF-8
2,644
2.875
3
[]
no_license
const helper = require('../../../helper/requestHelper'); const { Todo, sequelize } = require('../../../../src/db/models'); const assert = require('power-assert'); describe('test DELETE api/todos', () => { //テーブルのデータを取得するメソッドの定義 const getTodos = async () => { const response = await helper.request({ method...
true
fb7ab5a92a8bb4f2a555b2f0091f6d04a3cc13a5
JavaScript
dana11235/caltrain
/popup.js
UTF-8
2,258
3.015625
3
[ "MIT" ]
permissive
var Popup = { updateDirection: function() { var direction = _directionEl.val(); console.log('setting direction: ' + direction); chrome.storage.local.set({'direction': direction}); Popup.updateStations(direction); chrome.storage.local.get(direction, function(response) { if (response[direction...
true
88b20f461e26b6011217d2c4c65e12b11113d857
JavaScript
V-Uzunov/Soft-Uni-Education
/12.JSAdvanced/06.UnitTestingWithMocha/test/AddSubtract.js
UTF-8
2,399
3.21875
3
[ "MIT" ]
permissive
let createCalculator = require('../07.AddSubtract').createCalculator; let expect = require('chai').expect; describe("Calculator tests", function () { let calculator; beforeEach(function () { calculator = createCalculator(); }); describe('Test return value', function () { it('Expect ca...
true
6f137ae7fe32c1b4b75a87489a9164e8ab32f5b7
JavaScript
Puchok-93/1155397-keksobooking-19
/js/filter.js
UTF-8
2,283
2.875
3
[]
no_license
'use strict'; (function () { var filtersBlock = document.querySelector('.map__filters'); var featureItems = filtersBlock.querySelectorAll('input[type=checkbox]'); var priceValues = { 'low': { min: 0, max: 10000 }, 'middle': { min: 10000, max: 50000 }, 'high': { ...
true
24e8f9308e553d9abc6faf85ab4ec610e442d986
JavaScript
NaamaDayan/CarpoolApp
/CarpoolClient/src/Presentation/screens/Register/Components/CircleDays.js
UTF-8
1,827
2.578125
3
[]
no_license
import React, { useState, Component } from 'react'; import { View, Text, FlatList, TouchableOpacity } from 'react-native' import { globalStyles, texts, colors } from '../../../styles'; export default class CircleDays extends Component { // function dayHandler = (key) => { // var newDays = this.state.days....
true
e1e097b627c9f75d84159f70463b06488177de07
JavaScript
BosenY/blog-created-next
/store/CountStore.js
UTF-8
788
2.6875
3
[ "MIT" ]
permissive
import {observable, computed, action, autorun} from 'mobx' class CountStore { @observable count = 1 @observable list = [] constructor(count = 11) { this.count = count this.test() } @computed get aaa() { return this.count * this.count } @action AddCount = () => ...
true
4d884051deb17d05e74a968d2a6538b0fc1d1064
JavaScript
karpicke/Span-Tasks
/plugins/pcllab-core/src/handlers/inputHandler.js
UTF-8
979
2.609375
3
[]
no_license
class InputHandler { constructor(nextButton) { this.$nextButton = nextButton } checkInputs() { if (!this.$nextButton) return let isValid = true $('input[type=text]:not(.pcllab-hp-input), textarea:not(.pcllab-hp-input)').each(function () { const $input = $(this) ...
true
13ea92b8af3f79d55c106ff03f947d1c7aa7fbb2
JavaScript
diego44orio/proyecto-01
/seccion-4 .2/app.js
UTF-8
610
4.5625
5
[]
no_license
/* Cree un algoritmo que permita determinar la calificacion en letras de un alumno Si la nota se encuentra entre 100 a 90 = A Si la nota se encuentra entre 80 a 89 = B Si la nota se encuentra entre 70 a 79 = C Si la nota se encuentra entre 60 y 69 = D Si la nota es inferior a 60 = F */ let nota = 78; let notaletra ...
true
7e3aed1bfe28840be87227dfea6c05e3c630e328
JavaScript
JSLibraryDirectory/webiny-js
/packages-api/webiny-api-security/src/entities/index.js
UTF-8
3,885
2.5625
3
[ "MIT" ]
permissive
// @flow import { Entity } from "webiny-api"; import { Model } from "webiny-model"; import type { EntityCollection } from "webiny-entity"; import type { IAuthorizable } from "../../types"; /** * Identity class is the base class for all identity classes. * It is used to create your API user classes. * * @property ...
true
a1db90d9e92dc8df8b9f5c62f064b590f1331cd8
JavaScript
ThuanyMendonca/back-end
/app/models/Cidade.js
UTF-8
402
2.796875
3
[]
no_license
//Cria variavel para importar o mongoose var mongoose = require('mongoose'); //Criar schema usando uma variavel recebendo o mongoose var cidadeSchema = new mongoose.Schema({ cidade: { type: String, required: true }, estado: { type: String, required: true } }); //Expor...
true
75f7562f8b2785a5596c86e198c1b463e849d4b6
JavaScript
eXo5/flashcards
/ClozeCard.js
UTF-8
745
2.75
3
[]
no_license
var fs = require("fs"); //var clozedCards = require("ClozeCard.JSON"); var ClozeCard = function(text, cloze) { this.text = text; this.partial = cloze; this.partialArr = cloze.split(""); this.clozeArr = []; this.fillCloze = function (){ for (var i = 0; i < this.partialArr.length; i++ ){ if (this.partialArr[i] ...
true
b7b8376f5e71d6ff3113ac135a935d2aafd2ed25
JavaScript
ajbertra91/fcc-solutions
/algorithms_intermediate/diffTwoArrays.js
UTF-8
381
3.40625
3
[]
no_license
function diff(arr1, arr2) { var reducedArr1 = []; var reducedArr2 = []; reducedArr1 = arr1.reduce(function(a,b) { return arr2.indexOf(b) === -1 ? a.concat(b) : a; },[]); reducedArr2 = arr2.reduce(function(a, b) { return arr1.indexOf(b) === -1 ? a.concat(b) : a; },[]); return reducedArr2...
true
98d6aa7b7682386989a56a7dd179267e74dba70c
JavaScript
Uvacoder/passing-piggy
/src/Components/Modals/TheEnd/TheEnd.js
UTF-8
678
2.59375
3
[]
no_license
import React from 'react'; class NewPlayer extends React.Component { handleKeyDown = (e) => { if (e.keyCode === 27) this.props.toggleModal(e, 'theEndModal'); } handleToggle = (e) => { this.props.toggleModal(e, 'theEndModal'); } handleSubmit = (e) => { this.props.toggleModal(...
true
f1ef159d0c23ce93603434606a653db97b79bf10
JavaScript
drumfiend21/FOR-INTERVIEWERS
/Front-End-Quiz-Game/js/index.js
UTF-8
3,684
3.140625
3
[ "MIT" ]
permissive
var init = false; var current = 0; var progress = 0; var answeredCorrectly = 0; var countries = [ "United States", "Angola", "Argentina", "Sierra Leone", "Dominican Republic" ]; var countryId = [ "united-states", "angola", "argentina", "sierra-leone", "dominican-republic" ]; var answers = [ [ ...
true
8ac3686c2e5e20c78c48edee97d581c915b75a5b
JavaScript
eitanlees/rune.js
/src/utils.js
UTF-8
1,739
2.671875
3
[ "MIT" ]
permissive
var Utils = { isBrowser: function() { return typeof window !== 'undefined'; }, // function to turn any non-string into a string. We need // this when running server-side node. s: function(val) { if (typeof val !== 'string' && typeof val.toString !== 'undefined') return val.toString(); retur...
true
30395ceec931f4fa0149d65f152094dbc776767a
JavaScript
rnavas81/Mamas2.0
/js/examenFormulario.js
UTF-8
8,008
3.109375
3
[]
no_license
/* * @author Rodrigo Navas * Contiene las funciones necesarias para crear/modificar el formulario de preguntas de un examen * */ /** * Recupera los datos del examen * Valida los datos * @returns Object * state devuelve el estado de validación * data devuelve los datos del examen * errores devuelve los ...
true
083e300bd7e5f2936a90727e6a06b809d2f3a531
JavaScript
thygon/al-api
/resources/assets/js/App/helpers/index.js
UTF-8
988
2.734375
3
[ "MIT" ]
permissive
import decode from 'jwt-decode'; export const store =(key,value)=>{ localStorage.setItem(key,value); } export const get = (key) =>{ return localStorage.getItem(key); } export const remove =(key) =>{ localStorage.removeItem(key); } export const user =() =>{ return JSON.parse(get('user')); } function i...
true
72932aa486d9a9809f948a35676bc1e0d951dcb0
JavaScript
JSCRRS/Petition
/public/script.js
UTF-8
1,114
3.140625
3
[ "MIT" ]
permissive
const canvas = document.getElementById("canvas"); const input = document.getElementById("signature"); const ctx = canvas.getContext("2d"); let coord = { x: 0, y: 0 }; document.addEventListener("mousedown", start); document.addEventListener("mouseup", stop); window.addEventListener("resize", resize); resize...
true
422f5b4a096580214186113f8d9843240f22119e
JavaScript
adrianosmond/adventofcode
/2022/day19.js
UTF-8
5,061
2.875
3
[]
no_license
import { readInput } from '../utils/functions.js'; import { product } from '../utils/reducers.js'; const input = readInput(); const blueprints = input .split('\n') .map((line) => Object.fromEntries( Object.entries( line.match( /Blueprint \d+: Each ore robot costs (?<ore>\d+) ore. Each ...
true
4a0b30a385ed7fca0a158c00ab4fee2d4b5d638a
JavaScript
thecodeduck/icosagon
/src/js/models/shuffle.js
UTF-8
538
3.265625
3
[ "MIT" ]
permissive
export const DEALER_LIBRARY = [ 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, ]; export const PLAYER_LIBRARY = [ 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, ]; // Fisher-Yates shuffle export function shuffle(arr) { const a = a...
true
f48f48fe98a81c14f64e180101bcab1e64c5b39f
JavaScript
T-web-Exponent-services/todowebapp
/routes/lists.js
UTF-8
1,551
2.515625
3
[]
no_license
const {List, validate} = require('../models/list'); const mongoose = require('mongoose'); const express = require('express'); const router = express.Router(); router.get('/', async (req,res) =>{ const lists= await List.find(); res.send(lists); }); router.post('/',async (req, res) => { const...
true
0f09668b8aaf8e2b9ac8676111ea51da8afb6ee3
JavaScript
1039289948/vue-management
/vue-manager/src/api/utils.js
UTF-8
6,088
2.609375
3
[]
no_license
/** * Created by Jimmy on 2017/6/22. */ if (window.Promise) { console.log('浏览器支持Promise'); Promise.prototype.finally = function (fn) { function finFn(valueORreason) { fn.call(null) } this.then(finFn, finFn); return this }; } String.prototype.transSpace = function(){ return this.replace(...
true
19f9e85841cf774dff3c1ada5591bb2352e4790e
JavaScript
jgdigitaljedi/games-library
/libraryScripts/everDriveListFromGameFiles/util/readInFiles.js
UTF-8
1,054
2.625
3
[]
no_license
const fs = require('fs'); const path = require('path'); const chalk = require('chalk'); const _flatten = require('lodash/flatten'); module.exports.readIn = async (folderPath, subs) => { let subDirs = []; if (subs?.length) { subDirs = await Promise.all( subs.map(async dir => { try { retu...
true
15446b375a5290e7bc0cfba997bb4b2b0a473eca
JavaScript
richyang88/PetShops
/controllers/pets.js
UTF-8
4,444
2.890625
3
[]
no_license
/* Step 1 import express * */ const express = require('express') /* Step 2 * * Import the api files from the models * * TODO: change the file path to the models file you'll need to use. * TODO: rename this from `templateApi` to something more sensible (e.g: * `shopsAPI`) * * NOTE: You may need to import more...
true
d76b49def39b24f1ffafcf30898484ba5ec5b2ce
JavaScript
qlonik/wams.js
/lib2/client/JSON2HTML.js
UTF-8
4,034
3.03125
3
[]
no_license
var util = require('../util'); var DEFAULT_OPTS = { tag: 'tag', attr: 'attr', style: 'style', inner: 'inner' }; /* Objects that are accepted: { tag: String, attr: { id: String, class: String|[String, String, ...], style: String|[String, String, ...], custom: String|[String, S...
true
8fc9f6e5f5db9c1451621d0f6b258e0cb162586c
JavaScript
mery-kh/scorpio-app
/server/controller/movie.controller.js
UTF-8
3,143
2.546875
3
[]
no_license
const AppError = require('../managers/appError'); const Movie = require('../models/movie') const fs = require('fs').promises; const path = require('path'); class MovieController { async getAllMovies(req,res) { try{ let images = await Movie.find(); res.json({ data: im...
true
9a8eb1b34ee32f168d2dff0c423037a9fb512901
JavaScript
EJTH/touch-transform
/touch-transform.js
UTF-8
17,519
2.6875
3
[ "MIT" ]
permissive
/** * @license MIT (See LICENSE file) * @author Elias Toft Hansen * @see https://github.com/EJTH/touch-translate */ (function(){ var TouchTransform = function(){ // List of ongoing touches var ongoingTouches = []; // List of touches last animation tick. var lastTouches = []; ...
true
394558390ab366874e668adacee2018765a48684
JavaScript
rubeun/would-you-rather
/src/components/Leaderboard.js
UTF-8
1,938
2.796875
3
[]
no_license
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { FaAngleDoubleRight, FaAngleDoubleLeft } from 'react-icons/fa' class Leaderboard extends Component { questionsAsked = (user) => { return user.questions.length; } questionsAnswered = (user) => { return Object.key...
true
f64c256a9dc65864d57a4ee81e9cc73876d134f2
JavaScript
alexjg/pic-code-challenge
/assets/js/components/App.jsx
UTF-8
2,820
2.515625
3
[]
no_license
import React, {Component} from "react" import AppBar from "material-ui/lib/app-bar" import ChoiceCard from "./ChoiceCard" import { connect } from "react-redux" import update from "react-addons-update" import fetchAcceptanceProbability from "../actions/fetchAcceptanceProbability" import Probability from "./Probability" ...
true
aa03a1f2c95eef16feba07f0745269f965df8df2
JavaScript
kaeverens/telescope
/www/telescope.js
UTF-8
1,086
2.53125
3
[ "Unlicense" ]
permissive
$(()=>{ var t=0; function getUpdate() { $.post('get-updates.php', { t:t }, ret=>{ $('#azimuth-val').text((+ret.azimuth)+'°'); $('#altitude-val').text((+ret.altitude)+'°'); if (ret['image-time']!=t) { t=ret['image-time']; var $img=$('<img src="get-image.php?t='+t+'"/>'); $img.on('load', ()=...
true
946371dcd0ce0ba174d7891439efc3b239737e99
JavaScript
norv/EosAlpha
/Themes/default/scripts/profile.js
UTF-8
1,193
2.9375
3
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
var localTime = new Date(); function autoDetectTimeOffset(currentTime) { if (typeof(currentTime) != 'string') var serverTime = currentTime; else var serverTime = new Date(currentTime); // Something wrong? if (!localTime.getTime() || !serverTime.getTime()) return 0; // Get the difference between the two, se...
true
1ef434d5235d9a36d599db96ac5d2f3c6d84ee56
JavaScript
dongyingddd/node
/code/实操/02.insertMsg.js
UTF-8
1,193
3.703125
4
[ "Apache-2.0" ]
permissive
//向同级目录下的message.json的内容中插入一条记录 //文件模块 const fs = require('fs'); //路径模块 const path = require('path'); const DATA_FILE = "message.json" //操作的文件的绝对路径 let filepath = path.join(__dirname, DATA_FILE); /* * 获取留言 */ const getMsg = () => { //使用同步的方式读 let rs = fs.readFileSync(filepath, 'utf8'); //把json字符串=>js中的数...
true
97a6d06671e09cf5505fe325adde5b271de266f6
JavaScript
skabrock/hillel-js-pro
/lesson24/scripts.js
UTF-8
2,037
3.59375
4
[]
no_license
// const timer = setInterval(function () { // let test; // return function () { // const arr = new Array(1000).fill({ a: 1 }); // test = arr; // console.log(test); // }; // }, 2000); // clearInterval(timer); // const cdFn = function () { // // do smth // }; // let form = document.forms.test; /...
true
b980076f083076b3a4333b5d3ab019b00719bdd1
JavaScript
tjack94/node-1-afternoon
/server/controllers/messages_controller.js
UTF-8
977
2.953125
3
[]
no_license
var messages = [] var id = 0 module.exports={ create: ( req, res ) => { const { text, time } = req.body; messages.push({ id, text, time }); id++; res.status(200).send( messages ); }, read: (req, res) =>{ res.status(200).send(messages) }, update: ( req, res...
true
cedb6c5517387fc70b4dde69e9e272c0221ce80e
JavaScript
vanruesc/linear-octree
/test/core/KeyDesign.js
UTF-8
4,064
2.8125
3
[ "Zlib" ]
permissive
import test from "ava"; import { Binary, KeyDesign } from "linear-octree"; const DEBUG = false; test("can be instantiated", t => { const object = new KeyDesign(); t.truthy(object); }); test("concatenating 32bit integers", t => { const bits = KeyDesign.BITS; const hiBits = KeyDesign.HI_BITS; const loBits = Ke...
true
170b88a3ecc3c7ef6d27481a666a488553d16daa
JavaScript
digitalrobertlima/btcli
/utils/address.js
UTF-8
2,191
2.84375
3
[ "MIT" ]
permissive
const bitcoin = require('bitcoinjs-lib'); const { isTestnet } = require('./args'); const LEGACY_ADDR = 'Legacy (P2PKH)'; const BECH32_ADDR = 'SegWit (Bech32)'; const SCRIPT_HASH_ADDR = 'Nested Segwit / Legacy P2SH'; const TESTNET_SCRIPT_HASH = "MultiSig TESTNET"; /* Detect if address is valid checksum / format */ ...
true
42b4c44e50dbfb94494514bc7b3e87de7057f224
JavaScript
kazhurka/814221-keksobooking-19
/js/form.js
UTF-8
7,118
2.921875
3
[]
no_license
'use strict'; (function () { /** * Функция, которая включает или выключает форму. * @param {boolean} enable - если enable, то включает форму, если false - выключает. */ var enableForm = function (enable) { var formElement = document.querySelector('.ad-form'); if (!enable) { formElement.clas...
true
d3fd2e788ebf3355f42ce3c91a806c858170413e
JavaScript
cphelps987/Pillars
/chalk.js
UTF-8
393
2.515625
3
[ "MIT" ]
permissive
const chalk = require('chalk'); module.exports = function(app) { const ctx = new chalk.constructor({ enabled: false }); //const ctxs = new chalk.constructor({level: 0}); }; console.log(chalk.blue('Hello world!')); console.log(chalk.red('Fuck you, chalk works')); console.log(chalk.green('Fuck ...
true
17957de577eb284f55d421deccb41bd1a9f6f3d0
JavaScript
vamshi-krishna7/MovieDB---Explore-Movies
/src/reducers/movieReducer.js
UTF-8
2,234
2.546875
3
[]
no_license
import {POPULAR_MOVIES, CURRENTMOVIEINFO, SET_LOADING, GET_ACTORS_CREW, ADD_MORE_MOVIES, SEARCH_MOVIES, SET_SEARCH_VALUE} from '../actions/types'; const initialState = { loading: true, popular: null, heroImage: null, currentPage: 1, totalPage: 0, searchTerm: '', CurrentMovieInfo: null, ...
true
05df7105a38072ffff4bd96a1cbaabf95ce3e70f
JavaScript
dafu0719/cangKu
/src/untils/secondPlugs.js
UTF-8
1,035
2.625
3
[]
no_license
//导入组件 import searchConponent from '../views/list/search/index.vue' //创建一个secondPlugs对象 let secondPlugs = {} //给secondPlugs对象添加install属性 secondPlugs.install = function (Vue) { //全局js调用的组件 Vue.prototype.$isMyComponent=function() { console.log(searchConponent); //一使用this.$isMyComponent()就执行下边的代码 ...
true
40dca16090c7ca74682cc24bdcb92b2e5864e216
JavaScript
HKeating/exercisms
/javascript/etl/etl.js
UTF-8
288
2.578125
3
[]
no_license
var ETL = function() {}; ETL.prototype.transform = function(data) { var dataObj = {}; Object.keys(data).map(key => { for (var i = 0; i < data[key].length; i++) { dataObj[(data[key][i]).toLowerCase()] = parseInt(key); } }); return dataObj; }; module.exports = ETL;
true
10e16c09cbd188c48e534706fb628e2affc199b9
JavaScript
wangxuchen1802/erjieduanxiangmu
/js/carousel.js
UTF-8
1,607
2.765625
3
[]
no_license
$(function() { //代码初始化 var size=$(".img li").size(); //手动控制轮播效果 $(".img li").eq(0).show(); $(".smabtn li").eq(0).addClass("active"); $(".smabtn li").click(function() { $(this).addClass("active").siblings().removeClass("active"); var index =...
true
d2487dbcbf4d1582af29105abec41b5a1ab969fa
JavaScript
jackhr/battleboat
/js/main.js
UTF-8
2,943
3.3125
3
[]
no_license
// ===== Game Logic ===== // // ===== constants ===== // let boatsArr = []; // ===== state variables ===== // let turn, winner, playerBoard, pcBoard; // ===== cached elements ===== // pcStatusEl = document.querySelector("#pc-boats-status") pcBoardEl = document.querySelector("#pc-board"); msgEl = document.querySel...
true
1e756ba855eccf8a4809aa79148b0d3ba52b8a63
JavaScript
vili96/bartender-spring-app
/src/main/resources/static/scripts/cocktails_script.js
UTF-8
5,618
2.859375
3
[]
no_license
var currentElementToEdit; var editElementName; var inputName = $('#name'); var inputInstructions = $('#instructions'); var inputAlcoholic = $('#isAlcoholic'); var inputIngredients = $('#ingredients'); function addCocktail(name, instructions, isAlcoholic, ingredients) { console.log(ingredients); $.ajax({ url: "/co...
true
ca62383a703a49742e99de3ab59f3c616c94f4d7
JavaScript
Kyrylo-Glamazdin/bootcamp
/Week_3/Day_4/counter-reduxify/src/store/utilities/counter.js
UTF-8
1,497
3.609375
4
[]
no_license
//this file will have action types, action creators, a reducer function //ACTION TYPES const INCREMENT = "INCREMENT" const DECREMENT = "DECREMENT" //ACTION CREATORS //action creators are typically called in your react components and are usually involved with event handling //action types are the way that the mandator...
true
ce35c30dc4ace74188b7ee64574dc8823e219ee4
JavaScript
JamesWChan/synoptic-project
/scripts/modules/backend/shuffleArray.js
UTF-8
265
3.21875
3
[]
no_license
let shuffleArray = (answerArray) => { for (let i = answerArray.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [answerArray[i], answerArray[j]] = [answerArray[j], answerArray[i]]; } }; module.exports = shuffleArray;
true
6593189242b284e0cb8bb65220bca23f6826a88f
JavaScript
andreina-proyectos/formacion-online-risotto-de-setas-andreina-proyectos
/index.js
UTF-8
4,350
3.328125
3
[]
no_license
'use strict'; import {recipeData} from './recipe-data.js'; const listIngredients = document.querySelector('.list__ingredients'); let listIngredientsArray = []; const shippingCost = recipeData.recipe['shipping-cost']; const amountTotalPrice = document.querySelector('.total-price'); const buttonTextTotalPrice = document....
true
8a6ac7d03c8e0ac381f944c43a45d51299555226
JavaScript
294733692/LeetCode
/简单/342. 4的幂(Power of Four)/isPowerOfFour.js
UTF-8
637
3.578125
4
[]
no_license
/** * @param {number} num * @return {boolean} */ let isPowerOfFour = function (num) { // 循环 // while (num >=4) { // num /=4 // } // return num === 1 // 基底转换 // return num.toString(4).match(/^10*$/) !== null // 数学公式转换 // return (Math.log10(num) / Math.log10(4)) % 1 === 0 // 同上,既然是4的幕,那么肯定也是2的...
true
b109c355e545049ccc2475ac605b96a8e648da51
JavaScript
chaihigh/Pantry
/main.js
UTF-8
1,080
3.265625
3
[]
no_license
var pantry = [] var recipes = [] function listPantry() { console.log(pantry) } function addToPantry(ingredient) { pantry.push(ingredient); } class Recipe { constructor(name, ingredients) { this.name = name; this.ingredients = ingredients } } var hummus = new Recipe("hummus", [chickpe...
true
917a4cd6130cc5200b41ef994d6e97f52a2a6d45
JavaScript
andyxmai/fxlanding
/app/containers/ContactContainer.js
UTF-8
1,642
2.6875
3
[]
no_license
import React, { Component } from 'react' import Contact from '../components/Contact' import axios from 'axios' class ContactContainer extends Component { constructor() { super() this.state = { name: '', email: '', description: '', messageType: '', isSending: false } } h...
true
01165b82f4d889a25be066ba31f90bbc157b5087
JavaScript
Renan0211/trybe-exercises-
/fundamentos-do-desenvolvimento-web/bloco_4/dia_2/exercicios_do_dia/megaSena.js
UTF-8
1,166
4.03125
4
[]
no_license
// Esse programa não faz parte dos exercícios do dia, mas sim um exercício que foi feito em aula e eu repliquei depois para fins de estudos e aprendizado let num1 = Math.ceil(Math.random() * 60); let num2 = Math.ceil(Math.random() * 60); let num3 = Math.ceil(Math.random() * 60); let num4 = Math.ceil(Math.random() * 6...
true
2cf984fdeaca8e4730e933b2dbfad1afe8de720c
JavaScript
Ireensmachines/javascripthomeworkireen
/switchstatements.js
UTF-8
338
3.65625
4
[]
no_license
const fruit = "Apples"; switch (fruit){ case "Bananen" : console.log("het zijn bananen"); break; case "apples" : console.log("het zijn appels!"); break; case "citroenen" : console.log("het zijn citroenen"); break; default: console.log("er is geen f...
true
615991b692efe7e9d34df8a3699f3bef47dffe30
JavaScript
AdamBjork/API-Lab-Group-5
/adams-folder/Whiteboard-example/server.js
UTF-8
753
3.046875
3
[]
no_license
//Server set up let express = require('express'); let app = express(); let server = app.listen(3000); //direct to static files app.use(express.static('public')); //Feedback that let's you know that it's running console.log("My socket server is running"); //Require socket.io library let socket = require('socket.io');...
true
75a6555e9fae4db87150108e04f9602a94cedaf2
JavaScript
damenking/django-etsy-starter
/web/assets/js/src/products.js
UTF-8
579
2.640625
3
[]
no_license
$(document).ready(function() { $.ajax({ url: '/etsy/listings/', }).done(function(response) { renderListings(response); }); function renderListings(listings) { var $listingsContainer = $('#products__listings'); listings.forEach(function(listing) { $listingsCo...
true
1f24256bcdc2d1d5bf654ebc89296eda5343658f
JavaScript
EnzoAlbornoz/goeat-api
/src/app/controllers/NotificationsController.js
UTF-8
1,222
2.5625
3
[ "MIT" ]
permissive
const Notification = require('../schemas/Notification'); const Provider = require('../models/Provider'); class NotificationController { async index(req, res) { const { page = 1 } = req.query; // Checking if the user is a provider const isProvider = await Provider.findByPk(req.userId); if (!isProvide...
true
8b78d20dce22771a6448a39d9e0d6b88340dbfa7
JavaScript
braamconradie/attractors
/js/index.js
UTF-8
7,380
3.34375
3
[ "MIT" ]
permissive
/* globals Vector: false, Stats: false, */ const canvas = document.querySelector('canvas'); const ctx = canvas.getContext('2d'); const canvasWidth = window.innerWidth; const canvasHeight = window.innerHeight; const midX = canvasWidth >> 1; const midY = canvasHeight >> 1; canvas.width = canvasWidth; canvas.height = ...
true
bc61fb8d9cfb1672a40c52c41f8ccbf740903719
JavaScript
sehnara/namdCoder_final_project
/clock.js
UTF-8
327
3.28125
3
[]
no_license
const clock = document.querySelector('h1'); function getTime(){ const date = new Date(); const hours = date.getHours(); const minutes = date.getMinutes(); clock.innerHTML = `${hours<10?`0${hours}`:hours}:${minutes<10?`0${minutes}`:minutes}`; } function init(){ getTime(); setInterval(getTime,60000); } ini...
true
215050b31e665e14a685e09734a47ca8ae8c7e12
JavaScript
Cerv1/CifrasYLetras
/js/register-user.js
UTF-8
1,642
2.984375
3
[]
no_license
function validateUserRegister(){ var name = document.forms["register-user-form"]["student-name"].value; var lastname = document.forms["register-user-form"]["student-lastname"].value; var email = document.forms["register-user-form"]["student-email"].value; var password = document.forms["register-user-form"]["stu...
true
d446fac2c5b53de7332de105c66fd0a4a9a39f8e
JavaScript
gaballison/first-families
/src/js/app.js
UTF-8
20,080
3.4375
3
[]
no_license
//--------------------------------------- // 00. GLOBAL VARIABLES //--------------------------------------- // ***** SELECTORS ***** // let html = document.getElementById('results'); let pagination_element = document.getElementById('pagination'); let navForm = document.getElementById('searchFilter'); let mainSearch ...
true
f55fba1d8e19fb1cf45c7ee8e9df8b4b3098bcf8
JavaScript
jplanaslnp/exceljs
/src/App.js
UTF-8
2,182
2.71875
3
[]
no_license
import './App.css'; import ExcelJS from "exceljs"; import saveAs from 'file-saver'; function App() { const submitForm = e => { e.preventDefault(); const wb = new ExcelJS.Workbook(); const reader = new FileReader(); var file = document.getElementById("testFile"); reader.readAsArrayBuffer(file....
true
ee564f1dcccf765a335127a79c18cf71f0050904
JavaScript
Douggyfr3sh/chatterbox-server
/server/request-handler.js
UTF-8
5,052
3.140625
3
[]
no_license
/************************************************************* You should implement your request handler function in this file. requestHandler is already getting passed to http.createServer() in basic-server.js, but it won't work as is. You'll have to figure out a way to export this function from this file and inclu...
true
6f062dfbfe09cf3e0a5bc422c4abdf8000259840
JavaScript
spatialmatrixlimited/SPIDERAPI
/lib/timeprefect.js
UTF-8
1,574
3.203125
3
[]
no_license
var getTime = ()=>{ var d = new Date(); var n = d.getUTCHours()+1; var a = d.getUTCMinutes(); var b = d.getUTCSeconds(); var lenA = String(a).length; var lenB = String(b).length; if (n >= 12){ if (n==12){ hour = 'PM'; } else{ n = (n - 12); hour = 'PM'; } } else{ hour ...
true
4ef51e8e634bc46bd5cf3957b765e2486f17135b
JavaScript
aleksandra992/TelerikAcademy
/Java Script Fundamentals/Exams/Exam2014May2/BonusProblem.js
UTF-8
145
2.65625
3
[ "MIT" ]
permissive
/** * Created by Aleksandra on 6/4/2015. */ function a(p){var r=1;for(k=2;k<=p;k++){r*=((p+k)/k);} return r.toFixed(1)/2;} console.log(a(7));
true
c30c82a231cd9b206c789d4fdbfc97c068b8cc07
JavaScript
erospv/repositorio-curso-Labenu
/semana6/labeforms/src/App.js
UTF-8
1,438
2.546875
3
[]
no_license
import React from 'react'; import styled from 'styled-components'; import './App.css'; import Etapa1 from './components/Etapa1/Etapa1'; import Etapa2 from './components/Etapa2/Etapa2'; import Etapa3 from './components/Etapa3/Etapa3'; import FimFormulario from './components/FimFormulario/FimFormulario'; const AppConta...
true
c510c3ab481c0fedffe829b02e750ade4ef86cc9
JavaScript
catherinewu/connectfourplus
/src/App.js
UTF-8
3,930
2.578125
3
[]
no_license
import React, { Component } from 'react'; import _ from 'lodash'; import { Game, drawBoard } from './Game'; import './App.css'; import uuid from 'uuid'; // Firebase App (the core Firebase SDK) is always required and must be listed first import * as firebase from "firebase/app"; import "firebase/database"; const fireb...
true
092ecda091926caf89fb0babb844be42eb06aa0e
JavaScript
boostcamp-2020/IssueTracker-40
/frontend/src/common/hook/usePromise.js
UTF-8
635
2.609375
3
[ "MIT" ]
permissive
import { useState, useEffect } from "react"; const usePromise = (promiseCreator, deps, ...args) => { const [resolved, setResolved] = useState(null); const [loading, setLoading] = useState(false); const [error, setError] = useState(null); const process = async () => { setLoading(true); ...
true
299347b472f095b0072633f7607596ec7d0f180c
JavaScript
jdloude/burger
/test.js
UTF-8
161
2.84375
3
[]
no_license
var myObject = { propOne: function(a, b) { var c = a + b; }, propTwo: function(a, b) { var c = a * b; } }; myObject.one(2, 2);
true
3a695279fe38348301bd090b4f8ce62819eec334
JavaScript
adoyle-h/react-request-container
/src/request.js
UTF-8
4,912
2.71875
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
import React from 'react'; import PT from 'prop-types'; import lodash from 'lodash'; const makeOnce = (func, count = 1) => (...args) => { if (count > 0) { count--; return func(...args); } }; const RequestState = (props) => <div props={props} style={{display: 'none'}} />; const defaultState = ...
true
b08a30710e93b8e52e179818439d45f1a0c9fd63
JavaScript
choijeong/goodchoice
/Desktop/Stduy/homestudy/goodchoice_Project/src/main/webapp/resources/js/good/upload_file.js
UTF-8
15,168
2.796875
3
[]
no_license
/** * */ // Handlebars 파일 템플릿 컴파일 console.log("upload.file.js start") var t=$('#uploadFileList').length; if(t > 0){ var fileTemplate = Handlebars.compile($("#fileTemplate").html()); } // 첨부파일 drag &drop 영역 선택자 var fileDropDiv = $("#fileDrop"); // 전체 페이지 첨부파일 drag & drop 기본 이벤트 방지 //.conten...
true
07cb6ec6ca0212b61cc0264c3dc915d103155d34
JavaScript
albertleao/genesis
/js/frontpageslideshow.js
UTF-8
411
2.5625
3
[]
no_license
var step=1 var whichimage=1 function slideit(){ if (!document.images) return document.images.slide.src=eval("image"+step+".src") whichimage=step if (step<4) step++ else step=1 setTimeout("slideit()",6400) } slideit() function slidelink(){ if (whichimage==1) window.location="#" else if (whichimage==2) window.location="#...
true
d1fd9b31973c02c3e94a1bd63e7283aa0923f9d0
JavaScript
mamaddox/EmployeeDirectory
/EmployeeDirectory/EmployeeDirectory.UI/components/SearchInput.js
UTF-8
1,531
2.640625
3
[]
no_license
class SearchInput extends React.Component { constructor() { super(); this.state = { searchDropdown: "", searchInput: "" }; } updateSearchInput = event => { this.setState({searchInput: event.target.value}); } updateSearchDropdown = event => { this.setState({searchDropdown: event.target.value}); ...
true
62e591b651833d98b0d76b06ece267ae02413a81
JavaScript
trungtrong/JavaScript-Course
/Bai_53_HTML_DOM/Bai 33_3_4_1_Element/insertText.js
UTF-8
513
3.828125
4
[]
no_license
document.body.onload = addElement; function addElement() { //Step 1: create a new div element var newDiv = document.createElement('div'); // Step 2: give it some content var newDivContent = document.createTextNode('Hi there and greeting'); // Step 3: add the text node to the newly created 'div' newDiv.appendCh...
true
9b468ab2703ee32f8cd03a17259fc14a88df1d19
JavaScript
Katie-McDonagh/gameOfLife
/test/Cell.test.js
UTF-8
2,510
3.09375
3
[]
no_license
import { expect } from 'chai'; import CellState from '../CellState'; import Cell from '../Cell'; describe("Cell", () => { it("is initiated with a cellState", () => { const aliveCell = new Cell(CellState.ALIVE); expect(aliveCell.state).to.equal(CellState.ALIVE) const deadCell = new Cell(CellState.DEAD) ...
true
ee33ff73be262cb6d35950bbd3bd46996aee1bb4
JavaScript
neomjs/neo
/src/util/VDom.mjs
UTF-8
11,492
2.796875
3
[ "MIT" ]
permissive
import Base from '../core/Base.mjs'; /** * @class Neo.util.VDom * @extends Neo.core.Base */ class VDom extends Base { static config = { /** * @member {String} className='Neo.util.VDom' * @protected */ className: 'Neo.util.VDom' } /** * @param {Object} vdo...
true
ea21a0d75c525b01b3420d4d00e5fcf559a6eb95
JavaScript
gburghardt/JsLib
/src/vendor/model/lib/model/base.js
UTF-8
4,908
2.515625
3
[ "MIT" ]
permissive
'@import Function'; '@import Object.Utils'; '@import Events.Callbacks'; '@import String'; '@import Model'; Model.Base = Object.extend({ includes: [ Object.Utils, Events.ApplicationEvents, Events.Callbacks ], self: { attributesInitialized: false, guidBase: new Date().getTime() + "-" + Math.round(Math.r...
true
f71247eeadb916bb596e2e1bd1c74fa096113010
JavaScript
tungeric/my-trip-plan-builder
/frontend/actions/day_actions.js
UTF-8
963
2.515625
3
[]
no_license
import * as APIUtil from "../util/day_api_util"; export const RECEIVE_DAYS = "RECEIVE_DAYS"; export const RECEIVE_DAY = "RECEIVE_DAY"; export const RECEIVE_DAY_ERRORS = "RECEIVE_DAY_ERRORS"; export const receiveDays = days => ({ type: RECEIVE_DAYS, days }); export const receiveDay = day => ({ type: RECEIVE_DAY...
true
c1b7cb12f276ebe90663ebdb0833bbe93b669d31
JavaScript
givanse/corzo
/rails/app/assets/javascripts/monitor_controls.js
UTF-8
8,071
2.515625
3
[]
no_license
monitor.controls = { locationControl: null, buildScheduledServicesPanel: null, TransportServiceForm: null, updateTransportServiceForm: null, addSearchBox: null, buildContextMenu: null }; /* monitor.controls namespace */ monitor.controls.locationControl = function(map, title, centerLocati...
true
3dd0644f328fa555ff5d5f385dda47eeec8bdacc
JavaScript
ddhogan/npm-demo
/express-demo/index.js
UTF-8
2,690
2.609375
3
[]
no_license
const startupDebugger = require('debug')('app:startup'); const dbDebugger = require('debug')('app:db'); const config = require('config'); const morgan = require('morgan'); const helmet = require('helmet'); const logger = require('./middleware/logger'); const courses = require('./routes/courses') const home = require('....
true
7329c98b067532378097a37a6e215e7c0a0774b6
JavaScript
GreepTheSheep/discord-guess
/src/index.js
UTF-8
3,984
2.90625
3
[]
no_license
const Discord = require('discord.js'); const client = new Discord.Client(); const {log} = require('./lib'); const fs = require('fs'); if (!fs.existsSync(`${__dirname}/../config.js`)) { log(`config.js not found, please copy config.sample.js to config.js and edit it`, 'error'); process.exit(1); } const config = ...
true
ca733d124056db74924e074043f90ae2e3f99933
JavaScript
flypup/duel-of-the-devs
/app/scripts/models/Scene.js
UTF-8
1,673
2.5625
3
[]
no_license
(function(ec) { var Scene = ec.Scene = function(data) { // TODO: clone data? this.data = data; this.mapName = data.map; this.fps = this.data.useFrames ? this.data.fps : 1; this.duration = this.calculateTime(data.duration); this.time = 0; this.complete = false; this.animations = null; //this.actors =...
true
16792f6a4a21e36ce8a87a09b00e03985fb0bf47
JavaScript
shu-rawat/shopping-cart
/src/client-src/services/data.service.js
UTF-8
1,702
2.625
3
[]
no_license
let products = []; let categories = []; let banners = []; export default class DataService { constructor() { } static getProducts() { if(products.length){ return Promise.resolve(products); }; return fetch("/products") .then(resp => resp.json()) ...
true
0fb8153b9f2c17bc088c9119812782670c22b419
JavaScript
rtagashira/algorithms
/codesignal/challenges/amendTheSentence.js
UTF-8
1,433
4.8125
5
[]
no_license
// You have been given a string s, which is supposed to be a sentence. However, someone forgot to put spaces between the different words, and for some reason they capitalized the first letter of every word. Return the sentence after making the following amendments: // Put a single space between the words. // Convert t...
true
a9bc104bc1678e7f38f6f9956945510f64c062db
JavaScript
e-barr/react-async-gif-search-lab-houston-web-071618
/src/components/GifSearch.js
UTF-8
597
2.578125
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
import React, { Component } from 'react' class GifSearch extends Component { constructor() { super() this.state = { value: '' } } updateGifSearchTerm = event => { console.log(`updateSearchTerm entered! term is ${event.target.value}`) this.setState({value: event.target.value}) } r...
true
d1cd90d4ddef307bf35b21634b7b1e0dd22443c2
JavaScript
Hakon555/ShipModels
/src/plugins/AdaptivePlugin.js
UTF-8
2,334
2.65625
3
[]
no_license
/** * Use v-if with plugin params for adaptive elements. * params array: [mobileScreen, desktopScreen]. All params located in "data.adaptive.screens.param". * Using: * <div v-if="desktopScreen"></div> - this block will show on the desktop */ export default (function (){ 'use strict'; let adaptiveMixin = { ...
true
63e64411eb6515b67275521e3d2659b50ca60547
JavaScript
jean1591/project_euler
/20_29/p26_reciprocalCycles.js
UTF-8
532
3.71875
4
[]
no_license
const getLengthReciprocal = (n) => { let remain = 10; let i = 0; while (remain !== 10 || i < 1) { // console.log(`${remain} / ${n} = ${Math.floor(remain/n)} * ${n} + ${remain % n}`) remain = (remain % n) * 10; i++; } return i; }; const reciprocalCycles = (n) => { let maxi = 0; let result = 0; for (let...
true
49645e7ba27fd55d08a9274ce18197e1d5a403a7
JavaScript
nachogutierrez/finance-metrics
/ui/src/js/views/dashboards/index.js
UTF-8
590
2.578125
3
[]
no_license
const { DashboardTableHeader, DashboardItem } = UI const Index = (function() { function start() { const bindings = bindUi() const api = FirebaseApi() api.getDashboards() .then(data => populate(bindings, data)) } function bindUi() { return { dashboardsTable: document.getElementById('da...
true
7358a239f666f5b5056bd7df76e0a1ebf8e11165
JavaScript
ram191/Number-Pool-Telegram-Bot
/scrapeController.js
UTF-8
607
2.65625
3
[]
no_license
const pageScraper = require('./pageScraper'); async function scrape(browserInstance, pool){ let browser; try{ browser = await browserInstance; switch (pool) { case "sydney": return await pageScraper.sydneyScraper(browser); case "hongkong": ...
true
b71aba446bad41fc87195a6af0131c048acbf797
JavaScript
crismotinha/npmstudies
/filteredls.js
UTF-8
328
2.84375
3
[]
no_license
var fs = require('fs'); var path = require('path'); var path2 = process.argv[2]; var ext = "." + process.argv[3]; fs.readdir(path2,function (err, data) { if (err){ console.log(err) } for (var i = 0; i<data.length; i++){ if (path.extname(data[i]) == ext) console.log(data[i]); ...
true