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
7ba4bae9a5b183e89f50bf67f7152d333df30e33
JavaScript
zipofar/html-template-1
/src/js/blocks/navbar.js
UTF-8
799
2.546875
3
[]
no_license
export default () => { const elId = 'navbar__toggler'; const nodesToggler = document.querySelectorAll(`.${elId}`); nodesToggler.forEach((e) => { e.addEventListener('click', (e) => { const nodeNavbar = e.currentTarget.parentElement; const nodeNavbarCollapse = nodeNavbar.querySelector('.navbar-colla...
true
f4c5fb4fee455cb6537a6df4da5de7ec50a0d6f5
JavaScript
maikeltre/proyectoFinal
/proyectoFinal-ProyectoFinal/js/scripts.js
UTF-8
5,173
3.15625
3
[]
no_license
//Variables const menuToggle = document.querySelector('.menuToggle'); const enlaces = document.querySelector('.contenedor__enlaces'); const carritoSubmenu = document.querySelector('.submenu'); const carritoImg = document.querySelector('#submenu__img') const botonTop = document.querySelector('.contenedor__boton'); const...
true
22da711dd7a9b24bd553df4bf5cf5d75e0cf2f9f
JavaScript
junko911/catpedia-frontend
/src/Components/BreedCard.js
UTF-8
2,879
2.734375
3
[]
no_license
import React from 'react' import { Carousel, CarouselItem, CarouselIndicators } from 'reactstrap'; import BreedProperty from './BreedProperty'; class BreedCard extends React.Component { state = { activeIndex: 0, animating: false, setAnimating: false } getCatsImages() { return this.props.c...
true
18ac004ef573035fbe5d53a770b18f4f4f617220
JavaScript
paulohfev/exercism-js-track
/gigasecond/gigasecond.js
UTF-8
248
2.8125
3
[]
no_license
const GIGASECOND = 1_000_000_000; export const gigasecond = time => { const gsInMilliseconds = GIGASECOND * 1000; const timeInMilliseoncds = time.getTime(); const result = timeInMilliseoncds + gsInMilliseconds; return new Date(result); };
true
bdb0ce732ef936027b556f26af1074413060a3e7
JavaScript
Sparsh-Kumar/JavascriptCrashCourseWithExamples
/using-named-and-default-imports-exports-simultaneously/public/modules/myexports.js
UTF-8
698
2.828125
3
[]
no_license
const add = (number1, number2) => { try { if (!number1 || !number2) { throw new Error ('Please define both numbers to perform addition'); } return number1 + number2; } catch (error) { return error.message; } } const multiplication = (number1, number2) => {...
true
c9ee6c8e378333a3ca29c7b43bf5f6346db28714
JavaScript
digitaledgeit/js-browserbot
/example/browser-contact-us.js
UTF-8
1,051
2.578125
3
[ "MIT" ]
permissive
var browser = require('./../lib/browser'); browser.create(function(browser) { browser .viewport(1024, 768) .go('http://www.digitaledgeit.com.au/contact/') .once('LoadFinished', function(status) { var count = 0; function then(err) { if (err) return console.log(err) || browser.destroy(); if (++co...
true
b500b0f7f0dd7dda7f61a0d1426e7eee4e6cf626
JavaScript
ebollin/ATK302
/p5/Week5/circle/sketch.js
UTF-8
199
2.703125
3
[]
no_license
function setup() { // put setup code here createCanvas(1000, 500); background(1,100,120) } function draw() { // put drawing code here fill(mouseY); ellipse(mouseX, mouseY, 100, 100) ; }
true
6aa4bbf34f131d90fca503abfd46ee8d3acba36b
JavaScript
blueimpact/kucipong
/frontend/src/js/_fav.js
UTF-8
1,167
2.921875
3
[]
no_license
"use strict"; var Fav = {}; Fav.getFavs = function () { var parsed = JSON.parse(localStorage.getItem('favs')); return Array.isArray(parsed) ? parsed : []; }; Fav.setFav = function (id) { var favs = Fav.getFavs(); var newFavs = favs.filter(function (x) { return x !== id; }).concat(id); localStorage.se...
true
39e8a8605ac381bb950e2585603c0b91d72904db
JavaScript
415518669/vue-blog
/dao/everyDayDAO.js
UTF-8
878
2.515625
3
[]
no_license
var DAOuil = require('./DAOuil'); function insertEveryDay(content, ctime, success) { const connection = DAOuil.createconnection() connection.query("insert into every_day(`content`, `ctime`) values ('" +content + "','" + ctime + "')", function (err, result) { if(err == null ) { success(resu...
true
1efe845967915040c6a1661e41a32777c1cf3c92
JavaScript
cqy930325/eecs598
/kineval/kineval_inverse_kinematics.js
UTF-8
6,158
2.515625
3
[]
no_license
/*-- |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| |\/| KinEval | Kinematic Evaluator | inverse kinematics Implementation of robot kinematics, control, decision making, and dynamics in HTML5/JavaScript and threejs @author ohseejay / https://github.com/ohseejay / htt...
true
a55ec4fdd3f840408d648a46a3baed73c2e6c174
JavaScript
SabrinaGago/HomeBanking
/js/homebanking.js
UTF-8
4,698
3.34375
3
[]
no_license
var nombreUsuario = "Sabrina"; var pass = "banco"; var saldoCuenta = 5000; var limiteExtraccion = 1000; window.onload = function() { iniciarSesion(); cargarNombreEnPantalla(); actualizarSaldoEnPantalla(); actualizarLimiteEnPantalla(); } function iniciarSesion() { var user = prompt("Ingrese el usuario"...
true
61c60fc2ffc5da878b07b8a11e7ae0ffaaec1041
JavaScript
chrisdews/bookliker-practice-challenge-london-web-051319
/js/index.js
UTF-8
3,210
3.125
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
document.addEventListener("DOMContentLoaded", function() { const showPanel = document.querySelector('#show-panel') const booksUrl = 'http://localhost:3000/books' function getBooks(){ fetch(booksUrl) .then(function(response) { return response.json(); }) ...
true
47f98df35b75a64cd6fe0a5fc647540c88ebc276
JavaScript
nbt11nsn/varmepumpar
/examensarbete/gammalt/include/print.js
UTF-8
500
2.75
3
[]
no_license
function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; } function closed() { alert("Denna sida är för ...
true
c0a4c6b8a62e9a989fbdcd8f2f6a00d161f6ba7c
JavaScript
Memphis1983/100-Devs-Assignments
/day-18-assignment/class_hours_coding/space-review/js/main.js
UTF-8
3,979
5.3125
5
[]
no_license
//Arrays //Create and array of numbers. Sum all of the numbers. Alert the sum. const array = [1, 2, 3, 4, 5, 6, 7]; const reduced = array.reduce((a, b) => a + b, 0); // console.log(reduced); //Create a function that takes in an array of numbers //Return a new array of numbers that is every original number squared fun...
true
d03793a3f4beae0c70c7e80f6ab8bdbd8b512bd6
JavaScript
JaimeRC/skylab-bootcamp-201801
/course/backend/stuff/node/express/users-api/index.js
UTF-8
1,150
2.828125
3
[]
no_license
require('dotenv').config() const express = require('express') const bodyParser = require('body-parser') const app = express() const users = [] app.get('/api/users', (req, res) => res.json(ok('Users listing succeeded.', users.map(({ username }) => ({ username }))))) const jsonBodyParser = bodyParser.json() app.po...
true
09623823f70718516a687b0cb24d96e882572257
JavaScript
martijnarts/unix.click
/unix.click.js
UTF-8
2,015
3.0625
3
[ "MIT" ]
permissive
'use strict'; window.addEventListener('load', () => { const unix = document.querySelector('.js-unix'); const iso8601 = document.querySelector('.js-flatpicker'); const millisecondsCheckbox = document.querySelector('.js-isMilliseconds'); let useMilliseconds = millisecondsCheckbox.checked; const dat...
true
cdffc13e047755c1d31f6173192a9f183e8fecf2
JavaScript
marianalino/impacta-turma-30
/aulas/01_conceitos_node/app02.js
UTF-8
2,767
3.5625
4
[]
no_license
var funcoes = require('./funcoes'); var valor1 = 2; var valor2 = 3; var soma = funcoes.somar(valor1, valor2); console.log("Minha soma de " + valor1 + " + " + valor2 + " exportada é: " + soma); var n = 10; var s = "minha primeira aula"; var a = [1, 2, "3", "a", "b"] console.log("Usando uma função para verificar o tama...
true
64ae89063e5dcaca703ed883f7558eaa7f036a59
JavaScript
Numbericons/queuestrings
/orderStrings.js
UTF-8
829
3.359375
3
[]
no_license
function getOrder(input) { const inputArr = "Burger Fries Chicken Pizza Onionrings Sandwich Milkshake Coke".split(" "); const valid = []; inputArr.forEach((item) => { valid.push(item[0].toLowerCase() + item.slice(1)) }); let retStr = ""; let strInput = input.slice(0); while (strInput.length) { for(let i...
true
5d45479ba0f9797e9fae94d94cd5473074d4bf7c
JavaScript
ValdasT/nodejs
/Learn/functions.test.js
UTF-8
1,001
2.515625
3
[]
no_license
const testFunctions = require('./functionsForTestiong') test('adds 1 + 2 to equal 3', () => { expect(testFunctions.sum(1, 2)).toBe(3); }); test('returen user info', async () => { const userInfo = await testFunctions.getUserInfo(); expect(userInfo).toStrictEqual({ id: 2, name: 'Ervin Howell...
true
4b2cb59a8906c0bda44497eceb5c0c4e3c6ad4e1
JavaScript
Ivan468/polarpak
/js/win_select.js
UTF-8
9,795
2.6875
3
[]
no_license
function jsonWindow(winData) { var windowUrl = winData["url"]; var windowName = (typeof winData["win_name"] !== 'win_name') ? winData["win_name"] : "windowSelect"; var params = winData["params"]; var queryString = ""; for (var paramName in params) { var paramValue = params[paramName]; queryString += ((query...
true
edc4381e803461237c0e25f0ed21fcf03d3596ef
JavaScript
tom-clz/cx-node-pokemon
/server.js
UTF-8
618
2.671875
3
[]
no_license
const express = require("express"); const arg = process.argv; const pokiman = require("./routes/pokedex.json"); const app = express(); app.get("/", (req, res) => { return res.json(pokemi); }); app.get("/api/pokemon/", (req, res) => { return res.json(pokiman); }); app.get("/pokemon/:id", (req, res) ...
true
eecb52b9e8e65ad3a7b744aa0a02e9df5c71d122
JavaScript
mattseatondev/DailyPractice
/js/stockList.js
UTF-8
598
3.390625
3
[]
no_license
const stockList = (listOfArt, listOfCat) => { return ([listOfArt, listOfCat].some(list => !list.length)) ? '' : listOfCat.reduce((count, cat, catIndex) => { count[cat] = listOfArt.filter(art => art[0] == cat).reduce((artTotal, art) => artTotal += parseInt(art.split(' ')[1]), 0); if (catIndex == list...
true
370e6daacf67f46b26d473c165ac889e40eac5e4
JavaScript
RoadAspen/node-async-request
/run.js
UTF-8
1,614
3.265625
3
[]
no_license
var fs = require('fs'); var http = require('http'); fs.openSync('results.txt', 'w') var file = fs.readFileSync('./data.txt').toString().split('\r\n'); var len = file.length; // var len =200; let return_num = 0; let ss = 0; function get(ss, max_hold, sleep_time = 5) { let x = file[ss]; const url = 'http://...
true
1054baf78db6f65ed4a0ef4c6d8e5ff1899df012
JavaScript
thyagoquintas/jquery-ajaxManager
/jquery.ajaxManager.js
UTF-8
3,167
2.71875
3
[]
no_license
/*! * jQuery AjaxManager plugin v1.0.0 * * Copyright 2012, Thyago Quintas (dev@thyagoquintas.com.br) * https://github.com/thyagoquintas/jquery-ajaxManager/ * * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2...
true
8ad9c90424ffddc19461fadd7d894adabcf5f3ad
JavaScript
MVIUdani/TourismAgency
/frontend/src/components/js/customer/favourite_list.js
UTF-8
4,440
2.53125
3
[ "MIT" ]
permissive
import React,{useState,useEffect} from 'react'; import '../../css/customer/favourite_list.css'; import IconButton from '@material-ui/core/IconButton'; import DeleteIcon from '@material-ui/icons/Delete'; import Axios from "axios"; function FavouriteList(){ const [place, setPlace] = useState(""); const [description...
true
7e6641a0e67d4952d245bcdf7be49a7b797b65fe
JavaScript
karencabacungan/week-4
/routes/notes.js
UTF-8
3,526
2.828125
3
[ "MIT" ]
permissive
const { Router } = require("express"); const mongoose = require('mongoose'); const router = Router(); const noteDAO = require('../daos/note'); const tokenDAO = require('../daos/token'); const userDAO = require('../daos/user'); //MIDDLEWARE //isLoggedIn(req, res, next) - should check if the user has a valid //token a...
true
084116252404f8cd35adf14b6dab18da50b9f299
JavaScript
ellamathewson/allergyattention
/server/controllers/Account.js
UTF-8
4,368
2.5625
3
[ "Apache-2.0" ]
permissive
/* eslint-disable linebreak-style */ /* eslint-disable no-console */ /* eslint-disable no-unused-vars */ const models = require('../models'); const { Account } = models; const AccountData = models.Account; /* Renders login page */ const loginPage = (req, res) => { res.render('login', { csrfToken: req.csrfToken() }...
true
058dee403a2354b93a792067aa028627a780dd93
JavaScript
Pearl1594/ReactJS
/src/ShowSubscribers.js
UTF-8
2,464
2.578125
3
[]
no_license
import React, {Component} from 'react'; import Header from "./Header" import './ShowSubscribers.css' import {Link} from 'react-router-dom' class ShowSubscribers extends Component { // constructor(){ // super(); // this.state = { // subscribersListtoShow: [] // } // console.log("Construct...
true
05194cc173f1cc96e8dead7b4c25966500748b8e
JavaScript
edtechhub/metadataset
/publications/static/javascript/classification-tree.js
UTF-8
1,116
2.703125
3
[ "MIT" ]
permissive
$(document).ready(function(){ <!-- Collapsible classification tree (Django MPTT recursetree) --> <!-- Show level 1 of the classification on page load --> $("ul.root").children().show(500); $("ul.root").children("li").children("span").text("---"); <!-- Toggle the next level in the classification tree --> ...
true
1e2e811bb1a5b91155092eac28b5bc99c1084a6b
JavaScript
Ezhil-Language-Foundation/open-tamil
/webspell/static/tinymce/js/tinymce/classes/dom/ScriptLoader.js
UTF-8
6,794
2.875
3
[ "LicenseRef-scancode-generic-cla", "LGPL-2.0-or-later", "LGPL-2.1-only", "GPL-1.0-or-later", "GPL-3.0-only", "MIT" ]
permissive
/** * ScriptLoader.js * * Released under LGPL License. * Copyright (c) 1999-2015 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /*globals console*/ /** * This class handles asynchronous/synchronous loading of JavaScript files...
true
07188e13850156fbae03c05e3f4aa7854199252c
JavaScript
abyr/pure-js-calendar
/js/calendar.js
UTF-8
25,349
2.78125
3
[]
no_license
(function (namespace) { var Cell, Calendar; var pad = function (num, pad) { var s = "000" + num; return s.substr(s.length - pad); }, capitalize = function (s) { return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase(); }, getFirstMonthsDay...
true
9f42618689c1fbf25d8a86c6424d977623415324
JavaScript
ycs1m1yk/PS
/src/BOJ/1000/1546.js
UTF-8
414
2.890625
3
[]
no_license
const filePath = process.platform === "linux" ? "/dev/stdin" : "test.txt"; const [N, arr] = require("fs") .readFileSync(filePath) .toString() .trim() .split(/\r\n|\r|\n/); const scores = arr.split(" ").map((el) => +el); scores.sort((a, b) => b - a); let highScore = scores[0]; let total = 0; for (const score o...
true
12b91a2756ce3271aa85bc2104d84cbba10864dc
JavaScript
Adilayyoob/KT_Info
/script.js
UTF-8
5,346
3.015625
3
[]
no_license
var member =34; var ourRequest = new XMLHttpRequest(); ourRequest.open("GET","https://adilayyoob.github.io/json-test/data.json"); ourRequest.onload = function() { var ourData = JSON.parse(ourRequest.responseText); ourFamily(ourData); } ourRequest.send(); function ourFamily(d) { // body... //pri...
true
9b1ae8635eb27731c83dacddfe8059204c18d5fe
JavaScript
yurifw/ficharpg
/web/res/js/ajax.js
UTF-8
1,333
2.9375
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ function getRequest() { try { request = new XMLHttpRequest(); } catch (IEAtual) { try { request = ...
true
1b8d4336164d21ef2a6e66fa8e22d81a6dc0e82d
JavaScript
flexayoung/vef2-verkefni4
/scraper.js
UTF-8
4,220
2.640625
3
[]
no_license
require('dotenv').config(); require('isomorphic-fetch'); const cheerio = require('cheerio'); const redis = require('redis'); const util = require('util'); const cacheTl = 100000; const redisOptions = { url: 'redis://127.0.0.1:6379/0', }; const client = redis.createClient(redisOptions); const asyncGet = util.prom...
true
eaaba733f3c36995ae087e80cad0ba4fd99e2db4
JavaScript
MrIronManFe/Algorithm
/20201228_to_20210103/offer27_20201228.js
UTF-8
1,011
3.5625
4
[]
no_license
/* 请完成一个函数,输入一个二叉树,该函数输出它的镜像。 例如输入: 4 /   \ 2     7 / \   / \ 1   3 6   9 镜像输出: 4 /   \ 7     2 / \   / \ 9   6 3   1 示例 1: 输入:root = [4,2,7,1,3,6,9] 输出:[4,7,2,9,6,3,1] 限制: 0 <= 节点个数 <= 1000 */ /** * Definition for a binary tree node. * function TreeNode(val) { * this.val = val; * ...
true
2e31154bc8b2e9b8c86af7e23260efd9bc1f329e
JavaScript
pedroMF1996/JavaScriptCurso
/Aula63/index.js
UTF-8
977
3.828125
4
[]
no_license
// -5 -4 -3 -2 -1 // 0 1 2 3 4 const nomes = ['Maria', 'João', 'Eduardo', 'Gabriel', 'Júlia']; console.log(nomes); //nomes.Splice( qual indice que eu quero começar a mexer(índice), // quantos elementos eu quero remover...
true
faf012c5a7d4a0c53721ad2c7955932dde9f0276
JavaScript
Lcf0727/springboot-goods
/src/main/resources/static/js/ajax/ajax.js
UTF-8
1,299
3.40625
3
[ "MIT" ]
permissive
//基于此函数发送ajaxGet请求 function doAjaxGet(url,params,callback){ //debugger //bug调试 //console.log("url:",url); //1.创建ajax请求对象 var xhr=new XMLHttpRequest(); //2.注册事件监听(监听客户端与服务端的通讯状态) xhr.onreadystatechange=function(){ //readyState==4表示与服务端的通讯结束 //status==200表示服务端响应正常 if(xhr.readyState==4&&xhr.status==200){ //...
true
a82eeca24eba113ed52f5b898abb46e8ff92ad3f
JavaScript
dawnsait/holywar
/files/fasheng/js/fabu.js
WINDOWS-1253
3,500
2.9375
3
[]
no_license
// JavaScript Document var map; var initialLocation; var siberia = new google.maps.LatLng(60, 105); var newyork = new google.maps.LatLng(40.69847032728747, -73.9514422416687); var browserSupportFlag = new Boolean(); var leftTop; var rightBottom; var bermudaTriangle = new google.maps.Polygon({ strokeColor: "#FF0000...
true
c27d59a11f50e9dbebf4e0e7a6e608f320e815cc
JavaScript
thefooly/RPG-initiative-track
/index.js
UTF-8
921
2.671875
3
[]
no_license
var express = require('express') var app = require('express')(); var server = require('http').Server(app); var io = require('socket.io')(server); var port = process.env.PORT || 8080; server.listen(port, function () { console.log('Listening on port ' + port); }); app.use(express.static('public')); app.set('view eng...
true
73412b22c629ca54c83e033b0a28c160698c9e42
JavaScript
Exjp/chatbot_dialogflow_bdx
/Semestre.js
UTF-8
1,096
2.640625
3
[]
no_license
class Semestre { constructor(name, session){ this.name = name; this.session = session; } addBdd(){ return new Promise( (resolve, reject) => { const requestCypher = 'MERGE (s:SEMESTRE {name: $name}) RETURN s'; const resultPromise = this.session.run(requestC...
true
3059151ae663a1596daac4dd368e69c996fee24c
JavaScript
jashieh/delicieux
/frontend/src/util/calorie_util.js
UTF-8
1,534
3.296875
3
[]
no_license
// Returns daily calorie requirement based on personal profile (calories per day) export const calorieCalc = (user) => { if (!user.height || !user.weight || !user.age) return 2000; let baseMetabolism; let calorieOffset = 0; let caloriesToKg = 7716; if (user.gender === "F") { baseMetabolism = (10 * user....
true
86ee7e22eace82b1f6c92cbf3cf728b630ff80fc
JavaScript
Sumire-Yoshizawa/clsy
/commands/moderation/lock.js
UTF-8
1,421
2.640625
3
[]
no_license
const { MessageEmbed } = require('discord.js'); module.exports = { name: "lock", description: "lock all channels for antiraid", category: "moderation", usage: "lock all || lock off", run: async (client, message, args) => { const channels = message.guild.channels.cache.filter(ch => ch.typ...
true
0346c39d010f94c1cd58657146b7f8d363dd730a
JavaScript
g33klady/br-frontend-testing-demo
/exercise-2/specs/MapSpec.js
UTF-8
2,157
2.90625
3
[]
no_license
describe("Mapbox Map", function() { describe("location keys", function() { it("should create a key containing city, state, and country", function() { expect(MAP.buildKey("Dayton", "Ohio", "USA")).toEqual("DaytonOhioUSA"); }); it("should create the correct key when state is null", function() { ...
true
08aaa954560476adb1a5c260eaaef1d0a16fac78
JavaScript
lncknight/makeSameHeight
/makeSameHeight.js
UTF-8
1,126
2.546875
3
[]
no_license
/* * Resize to equal height * * Usage: * $('.equal-height').makeSameHeight({ // The wrapper * setHeightOn:'.box_content', // properties detect on and set min-height on element * min:720 // discard style when width < 720 * }); * */ $.fn.makeSameHeight = function (opts){ var parents = $(this); parents...
true
3e7d7f0c9b83a81f8d28fa09a164bf8e68e9ece1
JavaScript
sergiolucaco/javascriptChallenge
/1_first_steps/getRGBFromHexa.js
UTF-8
510
4
4
[]
no_license
// Writes a function that convert a hexadecimal color, "blue" for example "#0000FF" in its RGB representation rgb(0,0,255)". // Give the function the name getRGB() and test it with this code. function getRGB( hexColor ) { var redHex = hexColor[1] + hexColor[2]; var greenHex = hexColor[3] + hexColor[4]; var blueHex...
true
3c41cdccca966a97041fcf563808e7d249f5e06a
JavaScript
tg41991/photo-grid-project
/js/script.js
UTF-8
1,757
2.578125
3
[]
no_license
$(function() { $('.search-button').on('click', function(event) { event.preventDefault(); // #hash-tag on input element var hashtag = $('input[id="hash-tag"]').val(); var instaphotos = '', $photos = $('.photos'); $("insta-header").addClass("photoheader"); $.aja...
true
bb47c703d6e848345ba8926205d227a2f3b46079
JavaScript
ThomasLaforge/Pandemie-web
/modules/Role.js
UTF-8
1,995
2.890625
3
[]
no_license
var roles = require('../Roles.json'); var $ = require('Jquery'); /////////////////////////////////////////////////////////////////////// /////////// Debug des roles contenus dans roles.json /////////// /////////////////////////////////////////////////////////////////////// // ...
true
48ebf103ecbb6232050eb8f02c083c1351cccb29
JavaScript
MatoXsvk/Yorg.io
/Zombie.js
UTF-8
3,089
2.6875
3
[]
no_license
class Zombie { constructor(props) { const randNum = floor(random() * 4); this.pos = randNum === 0 ? { x: floor(random(grid.x * w)), y: 0 } : randNum === 1 ? { x: grid.x * w, y: floor(random(grid.y * w)) } : randNum === 2 ? { x: floor(random(grid.x * w)), y: grid.y...
true
232f233bde4919a42be2ac5a5a413b17593a278b
JavaScript
akhaneev/alasql
/test/test607.js
UTF-8
2,838
3
3
[ "MIT" ]
permissive
if (typeof exports === 'object') { var assert = require('assert'); var alasql = require('..'); } describe('Test 607 - TRUNCATE on table in Local Storage', function () { const test = '607'; // insert test file number before(function () { alasql('DROP LOCALSTORAGE DATABASE IF EXISTS test' + test); alasql('CREAT...
true
b0af6a63916441a560d9d438a05540c02ff3fd3c
JavaScript
jarmom3/K-memo
/js/ui-state.js
UTF-8
2,285
2.703125
3
[]
no_license
// // ui-state.js // // One location to maintain UI state // // Jarmo Mäkelä, 2015-11-01 // demo v3 // function uiStateStorageObject() { var storedCurrentDoc = ""; var storedCameraUIOn = false; var storedZoomLevel = 1.0; var storedRecentClickedX = 0; // X-coord. of the point the user clicked i...
true
8485c41b411552543ad4297300ccae1fdfb705b1
JavaScript
Samwise2980/note-taker
/server.js
UTF-8
2,103
2.59375
3
[]
no_license
const path = require("path"); const express = require("express"); const fs = require("fs"); const app = express(); const PORT = process.env.PORT || 3000; app.use(express.static(path.join(__dirname, "/public"))); app.use(express.static(path.join(__dirname, "/public/assets"))); app.use(express.static(path.join(__dirnam...
true
11e8d92cf1a5b2eaf9474a5d22b66baaa294b17b
JavaScript
Eddy1998/AdFirenze
/js/action-new.js
UTF-8
16,695
2.59375
3
[]
no_license
function opciones(id,dataid) { var valore = $("#"+id).val(); if(!valore==' ' ||!valore==null) { //console.log(valore); $.ajax({ url: 'data/dati.php', type: 'POST', data: { 'NAMES' : 1, 'valore':...
true
7b4859c74ac14b93fc45555a159e3d8ec4a98831
JavaScript
tugberkgoc/foundation-notes
/solutions/06_code_quality/asyncFunctions.js
UTF-8
1,817
3.015625
3
[]
no_license
'use strict' const request = require('request') const readline = require('readline-sync') const fs = require('fs') const baseURL = 'https://api.exchangeratesapi.io/latest' async function main() { try { const base = await getInput('enter base currency') await checkValidCurrencyCode(base) const data = await ge...
true
fba04409e2b02bc3cdb0cb48fa9febab827226e1
JavaScript
majjikishore007/FoodMood
/src/Menu/helper/ApiCalls.js
UTF-8
1,639
2.640625
3
[]
no_license
import { API } from '../../foodApi'; // https://api.spoonacular.com/food/menuItems/search?query=sandwicha&number=8&apiKey=f9a8878ae3ef4dc0b445c9cbf435e628 export const getSerchedItem = (find) => { console.log('get searched', find); return fetch( `${API}food/menuItems/search?query=${find}&number=8&apiKey=${...
true
50dff7f808ad6bfa63e0b02a3b105960db97396b
JavaScript
DiegoMA1/Graficas-Computacionales
/Tarea1/T1.js
UTF-8
23,003
2.765625
3
[]
no_license
let mat4 = glMatrix.mat4; let projectionMatrix; let shaderProgram, shaderVertexPositionAttribute, shaderVertexColorAttribute, shaderProjectionMatrixUniform, shaderModelViewMatrixUniform; let duration = 10000; // ms // Attributes: Input variables used in the vertex shader. Since the vertex shader is called on each v...
true
3e2a2683b4adb05db40f24ce894655fac34b33b2
JavaScript
joeyaronson/personal_website
/js/games/rocket.js
UTF-8
6,462
2.921875
3
[]
no_license
function setup() { createCanvas(windowWidth, windowHeight); colorMode(HSB, 100); rectMode(CENTER); angleMode(DEGREES); noStroke(); textFont("Lucida Console"); textAlign(CENTER); //create player r = new Rocket(width / 2, height / 2); //set coin position cx = random(100, widt...
true
277355efe5fd7cf6fb562994f5f33282b920ad67
JavaScript
tgvashworth/learn-typescript
/helloworld/hello.js
UTF-8
481
4.09375
4
[ "JSON" ]
permissive
var poke = function (thing) { return thing.name + " said \"" + (thing.greeting || thing.noise)() + "\""; }; var prod = function (person) { return person.name + " said " + person.greeting(); }; var tom = { name: "Tom", age: 19, greeting: function () { return 'Hello!'; } }; va...
true
13cf9280c4af51530973a7bd24c5365a27090ffd
JavaScript
andrewkihs/W8D3
/intro_javascript_exercises/phase_2_enumerable.js
UTF-8
832
3.90625
4
[]
no_license
Array.prototype.myEach = function(callback){ for(let i = 0; i < this.length; i++){ callback(this[i]); } } Array.prototype.myMap = function(callback){ const retArr = []; this.myEach(function(el) { retArr.push(callback(el)); }); return retArr; } Array.prototype.myReduce = function(callback2, init...
true
b11435863aefcadf47795b6324c920571dee2553
JavaScript
Zermoran/hubble-frontend-pwa
/@hubblecommerce/hubble/core/store/api/modSearch.js
UTF-8
8,031
2.578125
3
[ "MIT" ]
permissive
import _ from 'lodash'; export const state = () => ({ maxProductItems: 5, maxCategoryItems: 5, autoCompleteResultsArray: [], autoCompleteResults: { categoryItems: [], productItems: [], }, showAutoCompleteResults: ...
true
774a08423d8381f645b86ba93fbc6d35c4ec6e40
JavaScript
casey-stinnett/javascriptevent
/eatingcookies/cookies.js
UTF-8
3,054
3.109375
3
[]
no_license
$(document).ready(function(){ var $originalPlate = null; var originalTop = null; var originalLeft = null; var originalPosition = null; var originalCss = {}; //A constructor for handling the cookies function Cookies() { this.cookies = {};//An object that will hold all cookies // Gets the cookie value searche...
true
0ee50c0043abd1956a2a27056588533d84328a24
JavaScript
pracharya2601/code-practice
/frequency_counter/anagrams.js
UTF-8
894
4.28125
4
[]
no_license
/* Given two strings, write a function called validAnagram to determine if the second string is an anagram of the first. An anagram is a word, phrase, or name formed by rearranging the letters of another, such as cinema, formed from iceman input: [abba], [aabb]; output: true input: "", ""; output: true; input: ab...
true
9c6c8cdd96a3a550baae130dd3b564cac4d25744
JavaScript
kevinramage/InfosWebApp
/Chrome/dto/application.js
UTF-8
7,278
2.859375
3
[ "Apache-2.0" ]
permissive
class Application { constructor(){ this.domain = ""; this.title = ""; this.description = ""; this.keywords = ""; this.libs = []; this.technologies = []; this.cookies = []; this.urls = []; this.languages = []; this.fingerPrints = []; ...
true
530bc0edff6763d198c35eb90c665543cb88ef2d
JavaScript
LoliDefiler/Waifu.github.io
/js/main.js
UTF-8
1,236
3.578125
4
[]
no_license
var clock = new Vue({ el: "#clock", data: { time: "", date: "" } }); var week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]; var timerID = setInterval(updateTime, 1000); updateTime(); // Generates datetime clock function updateTime() { var cd = new Date(); clock.time = ...
true
4ddf564573a6a719a45e62c79e6dbee75dab379f
JavaScript
IlianoCorp/mail
/mail/static/mail/inbox.js
UTF-8
3,560
3.140625
3
[]
no_license
document.addEventListener('DOMContentLoaded', function() { // Use buttons to toggle between views document.querySelector('#inbox').addEventListener('click', () => load_mailbox('inbox')); document.querySelector('#sent').addEventListener('click', () => load_mailbox('sent')); document.querySelector('#archived').ad...
true
662da678e35f2ff0168774c347c7777c9aa5793f
JavaScript
lorddominic/Work-Day-Scheduler
/javascript.js
UTF-8
2,209
3.1875
3
[]
no_license
$(document).ready(function () { //on click function for the save button - when the save button is clicked you want to pull of values of the text box and id off of text box $(".saveBtn").on("click", function () { // store values in variables var hour = $(this) .parent() ...
true
32075b277a544ca0ec7be28cae580c28ebc36348
JavaScript
ericeoeur/out-reach-austin
/src/container/AddEventForm.js
UTF-8
12,088
2.953125
3
[]
no_license
/* This is the Component that produces a form that allows you to add an event to the API. //This is a component that pulls from an the SQL API and adds information about an event. The container components pass data down to other React components. */ //Import React and Component import React, { Component } from "reac...
true
032397ef549b71c883f6423e7878a66f5e24ff51
JavaScript
Kibreab-Habte/CS572
/assignment-1/question1.js
UTF-8
2,420
3.875
4
[]
no_license
//******************************************************************************************************/ // using ES6 features //******************************************************************************************************/ String.prototype.filterWordsES6 = function(words){ ...
true
eac6008f38c9f6bb4b480e6d653427a4c26e1066
JavaScript
le000165/tictactoe
/app.js
UTF-8
6,227
3.40625
3
[]
no_license
// ================== USER INTERFACE MODULE =============== const userInterface = (() => { // DOM elements const displayMessage = document.getElementById('display'); const board = document.getElementById('board'); const alertSound = document.getElementById('alert-sound'); const cellPress = document....
true
e3502e273f539ae4f0c8544d1bcebacc6f4083ec
JavaScript
zac11/js-code-for-interviews
/basics/null_vs_undefined.js
UTF-8
101
3.03125
3
[]
no_license
/** * * null vs undefined */ let a; console.log(a); //undefined let b= null; console.log(b)
true
7c1522d191ab676c20264818fb7354a1f896baa8
JavaScript
alexvasiliev/JavaScript
/public/js/game/bindedobject.js
UTF-8
993
2.78125
3
[]
no_license
define([ 'classy', 'game/baseobject' ], function ( Class, BaseObject ){ var BindedObject = BaseObject.$extend ( { __init__ : function(Image) { this.$super(Image); this.bind = null; this.localx = 0; this.localy = 0; this.localangle =...
true
267a28cc746da9ef0c48b27cab003a1c3929e1b9
JavaScript
RobertoM80/tic_tac_toe
/scripts/2main.js
UTF-8
11,885
3.125
3
[]
no_license
var board = { emptySquares: [1,2,3,4,5,6,7,8,9], winningLines: [[1,2,3], [4,5,6], [7,8,9], [1,4,7], [2,5,8], [3,6,9], [1,5,9], [3,5,7]], reset: function(){ board.emptySquares = []; } } var player = { square: '', squares: [], chooseSquare: functio...
true
04b98c4beddebb1b6e617b49a27135db03a0ce70
JavaScript
ArdeshirV/liaison
/packages/router/src/routable.js
UTF-8
1,855
2.609375
3
[ "MIT" ]
permissive
import {hasOwnProperty} from 'core-helpers'; import {Route} from './route'; export const Routable = (Base = Object) => class Routable extends Base { static $getRoute(name) { const routes = this.$getRoutes(); return routes.$get(name); } static $setRoute(name, pattern, options) { const ...
true
bf8ae69a22266d03be4e103fde55634c9c03944b
JavaScript
Alston-Tang/SectionsBin
/app/static/js/manage/member.js
UTF-8
4,982
2.65625
3
[]
no_license
/** * Created by tang on 12/26/14. */ var memberTableIns; var memberTableDom; var memberElements=['lastname','firstname','year','college','sid','major','email','tel']; $(document).ready(function(){ memberTableDom=document.getElementById("member-list-table"); memberTableIns=$(memberTableDom).DataTable({ ...
true
2cff7def999a9c4508b5a28238ace68fb7f0a088
JavaScript
KVOTHE73/Learning_Javascript
/mid_9-Nuevo_Array_Mover_Derecha.js
UTF-8
522
4.5625
5
[]
no_license
/** * Dado un array de números devuelve un nuevo * array donde cada elemento se haya desplazado * una posición hacia la derecha. * * Ejemplo: * * Array original: [1,2,3,4] * Array resultante: [4,1,2,3] * * Nota cómo se trata de un desplazamiento circular, * donde el último elemento pasa a ser el primero...
true
b87cefdc1bafc501cb4cf6d74d84e9cc3378ef54
JavaScript
jldaii/CwpApp
/src/assets/common/kaYiLoader.js
GB18030
4,568
2.578125
3
[]
no_license
var KaYiLoaders = new Array(); var loader = "<div style='margin:0 auto;text-align:center; padding-top:20px;'><img src='../../assets/img/loading/loading.gif' style='height:35px;width:35px;display:inline;' alt=''/><br/><p style='font-size:12px;display:inline;'>УԺ...</p></div>"; function gotoPage(gridID, pageIndex) { ...
true
72c0968eae1d20f5976fb5301d7787c56b396908
JavaScript
swljdev/jsFundamentals
/4-functions/07-constructorFunctions.js
UTF-8
912
4.15625
4
[]
no_license
// 1 2 3 function Person(name, age, canVote){ // 4 5 6 this.name = name this.age = age this.canVote = canVote } // 7 8 let person4 = new Person("James", 80, true); let person5 = new Person("Doug", 32, true); console.log(person4); console.log(per...
true
349c28f13bf82ebf93b04657aae569f2f0eb702d
JavaScript
pikoscielniak/libs-overview
/networkProgramming/serverBasics.js
UTF-8
367
2.765625
3
[]
no_license
var net = require('net'); var server = net.createServer(function (socket) { socket.end("Hello and Goodbye!\n"); }); server.on('listening', function () { console.log(server.address()); }); server.on("error", function(error) { if (error.code === "EADDRINUSE") { console.error("Port is already in use"...
true
98d31a937e05fec09bd7297c0cd8ce8906dea73a
JavaScript
f-m-t-t-m/summerpractice2021
/firebase.js
UTF-8
31,603
2.578125
3
[]
no_license
var firebaseConfig = { apiKey: "AIzaSyCoglHbEongRzjyeeTxjroSXgdZnd1VpMM", authDomain: "fefu2021practice.firebaseapp.com", databaseURL: "https://fefu2021practice-default-rtdb.europe-west1.firebasedatabase.app", projectId: "fefu2021practice", storageBucket: "fefu2021practice.appspot.com", messagin...
true
22ea8fc5e863ec2edc710f5074a5bde2e916bed3
JavaScript
KikiJiki85/1166169-big-trip-11
/src/components/trip-day-event.js
UTF-8
2,052
2.671875
3
[]
no_license
import {parseTime, getEventDuration, EventTypeToPlaceholderText, MAX_SHOWED_OFFERS_AMOUNT} from "../utils/common.js"; import AbstractComponent from "./abstract-component.js"; const createTripDayEventTemplate = (card) => { return (`<li class="trip-events__item"> <div class="event"> <div class="event__type"> ...
true
f47c02dc55e17d7fa076ddaab90f2b850788ef80
JavaScript
fcasad/lnl-fp
/fp3-prereqs.js
UTF-8
2,438
4.4375
4
[]
no_license
/** * FUNCTIONS ARE 1ST CLASS */ function add(x, y) { return x + y; }; // function declaration const add = function add(x, y) { return x + y; }; // function expression const add = function (x, y) { return x + y; }; // anonymous function const add = (x, y) => x + y; // lambda function // methods const utils = { ad...
true
ddf45cde28789b60c280eeaab012886ff4bb55a8
JavaScript
jaguador/Curso_JS_Proyecto_old
/lib_proyecto.js
ISO-8859-1
7,298
3.171875
3
[]
no_license
/******************* * Ejercicio 2 * Julio Aguado Robles * Alumno: al10788 ********************/ var url = "http://127.0.0.1:8080"; function muestraUsuarios() { $.get('/usuarios', function(data) { var html = ""; for (var i in data.usuarios) html += data.usuarios[i].usuario $('#containerLogin').html(html); ...
true
1c9068562d07cf569a35ad5efb2cb96dee795719
JavaScript
OfiliPatrick/flutterwave-api
/conditionChecker.js
UTF-8
4,747
2.921875
3
[]
no_license
const conditionChecker = (condition, conditionValue, field, fieldValue) => { if (condition == "eq") { if (fieldValue == conditionValue) { return { status_code: 200, data: { message: `field ${field} successfully validated.`, status: "success", data: { ...
true
6ce80758e27601b3f30c5c334ad8c92289a745a8
JavaScript
seanpenney/iuee_hackathon
/steakout.js
UTF-8
13,057
3.46875
3
[]
no_license
/* The following disables scrolling through page with keys. Useful so user doesn't scroll through page when playing game*/ window.addEventListener("keydown", function(e) { // space and arrow keys if([32, 37, 38, 39, 40].indexOf(e.keyCode) > -1) { e.preventDefault(); } }, false); /* setup canvas an...
true
6aa91438409bde2e09a1b7a835bd705e79faab6f
JavaScript
LizaProg/Learn
/github/learnJavascript1/test/RegExp.js
UTF-8
1,870
3.6875
4
[]
no_license
//Peгулярные выражения /* var re = /.../; var s = "..."; // s.search(re) // re.test(s) // /[abc]/.test("vasya@mail.com") //есть ли в этой строке символы abc // /[^abc]/.test("vasya@mail.com") // в этой строке не должно быть символов abc //[a-zA-Z0-9_]/.test("vasya@mail.com") //можно делать выборку и так // ...
true
c8df3e572159d04a79f147bea3dc6a57df64e7fe
JavaScript
WilliamNHarvey/jsonschema-2md
/src/generatePropertyRestrictions.js
UTF-8
559
2.71875
3
[]
no_license
function generateSinglePropertyRestriction(schema) { return (key, text) => { if (schema[key]) { return `* ${text}: \`${schema[key]}\``; } return null; }; } module.exports = function generatePropertyRestrictions(schema) { const generate = generateSinglePropertyRestriction(schema); return [ ...
true
593c25de196cee8a11de8d098a3ad533017755d2
JavaScript
ajiir/dice-game
/app.js
UTF-8
6,128
3.21875
3
[]
no_license
// Тоглоом дууссан эсэхийг хадгалах төлвийн хувьсагч. var isNewGame; // Тоглоомын бүх газарт ашиглагдах глобаль хувьсагчдыг зарлая. // Аль торлогч шоо шидэх вэ гэдгийг энд хадгална. var activePlayer; // Хоёр торлогчийн цуглуулсан оноо. var scores; // Идэвхитэй тоглогчийн цуглуулж байгаа ээлжийн оноо. var roundScore; ...
true
5202328e8fb8b71b28fb57404d771139730ef0ae
JavaScript
dev-iskan/powercom-admin
/src/store/modules/category.js
UTF-8
2,574
2.546875
3
[]
no_license
/* eslint-disable no-shadow */ import api from '@/api/category'; const state = { loading: false, items: [], }; const getters = { hierarchy(state) { const items = []; const getChildren = (parentId) => { const children = []; state.items.forEach((child) => { if (child.parent_id === par...
true
b6c025384de6bbd362b75c6ba8a1c30ec69dc5f8
JavaScript
JohnieGIT/HobbyProgg
/FoundationsOfProg/07_Codingtrain/sketch.js
UTF-8
447
3.65625
4
[]
no_license
// 2.5: The random() Function - p5.js Tutorial var dot = { x: 100, y: 50 } var col = { r: 255, g: 0, b: 0 } function setup() { createCanvas(600, 400); background(0); } function draw() { col.r = random(100, 255); col.g = 0; col.b = random(100, 255); dot.x = random(0, width); dot.y = random(0, height); ...
true
fb6dd7d4dd93eb6ad3c143c52f3ac97fa445f9b1
JavaScript
jahangir4csit/react-stateObject
/src/App.js
UTF-8
834
2.6875
3
[]
no_license
//import logo from './logo.svg'; import { useState } from 'react'; import MyComponent from './components/MyComponent'; import './App.css'; function App() { // state object // A state variable can be type number, bollean, object and array const [data, setState] = useState({ nav: '', content: '' }) ...
true
754f69109381fa331abf0336e81187fb4f09b4ab
JavaScript
kolod/SugarHacker
/load-sugarhacker.js
UTF-8
536
2.53125
3
[]
no_license
(function(){ var jsurl = chrome.extension.getURL('sugarhacker.js'); var body = document.querySelector('body'); var script = document.createElement("script"); script.setAttribute('src', jsurl); body.appendChild(script); var cssurl = chrome.extension.getURL('sugarhacker.css'); var head = docu...
true
bff518226101fc43cfa769a91fa488514dafcd5c
JavaScript
italovinicius18/ludo.io
/ludo.io/src/components/Board/Board.js
UTF-8
1,690
2.8125
3
[]
no_license
import React from 'react'; import './Board.css'; import {game} from '../Logic'; import {boardData} from '../Data'; function createBoard() { var cells = []; for (let x = 0; x < 15; x++) { for (let y = 0; y < 15; y++) { var pair = x + '-' + y; var cellStyle = { backgroundColor: paintCe...
true
82d6d546da68a33b1438870e6f60e044e9f7caf9
JavaScript
EroStark/MusicVidApp
/src/reducers/commentsreducer.js
UTF-8
1,060
2.765625
3
[]
no_license
const defaultState = { allComments: [], specificComments: [] } export default (state = defaultState , action ) => { let newState = state console.log('state',state) switch (action.type){ case "CREATE_NEW_COMM": return({allComments: [ ...newState.allComments, ...
true
0a3cac54f4100d9b577a95c6c169def69b383e59
JavaScript
bmulvey2017/DAT405
/12_Exercise05-InteractiveColorGrid_(Solved)/sketch.js
UTF-8
633
2.984375
3
[]
no_license
let tileSize = 50; function setup() { var canvas = createCanvas(500, 500); //Use this function to define the size of the output window stroke(255); var text = createDiv("This is an HTML string"); text.position(50,50); canvas.parent("myContainer");{ frameRate(20); function draw() { for (var i = 0; i ...
true
c6bffeb9fcda2bf6ed971fd43766053c047f3cfd
JavaScript
JeancarloFontalvo/inventario_silab
/web/silab-vendor/js/silab-helper-registerCss.js
UTF-8
4,007
2.515625
3
[ "BSD-3-Clause" ]
permissive
var silab = silab || {} silab.helpers = silab.helpers || { }; silab.helpers.createCSSSelector = function(selector, style) { if (!document.styleSheets) return; if (document.getElementsByTagName('head').length == 0) return; var styleSheet,mediaType; if (document.styleSheets.length > 0) { ...
true
c9d8c1e582f62431d6b85a9bac1aebf6b473c37a
JavaScript
AnnTuck/EmployeeFinder
/app/public/js/match.js
UTF-8
722
2.890625
3
[]
no_license
$(function () { //Retreives the employee data and finds a match with the most recent survey const matchSurvey = function (newSurveyEntry) { // event.preventDefault() prevents the form from trying to submit itself. // We're using a form so that the user can hit enter instead of clicking the bu...
true
4e57fd3e2fc4a89d5eaf63e544b8ba865c036750
JavaScript
Saveliy199757/js
/src/question.js
UTF-8
2,179
3
3
[]
no_license
export class Question { static create(question) { return fetch('https://questions-app-sava.firebaseio.com/question.json', { method: 'POST', body: JSON.stringify(question), headers: { 'Content-Type': 'application/json' } }) .th...
true
4dafd2da7edb16211f64f58b3246c5dfe8c7f3de
JavaScript
nhz-io/curry-n
/test/curry-n.js
UTF-8
999
3.078125
3
[ "MIT" ]
permissive
/* eslint-disable func-names, no-invalid-this, no-magic-numbers */ const test = require('ava') const curryN = require('../index.js') test('curried function', t => { const curried = curryN(3, (a, b, c) => { t.true(a) t.true(b) t.true(c) }) curried(true, true, true) curried(true)...
true
c4dd020ebbf2d3485aa6e06122c2e85fe004810e
JavaScript
usangbong/Data-Visualization-Lab-RND
/gaze_project/gazeBehavior/ver_2/static/js/func/general_funcs.js
UTF-8
95
2.875
3
[ "Apache-2.0" ]
permissive
function calcDistance(x1, y1, x2, y2){ return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));; }
true
ac3f460ad5717891396ea1a0c8ef31fad2b7d83e
JavaScript
art3mis83/nono
/ressources/commands/guerre.js
UTF-8
1,229
2.53125
3
[]
no_license
function getRandomInt(max) { return Math.floor(Math.random() * Math.floor(max)); } module.exports = { name: 'GUERRE', description: 'À mon signal, déchaine les enfers', begin : false, args : false, precheck(message){ return message.indexOf(this.name) >= 0; }, execute(message, args) { var respo...
true