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
c9af0cd49c91400b9fefcdfe7ef389170df32d38
JavaScript
superchu/styled-ssr
/lib/inlineStyles.js
UTF-8
356
2.9375
3
[]
no_license
/** * Turn CSSRules into inline-styles if the selector match * a given node. */ const inlineStyles = (node, lookup) => { const styles = []; lookup.forEach((value, key) => { if (node.matches(key)) { styles.push(value); } }); if (styles.length) { node.setAttribute('style', styles.join()); ...
true
7209abe616b934b3b1b2d30d9543e838b5773567
JavaScript
kylebigelow/DW-Workspace
/app.js
UTF-8
782
2.5625
3
[]
no_license
const express = require('express'); const app = express(); app.set("view engine", "pug"); app.get('/', function(req, res, next){ //build all things above send. you can only use send once console.log("YO wabba wabba"); console.warn("This is kinda bad"); console.error("What does this do?"); res.rende...
true
92c18391a44f48c9d0c699645ffe91bbe044f79d
JavaScript
scmkinney/p5-conditionals
/sketch.js
UTF-8
505
3.234375
3
[]
no_license
var x = 0; var y = 0; var speed = 3; function setup(){ createCanvas(600,400); } function draw(){ background(50); if(mouseIsPressed){ background(255,0,200); } stroke(255); strokeWeight(6) if(mouseY<150){ fill(0,255,0); } else{ noFill(); } ...
true
7d659adb1c7167abdcda34f0d296c51e1963c131
JavaScript
carlacou/Calculadora.js
/calculadora.js
UTF-8
1,459
3.390625
3
[]
no_license
// Dados do anunciante const nomeAnuncio1 = ("Liquida Inverno"); const nomeCliente1 = ("Be One Fashion"); // data início e término da campnaha let dtInicio = new Date('2021,7,10' ); let dtTermino = new Date('2021,8,10'); let difference= Math.abs(dtTermino-dtInicio); let totalDias = difference/(1000 * ...
true
df477bd09e6d723fa871259c95f70331599d8949
JavaScript
codetitan27/signup-form
/script.js
UTF-8
1,659
3.453125
3
[]
no_license
/* let btn = document.querySelector('#loginform'); let hide =document.querySelector("#btn"); let show = document.querySelector("#btn2"); hide.addEventListener('click',function() { btn.style.display="none"; }) show.addEventListener('click',function() { btn.style.display="inline"; }) let salary =prompt("plea...
true
a5caf68d2a07a51050facc52e3e309edef4ad9c9
JavaScript
vegardinho/curlingprosjekt
/Nettside/js/scroll.js
UTF-8
481
3
3
[]
no_license
var opp = document.getElementById("lengst-oppe"); var ned = document.getElementById("litt-lengre-ned"); function at_top() { ned.classList.remove("active"); opp.classList.add("active"); } function at_lengerned() { opp.classList.remove("active"); ned.classList.add("active"); } var bilde = document.getEle...
true
8b83a8ee807c92090aa46b29745c02e30eae0a0c
JavaScript
jimgitonga/movieapp
/src/components/detail/Detail.js
UTF-8
1,326
2.6875
3
[]
no_license
import { useEffect, useState } from "react"; function Detail(props) { const { movie, onDetailClosed } = props; const [des,setDes]=useState([]); useEffect(()=>{ const description= async()=>{ const url = `http://www.omdbapi.com/?i=${movie.imdbID}&apikey=263d22d8`; const response = await fetch(url...
true
11ee3e5d542a50db7e51945d3fd06609fc946d91
JavaScript
Maya2408/Swerve-the-Foe
/sketch.js
UTF-8
3,070
3.125
3
[]
no_license
var airoplane, plane, dragon1, dragon1Img, dragon2, dragon2Img; var lightning, lightningImg; var sky; var enemyGroup; var dragon; var restart, restartImg; var explosion, explosionImg, fire, fireImg; var thunderSound; var PLAY = 1; var END = 0; var gameState =PLAY; function preload(){ plane = loadI...
true
bd48f90a6eeaeec5dc6acc46d17e025143218ee0
JavaScript
roseviet/JavaScript-programming
/3. FreeCodeCamp, HackerRank, JS30/FreeCodeCamp/01. Javascript Basics/55. Understanding boolean values.js
UTF-8
478
4.25
4
[ "MIT" ]
permissive
// Basic JavaScript: Understanding Boolean Values // Note // Boolean values are never written with quotes. The strings "true" and "false" are not Boolean and have no special meaning in JavaScript. // Modify the welcomeToBooleans function so that it returns true instead of false when the run button is clicked. fun...
true
53eb15bf2f02de285fea5ee70efed8570357706e
JavaScript
rodoviario/waterbear
/scripts/persistence.js
UTF-8
1,803
2.609375
3
[ "LicenseRef-scancode-warranty-disclaimer", "CC-BY-3.0", "Apache-2.0" ]
permissive
(function(wb){ 'use strict'; // Persist IDE state to localStorage var defaults = { autorun: false, scriptModified: true, isRunning: false, fullsize: false, ready: false, ideReady: false, stageReady: false, scriptReady: false, mobile: ...
true
8ab9c63c6f30656ec9351e3a3363246e0246980e
JavaScript
asztell/GifTastic
/assets/javascript/app.js
UTF-8
1,789
2.84375
3
[]
no_license
var topics_array = ['']; $('#add_topic').on('click', function() { var topic_name = $('#topic').val().trim(); for(var i = 0; i < topics_array.length; i++) { if(topics_array[i] == topic_name) { return false; } } $('<button>').attr({id: topic_name}) .addClass('topic btn btn-default') .html(topi...
true
8cb3472e6f5e84c9dcc1c634fa83263ab7758bc4
JavaScript
jnmiller/paper-snowflake
/papersnowflake.js
UTF-8
2,364
3.1875
3
[]
no_license
var canvas = document.getElementById("snowflakeCanvas"); var ctx = canvas.getContext("2d"); var w = canvas.width; var h = canvas.height; var c = [w/2, h/2]; var r = Math.min(w,h) var m = r/20; function drawBackground() { // folded triangle for reference ctx.strokeStyle = "#DDD"; ctx.beginPath(); ctx.fillStyle = "#...
true
cbdbc2fdc9581d198ea4767cb7f5bc07661995f4
JavaScript
TeachCenter/TeachCenter
/web1.0/ueditor/net/upload/file/20171116/6364646012957610766131909/js/personal-center-creatProgect.js
UTF-8
3,934
2.515625
3
[ "MIT" ]
permissive
var w = $(window).width(); if ($(window).width() > 1200) { w = $(window).width(); } else { w = 1200; } $(".name").css({ "width": w - 600 }) $(".content").css({"width":w-600}) $(".submit").css({"width":w-444}) $(window).resize(function(){ w = $(window).width(); if ($(window).width() > 1200) { w =...
true
a6a375e2f892bb3cc10ddabac0d4e127f75cc327
JavaScript
ChuanChuanSu/IFE
/YAOYAO/horizon2.0/script.js
UTF-8
3,566
2.90625
3
[]
no_license
/** * Created by Su Chuan on 2017/7/12. */ let float = document.getElementsByClassName("float")[0]; let button = document.getElementsByTagName("button"); let size = document.getElementById("size"); function disappear(){ float.style.display = "none"; blo.initialize(); } function appear(){ fl...
true
3e5189047f597c9a1f678629c2f6e09faa427f00
JavaScript
YienfongChueng/little-demo
/统一挂号平台-v2/js/ui.js
UTF-8
8,275
2.59375
3
[]
no_license
//ui-search定义 $.fn.UiSearch = function() { var ui = $(this); $('.ui-search-selected',ui).on('click',function(){ $('.ui-search-select-list').show(); return false; //防止冒泡事件 }); $('.ui-search-select-list a',ui).on('click',function(){ $('.ui-search-selected').text($(this).text()); ...
true
0739c10c443e1be4c7e3a857cbedd2e2f49c4da0
JavaScript
dnshi/Leetcode
/algorithms/RotateString.js
UTF-8
944
4.0625
4
[ "MIT" ]
permissive
// Source : https://leetcode.com/problems/rotate-string // Author : Dean Shi // Date : 2018-03-27 /*************************************************************************************** * We are given two strings, A and B. * * A shift on A consists of taking string A and moving the leftmost character to the * r...
true
ea110fd66050f557d2e903dd10cf2403f2c3c38c
JavaScript
prakash2000/EventApp
/App/controllers/EventCtrl.js
UTF-8
4,615
2.53125
3
[]
no_license
var saveController=["$scope", "eventService","$timeout", function ($scope, eventService,$timeout) { var messageTimer = false; $scope.save = function (event) { if ($scope.NewEventForm.$valid) { var localDate= $scope.event.date; var monthName=new Array("Jan","Feb","M...
true
beea28a81d9c6212aaf2a086cfc99831ebadeed4
JavaScript
TinSlim/Tareas-Aplicaciones-Web
/T2/js/validacion.js
UTF-8
9,029
2.96875
3
[]
no_license
var meses_31_dias = ["01","03","05","07","08","10","12"]; var meses_30_dias = ["02","04","06","09","11"]; var corregir_mensaje = ""; function valida_region(id_region){ var region = document.getElementById(id_region); var region_actual = region.value; if (region_actual == '' || region_actual == -1){ ...
true
e7c81d3a4ff03ac85b7691c59c0eaaf91f246ec6
JavaScript
jchinchin/INST377-Lab-Work
/client/lab_6/script.js
UTF-8
2,215
2.90625
3
[]
no_license
async function windowActions() { const endpoint = 'https://data.princegeorgescountymd.gov/resource/umjn-t2iz.json'; const request = await fetch(endpoint); const results = await request.json(); function findMatches(wordToMatch, search) { return search.filter((place) => { const regex = new RegExp(wor...
true
0ccc069e5fe81b57b93941d0c13794528ee30863
JavaScript
zhenpanda/codewars
/js/codewar_rand.js
UTF-8
18,236
4.1875
4
[]
no_license
/* function validateSequence(x) { if(x.length > 2) { //check array has minimum of 3 numbers in it console.log("array of x is " + x.length); // check each number and the number before it for a repeatin pattern var pattern = null; for (var n = 0; n < x.length; n++) { console.log("this is the nu...
true
b5f2d397d679e33b29f6f83aa73704a6c74d3228
JavaScript
ros-champion/ts-static-types
/lessons/11-rest-and-spread-types/src/index.js
UTF-8
1,688
2.6875
3
[]
no_license
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } r...
true
e800c201f1e8e7571f5522eb9585b7a2ce86c379
JavaScript
OldNero/JS-sheet
/JS-Practice/listConcat.js
UTF-8
391
3.875
4
[]
no_license
"use strict"; // Write a function that concatenates two lists. // [a,b,c], [1,2,3] → [a,b,c,1,2,3] const myList = [1,2,3], myList_2 = [4,5,6]; let sum_arr = []; function concat( arr, arr2 ) { sum_arr = arr; for (let i = 0; i < arr2.length; i++) { sum_arr.push(arr2[i]); } ret...
true
b397083cc95fc04078ccbc949ea9b44f297b0633
JavaScript
jirrian/anime_filter
/sketch.js
UTF-8
5,786
2.953125
3
[]
no_license
// Copyright (c) 2018 ml5 // // This software is released under the MIT License. // https://opensource.org/licenses/MIT /* === ml5 Example Style Transfer Image Example using p5.js This uses a pre-trained model of The Great Wave off Kanagawa and Udnie (Young American Girl, The Dance) === */ let inputImg; let style1; ...
true
50726ecfbb36bfa38d106448a28bc91718ef93bf
JavaScript
virtualtakagi/YoutubeLiveScheduler
/js/background.js
UTF-8
1,556
2.578125
3
[]
no_license
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) { var notifTime = new Array(); chrome.alarms.create(request.text, { "periodInMinutes": 1 }); console.log("created alarm: " + request.text); chrome.alarms.onAlarm.addListener(function (alarm) { var infoArray = alarm.name.split(","); va...
true
ec33f7139b0419d684125c68e510b46f00bdd310
JavaScript
himanshu2454/JavaScriptPage
/index.js
UTF-8
1,022
3.015625
3
[]
no_license
function btnfunc(){ //console.log("1"); let email = document.getElementById("exampleInputEmail1").value; let pass = document.getElementById("exampleInputPassword1").value; // console.log("2"); if( email == 'rajputshubham@gmail.com' && pass == 'asdf'){ //alert("cooming"); window.open(...
true
ceb3f34c029d70e8803e140d51d63301f51bd528
JavaScript
troyyxk/devflow
/devflow_backend/routes/auth.js
UTF-8
4,629
2.5625
3
[ "MIT" ]
permissive
const express = require("express"); const router = express.Router(); const app = express(); const { Member } = require("../models/Member"); const { Company } = require("../models/Company"); const { nanoid } = require('nanoid') var cors = require("cors"); require('isomorphic-fetch'); // localhost:5000/auth...
true
9c3157336bad143da0a6b139d948741854ff2259
JavaScript
gwjeondev/data_structure_algorithm
/algorithm/뜨거운감자게임.js
UTF-8
319
3.78125
4
[]
no_license
const list = ['A','B','C','D','E']; const repetition = prompt('게임 횟수를 입력하세요'); while(list.length > 1) { for(let i=0;i<repetition;i++) { list.push(list.shift()); } const lose = list.shift(); console.log(`탈락자는 ${lose}`); } console.log(`최종 승자는 ${list[0]}`);
true
cf908dbc29ecde8020f6ea58a2a4203dc9042d08
JavaScript
uxrocket/uxrocket.utils
/test/spec/utilsSpec.js
UTF-8
22,034
2.8125
3
[ "MIT" ]
permissive
/* global __:true */ var root = this; describe('UXRocket Utils', function(){ 'use strict'; // ### STRUCTURAL // __.noConflict describe('__.noConflict', function(){ it('should free the original assignment', function(){ var backup = __, utils = __.noConflict(); ...
true
65a54fd446b9a5e5e1ff66cbb4cc17f2cddeb3d9
JavaScript
dapianzi/leetcode
/701-800/N-718/answer.js
UTF-8
2,828
2.953125
3
[]
no_license
/** * @param {number[]} A * @param {number[]} B * @return {number} */ var findLength = function(A, B) { let ans = 0; //1.dynamic program // let dp = Array.from(new Array(A.length+1), ()=>{return new Array(B.length+1).fill(0)}) // for (let i=A.length-1; i>=0; i--) { // for (let j=B.length-1; ...
true
789622e13ccb0a197d88ff5d4a9c2583a336de93
JavaScript
thiscatiskool/triviagame
/assets/javascript/app.js
UTF-8
3,623
3.328125
3
[]
no_license
const questions = [ { question: "How is steak cooked the best?", answers: { a: "rare", b: "meduim rare", c: "meduim", d: "meduim well", }, correctAnswer: "b" }, { question: "What is my favorite seafood?", answers: { a: "fish"...
true
8d84539e83e469437f403dc9bc84ea4c6173b737
JavaScript
edwincorea/intermediate-js
/playground/index-03-prototype.js
UTF-8
10,566
4.59375
5
[]
no_license
// --------------------- // Example 1 //"Traditional" way of creating an object // var person = { // name: "Edwin", // sayHi: function() { // console.log("Hi, my name is " + this.name); // } // } // person.sayHi(); //Abstract the whole idea of creating objects through a function name(params) //F...
true
fefa4da1a02d7aac9a54b4960839a47c152396cf
JavaScript
cs-memphis-code-201d2/201d2-classes
/class-08/lecture/code/main.js
UTF-8
10,199
3.75
4
[]
no_license
// add some sanity // alert("JS linked!"); // no need no more // we need a generic random function customized to our needs. so we can pass in the data we have // we need a random number of customers within range of data we were given function getRandomNumberOfCustomersGivenARange(minCustomers, maxCustomers) { ret...
true
17cf13aee49bd627c99d6d44ed1644f9ae0f501e
JavaScript
jeantil/xstaffing-mobile
/public/js/main.js
UTF-8
2,752
2.796875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
var Clients = (function () { var Clients = { clients:[ {name:"SG", position:{lat:48.8920, lng:2.2315}}, {name:"EGencia", position:{lat:48.8892, lng:2.2404}}, {name:"VSC", position:{lat:48.8915, lng:2.2411}}, {name:"Xebia", position:{lat:48.8753, lng:2.3112}}, ...
true
51ed2b558e69ad701d975d1fb467d8adedc9a1f1
JavaScript
mkaemmerer/spaceduel
/app/scripts/ship.js
UTF-8
3,742
2.671875
3
[]
no_license
(function(){ 'use strict'; //Imports: var Bacon = require('baconjs') , P2 = require('./core/vector').P2 , __ = require('./core/math') , Sprite = require('./graphics/sprite').Sprite , Laser = require('./laser') , LaserAudio = Laser.LaserAudio , LaserDisplay = Laser.LaserD...
true
c3b87e2c722f5dd547209959b5aa059ebacc6676
JavaScript
Nardos-L/MERN-Deployment
/client/src/views/EditPet.js
UTF-8
5,636
2.625
3
[]
no_license
import React, { useEffect, useState } from "react"; import { navigate } from "@reach/router"; import axios from "axios"; import { Link } from "@reach/router"; const EditPet = (props) => { const [name, setName] = useState(""); const [type, setType] = useState(""); const [desc, setDesc] = useState(""); c...
true
cd663a0433ab533060cf1fc6555e88df1078c913
JavaScript
JamesFoxChen/CodeLibrary
/CodeLibrary/01_Presentation/CL.Web.Background/Scripts/Utility.js
UTF-8
10,859
2.546875
3
[ "MIT" ]
permissive
window.Utility = window.Utility || {}; window.Utility.Controls = window.Utility.Controls || {}; (function (ns) { // 函数名称: registerNameSpace // 函数功能: 注册命名空间 // 函数参数: nameSpace 命名空间: a.b.c // 返 回 值: 无 // 创 建 人: // 创建日期: 2014-02-22 21:01:54 ns.registerNameSpace = function (nameSpace) { ...
true
36521f5ac376fed46d2e54a9e50331a7a17658f3
JavaScript
iamabhi898/googleTasksCloneRN
/screens/Home.js
UTF-8
8,150
2.515625
3
[]
no_license
import React from 'react'; import { StyleSheet, View, Text, TouchableOpacity, KeyboardAvoidingView, Platform, TextInput, ScrollView, Dimensions, } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialIcons'; import AsyncStorage from '@react-native-async-storage/async-storage'; imp...
true
5d9a80951dd36a2a62289efb74dd842cdbacf5b1
JavaScript
Aakashdeveloper/July_JavaScript_Eveng
/twentyone.js
UTF-8
1,800
3.640625
4
[]
no_license
>literal > constructor var moviename ="avengers" var movierating = 4.5 var movieLang = "eng" //////////////////////////////////////// var movies ={ name:'Avengers', rating:4.5, lang:'eng' } undefined typeof(movies) "object" movies.name "Avengers" movies.rating 4.5 movies.genre="Action" "Action" movies {na...
true
7b46335de059a543d139556f50e9bc39a3d2b9e9
JavaScript
ivanberry/chatroom
/doc/exprss/photo/routes/photo.js
UTF-8
961
2.53125
3
[ "MIT" ]
permissive
const Photo = require('../models/Photo'); const fs = require('fs'); /** * handle post request * save files as file * redirect to upload index * show all images */ exports.form = (req, res) => { res.render('photos/upload', { title: 'Upload' }); }; exports.list = (req, res, next) => { Photo.find({}, (err, ph...
true
e8c271811f94eff673691b221f9b0c138e9839e9
JavaScript
kodewilliams/graveyard
/imperium/server.js
UTF-8
763
2.640625
3
[ "MIT" ]
permissive
var compression = require('compression') var express = require('express') var app = express() var quotes = require('./quotes.json') var rn = require('random-number') var path = require('path') var gen = rn.generator({min: 0, max: 5420, integer: true}) var cors = require('cors') app.use(cors()) app.use(compression()) a...
true
93792ac36cc8ce29b1d253a004378bfd198ca1fc
JavaScript
khoibuiur1002/AlisaBirthday.github.io
/script.js
UTF-8
1,396
3.4375
3
[]
no_license
const daysEl = document.getElementById('days'); const hoursEl = document.getElementById('hours'); const minsEl = document.getElementById('mins'); const secondsEl = document.getElementById('seconds'); const AlisaBirthDate = "Nov 2, 2021 00:00:00"; function countdown(){ const BirthDate = new Date(AlisaBirthDate); ...
true
f4861997eebcca3618b514cd306255c85c8906c0
JavaScript
svforg/react_catalog
/src/store/CartModel.js
UTF-8
1,197
2.703125
3
[]
no_license
import {observable, computed, action} from 'mobx'; //class Cart export default class{ constructor(rootStore){ this.rootStore = rootStore; } @observable itemsInCart = []; @computed get itemsDetails(){ return Array.isArray(this.itemsInCart) && this.itemsInCart.map((itemInCart) => { let product =...
true
c3d1d7befe132552ca807b321ac15e9459d585a2
JavaScript
mertnuhoglu/study
/js/ex/study_functional_programming_in_javascript_learnrx/ex14.js
UTF-8
1,220
3.921875
4
[ "Apache-2.0" ]
permissive
Array.prototype.reduce = function(combiner, initialValue) { var counter, accumulatedValue; // If the array is empty, do nothing if (this.length === 0) { return this; } else { // If the user didn't pass an initial value, use the first item. if (arguments.length === 1) { counter = 1; ...
true
ab18ea2f621a532066ee7cffd6867b50853953f7
JavaScript
FeniXb3/YASIC
/src/entities/Barrier.js
UTF-8
1,083
2.796875
3
[ "MIT" ]
permissive
/*global Phaser */ /*global Config */ /*global Spacecraft */ var Barrier = function (game, x, y) { 'use strict'; var health; x = x || Config.MAP_WIDTH / 2; y = y || Config.MAP_HEIGHT; Spacecraft.call(this, game, x, y, 'barrier'); Object.defineProperty(this, "health", { ge...
true
f2477541d10b5dbdb713d85e108836bbbae3484e
JavaScript
DefCon-init/survey-app-backend
/controllers/AuthController.js
UTF-8
5,392
2.71875
3
[ "MIT" ]
permissive
const UserModel = require("../models/UserModel"); const { body, validationResult } = require("express-validator"); const { sanitizeBody } = require("express-validator"); //helper file to prepare responses. const apiResponse = require("../helpers/apiResponse"); const bcrypt = require("bcrypt"); const jwt = require("json...
true
8ea968dc2a58556f5bffc8bce599752e2d5cca4d
JavaScript
masterbtc/btc-books-depth
/ticker.js
UTF-8
3,311
3.390625
3
[]
no_license
// Required packages const request = require('request'); const WebSocket = require('ws'); // Global vars const wsUrl = 'wss://api.bitfinex.com/ws/2'; const restUrl = 'https://api.bitfinex.com/v2/book/tBTCUSD/P2?len=100'; const percentage = 30; var ticker = {}; var payloadTicker = JSON.stringify({ event: 'subscribe...
true
383b6d706d02d42ef8a83556e89928a56f11b040
JavaScript
MithoonSharechat/snakeAndLadderGame
/controller/SnakeGameController.js
UTF-8
2,238
3.203125
3
[]
no_license
let Board = require('../models/Board'); let Player = require('../models/Player'); let Cell = require('../models/Cell'); let Snake = require('../models/Snake'); let Ladder = require('../models/Ladder'); class SnakeGameController { constructor(helper) { this.helper = helper; } setUpGame(ladders, snakes, players, ...
true
56655fb551a8220c87e5f8269ba34772f3f4442e
JavaScript
NAOKINON/darts_arrange
/script/canvas.js
UTF-8
4,621
3.3125
3
[]
no_license
var DEFINE_STROKE_STYLE = 'black'; var DEFINE_STROKE_WIDTH = 2; var DEFINE_CENTER_X = 180; var DEFINE_CENTER_Y = 180; var NUMBER_MAP = { 1 : "20", 2 : "1", 3 : "18", 4 : "4", 5 : "13", 6 : "6", 7 : "10", 8 : "15", 9 : "2", 10 : "17", 11 : "3", 12 : "19", 13 : "7", 14 : "16", 15 : "8", 16 : "11", 17 : "...
true
640ea5480a22a8c9d1c91ca47529ec362e9e7fe8
JavaScript
elon0823/pdb-tester
/util.js
UTF-8
972
2.890625
3
[]
no_license
const JSONbig = require('json-bigint'); class Util { static decimalToHexString(number) { if (number < 0) { number = 0xFFFFFFFF + number + 1; } return number.toString(16).toUpperCase(); } static hexaToAscii(hex) { console.log("hex = "+hex); console.log("hex = "+hex[0]+hex[1]); ...
true
6d71251e40ba9d123c3f225c9d5018edf70cb79e
JavaScript
ImrankhanSRU/ScrollableTabs
/src/components/tabs/ScrollableTabs.js
UTF-8
7,228
2.59375
3
[]
no_license
import React, { Component } from "react"; import "./ScrollableTabs.css"; import chevronLeft from "../../assets/chevron-left.png" import chevronRight from "../../assets/chevron-right.png" import plusIcon from "../../assets/plus.png" import AlertWindow from "../alert-window/AlertWindow" import TabContent from "../tab-con...
true
f6250c4e306fae6e14b408dc06c1c7cb1f558ef6
JavaScript
bleach87/bitEdu
/bit/web01/pjt1/out.js
UTF-8
2,634
3.375
3
[]
no_license
var targetStrNum = makeNumber(); function makeNumber(){ do{ var strNum = String(Math.floor(Math.random() * 1000)); } while((strNum.charAt(0) == 0 || strNum.charAt(1) == 0 || strNum.charAt(2) == 0) || (strNum.charAt(0) == strNum.charAt(1)) || (strNum.charAt(1) == strNum.charAt(...
true
52d592da77fb13189c08485f98fb183f1e7b67a6
JavaScript
edurdneto/Visualization
/chart_distribution.js
UTF-8
3,364
2.53125
3
[ "Apache-2.0" ]
permissive
var width = 900, height = 250, height2 = 150; var parseDate = d3.time.format("%b %Y").parse; var x = d3.time.scale().range([0, width]), x2 = d3.time.scale().range([0, width]), y = d3.scale.linear().range([height, 0]), y2 = d3.scale.linear().range([height2, 0]); var xAxis = d3.svg.axis().scale(x)...
true
e9f187ac1a63777b24eba987b761e85614f3fa5a
JavaScript
Danudel/Movies
/src/components/ActorsView.js
UTF-8
2,317
2.6875
3
[]
no_license
import React from 'react'; import Card from 'react-bootstrap/Card' import Button from 'react-bootstrap/Button'; import { CardDeck, Col } from 'react-bootstrap'; import './ActorsView.css' class Actors extends React.Component { constructor(props) { super(props); this.state = { filteredS...
true
85b11c0e713306eed71e30bd6e3d1ba43512e5c3
JavaScript
atorian/game
/src/skills/778.js
UTF-8
1,319
2.65625
3
[]
no_license
// @flow import type { Ability } from "../index" import { step, targetEnemy, simpleDmg, debuff, multistep, GenericSkill, } from "../skill" // skill id: 778 /** Shoots 4 magic bullets that seek enemies with low HP ratio. The bullets have a 50% chance to decrease the target's Defense for 2 turns...
true
43ea1914f03204621c16b9a19f34684523cf0d8b
JavaScript
BernardMairura/jQuery_practise
/js/scripts.js
UTF-8
572
2.640625
3
[]
no_license
$(document).ready(function() { $("#blanks form").submit(function() { $(".person1").append("blah blah"); $(".person2").append("blah blah"); $(".animal").append("blah blah"); $(".exclamation").append("blah blah"); $(".verb").append("blah blah"); $(".noun").append("blah blah"); ...
true
4dfb62b8ac3e023f64260c00e71ecc34ad0ac80f
JavaScript
jpmascaretti/redux-mascaretti
/store/actions/drugs.actions.js
UTF-8
2,514
2.65625
3
[]
no_license
export const GET_DRUGS = "GET_DRUGS"; import { URL_API } from "../../constants/database"; import * as FileSystem from "expo-file-system"; export const ADD_DRUG = "ADD_DRUG"; const filterDrugsByUserID = (data, queryUserId) => { const drugs = []; Object.keys(data).forEach((key) => drugs.push({ id: key, ...data[key...
true
ca4f7920ba8f25579d017b296afff4cf998c14a3
JavaScript
cristianespinoza/grand-parade-test
/src/modules/findNextPositionSorted.js
UTF-8
345
2.90625
3
[]
no_license
// returns index at which to insert the next element const findNextPositionSorted = (arr, oneObject, field) => { let returnIndex = 0; arr.every((currentValue, index) => { returnIndex = index; return (!(oneObject === currentValue || oneObject[field] < currentValue[field])); }); return returnIndex; }; export { f...
true
eb5a209873d8034a655c55298d61cc10bac80c3c
JavaScript
mertcakmak2/NodeJs-MongoDb
/Managers/UserManager.js
UTF-8
2,399
2.515625
3
[]
no_license
//Model const User = require('../MongoModels/user') //Modules const bcrypt = require('bcrypt') const jwt = require('jsonwebtoken') function getAllUser() { return new Promise((resolve, reject) => { User.find().then(result => { resolve(result) }).catch(err => { resolve(err) ...
true
33a25b73e5609fde51304ff77feb604e14766d23
JavaScript
zlzhao124/Socketio_Chatroom
/chat-server.js
UTF-8
16,567
2.859375
3
[]
no_license
var http = require("http"), socketio = require("socket.io"), fs = require("fs"); // Listen for HTTP connections. This is essentially a miniature static file server that only serves our one file, client.html: var app = http.createServer(function(req, resp){ // This callback runs when a new connection is made to our HT...
true
ae04b4298533482ca40fe5c939ade83e6c134856
JavaScript
javiercejudo/modelico
/src/types/Map.js
UTF-8
1,736
2.609375
3
[ "MIT" ]
permissive
import {objToArr, reviverOrAsIs, isFunction} from '../U' import AbstractMap, {set, of, metadata} from './AbstractMap' const parseMapper = (keyReviver, valueReviver, path) => (pair, i) => [ keyReviver('', pair[0], path.concat(i, 0)), valueReviver('', pair[1], path.concat(i, 1)) ] const reviverFactory = (keyMetadat...
true
6e1c1eb98e0b65f22ae3905dd16ca264fb90128e
JavaScript
asha365/MILESTONE-ASSIGNMENT
/assignment.js
UTF-8
1,479
3.90625
4
[]
no_license
//assignment-1 inch to feet function feetToMile(inch){ var feet = (1 / 12) * inch; if(inch < 0){ console.log('invalid'); } return feet; } var result = feetToMile(10); console.log('your required mile is =', result); //assignment-2 woodcalculator function woodCalculator(chear,table,bed){...
true
a3bc6bddfe2ff326cc9f7acfc76215f896f59d78
JavaScript
Solbon13/react-firebase-ug
/src/components/Firebase/firebase.js
UTF-8
1,763
2.625
3
[ "MIT" ]
permissive
import app from 'firebase/app'; import 'firebase/auth'; import 'firebase/database'; const config = { apiKey: "AIzaSyCl2bpoGi4VPXC8GfUQx7iz3rNHPSnQpDQ", authDomain: "ug-garabal.firebaseapp.com", databaseURL: "https://ug-garabal.firebaseio.com", projectId: "ug-garabal", storageBucket: "ug-garabal.app...
true
e36d67f3227bd5aa57a2d331d0104de1cbd58d1c
JavaScript
salmgazer/RealGalacticos
/js/myscript.js
UTF-8
14,271
2.78125
3
[ "MIT" ]
permissive
/** * Created by Sal on 5/7/2015. */ function sendRequest(u){ // Send request to server //u a url as a string //async is type of request var obj=$.ajax({url:u,async:false}); //Convert the JSON string to object var result=$.parseJSON(obj.responseText); return result; //return object } fun...
true
977008d982402934d25e3598705b513411306caf
JavaScript
spdy999/appman-pokedex-2018
/src/utils/calculation.js
UTF-8
1,591
3.015625
3
[]
no_license
import * as R from 'ramda'; export const getLocalStorageItem = name => { return JSON.parse(localStorage.getItem(name)); }; export const setLocalStorageItem = (name, obj) => { localStorage.setItem(name, JSON.stringify(obj)); }; export const calFreePokemon = (fetchPokemons, pokedex) => { const pokedexGroup = R.g...
true
d48ba8536a371b71320eefa24a54c83475644db2
JavaScript
Omlahid/NaNoWriMo-Discord-Bot
/tests/isUserAdmin.test.js
UTF-8
1,305
2.671875
3
[]
no_license
const isUserAdmin = require('../src/isUserAdmin') describe('isUserAdmin', () => { test('returns true when member is null', () => { expect(isUserAdmin(null)).toBe(true) }) test('returns true when the administrator bit is on', () => { const member = createFakeMember(parseInt('1000', 2)) ...
true
d24d3ee0a12ab2e1a586648ad6c609b7945ed59b
JavaScript
zac24/JS_DS
/first.js
UTF-8
101
3.703125
4
[]
no_license
var array = [1,2,3,4,5,6,7,8,9] for (let element in array) { console.log(array[element]) }
true
8b09e6a7f4b5236d08d4ccade1f8dc6561a565b3
JavaScript
Netwan97/leetcode
/869-reordered-power-of-2.js
UTF-8
972
3.625
4
[]
no_license
/** * @param {number} N * @return {boolean} */ var reorderedPowerOf2 = function(N) { var len = N.toString().length; var multwo = []; var b = Math.pow(10, len - 1); var low = Math.pow(2, Math.ceil(Math.log2(b))); var up = b * 10; for(var i = low; i < up; i *= 2) { var obj = ...
true
53d5260c5a94d965848be5a92169abace82c5046
JavaScript
muratclk/exiting-loops-lab-cb-gh-000
/index.js
UTF-8
637
3.40625
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function breakOut(array,changeValue,stopValue) { for (var i = 0; i < array.length; i++) { if (array[i]===stopValue) { break; } array[i]=changeValue } return array } function keepGoing(array,changeValue,stopValue) { for (var i = 0; i < array.length; i++) { if (array[i]===stopValue) { ...
true
76859b21118f98d0f8f0a0f961ba6723461242cf
JavaScript
YHordijk/scientificprogramming
/project/SciProgHF/doc/_static/theme-custom.js
UTF-8
335
2.578125
3
[]
no_license
$(document).ready(function() { // make citation labels clickable $('.docutils.citation').each(function() { var label = $(this).find('td.label'); var temp = label.text(); var a = $('<a/>', { text: temp, href: '#' + this.id }); label.html(a)...
true
39c9ba32d3ef1c3888ff1db4accb4160dd8cfc68
JavaScript
clam1987/Professional-Portfolio
/assets/javascript/app.js
UTF-8
2,632
2.765625
3
[]
no_license
"use strict"; var nav = $("nav"); var navHeight = nav.outerHeight(); $(".navbar-toggler").on("click", function() { if (! $('#mainNav').hasClass('navbar-reduce')) { $("#mainNav").addClass('navbar-reduce'); } }); // Preloader $(window).on("load", function() { if ($('#preloader').length) { $(...
true
29fdd613cd3e39258f4f286707596bfe032ca32b
JavaScript
gustavohiroaki/matsuridaiko
/assets/_js/Form/FormMessage.js
UTF-8
1,039
2.578125
3
[]
no_license
let post = new Post; let help = new Helpers; $("#input-message").submit(function(e){ e.preventDefault(); var form = $(this); var uri = (window.location.pathname).split("/"); uri.find(checkType); function checkType(type){ if(type=="register"){ ...
true
08ed845c4a1305378d1ce28f4018cd2f45b36297
JavaScript
SMRsaimon/Math-Problem-solving-in-javascript-
/Biggest-number from multiple indput.js
UTF-8
429
3.328125
3
[]
no_license
const sadik = 1000; const amin = 800; const arman = 900; const himel = 1200; if (sadik > amin && sadik > arman && sadik > himel) { console.log("Sadik is a Biggest ") } else { if (amin > arman && amin > himel) { console.log("amin is a bigger") } else { if (arman > himel) { consol...
true
c0b65e04d9a8511a60849205f8932f56a8a21222
JavaScript
SUH11/JS
/sort.js
UTF-8
255
3.671875
4
[]
no_license
/* 重排序方法,针对数值、对象型 注:sort方法是针对字符串的 */ function compare(value1, value2) { return value1 - value2; } //e.g var arr = [0, 10, 15, 5]; arr.sort(); //0, 10, 15, 5 arr.sort( compare ); // 0, 5, 10, 15
true
f02682b8eb4cabddb51f9425939cf02a3b370818
JavaScript
juanmiguelguerrero/graphql-api
/api/projectsCtrl.js
UTF-8
1,452
2.703125
3
[]
no_license
const generate = require('nanoid/generate') const alphabet = '0123456789abcdefghijklmnopqrstuvwxyz' const { Project } = require('../models/projects.js') const { Collection } = require('../models/collections.js') // Endpoints // ==================== // Modelo (Id) // Crear (name) // Update (id, name) // Borrar (Id) //...
true
3b130e56a8fc67723602c3ab49af1af2bc3d4854
JavaScript
alibaba0507/BAEmailScraper
/app.js
UTF-8
1,848
2.671875
3
[ "MIT" ]
permissive
const args = require('minimist')(process.argv.slice(2)); var BAEmailScraper = require("./controllers/scraper.js"); var searchQuery = 'keyword "@gmail.com" "@live.com" "@yahoo.com" "@hotmail.com"'; /* Google search query to find email address */ // Method: start() // parameters 1: Google search query to find emails //...
true
ff2855cefdea63f6262c2f1815bb2801e96f20f8
JavaScript
odysseyhack/kryha
/frontend/src/scenes/universe/index.jsx
UTF-8
7,500
2.671875
3
[]
no_license
import * as THREE from 'three/src/Three'; import React, { useState, useEffect, useRef, useMemo } from 'react'; // A THREE.js React renderer, see: https://github.com/drcmda/react-three-fiber import { Canvas, useRender } from 'react-three-fiber'; // A React animation lib, see: https://github.com/react-spring/react-spring...
true
44eccb07017e522085f6c22b8af120433dc88428
JavaScript
Nuriagcmt/curso-Front-tajamar-2018
/js/01 inicio/js/valores.js
UTF-8
276
4.125
4
[]
no_license
//elementos -> por valor //number, string y boolean let x = 12 let y = 2*x x = x + 2 console.log(y)//24 console.log(x)//14 //los objetos o datos referenciados se manipulan por referencia let o1 = { valor: 12} let o2 = o1 o1.valor = 24 console.log(o1)//24 console.log(o2)
true
86c74a025d7bf45f08eb0ef02657d929aaa5296a
JavaScript
mvraa/herokuTest
/controllers/user.js
UTF-8
1,583
2.53125
3
[]
no_license
var user = require("../models/user"); const jwt = require("jsonwebtoken"); const roles = require("../auth/role"); const bcrypt = require('bcrypt'); const e = require("express"); const saltRounds = 10; exports.role = async function (req, res) { // find user to be switch role on: var result = await user.findOne({ ...
true
51894423617dd88adc10de1b12a0806d2eb3a8fc
JavaScript
tomharvey/OneFineStayTester
/index.js
UTF-8
3,474
2.953125
3
[]
no_license
var journey_log; function addEvent(elm, evType, fn, useCapture){ if (elm.addEventListener) { //W3C elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { //IE var r = elm.attachEvent('on'+evType, function() {fn.call(elm);}); return r; } else { // <IE elm['on' + evType] ...
true
a4ba6a6e4c2ed6c51bd9f4f6bc6b6bfec397de53
JavaScript
JoshDrentlaw/waterdeep-calendar
/js/calendar.service.js
UTF-8
3,902
3.296875
3
[]
no_license
let years = [ { "year": 1488, "name": "Year of Dwarvenkind Reborn" }, { "year": 1489, "name": "Year of the Warrior Princess" }, { "year": 1490, "name": "Year of the Star Walker's Return" }, { "year": 1491, "name": "Year of the S...
true
6d16171533e5bbc46f8f89bcd1391fadd9b17402
JavaScript
Meru852/inject-html
/examples/basic.js
UTF-8
1,952
2.8125
3
[ "MIT" ]
permissive
/*eslint-disable no-console, func-names*/ 'use strict'; var fs = require('fs'); var http = require('http'); var injectCode = require('../'); var hyperquest = require('hyperquest'); var getPort = require('get-port'); var connected = require('connected'); var zlib = require('zlib'); var inject = injectCode({ // type:...
true
d1c7cc2f144aad9958a614ec1cb5bb4a71acaa6f
JavaScript
kazi-arafat/form-validation-js
/static/js/main.js
UTF-8
3,099
3.46875
3
[]
no_license
/** * Form Validation using JS * */ var form = document.getElementById('register-details'); var fullName = document.getElementById('name'); var email = document.getElementById('email'); var gender = document.getElementById('gender'); // Event Listener form.addEventListener('submit', validateForm); fullName.addEv...
true
5faff94be095e34cada3dc0e4320cacdaaa5b078
JavaScript
spyentist/WDD330
/Team Activity/Week 4/scripts/main.js
UTF-8
978
3.21875
3
[]
no_license
// Core Requirements const reset = document.getElementById('reset'); const cells = document.querySelectorAll('.cell'); const divBoard = document.forms.ticTac; const player1 = {name: "player1", sign: "X"}; const player2 = {name: "player2", sign: "0"}; let player = player1; document.getElementById("currentPlayer").inner...
true
58ba013123d81ca312cc72144357ae60235c6bb1
JavaScript
saugat1/socketchat
/index.js
UTF-8
1,985
2.671875
3
[]
no_license
const http = require("http"); const express = require("express"); const cors = require("cors"); const app = express(); const server = http.createServer(app); const port = process.env.PORT || 8000; const { Server } = require("socket.io"); const io = new Server(server); let actives = {}; app.use(express.static("public"))...
true
2de498f04366645fe56568471ed23443671a567b
JavaScript
pawelra1/js
/typy-danych/js/main.js
UTF-8
1,073
4.0625
4
[]
no_license
/* typ liczbowy */ var wyplata = 5000; var premia = 1200; var wynagrodzenie = wyplata + premia; console.log(wynagrodzenie); console.log( typeof wynagrodzenie ); /* typ string (łańcuch znaków) */ var wyplataStr = "5000"; var premiaStr = "1200"; var wynagrodzenieStr = wyplataStr + premiaStr; console.log(wynag...
true
864b186d2c08c083412caa4615a5ba0545fd12f6
JavaScript
IllBond/myproject
/otherOther/dots/script.js
UTF-8
2,754
3.34375
3
[]
no_license
(()=>{ const config = { dotMin: 6, dotMax: 20, sphereRad: 300, bigDotRad: 35, massFactor : 0.002, defColor: 'rgba(250, 10, 30, 0.54)', smooth: 0.65, // mouseSize: 120, } const canvas = document.querySelector('canvas'); const ctx = canvas.getContext('2d'); let w, h, mouse, dots class Dot { constructor(r)...
true
f82757175d19eec05d8965262d6dd7a5ce066ee4
JavaScript
brigand/vet4pet
/app/assets/frontend/javascripts/reducers/visibilityFilter_Rdcer.js
UTF-8
373
2.5625
3
[ "MIT" ]
permissive
// Reducer specify how the application’s state changes in response. This is the job of a reducer. const visibilityFilter = (state = 'SHOW_ALL', action) => { console.log('In visibilityFilter reducer!!!!!!!!!!!!') switch (action.type) { case 'SET_VISIBILITY_FILTER': return action.filter default: r...
true
c7f7da85ae4ed007159f2c939bbf554571731925
JavaScript
Alexmanger2/Assignment-8
/src/App.js
UTF-8
2,147
2.96875
3
[]
no_license
import React, { Component } from 'react'; import './App.css' import Table from './components/Table' class App extends Component { constructor(props){ super(props) this.state = { numOfRows: 1, numOfCols: 1, color: "", tag: "All" } } handleAddRow = () => { let exisit...
true
e1336bd59bf5222b3e1beb8db627c9b8110ee6a6
JavaScript
touhedulhaque/regEx-form
/JS/script.js
UTF-8
2,028
3.59375
4
[]
no_license
const inputs = document.querySelectorAll('input'); console.log(inputs); //verification via prompt start let email = document.getElementById("email"); let phone = document.getElementById("phone"); let postal = document.getElementById("postal"); //addEventListener and promt and check //define EventListener email.addEven...
true
4149ae0859095e6f76a22127a385e7b949451bd0
JavaScript
KodersLab/react-native-for-web-stylesheet
/src/plugin/babel.js
UTF-8
2,969
2.78125
3
[ "MIT" ]
permissive
import {put, pick} from '../storage'; import {destruct} from '../utils'; export default function ({types: t}){ var isStyleSheetCall = t.buildMatchMemberExpression('StyleSheet.create'); function isStyleSheetCreateCall(node){ return t.isMemberExpression(node) && isStyleSheetCall(node); } function getClassNodes...
true
6afa27a73aef2564fbd06f65a622ecec152a5ca8
JavaScript
mohitkr0001/CoolNewTab
/assets/js/news.js
UTF-8
512
2.84375
3
[]
no_license
var url = ' https://newsapi.org/v1/articles?source=the-next-web&sortBy=latest&apiKey=da63afd1f6814247aeb5a840097824e4'; axios.get(url) .then(function (res) { for (var i = 0; i < res.data.articles.length; i++) { document.getElementById('news').innerHTML += ` <a href="${res.data.articles[i].url}"> <li><...
true
d2174c93ee8a935146fffc0dd7cca3faf5483fab
JavaScript
haimomesi/mysql-stream
/mystream.js
UTF-8
4,153
2.546875
3
[]
no_license
var mySql = require('mysql'); var sqlString = require('sqlstring'); var Transform = require('stream').Transform; var os = require('os'); function Streamer(url, config) { var self = this; this._connection; // initialize MySQL configuration object this._connectionConfig = initConnectionConfig(url, conf...
true
b7f411db617167955ebbe4f4cac073d5c1f0bc72
JavaScript
drakewilcox/movie-ticket
/js/scripts copy.js
UTF-8
1,287
3.46875
3
[]
no_license
// Business Logic for Output function MovieTicket() { this.tickets = []; this.ticketId = 0; this.price = 0; } MovieTicket.prototype.addTicket = function(ticket) { ticket.id = this.assignId(); this.tickets.push(ticket); } // MovieTicket.prototype.ticketPrice = function(ticket){ // if var inputtedAge === ...
true
85fd92642f70a8e9da89df0634421aabc9ff93f7
JavaScript
stevebreeser/mandel
/src/components/Julia.js
UTF-8
4,613
3.140625
3
[ "MIT" ]
permissive
import React, { Component, PropTypes } from 'react'; import _ from 'lodash'; import math from 'mathjs'; // We expect n to range from [-2, 2] according to some step increment. // e.g. [-2, 2] step .1 generates 41 points. // e.g. [-2, 2] step .05 generates 81 points. // Map those points to 0 - 800 in both x and y direct...
true
5e6d958b661fb9d205a768f1e9a8311b5985cb6d
JavaScript
ProgrammingFuad/YodaTranslator
/yoda.javaScript
UTF-8
655
2.578125
3
[]
no_license
<script src="http://code.jquery.com/jquery-1.12.0.min.js"</script> <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"</script> <script> window.onload=function() { $('#btnTranslate').on('click',translateText); } function translateText() { var textToT...
true
4e0e2d282fd5adfb970fa41a4f53e2b80b696d54
JavaScript
joaofolle/sige
/SigeApp/build/web/resources/js/autoend.js
UTF-8
1,501
2.859375
3
[]
no_license
function initAutocomplete() { var input = document.getElementById('txtlocal'); var searchBox = new google.maps.places.SearchBox(input); map.addListener('bounds_changed', function() { searchBox.setBounds(map.getBounds()); }); var markers = []; searchBox.addListener('places_changed', funct...
true
787e5f1a667c0c8cc0a00ddfe043b681632c3cd3
JavaScript
Maxjoeld/Algos
/leetcode Algos/mergetwolist.js
UTF-8
424
3.46875
3
[]
no_license
// recursive // var mergeTwoLists = function(l1, l2) { // var head; // if(l1 === null){ // return l2; // }else if(l2 === null){ // return l1; // } // if(l1.val < l2.val){ // head = l1; // head.next = mergeTwoLists(l1.next, l2); // }else if(l1.val >= l2.val){ // ...
true
fe10327fa7a83638fb742c0406db930a405d9ab5
JavaScript
bloodyowl/cornea
/test/styles.js
UTF-8
1,470
2.65625
3
[ "MIT" ]
permissive
var tape = require("tape") var styles = require("../styles") tape("styles", function(test){ var style = styles.create({id:1}) var head = document.head || document.getElementsByTagName("head")[0] var rule var rule2 var div = document.createElement("div") var element = style.element test.equal(style.elem...
true
fa5df8f8b043cc39048928ac0460cdef3969dc1c
JavaScript
morghayn/ProgressTool
/media/js/site/projectboard.js
UTF-8
3,611
2.90625
3
[]
no_license
/** * Processes an approval selection request for an inactive project. * * @param projectID the ID of the inactive project. * @param approvalID the ID of the approval selection made. * @param count the current position of the project on the project board. Used for the alternating design. */ function approvalSelec...
true
75175109f2443121467f15465f99eff48cec9c02
JavaScript
escapeprograms/fluffcakes
/Code/fluff.js
UTF-8
5,951
2.921875
3
[]
no_license
//movePlayer var mouseX = 0; var mouseY = 0; var hp = 5; var aOffX = document.getElementById("fluff-container").offsetLeft;//needs updating in index.js var aOffY = document.getElementById("fluff-container").offsetTop; function movePlayer(event){ mouseX = 1100*(event.clientX-aOffX) / parseFloat(document.getElementB...
true