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
a2fca8b71d02a98774b93afa276ed3f137fb57c2
JavaScript
FranciscoG/volume-meter
/public/js/main.js
UTF-8
6,425
2.765625
3
[ "MIT" ]
permissive
/* The MIT License (MIT) Copyright (c) 2014 Chris Wilson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
true
4d882fdfe8e36e31284ae843d268fbdbfca76107
JavaScript
EnriqueBarba/lab-javascript-chronometer
/starter-code/javascript/main.js
UTF-8
2,581
3.5
4
[]
no_license
const chronometer = new Chronometer(); const btnLeft = document.getElementById('btnLeft'); const btnRight = document.getElementById('btnRight'); const minDec = document.getElementById('minDec'); const minUni = document.getElementById('minUni'); const secDec = document.getElementById('secDec'); con...
true
c9df27886b513e1526bb72bf1e5e7d9cde36e27d
JavaScript
miyaeyo/1stSemester-nhnnext
/WebUIBasic/JustPractice/javascript3.js
UTF-8
133
2.703125
3
[ "MIT" ]
permissive
var hello = document.getElementById('hello'); function greeting(){alert("hi!")}; hello.addEventListener(("click"),greeting,false);
true
98f858bbf07b884d5f78fc191c4d1d32314f7685
JavaScript
wangeastsea/algorithm-leetCode
/数据机构与算法/队列/双端队列/test.js
UTF-8
2,952
4.25
4
[]
no_license
// 题目描述:给定一个数组 nums 和滑动窗口的大小 k,请找出所有滑动窗口里的最大值。 // 输入: nums = [1,3,-1,-3,5,3,6,7], 和 k = 3 输出: [3,3,5,5,6,7] /** * 1 [3 -1 -3] 5 3 6 7 1 3 [-1 -3 5] 3 6 7 1 3 -1 [-3 5 3] 6 7 1 3 -1 -3 [5 3 6] 7 1 3 -1 -3 5 [3 6 7] * 3 3 5 5 6 7 提示:你可以假设 k 总是有效的,在输入数组不为空的情况下,1 ≤ k ≤ 输入数组的大小。 */ // const nums = [...
true
5ccd4edb4864ceb3721fb63f2e78210c262f9c92
JavaScript
TRM-WCSLisbon/ricky_morty_react_app
/src/components/CharactersV2/CharactersList.jsx
UTF-8
3,077
2.578125
3
[]
no_license
/* eslint-disable react/jsx-props-no-spreading */ /* eslint-disable react/destructuring-assignment */ /* eslint-disable react/state-in-constructor */ import React, { Component } from 'react'; import { withRouter, NavLink as Link } from 'react-router-dom'; import ReactPaginate from 'react-paginate'; // import querystrin...
true
f628f0822af0efe42bc13c59dc5e77eb71cc7492
JavaScript
argonautica/verBOTen
/verBOTen/index.js
UTF-8
2,471
3.03125
3
[]
no_license
const Discord = require("discord.js"); var words = []; const client = new Discord.Client(); const config = require("./config.json"); client.on("ready", () => { console.log(`Bot has started, with ${client.users.size} users, in ${client.channels.size} channels of ${client.guilds.size} guilds.`); client.user.set...
true
d642f4293db82b9c2474555f993452ce223ac17d
JavaScript
jawillford/PWA1-GITRepo-Willford
/Wk4/goal7_assign_objects/goal7_assign_obj_to_prototypes/js/main.js
UTF-8
1,108
3.890625
4
[]
no_license
/** * Created by Jacob Willford * Class: PWA * Goal: Goal7 */ (function(){ //declare all variables var numOfPeople =3; var people = []; var names = ["Jacob","Blake","Jay","Damon","Autumn"]; var interval; //make the loop for selecting person for(var i = 0; i<numOfPeople;i++){ /...
true
716e4e692e1d7c1b740f74b443163ce359261b89
JavaScript
jsemu/gameboy
/app/cpu.js
UTF-8
3,068
2.96875
3
[]
no_license
let Util = require('util'); class CPU { constructor(mem) { this.registerNames = ["A", "F", "B", "C", "D", "E", "H", "L", "SP", "PC"]; this.registers = {}; for(name of this.registerNames) { this.registers[name] = 0 >>> 0; }; this.registerChangeCallbacks = []; this.memory = mem; this.instru...
true
5f46a4b0302509599f9c3a59b6c395987b0ed331
JavaScript
lai3d/flow-mvc
/src/FlowMVC/mvc/event/EventDispatcher.js
UTF-8
4,082
3.015625
3
[ "MIT" ]
permissive
/** * The main purpose of this class is to provide loosely coupled object communication by wrapping * the application-level event bus using simple, helper methods for adding, removing, and dispatching events. */ Ext.define("FlowMVC.mvc.event.EventDispatcher", { extend: "Ext.util.Observable", statics: { /** ...
true
678154c3183e8aeff82bb35edb8d51d6d1332eb6
JavaScript
amnesia7/jquery_form_preview
/jquery.preview.js
UTF-8
6,581
2.671875
3
[]
no_license
(function($) { $.fn.formPreview = function(settings) { var config = { "buttonText" : "Preview" }; if (settings) $.extend(config, settings); return this.each(function() { // element-specific code here $(this).find(":submit").before("<input type='button' class='preview_button' value='" + config["but...
true
e2d273d25ea780e1f1e87fcb37c89b83117dcfab
JavaScript
tmct/simple-chat
/routes/chats.js
UTF-8
1,195
2.734375
3
[]
no_license
var express = require('express'); var router = express.Router(); var chats = []; router.get('/', function(req, res, next) { res.send(chats); }); router.post('/', function(req, res, next) { var subject = req.body.subject; if (!subject) { throw new Error('subject please'); } else { chat = { id: c...
true
e19f1ba8aa9e12b464e9cac1142144591bf4ccb1
JavaScript
enveal/React_Charts
/src/App.js
UTF-8
2,348
2.78125
3
[]
no_license
import React, { useState, useEffect } from "react"; import { Pie, Bar ,Line} from "react-chartjs-2"; import axios from "axios"; const App = () => { const [chartData, setChartData] = useState({}); // const [employeeSalary, setEmployeeSalary] = useState([]); //const [employeeAge, setEmployeeAge] = useState([]); ...
true
f6f9ce110834cf4b1df5b403305f8c97ac7c0011
JavaScript
7656615807/biyesheji
/web/js/manager/task_insert.js
UTF-8
2,574
2.65625
3
[ "MIT" ]
permissive
$(function() { $("#task\\.expiredate").datetimepicker({//选择年月日 format: 'yyyy-mm-dd', language: 'zh-CN', weekStart: 1, todayBtn: 1,//显示‘今日’按钮 autoclose: 1, todayHighlight: 1, startView: 2, minView: 2, //Number, String. 默认值:0, 'hour',日期时间选择器所能够提供的最精确的时间...
true
9caaa0d917064730a37159e3e43f5efb996721d6
JavaScript
andrzej-stasinski22/app-art-start
/src/state/snackbars.js
UTF-8
1,287
3.046875
3
[]
no_license
// STATE const initialState = { bars: [], // bars: [ // {text: 'message three', color: 'success', key: 1}, // {text: 'message four', color: 'danger', key: 2}, // ], } // ACTIONS const ADD_SNACK = 'ADD_SNACK'; const REMOVE_SNACK = 'REMOVE_SNACK'; // REDUCER const snackbars = (state ...
true
db8239429ad5adb0e8a05d87a4beacea3cde6057
JavaScript
dogsGhost/redash
/tests/pair.spec.js
UTF-8
436
2.734375
3
[]
no_license
const test = require('ava') , { pair } = require('../dist/redash') test('properly reports its arity (is binary)', (t) => { t.is(pair.length, 2) }) test('is curried', (t) => { t.is(typeof pair(5), 'function') }) test('returns an array with the first two arguments as its two elements', (t) => { t.deepEqu...
true
765bab85c13faf0383ed25c29d99e14c76c50f17
JavaScript
SISE-Web-Development-Environments/203097225_205996747
/js/form-validation.js
UTF-8
2,724
2.78125
3
[]
no_license
// Wait for the DOM to be ready $(document).ready(function () { localStorage.setItem("p", "p"); $.validator.addMethod("passwordOk", function (value) { return (value.match(/[A-z]/) && value.match(/\d/)); }); $.validator.addMethod("nameOk", function (value) { return (value.match(/[A-z]/) ...
true
2e02d2692751d7896cfa29e97cef0a3e5bfc21b9
JavaScript
shibinbin/wxml
/pages/index/index.js
UTF-8
1,595
2.65625
3
[]
no_license
Page({ data:{ bardata:[ { index:0, url:"12345", purl:"123456", con:"1111" }, { index:1, url:"12345", purl:"123456", con:"222" }, { index:2, url:"12345", purl:"123456", con:"3333" }, { index:3, url:"1...
true
032698a127c2440937f78b01f81b5cee92ad540e
JavaScript
kagapova/exampleReact
/src/reducers/user.js
UTF-8
1,259
2.59375
3
[]
no_license
import{ SET_TOKEN_USER, GET_TOKEN_USER, GET_TOKEN_USER_FAIL, GET_TOKEN_USER_SUCCESS } from '../action/user'; const initialState = { token: null, loading: false, error: null, auth: null, first_name: null, last_name: null } export default function user(state = initialState, actio...
true
1bdda900eba7f13d1e5271b0f62d6c95276d8130
JavaScript
jay0008/SHAiR
/SHAIR/app.js
UTF-8
542
2.828125
3
[]
no_license
/** * File: app.js * * Author1: Cyril Abia * Date: May 23rd 2021 * Partner: Worked alone * * Summary of File: * * This is the main JS file it contains code to setup port functionality to run code * in the native browser. * */ //Main JS file //import expressJS const expr...
true
08f7576b367a86882e411996af2853a4c6e91067
JavaScript
anvk/express-handlebars-boilerplate
/server/middlewares/logErrors.js
UTF-8
485
2.546875
3
[ "MIT" ]
permissive
/* eslint no-console:0 */ export default function(err, req, res, next) { let { method } = req; const { url, body } = req; method = method.toUpperCase(); console.error(`API fail -> ${method} ${url}`); if (method === 'POST' || method === 'PUT') { console.error(`body is -> ${JSON.stringify(body)}`); } ...
true
fc1f35d8dfb83c8358c3a9cf20e05bf0906dce27
JavaScript
nesrineabo/P5-V2
/scripts/orderConfirmed.js
UTF-8
718
2.546875
3
[]
no_license
//Récupération des infos de la commande confirmée, sotckées dans le localStorage const jsonOrderInfos = sessionStorage.getItem("orderInfos"); const orderInfos = JSON.parse(jsonOrderInfos); document.querySelector("#confirmation-text").innerHTML = ` <p>Votre commande est validée <span class="username">${orderInfos.userN...
true
75dd869595be2fdc19f024d38e72b30f0e039439
JavaScript
21duxue/-JS-advanced-lessons
/课程练习/LS14/JS/demo2.js
UTF-8
650
3.96875
4
[]
no_license
//给对象添加属性 //1.直接添加 var obj ={ x:1, y:2 }; //直接添加的属性,其所有特性默认都是true obj.z = 3; for(var k in obj){ console.log(k,obj[k]); }//x 1 y 2 z 3 //2.通过Object.defineProperty添加 //通过Object.defineProperty方法添加的属性,除了手动修改,其所有特性默认都是false var obj = { x:1, y:2 }; obj.z = 3; Object.defineProperty(obj,"w",{value:456,config...
true
4ca82aa487dee4671134a257a92175f4728b2aeb
JavaScript
NeversSync/three-resource-express-app
/test/e2e/teas.test.js
UTF-8
3,666
2.5625
3
[]
no_license
const db = require('./_db'); const request = require('./_request'); const assert = require('chai').assert; describe('tea api', () => { before(db.drop); it('first GET returns empty list', () => { return request.get('/api/teas') .then(req => { const teas = req.body; ...
true
2ebc4607be0e073fdd7161149aeafa9e30bcca5b
JavaScript
MensiGhaith/NodeJS-weather-app
/public/js/app.js
UTF-8
754
2.859375
3
[]
no_license
console.log('CONSOLE CLIENT SIDE') const weatherform=document.querySelector('form') const search =document.querySelector('input') const firstmessage=document.querySelector('#message1') const secondmessage=document.querySelector('#message2') weatherform.addEventListener('submit',(e)=>{ e.preventDefault() const ...
true
f2b427eb74eeb5ae93899ab6053b6b0399fe6c4a
JavaScript
csbailey5t/mirador-anno
/src/LocalStorageAdapter.js
UTF-8
1,593
2.875
3
[]
no_license
/** */ export default class LocalStorageAdapter { /** */ constructor(annotationPageId) { this.annotationPageId = annotationPageId; } /** */ async create(annotation) { const emptyAnnoPage = { id: this.annotationPageId, items: [], type: "AnnotationPage", }; const annotationPag...
true
41fb01fcc0ff5f11d25f2a776414e2d441c00a9e
JavaScript
katyaga/927803-big-trip-10
/src/utils/filter.js
UTF-8
766
2.78125
3
[]
no_license
import {FilterType} from '../const.js'; const getFuturePoints = (points, date) => { return points.filter((point) => { const {dateEnd} = point; if (!dateEnd) { return false; } return dateEnd > date; }); }; const getPastPoints = (points, date) => { return points.filter((point) => { con...
true
0a2fa974b3011468de55c6e2c43d3e3e0e11bfe0
JavaScript
Pivikua/JS-Lerning
/JS_Lessons/Lessons_29_39_AnvanceFunction/Lesson_34x_objOffunc_NFE/objOfFuncNFE.js
UTF-8
16,362
4.3125
4
[]
no_license
// Объект функции, NFE // // Как мы уже знаем, в JavaScript функция – это значение. // // Каждое значение в JavaScript имеет свой тип. А функция – это какой тип? // // В JavaScript функции – это объекты. // // Можно представить функцию как «объект, который может делать какое-то действие». Функции можно не только вызыва...
true
399faf987b7a6d2a5c81c97d4de41ce18cfb3a56
JavaScript
kingsleylow/near_stakingpool_front
/src/assets/js/offset.js
UTF-8
1,295
2.9375
3
[ "Apache-2.0" ]
permissive
//字体适配 function offset(){ var width=window.innerWidth; var html = document.querySelector('html'); var rem = width / 7.5; if(width>540){ rem = 71 // rem = width / 10.5; // if(width>750){ // rem = width / 12.5; // } // if(width>820){ // rem =...
true
c73c536d499bfdeb17a6d3f553109f284d26f088
JavaScript
msk410/lotto
/src/TestScraper.js
UTF-8
13,470
2.921875
3
[]
no_license
/** * Created by mkimg on 10/1/17. */ import * as $ from "jquery"; import Game from "./Game" export default class TestScraper { texasGames = []; constructor() { this.getLottoTexas() this.getTexasTwoStep() this.getTexasTripleChance() this.getAllOrNothing(); this.getPick...
true
61f20f22e0c7c3fe255075c9bd6227d5a595a534
JavaScript
testinnplayin/student-grades-app
/public/scripts/edit-class.js
UTF-8
4,020
2.875
3
[]
no_license
'use strict'; var classData; function renderAlert(result, response) { var mainContent = '.js-main-content', alertSel = '.alert', alertStr = 'alert', closeSel = '.close', closeStr = 'close'; $(mainContent).prepend('<div></div>'); $('.js-main-content div') .first() .addClass(alertStr) .addClass('alert-d...
true
2634538d4eef7dee25f248d1355ddbd980181216
JavaScript
alexcandidos/app-builder-cypress
/packages/cypress/cypress/integration/app-builder/form-view/test.js
UTF-8
1,000
2.65625
3
[ "MIT" ]
permissive
function test (config) { const { displayType, help, inline, label, multiple, options = [], placeholder, predefinedValue, predefinedOptions, repeatable, required, showAsSwitcher, showLabel = true, tooltip } = config console.log(label) } const config = { d...
true
662c70f0421c9040ad9f15389889e5eef7ed5b2b
JavaScript
SteiniSaem/ChatIO
/ChatIO-client/src/components/Landing/Landing.js
UTF-8
2,077
2.609375
3
[]
no_license
import React from "react"; import { connect } from "react-redux"; import { addUser } from "../../actions/userActions"; import SocketContext from "../../contexts/SocketContext"; class Landing extends React.Component { constructor(props) { super(props); this.state = { nickName: "", nickExists: fals...
true
a692b0510d190a62657d502ab7dfdecb97ed9096
JavaScript
cwj781643231/Day
/src/main/webapp/resources/custom/js/equipment/controllerEquipment.js
UTF-8
2,777
2.765625
3
[]
no_license
(function() { angular.module("equipmentApp").controller("equipmentController", EquipmentController); EquipmentController.$inject = [ 'equipmentService' ]; function EquipmentController(equipmentService) { var vm = this; vm.equipments = []; vm.index = 0; vm.newEquipment = {}; vm.selectedEquipment =...
true
87affbe771eeebfcb5ccb107d4b5a1b33e490fba
JavaScript
niranj775/JS-Json-Objects-and-Lists
/fromListToObject.js
UTF-8
321
3.59375
4
[]
no_license
function fromListToObject(data){ return data; } var arr = [['make', 'Ford'], ['model', 'Mustang'], ['year', 1964]]; console.log(fromListToObject(arr)); /* Write a function “fromListToObject” which takes in an array of arrays, and returns an object with each pair of elements in the array as a key-value pair. */
true
06720ae3a05cc3bd9158cf5fb13c9e0a73a090d6
JavaScript
maicolXD12/taller2
/tarea 3/ejemplo_1.js
UTF-8
179
2.609375
3
[]
no_license
var nombre = prompt("Ingrese un nombre") console.log("Tu nombre "+nombre); var usuario =(" Ahora estas en la matrix [usuario] "); console.log("Ahora estas en la matrix, "+nombre);
true
5d0f684da9d4c4d2b676ee31bd68d5f61d9d7d54
JavaScript
VinitaBhatt/Candy-Crush
/sketch.js
UTF-8
3,179
2.96875
3
[]
no_license
const Engine = Matter.Engine; const World= Matter.World; const Bodies = Matter.Bodies; const Constraint = Matter.Constraint; var engine, world; var candy1, candy2,candy3; var backgroundImg,platform; var eclair, slingshot; var score = 0; function preload() { bgImg = loadImage("images/bg.jpg"); ...
true
e62a543ed66ecc7013c55f8dd9735b72134de8c5
JavaScript
albiurs/edu_codecademy_full-stack-engineer
/src/02_learn_javascript/12_classes/15_challenge3_shift_cipher.js
UTF-8
4,198
4.53125
5
[]
no_license
// A shift cipher takes a plain text message and shifts each letter forward in the alphabet by a given Number. // For example, a shift cipher with a shift of 1 would turn the string 'hello' to 'ifmmp'. // // Create a class ShiftCipher that takes the numerical value of the shift as a constructor parameter. The class sho...
true
4d54d3d41523f53e2792acafb57b205540f9d231
JavaScript
ChangeYFH/animal_crossing_server
/utils/translateTime.js
UTF-8
360
2.859375
3
[]
no_license
function translateTime(time){ let result=''; if(time==='all'){ result= '全天'; }else{ time=time.split(','); for(let item of time){ const segment=item.split('-'); result=`${result}${segment[0]}点到${segment[1]}点,`; } result=result.slice(0,-1); } return result; } m...
true
f225dc1937cb8556bd31896abc40e0df07f6e86e
JavaScript
instance-oom/leetcode
/Easy/561_ArrayPartitionI.js
UTF-8
353
2.9375
3
[ "MIT" ]
permissive
// https://leetcode.com/problems/array-partition-i/#/description /** * @param {number[]} nums * @return {number} */ var arrayPairSum = function (nums) { var length = nums.length; nums = nums.sort(function (num1, num2) { return num1 - num2; }); var sum = 0; for (var i = 0; i < length; i += 2) { sum...
true
2a12558563693531d85d80c1f5afbe543ba75a5f
JavaScript
dlicul/microplex
/test-lb.js
UTF-8
1,009
2.796875
3
[ "MIT" ]
permissive
var i = 1 var http = require('http') var success=[] var failed=[] var N = 1000 var success_keys = {} var failed_keys = {} console.time('send-requests') console.log("starting " + N + " requests...") function done() { console.log("done.") console.timeEnd('send-requests') console.log(success.length + "/" + fai...
true
aac113da41fa77fc6a12d107e1219a626a9b1026
JavaScript
minhthu6521/coding-practice
/permAlone.js
UTF-8
1,976
4
4
[]
no_license
function helper(word) { if (word.length < 2) { return [word]; } else { // By declaring all variables outside of the loop, // we improve efficiency, avoiding the needless // declarations each time. var anagrams = []; var before, focus, after; var shortWord, subAnagrams, newEntry; for...
true
0158f522df52162537bcc1615b927bf92f1ae005
JavaScript
pshubham95/Aspyra-Paas
/static/js/custom.js
UTF-8
14,796
2.828125
3
[ "MIT" ]
permissive
var c_mis = false; var c_name = false; var c_email = false; var c_pass = false; var c_phone = false; var c_mis_login = false; var c_pass_login = false; var r = 0; function makeid() { var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for( var i=0; i < 5; i++ ) ...
true
3ebcb8f2c6665d728a0f741254b88f7609ea6657
JavaScript
MarlenStrive/Vuejs
/2-assigment-4/app.js
UTF-8
1,117
2.65625
3
[]
no_license
new Vue({ el: '#exercise', data: { classEffect: '', timerId: '', yellow: 'yellow', someClass: 'some-class', thirdClass: 'yellow', forthClass: 'some-class', forthClass2: 'true', color: 'blue', timerId2: '', width: 0 ...
true
073d896a269097c116f6f71e2d2624c4a5450093
JavaScript
NISHAHT/Astroz-Old
/handlers/discordbots.org.js
UTF-8
1,168
2.578125
3
[]
no_license
/* THIS POSTS STATS TO DISCORDBOTS.ORG */ const publisher = require('discord-publisher'); module.exports = { /** * Starts to post stats to DBL * @param {object} client The Discord Client instance */ async init(client){ try { var myarray = []; client.guilds.cache.keyArray().forEach(asyn...
true
3cdf353a65729df18aeb050d36a51b15b61d26bb
JavaScript
keinkunst/keinkunst.github.io
/SF2021/Nemendasidur/Gizur/Verkefni00-HalloHeimur/sketch.js
UTF-8
181
2.875
3
[]
no_license
// Hér kemur kóðinn þinn: function setup() { createCanvas(400, 400); background(255,200,0); frameRate(4); } function draw() { fill(random(0,255)); ellipse(200,200,50,50); }
true
83a2097300ed12dc87f5641a8824eb2427126be2
JavaScript
Saleslogix/argos-sdk
/src-out/Fields/DecimalField.js
UTF-8
4,336
2.546875
3
[ "Apache-2.0" ]
permissive
define('argos/Fields/DecimalField', ['module', 'exports', 'dojo/_base/declare', './TextField', '../FieldManager', '../Utility'], function (module, exports, _declare, _TextField, _FieldManager, _Utility) { Object.defineProperty(exports, "__esModule", { value: true }); var _declare2 = _interopRequireDefault(_d...
true
bc0ed4ad2fac212eb690ea4ef3d6bbad96f46d75
JavaScript
Jahrough/evolution2
/BPS/dsp/web/bps/js/record_utilities/.svn/text-base/person_search_addr_combo.js.svn-base
UTF-8
2,945
2.75
3
[]
no_license
function build_record() { // Read keys from the hash created with KEY_VALUES hidden input in the opener var names = build_name_list(); var ssn = build_ssn_list(); var dods = build_death_list(); var dobs = build_birth_list(dods); var dod = key_lookup('DECEASED'); var address = build_address(...
true
70fc21df8dbcfcb584d8934a25d9a7d602bff386
JavaScript
herom1/extensions
/src/co/common/button.jsx
UTF-8
1,946
2.59375
3
[]
no_license
import React from 'react' import Icon from './icon' const ParseIconString = (s)=>{ var temp = s.split(','); var result = { name: temp[0], micro: false, normal: false } for(var i = 1;i<=temp.length-1;i++) switch(temp[i]){ case "micro":result.micro=true;break; case "normal":result.normal=true;break; ...
true
f1102ed101007fe709543a37e6ddd41fed2e2f85
JavaScript
shlomisas/rediss
/test/types/redisSimpleObject.spec.js
UTF-8
3,574
2.703125
3
[]
no_license
const chai = require('chai'); const config = require('../config'); const RedisClient = require('../../src/utils/redisClient'); const RedisSimpleObject = require('../../src/types/redisSimpleObject'); let assert = chai.assert; describe('Redis Simple Object', () => { let _ttl = process.env.TRAVIS ? 5 : 2; // in s...
true
2cbe60a743bf089d44811c76d6db28a15ea3ed63
JavaScript
matheushso/avaliacao-ouvidoria-aep-esoft7s
/front/src/components/formulario.js
UTF-8
8,334
2.53125
3
[]
no_license
import React from 'react' import { useLocation } from 'react-router' import Logo from '../img/Logo.png' import '../style.css' import axios from 'axios' import { useHistory } from 'react-router-dom' const Formulario = () => { const history = useHistory(); const location = useLocation(); var protocolo = loc...
true
5bb6f04e1b038978044df7b8ee6e36f2051ece01
JavaScript
benthere914/recursive-problems
/problems/01-sum-to-n.js
UTF-8
985
4.03125
4
[]
no_license
/*********************************************************************** Write a recursive function called `sumToN` that takes in a number and returns the sum of all the numbers from 0 to that number. Return null for any input number below 0. Examples: sumToN(5) // returns 15 sumToN(1) // returns 1 sumToN(9) // ret...
true
97af1cc43e34df5246429c2d3d8354dc854c6026
JavaScript
adrianmendez03/algos
/javascript/tree/sum_of_digit_paths_in_a_tree.js
UTF-8
681
3.8125
4
[]
no_license
// You are given a binary tree root with each node containing single digits from 0 to 9. Each path from the root to the leaf represents a number with its digits in order. // Return the sum of numbers represented by all paths in the tree. /** * class Tree { * constructor(val, left=null, right=null) { * this.v...
true
46d0c15aa8be034516f8a6850577ef7b15eca2e6
JavaScript
oyite/trial
/church/church.js
UTF-8
440
2.859375
3
[]
no_license
const navImg = document.getElementById('nav-img'); const navList = document.getElementById('nav-list'); let toggle = false; navImg.addEventListener('click', ()=>{ if(toggle == false){ navList.style.visibility = "visible"; navList.style.opacity = 1; toggle = true; ...
true
75113cb687f74b293b8d01872d6571b9dad862f5
JavaScript
jamespmernin/Looping-Practice-Exercise
/exercises.js
UTF-8
3,167
4.1875
4
[]
no_license
//Exercise 1 let temp = 200; if (temp <= 32) { console.log("Watch out for ice."); } else if (temp <= 55) { console.log("Better put on a jacket."); } else if (temp <= 70) { console.log("Such nice weather we're having."); } else if (temp <= 99) { console.log("Summer is here."); } else if (temp === 212 || temp ===...
true
a8fce4e78c5731f5a3a17972aaabcbcacc6877a6
JavaScript
fumeco/fumeco.github.io
/freeway/sketch.js
UTF-8
1,108
2.796875
3
[]
no_license
function setup() { createCanvas(600, 400); } function draw() { if(frameCount > 400){ if(placarOponente <5 && meuPlacar <5) jogar(); else verificaVencedor(); }else{ telaInicial(); } } function jogar() { background(imgEstrada); mostraVaca(); movimentaVaca(); mostraCarros(); mo...
true
e889eec753b49e04eeb926ef5b06dfa9826995bd
JavaScript
ashish8796/chambal
/js/feature.js
UTF-8
7,254
2.609375
3
[]
no_license
function function1() { document.getElementById("item10").remove(); document.getElementById("item11").remove(); document.getElementById("item12").remove(); document.getElementById("item13").remove(); document.getElementById("item14").remove(); document.getElementByI...
true
4a3811df17299337bda3cbf9f724fd8f07d55144
JavaScript
BorislavN/angular-project
/api/controller/offerController.js
UTF-8
5,397
2.515625
3
[]
no_license
const { offerModel, carModel, userModel } = require("../model"); function getAllOffers(req, res, next) { const page = req.query.page || 1; let skipCount = (+page - 1) * 10; offerModel.countDocuments() .then(value => { if (skipCount < 0 || value < skipCount) { skipCount ...
true
a901eca25738e309a0f5b44c6286a6cc49eef811
JavaScript
karim007/dataStucture.js
/src/dataStructures/queue.js
UTF-8
358
3
3
[]
no_license
class queue{ constructor(){ this.datas=[]; } print(){ console.log(this.datas) } enqueue(e){ this.datas.push(e); } dequeue(){ return this.datas.shift(); } front() {return this.datas[0];} size() {return this.datas.length} isEmpty(){return this.data...
true
c121fa127195bfa30aec4f9d8101823f98e3580a
JavaScript
reisair/projects
/HTML CSS/Populating Data/axiosTask5.js
UTF-8
780
3.21875
3
[]
no_license
import axios from "axios"; const getData = async (url) => { const todosResponse = await axios.get(url); let todos = todosResponse.data; if (!Array.isArray(todos)) { todos = [todos]; } const usersResponse = await axios.get( "https://jsonplaceholder.typicode.com/users/", ); const users = users...
true
8628c7e5e71ba8a314975bdc52e86c1c3b476a06
JavaScript
Leil-ish/interview-prep
/LinkedList.js
UTF-8
4,184
3.78125
4
[]
no_license
function Node(value) { return { value, next: null } } class LinkedList { constructor() { this.head = null; this.tail = null; this.length = 0; } push(value) { const node = Node(value); // The list is empty if (this.head === null) { t...
true
e0c56dec04a3ac50dc1842cc0bae44e1ea8e51a4
JavaScript
alexlitty/randar
/modules/wrapper/Project/Project.js
UTF-8
5,802
2.96875
3
[ "MIT" ]
permissive
const fs = require('fs'); module.exports = (randar) => { /** * A Randar Project, in all its glory. * * Every project, at its core, simply has items and folders. Folders are * used by the UI to organize items; They serve absolutely no functionality * otherwise. * * "Bins" are just...
true
bacc815434f3075839b2b753954278fdd8c8cf7b
JavaScript
yitchoong/sample-gl
/app/containers/HomePage/saga.js
UTF-8
3,490
2.765625
3
[ "MIT" ]
permissive
/** * Gets the repositories of the user from Github */ import { call, put, select, fork, takeLatest, takeEvery, all } from 'redux-saga/effects'; // import { LOAD_REPOS } from 'containers/App/constants'; // import { reposLoaded, repoLoadingError } from 'containers/App/actions'; // import { makeSelectUsername } from '...
true
9aa6c9a1ae914fa0c850cbfec2562be68291a0cb
JavaScript
kuhnboy/homebridge-alarmdecoderplatform
/index_getzonestate.js
UTF-8
30,711
2.59375
3
[ "Apache-2.0" ]
permissive
var http = require('http'); var request = require("request"); var waitUntil = require('wait-until'); var Accessory, Service, Characteristic, UUIDGen; /** * Homebridge AlarmDecoder platform module. * @module homebridge-alarmdecoderplatform * @see module:homebridge-alarmdecoderplatform * * A platform plugin regist...
true
f212fea874ef6c514252274cdbd177b457b1542d
JavaScript
SSG-Backend/Sixth-Task
/Abeeb/server.js
UTF-8
637
2.5625
3
[]
no_license
// Require modules const express = require("express"); const morgan = require("morgan"); const bookRouter = require("./routes/bookRoute"); // Execute express const app = express(); // Middlewares app.use(express.json()); app.use(morgan("dev")); app.use((req, res, next) => { req.requestTime = new Date().toISOString(...
true
4feacf95b96abf9af59cd1c1e318d2c437e62d6a
JavaScript
thiagop1985/AlexaSkills-noellelacharite
/uPray/src/index.js
UTF-8
7,496
2.65625
3
[]
no_license
/** Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the "license...
true
e0379ba605828cc790f479bb4d4b166895f4ac90
JavaScript
suzukik1992/FFT-InverseFFT_Gen
/FFT-inverseFFT/code/js_butterflyIndex.js
UTF-8
1,408
3.03125
3
[]
no_license
autowatch = 1; var butterfly_256 = new Buffer("butterfly_256samp"); var butterfly_512 = new Buffer("butterfly_512samp"); var butterfly_1024 = new Buffer("butterfly_1024samp"); function bang(){ butterfly_256.send("sizeinsamps", 256); butterfly_512.send("sizeinsamps", 512); butterfly_1024.send("sizeinsamps",...
true
c7349539de3b4b0d5cb8b4065fa394d6efdb37d6
JavaScript
seen2/restApi
/routes/usersRoutes.js
UTF-8
927
3.203125
3
[]
no_license
let usersDatabase = []; export const createUser=(req, res) => { // res.send("post route reached"); const user = req.body; usersDatabase.push({ ...user, id: Date.now() }); // res.send("Hello"); res.send(`added user ${user.firstName}`); }; export const getUsers=(req, res) => { res.send(usersDatabase); }...
true
6f11151979ba65bb1ba9e570ec209d7876d75f89
JavaScript
BathMASH/learnmaths
/assets/modesCalc.js
UTF-8
8,944
3.25
3
[]
no_license
function printvis(num) { var vis = ""; vis += '<div id="vis_desc">'; vis += '<div class="logofloat"><img src="images/vis_sing.gif" alt="" width="100" height="100" /></div>'; vis += '<h3>Visual Learners</h3>' vis += '<p><strong>have a preference for learning from graphs and diagrams representing inf...
true
3c23a6e61a080261f171481b1ec7daa111fa0bd7
JavaScript
aleclivinghouse/theNews
/newsApp/static/js/app.js
UTF-8
1,011
2.546875
3
[]
no_license
$.getJSON("https://graph.facebook.com/time/?fields=fan_count&access_token=2105558582997469|Tpq1HU_tE_nsBPyg-_IxA0JMD88", function(facebook_info){ var facebook = facebook_info.fan_count; $(".facebook-followers").text(facebook); }); // $.getJSON("https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UC...
true
d20b12395629e6c2f8ceef571ddec2708da176aa
JavaScript
arout010/PHP-project-Continueed...-
/MyProject/javascript.js
UTF-8
1,417
2.78125
3
[]
no_license
function val() { var x1=document.form.fname.value; { if(x1 != "") { for(i=0;i<x1.length;i++) { if(!((x1.charCodeAt(i) >= 65 && x1.charCodeAt(i) <= 90 ) || (x1.charCodeAt(i) >= 97 && x1.charCodeAt(i) <= 122 ))) { alert("Please Enter letters only in Fna...
true
3f43abb7a383a7e6c3da7320414483f80201e0e9
JavaScript
RafaelSdm/Curso-de-JavaScript
/cursojs/aula13-pt2/script.js
UTF-8
1,711
3.421875
3
[ "MIT" ]
permissive
function analisar(){ var data = new Date() var ano = data.getFullYear() var nascimento = window.document.getElementById('idade') var resposta = window.document.getElementById('res') if(nascimento.value.length ==0 || nascimento.value > ano){ window.alert('Verifique os dados e tente novamen...
true
56448beb2e02d6c629e8839496830fbcc31c12b5
JavaScript
pryz25/reveal-my-story
/react-client/src/index.jsx
UTF-8
2,336
2.640625
3
[]
no_license
import React from 'react'; import ReactDOM from 'react-dom'; import faker from 'faker'; import $ from 'jquery'; import Display from './components/Display.jsx'; import CustomStory from './components/CustomStory.jsx'; import Recovery from './components/Recovery.jsx'; import adjective from './possibilities/adjective.jsx';...
true
cfc59e2e08775b6cd852b8e581ab9b08ca9310b6
JavaScript
38b3eff8/practice-code
/css/practice/turn_pic/app.js
UTF-8
1,465
3.03125
3
[]
no_license
window.onload = function () { var items = document.querySelectorAll('.item'); items.forEach(function (item, index) { var y = -Math.floor(index / 4) * 4; var x = -index % 4 * 4; var divs = item.querySelectorAll('div'); setStyle(divs[0], { 'background-position': `${x}...
true
668c63a7afd596b069705ee0ba9eac706d182540
JavaScript
pnn2104/LeetCode-Solutions-in-JavaScript
/src/112.PathSum.js
UTF-8
2,153
3.90625
4
[]
no_license
function TreeNode(val) { this.val = val; this.left = null; this.right = null; } var hasPathSum = function(root, sum) { if (!root) return false; let stack = []; stack.push([root, root.val]); while (stack.length > 0) { var current = stack.pop(); var node = current[0]; ...
true
5a6bca1531a83822b5183a9dca288fabc146cbb1
JavaScript
Vibs/Portfolio_Node
/app.js
UTF-8
1,415
2.90625
3
[]
no_license
// imports express and saves in variabel const express = require("express"); // instatiates express const app = express(); // siger at de DTO'er vi bruger er json app.use(express.json()); app.use(express.static(__dirname + '/public')); /* NAVBAR LINKS */ app.get("/:language", (req, res) => { const language = req...
true
12b19ecc985897e9b0dcbc71bb92a62a9fb3fab4
JavaScript
avirawat/Login-page
/src/validateInfo.js
UTF-8
769
2.96875
3
[]
no_license
export default function validateInfo(values) { let errors = {}; if(!values.username.trim()) { errors.username="User Name Required"; } if(!values.email) { errors.email="Email Required"; } else if(!/^[A-Z0-9._%+-]+@[A-Z0-9._]+\.[A-Z]{2,}$/i.test(values.email)) { err...
true
0f80b64c4e8f6bc75634b2a0a78a3ef0ed91fb3e
JavaScript
a-imran99/rjs
/src/components/NameList.js
UTF-8
1,789
2.671875
3
[]
no_license
import React from "react"; import Person from "./Person"; function NameList() { const names = [ { id: 1, first_name: "Geri", email: "gparrot0@yellowpages.com", gender: "Male", }, { id: 2, first_name: "Loydie", ...
true
94c62c24e2a482b81d060a3fdc35eaba51670a77
JavaScript
Maurria/PHP-Login-Cadastro
/js/cursoView.js
UTF-8
807
2.6875
3
[]
no_license
class cursoView { constructor(elemento) { this.elemento = elemento; } adcCurso(model){ model = ` <div class="curso" id="cursoo"> <img src="../img/logo.png" alt="Logo" /> <div class="curso-info"> <h4>Docker: Ferramenta essencial ...
true
85966db73c4bb8c2b80f4981ed03a2fead6547d5
JavaScript
phihainguyen/Data-Selfie
/javascript/app.js
UTF-8
5,971
3.296875
3
[]
no_license
// 1) NODE is used here to install our node packaging such as express to help us create our web server for our web application. // we used npm install, and by npm init to import and created a package.json file //so far the server's job is to serve up any files in our "public" directory, which is index.html console.lo...
true
df384cd8be37b19344133d17749efd572e9ff12f
JavaScript
satiri/data-warga
/src/model/kependudukan.js
UTF-8
1,051
2.828125
3
[]
no_license
/** * menghitung jumlah nomor kk dan pengecekan lainnya * @param {*} nomor */ const validasiNomorKartuKeluarga = function (nomor) { } /** * membuat format agar ada strip dan titik * @param {*} nomor */ const formatNomorKartuKeluarga = function (nomor) { } /** * menghitung jumlah nomor ktp dan pengecekan lain...
true
69e4a923e1394c3d8a60222a399f60aaecdd79ed
JavaScript
andrewblim/aroundthehorn
/js/main.js
UTF-8
24,028
2.859375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function parseAsOfDate(date) { var monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; var dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; return dayNames[date.getDay()] + ' ' + date.getDate() + ' ' + monthNames[date.getMonth()] + ' ' + date.getFullYear()...
true
4bcc22c6f4be059201a4ddf954106fb6a087a779
JavaScript
Sarwar-Putul/advance-JavaScript
/double-vs-triple-equal.js
UTF-8
1,831
3.875
4
[]
no_license
// const first = 0; // const second = 2; // if (first == second) { // console.log("condition is true"); // } else { // console.log("condition is false"); // } // condition is false // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - // const first = 2; // const second = 2; // if (first == second) { // consol...
true
5f8b3a085806c2ddefeeeb3ae02edf233f59c5c6
JavaScript
yktaleb/DiplomaWork
/src/main/resources/static/js/productTypes.js
UTF-8
14,778
2.609375
3
[]
no_license
//pointer for selected item in product-types-list var currentSelected = -1; //page cache var productTypesCache; //bundle of html options for choosing data type var dataTypesHTML; //pagination global variables var amount = 10; //amount of items per page var startPage = 1; var defaultOpts = { //twbs pagination default...
true
8f3d14088b6314feae64e61c84e9c796fba7e12c
JavaScript
fathed/subnettingIMI
/js/ConvertToHex.js
UTF-8
149
3.140625
3
[]
no_license
function ConvertToHex(numberValue){ var decNumber = Number(numberValue); var hexNumber = decNumber.toString(16).toUpperCase(); return hexNumber; }
true
eeb2555f893c456a3b99fa1782f6242bbc58c914
JavaScript
prashantns9/contact-manager-electron
/controller/contacts.js
UTF-8
2,504
2.796875
3
[]
no_license
const { ipcRenderer } = require('electron'); function sendLaunchRequest(mode, index) { ipcRenderer.send("launchContactWindow", mode, index); } function sendDeleteRequest(index) { if (confirm('Are you sure?')) { ipcRenderer.send('contact:delete', index); } } function updateContactsList(contacts) {...
true
5454ad414d01c0f5f745bbdcb6d2423cd83b14b4
JavaScript
burrows/zoom
/spec/array_controller_spec.js
UTF-8
16,547
3.09375
3
[]
no_license
(function() { if (!this.Z) { require('./helper'); } var Person, p1, p2, p3, p4; Person = Z.Object.extend(Z.Observable, function() { this.prop('first'); this.prop('last'); }); p1 = Person.create({first: 'Theon', last: 'Greyjoy'}); p2 = Person.create({first: 'Davos', last: 'Seaworth'}); p3 = Person.create({first:...
true
8a51bb18a505f8879d68848798ac8c31589890ff
JavaScript
guang922/style-website
/main.js
UTF-8
268
2.796875
3
[]
no_license
function showMobileMenu(){ let mobileMenu = document.querySelector("#mobile-menu"); mobileMenu.style.display = "block"; } function closeMobileMenu(){ let mobileMenu = document.querySelector("#mobile-menu"); mobileMenu.style.display = "none"; }
true
e8c92a483232851f365dd9b45a0b0e218938ecec
JavaScript
N18AJ/PruebaVisual
/js/tema2/extra/practicaE/script.js
UTF-8
3,961
4
4
[ "MIT" ]
permissive
/* Ejercicio 1 Realiza un script que muestre la siguiente figura: * *** ***** */ //Creación de variables para consterior entrada de valor por teclado var fila = 3; var vista; //Visualización de las operaciones //valor minimo 1 for (var i = 1; i <= fil...
true
e1ece1cb37a2b68826d63d8429f0a060348c026b
JavaScript
viktech2/ecmajs
/date_validate.js
UTF-8
1,817
3.1875
3
[]
no_license
const moment = require('moment'); const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const states = [ { "state": "submitted", "start_time": "2020-06-29 11:43:59", "end_time": "2020-06-29 11:44:08" }, { "state": "paused", "start_time": "2020-07-10 00:45:09", "end_time": "2020-07-1...
true
59736aedb751592e186379fffc1a04af6802de5a
JavaScript
techeverri/exchange-rates-react
/src/utils/retrieveInitialCountries.js
UTF-8
455
2.71875
3
[ "MIT" ]
permissive
import uniqueBy from "lodash.uniqby" import { COUNTRIES_LOCAL_STORAGE_KEY } from "config" const retrieveInitialCountries = () => { const storedCountries = JSON.parse(localStorage.getItem(COUNTRIES_LOCAL_STORAGE_KEY)) || [] const initialCountries = storedCountries.concat([ { name: "Colombia" }, { name:...
true
374a58ea6c9a76c49a01d95dca66f56b2f523348
JavaScript
Vulpeys/Nodeschool
/js/functional_javascript/recursive.js
UTF-8
302
2.65625
3
[]
no_license
module.exports = function reduce(arr, fn, initial) { } function countWords(inputWords) { return inputWords.reduce(function (prevValue, currValue) { if (prevValue[currValue]) { prevValue[currValue]++; } else { prevValue[currValue] = 1; } return prevValue; }, {}); }
true
a4a33927555ef72f40a51becc39ace55ed832ac8
JavaScript
carlypecora/react-event-system-lab-nyc-web-career-042219
/src/components/EyesOnMe.js
UTF-8
267
2.796875
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
import React from 'react' export default class EyesOnMe extends React.Component { foo = () => { console.log("Good!") } bar = () => { console.log('Hey! Eyes on me!') } render(){ return ( <button onFocus={this.foo} onBlur={this.bar}></button> ) } }
true
956077d12f2264d04b1cd45706d16a948cd106a1
JavaScript
Robinsingh2025/bombay-vanilla-js
/recipe.js
UTF-8
5,141
3.59375
4
[]
no_license
const step_Container = document.getElementById('steps-Container'); const alert = document.getElementById('error-Alert'); const heading = document.getElementById('heading'); function createNode(element) { return document.createElement(element); // Create the type of element you pass in the parameters } function appe...
true
b6a7e573c4cdc0cd48ee4a80e32ec370a85e3406
JavaScript
zphelj/fed-5-capstone
/src/client/js/travel_functions.js
UTF-8
4,217
3.203125
3
[ "LicenseRef-scancode-public-domain" ]
permissive
// This module contains helper functions and external API calls use by the main application // Key's for API's const geonames__userid = 'zphelj'; const WEATHERBIT_API_KEY='22e6157488974eb7920ef907799afef9'; const PIXABAY_API_KEY='18324887-bfafd27bcc06a34251f07828a'; // Handy functions, with some tweaks I made, from S...
true
f0c637d9e9a68c4ae1ee2ee7270f6a99180440d2
JavaScript
Idklol918/ark
/commands/totalbans.js
UTF-8
830
2.515625
3
[]
no_license
module.exports.run = async (client, message, args, Discord) => { message.guild.fetchBans().then(bans => { if(bans.size == null){ bans = 0 let boticon = client.user.displayAvatarURL(); let botembed = new Discord.MessageEmbed() .setDescription("Total Bans") .setColor("0ED4DA...
true
1af3d7302f3ad214ddf26257be8984a156521274
JavaScript
ClaireE93/JavaScript30
/01 - JavaScript Drum Kit/index.js
UTF-8
850
3.078125
3
[]
no_license
class Drumkit { constructor() { this.addListener(); } addListener() { window.addEventListener('keydown', (e) => {this.handleKey(e, true)}); window.addEventListener('keyup', (e) => {this.handleKey(e, false)}); } handleKey(e, isKeydown) { const key = e.keyCode; const [div, audio] = documen...
true
516767034f69f28efa19aded088f9a1f29c69b0f
JavaScript
magictracks/itp-resource-collector
/browser-extension-ff/components/countBtn.js
UTF-8
606
2.640625
3
[]
no_license
var Component = require('choo/component') var html = require('choo/html') // your store comes from index :) class CountBtn extends Component { constructor(name, state, emit) { super(name); this.state = state; this.emit = emit; this.increment = this.increment.bind(this); } update() { retu...
true
888b3d82fa4f2ef5fb6507a1a8972a40901623a7
JavaScript
AlexScheauaStefanini/Tangram
/utils/dataManipulation.js
UTF-8
1,443
2.53125
3
[]
no_license
const getLevels = require('./levels') let Data = { setAvgTime: (player, timesArr) => { let totalTime = 0; for (let i = 1; i < timesArr.length; i++) { // i = 1 to exclude tutorial from the leaderboards totalTime += timesArr[i].timeScore; } return { name: player, avgTi...
true
02329f4ae3a25f45347d3636922263d0e9343c43
JavaScript
oneEyedSunday/project_afang
/js_src/twoSum.js
UTF-8
680
3.59375
4
[]
no_license
/** * @param {number[]} nums * @param {number} target * @return {number[]} */ var twoSum = function(nums, target) { let index = 0; let found = false; while (!found && index < nums.length) { let secIndex = nums.indexOf(target - nums[index]); if (secIndex > -1 && secIndex != index) { ...
true
c97223aed517bff40af552dde2858615aab9828e
JavaScript
colipsone/meet-friends-old
/mf-frontend/services/eventsService.js
UTF-8
1,221
2.609375
3
[]
no_license
let ServiceBase = require('./serviceBase'); let UserService = require('./userService'); class EventsService extends ServiceBase { constructor() { super(); this._userService = new UserService(); this._currentUser = this._userService.currentUser; } getEvents(responseCallback) { ...
true