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
094c6781883ff27518ee6e836bc73cee9b56e811
JavaScript
persoPlayground/jest-samples
/src/components/Gift.test.js
UTF-8
1,314
2.6875
3
[]
no_license
import React from 'react'; import { shallow } from 'enzyme'; import Gift from './Gift'; describe('Gift', () => { const mockRemove = jest.fn(); const id = 1; //props interface const props = { gift: {id}, removeGift: mockRemove }; const gift = shallow(<Gift {...props} />); it('renders correctly', () =>{ expect(gift...
true
616ad0399d7c2a5481741a7b078d9a4d7f52ae48
JavaScript
OhWonjae/Team6Project-React
/src/redux/patient-reducer.js
UTF-8
574
2.890625
3
[]
no_license
const initialState = { patient: { patientname:"환자이름", ssn1:"-", ssn2:"-", sex: "성별", age:"-", phonenumber: "-", } } //액션 타입 선언 const SET_PATIENT="patient/setPatient"; //액션 생성 함수 선언 export const createSetPatient = (patient) => { return {type:SET_PATIENT, patient}; } //리듀스 선언 const...
true
a02c9446ef59610b3444b14d31c16a4c7272675f
JavaScript
JefersonLucas/bootcamp-full-stack
/trabalho-pratico-04/src/connections/accountConnection.js
UTF-8
1,309
2.59375
3
[ "MIT" ]
permissive
// Importação de bibliotecas import mongoose from "mongoose"; // Importando configurações import { settings } from "../config/accountConfig.js"; // Desestruturando as configurações e logs const { user, password, cluster, database, filter } = settings; const { log } = console; // Montando string de conexão const URI ...
true
1d836b7db6efad50970c301440194a60965b44ee
JavaScript
arpodol/javascript_small_problems
/easy3/teddy.js
UTF-8
141
3.3125
3
[]
no_license
function teddyAge() { var age = Math.floor(Math.random() * (200 - 20 + 1)) + 20; console.log(`Teddy is ${age} years old!`) } teddyAge();
true
02cf229764638f4590da16dd2b27bfe7acbe33b4
JavaScript
wjy18666/H5_demo
/mobile/轮播图/demo.js
UTF-8
7,098
2.546875
3
[]
no_license
function Swiper (opt) { this.init(opt); } Swiper.prototype = { def: { class: '.swiper-container', pagination: true, slideIndex: 0, swiperTimer: null, switchSpeed: 3000, // 轮播切换时间 translateSpeed: 300, // 图片过度动画时间 w: document.documentElement.clientWidth, pagination: '.pagination', isSwitch: false,...
true
b9b80e217c9eee9e6df3acaf20ef09fc01d706c7
JavaScript
Reyder95/sdvx-tracker-frontend
/src/page-stuff/components/profile/profile_library.js
UTF-8
3,291
3.15625
3
[]
no_license
// Main Component: Profile import React from 'react' // React stuff import queryString from 'query-string' // Allows parsing URL query strings import { userLibrary } from '../../../api-calls' // API call to get the user library // Library component, shows all songs a user has a score on class Library extends R...
true
bbd6ee02970677cc23e8bc854411929c049d51a8
JavaScript
Vivomo/blog
/nodejs/algorithm/findMid.js
UTF-8
834
3.140625
3
[]
no_license
const arrUtils = require('../util/arrUtil'); const getRandomArr = arrUtils.getRandomArr; const swap = arrUtils.swap; function getArrMid(arr) { let mark = 0; const len = arr.length; let start = 0; let end = len - 1; const half = ~~(len / 2); while (true) { for (let i = start; i < end; i...
true
d031729a20bdf3289f71bebf9952c8205e490327
JavaScript
openpaygithub/SFCC
/cartridges/app_storefront_base/cartridge/models/productLineItems.js
UTF-8
4,061
2.5625
3
[]
no_license
'use strict'; var collections = require('*/cartridge/scripts/util/collections'); var ProductFactory = require('*/cartridge/scripts/factories/product'); /** * Creates an array of product line items * @param {dw.util.Collection<dw.order.ProductLineItem>} allLineItems - All product * line items of the basket * @para...
true
f5ea53433e4d74872434d5a8b6e1082d3127192b
JavaScript
luxaur-dev/LynxTest4
/js/posConverter.js
UTF-8
463
3.65625
4
[]
no_license
// Конвертирует исходную позицию в массив координат document.getElementById("chessboard").addEventListener('click', posConverter); function posConverter(event) { const str = event.target.id; const convertedLetter = str.toUpperCase().charCodeAt(0) - 64; const posNumber = parseInt(str.charAt(1)); let startPosition...
true
6598fbe40dd17285bc7996ed95a3f93564f6bc3b
JavaScript
ASavovic/NBP-CassandraDB
/User/js/demo/chart-bar-demo.js
UTF-8
7,051
2.625
3
[]
no_license
// Set new default font family and font color to mimic Bootstrap's default styling $(document).ready(function(){ getDataForChart("myBarChart","allLogInOut"); Chart.defaults.global.defaultFontFamily = 'Nunito', '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif'; Cha...
true
cfbea0a235f275f520e56b54ff37ad21b721f086
JavaScript
mistymadonna/bus-mall
/js/app.js
UTF-8
4,687
3.21875
3
[]
no_license
function ItemForSale(filename, name) { this.src = 'img/' + filename; //filepath of img this.name = name; //creates a new property called name & sets to name being passed in. this.displayed = 0; //creates new property & sets it to 0. this.clicked = 0; itemsArray.push(this); //push ItemForSale aka the object in...
true
02c55bc1e6a0a7c2330b4c4805c36e2de83b070d
JavaScript
haohao809/myvue-music
/src/common/js/util.js
UTF-8
484
3
3
[]
no_license
function getRodamDvalue(min,max){ return Math.round(Math.random()*(max-min)+min); } export function shuffle(arr){ let _arr = arr.slice(); for(let i=0;i<_arr.length;i++){ let j=getRodamDvalue(0,i); let t= _arr[i]; _arr[i] = _arr[j]; _arr[j] = t; } return _arr; } export function debounce(func,delay){ let ti...
true
ef20d66b46dd817907dc203d4f4094dc6ef14d23
JavaScript
yossefAlatter/static-jobs
/script.js
UTF-8
3,314
2.703125
3
[]
no_license
window.onload = () => { var selecting = document.querySelectorAll(".right-side > span"); var searcher = document.getElementsByClassName("searcher")[0]; var items = document.querySelectorAll(".item"); var myStore = []; var myObj = { 0: ["Frontend", "Senior", "HTML", "CSS", "JavaScript"], 1: ["Fullsta...
true
952cd35665a477413f2e7e1c7d160cb5b6891ee0
JavaScript
cmartinezpedrero/calculate-conditions
/calculateConditions.js
UTF-8
1,765
3.140625
3
[]
no_license
const conditionsFunctions = require('./conditions'); /** * Evaluate a set of critera. Return true if ALL criteria is met. * * @param {Object} criteriaSet The set of criteria, where each key is a criteria ID * and each value is some data to send to that criteria function. * @param {Object} user The expected...
true
19a5419911dafb172282922c519d82244ea99fde
JavaScript
danigunawan/streakers-client
/src/components/Activity.js
UTF-8
4,906
2.78125
3
[]
no_license
import React, { Component } from 'react'; import StartStreakButton from './StartStreakButton'; import NewStreakButton from './NewStreakButton'; import RenewStreakButton from './RenewStreakButton'; class Activity extends Component { handleClick = () => { // console.log("clicked from Activity.js", this.props.acti...
true
1dbbc585bf71d69d35b2e463063eca449c180e1d
JavaScript
burnetz/vue-practice
/3-4/main.js
UTF-8
1,190
2.6875
3
[]
no_license
//数値を通貨書式「#.###.###」に変換するフィルター Vue.filter('number_format', function(val){ return val.toLocaleString(); }); var app = new Vue({ el: '#app', data: { //表示中の商品数 count: 0, //「セール対象」のチェック状態 showSaleItem: false, //「送料無料」のチェック状態 showDelvFree: false, //「並び替え」の選択肢(1:標準 2:価格が安い順) sortOrder: 1, //商品リスト produ...
true
f5b6a558d82e9095ce239b25695eee1e3f266a08
JavaScript
lehoan1810/App_Music_Javascript
/script.js
UTF-8
6,154
2.6875
3
[]
no_license
const container = document.querySelector(".container"); let musicImg = container.querySelector(".img-area img"); let musicName = container.querySelector(".song-details .name"); let musicArtist = container.querySelector(".song-details .artist"); let mainAudio = container.querySelector("#main-audio"); let playPauseBtn = ...
true
2ce7962dc5678de399cd16b28c9ae2f0c1b17fca
JavaScript
bable5/react-es6-boilerplate
/test/components/button.spec.js
UTF-8
1,001
2.515625
3
[ "MIT" ]
permissive
import Button from '../../src/components/button.jsx'; import {expect} from 'chai'; import {shallow} from 'enzyme'; import React from 'react'; import {spy} from 'sinon'; import Chance from 'chance'; const chance = new Chance(); describe('A Button', () => { let wrapper, expectedProps; function renderC...
true
60eb6caa52d1f1363973abe86113f15b4ab1e970
JavaScript
holligans/react-example
/src/components/App.js
UTF-8
2,150
2.71875
3
[]
no_license
// Dependecies var React = require('react'); var ReactRouter = require('react-router-dom'); var Router = ReactRouter.BrowserRouter; var Route = ReactRouter.Route; // Components var Header = require('./Header'); var Weather = require('./Weather'); var Button = require('./Button'); var Details = require('./Details');...
true
03b0db5b658547d19da41390a8da1de282f59b70
JavaScript
sgress454/sails-s3
/S3Bucket.js
UTF-8
2,306
2.609375
3
[]
no_license
/** * Module dependencies */ var _ = require('lodash'), knox = require('knox'), S3MPU = require('knox-mpu'), S3Glob = require('s3-lister'); /** * S3 Bucket */ function S3Bucket (options) { _.extend(this, options); this.s3Client = knox.createClient({ key : options.key, secret : options.secret, bu...
true
2f1ad1aabae4769d260b53fb881f0da8509862a3
JavaScript
adarshnbidari/data_structures
/v1.0/Algoithms/Insertion Sort.js
UTF-8
327
3.59375
4
[]
no_license
function insertionSort(A){ for(let i=1;i<A.length;i++){ let key=A[i]; let j=i-1; while(j>=0&&A[j]>key){ A[j+1]=A[j]; j-=1; } A[j+1]=key; } return A; } var x=[17,10,21,3]; console.log(`The original unsorted array is ${x}`); console.log(`The sorted array is ${insertionSort(x)}...
true
7695433275151450e619ab3e7b8151dbe47e7f11
JavaScript
thisistaimur/Course
/02-Programming-Basics/2020-10-13-Intro-Data-Structures/solutions/Shih-chen_02-arrays-arraymethods.js
UTF-8
3,763
4.59375
5
[]
no_license
// # Programming Basics: Arrays and Array Methods // These exercises are designed for practicing arrays and array methods. __You may need to look up some methods to complete these tasks__. Print each result to the console. // __Please send me a js file (<firstname>.js) on Slack__ // 1. Declare a variable named "euroC...
true
65297ed42d1ac85aa2b5ae49c667c2e118742b86
JavaScript
TelmiAdame/Exercicios-Mentoria
/aula 18/POO/exercitando04.js
UTF-8
1,792
3.40625
3
[]
no_license
//UFC class Lutador { constructor (nome, nacionalidade, idade, altura, peso, categoria, vitorias, derrotas, empates) { this.nome = nome, this.nacionalidade = nacionalidade, this.idade = idade, this.altura = altura, this.peso = peso, this.categoria = categoria, ...
true
10214fb8d6415e71b32d6a97cdfab88d91a5f27c
JavaScript
SydneySMcIver/mciver-part-two
/script.js
UTF-8
1,971
3.9375
4
[]
no_license
var x = prompt ("What is the weather"); var y = prompt ("What is the event?"); var result if (y === 'casual') { if (x < 54) { result = 'It is less than' + x + 'degrees - outside and you are going to a casual event, you should wear something comfy and a coat'; ...
true
e39a93611b27e1a9bb9efe09c19fb89f688770ba
JavaScript
xerocross/xerocross.primescroll
/src/helpers/more-primes-helper.js
UTF-8
1,812
2.875
3
[ "0BSD" ]
permissive
import SimpleStringSet from "./simple-string-set.js"; "use strict"; export function build () { let morePrimesObj = {}; let compositeSet = SimpleStringSet.build(509063); morePrimesObj.checkIsPrime = function(int) { if (compositeSet.contains(int)) { return false; } let maxP...
true
e7eb42db97e36044c00b7365b737f3e001e49d6b
JavaScript
Athena-Capstone-2020/athena-mobile-app
/src/models/FoodItem.js
UTF-8
1,026
2.859375
3
[]
no_license
import {Document} from "./Document" export class FoodItem extends Document{ /** * @param {string} name the name of the food item * @param {string} photoURI the photo URI for the food item * @param {string} quantity the amount of this food item * @param {string} description description about th...
true
546e95ab2e964fa732c2427d60e5e4f4e933cc3f
JavaScript
melvin78/E-ticket
/js/selector.js
UTF-8
1,314
2.640625
3
[ "MIT" ]
permissive
$(document).ready(function(){ $('#countyfrom').selectpicker(); $('#locationfrom').selectpicker(); load_data('county'); function load_data(county, county_id = '') { $.ajax({ url:"http://localhost/eTicket/handlers/location.php", method:"POST", ...
true
e29fe1140e45ff2f6be14abde11503d11d286915
JavaScript
DynamikArray/Ciima
/util/inventory/inventoryDirector.js
UTF-8
1,137
2.609375
3
[]
no_license
const { LOAD_EBAY, LOAD_LINNWORKS } = require("./actions"); const ebayInventoryStrategy = require("./websiteStrategies/ebayInventoryStrategy"); const linnworksInventoryStrategy = require("./websiteStrategies/linnworksInventoryStrategy"); function loadHandler(websiteStrategy) { this.loadStrategy = websiteStrategy; ...
true
b89084e71803a1e075f9689701cfeb558b3ce17a
JavaScript
darkyto/Javascript-Fund-ArraysPartTwo
/javascript.js
UTF-8
4,251
3.28125
3
[]
no_license
console.log('============='); console.log('START Problem 001 tests'); arr = new Array(20); for (var i = 0; i < arr.length; i++) { arr[i] = i*5; console.log(arr[i]); } console.log('END Problem 001 tests'); console.log('============='); console.log('============='); console.log('START Problem 002 tests'); var arrOne = ...
true
6e479985907bbb7c2db61749732dae35afed2790
JavaScript
cairijun/vimperator-wikipedia
/wikipedia.js
UTF-8
1,917
2.6875
3
[ "Unlicense" ]
permissive
/* An utility function to make string formating easy. */ String.prototype._ = function(obj) this.replace(/\{(.+?)\}/g, function(m, key) obj[key]); var suggest_base_url = 'http://{lang}.wikipedia.org/w/api.php?action=opensearch&format=json&limit={limit}&search={keyword}' var wikipage_base_url = 'http://{lang}.wikipedia...
true
ffe7dc4493d8360dcc5f9cb6efc742fdfeb78c41
JavaScript
yukselcoding/nodeCRUD
/public.js
UTF-8
424
2.96875
3
[]
no_license
const fs = require('fs'); /** * * @param {Name of the file to be read} filename */ var fetchData = (filename) => { try { var data = fs.readFileSync(filename); return JSON.parse(data); } catch(e) { console.log(e); return []; } }; var saveData = (filename, data) => { ...
true
df29eb597018d2a254e9736a86181fe9429ecce8
JavaScript
jordanje/Flashcard-App
/src/Layout/CreateDeck.js
UTF-8
2,280
2.71875
3
[]
no_license
import { Link, useHistory } from "react-router-dom"; import React, { useState } from "react"; import { createDeck } from "../utils/api/index.js"; function CreateDeck(){ const [newDeck, setNewDeck ] = useState(); const history = useHistory(); function submitHandler(e) { e.preventDefault(); ...
true
d1716cd1c673536413c862118eb802ea2f194584
JavaScript
paeolo/onemon
/examples/listener.js
UTF-8
229
2.765625
3
[ "MIT" ]
permissive
console.log('--') console.log(`Hi there, I am a lazy person. Nobody trust me but I can hear deamons sometimes!`) console.log('--'); function waitForever() { setTimeout(waitForever, Number.MIN_SAFE_INTEGER); }; waitForever();
true
120c074ae978e4a70a8224c2adf415a9e339202b
JavaScript
bennKaoutar/test_elect_withPhpFrom
/renderer.js
UTF-8
465
2.546875
3
[]
no_license
console.warn('loaded'); window.onload=()=>{ const webview = document.querySelector("#myweb") const loadiing = document.querySelector(".loading") webview.addEventListener("did-start-loading", ()=>{ loadiing.innerHTML='loading..' }) webview.addEventListener("did-stop-loading", ()=>{ ...
true
90322ae0e28da50d2dbcb593ba2ba1c01cfe10c6
JavaScript
vadim-ivlev/readdir-recursive-pattern
/test/test.js
UTF-8
893
2.625
3
[ "MIT" ]
permissive
// jshint esversion:6 // const fs = require('fs'); // const path = require('path'); // const test = require('ava'); // const listFiles = require('../'); import fs from 'fs'; import path from 'path'; import test from 'ava'; import listFiles from '../'; test('list all files', t => { t.deepEqual( ...
true
a003b3a553b200fd1699ca159b44511ab3519cf6
JavaScript
MitraNami/lotide
/test/countLettersTest.js
UTF-8
437
2.65625
3
[]
no_license
const assert = require('chai').assert; const countLetters = require('../countLetters'); describe("#countLetters", () => { it("returns {'h': 1, 'e': 1, 'l': 2, 'o': 1} when passed 'hello'", () => { const result = countLetters("hello"); assert.deepEqual(result, {'h': 1, 'e': 1, 'l': 2, 'o': 1}); }); it("...
true
1b8359d90304930e42971a5a96a750b761c1e5b8
JavaScript
githubprabh/something-anew
/fractal_tree/sketch1.js
UTF-8
1,035
3.15625
3
[]
no_license
var tree = []; var leaves = []; var counter = 0; function setup(){ createCanvas(400,400); var a = createVector(width / 2, height); var b = createVector(width / 2, height - 100); var root = new Branch(a, b); tree[0] = root; } function mousePressed(){ for(var i = tree.length-1; i >= 0 && counter < 6; i--){ if(...
true
96fa98ce1ec4c4af9f5edb00f41fe7c0e5f51a4c
JavaScript
strangeInference/chatterbox-server
/client/client/scripts/app.js
UTF-8
7,311
2.953125
3
[]
no_license
// YOUR CODE HERE: var app = {}; app.rooms = {}; app.currentRoom = undefined; app.server = 'http://127.0.0.1:3000/classes'; app.init = function(){ app.fetch(undefined); $(".username").on('click',function(){ console.log("added friend"); app.addFriend(); }); $('#send .submit').on('click',function(){ ...
true
a0b5f4963a7d6cf3000e73620a3c791be087c7ee
JavaScript
naterjlao/3D-HTML-JS-Visualizer
/js/main.js
UTF-8
2,694
3.1875
3
[]
no_license
/*************** TEST CODE ************/ var p = new Perspective(0,0,0,0,30) var cube1 = new Cube(0,0,0,50) var cube2 = new Cube(0,0,0,100) var cube3 = new Cube(0,0,0,150) var rate = 4 var limit = 100 var up = true function update() { clear(ctx) draw2dPath(projectMatrix(cube1.generateMatrix(),p),ctx) dra...
true
1cf8d909eb4324a3d8e319951d372bee5ee4baf8
JavaScript
mjh1968/wheather-react-app
/src/ForecastDay.js
UTF-8
287
2.640625
3
[]
no_license
import React from "react"; export default function ForecastDay(props) { let date = new Date(props.data.dt * 1000); let day = date.getDay(); let days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; let wday = days[day]; return <td className="tdDay">{wday} </td>; }
true
d85059627d0f4577db7e49036801f020d942267c
JavaScript
zerobias/mezzanine
/test/union.test.js
UTF-8
8,673
2.734375
3
[ "MIT" ]
permissive
'use strict' import { propEq } from 'ramda' import { Union, Type } from '../src' describe('example: Maybe type', () => { describe('basic constructors', () => { const Just = { value: Object } const Nothing = { } const Maybe = Union`Maybe`({ Just, Nothing }) Maybe test('Just create', () => { ...
true
4ca75d6d667bab000412ed4bd695d59ff033f273
JavaScript
BrendonPierson/js102_temp_converter_exercise
/app.js
UTF-8
1,942
4.5625
5
[]
no_license
/* ...........YOUR MISSION........... Write a program that will convert a temperature from fahrenheit to celsius, or from celsius to fahrenheit. In the HTML, have one input field where someone can enter in a temperature. Then have a radio button group where Celsius or Fahrenheit can be selected as the sca...
true
b8f1ce0eccc34aad22ba34b442f5536474194440
JavaScript
summertriangle-dev/arposandra
/frontend/js/timestamps.js
UTF-8
2,025
2.984375
3
[ "MIT", "BSD-2-Clause" ]
permissive
function pad2(n) { if (n < 10) { return `0${n}` } return "" + n } function formatTime(ts, style) { const d = new Date(ts * 1000) switch(style) { case "time": return `${pad2(d.getHours())}:${pad2(d.getMinutes())}` case "date": return `${d.getFullYear()}/${pad2(d.getMo...
true
0cf3ef2e8b7b323590e40179f1984b084d820125
JavaScript
mug913/fewpjs-removing-altering-and-inserting-html-lab-onl01-seng-pt-110319
/index.js
UTF-8
252
2.9375
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
document.body.removeChild(document.querySelector('main')) let newHeader = document.createElement('h1'); newHeader.id = "victory" newHeader.innerHTML = "<h1>Brad is the champion</h1>"; newHeader.className = "victory"; document.head.append(newHeader);
true
2c4b18106bc13814e6a74efed04392d5c641e847
JavaScript
everydayhero/hui
/forms/ToggleableOptionGroup/index.js
UTF-8
1,918
2.578125
3
[]
no_license
'use strict' import React from 'react' import ToggleableOption from '../ToggleableOption' import map from 'lodash/map' import forEach from 'lodash/forEach' import compact from 'lodash/compact' import merge from 'lodash/merge' import keys from 'lodash/keys' export default React.createClass({ displayName: 'Toggleable...
true
a2ad2e44b3608c8c1009fd0aa2040da330a661da
JavaScript
wisdomanaba/form
/src/Aprap.js
UTF-8
11,341
2.546875
3
[]
no_license
import React from 'react' import './App.css' // import styled from 'styled-components' // import socketIoClient from 'socket.io-client' class App extends React.Component { constructor() { super(); this.state = { type: "", classSelected: "", subject: "", term: "", ...
true
7a473e81eb8a80b239adc6c9826506f120f314e7
JavaScript
cyjo9603/TIL
/quiz/programers/js/level2/짝지어_제거하기.js
UTF-8
319
3.234375
3
[]
no_license
"use strict"; function solution(s) { const list = [s[0]]; for (let i = 1; i < s.length; i++) { if (list[list.length - 1] === s[i] && list.length !== 0) list.pop(); else list.push(s[i]); } return list.length === 0 ? 1 : 0; } console.log(solution('baabaabaabaa'));
true
3f4eec653c27a700a9d61a894be88230c9d6fae1
JavaScript
feedbackfruits/cloudconvert-node
/lib/process.js
UTF-8
11,351
2.640625
3
[]
no_license
var util = require('util'), EventEmitter = require('events').EventEmitter, stream = require('stream'), fs = require('fs'), path = require('path'), async = require('async'); /** * * @param {Api} api * @param {String} url Process URL (if created already) * @constructor */ function Process(api, u...
true
5da87fd8b9146ceee2518da2451380e45071b5b8
JavaScript
Guo-Haowei/SuperCaveBoy
/src/states/menustate.js
UTF-8
830
2.640625
3
[]
no_license
function MenuState(handler) { // fields this.handler = handler; // methods this._tick = function() { this.handler._getKeyManager()._tick(); if (this.handler._getKeyManager().spaceKey === BOOL.TRUE) { this.handler._getGame()._setState(GAMESTATES.RUNNING); thi...
true
63df3035308c829afd9c65b30dd2d1a782da3955
JavaScript
dotdott/Quizz-ReactJS
/src/contexts/QuestionsContext.js
UTF-8
1,562
2.734375
3
[]
no_license
import { createContext, useState } from "react"; import Question from '../components/Question'; export const QuestionsContext = createContext({}); export function QuestionsProvider({children}){ const [LoopQuestions, setLoopQuestions] = useState(0); const [showScore, setShowScore] = useState(false); cons...
true
65c26bd008e5e3f4a5a4e19b14b30987d0c70b73
JavaScript
MattTurnip/callback-into
/whereswaldo.js
UTF-8
337
3.265625
3
[]
no_license
function findWaldo(arr, callback) { var waldoLocation = 0; arr.forEach(function(name, i){ if (name === "Waldo"){ waldoLocation = i; callback(waldoLocation) } }); } function actionWhenFound(i) { console.log("waldo is at " + i); } findWaldo(["Alice", "Waldo", "Bart", "Winston"], ...
true
3c28f120824d7f944b792a9b5605588577b06585
JavaScript
kjrohr/dndapi
/test/__models__faction.js
UTF-8
2,738
2.640625
3
[]
no_license
const expect = require('chai').expect; const request = require('supertest'); const faker = require('faker'); const Faction = require('../src/models/faction'); describe('faction Model', () => { let server; let testFactions; let tempFaction; // Test for all factions it('Gets All', (done) => { Faction.all...
true
c000adbd8632203ca12f5ace0218fb9f060596fd
JavaScript
McSheaKP/Codesmith-Challenges
/closureScoreExeContext/censor.js
UTF-8
1,433
4.25
4
[]
no_license
// Create a function censor that accepts no arguments. // censor will return a function that will accept either two strings, or one string. // When two strings are given, the returned function will hold onto the two strings as a pair, // for future use. When one string is given, the returned function will return the...
true
ca160ded2a7c5191860915a2469f6e2c20ff0995
JavaScript
ManjunathReddyMoola/11_infosys-portal
/server/router/appRouting.js
UTF-8
3,208
2.78125
3
[]
no_license
const mongodb = require('../database/dbOperations'); const bodyParser = require('body-parser'); const urlencodedParser = bodyParser.urlencoded({ extended: false }); const jsonParser = bodyParser.json(); let mapRoutes = (app) => { // routing Logic // READ All Employees app.get('/api/employees/', (request ,...
true
73d0badfd9e091b4d57882de5df8eaf9d87e11d9
JavaScript
Freddiew20/PI_2018
/PI_2018/js/validacion_reg_empre.js
UTF-8
4,464
2.78125
3
[]
no_license
$(function () { $("#nombre-empresa").blur(function(){ var nameRegex = /^[0-9a-zA-ZáéíóúàèìòùÀÈÌÒÙÁÉÍÓÚñÑüÜ_\s]+$/; var name = $("#nombre-empresa").val(); if (nameRegex.test(name) == false || name == "") { $("#error-empre").html("<p> El nombre no puede estar vacío y solo puede con...
true
ad738a2dc02a3cbd8886dcd8d28afa76e500aa16
JavaScript
jorboare/administrador-mascotas
/src/App.js
UTF-8
1,653
2.796875
3
[]
no_license
import React, { Fragment, useState, useEffect } from 'react'; import Formulario from './components/Formulario' import Cita from './components/Cita' function App() { //Citas en local storage let citasIniciales = JSON.parse(localStorage.getItem('citas')) if (!citasIniciales) { citasIniciales = [] } //T...
true
1c899f3e9c765f08256005679272a0c3c588c05a
JavaScript
iambmotha/bootcamp-terminal-tests
/test/isWeekday.test.js
UTF-8
236
2.65625
3
[]
no_license
let assert = require("assert"); let isWeekday = require("../isWeekday"); describe('The isWeekday function', function(){ it('should say Monday is a weekday', function(){ assert.equal(isWeekday('Monday'), true); }); });
true
05a46bbf63be5ab01056d70f84945b9038898f95
JavaScript
SebasNatale/gifOS
/js/index.js
UTF-8
10,573
2.703125
3
[]
no_license
console.log("JS integrado!"); //------------------------------------ DECLARACION DE VARIABLES //Cambio de tema const dropdownBtn = document.querySelector(".dropdown_button"); const dropdownMenu = document.querySelector(".dropdown_menu"); //Busqueda const apiKey = "0vSJst7U3reZgjSC9fnJnx80gAGgTk0S"; co...
true
9f4594aeaf7654a14941c259c7c1b86273040260
JavaScript
Kemelbek/javascript
/js/Chapter 1/task_14.js
UTF-8
249
3.21875
3
[]
no_license
var str_enter = "dog"; // var arr_of_str = str_enter.split(""); var arr_of_chunks = []; for (i=0; i<str_enter.length;i++){ for (j=i+1;j<str_enter.length+1;j++){ arr_of_chunks.push(str_enter.slice(i,j)) } } console.log(arr_of_chunks)
true
4139891d98cf2fe512b92cddf4eba5503647bcc2
JavaScript
Baystef/Quick-Credit
/server/src/helper/auth-helper.js
UTF-8
844
3
3
[ "MIT" ]
permissive
import bcrypt from 'bcrypt'; /** * @description Helper class for password hashing and verification * @exports Helper */ class Helper { /** * @description Hashes plain text password * @param {string} password Password in plain text * @returns {string} Hashed password */ static hashPassword(password) { ...
true
c1cab36f71655a74b8ddde72cc0c4942456cdc57
JavaScript
samullai/Da-vinci
/Assets/Scripts/CriaOrda.js
UTF-8
2,143
2.640625
3
[ "Apache-2.0" ]
permissive
#pragma strict var Inimigos: GameObject; var AuxInimigo: GameObject; var AlteraInimigo: IAInimigo; var OrdaAtual: int; var QntInimigosOrda: int; var QntInimigosGerados: int; var TempoRes: float; var QntInimigosVivos: int; var NovaOrda : boolean; var QualMuda: int; var VidaInimigo: int; var VelocidadeInimigo: in...
true
21f7aa964aab470838cac75108d1e42a2aea2d70
JavaScript
MikeBendorf11/NodeApps
/ordersProcessor/public/javascripts/index2.js
UTF-8
2,280
2.53125
3
[]
no_license
$(function ready() { $("#submitForm").submit(function (event) { event.preventDefault(); var data = JSON.stringify( $("#submitForm").serializeArray() ); //console.log($("#submitForm").serializeArray()); // console.log(data); var formData = $('#submitForm')...
true
0a2bca47c6c7c38b140409527c3bee6d849ec384
JavaScript
zh69183787/wd-stptm
/classes/artifacts/apps_war_exploded/js/ajax.js
UTF-8
1,405
2.78125
3
[]
no_license
var http_request = false; //ajax请求 function doAjaxRequest(url,parentId) { http_request = false; // 开始初始化XMLHttpRequest对象 if (window.XMLHttpRequest) { // Mozilla, IE if (window.ActiveXObject) { http_request = new ActiveXObject("Microsoft.XMLHTTP"); // IE 7 } else { http_request = new XMLHttpRequest(); /...
true
aa7bf78b4a1fa698f32afed8e0841b8d9e0b98cd
JavaScript
rumeysayuk/FilmProject
/project.js
UTF-8
1,855
2.765625
3
[]
no_license
const filmForm = document.querySelector("#film-form"); const titleElement = document.querySelector("#title"); const directorElement = document.querySelector("#director"); const urlElement = document.querySelector("#url"); const cardBody = document.querySelectorAll(".card-body")[1]; const clear = document.querySelector(...
true
a04bb3ab863dd4ba5c89daa4401bbfdc84ac89f6
JavaScript
JaySanchez0/GO-MongoDB
/static/js/app.js
UTF-8
1,132
2.78125
3
[]
no_license
var app = (function(){ var showPeoples = function(err,data){ if(err!=null){ alert("Error"); return; } $("#add").html(""); var table= $("<table border='1' style='width:100%; boder:1px solid black; border-collapse:collapse;'><tr><td>Name</td><td>Age</td><td>Cit...
true
c1fae23f66bb1f1450028bcbb875968cd122ab60
JavaScript
CutieCat6778/moddy-djs
/noArgs/tags/taginfo.js
UTF-8
456
2.640625
3
[ "MIT" ]
permissive
const { MessageEmbed } = require("discord.js"); module.exports = function help(prefix) { let embed = new MessageEmbed() .setColor("#40598F") .setTitle("Tag info") .setDescription(`The tag info command's aliases are : \`taginfo\`, \`tag_info\` or \`tag-info\`\n\n **All commands:** \`${prefix...
true
58652b52b0339f9c9430dd2c09070f15cdbaa539
JavaScript
rickyrojas1/coin-stalker-graphql
/client/src/components/Coin/CoinTabs/CoinExchanges/CoinExchanges.js
UTF-8
4,104
2.515625
3
[]
no_license
import React, { Component } from "react"; import ReactTable from "react-table"; import scientificToDecimal from "scientific-to-decimal"; var numeral = require("numeral"); var FontAwesome = require("react-fontawesome"); class CoinExchanges extends Component { render() { if (this.props.exchangeList == "") { r...
true
5f3946bc8d1d97aeb2b94b4ad058455eb01d0c39
JavaScript
mistic/static-fs
/src/filesystem/streams/read.js
UTF-8
6,331
2.65625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
// NOTE: this is a raw re-implementation of https://github.com/nodejs/node/blob/v10.x/lib/internal/fs/streams.js#L45 // that is setup to follow our needs for the static filesystem import { Readable } from 'stream'; import util from 'util'; const ERR_STR_OPTS = (typeOfOptions) => `Expected options to be either an ob...
true
cddf061bc476a3d98d0bfc93ece8e2a4f7f9944a
JavaScript
TimTran8/Node3DTicTacToe
/public/js/logic.js
UTF-8
14,110
3.84375
4
[]
no_license
var isMyTurn = false; //Enum for gamestate var gameStateEnum = { "PLAYING" : 1, "X_WON" : 2, "O_WON" : 3, "TIED" : 4 } /* None of the code inside the board must not be touched directly by the client. Only the game has access to this object. The coordinate system of the board is (depthCoordinate...
true
dc79ff675a3735f25bb43d11f4f84bf744c4b43e
JavaScript
jaronbarends/webrtc-poc
/js/webrtcfy.chat.js
UTF-8
3,377
2.65625
3
[]
no_license
/* * chat.js * webrtc chat * @requires efcs.util.js * @requires wbrtcfy.js */ ;(function($) { //define file-scope variables var fsPeer,// reference to peer object in webrtcfy.js, will be passed in $fsChatWindow, $fsChatMessageCloneSrc; //define data types this add-on can send and/or receive var dataTypes = ...
true
4b95ff1573d759a10812844a8a0ed16ae10cf439
JavaScript
YoloMen/cnel
/public/js/controllerRestorePass.js
UTF-8
2,099
2.640625
3
[]
no_license
$(function(){ $(".send").on("click", function(){ var form =$("form"); if(validate()>0) return; if (!form[0].checkValidity()) { form.find(':submit').click(); return; } var data = form.serialize(); $.ajax({ url: URL+'Acceso/a/', type:'POST', dat...
true
3d2deb84f0bbaa58a549c02560be274627a57a1a
JavaScript
Kagami/wybm
/src/util/index.js
UTF-8
2,270
2.5625
3
[ "CC0-1.0", "LicenseRef-scancode-other-permissive", "Python-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/** * Helper routines and widgets. * @module wybm/util */ import assert from "assert"; import which from "which"; export {default as ShowHide} from "./show-hide"; const DEFAULT_TITLE = WYBM_VERSION; export function setTitle(title) { if (title) { document.title = "wybm | " + title; } else { document.ti...
true
f184c0718a146edd7138fd554cd15a854ebf4cc7
JavaScript
sumanedan/typescript
/asyncs/prom.js
UTF-8
89
2.609375
3
[]
no_license
fetch("https://jsonplaceholder.typicode.com/todos").then(data=>{ console.log(data) })
true
5ef33ea159c6d94b1255482ba41a868ab8eaa99e
JavaScript
miguelbcninfoservices/Formacion
/JS/variables/dom2.js
UTF-8
887
3.203125
3
[]
no_license
// Elemento evento function manejarClick2(){ console.log("click hecho sobre div"); var ps = divId.getElementsByTagName("p"); for (var i = 0; i < ps.length; i++) { divEventos.removeChild(ps[i]); } divEventos.removeEventListener("click", manejarClick2); } function manejarClick(){ console.log("click hecho...
true
886669fa6560bea6c8cbd8351fba2e10a9d16c68
JavaScript
baotoan-codegym/keystudy
/gamebanbong.js
UTF-8
354
3.078125
3
[]
no_license
let c = document.getElementById('game'); let ctx = c.getContext('2d'); let x = 20 ; let y = 20; function drawBall() { ctx.beginPath(); ctx.arc(x, y, 20, 0, 2 * Math.PI); ctx.fillStyle = "#11ff00"; ctx.fill(); ctx.closePath(); } setInterval(function (){ ctx.clearRect(0,0,c.clientWidth,c.height)...
true
f9350846e0a04c961289e7b5504b0affd9ac6bb7
JavaScript
ctftnks/ctftnks.github.io
/js/classes/map.js
UTF-8
8,460
3.5
4
[]
no_license
// A class for the Map, // discretized in Nx * Ny tiles, which can be separated by walls (walls) // also the tiles keep object lists for spatial sorting // the canvas is passed to the constructor to provide the size of the canvas Map = function (canvas = -1, Nx = -1, Ny = -1) { if (canvas == -1) canvas = { width...
true
028ff02c1d749fe13d779814c288db37bb908a1a
JavaScript
RamyaPayyavula/LeetCode
/LeetCode_Easy/Single_Number.js
UTF-8
644
3.765625
4
[]
no_license
/** * @param {number[]} nums * @return {number} */ //84ms fastre than 87% var singleNumber = function (nums) { const hash = {} for (let i = 0; i < nums.length; i++){ hash[nums[i]] = (hash[nums[i]] || 0) + 1 } for (key in hash) { if(hash[key] === 1) return key } }; //80ms faster t...
true
de16d384d71ab481e031613c1ca1182c3a9c9f8c
JavaScript
chen-yo/tsmwebapp
/client/src/components/Settings/reducer.js
UTF-8
1,447
2.75
3
[]
no_license
import { types } from './actions'; export const initState = { itemToEdit: null, data: [], isLoading: false }; export function reducer(state, action) { switch (action.type) { case types.FETCH_DATA_SUCCESS: { return { ...state, data: action.payload, itemToEdit: null, is...
true
8e43945ea025dca736650fdf9da0ceca834dccdd
JavaScript
williamschwindt/react-movie-theater
/movie-theater/src/reducers/movieReducers/movieCastReducer.js
UTF-8
808
2.625
3
[]
no_license
import { GET_MOVIE_CAST_START, GET_MOVIE_CAST_SUCCESS, GET_MOVIE_CAST_FAILURE } from '../../actions/types'; const initialState = { cast: [], isFetching: false, error: '' } export const movieCastReducer = (state = initialState, action) => { switch(action.type) { case GET_MOVIE_CAST_START : ...
true
a7dcd0487e2104d97482fc66702543fade85f73d
JavaScript
toannguyen197/Clothing
/Process/ShowProduct.js
UTF-8
1,055
2.75
3
[]
no_license
function DomId(id){ return document.getElementById(id); } var Product = [ { imgFront: './IMG/Top/black1.jpg', imgBack: './IMG/Top/black2.jpg', name: 'VINTAGE BLACK WAFFLE LOGO T-SHIRT', brandName: 'REPRESENT', price: 450000, } ] render(Product); function render...
true
7b04a1003ca8c47e5f7c866089a599a66529e14b
JavaScript
prokajkristof/szkriptnyelvek
/student/js/pages/CarsPage.js
UTF-8
1,561
2.875
3
[]
no_license
function createCarsTable(){ $.get("cars", function (req, res) { if(res === "success" & req!=null) createTable(["Name","Consumption","Color","Manufacturer","Available","Year","Horsepower"], req, ["name", "consumption", "color","manufacturer", "available", "year","horsepower"]); ...
true
44439c261f54eda48d17db8e9fd8753fba845418
JavaScript
natalka10021991/natalka10021991.github.io
/js/main.js
UTF-8
7,776
2.765625
3
[]
no_license
const mobileMenuButton = document.querySelector('#mobile-menu-btn'); const mobileMenu = document.querySelector('#mobile-menu'); const closeButton = document.querySelector('#close-button'); const mobileNavLink = $('.mobile-nav__link'); mobileMenuButton.addEventListener('click' , function (e) { e.preventDefault(); ...
true
5d62ae6340c47f554fbbcfa8486d71203796c7e9
JavaScript
edmondnow/twitch-viewer
/twitch.js
UTF-8
3,329
2.59375
3
[]
no_license
function getData() { var streamerlist = ["ESL_SC2", "OgamingSC2", "cretetion", "FreeCodeCamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"]; for(var i = 0; i<8; i++){ var streamer = streamerlist[i]; var html = ''; var link = ''; $.getJSON("https://wind-bow.gomix.me/twitch-api/users/" + stream...
true
553a04902f81641f7fb3e9d7bca0c6adb084f13b
JavaScript
genofonte/refeactoring
/src/app.js
UTF-8
2,912
3.25
3
[]
no_license
function statement (invoice, plays) { const statementData = {}; statementData.customer = invoice.customer; statementData.performances = invoice.performances.map(enrichPerfomances); return renderPlainText(statementData, plays); function enrichPerfomances(aPerfomance) { const result = Object.assign({}, aPe...
true
3cdf4e63db8260f1c5a1625a0520d0eded116203
JavaScript
nitishshelage/Travel-Insurance
/src/contact-info/contact-info.jsx
UTF-8
2,888
2.640625
3
[]
no_license
import React from 'react'; import './contact-info.css'; import {Button, Glyphicon} from 'react-bootstrap'; import ContactDetails from './contact-details'; class ContactInfo extends React.Component{ constructor(props){ super(); this.state={ givenName:'', familyName:'', ...
true
c242eda9c4b58dbf269aee75c20e64ebc5aaa1ca
JavaScript
dsnowb/codewars
/last_digit_of_a_large_number/solution.js
UTF-8
840
3.5
4
[]
no_license
var lastDigit = function(str1, str2){ //get the last digit of the base let base = parseInt(str1.charAt(str1.length-1)); //edge cases if (!base && parseInt(str2)) return 0; if (!parseInt(str2)) return 1; //get %4 for the second string var remainder = 0; for (var i = 0; i < str2.length; i++) { r...
true
6b4a4013c74e2a46e84ee6f57b2d359a285ad954
JavaScript
kaist-plrg/jsaver
/eval/test262/compiled/test262/language/expressions/new/ctorExpr-fn-ref-before-args-eval-fn-wrapup.js
UTF-8
1,080
2.921875
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
// Copyright (C) 2020 Leo Balter. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-new-operator description: > The constructExpr is referenced before arguments in the same EvaluateNew evaluation. Function wrap-up to use the same function level binding ref....
true
c858a9c822345895079894314b20cba7a2f247a3
JavaScript
YUG2006/traveling-ship
/sketch.js
UTF-8
619
3.015625
3
[]
no_license
var shipImage,ship; var seaImage,sea; function preload(){ shipImage1 = loadImage("ship-1.png"); shipImage2 = loadImage("ship-2.png"); shipImage3 = loadImage("ship-3.png"); shipImage4 = loadImage("ship-4.png"); seaImage = loadImage("sea.png"); } function setup(){ createCanvas(1000,400); ...
true
45e697da0b8b7bf0d93237df2fff2c9501cec77c
JavaScript
lennardtastic/prodpad-frontapp-plugin
/js/axios-methods.js
UTF-8
3,662
2.65625
3
[ "MIT" ]
permissive
// Constants var prodpadPostIdeaUrl = 'https://api.prodpad.com/v1/ideas'; // Axios Settings Variables var headers; var token; var config = { headers: { Authorization: "Bearer " + token } }; // Placeholder variable for the parameters var bodyParameters = { key: "value" }; // List of Fields to be s...
true
d1478df0c18c60e943f20da97e1c15baef3c0b8f
JavaScript
ZhuyuAndCoder/material-design
/src/routers/authority.dictionary/sagas/index.js
UTF-8
2,446
2.578125
3
[]
no_license
import {take, put,call,fork} from 'redux-saga/effects' import * as API from "../api" import * as actions from '../actions'; //列表 function* fetchDictionaryList(){ while(true){ let postAction = yield take(actions.DICTIONARY_LIST_GET); yield put(actions.dictionaryLoadState(true)) let posts = ...
true
95d610aa7c6ee439e985a739b18c32e213019e2d
JavaScript
Raekh/argo-commit
/index.js
UTF-8
1,810
2.875
3
[]
no_license
var inquirer = require("inquirer") var choices = [{ type: 'checkbox', name: 'action', message: "What do you wish to do ?", choices: [ { name:'Commit', value:'commit' }, { name:'Copy commit message to clipboard', value:'copy' ...
true
6e379680789348b6e1785d07330070d7d1cb9dab
JavaScript
oussamabouchikhi/js_de_test
/script_refacto.js
UTF-8
1,675
3.078125
3
[]
no_license
const data = [ { Cheese: 22.2, CHOCOLATE: 10.3, Impulse: 1.5, period: '2021_26', }, { Cheese: 21.8, CHOCOLATE: 9.8, Impulse: 1.5, period: '2021_27', }, { Cheese: 21.2, CHOCOLATE: 9.7, Impulse: 1.4, period: '2021_28', }, ]; const calculateTotal = (array) => ...
true
a5106f222c209460edc9b348d39864bcd918a958
JavaScript
agusb98/nodejs-mysql-links
/src/routes/links.js
UTF-8
2,317
2.796875
3
[]
no_license
/** * This route manage the action with a link: list, save, update, delete */ const pool = require('../database'); const express = require('express'); const router = express.Router(); const { isLoggedIn } = require('../lib/auth'); //Middlerware, protect functions //Show form to add new link router.get('/add', isL...
true
7120b04a043b104f6e1a5a9e0bf6a57ed584f26b
JavaScript
rambo255/Neighbourhood_map
/js/app.js
UTF-8
701
2.515625
3
[ "MIT" ]
permissive
// asynchronously load in googleMaps var googleMaps = "https://maps.googleapis.com/maps/api/js?" + "key=AIzaSyBQLmznp1l7uFNl_N18dVqm-4r2HdgO3Zg"; $.getScript(googleMaps) // handle googleMaps success .done(function () { googleSuccess(); }) // handle googleMaps error .fail(fun...
true
2bcbf5a2edd55db0c238888949cf12c606a28986
JavaScript
ttulka/wasm-severless-from-scratch
/index.js
UTF-8
9,437
2.5625
3
[ "MIT" ]
permissive
const fs = require("fs"); const http = require("http"); const {Worker} = require("worker_threads"); const HOST = process.env.HOST || "0.0.0.0"; const PORT = +process.env.PORT || 8000; const PATH_TO_MODULES = process.env.PATH_TO_MODULES || "." const CACHE_TTL_MS = +process.env.CACHE_TTL_MS || 1000; const WORKER_POOL_SI...
true
61cfac4cdc2b5ceb091039b4819d6fb974c1ed91
JavaScript
MauroMieres/CursoIngresoJS
/2-InstruccionIf/jsInstruccionIF-01.js
UTF-8
570
4.03125
4
[]
no_license
/* Mieres Mauro operadores aritmeticos, + - / * %, sus operadores son numericos, number operadores relacionales; == (igual) != (distinto) > mayor < menor >= mayor o igual <= menor o igual sus operadores son datos, ejemplo, booleanos, strings, etc, el resultado es un booleano Al ingresar una edad que sea igual a 15, m...
true
2ae31035217d46cc445addbdc8761661bb21f922
JavaScript
joeybronzoni/ReactReduxToolsWithNotes
/src/components/posts_show.js
UTF-8
2,678
3.125
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { fetchPost, deletePost } from '../actions'; class PostsShow extends Component { componentDidMount() { /* match.params gives us access to all of the parameters in the url so if we had...
true
36ff97b68126146c95f2f0b51b80c713188c5fdf
JavaScript
therewasaguy/codeofmusic
/drumSequencer/public/sketch.js
UTF-8
7,266
2.75
3
[]
no_license
var bpm = 90; var current = 0; // drums var kick = new Tone.Sampler('audio/kick.mp3'); var snare = new Tone.Sampler('audio/snare.mp3'); var hh = new Tone.Sampler('audio/hh.mp3'); var hho =new Tone.Sampler('audio/agogoHigh.mp3'); var drumArray = [kick, snare, hh, hho]; for (var i in drumArray) { drumArray[i].toMaster(...
true
76e2cfb1d09926905df893b244bbc9052a567917
JavaScript
NourhanSalah97/React-project
/src/Actions/index.js
UTF-8
821
2.8125
3
[]
no_license
const baseURL="http://localhost:3001/students?name="; export const getStudents= async (name) =>{ let payload= await fetch(`${baseURL}${name}`) .then((response)=>{ return response.json() }) .then((data)=>{ return data }) .catch((err)=>{ console.log(err) }) return{ ...
true
05f929033296f40d05377ffcd1c73d30a6946ae6
JavaScript
GabrielCastilloM/avocato
/src/index.js
UTF-8
2,436
3.609375
4
[ "MIT" ]
permissive
/** * This file is just a silly example to show everything working in the browser. * When you're ready to start on your site, clear the file. Happy hacking! **/ // tilizando fetch // async function fetchData() { // const response = await fetch(url), // data = await response.json() // console.log(...
true