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
fadd6002c49590c9b81849df937c82dbf172bd4d
JavaScript
Krzysiekkwiatkowski/JS
/Zadania/Dzien1/2_Funkcje/js/zadanie02.js
UTF-8
258
3.546875
4
[]
no_license
function areacircuit(r) { if(typeof r != "number"){ return false; } else { var area = 3.14 * Math.pow(r, 2); var circuit = 6.28 * r; return "Area: " + area + ", Circuit: " + circuit; } } console.log(areacircuit(4))
true
d3198c3826d1ca25d0879778c353cbb0698a0770
JavaScript
killvxk/code
/sudoku/sudoku.js
UTF-8
3,639
2.8125
3
[]
no_license
function generate() { function* solver(board) { const masks = [0,1,2,4,8,16,32,64,128,256], rows = [0,0,0,0,0,0,0,0,0], cols = [0,0,0,0,0,0,0,0,0], blks = [0,0,0,0,0,0,0,0,0], row = function(n){return 0|n/9}, col = function(n){return n%9}, blk = function(n){re...
true
4c98ceb6ca6b001b7a5bef2b5dd6ad08df5ad4a3
JavaScript
Roheith-P/react-vm
/src/components/candidates/Update.js
UTF-8
2,204
2.609375
3
[]
no_license
import React, { Component } from 'react'; import firebaseDatabase from '../../lib/firebase'; class Update extends Component { constructor(props) { super(props); this.state = { user: { name: '' }, inputDisabled: true, message: '' ...
true
36dc21bef3ff1e91d238b1d42c4be972ba028994
JavaScript
Meyclem/zombies-room
/src/assets/js/game/classes/player.js
UTF-8
2,833
2.984375
3
[]
no_license
export default class Player { constructor(scene, x, y) { this.scene = scene const anims = scene.anims const playerAnimations = [ { name: 'player-walk-front', frames: { start: 3, end: 5 } }, { name: 'player-walk-left', frames: { start: 15, end: 17 } }, { name: 'player-walk-right', frames...
true
d9c8d7fe17dbec13b7ceadfd83a199ccf71bfcc6
JavaScript
timotismjntk/Blanja---React-Native
/src/helpers/rupiahConverter.js
UTF-8
409
2.84375
3
[]
no_license
/* eslint-disable prettier/prettier */ /* eslint-disable no-trailing-spaces */ const convertToRupiah = (angka) => { var rupiah = ''; var angkarev = angka.toString().split('').reverse().join(''); for (var i = 0; i < angkarev.length; i++) {if (i % 3 === 0) {rupiah += angkarev.substr(i,3) + '.';}} return 'Rp. ' + ru...
true
1d0186e556cf8c30bf81af724dd587b7cd28be6f
JavaScript
lzcalderaro/fav-list-plugin
/js/calls.js
UTF-8
1,935
2.703125
3
[]
no_license
jQuery(document).ready(function(){ setWgSc(); jQuery(document).on('click', ".favBtn", function () { sendfav(jQuery(this).attr('value')); }); if(jQuery('#favBtn').val() !== undefined) getButtonState(jQuery('#favBtn').val()); }); function sendfav(value) { jQuery.ajax({ type: "POST", ...
true
5109cd5b28eee7482b492efd18ae00e02c32d202
JavaScript
Zatch53/4300Project
/scripts/LS-scripts.js
UTF-8
1,730
2.921875
3
[]
no_license
function shiftRight() { var x = document.getElementById("LS-login-form"); var y = document.getElementById("LS-signup-form"); var z = document.getElementById("LS-btn"); x.style.left = "-550px"; y.style.left = "75px"; z.style.left = "110px"; } function shiftLeft() { var x = document.getElementById("LS-lo...
true
28ff26372d0a9bafbac7cb7ea146216edfef1800
JavaScript
AllanwhyH/kaola-register
/public/index/js/my_scroll.js
UTF-8
3,032
2.515625
3
[]
no_license
window.onscroll=function(){ var $fs=$("#mainBgWrapHome").find("article")//所有楼层 //console.log($fs) var $f1=$fs.first();//第一个楼层:今日限时购 //console.log($f1) var offsetTop=$f1.offset().top;//获取第一个楼层到顶部的高度 var scrollTop=$("html,body").scrollTop();//获取网页到顶部的距离 //document.documentElement.scrollTop; ...
true
22d9c77acb711409d886c7332eabe7457e114de2
JavaScript
Daniel-pak/Free-Code-Camp
/FCC Exercises/FCC_binary_agents/app.js
UTF-8
768
3.234375
3
[]
no_license
function binaryAgent(str) { var emptyString = ""; var array = str.split(" "); // console.log(array); for (var i = 0; i < array.length; i++) { var character = array[i] emptyString += String.fromCharCode(parseInt(character, 2)); } console.log(emptyString); } binaryAgent("01...
true
133183a45793ab1d9eb068b1bcefc865c7cfecb0
JavaScript
biswanathTewari/DrumKit
/app.js
UTF-8
2,811
3.609375
4
[]
no_license
//^---------------SELECTORS--------------------------- const btnA = document.querySelector(".a"); const btnS = document.querySelector(".s"); const btnD = document.querySelector(".d"); const btnF = document.querySelector(".f"); const btnG = document.querySelector(".g"); const btnH = document.querySelector(".h"); const b...
true
5dd6b12095b83457ea8468fae7f7f20135ffe80e
JavaScript
Zinhle-Mzimba/Pre-BC-Tasks
/Tasks.js
UTF-8
2,513
3.859375
4
[]
no_license
//Task 0.1 var x = 0; var y = 1; console.log(x + "\n" + y); x = x + 3; y = y + x; console.log(x + "\n" + y); //task 0.2 var x = 1 + 1 * 2; var y = (1 + 1) * 2; var z = 1 + 1 * 2; var a = 1 + (1 * 2) / 2; var b = (1 + 1 * 2) / 2; console.log(x + "\n" + y + "\n" + z + "\n" + a + "\n" + b); // Task 0.3 function hel...
true
f89a468068fb08570e7cb610bf78ee2b26fd7ad3
JavaScript
Alejodaudie/lab-javascript-all-times-movies
/starter_code/src/movies.js
UTF-8
980
3.484375
3
[]
no_license
/* eslint no-restricted-globals: 'off' */ // Turn duration of the movies from hours to minutes // Get the average of all rates with 2 decimals function ratesAverage(array){ array.reduce(function(accum,currentValue){ var rate = 0; accum.rate += currentValue; },0); } // Get the average ...
true
b572eb271de6d03a9aea730ff406e71b10e32b5e
JavaScript
Atotaro98/ApiPeliculas
/src/components/Buscador/Buscador.js
UTF-8
5,132
2.671875
3
[]
no_license
import React, { Component, useState, useEffect } from "react"; import { connect } from "react-redux"; import { useDispatch, useSelector } from 'react-redux' import { Link } from 'react-router-dom'; import './Buscador.css'; import { addMovieFavorite, getMovies} from '../../actions/index' //AGREGADO X MI expor...
true
b2c3b398b18794db8d4224390e167116884798df
JavaScript
galihagussetyawan/reactjs_blog
/controllers/Images-Controller.js
UTF-8
1,605
2.59375
3
[]
no_license
const fs = require('fs'); const db = require('../models'); const Image = db.images; const Post = db.post; exports.uploadImages = async (req, res) => { if (req.file === undefined) { return res.status(400).send("You must select images."); } const name = req.file.originalname; const type = req...
true
8bcf40b3d3923ca2547635bd0dc50b279e1235d4
JavaScript
luw779/ceci97.github.io
/week 11/index.js
UTF-8
257
3.359375
3
[]
no_license
var box = document.querySelector("#box") console. log(box) box.addEventListener("click", onBoxClick) function onBoxClick(){ if (box.style.backgroundColor == "red"){ box.style.backgroundColor = "blue"} else { box.style.backgroundColor = "red" } }
true
5395ee0171b3e9fb4d0fbf136c52b2cb5ec1661c
JavaScript
mbraga24/JavaScript
/Practice Projects/weather-app-1/main.js
UTF-8
2,010
3.09375
3
[]
no_license
window.addEventListener('load', () => { let long; let lat; // Select DOM elements const tempDegree = document.querySelector('.temperature-degree'); const tempDescription = document.querySelector('.temperature-description'); const locationTimezone = document.querySelector('.location-timezone'); const te...
true
b0521b9e71d9e6b02f0ede452dfaa415904ca202
JavaScript
kyletozer/content-scraper
/scraper.js
UTF-8
2,326
2.984375
3
[]
no_license
var fs = require('fs'); var Xray = require('x-ray'); var csv = require('json2csv'); var data = require('./data'); var x = Xray(); var url = 'http://www.shirts4mike.com/'; var shirts = new Promise(getShirtData); var date = data.date; var outputDir = data.outputDir; function getShirtData(resolve, reject){ var shirt...
true
fb5cda14ee73fb49e8b910b54c95142749a6b3c6
JavaScript
darinalleman/FreshPots
/GDC.FreshPots.Web/obj/Release/Package/PackageTmp/js/helper.js
UTF-8
1,222
2.96875
3
[]
no_license
Handlebars.registerHelper('Timer', function (seconds) { var seconds = seconds; var time = ""; var minutes = Math.floor(seconds / 60); var hours = Math.floor(seconds / 3600); seconds = seconds % 60; if (minutes >= 60) { minutes = minutes % 60; } time = time + hours + ":"; ...
true
e3175aef0a06a2e276f350fc011bfae1110d4af8
JavaScript
bouje1831715/IntroWeb
/exercise/ex.1/JS/traitement.js
UTF-8
212
2.59375
3
[]
no_license
function btnCalculer_onclick() { var PLivres, Kg; PLivres = parseFloat(document.getElementById("txtPoids").value); Kg = PLivres/2.2; console.log("Le poids est maintenant de "+Kg+" Kilogrammes"); }
true
495e699a7c807574a322f9a521a2f2f689688078
JavaScript
BrunoGzz/firebase-chat-extension
/js/app.js
UTF-8
347
2.703125
3
[ "MIT" ]
permissive
document.getElementById("send").addEventListener("click", send); function send(){ var message = document.getElementById("search").value; document.getElementById("search").value = ""; firebase.database().ref("messages").push().set({ "sender": "prueba", "message": message, ...
true
3c85ffd3927e83c80e987282e6d63ebf7e6dfd1c
JavaScript
p3aceful/Jollyball
/src/common/Player.js
UTF-8
2,673
2.671875
3
[ "MIT" ]
permissive
import { Body, Vertices, Common } from 'matter-js'; export default class Player { static stats() { return { jumpPower: -10, speed: 5, } } constructor(body) { this.body = body; this.keyState = { up: false, down: false, ...
true
7420f0b8cf4958a04cb7c4f2fadd9e935e1c609b
JavaScript
Sadok386/checkersApp
/www/client/jeu.js
UTF-8
43,209
2.75
3
[]
no_license
var selectedElement = null; var prevElement = null; var currentX = 0; var currentY = 0; whitePoint = 0; yellowPoint = 0; var changeTurn = false; let pionMoveCy let pionMoveCx const joueurUn = { color:"white", pionStart: { cx: null, cy: null }, pionEnd: { ...
true
baa62a4410c0b47b7b57e764f9bad42eb18f157c
JavaScript
merlonedev/recipes-app
/src/hooks/useValidation.js
UTF-8
658
2.640625
3
[]
no_license
import { useEffect, useState } from 'react'; const useValidation = () => { const [data, setData] = useState({ email: '', password: '' }); const [validate, setValidate] = useState(false); const validator = () => { const SIX = 6; const EMAIL_REGEX = /^[a-z0-9_.]+@[a-z0-9]+\.[a-z]{2,3}(?:\.[a-z]{2})?$/; ...
true
7d5b79ee00a9f767cfc4a96a5b7f1e97f891eb99
JavaScript
DenTheProgrammer/Kursach
/DragnDrop.js
UTF-8
967
2.890625
3
[]
no_license
const uiPanel=document.querySelector(".interface"); uiPanel.addEventListener("mousedown",(e)=>{ let coords = getCoords(uiPanel); let shiftX = e.pageX - coords.left; const shiftY = e.pageY - coords.top; uiPanel.style.position = 'absolute'; document.body.appendChild(uiPanel); moveAt(e); ui...
true
df8b23935e0583a2c87de55073567138d8a26dcf
JavaScript
NoahCo/OA
/htmllabs/week3labs/lab7/scorekeeper.js
UTF-8
2,538
4.0625
4
[]
no_license
/* Score Keeping App Recreate the html in the image screenshot and add your script 1. The Default score limit is 5 The limit can be changed by the input field 2. Everytime player 1 or player 2 button is pressed score increments by 1 for player 1 or player 2. 3. When the score limit is reached the game is over Chang...
true
51f5314c3e8959d9c51fc210f545667169f31768
JavaScript
LuizF1408/logica
/AT1/a1_13.js
UTF-8
163
3.25
3
[]
no_license
var n,r,rs rs = require("readline-sync") n = rs.question("Digite um numero ") if (n > 0) { r =n*2 console.log(r) } else { r = n*3 console.log(r) }
true
be3d55e480f44df9838da46ab67ff34622c51380
JavaScript
camilagerarde/SAP004-cipher
/src/cipher.js
UTF-8
1,321
3.234375
3
[]
no_license
const ciphering = (letter, codeA, num, offset) => { const lettersOfAlphabet = 26; return ((letter - (codeA + num) + offset) % lettersOfAlphabet) + codeA + num; }; const encodeOrDecode = (offset, message, num) => { if (typeof message !== 'string') { throw new TypeError('message undefined'); } let finalMes...
true
29a0393af19db71f25893cddf629ce5aad03458b
JavaScript
mexell96/reactNewApp
/src/ClickerCounter.js
UTF-8
673
2.6875
3
[]
no_license
import React from "react"; export default function ClickerCounter({ number }) { let color; let position; if (number >= 20) { color = { background: "gold" }; position = "профи"; } else if (number >= 15) { color = { background: "red" }; position = "мастер"; } else if (number >= 10) { color...
true
69b96be717762d438a0aa2515149ed4e10d9c7f5
JavaScript
yarus23/afisha
/afisha2/app/util/Settings.js
UTF-8
2,756
2.625
3
[]
no_license
/* * Settings */ Ext.define('Afisha.util.Settings', { config: { fontSize:1.0, userName:'', settingsStore:null, settingsRecord:null, fontStep:0.1, fontMinSize:0.5, fontMaxSize:2.0, useGPS:true }, //add store для отлова более ранней загрузки ...
true
38c74cad1bd0ef57ff4e2c092ee9a5c00444c383
JavaScript
learn-co-students/london-web-career-010719
/39-react-game-of-thrones/src/App.js
UTF-8
3,175
3.03125
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import API from './adapters/API' import CharacterList from './components/CharacterList'; import CharacterDetails from './components/CharacterDetails'; class App extends Component { state = { characters: [], selectedCharacterUrl: undefined, li...
true
9653d7dc4463439d00353c565c81d37a20a98ede
JavaScript
zrj570543941/common_js_functions
/common-data-structures-implementation/Graph/Graph.js
UTF-8
3,270
3.71875
4
[]
no_license
let UndirectedGraph = (function() { //an array to store the names of all the vertices of the graph let vertices = new WeakMap(); // The dictionary will use the name of the vertex as a key and the list of // adjacent vertices as a value // 这里需要特别指出的是,adjList上的v1数组中有v2元素, // 是表示可以从v1到v2,但v2不一定能到v...
true
52f5c82cc0a159f751528fdd672a5dfc95cc8a1b
JavaScript
ApoorvMehrotra0706/Yelp-Prototype
/Frontend/yelp/src/components/Menu/FoodMenu.js
UTF-8
55,966
2.578125
3
[]
no_license
import React, { Component } from 'react'; import axios from 'axios'; import serverUrl from '../../config'; import './FoodMenu.css'; import Food from './Food'; import NewFoodForm from './NewFoodForm'; class FoodMenu extends Component { constructor(props) { super(props); this.state = { APPETIZERS: [], ...
true
6c6eef499b2065547ef4d2fee8be928b87ae3cc6
JavaScript
jewarner57/Few2.1-Final-Assessment
/index.js
UTF-8
2,105
3.46875
3
[]
no_license
var EasyDate = require('@jewarner57/easydate'); // Challenge 0 var userData = require('./data.json'); function printUserData(userData) { userData.forEach(function (user) { // Challenge 1 var firstName = capitalize(user.first_name); var lastName = capitalize(user.last_name); console....
true
77df23d78753f2114efa7ce285518d7450bd8b7c
JavaScript
JTMKoenig/resume
/OpenWeatherMapRESTClient/public_html/js/home.js
UTF-8
7,789
2.921875
3
[ "MIT" ]
permissive
$(document).ready(function(){ $('#get-weather-button').click(function(){ var haveValidationErrors = checkAndDisplayValidationErrors($('#zipcode-form').find('input')); if(haveValidationErrors){ $('#forecast').hide(); clearWeatherData(); return false;...
true
09e6ff312ee3d80a309e22b8271c0eb43268b16d
JavaScript
nullcool/quero-ser-clickbus
/testes/cash-machine/web/scripts/cashScript.js
UTF-8
2,502
2.640625
3
[]
no_license
var keys = document.querySelectorAll('#atm span'); for(var i = 0; i < keys.length; i++) { keys[i].onclick = function(e){ if(this.className.indexOf("ignore")>=0)return; document.getElementById("response").innerHTML = ""; var input = document.querySelector('.screen'); var inpu...
true
7ea428d6bdb6785bb767aa23d0b32bcb3027105b
JavaScript
ayushGHub/EyeSAC
/js/statistics.js
UTF-8
4,111
2.640625
3
[]
no_license
// Data files data_count = 0; data_sources = []; data_labels = []; frame_start = 0; total_frames = 0; // Replicate Stat Rows function multiplyStatsRow(node, count, deep) { className = node.className; var tr_value = className.split("_")[2]; var value = ""; if(tr_value=="noise") valu...
true
f86b10e99ec756c743d8e073a032538323a44544
JavaScript
hellomephllw/d3-easy-demo
/src/scripts/histogram-rect.js
UTF-8
1,921
2.921875
3
[]
no_license
/** * Created by wb-llw259548 on 2017/1/24. */ const d3 = require('d3'); //正态分布生成器,170为平均值,10为标准差 let rand = d3.random.normal(170, 10); //正态分布值集合 let dataset = []; //生成100个随机数 for (let i = 0; i < 100; ++i) { dataset.push(rand()); } //直方图布局数据 let binNum = 20, rangeMin = 130, rangeMax = 210; //直方图布局生成器 ...
true
9648f8955f8790f62d638321d75ffe4445f9f8c7
JavaScript
LiewShanWei/expense-tracker-ui
/src/App.js
UTF-8
1,266
2.765625
3
[]
no_license
import { useState } from 'react'; import Expenses from './components/Expense/Expenses'; import NewExpense from './components/NewExpense/NewExpense'; //Declare init expenses const initExpenses = [ { id: Math.random().toString(), date: new Date(2021, 2, 28), title: 'ATM Withdrawal', amount: 40.0}, { id: Math.random...
true
bdc9638e0640906f60fcae9ae8cd3ebfc9927129
JavaScript
fineday32/IOHv2
/home/js/index.js
UTF-8
1,645
3.265625
3
[]
no_license
var circleDo = $('#circleDo'); var rect = $('#rectangle'); circleDo.ready(function(){ // console.log('haha'); // if ($('canvas[id=circleDo]').hasClass('bigCircle')) // console.log('bigCircle'); // if ($('canvas[id=circleDo]').hasClass('smallCircle')) // console.log('smallCircle'); var x=95, y=50; for (i=1; ...
true
a699cf5dba7f955d6a7320d6857bb3f0b09eb262
JavaScript
yutaono/flickrPhotoViewerForSmartPhone
/app/scripts/flickr.js
UTF-8
2,201
2.671875
3
[]
no_license
;(function(window) { /** * 画像を取得するoptionsを返すメソッド */ function getFlickOptions(text, per_page, page) { var options = {}; options.url = 'https://api.flickr.com/services/rest/'; options.method = 'GET'; options.params = { method: 'flickr.photos.search', ...
true
0ae0931acd4e9ac5c72fec605fd0e518848578d7
JavaScript
kevinbloomquist/tdd-fibonacci
/test/fibonacci.spec.js
UTF-8
1,036
3.4375
3
[ "MIT" ]
permissive
/* global define, describe, it */ var expect = require('chai').expect; var fibonacci = require('../src/fibonacci'); describe('Testing fibonacci', function () { it('should be a function', function () { expect(fibonacci).to.be.a('function'); }); // TODO: implement remaini...
true
f1d46c68604fd2b2b4018f251707803be0b1ec58
JavaScript
robbobfrh84/portfolio
/comp_pages/about/about.js
UTF-8
4,932
2.703125
3
[]
no_license
function _about(id, resize) { function animations() { animateLines() setTimeout(function(){ _about_bob_animate() },1000) } function animateLines() { const w = aboutMainContent.clientWidth+20 const h = aboutMainContent.clientHeight+20 const c = new Canvas const col = 'rgba(218,1...
true
af9d1687180118ebc8563930cad7a30245227ab4
JavaScript
hdparks/UniversalFunctionApproximator
/ml-math.js
UTF-8
1,213
3.59375
4
[]
no_license
function boxMuller(){ // Use Box-Muller method to pull a pair of numbers from standard normal distribution u1 = Math.random() u2 = Math.random() r = Math.sqrt(-2*Math.log(u1)) z1 = r * Math.cos(2 * Math.PI * u2) z2 = r * Math.sin(2 * Math.PI * u2) return [z1,z2] } function randn(size){ // Build an ar...
true
fa87e29cc12962a1a70474461f93eacbc36cbd54
JavaScript
nek0n0mimi/lesson01
/2-3/main.js
UTF-8
122
3.015625
3
[]
no_license
const n = process.argv[2]; if (n>=24) { console.log(`${n - Math.floor( n/24 )*24}`); } else { console.log(`${n}`); }
true
d3846632257e60ae916bad4afb06f39ea1dd8fc8
JavaScript
jornesuwier/howestti2020ucll
/src/main/resources/webroot/assets/js/script.js
UTF-8
376
2.8125
3
[]
no_license
"use strict"; document.addEventListener("DOMContentLoaded", init); function init() { document.querySelector("#play").addEventListener("click", join); } function join(e) { e.preventDefault(); const name = document.querySelector("#Name").value; if (name !== "") { localStorage.setItem("name", nam...
true
b7051c1b0c78e5608ad27f5f952521a192eec361
JavaScript
nibble0101/youtube-skull
/src/download.js
UTF-8
2,506
2.765625
3
[]
no_license
// const test = "https://www.youtube.com/watch?v=FUiu-cdu6mA"; const fs = require("fs"); const ytdl = require("ytdl-core"); const os = require("os"); const path = require("path"); const { ipcRenderer } = require("electron"); const progressElement = document.getElementById("download-progress"); const rootElement = doc...
true
862e0badc11d3dae9ae21bd201899f7eabf2ff74
JavaScript
RAYDENFilipp/mongoose-bcrypt
/src/processDocumentsOnInsertMany.js
UTF-8
1,658
2.53125
3
[ "MIT" ]
permissive
function processDocumentsOnInsertMany(documents, fields, encrypt, next) { documents.forEach(function (document, idx, thisArr) { var changed = []; var lastIdx = thisArr.length - 1; var isLastDocument = idx === lastIdx; // Determine list of encrypted fields that have been modified fields.forEach(fu...
true
f4cad91bb73b966e4d15ab35635eb1b60c8ed5f7
JavaScript
ANBU-2018/bookclub-hackmol-2.0
/api/controller/book.js
UTF-8
3,511
2.640625
3
[]
no_license
var driver = require("./../database"); exports.getBooks = async (req, res, next) => { var query = `MATCH (n:book) RETURN n`; if (req.query.bookName) { query = `MATCH (n:book{name:"${req.query.bookName}"}) RETURN n`; } else if (req.query.userName) { query = `MATCH (n:people{username:"${req.query.userName}...
true
e80f63f49bb4d3185955e7ff080e6ac82df21d77
JavaScript
hmrc/catalogue-frontend
/public/search-with-autocomplete.js
UTF-8
5,838
2.828125
3
[ "Apache-2.0" ]
permissive
let form; let inputSearch; let matchesDiv; let allValues = []; let autoCompleteAllowPartial; let autoCompleteIgnoreCase; let autoCompleteSubmitOnSelection; const minSearch = 3; let selectedIdx = -1; // Allow partial search let matchesLen = 0; const matchesListClass = "search-match-list"; const matchesElemId =...
true
5a8a6fb1287a0b4da2b77bc449b2064dfa4fde2e
JavaScript
pezcode/spotify-save
/hotkey.js
UTF-8
3,355
2.59375
3
[ "MIT" ]
permissive
'use strict' const { globalShortcut } = require('electron') const is = require('electron-is') class Hotkey { constructor (key, mods, callback) { if (!Array.isArray(mods)) { mods = [mods] } if (!Hotkey.isValidKey(key)) { throw new InvalidHotkeyError('Invalid key') } for (const mod of ...
true
0d9f7ed204a58f07755179159762a1f8835558b7
JavaScript
guscost/guscost.github.io
/timewarpsinc/js/game.data.js
UTF-8
9,305
2.65625
3
[ "MIT" ]
permissive
var data = (function() { var noop = function() { }; var d = { width: 960, height: 640, player: { x: 100, y: 600, dy: 0, present: true }, projectile: { x: 9999, y: 9999, dx: 0, dy: 0, thrown: false, power: 0, type: 'golf' }, objects: [], messages: [], messageShowing: false, started: false, setu...
true
a3aa8a5bea81b6154e72f2727f803929c5c745c0
JavaScript
Yury7/962807-sedona-19
/source/js/script.js
UTF-8
1,869
2.71875
3
[]
no_license
var navMain = document.querySelector('.main-nav'); var navBtn = document.querySelector('.main-nav__btn'); var navActiveItem = document.querySelector('.site-list__item--active'); navMain.classList.remove('main-nav--nojs'); navBtn.addEventListener('click', function() { if (navMain.classList.contains('main-nav--close...
true
3705fccb275431e8c9487d501ecaf6cdfd47b01e
JavaScript
funkyfun/leetcode
/206/206.reverse-linked-list.js
UTF-8
1,172
3.984375
4
[]
no_license
/* * [206] Reverse Linked List * * https://leetcode.com/problems/reverse-linked-list/description/ * * algorithms * Easy (50.12%) * Total Accepted: 437.9K * Total Submissions: 873.6K * Testcase Example: '[1,2,3,4,5]' * * Reverse a singly linked list. * * Example: * * * Input: 1->2->3->4->5->NULL ...
true
cca97ec6acc9b075a2cd2ea12a24cf2dda3e51d5
JavaScript
jupitervn/youtube-pip-controller-extensions
/src/toggle_play_pause_video.js
UTF-8
1,190
3.03125
3
[ "MIT" ]
permissive
(async () => { const pipEle = document.pictureInPictureElement; if (pipEle) { if (pipEle.paused) { await pipEle.play(); } else { await pipEle.pause(); } return true } const playingVideos = Array.from(document.querySelectorAll('video')) .fi...
true
45d121f46a15d009ee5f50c5905b90fea44d4741
JavaScript
KnackHops/Robofriends
/src/reducers.js
UTF-8
1,120
2.640625
3
[]
no_license
import { CHANGE_SEARCH_FIELD, REQUEST_PROFILE_PENDING, REQUEST_PROFILE_SUCCESS, REQUEST_PROFILE_FAILED } from './constants'; //searchProfile const initialStateSearchProfile = { searchField:`` }; export const searchProfileReducer = (state=initialStateSearchProfile, action={}) => { switch (acti...
true
115d4382d9b1520ffcd28f70062da4812afb2739
JavaScript
HanMeow/interview20201110
/src/utils/validate.js
UTF-8
2,334
2.96875
3
[]
no_license
// @flow /* eslint no-useless-escape:off , max-len:off */ const MOBILE_PATTERN = /^09\d{8}$/; const EMAIL_PATTERN = /^([A-Za-z0-9_\-\.+])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; const TW_ID_PATTERN = /[A-Za-z]{1}(1|2)[0-9]{8}$/; const TW_ID_MULTIPLY = [1, 9, 8, 7, 6, 5, 4, 3, 2, 1]; const TW_ID_MAP = { a: 10, b: 1...
true
c053dc59aedc4f59bbb353e9b2893b3af12ac9a7
JavaScript
Thaiane/90sites90days
/90sites/11-tons-de-roxo/app.js
UTF-8
338
2.734375
3
[]
no_license
let colors = [ '#6A0AAB', '#5C2680', '#44036F', '#983FD5', '#A967D5']; let button = document.getElementById('button'); button.addEventListener('click', function(){ let index = parseInt((Math.random()*colors.length)+1); let canvas = document.getElementById('canvas'); canvas.style.background = `${c...
true
fc6092e99348fd4b90eb611f8597af6057f18689
JavaScript
snopan/janggi
/frontend/utils.js
UTF-8
1,935
3.140625
3
[]
no_license
const row_index = (row) => { // Converts 1-9 to 0-8 return row - 1; } const col_index = (col) => { // Converts A-I to 0-9 return col.charCodeAt(0) - 65; } const reverse_row_index = (row_index) => { return row_index + 1; } const reverse_col_index = (col_index) => { return String.fromCharCode(c...
true
1f51f6d55473d5b26ce1d5b74b36519390b798f0
JavaScript
debbiechiang/charity-warriors
/js/script.js
UTF-8
18,363
2.53125
3
[]
no_license
var CW = (function() { 'use strict'; var init = function(){ nav.init(); slide.init(); carousel.init(); }; /* * Function: Initiates sticky nav and animated scrolling. * returns @void */ var nav = { init: function(){ $('.nav').waypoint('sticky'); this.scrollTo(); }, scrollTo: function(){...
true
17b08f624db38a1be73d73bcd2222c03bed0d144
JavaScript
Isaque-Alves/Do-zero-ao-mercado-2.0
/exercicios-web/fundamentos/hoisting.js
UTF-8
264
3.125
3
[]
no_license
//curiosidade //Hoisting javascript é um comportamento padrão de mover a declaração para o topo console.log("a = ", a); var a = 2; console.log("a = ", a); //Em let, o hoisting não funciona // console.log("b = ", b); // let b = 2; // console.log("b = ", b);
true
7ce98ac944b39403e0b3ce1862e3f4212760dc16
JavaScript
noormd123/retailBill
/retail.class.js
UTF-8
1,959
3.015625
3
[]
no_license
(function() { /** * Constructor. * Initialize all the global variables */ RetailBill = function(grossAmt, subTotal, discountPercent) { this.grossAmt = grossAmt; this.subTotal = subTotal; this.discountPercent = discountPercent; this.discountAmt = 0; this.netAmt = 0; }, RetailBill.prototype = { /...
true
11a987836a01d9753efbafa91ad0e14f6f39337e
JavaScript
pennpress1/HelloWorld
/js/obj.js
UTF-8
602
3.09375
3
[]
no_license
var post = { title: "Starwars", text: "A New Hope", date: "1977", comments1: "Luke", comments2: "Vader", comments3: "Solo", picture: "x-wing" }; var House = { bathrooms: "1", bedrooms: "2" }; House.bathrooms House.bedrooms var mansion = Object.create(House); // create an mansion object, inheri...
true
06873b7d8af99cffa6091d6d74f7568be2e72184
JavaScript
beiyuu/Raining-In-Chrome
/background.js
UTF-8
737
2.828125
3
[]
no_license
var hasSetRain = false,isPlay = false,player = document.getElementById('player'); function togglePlay(){ if(isPlay){ isPlay = false; player.pause(); chrome.browserAction.setIcon({path: 'assets/sun.png'}); chrome.browserAction.setTitle({title:'Raining makes everything better!...
true
d064a53322f9d95e5efacb24d6da7467a78b4f44
JavaScript
JuanMiguel94/Proyecto-de-software-S2-2017
/controllers/funcionarioController.js
UTF-8
5,701
2.625
3
[]
no_license
/* *Tecnologico de Costa Rica *Proyecto de ingenieria de software *Jose Alberto Hidalgo Bonilla *Sistema de apoyo administrativo *Controlador de funcionarios */ var funcionarioService = require('../businessLogic/funcionarioService.js'); //var funcionarioValidator = require('../businessLogic/dataValidator/funciona...
true
6ee57a2774da72cc15f7112aefc3a7d9f6d2e56d
JavaScript
estebansalom/EjemploCriptoFront
/src/pages/register-user/RegisterUser.js
UTF-8
2,839
2.53125
3
[]
no_license
import React, { useState, useEffect } from "react"; import axios from "axios"; import Form from "../../components/form/Form"; import Input from "../../components/input/Input"; import md5 from "md5"; export default function RegisterUser({ history }) { const [name, setName] = useState(""); const [last, setLast] = us...
true
9d638f07469f022035733db2121bc8ec41c2ce91
JavaScript
jaimefps/spinoza-react
/src/components/how.js
UTF-8
1,683
2.546875
3
[]
no_license
import React from 'react'; import '../assets/how.css'; export default function How (props) { const notations = [ {string: 'E = Ethics'}, {string: '1 ... 5 = parts'}, {string: 'Def(#) = Definition(#)'}, {string: 'Ax(#) = Axiom(#)'}, {string: 'P(#) = Proposition(#)'}, {string: 'Cor(#) = Corolla...
true
23cdf24866ca9c8f9710943dccd7e76d78df6bbd
JavaScript
MrsPepa/Red-Social
/assets/js/app.js
UTF-8
1,833
2.734375
3
[]
no_license
(function(){ // Initialize Firebase var config = { apiKey: "AIzaSyCjfxMyEz04kBFLW7__40QIxdaLUyJGE5M", authDomain: "red-social-f3ce5.firebaseapp.com", databaseURL: "https://red-social-f3ce5.firebaseio.com", projectId: "red-social-f3ce5", storageBucket: "red-social-f3ce5.appspot.com", messaging...
true
401a3e4d471a1e68f1d6eaab030c7351d20becc0
JavaScript
simonihmig/broccoli-concat-analyser
/build-output-summary.js
UTF-8
1,333
2.703125
3
[]
no_license
var walkSync = require('walk-sync'); var fs = require('fs'); var filesize = require('filesize'); function prepareFiles(files) { let total = 0; files.forEach(x => x.label = x.relativePath + ' (' + filesize(x.sizes.compressed) + ')'); files.forEach(x => total+= x.sizes.compressed); files.forEach(x => x.weight =...
true
e7a3d61d711701c79a7ba694fff3eacb5e299fd4
JavaScript
2youyou2/engine
/cocos2d/core/vmath/color4.js
UTF-8
7,579
3.4375
3
[ "MIT" ]
permissive
import { EPSILON } from './utils'; /** * Represents a color with red(r), green(g), blue(b) component of that color and * and an extra alpha(a) component indicating how opaque this color is. */ class color4 { /** * Creates a color, with components specified separately. * * @param {number} r - Value assign...
true
2b3b4dd8b6d9d5e1509e9a8aee2800ec6ada28c1
JavaScript
KiKiKi-KiKi/gs-task02
/src/storage.js
UTF-8
336
2.609375
3
[]
no_license
const LOCAL_STRAGE_KEY = 'ReduxTodoApp'; export const saveLocalStorage = (data) => { return localStorage.setItem(LOCAL_STRAGE_KEY, JSON.stringify(data)); }; export const getLocalStorageData = () => { return localStorage.getItem(LOCAL_STRAGE_KEY); }; export const clearLocalStorageData = () => { return localStor...
true
eb317ddb17682b8a100325d19a84190fad133cfb
JavaScript
YukiOnishi1129/todo-redux
/src/components/AddTodo.jsx
UTF-8
1,319
2.8125
3
[]
no_license
import React, { Component } from 'react'; import PropTypes from 'prop-types'; export default class AddTodo extends Component { constructor() { super(); this.state = { inputValue: '', // todo追加フォームの入力値(初期値は空文字) }; this.onInputValueChange = this.onInputValueChange.bind(this); this.handleAdd =...
true
501e9d155ae2db3b0cc93682704def608e44ad3f
JavaScript
ThibaultCarmantrand/Dactyle.js
/Dactyle.js
UTF-8
1,534
3.046875
3
[ "MIT" ]
permissive
class Dactyle { constructor (target, text, minSpeed, maxSpeed, htmlSupport) { this.targetQuery = target; this.target = document.querySelector(target); this.text = text; this.table = this.setTable(this.text); this.minSpeed = minSpeed || 50; this.maxSpeed = maxSpeed ||...
true
a07be820feec3704b63e118db4bf590410b84a63
JavaScript
kubayof/web_labs
/Lab2/js/model/UserPrincipal.js
UTF-8
279
2.890625
3
[]
no_license
export default class UserPrincipal { constructor(name, email, gender, birthDate) { this.id = Math.round(Math.random() * 100000).toString(); this.name = name; this.email = email; this.gender = gender; this.birthDate = birthDate; } }
true
f0deb9aa3d0bb8ad7a9dd01e275f62f17982be49
JavaScript
pathspot-brandon/math-toolbox
/test/clamp.test.js
UTF-8
451
2.578125
3
[ "MIT" ]
permissive
import { clamp } from '../src/math-toolbox' describe('Force a value within the boundaries by clamping it to the range `min`, `max`.', () => { it('Clamp 30 between 10 and 20 and expect 30', () => { expect(clamp(10, 20, 30)).toBe(20) }) it('Clamp 30 between 20 and 45 and expect 30', () => { expect(clamp(2...
true
4a7515cb6b1d6b0affff996373f5b7c57fd67ef0
JavaScript
cbat01/codewars
/javaScript/7kyu/Convert an array of strings to array of numbers.js
UTF-8
166
2.75
3
[]
no_license
function toNumberArray(stringarray){ return stringarray.map(x => parseFloat(x)); } function toNumberArray(stringarray){ return stringarray.map(parseFloat); }
true
3ef5ee843de265d05927df1ae7b01e454f80fe6e
JavaScript
ohierro/training-daw-2020
/03_fundamentos/12_events/main.js
UTF-8
443
2.84375
3
[]
no_license
function onClick() { let tbody = document.getElementsByTagName('tbody')[0] let tr = document.createElement('tr') let td = document.createElement('td') td.innerText = '0' tr.appendChild(td) td = document.createElement('td') td.innerText = 'Example' tr.appendChild(td) td = document....
true
0a227fbf4e9b81ab5a4fbb578dd45c685dfad4a9
JavaScript
nicolasbaudry3/blackboard
/public/js/dataviz.js
UTF-8
2,520
2.6875
3
[]
no_license
var ctx = document.getElementById("chartBar"); var numSexe = document.getElementById('chartBar'); var numMale = numSexe.dataset.male; var numFemale = numSexe.dataset.female; // recupérer les donnés du front via attribut pers// new Chart(ctx, { type: 'bar', data: { labels: ['Male', 'Fema...
true
ee024af3ef830d209d71f298fe9a00ea91076ff4
JavaScript
hibow/Algo-practice
/leetcodes/1. Two Sum/twoSum.js
UTF-8
1,490
3.890625
4
[]
no_license
/* * [Source] * * https://leetcode.com/problems/two-sum/ * * [Problem Description] * * Given an array of integers, return indices of the two numbers such that they * add up to a specific target. * You may assume that each input would have exactly one solution, and you may not * use the same element twice. * ...
true
af8dc9cdbdca283439648822b35a5017d685d4dc
JavaScript
robotomatic/smf
/backup/2016/02-feb/backup.2016.2.11-character_changeup/js/geometry/line.js
UTF-8
2,019
3.171875
3
[]
no_license
Line = function(start, end) { this.start = start ? start : new Point(); this.end = end ? end : new Point(); } Line.prototype.getPoints = function() { return new Array(this.start, this.end); } Line.prototype.translate = function(x, y, scale) { this.start.x = x + (this.start.x * scale) this.start.y ...
true
ac2c92c412b4bd8834a3955744ac6bd951acc055
JavaScript
Bujintei/Awesomenauts
/js/entities/PlayerBaseEntity.js
UTF-8
1,716
2.640625
3
[ "MIT" ]
permissive
game.PlayerBaseEntity = me.Entity.extend({ init : function(x, y, settings) { //same like PlayerEntity above for our constructor function this._super(me.Entity, 'init', [x, y, { image: "tower", width: 100, height:100, spritewidth: "100", spriteheight: "100", getShape: function() { return (new me...
true
f3e7f019a30b5715704901a5ff01ae319c6d7286
JavaScript
RadioJackie/Note-Taker
/routes/apiRoutes.js
UTF-8
1,919
2.734375
3
[]
no_license
const path = require("path"); const fs = require("fs") module.exports = function (app) { app.get("/api/notes", function (req, res) { fs.readFile(path.join(__dirname, "../db/db.json"), 'utf8', (err, jsonString) => { if (err) { return console.log(err) } res...
true
60fb165cd855f295b86144b647184a14e2f8bc62
JavaScript
ajccom/pick
/test/spec/specs/map.js
UTF-8
1,568
3.46875
3
[]
no_license
describe('测试 map 方法', function() { it('在参数函数中修改值,map 方法返回的 pick 对象的数据应该是修改后的', function() { var a = {a: 1, b: 2, c: 3}, b = {a: {b: {c: 1}}} var r1 = pick(a).map(function (v, k) { return v + '_number' }).out() var r2 = pick(b).map(function (v, k) { return typeof v })....
true
d5d0bd16aa1a5c35cb96d174e202ab79ade3a19c
JavaScript
mesofunny/frontend-backup
/src/components/HomePage.jsx
UTF-8
1,185
3.0625
3
[]
no_license
// Code for home page and joke of the day // imports import React, { useState, useEffect } from "react"; // import { Link } from "react-router-dom"; import axios from "axios"; import HomePageGrid from "./HomePageGrid"; import '../homepage.css'; const HomePage = () => { // store joke of the day using hooks ...
true
72387e773f3854d1cf687a752985f546e6b83407
JavaScript
yoeubi/algorithm
/leetcode/intersection-of-two-arrays.js
UTF-8
516
3.4375
3
[]
no_license
// https://leetcode.com/problems/intersection-of-two-arrays/ var intersection = function(nums1, nums2) { const num1 = nums1.reduce((pre, cur) => { pre[cur] = cur; return pre; }, {}); const num2 = nums2.reduce((pre, cur) => { pre[cur] = cur; return pre; }, {}); const num1Key = Object.keys(num1)...
true
e99019477f8ad10df76004a0dd1cacbf69c3d5fe
JavaScript
90arther/js-tools
/chrome_source/js/deom.js
UTF-8
2,558
3.6875
4
[]
no_license
/** * Created with JetBrains WebStorm. * User: Administrator * Date: 13-7-22 * Time: 下午4:13 * To change this template use File | Settings | File Templates. */ /* var p1=document.getElementById('p1'); var p2=document.getElementById('p2'); var p3=document.getElementById('p3'); //HTML事件处理程序,省略不写 //...
true
b920d05bc1de27f1e4a1eaf6737e6a50ff8db47c
JavaScript
KamilSmolenski/MyBuisnessCardWebsite
/src/components/Form.js
UTF-8
1,604
2.671875
3
[]
no_license
import React from "react"; import axios from "axios"; import "../styles/Form.scss"; class Form extends React.Component { constructor(props) { super(props); this.state = { name: "", surname: "", email: "", message: "" }; } handleForm = e => { axios .post("https://formcarry.com/s/q930R29vXQP", t...
true
b0b371896c86bdfe30a5281f7c888572246e15c5
JavaScript
rome/tools
/crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/valid.js
UTF-8
571
3.390625
3
[ "MIT" ]
permissive
function case1() { class A { } foo(A); } function case2() { let A = class A { }; foo(A); } function case3() { class A { b(A) { A = 0; } } } function case4() { class A { b() { let A; A = 0; } } } function case5() { let A = class { b() { A = 0; } } } // Ignores non class function ca...
true
5a622d2c84000cd1cc35de8384ac759aac423b35
JavaScript
obrienke/Applied-Digital-Media-1
/week4/lecture.js
UTF-8
353
3.578125
4
[]
no_license
/*Week 4 Lecture Code Chapter references in code below can be found in: A Smarter Way to Learn JavaScript - A copy of this book is available on Moodle */ // see chapter 41 let x = 1; while(x < 3){ console.log("While Loop: " + x); x++; } console.log(""); // see chapter 18 to 20 for(let i = 1; i <= 10; i++){ co...
true
5299546e5c66d39172fabd6f1533c23cc478faf0
JavaScript
Plasmalemon/react-practice
/src/pages/level2/HocPage.js
UTF-8
3,203
3.21875
3
[]
no_license
import React, { Component } from 'react' import './index.css' // 为了提高组件复用率,可测试性,就要保证组件功能单一性; // 但是若要满足复杂需求就要扩展功能单一的组件,在React里就有了HOC(Higher-Order Components)的概念 // 定义:是一个函数,它接收一个组件并返回另一个组件。 function Child(props) { return <div>Child-{props.name}</div> } // 繁琐 // 这里的Cmp是function组件或者class组件 // const foo = Cmp => { ...
true
6e7fe4146ad62c8e25a03f28d9d3a098e508998f
JavaScript
ColeWill/casting-calendar
/js/timesControllers.js
UTF-8
2,076
2.609375
3
[]
no_license
console.log("Times controller"); angular.module("CastingAiApp", []) .controller("TimesController", TimesController); var timesList = [ {time: "1:00PM", mTime: "13:00", fTime: "13:15"}, {time: "1:15PM", mTime: "13:15", fTime: "13:30"}, {time: "1:30PM", mTime: "13:30", fTime: "13:45"}, {time: "1:45PM", mTime: "13:4...
true
ea98c78dda88491a5c2cf48b78171c3a36f3cc5b
JavaScript
Palash90/site
/public/card_assets/utils.js
UTF-8
2,000
3.5625
4
[]
no_license
function convertToBengaliNumber(number){ var output = ''; var sNumber = number.toString(); for (var j = 0; j < sNumber.length; j++) { switch (sNumber.charAt(j)) { case '0': output += '০'; break; case '1': output += '১'; ...
true
d6fc301c6f60dbff40c287de62d23a61779529a2
JavaScript
akkashjp/hearing-aid
/server.js
UTF-8
540
3.109375
3
[]
no_license
// var sym =[{"symbols":"xyz","type":"none","var":"int"}, // {"symbols":"xyz","type":"none","var":"int"}] // var symbols=[]; // sym.forEach(function(element) { // symbols.push(element.symbols); // }); data=[{"a":1},{"a":2}]; r=[]; myMapproj=function(val) { return val+5; } function myMap(data){ data.forEach(f...
true
84ef269b70ea0e398fc154db55a11863c0fca68a
JavaScript
wookashart/gatsby-cv-generator
/src/components/cv-genetator/left/content/Skills.js
UTF-8
2,212
2.53125
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import styled from 'styled-components'; import InputWithLabel from '../../../global/InputWithLabel'; import Button from '../../../global/Button'; import { FunctionContext } from '../../Panels'; import SkillsList from './skills/SkillsList'; const SkillsPanel = styled.div` d...
true
b4e66ed06cca51e3b5b6cf1accbacdb06d0ec9dc
JavaScript
bradLegg/GUI-I
/inclass5/js/example.js
UTF-8
1,039
3.984375
4
[]
no_license
function appendUnorderedList(text, appendStart_OR_appendEnd) { /* getElementsByTagName() returns an array of objects, thus index is specified */ var ul = document.getElementsByTagName('ul')[0]; var li = document.createElement('li'); if (appendStart_OR_appendEnd == "end") { ul.appendChild(li); li.text...
true
dce3b54f470cd3dac99f490adccb1b62f01cc699
JavaScript
telmanagababov/ctci
/part4-graphs/src/findSuccessor.js
UTF-8
393
2.796875
3
[ "Apache-2.0" ]
permissive
const Node = require("../common/treeNode"); function findSuccessor(tree, node) { let successor = tree.root; while(successor.left !== node && successor.right !== node) { if(successor.value > node.value) { successor = successor.left; } else { successor = successor.right; ...
true
54fdb2c99b1a5f59fdbff6ea51656e54f82a9f8c
JavaScript
bvaugusto/ES6
/modulo-1/client/js/app/controllers/NegociacaoController copy.js
UTF-8
1,069
3.125
3
[]
no_license
class NegociacaoController { constructor() { let $ = document.querySelector.bind(document) this._inputData = $('#data') this._inputQuantidade = $('#quantidade') this._inputValor = $('#valor') } adiciona(event) { event.preventDefault() console.log(this._in...
true
0c5a0ac4bba8542b27d39bced25b1cf4e6d8f8cf
JavaScript
krummi/webcrawler.js
/lib/crawler.js
UTF-8
13,311
2.90625
3
[]
no_license
/* * External dependencies. */ var cheerio = require('cheerio'), request = require('request'), _ = require('lodash'), urlparser = require('url'), S = require('string'), colors = require('colors'); /* * Internal dependencies. */ var Frontier = require('./frontier'); /* * For debugging purposes. */ var...
true
571be7079a556b04b54338cd201649a1d4a8174a
JavaScript
ssscassio/analise-e-projeto-de-algoritmos-2017.2
/terceira_unidade/Fibonacci/dynamicBottomUp/index.js
UTF-8
359
3.09375
3
[]
no_license
const // Importações globais hasFibonacciError = require('./errorHandle'), fibonacci = require('./fibonacci'); const main = (number) => { if (!hasFibonacciError(number)) { var fibonacciValue = fibonacci(number); console.log(`O número ${number} da sequência de Fibonacci é: ${fibonacciValue}`...
true
8d757171147f91f04ff6ebd770c008e6a5e3f05f
JavaScript
chetnashah/emacs-lisp-practice-work
/jswork/functionstuff.js
UTF-8
244
3.109375
3
[]
no_license
function testfn(){ // even thoug function defn/declaration does not have params, // arguments object is perfectly filled by parameters given from callee console.log('arguments obj = ', arguments); } testfn(); // testfn(1,2,3);
true
63aab71beeefc90debd1971de37ce19c4c8df02b
JavaScript
mcpanic/photoshop-video
/js/script.js
UTF-8
14,290
2.953125
3
[]
no_license
function _getSecondsDisplay(seconds){ return (seconds < 10) ? "0" + seconds : seconds; } function getTimeDisplay(seconds){ var text = ""; text = Math.floor(seconds / 60) + ":" + _getSecondsDisplay(seconds % 60); return text; } /* - video_id - user_id - interfac...
true