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
fda570976093a2cb7c6a21fdf60688d3712b3cbc
JavaScript
HaywardPeirce/1288_substitutions
/content.js
UTF-8
12,800
3.078125
3
[]
no_license
//alert("Page Loaded"); function logger(content){ //TODO: how to lookup the logging status //if logging/debugging mode is enabled, then print out this contents that were passed in if (loggingStatus){ console.log(content); } } //var keywords = {"test":"test1", "and":"and1", "the":"the1", "p...
true
e90320713f75e080cd60dce7e9647a21b373402c
JavaScript
detoix/algorithms-demo
/src/components/Mixins/heapSort.js
UTF-8
1,042
3.015625
3
[]
no_license
export default { methods: { buildHeap (data) { for (let i = data.length / 2 - 1; i >= 0; i--) { this.heapify(data, i, data.length) } }, heapify (data, i, max) { let largest = i let left = 2 * i + 1 let right = 2 * i + 2 if (left < max && d...
true
a07e52c976a3e372323c438f845b200317480c1b
JavaScript
sjbmarek/Psychic-Game
/assets/javascript/game.js
UTF-8
2,931
4.1875
4
[]
no_license
// Creates an array of all letter choices. var computerChoices = ["a","b","c","d","e","f","g","h","i","j","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] var wins = 0; var losses = 0; var guessNumber = 10; var yourGuesses =[] var computerGuess = computerChoices[Math.floor(Math.rand...
true
7f6dc86a3d72ad38e03e2e8ef5a91470470e2532
JavaScript
NazoSnare/kafka-rest
/lib/ConsumerInstance.js
UTF-8
2,767
2.515625
3
[ "MIT" ]
permissive
"use strict"; const Promise = require("bluebird"); const debug = require("debug")("kafka-rest:consumer-instance"); const {NConsumer} = require("sinek"); class ConsumerInstance { constructor(config, maxWindowSize = 100, messageFormat, earliestElseLatest){ this.config = config; this.maxWindowSize = maxWindowS...
true
29d579b4ef5de07daf7682a44a123eed433a316e
JavaScript
elcoosp/files-n-dirs
/index.js
UTF-8
885
2.625
3
[ "MIT" ]
permissive
const fs = require('fs'), path = require('path'), { promisify } = require('util'), writeFile = promisify(fs.writeFile), mkdir = promisify(fs.mkdir) const mkDirsNFiles = (tree, currentDir = process.cwd()) => { if (currentDir !== process.cwd()) mkdir(currentDir) return Promise.all([ tree.files && ...
true
4b95f13a268d97d9102cc20e86406f6c0718ee88
JavaScript
iashaff/WeeklyWebDEvChallenge
/Netflix card clone/index.js
UTF-8
1,467
2.671875
3
[]
no_license
let thumbUpBtn = document.querySelector(".thumbup-btn") let thumbDownBtn = document.querySelector(".thumbdown-btn"); let plusBtn = document.querySelector(".plus-btn"); let downBtn = document.querySelector(".down-btn"); let moreInfo = document.querySelector(".hidden"); let hiddenDownBtn = document.querySelector(".hidde...
true
9528a98d7e275519bf429c574df1488ff26f66a9
JavaScript
getsentry/sentry-javascript
/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/subject.js
UTF-8
675
3.21875
3
[ "MIT" ]
permissive
const btn = document.createElement('button'); btn.id = 'btn'; document.body.appendChild(btn); const functionListener = function () { functionCallback(this.constructor.name); }; class EventHandlerClass { handleEvent() { classInstanceCallback(this.constructor.name); } } const objectListener = new EventHandler...
true
708aaacfcc67a9709806463018aee69d2601279c
JavaScript
justinochoa5792/Covid_cases
/src/components/Europe.jsx
UTF-8
953
2.625
3
[]
no_license
import React, { useState, useEffect } from "react"; import Axios from "axios"; import Navbar from "./Navbar"; function Europe() { const [euroCovid, seteuroCovid] = useState([]); useEffect(() => { const renderEurope = async () => { const response = await Axios.get( "https://api.covid19api.com/liv...
true
19f4ddf0243fbc1358e9d553b434697128b6db50
JavaScript
db001/nodeschool
/learnyounode/baby.js
UTF-8
113
2.703125
3
[]
no_license
const args = process.argv.slice(2); console.log(args.reduce((a, b) => { return parseInt(a) + parseInt(b) }));
true
f342ca46bef194dae9890321356e6796e8e41690
JavaScript
SidibeDaouda/jeu-en-ligne
/public/js/classes/Fragment.js
UTF-8
1,623
3.140625
3
[]
no_license
/* eslint-disable no-unused-vars */ /* eslint-disable no-undef */ /* eslint-disable no-plusplus */ class Fragment { constructor(x, y, radius, canvas, ctx, hauteurDuSol) { this.canvas = canvas this.ctx = ctx this.hauteurDuSol = hauteurDuSol this.x = x this.y = y this.radius = scale(radius, this...
true
15494c7e89556776eabd2b5d0d799aaabe24b28f
JavaScript
Promotion-KMV/truck_driver
/truck_driver/static/js/app_create_order.js
UTF-8
6,934
2.90625
3
[]
no_license
'use strict'; document.addEventListener('DOMContentLoaded', () => { const spanKilo = document.getElementById('in_kilo'), createOrder = document.getElementById('form_create'), formCreateOrder = document.getElementById('form_create_order'), resultCalculate = document.getElementById('result'), subInpu...
true
f2e6778b7935a4a77790a2987806f6145b9899d4
JavaScript
a1044187112/aihua
/AiProject/js/src/robot.js
UTF-8
3,977
2.78125
3
[ "MIT" ]
permissive
var robot = { init() { this.initCharts1(); // 今天收益 this.initCharts2(); // 最近七天收入 this.initCharts3(); // 总收益 }, initCharts1() { $("#d_canvas_a").css('width', parseInt($('.head_con').css('width')) + 180 + 'px'); // 设置画布宽度 var dom = document.getElementById("d_canvas_a"); robot.myChart = echarts.init(dom); ...
true
a1303da2b8640f067724675482a3cd804e0a514f
JavaScript
VickyPatel/ReactReduxApp
/public_html/js/components/TodoItem.js
UTF-8
898
2.53125
3
[]
no_license
import React from 'react'; class TodoItem extends React.Component { handleComplete(){ this.props.actions.completeTodo(this.props.todo.id); } handleDelete(event){ event.preventDefault(); console.log(this.props); this.props.actions.deleteTodo(this.props.todo.id); } ...
true
58092ea6b57011a6d83a24ba3c287f0f6db3d4be
JavaScript
andrewrametta/api-node-drills
/server.js
UTF-8
2,073
3.15625
3
[]
no_license
const express = require("express"); const app = express(); const morgan = require("morgan"); app.use(morgan("dev")); app.get("/", (req, res) => { res.status(200).send("Hello Express!"); }); app.get("/users", (req, res) => { let users = ["Andrew", "Peter", "Alex", "Jesse", "Phin"]; res.status(200).send({ users ...
true
dd4aa03dca273159c071ed9c0926446355d0c3af
JavaScript
whitebird08/classexNotes
/week17/tue.js
UTF-8
2,585
3.625
4
[]
no_license
function group(array) { return array.reduce(function (result, order) { result[order.customerId] = orders.filter(function (request) { return request.customerId == order.customerId; }); return result; }, {}); }` var customers = [ {id: 1, name: 'Gertrude'}, {id: 2, name: 'Taurean'}, {id: 3, na...
true
10f3fe042887c2d81a5249f0837dae8cfdbc2913
JavaScript
IgorPugachev/GeekbrainsWebserver
/public/js/shop.js
UTF-8
4,626
3.921875
4
[]
no_license
// создадим компонент для списка карточек class List { // нам нужен список товаров. Он создается как массив _items = []; //функция-конструктор, которая будет заниматься получением данных о товарах и заполнением массива: constructor() { //создадим переменную, в которую положим "сырые" объекты: ...
true
f3b9982215ebc895f58efe429575c357391d920a
JavaScript
lazav94/kmean-psz-etf
/server/public/chart.js
UTF-8
5,672
2.75
3
[]
no_license
$(document).ready(function () { //polarArea const loadDecadeChart = (data) => { const labels = Object.keys(data); const precentages = Object.values(data).map(d => d.precentage); const counts = Object.values(data).map(d => d.count); var ctx = document.getElementById("decadeChart")....
true
7bed2eed53bbf0ce2033af6dcd8aef43f97346a4
JavaScript
kahns729/ex24-fp
/static/js/app.js
UTF-8
944
3.3125
3
[]
no_license
function init() { window.setInterval(function(){ /// call your function here get_count().then(function(result) { update_counter(result); }, function(err) { console.log(err); }) }, 1000); } function get_count() { return new Promise(function(resolve, reject) { $.ajax({ type: "GET", url: '/...
true
14417681bebc02c87c547de3bdb81ae0b451536e
JavaScript
jaroslaw-bagnicki/kanban-board-jquery
/src/scripts/models/___tests__/CardClass.test.js
UTF-8
1,047
2.5625
3
[]
no_license
import { Card } from '../.'; import { generateId } from '../../utils'; describe('Card Model', () => { it('create new card', () => { const data = { id: generateId(), name: 'Task1', description: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Maxime, exercitationem.', ...
true
392712e435cc609e9b58e0f6a79bb4125a19ec53
JavaScript
DamienSerrurier/Book_js
/DOM/js/dom.js
UTF-8
6,033
3.53125
4
[]
no_license
//Intéraction dans le DOM // document.getElementById('demo'); //permet de sélectionner un élément par rapport à son id // document.getElementsByClassName('paragrph'); //permet de sélectionner tous les éléments par rapport à une classe en retournant une HTMLCollection // document.getElementsByTagName('p'); //perment de ...
true
375fe7568a08fdd0d99791ab3c4819d4d1a55f0f
JavaScript
hugo-vlv/saas-stripe
/code/client/controllers/public/signup.js
UTF-8
3,450
2.578125
3
[ "MIT" ]
permissive
/* * Controller: Signup * Template: /client/views/public/signup.html */ /* * Rendered */ Template.signup.rendered = function(){ $('#application-signup').validate({ rules: { name: { required: true }, emailAddress: { required: true, email: true }, password: { ...
true
c78fed5648458cccd36b623418f0b1d36e9017ea
JavaScript
sdgdsffdsfff/svnmanager
/resources/js/core/kernel.js
UTF-8
15,695
2.5625
3
[]
no_license
/** * Created by Yinxiong on 2014-10-10. */ define(function(){ var core = {}; var root = this; var $window = $(window); core.win = $window; core.body = null; $(function(){ core.body = $('body'); }); core.Class = core.Class = function(){ var initializing = false, fnTes...
true
a7e61e30912fb3c65ab63cd6b77a8451bd1da11d
JavaScript
joanlamrack/Uberfox-Hacktiv8-Phase0
/Phase0/h8-p0-w3/Exercise4_Menggunakan_Built_In_Function_pada_Array.js
UTF-8
1,118
3.78125
4
[]
no_license
//Exercise 4 var input = ["0001", "Roman Alamsyah ", "Bandar Lampung", "21/05/1989", "Membaca"]; dataHandling2(input); function dataHandling2(inputArray){ inputArray.splice(1,2,"Roman Alamsyah Elsharawy", "Provinsi Bandar Lampung"); inputArray.splice(4,1,"Pria","SMA International Metro"); console.log(inputArray);...
true
8d664aeead01c70a18e18f5b170fae354a3384a2
JavaScript
Eupheme/sp2016
/PROJECT/code/js/statistics-admin.js
UTF-8
2,332
2.75
3
[ "MIT" ]
permissive
var order = 0; var by = 0; function getAdminTransactionHistory(o, b){ $.ajax({ type: "GET", contentType: "application/json", url: "/api/admin_transaction_history", data: {order: o, by: b}, success: function(data) { $("tr.entry").remove(); var...
true
cefc945da32dec12472a841aa4417dab59d57a1b
JavaScript
117139/nodejs_app
/06nodejs回调和事件驱动/01io.js
UTF-8
304
2.703125
3
[]
no_license
var fs=require('fs') //非阻塞式io // console.log('1'); // fs.readFile('mime.json',function(err,data){ // console.log('2') // // }) // console.log('3') function getMime(){ fs.readFile('mime.json',function(err,data){ return data; }) } console.log(getMime());/*有问题*/
true
a1882c5f3d9a05f9482a704f25865287601dbbeb
JavaScript
samuel-leonard/javascript-exercices
/08-dom/08-generate-table-two/script.js
UTF-8
618
2.875
3
[]
no_license
/* becode/javascript * * /08-dom/08-generate-table-two/script.js - 8.8: génération d'un tableau (2) * * coded by leny@BeCode * started at 26/10/2018 */ // NOTE: don't focus on the existing code structure for now. // You will have time to focus on it later. (() => { const afftable = document.getElementById("...
true
7a7d398113d27f00af34d44d809f7bc9f82bcde9
JavaScript
rajneesh84458/Employee-app
/server/app.js
UTF-8
2,116
2.640625
3
[]
no_license
const express = require('express') const app = express(); const bodyParser =require('body-parser') const mongoose = require('mongoose') require('./Employee') app.use(bodyParser.json()) const Employee = mongoose.model("employee") const mongoUri ="mongodb+srv://cool:azpPYLEF5tDWrVb3@cluster0-fa1ab.mongodb.net/test?re...
true
07253b72b366290d87fc59e08a180b0713480ec8
JavaScript
juansensio/skylab-bootcamp-201807
/staff/aranzazu-perdomo/string-native/concat.test.js
UTF-8
366
3.171875
3
[]
no_license
'use strict'; describe('String.prototype.concat', function () { var string; beforeEach(function () { string = 'hello world'; }); it('Concatenates the string arguments to the calling string and returns a new string.', function() { var result=string.concat("!"); expect...
true
437a008332fef78c6eaf61380b13809950d1a9f5
JavaScript
JonasBaekbo/Opstart_Jonas_Baekbo
/funktioner/2.js
UTF-8
260
3.046875
3
[]
no_license
var tekst = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam quis efficitur arcu, vel efficitur lorem."; function afkort(tekst, antal) { tekst = tekst; var afkort = tekst.slice(0, antal); console.log(afkort); } afkort(tekst, 56);
true
ebc89145d13db7ca916ece3097a0c7fc8879428a
JavaScript
dcassar622/count-of-monte-crypto-JS
/src/components/CurrencyManager.js
UTF-8
1,611
2.765625
3
[]
no_license
import { displayEntries } from "./EntriesDisplay.js"; import { calcTotal } from "./PortfolioManager.js"; export function getCurrencySymbol(currency) { let currencySymbol = ""; switch (currency) { case "USD": currencySymbol = "$"; break; case "GBP": currencySymbol = "£"; break; c...
true
29dd43365b5f44930e956bb857278f0ab905e92a
JavaScript
TheRmbomo/excelsior-website
/public/js/path.js
UTF-8
2,123
2.578125
3
[]
no_license
let p = { logged_in: _id('logged_in').innerText === 'true', pathURL: _id('pathURL').innerText, comment_box: _id('pathcomment-field'), send_comment: _id('pathcomment-send'), follow: _id('follow') } p.send_comment.disabled = true p.send_comment.classList.remove('light', 'background') if (!p.logged_in) { let ...
true
f2b9042e4f49a1e02e9c6cf4f29fd0e8be97caf8
JavaScript
ulascan54/vue-education
/5-tekrar/1-todolist-app-vuex/src/store/index.js
UTF-8
1,187
2.53125
3
[]
no_license
import {createStore} from "vuex" import axios from "axios" const store = createStore({ state:{ itemList:[] }, mutations:{ getItem(state,item){ state.itemList=item console.log('item :>> ', item); }, saveItem(state,item){ state.itemList.push(item) }, deleteI...
true
ad723ad3af46d44ff57eb6c4046c51cb5f8e3088
JavaScript
jojoucsd/codingReview
/arraySum/smallestDifference.js
UTF-8
1,233
4.03125
4
[]
no_license
//{"arrayOne": [-1, 5, 10, 20, 28, 3], "arrayTwo": [26, 134, 135, 15, 17]} //Write a function that takes in two non-empty array of int, finds the pair of numbers (one from each) whose absolute difference //is closest to zero, return an array with [array1, array2] //assume only 1 pair with smallest function smallestDi...
true
309d1c3e6a802f59937c58ba7637881d70b7547d
JavaScript
PhilippGrulich/Maven-Dependency-Tool
/ui/app/Services/Graph.js
UTF-8
2,776
2.828125
3
[ "Apache-2.0" ]
permissive
/** * Created by Philipp on 21.12.2015. */ "use strict"; class Graph { constructor(elementId) { if(elementId==undefined) elementId = "graph"; this.graph = Viva.Graph.graph(); this.layout = Viva.Graph.Layout.forceDirected(this.graph, { springLength: 20, ...
true
0bd4eb9b02b6996c3347e2aff846995d9ce30c69
JavaScript
xydoy92/lesson_19
/script.js
UTF-8
3,990
3.046875
3
[]
no_license
const noDisplay = "nodisplay"; const hiddenVisibility = "hidden"; let users = [ { login: "Meow", password: "123456", name: "Аня", age: 23, }, { login: "Waw", password: "1234", name: "Саша", age: 14, }, { login: "Coo-coo", password: "1111abcd", name: "Андрей", age: 35, }, { login: "gaga84", password: "abcdefgh...
true
e064973c926728fdba9d44463b75b250105941f1
JavaScript
AngelBFdev/19ds
/senx.js
UTF-8
466
3.15625
3
[]
no_license
function fact(inc) { var fac=1 for(j=0;j<=inc;j++) { fac=j*fac if(fac==0) fac=1 } return fac; } //SENO CON RADIANES var x=4 var nega=false var form=0 for(i=0;i<20;i++) { if(i%2!=0&&nega==false) { form+=(Math.pow(x,i))/fact(i) nega=true ...
true
1bf0e76c7254e7ded3ddb974aa030396447f573f
JavaScript
Kitingu/PropertyPro
/server/middlewares/validators.js
UTF-8
3,616
2.59375
3
[ "MIT" ]
permissive
const joi = require('@hapi/joi') const { Response } = require('../helpers/utils'); const userResponse = new Response(); const onError = (error) => { if (error[0].type === 'any.required') { return new Error(`${error[0].path[0]} is required`); } return new Error(`${error[0].context.label}`); }; const opti...
true
0d077f28231b522b95892166134a4ace41389766
JavaScript
esbaddeley/thermostat
/js/bower_components/jquery-thermometer/js/jquery.thermometer.js
UTF-8
6,817
2.671875
3
[ "MIT" ]
permissive
(function($) { var Thermometer = { /** * Set the value to show in the thermometer. If the value * is outside the maxmimum or minimum range it shall be clipped. */ setValue: function( value ) { if( value >= this.options.maxValue ) { this.valueToAttain = this.options.maxValue; } else if( valu...
true
1732396bc97cd8f4a4c270008230547d28f32f99
JavaScript
stephenbunch/type
/src/define/Descriptor.js
UTF-8
11,448
2.75
3
[ "MIT" ]
permissive
var Descriptor = new Class( function() { var GET_ACCESS = { "__": PRIVATE, "_": PROTECTED }; var IS_VIRTUAL = { "$": true, "_$": true }; var GET_PREFIX = { "__": 2, "_$": 2, "_" : 1, "$" : 1 }; var ACCESS = {}; ACCESS[ PU...
true
fb6b796f9402b6684ad7c9b55dadbca46e28f86f
JavaScript
itschayli/itschayli.github.io
/javascript/pong-index.js
UTF-8
13,963
2.96875
3
[]
no_license
/*This is where the game code takes place You'll mainly be adding imports from audio.js or events.js and then activating/checking them in the top two sections STARTUP EVENTS - things that will run once when the game starts RUNNING PROCESSES - things that will run every frame */ //Import Code From Other JS Modules //...
true
35f0e0a59402004d4f32f2fac48a553fcb0602ae
JavaScript
darshil200730/project-26
/sketch.js
UTF-8
851
2.734375
3
[]
no_license
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; var box1,box2,box3 var ground var ball var dustbinimage function preload() { dustbinimage=loadImage("dustbingreen.png") } function setup() { createCanvas(1600, 700); engine = Engine.create(); myWor...
true
b649d32d545c544cdbfd384809fd17c0a5ad37da
JavaScript
RUTNIX/tele-bot
/index.js
UTF-8
768
2.96875
3
[]
no_license
const telegramBot = require ('node-telegram-bot-api') const token = '1890648512:AAGH55t14aSYphi1chA8RtG9wWpnemwX2Fk' const bot = new telegramBot(token, {polling:true}) bot.on('message', (msg)=>{ const chatId = msg.chat.id if(msg.text == 'Hello' || 'hello'){ bot.sendMessage(chatId, `Hello, ${ msg.fro...
true
81621440ded3668b6dc1d18446efc0bf4a9db3bd
JavaScript
iHansy/Feedback-Tracker
/src/components/Comments/Comments.jsx
UTF-8
2,069
2.53125
3
[]
no_license
import React, { Component } from 'react'; import { connect } from 'react-redux'; // Material-UI import { Button, Card, TextField } from '@material-ui/core'; class Comments extends Component { //checking store values componentDidMount() { console.log(this.props.reduxStore); } state = { ...
true
de0d17a8d566e84ab8189968f08563eeab4772fd
JavaScript
McTaliesin/assignments
/backupSacredNoMess/apricemonMay7337pm/client/src/Components/Home/Home.js
UTF-8
2,154
2.625
3
[]
no_license
import React, { Component } from "react"; import axios from "axios"; import SearchResults from "../SearchResults/SearchResults" import Form from "../Form/Form"; import "./styles.css"; const CoinAPI = "https://api.coinmarketcap.com/v2/ticker/?limit=10"; console.log("check 1"); class Home extends Component { const...
true
ef098088da03d9d38b1871eef4136b729e146f14
JavaScript
Ankit-Suryawanshi/Task-management
/frontend/src/reducer/index.js
UTF-8
458
2.546875
3
[]
no_license
import { SET_USERDATA, SET_ALL_TASK, SET_ALL_DEVELOPER } from '../actions'; const initialState = {}; const data = (state = initialState, action) => { switch(action.type) { case SET_USERDATA: return {...state, userData: action.data} case SET_ALL_TASK: return {...state, taskData: action.data} ...
true
77f940118d4441aa8d85130d6c695e3ce5386a9b
JavaScript
totozxz/CPE-Document-Management-System-and-Search-Engine-for-Senior-project-report
/assets/js/Manage.js
UTF-8
1,865
2.6875
3
[ "MIT" ]
permissive
// Delete Database // if(window.location.pathname == "/management"){ $ondelete = $(".table-responsive .table tbody tr td a.delete"); $ondelete.click(function(){ var id = $(this).attr("data-id") var request = { "url" : `http://10.35.29.120/api/${id}`, "method" : "DELETE" ...
true
71e81090e6d783ad774d0cdc8e4fd9657efd8378
JavaScript
macako/springboot-react-demo
/frontend/todo-app/src/components/todo/WelcomeComponent.jsx
UTF-8
1,366
2.515625
3
[]
no_license
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import HelloWorldService from '../../api/todo/HelloWorldService.js'; class WelcomeComponent extends Component { constructor(props) { super(props); this.state = { message: '' }; this.handleSuccessfulResponse = t...
true
dee2f33ee5486e55870252be639a1d4762e1e713
JavaScript
dudenas/sketches
/2019/JUNE/27-06-pattern/sketch.js
UTF-8
1,060
3.234375
3
[]
no_license
const clrs = [5, 250] const totalElements = 6 const len = 100 let grfc function setup() { createCanvas(540, 540) grfc = [] for (let j = 0; j < 4; j++) { const randomSize = [] const obj = [] let left = len for (let i = 0; i < levels; i++) { const temp = random(random(random(left / 2))) randomSize.push(...
true
1bc5645cd4596c401218bc3c051e0712038a4fac
JavaScript
fozzest/essenceOfChange
/js/imageMove.js
UTF-8
3,527
2.890625
3
[]
no_license
// The GridItem class. class ImageRoll { constructor(el) { this.DOM = {el: el}; // The rectangle element around the image. this.DOM.bg = this.DOM.el.querySelector('.paper_item-bg'); // The following DOM elements are elements that will move/tilt when hovering the item. this.DO...
true
5c82207a5002397c5def497e554c78612d562352
JavaScript
Pasokon64/Nave
/public_html/modules/shoot.js
UTF-8
1,116
3.59375
4
[]
no_license
class Shoot { velocity = 4; hit = false; /** * Cria um novo objeto de tiro no cenário. * * @param {Object} parent Objeto que disparou o tiro. * @param {CanvasRenderingContext2D} ctx Contexto de renderização. */ constructor(parent, ctx) { this.parent = parent;...
true
37fec9cd3963dc9d7173826d077812d7322bfe90
JavaScript
maschzh/u9blogsApp
/util/managePassword.js
UTF-8
559
2.796875
3
[]
no_license
var bcrypt = require('bcrypt'); //crypt the password module.exports.cryptPassword = function (password, callback){ bcrypt.genSalt(10, function (err, salt){ if(err){ return callback(err); } bcrypt.hash(password, salt, function (err, hash){ return callback(err, hash); }); }); }; //compare the passwords m...
true
b5b52d305b3c64a4e89a836d2dfba0e6c4d9d15c
JavaScript
Auralcat/desafios-js-ninja
/desafio-24/desafio-semana-24.js
UTF-8
2,954
3.671875
4
[]
no_license
/* Nossa calculadora agora está funcional! A ideia desse desafio é modularizar o código, conforme vimos na aula anterior. Quebrar as responsabilidades em funções, onde cada função faça somente uma única coisa, e faça bem feito. - Remova as duplicações de código; - agrupe os códigos que estão soltos em funções (declara...
true
20368c52917cfae77a7aa5bd1991b477ee72b83d
JavaScript
JamesThinkful/Project-Local-Library-
/Project_Local_Library_1/public/renderers/books.js
UTF-8
2,554
3.046875
3
[]
no_license
// Templates function returnedBadgeTemplate(returned) { return ` <span class="badge badge-${returned ? "light" : "dark"}"> ${returned ? "Returned" : "Loaned Out"} </span> `; } function bookLinkTemplate(book, returned = false) { return ` <li class="list-group-item"> <a data-id="${book.id}" ...
true
ab3235781cc91aefda2b1895099236436a7f2dd2
JavaScript
ArghyaMukherjee10/Race-car
/Form.js
UTF-8
1,300
2.734375
3
[]
no_license
class Form{ constructor(){ this.title = createElement("h1") this.input = createInput("name") this.button = createButton("start") this.reset = createButton("Reset"); this.greet = createElement("h2"); } display(){ this.title.html("Fast Racing Game") ...
true
3d31238c1b6edcca52e19906833254d9449f3902
JavaScript
eeshakruthi/p25
/paper.js
UTF-8
670
2.703125
3
[]
no_license
class Paper{ constructor(x,y,radius){ var option={ isStatic:false, 'restitution': 0.3, 'friction':100, 'density':1.2 } this.radius=radius; this.image=loadImage("paper.png"); th...
true
b863b5192b05195a48dd91842394bb651f4ee9a6
JavaScript
anton080491/anton080491.github.io
/calculator/js/main.js
UTF-8
9,303
3.453125
3
[]
no_license
'use strict'; //left side of the program let startBtn = document.getElementById('start'), expensesItem = document.getElementsByClassName('expenses-item'), expensesItemBtn = document.getElementsByTagName('button')[0], optionalexpensesBtn = document.getElementsByTagName('button')[1], countBudgetBtn = do...
true
dff5a7ecb8bd9f6c09e2d3fc601435a75848200d
JavaScript
StrangeClow/leetcode_JS
/30MinutesCode/TYPE/isArrayLike.js
UTF-8
486
3.703125
4
[]
no_license
/** * 检查是否为类数组 具有iteraror接口 * * @param {*} obj */ const isArrayLike = obj => { return obj != null && typeof obj[Symbol.iterator] === 'function' } let a1 = [1,2,3,4,5] let a2 = null let a3 = 'hello' let a4 = [{a:'good'},{b:'luck'},{c:'to'},{d:'me'}] console.log('类数组===>',isArrayLike(a1)); c...
true
d49dc0e07fc1299d43c05c51eeceb3d98b89973a
JavaScript
RichardInnocent/OCPStudy
/data.js
UTF-8
32,089
3.109375
3
[]
no_license
// Do not edit. Please edit the questions.json file instead var questions = [ { question: "When is <code>object instanceof Object</code> false?", page: 8, answer: "<code>object == null</code>" }, { question: "When will <code>object1 instanceof type</code> not compile? (Where <code>type instanceof...
true
f8425b3618212e502d2a5f6201adc1aa356b9059
JavaScript
Arison13/web-sprint-challenge-single-page-applications
/src/components/Form.js
UTF-8
5,083
2.671875
3
[]
no_license
import {useState, useEffect} from 'react'; import axios from 'axios'; import * as Yup from 'yup'; import './styles/Form.css'; export default function Form() { const [formData, setFormData] = useState({ name: '', size: '', topping1: false, topping2: false, topping3: false, ...
true
a9f4b58d1a430c7c8da04d8252e0e3607a7c40eb
JavaScript
jasonsau/Notas
/src/js/index.js
UTF-8
562
2.890625
3
[]
no_license
const elementoId = document.getElementById('elemento-id'); const navId = document.getElementById('nav-id'); elementoId.addEventListener('click', toogleMenu); document.body.addEventListener('click', () => { }); function toogleMenu() { if(navId.classList.contains('toggle-menu-position-show')) { navId.cla...
true
affade18eec55510c785964986e9da902b3a527c
JavaScript
GabrielGalatanu/geographicApp
/screens/quizGame.js
UTF-8
13,522
2.53125
3
[]
no_license
import React, { useState, useEffect } from "react"; import { StyleSheet, View, Text, Dimensions, TouchableOpacity, ImageBackground, } from "react-native"; import AnimatedLoader from "react-native-animated-loader"; import CompletionBar from "../components/completionBar"; import QuizButton from "../componen...
true
8150365661a99cc70453168d062aa69aadf3f203
JavaScript
napoleon101392/html-builder
/src/Table.js
UTF-8
736
2.78125
3
[]
no_license
export const Table = { caption: function(caption) { return caption; }, head: function(data) { var view = ''; data.data.forEach(index => { view += `<th>${index}</th>`; }); return `<thead id='${data.id}'>${view}</thead>`; }, body: function(data) ...
true
92514e8432f6729e3b6d3972ccbebf68f145dcf7
JavaScript
webb04/Sales
/js/languageSelection.js
UTF-8
632
2.5625
3
[]
no_license
import { GB, CN, DE, ES, FR, IT, JP, KR, MX, RU } from './translations'; export const map = { 'gb': GB, 'cn': CN, 'de': DE, 'es': ES, 'fr': FR, 'it': IT, 'jp': JP, 'kr': KR, 'mx': MX, 'ru': RU } const updateLanguage = code => { ['title', 'mainSubtitle', 'subtitle'].forEach(...
true
4a395f356952cc925428a9ad66abc228fc9a5742
JavaScript
stephenjera/JavaScript-Projects
/Tutorials/JavaScript_Tutorials/JavaScript/T11_Asyc_Patterns/T03_Async_Await/index.js
UTF-8
855
4.34375
4
[]
no_license
// The keyword async before a function makes the function return a promise: async function myFunction () { return 'Hello' } myFunction().then( function (value) { /* code if successful */ }, function (error) { /* code if some error */ } ) // same as above code function myFunction2 () { return Promis...
true
68253e07689e5f6bf8cab2f6c9403b2430f2825a
JavaScript
nitinbali2801/node-js-patient-demo-app
/index.js
UTF-8
3,748
2.796875
3
[]
no_license
const express = require('express'); const fetch = require('node-fetch'); const app= express(); const path = require('path'); const ONE_UP_PATIENT_URL = 'https://api.1up.health/fhir/dstu2/Patient/'; const HTTP_PORT = 3000 const RESPONSE_OK = 'OK' app.listen(HTTP_PORT, () => console.log('Listening on port : ' + HTTP_PO...
true
2225af0b9819f28fe4bcaff43910501fa68913a9
JavaScript
hadzim/bb
/BB.WWW/scripts/js/views/Component.Graph.View.js
UTF-8
8,020
2.53125
3
[]
no_license
// Create a View to be used with the Layout below. function compareGraphData(a, b) { if (a.date < b.date) return -1; if (a.date > b.date) return 1; return 0; } var dayNamesShort = new Array("Ne", "Po", "Út", "St", "Čt", "Pá", "So"); BB.ComponentGraphView = Backbone.Layout.extend({ template: "#compone...
true
7a86c7bedb44d3c0d8508d7b7e93531815d32973
JavaScript
baschenbrenner/js-object-oriented-daily-lunch-v-000
/index.js
UTF-8
2,862
3.1875
3
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
let store = {customers: [], meals: [], deliveries: [], employers: []} let customerId = 0; let mealId = 0; let deliveryId = 0; let employerId = 0; class Customer { constructor(name, employer = {}) { this.name = name this.id = ++customerId this.employerId = employer.id store.custo...
true
0365c76ca9fe499daa159dca6c222f9d1df1d26b
JavaScript
ebrooks1/moviesite_brooks
/public/javascripts/main.js
UTF-8
881
3.140625
3
[]
no_license
(() => { let getButton = document.querySelectorAll('.getButton'), deleteButton = document.querySelector('.deleteRecord'); function getData() { debugger; let url = `api/${this.id}`; //does more or less the same as ?car= + this.id fetch(url) .then((resp) => resp.json()) .then((data) => { ...
true
dd917c6a9835c41728abaeee787c58535033e169
JavaScript
ozaki-hr8/tapitapi
/map.js
UTF-8
5,203
2.765625
3
[]
no_license
const url = "https://sbi72z2kn8.execute-api.ap-northeast-1.amazonaws.com/prod" var data2 function attach_message(map, marker, name, konzatu, iw) { google.maps.event.addListener(marker, "click", function (e) { iw.setContent(`<span>${name}<br>混雑度:${konzatu}</span>`) iw.open(map, marker) }) } $(f...
true
acc31b946e860996846abe8cdcd645d3a2a1daad
JavaScript
Riobe/pokedex-challenge
/src/Main/PokemonTile.js
UTF-8
1,633
2.5625
3
[]
no_license
import React, { useState, useEffect, useRef } from 'react'; import { Link } from 'react-router-dom'; import { Badge } from '@chakra-ui/core'; import './PokemonTile.css'; function PokemonTile({ pokemon }) { const [hasBeenSeen, setHasBeenSeen] = useState(false); const ref = useRef(); // When this element comes ...
true
9f5adace0dbbe5e5ad6655dcf38c5995143a5997
JavaScript
martinmandina/Red-Oaks
/js/ajx.js
UTF-8
1,524
3.09375
3
[ "MIT" ]
permissive
/*function ajx(url,target){ document.getElementById(target).innerHTML=' Fetching data...' if(window.XMLHttpRequest){ req=new XMLHttpRequest()} else if(window.ActiveXObject){ req=new ActiveXObject("Microsoft.XMLHTTP")} if(req !=undefined){ req.onreadystatechange=function(){ ajxDone(url,target);...
true
d2ceca357c91a33f90468eab4c01a4b876940f79
JavaScript
HelloEthanY/Journey
/app/src/main/assets/web/JSbridge.js
UTF-8
3,832
2.53125
3
[]
no_license
// 将此代码放到vue 项目中,加以引用即可实现vue + Android 互掉 /* * 将该js文件在放到一个具体的目录下: * 在main.js里面引用:import JsBridge from './config/JSbridge.js' Vue.prototype.$bridge = JsBridge; * 然后在代码中的使用如下: * Android 调用JS 代码需要首先在js里面进行注册如下: * 该getAPPDate() 方法需要在挂载的时候调用 即在mounted 里面 * // app调js getAPPDate() { ...
true
c857ea1f9e8a6cbb8023167f5f6ed5f0b78938c2
JavaScript
Emsi90/JS-Exercises
/losowanie_ekstra_pensji/js/scripts.js
UTF-8
1,189
3.734375
4
[]
no_license
(function () { var btn = document.querySelector('.getNumbers'); var firstOutput = document.querySelector('.showNumbers'); var secOutput = document.querySelector('.showExtraNumber'); function getRandom(min, max) { return Math.round(Math.random() *(max - min) + min); } ...
true
c1f73dc30cb407bed84cd575561b0630d6e2e7c5
JavaScript
princessguerrero/numerous
/lessons/tdapbr.js
UTF-8
1,690
3.6875
4
[]
no_license
// importing the readline module var readline = require('readline') // We will be able to use `rl` // Only After creating the readline interface var rl = readline.createInterface({ input: process.stdin, output: process.stdout }) // Clears the terminal screen function clear () { process.stdout.write('\u001B...
true
8de90750bce65ad8371905eac406547ec8475e52
JavaScript
DenisK0s/goit-js-hw-11-color-switch
/src/background-color-switcher.js
UTF-8
1,767
3.3125
3
[]
no_license
import colors from './colors.js'; // Напиши скрипт, который после нажатия кнопки Start, // раз в секунду меняет цвет фона body на случайное значение из массива используя инлайн - стиль. // При нажатии на кнопку Stop, изменение цвета фона должно останавливаться. // ⚠️ Учти, на кнопку Start можно нажать бесконечное кол...
true
d4a3e60a9fef41ff27fe62911abacaaa4662348f
JavaScript
stefism/Projects
/08 ReactJS - Mart 2021/08 Workshop Single-Page Application/my-pets-with-jsonServer-and-samples – Копие/src/Services/PetsService.test.js
UTF-8
860
2.640625
3
[]
no_license
import * as petsService from './PetsService'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; const fakeServer = setupServer( rest.get('http://localhost:5000/pets', (request, response, context) => { return response(context.json([{likes: 10}])); }) ); beforeAll(() => fakeServer.lis...
true
c7b794ba6c5dff01555aa9e555092a1f4fb7066b
JavaScript
HaniFikry/reactnd-would-you-rather
/src/components/Leaderboard.js
UTF-8
1,303
2.5625
3
[]
no_license
import React, { Component } from "react"; import { connect } from "react-redux"; export class Leaderboard extends Component { render() { return ( <div className="leaderboard"> {this.props.users.map(u => { return ( <div key={u.id} className="leaderboard-row"> <img...
true
091b68b3cc6520f084e0b3a7d3194f419d505749
JavaScript
JackMatheus/DH-FS-NODE-T12
/aula02/index01.js
UTF-8
330
3.265625
3
[]
no_license
let nome = 'Pet Shop' console.log(nome); for(i=0; i<array.length; i++){ let array = ['Leão','Cavalo','Cachorro'];} let objeto = { nome = 'Vitor', idade = 99 } console.log(array[i]); console.log(objeto); for (let item in pessoa) { console.log("Propriedade"+ item + "valor da propriedade" + pessoa[idade...
true
bcd2de3b8f5e7bc6a3fcff4464f811d5dc2ca40e
JavaScript
Ansagan-B/Javascript-tasks
/html-academy/intro_to_js/scrolling_n_operators/script.js
UTF-8
1,610
3.171875
3
[ "MIT" ]
permissive
let review = document.querySelectorAll('.review'); let submitButton = document.querySelector('.submit-button'); let error = document.querySelector('.error'); for (let i of review) { i.onchange = function() { if (i.dataset.evaluation === 'good') { submitButton.disabled = false; error...
true
f7b77e119f099ba07df7d0d2c6837840dbdf303f
JavaScript
AsotikovaSvetlana/training-js
/todo/task.js
UTF-8
1,016
3.390625
3
[]
no_license
const taskInput = document.getElementById('task__input'); const taskAddButton = document.getElementById('tasks__add'); const taskList = document.getElementById('tasks__list'); taskInput.addEventListener('keydown', (event) => { event.preventDefault(); if (event.key === 'Enter' && taskInput.value.trim() !== '') {...
true
246fa7b1f70773e8fdfe45977348a0ca93db7d00
JavaScript
cesarpaulino/nodeschool-solutions
/functional-javascript-workshop/curry.js
UTF-8
1,037
3.375
3
[]
no_license
function curryN(fn, n) { // this solution is not recommended--making use of a partically global args // and a hack is need for calling curriyA more than once var num = n || fn.length; var args = []; function internalCurry(arg) { // if supplied parameters were enough update the latest--a hack for calling c...
true
8c3c9ad83857dad5d70dad2c3d680c182fff96a3
JavaScript
tabdiggy/the-node-way
/02-custom-type-example.js
UTF-8
999
3.453125
3
[]
no_license
/* * User.js */ // Private var userCount = 0; function depositeMinusFee(num1) { return num1 - 0.1; } // Public module.exports = User; function User(n) { this.id = userCount; this.name = n; this._paid = false; this.balance = 0; userCount++; } User.prototype.togglePaid = function() { this....
true
4c29823c010a6963e56710174bc60ce861685668
JavaScript
wax54/time-tracker
/src/components/goals/GoalRow.js
UTF-8
1,847
2.53125
3
[]
no_license
import { useDispatch, useSelector } from "react-redux"; import { deleteGoal, updateAGoal } from "../../models/actionCreators"; import { DOING_ANYTHING_KEY, timeFrames } from "../../config"; import MultiTextBox from "../MultiTextBox"; import { round } from "../../helpers/tools"; const GoalRow = ({ goal }) => { let {...
true
863536e2ddfd7ed935f99e857402605e930e7bc6
JavaScript
FairyWorld/study_leetcode
/1673. 找出最具竞争力的子序列.js
UTF-8
572
3.328125
3
[]
no_license
/** * @param {number[]} nums * @param {number} k * @return {number[]} */ var mostCompetitive = function (nums, k) { let result = []; let deleted = 0; for (let i = 0; i < nums.length; i++) { if (result.length === 0) { result.push(nums[i]); } else if (nums[i] >= result[result.length - 1]) { ...
true
f17c8ce5aee23b40a4ebeb8e0e6adca0465b3389
JavaScript
big-javascript-fan/todo-list
/todo-list-back/src/validations/user.validation.js
UTF-8
1,176
2.609375
3
[]
no_license
import { User } from '../database/models'; import { decryptRSA } from '../utils'; import { errorMessages } from '../constants/errors'; export const userValidation = () => { const checkEmail = (value) => { // check email used return User.findOne({ where: { email: value } }).then((user) => { if (user) { ...
true
c69203585c435260ccb7071a61b51f5054df9c8a
JavaScript
pebsconsulting/peteroupc.github.io
/html3dutil/mathml.js
UTF-8
1,975
2.96875
3
[]
no_license
/* Quick-and-dirty MathML polyfill. Written by Peter O. in 2015. Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ If you like this, you should donate to Peter O. at: http://peteroupc.github.io/ */ (function(window){ var formatMathML=function(element){ var name=elem...
true
2a5eb998303b1d7a27794eadafc69d576ee5a120
JavaScript
freddykwon/etch_a_sky
/mygame.js
UTF-8
2,465
3.578125
4
[]
no_license
const container = document.getElementById("container"); let colorPicker = document.getElementById("colorPicker").value; document.getElementById("colorPicker").onchange = function () { colorPicker = this.value; console.log(colorPicker) } const resetBtn = document.getElementById("resetBtn"); const colorBtn = doc...
true
f071934c9a8fc1600b9358c058f2b8c475b4a5bd
JavaScript
perkinss/learning-javascript
/school/web/cors.spec.js
UTF-8
2,875
2.625
3
[]
no_license
var expect = require('chai').expect; const Browser = require('zombie'); var browser = new Browser(); describe('CORS', function() { var origin; var port = 5000; var thirdParty; var anotherPort = 5005; var thirdPartyAnswer; beforeEach(function(done) { var sendP...
true
5f75e2267d066aa4b7621c6687646fa4fc8c10b0
JavaScript
PhoneZaw/PigGame
/function.js
UTF-8
2,771
3.296875
3
[]
no_license
const targetButton = document.querySelector('.target-button'); const cube = document.querySelector('.cube'); const rollBtn = document.querySelector('.roll'); const newBtn = document.querySelector('.new'); const holdBtn = document.querySelector('.hold'); const targetScore = document.getElementById('target'); let target ...
true
00323bf272cddf8f4fea571a1136a4a11bdcc39c
JavaScript
catf62/catriona_ford_PDA
/catriona_ford_PDA/Task B Unit and Integration Testing JS/js_calculator_start_point/tests/unit/calculator_spec.js
UTF-8
2,723
3.203125
3
[]
no_license
var Calculator = require('../../public/js/calculator.js') var assert = require('assert') describe('calculator', function () { beforeEach(function () { calculator = new Calculator() }); // write unit tests here in the form of "it should do something..." it('it has a sample test', function(){ assert.equ...
true
c8ea924db0410c5ef1a8279ea618c4d532cf47c9
JavaScript
shahrutu91/Evaluate-news-NLP
/src/client/js/updateUI.js
UTF-8
794
2.875
3
[]
no_license
//Update the UI with API info from server response const model = document.getElementById('model'); const score_tag = document.getElementById('score_tag'); const agreement = document.getElementById('agreement'); const subjectivity = document.getElementById('subjectivity'); const confidence = document.getElementById('con...
true
e961579064effa40749a6a2ba0d9c5f1cd0f893f
JavaScript
mel4ni3/to-do-list
/todolistscript.js
UTF-8
1,336
3.703125
4
[]
no_license
const button = document.querySelector("#myButton"); const list = document.querySelector("#list"); const input = document.querySelector("#textbox"); const clickHandler = () => { const listitem = document.createElement("li"); // how to create custom attributes: (good for multiple items) const attribute = d...
true
b8f8df0308bb271be846f3b45fef13f82f998aaa
JavaScript
zihongchen/Redventures-Movie-Quotes
/recommend.js
UTF-8
3,250
2.703125
3
[]
no_license
// function appView() { // return $(` // <div id="root"> // <section class="hero is-black is-fullheight"> // <div class="hero-head"> // <nav class="navbar"> // <div class="container"> // <div id="navbarMenu" class="navbar-menu"> // ...
true
049461203ccc195b0662fa880cd5458969cd996a
JavaScript
course-one/js-decorator-lesson
/user-class.js
UTF-8
328
3.90625
4
[ "MIT" ]
permissive
class User { constructor( firstname, lastName ) { this.firstname = firstname; this.lastName = lastName; } getFullName() { return this.firstname + ' ' + this.lastName; } } // create instance let user = new User( 'John', 'Doe' ); // print full name console.log( user.getFullN...
true
1db2492fabc339dcde69b48615015992340bbd8c
JavaScript
Xitreth-Dev/Joey585Bot
/commands/ban.js
UTF-8
690
2.828125
3
[]
no_license
exports.run = (client, message, [mention, ...reason]) => { const adminRole = message.guild.roles.cache.find(role => role.name === "Admin"); if (!adminRole) return console.log("The Admin role does not exist"); if (message.mentions.members.size === 0) return message.reply("Please mention ...
true
12db0262ac492abfe49c52b32ecb72bd6e768465
JavaScript
UrosHCS/workflow-graph
/shape.js
UTF-8
1,620
3.109375
3
[]
no_license
const c = document.getElementById("wf") const ctx = c.getContext("2d") const fontSize = 12 const verticalTextAllignment = 5 const arcRadius = 50 const rectWidth = 100 const rectHeight = 50 const _180 = 2 * Math.PI const arrowHeadLength = 7 // in pixels ctx.font = fontSize + "px Arial MS" ctx.textAlign = "center" con...
true
bd05656e1801501dc4d086d90a8e5ec65e10d3a1
JavaScript
Nikoms/kite.now
/src/domain/Forecast.js
UTF-8
1,927
2.890625
3
[]
no_license
import {Wind} from './Wind.js'; import {Rain} from './Rain.js'; import {DateTime} from './DateTime.js'; export class Forecast { /** * @type {import("./types").HourlyForecast[]} */ #hourlyForecasts; /** * @param {import("./types").ForecastSnapshot} snapshot * @return {Forecast} */ static fromSna...
true
74c98cfbb2b4bb9f928fa3e371ab973084cd43cc
JavaScript
DiliniNadeesha/Working-with-Json-Point-of-Sales-System-POS-
/TestingAjax/ajax.js
UTF-8
1,303
2.734375
3
[ "MIT" ]
permissive
$("#btnSave").click(function () { var http = new XMLHttpRequest(); http.onreadystatechange = function() { if (http.status == 200 & http.readyState == 4) { } }; http.open('POST', 'http://localhost:8080/pos/customers4', true); http.setRequestHeader("Content-Type", "application/x-www-...
true
f2170b2e1497b864c91d2ed722bdb5f48adad6ea
JavaScript
joanarepinaldo/artplace
/database/localizaLoja.js
UTF-8
654
2.59375
3
[]
no_license
function localizaLoja(id,db,res) { const localizacao = db.query('SELECT * FROM lojas WHERE id = ?', [parseInt (id)], (erro, localizacao ) =>{ if(erro){ }else{ const lojas = localizacao[0]; lojas.images = lojas.images.split(","); lojas.f...
true
25429f730ed371a163385f1a9ec042b7ff025181
JavaScript
samanthafav/task-timer
/js/script-duration.js
UTF-8
1,399
3.65625
4
[]
no_license
//script to add time to button function add1m() { //get start value as a number var startDuration = parseInt(document.getElementById("fduration").innerHTML); //get value to be added to duration var toAdd = 1; //add value to duration var newDuration = startDuration + toAdd //get new duration...
true