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
0fc83fa465421a55f5ebd46947691bfd12076fd2
JavaScript
quipdata/quip
/public/guilib/canvas.orm_obj.js
UTF-8
32,274
2.625
3
[]
no_license
/* CanvasORMObj: this is the canvas pair of ORMObj. This object * contains all of the code nessisary to alter the canvas. It is * a child of the Canvas object. */ function CanvasORMObj(){ this.NAME_REG_EX = /Model\/Model\/ModelObjects\/[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}\/name/ /* todo: set objectID, val...
true
115fcf0121fd7e2d6ddb303f08da8907fec744ee
JavaScript
antoniogil92/ufo-hw
/app.js
UTF-8
2,134
3.4375
3
[]
no_license
// from data.js var tableData = data; // // YOUR CODE HERE! function call(renderData) { var datetime = []; var city = []; var state = []; var country = []; var shape = []; var durationMinutes = []; var comments = []; // Iterate through each recipe object renderData.forEach((dat...
true
7c4b093be51427341ef80e67574a857a3080a807
JavaScript
HJSmemes/HJSmemes.github.io
/search.js
UTF-8
2,527
2.625
3
[]
no_license
//requires "3EGaming.github.io/files/js/readfile.js" and "3EGaming.github.io/files/js/preview_display.js" and "hjsmemes.github.io/files/data/js/readcat.js" function search() { var searchinput = document.getElementById('searchinput').value; if (searchinput == "logo") { document.getElementById("demo").innerHTML = "</P...
true
c56f2c3c9bccdfffb31e2afae1584c942f933f5c
JavaScript
hecpalomares/tdd-examples
/vending-machine-tdd/functions.js
UTF-8
803
3.8125
4
[]
no_license
'use strict'; /** * getChange accepts two parameters (price and paid) and calculates * the change in "coins" that needs to be returned. * @param {number} price the integer amount (in pennies) to be paid * @param {number} paid the integer amount (in pennies) the person paid * @returns {array} list of coins we need...
true
5f2ebe8680973549c145475a20e3fc344fb0ab28
JavaScript
Arthur-art/react-native-codecademy
/src/components/ButtonsComponent/index.js
UTF-8
933
2.515625
3
[]
no_license
import React, { useState } from 'react'; import { Button, Text, View } from 'react-native'; const ButtonsComponent = () => { const [pressedCount, setPressedCount] = useState(0); const handleChange = () => { setPressedCount((prev) => prev = prev + 1) } return ( <View> <Vie...
true
34028a95ff4eb98d25f92206a12b6d50ecb768d7
JavaScript
nassna85/Site-Agency
/public/js/userRegistration.js
UTF-8
5,803
2.75
3
[]
no_license
$(function(){ $("#registration_firstName").focus(); $("#btn-register-user").on("click", function(){ valid = true; const firstName = $("#registration_firstName").val(); const lastName = $("#registration_lastName").val(); const avatar = $("#registration_avatar").val(); co...
true
78d5e9a92366ed8210d5cc29274917d55e7f7b0d
JavaScript
GoBig87/loggie
/src/util/user.js
UTF-8
1,873
2.78125
3
[]
no_license
class User { constructor() { this.email = localStorage.getItem('email'); this.token = localStorage.getItem('token'); this.tokenType = localStorage.getItem('tokenType'); this.loggedIn = false; this.lat = '33.333'; this.lon = '-117.222'; this.quantity = 0; ...
true
675afe18dc3a5b410ca70dc4a0df408a9bbc27b8
JavaScript
EdwinMoses/React-Course
/React_Code/Module 1/B04108_code/B04108_05_code/B04108_06_11_code.js
UTF-8
173
3.25
3
[]
no_license
function fibonacci_recursive(n) { if (n === 0 || n === 1) { return 1; } else { return (fibonacci_recursive(n – 2) + fibonacci_recursive(n – 1)); } }
true
edd6e0617cca40a75d4d1bb7008d28599941cb1a
JavaScript
guilherme-borges/my-series
/frontend/src/pages/SignUp/index.js
UTF-8
1,787
2.640625
3
[]
no_license
import React, { useState } from 'react'; import { useHistory } from 'react-router-dom'; import api from '../../services/api'; import './styles.css'; export default function SignUp() { const [ name, setName ] = useState(''); const [ last_name, setLastName ] = useState(''); const [ email, setEmail ] = use...
true
cf7ee27ea0af3d9bd8037554de8aa2cea29dba81
JavaScript
YousafOG/ctt-intro
/main.js
UTF-8
485
2.59375
3
[]
no_license
function reveal(){ document.querySelector(".flexcenter").style.display = 'none' const audio = document.querySelector('audio') const wrapper = document.querySelector('.scene') const btnAudio = document.querySelector('#btn-audio') const btnRestart = document.querySelector('#btn-restart') audio.currentTi...
true
be20ddd095292001a6dd8224ac8fc166f17c7307
JavaScript
blink1073/dashboards_server
/app/public-link.js
UTF-8
869
2.578125
3
[ "BSD-3-Clause" ]
permissive
/** * Copyright (c) Jupyter Development Team. * Distributed under the terms of the Modified BSD License. */ var config = require('./config'); var PUBLIC_LINK_PATTERN = config.get('PUBLIC_LINK_PATTERN'); var PROTOCOL = /\{protocol\}/g; var HOST = /\{host\}/g; var PORT = /\{port\}/g; /** * Generates a base URL that...
true
524b9bfe6ccd1d1563f1ef0bd8f554ad0eb0f9c7
JavaScript
zh3305/MapleStory_Script
/嘉年华脚本/任务/56984.js
UTF-8
1,708
2.578125
3
[]
no_license
var status = -1; function start(mode, type, selection) { if (mode == 0) { qm.sendOk("如果你改变了注意,随时告诉我哦。假日还长呢!"); qm.dispose(); } else { if (mode == 1) { status++; } else { status--; } if (status == 0) { qm.askAcceptDecline("你好,#...
true
8dcb667cca3714e11bd1c3327282a369cf220045
JavaScript
dickendd/truckfinder
/get_tweets_js.js
UTF-8
2,299
2.578125
3
[]
no_license
// JavaScript Document JQTWEET = { // Set twitter hash/user, number of tweets & id/class to append tweets // You need to clear tweet-date.txt before toggle between hash and user // for multiple hashtags, you can separate the hashtag with OR, eg: // hash: '%23jquery OR %23css' sear...
true
60388cdc4b8f008f27923ad999c9422ee59ee55d
JavaScript
arekmano/CryptoMessageBox
/dev/js/application.js
UTF-8
1,602
3.046875
3
[]
no_license
/*jshint multistr: true */ JSEncrypt = require('jsencrypt').JSEncrypt; Constants = require('./constants'); function encryptKeyValuePair(pair){ var crypt = new JSEncrypt(); crypt.setPublicKey(Constants.public_key); encrypted_pair = { key: crypt.encrypt(pair.key), value: crypt.encrypt(pair.value) }; re...
true
e8c1755ae5f0f55733451ce259f8ad70abea26d1
JavaScript
Previnkumar/Shopping-2.0
/Shopping2.0/WebContent/scripts/IndexScript.js
UTF-8
3,071
2.625
3
[]
no_license
function showPopupLogin(e){ document.getElementById("register-popup").style.display = "none"; document.getElementById("admin-popup").style.display = "none"; document.getElementById("login-popup").style.display = "block"; } function showPopupRegister(e){ document.getElementById("login-popup").style.display = "...
true
ee9c43b5dd03e89655736b57eb85c65e63eceadb
JavaScript
brendobar/CrazyPanda
/1/pagination/src/components/pagination.js
UTF-8
4,062
2.84375
3
[]
no_license
import React, { Component } from 'react'; import $ from "jquery" export default class Pagination extends Component { constructor(props) { super(props); this.state = { items: [], limit: 5, start: 0, end: 5, pageSize: 5, count: 0, sw: false, }; this.changeLimi...
true
3299d0932227ed4e792b4e2e4c6736a3fe168c5e
JavaScript
robbiegay/phone-sim
/src/CountdownTimer.js
UTF-8
2,931
3.109375
3
[]
no_license
import React, { useState, useEffect } from 'react'; function CountdownTimer() { const [birthday, setBirthday] = useState(new Date()); const [countdown, setCountdown] = useState({ days: null, hrs: null, min: null, sec: null, mil: null, }); const [done, setDone] = ...
true
393d59c2adf08f6b05cb667d72d059a5d1299160
JavaScript
VelociraptorCZE/CarRacerJS
/src/js/GameCanvas.js
UTF-8
1,079
2.75
3
[ "MIT" ]
permissive
/** * CarRacerJS * Copyright (C) Simon Raichl 2018 * MIT License */ export default class GameCanvas { onInit ({ PlayerCarInfo }) { this.playerCarInfo = PlayerCarInfo; this.handleCanvasHeight(); addEventListener("resize", this.handleCanvasHeight.bind(this)); } handleCanvasHeight...
true
098a7d22df34f7b7b679d59a61ff12e8b046ab91
JavaScript
yasielsegui/hackabot
/server.js
UTF-8
2,542
2.5625
3
[ "MIT" ]
permissive
var stringify = function (obj, replacer, spaces, cycleReplacer) { return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces); }; var serializer = function (replacer, cycleReplacer) { var stack = [], keys = []; if (cycleReplacer == null) cycleReplacer = function(key, ...
true
1a009bfb99683280a6e2c2c0e24ffca529f9f207
JavaScript
zany88/js-lesson
/notes/1-1/16Async-Await.js
UTF-8
339
2.765625
3
[]
no_license
async function main() { try { const r1 = await ajax('/user.json') console.log(r1) const r2 = await ajax('/user.json') console.log(r2) const r3 = await ajax('/user.json') console.log(r3) }catch (e) { } } const promise = main() promise.then(()=>{ console....
true
3a76f0d7c16f01f7d8c95a5d155b53ad4274a4e3
JavaScript
JoshJHaines/intro-node
/app.js
UTF-8
2,375
3.078125
3
[]
no_license
const http = require("http"); const fs = require("fs"); const port = 3000; // const server = http.createServer(function(request, response){ // response.end ("hi class") // }) // const server = http.createServer(function(request, response){ // response.setHeader("Content-Type", "application/json") // res...
true
af3c3bc64b546698a2499ec4cb48fface7990b38
JavaScript
blackeyetech/besh-node
/besh-logger.js
UTF-8
2,281
2.65625
3
[ "MIT" ]
permissive
// Config consts const CFG_DEBUG = "debug"; const CFG_TRACE = "trace"; const CFG_QUIET = "quiet"; const CFG_SILENT_STARTUP = "silent-startup"; // Log levels const LOG_FATAL = 400; const LOG_ERROR = 300; const LOG_WARN = 200; const LOG_QUIET = 100; const LOG_INFO = 30; const LOG_DEBUG = 20; const LOG_TRACE = 10; class...
true
0e6963daa62e6518ecbe34e53b06c8dc685d382c
JavaScript
Dannyp123/Daily-Basic-Practice
/05_Friday/prac.js
UTF-8
451
3.359375
3
[]
no_license
function letterPrac(phrase) { for (let i in phrase) { let n = phrase.toLowerCase().charCodeAt(i); let distance = n - 96; let s = ''; if (distance >= 0 && distance < 26) { for (let j = 0; j < distance; j++) { s += phrase.charAt(i); } } e...
true
c34bbff061c8b2503a74d9a23888022851e38218
JavaScript
mukesh1993/react
/src1/main.js
UTF-8
907
2.609375
3
[]
no_license
var React=require('react'); var ReactDOM=require('react-dom'); var Child2=require('./components/Child2.js'); var Child1=require('./components/Child1.js'); var MainComponent=React.createClass({ getInitialState:function() { console.log('inside initial state'); return( {details:'statedata'} ); ...
true
492d41a36a06b48581f6ef1439e1eb36b975fc69
JavaScript
JohnMburu/ProtractorAutomation
/pages/calc.object.js
UTF-8
2,461
3.203125
3
[]
no_license
var calculatorPage = function () { //identify all the elements in the Calculator Page //Labels var pageHeader = element(by.xpath('/html/body/div/div/h3')); var finalResult = element(by.className('ng-binding')); //Textfields var firstValuetxt = element(by.model('first')); var secondValuetxt ...
true
e566e7d0857842604299f3700bbe6063acf6f81d
JavaScript
banirezaie/imd-1-js-2
/dice.js
UTF-8
252
3.5625
4
[]
no_license
/** @format */ let dice1 = Math.floor(Math.random() * 6 + 1); let dice2 = Math.floor(Math.random() * 6 + 1); let sum = dice1 + dice2; console.log(dice1); console.log(dice2); console.log(`you rolled a ${dice1} and a ${dice2}, which sums to ${sum}`);
true
84be5cf1c4fde574bbe82860f9a43d8697aca86b
JavaScript
rhofour/Piano-Trainer
/app/scripts/services/pitch_statistic_service.js
UTF-8
3,331
2.65625
3
[ "MIT" ]
permissive
import _ from "lodash"; import StatEvolver from "../services/stat_evolver.js"; import KeyConverter from "../services/key_converter.js"; const localStoragePitchStatsKey = "pianoTrainerStatistics"; class PitchStatisticService { constructor() { this.read(); } register(evt) { /* an event could be something...
true
92f09b9a67453f14b272c8d81da87da8311aa76a
JavaScript
hyebinJeon/hyebinJeon.github.io
/basic2/jyp/js/src/newsButton.js
UTF-8
737
2.734375
3
[]
no_license
//newsButton.js (function($){ var button = $(".newsBox").children('li').children('button'); var image = $(".newsBox").children('li').children('div'); button.on('mouseenter',function(e){ e.preventDefault(); var $this = $(this); $this.prev('div').addClass('hover'); });//on button.on('mouseleave',f...
true
a701dbeb6bd4bb7415e43665410d7c12cca280bb
JavaScript
lonate12/portfolio
/app/scripts/projectDescriptions.js
UTF-8
3,717
2.515625
3
[]
no_license
var data = [ { name: 'Word Game', description: ["For one of my first JavaScript assignments I was instructed to "+ "create a game where a random word was to be drawn from a word bank and the player "+ "had to guess the word. Naturally, this soon evolved into a Star Wars themed "+ "word game comple...
true
89f4f95b8236c788daf97884d1b2c6878609593d
JavaScript
defianz/study
/React/react-game/lecture/MineSearch.jsx
UTF-8
8,289
2.703125
3
[]
no_license
import React, {useReducer, createContext, useMemo, useEffect} from 'react'; import Table from './Table'; import Form from './Form'; export const CODE = { MINE: -7, NORMAL: -1, QUESTION: -2, FLAG: -3, QUESTION_MINE:-4, FLAG_MINE:-5, CLICKED_MINE:-6, OPENED:0, // 0 이상이면 다 opened }; expo...
true
84f46825b3a0e6817420686b947595385dae90ae
JavaScript
P3T3R-Z/Learning-and-review
/react_demo/src/component/header.js
UTF-8
2,202
2.90625
3
[]
no_license
import React from "react"; import PropTypes from "prop-types"; //无需单独安装 class Header extends React.Component { constructor(props) { super(props); this.state = { userinfo: "子组件" }; } render() { return ( <div> 传递数据:{this.props.title} <br/> 传值验证:{this.props.num.toString()} <br/...
true
a05f7da294e1a4f9914828368cc2bf7d250b752e
JavaScript
wwwK/NodeJS
/fs/12.js
UTF-8
348
3.40625
3
[]
no_license
// Nodejs异步书写文件 //引入fs var fs = require('fs'); var hello = "<h1>你好</h1>"; //书写文件; fs.writeFile('index.html',hello,function(err){ if(err){ //抛出错误 //一旦出现错误,就停止运行,抛出错误到控制台上 throw err; }else{ console.log('文件写入成功') } })
true
8e8fbb003bcecf0a273b87465e647dd1db7dec4d
JavaScript
royooooooo/js_learn
/src/UAT/start.js
UTF-8
1,307
2.9375
3
[]
no_license
const data = require("./data.js"); const map_size = data.map_size; const commends = data.commands; let instruct = { row: map_size.split("*")[0], column: map_size.split("*")[1], }; let map = []; for (let i = 0; i < instruct.row; i++) { map[i] = []; for (let j = 0; j < instruct.column; j++) { map[i][j] = ""...
true
91710a9caf651cbc17ec3fd78b4469876dd31a5d
JavaScript
SanjayVyas/JavaScript
/Memoize/MemoizeNoCacheLimit/MemoizeNoCacheLimit.js
UTF-8
1,773
3.75
4
[ "MIT" ]
permissive
/* * ---------------------------------------------------------------------- * File: MemoizeNoCacheLimit.js * Project: MemoizeNoCacheLimit * Author: Sanjay Vyas * * Description: * Memoize using Proxy, without cache limit * ---------------------------------------------------------------------- * R...
true
ccab457bccef1d041ffde47a845dd4331445fa6f
JavaScript
shaxqt/spotify_friends
/src/utils/storage.js
UTF-8
479
2.9375
3
[]
no_license
const getFromStorage = key => { if (!key) { return null } try { const valueStr = localStorage.getItem(key) if (valueStr) { return JSON.parse(valueStr) } return null } catch (err) { return null } } const setInStorage = (key, obj) => { if (!key) { console.error('key is missin...
true
40057a453c71cd3b30304dcf77dbae958f28ba3e
JavaScript
NicolaDean/TiwDeanNicola
/Code/ThickClient/WebContent/scripts/auctionDetails.js
UTF-8
7,232
2.71875
3
[]
no_license
function AuctionDetails(errorMsg) { this.detailsDiv = document.getElementById("auction-detail-div"); this.detailsJson = JSON.parse("{}"); this.id = 0; this.errorMsg = document.getElementById("error-msg"); this.currentEvent = null; this.setInvisible = function () ...
true
01905219d907b823bfdce23805e25eacac461ce0
JavaScript
fedemcmac/github-react
/src/App.js
UTF-8
977
2.59375
3
[]
no_license
import React, { Component } from "react"; import "./App.css"; import Form from "./components/Form"; import UsersContainer from "./components/UsersContainer"; export default class App extends Component { state = { searchTerm: "" }; handleChange = event => { this.setState({ searchTerm: event.target....
true
e80e0a4109703fc5e21e37de8590e00edc95b7ec
JavaScript
TomaszMolenda/mediciline
/src/main/webapp/resources/js/util.js
UTF-8
1,311
2.78125
3
[ "Apache-2.0" ]
permissive
var months = ["styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"]; $(function() { $('.datepicker').datepicker({ format: "yyyy-mm-dd", language: "pl", autoclose: true }); }) function converDate(longDate){ var date = new Date(l...
true
e160b647e89a11ef876f0185d91c481d86127dde
JavaScript
visouza/reactreduxjavatemp
/vishal/WebContent/reactlearncodeacademytut/src/js/pages/Featured.js
UTF-8
1,411
2.515625
3
[]
no_license
import React from "react"; import Todo from "./../components/Todo"; import TodoStore from "./../store/TodoStore"; import * as Actions from './../actions/Actions'; export default class Featured extends React.Component { constructor(){ super(); this.state = { todos: TodoStore.getAll() } } compone...
true
5fbc4c86ffca2dd89a622c10794f8f81e47b2dba
JavaScript
CharlieG55/Tareas
/index.js
UTF-8
309
3.0625
3
[]
no_license
var mes = 10; if (mes == 12 || (mes > 0 && mes <= 2)){ document.write("Es Invierno"); } else if (mes >= 3 && mes <= 5) { document.write("Es Primavera"); } else if (mes >= 6 && mes <= 8) { document.write("Es Verano"); } else { document.write("Es Otoño"); }; document.write("<br>", "Carlos Grajeda - Carne: 20006542");
true
1edffd186027d88d0a6a64de1b0859e9a711b0ab
JavaScript
bogsaff/informatics_tasks
/tasks/isEmpty.js
UTF-8
155
2.640625
3
[]
no_license
function isEmpty(sample) { if (sample.length == 0) { return true; }else { return false; } } console.log(isEmpty("d ")); "aa" "aaaaaaabbbb"
true
46aacf2fabc26e23982e3ef8d88e42f9ebb20ddf
JavaScript
Cad911/Amap
/public/assets/wysihtml5/src/dom/get_parent_element-25e530140f3fe14bb59e3c8f3b0e5bb8.js
UTF-8
1,604
3.140625
3
[ "MIT" ]
permissive
/** * Walks the dom tree from the given node up until it finds a match * Designed for optimal performance. * * @param {Element} node The from which to check the parent nodes * @param {Object} matchingSet Object to match against (possible properties: nodeName, className, classRegExp) * @param {Number} [levels] How...
true
f3f9825e875108eadd69acba74d6a13eb4176e4b
JavaScript
ishashankg/ReactJSDemo
/source/ReactElement.js
UTF-8
1,216
3.125
3
[]
no_license
var React = require('react'); var ReactDOM = require('react-dom'); /*var h1 = React.createElement('h1', {className : 'header', key:'header'},'This is React'); var p = React.createElement('p',{className : 'content', key:'content'},"And that's how it's works"); var reactFragment = [h1,p]; var section = React.createEleme...
true
50d1b6086a3b3b6bf0a0e9f5342e3e7e63cf11a6
JavaScript
Bashalir/PoKeMeMoRy
/src/app/usecases/pokemon.handler.js
UTF-8
215
2.59375
3
[]
no_license
export class PokemonHandler { constructor(pokemonSource) { this.pokemonSource = pokemonSource; } all() { return this.pokemonSource.all(); } get(id) { return this.pokemonSource.get(id); } }
true
ea9f3ede6fb1545b37a1fdd9fa1fa566028a399f
JavaScript
hz-tyfoon/vanillaJsMouseMoveTextShadowCssMagic
/main.js
UTF-8
930
2.9375
3
[]
no_license
const wrapper = document.querySelector(".hero") const h1 = wrapper.querySelector("h1") const walk = 250; function handleMouseMove(e){ let {offsetX : x, offsetY : y} = e; if (e.target !== this){ x += e.target.offsetLeft y += e.target.offsetTop } const {offsetWidth : width, offsetHeight ...
true
e35f725532951a2914b425e93565700da4d4caf6
JavaScript
BrodyJackson/PeeOrFlee
/routes/rating_routes.js
UTF-8
1,713
2.546875
3
[]
no_license
var express = require('express'); var router = express.Router(); var rating_queries = require('../query_models/rating.js'); /* GET all bathrooms */ router.get('/', function(req, res, next) { rating_queries.getAllRatings(function(err, rows){ if (!err){ res.json(rows); } else{ ...
true
f3c31909da655c3bced17a6285f8abdf6f599d9f
JavaScript
chauhan94/miliyoo
/public/js/miliyoo.js
UTF-8
43,998
2.53125
3
[ "MIT" ]
permissive
function showDlg(header, body, confirm, callback,order) { order = typeof order !== 'undefined' ? true : false; var s = $('#dlg_title').html(header); $('#dlg_contents').html(body); if(!confirm){ $('#dlg_btn_dismiss').hide(); $('#dlg_btn_confirm').text("OK") }else{ $('#dlg_bt...
true
16c67a1a00ab9a496b443fd883fe8c38793532c7
JavaScript
kvizdos/yeetcord-src
/games/games/bubblio/assets/bubblio.js
UTF-8
4,208
2.71875
3
[]
no_license
var PlayerControl = function() { console.log("Listening for keybinds!"); } var ctx; var activeDirection; var myId; function applyDirection(e) { if (e.keyCode === 38 /* up */ || e.keyCode === 87 /* w */ || e.keyCode === 90 /* z */){ socket.emit('pressing direction', 'up') } if (e.keyCode === 3...
true
2ccb6ccc7c9c8a488b2400cbf22b62951f9619a8
JavaScript
micarrizo/RockScissorPaperGame-BackNodejs
/controllers/gameController.js
UTF-8
1,246
2.671875
3
[]
no_license
const Game = require('../models/Game') exports.newGame = async (req, res) => { try { let games; games = new Game(req.body); await games.save() .then(response => res.send(response)) //res.send('Game created') } catch (error) { res.status(400).send('Error...
true
efe4f39d90974fd1eb8c24bf5ef67dfa282890f1
JavaScript
pino-service/100r.co
/scripts/core/invoke.js
UTF-8
1,629
2.734375
3
[]
no_license
function Invoke(name) { this.name = name; this.path = ""; this.requirements = {core:["corpse","memory","list","runic"],main:[name]}; this.includes = {}; this.is_owner = false; this.vessel = null; this.storage = {}; this.summon = function() { for(var cat in this.requirements){ this.includes[...
true
a78f99500abdc28c018e9bca38e8c89c9ae3fbe6
JavaScript
dantohe/cypress
/app/assets/javascripts/measures.js
UTF-8
5,903
3.171875
3
[ "Apache-2.0" ]
permissive
/* Loop over all of the measures in coverage and fill the values of the matrix */ function updateMatrix() { for (measure in coverage) updateMatrixByMeasure(measure); } /* Update the bucket values for the given measure in the matrix */ function updateMatrixByMeasure(measure) { var mappedPatients = []; ...
true
2b96ff2156aa69c8156871b7e446b00715ae88ba
JavaScript
tschaub/closure-util-examples
/lib/src/math/addition.js
UTF-8
587
2.6875
3
[]
no_license
goog.require('goog.array'); goog.require('goog.math.Long'); goog.require('math.addition.AddOptions'); goog.provide('math.addition'); /** * Add any number of numbers. * @param {math.addition.AddOptions} options Options for the add function. * @return {number} The sum of all provided numbers. * @export */ math.ad...
true
518545e137a151da43d107df78633c0acb66bd19
JavaScript
fakela/opentrons
/protocol-designer/src/steplist/formLevel/handleFormChange/test/makeConditionalFieldUpdater.test.js
UTF-8
1,560
2.546875
3
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
// @flow import { makeConditionalPatchUpdater } from '../makeConditionalPatchUpdater' describe('makeConditionalPatchUpdater', () => { const foodUpdateMap = [ { prevValue: 'apple', nextValue: 'banana', dependentFields: [ { name: 'color', prevValue: 'red', nextValue: 'yellow' }, {...
true
be835acd10631d22d2dc16518f038f0ba1168d11
JavaScript
SierraW/Tianmen-react
/src/services/securityClearanceService.js
UTF-8
1,942
2.578125
3
[ "MIT" ]
permissive
import axios from "axios"; import CryptoJS from "crypto-js"; // https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript // dec2hex :: Integer -> String // i.e. 0-255 -> '00'-'ff' function dec2hex(dec) { return dec < 10 ? '0' + String(dec) : dec.toString(16) } //...
true
463baa95632892b6e9f491db12565e16002adfa5
JavaScript
Matt-Crow/World_of_Warriors_Simulator
/src/app.js
UTF-8
605
2.671875
3
[ "MIT" ]
permissive
import {DEFAULT_USER} from "./util/user.js"; import {Controller} from "./controller.js"; import {loadAllDataInto} from "./util/import.js"; let user = DEFAULT_USER; //need to use then, as 'await' doesn't work, given that this isn't wrapped in an async function loadAllDataInto(user).then(()=>{ /* user.getAllWar...
true
5908fd51058aec5c71ab2bf7a89d6968c99e2cac
JavaScript
OSU-CS493-Sp18/final-project-jobsearch-api
/api/companies.js
UTF-8
7,005
2.90625
3
[]
no_license
const router = require('express').Router(); const validation = require('../lib/validation'); /* * Schema describing required/optional fields of a position object. */ const companySchema = { id: { required: false }, companyName: {required: true }, description: { required: false }, glassdoorRating: { required:...
true
d49e16562473b5f2af85ae80d3a64c2a7212191c
JavaScript
ngken84/frontend-nanodegree-neighborhood-map
/js/MapOptions.js
UTF-8
3,607
2.90625
3
[]
no_license
/* Place type option. */ var PlaceType = function(name, type, selected) { var self = this; self.typeName = type; self.placeTypeId = "map_options_" + type; self.name = name; self.isSelected = ko.observable(selected); }; /* MapOptions contains the options that dictate what types of places will be marked on the map...
true
84c0dea2fce857667c589182a2e14f0fa0e8f3e7
JavaScript
Neorech/learnThreeJs
/Module4_MaterialsLightingAndTextures/Demo06 RepeatingTextures/scripts/app.js
UTF-8
2,388
2.6875
3
[ "CC-BY-4.0" ]
permissive
var demo = (function() { "use strict"; var scene = new THREE.Scene(), light, camera, renderer = new THREE.WebGLRenderer(), cube, plane; function initScene() { renderer.setSize(window.innerWidth, window.innerHeight); document.getElementById("webgl-...
true
afb531a7a96fab4d3987780813b86ccc7b47fbb1
JavaScript
ArjunAranetaCodes/edabit-challenges
/Very Easy/Retrieve-the-Last-N-Elements/JavaScript/solution3.js
UTF-8
164
3.203125
3
[]
no_license
function last(a, n) { var arrNew = [] if(n > a.length) return "invalid" for(var x = (a.length - n); x < a.length; x++){ arrNew.push(a[x]) } return arrNew; }
true
af653b34d3eddc173810cdde2cddb31989d72c97
JavaScript
ApinaSalaatti/7drl-2015
/game.js
UTF-8
3,271
2.90625
3
[]
no_license
var Game = { _display: null, _screenWidth: 120, _screenHeight: 28, _currentScreen: null, _messages: [], init: function() { this._display = new ROT.Display({ width: this._screenWidth, height: this._screenHeight, fg: 'black', bg: 'white' }); this.createMusic(); var game = this; window.addEventListener('keyd...
true
8509ca6e0c517674e4d419896c77673fbcd3f123
JavaScript
alexbarron/js-jquery-basics-lab-v-000
/js/calc.js
UTF-8
829
3.546875
4
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
function doMath(){ $("button#equals").on('click', function(){ var num1 = $("input#number1").val(); var num2 = $("input#number2").val(); var operator = $("input#operation").val(); answer = validate(operator, num1, num2); $("h2#result").text(answer); }); } function validate(operator, num1, num2){...
true
e7978ec78c992f545bc2285d652fe9f121c75a1e
JavaScript
evoup/htdoc
/js/static/res2.js
UTF-8
578
2.703125
3
[]
no_license
/*function fixImgs(whichId, maxW) { var pix=document.getElementById(whichId).getElementsByTagName('img'); for (i=0; i<pix.length; i++) { w=pix[i].width; h=pix[i].height; if (w > maxW) { f=1-((w - maxW) / w); pix[i].width=w * f; pix[i].height=h * f; } } }*/ function fixImgs(maxW) { ...
true
e90d5752d5938be6314464bb51c94663b07a927b
JavaScript
ljubomir-matovic/Quantox-internship_seventh-task
/js/events.js
UTF-8
1,991
2.8125
3
[]
no_license
/*Set video duration on load*/ window.onload = () => { player.progress.setAttribute("max", player.video.duration); document.querySelector(".duration").innerHTML = player.numberToTime( player.video.duration ); }; /*Play video if you click on button or video*/ player.playButton.addEventListener("click...
true
a1dcb45b74ae6e60f7c05d9066ef5b5ba18acc16
JavaScript
leolive1506/course-js
/node/inicio/desafioFile1.js
UTF-8
896
3.90625
4
[]
no_license
/* Crie 2 arquivos JS O primeiro irá exportar uma função chamada getFlag() que receberá um argumento do tipo String Essa função deverá buscar dentro do aray process.argv a flag desejada, que é a String e retornar o valor da flag O segundo Irá imortar a função e passar a flag de...
true
65ed27d24e2849d9fec256c89f52127df00018c9
JavaScript
LizaMarie0421/person-stats
/indez.js
UTF-8
1,246
3.671875
4
[]
no_license
function handleSubmit(ev){ ev.preventDefault() const f =ev.target const name = f.personName.value const age = f.age.value const color = f.color.value const list= document.createElement('ul') const stats=document.querySelector('#stats') stats.appendChild(list) stats.appendC...
true
a08221f7f77352e12f887c6cf764b1f6aff5af17
JavaScript
bafolts/advent-of-code-2018
/day3.js
UTF-8
1,157
3.296875
3
[]
no_license
var fs = require("fs"); var lines = fs.readFileSync("input.day3.txt").toString().split("\n"); var taken = {}; for (var i = 0; i < lines.length - 1; i++) { var line = lines[i]; var parts = line.match(/#[0-9]+ @ ([0-9]+),([0-9]+): ([0-9]+)x([0-9]+)$/); var x = parseInt(parts[1]); var y = parseInt(parts[2]); var w...
true
9aff8eea6525521874b01c5fbbff27cde36de76b
JavaScript
newmankyle/Web-Game
/EvilCircle.js
UTF-8
3,862
3.21875
3
[]
no_license
import {random} from './util.js'; function Shape() { this.x = random(0, window.innerWidth); this.y = random(0, window.innerHeight); this.velX = random(-7, 7); this.velY = random(-7, 7); this.exists = true; } //define the EvilCircle - My Code below export class EvilCircle { constructor(cellSi...
true
c6de9fac67bfb68b0dd38bbdede83ead239188f2
JavaScript
0smir/si-json-test
/main.js
UTF-8
3,801
3.203125
3
[]
no_license
/** * Created by Olga on 12/23/16. */ $(document).ready(function(){ console.log( "ready!" ); var countryList = [{ "title":"United Kingdom", "text":"The United Kingdom of Great Britain and Northern Ireland, commonly known as the United Kingdom (UK) or Britain, is a sovereign state in ...
true
96549f1b4fa840da6ba890582d6a3d07a71c8ef1
JavaScript
green-fox-academy/alex6liu-react-gallery
/src/reducers/index.js
UTF-8
543
2.625
3
[]
no_license
import { combineReducers } from 'redux'; const initState = { index: 0, }; const buttons = (state = initState, action) => { switch (action.type) { case 'LEFT': if (state.index === 0) { return { index: 8 }; } return { index: state.index + 1, }; case 'RIGHT': if ...
true
7d736ce66204059c12c4a0c42f0e3d0852238afb
JavaScript
dgozen/carousel
/src/components/Carousel/Carousel.js
UTF-8
3,632
2.65625
3
[]
no_license
import React, { useState, useEffect, useCallback } from "react"; import slideObjects from "../../utility/slideObjects"; import Arrow from "../Arrow/Arrow"; import pause from "../../images/pause.png"; import play from "../../images/play.png"; import "../../App.css"; const Carousel = ({ totalImages }) => { const [anim...
true
27161cab7a2a5e6177d6f4aa5cb8035f43f23b06
JavaScript
Smufie/MailSender
/mailsender-js/js/components/views/addinterestview/AddInterestView.js
UTF-8
960
2.515625
3
[]
no_license
/* eslint-disable no-param-reassign */ import InputContainerFactory from '../../../containers/InputContainerFactory'; import AddInterestComponent from './AddInterestComponent'; import AddInterestButtonListener from './AddInterestButtonListener'; export default class AddInterestView { constructor() { this.container ...
true
4417f60ce688732db7fdc9c26202bd6c81e72593
JavaScript
jcanez2/InterviewStudyGuide
/HelpfulCode/commonSnipIts.js
UTF-8
3,189
4.375
4
[]
no_license
/* Replace replace a char in a string this replaces the '.' with '[.]' let newAddress = address.replace(/\./g, '[.]'); */ /* forEach(doesn't change) & map(changes) Good to remember how the arr.forEach() and the arr.map() anomomous values work (value, index, array) => */ /* indexOf() returns -1 if not fou...
true
096fbf7ed8aa4954fa4f21ad4ba15ca3119b59f7
JavaScript
shinshin86/google-drive-Kakeibo
/dev_scripts/create_sample_date.js
UTF-8
3,755
3.265625
3
[ "MIT" ]
permissive
function createSampleData(){ // 使用するSpreadsheetのIDを入力 var KSS_ID = "{SpreadsheetのID}"; var kSpreadsheet = SpreadsheetApp.openById(KSS_ID); var kSheet = kSpreadsheet.getSheetByName("{データ挿入対象のシート名}"); // データ挿入対象のシート名を入力 // サンプルデータ挿入先セル var kItem; // 項目 var types = ["食費","日用品...
true
7c90aaf440a8c7cb7112dd14e419f7ccf4d96748
JavaScript
Tvisher/todo-list
/src/tasks/components/CreateTask.jsx
UTF-8
906
2.796875
3
[]
no_license
import React, { useState } from 'react'; const CreateTask = ({ addNewTask }) => { const [inputValue, setInputValue] = useState(''); const handleChange = (e) => { setInputValue(e.target.value) } const readDataFromInput = (e) => { e.preventDefault(); let inputText = inputValue....
true
296385dd001efbc6a14c6f88eedb78114572b566
JavaScript
relay-tools/relay-hooks
/examples/suspense/nextjs-ssr/data/database.js
UTF-8
3,945
3.015625
3
[ "MIT" ]
permissive
// @flow /** * This file provided by Facebook is for non-commercial testing and evaluation * purposes only. Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ...
true
06d6cd7a4c947f92add2e86c7b33f09d04a0a6ee
JavaScript
les-briques-du-web/les-briques-du-web-website
/_includes/shortcodes/favicon.js
UTF-8
1,464
2.734375
3
[ "MIT" ]
permissive
/** * @file Defines a shortcode to load a favicon for the user’s platform * @author Reuben L. Lillie <reubenlillie@gmail.com> * @author Horacio Gonzalez <horacio.gonzalez@gmail.com> */ /** * A JavaScript Template module for favicons * @module _includes/shortcode/favicon * @param {Object} eleventyConfig 11ty’s C...
true
d67c3a22bea95fa02dc6b98f8f59583da0facf93
JavaScript
JoJoBeBop/WebTasks
/event-tehtavat-master/js/teht3.js
UTF-8
601
3.25
3
[]
no_license
function laske() { let numero1 = parseFloat(document.getElementById("num1").value); let numero2 = parseFloat(document.getElementById("num2").value); let symb = document.getElementById("drop").value; if (symb === "+"){ document.getElementById("vastaus").innerHTML = numero1 + numero2; } else if (symb ===...
true
5e73ec557e387c37da3979d7c1d78a55f44ab8d2
JavaScript
LeReunionais/registry
/lib/registry.js
UTF-8
1,202
2.53125
3
[ "MIT" ]
permissive
var serviceUtil = require('./service') , bunyan = require('bunyan') , log = bunyan.createLogger({name: "registry"}) ; var registry = []; module.exports = { clear: () => { registry = []; log.info('Cleared registry'); }, invalidate: (serviceName) => { registry = registry.filter((service) => service....
true
c2225cb9c14a500930b312ddc7bef44f1ff88313
JavaScript
Micha-87/fb4-messenger.github.io
/builds/development/index.js
UTF-8
4,660
2.53125
3
[]
no_license
/** * Created by Micha on 11.10.2017. */ //Variablen const express = require("express"); const bodyParser = require("body-parser"); const compression = require("compression");//Komprimiert HTTP-Requests und -Responses. Erhöht die Performance bei einer 3g Verbindung /*let app = express(); let server = require("http")...
true
77ee6e73ffa26d219c29d188a93e82a2aedf0fd7
JavaScript
smasiek/Trakball
/public/js/responsiveNaviBar.js
UTF-8
364
3.265625
3
[]
no_license
const checkbox=document.getElementById('show-menu'); const menu = document.getElementById("menu"); function showMenu() { // If the checkbox is checked, display wrapped navigation bar if (checkbox.checked === true){ menu.style.display = "block"; } else { menu.style.display = "none"; } } ...
true
307714405b9df30b2c01ddf322736813791646b4
JavaScript
LucaLogallo/js-jq-hamburger
/main.js
UTF-8
1,115
2.875
3
[]
no_license
$( document ).ready(function(){ var hamburgerIconOpen = $('.header-right > a'); //referenzio il favicon dell'hamburger per aprirlo var hamburgerIconClose = $(".hamburger-menu .close");//referenzio il favicon dell'hamburger per chiuderlo var hamburger = $('.hamburger-menu');//referenzio l'hamburger menù di default...
true
7577060154dc92325249a1d021a482015b31253b
JavaScript
Zaynex/practice
/promise_async/dr-promise.js
UTF-8
4,573
2.90625
3
[]
no_license
/** * Author: dr-js * https://github.com/dr-js/dr-js **/ // import { __LOG__ } from 'configs/env' const MUTE_ERROR = (error) => { console.error(error) } const createQueueStatus = (size = 0, isValid = true) => ({ getSize: () => size, increaseSize: () => ++size, decreaseSize: () => --size, getIsValid: () =>...
true
168b622e2f52b629605c9026405f10a0efd00433
JavaScript
pedro-candido/uri-js
/1045/index.js
UTF-8
839
3.671875
4
[]
no_license
var input = require('fs').readFileSync('dev/stdin', 'utf8'); var lines = input.split('\n'); let values = lines[0].split(' '); let a = parseFloat(values[0]); let b = parseFloat(values[1]); let c = parseFloat(values[2]); let arrSorted = [a, b, c].sort((a, b) => { return b - a; }); a = arrSorted[0]; b = arrSorted[1...
true
81eaf4f90f76d92d20a067d3678b904d95084d60
JavaScript
ycechungAI/gamejs
/tests/binaryheap.js
UTF-8
833
2.8125
3
[ "MIT" ]
permissive
var BinaryHeap = require('gamejs/math/binaryheap').BinaryHeap; qModule('gamejs/math/binaryheap'); test('PushPop', function() { var ITEMS = [10, 3, 4, 8, 2, 9, 7, 1, 2, 6, 5]; var heap = new BinaryHeap(function(x){return x;}); ITEMS.forEach(function(item) { heap.push(item); }, this); ITEMS.sort(f...
true
aff42661d1f6192b0f1d36692000142971fa492e
JavaScript
hamdi-99/shifumi
/js/script.js
UTF-8
2,412
3.1875
3
[]
no_license
function rockfunction() { var u = "ROCK" ; var a = Math.floor(Math.random() * Math.floor(3)); if (a===0) draw("ROCK",u); else if(a===1) loose("PAPER",u); else win("SCISSORS",u); } function scissorsfunction() { var u = "SCISSORS"; var a = Math.floor(Math....
true
5c35a803b36858f3f05499f5da223875708aa219
JavaScript
MapGIS/WebClient-JavaScript
/src/cesiumjs/render/vectortile/MapgisVectorTileQueue.js
UTF-8
727
3.09375
3
[ "Apache-2.0" ]
permissive
export class TileQueue { constructor() { this.queue = []; } push(tile) { this.queue.push(tile); } has(tile) { for (let i = 0; i < this.queue.length; i++) { let it = this.queue[i]; if (it.x == tile.x && it.y == tile.y && it.z == tile.z && it.id == til...
true
b89ae2553afce54c59e7fc9af2b6bf10fcc6b913
JavaScript
guptamohit004/Notes
/app.js
UTF-8
1,134
2.734375
3
[]
no_license
console.log(" My Notes app "); const notes=require('./notes.js'); const yargs=require('yargs'); const argv = yargs .options({ Add:{ alias : 'add', describe :'Command to add New Note', string : true }}) .options({ Remove:{ alias : 'remo...
true
22d5f2a8b643ee7dd5173d71e03f4f757f54ff5e
JavaScript
nomanHasan/Node-Express-Mongo-REST-API-Server
/services/user-service.js
UTF-8
5,380
2.515625
3
[]
no_license
var User = require('../models/user'); exports.addUser = function(user, next){ var newUser = new User({ username: user.username.toLowerCase(), name: user.name, password: user.password, email: user.email.toLowerCase(), contactNo: user.contactNo, accountType: user.accou...
true
51a6e54a6c725fc7c736f28539f943ece2b212bd
JavaScript
robson-sampaio/film
/src/App.js
UTF-8
2,241
2.5625
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import UpperMenu from './components/UpperMenu/UpperMenu'; import Panel from './components/Panel/Panel' import {URL_API} from '../src/services/base' class App extends Component { constructor(props){ super(props) this.state = { films: [], ...
true
805d76b23dfbe76a67506aa4d76884ab8da6f95b
JavaScript
kalinchernev/Drupal-7
/restful_lecture/mean_api/server.js
UTF-8
3,384
2.9375
3
[]
no_license
// BASE SETUP // ============================================================================= // call the packages we need var express = require('express'); var bodyParser = require('body-parser'); var app = express(); // configure app app.use(bodyParser.urlencoded({extended: true})); app.use(bodyParser.json()); va...
true
9db46d66d350c8a0a7f6bb9cc70ce3add146a36a
JavaScript
ilisha13/envSensors
/sensorNode/src/sensorNodeXDK/roboticsFunction.js
UTF-8
997
2.5625
3
[ "BSD-3-Clause" ]
permissive
// sensors that you just want to get a reading from var groveSensor = require('jsupm_grove') var moistureSensor = require('jsupm_grovemoisture'); var UVSensor = require('jsupm_guvas12d'); var motionSensor = require('jsupm_biss0001'); var rotaryEncoder = require("jsupm_rotaryencoder"); var LCD = require('jsupm_i2clcd...
true
ec0defd6fc3868e31e59dc4f71b48e73b1bd555c
JavaScript
pavelzhdan/-advancedJS_hmw5_task1
/src/index.js
UTF-8
793
3.09375
3
[]
no_license
/* eslint-disable guard-for-in */ // TODO: write your code in app.js const obj = { name: 'мечник', health: 10, level: 2, attack: 80, defence: 40, }; export default function orderByProps(array, options) { const copyArray = array; const newArray = []; const error = new Error('Такой характеристики нет'); for (...
true
88013d231d52980cdf2e69b19117e4895d64e75e
JavaScript
Juliafin/ip-cron-job
/sendMail.js
UTF-8
1,005
2.609375
3
[]
no_license
const nodemailer = require('nodemailer'); const sendMail = async (ip) => { const { SMTP_SERVER, EMAIL_PASSWORD, EMAIL_USERNAME, USER_FIRST_NAME, USER_LAST_NAME, SMTP_PORT } = process.env; let transporter = nodemailer.createTransport({ host: SMTP_SERVER, port: parseInt(SMTP_PORT), ...
true
256d882e116235a5be1c1f79dc755dbb149eeadf
JavaScript
jearle/doge
/app/services/meditate.js
UTF-8
850
2.515625
3
[ "MIT" ]
permissive
import firebase, { getTimestamp } from './firebase'; const MEDITATION_PATH = '/meditations'; const USER_ID = '1'; const MEDITATION_REF = firebase .database() .ref(`${MEDITATION_PATH}/${USER_ID}`); const meditationsMapToArray = (meditationsMap) => { if (!meditationsMap) { return []; } return Object ...
true
1a6f4628dda31ced5ccffd5e0f1f2acf563d1845
JavaScript
aleksei-bulgak-study/rss-game
/game/src/services/math/index.js
UTF-8
568
2.875
3
[]
no_license
import config from './files/config.json'; import Utils from '../util'; export default class MathService { static getRandomTask() { const firstOperand = MathService.getOperand(); const secondOperand = MathService.getOperand(); const operation = config.operators[Utils.random(config.operators.length - 1)]; ...
true
d3f50424c10a72d5eaf7f56f50d83854128b562d
JavaScript
WarunSharma/Daily-Coding-Problems
/Problem42/MaximumDifference.js
UTF-8
285
3.40625
3
[]
no_license
function maximumDifference(nums){ let res=nums[1]-nums[0]; for(let i=0;i<nums.length-1;++i){ for(let j=i+1;j<nums.length;++j) { res=Math.max(res,nums[j]-nums[i]); } } return res; } console.log(maximumDifference([2,3,10,3,4,8,9]));
true
0492e818630c6a9cdd2fcd1040c6b304bb96cce4
JavaScript
shekhar700/Training-Feb-2021
/Modules/React/Day11-12/HarshitSampat/Practice/practice/src/App.js
UTF-8
1,790
2.984375
3
[]
no_license
import React, { Component } from "react"; import "./App.css"; class Form extends Component { state={ firstName:"", lastName:"", people:[] } handleChange= event=>{ // console.log(event.target.name) // console.log(event.target.value); // if(event.target.name === "firstName"){ ...
true
4262f45a14f97975fd6ec162b706cdcb58c597d7
JavaScript
gurparshad/quit-smoking-frontend
/src/components/OnBoarding/OnBoarding.js
UTF-8
2,842
2.53125
3
[]
no_license
import React, { useState, useEffect } from "react"; import "./OnBoarding.css"; import moment from "moment"; import axios from "axios"; import { useHistory, useLocation } from "react-router-dom"; const OnBoarding = () => { const [cigarettesInPack, setCigarettesInPack] = useState(); const [packCost, setPackCost] = u...
true
ad432e85c120084b4358435f99fbe76fe9f9adcb
JavaScript
chrishalley/cibolo-react-client
/src/components/common/FormBuilder/components/inputs/TextInput/TextInput.jsx
UTF-8
1,873
2.59375
3
[]
no_license
import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import styles from './TextInput.module.css'; const propTypes = { defaultValue: PropTypes.string, name: PropTypes.string.isRequired, type: PropTypes.string, onChange: PropTypes.func.isRequired, onBlur: PropTypes.func, d...
true
9f8c68eab0e4363e6d96dc370d20b1131255feb8
JavaScript
devwebevgen/courseJS
/lesson-1/js/script.js
UTF-8
2,071
3.4375
3
[]
no_license
var mainList = { budget: budget, nameMagazine: magazineName, shopGoods: [], employers: new Object, open: true } for (let i = 0; i < 1; i++) { var budget = prompt("Ваш бюджет за месяц?"); if ((typeof(budget)) === 'string' && budget != '' && budget.length < 50 ) { console.log('Все верно!'); mainList.budge...
true