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
5513bea1d01b4e68687f5b9d33476320005a3d5e
JavaScript
AnantaFerdinand/mobile_prog2021-s11820001
/pertemuan_06/index.js
UTF-8
3,213
4.8125
5
[]
no_license
//Rabu, 3 Februari 2021 //Array Exercise //1.Array for loop //2. Using Array.forEach() let people = ["Greg", "Mary", "Devon", "James"]; for (let i = 0; i < people.length; i++) { console.log (people [i]); } people.forEach (function (item, index, array) { console.log ("value: " + item + ", index: " + index + ", array: ...
true
f70e9dccd1dcce43a691e98ff03bd53d78d9546b
JavaScript
abidtalukdar/jsdom-fetch-dog-ceo-challenge-nyc04-seng-ft-012720
/src/index.js
UTF-8
1,998
3.8125
4
[]
no_license
// CHALLENGE 1 const dogContainer = document.querySelector("#dog-image-container") const breedDropdown = document.querySelector("#breed-dropdown") const fetchDogImages = () => { return fetch("https://dog.ceo/api/breeds/image/random/4") .then(response => response.json()) } fetchDogImages() .then(do...
true
8f5dc4bb54bf8f38fbd2c78bc53edc7ec65e5efd
JavaScript
RongIsAmazing/utils
/lib/string.js
UTF-8
457
3.453125
3
[]
no_license
/** * Make a long string shorter and end with "…" * * e.g.: ellipsis('helloworld!', 5) // "hello…" * * @export * @param {string} str * @param {number} limit chars to keep * @returns {string} */ function ellipsis(str, limit) { if (typeof str !== 'string') { throw new Error(JSON.stringify...
true
e58f648fb16e9334c9f47bf5dc9ed539ceac15e6
JavaScript
FlorianMorel80/JavaScript-Partie-6---Les-boucles
/exercice-05/assets/js/script.js
UTF-8
192
3.171875
3
[]
no_license
let firstNumber = 2; let secondNumber = 1; while (secondNumber < 250) { document.write('<div>' + firstNumber * secondNumber + '</div>'); secondNumber += firstNumber * secondNumber; }
true
04ae1ea627d72d145afa249e42ce031e90c40bdb
JavaScript
jamboid/static-site-starter
/source/_assets/js/modules/Showhide/Showhide.js
UTF-8
3,652
3.03125
3
[ "MIT" ]
permissive
// Show/Hide Components module "use strict"; ///////////// // Imports // ///////////// import "nodelist-foreach-polyfill"; import PubSub from "pubsub-js"; import { collapseElement, expandElement, createDelegatedEventListener, messages as MESSAGES } from "@wearegood/good-utilities"; /////////////// // Constants // //...
true
e6eef3b6122777d92bf9e5cb438ed16852b5b8a5
JavaScript
qwop/userscript
/monolith/82/133941.user.js
UTF-8
1,543
2.703125
3
[]
no_license
// ==UserScript== // @name Hiszilla Neuanlage Zielversion // @namespace his // @description Bei Hiszilla-Tickets die Zielversion umsortieren und den aktuellen Branch hervorheben // @include https://hiszilla.his.de/hiszilla/* // @version 1.1 // ==/UserScript== var lbList = document.getElements...
true
9ef9f4e819b8abeba8442459c09510a59dae413d
JavaScript
JawanTechPk/Web-Sat-Section-E-9am-12pm
/class 21/app.js
UTF-8
3,331
3.828125
4
[]
no_license
// alert("HELLO WORLD...") // var firstName = undefined; // firstName = "Jaffar" // console.log(firstName); // var names = ; // console.log(names) // if( null ){ // alert("if condition") // }else{ // alert("else condition") // } //// if else/// // var a = 9; // if(a !== 10){ // console.log("i...
true
8464a53ef6f2ff1d44a1dc4e45082a00012a1ed6
JavaScript
pamanow/daily-coding-problem
/src/tasks/nonDecreasingArray/nonDecreasingArray.spec.js
UTF-8
704
2.875
3
[]
no_license
import { expect } from "chai"; import couldBecomeNonDecreasing from './nonDecreasingArray'; describe("CouldBecomeNonDecreasing function", () => { it('should return true when array could be non-decreasing by one modification', () => { const input = [10, 5, 7]; expect(couldBecomeNonDecreasing(input)).to.equal...
true
69ae2eb0669c45588ce3adf907a2b65d72caa2ce
JavaScript
h5codefans/urlresource
/node/01_HelloWorld.js
UTF-8
381
2.71875
3
[]
no_license
//require表示引包,引包就是引用自己的一个特殊功能 var http=require("http"); //创建服务器,参数是一个回调函数,表示如果有请求参数,要做什么 var server=http.createServer(function(req,res){ res.writeHead(200,{"Content-type":"text/html;charset=UTF-8"}); res.end("哈哈哈,这是页面"); }); server.listen(3000,"127.0.0.1");
true
1bd61c726020c9c8cd5cc22a5377ba8c3f3db40b
JavaScript
jameshyen/coin-game
/server/game.js
UTF-8
4,003
3.140625
3
[]
no_license
/* * Server side game module. Maintains the game state and processes all the messages from clients. * * Exports: * - addPlayer(name) * - move(direction, name) * - state() */ const { clamp, randomPoint, permutation } = require('./gameutil'); // https://www.npmjs.com/package/redis const redis = require('re...
true
995541e7914b28215aedf5a51dbfbd7894affdc3
JavaScript
saru-d2/linkedin-lite-mern
/backend/validators/recruiter/editRecValidator.js
UTF-8
684
2.671875
3
[]
no_license
const Validator = require('validator'); const isEmpty = require('is-empty'); function editRecValidator(data) { var errors = {} if (isEmpty(data.name)) { data.email = ''; errors.name = 'please enter your email' } if (isEmpty(data.contactNumber)) { errors.contactNumber = 'please enter a number'; ...
true
43c458493ea11d3162771b60e99931bdd50fc573
JavaScript
EM520/daily-excercises
/week2/wk2d4-main.js
UTF-8
4,061
3.875
4
[]
no_license
/////////////////////////////////////////////////////// /////////////////////////////////////////////////////// //// ______ _ _ //// //// | ___| | | (_) //// //// | |_ _ _ _ __ ___| |_ _ ___ _ __ //// //// | _| | | | '_ \ / __| __| |/ _ ...
true
60d4d19ab90c172feebb7172c414de0feff9e53e
JavaScript
mhern90/portfolio-site
/public/js/script.js
UTF-8
2,989
3.15625
3
[ "MIT" ]
permissive
'use strict'; /* * Author: Melinda Hernandez * Version: 1.0 * Date: 3/2/2017 */ /* Function List */ // calcScrollTop calculates the distnce between function calcScrollTop(element) { var scrollTop = $(window).scrollTop(); var elementOffset = element.offset().top; if (scrollTop >= elementOffset &&...
true
c2e3533e376234592bcc349c19600d29b10985a1
JavaScript
LiubavaL/luviii
/models/User.js
UTF-8
1,150
2.5625
3
[]
no_license
const mongoose = require('mongoose') const bcrypt = require('bcrypt') const saltRounds = 10 const UserSchema = new mongoose.Schema({ name: {type: String, requred: true, default: () => { return `user${new Date().getTime()}` }}, email: {type: String, required: true, unique: true}, password: {typ...
true
41197310c82a82c4ce6180d7d53ef2ee84ce5334
JavaScript
lufli/stock_chart
/frontend/src/components/StockChart.jsx
UTF-8
1,981
2.53125
3
[]
no_license
import React, { Component } from 'react'; import ReactTable from 'react-table'; import "react-table/react-table.css"; export default class StockChart extends Component { constructor(props) { super(props); this.state = { dataset_data: null, current: 'AAPL', } this.record = {}; this.ma...
true
88b77209fdae98d98e418c99c71e2e5df0a2b547
JavaScript
evilword666/Openvidu_React_BM
/openvidu-call-react/src/components/temporizador/Temporizador.js
UTF-8
6,216
2.625
3
[ "Apache-2.0" ]
permissive
import React from "react"; import ReactDOM from "react-dom"; class TimerInput extends React.Component { //Esta linea va en lugar del cronometro en el archivo VideoRoomComponent.js /* <TemporizadorApp minutosRestantes = {this.state.minutosRestantes} ...
true
ee442dc2fa193caaaad16a60b76ad2fa2c568828
JavaScript
victorgmp/leetcode-problems
/code/27.removeElement.js
UTF-8
395
3.65625
4
[]
no_license
/** * @param {number[]} nums * @param {number} val * @return {number} */ const removeElement = (nums, val) => { let pointer = 0; for (let i = 0; i < nums.length; i++) { if (nums[i] !== val) { nums[pointer] = nums[i]; pointer += 1; } } return pointer; }; // const nums = [0, 1, 2, 2, 3,...
true
1743ec65e0eb86a29b435f08439c0b0cf01aab63
JavaScript
lakshmanavula/ui
/bootstrap/js/async.js
UTF-8
1,997
3.703125
4
[]
no_license
cityName = document.querySelector("#cityName"); showResult = document.querySelector("#showResult"); apikey = "5gvuZ2zKdQBcjIjNSYRJPrBFXbGML6oL" getWeatherInfo = async function(cityCode){ baseUrl = `http://dataservice.accuweather.com/currentconditions/v1/${cityCode}` url = `${baseUrl}?apikey=${apikey}...
true
ed6572714629789d3524b028c143b08f641d80b0
JavaScript
SergeyShkredow/angular_uran
/server/app/routes/data.js
UTF-8
1,335
2.546875
3
[]
no_license
var fs = require('fs'); function filereader(fsRef, path) { return new Promise(function(resolve, reject) { fsRef.readFile(path,'utf8',function(e,d){ if(e) reject('E R') else resolve(JSON.parse(d)); }) }) } function getServiceList(req, res) { var servicePromise = f...
true
6a9913cd366466d3041c65b9572c5d4b7ea4b297
JavaScript
pnm443728906/guan-
/1201课件/node课件/05-server-1.js
UTF-8
629
2.796875
3
[]
no_license
var http = require("http"); //创建一个服务 var server = http.createServer(function(req,res){ // console.log(req); //有很多信息 console.log(req.url); //路径有关 //中文乱码!处理!在请求头中添加编码格式 res.writeHead(200,{"Content-Type":"text/plain;charset=UTF8"}); //根据请求的地址,判断回馈信息 switch(req.url){ case "/1.html": res.write("中文11111111...
true
eb76abef273df460f653b34d70531e0a05106da3
JavaScript
jvanfox/TriviaGame
/assets/javascript/app.js
UTF-8
3,426
3.21875
3
[]
no_license
//Max Time limit 20 seconds per question var myVar; function startTimer() { myVar = setInterval(function(){myTimer()},1000); timelimit = maxtimelimit; } //Timer Function function myTimer() { if (timelimit > 0) { curmin=Math.floor(timelimit/60); cursec=timelimit%60; if (curmin!...
true
d64600d3bac72eb7c2a264b577075661e62ff64e
JavaScript
IvayloSavov/JS-Basics
/JS Nested Loops/trainTheTrainers.js
UTF-8
731
2.96875
3
[]
no_license
function solve (input){ countJudges = Number(input[0]); let i = 1; line = input[i]; let allGrades = 0; let totalCountGrades = 0; while (line !== "Finish"){ let presentationName = line; let grade = 0; for (let j = 1; j <= countJudges; j++){ totalCountGrades ++;...
true
90ec232da861af885474212813d5acdc062e9a4f
JavaScript
DavidCurca/Exercitii-Engleza
/scripts/conj.js
UTF-8
13,730
2.875
3
[]
no_license
const verbe = [ "Beat", "Become", "Begin", "Bend", "Bet", "Bid", "Bite", "Blow", "Break", "Bring", "Build", "Burn", "Buy", "Catch", "Choose", "Come", "Cost", "Cut", "Dig", "Dive", "Do", "Draw", "Dream", "Drive", "Drink", "Eat", "Fall", "Feel", "Fight", "Find", "Fly", "Fly","Forget","Forgive"...
true
9c10cc59540654ab6ea498f35de374f557706bd5
JavaScript
JofHurtbot90/vschool-assignments
/test/test.js
UTF-8
1,715
3.53125
4
[]
no_license
// var chai = require('chai'); // var assert = chai.assert; // // var palindrome = require('./app.js'); // describe("A function to check if two arguments add up to 4",function(){ // it("Should return true if the arguments add up to 4", function() { // assert.equal(add(2,2)) // }); // it("Should return false if the ...
true
e3941585e789f72d54707b2fd96ac405cf5d048d
JavaScript
carmenOchoa/hotelApp
/js/historial.js
UTF-8
980
2.578125
3
[]
no_license
var historial = { pr: null, di: null, th: null, db: null, //variable de base de datos guardarHistorial: function(pr, di, th){ almacen.pr = pr; almacen.di = di; almacen.th = th; //objeto de la base de datos almacen.db = window.openDatabase("h...
true
678b61802f6c2b4642586f9d0ded3c84605fd950
JavaScript
dingge-r/collection-calculate-camp
/practices/collectionOperator/get_intersection.js
UTF-8
341
2.765625
3
[]
no_license
'use strict'; function get_intersection(collection_a, collection_b) { //在这里写入代码 var r=[]; for(var i=0;i<collection_a.length;i++){ for(var j=0;j<collection_b.length;j++){ if(collection_a[j]===collection_b[i]){ r.push(collection_a[j]); } } } return r; } module.exports = get_interse...
true
77ae0832f81e381b3d912223849d9372b376722e
JavaScript
majjikishore007/Devsnest
/frontend/day13/script.js
UTF-8
1,110
3.5
4
[]
no_license
var button = document.querySelector('.generate'); console.log(button); var display = document.querySelector('.display'); console.log(display); var array = []; const getRandomMemes = () => { fetch('https://meme-api.herokuapp.com/gimme/10') .then(response => response.json()) .then(data => { ...
true
a7f39018577f526b651f1090898fe8e0472d2206
JavaScript
rafalmiler77/autocompletion
/src/state/actionCreators.js
UTF-8
1,173
2.609375
3
[]
no_license
import { FETCH_USERS__BEGIN, FETCH_USERS__SUCCESS, USER_NOT_FOUND, FETCH_PEOPLE_BEGIN, FETCH_PEOPLE_SUCCESS, FETCH_PEOPLE_FAILURE, } from './actionTypes'; const fetchUser = actualInput => { return dispatch => { dispatch({ type: FETCH_USERS__BEGIN }); if (actualInput.length <= 1) { return fa...
true
6cdb7439a5d479d96ed9962fe2f2567624917c18
JavaScript
hajimon54/Pig-Number-Game
/script.js
UTF-8
2,933
3.59375
4
[]
no_license
'use strict'; //Selecting Documents const score0El = document.querySelector('#score--0'); const score1El = document.getElementById('score--1'); const diceEl = document.querySelector('.dice'); const buttonNew = document.querySelector('.btn--new'); const buttonRoll = document.querySelector('.btn--roll'); const buttonHol...
true
84dcd92d70c1bb97f50fad2443b6955d620ae177
JavaScript
Arthur-Matias/formacao-javascript-mestre-jedi
/missao-estelar/segunda-missao/Arthur-Matias/bootstrap-index/js/main.js
UTF-8
5,071
3.484375
3
[ "MIT" ]
permissive
//Segunda Missão Estelar JS /** Apertem os cintos para adentramos ao hiper-espaço rumo a uma nova Missão Estelar JS!:) */ var missao = "Segunda Missão Estelar JS"; console.log(missao); console.log("A variável 'missao' é do tipo: ", typeof missao); var hiperespaco = new String("Apertem os cintos para ...
true
c14655642a492a8e53b82f07a13ae3aaef8ed736
JavaScript
luaykalboni/ShopApp
/ShopApp/wwwroot/js/site.js
UTF-8
1,002
2.765625
3
[]
no_license
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification // for details on configuring this project to bundle and minify static web assets. // Write your JavaScript code. // <span id="cart-total-qty" class="badge bg-success" data-ac...
true
16b56a02750b848c2db80426efff3d54a99c638c
JavaScript
mattbourke/Earth-Invaders
/js/boardObjects/invader.js
UTF-8
3,576
2.765625
3
[]
no_license
/* the below shape is the first invader from levelsJSON 1 1 1 1 1111111 11 111 11 11111111111 1 1111111 1 1 1 1 1 11 11 */ var invader = { invaderID: 0 , shape : "" , now : [1, 0], fallingSpeed:0 , // start position (very left of screen) pos: [0,0], //get the current div?...
true
93baec584b40c1075fffbbc659cc52b6816de438
JavaScript
TRomesh/RecipiesHub
/server/auth/auth.js
UTF-8
1,484
2.671875
3
[]
no_license
const jwt = require('jwt-simple'); const bcrypt = require('bcrypt-nodejs'); const User = require('../models/user'); function tokenForUser(user){ const timpestamp = new Date().getTime(); return jwt.encode({sub:user.id,iat:timpestamp,usr:user.uname},'asasasas'); } exports.signin = function (req, res, next) { ...
true
6e0ce84910e3a2f205e14008ed75b3d7c0fa518a
JavaScript
Lu1z-Gust4v0/Java.script
/Exercícios-Resolvidos/Modelo2/script.js
UTF-8
1,752
3.34375
3
[ "MIT" ]
permissive
function verificar(){ var data = new Date() var ano = data.getFullYear() var fano = document.querySelector('input#txtano') var res = document.querySelector('div#res') if(fano.value.length ==0 || fano.value > ano ){ window.alert('[Erro] Verifique os dados e tente novamente') }else { var sex = doc...
true
a28919895c5199e05a2f4ec0b5d1a140367658e4
JavaScript
sulemangithub/NodeJSMahapeTraining
/Example01/index03.js
UTF-8
360
3.1875
3
[]
no_license
const add = function(n1,n2,callback){ setTimeout(function(){ let result = n1 + n2; callback(result); },1000); } const substract = function(n1,n2,callback){ setTimeout(function(){ let result = n1 - n2; callback(result); },1000); } module.exports.addition = add; mod...
true
3e42a44b2341d162b6136b35236d25b627922312
JavaScript
followyourhreat/aosiche
/src/utils/dtMqtt.js
UTF-8
1,866
2.546875
3
[]
no_license
/** * Dtston wechat mqtt * @version 0.0.1 * 需要mqtt插件:npm install mqtt --sava * 测试地址:http://testfiles.ourslinks.com:8080/ * 测试的时候可以: * 主题:dt2014/web/e0b94da08400 * 要发送的消息结构:{"project":"yiannuo","type":"status","data":{"refrigerate_switch":"1","today_make_water":"20","total_make_water":"56","raw_water":100...
true
1929af874148eb4495a0368e7261ad204933e99c
JavaScript
Mugabisteven/cohort-4
/skasirye_Test2-07Feb2020.js
UTF-8
1,241
4.25
4
[]
no_license
//Weekend Assignment to comment this code //Determine the greater mark of two tests function tests(test1,test2) { var greater = test1>test2?test1:test2 return greater } //Compute the Course Work mark by taking one mandatory //mark and the greater of two tests then display it function coursework(cswork) { var cou...
true
a45979b8335edebc5fb2c31f67b726d65c5afcf7
JavaScript
ivanhoe-dev/copy-and-play
/cap.js
UTF-8
3,262
2.6875
3
[]
no_license
'use strict'; var INPUT = { TEXT: '<input>', TEXTAREA: '<textarea>' }; var TAG = { BR: '<br>', DIV: '<div>' } var INPUT_CLASS_NAME = 'copyTextInput'; var SUCCESS_MSG_ID = 'copySuccessMsg'; class cap { static init(customOptions) { this.default = { input: { visible: false, ...
true
0465df6163add2c64f29e9dd7b583cc79434d762
JavaScript
zaddeen/sorting_algorithms
/src/App.js
UTF-8
598
2.5625
3
[]
no_license
// Created by Zaddeen Benaissa, July 2020. import React from 'react'; import SortingHome from './SortingHome/SortingHome'; import './App.css'; function App() { return ( <div className="App"> <div id="credits"> <p id="self_tag">Created by: Zaddeen Benaissa</p> <a href="https://github.com/za...
true
203f796e0e180da39a8ba4a86bd6cff1b7e37172
JavaScript
MunifTanjim/minimo
/src/scripts/search/fuse.js
UTF-8
1,158
2.578125
3
[ "MIT" ]
permissive
import Fuse from 'fuse.js' import { appendResults, getJSON, getUrlSearchParam, setSearchingIndicator } from './helpers' const doSearch = (term, fuse, resultsBlock) => { setSearchingIndicator(resultsBlock) let results = term ? fuse .search(term) .map(result => ({ href: result.href, tit...
true
85bb4517d9e75e972181e3e4739345e642b58cbb
JavaScript
Fadwa-estuka/Testbed-Dataset-for-Data-Record-Extraction-and-Alignment
/Dataset 2017/3- Computers/4- Wordpress.com/2- dell-keyword/WordPress.com_files/a.js
UTF-8
32,230
2.671875
3
[ "MIT" ]
permissive
/* Detect-zoom * ----------- * Cross Browser Zoom and Pixel Ratio Detector * Version 1.0.4 | Apr 1 2013 * dual-licensed under the WTFPL and MIT license * Maintained by https://github/tombigel * Original developer https://github.com/yonran */ //AMD and CommonJS initialization copied from https://github.com/zohar...
true
851650482ea05d4fa6e73b25dac861dde69d80df
JavaScript
papu93/MundialF5
/api/controllers/nationalTeam.js
UTF-8
3,772
2.609375
3
[]
no_license
let NationalTeam = require('../models/nationalTeam'); let mongoose = require('mongoose'); function saveNationalTeam(req,res){ let maxId; let find = NationalTeam.find({}).sort({_id:-1}).limit(1); find.exec(function(err,nationalTeams) { if (err) { console.log("Error al buscar el mayor ID"...
true
e957d2e581d75c034c3fb7153b9d777ef518fd01
JavaScript
lyn-ho/leetcode
/medium/378.有序矩阵中第k小的元素.js
UTF-8
843
3.703125
4
[]
no_license
/* * @lc app=leetcode.cn id=378 lang=javascript * * [378] 有序矩阵中第K小的元素 */ // @lc code=start /** * @param {number[][]} matrix * @param {number} k * @return {number} */ var kthSmallest = function(matrix, k) { const n = matrix.length let low = matrix[0][0] let high = matrix[n - 1][n - 1] while (low <= hi...
true
64bc44d49e5ca81bc77e4b4423b7dab43c42c81d
JavaScript
SrujanaDuvvuri/javascript-basic
/6.arrays/2. array-literal.js
UTF-8
527
3.625
4
[]
no_license
var students = ["Uma","Guru","Srujana","Harsha", "Anand"]; console.log(students); var names = ["test1", "test2"] console.log(names) var fruits = ["Apple", "Orange", "banana", "kiwi"] var vegetables = ["Potato", "tomato", "eggplant"] console.log(fruits) console.log(vegetables) var items = vegetables.concat(fruits) ...
true
232bbaf4d4f718826bf5b094fad59dbe49a92e5f
JavaScript
aziznrrn/restaurant-catalogue
/src/scripts/views/pages/favorite.js
UTF-8
1,152
2.671875
3
[]
no_license
import FavoriteRestaurant from '../../data/favorite-restaurant' const Favorite = { async render () { return ` <div class="page-header"> <h2>Your Favorite Restaurant</h2> </div> <restaurant-list></restaurant-list> ` }, messageEmptyList () { const message = document.createEle...
true
1c69ca1ac747a1739f0e318b38af36a5a2e19919
JavaScript
conductorsha/JavaScript
/JavascriptWeek3/alphabetic.js
UTF-8
120
3
3
[]
no_license
console.log(returnAlphabetic("wa")); function returnAlphabetic(text){ return text.split("").sort().join(""); }
true
24e19b225d6400e8881953ec8487852349c22305
JavaScript
FTW-Entertainment-LLC/Fay-Ray
/models/Episode.js
UTF-8
555
2.921875
3
[]
no_license
class Episode { /** * @author Hani Mayahi <hani.mayahi94@gmail.com> * @since 1.0.0 * @param {string} title - The title of the nyaa listing * @param {number} episodeno - Episode number of the nyaa listing * @param {string} torrenturl - Torrent url of the nyaa listing * @param {anime} parent...
true
66a076efeb3dd42e18261a2837237137dd33f7c1
JavaScript
cyphunk/pd-for-phonegap
/www/js/Stats.js
UTF-8
1,966
3.0625
3
[]
no_license
var Stats = function() { var lastT = new Date().getTime(); var T = []; var numFrames = 0; var numSamples = 100; var height = 50; var canvas = document.createElement("canvas"); canvas.style.width = numSamples + 'px'; canvas.style.height = height + 'px'; canvas.width = numSamples * 2; canvas.height = height ...
true
1b4691b1adfffb412ce8360df950e59bf9625344
JavaScript
davidgeismar/timeo-mobile
/fu.js
UTF-8
737
2.8125
3
[]
no_license
const body = new FormData(); //String Key value pair appending to body body.append('KEY', VALUE); body.append('KEY', VALUE); body.append('KEY', VALUE); //Appending file to body body.append(KEY_AS REQUIRED_IN_SERVICE, { uri: PASS_URI_OF_THE_FILE, type: 'image/jpeg', //This is the file type .. y...
true
07802dc245347d62cdcdc229e318404cf6fda3d5
JavaScript
dstichter/Portfolio
/public/js/github.js
UTF-8
2,026
2.90625
3
[]
no_license
$(document).ready(function(){ //Ajax Repo $.ajax({ type: 'GET', url: "https://api.github.com/users/dstichter/repos", success: function (repos){ for(var i = 0; i < repos.length; i++){ $('.list-group').append(getRepos(repos[i])) } } }); //A links AJAX to fill Table $(".list-group...
true
c7566e37de1b0af9fdd3ef15d2f37625f2b86261
JavaScript
ninjagrizzly/webdev-tasks-6
/index.js
UTF-8
2,679
2.78125
3
[]
no_license
describe('Yandex Game Tester', function () { it('should draw invisible cards at start', function() { browser.url('http://panicky-car.surge.sh/'); var result = []; for (var i = 2; i < 8; i++) { var section = browser.element('main section:nth-child(' + i + ')'); result...
true
5a3d362e64f6942a60f91e10f3269400e233edc9
JavaScript
c0dewar10ck/ts-elliot-said-that
/TSElliot/public/js/main.js
UTF-8
3,444
2.765625
3
[]
no_license
var quote = 'error generating quote'; var author = '- TS Elliot'; //Primary Functions: function pickColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++ ) { color += letters[Math.floor(Math.random() * 16)]; } return color; } function generateQuote() { var structure1...
true
4b5d840a3db8186517ff7faaf76326aba173cbb9
JavaScript
zhijiang3/leetcode
/problems/1309.decrypt-string-from-alphabet-to-integer-mapping/solution.test.js
UTF-8
437
2.84375
3
[ "MIT" ]
permissive
import freqAlphabets from "./solution.js"; test("example 1", () => { expect(freqAlphabets("10#11#12")).toBe("jkab"); }); test("example 2", () => { expect(freqAlphabets("1326#")).toBe("acz"); }); test("example 3", () => { expect(freqAlphabets("25#")).toBe("y"); }); test("example 4", () => { expect(freqAlphab...
true
747830c04b42c5ef3bdc36b797a70e690f11fa17
JavaScript
3print/boilerplate
/app/frontend/js/widgets/slider.js
UTF-8
8,395
2.625
3
[]
no_license
// A Slider should have the following minimal structure: // // .slider // .slider-content // .slider-loader // .icon-wrapper= icon 'circle-o-notch', class: 'fa-spin' // // .slider-next // .slider-previous // .slider-wrapper // .slider-items // .slider-item{data: {index: index}} // ...
true
5a90ad6ff83f91607d54c96bf3ff7beba3a29524
JavaScript
zephdev-92/clone-twich
/src/components/Sidebar/Sidebar.js
UTF-8
3,529
2.640625
3
[]
no_license
import React, {useState, useEffect} from 'react' import api from '../../api'; import { Link } from 'react-router-dom'; function Sidebar() { const [topStreams, setTopStreams ] = useState([]) useEffect(() => { const fetchData = async () => { const result = await api.get('https://api.twitch....
true
48455240dc279c594fc4db56df0cfc43374280e2
JavaScript
Hrealm/leetcode-js
/algorithms/101.对称二叉树.js
UTF-8
1,321
3.6875
4
[]
no_license
/* * @lc app=leetcode.cn id=101 lang=javascript * * [101] 对称二叉树 * * https://leetcode-cn.com/problems/symmetric-tree/description/ * * algorithms * Easy (48.86%) * Likes: 479 * Dislikes: 0 * Total Accepted: 64.6K * Total Submissions: 132.2K * Testcase Example: '[1,2,2,3,4,4,3]' * * 给定一个二叉树,检查它是否是镜像对...
true
5f9210755349ea3c70c19a8a24700b71addcd787
JavaScript
TanyaPanich/g-messages-UI
/gmsg/src/actions/app-action.js
UTF-8
412
2.578125
3
[ "MIT" ]
permissive
export const INITIALIZE = 'INITIALIZE' export const initialize = () => { return async (dispatch) => { let newMessages = [] const messagesResponse = await fetch(`/messages`) if (messagesResponse.status === 200) { const messagesJSON = await messagesResponse.json() newMessages = messagesJSON.mes...
true
8b2a55c143a2a716868f62279187150e15dfedf1
JavaScript
colourblind/StopWastingMyTime
/src/StopWastingMyTime/Static/Javascript/DataContainer.js
UTF-8
6,828
2.8125
3
[]
no_license
function DataContainer(data, pageSize) { this._data = data; // Paging this._pageSize = pageSize; this.page = 0; this.pageDown = function() { this.page = Math.max(0, this.page - 1); this._update(); return false; } this.pageUp = function() { this...
true
91ba3dff7e402964832861f1c36b493c8a3067a0
JavaScript
rajesh1480/WELAB
/welab/Lab 10/emitwithargument.js
UTF-8
236
2.875
3
[]
no_license
const EventEmitter=require('events'); const emitter=new EventEmitter(); emitter.on('saved',(arg)=>{ console.log(`A saved event occured:- name: ${arg.name}, id: ${arg.id}`); }); emitter.emit('saved',{ id:10, name:'Sai Rahul' });
true
f1be8a52357e2b93bb668eb176ee49480373a5a5
JavaScript
sergioIT0921/desafio2
/JS/desafio2.js
UTF-8
1,660
3.5
4
[]
no_license
alert("Bienvenido") let nombre = prompt("Ingrese su nombre: "); let apellido = prompt("Ingrese su apellido: "); let contacto = prompt("Ingrese un E-mail: "); alert(`Hola ${nombre} ${apellido}, complete los siguientes datos.`) let prestamo1 = "Prestasmo Personal" let prestamo2 = "Prestamo Hipotecario" let...
true
bcd82b2f9465bfab8f6a9d1a723932b23a337be4
JavaScript
mimik/mimikslide
/mimikslide-2.1.js
UTF-8
6,082
2.828125
3
[]
no_license
/* Mimikslide - A simple UL based slideshow plugin Version: 2.0 2011-06-09 Author: Kim Gunnarsson E-mail: hello@kimgunnarsson.com URL: http://kimgunnarsson.com Use default settings or use custom settings like this: $('.container').mimikslide({ buttonleft: $('a.left'), buttonright: $('a.right'), randomize...
true
ca75ea0d344b109f1ae3cae11fdf2a18d400c15c
JavaScript
connieelee/smaller-right
/smallerRight.js
UTF-8
278
3.0625
3
[]
no_license
const BST = require('./bst'); function smaller(arr) { const bst = new BST(arr[arr.length-1]); const output = []; for (let i = arr.length - 2; i >= 0; i--) { output[i] = bst.insert(arr[i]); } output[arr.length-1] = 0; return output; } module.exports = smaller;
true
c74783b0933f75bd58778b142fe1be73471a5087
JavaScript
saulofilho/virose
/sketch.js
UTF-8
1,864
3.015625
3
[]
no_license
class Blob { constructor(x, y) { this.x = x; this.y = y; let angle = random(0, 2*PI); this.xspeed = random(-30, 15)*Math.cos(angle); this.yspeed = random(-30, 15)*Math.sin(angle); this.r = random(60, 200); } update() { this.x += this.xspeed; this.y += this.yspeed;...
true
b899a3bdc0b2f3ec0df0e82bae85110a4744789f
JavaScript
pragonauts/lambda-wrap
/test/lib/lambdaWrap.test.js
UTF-8
10,288
2.703125
3
[]
no_license
'use strict'; const { assert } = require('chai'); const lambdaWrap = require('../../lib/lambdaWrap'); describe('LambdaWrap', () => { let wrap = lambdaWrap(); let event; let context; let loggerMock; let fn; let doAsyncStuff; beforeEach(() => { // Initialize new Lambda wrap and moc...
true
4181b3cf4d832364747fecd197a0b1960a67c3b5
JavaScript
hendrowidianto/q-temu
/src/components/Panel-List/index.js
UTF-8
1,789
2.59375
3
[]
no_license
import React from 'react' import axios from "axios" import './panel-list.css'; class PanelList extends React.Component { constructor(props) { super(props) this.state = { members: [] } } // componentDidMount(){ // //fetch data member dari web // axios.ge...
true
c8efd024fe39feadc8201f89c1309262c0d4a8ff
JavaScript
Busyvar/TaskTrainingLevel
/script.js
UTF-8
1,009
3.078125
3
[]
no_license
var taskNumber=0; function addTask() { taskNumber++; var tasklist = document.querySelector("#tasklist"); var newTask = document.querySelector("#task_object"); var taskContainer = document.createElement("article"); var clone = document.importNode(newTask.content, true); var inputs = clone.querySelectorAll("....
true
edc9656c75b9685754e11269dc9d35fb00cbc667
JavaScript
BergstromKelsey/Employeedirectory
/src/components/EmployeeContainer.js
UTF-8
3,845
3.125
3
[]
no_license
import React, { Component } from "react"; import Container from "./Container"; import Row from "./Row"; import Col from "./Col"; import Card from "./Card"; import SearchForm from "./SearchForm"; import API from "../utils/API"; //set state class EmployeeContainer extends Component { state = { employees: [], ...
true
661b94726f7a771480f802aa569b69a0304dad28
JavaScript
andreaainara/express-personal-api
/public/scripts/app.js
UTF-8
2,850
2.96875
3
[]
no_license
console.log("Sanity Check: JS is working!"); var template; var $bookList; var allBooks = []; $(document).ready(function(){ $bookList = $('#bookTarget'); // compile handlebars template var source = $('#book-template').html(); template = Handlebars.compile(source); //get profile data $.ajax({ method: 'GET', ...
true
67862c35bedc38edf9aac4fca913396e4ca37d81
JavaScript
chibchombiano26/odonologia.parse
/vendors/bower_components/jspdf-autotable/examples/examples.js
UTF-8
11,952
3.28125
3
[ "MIT" ]
permissive
/* |-------------------------------------------------------------------------- | This file contains examples of how to use this plugin |-------------------------------------------------------------------------- | | To see what the pdfs generated by these examples looks like you can open | ´examples.html´ or go to...
true
1159bcce5344032d059751b6aeb6963dc42462f5
JavaScript
ArthurMchl/BBQNB
/app/javascript/components/dynamic_price.js
UTF-8
730
3
3
[]
no_license
const dynamicPrice = () => { const start = document.getElementById("range_start"); if (start) { const end = document.getElementById("range_end"); const form = document.getElementById('new_rental'); const priceElement = document.getElementById('price'); const unitPrice = parseInt(priceElement.d...
true
f7366340caead9198935d08cf9c82904f8438da6
JavaScript
ABigBigWhale/Apocashop
/game/js/backend/DialogManager.js
UTF-8
6,268
2.515625
3
[]
no_license
function DialogManager(game) { game.dialog = { main : { box : game.add.text(250, 427, "", { font: "24px yoster_islandregular", fill: Colors.PassiveMain} ), ghost : game.add.text(999, 999, "", { font: "24px yoster_islandregular"} ), isPrinting : false, isFrozen : false, freeze : function(toggle) { ...
true
54258aa550266ebd2af2bfc65b4b20f647cd8f7e
JavaScript
18355166248/sevenBlok
/CaseQuestions/code/91. 解码方法.js
UTF-8
466
3.328125
3
[]
no_license
var numDecodings = function(s) { const n = s.length let a = 0, b = 1, c = 0 for (let i = 1; i <= n; i++) { c = 0 if (s[i - 1] !== '0') { c += b } if (i > 1 && s[i - 2] !== '0' && s[i - 2] * 10 + +s[i - 1] <= 26) { c += a } a = b b = c } return c } console.log...
true
c48a7851bfb30ef4e154d6a33b796655c333a57b
JavaScript
philjhale/TeessideBasketballLeague
/Application/Basketball.Web/Scripts/Views/Home.yui.js
UTF-8
1,459
2.625
3
[]
no_license
/* * Set the news item to toggle on click */ $(document).ready(function () { // Set up the news slide animation $("div.newsContent").hide(); $("div#content div strong").addClass("hoverPointer"); $("div#content div strong").click(function () { $(this).parents("div.newsItem").find("div di...
true
91c7d4f047cf2ebf3143c7383045aec47ad2d4ae
JavaScript
hhidiil/IdiilCenterManage
/server/services/manage.ctrl.js
UTF-8
4,981
2.515625
3
[]
no_license
/** * @desc 管理员管理模块 * @dateTime 2018-12-13 **/ var express = require('express'); var Manage = require('../database/manage.db.js'); var Helper = require('../util/helper'); const manageRouter = express.Router(); /* * 添加中心(只有最高权限的管理员才可以) * */ manageRouter.post('/addCenter',async (req,res)=>{ var props = req.body;...
true
d9ad47adbe76bab9284f7a4f741de14d2686dd34
JavaScript
henriquevc/test-with-jest
/src/lib/queryString.spec.js
UTF-8
1,866
3.0625
3
[]
no_license
import { queryString, parse } from './queryString' describe('Object to query string', () => { it('should create a valid query string when a object is provided', () => { const obj = { name: 'Henrique', profession: 'developer', } expect(queryString(obj)).toBe('name=He...
true
077122f4a45e757a276a0df2ae8c79d4a42e0b02
JavaScript
WellSantos-Dev/js-master
/Objetos-parte-2/destructuring.js
UTF-8
121
2.984375
3
[]
no_license
const eu = { nome: "daniel", sobrenome: "tapias morales" } let { nome: n, sobrenome } = eu console.log(n) console.log(sobrenome)
true
78524a56dd8edec18e03300cce20914fc2cc3ddb
JavaScript
zakgogi/online-port
/JavaScript/Game/player.js
UTF-8
945
3.34375
3
[]
no_license
class Player { constructor(){ this.width = Math.floor(canvas.width/7); this.height = this.width * 1.7; this.x = 0; this.y = canvas.height - this.height; } update(direction){ switch(direction){ case 'Left': if (this.x <= (canvas.width - t...
true
9341900626f8656dc0a1c842e55824eaebd74c70
JavaScript
KentaKodashima/21DayCodingChallenge
/Challenge16.js
UTF-8
1,241
4.03125
4
[]
no_license
/* ## Challenge #16 That was outstanding! Now do the same thing with firstCurrent(). Don't reinvent the wheel here, re-use existing code. This is one of the most important skills you can build as a coder...er, uh, I mean Lighthouse operator. */ const GRID = [ ["", "", "", "^", "", "", "", "", "", ""], ["", "", "...
true
ca143f7d97a4f3c460ea20b4cb467cdf1417a830
JavaScript
Dchyk/codewars
/sequenceSum.js
UTF-8
293
3.8125
4
[]
no_license
// Sum of a given sequence using only // a while loop const sequenceSum = (begin, end, step) => { if (begin > end) { return 0; } else if (begin === end) { return begin; } let sum = 0; while (begin <= end) { sum += begin; begin += step; } return sum; };
true
41b059b0a3832af6b5f039cb558246271d9ac9eb
JavaScript
tanay5678/PokeDex
/src/App.js
UTF-8
3,041
3.046875
3
[]
no_license
import axios from 'axios' import './App.css'; import React, { useState } from 'react' import Chip from '@material-ui/core/Chip' import PokCard from './component/PokCard'; import SearchIcon from '@material-ui/icons/Search'; import Chips from './component/Chips'; // Web App Link https://pokedex-b35f4.web.app/ ...
true
f3e2b913c663cdfef6fb05180228d9e64d8fcc19
JavaScript
ironmanher0/yts
/static/js/app.js
UTF-8
781
2.59375
3
[ "MIT" ]
permissive
const YTS_API = "https://yts.ag/api/v2/" let app = new Vue({ el: '#vue-app', data: { movies: [], queryTerm : '', memory : { queryTerm: '' } }, methods: { getMovies: function(page = 1, q = '') { console.log('Getting movies...') ...
true
0bc0b34866f0325113903e76366128af448c2ef6
JavaScript
Silicon-Robot/Eschool
/src/enseignant/TeacherTimetable.jsx
UTF-8
8,570
2.515625
3
[]
no_license
import React, { Component } from 'react'; import { connect } from 'react-redux' import Hoc from '../shared/utils/hoc.js' import parseJwt from '../shared/utils/parseJwt.js' import './TeacherTimetable.css' class TeacherTimetable extends Component { state={ /* Change this data with data from the...
true
e547f28cd3b2c2ed268400a7eabb6aa7c6c4afbe
JavaScript
james-priest/node_samples
/ch12-Canvas/j-arcTo4.js
UTF-8
863
2.84375
3
[]
no_license
$(document).ready(function() { drawArcTo(); }); function drawArcTo() { // var canvas = document.getElementById('myCanvas'); var canvas = document.createElement('canvas'), ctx = canvas.getContext('2d'); canvas.id = 'myCanvas'; canvas.width = 800; canvas.height = 600; document.bo...
true
689c134240837d944db8d3c0f80d49d50892efb6
JavaScript
kerstenremco/coffee-taster
/src/js/views/login.view.js
UTF-8
1,140
2.625
3
[]
no_license
import Logo from '../../img/logo.png'; import Event from '../event'; class LoginView { constructor(htmlElement) { this.htmlElement = htmlElement; this.loginSubmitEvent = new Event(); } render() { this.htmlElement.innerHTML = ` <div class="screen flex" id="screen-login"> <img src="${Logo}"...
true
9c98b8ca2e8062a5a91c8743678d2122303462b2
JavaScript
cdsimmons/screeps-ai
/gulpfile.js
UTF-8
3,479
2.546875
3
[]
no_license
// I really didn't want to use gulp, but I need to do some file injection, copying, and watching... // To do all this (and remain OS agnostic), gulp is the simplest solution really... var gulp = require('gulp'); var plumber = require('gulp-plumber'); var inject = require('gulp-inject-string'); var eslint = require('gul...
true
8780c852a57874126198c29669bb0102d3e75a84
JavaScript
shinylightdev/car-finance
/index.js
UTF-8
2,370
3.1875
3
[]
no_license
let formatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }); // Finance Object let f = {}; // ========================================================================== // CUSTOMIZE // ========================================================================== f.MSRP = 33125; // MSR...
true
29126a98b3e8c91cab0731600de069b709ea7f70
JavaScript
boyhuosr/TDD-BDD-Learning
/src/containers/TodoList/index.js
UTF-8
2,495
2.5625
3
[]
no_license
import React, { Component } from 'react'; import Header from './components/Header' import UndoList from './components/UndoList' import './style.css' class TodoList extends Component { constructor(props){ super(props) this.addUndoItem = this.addUndoItem.bind(this) this.deleteItem = this.dele...
true
80db0c3916a9464c90b110c137315c5f5fece214
JavaScript
Crisielach96/CursoIngresoJS
/1-EntradaSalida/jsEntradaSalida-6.js
UTF-8
438
3.234375
3
[]
no_license
/*Debemos lograr tomar Los numeros por ID , transformarlos a enteros (parseInt) y Sumarlos. Mostar el resulto por medio de "ALERT"*/ function sumar() { var pnumero; var snumero; var resultado; var msj; pnumero=document.getElementById("numeroUno").value; snumero=document.getElementById("numeroDos").value; pnumero=parseI...
true
6836d7859b8d47180e2591f33a1ef038dad1cd98
JavaScript
susisusanri1/WebFramework
/Week 4/src/container/Mahasiswa/Mahasiswa.jsx
UTF-8
6,244
2.515625
3
[]
no_license
import React, { Component } from 'react'; import './Mahasiswa.css'; export default class Mahasiswa extends Component { state = { listMahasiswa: [], insertData: { nim: "", nama: "", alamat: "", hp: "", angkatan: "", status: "" } } componentDidMount() { this.ge...
true
b3e89c632fe6bdbf4e000747853df42774f06ec4
JavaScript
dhymasriyanto/js-tutorial
/exercise1.js
UTF-8
729
4
4
[]
no_license
const game = { suspects: [ { name: "Rusty", color: "orange", }, { name: "Miss Scarlet", color: "red", }, ], }; function loopThis() { for (let i = 0; i < game.suspects.length; i++) { const element = game.suspects[i]; } } function catchTheSus() { for (let index = 0;...
true
9e3d562f0989a6e172c76428b38cdac26236b74a
JavaScript
c-malecki/pd2-text-parser
/src/components/WeaponBase/util/convertWeapon.js
UTF-8
971
2.71875
3
[]
no_license
export const convertWeapon = (file) => { let result = []; const headers = file[0].data; // converts csv data into objects for (let i = 1; i < file.length; i++) { let obj = {}; const currentline = file[i].data; for (let j = 0; j < headers.length; j++) { const val = currentline[j]; if (v...
true
c57a3c1fa860b7acadd7c82b6b38e76fcdaa98f2
JavaScript
ranggabadrus/react_js
/src/redux/action/user.js
UTF-8
638
2.59375
3
[]
no_license
export const getUser = (params) => { // console.log("params ", params); return { type: "GET_USER", payload: params, }; }; export const getName = () => { return async (dispatch) => { try { const res = await fetch("https://reactnative.dev/movies.json") .then((e) => e.json()) ...
true
bbd5ff2fada0306c7a10cb9d07117e81c1157dd9
JavaScript
wesley1001/VocaDB-App
/www/app/components/modal/entry-modal/entry.modal.controller.js
UTF-8
1,648
2.609375
3
[ "MIT" ]
permissive
(function() { 'use strict'; angular .module('app.component.modal') .controller('EntryModalController', EntryModalController); EntryModalController.$inject = ['logger','entrymodalservice','entryservice','$rootScope']; function EntryModalController(logger,entrymodalservice,entryservice,...
true
ad597d30b6fcc9e4054c62c676833c35f49ba5f3
JavaScript
ming-codes/more-ember-test-helpers
/addon/serializer/normalized-response.js
UTF-8
920
2.703125
3
[ "MIT" ]
permissive
/** * NormalizedResponse is an object that represent the returned value from * Serializer#normalizeResponse * * @class NormalizedResponse * @constructor * @private */ export class NormalizedResponse { constructor(context) { Object.defineProperties(this, Object.getOwnPropertyDescriptors(context)); } /*...
true
e8ad6da2ec3be6c430520b057750dcc7b0e68f26
JavaScript
jacenhan/planets-game-finder
/display.js
UTF-8
3,810
3.015625
3
[]
no_license
/* Display functions for the app */ function clearList() { var gameList = document.getElementById("games"); removeAllChildNodes(gameList); } function removeAllChildNodes(parent) { while (parent.firstChild) { parent.removeChild(parent.firstChild); } } function displaySearching() { clearList(); va...
true
83a1b28a27cc2b6a2d7204753b97cc5498b9b38f
JavaScript
dogweather/pdx-ri-map
/source/javascripts/app/models/inspection.js
UTF-8
1,879
2.640625
3
[]
no_license
(function(){ "use strict"; App.Inspection = Backbone.Model.extend({ defaults: { id: 0 , restaurantName: '' , streetAddress: '' , city: '' , zipCode: '' , latitude: 0 , longitude: 0 , type: '' ...
true
c4fc997d8aedb458fa04a97de9545d1bf53797e3
JavaScript
illinia/javascriptStudy
/25/25_11.js
UTF-8
170
3.1875
3
[]
no_license
class Person { // 생성자 constructor(name) { // 인스턴스 생성 및 초기화 this.name = name; } } console.log(typeof Person); console.dir(Person);
true
5a2a07f3e71b699d879f507b74625556dff41fc0
JavaScript
DVasquez4155/Portfolio-V2
/Web/ppi.js
UTF-8
802
3.109375
3
[]
no_license
var pxa = 640; var pxb = 960; var pxc = Math.sqrt((pxa * pxa) + (pxb * pxb)).toFixed(0); var ic = 3.5; var ppi = (pxc / ic).toFixed(0); var ia = (pxa / ppi).toFixed(2); var ib = (pxb / ppi).toFixed(2); console.log("Pixels Height = " + pxa + "px"); console.log("Pixels Width = " + pxb + "px"); console.log("Pixels Diagnol...
true
469551e9e9965fbcbdaa862a4d58961ef91be80f
JavaScript
TomaszRej/fullStackJavaScriptFormWithTests
/client/src/utilities/validation.js
UTF-8
881
2.921875
3
[]
no_license
const validate = (val, rules) => { let isValid = true; const errors = {}; for (const rule in rules) { switch (rule) { case "isEmail": isValid = isValid && emailValidator(val); if (!emailValidator(val)) { errors.isEmail = 'Enter correct email address' } break; ...
true
d5b854ab4898d4cece8d0e349f96dffd645a280a
JavaScript
zzzze/algorithm-js
/src/sorting/selection-sort.js
UTF-8
323
2.921875
3
[]
no_license
module.exports = function sort(input) { let output = [].concat(input) for (let i = 0; i < output.length - 1; i++) { for (let j = i + 1; j < output.length; j++) { if (output[j] < output[i]) { let tmp = output[j] output[j] = output[i] output[i] = tmp } } } return output...
true