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
e459ce78088bcbf61b2e6c1cdd7cc890b9cc2921
JavaScript
valfvo/hyper-tournoi
/js/tournament.js
UTF-8
5,055
2.9375
3
[ "MIT" ]
permissive
fetchTournamentData(); function removeOnClick() { this.remove(); } let draggable = null; let draggableID = 0; let draggableMap = {}; function removePopup() { const group = draggableMap[this.parentNode.id]; delete draggableMap[this.parentNode.id]; group.classList.remove('dragged'); group.firstEle...
true
a907f8b93e4bb6f50c4d1cf0283e7133125b8df4
JavaScript
Wantonius/FSDevEspoo2
/tasks-example-project/step4/frontend/src/App.js
UTF-8
2,479
2.59375
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import NavBar from './components/NavBar'; import Main from './components/Main'; import logo from './logo.svg'; import './App.css'; class App extends Component { constructor(props) { super(props); this.state= { list:[], isLogged:false, mode:"Add", token:...
true
0d8b7b3d9b7d41df885b328f78e0c4068fa92728
JavaScript
sou-gabriel/curso-javascript-roger-melo
/Etapa 06 - Eventos em formulários/Aula 02/02. Validação básica de formulários/app.js
UTF-8
517
3.375
3
[]
no_license
const form = document.querySelector('.signup-form') const feedback = document.querySelector('.feedback') form.addEventListener('submit', event => { event.preventDefault() const username = event.target.username.value const usernameRegex = /^[a-zA-Z]{6,12}$/ const isAValidUsername = usernameRegex.test(username)...
true
901a6ed8e883aca6610d5c33527ae3466a5af76e
JavaScript
mich-chen/counting-valleys
/countingValleys.js
UTF-8
456
3.140625
3
[]
no_license
function countingValleys(steps, path) { let valleys = 0 let sealevel = 0 for (let i = 0; i < steps; i++) { if (path[i] === 'D') { sealevel-- } if (path[i] === 'U') { sealevel++ } if (sealevel === 0 && path[i] === 'U') { valle...
true
ed690fcc02bd03f2f9465003278dd2a2ee43abee
JavaScript
ZhengXuDongs/swagger
/src/db/base.js
UTF-8
4,433
2.59375
3
[]
no_license
import mysql from './sqlHelper'; import conn from './sqlConn'; const log = require('log4js').getLogger('db/base'); class Base { /** * 详情请看https://www.npmjs.com/package/node-mysql-promise * @param table 表名 string * @param field 查询的字段 String|Array 要查询的字段,可以是字符串,也可以是数组 field('id, title') (['id', 'titl...
true
a71bf3300b941f46a698c3f58110185f79182ec3
JavaScript
chromium/chromium
/third_party/blink/web_tests/external/wpt/document-policy/font-display/resources/font-display-reporting-helper.js
UTF-8
2,815
2.609375
3
[ "LGPL-2.0-or-later", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-only", "GPL-1.0-or-later", "GPL-2.0-only", "LGPL-2.0-only", "BSD-2-Clause", "LicenseRef-scancode-other-copyleft", "BSD-3-Clause", "MIT", "Apache-2.0" ]
permissive
function check_report_format(report, expected_url, expected_disposition) { assert_equals(report.type, 'document-policy-violation'); assert_equals(report.url, expected_url); assert_equals(report.body.featureId, 'font-display-late-swap'); assert_equals(report.body.disposition, expected_disposition); assert_true...
true
70ce6eeea287ca87330ba01d3df8ae89a89826fb
JavaScript
CaelumAulas/web7352
/src/js/cartao.js
UTF-8
3,618
2.765625
3
[]
no_license
// Immeadiatelly Invoked Function Expression keyboardeventKeyPolyfill.polyfill(); let criaCartao = (function(){ "use strict" let numeroDoCartao = 0 // explodindo parâmetro // destructuring parâmetro return function criaCartao({conteudo:c, cor = "#EBFE40"}){ numeroDoCartao++ co...
true
01d7a3a478a828344965c7cf29ae9d7b1a606e5a
JavaScript
sendi-fe/competition01
/src/js/util.js
UTF-8
665
2.984375
3
[]
no_license
module.exports = { cloneData: function() { var clone = []; for(var i = 0; i < this.options.data.length; i++) { clone.push(this.deepClone(this.options.data[i])); } return clone; }, deepClone: function(obj) { var objClone; if(obj.constructor == Object) { objClone = new obj.co...
true
c2f31bebe7cee66ce51d03c0c49cd6313d00c277
JavaScript
roynguyen-scandiweb/pagebuilder-ext
/packages/page-builder/src/component/GoogleMap/GoogleMap.component.js
UTF-8
4,108
2.515625
3
[]
no_license
import {GoogleApiWrapper, InfoWindow, Map, Marker} from 'google-maps-react'; import {escapeHtml} from '../../helper/functions'; const parseLocations = (locationsString) => { let locationsArr = [] try { locationsArr = JSON.parse(locationsString) // We are expecting an array to be returned locationsArr.forEa...
true
50d28a32bd1a8241716d96ea0208dca6a3b5805e
JavaScript
Marshall-Hao/Dynamic-Programming-Js
/tabulation/can-sum.js
UTF-8
471
3.609375
4
[]
no_license
const canSum = (targetSum, numbers) => { const table = Array(targetSum + 1).fill(false); table[0] = true; for (let i = 0; i <= targetSum; i++) { //be carefull with the array.length problem, length 3 but arr[10] =x will have 7 empty element in the middle if (table[i] === true) { for (let...
true
a07996ad5d5c91d76f5e1a9d116cbc99b93e5e60
JavaScript
future4code/sagan-4used
/app/src/components/TelaConsumidor.js
UTF-8
6,875
2.65625
3
[]
no_license
import React from 'react' import axios from 'axios' import Button from '@material-ui/core/Button'; import TextField from '@material-ui/core/TextField'; import ConteudoCartao from './ConteudoCartao'; import * as STC from './styles/StylesTelaConsumidor'; const baseURL = `https://us-central1-future-apis.cloudf...
true
d74c9591c15c7da830835314a737d9baeb6c7058
JavaScript
AsafP1986/mini-proj
/project02 - choose shape and draw on canvas/js/myscripts3.js
UTF-8
1,605
3.15625
3
[]
no_license
// var input = document.getElementById('input'); // input.addEventListener("keyup", function (event) { // //event.preventDefault(); // if (event.keyCode === 13) { // //document.getElementById("myBtn").click(); // sendNumber(); // } // }); function drawOnCan() { var c = document.g...
true
8e18e83282fa0052edc01de13cd625ded133cafe
JavaScript
shawntabrizi/substrate-playground-tutorial
/side.js
UTF-8
2,654
2.96875
3
[]
no_license
let tutorial = document.getElementById('tutorial'); // Start closed. let open = 0; function toggleSide() { if (open == 2) { tutorial.style.width = '0%'; tutorial.style.minWidth = '0px'; document.getElementById('open-icon').innerText = 'Tutorial'; open = 0; } else if (open == 0) { tutorial.styl...
true
e3dbb4fb2be764adb411736f838441e107a4f2b7
JavaScript
eunmo/chart_watch
/server/routes/query/season.js
UTF-8
2,592
2.515625
3
[]
no_license
(function() { 'use strict'; var Promise = require('bluebird'); var charts = [ 'billboard', 'oricon', 'deutsche', 'uk', 'francais', 'melon', 'gaon' ]; module.exports = function(router, db) { router.get('/api/season', function(req, res) { var outParam = { weeks: {}, song...
true
958423bbd26bffcb665a0984d77bf7ec8a5a34ca
JavaScript
YuliaTsareva/sandbox
/canvas/filters/app.js
UTF-8
1,556
2.546875
3
[]
no_license
'use strict'; (function () { window.FiltersApp = { filter: { contrast: 0, brightness: 0, isGrayscale: false, enabled: true } }; $(function () { $('#grayscaleChckBox').click(function () { FiltersApp.filter.isGrayscale = !FiltersApp.filter.isGrayscale; FiltersApp.re...
true
bca0ed74ea946fc1fe2d43db4e265764b9597bda
JavaScript
evivar/Galaga
/Explosión/game.js
UTF-8
2,052
2.859375
3
[]
no_license
var sprites = { ship: { sx: 0, sy: 0, w: 37, h: 42, frames: 1 }, enemy_purple: { sx: 37, sy: 0, w: 42, h: 43, frames: 1 }, enemy_bee: { sx: 79, sy: 0, w: 37, h: 43, frames: 1 }...
true
65aa9da08a912265bbf069d6f8e013182ed9af6a
JavaScript
mauerv/live-events
/src/reducers/subscriptionsReducer.js
UTF-8
1,517
2.609375
3
[]
no_license
import { SET_SUBSCRIPTION, REMOVE_SUBSCRIPTION, SET_SUBSCRIPTION_WEBRTC_STATE, SET_SUBSCRIPTION_STREAM } from "../constants/actionTypes"; const initialState = {}; export default (state = initialState, action) => { switch (action.type) { case SET_SUBSCRIPTION: return applySetSubscription(state, act...
true
61d4525f2e1b66181245acb811f82a9cca98b4b0
JavaScript
gbif/gbif-web
/packages/statuspage/components/helpers/componentRunner.js
UTF-8
1,916
2.890625
3
[ "Apache-2.0" ]
permissive
/** * run several tests and return the most severe state. * The tests themselves should manage their own intervals. * * Start tests * keep a joined status (update every say 10 seconds) * return the current status when asked. */ const _ = require('lodash'); const { getSummaryState, severity } = require('./severi...
true
fc69ff27cf69dd57b99cc58058a4ef2a00a9519b
JavaScript
rstudio/crosstalk
/javascript/src/filter.js
UTF-8
7,756
2.515625
3
[ "MIT", "Apache-2.0" ]
permissive
import Events from "./events"; import FilterSet from "./filterset"; import grp from "./group"; import * as util from "./util"; function getFilterSet(group) { let fsVar = group.var("filterset"); let result = fsVar.get(); if (!result) { result = new FilterSet(); fsVar.set(result); } return result; } l...
true
2a2f34d6dcf4682641d3941bf4d8c040c404d472
JavaScript
ModernArtisan/projectdyno
/client/scripts/postInstall.js
UTF-8
777
2.640625
3
[ "Apache-2.0" ]
permissive
#!/usr/bin/env node /* eslint-disable */ /** * This script check to make sure that the system path contains the path "./node_modules/.bin". * It is important to have this in your system path because it makes running node binaries easier. */ const chalk = require('chalk') const boxen = require('boxen') const { PAT...
true
29af9fe5d48584662319108c282b76d74f3d9c89
JavaScript
bookman920/vallnetserver
/app/util/redisHelp.js
UTF-8
808
2.71875
3
[ "MIT" ]
permissive
//引入工具包 let redis = require("redis") class redisHelp { /** * 构造函数 * @param {*} 监控对象ID */ constructor(){ } static async init() { this.client = await redis.createClient(6379, "127.0.0.1"); } static async heset(hashkey, field, value, callback) { this.client.hse...
true
10c7a61097c7e8e0f743f9bd58560cfd3188893a
JavaScript
raedTayyem/minesweeper
/js/game.js
UTF-8
5,928
2.71875
3
[]
no_license
'use strict'; var gBoard; var gSize = 4; var gMine; var gTime = 0; var minesAmount = 2; var firstClick = 0; var gTimeInterval; var isHint = false; var isFlagged = false; var isOpened = false; var gHintInterval var gSmiley; var gWin; var gLose; var gTimer; var gLives = 3; function init() { va...
true
ef08e95da4d339509dac3da1c9af551f4ba14c29
JavaScript
wattersnathen/xpreader-client
/static/scripts/views/views.js
UTF-8
2,843
2.640625
3
[ "Apache-2.0" ]
permissive
define([ 'jquery', 'backbone', 'handlebars', 'text!../../templates/articles.html', 'text!../../templates/article-list-item.html', 'text!../../templates/article-pagination-box.html' ], function($, Backbone, Handlebars, articlesTemplate, articleListItemTemplate, articlePaginationBoxTemplate) { 'use st...
true
8605582c9c3143fe6cead1c5c9822e344ce5af77
JavaScript
jorgefprietol/reservasy
/Web/scripts/recurrence.js
UTF-8
8,427
2.546875
3
[]
no_license
/** Copyright 2020 Prieto Linares, Jorge Fidel This file is part of Agenda Capacitaciones Yanbal. Agenda Capacitaciones Yanbal is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License...
true
b92b2954950df0a04ab496abbe5d2d113616da46
JavaScript
LizzParody/project_euler
/project_euler_4.js
UTF-8
512
4.53125
5
[]
no_license
/* A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers.*/ function palindromic() { var max = 0; for(var i = 999; i > 99; i--) { for(var j = 999; j > 99; j-...
true
305b3ba72af873b55dd7ac516f4de50e278bb2ec
JavaScript
farooqashar/library
/controllers/genreController.js
UTF-8
3,389
2.53125
3
[]
no_license
var Genre = require('../models/genre'); var Book = require('../models/book'); var async = require('async'); const { body,validationResult } = require("express-validator"); exports.all_genres = function(req, res) { Genre.find() .sort([['name','ascending']]) .exec(function (err,results) { if (err) {...
true
8daf9307f3db239cd6e4d2be0cc12d4b23f79fbd
JavaScript
rebeccalind/superhi
/jiffy/jiffy.js
UTF-8
2,867
3.515625
4
[]
no_license
const API_KEY = 'fdICJYJLE5msINhHiV5TlyNPB5gcagI2' // all Elements in group at the top // grab seach input const searchEl = document.querySelector('.search-input') const hintEl = document.querySelector('.search-hint') const videosEl = document.querySelector('.videos') const clearEl = document.querySelector('.search-cl...
true
12d80ed5a04c3e251844c08c3579434693e5c7ea
JavaScript
nss-day-cohort-51/automated-world-pineapple-upside-downers
/scripts/Indonesia/cities/CitiesData.js
UTF-8
983
2.765625
3
[]
no_license
export const returnCityCollection = () => { return cityCollection; }; const cityCollection = [ { name: "Surabaya", population: "2.87 million", description: "The capital of the Indonesian province of East Java and the second-largest city in Indonesia", externalLink: "...
true
8315637c754f5f84ef6a178bfcf51317cf3c5908
JavaScript
max-severin/personal-library
/controllers/controllers.js
UTF-8
2,752
2.71875
3
[]
no_license
'use strict'; const { ObjectId, bookModel } = require('../models/models'); const getBooks = async (req, res) => { try { const books = await bookModel.find(); res.status(200).json( books.map((book) => ({ _id: book._id, title: book.title, comments: book.comments, comment...
true
a8170807e3080571042ee5301557a5ff91a75a35
JavaScript
siseer11/CodeFights-JsChallenges
/Arcade/array_change/arrayChange.js
UTF-8
264
2.90625
3
[]
no_license
function arrayChange(inputArray) { return inputArray.reduce((acc,val,idx,arr)=>{ if(idx > 0){ let prev = arr[idx-1]; if(prev >= val){ acc+= prev-val+1; arr[idx] += prev-val+1; } } return acc; },0); }
true
3034cb6ba122cd858d433b431a7ee26bdae95936
JavaScript
KalleoPinheiro/advanced-js
/aluraframe/client/js/index.js
UTF-8
1,000
3.109375
3
[]
no_license
(doc => { 'use strict'; const fields = [doc.querySelector('#data'), doc.querySelector('#quantidade'), doc.querySelector('#valor')]; const form = doc.querySelector('.form'); const reset = doc.querySelector('#reset'); const submitForm = event => { event.preventDefault(); const tr = doc.createElement('...
true
1c82e829a82bc3e382702c22f613d17c927f82a3
JavaScript
jl9n/react-redux-isomorphic-example
/js/reducers/carts.js
UTF-8
796
2.53125
3
[]
no_license
import assign from 'object-assign'; import Immutable from 'immutable'; import { ADD_TO_CART, CART_CHECKOUT_REQUEST, CART_CHECKOUT_SUCCESS, CART_CHECKOUT_ERROR, } from '../constants/ActionTypes'; var CartState = Immutable.Record({ idProducts: Immutable.List.of([]) }) const initialState = new CartState(); e...
true
194b9ab26636a9d6fdb3db014b2fabaec093b91e
JavaScript
NicolasEspinosa88/coderhouse-camada-1377
/TP8/script.js
UTF-8
3,774
2.953125
3
[]
no_license
var imdb = (function(){ if( JSON.parse(localStorage.getItem('peliculas')) == null){ var peliculas = []; var idsPeliculas= 1; }else{ var peliculas = JSON.parse(localStorage.getItem('peliculas')); var idsPeliculas= peliculas.length; } var agregarPeliculas = function(imagen,titulo,descripcion){ peliAA...
true
bb17d704dd911891c2d84f74e4297ee0bb9420b5
JavaScript
AlejandroSilva/laravel-2016-dead-project
/frontEnd/inventarios/programacion-mensual/AgregarInventario.jsx
UTF-8
13,359
2.5625
3
[ "MIT" ]
permissive
// Libs import React from 'react' // Styles import * as style from './AgregarInventario.css' class AgregarInventario extends React.Component { constructor(props) { super(props) this.state = { idClienteSeleccionado: 0, mesSeleccionado: this.props.meses[0].valor, l...
true
fd73b1227964499ef82986fdcfee3cc9b2f518fb
JavaScript
KaduCury/uc8-atividade-presencial-01
/Cadastro-de-pecas.js
UTF-8
1,031
3.34375
3
[]
no_license
let listaPecas=[ ] let nomePeca='Peça Teste' let pesoPeca=300 let podeCadastrar=true const fg_red = '\x1b[31m' const fg_green = '\x1b[32m' const fg_yellow = '\x1b[33m' const reset_color = '\x1b[0m' if (pesoPeca<100){ console.log(fg_red, 'Não há possibilidade de cadastro pois a peça não atinge o peso mínimo!', rese...
true
5471195b39394d0357e7c2af18d9a48b85545c93
JavaScript
mattstanford/coinbase-markets
/public/app/graph/directives/graphDirective.js
UTF-8
7,434
2.59375
3
[]
no_license
angular.module('coinbaseMarkets').directive('cbmGraph', function () { return { restrict: 'E', scope: true, link: function (scope, element) { var graphHeight = 400; var graphWidth = 400; drawGraph(element, graphHeight, graphWidth); //Data model for the points we will be graphing fun...
true
4e2503d435b79131c58625ac654472b85349478d
JavaScript
shady-team/shooter
/src/main/webapp/js/src/util.js
UTF-8
5,623
2.78125
3
[]
no_license
goog.provide('util'); /** @define {boolean} */ var DEBUG = true; (function () { if (DEBUG) { /** @type {function(...[*])} */ util.log = console.log.bind(console); /** @type {function(...[*])} */ util.info = console.info.bind(console); /** @type {function(...[*])} */ ...
true
f73aba99e22f1190f9d8ff81d601d7196abef3f0
JavaScript
ahomu/Elastic
/src/domain/_abstract.js
UTF-8
934
2.640625
3
[ "MIT" ]
permissive
'use strict'; var UNDEFINED_UNIQUE_NAME = '__UNDEFINED__'; /** * @abstract * @class * @extends Klass */ var AbstractDomain = klass.of({ /** * @property {HTMLElement} */ el: null, /** * @property {jQuery|Zepto} */ $el: null, /** * Get element by selector string * * @private * @...
true
30ec78f67cae9b0afbdc7f2943603627c5826638
JavaScript
AnnaZavgorodnia/BeautySalonServletProject
/src/main/webapp/js/all_apps.js
UTF-8
1,492
2.53125
3
[]
no_license
document.addEventListener('DOMContentLoaded', function() { let calendarEl = document.getElementById('calendar'); (async () => { const rawResponse = await fetch('http://localhost:8888/app/api/all_appointments'); const content = await rawResponse.json(); console.log(content); c...
true
07bda2f7ad52260873f7948fd25ef31e4c0ec989
JavaScript
Sookhaal/sookhaal.github.io
/ronjtest/js/buttons.js
UTF-8
2,847
2.640625
3
[]
no_license
var buttonSize; $(function(){ positionDiv(); }); $(window).resize(function () { positionDiv(); }); //6 $("#b61").click(function (e){ colorize(1,6,"05cdff", "000"); colorize(7,12,"2b77de", "000"); }); $("#b62").click(function (e){ colorize(2,7,"05cdff", "000"); colorize(8,1,"2b77de", "000"); }...
true
757d92f6c267f030b1a0cb84cab0b99585f553de
JavaScript
IamBeltran/jsonserver
/src/public_html/javascripts/init.js
UTF-8
774
2.53125
3
[]
no_license
/* eslint-disable strict */ /* eslint-disable no-console */ /* eslint-disable no-undef */ // eslint-disable-next-line func-names (function() { 'use strict'; document.addEventListener('DOMContentLoaded', async () => { try { security.protecPage(); ui.toggleWelcome(); if (user.hasLogging()) { ...
true
01e3315c1566039a30b5690f5d3f8e3a5ce57b1d
JavaScript
popoybvargas/express-error-handler
/expressErrorHandler.js
UTF-8
3,611
2.625
3
[]
no_license
class AppError extends Error { constructor(message, statusCode) { super(message); this.statusCode = statusCode; this.status = `${statusCode}`.startsWith('4') ? 'fail' : 'error'; this.isOperational = true; Error.captureStackTrace(this, this.constructor); } } const handleDBCastError = err => ...
true
c6ecdc92ae6c2d4eb6a103e5de70863ed815919a
JavaScript
onefeeling/Mongoose
/index.js
UTF-8
1,774
2.609375
3
[]
no_license
const mongoose = require('mongoose'); const Campsite = require('./models/campsite'); //gotta have the model, bruh const url = 'mongodb://localhost:27017/nucampsite'; //connected to our MongoDBZ server const connect = mongoose.connect(url, { useCreateIndex: true, //i dunno useFindAndModify: false, //i really do...
true
6c66df193c5de73bb5126244d3ba1e1ef3bf56f6
JavaScript
ghys/later-again
/src/core/compile.js
UTF-8
4,552
2.96875
3
[ "MIT" ]
permissive
/** * Compile * (c) 2013 Bill, BunKat LLC. * * Compiles a single schedule definition into a form * from which instances can be efficiently calculated from. */ const units = require('../units') const modifier = require('../modifier') const constants = require('../constants') const laterArray = require('../array') ...
true
00a8dcf22b350f4b2dd099a8152634833d71c34c
JavaScript
eurzua7020/Group9-Final-INST377SP2021
/public/Pages/Restaurants/1.js
UTF-8
1,614
3.03125
3
[]
no_license
async function dataHandler() { const request = await fetch('/api/restaurant'); const d = await request.json(); const dat = d.data; const request2 = await fetch('/api/restaurant'); const d2 = await request2.json(); const dat2 = d2.data; const targetList1 = document.querySelector('.target-list'); const c...
true
f24831cf1a563a258f58aba3a38a858cb50d0dd1
JavaScript
vksrinivasan/NutriFHIR
/public/javascripts/patients.js
UTF-8
1,988
2.921875
3
[ "MIT" ]
permissive
var practitionerId = getParameterByName("practitionerId"); // JSON for patient info $.getJSON("/fhir/practitioner/patients", {practitionerId: practitionerId}, function(res){ console.log("patients"); console.log(res); showPatients(res["patients"], res["dates"]); }); function showPatients(patients, dates){ var...
true
19392c3bf6cd7f04b97e615d758467636e1508b5
JavaScript
jtbdevelopment/LastLight
/ui/app/scripts/services/act3/bosses/SimpleFiringBoss.js
UTF-8
2,289
2.53125
3
[]
no_license
/* globals Phaser: false */ 'use strict'; var SimpleFiringBoss = function (game, x, y, key, frame) { Phaser.Sprite.call(this, game, x, y, key, frame); this.state = undefined; }; SimpleFiringBoss.prototype = Object.create(Phaser.Sprite.prototype); SimpleFiringBoss.prototype.constructor = SimpleFiringBoss; Sim...
true
40cb3b6f15593db5a67e2aa97818dc47d68c390d
JavaScript
jbrcodes/bookie
/app/static/jbr-tags-bulma.js
UTF-8
1,201
2.78125
3
[]
no_license
'use strict'; /* File: jbr-tags-bulma.js Override a few JbrTagCloud methods to allow proper Bulma tag styling */ JbrTagCloud.prototype.draw = function() { var tagArr = this.tagStrArr.map(this.makeTag, this); this.elem.innerHTML = '<div class="field is-grouped is-grouped-multiline">' + tagArr.join('')...
true
ea7fbacb196827435917074e5d7854513ffe55eb
JavaScript
byteball/obyte-gui-wallet
/angular-bitcore-wallet-client/bitcore-wallet-client/lib/log.js
UTF-8
3,002
3.03125
3
[ "MIT" ]
permissive
var _ = require('lodash'); /** * @desc * A simple logger that wraps the <tt>console.log</tt> methods when available. * * Usage: * <pre> * log = new Logger('copay'); * log.setLevel('info'); * log.debug('Message!'); // won't show * log.setLevel('debug'); * log.debug('Message!', 1); // will show '[debu...
true
0c9e3cbec7216871a1626c24fc7292e5361a5445
JavaScript
ivyla/ds-algorithms-js
/Arrays/arrayWithKey.js
UTF-8
215
3.375
3
[]
no_license
let testCases = [{input: [1, 7, 5, 9, 2, 12, 3], k: 2}] const distinct = (arr, k) => { console.log(` ----- \n Array: ${arr} k: ${k}`) } testCases.forEach((caseInput) => distinct(caseInput.input, caseInput.k))
true
a6b9c1e03f179e5222a6affa97de26ae45b16161
JavaScript
MichalLic/JS-30
/sticky-nav/src/js/script.js
UTF-8
553
2.875
3
[]
no_license
/** * get nav element * @type {*} */ var nav = $('nav'); /** * get body */ var body = $('body'); /** * get Y position of nav element * @type {*} */ var topOfNav = nav.offset().top; /** * get height of nav */ var navHeight = nav.height(); function fixNav() { //check pixels value if (window.scrollY ...
true
153850eac6566b0119fe513e5d4aae7436aa57e3
JavaScript
suekimpaulsen/get-AMPed
/client/src/components/PageContent/index.js
UTF-8
5,059
2.59375
3
[]
no_license
import { checkPropTypes } from "prop-types"; import React, { useEffect, useState } from "react"; import EditForm from "./EditForm"; // import { updateDisplayname } from '../../../utils/API'; function PageContent({ ownPage, userData }) { const [profileData, setProfileData] = useState(userData); const [editMod...
true
8132167d03ea7a4715278d04936ea36377c6d8a9
JavaScript
aaronbeekay/shopify-ebay-ui
/src/App.js
UTF-8
30,204
2.6875
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import { convert_shopify_item } from './property-converters.js'; const merge = require('deepmerge'); var XMLHTTPRequest = require("xmlhttprequest").XMLHttpRequest; const shopify_sync_status = {'noproduct': 0, 'uptodate': 1, 'changed': 2, 'syncing': 3}; class App extends Compo...
true
4e936beafe20abddb91838e3fa745683a8f0543a
JavaScript
inre/exchange-sandbox
/lib/assert/asset.js
UTF-8
233
2.640625
3
[]
no_license
const ASSET_REGEXP = new RegExp('[A-Z]{2,6}') function assertAsset (asset) { if (typeof asset !== 'string' || !ASSET_REGEXP.test(asset)) { throw new Error('Asset is invalid') } return asset } module.exports = assertAsset
true
66f212353044bd81f7859ca7f65d4b400503c0da
JavaScript
brendonco/brendonco.github.io
/components/ProgressBar/Canvas.js
UTF-8
1,573
2.671875
3
[]
no_license
import PropTypes from 'prop-types'; import React, { useEffect, useRef } from 'react'; const Canvas = ({ completed: percent, bgColor, innerWidth, innerHeight, textColor, ...restProps }) => { const canvasRef = useRef(null); useEffect(() => { const canvas = canvasRef.current; ...
true
1fc7a45b30a77c4c280d1cdc35b41ecc082e6099
JavaScript
lesleyfon/30_day_leet_code_challenge
/day-10/index.js
UTF-8
1,974
4.8125
5
[]
no_license
/** * Min Stack Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Get the top element. getMin() -- Retrieve the minimum element in the stack. Example: MinStack minStack...
true
5af2e25912ddbc2a53601a3ea2636a2591f95065
JavaScript
LauraVanNieuwland/FullStackStudyChallenges
/04-Front-End/06-HTTP-and-AJAX/Optional-01-Booking-form/lib/index.js
UTF-8
1,262
3.84375
4
[]
no_license
// TODO: write your code here! // increase or decrease counter const datasetCounter = document.querySelector('#counter'); let counter = parseInt(datasetCounter.dataset.count, 10); const increaseCounter = () => { counter += 1; }; const decreaseCounter = () => { if (counter > 2) { counter -= 1; } }; // upda...
true
dc89364cf7af0caa2fcb282262fd7e59402763a3
JavaScript
PatrickJamesHoban/js-find-missing-letter-algo
/find_missing_letter.js
UTF-8
1,584
4.5625
5
[ "MIT" ]
permissive
// PSEUDOCODE // provide an alphabet for reference // find the index of the first letter of the array in the alphabet // check if the next letter in the array matches the next letter in the alphabet based on the index // CODE // FIRST REFACTOR function findMissingLetter(array) { var alpha = 'abcdefghijklmnopqrstuv...
true
e2b892bc9e3844345cde3fa0f4d009a09217e9dc
JavaScript
m64253/io.js
/tests/xd-basics.js
UTF-8
1,912
2.703125
3
[]
no_license
/*jshint strict:false */ /*globals describe it IO assert console */ describe('XD - Basics', function () { var BASE_URL = location.protocol + '//' + location.hostname + ':' + (parseInt(location.port, 10) + 1); it('should not be this "' + BASE_URL + '"', function () { assert.strictEqual(location.href.indexOf(BASE...
true
bd541de7794aa6ce7e2b82da53882ef6f559d3a2
JavaScript
sinhu-jung/react-practices
/02.component/ex04/src/01/Incrementor02.js
UTF-8
656
2.703125
3
[]
no_license
import React, {useState} from 'react'; export default function({ begin, step }){ const [ stateValue, setValue ] = useState(begin); const onClickButtonplus = (e) => { setValue(stateValue + step); } const onClickButtonminus = (e) => { setValue(stateValue - step); } return ( ...
true
431df6c537c6fd8117d2c47ce1bf46a30c21e4ee
JavaScript
arthurtavaresdev/WhatsApp-Clone
/src/util/ClassEvent.js
UTF-8
908
3.75
4
[]
no_license
export class ClassEvent{ // Criando eventos, diferentes, casos de estudo. constructor(){ this._events = {}; } on(eventName,fn){ if(!this._events[eventName]) this._events[eventName] = new Array(); this._events[eventName].push(fn); // Adicionando eventos, ao meu array de ev...
true
da6cbc1e7647bb09c7620e9082005483aee6d465
JavaScript
juloelker/Julie-JS-Project8-Modify-DOM-Elements
/app.js
UTF-8
4,426
3.6875
4
[]
no_license
//about 20 small code tasks here // Steps to add a new element to the DOM // create a new element, li // add class to it // add ID to it (class and ID are optional, probably will use only one of these) // add an attribute // create text node and append it as a child of the parent ul //add to the bulleted lis...
true
e4d305ddc0ddaf453d4b42b44a5cc8982bc64c06
JavaScript
carlcorder/hacker-news-top-story
/public/top-story.js
UTF-8
1,172
2.71875
3
[]
no_license
// Enable pusher logging - don't include this in production // Pusher.logToConsole = true; let pusher = new Pusher('b4d15e255ae352129b3f', { cluster: 'us2' }); let channel = pusher.subscribe('top-story'); let fade = () => { document.getElementById('story-card').classList.toggle('fade'); } // return image preview let...
true
57322fa308fd525053f46992d94e9c8af3e5dc40
JavaScript
trangtran871997/Learning-Python
/BTL-Python/dcam/asset/static/index.js
UTF-8
3,227
2.640625
3
[]
no_license
var URL = "/asset/filter/"; var query = new Map(); $(document).ready( function() { $.getJSON(URL,{},showRecords); } ); (function($) { $.fn.onEnter = function(func) { this.bind('keypress', function(e) { if (e.keyCode == 13) func.apply(this, [e]); }); return this;...
true
8506a0c28ca1bb3c0e44434e8117bd77875a587a
JavaScript
brian-gates/neo4j-stream-deserializer
/index.js
UTF-8
969
2.625
3
[]
no_license
// Transforms neo4j results to clean json var util = require('util'); var JSONStream = require('JSONStream'); var Transform = require('stream').Transform; util.inherits(Neo4jStreamDeserializer, Transform); function Neo4jStreamDeserializer () { Transform.call(this, { objectMode: true }); var columns =...
true
6b57cdbeb23be19e37eeb0cfa44cfdef22434074
JavaScript
falfaro05/JavaScript
/ejemplos mejorando.la/Piedra Papel o tijera/script.js
UTF-8
983
3.625
4
[]
no_license
var piedra = 0; var papel = 1; var tijera = 2; var opciones = ["Piedra","Papel","Tijera"]; var opcionUsuario = parseInt(prompt("Que eliges? \n Piedra: 0 \n Papel: 1 \n Tijera: 2", 0)); var opcionMaquina = Math.floor(Math.random()*3); alert("la maquina eligio " + opciones[opcionMaquina]); switch(opcionUsuario){ cas...
true
e45a9fea8f4cca4b7ada5bddb2a3c47613e43557
JavaScript
theromulanz/CS578
/www/js/ThoughtFest.js
UTF-8
1,311
2.984375
3
[]
no_license
// ThoughtFest is a ThoughtCollector that is dedicated to specific topic and eventually expires. Will send state information when updated. var ThoughtFest = function(connectorTop, connectorBottom) { // vars var thoughtFests = []; // methods this.setThoughts = function(newThoughts){ th...
true
052b696a5507dc0a721594e33e2edaaab1bad46f
JavaScript
Memfis812/fronted
/app/js/index.js
UTF-8
704
4.21875
4
[]
no_license
//Задача 1(периметр) var a = 5; var b = 10; var p = 2 * (a + b); console.log(p) //Задача 1(площадь) var a = 5; var b = 10; var s = a * b; console.log(s) //Задача 2 var x1 = 2; var y1 = 6; var x2 = 10; var y2 = 20; var s = Math.sqrt((Math.pow((x2 - x1), 2)) + (Math.pow(y2 - y1), 2)); console.log(s) //Задача 3 var r1 ...
true
9dc35aa09be383f9f327c8046c3c84b8edc25bbf
JavaScript
cutme/rebelia
/src/js/presslatest.js
UTF-8
2,216
2.625
3
[]
no_license
document.addEventListener('DOMContentLoaded',function() { const press = document.getElementsByClassName('js-goto'); const init = function() { const list = document.getElementById('pressList'), pagination = document.getElementById('pressPagination'), prev = pagination.getElementsByCl...
true
87c80a74b5b15c24d65e1f745995de2bc4d41fe0
JavaScript
kokou2kpadenou/papatho
/src/actions/index.js
UTF-8
1,243
2.859375
3
[]
no_license
/** * Return True il the roomm has NEW messages and false otherwise. * @param {*} roomToCheck * @param {*} messages */ export const roomHasNewMessage = (roomToCheck, messages) => { return ( messages.filter( message => message.room === roomToCheck && message.status === "NEW" && !m...
true
650e2e4acc953c3339a770000b2f615d565f60d6
JavaScript
webmaniak/nodejs-course
/IntroToNode/echo.js
UTF-8
342
3.46875
3
[]
no_license
// ------------------------------------------------------ // Echo.js // Simply repeat everything like a parrot, but better. ;) // ------------------------------------------------------ function echo(message, nbTimes) { for(var i = 0; i < nbTimes; i++) { console.log(message); } } echo("Hello!", 3); ech...
true
14702a183848f611c90d2077c31386bc771c69da
JavaScript
kropel/PB-JS-2019
/JS/sem2/lab1/zad1/index.js
UTF-8
505
3.890625
4
[]
no_license
function isPrime(number) { if (number < 2) { return false; } let dividers = 0; for (let i = number; i >= 1 && dividers < 3; i--) { if (number % i === 0) { dividers++; } } if (dividers === 2) { return true; } return false; } function primesInRange(max, min = 2) { if (max < min) {...
true
c54ab2fe70e55003c391d0608bc60fa604bb49ea
JavaScript
ReddogStone/hartz-wars-iv
/engine/frameanimation.js
UTF-8
719
3
3
[]
no_license
'use strict'; function FrameAnimation(frameTime, selector) { this.frameTime = frameTime || 1; this.frames = []; this.time = 0; this.selector = selector; } FrameAnimation.extends(Object, { addFrame: function(rect) { this.frames.push(rect); }, update: function(deltaTime) { var totalTime = this.frames.length *...
true
f6aa2107338875a7be3f2ee771539841a9ae4254
JavaScript
cipengxu/ListenToThis-Highlight
/web-extension/colors.js
UTF-8
4,591
3
3
[ "MIT" ]
permissive
const favouriteGenres = { 'ambient': '#fa8335', 'blues': '#0df9f9', 'country': '#fad337', 'chill': '#a8f830', 'funk': '#F2EF0C', 'jazz': '#fba19d', 'soul': '#aca2bb', } const getAllPosts = () => { // old reddit const allPosts = document.getElementsByClassName('thing'); if (allPosts.length === 0) { // new r...
true
a7569d4023e79642853e91f689c6da19d2aa2237
JavaScript
davisbradleyj/my-class-repo
/24-post-bootcamp/post-content/06-node/02-code-drills/02-advanced/10-Inquirer_Geocode/Solved/inGeoAdv.js
UTF-8
3,018
3.34375
3
[]
no_license
// Instructions: // Convert the below geocoding code from earlier today so that it uses inquirer.js instead of process.argv to handle the intake of user inputs. // Make sure your new code provides the exact same output as it did with process.argv. // HINT: Don't forget to create your package.json file and save the cor...
true
e2857b60eb3ddf14e4820a3bfe3964b21da364b8
JavaScript
anne-lin/studyRecord-old
/其他算法/arrTostring.js
UTF-8
336
3.90625
4
[]
no_license
//多维数组转成一维数组 let arr=[1,2,[3,4],5,[6,9,[8,9]]]; function toArr(arr){ let newArr=[]; for(let i=0;i<arr.length;i++){ if(Array.isArray(arr[i])){ newArr=newArr.concat(toArr(arr[i])); }else{ newArr.push(arr[i]); } } return newArr } console.log(toArr(arr));
true
b8a01f38c4b02974ce601a6286c4ab003a5029a6
JavaScript
TheEskhaton/asset-pipe
/lib/event-functions.js
UTF-8
868
2.640625
3
[]
no_license
var PipeEvent = require('./pipe-event'); module.exports = { events : [], on : function(evtName, fn){ var hasEvents = false; for(var key in this.events){ var val = this.events[key]; if(val.name === evtName){ val.handlers.push(fn); hasEvents...
true
b7aaf87ad7ed588abda8f38e802efd2120f57ad9
JavaScript
Sujan6389/server
/client/src/pages/Shop.js
UTF-8
1,970
2.546875
3
[]
no_license
import React, { useEffect, useState } from "react" import {fetchProductByFilter, getProductByCount} from "../function/product" import { useSelector, useDispatch } from "react-redux" import ProductCard from "../components/cards/ProductCard" const Shop = () => { const [products,setProducts] = useState([]) const...
true
37f6fefea7c264e47f60efedaa9a79aadec895df
JavaScript
lyskoivan/goit-fe-course
/js/less4/practical work/3/js/script.js
UTF-8
819
3.71875
4
[]
no_license
'use strict' /* Напиши скрипт который определит и выведет в консоль имя сотрудника который выполнил больше всех задач. Сотрудники и кол-во выполненых задач содержатся как свойства объекта в формате "имя":"кол-во задач" */ const tasksCompleted = { ann: 29, david: 35, helen: 1, lorence: 9...
true
cf021441d5a69aecc932c317e161cd5d420def8b
JavaScript
fetaoily/phaser2-game-examples
/examples/TileSprite/tile_sprite_008_tiling_sprite.js
UTF-8
995
2.75
3
[ "MIT" ]
permissive
let game; window.onload = () => { game = new Phaser.Game(800, 600, Phaser.AUTO); game.state.add('PlayGame', PlayGame); game.state.start('PlayGame'); }; let PlayGame = function () { }; PlayGame.prototype = { preload () { // game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHo...
true
5358742aa1ed9ab35932346045cd1e1ee8dc0349
JavaScript
scherzoq/The-Tech-Academy-JavaScript-Projects
/Basic JavaScript Projects/JS/Basic_JavaScript_10.js
UTF-8
1,929
3.640625
4
[]
no_license
//step 174 function Call_Loop() { var digit = ""; var x = 1; while (x < 10000) { digit += "<br>" + x; x *= 2; } document.getElementById("Loop").innerHTML = digit; } //step 177 var Instruments = ["Piano", "Violin", "Viola", "Cello", "Double Bass"]; var Content = "" var Y; function fo...
true
912803aed5c80d5af44c22021c9eb89f41a5215a
JavaScript
craiginiowa/craiginiowa.github.io
/assets/js/app.js
UTF-8
126
2.765625
3
[]
no_license
'use strict'; (function () { function doTheThing() { console.log('did the thing'); } doTheThing(); }())
true
dadbc75bde24dfc307655aba5481d84f7d8461d7
JavaScript
vskittrell/SDI-Project3
/kittrell-vincent-project3.js
UTF-8
7,459
3.390625
3
[]
no_license
// Vincent Kittrell // SDI 1405 // Project 3 // Global Variables var theDragon = "Tiamat", user = "Mantra Sinatra", allie = "Quinzel", participate = true, battleConfirm = false, currentBattle = "", type = "", depth = 0, time = 0, roll = 0, totalTime = 0, playerTurn = t...
true
388d8ca18cd964b00e85880b6f7de7a476f642cc
JavaScript
abhinav-m/learn-javascript
/eloquent-exercises/Ch8_Bugs_and_errors/The_Locked_Box.js
UTF-8
1,847
5.1875
5
[]
no_license
/* The locked box Consider the following (rather contrived) object: const box = { locked: true, unlock() { this.locked = false; }, lock() { this.locked = true; }, _content: [], get content() { if (this.locked) throw new Error("Locked!"); return this._content; } }; It is a box with a lock. There is an array in the box...
true
afee97474116191f41235f77e914c420b3ce2ae2
JavaScript
0423yjh/Project-euler-practice-project-with-js
/Project Euler9.js
UTF-8
647
4.125
4
[]
no_license
/* A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. */ function pytagoras(){ var a, b, c = 1; for(var a = 1; a < 1000; a++){ ...
true
7e830a4d94d0e8666bc6582eec9d8ca4c4e18043
JavaScript
asdfjklhno1/web2.0homework7-tableSorter
/sorter.js
UTF-8
2,811
3.15625
3
[]
no_license
$(document).ready(function(){ $("th").on('click', ascSort).append("<img src='descend.png' align='right' class='sortImg'>"); }) //是否是升序排列 var isAsc = false; //升序 function ascSort(){ resetThisTable.call(this); $(this).find(".sortImg").attr('src', 'ascend.png'); $(this).off('click').on('click', descSort)...
true
a053938b5a4b5045cfff96c1f0cd0d98c86527b4
JavaScript
Kosankuz/storage
/bonus record/js/read_bkp.js
UTF-8
3,286
2.640625
3
[]
no_license
function showRecord(str) { if (str == "") { //document.getElementById("queryOutput").innerHTML = ""; return; } else { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code f...
true
cbea753b7095aae881c0acf6cc46126460798d7d
JavaScript
nickfuentes/DC-Week-4
/Stock-Quotes/js/main.js
UTF-8
927
3.46875
3
[]
no_license
let textSymbolBox = document.getElementById("textSymbolBox") let quoteListDiv = document.getElementById("mainDiv") let searchButton = document.getElementById("searchButton") searchButton.addEventListener("click", function () { let symbol = textSymbolBox.value // Prints the Quote to the screen when clicked...
true
cd31cb17cb6db28e8fe04cd7f8c3c6922aa42148
JavaScript
rohanalkhor/PrintForMe
/SignedIn/map.js
UTF-8
832
2.9375
3
[]
no_license
function setup(){ let cnv = createCanvas(500,500); cnv.parent('Map'); background(255); //location api request loadJSON('http://api.ipstack.com/103.253.169.40?access_key=9632b30fb2e4aa4289d8d9c150f47f75',gotLocation); } let locX; let locY; function gotLocation(data){ co...
true
c2697ba28f1c0eab8ee3e2fa75faf2319482f9f4
JavaScript
zelastyle/MangaTV
/WebContent/js/validarRegistro.js
UTF-8
3,161
3.046875
3
[]
no_license
(function(){ var formulario = document.getElementsByName('formulario')[0]; elementos = formulario.elements; boton = document.getElementById('btn-submit'); var validarNombre = function(e){ nombreRegex = /[A-Z]{2,50}/i; if(formulario.nombre.value === ""){ formulario.nombre.style.border ="1p...
true
b08495aba8dbb8f58bd178112d255dbf2bc71508
JavaScript
webfatheropen/NZ-1911
/react/react05/src/App.js
UTF-8
648
2.84375
3
[]
no_license
import React ,{Component}from 'react'; class App extends Component { constructor(){ super() this.state={ num:1 } } componentDidMount(){ console.log(this.state.num) //1 this.setState({num:2}) console.log(this.state.num)//1 setTimeout(()=>{ this.setState({num:3}) console.lo...
true
075dc62817ee3c745f30190f1e80568d327e5c64
JavaScript
mferoc/Playground-Digital-DigitalHouse
/06 - desafios/06/index.js
UTF-8
189
2.96875
3
[ "MIT" ]
permissive
function alturaArvoreUtopica(ciclos) { let tamanhoArvore = 1; for (let i = 0; i < ciclos; i++) if (i & 1) tamanhoArvore += 1; else tamanhoArvore *= 2; return tamanhoArvore; }
true
f376cef3ebbf7ccba64bdeb5e1d796fd3dc04760
JavaScript
j-vanolst/bcse102_assignment1
/Iterations/fileImportWithResults/src/addPoolResults.js
UTF-8
430
2.6875
3
[]
no_license
var addPoolResults = function (theTournament) { let resultInfo = JSON.parse(localStorage.getItem('resultInfo')).sports for (let aSport of resultInfo) { let theSport = theTournament.findSport(aSport.name) for (let aPoolResult of aSport.poolResults) { console.log(aPoolResult) theSport.addPoo...
true
cbee83e3b6a718c2740e9762aba4a1e40f6b2b0c
JavaScript
emiledelmas/vkshub
/staticfiles/main_hub/Scripts/fractal_tree.js
UTF-8
528
2.96875
3
[ "MIT" ]
permissive
let len,angle,lenmult; function setup() { createCanvas(400, 400); slider = createSlider(0,TWO_PI,PI/4,0.001); slider2 = createSlider(0,0.75,0.67,0.001); } function draw() { background(255); stroke(0); angle = slider.value(); lenmult = slider2.value(); translate(200,height); branch(100); } function bra...
true
2b9eb248a5b7289eb6ddc04ae02f505464177999
JavaScript
sptungG/C4EJS105-NgoVietTung
/Day01-Intro/index.js
UTF-8
911
4.40625
4
[]
no_license
//3 let message = 'Coding is great'; let studentCount = 0; console.log(message); console.log(studentCount); //4 message = 'Coding might not easy, but still great'; studentCount = 19; console.log(message); console.log(studentCount); a = message.toLowerCase(); b = ++studentCount; console.log(a); console.log(b); //5 aler...
true
e8251c08e3ad9dc10881cb9184e06fef347c50a9
JavaScript
secfb/xss
/pxss/pxss/templates/script/pass.js
UTF-8
1,292
3.09375
3
[]
no_license
function check() { var username = document.form1.usernamesignup.value; var mail = document.form1.emailsignup.value; var password = document.form1.passwordsignup.value; var password2 = document.form1.passwordsignup_confirm.value; if (username==""|| password==""||mail==""||password2=="") { alert("任意信息不能为空,请重新填写!...
true
e1e6609bb283c8d2e0d2b2c17d4979a9bb08339d
JavaScript
spriggse/mean_stack
/section1/talk/index.js
UTF-8
434
3.140625
3
[]
no_license
var filename = "index.js"; // file name is unexposed so it cant be called from outside the function //export makes functions exposed var hello = function(name){ console.log("hello " + name); }; var intro = function(){ console.log('im a node file called ' + filename); // unexposed files can still be called from inside ...
true
7c57adcdba2e97598b5b62e848ca39ab487618fb
JavaScript
kamleshgk/StarterNodejsService
/success/success.js
UTF-8
1,090
2.859375
3
[ "MIT" ]
permissive
/** * @fileoverview The Success module. * Formats the success response for delivery to the client. * * Usage: * Require the module then use as Express middleware after routes. * var express = require('express'); * var app = express(); * var routes = require('/routes/routes'); * var success = require(...
true
9c405b00cef2a74ddae4dbf067b84b0d1ae0108f
JavaScript
elza396/test-green-data
/src/components/EmployeeCard/EmployeeCard.js
UTF-8
5,484
2.59375
3
[]
no_license
import React from "react"; import './EmployeeCard.css'; import {connect} from "react-redux"; import {updateEmployee} from "../../redux/empoyees/actions"; class EmployeeCard extends React.Component{ render () { const employees = this.props.employees; const selectedId = this.props.selectedId; ...
true
4a9cb6e96c17ec5869a0eeb10df85ec0727292fa
JavaScript
ericma007/reactusertodolist
/src/project/ProjMainPage.js
UTF-8
6,049
2.78125
3
[]
no_license
import axios from 'axios'; import {useEffect, useRef, useState } from 'react'; import {Route,Switch } from 'react-router-dom'; import ProjAddUserComp from './ProjAddUser'; import ProjUserListComp from './ProjUserList'; import ProjToDoPostListComp from './ProjToDoPostList'; function ProjMainPageComp() { const [users...
true