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
98324dbe6d35d003ec091e6a1412f56157c06b3c
JavaScript
jhn735/canvas_frame
/frame.js
UTF-8
9,290
3.15625
3
[]
no_license
/*canvas frame will have either a parent frame or a canvas in which to exist. It has a height and width that is proportional to it's parent's width a location that falls within the bounds of it's parent. Coordinate 0,0 corresponds to the upper-leftmost coordsinate of the parent. Window cannot exist outsid...
true
34d872cf866d8209d863fb7dbb00effd5550b197
JavaScript
yoneshinzato/projeto-FetchAPI
/src/js/main.js
UTF-8
633
3.296875
3
[]
no_license
const cep = document.querySelector("#cep"); //1 const showData = (result) => { for (const campo in result) { if (document.querySelector("#" + campo)) { document.querySelector("#" + campo).value = result[campo]; } } }; //2 cep.addEventListener("blur", (event) => { let search = cep.value.replace("-",...
true
b60ea244db63e8c7cbbe101573350e43da90cd34
JavaScript
kumkumsingh/museumgallery
/src/App.js
UTF-8
3,424
2.765625
3
[]
no_license
import React, { Component } from "react"; import "./App.css"; import * as request from "superagent"; import { url } from "./constants"; import { Button } from "@material-ui/core"; import Lightbox from "react-image-lightbox"; import 'react-image-lightbox/style.css'; export default class App extends Component { // dec...
true
1db67de567a366d851ca597126ceb649252dd072
JavaScript
AlexanderKruk/you-dont-know-js
/this & object prototypes/3/22.js
UTF-8
144
3.03125
3
[]
no_license
var myObject = { get a() { return this._a_; }, set a(val) { this._a_ = val * 2; } }; myObject.a = 2; console.log( myObject.a );
true
81878bd6e157b7710310cd99a4ecc4b5875fe765
JavaScript
caesai/mApp
/src/core/components/Form.jsx
UTF-8
3,361
2.5625
3
[]
no_license
import React, { Component } from 'react'; import isEmail from 'validator/lib/isEmail'; import isAlpha from 'validator/lib/isAlpha'; import isEmpty from 'validator/lib/isEmpty'; import Button from 'core/components/Button'; const validate = (name, value = '', rule) => { switch (rule) { case 'email': return i...
true
a3f00ddc7ab32458ad54a789258e7b38c41d5f8d
JavaScript
akhilome/exercism-logs
/javascript/wordy/wordy.js
UTF-8
1,632
3.640625
4
[]
no_license
export const ArgumentError = new Error('Invalid operation'); export class WordProblem { constructor(question) { this.question = question; this.validTokens = ['plus', 'minus', 'multiplied', 'divided']; } striper(sentence = this.question) { return sentence .replace('?', '') .split(' ') ...
true
0dd3c4f5859f392114752866593e1c97b1722e5f
JavaScript
saraebbers/weathrlyProjectModTwo
/src/Search.js
UTF-8
1,285
2.53125
3
[]
no_license
import React, { Component } from 'react'; import './Search.css'; export default class Search extends Component { constructor() { super(); this.state = { usLocation: '', // usCity: '', } } submitLocation() { this.props.resetLocation(this.state);; } render() { return ( ...
true
616ee185d3fcd32cb23fe8729391a0954dfbb317
JavaScript
ignatiusbill/crowd
/src/actions/ScoreActions.js
UTF-8
2,191
2.78125
3
[]
no_license
import axios from 'axios'; import { RESET_SCOREBOARD, CORRECT_ANSWER, PASS, IS_ANSWERING, DONE_ANSWERING, WORD_SEEN_BY_USER, LOAD_EMPTY_WORD_LIST, LOAD_WORD_LIST, LOAD_WORD_LIST_SUCCESS, LOAD_WORD_LIST_FAIL } from './types'; export const resetScoreboard = () => { return ...
true
787b6906b1385957e414d06ef3bf97e24f07b57f
JavaScript
stevemao/inspect-curry
/index.js
UTF-8
564
2.96875
3
[]
no_license
function fToString(f) { return f.name ? f.name : f.toString(); } function curry(fx) { var arity = fx.length; function f1() { var args = Array.prototype.slice.call(arguments, 0); if (args.length >= arity) return fx.apply(null, args); function f2() { return f1.apply(null, args.concat(Array.prot...
true
78c8fe60bc5d2f0e5de434c9669b909e4769711c
JavaScript
MadeOfMagicAndWires/eloquent-javascript
/Chapter 17/pieChart.js
UTF-8
2,516
3.625
4
[ "MIT" ]
permissive
/** * Pie Chart Exercise * Copyright © 2020 Joost Bremmer * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy,...
true
395ad289cba0442585bb7fb3e9e98c5b3ae5334c
JavaScript
alinawww/Ironhack
/Class/week5/day3/pokemon.js
UTF-8
1,908
2.953125
3
[]
no_license
$(document).ready(function(){ function(createGrid){ } var PokemonController = function(container, url){ this.container = container; this.url = url; this.pokemon = pokemon; this.setListeners(); } PokemonController.prototype.setListeners = function () { this.currentCell.on('click', this.showPokemon.bind(t...
true
10f2e0d7ada4816034c9d962319ce9d4fb2d5b40
JavaScript
Kimbangg/TIL
/Algorithm/boj/구현/9547 대통령 선거.js
UTF-8
967
3.40625
3
[]
no_license
function solution(preference) { let first = {}; const second = {}; const majority = Math.ceil(v / 2); for (let i = 0; i < v; i++) { first[preference[i][0]] = (first[preference[i][0]] || 0) + 1; } for (const key in first) { if (first[key] > majority) return console.log(key, 1); } const first_a...
true
1957ec8c0d650640e2db8b8c0143fd7fee15f8c8
JavaScript
RobinFrancq/WebProject
/Web_Project_Blog_v5/js/catResult.js
UTF-8
356
2.765625
3
[]
no_license
$(function () { $('.catBtn').on("click",function(){ var catId = $(this).attr("id"); $.ajax({ type: "POST", url: "catResult.php", data: {"catId": catId}, success: function(html) { $('#filterResult').html(html); ...
true
e79e1ebf3862eb0de3344749ce43c66542ee24d1
JavaScript
blacksourcecode/nodejs-todo
/seed/todo.js
UTF-8
735
2.703125
3
[]
no_license
// import model var Todo = require('../models/Todo'); var mongoose = require('mongoose'); mongoose.connect('localhost:27017/todoapp'); var todo = [ new Todo({ todo: 'Look at MEAN Stack' }), new Todo({ todo: 'Look at Phonegab nodejs setup ' }), new Todo({ todo: 'Restructer s...
true
d18793a0b436bea4af89c563b039aeaae2a37240
JavaScript
TinaHeiligers/senior-enrichment
/server/routers/students.js
UTF-8
1,607
2.609375
3
[]
no_license
'use strict'; //router for students const router = require('express').Router(); const Campus = require('../../db/models').Campus; const Student = require('../../db/models').Student; //STUDENT(S) // GET -all, GET-single, POST-single, PUT-single, DELETE-single router.get('/', function(req, res, next) { Student.find...
true
412535f5d5603610bc3a6ddfcf14aa6e8fd6c614
JavaScript
devans10/terraform-provider-flash
/website/src/themes/hugo-theme-techdoc/src/js/keydown-nav.js
UTF-8
525
2.703125
3
[ "Apache-2.0", "MIT" ]
permissive
(function($) { $(document).ready(function() { $('.nav-prev').on( 'click', function() { location.href = $(this).attr('href'); }); $('.nav-next').on('click', function() { location.href = $(this).attr('href'); }); $(document).on( 'keydown', function(e) { // prev links - left arrow ...
true
d144f1a7da7acc088b0034c3193da545137b75f4
JavaScript
diaspora/jsxc
/src/jsxc.lib.notice.js
UTF-8
2,833
2.859375
3
[ "MIT" ]
permissive
/** * This namespace handle the notice system. * * @namspace jsxc.notice * @memberOf jsxc */ jsxc.notice = { /** Number of notices. */ _num: 0, /** * Loads the saved notices. * * @memberOf jsxc.notice */ load: function() { // reset list $('#jsxc_notice ul li').remove(); ...
true
1ae4e259fc84debffbc76979ec5de40e4e0b4238
JavaScript
coffeepyros/frog-chat
/client/src/components/Chatbox.jsx
UTF-8
3,463
2.6875
3
[]
no_license
import React, { useState } from "react"; import axios from "axios"; import "./Chatbox.css"; export default function Chatbox(props) { const avatars = { Frog: "🐸", Raccoon: "🦝" }; // Checks if its the first load of the page // if yes -> gets chat history from the database const [loadDB, setLoadDB] = useState(f...
true
4a2039ff9944c4836732026592069268817a4b22
JavaScript
jdiperi88/Tic-Tac-Toe
/main.js
UTF-8
5,380
3.671875
4
[]
no_license
//worked with oswaldo almazo let whoWon = function(arr){ //solution for VERTICAL addition for(i=0;i<3; i++){ var result =arr.reduce((sum,value)=>{ return sum+value[i]; },0); if(result==3){ alert('Player One has won!!') location.reload(); break; } else if(result ==-3){ alert('Player Two has won!!') ...
true
bc373ba8319688c88dac60124e0def25dd695980
JavaScript
rsenn/plot-cv
/test-glfw.js
UTF-8
4,485
2.515625
3
[]
no_license
import { GL_COLOR_BUFFER_BIT, GL_LIGHTING, GL_LINEAR, GL_MODELVIEW, GL_PROJECTION, GL_QUADS, GL_REPEAT, GL_RGB, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNSIGNED_BYTE, glBegin, glBindTexture, glClear, glClearColor, glDisable, glEnable, glEnd, glFlush, glGenTe...
true
64a3a755149f80e40f57aa16f6e8abfe4c07bf03
JavaScript
KanwarGill/News-Investigator
/Website/c01/js/main.js
UTF-8
9,509
2.75
3
[]
no_license
$("#btnAddSource").click(function () { var urlRegex = new RegExp("^w{3}\.[a-zA-Z0-9]{2,}\.[a-z]{2,3}$"); var source = $("#inputsource").val(); if (!urlRegex.test(source)) { alert("Please enter a valid url"); return; } var id = source.substring...
true
2d86d6afc6e3d43fdf77835c1867980a9e1204cb
JavaScript
YetAnotherJonWilson/prime_prestudy_bonus_week_03
/script.js
UTF-8
173
3.21875
3
[]
no_license
function double(x) { return x + x; } function halve(x) { return x/2; } function c(x) { return x * x; } var result = double(halve(c( 12 ) ) ); console.log(result);
true
3fb76c82ef608f4bca182fe4cab8054ac5a77cb5
JavaScript
asilvis/bigquery-schema-generator
/index.js
UTF-8
1,042
3.109375
3
[ "MIT" ]
permissive
"use strict" module.exports = function generate(data) { return traverse([], data) } function getMode(val) { if(Array.isArray(val)) return "REPEATED" else return "NULLABLE" } function getType(val) { if(typeof val === 'boolean') return "BOOLEAN" if(!isNaN(val)){ if(Number.isInteger(parseFloat(val))) re...
true
0de418d64f4985658950b516dd28b9803be5724d
JavaScript
qwop/userscript
/monolith/51/125424.user.js
UTF-8
1,069
2.6875
3
[]
no_license
// ==UserScript== // @name Finance Hide Open Positions // @description Hides closed positions in in Google Finance // @include http://www.google.com/finance/portfolio?action=view* // @include http://www.google.tld/finance/portfolio?action=view* // @include https://www.google.tld/fi...
true
a71910b84a955bbed8d2cebc855bbd8202918281
JavaScript
everyonce/youtube-podcast
/dist/helpers.js
UTF-8
3,127
2.625
3
[]
no_license
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolved = resolved; exports.rejected = rejected; exports.fetchJSON = fetchJSON; exports.buildXML = buildXML; exports.formatTime = formatTime; exports.formatDate = formatDate; exports.parseYoutubeDuration = parseYoutubeDuration; exp...
true
b1c9937b911d7e8fe636a43af1d36747a6d922a1
JavaScript
Robert-Rousset/Team-Profile-Generator
/develop/__tests__/Manager.test.js
UTF-8
522
2.71875
3
[]
no_license
const Manager = require("../lib/Manager"); describe('Manager', () => { // ERROR FOR NO GITHUB PROVIDED it("throws an Error if no github name is passed", () => { expect(() => { new Manager("Rob", 10, "email@email.com", "twenty"); }).toThrow(console.error('Please enter a valid office ...
true
7ddd412c16b6f125830ae16146858d40d4e810d4
JavaScript
marcinjackowiak/jquery.nozzle
/dist/jquery.nozzle.js
UTF-8
14,816
2.6875
3
[ "MIT" ]
permissive
/* * jquery.nozzle * v1.0.0 * Simple data filtering and manipulation library for jquery. * * Author: Marcin Jackowiak * Released under MIT License * */ (function($) { $.nozzle = {}; $.nozzle.version = '1.0.0' $.nozzle.renderTimeoutFunction = null; /* * liveFilter * Apply a filter to the given dat...
true
d42250aa237c410733f1784d59a823798ca69f1d
JavaScript
therealAJ/MeanStack-Practice
/JavaScript-practice/Venue-Checker/main.js
UTF-8
627
4.0625
4
[]
no_license
//var age = prompt("What is your age"); // // //if (age < 0 ) { // console.error("Not a valid age"); //} else if (age === "21") { // console.log("Happy 21st birthday"); //} else if (age % 2 !== 0) { // console.log("your age is odd!"); //} else if (Math.sqrt(age) === Math.sqrt(age)) { // console.log("perfe...
true
6b53f968c727ed11ec4a2ef07fcc7f33428690da
JavaScript
SOSANA/Node.JS-Tutorials
/nodeinpractice/node-techniques/ch4/20/mixin-1.js
UTF-8
1,385
3.890625
4
[]
no_license
/** * Technique 20: Mixing in EventEmitter * - sometimes inheritance isn't the right way to use EventEmitter. In these * cases, mixing in EventEmitter may work * * Problem: * - This is an alternative option to technique 19. Rather than using EventEmitter * as a base class, it's possible to copy its methods...
true
5baf8e2bdb5badf2717eb37457927289388feb6b
JavaScript
wzx110113627/Legend
/Server/Manager/LSEventQueue.js
UTF-8
1,874
2.671875
3
[]
no_license
/* * 作用:服务器的事件队列 * */ require("../public/LSHelper"); module.exports = LSEventQueue; var LSEVENT_TYPE = {} module.exports.LSEVENT_TYPE = LSEVENT_TYPE;//事件类型 LSEVENT_TYPE.LOGIN_SERVER_EVENT = 1;//角色连接新服务器的事件 LSEVENT_TYPE.CREATE_SERVER_EVENT = 2;//创建服务器 var LSEvent = function (TYPE) { //事件对象 this.type = TYPE; ...
true
02ba793dbd702492cb800e690fe4d6f4d14902c6
JavaScript
camillo29/FoodDeliveryWebsite
/FoodDelivery-Frontend/src/Components/Objects/Dish.js
UTF-8
989
2.703125
3
[]
no_license
import '../../App.css' /** * Dish component that renders dish information * @param {any} props * forOrder - flag upon which content is decided * dish - dish information to be displayed * amount - amount of dish ordered */ const Dish = (props) => { if (!props.forOrder || props.forOr...
true
b48dc0c74e14dd017ac31c486af5b56239c649df
JavaScript
geekyprawins/towards-javascript
/title-case-a-sentence.js
UTF-8
270
3.1875
3
[]
no_license
function titleCase(str) { let wordsLower = str.toLowerCase().split(' '); let wordsNeed = wordsLower.map(function (val) { return (val.replace(val.charAt(0), val.charAt(0).toUpperCase())); }); return wordsNeed.join(' '); } titleCase("I'm a little tea pot");
true
3c6904deeb47d66f4e4bbc57fd06adb6b6fd01f8
JavaScript
Maximophone/Maximophone.github.io
/fiddling/static/graphics/shaders/fragment/laser.js
UTF-8
343
2.546875
3
[]
no_license
export var laser_shader = ` precision mediump float; uniform float u_time; uniform vec4 color; varying vec2 vertPos; float laser(vec2 U){ // float r = sqrt(dot(U, U)); return exp(-5.*(1.+0.3*sin(4.*u_time))*(abs(U.y)*(U.x+2.))); } void main(){ float lv = laser(vertPos); vec3 col = color.rgb*lv; gl_FragColo...
true
f8ecb6cf080af6d9387242104f483de7d8c698cf
JavaScript
surajeon/lotide
/map.js
UTF-8
441
3.09375
3
[]
no_license
const map = function(array, callback) { const results = []; for (let item of array) { results.push(callback(item)); } return results; } map(["g", "c", "t", "m", "t"], "a") module.exports = map; // console.log(assertArraysEqual(results1, ["g", "c", "t", "m", "t"])); // console.log(assertArraysEqual(map(...
true
8b55c49915a7bf4434565818a0f06b5bebbf7e65
JavaScript
soahead/hs-js-cartoon-collections-js-cartoon-collections-000
/index.js
UTF-8
1,482
4.03125
4
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
function dwarfRollCall(dwarves) { let str = "" //loops array members for (let i = 0; i < dwarves.length; i++){ if (i < dwarves.length - 1){ //display the order of array members str += `${i+1}. ${dwarves[i]} ` ; } //displays the last array member else { str +=...
true
2c417a06a25f26dc9556e691562dbc58c4f6d988
JavaScript
rageel/W_Ciapkach
/src/components/CreateUser/CreateUser.js
UTF-8
2,428
2.703125
3
[ "Unlicense" ]
permissive
import React, { Component } from "react"; import "./CreateUser.scss"; import * as firebase from "firebase"; const INITIAL_STATE = { newUserEmail: "", newUserPass: "", error: "" }; export default class CreateUser extends Component { constructor() { super(); this.state = { I...
true
eac75aabf9b7592b355a3aa9e49471e1732bbc60
JavaScript
zswang/jfetchs
/test/index.js
UTF-8
6,031
2.53125
3
[ "MIT" ]
permissive
const jfetchs = require('../') describe("src/index.ts", function () { var assert = require('should'); var util = require('util'); var examplejs_printLines; function examplejs_print() { examplejs_printLines.push(util.format.apply(util, arguments)); } it("fetch():debugstring", function (do...
true
639093502a26f3bcebd17f2136ac11a3b7dc2ebb
JavaScript
wxx1/vue
/shopping/src/store/index.js
UTF-8
2,154
2.578125
3
[]
no_license
import Vue from 'vue' import Vuex from 'vuex' //模拟请求的商品数据 import product_data from '../../product' //从工具模块中导入 import { getFilterArray} from '../Utils/util' Vue.use(Vuex) export default new Vuex.Store({ /** * 后期需要响应式的数据,先在此处定义,这样才会加入到Vue响应式系统中 */ state: { productList: [],//数据列表 cartList: []//购物车数据列表 ...
true
9691c18f767e88e6c8a2a0d90d32f686ccae0e5e
JavaScript
AlexisK/May27_task
/resources/js/model/Parking.js
UTF-8
3,819
2.53125
3
[]
no_license
window.PARKING = {}; var Parking = (function(){ function init(name) { this.id = name; this.priority_by_tag = {}; this.slot_by_type = {}; PARKING[name] = this; } function _getSlotByTag(tag) { var priorityFound = Infinity;// JavaScript can, why not?...
true
5538fc801f4a1e344f534b523de9cca2fd4a6d54
JavaScript
Tom91011/webpack-starter
/src/index.js
UTF-8
695
2.984375
3
[]
no_license
var _ = require('lodash'); import { wizard } from "./wizard" import { barbarian } from "./barbarian" import "./style.scss"; import printMe from './print.js'; console.log("Ran from index.js"); console.log(wizard); console.log(barbarian); const obj = { a: "alpha", b: "bravo"} const newObj = { ...obj, c: "charlie"} con...
true
55950283c5c666441d7be7e0bd4bff10233a28a7
JavaScript
cuulee/Jassa
/jassa-js/src/main/webapp/resources/js/facete/to_integrate/facet-utils.js
UTF-8
5,329
2.78125
3
[]
no_license
/** * Core classes of the facet system: * * PathManager * PathNode * * TODO Breadcrumb (encapsulates a path and supports generating a query element from it) * */ (function() { var sparql = Jassa.sparql; var ns = Jassa.facets; ns.FacetUtils = { createTriplesStepProperty: function(step, startVar, endVa...
true
9d709b2f5dbb80e8acaad90b723026fdefe82b89
JavaScript
jackwgj/wawaji
/src/assets/js/breakPointRefresh.js
UTF-8
1,910
2.875
3
[]
no_license
/* * description 在指定断点位置,执行刷新页面操作 * author jolin * date 2017-11-1 */ ;(function($){ function ResizeWidth(opt) { let _this = this; this.initw = window.innerWidth; this.reloadActive = false; this.opt = opt; $(window).resize(function(){ _this.reloadAc...
true
2d7d988e5f7bb92ef66680e39f2c13934ee3013c
JavaScript
GitYms/adventofcode
/2022/8_day/index.js
UTF-8
2,473
3.265625
3
[]
no_license
import getInput from "../common/index.js"; const input = getInput('./input.txt'); /* 输入:字符数组,每一个字符代表一棵树的高度 输出: part 01: 从网格外部能看到的树的总量(边缘的都能看到) part 02: 任何一棵树能看到的风景最高分(风景分计算规则:上下左右能看到的树的乘积) */ const testInput = [ '30373', '25512', '65332', '33549', '35390', ]; const getNum = (i, j, a...
true
ca986c616d4be190079cf2643715fca4eb11cc54
JavaScript
junbeomAn/im-06-rushncode-server
/controller/api/question/display_question.js
UTF-8
2,151
2.84375
3
[]
no_license
/* POST /api/question/displayq { body, questionID } */ const Promise = require('bluebird'); const getQuestion = Promise.promisify(require('../../../model/get_question')); const getAnswers = Promise.promisify(require('../../../model/get_answers')); const getChAnswers = Promise.promisify(require('../../../model/get...
true
d08f47308e3cb4cc4c849c799e609a39f628aa92
JavaScript
GAYOUNG914/0408
/예제9_숫자나열/js/common.js
UTF-8
581
3.71875
4
[]
no_license
//변수선언 let num = ''; let count = 0; function repeat(i,j){//i 시작하는 숫자 , j 마직막 숫자 //실행코드 //초기실행 시 콤마제거 if( count == 0 ){ if( i % 2 == 0 ){//짝수 num += i; count++; } }else if( i > j ){//최대숫자 제한 return 0; }else{ //초기실행이 아니라면 콤마추가 if( i % 2 == 0 ){//짝수 num += ','+ i; count++...
true
33ee63aef56d5966e3fa4ffde1e8ca21f5a3adbd
JavaScript
polsumeet3666/covid19-bed-tracker
/src/UsefulLinks.js
UTF-8
395
2.546875
3
[]
no_license
import React from "react"; class UsefulLinks extends React.Component { // constructor(props) { // super(props); // } render() { let links = this.props.links; let elem = []; links.forEach((item, i) => { elem.push( <li key={i}> <a href={item.link}>{item.title}</a> </li> ); }); return ...
true
5fc7f306752d64e38523678acd58bddcc14a10d7
JavaScript
Saylua-Archive/saylua-experiment
/src/models/Sprite/templates/singTemplates.js
UTF-8
1,971
2.59375
3
[]
no_license
import { They_re } from '../../Language/pronouns'; import { chirp, chirling, a_chirling, Kimberly, chirping, purrs, chirps, growls } from '../interactions'; import { spriteText } from '../spriteHelpers'; const oldMacDonaldSong = sprite => spriteText(sprite)` Old MacDonald had a den${' '} E-I-E-I-O${' '} And ...
true
ddecf1e0b452810806f95271f0be0c9f6e651a17
JavaScript
Korbeil/cryptobot
/src/coinmarketcap.js
UTF-8
1,049
2.625
3
[]
no_license
const https = require("https"); let CoinMarketCap = (function() { const __base = 'https://api.coinmarketcap.com/v1/'; let __config = null; /********** * PUBLIC * **********/ const init = function(config) { __config = config; }; const request = function (method) { ...
true
2301d31cd05e2316a98c9ccf532876ae2b4af2e8
JavaScript
deaf-ayo/courses
/colt-courses/web_dev_bootcamp/01_Front_End/04_Javascript/04_Guessing_Game/script.js
UTF-8
325
4.125
4
[ "MIT" ]
permissive
var secretNumber = 27; var numberGuess = prompt("Guess the secret number!"); var guess = Number(numberGuess); if(guess < secretNumber) { alert("Try again. Guess higher!"); } else if(guess > secretNumber) { alert("Try again. Guess lower!"); } else { alert("Well done! You guessed the secret number!"...
true
35b67755dd7a36064c3b7a58eb5912a7e1bb5047
JavaScript
bhupeshbhatt1985/GraphDataStructureVisualization
/src/Graph/Graph.jsx
UTF-8
4,115
2.703125
3
[]
no_license
import React, { Component } from 'react'; import './Graph.css' import Node from './Node/Node' export default class Graph extends React.Component { constructor(props) { super(props); this.state = { //GraphArray: this.generateArray(), nodeList: this.generateArray(), };...
true
6588f558402a1a718ceb294bd0ea31b3841d679f
JavaScript
BudickDa/climate-sim
/packages/climate-simulation/simulation/sun.js
UTF-8
5,483
3.71875
4
[]
no_license
/** * The power of the sun is 1367 W / m² */ sunPower = 1367; /** * converts degree to radians * @param degree * @returns {number} */ Sim.toRadians = function (degree) { return degree * (Math.PI / 180); }; /** * Converts radian to degree * @param radians * @returns {number} */ Sim.toDegree = function (...
true
2b94c94afc218bf5f5f350b9b1f3884550cb21b0
JavaScript
eternalsakura/DIE-corpus
/firefox/jit-test/ion/bug1304640.js
UTF-8
119
2.6875
3
[]
no_license
function f() { return /x/; } function g() { return f() == f(); } for (var i = 0; i < 2; ++i) { g(); false; }
true
2cd4bb57cd43c6e0cace7e3089772063a5e99565
JavaScript
calebchoi/water-walls
/server/logic/helper.js
UTF-8
819
3.109375
3
[]
no_license
const findLeftEdge = (height) => { const leftEdge = []; let max = -1; for (let i = 0; i < height.length; i++) { if (height[i] > max) { max = height[i]; leftEdge.push(i); } } return leftEdge; } const findRightEdge = (height) => { const rightEdge = []; let max = -1; for (let i = heigh...
true
37a111be3b3cd7794d79a08655a80a6ddc737800
JavaScript
more-coffee-more-code/TheOdinProject
/fetch-data/main.js
UTF-8
661
2.9375
3
[]
no_license
// search for Gifs // select image and assign it to a variable // const img = document.querySelector('img'); // // add in fetch from the url // fetch('https://api.giphy.com/v1/gifs/translate?api_key=orbkuIOnZg8RqMbmOhWzDw5W5imRiUQN&s=vader', {mode: 'cors'}) // .then((response) => { // return response.json...
true
abfc91cbc66ce65138c19a0203d492baed08bb13
JavaScript
kaijie-zhang/node-apps
/playground/1-json.js
UTF-8
283
2.9375
3
[]
no_license
const fs = require('fs') const oldDataBuffer = fs.readFileSync('1-json.json') const oldDataJSON = oldDataBuffer.toString() oldData = JSON.parse(oldDataJSON) oldData.name = 'Kaijie' oldData.age = 25 const newJSON = JSON.stringify(oldData) fs.writeFileSync('1-json.json', newJSON)
true
5477d1e64a9fec581902775a7e441781bff8d83f
JavaScript
sergiomajluf/sergiomajluf.github.io
/p5-experiments/week2/shiffman_inclass/bubbles_walkthrough/sketch2.js
UTF-8
470
3.453125
3
[]
no_license
var bubble; var bubble2; function setup() { createCanvas(600,400); bubble = { x : width/2, y : height, move : function() { this.x = this.x + random(-1,1); this.y = this.y - 1; } }; bubble2 = Object.create(bubble); bubble2.x = width/4; bubble2.y = height; } function draw() ...
true
8c2416f42372895ec46d4f0313cdb93dd3a31a0e
JavaScript
tbold5/w4d2
/lookup_people.js
UTF-8
1,031
2.796875
3
[]
no_license
const pg = require("pg"); const settings = require("./settings"); // settings.json const client = new pg.Client({ user : settings.user, password : settings.password, database : settings.database, host : settings.hostname, port : settings.port, ssl : settings.ssl }); const input = process.a...
true
dd43a1c57a88939eae22631bb6e9cf7f50cad41c
JavaScript
wildlySpeculating/cirrus
/db/db.js
UTF-8
4,071
2.578125
3
[]
no_license
'use strict' let config = require('../knexfile'); let env = 'development'; let knex = require('knex')(config[env]); module.exports = knex; // knex.migrate.latest([config]); knex.ensureSchema = function () { return Promise.all([ knex.schema.hasTable('employee').then(function (exists) { if (!exists) { ...
true
ea82c86f1af5fae8da0cf67d3ebb659e9fa3a807
JavaScript
MCT-Industry-Project-Hanssens-Groep-1/Hanssens-Catering-Bestelplatform
/script/nav.js
UTF-8
370
2.78125
3
[]
no_license
const burger = document.querySelector('.c-header-hamburger'); const nav = document.querySelector('.c-sidebar'); burger.addEventListener('click', () => { if(nav.style.opacity == "1" && nav.style.width == "300px") { nav.style.width = "0px"; nav.style.opacity = 0; } else { nav.style.opacit...
true
e6c434d0d6a4419c694541cb8cefa3a10afeba26
JavaScript
sangphanthanh/KelvinPi
/server.js
UTF-8
2,174
2.515625
3
[]
no_license
/** * Declare */ var express = require('express'), app = express(), server = require('http').createServer(app), io = require('socket.io').listen(server), config = require('./config/config'), mongoose = require('mongoose'); const devices = require('./routes/devices'); const Gpio = require('onoff').Gpio; var...
true
1e837f67b5bfc0c41e645cdaa73fd21e83595b52
JavaScript
sjotterman/rocannon
/src/components/Selector.js
UTF-8
1,498
2.515625
3
[]
no_license
import React, { useState } from 'react'; import InitialList from './InitialList'; const Selector = ({ onFinish, choices, setChoices }) => { const [inputValue, setInputValue] = useState(''); const [itemIndex, setItemIndex] = useState(0); return ( <> <p className="header">WhereToEat</p> <p classNa...
true
d41645e5cbbd0322c1593710b4c2eaaf74ca312d
JavaScript
Sank-WoT/breakout
/index.js
UTF-8
4,339
3.15625
3
[]
no_license
var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); var bricksArea = { rowCount: 3, columnCount: 5, createBricksArea: function() { var bricks = []; for(var i = 0; i < this.columnCount; i++) { bricks[i] = []; for(var j = 0; j < this.rowCount; j++) { bricks[i][j] = { x: ...
true
c2902a11268c7342ea2c8fbd4f3eda0a52a91d76
JavaScript
felipevr/hispta
/scripts/jogo/animacao.js
UTF-8
1,103
3.03125
3
[]
no_license
class Animacao { constructor(imagem, x, variacaoY, largura, altura, larguraSprite, alturaSprite, colunasSprite, linhasSprite) { this.imagem = imagem; this.colunasSprite = colunasSprite; this.linhasSprite = linhasSprite; this.larguraSprite = larguraSprite; this.alturaSprit...
true
085e32ca3bfebd8910d68d8172ab952266709434
JavaScript
thiscouldbebetter/TacticsGame
/Source/Model/MapOfTerrain.js
UTF-8
1,707
3.03125
3
[]
no_license
"use strict"; class MapOfTerrain { constructor(cellSizeInPixels, pos, terrains, cellsAsStrings) { this.cellSizeInPixels = cellSizeInPixels; this.pos = pos; this.terrains = terrains; this.cellsAsStrings = cellsAsStrings; this.cellSizeInPixelsHalf = this.cellSizeInPixels.clone(...
true
cb7877dfd4a47f032e727ff488d1643bd1a84be2
JavaScript
originalrfr/moving-down
/game/lib/obstacle.js
UTF-8
756
3.375
3
[]
no_license
function Obstacle(width, y) { this.canvas = canvas; this.ctx = ctx; this.x = this.randomX(); this.y = y; // this.vy = vy; this.height = 5; this.width = width; // this.color = red; } Obstacle.prototype.draw = function () { this.ctx.save(); this.ctx.fillStyle = "#9B7E9B"; this.ctx.fillRect(this.x, this....
true
10e3a08fa798abcb1fb6de6990fce97ec5db51e3
JavaScript
DhruvPYS/Virtual-Pet-3-
/sketch.js
UTF-8
2,665
3.40625
3
[]
no_license
//Create variables here var dogimage, happydog, database, foodS, foodStock, dog, feeddog, addFood, lastFed, fedTime function preload() { //load images here dogimage = loadImage("Dog.png") happydog = loadImage("happydog.png") bedroomimg = loadImage("images/BedRoom.png") gardenimg = loadImage("images/Wash Ro...
true
3ccd0b46cfe76613c0a2c95e5d920cbd748cbe19
JavaScript
youssefbs/calculator-Reactjs
/src/App.js
UTF-8
3,586
2.75
3
[]
no_license
import React from 'react'; import Key from './Key' import './App.css'; class App extends React.Component{ state={ display:'0', keys:['clear','add','multiply',1,2,3,'divide',4,5,6,'subtract',7,8,9,'equals',0,'decimal'], operation:[], CurrentOpe:'' } elem=()=>{ let newop=[]; const {operati...
true
661e2ba3d8e4bd4b847a377ccfa154d38f704874
JavaScript
Verthon/theodinproject
/Etch-a-Sketch/app.js
UTF-8
778
3.25
3
[]
no_license
const canvas = document.querySelector('#canvas'); //const ctx = canvas.getContext('2d'); const container = document.querySelector('#draw-container'); const resetBtn = document.querySelector('#reset'); const draw = () =>{ for(let i = 1; i <= 64; i++){ const div = document.createElement('div'); div.setAttribut...
true
c0563b326593ba9ac73290e5266d0d2c9b36dbfd
JavaScript
xcaparros89/lab-javascript-greatest-movies
/src/movies.js
UTF-8
3,932
3.734375
4
[]
no_license
// Iteration 1: All directors? - Get the array of all directors. function getAllDirectors(arrMovies){ return arrMovies.map(movie=>movie.director) } // _Bonus_: It seems some of the directors had directed multiple movies so they will pop up multiple times in the array of directors. How could you "clean" a bit this ...
true
bdd8b2efd63a137e8a6bef13591f8ac9d5b20569
JavaScript
NLinh2911/Advanced-JS
/scope-context/test.js
UTF-8
276
3.28125
3
[]
no_license
const myObj = { name: 'object lúc đầu', myFunc: function () { console.log(this); // 'this' lúc này là myObj console.log(this.name); } } // ví dụ có 1 cái event handler function myObjEvent(myObj) { setTimeout(myObj.myFunc.bind(myObj), 3000) } myObjEvent(myObj)
true
453e40e77812086367f7e6e58bd64729cd7ef524
JavaScript
mahulst/code-tut
/script.js
UTF-8
182
2.859375
3
[]
no_license
console.log(123); addInputs = function () { input3.value = add(input1.value, input2.value); } add = function(a, b) { a = parseInt(a); b = parseInt(b); return a + b; }
true
88346b3f212719a777406e002243ebb37c13e2f8
JavaScript
webstorage119/ball-traking-openCvJs
/app.js
UTF-8
1,956
2.671875
3
[ "MIT" ]
permissive
document.body.classList.add("loading"); const video = document.querySelector('video'); const canvas = window.canvas = document.querySelector('canvas'); canvas.width = 320; canvas.height = 180; const constraints = { audio: false, video: { width: 320, height: 180 } }; function onOpenCvReady() { document.body.cla...
true
0878d53dc3c224bab882a247a42085c491bd4b8b
JavaScript
borjatur/TennisTournamentApp
/app/graphicalLayout.js
UTF-8
2,166
3.0625
3
[]
no_license
export function drawListOfPlayes(players) { var stringHTML = ''; for (var i = 0; i < players.length; i++) { stringHTML += `<li class="list-group-item">`; stringHTML += `<span class="playerName">${players[i].name}</span>`; stringHTML += `<button type="button" class="close" data-index="${i}" aria-l...
true
2757a4bb4efa110be2c31cf006eebc7111ecc5ed
JavaScript
tomhero/frontend-bootcamp
/react-js/react-hooks/src/components/Ingredients/Ingredients.js
UTF-8
3,655
2.53125
3
[ "Unlicense" ]
permissive
import React, { useReducer, useEffect, useCallback, useMemo } from 'react'; import IngredientForm from './IngredientForm'; import IngredientList from "./IngredientList"; import Search from './Search'; import ErrorModal from '../UI/ErrorModal' // use custom hook import useMyHttp from '../../hooks/http'; const ingred...
true
ae56e73fdb75fd84457690b7cb7cdfc885f07827
JavaScript
venam/gravity-guy
/Tips.js
UTF-8
2,274
3.03125
3
[]
no_license
function TipsState(game, image) { State.call(this,game); this.image = image; this.maxSlower = 15; this.slowerCounter = 0; this.transitionTime = 90; this.transitionColor = "#FFFFFF"; this.transitionCounter = 0; } TipsState.prototype = new State(); TipsState.prototype.constructor = TipsState; //draw on th...
true
05a0e69e21efad974f69f67fd77347f3399748c0
JavaScript
oresh/chrome-ext-fb-btdhay
/js/options.js
UTF-8
3,273
2.859375
3
[]
no_license
var main_tabs = new Tabs('#main_tabs'); document.addEventListener('optionsPageReady', function () { /* Options page is ready. Write your code here */ (function($) { //storage.area.set({'book':'hello!'}); function getGreetingText(greetings, prewishes, wishes) { var smiles = [ '😘','🙂','😊','☺'...
true
a1e0f92d46b54ab295a7a8385a868ddc22f96001
JavaScript
camike/magic-box
/server/database.js
UTF-8
1,729
2.890625
3
[]
no_license
var fs = require('fs'); var pageItemList = []; fs.readFile('data.json', function (err, data) { if (err) { return console.error(err); } pageItemList = JSON.parse(data.toString()); }); getItemIndexByUrl = (list, url) => { for (var i = 0; i < list.length; i++) { if (list[i].url === url) { return i;...
true
2587ceafb6ce33dea1c5b52439ed3cf7452198fc
JavaScript
pakalnute/React
/src/components/Circle1.jsx
UTF-8
974
2.671875
3
[]
no_license
import { useState } from "react"; function Circle1(props) { const [counter1, setCounter1] = useState(0); const [counter2, setCounter2] = useState(0); const addOne = () => { setCounter1(counter1 + 1); } const addMany = () => { setCounter2(counter2 + counter1); } const set...
true
1e5580dfd158df8376647b67873f3407ff9f25ac
JavaScript
JoseOropeza-uru/FileUploadExample
/src/main/webapp/js/app.js
UTF-8
1,105
2.75
3
[]
no_license
function $ (id) { return document.getElementById(id); } var xhr = new XMLHttpRequest(); var myFile = ""; function upload () { var formData = new FormData(); formData.append("file", $("file").files[0]); myFile = $("file").files[0].name; xhr.onreadystatechange = function () { if (xhr.status === 200 && xhr.ready...
true
e7e3e4ab24cc020d381595596308d1f71d4b462e
JavaScript
VIRIATO80/nodepop6
/controllers/apiController.js
UTF-8
4,456
2.984375
3
[]
no_license
'use strict'; //Ciframos los métodos del API const jwt = require('jsonwebtoken'); // importamos las variables desde nuestro archivo variables.env //Usamos para ello el módulo dotenv const dotenv = require('dotenv'); dotenv.config({ path: 'variables.env' }); const mongoose = require('mongoose'); const Anuncio = mongoos...
true
59f45d5df661d2890daf40cc7ee323e9d744429c
JavaScript
ebizo-0202/AtCoder
/src/AISing-c.js
UTF-8
430
3.21875
3
[]
no_license
(async () => { process.stdin.setEncoding('utf8'); let text = ''; for await (const chunk of process.stdin) text += chunk; const lines = text.toString().split('\n'); const tmpArray = lines[1].split(' '); const count = lines[0]; let result = 0; for (let i = 0; i < tmpArray.length; i++) { if (i % 2 ==...
true
44604966fdf2ece5537e71060b12849ff8e62aa6
JavaScript
jarihte/zaru
/examples/lib/shaders/drawTexture.js
UTF-8
2,980
2.59375
3
[ "MIT" ]
permissive
getDrawTextureShader = function (num, size, flipY) { if (num <= 1) { return regl({ vert: quadShader.vertexShader(flipY), // language=GLSL frag: ` precision mediump float; uniform sampler2D texture; uniform float xOffset; uniform float yOffs...
true
db598d4be25040c35531925ce56148bc170a014a
JavaScript
NasreenKhalid/Expensify-app
/src/playground/destructuring.js
UTF-8
419
2.859375
3
[]
no_license
console.log("destructuring"); // const books = { // title: "Ego is the Enemy", // author: "Ryan Holiday", // publisher: { // // name: "Penguin", // }, // }; // const { name: publisherName ='Self-Published' } = books.publisher; // console.log(publisherName); const items = ["Coffee (hot)", "$2.00", "$2.50",...
true
33cdcae2eb0ed2c3783f9b169d889dbdc894a026
JavaScript
EduardoCHenrique/sass2scss
/lib/sass2scss_parser.js
UTF-8
2,420
2.515625
3
[]
no_license
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va...
true
c22c045c5693859d4de616f9b04e0cf9cabb080a
JavaScript
niiick1/cashflower-api
/app/api/transaction/transaction.test.js
UTF-8
1,796
2.515625
3
[]
no_license
const chai = require('chai'), assert = chai.assert, Transaction = require('./transaction') describe('Transaction Model', () => { it('Should be invalid if description is empty', () => { const transaction = new Transaction() return transaction.validate() .then(() => assert.fail(undefined, undefined,...
true
42f837d539efe5f0bc4f8645cd65090414ee7d6f
JavaScript
Bondi1/blue-weather-widget
/src/__tests__/openWeather/useOpenWeather.test.js
UTF-8
2,422
2.515625
3
[]
no_license
import MockAdapter from 'axios-mock-adapter'; import { renderHook } from '@testing-library/react-hooks'; import axios from 'axios'; import useOpenWeather from "../../openWeather/useOpenWeather"; // Move to mock data file const apiCurrentResponse = { dt: 1606508729, sunrise: 1606459100, sunset: 1606490693,...
true
2d7c587aa8beeb0f7ccff297ef814b45218954f5
JavaScript
regmish/dsa
/ds/linkedList/doublyLinkedList.js
UTF-8
2,038
4.09375
4
[]
no_license
class ListNode { constructor(data, next = null, prev = null) { this.data = data; this.next = next; this.prev = prev; } } class DoublyLinkedList { constructor() { this.head = null; this.tail = null; } insertFront(data) { const node = new ListNode(data, this.head, null); if (this.h...
true
0da2c0ffbb851f0f2a2ca92a0f271fe3d67643bd
JavaScript
MaxicanArmy/myfs
/plugins/myfossil-specimen/assets/src/js/public/single/geochronology.js
UTF-8
7,992
2.53125
3
[]
no_license
(function($) { 'use strict'; var SCALES = { 1: 'eon', 2: 'era', 3: 'period', 4: 'epoch', 5: 'age' }; var SCALE_NAMES = ['eon', 'era', 'period', 'epoch', 'age']; var GEO_DATA; function reset_geochronology() { $.map(SCALE_NAMES, function(level) {...
true
06b6cd61bacb513279eeb0abb40707b20bf1c418
JavaScript
JGPenaB/Pasante-bot
/src/modules/cmd/stock.js
UTF-8
2,378
2.65625
3
[ "MIT" ]
permissive
const { Message } = require('discord.js'); const axios = require('axios'); const { decimalFix, randomWithLimit } = require('../../utils/numbers'); const messages = require('../messages/stock'); const botUtils = require('../../utils/bot'); /** * Lista de alias válidos para el comando * @return { Array<string> } */ c...
true
b1bc8af8de4cbdd6ccdba57e34855fc84be5dd00
JavaScript
ericmjl/graph-deep-learning-demystified
/js/carousel.js
UTF-8
1,491
3.34375
3
[ "MIT" ]
permissive
// Global state for slide indices. // First position corresponds to first slideshow, // second position correspond to second slideshow deck, etc. var slideIndex = [1, 1]; // Slide classes to select. var slideClasses = ["bestCutterSlides", "worstCutterSlides"] showSlides(1, 0); showSlides(1, 1); // Next/previous contr...
true
3560b0d0cb5fe523f662fa94f549b55b23b237bf
JavaScript
halocline/literary
/server/server.js
UTF-8
2,191
2.5625
3
[]
no_license
// server.js // // // 'use strict' const express = require('express') const morgan = require('morgan') const helmet = require('helmet') const exphbs = require('express-handlebars') const literary = require('../frontend/literary') const publication = require('../entities/publication/publication') publication.helloWor...
true
761f79c976c6148c320b21a03ebdea721db5aaa1
JavaScript
vivek07542/decision_tree
/js/userDecisionMaking.js
UTF-8
4,858
3.09375
3
[]
no_license
let userLocalStorage = JSON.parse(localStorage.getItem("userLocalStorage")); let displayUserName = document.getElementById("displayUserName"); let displayQuestion = document.getElementById("displayQuestion"); displayUserName.innerText = userLocalStorage.username; // Function On Load function onLoad() { genera...
true
d2a6bfb36e4e1de5166967f38618b80aca198094
JavaScript
ElsongMaster/JAVASCRIPT_exos
/exo recap/public/js/main.js
UTF-8
1,255
3.4375
3
[]
no_license
//Exo 1 let tabPrenoms = [ "Ali", "Yassin", "Kevin", "Nasila", "Ilias", "Agim", "Nathan", "Stanislas", "Jean", ]; let tabLength = tabPrenoms.length; console.log(`Bonjour ${tabPrenoms[0]}`); console.log(`Bonjour ${tabPrenoms[1]}`); console.log(`Bonjour ${tabPrenoms[2]}`); console.log(`Bonjour ${tabPr...
true
7bbe1c9baba2102c187baa69c096ac82f15ab52b
JavaScript
manisharyanmx/Auth0andGraph
/src/views/chart.js
UTF-8
1,793
2.578125
3
[]
no_license
import React, { useState, useEffect } from 'react'; import ReactApexChart from 'react-apexcharts'; const URL = "https://run.mocky.io/v3/cc4c350b-1f11-42a0-a1aa-f8593eafeb1e" const Chart = () => { const [data, setData] = useState([]) const fetchData = async() => { return await fetch(`${URL}`) .then(res => res....
true
88b0c99677ce3e1931d606192aba80e15c51eb8e
JavaScript
dnlsngr/celebrity
/test/pages/actions-test.js
UTF-8
7,242
2.65625
3
[]
no_license
import actions from "actions"; import * as _ from "lodash"; import { initialState } from "store"; import { NEW_ROUND_PAGE, TURN_READY_PAGE, PLAY_ROUND_PAGE, GAME_OVER_PAGE } from "store"; describe("actions", () => { const underTest = actions(); describe("addName", () => { it("should add a name to allN...
true
20a616a5a0a83f3812d1800d5dbe061a243aa842
JavaScript
Vesper0704/Nodejs
/黑马教程/src/mysql/connect.js
UTF-8
1,323
2.75
3
[]
no_license
const mysql = require('mysql') const conn = mysql.createConnection({ host:'localhost', user:'root', password:'drj990704', database:'drj_1' }) conn.connect(err=>{ if(!err){ console.log('success connect') }else{ console.log('failure'); } }) /* let createSql = 'create tab...
true
8e503fe2359cf0983383baaaf6fad928938e66e9
JavaScript
Ugenberg/JSGameCollection
/Mastermind/mind.js
UTF-8
1,823
3.265625
3
[]
no_license
Game = function(digits, colors, limit) { this.digits = digits; this.colors = colors; this.maxCount = limit; this.solution = []; this.guessCount = 0; this.html = new View(this); this.init(); }; Game.prototype.init = function() { this.guessCount = 0; this.solution = []; for (let i = 0; i < this.digit...
true
bc7caaf107b43f623faac6c448b0354165df659c
JavaScript
sabbracciavento/TP2Futbolear
/src/data/DAOpartidos/DAOpartidosArray.js
UTF-8
1,652
2.890625
3
[]
no_license
const partidos = [] // async function getPartidosJson() { // try { // const p = await readFileAsync('./src/data/arr/partidos.json', 'utf8'); // const parsed = JSON.parse(p) // console.log(parsed) // return parsed; // } catch(err) { // console.log(err) // } // } // ...
true
3c60f48a69206bc11d9fd8acd0292db1055815c0
JavaScript
JulHee/MouseBreed
/script/js/content/play/playSupport.js
UTF-8
1,853
3.09375
3
[]
no_license
/** * Filename : playSupport.js * * This file contains all help functions for the play.php file. * */ function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } function getInfo(mouseid) { var data = loadedBreed; var thisCage = data.cages; var thisMice = thisC...
true
1331e3b97449c20c97d87ac609441167b856ca16
JavaScript
HAIL9000/react-practice
/src/pages/weather.js
UTF-8
1,419
2.875
3
[ "MIT" ]
permissive
import React, { useState } from "react"; import { Link } from "gatsby"; import Layout from "../components/layout"; import SEO from "../components/seo"; function WeatherDisplay() { const city = "London"; const country = "UK"; //Don't forget to add this back in after pushing to GitHub const key = ""; let [hi...
true