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
23be09d7a82676f179040a8abae45f7b394becae
JavaScript
le-christine/dev-academy
/Week9/10-25-19/2-Jest-Testing-Lab/reverse.test.js
UTF-8
258
2.84375
3
[ "ISC" ]
permissive
const reverse = require('./reverse'); it('reverses a string', () => { expect(reverse('cat')).toBe('tac'); }) it('reverses a string', () => { expect(reverse('hello there the angel from my nightmare')).toBe('eramthgin ym morf legna eht ereht olleh'); })
true
24e41a376cd115f37cf53d7577fe6171583dd317
JavaScript
longblue2910/Tracking
/TeamNET/TeamNET/wwwroot/js/update_eventcontent.js
UTF-8
868
2.609375
3
[]
no_license
var item_event = document.getElementsByClassName("item-event"); var questions = document.getElementsByClassName('question'); for (var i in item_event) { if (item_event[i].value != null) questions[i].classList.add('show'); } var cancel = $('.cancel'); var id = $('#EventContentId').val(); cancel.click(f...
true
493db4d8abaad792b2ee8577c773dff28339412e
JavaScript
jrinard/character
/js/scripts.js
UTF-8
638
3.328125
3
[]
no_license
// Business var heroChoice = function(val1,val2,val3) { var answer = (val1 + val2 + val3); if (answer <= 5) { return("#batman"); } else if (answer === 6){ return("#superman"); } else if (answer >= 7) { return("#flash") } }; $(document).ready(function(){ $("#main form").submit(function(even...
true
7b579c46f36b454e02b2de9930a9ed3a3233827c
JavaScript
granam180/javascripts
/array_problems.js
UTF-8
839
3.875
4
[]
no_license
console.log('CONNECTED'); //PRINT REVERSE function printReverse(arr){ for(var i = arr.length - 1; i >= 0; i--){ console.log(arr[i]); } } printReverse([3,6,1,9]); //**** isUniform() **** function isUniform(arr){ var first = arr[0]; //checks first index for(var i = 1; i < arr.length; i++){ //loops through each n...
true
3494a6001879aa496a5cc3943a3dd95acf2bbeec
JavaScript
7iomka/sPopup
/js/sPopup/sPopup.js
UTF-8
10,860
2.578125
3
[]
no_license
(function(){ /** * @author 7iomka <7iomka@gmail.com> * Plugin sPopup - clean js plugin for turn your content into fullscreen * @param {(string)} selector - one selector or multiple selector, separated with comma * @param {Object} options - user params as settings */ this.sPopup = function(selector, options) { ...
true
d7c8f23f037e39146fa3de5e9228b6a98c939190
JavaScript
BrionyHoughton99/quote-generator
/app.js
UTF-8
440
3.203125
3
[]
no_license
const endpoint = "https://type.fit/api/quotes"; let quotes = []; fetch(endpoint) .then(response => response.json()) .then(data => quotes.push(...data)); generateQuote = () => { let random = Number.parseInt(Math.random()*quotes.length + 1); document.querySelector('#quoteOutput').textContent = `...
true
a026e3c861ff73eb142c9c91a1d866d2fd477a9b
JavaScript
RyanChanTech/TSA-Software-Development-2018-2019-V2
/Algebra.js
UTF-8
2,368
4.09375
4
[]
no_license
//Algebra Code; use this as an example if you're new: //Textbox parameters: (x,y,width,height,text size) //Button parameters: (x,y,width,height,text,text size) var algebraTextBox = new TextBox(320,150,350,40,30); var algebraCheckButton = new Button(380,200,180,40,"Check",30,xOffset=50); var algebraNewQuestionButton = ...
true
5f95426a5a9ff3fb0e926ba1550a98037213b5d0
JavaScript
kenny-tse/timer
/timer1.js
UTF-8
489
3.484375
3
[]
no_license
//there was no sound using \x07 but i have attached console logs for each time and beep const args = process.argv; if (args === "") { return; } let arrayOfNumbers = args.slice(2); for (let i = 0; i < arrayOfNumbers.length; i++) { if (!isNaN(arrayOfNumbers[i])) { if (arrayOfNumbers[i] >= 0) { setTimeo...
true
7719011c897790df297eeff3700d1c8914667b33
JavaScript
Icheka/KliQr-fullstack-assessment-microservice-1
/handlers/Http.class.js
UTF-8
3,010
2.828125
3
[]
no_license
const express = require('express'); const fs = require('fs'); const path = require('path'); require('dotenv').config(); class _Http { constructor() { this.incoming_Message = "Incoming"; this.outgoing_Message = "Outgoing"; }; /** * emit(string res, string status_code, string header, s...
true
06fe7a6809c97e67b8a122febb17f1fbfb477346
JavaScript
Reebook/search-movie-example
/src/hooks/UseDetail.js
UTF-8
291
2.578125
3
[]
no_license
import {useEffect,useState } from "react" import getMovie from '../services/getMovie' export function UseDetail(id){ const [movie, setMovie] = useState(null) useEffect(()=>{ getMovie({id}).then(movie => setMovie(movie)) },[id]) return movie }
true
96b32f27e3f12ae1529c1b4372d0e1591bd35e93
JavaScript
Vivekch05/e-book-reader
/src/components/Home.js
UTF-8
1,748
2.515625
3
[]
no_license
import React, { Component } from 'react' import HomePic1 from "../images/book20.jpg" import HomePic2 from "../images/book26.jpg" import HomePic3 from "../images/book31.jpg" import Carousel from 'react-bootstrap/Carousel' export default class Home extends Component { render() { return ( <> ...
true
7e0209c988a36c54c61fe49585977bca260d806b
JavaScript
holi-java/getstarted-esma-script
/spec/17.class.spec.js
UTF-8
7,116
3.234375
3
[]
no_license
describe('class', function () { describe('properties', function () { it('declaration', function () { class Bar { foo = 'bar'; } let bar = new Bar(); expect(bar.foo).toEqual('bar'); }); it('get', function () { clas...
true
28ea5f876a41ae52091991bfefb100bc06a9072b
JavaScript
isao92/FriendFinder
/app/data/friends.js
UTF-8
514
2.578125
3
[]
no_license
var answersArray = [ { name: "Ahmed", photo: "https://images.pexels.com/photos/614810/pexels-photo-614810.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500", scores: [1, 2, 3, 4, 5, 5, 4, 3, 2, 1] }, { name: "Yun", photo: "https://images.pexels.com/photos/415829/pexels-phot...
true
a4dc24f662c44718b32bb6b2cf08d8e17dd4aa30
JavaScript
lybGG/h_ui
/src/directives/clickoutside.js
UTF-8
1,265
2.671875
3
[]
no_license
const EVT_LIST = ['click', 'mouseup', 'mousedown'] /** * 指令绑定的值 * type: Function | Object * 当值为Object类型时,可设置以下两个属性: * trigger: String,指定触发回调函数的事件。可选:click(默认值), mouseup, mousedown。 * handler: Function,回调函数。 */ export default { bind(el, binding, vnode) { function documentHandler(e) { if (el.contains(e...
true
59a656a7f21437f44c33eb12ed6bd169648f1b57
JavaScript
Bill-C2018/star-site
/src/components/FetchHandlers.js
UTF-8
1,214
2.96875
3
[]
no_license
export const postCall = async (data,uri,token,isJson) => { let s2 = ''; if( isJson) { s2 = JSON.stringify(data); } else { s2 = data; } const requestOptions = { method: 'POST', headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*', 'Access-Token': token}, body: ...
true
81e4fa40a27bfa6432bc4f3bef0839204bb8caf7
JavaScript
pavelglebov/ggrc-core
/src/ggrc-client/js/plugins/utils/request-utils.js
UTF-8
954
2.828125
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/* Copyright (C) 2020 Google Inc. Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> */ /** * Makes POST request to the proposed [url] with certain [body]. * @param {String} url A string containing the URL to which the request is * sent. * @param {Object} body Data to be sent to the ser...
true
242f002f76e9d8e7c9bfe0dd079f0db814d7ce58
JavaScript
ahmedrowaihi/covid19cleverprogrammerschallange
/charts.js
UTF-8
4,174
2.828125
3
[]
no_license
async function getHistoricalData() { showDataInTable(); const response = await fetch( "https://corona.lmao.ninja/v2/historical/all?lastdays=120" ); const data = await response.json(); buildChartlineData(data); const res = await fetch("https://disease.sh/v2/all"); const piedata = await res.json(); bu...
true
320030e6cd3bf756522a3d81ee50dab4f64d3689
JavaScript
MechaEdgar/FiboRecursivo
/fiborecursivo.js
UTF-8
170
3.25
3
[]
no_license
//fibonacci por medio de recursividad. var recursive = function (n){ if(n <=2){ return 1; } else { return this.recursive(n - 1) + this.recursive(n-2); } }
true
188e56878ae440304ee28ed39cd50bb15d9af317
JavaScript
wilcc/datasaur
/main.js
UTF-8
6,303
3.09375
3
[]
no_license
/******************** * HELPER FUNCTIONS * ********************/ const makeDino = function(name,period,diet,extinct=false){ const newDino = { species: name, period: period, carnivore: diet, extinct: extinct } return newDino } const makeSingular = function(fakeDino){ const dino = makeDino(fakeD...
true
d9ee0314f24c47f42645d3710754cd57b70f1353
JavaScript
andyp111/subclass-dance-party
/src/movingDancer.js
UTF-8
620
2.5625
3
[]
no_license
var MovingDancer = function(top, left, timeBetweenSteps) { //dancer slides from left to right MakeDancer.apply(this, arguments); this.$node.removeClass('dancer'); this.$node.addClass('notTL'); this.$node.html('<span class="mover"></span>'); }; MovingDancer.prototype = Object.create(MakeDancer.prototype); Movin...
true
9abd20715403565e6e3383e527aab3dc98756989
JavaScript
Spindlyskit/rotom-discord-bot
/commands/info/learn.js
UTF-8
1,341
2.625
3
[ "MIT" ]
permissive
'use strict' const { Command } = require('discord.js-commando'); module.exports = class LearnCommand extends Command { constructor(client) { super(client, { name: 'learn', group: 'info', memberName: 'learn', description: 'Get details on this pokemon/item/mov...
true
ed59890fa7b881e117dba9b6b5d6b76cb230bea0
JavaScript
ohbumjun/NodeJs_DanceMatchPlatform
/client/static/cssjs/mypage/myspace.js
UTF-8
6,918
2.796875
3
[]
no_license
// 1. tab ----- function onTabClick(event) { event.preventDefault() let activeTabs = document.querySelectorAll('.active'); // deactivate existing active tab and panel activeTabs.forEach(function(tab) { tab.className = tab.className.replace('active', '').replace(' ',''); }); // activate new tab and pa...
true
3010f6527381aa561c52d4511ebfb4c2f6738a41
JavaScript
perfect14/user-app-project
/src/components/UsersForm.js
UTF-8
1,384
2.625
3
[]
no_license
import React, { Component } from 'react'; import '../css/form.css' class UsersForm extends Component { constructor(props) { super(props); this.state = { name: "", email: "", gen: "" } } handleChange = (e) => { this.setState({ [e.target.name]: e.target.value }); } ...
true
30c45579e9b1043994e0baa5dd0e2bf86004123d
JavaScript
DanishKalim1/Javascript_Turn_Based_Game
/js/game.js
UTF-8
15,004
3.234375
3
[]
no_license
// weapons const weapons = [{ name: "Dagger", damage: 15, className: "weapon-1", image: "images/dagger.png" }, { name: "Sword", damage: 20, className: "weapon-2", image: "images/sword.png" }, { name: "Axe", damage: 25, className: "weapon-3", image: "images/axe.png" }, { name: "Killer", ...
true
21b471d0c11386c98ad19fe5b396a25c63407529
JavaScript
benjaminhuanghuang/js-study
/es6/class/static-method.js
UTF-8
316
4.125
4
[]
no_license
class Animal{ constructor(name, age) { this.name = name; this.age = age; } shout() { return `My name is ${this.name}, age is ${this.age}`; } static foo(){ return 'Here is a static method'; } } const cow = new Animal('betty', 2); console.log(cow.shout()); console.log(Animal.foo())
true
dafcb37de099841756e42add20f4db64ca35233a
JavaScript
leo-alfaya/Album
/src/json-worker.js
UTF-8
675
2.71875
3
[]
no_license
import fs from 'fs'; import path from 'path'; const createFile = (dirname, name) => { let filePath = path.join(dirname, name); if(!fs.existsSync(filePath)){ try { fs.writeFileSync(filePath, JSON.stringify({})); } catch(err) { console.log(err); } } else { return('This file already exi...
true
af51c11e75ba1bdbbdb41b2bffeb58268fec4740
JavaScript
HennanGadelha/front-luznoporto
/src/components/components pages/dados/card-dados.js
UTF-8
4,398
2.515625
3
[]
no_license
import React, { Component } from 'react'; import api from '../../../api'; import Grid from '@material-ui/core/Grid'; // import Moment from 'moment'; // import { Card, CardTitle, CardText, CardDeck, CardBody } from 'reactstrap'; class Card1 extends Component { constructor() { super(); var anoAtual = new Date...
true
ea968c78e2b462ba849eb6a1767c8be1049efe6e
JavaScript
qahweh/Almost-Darkness
/html/classes/Fishman.js
UTF-8
5,029
2.640625
3
[ "Unlicense" ]
permissive
function Fishman(x,y,room,level) { var r = new Human(x,y,room); r.imgx = 1; r.imgy = 1; r.isFishman = true; r.health = 2; r.cooldown = 10; r.offsetImg = new Point(14,35); r.level = level; r.canBeFreezed = true; r.animation = new Animation(1); r.normalanimation = new Animatio...
true
53a84c5f36c653957c8b3e669204f7a2c3b1067e
JavaScript
JoshuaPawlik/testbuilder
/detectNetwork.js
UTF-8
6,514
4.15625
4
[]
no_license
// Given a credit card number, this function should return a string with the // name of a network, like 'MasterCard' or 'American Express' // Example: detectNetwork('343456789012345') should return 'American Express' // How can you tell one card network from another? Easy! // There are two indicators: // 1. The fi...
true
eaf7959206f51ef82a8617153de9861d68e2971c
JavaScript
broedkanibal/vote-for-employee
/src/components/List.jsx
UTF-8
428
2.71875
3
[]
no_license
var React = require('react'); var ListItem = require('./ListItem.jsx'); var employees = [{"id":1,"text":"Jesper"}, {"id":2,"text":"Ted"},{"id":3,"text":"Julie"}]; var List = React.createClass({ render: function() { var listItems = employees.map(function(item) { return <ListItem key={item.id} e...
true
9e16529d1607496092afcde17768d01d12efb377
JavaScript
sudoor/Primer-proyecto-nodejs
/src/routes/ventas.js
UTF-8
10,180
2.640625
3
[]
no_license
const express = require('express'); const router = express.Router(); // Permite la creación de rutas const Producto = require('../models/Producto.js'); // Modelo de datos de los productos const Dollar = require('../models/Dollar.js'); // registro del precio del dollar const Ingreso = require('../models/Ingreso.js'); //...
true
9f38b9e7e21c1b523d1b02d7ca30bba04aaf7cff
JavaScript
seongkevinlee/practice-problems
/LeetCode/removeElement.js
UTF-8
1,326
4.78125
5
[]
no_license
//! Given an array nums and a value val, remove all instances of that value in-place and return the new length. //! Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. //! The order of elements can be changed. It doesn't matter what you leave b...
true
83e8d249a760b6d9e2259b421a89d7aceab5fa01
JavaScript
HreneanAlin/messannger-app-server
/JWT/JWTConfig.js
UTF-8
1,390
2.515625
3
[]
no_license
const jwt = require('jsonwebtoken') if (process.env.NODE_ENV !== 'production') { require("dotenv").config({path: '../.env'}) } const JWTConfig = (user) => { const privateKey = "-----BEGIN RSA PRIVATE KEY-----\n" + process.env.JWT_PRIVATE_KEY+"\n-----END RSA PRIVATE KEY-----" const expiresIn = '30d' ...
true
0e490eff796ddc6c19383e5681302088fe5030da
JavaScript
andrewmaxwell/junk
/misc/lambda.js
UTF-8
3,916
3.015625
3
[]
no_license
// https://en.wikipedia.org/wiki/Lambda_calculus // https://justine.lol/lambda/ const nest = (tokens) => { const indexes = []; const result = []; for (const t of tokens) { if (t === '(') indexes.push(result.length); else if (t === ')') { if (!indexes.length) throw new Error('Unexpected )'); r...
true
6efd384a0aae49b5b26b913518b992d284d683ad
JavaScript
Samplasion/discord-reputation-bot
/commands/dmnotifications.js
UTF-8
766
2.71875
3
[]
no_license
exports.run = async (client, message, args) => { let data = message.author.settings //message.channel.startTyping() if(args.length < 1) return message.reply(`your settings for DM notifications are set to \`${data.dmEnabled ? 'ON' : 'OFF'}\``) let value = args[0].toUpperCase() if(!['ON', 'OFF'].includ...
true
e138490aafae9a2a006cb0a2129398589eccb382
JavaScript
Valerii-Koles/roses
/javaScript/script.js
UTF-8
276
2.6875
3
[]
no_license
const iconMenu = document.querySelector('.menu_icon'); if(iconMenu){ const ourMenu = document.querySelector('.menu'); iconMenu.addEventListener("click", function(e) { iconMenu.classList.toggle("animate"); ourMenu.classList.toggle("open"); }); }
true
a3996b8d10a862e18680f08986586bd1bb7ba2cc
JavaScript
Bente80/JSPeriod2-NodeExpress-Test
/test/testModules.js
UTF-8
1,878
3.296875
3
[]
no_license
/** * Created by Bente on 02-03-2016. */ //Mocha is a feature-rich JavaScript test framework running on Node.js and the browser, making asynchronous testing // simple. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions // to the correct test case. // Mocha can u...
true
142215a8e4e783517cd38176c2aa36cc48833a35
JavaScript
oDrone/oDrone
/Console_Debug/ClientWeb/command.js
UTF-8
1,666
3.078125
3
[]
no_license
// Globals var sock = null var connected = false function connect() { if (!connected) { sock = new WebSocket("ws://" + document.getElementById("connect_url").value + "/command", "odrone-protocol"); sock.onopen = function(event) { console.log("OnOpen"); connected = true; ...
true
b7354bdd86032ea7e4d56d17bda2d1d9b171f36f
JavaScript
spirodonfl/machi-koro
/js/data-strings.js
UTF-8
6,435
2.875
3
[ "LicenseRef-scancode-unknown-license-reference", "CC-BY-4.0" ]
permissive
// TODO: Convert all necessary strings (including state strings in game.js) to this so we can stay consistent across references const _DATA_STRINGS = []; _DATA_STRINGS[0] = 'waiting for rolling player to roll'; _DATA_STRINGS[1] = 'waiting for player to choose to roll again'; _DATA_STRINGS[2] = 'waiting for player...
true
eb583129383e0a8c7876164dfcca8c759c88b240
JavaScript
MinhajSadik/JavaScript
/Main-Js/Array.js
UTF-8
291
3.40625
3
[]
no_license
var friendsAge = [20, 20, 30, 30,]; var sonaliAge = friendsAge[3] // add my array position // console.log(friendsAge); friendsAge[1]=21; // add a new array data console.log(friendsAge); var position = friendsAge.indexOf(20); // search this index line position. console.log(friendsAge);
true
356a0fb1954a1da720d2d350db27babd6e87ea9f
JavaScript
Pippo223/Video-Platform-Node
/routes/user.js
UTF-8
5,605
2.53125
3
[]
no_license
const express = require('express'); const user = express.Router(); const { pool } = require('../config/dbConfig'); //called to query the database const bcrypt = require('bcrypt'); //called to hash/encrypt password const session = require('express-session');//called to create session for user const flash = require('ex...
true
111784901a6567627eeb0e2a900c3592c7dc91e2
JavaScript
MarkPish/The-Scrape-anator
/scripts/scrape.js
UTF-8
2,317
3.515625
4
[ "MIT" ]
permissive
//Scrape script // Must use axios and cheerio for scraping var axios = require("axios"); var cheerio = require("cheerio"); //Function that scrapes the NYT website var scrape = function() { //Scrape website here return axios.get("http://www.nytimes.com").then(function(res) { var $ = cheerio.load(res.da...
true
0ac80f1bfab9d9ff28c568e4daabe80555e4fb5b
JavaScript
hungmans6779/jQuery
/【書本範例】/網頁設計,愛上jQuery/05/pro35.js
BIG5
818
2.515625
3
[]
no_license
$(document).ready(function() { $("table.myodd tr:not(:has(th))").click(function(){ var mynewn = new Date().getTime(); var tt=mynewn; myidname='myid'+tt; var temp=$(this).clone().attr({id:myidname}); $(temp).insertAfter("table.myeven tr:last").append('<td><a href=# onClick=myde('+tt+');>R</a></td>'); // $('#...
true
928ba2e4aac6378a653e09ef7c8e229442944f52
JavaScript
prasadanuj36/JavaScript-Tutorial
/Coding-Challenge/coding challenge 1/cc1.js
UTF-8
1,725
4.03125
4
[]
no_license
/* Mark and john are trying to compare their BMI( Body Mass Index), which is calculated using the formula: BMI = Mass/Height ^2= mass/(height*height). Mass in Kg and Height in meter. 1.Store Mark’s and John’s height in variables 2.Calculate both their BMIs. 3.Print a string to console containing the variable from step...
true
674738ddb45c50dded5ae40107cf2c47c88ae7aa
JavaScript
normcler/GemStore
/app.js
UTF-8
651
3.03125
3
[]
no_license
// Using the "two-argument" call to module defines a module. // The second argument allows you to supply a list of other modules that you // "inject" into this module. // Not going to bother with this for now. angular.module("myApp", []); angular.module("myApp").controller("myController", function() { alert("We...
true
796cc3c58c3e7119329bd8cf8870db914c36188a
JavaScript
Maloochow/js-looping-and-iteration-looping-code-along-onl01-seng-ft-052620
/index.js
UTF-8
318
3.28125
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function writeCards(array, event) { const cards = [] for (let i = 0; i < array.length; i++ ) { cards.push(`Thank you, ${array[i]}, for the wonderful ${event} gift!`) } return cards } function countDown(num) { let i = num while (i >= 0) { console.log(i) i = i-1 } }
true
20b8ab6ad9c605f54c5032b4062efd21cf0ed8e9
JavaScript
bgoonz/UsefulResourceRepo2.0
/_REPO/GITHUB/docs/lib/read-frontmatter.js
UTF-8
2,268
2.65625
3
[ "MIT", "CC-BY-4.0" ]
permissive
const matter = require('gray-matter') const revalidator = require('revalidator') const { difference, intersection } = require('lodash') function readFrontmatter (markdown, opts = { validateKeyNames: false, validateKeyOrder: false }) { const schema = opts.schema || { properties: {} } const filepath = opts.filepath ...
true
5df14b252a5dd14281ef943edcbb1a99ff2aa003
JavaScript
leadingtw273/Chaotic-Encryption
/imgDec.js
UTF-8
5,283
2.5625
3
[]
no_license
const jimp = require('jimp'); const streamifier = require('streamifier'); const AES256 = require('./models/aes256_model.js'); const Chaos = require('./models/HENMAP_chaos_model.js'); // AES 加解密模組實作 const iv = Buffer.from([ '0x00', '0x11', '0x22', '0x33', '0x44', '0x55', '0x66', '0x77', '0x88', '0x9...
true
e31396f49d66ca3030414add6f9e181a04f2fb78
JavaScript
ksstech/cloud.coap.support
/DiSoNa/lib/activeMotes.js
UTF-8
2,719
2.8125
3
[ "MIT" ]
permissive
/** * Class structure for keeping in memory a list of motes connected */ 'use strict'; var Dict = require('collections/dict'); var motes = new Dict({a: 1}, function (key){ return 'unknown: ' + key; }); ////////////////////////////// ///constructor function activeMotes() { this.moteCollection = new Dict({a: 1}, func...
true
a13f21ea2eb1193bbba5124b2edbf9f267c06bae
JavaScript
Javran/leetcode
/h-index/solution-alt.js
UTF-8
928
3.5
4
[ "MIT" ]
permissive
/** * @param {number[]} citations * @return {number} */ const hIndex = cs => { // FUCK THIS PROBLEM. const N = cs.length const counts = new Uint32Array(N+1) for (let i = 0; i < N; ++i) { // the observation is that any value >= N can be changed to N // without affecting the final result ++counts[c...
true
250ed565f50a6d5b33046e9f5ec8643d07539a3e
JavaScript
luizvisuart/calculadoraTravisGitTestes
/spec/calculadora/adicionarSpec.js
UTF-8
789
3.015625
3
[]
no_license
describe("Suite de Testes de Adição", function () { var Calculadora = require('../../src/js/calculadora.js'); it("Deve retornar 5 para 5 + 3", function () { expect(Calculadora.adicionar(2, 3)).toEqual(5); }); it("Deve retornar 6 para 9 + -3 no formato texto", function () { expect(Calcu...
true
5d0ac180f2b5cfd8a03753d75139bdbb4629edf9
JavaScript
serena-chen/serena-chen.github.io
/dpub/sem1/dpub/reader/assets/js/main.js
UTF-8
658
2.578125
3
[]
no_license
$(document).ready(function() { $('.imagelinks2').mouseenter(function() { $('.caption').addClass('showme'); }); $('.imagelinks2').mouseleave(function() { $('.caption').removeClass('showme'); }); $('.thumbnail').click(function() { $(this).toggleClass('enlarge'); }); $('document').ready(fu...
true
c157d50cea3425b31065249149fa9ef548b9e80c
JavaScript
Wyrobowa/react-event-form
/src/reducers/attendeeFormReducer.js
UTF-8
1,710
2.53125
3
[]
no_license
import * as attendeeFormActions from '../actions/attendeeFormActions'; const initialState = { attendeeForm: { firstName: '', lastName: '', email: '', eventDate: '', }, status: 'initial', msg: '', formValidationErrors: [], }; const attendeeForm = (state = initialState, action) => { switch (...
true
b16a6d23b2d55510c4306e40b0c3c2144f24999e
JavaScript
IAmNatch/JSCookbook
/Development/Testing Website/js/gApp.js
UTF-8
518
2.578125
3
[]
no_license
//Created with My JSCookbook //Keep On hacking! //Function Number 1 (function() { jQuery.fn.clickToggle = function(a, b) { function cb() { [b, a][this._tog ^= 1].call(this); } return this.on("click", cb); }; $("#tt-trigger1").clickToggle( function() { ...
true
d09b24429c7cd96643992bcceaf763570d1ad396
JavaScript
ioanaemm/my-portfolio
/projects_html/frogger-non-canvas-master/main.js
UTF-8
11,395
2.84375
3
[]
no_license
$(document).ready(initGame); function initGame() { var playerTileX = 0; var playerTileY = 0; var initialPlayerTileX = 2; var initialPlayerTileY = 5; var tileWidth = 101; var tileHeight = 83; var tileImageHeight = 171; var boardWidth = 8; var boardHeight = 6; var score = 0; var totalScore = 0; v...
true
87ee07f56bf1a9e157a5959c9de0d1a6984a2326
JavaScript
davidmwhynot/nodeauthapi_t
/app.js
UTF-8
3,020
3.203125
3
[]
no_license
const express = require('express'); const jwt = require('jsonwebtoken'); const app = express(); app.get('/api', (req, res) => { res.json({ message: 'Welcome to the API' }); }); app.post('/api/posts', verifyToken, (req, res) => { // here: 'verifyToken' is a middleware function that we must write below. the purpose...
true
818dee32010ed17d3580f625a35fe1b6e4104340
JavaScript
Iced-Tea/tui.editor
/src/js/wwPasteContentHelper.js
UTF-8
8,680
2.5625
3
[ "MIT" ]
permissive
/** * @fileoverview Implements WwPasteContentHelper * @author Sungho Kim(sungho-kim@nhnent.com) FE Development Team/NHN Ent. */ 'use strict'; var domUtils = require('./domUtils'); var util = tui.util; /** * WwPasteContentHelper * @exports WwPasteContentHelper * @augments * @constructor * @class * @param {W...
true
909d73857b4166f96414cad26af189c43b264c74
JavaScript
jowey-jose/react-frontend-crud-employee-management
/src/App.js
UTF-8
1,905
2.609375
3
[]
no_license
import './App.css'; import {BrowserRouter as Router, Route, Switch} from 'react-router-dom'; import FooterComponent from './components/FooterComponent'; import HeaderComponent from './components/HeaderComponent'; import ListEmployeeComponent from './components/ListEmployeeComponent'; import CreateUpdateEmployeeComponen...
true
5190f90a719edf21f74e308686c7248196927cb5
JavaScript
VinGuler/fullstack-app-template
/nodejs-server/database/index.js
UTF-8
4,906
2.671875
3
[ "MIT" ]
permissive
const mysql = require('mysql') const db_credentials = require('./db_credentials.json') class Database { constructor() { this.connection = mysql.createConnection(db_credentials) // This is a test to run just checking the query functions are all working // this.testQueries() } async testQueries() { ...
true
f5180061475c6e2c377f02c731470cbdcf0f4503
JavaScript
Spark-/bsuir
/4/2/ITDDP/Homework/ipr2_3.js
UTF-8
2,220
3.203125
3
[ "MIT" ]
permissive
function ipr2_3_1(){ alert("-3,5,1: " + ipr2_3_range(-3,5,1)); alert("-3,-10: " + ipr2_3_range(-3,-10)); alert("0,20,-2.5: " + ipr2_3_range(0,20,-2.5)); } function ipr2_3_range(bound1,bound2, step){ if (step === undefined) { console.log("setting step to default val"); step = 1; } var res = []; var val...
true
b3342024da25e189545c42eb4787c4dedce8526c
JavaScript
streetlives/streetlives-web
/src/app/team/serviceForm/whoIsThisClothingFor/options.js
UTF-8
817
2.9375
3
[ "MIT" ]
permissive
export const options = [ { label: 'Men', wearerAge: ['men', 'adults'], gender: 'male', }, { label: 'Women', wearerAge: ['women', 'adults'], gender: 'female', }, { label: 'Girls', wearerAge: ['girls', 'children'], }, { label: 'Boys', wearerAge: ['boys', 'children'], ...
true
ace5071e4e558b5a6efec6e413d2fbf50ba168d1
JavaScript
angelgmp/node-restserver
/controllers/categorias.js
UTF-8
4,244
2.90625
3
[]
no_license
const { response } = require('express'); const { Categoria } = require('../models'); //obtenerCategorias, paginado, total, populate //El populate es un obj propio de Mongoose //lo usamos para ver la inf del usuario, no solo su _id const obtenerCategorias = async(req = request, res = response) => { //Desestructur...
true
83f5f3be96e523bf61ab7644e37be855505317e9
JavaScript
Trettin/Cubos-Academy
/Front-end/Modulo-03/front-react-hook-form/classe-01/src/hooks/contextValues.js
UTF-8
2,140
2.78125
3
[]
no_license
import { useState } from "react"; export default function useContextStates() { const [newCommentResponse, setNewCommentResponse] = useState(); const [findCommentResponse, setFindCommentResponse] = useState({}); const [deleteResponse, setDeleteResponse] = useState(false); const [updateResponse, setUpdateRespons...
true
da37f06c350a357fd8dd7b4f298b84ad4e5afc7f
JavaScript
satapornW/Testwise
/cypress/integration/Likewise Test/main/followListSkipOnboarding.js
UTF-8
1,241
2.578125
3
[]
no_license
//follow list skip onboaring //Lands on a list, sign up, and skip on boarding var json = require('../variable.json'); function makeid(length) { var result = ''; var characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; var charactersLength = characters.length; for ( var i = 0; i < length; i...
true
3beb577820be0e0338f8d309082dabdec5e13f72
JavaScript
Robinzon100/travel_assistant
/models/users.js
UTF-8
5,428
2.671875
3
[ "MIT" ]
permissive
const getDb = require("../utils/database").getDb; const mongodb = require("mongodb"); //username, email, phone_number, bookmarks, hashedPassword class User { constructor( username, email, password, phone_number, bookmarks, resetToken, resetTokenExpiration, ...
true
426d2236b33f3f92355128dbca3d398d6c220c8a
JavaScript
undind/web-middle.loft
/src/scripts/horizontalAccardeon.js
UTF-8
751
2.90625
3
[]
no_license
(function () { accardeon(); function accardeon() { const menuLink = document.querySelectorAll('.menu__link'); for (let i = 0; i < menuLink.length; i++) { menuLink[i].addEventListener('click', e => { e.preventDefault(); const menuItem = menuLink[i].parentNode; if (menuIt...
true
f030d4a07f336c3af8a35b0e476c608403831abd
JavaScript
vincenttesla/leetcodePractice
/q21.js
UTF-8
943
3.640625
4
[]
no_license
/** * 21.Merge Two Sorted Lists * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } */ /** * @param {ListNode} l1 * @param {ListNode} l2 * @return {ListNode} */ var mergeTwoLists = function(l1, l2) { var a = l1; var b = l2; var l3 = new ListNod...
true
5a3834156d66e6e506ec91b33304a894334a1ffc
JavaScript
JordiEspinozaMendoza/restaurantesoto
/frontend/static/js/FullMenu.js
UTF-8
1,163
2.96875
3
[]
no_license
var getAllFoods = new XMLHttpRequest(); //Hacemos una llamada para obtener todas las comidas getAllFoods.onload = function () { if (getAllFoods.status == 200) { console.log("GET request success"); responseObject = JSON.parse(getAllFoods.responseText); //Agregamos las comidas al menu ...
true
cb6ec7974b44405ee4cdd9c05d0a64e7313b0c63
JavaScript
guinuxbr/QuantoCobrar
/js/salvarPDF.js
UTF-8
1,197
3.109375
3
[]
no_license
// Gera um PDF com o resultado. function salvarPDF() { // Verifica se os campos estão vazios. if ( resultadoTabela.innerText === "" || resultadoTabela.innerText === "Os campos devem ter o valor de, no mínimo 1(um)!!!" ) { resultado.innerHTML = `<div class="notification is-danger is-light">...
true
2b1e34c734b110bda46b33e8f5edf2d2a8c6da58
JavaScript
wallacedaniel/Education-And-Experiments
/ProjectBits/js/cedrics.js
UTF-8
1,760
2.640625
3
[]
no_license
// Make the carousel image // Each time the carousel changes .carousel-inner .active <---the current image // width of image is 100% of parent container .carousel-inner <--- parent container $(document).ready(function() { resizeImage(); //var $w = $(window), //$h = $('#home'), //var w = doc...
true
a469d55fb0ed2d08ad4db40869669c1597677560
JavaScript
lastingyeh/Node-Study-Memo
/reactapp/src/components/Chart/index.js
UTF-8
1,248
2.609375
3
[]
no_license
import React, { Component } from 'react'; import { fetchData } from '../../utils/apis'; import { chartTypes } from '../../utils/config'; import ChartTemp from './ChartTemp'; class ChartApp extends Component { constructor(props) { super(props); this.state = { type: 'line', data: [], }; } async componen...
true
723c569481f0340ac9c9fbb5ac4d13347cd8731a
JavaScript
david2999999/Javascript-Algorithm
/Data Structures and Algorithms with Javascript PDF/Chapter 2 - Arrays/Mutators/Putting Elements in Order/reverse.js
UTF-8
145
3.796875
4
[]
no_license
// The reverse() function, reverses the order of the elements in an array var nums = [1,2,3,4,5]; nums.reverse(); console.log(nums); // 5,4,3,2,1
true
43ef10c3f00663e4b4a271c7586b664c44082603
JavaScript
Matt-J-Hawes/React-Movie-App
/src/components/Movie.js
UTF-8
3,652
2.65625
3
[]
no_license
//DEPENDENCIES import React, {Component} from 'react'; import axios from 'axios'; //COMPONENTS import Loading from './Loading' import apiKey from '../apiKey/config' class Movie extends Component { //Component State state = { movie: [], release: [], genres: [], cast: [], loading: false }; componentDidMo...
true
fa5ecd5a900f7229fe9bde7ea963ac4d6c63eb8b
JavaScript
OpusCapita/i18n
/src/converters/DateConverter.spec.js
UTF-8
11,392
2.859375
3
[ "Apache-2.0" ]
permissive
import { assert } from 'chai'; import DateConverter from './DateConverter'; import ParseError from './ParseError'; describe('DateConverter', () => { it('should convert null to empty string', () => { let dc = new DateConverter('MM/dd/yyyy'); assert.strictEqual(dc.valueToString(null), ''); }); it('should...
true
e3ba4010ba793b037467a41e93ca44d91cee152f
JavaScript
mmyjona/nt
/sr/265912 - 60129699795d11c0fc8259091b545098bf4f9ca86bef747808beb1315fdec015 - 5fd5a03743443be0932c94fe3fa4b46b05126ad41e0911acea3fa65238e6418c.js
UTF-8
5,028
2.515625
3
[]
no_license
"use strict"; var FormatItem = function (text) { if (text) { var obj = JSON.parse(text); this.balance = new BigNumber(obj.balance); this.expiryHeight = new BigNumber(obj.expiryHeight); } else { this.balance = new BigNumber(0); this.expiryHeight = new BigNumber(0); } ...
true
07ca76e3e6b81fa43475dac3221fe2a39c48783e
JavaScript
alimpfard/ctr-rest-generator
/example/models.js
UTF-8
2,710
2.5625
3
[]
no_license
const {ArrayType, Enum0} = require("./types.js"); const { ObjectId } = require("mongodb"); module.exports = {}; let Person = { 'firstName': arg => String.call(null, arg), 'city': arg => String.call(null, arg), 'lastName': arg => String.call(null, arg), graphqlSchema: `type Person { firstName: String city: CityID la...
true
65df930500bd944ffb198e7425afdf241c9e71da
JavaScript
JavierMisat/cinedelbueno
/js/ui.js
UTF-8
4,106
2.78125
3
[]
no_license
import Api from "./api.js" import card from './card.js'; import loaderAnimation2 from './loader2.js'; import pagination from './pagination.js'; export default class UI { constructor() { this.resultadosAPI = null; this.paginasTotales = 0; this.resusltadosTotales = 0; this.paginaActua...
true
e34b81f5a4f5022631eaa4064f2d78dcbf0b63c0
JavaScript
TavaresDev/Assignment10
/js/script.js
UTF-8
2,416
3.65625
4
[]
no_license
/*Bind the HEADER and the SECTION elements above to variables */ let header = document.querySelector('header'); let section = document.querySelector('section'); // Store JSON URL in a variable let requestURL = 'https://tavaresdev.github.io/jsonTest/products.json' // Create a new XHR object let request = new XMLHttp...
true
1bf32536c7c32474f2f723ac714296574dd192a4
JavaScript
jonezy/Epilogger
/Epilogger.Web/Public/js/HomePage.js
UTF-8
1,321
2.59375
3
[]
no_license
 head.ready(function () { if ($(".featurePhotoBar").length > 0) { $('.featurePhotoBar:first').show(); $('.featuredPhotosListLink:first').addClass('active'); start_Int(); } }); var intval = ""; function start_Int() { if (intval == "") { intval = window.setInterval(ChangeToN...
true
cefae7ee2b297944d90c42ac8fffdf7bee0989e1
JavaScript
Navprayas-A-group-of-Innovative-thought/Seniors-Backend
/src/helpers/authUser.js
UTF-8
655
2.78125
3
[]
no_license
const jwt = require("jsonwebtoken"); // Middleware to check if the user is logged in or not const authUser = (req, res, next) => { try { // Extracting token from authorization in header and splitting it as Bearer and token id const token = req.headers.authorization.split(" "); // Verifying the extracted ...
true
a266dfb7fdf48c32ed9d595e307d81f271c56b25
JavaScript
dhershman1/kyanite
/src/function/reduce.js
UTF-8
1,223
3.109375
3
[ "MIT" ]
permissive
import _curry3 from '../_internals/_curry3.js' import _reduce from '../_internals/_reduce.js' /** * @name reduce * @function * @since v0.1.0 * @category Function * @sig (a -> b -> b) -> b -> Array a -> b * @description * Accepts an array and runs a reduce based on the passed values * The reducer fun...
true
aea9df02e199ac395937f39b07712101d81767ac
JavaScript
silaslowe/c44daily-journal
/scripts/JournalDataProvider.js
UTF-8
1,459
2.671875
3
[]
no_license
import { swearCheck } from "./swearCheck.js" let journal = [] const eventHub = document.querySelector(".container") const dispatchStateChangeEvent = () => { const journalStateChangeEvent = new CustomEvent("journalStateChanged") eventHub.dispatchEvent(journalStateChangeEvent) } export const useJournalEntries = ...
true
9cfd05d742ad3828d1dff67f935ddb9d770e4a2d
JavaScript
aliaksandr-hurchanka/learn-js
/js/arrayMethods.js
UTF-8
2,675
4.40625
4
[]
no_license
// Метод split (из строки в массив) var names = 'Маша, Петя, Марина, Василий'; var arr = names.split(', '); for (var i = 0; i < arr.length; i++) { console.log( 'Вам сообщение ' + arr[i] ); } // --- console.log( "a,b,c,d".split(',', 2) ); // a,b // --- var str = "тест"; console.log( str.split('') ); // т,е,с,т // ...
true
b3c3a64f8a705ce9f52bb004b50e130316f64083
JavaScript
ahamedali95/ssp19Recursion
/Javascript-bootcamp/technicalInterviewQuestion11.js
UTF-8
2,671
5.03125
5
[]
no_license
/*# Given an array of numbers, return an array of all the products remaining when each element is removed from the array. # You may wish to write a helper method: array_product. # products_except_me([2, 3, 4]) => [12, 8, 6], where: # 12 because you take out 2, leaving 3 * 4 # 8, because you take out 3, leaving 2 ...
true
ff111737522e4804163f4ba728d89b2d350ed17e
JavaScript
OpenReferralUK/ServiceFinder
/src/components/sections/Body/personaProfile/functions.js
UTF-8
1,360
2.546875
3
[]
no_license
import jwt from 'jsonwebtoken'; import initial_data from '../../../../config'; import { JWT } from '../../../../settings/settings'; export const getDateArray = (data) => { const day = initial_data.persona_profile.days.day.filter(dayItem => dayItem.value === data.day)[0]; const time = initial_data.perso...
true
d12153f7a93c35a8a74af62f15cc52658aadc324
JavaScript
chenxianliang/blog
/tool/crypto/adapter_class/hash.js
UTF-8
332
2.703125
3
[]
no_license
var crypto = require('crypto'); module.exports = function(){ this.encode = function(algorithm,enstring,returnType){ var hash = crypto.createHash(algorithm); hash.update(enstring); return hash.digest(returnType); } this.decode = function(algorithm,enstring,returnType){ console.log('hash has no decode functi...
true
3727ec96cd947c83ef67cc53ee1b477c05c057e6
JavaScript
reselbob/CoolWithKube
/Day-3/reviewlabfour/badcodeone/app/server.js
UTF-8
476
2.9375
3
[]
permissive
const http = require('http'); const port = 8311; let i = 0; const handleRequest = function(request, response) { const str = `I am bad code 1, running at ${new Date()}. Make me good, please. By the way, I can count: ${i++} \n`; console.log(`Received request for URL: ${request.url} data ${str}`); response.wri...
true
57931db5baa4e88d05dfff9d78dffc3e6dd90a3e
JavaScript
0-Sony/react-todo-app
/src/App.js
UTF-8
1,245
2.78125
3
[]
no_license
import React, { useState } from 'react'; import Todo from './Components/Todo'; import TodoForm from './Components/TodoForm'; import logo from './logo.svg'; import './App.css'; function App() { const initialTodo = [ { id: 1, task: "Learn ReactJs", completed: false }, { id: 2, task: "Learn VueJs", completed:...
true
e8fc2147f3e6e51a3984fa8ffdca81cd89d2f3b0
JavaScript
jimhorton/FCC
/Basic Algorithm Scripting/steamRollArray.js
UTF-8
389
3.515625
4
[]
no_license
function steamrollArray(arr) { // I'm a steamroller, baby var newArray = []; var steamRoll = function (newArr) { if (!Array.isArray(newArr)) { newArray.push(newArr); } else { for (var j in newArr) { steamRoll(newArr[j]); } } }; arr.forEach(steamRoll...
true
3ab5440393cbd7b44c7fd878eb0e8fcea71931e6
JavaScript
hxlat/ByteBites
/problems/medium/M072StringExpression.js
UTF-8
1,442
4.25
4
[ "MIT" ]
permissive
/* Have the function StringExpression(str) read the str parameter being passed which will contain the written out version of the numbers 0-9 and the words "minus" or "plus" and convert the expression into an actual final number written out as well. For example: if str is "foursixminustwotwoplusonezero" then this conver...
true
314efa860b7bc45a08564988e6625ced011da3b3
JavaScript
AlexVipond/scrapes
/one-acre-fund/scrape-insights.js
UTF-8
3,711
2.828125
3
[]
no_license
const puppeteer = require('puppeteer'); const fs = require('fs'); async function scrapePages() { const browser = await puppeteer.launch({headless: false}); const page = await browser.newPage(); await page.goto('https://oneacrefund.org/insights-library/'); let pageTotal = await page.evaluate(num => { num +...
true
d2a19b98f53e1d5142cc9809f15a040adfa4f39d
JavaScript
hao-wang/Montage
/js-test-suite/testsuite/37322e4703a05557a38373047ebff7be.js
UTF-8
5,398
3.078125
3
[ "MIT" ]
permissive
load("fcfbc86708bc3a4062c2091a062e13b6.js"); load("bcb77b03ed13784489484535627fca54.js"); load("41e6217a79cd5540df13626a4eafe149.js"); // This file was written by Andy Wingo <wingo@igalia.com> and originally // contributed to V8 as generators-runtime.js, available here: // // http://code.google.com/p/v8/source/browse/b...
true
694f97e2bd4494bd75e18ee1da0b40cc5b604d47
JavaScript
WCI-ROBOTICS/signin-website
/public/suportev/furm.js
UTF-8
873
2.84375
3
[]
no_license
//Reference for form collection(3) let formMessage = firebase.database().ref('user_codes'); //listen for submit event//(1) document .getElementById('registrationform') .addEventListener('submit', formSubmit); //Submit form(1.2) function formSubmit(e) { e.preventDefault(); // Get Values from the DOM let sico...
true
da6d93ac5bda88e4f627dedd333e1f3c4728f080
JavaScript
P-v-R/gamesPrac
/lights-out/lights.js
UTF-8
2,737
4.03125
4
[]
no_license
"use strict"; const boardSize = 5; let stateBoard = []; let difficulty =25; let htmlBoard = document.getElementById("game-board"); // make state board function makeBoard() { // generate array grid boardSize X boardSize for (let y = 0; y < boardSize; y++) { stateBoard.push(Array.from({ length: boardSize })...
true
3c8893baf4acfbc12b63b103a9128f366e0fd11c
JavaScript
ericizant/assignments
/exercises/18_simple_html_calculator/script.js
UTF-8
1,240
3.921875
4
[]
no_license
var num1 = document.getElementById("num1"); var num2 = document.getElementById("num2"); var num3 = document.getElementById("num3"); var num4 = document.getElementById("num4"); var num5 = document.getElementById("num5"); var num6 = document.getElementById("num6"); var add = document.getElementById("add"); var subtract =...
true
809ab51e8125d0f91d3eaa219014ceb3a9754970
JavaScript
RutilaXD/rutilaxd.buscamina.io
/js/bomba.js
UTF-8
1,818
3.59375
4
[ "Apache-2.0" ]
permissive
/* @author: Raúl Guadarrama (c) 2018 Script de un juego de buscaminas */ function start(){ // Matriz de minas // 1 = bomba 0= nada var campo=[ [ 1, 0, 0], [ 0, 1, 0], [ 1, 1, 1] ]; //Variable para mostrar la condición del ganador var textos = [ "¡Ganaste! ;)", ...
true
09d411e27c08bb0858ad97bef342299eb12e5901
JavaScript
RT-Vinsent/bjs-2-homeworks
/1.base-concepts/task.js
UTF-8
1,243
3.234375
3
[]
no_license
function solveEquation(a, b, c) { "use strict"; let arr = []; let d = Math.pow(b, 2) - 4 * a * c; if (d == 0) { arr.push(-b / (2 * a)); console.log(arr); } else if (d > 0) { arr.push((-b + Math.sqrt(d)) / (2 * a)); arr.push((-b - Math.sqrt(d)) / (2 * a)); console.log(arr); } return a...
true
6efff7fca81ab799c53f7212cac8a8deaaaccedc
JavaScript
Stelive/SpicyPictures
/github/ProgettoFinale/js/main.js
UTF-8
3,977
2.6875
3
[]
no_license
/** * @file: main.js * @author: Francesco Panetta * * Purpose of file: * ... */ function myFunction() { var x = document.getElementById("myTopnav"); if (x.className === "topnav") { x.className += " responsive"; } else { x.className = "topnav"; } } $('.googleMap')....
true
c4785df5ef91ce17276bfdaeb78c8021b9c44557
JavaScript
chingu-voyages/v19-toucans-team-01
/search.js
UTF-8
9,185
3.015625
3
[]
no_license
'use strict'; const key = 'wqELwRpqrp8rhaJzYKsBRlbFd7vnpEcfSzkpLVw1qwum5LZlSg'; const secret = '2XnR5kFM6XKMtB2YqczAStAOvLvre0cZlawWTMWd'; //renders home from nav bar and hides results and search page form function homeRender() { $('.home').click(function() { $('.bottom').show(); $('.landing').show(); $(...
true
1f630bb2f0005c8372c8fe13285a1db9617071af
JavaScript
sojib-bd/JavaScript-methods
/array.js
UTF-8
428
3.859375
4
[]
no_license
const arr = [2, 3, 4, 5]; let newArr = arr.every((element, index, array) => { console.log(element); console.log(index); console.log(array); return element < 10 }); //console.log(newArr); var a = ['dog', 'cat', 'hen'] a[100] = 'fox' //console.log(a.length) // 101 let months = ['January', 'February'...
true