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
bd4d496322ad532b5c51bf24d7b06f1de3914b66
JavaScript
salizwa27/greetingsApp
/test/greetingsApp.test.js
UTF-8
3,199
2.8125
3
[]
no_license
const assert = require('assert'); const greetingsApp = require("../greetings") const pg = require("pg"); const Pool = pg.Pool; const connectionString = process.env.DATABASE_URL || 'postgresql://salizwa:salizwa123@localhost:5432/greetings_test'; const pool = new Pool({ connectionString }); describe('The greetings f...
true
7cbc3affc87e4560a09e68cd8fc75cd319566380
JavaScript
abechoi/JS_Objects
/filtermapreduce.js
UTF-8
1,496
4
4
[]
no_license
/* FILTER() MAP() REDUCE() */ const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2]; const squareList = (arr) => { "use strict"; // change code below this line // const squaredIntegers = arr.filter( num => num > 0 && num % parseInt(num) === 0).map( num => Math.pow(num,2)); // OR... arr = arr...
true
ca3a1e35128f0171c04e9d18f7ea642f80d82b7a
JavaScript
ryuker16/node-demo-for-betterPT
/app.js
UTF-8
3,521
2.515625
3
[]
no_license
/** * Sentence Sentiments * * This API will let authorized users submit a sentence string to the * Sentiments API(community-sentiment.p.mashape.com) and recieve a * determination of content tone(Positive, Neutral, Negative). * * Users are authorized via Json Web Tokens(JWT) and need an Au...
true
5c2e2dd78239c262dda1b6eb6ab1ef70f28b5fc3
JavaScript
hbweb/angular-grub
/js/avatar.js
UTF-8
1,087
2.578125
3
[]
no_license
function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#profile-image-uploaded').attr('src', e.target.result); $('#profile-image-uploaded').addClass("has-image"); $('#profile-image-mid').att...
true
d86ce4612acfec14caed78c700ed0aa5c427dfdd
JavaScript
ZhouZhiW/egret-game-library
/egret_h5/egret 测试游戏/zyn/bin-release/web/171025184415/libs/modules/saveimage/saveimage.min.js
UTF-8
3,526
3.046875
3
[]
no_license
function convertCanvasToImage(canvas) { var image = new Image(); image.crossOrigin = "*"; image.src = canvas.toDataURL("image/jpeg"); return image; } function getBase64Image(img) { var image = new Image(); image.src = img.src; image.onload = function() { if (image.complete) { ...
true
96518cf133695afbf756d35645c3e71aad2d9742
JavaScript
rajiselvamani/LawpathChallenge
/client/src/Form.js
UTF-8
6,156
2.671875
3
[]
no_license
import React, { useState } from 'react'; import { Grid, TextField, Button, Card, CardContent, Typography, Snackbar } from '@mui/material'; import MuiAlert from '@mui/material/Alert'; import axios from "axios"; import logo from "./assests/Lawpath_logo.png" import './App.css'; function Form() { //state hooks used...
true
443a66bfc252dfb1441d82e3d042737a735e5f48
JavaScript
hanwjdgh/Programmers
/Javascript/level 1/Determining an integer root square.js
UHC
299
3.75
4
[]
no_license
function nextSqaure(n){ var result = 0; //Լ ϼϼ var tem = Math.sqrt(n); if(parseInt(tem) == tem) return parseInt(Math.pow(tem+1,2)) return 'no' } // Ʒ ׽Ʈ ڵԴϴ. console.log(" : " + nextSqaure(121));
true
ff1428e8664f9de34b4d663277e2cd0eaea5682a
JavaScript
Cathal83/udemy
/javascript-interview/hoisting.js
UTF-8
1,317
4.6875
5
[]
no_license
/** * Question 6 - What is variable and function hoisting? * Answer - Javascript brings variables and functions to top of scope within which they are decalred * Either function scope or global scope * * Variables and functions hoisted to top of scope they are declared in, depending on key word used to define them...
true
88a02c30217d20ea61675daf0b02a4f09e1430fd
JavaScript
atariqbscs/CanvasInsight
/src/pages/Question.js
UTF-8
2,272
2.53125
3
[]
no_license
import React, { Component } from 'react'; import Logo from '../components/Logo'; import { Text, View, StyleSheet } from 'react-native'; import {Actions} from 'react-native-router-flux'; import RadioGroup from 'react-native-radio-buttons-group'; export default class Question extends Component { state = { dat...
true
2526282a82134284368b6d85c4450a44a330d7f2
JavaScript
coderdojortp/rivers.run
/index.js
UTF-8
7,519
2.75
3
[]
no_license
'use strict'; try { window.loadNewUSGS = "Trying to Load Data" window.serviceWorkerMessages = [] //window.serviceWorkerRegistered will be called by allPages.js navigator.serviceWorker.ready.then(function(registration) { navigator.serviceWorker.onmessage = function(event) { window.serviceWorkerMessages.pu...
true
73302899695be07aa159fb5b8fc64b96ca285838
JavaScript
SoumyaAgarwal12/resolution
/resolution.js
UTF-8
3,109
3.09375
3
[]
no_license
showRes(); //after loading page, Firstly show all my notes // VALIDATION function validation() { if (textareaId.value.length > 1) addRes(); else showAlert(); } // WARNING FOR BLANK INPUT function showAlert() { let message = document.getElementById("message"); message.innerH...
true
515c8cebf4fb738c8a6b975fc358b5a7946a9b0f
JavaScript
VergaraC/front-tecweb
/src/Context/hooks/useAuth.js
UTF-8
4,068
2.765625
3
[]
no_license
import { useEffect, useState } from 'react'; import api from '../../API/api'; import history from '../../history'; import { createErrorMessage, createSuccessMessage, saveTokenAndName } from '../../Helpers'; export default function useAuth() { const [authenticated, setAuthenticated] = useState(false); ...
true
5f0d61955aeb85948db65c89a44513ce5335bfcb
JavaScript
jett90/fewd90week6
/js/project.js
UTF-8
828
2.796875
3
[]
no_license
$("nav a").click(function(){ $("nav a.current").removeClass("current"); $(this).addClass("current"); }); //When user clicks Generate, get the # of paragraphs. //Find Current class and return it's data-ipsum. //Find id matching data-ipsum and change display to block for # of paragraphs $("#submit").click(clickSubm...
true
78353fdfcbd151cf81211887f90f865e4c098f99
JavaScript
goforu/flowerBomb
/js/pokerCalc.js
UTF-8
4,305
2.8125
3
[]
no_license
(function (window) { window.pokerCalc = { //总共可能 total: 52 * 51 * 50 / 6, //豹子 threeOfAKing: function (selectedArr) { //总数 if (!selectedArr) return 13; var num = selectedArr[0][0]; return 13 - num; }, //同花顺 strai...
true
f6c89bd21e59e8a8bec6fa7ffa3c9c3e46b18b63
JavaScript
dengweiyong/tree
/tree.js
UTF-8
5,539
2.703125
3
[]
no_license
/* 最简洁快速的tree插件 采用hash列表处理数据,一次循环完成树的建立,不用递归效率高很多 一百多行代码,没法更简洁 */ //字符串替换 String.prototype.replaceAll = function (src, dec) { return this.replace(new RegExp(src, "gm"), dec); }; function csv2json(csv) { if (!csv) return false; var arr = csv.split("\r\n"); var i = 0, len = arr.length, json = []; ...
true
cc58612e445f68fa5c12f8cf300de371d8a13565
JavaScript
yanchapanta/teacherWeb404
/JAVASCRIPT/03 EstructuraSelectivaMultiple/problema_35/js/funciones.js
UTF-8
1,882
3.015625
3
[]
no_license
const fCalcular= async ()=>{ try { const url='base/info.text' const encapsuleRes=await fetch(url); const response=await encapsuleRes.json(); fYear(response); } catch (error) { console.log(error) } } function fYear(datas) { let day; let ml; ...
true
94a9e54a6ceec3e5e5a35d2ae212744a4c16d35c
JavaScript
modupantu/utils_container
/script/updataExcel.js
UTF-8
1,847
3.171875
3
[]
no_license
// 处理Excel const XLSX = require('xlsx-style') const wb = XLSX.readFile('./template.xlsx', { cellStyles: true, bookFiles: true }); const sheets = wb.SheetNames // const worksheet0 = wb.Sheets[sheets[0]] //工作表页 // const worksheet1 = wb.Sheets[sheets[1]] //工作表页 function getTwoWeeks(date) { let curWeek = date.getD...
true
97e3dcff6cca5dcb283dcb2ff91e79e73bed0f02
JavaScript
sofeien/danmu
/danmu.js
UTF-8
1,433
2.65625
3
[]
no_license
/*jslint browser: true*/ /*global $, jQuery, alert*/ $(function () { 'use strict'; var showDanmu = (function () { var colors = ['red', 'blue', 'Black', 'BlueViolet', 'Crimson', 'Darkorange', '#e68c32', 'Fuchsia', 'OrangeRed', 'SlateBlue', 'Teal']; var danmuWall = $('#danmu'); var te...
true
b8d69c04442841419bb8915ca652e8523f879a09
JavaScript
ivwu/MERN-application
/src/server/authenticate.js
UTF-8
1,391
2.703125
3
[]
no_license
import uuid from "uuid"; import md5 from "md5"; import { connectDB } from "./connect-db"; const authenticateTokens = []; // if a user is found run this function to gather data associated with that user async function assembleUserState(user) { let db = await connectDB(); let tasks = await db.collection("tasks").fi...
true
46ece3deabaa6181646c8d2b8175264c7827f52a
JavaScript
Nkvnl/mmc
/routes/blog.js
UTF-8
1,401
2.59375
3
[]
no_license
var express = require("express"); var app = express(); var blogSchema = require("../models/blog"); var router = express.Router(); router.get("/", function(req, res) { // Get all campgrounds from DB console.log(req.user); blogSchema.find({}, function(err, blogAll) { if (err) { console....
true
d9fb7182b75984269e857a9d5eda42427a452962
JavaScript
sheminusminus/aim2
/work/stateful/js/global.js
UTF-8
2,467
2.9375
3
[]
no_license
$(function(){ var checkboxes = $('input:checkbox'); var triggers = $('[data-toggle-class]'); triggerToggles(triggers); setCheckboxes(checkboxes); /*======================================= super snazzy css-animations on header ;) (toggle turns them on and off constantly, so used addCla...
true
3cd00fa64f74a509bae134532054a8a7ae4bb9cc
JavaScript
IgorKovacevic27/IgorKovacevic27.github.io
/game.js
UTF-8
1,511
3
3
[]
no_license
import { update as updateSnake, draw as drawSnake, BRZINA_ZMIJE, getSnakeHead, samaSebe } from './snake.js' import { update as updateFood, draw as drawFood } from './food.js' import { outsideGrid } from './grid.js' let lastRenderTime = 0 let gameOver = false const tablaIgre = document.getElementById('tabla-igre') fun...
true
a15163baba249d308550093ab5b6908e97d5c81b
JavaScript
EscuelaIt/Javascript-Best-Practices
/02 - Javascript language/04 - Check variables/01 - Not defined/good.js
UTF-8
162
2.609375
3
[ "MIT" ]
permissive
if( typeof total !== 'undefined' ) { console.log( total ); // Not logged but no error. } console.log( 'This will be logged' ); // 'This will be logged'
true
403f748f2023d0c9789d621bfb5aada7e555bd95
JavaScript
emveleva/Programming-Basics-JS
/05.04. - Упр. Цикли - Част 1/sumOfSeries.js
UTF-8
163
3.34375
3
[]
no_license
function solve(num) { let n = Number(num); let sum = 0; for (let i = 1; i <= n; i++) { sum = sum + i*i; } console.log(sum) } solve(4)
true
e269997cac77e75f50059771b91790737123f6a1
JavaScript
4ian/GDevelop
/GDJS/tests/tests/objecttools.js
UTF-8
7,507
2.828125
3
[ "MIT" ]
permissive
// @ts-check describe('gdjs.evtTools.object', function () { it('can count picked instances of objects', function () { const runtimeGame = gdjs.getPixiRuntimeGame(); const runtimeScene = new gdjs.TestRuntimeScene(runtimeGame); runtimeScene.registerEmptyObjectWithName('MyObjectA'); const objectA1 = ru...
true
31ad3499ebad175507e33d49bfc487b508e1dd7f
JavaScript
koenongena/advent-of-code-2020
/utils/math.js
UTF-8
408
2.671875
3
[]
no_license
import R from "ramda"; export const leastCommonDenominator = numbers => { const gcd = (a, b) => { return !b ? a : gcd(b, a % b); } const lcm = (a, b) => { return (a * b) / gcd(a, b); } return numbers.reduce((acc, a) => { return lcm(acc, a); }, Math.min(...numbers)); }; ...
true
396d8650669d7b7a5cd86b7de3cbdc0b0b4785d7
JavaScript
Harrisoncre8/Learning-AWS
/src/App.js
UTF-8
1,646
2.84375
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import { Storage } from 'aws-amplify'; class App extends Component { componentDidMount(){ this.readFromStorage(); } state = { fileURL: '', file: '', filename: '', newURL: '' } // handle file input selection handleChange...
true
e268f17311eb04254d3232b626ddb47881ddcbb4
JavaScript
fredrikstolpe/billybass
/modules/pin.js
UTF-8
886
2.625
3
[]
no_license
var Q = require('q'); var gpio = null; try{ gpio = require('rpi-gpio'); } catch(err){ console.log(err); gpio = require('./mock-rpi-gpio.js'); } module.exports = Pin; function Pin(pin){ this.pin = pin; }; Pin.prototype.setupOutput = function(){ var self = this; var deferred = Q.defer(); gpio.setup(this...
true
b7ef1dd62b1b7982e3954a53a7c141c512056acf
JavaScript
jcmedina1/Talle-de-JavaScript
/public_html/8/js/code_js.js
UTF-8
739
4.34375
4
[]
no_license
var number1 = Number(prompt("Enter the first number for the operation: ")); var number2 = Number(prompt("Enter the second number for the operation: ")); var result; console.log("With the numbers you enter, the following operations were performed:"); result = number1 + number2; console.log(number1 + " + " + number2 + ...
true
313bda798262096dcb609ce90f1654617492768a
JavaScript
cigalecigales/provingGround
/javascript/16/main.js
UTF-8
168
2.5625
3
[]
no_license
var obj = new XMLHttpRequest(); obj.onreadystatechange = function(){ alert("readyState: " + obj.readyState); } obj.open("GET", "http://www.hulu.jp/"); obj.send(null);
true
e524f7249788e4f1f65f0b8919f1a03dddc12cc5
JavaScript
bbuecherl/Maelstrom
/src/each/EachProcessor.js
UTF-8
3,737
2.890625
3
[ "MIT" ]
permissive
/** * Each-logic processor constructor * @constructor * @private * * @param {string} line template line * @param {Object} data template data of child elements * @param {TemplateProcessor|Template} parent parent fragment * @param {Template} root root template */ var E...
true
2a6df70d955f668647503711fce6ccce3ba47132
JavaScript
ethanbz/project-m4-twitter-clone
/client/src/components/CurrentUserContext.js
UTF-8
777
2.609375
3
[]
no_license
import React, { createContext, useState, useEffect } from 'react' export const CurrentUserContext = createContext() export const CurrentUserProvider = ({ children }) => { const [currentUser, setCurrentUser] = useState(null) const [status, setStatus] = useState('loading') useEffect(() => { ...
true
3685ed13568296ec687190c3dcd16f3a7dbaff23
JavaScript
silvercorked/bullet-game
/game/components/ProjectileBounceComponent.js
UTF-8
1,881
2.765625
3
[]
no_license
class ProjectileBounceComponent extends Engine.Component { static name = 'ProjectileBounceComponent'; constructor(gameObject) { super(gameObject); this.bounce = 0; } update() { let screenBottom = Engine.SceneManager.screenHeight; let screenLeft = Engine.SceneManager.screenWidth; let camera = Engine.SceneM...
true
06bbc66766a427a5676f99eb32900443cd62e392
JavaScript
subhandp/FS-JS-Challanges
/006.js
UTF-8
709
2.84375
3
[]
no_license
const cencors = "dolor, elit, quis, nisi, fugiat, proident, laborum".split(", ") let words = `Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo cons...
true
68e90db5de6cde6fed9c184ac60d804111587314
JavaScript
sn-007/MERN_APP
/frontend/src/components/REC/editrecprofile.js
UTF-8
4,144
2.609375
3
[]
no_license
import React, { Component } from "react"; import axios from "axios"; import "bootstrap/dist/css/bootstrap.min.css"; import Navbar from '../templates/recnavbar'; export default class EditRec extends Component { constructor(props) { super(props); this.state = { name: localStorage.getItem("name"), ...
true
87db604fae6d55e30dbde0818f52d70afd7407cd
JavaScript
EmbraceTheDefeat/Programming-Basics-JS---April-2021---Software-University
/10 - For Loops - Lab/07 - Sum of Numbers/index.js
UTF-8
276
3.75
4
[ "MIT" ]
permissive
function sumOfNumbers(input) { const num = input[0].toString(); let sum = 0; for(let i = 0; i < num.length; i++) { sum += Number(num[i]); } console.log(`The sum of the digits is:${sum}`); } sumOfNumbers([1234]); sumOfNumbers([564891]);
true
47e20cf0a9c603422a4f15b214abb8d456787988
JavaScript
inuwas/skybetapp
/app/controllers/tcp.js
UTF-8
3,559
3.125
3
[ "MIT" ]
permissive
var net = require('net'); var TcpData = require('../models/tcp'); var S = require('string'); /** * Connects TCP service and saves data to mongodb * @param {*} res */ var connectToServer = (res) => { // var client = new net.Socket(); var completeData = ''; let client = net.createConnection({ port: 8282 }, () =...
true
4e64af81992918b0991106948bb368445f8c77e6
JavaScript
isaferrara/Space-Mint
/classes.js
UTF-8
4,680
2.78125
3
[]
no_license
const $canvas=document.querySelector('canvas') const ctx= $canvas.getContext('2d') let gameInterval; const $startButton= document.querySelector('#start') const $resetButton= document.querySelector('#reset') const $pauseBtn = document.querySelector('#pause') const keys=[] let gravity= 0.4 const friction = 0.9 let frames...
true
fa63ba2b24ad0b4b728477a91619232a3fb8f2c3
JavaScript
grandff/ITCEDU_1_FP
/finalPro/WebContent/js/calculator/calc1.js
UTF-8
2,811
2.625
3
[]
no_license
function radiochk() { var A = document.select1; var chkcount = 0; var chkcount2 = 0; var home = document.select1.home; var deal = document.select2.deal; var test = document.getElementById("resultshow"); for (var i = 0; i < home.length; i++) { if (home[i].checked == true) { chkcount++; break; ...
true
62c602a0a4a86f6e503acc9808608d8e6d23e435
JavaScript
joechou81/CS416_data-visualization
/Chart_2.js
UTF-8
3,761
2.984375
3
[]
no_license
function chart_2(){ // set the dimensions and margins of the graph var margin = {top: 10, right: 30, bottom: 85, left: 60}, width = 500 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; // append the svg object to the body of the page var svg = d3.select("#svg2") .attr("width", 500) ...
true
c90ec29835dec47784c28844bbb5b933eced6a4b
JavaScript
FarragoFiction/VikingTimeline
/javascripts/Scenes/FaceDenizen.js
UTF-8
9,804
2.734375
3
[ "MIT" ]
permissive
function FaceDenizen(session){ this.canRepeat = true; this.session = session; this.playerList = []; //what players are already in the medium when i trigger? this.denizenFighters = []; this.trigger = function(playerList){ this.denizenFighters = []; this.playerList = playerList; for(var i = 0; i<this.session...
true
50b0e5bf102fdd174992c8d8565d32ea330cf052
JavaScript
jmathews-shiver/tools
/npm/objCheck/lib/objCheck.js
UTF-8
2,987
2.84375
3
[]
no_license
'use strict' const objectsValidationList = { Number: ['[object Number]'], String: ['[object String]'], Array: ['[object Array]'], JSON: ['[object JSON]'], Boolean: ['[object Boolean]'], Date: ['[object Date]'], NamedFunction: ['[function Raw]'], AnonFunction: ['[function Raw]'], Raw...
true
810b4fe37cee7ceb4a6ecdb50fb30f23c6661f58
JavaScript
mahdi-farnia/link-window
/src/actions/index.js
UTF-8
731
2.734375
3
[]
no_license
// Types Goes Here export const Action = { addToLibrary: 'ADD_TO_LIBRARY', removeFromLibrary: 'REMOVE_FROM_LIBRARY', renameLink: 'RENAME_LINK' }; /** * @param {{url: string, name: string, visited: 0, dateCreated: number}} newLink */ export function addToLibrary(newLink) { return { type: Actio...
true
c507c11b7e514858ee7d90475d5a86d48e0e9540
JavaScript
NaveiroGuido/udemipracticagit
/timers.js
UTF-8
1,131
2.90625
3
[]
no_license
window.addEventListener('load', function(){ function intervalo (){ var tiempo = setInterval(function() { console.log ("set Interval ejecutado"); var encabezado = document.querySelector("h1"); if(encabezado.style.fon...
true
01b86be505c6a0619c5bee69475eda27719cdec1
JavaScript
alexspirgel/web-components
/components/button-hamburger/src/scripts/script.js
UTF-8
4,175
3.171875
3
[]
no_license
// Import styles. import styles from '@component/src/styles/style.scss'; // Import template. import template from '@component/src/templates/template.html'; /** * Creates a new hamburger button. */ class WCLButtonHamburger extends HTMLElement { /** * Get the attributes object which specifies the attribute names ...
true
017b6301f17af531eabd5578890691357165755f
JavaScript
stewartduffy/fiveoclock
/src/lambda/locations.js
UTF-8
853
2.578125
3
[]
no_license
const sample = require("lodash/sample"); const getHtml = require("./utils/getHtml").default; const scrapeHtml = require("./utils/scrapeHtml").default; const processDates = require("./utils/processDates").default; const geoCode = require("./utils/geoCode").default; exports.handler = async () => { const html = await g...
true
a3f5811ac7aa210d53b28d421d553deca0369324
JavaScript
hongily25/chess
/src/utils/internal/_mergeObj.js
UTF-8
248
2.578125
3
[ "MIT" ]
permissive
import * as R from 'ramda' /** * Merge object * @param {Object} a * @param {Object} b * @return {Object} */ function _mergeObj (a, b) { // only allow 2 arguments return R.mergeWith(R.identity)(a, b) } export default R.curry(_mergeObj)
true
c401f0d1d17e26a033be5c94f0537d49c20e80d5
JavaScript
jenniferhuynhh/Honours-Project-2019
/sem2/web_server/ui/public/javascripts/messaging_module.js
UTF-8
3,562
2.875
3
[]
no_license
var MessagingModule = (function() { //Private var ftms_ui; var display; var messages; var message_sound; var sound_on; //Public return { initialise: function(ftms) { //Link FTMS UI system ftms_ui = ftms; //Create div for elements to sit in display = document.createElement("div"); display.clas...
true
1151ada6d2c1cbd634c11be8866250a05831cf91
JavaScript
nikiszafa/projektowanie-serwisow-www-21183-185ic
/Lab3/1-zadania/js/app.js
UTF-8
4,214
3.9375
4
[]
no_license
//Zadanie 1 // txt="aa"; // newTxt=""; // function zwracanie(txt){ // newTxt+="Liczba liter:" // for(let i=0;i<txt.length;i++){ // newTxt+="."; // } // return newTxt; // }; // console.info(zwracanie(txt)); //Zadanie 2 // let tab = [1, 2]; // function suma(tab) { // let suma = 0; // f...
true
f738d49b76cfe5563cde3e6b95d615657edffa33
JavaScript
TusherSUST/JavaScriptPrac
/Eloquent Javascript/EJ APlatformGameDrawer.js
UTF-8
2,532
2.890625
3
[]
no_license
var createElement = function ( name , className ) { var element = document.createElement( name ); if ( className ) element.className = className; return element; }; var DOMDisplay = function ( parent , level ){ this.wrap = parent.appendChild ( createElement( "div" , "game" ) ); this.level = level; this.wr...
true
42dd84b0033e48dbe40bae2bd848d3901a6a0de3
JavaScript
maltez/sourceit3
/Serhii_Fedorenko/homework_2/index.js
UTF-8
1,852
4.4375
4
[]
no_license
// considers the arithmetic average of five numbers function task_1(){ var i = 0, sum = 0, number = 0; while(i < 5){ number = (prompt("Enter the number")); // take 5 numbers i++; sum += Number(number); // sum 5 numbers } function average(){ var result = sum / 5; // average ...
true
f26f10ef0a3467940a9394ca3dda7f0a48ea3b08
JavaScript
farzd/BBCpageSpeed
/computations.js
UTF-8
1,031
2.59375
3
[]
no_license
var phantomas = require('phantomas'); module.exports.runTest = function runTest(url, sampleSize) { const url1Promise = Array.from(Array(sampleSize)).map(function(arr, index) { return phantomas(url, {'cache-control': 'max-age=-1', 'pragma': 'no-cache', 'expires': 0}); }); return new Promise(functio...
true
aa64fbfeabcbe395adb2d99e447983689334b195
JavaScript
srishti/chats-ui
/utils/helpers.mjs
UTF-8
967
3.359375
3
[]
no_license
/** * Function to get time formatted in local time zone * @param {Number} timeInMilliseconds - time in ms * @returns formatted time * Example: 23:10 */ export const getLocalTimeZoneFormattedTime = (timeInMilliseconds) => { return new Date(+timeInMilliseconds).toLocaleTimeString("en-US", { hour12: false, ...
true
2a6e1bbd5fcca1924064e4459056fc359b9cc523
JavaScript
ashwini709/YouTube-Chrome-PlayList
/js/search.js
UTF-8
2,088
2.515625
3
[]
no_license
var serResults = []; var resultState = "search" function searchClicked(){ $("#resultsDisp").html("") showWaitSearch({type:"searching"}) chrome.runtime.sendMessage({ type:"searchQuery", text:$("#inputSearch").val() }) } function hideWaitSearch(){ stopAnimation(); document.getElementById("loaderImage").style....
true
dc013a0f267904ce83145fd20d6e88294ff9955e
JavaScript
ms1752/indoor-asset-tracking
/code/libraries/pointInsidePolygon/pointInsidePolygon.js
UTF-8
537
2.875
3
[]
no_license
function pointInsidePolygon(x, y, polygon) { // ray-casting algorithm based on // http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html var inside = false; for (var i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { var xi = polygon[i].x, yi = polygon[i].y; v...
true
869ca5cfb29f4338b6a1e17a0f0e5ac012880b49
JavaScript
ddONGzaru/nodejs
/url.js
UTF-8
603
2.703125
3
[]
no_license
/** * Created by taewo_000 on 2014-05-01. */ var url = require('url'); var querystr = require('querystring'); var parseObj = url.parse('http://www.naver.com/abc?test=123&e=12'); var parseObj2 = url.parse('http://www.naver.com/abc/test/123'); console.log(parseObj); console.log('\n'); console.log(parseObj2); console...
true
30035728b9fadbc2c59f7791b386999ee275bdf9
JavaScript
magr0s/novaposhta-service
/src/libs/telegrambot.js
UTF-8
519
2.515625
3
[]
no_license
const axios = require('axios'); const dotenv = require('dotenv'); dotenv.config(); const TOKEN = process.env.TGBOT_TOKEN; const CHAT_ID = process.env.TGCHAT_ID; const API_URL = `https://api.telegram.org/bot${TOKEN}`; class TelegramBot { static async sendMessage (text = 'test message') { try { await axio...
true
fa129728200e653c99c7c1b54807122866c8ae8c
JavaScript
AlexanderArmua/tablaHeroesReactReduxWebpack
/React-Redux-Boilerplate/dev/js/reducers/index.js
UTF-8
633
2.703125
3
[]
no_license
// Aca se une todoslos reducers ya que el store es UN OBJETO enorme // Importo de redux para combinar import {combineReducers} from "redux"; // Como tiene export default toma lo unico que exporta import reducerUsuarios from "./reducerUsuarios"; import usuarioActivoReducer from "./reducerUsuarioActivo"; import reduc...
true
5917b528c8524f85493f7625cfc83f6b792a8134
JavaScript
dampce32/customerms
/customerms/WebRoot/js/common/cms-common.js
UTF-8
1,324
2.65625
3
[]
no_license
function addFavorite(url, title) { try { window.external.addFavorite(url, title); } catch (e){ try { window.sidebar.addPanel(title, url, ''); } catch (e) { alert("请按 Ctrl+D 键添加到收藏夹"); } } } function setHomepage(sURL) { if(navigator.userAgent.indexOf("MSIE")>0){ document.body.st...
true
bf38399fb652b1f10d2eaf99e3a6b5bc3418fe9e
JavaScript
GuillaumeRahbari/FXMachine
/FrontEnd/app/components/filters/filter-waveshaper/filter-waveshaper.js
UTF-8
4,807
2.828125
3
[]
no_license
'use strict'; /** * Created by guillaume on 03/02/2016. */ /** * @ngdoc component * @name frontEndApp.component:filterWaveshaper * @description * # filterWaveshaper */ angular.module('frontEndApp') .component('filterWaveshaper', { templateUrl: 'components/filters/filter-waveshaper/filter-waveshaper....
true
54567a8adaac71f8bfd203f25c6b21ee9ba07765
JavaScript
liwentao1118/clickGame
/src/index4.js
UTF-8
811
2.515625
3
[]
no_license
import React from 'react' import ReactDOM from 'react-dom' function Hello(props){ return <h2>Hello:{props.name}</h2> } class App extends React.Component{ render(){ return ( <div> <div> <h2>{this.props.name}</h2> <p>成员数量:{this.props.co...
true
5e78fd29abddc06aa03b48d64674caf7c5bbea94
JavaScript
squeegee-whiteboard/server
/models/user.js
UTF-8
1,303
2.703125
3
[ "MIT" ]
permissive
/* USER Represents a user Attributes: username: The name of the user email: The email the user uses to log in password: the user's password (hashed and salted) is_admin: whether or not the user is an admin Associations: owned_boards: Boards the user has created 1:N (User:Board) board_members: Boards the us...
true
156227326b21c66372100eca4707954c4443f268
JavaScript
dnfrolov/localz
/app/consume/create-order-input.js
UTF-8
1,329
2.8125
3
[]
no_license
'use strict' const Ajv = require('ajv') const ajv = new Ajv({coerceTypes: true, allErrors: true}) const ValidationError = require('./validation-error') module.exports = { createOrderInput } const schema = { type: 'object', properties: { orderId: { type: 'string', minLength: 1 }, custome...
true
6063b71682cacb50be6c02c89e49d709b85fc7c5
JavaScript
lbouweriks/colortoggler
/script.js
UTF-8
1,370
3.1875
3
[]
no_license
const hamburger = document.getElementById("hamburger"); const menu = document.getElementById("menu"); const mouseOvers = [hamburger, menu]; const colourText = document.getElementById("colourText"); const colours = document.getElementsByClassName("menu-item"); const colorList = ["Gray", "Red", "Orange", "Purple", "Green...
true
592e00491023a5a97daacc4ef80d0639e54c43b6
JavaScript
hakimhassani97/CoronaSimulator
/main.js
UTF-8
5,071
2.984375
3
[]
no_license
/** * * @author hakimhassani97 * https://github.com/hakimhassani97/CoronaSimulator */ let population // the population var maxPopulation = 500 // maximum number of persons var sickPopulationPercentage = 1 // percentage of sick persons var personsSpeed = 1 // person's speed var personsRadius = 4 // person's radius...
true
cc41f99a52b7cbbb9c133cbf1732000c14cda36a
JavaScript
michalzelewski/NODEwpg
/JAVASCRIPT/index150.js
UTF-8
557
4.375
4
[ "MIT" ]
permissive
/*Define a deepThought variable and assign a literal object with the following properties: property: name, value: Deep Thought property: answerToTheUltimateQuestionOfLife, value: assign a function The answerToTheUltimateQuestionOfLife method will show 42 as output Call the deepThought answerToTheUltimateQuestio...
true
33f6bd90679a34a16570879099243d9d7fae7a41
JavaScript
GRy82/test-demoRepo
/tests/exercise1.test.js
UTF-8
1,221
3.34375
3
[]
no_license
const exercise1 = require('../exercise1'); describe('fizzBuzz', () => { it('should throw exception if given invalid input', () => { expect(() => { exercise1.fizzBuzz('a') }).toThrow(); expect(() => { exercise1.fizzBuzz(null) }).toThrow(); expect(() => { exercise1.fizzBuzz(undefined) }).toTh...
true
bc06c0a08659bfbafd0c6a2f15aa8b2c5b8a8b9a
JavaScript
jollytoad/jquery.color
/src/color.object.js
UTF-8
4,515
2.734375
3
[]
no_license
/* * jQuery Colour Object @VERSION * * Copyright (c) 2009 Adaptavist.com * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * Depends: * color.core.js * color.rgb.js */ (jQuery.color && jQuery.Color || (function($) { // Construct a colour object of a given space (eg. 'R...
true
972c4bbd1bd13829d12d1c2c5a171295bc6e927e
JavaScript
waxs/needle
/test/util/convertDate.test.js
UTF-8
539
2.9375
3
[ "MIT" ]
permissive
/** ---------------------------------------- Utility ---------------------------------------- */ import convertDate from '@util/_convertDate'; /** ---------------------------------------- Test convertDate() ---------------------------------------- */ describe('Using convertDate() utility for converting a...
true
b13569005fbc976398e796a63286c560c24572ec
JavaScript
euzebiosantanawork/logica
/class01.js
UTF-8
1,002
2.609375
3
[]
no_license
var rs = require('readline-sync'); var car1 = {}; var car2 = {}; class Car{ constructor(name, model, color){ this.name = name this.model = model this.color = color } } var car1 = new Car (rs.question("Type a name: "), rs.question ("Type a model: "), rs.question("Type a color: ")); va...
true
a679f4ace62b7e4130275517bb0d1f9ade256e30
JavaScript
pm-ferrand-eynard/Converter
/src/components/App/index.js
UTF-8
6,269
2.703125
3
[]
no_license
/* eslint-disable arrow-body-style */ /* eslint-disable class-methods-use-this */ /* eslint-disable react/no-access-state-in-setstate */ /* eslint-disable react/destructuring-assignment */ /* eslint-disable react/no-unused-state */ import React from 'react'; import Header from 'src/components/Header'; import Currencie...
true
21518b58a1ce1d15aecd4c3874ae25f94d8185fd
JavaScript
Curious-Nikhil/Flappy-Bird
/bird.js
UTF-8
159
2.984375
3
[]
no_license
function Bird() { this.x = width / 2; this.y = height / 2; this.show = function () { fill(255); ellipse(this.x, this.y, 16, 16); } }
true
8164985a3025c4e362fbcef11bc8fb21494e2391
JavaScript
elenamarinaki/Code_Challenges---JavaScript
/FAC_challenges/reverse_3rd.js
UTF-8
935
4.46875
4
[]
no_license
// Reverse every third word in a given string, then return the string. Throw away any leading or trailing whitespace, while ensuring there is exactly one space between each word. Punctuation marks should be treated as if they are a part of the word in this kata. function reverseWords(string){ const words = string....
true
faf5d258590c8c44d9dfad36e128b12ce74fd1f1
JavaScript
sebasjicha10/flack
/static/script/signin.js
UTF-8
1,053
3.15625
3
[]
no_license
document.addEventListener("DOMContentLoaded", () => { // Make sure the user didn't previously sign in if (localStorage.getItem("username")) window.location.href = "/" // Handle Name Validation (Must be between 1 and 25 chars) const signInButton = document.querySelector("#singinSubmitButto...
true
320501dae2c8e91269ebcecd0b4c652ecdc0343f
JavaScript
denny99/react-jsf
/src/jsf/util/ObjectTraverser.js
UTF-8
1,357
3.546875
4
[]
no_license
export default class ObjectTraverser { /** * search for a property in an object and return value * @param {object} object * @param {string} property e.g. test.x.y * @param {object} [value] value passed object if property not found */ static traverse(object, property, value) { /** * move down...
true
9a7a9fa915125c4bf8c4a744847e5e966a462720
JavaScript
jtempkins/ConstructorWordGuess
/index.js
UTF-8
1,317
3.390625
3
[]
no_license
var wordToGuess = ["Tuna", "Sardines", "Cod", "Bluefish"]; var index = Math.floor(Math.random() * wordToGuess.length); var wordSelected = wordToGuess[index]; var word= require ("./word.js"); var gameWord = new word (wordSelected); var inquirer = require ("inquirer"); // console.log("how to play the game info"); g...
true
8a0916ffe1f43c82213f02b80a18e4bae3b3bd60
JavaScript
farshid594/panelvistaac
/src/screens/indexdb/index.js
UTF-8
1,333
2.78125
3
[]
no_license
import React from 'react' import Dexie from 'dexie' var db = new Dexie('hellodb') db.version(1).stores({ tasks: '++id,date,description,done' }) async function test() { var id = await db.tasks.put({ date: Date.now(), description: 'Test Dexie', done: 0 }) console.log("Got id " + id) // Now lets add a bu...
true
32915eef85d19b20b0eec6195319b0bcea196193
JavaScript
bcgov/range-web
/src/actionCreators/schema.js
UTF-8
2,671
2.71875
3
[ "Apache-2.0", "CC-BY-4.0" ]
permissive
/** * This file contains the schema needed for data normalization by using the normalizr (https://github.com/paularmstrong/normalizr) library. * Data that goes into Redux should normalized for a few reasons: * * 1. Prevent deeply nested data: since mutations to the Redux state is not permitted, maintaining a flatte...
true
ada54bc3b3c0d7509a659db50cc6fbf7a5988059
JavaScript
fmaymone/bolao-frontend
/src/store/functions/general.js
UTF-8
8,118
2.515625
3
[ "MIT" ]
permissive
import { ROUND_16, ROUND_8, ROUND_4, ROUND_FINALS, ROUND_3x4, FINAL_RESULT, TOP_SCORER, } from "../actions/types"; export const calculatePoints = (userMatches, outcomeMatches, status) => { let structuredReturn = { totalPoints: 0, pointsOfMatches: {}, ROUND_16: {}, ROUND_8: {}, ROUND...
true
b53a02616e28476311fb14bc467107864b49a7e7
JavaScript
russjohnson09/flashcards
/bullets/templates/bullets/bullets.js
UTF-8
6,810
2.546875
3
[]
no_license
/*global $, jQuery*/ var c; var b = 'rgb(0,0,0)'; var w = 'rgb(255,255,255)'; var frame = 0; var WIDTH = 500; var HEIGHT = 550; var p = { "lives" : 100, "speed" : 10, "x" : 240, "y" : 440, "r" : 10, "bullet_spawn" : 10, "last_spawn" : 0 }; var bulletpros = []; var pbul...
true
6cc9b921996f7e5d2d48c26cc652ecdba88b164d
JavaScript
Travo100/handlebars-extended-session-may-2019
/config/orm.js
UTF-8
983
2.78125
3
[]
no_license
const connection = require("./connection.js"); const orm = { findAll: function(table, cb) { connection.query("SELECT * FROM ??", [table], (err, data) => { if(err) throw err; cb(data); }); }, insertOne: function(table, itemToInsert, cb) { connection.query("INS...
true
8cca43b132eba1e81482207bb209cdec3e24cdec
JavaScript
ZMIRKV/modal-module
/src/modal.js
UTF-8
4,783
2.78125
3
[ "MIT" ]
permissive
'use strict'; var ElementKit = require('element-kit'); var utils = ElementKit.utils; var Module = require('module.js'); var Promise = require('promise'); /** * Modal. * @constructor Modal * @param options * @param {HTMLElement} options.containerEl - The element that should be used as the modal's container * @para...
true
8f13ef43a1b4264b6bf117f6b3fbb035c921d255
JavaScript
popok75/IOktopus
/localdata/bundler/importExample/test22.js
UTF-8
1,427
2.96875
3
[]
no_license
/* export function mod22(x, y) { return x+y; };*/ import * as module22 from './module22.js'; //let module = await import( './module22.js'); /* if(typeof(mod22)=="undefined") { import('./module22.js') .then((module) => { // Faire quelque chose avec le module console.log(module.mod22(1,2)); for(var ...
true
23a5fcb373249e0f95a54a09154a6f71d90c0145
JavaScript
mperez83/Discord-Bot-BBill
/javascript/commands/magik_commands/singe.js
UTF-8
4,109
2.734375
3
[]
no_license
const fs = require("fs"); const gm = require("gm"); const rp = require("request-promise"); const genUtils = require('../../command_utilities/general_utilities'); const magikUtils = require('../../command_utilities/magik_utilities'); const config = require("../../../data/general_data/config.json"); const maxFileSize =...
true
5beaac29000e7c11406cab80d4d42681bb5b1481
JavaScript
ROC-van-Amsterdam-College-Amstelland/fe-op3-les3-conditions-loops-BruceAmende
/loops_opdrachten/loops_opdracht_10/js/script.js
UTF-8
150
3.515625
4
[]
no_license
//javascript code var abc = ["A" , "B" , "C" , "D" , "E"]; for (var teller = 0; teller < 5; teller++){ console.log( abc [teller]); }
true
c1c0c725077a4bc546cdc81a790d5348d6ad0067
JavaScript
alexdelvalle/project3-express
/routes/user-api-router.js
UTF-8
3,627
2.578125
3
[]
no_license
const express = require('express'); const bcrypt = require('bcrypt'); const User = require('../models/user-model'); const router = express.Router(); // POST /api/signup router.post('/new-signup', (req, res, next) => { if (req.body.password === undefined || req.body.password.length < 4 || req.body...
true
351a14ad289cc1b88955a6ef2ebfabf662823eae
JavaScript
Snar01/render-code
/commands/ticket.js
UTF-8
3,044
2.71875
3
[ "MIT" ]
permissive
/*const Discord = require('discord.js') exports.run = (client, message, args) =>{ const user = message.author.id; const name = "ticket-" + user; if(message.guild.channels.cache.find(ch => ch.name == name)){ const eb = new Discord.MessageEmbed() .setTitle(`${message.author} você já abriu u...
true
fbf2b5d41344435cfcb53cc4ed1eb046715dcfff
JavaScript
Vitao18/random-quote-machine
/scripts.js
UTF-8
1,256
3.484375
3
[]
no_license
var quoteList = ["I am coming more and more to the conviction that the necessity of our geometry cannot be demonstrated, at least neither by, nor for, the human intellect.", "God does arithmetic", "Madam, I have come from a country where people are hanged if they talk.", "We build too many walls and not enough brid...
true
21add2f6692ee431659d4161e66e8e8fd6a24773
JavaScript
15caloke/capstoneProject
/ueServer/filtering/testing_filtering.js
UTF-8
2,066
2.671875
3
[]
no_license
const filterfunctions = require('./filtering_function'); // Single JSON Object var testJsonObj1 = { "_id": "5b66f", "Asset": "111", "SerialNumber": "222", "AssetModelId": 333, "AssetID": 123, "LocationID": 234, "OperatingEnvironmentId": 999, "...
true
a7e441322357deb7e116509442c40c4f8196a57c
JavaScript
hanwiz/jade-brackets
/node/JadeDomain.js
UTF-8
1,900
2.5625
3
[ "MIT" ]
permissive
(function () { "use strict"; var jade = require("jade"); var fs = require("fs"); var path = require("path"); var JI = require('jade-inheritance'); function render(filepath, cwd, basename) { var html = jade.renderFile(filepath, { pretty: true }); var outputFileName = path.jo...
true
fc7062edb21966cb42a770357a44c473ae2ca6f0
JavaScript
dev-chloe/hangout-react200
/client/src/Context/R077_ContextApi.js
UTF-8
1,142
2.640625
3
[]
no_license
import React from 'react'; import Children from './contextChildrenfor77'; const { Provider, Consumer } = React.createContext(); export { Consumer } class R077_ContextApi extends React.Component { constructor (props) { super(props); this.setStateFunc = this.setStateFunc.bind(this); } // props는 데이터가 부모에서 ...
true
fc2c89f2e7b94b4bed16fa603929440020432591
JavaScript
NicholasEric/jrpg
/public/javascript/classes/player/Stamina.js
UTF-8
1,275
3.0625
3
[]
no_license
class StaminaContainer extends Phaser.GameObjects.Container { constructor(scene, x, y, key, stamina) { super(scene, x ,y); this.x = x; this.y = y; this.stamina = stamina; this.maxStamina = 300; this.key = key; this.setSize(100,100); this.scene.add.existing(this); this.c...
true
e2bc754d31415c962216a4a37ce1269fabb96d56
JavaScript
stormpython/d3-cluster
/src/utils.js
UTF-8
1,341
3.21875
3
[ "MIT" ]
permissive
function isArray(o) { return Array.isArray(o); } function isPlainObject(o) { return !isArray(o) && typeof o === 'object'; } function isEqualArray(target, source) { return target.every(function (o, i) { if (isPlainObject(o)) { return isEqualObject(o, source[i]); } if (isArray(o)) { return...
true
87f39e101eceb129d84f1c6bdaeb383bc70fe9a7
JavaScript
Adaymesa/bowling-challenge
/src/game.js
UTF-8
797
3.390625
3
[ "MIT" ]
permissive
function Game () { this.gameScores = [] this.score = 0 this.currentFrame = new Frame (this) this.strike = false } Game.prototype.updateScore = function (frame) { if (this.strike === true) { this.strikeBonus(frame) } else if (this.spare === true) { this.spareBonus(frame) } else { this.score +=...
true
12c6742f8b92bcf9863333b9ba5a65f1633528dd
JavaScript
sunset375/CodingDojo-1
/MERN/MERN_demos/w3/d2/findByIdAndUpdate.js
UTF-8
2,105
3.5
4
[]
no_license
/* Given an id, an object that has keys with corresponding updated values, and an array of objects Find the object by "id" key that matches the given id value and then update that object's keys with the provided new values. Return the updated object, or null if no object was found */ const { testDriver } = ...
true
e4a1b3cfcc37b3cd0e71c7448d4b473f6a83d3f7
JavaScript
jb1b84/fit-track
/src/Fitbit/Api.js
UTF-8
701
2.578125
3
[]
no_license
import axios from 'axios/index'; export default class Api { constructor() { this.baseUri = 'https://api.fitbit.com/1/user/'; this.makeRequest = this.makeRequest.bind(this); this.onError = this.onError.bind(this); } makeRequest(user, endpoint, accessToken, callback) { const headers = {'Authoriz...
true
8350eaae21f87bb54bfb51d0239885b8716e576e
JavaScript
michalbie/FPS
/Client/src/components/Camera.js
UTF-8
641
2.625
3
[]
no_license
import { PerspectiveCamera, Vector3 } from "three"; export default class Camera { constructor(renderer) { const width = renderer.domElement.width; const height = renderer.domElement.height; this.threeCamera = new PerspectiveCamera(45, 16 / 9, 0.1, 10000); // this.threeCamera.position.set(245, 50, 249); // ...
true
647f532445cdb2863abd8e66b8925b008e9f5c79
JavaScript
witekbobrowski/Academic
/databases-winter-2016/app/renderer-process/equipment.js
UTF-8
957
2.59375
3
[ "MIT" ]
permissive
let getConnection = require('./login'); function appendEquipmentList() { getConnection((err, connection) => { if (err) console.log('no connection'); connection.query('SELECT * FROM equipment', (error, rows, fields) => { if (error) throw error; let output = []; fo...
true
3f379e0fd850129203ebc211f357d4eed54143de
JavaScript
pattiechen/des157-g
/studio1/script.js
UTF-8
1,180
3.03125
3
[]
no_license
'use strict'; console.log ('reading.js'); document.querySelector('#s').addEventListener('click', processForm); document.querySelector('#r').addEventListener('click', resetForm); function processForm(evt) { var cupcone = document.querySelector('#cupcone').value; console.log('cupcone: '+ cupcone); var flavor = docum...
true
0afbc99d2ecf7978648dc3c0fc4cde799be5c6a2
JavaScript
chambber/px-bank
/src/scripts/home.js
UTF-8
3,171
3.109375
3
[]
no_license
var colors = ["#bacb2f", "#FFF"]; var Particle = function (x, y) { this.alive = true; this.radius = Math.random() * 20; this.drag = Math.random(); this.theta = Math.random() * (2 * Math.PI); this.wander = 0.1; this.color = colors[Math.floor(Math.random() * colors.length)]; this.opacity = 0; this.op...
true