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
17fdcb50e1c379e212944b3bb1b11a9944ebc0aa
JavaScript
bioxuxuan/ozone
/demo/angular-demo/app.js
UTF-8
3,664
2.515625
3
[ "Apache-2.0" ]
permissive
/** * Created by Erin Gaschott and Reilly Grant on 3/24/15. */ (function(){ var app = angular.module('angularDemo', []); app.controller('DataController', [ '$scope', '$http', function($scope, $http){ var dataCtrl=this; $scope.allPossibleFilters=[]; $scope.unfilteredDb = {}; // da...
true
20b038298aeb038db9058825a892bc6f1463f49d
JavaScript
tak2siva/SpiCinemasUI-TeamB
/src/app/filter/movieFilterReducer.test.js
UTF-8
1,328
2.671875
3
[]
no_license
import movieFilterReducer from './movieFilterReducer'; import { COMING_SOON, CHANGE_MOVIE_TYPE } from './movieType/actions'; import { CHANGE_MOVIE_LANGUAGE } from './language/actions'; it('should return the same state if the action-type is unknown', () => { const state = {movieType: 'NOW_SHOWING', selectedLanguages...
true
98ec22127d77b0e3fd6cdb4bb6f2be90c10a4ef6
JavaScript
sugandhgoyal/React-CRUD-Application
/app/containers/HomePage/index.js
UTF-8
1,497
2.5625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/* * HomePage * * This is the first thing users see of our App, at the '/' route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it and remove * the l...
true
ddec2a670229157d094fca6e8049332629a2ea3a
JavaScript
kule2018/coding-interviews
/3-数组中重复的数字/index.js
UTF-8
727
3.140625
3
[]
no_license
export const findRepeatNum1 = numbers => { const numMap = {} const length = numbers.length let repeatNum = -1 let i = 0 while (i < length && repeatNum === -1) { const num = numbers[i] if (num in numMap) { repeatNum = num } else { numMap[num] = 1 i++ } } return repeatNum...
true
1f926d948a79fbb42314ffafdc21d7cd6d0cd467
JavaScript
jser/classifier-item-category
/data/install-hook.js
UTF-8
1,154
2.890625
3
[ "MIT" ]
permissive
// LICENSE : MIT "use strict"; const fs = require("fs"); const path = require("path"); const request = require("request"); function getURLAsync(URL) { return new Promise(function (resolve, reject) { request(URL, function (error, response, body) { if (error) { return reject(error)...
true
ecff81a4dac402af0bd5a5a38157b8e1ea0bb8b7
JavaScript
kthorpe1023/office-employees
/src/App.js
UTF-8
2,224
3.1875
3
[]
no_license
import React from "react"; import EmployeeList from "./components/EmployeeList" import employees from "./employees.json" import Wrapper from "./components/Wrapper/index.js" import Header from "./components/Header/index.js" import Filter from "./components/Filter/index.js" class App extends React.Component { //stat...
true
baed8277762a10a7815a67f86d786c7fee87ba19
JavaScript
SysLegBG/PB-JS
/9-WhileLoop-Lab/accountBalance.js
UTF-8
520
3.3125
3
[]
no_license
function solve(input){ let balance = 0; let a = input.shift(); while(true){ if(a == "NoMoreMoney"){ break; } if(a < 0){ console.log("Invalid operation!") break; } a = Number(a); balance += a; console.log(`Increase: ...
true
cdd6ebb53a8b10e08aad28f70211e4faf9650dd6
JavaScript
ajvidal91/coin-flip-app
/js/main.js
UTF-8
556
3.390625
3
[]
no_license
// Create a simple web application that uses the fs and http // modules. Use http to create the server and fs to read your html // le. Include vanilla ES6 js in a script tag at the bottom of your // html le. Try creating a coin ip guessing game! document.getElementById("flip").onclick=function(){ var coin = document...
true
91038fe9c689258671bd75ea6c7d71b36bf3ff7c
JavaScript
Smarco10/ProjectPhoto_BackEnd
/src/middleware/imageResizer.js
UTF-8
1,401
2.625
3
[ "MIT" ]
permissive
// A hook that check if a file exists or not on the server const fs = require("fs"); const gm = require('gm').subClass({ imageMagick: true }); const default_format = "PNG"; const default_size = { x: 1000, y: 1000 }; module.exports = function(filePath, size, format) { if (!size) { size = defa...
true
2bb489df7275571572c37502e05bddf307f85c20
JavaScript
stopaalex/Gym-Tracker
/scripts.js
UTF-8
219
2.796875
3
[]
no_license
///////////////////////// // Main script.js file // ///////////////////////// // DECLARE VARIABLES // var // DECLARE FUNCTIONS // initialize(); function initialize() { console.log('Initialzie'); } initialize();
true
f84d6e0e46765d3f477a21523f091807c5d7a61d
JavaScript
ritwizsinha/Xmeme
/client/src/components/Modal/index.js
UTF-8
4,840
2.515625
3
[]
no_license
import React, { useContext, useEffect, useState, useCallback } from 'react' import ReactDOM from 'react-dom'; import './style.css'; import { PostContext } from '../../Context'; // Notification manager helps in issuing out notifications import { NotificationManager } from 'react-notifications'; import axios from 'axios'...
true
09763bea31b56c5798f2203b0c1036909537c885
JavaScript
ARandomInvestor/amfeix-api
/src/ethereum/EthereumUnitConverter.js
UTF-8
989
2.84375
3
[ "MIT" ]
permissive
'use strict'; import BigNumber from "bignumber.js"; const units = { eth: new BigNumber("1000000000000000000"), gwei: new BigNumber("1000000000"), wei: new BigNumber("1") }; export class EthereumUnitConverter{ constructor(wei) { this.wei = wei instanceof BigNumber ? new BigNumber(wei) : new Bi...
true
d3ca6ec27c085cf0dd13b569be4c92e148ecc140
JavaScript
ScottMikul/stopandshop
/public/assets/js/add-to-cart-button.js
UTF-8
1,848
3.09375
3
[]
no_license
$(document).on("click", ".add-to-cart", function (event) { event.preventDefault(); alert("You Add One item In Your Cart !"); let id = $(this).attr("value"); let item_header = $("#item_header").attr("value"); let item_price = $("#item_price").attr("value"); let img_url = $("#img_url").attr("src")...
true
58626a1792c23ff1353623907af8e00ad51e184c
JavaScript
karenBarseghyan91/JSLeassonHomework
/homeWork1.js
UTF-8
3,353
3.375
3
[]
no_license
////////////////task 1// function numType(myNum){ if(myNum % 2 == 0){ console.log('even'); } else if(myNum % 2 == 1 ){ console.log('odd'); } } //////////////task 2 // function numAverage(num1,num2,num3,num4,num5){ let result = (num1+num2+num3+num4+num5) / 5; ...
true
29cc35d0cd0183d9803f3f3a01931bba418a2e47
JavaScript
onyxcorp/scrapper
/v2/services/ai/classifiers/type.js
UTF-8
1,821
2.875
3
[]
no_license
var natural = require('natural'), types = require(__dirname + '/../data/types.js'), classifier = new natural.LogisticRegressionClassifier(); /** * ACIDO LINOLEICO */ types.linoleicAcid.forEach( function (keyword) { classifier.addDocument(keyword, 'Acido Linoleico'); }); /** * ALBUMINA */ ty...
true
4d4c91e41062aefa0d0a9ea88589a10756df8d6c
JavaScript
Mikkhael/pajacbot_v2
/bot/actionManager/actions/whoispajac/index.js
UTF-8
683
2.703125
3
[]
no_license
const MessageAction = require("../../messageAction"); function getPajacInAChannel(channel) { return channel.guild.getRandomPajacableMember(); } const messageAction = new MessageAction( "whoIsPajac", 1000, {}, function(message){ const whoIsPajacRegExp = /kto\s*jest\s*pajacem/i; ret...
true
d192d69fc14fa734faffdde20d952af33cdc2558
JavaScript
sueddeutsche/editron
/dist/module/src/editors/AbstractEditor.js
UTF-8
2,731
3.171875
3
[ "MIT" ]
permissive
export function getTypeClass(schema) { return schema.type === "array" || schema.type === "object" ? schema.type : "value"; } /** * This is an optional base class for a custom editor. Inheriting from AbstractEditor will setup most required * editor-methods to work by default, while still allowing custom implementa...
true
a200bd8f35c8a84566eafba80fe3f4e8ff96bf0c
JavaScript
christlang/parcelTracking
/src/parcel/controller.js
UTF-8
3,658
2.640625
3
[ "MIT" ]
permissive
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */ const model = require('./model'); /** * * * @param timestamp expected format YYYY-MM-DD HH:MM:SS.SSS * @return format YYYY-MM-DD */ function convertTimestampToDate(timestamp) { if (timestamp === null) { return ''; } return timestamp.subs...
true
39a04263ae15c590f5c713b14cae701d68a9787b
JavaScript
MarlonPerez-01/SensorApp
/frontend/src/components/Luz.jsx
UTF-8
1,698
2.609375
3
[]
no_license
import React, { useEffect, useState } from 'react'; import { obtener } from '../helpers/fetchLuz'; import LinealLuz from './graficos/LinealLuz'; const Luz = () => { const [sanSalvador, setSanSalvador] = useState([]); const [usulutan, setUsulutan] = useState([]); const [morazan, setMorazan] = useState([]); cons...
true
c696b41022f0061947165e091f5bacff54b6a01e
JavaScript
MounikaBeerelly/Data-Structures-And-Algorithms
/JS-Algorithms/Algorithms/ReverseArrayInPlace.js
UTF-8
606
4.5625
5
[]
no_license
// Reverse Array in place => arr[0] - arr[n] & arr[1] - arr[n-1] & so on... function ReverseArrayInPlace(arr) { for(var i = 0; i <= arr.length /2; i++) { // iterate each element in an array var tempVar = arr[i]; // define temp variable arr[i] = arr[arr.length - 1 - i]; // first value in array is r...
true
eee7cbd5ce49ea75dfc18a60db956ead714025e2
JavaScript
BigNikO/soft-uni-repos
/JavaScript/JsCore/JsFundamentals/JSExam-14.08.2018/01.CoffeeMachine.js
UTF-8
1,350
3.296875
3
[ "Apache-2.0" ]
permissive
function coffeeMachine(input) { let incomeReport = 0; for (let i = 0; i < input.length; i++) { let totalPrice = 0; let insertedCoins = +input[i].split(', ')[0]; let product = input[i].split(', ')[1]; if (product === 'coffee') { totalPrice += input[i].split(', ')[2] === 'caffeine' ? 0.8 : 0.9;...
true
56b284b767a59a7ffcf8a697c47a1fcbe9151600
JavaScript
CoNnEcT500BR/Discord.JS-12.5.3
/commands/help.js
UTF-8
1,208
2.671875
3
[ "MIT" ]
permissive
const Discord = require("discord.js"); module.exports = { run: (client, message, args) => { /** Objeto embed que irá ser enviado. */ let embed = new Discord.MessageEmbed() .setTitle(`Painel de ajuda do ${client.user.username}`) .setColor("#2f4fc4") .setDescription('Todos os comandos...
true
089445a8868b07d4f0fbbfbe1775e8ad19772ea4
JavaScript
irvelervel/apr21-strivestaurant-pt3
/src/components/ReservationForm.jsx
UTF-8
7,343
3
3
[]
no_license
import { Component } from 'react' import { Form, Button } from 'react-bootstrap' // import upperName from '../helpers/lib' // OUR ENDPOINT NEEDS: // name - string // phone - string | number // numberOfPersons - string | number // smoking - boolean // dateTime - string // specialRequests - string // let ...
true
5af0b2e253aa2bd11c537d4b09318a74d4d1149b
JavaScript
EdoJunior/InternshipProject
/Junior Internship files and documents/Smart_dash/js/myJS/myScript.js
UTF-8
2,521
2.640625
3
[ "MIT", "Apache-2.0" ]
permissive
/** * Created by ClOwNzInZiSkYzZz on 7/22/2016. * These function work with the index page for the graph * these functions take care of building the widget * Sorting them */ var storage = localStorage; var clicks = initClicks(storage); $(document).ready(function() { installWidgets(); init() rearrang...
true
87f8bc6c117de2b379b167646a0f7bc1c28204ec
JavaScript
MiBoCun/Code-Records
/LeetCode/easy/climbing-stairs.js
UTF-8
182
2.9375
3
[]
no_license
let climbStairs = function (n) { //滚动数组 let ary = [0, 1, 2] for (let i = 3; i <= n; i++) { ary[i] = ary[i - 1] + ary[i - 2] } return ary[n] };
true
2a53fcc4caa14556e70d7f01aebbc3779a0eb904
JavaScript
treb0ry/traind3
/src/index.js
UTF-8
28,151
2.640625
3
[]
no_license
import * as d3 from "d3"; import { Delaunay } from "d3-delaunay"; async function getDataset() { return await d3.json("./my_weather_data.json"); } async function drawLineChart() { let dataset = await getDataset(); const yAccessor = d => (d.temperatureMax - 32) * (5 / 9); const dateParser = d3.timeParse("%Y-%m-%...
true
318bed3dc6695bd4b071e18deb5bcf2ad56adeb6
JavaScript
TimMikeladze/js-tower-defense
/javascripts/app/graphics/animator.js
UTF-8
674
3.03125
3
[]
no_license
var Animator = function () { this.currentFrame = 0; this.currentFrames = []; this.time = null; this.defaultFrame = 0; this.setDefaultFrame = function (frame) { this.defaultFrame = frame; } this.tick = function (time, animation, frames) { this.currentFrames = frames; var speed = animation.getFrame(this.c...
true
8042eebc51b16f5a70c96a06c8ec8550748c1f52
JavaScript
Az-s/simple-server-73
/index.js
UTF-8
565
2.53125
3
[]
no_license
const express = require('express'); const Vigenere = require('caesar-salad').Vigenere; const app = express(); const port = 8000; const password = 'abc'; app.get('/encode/:string', (req, res)=> { res.send('Crypted pass ' + Vigenere.Cipher(password).crypt(req.params.string)); }); app.get('/decode/:string', (req,...
true
709bb0a1147659ce270c2dae5025506cd8ef178a
JavaScript
edsonmaia/imersao-gamedev
/scripts/jogo/moedinhas.js
UTF-8
313
2.625
3
[]
no_license
class Moedinhas { constructor() { this.moedinhas = 0; } exibeMoedaPlacar() { image(imagemMoeda, width - 30, 70, 25, 25); } exibe() { fill('yellow'); textAlign(RIGHT); textSize(50); text(this.moedinhas, width - 30, 100); } adicionarMoeda() { this.moedinhas++; } }
true
eb9c57d889cb1c7f4d2e761cf1b8d677e186308e
JavaScript
Blocktron-Project/blocktron-node
/src/routes/blocktron.js
UTF-8
570
2.578125
3
[ "MIT" ]
permissive
/** * blocktron router and controller * @module routers:blocktronRouter */ const express = require('express'); const blocktronRouter = express.Router(); /** * GET blocktron blockchain listing. * @function * @name get/blocktron * @memberof routers:blocktronRouter * @param {String} path - Express route path * @...
true
c6601ac84b5df8bae06c9ab262889171899230e2
JavaScript
zero-xposur/zerosum
/src/reducers/beer.js
UTF-8
504
2.609375
3
[]
no_license
import axios from 'axios'; const GOT_BEER = 'GOT_BEER'; const gotBeer = beer => ({ type: GOT_BEER, beer, }); export const beerReducer = (state = {}, action) => { switch (action.type) { case GOT_BEER: return action.beer; default: return state; } }; export const...
true
153f6079f79a7f11359cfc51c896fdfc54a85513
JavaScript
eight04/image-picka
/src/lib/url-map.js
UTF-8
925
2.671875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
import {pref} from "./pref.js"; import {parseText} from "./readline.js"; let transforms = []; pref.ready().then(() => { update(); pref.on("change", change => { if (change.urlMap != null) { update(); } }); }); function update() { transforms = [...parseText(pref.get("urlMap"), 2)] .map(lines ...
true
8a2c72da0ea94151ffaa6ac17a41f0009f4a916b
JavaScript
bacak2/wolf
/js/generator-hasla.js
UTF-8
871
3.3125
3
[]
no_license
function getRandomString (length, level) { chars = []; chars['letters'] = 'qwertyuiopasdfghjklzxcvbnm'; chars['lettersBig'] = 'QWERTYUIOPASDFGHJKLZXCVBNM'; chars['digits'] = '1234567890'; chars['special'] = '!@#$%^&*()_+-=[]{};:,.<>?'; charsString = ''; if (level > 0) charsString += cha...
true
8af962df6459fad33e9530d8a73acfd86305228a
JavaScript
javascript-sucre/curso-nodejs
/clase01/babel/main.js
UTF-8
814
4.375
4
[]
no_license
// creando la clase Message con un metodo que permita sumar 2 números class Message { // contructor que inicializa los LOGS constructor() { this.listLogs = []; } // método que guarda en una array los LOGS log(log) { this.listLogs.push(log) } // método que realiza la suma d...
true
c5021271558f34f3a623ee9a2234ff79596f10df
JavaScript
dimparis/computer-product-suggestion
/code/CPS_Solution/CPS_Solution/Template/stylish.holobest.com/scripts/compare-products.js
UTF-8
3,128
2.671875
3
[]
no_license
$(function () { var productScore = $(".product-score"); var productRatio = $(".product-price-ratio"); if ($(".product-score").length == 2) { var p1 = productScore[0].innerHTML; var p1ID = productScore[0].attributes['product-id'].value; var p1Ratio = productRatio[0].innerHTML...
true
a58c099bd78855ca636b29466431808d5eaa57aa
JavaScript
keshshah/COMP426FinalProject
/public/script.js
UTF-8
17,650
2.578125
3
[]
no_license
auth.onAuthStateChanged(user => { if (user) { isLogged = true; username = user.email; let ref = db.collection('users').doc(username).collection('Saved Parks'); ref.get().then((m1)=>{ m1.forEach(collection => { address = collection.data().parkAddress; ...
true
c5069282ade5eb46d1952d95080dc5e3209b116a
JavaScript
JM0885/tinyapp
/helpers.js
UTF-8
210
2.734375
3
[]
no_license
const getUserByEmail = (email, users) => { for (let user_id in users){ if(users[user_id].email === email) { return users[user_id]; } } return null; }; module.exports = { getUserByEmail };
true
de1be452127365dca829dd020edca8b2222f3337
JavaScript
colorbox/AtCoderLog
/abc/088/b.js
UTF-8
457
3.640625
4
[]
no_license
function compareNumbers(a, b) { return a - b; } function main(input) { const input_array = input.split("\n"); const cards = input_array[1].split(' ').map(x => parseInt(x, 10)).sort(compareNumbers).reverse(); var alice = 0; var bob = 0; for(i=0; i<cards.length; i++){ if(i%2==0){ alice+=cards...
true
4e9ba766a473a45abc4327816b22db837888e89d
JavaScript
stevebull/CellphoniaSelfieTheater
/max/OTSClient/code/copyfile.js
UTF-8
490
2.78125
3
[]
no_license
inlets = 1; outlets = 1; var chunksize = 10000; function copyfile(src, dst) { var srcFile = new File(src, 'read'); var dstFile = new File(dst, 'write'); var srcEnd = srcFile.eof; var bytesWritten = 0; while (bytesWritten < srcEnd) { var bytesToRead = Math.min(chunksize, srcEnd - bytesWritten); var...
true
0f92c468e8c65b498d555703c8708846f1d54010
JavaScript
brooksryan/sportsbettingstats
/eloTest.js
UTF-8
1,580
3.546875
4
[]
no_license
var User = function (name,score){ this.name = name; this.score = score; this.gamesPlayed; var userScore = this.score; this.announceScore = function (userScore) { console.log("after "+this.gamesPlayed+" games played, this is "+this.name+"'s score: "+this.score); }; }; var Shane = new Use...
true
a7dc38a1d29dcd9534344819675f8ce61a6b60ca
JavaScript
ANPayeras/Countries
/client/src/context/UserState.js
UTF-8
4,356
2.59375
3
[]
no_license
import React, { useReducer } from 'react'; import UserReducer from './UserReducer'; import UserContext from './UserContext'; import axios from 'axios'; const UserState = (props) => { const initialState = { allCountries: [], searchedCountry: [], activities: [], countriesByContinent:...
true
493fa2634b03339f918cc4809c3b91c15b09a1cb
JavaScript
ryubien/DDL
/discord.js
UTF-8
2,336
2.6875
3
[]
no_license
const config = require("./config.json"); const Discord = require("discord.js"); const client = new Discord.Client(); const Enmap = require('enmap'); client.settings = new Enmap({ name: "settings", fetchAll: false, autoFetch: true, cloneLevel: 'deep' }); const defaultSettings = { prefi...
true
86fbc21cb6c41870572494b467ed50ea77c7bca0
JavaScript
thiagocom/user-authenticate-api
/src/controllers/user.controllers.js
UTF-8
1,043
2.53125
3
[]
no_license
const User = require("../models/user.models") const { generate } = require("../utils") class UserController { static async register(req, res) { const { username, password } = req.body if (!username || !password) { return res.status(206).json({ error: "username or password invalid" }) } if (await User.fin...
true
d9477d79b104137b3549698c2950a0bb383c4c29
JavaScript
dwisk/PixelNode
/lib/PixelNode_Sound.js
UTF-8
2,191
2.65625
3
[ "MIT" ]
permissive
/** * PixelNode_Sound * * Base class for managing fonts * * -------------------------------------------------------------------------------------------------------------------- * * @author Amely Kling <mail@dwi.sk> * */ /* Node Inclues * ======================================================================...
true
f19c9e18c0dfe15c35ff4db2db046b0b0e537f6e
JavaScript
MoonshineSG/OctoPrint-TitleStatus
/octoprint_title_status/static/js/title_status.js
UTF-8
1,261
2.5625
3
[]
no_license
$(function() { function TitleStatusViewModel(viewModels) { var self = this; self.onAllBound = function () { self.default_title = document.title; } self.onDataUpdaterPluginMessage = function (plugin, data) { if (plugin != "title_status") { return; } self._update(data); } self.onEve...
true
08745c8490d887fe635addcefc361bb6752c7e34
JavaScript
DukeQIANSH/FlashJS
/src/loading/ImageLoader.js
UTF-8
3,762
2.59375
3
[ "Apache-2.0" ]
permissive
/* * ImageLoader is a part of FlashJS engine * * http://flashjs.com * * Copyright (c) 2011 - 2012 pixelsresearch.com, */ (function (w) { var ImageLoader = function (URL, options, callback, errorCallback, context) { this.context = context; this.options = options; this.callback = callba...
true
91442b2dbe00837386a2a717c89b3935f346c9e9
JavaScript
tungvv318/web-test
/Test/src/controllers/controllers.js
UTF-8
716
2.703125
3
[]
no_license
const MySQL = require('./../services/mysql'); const insert = async (req, res) => { let book = { name: req.body.name, author: req.body.author, published_date: req.body.date } await MySQL.insert(book); return res.send("Insert successfully!"); }; const findAll = async (req, res) => { const listBooks = ...
true
5a6a8f59c38db10d95ce266cfc1d954e00217004
JavaScript
pineapplepan/rabbit-run-game
/js/player.js
UTF-8
561
3.015625
3
[]
no_license
class Player { constructor() { this.height = 190; this.width = 170; this.x = 0; this.y = height - this.height; this.gravity = 0.2; this.velocity = 0; this.image; } drawPlayer() { this.velocity += this.gravity; this.y += this.velocity; if (this.y >= height - this.height) { ...
true
d1cc1ffa2f30b8e5f0b23247db83944babcfee7a
JavaScript
eloy522752868/portfolio-from-scratch
/assets/js/script.js
UTF-8
1,885
2.75
3
[]
no_license
//Eloy Gonzalez 04/06/2021 //Declaration of variables/array //Modified: 03/30/2021 //Made change to click to show latest project. var docLocation = "./assets/images/Eloy Gonzalez 2021 Resume.pdf"; var linkIn = "https://www.linkedin.com/in/egonzalez1/"; var gitHubRepos = [ "https://github.com/eloy522752868/e-commerce-...
true
aa2d1f61f15c4985a6a96cec569e36b534d0d05e
JavaScript
XSERO/IM-Here
/IMHere_server/utils/mysql.js
UTF-8
2,011
2.546875
3
[]
no_license
const mysql = require('mysql') // 配置信息 const mysqlConfig = require('../configs/mysql.js'); // 创建链接池对象 const pool = mysql.createPool(mysqlConfig); //统一执行sql语句,支持多语句查询,注意参数是二维数组 /* exec参数示例: [ ["insert into user_group values (?,?)",[11,11]], ["insert into user_friend set ? ",{user_id:'12',friend_id:12...
true
e583d15f037b12a005e18a72fbf11dbc2dad1cfa
JavaScript
dinosaadeh/BarjisGameServer
/game-server/app/util/rooms.js
UTF-8
624
2.890625
3
[]
no_license
var roomIndex=0; var availableRoom=undefined; function getNewRoomId(){ roomIndex++; return "Room-"+roomIndex; } function getAvailableRoomId(){ if(availableRoom===undefined){ availableRoom=getNewRoomId(); return availableRoom; } var returnedRoom= "".concat(availableRoom); avai...
true
5f9fbf1d496826b31ba3733f2b47578bb26e3e44
JavaScript
desyarmariena/learning-phase0
/week2/w2-exercise4.js
UTF-8
1,319
4.15625
4
[]
no_license
/* Soal 4 - Mengenal penggunaan Conditional Switch Case dalam JavaScript Kamu akan diberikan sebuah tanggal dalam tiga variabel, yaitu hari, bulan, dan tahun. Disini kamu diminta untuk membuat format tanggal. Misal tanggal yang diberikan adalah hari 1, bulan 5, dan tahun 1945. Maka, output yang harus kamu proses ad...
true
fa50f8823d1fac1de446264a8cf9f94efd724841
JavaScript
punkmap/redux_starships
/src/reducers/starshipReducer.js
UTF-8
1,100
2.84375
3
[]
no_license
import { FETCH_STARSHIPS, NEW_STARSHIP } from '../actions/types'; const initialState = { items: [], item: {}, newStarshipId: 0, } export default function(state = initialState, action) { switch(action.type) { case FETCH_STARSHIPS: console.log('FETCH_STARSHIPS action.type: ', a...
true
37f0c4fa640513ecf957b21a278df71a220524c8
JavaScript
ponycalypsenow/varia
/yarrow.js
UTF-8
1,637
3.109375
3
[]
no_license
var Yarrow = function(){ return{ getLine: getLine, getLines: getLines, getHexagram: getHexagram, getHexagramAndLines: getHexagramAndLines }; function getLine(){ var line = 0, pile = 50, left = 0, right = 0, hand = 0; pile--; for(var i = 0; i < 3; i++){ function random(){ var ret = 0; for(...
true
a58defe0068e46ebf1c49eab535b8e99215a5150
JavaScript
myna-p/PicturePerfect-Assignment
/src/PostReview.js
UTF-8
8,307
2.796875
3
[]
no_license
<<<<<<< HEAD import React, { Component } from "react"; import axios from 'axios'; import BeautyStars from 'beauty-stars'; class PostReview extends Component { //To Do: automate 'user_id' after implementing login functionality constructor(props) { super(props) this.state = { value...
true
e9222c8a5aa48df63f7e693606a042f746d995fc
JavaScript
matthewskory/node_library
/streams_and_buffers.js
UTF-8
1,844
3.25
3
[]
no_license
//streams and buffers - //buffer is a temp storage spot for data being transfered //buffer is filled with data and then passed on //stream is the stream of data from beginning to end including the buffer //duplex streams can both read and write var http = require('http'); var fs = require('fs'); //readable str...
true
f13d543ce164fae06756cbd7931d12234989ebef
JavaScript
vvpetkov/JavaScript-March-2020-Preparation
/03.ConditionalStatements/Live Demos/Conditional Statements/Demo/01.equality-numbers.js
UTF-8
450
3.5625
4
[]
no_license
const input = ['4', '5', '4']; const print = this.print || console.log; const gets = this.gets || ((arr, index) => () => arr[index++])(input, 0); const a = +gets(); const b = +gets(); const c = +gets(); const isAEqualToB = a === b; print(isAEqualToB); // false const isAEqualToC = a === c; print(isAEqualToC); // true...
true
0a69ecca5b58f69925fb8902d60f2ebcf59be695
JavaScript
casperin/boink
/test/index.js
UTF-8
3,586
3.28125
3
[ "MIT" ]
permissive
import {enter, exit, boink} from '../boink'; import Type from '../type'; import tape from 'tape'; tape('Basic exit', t => { const a = exit(Type.number)(n => n * 2); t.doesNotThrow(() => a(3), null, 'Does not throw when used correctly'); const b = exit(Type.string)(n => n * 2); t.throws(() => b(3), null, 'Does...
true
9c24a2acf7cc51fbac47ce28abefe99bc4831672
JavaScript
khushboo-choudhary/hackerrankSolutions-JavaScript
/Implementation/extraLongFactorials.js
UTF-8
413
3.109375
3
[]
no_license
function extraLongFactorials(n) { // Use BigNumber library var BigNumber= require("bignumber.js"); BigNumber.config({EXPONENTIAL_AT:1e+9, POW_PRECISION:0}); var fact=new BigNumber(1); for(var i=1; i<=n; i++){ fact= fact.times(i); } return fact.toString(); } function main() { ...
true
3a88af85dfeed65a402046bea114d3a002462fc6
JavaScript
MingkitDu/FlowersGifth
/Login/js/Phonelogincheck.js
UTF-8
1,531
2.625
3
[]
no_license
function Phonelogincheck(selector){ this.ele = $(selector).get(0); this.action(); } Phonelogincheck.prototype.action = function(){ var _this = this; var patternLoginPhoneName = /^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[05-9]))\d{8}$/; $(this.ele).find('.login_button').click(function(){ if(!patternLog...
true
915ff497817725afc2b6718faa22a7a18a1eb72a
JavaScript
Kunaal-l/Pluckingmango
/sketch.js
UTF-8
759
2.828125
3
[]
no_license
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; const Constraint = Matter.Constraint; var stone function preload() { } function setup() { createCanvas(1800, 1700); engine = Engine.create(); world = engine.world; stone = new Stone(200,200) ...
true
c75b6986957b5eb1a015f560a4619606bddfa5b2
JavaScript
cnmiller127/data-struct
/data-struct/src/pages/Tree.js
UTF-8
6,952
3.171875
3
[]
no_license
import React, {useState, useEffect, useRef} from 'react'; import TreeDraw from "../components/TreeDraw"; import {Button, Form, Input, Label} from "reactstrap"; import "../Style.css"; import TreeClass from "../utils/treeObj"; import bTree from "../utils/balancedTree"; var tree = new bTree(); tree.insert(5); tree.insert(...
true
8844b9465512dc62bb01fdc794e7d34ed96d47d3
JavaScript
lordmallam/tv-maze-test
/ui/src/utils/api.jsx
UTF-8
2,546
2.671875
3
[ "Unlicense", "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
import { API_URL } from './constants' import { NotFoundError, HTTPError } from './errors' const methods = ['get', 'post', 'put', 'patch', 'delete'] export default class ApiClient { constructor () { methods.forEach(method => { this[method] = (path, headers, { params, data } = {}) => { const appendP...
true
1b2e1d8926bb2ca5267992dfb2a689dd7b80c1b7
JavaScript
ulff/node-js-sandbox
/NotesNode/playground/debugging.js
UTF-8
107
3.03125
3
[]
no_license
var person = { name: 'ulff' }; person.age = 34; debugger; person.name = 'Olaf'; console.log(person);
true
fbc0436a80f0dd4eefcacf50f260e862d5f8afaf
JavaScript
stevenjlance/Lists-Loops-and-Traversals-Review-Part-1
/script.js
UTF-8
2,167
3.53125
4
[]
no_license
var manyNames = ["Alexa","Burke","Kasimir","Baxter","Carissa","Vielka","Derek","Jemima","Jackson","Keegan","Graham","Melissa","Jeanette","Grant","Kirsten","Naida","Brody","Ishmael","Kane","Seth","Rae","Eagan","Camille","Alana","Vance","Melinda","Tarik","Risa","Jordan","Camilla","Karly","Baker","Adena","Calvin","Kendall...
true
2c11f0c42af9af1dfb9ae27563faed0268a247bb
JavaScript
stephenneal/steve-gutenberg
/packages/block-library/src/calendar/edit.js
UTF-8
1,708
2.546875
3
[ "GPL-2.0-or-later", "MIT", "GPL-2.0-only", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.0-or-later", "LicenseRef-scancode-generic-exception", "LicenseRef-scancode-other-copyleft", "GPL-1.0-or-later", "LicenseRef-scancode...
permissive
/** * External dependencies */ import moment from 'moment'; import memoize from 'memize'; /** * WordPress dependencies */ import { Disabled } from '@wordpress/components'; import { Component } from '@wordpress/element'; import { withSelect } from '@wordpress/data'; import ServerSideRender from '@wordpress/server-s...
true
ee17082d752beb4f3a63d2636c954ba423da312c
JavaScript
mygithubcoding/nodejs-complete-guide-1
/5-adminRoutes-productArray.js
UTF-8
690
2.78125
3
[]
no_license
// This is for temporarily storing data in an array in admin router // and displaying in shop router const express = require("express"); const router = express.Router(); const path = require("path"); const rootDir = require("../util/path"); // Storing product details in this array const products = []; // you may/may ...
true
554dde64bcb48f17d472a8b9510fe67b63327b65
JavaScript
mapkts/funale
/src/infixConcat.test.js
UTF-8
1,035
3.015625
3
[ "MIT" ]
permissive
/* global describe, it, expect */ import infixConcat from './infixConcat' describe('infixConcat', () => { it('combines the elements of the two lists', () => { expect( infixConcat(['a', 'b'], ['c', 'd']) ).toStrictEqual(['a', 'b', 'c', 'd']) expect( infixConcat([], ['a', 'b']) ).toStrictEqual(['a', 'b']) }...
true
4d672364e6ccc98eaeb1665f62b71e844913ebd5
JavaScript
cris391/WSSOVA
/WebApi/wwwroot/js/components/wordcloud/cloud.js
UTF-8
1,430
2.59375
3
[]
no_license
define(['jquery', 'knockout', 'dataService', 'jqcloud'], function($, ko, ds) { return function(params) { var width = params.width || 200; var height = params.height || 200; var words = []; var word = ko.observable(); var weight = ko.observable(); var addWord = function() { words.push(...
true
5556040d53b0dea5e282083d523c8d9ea66f5d3c
JavaScript
sretundijr/job-app-tracker
/src/client/helpers.js
UTF-8
627
3.109375
3
[]
no_license
/* global document */ const returnElement = (name, type) => { if (type === 'id') { return document.getElementById(name); } return ''; }; const returnIndex = idString => parseInt(idString.substring(idString.indexOf('-') + 1), 10); const removeHyphen = (tableHeading) => { return tableHeading.replace(/-/g,...
true
9c38af8b7d8016ca5046fad0239411580f242cfe
JavaScript
Vasanth2896/training
/Exercise-7/exercise7.js
UTF-8
3,692
3.234375
3
[]
no_license
let input = document.getElementById("userInput"); let getUserInput = document.getElementById("getUserInput"); let displayInput = document.getElementById("displayInputValues"); let output = document.getElementById("userOutput"); let inputArray = []; let board = [ ["r", "e", "c", "k", "l", "e", "s", "s"], ["a", "...
true
0762d0e1dfd02953cafdc048e0e8bf0a18e04dde
JavaScript
lotsuki/mark-it
/client/__tests__/Categories.spec.js
UTF-8
1,232
2.671875
3
[ "MIT" ]
permissive
//when cat is clicked, handle click should be invoked /** * @jest-environment jsdom */ import React from 'react'; import { shallow } from 'enzyme'; import Categories from '../components/Categories'; //if caateogry-wrapper is clicked, should render subjects comp describe('<Categories />', () => { const props = {...
true
40659740c390053fed299906ee5c76687c4402e6
JavaScript
subaJoshuaRey/keasyshoppe
/js/script.js
UTF-8
5,870
2.5625
3
[ "MIT" ]
permissive
/** * Script file for UI-related JavaScript */ $('.carousel.carousel-slider').carousel({ fullWidth: true }); autoplay() function autoplay() { $('.carousel.autoplay').carousel('next'); $('.slider.autoplay').slider('next'); setTimeout(autoplay, 4500); } $(document).ready(function () { $(document)...
true
3408b9e2543056e4995e7d2483bd46f8ea226227
JavaScript
osirisguitar/viking-lyrics
/crawler/index.js
UTF-8
1,481
3.09375
3
[ "MIT" ]
permissive
'use strict'; const http = require('http'); const jsdom = require("jsdom"); const { JSDOM } = jsdom; function saveAlbum (url) { let options = { host: 'www.darklyrics.com', path: url.substring(2) }; let request = http.request(options, (response) => { let result = ''; response.on('data', chunk =...
true
2f6d3f11c92a4c9bac6916732da170d1e529f0a5
JavaScript
hhutzler/WrData
/public_html/genLibPV.js
UTF-8
2,541
2.984375
3
[]
no_license
"use strict"; /* Allow certain variables to be shadowed */ /* eslint no-shadow: ["error", { "allow": ["libName","funcName"] }] */ /* exported GenLibPV */ function GenLibPV() { // Our Global Library Implementation var libName = "genLibPV.js"; var message = "Library not yet initialized !"; ...
true
925de8204aa7615922f880f760764b70372cbef7
JavaScript
kentrinhdev/2DO-App
/js/app.js
UTF-8
6,694
2.640625
3
[]
no_license
'use strict'; function startWelcome() { $('#intro-page').toggle().delay(200).fadeIn(1000); $('#modal').toggle().delay(500).slideDown(3000); $('#main-app').toggle(false); $('#end-page').toggle(false); $('#footer').toggle(false); } function toggleMainApp() { $('#intro-page').toggle().delay(200).s...
true
7177c18d197459cf77e7ee1413ccd09e7554f2f3
JavaScript
MiquelMancera/act01
/hora_01.js
UTF-8
753
3.3125
3
[]
no_license
window.onload = mostraHora; //HOLA function mostraHora(){ let rellotge = document.getElementById("rellotge"); let informacio = document.getElementById("informacio"); let data = new Date(); console.log ("data = " + data); let hores = data.getHours(); let minuts = data.getMinutes(); let segons = data.getSe...
true
c52d2c61c51a4eaad53221d4887fa997f2f5c59d
JavaScript
eabarca138/Prueba_ES6
/dist/assets/js/Serie.js
UTF-8
2,402
2.5625
3
[ "MIT" ]
permissive
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i ...
true
4bb744a15f3a140b4949734eb1d4dc9a5a230a44
JavaScript
jbcon/Promotion
/Promotion/src/day1.js
UTF-8
6,206
2.59375
3
[]
no_license
//Day 1 var Day1Layer = cc.Layer.extend({ ctor:function () { //super init this._super(); this.init(); }, init:function () { //get window size size = cc.winSize; var key = ""; //for input var count = 0; //for accessing each sprite lives = 3; //miss 3 and you lose g_score = 0; // total score ...
true
0bf8b4ed011e1e29d86cdf6be795488e8b716697
JavaScript
agbai1/tutoring-website
/js/get.js
UTF-8
1,712
2.859375
3
[]
no_license
$(document).ready(function(){ //Hides the logout button on page load $('#logout-button').hide(); $("#lp-login").click(function(){ var jsusername = $("#lp-username").val(); var jspassword = $("#lp-password").val(); //Hides the logout button on page load var pattern = new RegExp(/[~`!#$%\^&*+=\...
true
a1bd2de04beffc6d545ca3bd9bdd3c8f8b28c967
JavaScript
MrDimk/912453-keksobooking-17
/js/backend.js
UTF-8
1,219
2.703125
3
[]
no_license
'use strict'; (function () { var URL = 'https://js.dump.academy/keksobooking/data'; // адрес для загрузки данных var URL_SEND = 'https://js.dump.academy/keksobooking'; // адрес для отправки данных var HTTP_STATUS_CODES = { OK: 200 }; function load(onSuccess, onError) { var xhr = new XMLHttpRequest()...
true
3ac586b12ee508acba524d5b7f0101df217713b6
JavaScript
eweitnauer/physics_perception
/src/scene-node.js
UTF-8
3,051
2.828125
3
[ "MIT" ]
permissive
/// Copyright by Erik Weitnauer, 2013. /// A SceneNode is a collection of several objects. SceneNode = function(scene, oracle) { this.scene = scene; this.side = scene.side; this.id = scene.name || ('s'+Math.round(Math.random()*10000)); this.oracle = oracle; this.objs = []; // list of objects in the scen...
true
24cf5cc59eb814b561c3459479107711da3818fc
JavaScript
jankuca/truck.js
/src/serializer.js
UTF-8
4,252
3.125
3
[]
no_license
var Serializer = function () { this.tokens = []; }; Serializer.serialize = function (ast) { var serializer = new Serializer(); return serializer.serialize(ast); }; Serializer.prototype.serialize = function (ast) { this.processBlock_(ast); return this.tokens.join(''); }; Serializer.prototype.processBlo...
true
62484930f5032a598ac266106cb6898e9fc9b6c6
JavaScript
millsb/giant-robot
/generator/generator-gr/generators/pattern/index.js
UTF-8
1,977
2.578125
3
[ "MIT" ]
permissive
'use strict'; var yeoman = require('yeoman-generator'); var chalk = require('chalk'); var yosay = require('yosay'); var changeCase = require('change-case'); var path = require('path'); var patternBasePath = 'src/app/patterns'; module.exports = yeoman.generators.Base.extend({ prompting: function () { var done = ...
true
f3132bcb4239225edbeadc58e47cb72806a653c4
JavaScript
jasondippel/theme-poc
/src/theme/utils/localStorage.js
UTF-8
682
2.8125
3
[]
no_license
import { LS_KEY } from '../config' /** * Gets the local storage key scoped to this library * @param {string} rawKey * @returns {string} Scoped key */ export const getScopedKey = rawKey => `${LS_KEY}${rawKey}` /** * Gets value from local storage associated with provided key * @param {string} rawKey * @returns {...
true
82764896cdbfeaecbbb86e938af730204e3525fa
JavaScript
michielbdejong/query-ldflex
/src/SubjectPathResolver.js
UTF-8
1,122
2.71875
3
[ "MIT" ]
permissive
import { namedNode } from '@rdfjs/data-model'; import ComunicaUpdateEngine from './ComunicaUpdateEngine'; /** * LDflex property resolver that returns a new path * starting from the property name as a subject. * * For example, when triggered as * data['http://person.example/#me'].friends.firstName * it will c...
true
9c5e178983492b1ab9a8efa1065939f8d16b678d
JavaScript
rejiejay/website-station-system-version-fives
/web/utils/object-handle.js
UTF-8
116
2.5625
3
[]
no_license
/** * 含义: 对象值转为数组 */ export const objValueToArray = obj => Object.keys(obj).map(key => obj[key])
true
a6a465b36cf163ed0e630ea0e1cb68a9196a82c2
JavaScript
js-kit/es6-playground
/promiseAjax.js
UTF-8
248
3.171875
3
[ "MIT" ]
permissive
function foo(x,y) { return request( "http://some.url.1/?x=" + x + "&y=" + y ); } foo( 11, 31 ) .then( function(text){ console.log( text ); }, function(err){ console.error( err ); } );
true
905c8f0f5a292eabab4460cdd6880a5c2982ce64
JavaScript
vihangshah1/AngularJsConceptClearanceExample
/public_html/controller/CustomFilterController.js
UTF-8
544
2.609375
3
[]
no_license
var application = angular.module('myApp', []); application.filter('hundredMulti', function () { return function (enteredAmount) { console.log(enteredAmount); if (enteredAmount % 100 == 0) { return "it is multiple of 100" } else if (enteredAmount == "" || enteredAmount ==...
true
faaa905241ba6e5ab94ff46fc5c5f0da9c5199d0
JavaScript
carlesba/freezr
/tests/array-methods.spec.js
UTF-8
5,423
2.953125
3
[ "MIT" ]
permissive
import test from 'tape' import { push, includes } from '../src/array-methods' import {assertIsFrozen} from './creation.spec' import {freeze as f, deepFreeze as df} from '../src/creation' const assertEachItem = (t, source, target) => source.forEach((item, index) => t.equal(target[index], item)) test('forEach', (...
true
367b7e67ad5b90ca180336187b964616f0504228
JavaScript
slimcognito123/CursoJavaMadrid2016
/practicaInmobiliaria/script.js
UTF-8
2,106
3.015625
3
[]
no_license
var comprador,vendedor,casa; var cuentaComprador,cuentaVendedor; function main() { cuentaComprador=new CuentaBancaria("123456789",1000000000); cuentaVendedor=new CuentaBancaria("321321321",200000); comprador=new Persona("Pepito","Garcia","88888888T","images/tio1.jpg",cuentaComprador); vendedor=new Persona("Pako"...
true
3a509ab0557d418b19c2acee939195e4daa159d8
JavaScript
ChristopheBoucaut/lost-ark-gathering
/js/data/Character.js
UTF-8
738
2.78125
3
[ "Apache-2.0" ]
permissive
(function () { 'use strict'; function Character() { var stats = localStorage.getItem('character_stats'); if (stats === null) { this.stats = {}; for (var i = 0; i < window.GatheringTools.Spot.TYPES.length; i++) { this.stats[window.GatheringTools.Spot.TYPES...
true
f7e7993790dc9d2e0e1987f88f19c23572186779
JavaScript
benitez4721/todoApp_Backend
/controllers/auth.js
UTF-8
1,613
2.59375
3
[]
no_license
const {response} = require("express") const bcrypt = require('bcryptjs') const Usuario = require("../models/usuario") const {generateToken} = require('../helpers/jwt') const login = async (req, res = response) => { try { const {email, password} = req.body const user = await Usuario.findOne({email...
true
75582e431ee429a3bf07fbccd0a78439a51a9ace
JavaScript
SurgamSurgam/weather-app
/weather-app/src/WeekDayForecast.js
UTF-8
1,484
2.71875
3
[]
no_license
import React from 'react'; import { ForecastLayout } from './ForecastLayout.js'; export const WeekDayForecast = ({ weekdayweather, gotdata, showForecast, toggleForecast }) => { let weeksummary; let mappedDailyWeatherData; let showTableHeader; if (gotdata) { weeksummary = weekdayweather[0].summary; ma...
true
dc0a01a215bd453ffa97b017015401410173d945
JavaScript
artkonekt/appshell
/src/resources/assets/js/appshell.js
UTF-8
5,834
2.515625
3
[ "MIT" ]
permissive
$(document).ready(function () { $('.nav-dropdown-toggle').on('click', function(e){ e.preventDefault(); $(this).parent().toggleClass('open'); }); $('input[name="_method"][type="hidden"][value="DELETE"]') .parent('form') .on('submit', function (e) { var confirmText...
true
687ab113d0b9640c47a7b02467a6846a336c4418
JavaScript
kimsijin33/parcel-1
/manager/wwwroot/static/shared.js
UTF-8
1,183
2.515625
3
[]
no_license
function apicall(url, callback) { $.getJSON(url, callback); } // If someone finds a way to do this in CSS, please open a issue/PR function fix_code_blocks() { document.querySelectorAll("code").forEach(el => el.textContent = el.textContent.replace(/^\n/,'') ); } function navbar_prov_status(msg) { ...
true
188a1c41fcb4daf48015eced6e993477f2b61d5d
JavaScript
anirbanroydas/opruut
/resources/assets/js/reducers/AuthReducer.js
UTF-8
928
2.578125
3
[ "MIT" ]
permissive
import { AUTH_USER, AUTH_ERROR, SIGN_OUT_USER, UPDATE_GLOBAL_REQUESTS } from '../actions'; const initialState = { authenticated: false, userinfo: null, globalRequests: 0, error: null }; export default function auth(state = initialState, action) { switch (action.type) { case UPDATE_GLOBAL_REQUESTS: retur...
true
2ac8695d78d104628e562277d945e4b7b83c8b73
JavaScript
roan1088/google-books-search
/server.js
UTF-8
1,173
2.515625
3
[]
no_license
// Importing express server module const express = require("express"); const path = require("path"); // Importing the mongoose and morgan logger modules const logger = require("morgan"); const mongoose = require("mongoose"); // Setting the Express App const app = express(); const PORT = process.env.PORT || 3001; // Si...
true
b7cb030af4ea67872be8be9b9704a3b73eccce80
JavaScript
o-rumiantsev/literate-helper
/src/game-scene.js
UTF-8
2,907
2.765625
3
[]
no_license
import saveTextures from './saveTextures'; export default class GameScene extends Phaser.Scene { constructor(texturesJson) { super({ key: 'main', active: true }); this.texturesJson = texturesJson; this.pos = { x: 1152, y: 2000 }; const addButton = document.getElementById('add-button'); addButto...
true
bffc182bbd4de4534575add4d26ecd8d348f6cbc
JavaScript
sophiarosser/climatechange
/script.js
UTF-8
468
3.03125
3
[]
no_license
const main = document.getElementById('myTopnav'); var foo =2*20; foo = foo * foo; console.log(foo*foo); var ourButton = document.getElementById("button"); ourButton.addEventListener("click", function(){ ourButton.style.color = "#FFF000"; alert ("Climate change is bad") }); document.getElementById("lol")....
true