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
4e4c49567404fe2f0a8e84d88803ed8e97253d42
JavaScript
youqin179/boya
/博雅互动/js/aboutus.js
UTF-8
859
2.703125
3
[]
no_license
var content=document.getElementsByClassName("content")[0]; var contentLeft=content.getElementsByClassName("content-left")[0]; var Ul=contentLeft.getElementsByTagName("ul")[0]; var Lis=Ul.getElementsByTagName("li"); console.log(Lis); var contentRight=content.getElementsByClassName("content-right"); console.log(contentRi...
true
f8b79d6fcda3a96b1a8fc5fa460a39e616c47216
JavaScript
billpereira/code-challenges
/hacker-hank/PromiseArea/calculate-area.js
UTF-8
361
3.546875
4
[]
no_license
let shape="squar" let values = [4,3] let calculateArea = (shape, values) => { return new Promise(function(resolve,reject){ if (shape === "square") { resolve(values[0]*values[1]); } else { reject(-1); } }) } calculateArea(shape,values).then(res=>co...
true
8bb82b1aa19e41ef13094d41ca13fea5965697bf
JavaScript
khagapati-bagh/ReactNative
/App.js
UTF-8
1,729
2.546875
3
[]
no_license
import React, {useState} from 'react'; import {View, StyleSheet, FlatList, Alert} from 'react-native'; import Header from './component/Header'; import AddItem from './component/AddItem'; import { v4 as uuid_v4 } from "uuid"; import ListItem from './component/ListItem'; const App = () => { const [items, setItems] = u...
true
8c70258db7ec85f60f27ac3e28e8063653526aaf
JavaScript
EderJames/ederjames-treinaweb-rxjs
/3 Conhecendo RxJS parte 2/10 Funções de Lista - Observables/script.js
UTF-8
2,605
4.15625
4
[]
no_license
//Função map //A função map serve para pegarmos cada um dos elementos de uma lista e transformar em uma outra estrutura. var items = [ {a: 1}, {a: 2}, {a: 3}, {a: 4} ]; var sourceMap = Rx.Observable.from(items); var subscriptionMap = sourceMap.map(x => {return {value: x.a}}) .subscribe( x =...
true
a18ed6effb0529d05d43ce18d15495531121ad35
JavaScript
RedouaneM/grails-plugin-heartbeat
/grails-app/assets/javascripts/heartbeat.js
UTF-8
6,819
2.515625
3
[ "Apache-2.0" ]
permissive
// insertion d'un graph ou texte auto-rafraîchit dans la page /*global Chart*/ /* TODO: websocket ? */ (function () { 'use strict'; Chart.defaults.global.animation.duration = 0; // this should be set as specific for each HeartBeat graph $(document).ready(function () { // trace dow...
true
41e2cb383ba1f29483f35de64844fc939cb0e827
JavaScript
lsharir/resume
/shared/modules/indexing.module.js
UTF-8
1,262
2.734375
3
[]
no_license
var Indexing = function() { this.utils = require('./utilities.module'); }; Indexing.prototype.indexResume = function(resume) { if (!resume || !resume.categories || !resume.subjects) { throw new Error('IndexService.indexResume : missing arguments'); } this.indexCategories(resume.categories); ...
true
63345c9a35ff58b6b09aa4c8681642144b725fd9
JavaScript
Lehano-A/mesto
/src/components/FormValidator.js
UTF-8
5,334
2.734375
3
[]
no_license
// КЛАСС ПРОИЗВОДЯЩИЙ ВАЛИДАЦИЮ ПОЛЕЙ ФОРМ export default class FormValidator { constructor(enableValidationConfig, formElement) { this._formSelector = enableValidationConfig.formSelector; // СЕЛЕКТОР ФОРМЫ this._inputSelector = enableValidationConfig.inputSelector; // СЕЛЕКТОР ПОЛЯ В ФОРМЕ this._submitB...
true
3b5df9fda72a1edd8206720f14bceb999b8ec32b
JavaScript
exdon/Web-Completo
/controle/if2.js
UTF-8
455
4.09375
4
[]
no_license
function teste1(num) { if(num > 7) console.log(num) console.log('Final') } //a identação não surge efeito nenhum na lógica do cód. teste1(6) // final teste1(8) // 8 final function teste2(num) { if(num > 7) ; { // cuidado com o ; não usar com as estruturas de controle console.log(num) }...
true
628011916c1457d79d915582b9e597b31075a4b0
JavaScript
byLEVIATHAN/TokenBot
/commands/fight.js
UTF-8
2,032
3.03125
3
[]
no_license
const discord = require("discord.js"); let beasthealth = 150; let userhealth = 100; module.exports.run = async(bot, message, args) => { let beastdamage = Math.floor(Math.random() * 15); let userdamage = Math.floor(Math.random() * 30); //message.delete(); userhealth = userhealth <= 0 ? 100 ...
true
241c628c3946298d580452aa791d8dbd53f7f896
JavaScript
jxp4531/threejs-roxik-sharikura
/src/components/Roxik/CameraController.js
UTF-8
1,470
2.625
3
[ "MIT" ]
permissive
import * as THREE from 'three'; export default class CameraController { camera = null; models = []; frame = 1000; sceneLimit = 90; target = new THREE.Vector3(0, 0, 0); tm = null; cs = 0; gy = 0; l = 0; bl = 6; ts = 0; r = 0; rp = 0.03; /** * Frame handler */ step() { if (++thi...
true
bcdd55e4e32d09a0a63fcb4171fecbd27cc0d3e1
JavaScript
MohamedElssaffy/Expensify-app-react
/src/selectors/expenses.js
UTF-8
775
2.765625
3
[]
no_license
// get visible expenses export default ({ expenses, filters }) => { const { text = '', sortBy = 'date', startDate, endDate } = filters; return expenses .filter((exp) => { const startDateMatch = startDate ? startDate.isSameOrBefore(exp.createdAt, 'day') : true; const endDateMatch = ...
true
7002aebd8c919cff16e44d50faccf7d112949438
JavaScript
runspired/ember-allpurpose
/addon/string/get/occurrence.js
UTF-8
226
3
3
[ "MIT" ]
permissive
export default function (str, char, occurrenceIndex) { var count= 0, i=0; while(count< occurrenceIndex && (i=str.indexOf(char,i)+1)){ count++; } if(count == occurrenceIndex) { return i-1; } return null; };
true
0d055d8294682a8460ce5b5efba9c350a28289d8
JavaScript
PanicBear/JavaScriptTutorial
/Function/Apply.js
UTF-8
1,308
4.40625
4
[]
no_license
// 객체의 속성에 값이 들어있으면 프로퍼티 // 객체의 속성에 함수가 들어있으면 메서드 // function func(){ // func.call, func.apply 호출 가능(객체 'Function'이 가진 메서드 상속) // } // func(); // function sum(arg1, arg2){ // return arg1+arg2; // } // console.log(sum(1,2)); // console.log(sum.apply(null, [1,2,3,4,5])); // null을 첫번째 인자로 전닿라면,...
true
084da88adfbd56efa2c82e5c0e7629fe9187e8a1
JavaScript
Hina-softwareEngineer/Web_and_Hybrid_mobile_dev
/JavaScript/class_03/script.js
UTF-8
2,070
3.890625
4
[]
no_license
var arr = ["cat", "dog", "tiger", "lion", "elephant"]; arr.push('rat') console.log(arr) arr.shift() console.log(arr) arr.unshift('mice') console.log(arr) // for loop var a; for (a = 1; a <= 10; a++) { document.write(a + " hello <br>") } var names = ["Ghous", "Basit", "Fahad", "Unknown"]; console.log(names[0])...
true
c610b944ac4b3decbc41d31ec00d165bedc55140
JavaScript
Cornelious11/nodeschool-learning
/finished/learnyounode/ex13.js
UTF-8
1,280
3.484375
3
[]
no_license
// Adding required Modules var http = require('http') var url = require('url') // Global Variables var output = [] var port = Number(process.argv[2]) // Program Logic var server = http.createServer(function(request, response){ if(request.method !== 'GET'){ response.end("Please use a GET request") } ...
true
bc93c06c08cb21a8d57740e6b893bd77e080ee10
JavaScript
wassimmarrakchi/ProcrastAnki
/Procrastanki/popup.js
UTF-8
11,818
2.953125
3
[ "MIT" ]
permissive
$(function() { // Display the number of websites blocked and number of flashcards near the "Blocked Sites" button and the "Make flashcards" button respectively function Display() { chrome.storage.sync.get(['number', 'numberFlash', 'websites', 'front', 'back', 'last_block', 'Unlocked', 'nbr', 'time'], function...
true
ac680e38205b4ad0e60206d3d3e61e5c34150de8
JavaScript
Erick2418/ReactTests
/src/tests/base/11-imp-exp.test.js
UTF-8
1,291
2.703125
3
[]
no_license
import { getHeroeById,getHeroesByOwner } from '../../base/11-imp-exp'; import heroes from './../../data/heroes' describe('Pruebas en funciones de Heroes', () => { test('debe de retornar un heroe por id', () => { const id=1; const heroe= getHeroeById(id); const heroeData= heroes.find( ...
true
545c946efbe1e6804c073be93c25e64c4d1da32e
JavaScript
Keny9/Disney-Gym
/evenement/rendezvous.js
UTF-8
3,439
2.6875
3
[]
no_license
/**************************************** Fichier : rendezvous.js Auteur : Guillaume Côté Fonctionnalité : Fichier js pour les rendez-vous Date : 2019-05-01 Vérification : Date Nom Approuvé 2019-05-03 William Approuvé 2019-05-03 Karl Approuvé ================...
true
fa1903038aeb3d8637a62379c539bb16be4f3799
JavaScript
GNikola/cwp-2017
/C2/index.js
UTF-8
3,202
3.03125
3
[]
no_license
// > - поголемо // < - помало // >= - поголемо или еднакво // <= - помало или еднакво // == - еднакво // === - апсолутно еднакво // != - нееднакво // !== -апсолутно нееднакво var kolichinaBrashno = 1.8; var beloBrashno = false; var crnoBrashno = false; if(kolichinaBrashno > 1){ console.log('Kje pravime torta! :D');...
true
2e2fbc7344b438f5e017e89ed09e9e69ddcf010d
JavaScript
geekysam7/covid-19-tracker
/src/components/CountryPicker/CountryPicker.jsx
UTF-8
1,013
2.6875
3
[]
no_license
import React, { useState, useEffect } from 'react' import styles from './CountryPicker.module.css'; import { fetchCountries } from '../../api'; const CountryPicker = ({ handleCountryChange }) => { const [fetchedCountries, setFetchedCountries] = useState([]); const [state, setState] = useState('') useEff...
true
31201d7835ba1d385bd303274e593af3cb3fecbf
JavaScript
blainekasten/modernrails
/vendor/assets/javascripts/event_emitter.js
UTF-8
400
2.5625
3
[ "MIT" ]
permissive
var EventEmitter = require('base_event_emitter') EventEmitter.prototype.emitChange = function() { this.emit('change'); }; EventEmitter.prototype.addChangeListener = function(callback) { this.on('change', callback); }, // Remove change listener EventEmitter.prototype.removeChangeListener = function(callback)...
true
0dc95c149758842b4075b144e319986c87eef168
JavaScript
voscarmv/AAVE_flash_loan_arbitrage_watcher
/main.js
UTF-8
2,295
2.984375
3
[]
no_license
const fetch = require('node-fetch'); const etherscanAPI = 'YOURAPIHERE'; // AAVE Lending Pool Core V1 // 0x3dfd23A6c5E8BbcFc9581d2E864a68feb6a076d3 // List of all transactions involving interaction with AAVE loans (flash or otherwise) // https://api.etherscan.io/api?module=account&action=txlistinternal&address=0x3dfd...
true
ed6c99c274e86c4734c271b0657c4bc4aae3868f
JavaScript
noreebia/noreebia.github.io
/scripts/enemy.js
UTF-8
2,328
3.703125
4
[]
no_license
function Enemy(){ this.radius = 20; this.speed = 2; this.angle; this.armLength=30; this.armWidth=4; this.distanceToDestination; this.spawnOffset = 120; this.spawnRandomly(); } Enemy.prototype.hasReachedDestination = function(){ this.distanceToDestination = Math.sqrt( Math.pow( (this.destinationY - this.y) ,...
true
0af5b865bb6237e88eb87074f8d5dea41083beef
JavaScript
JoinSEEDS/seeds-simulation
/src/services/SimulationRepositoryApi.js
UTF-8
3,882
2.65625
3
[ "MIT" ]
permissive
import axios from 'axios' import sleep from 'sleep-promise' class SimulationRepositoryApi { constructor () { const { WEBSERVICES_URL: baseURL, WEBSERVICES_API_KEY: apiKey } = process.env this.axios = axios.create({ baseURL, headers: { 'x-api-key': apiKey } }) }...
true
8f3e4a1f11d82acf0dd630aae36c2c92bf34d1c8
JavaScript
SergiySev/timelog
/front/scheduler/schedulerow.js
UTF-8
1,415
2.875
3
[]
no_license
(function (window) { 'use strict'; var tr; var desc; var time; var date; var del; var delButton; var event; function fireDeleteRow(id) { event.initEvent(Scheduler.DELETE_ROW, true, true); event.id = id; tr.dispatchEvent(event); } function onDelete(e...
true
06e6abbfb2b7facb31b02c2d7d75f86a183e29f4
JavaScript
AarjavBarman/pro_27
/Bob.js
UTF-8
463
2.75
3
[]
no_license
class bob { constructor(x,y,radius){ var bob_options = { isStatic: true } this.radius = radius; this.body = Bodies.circle(x,y,this.radius/2,bob_options); World.add(world,this.body); } display(){ push (); translate(this.body.posi...
true
04e566fb5ba8d178018f4c3e5f34d9b33a5e2406
JavaScript
pranabmitra/JS-Algorithms
/Tree/tree.js
UTF-8
2,187
3.96875
4
[]
no_license
class TreeNode { constructor(data) { this.data = data; this.left = null; this.right = null; this.parent = null; } addLeft(node) { this.left = node; node.parent = this; } addRight(node) { this.right = node; node.parent = this; }; }...
true
4e8bc4e3fb803a8d9cfce8d7bda58e0b35b69d72
JavaScript
MissAnichka/DataStructuresAssignment
/network_packet_processing_simulation/process_packages.js
UTF-8
188
2.734375
3
[]
no_license
process.stdin.resume() process.stdin.setEncoding("utf8") process.stdin.on("data", function(input){ var res = checkBrackets(input) console.log( res) return checkBrackets(res); })
true
5d78cb56ce4ab01c4092f67eddec3e91c90103f9
JavaScript
Uma-Jha/Hackerrank_Solutions
/findContiguousRange.js
UTF-8
324
3.421875
3
[]
no_license
function longestConsecutive(arr) { const set = new Set(arr) longest = 0 for (let x of set) { if(set.has(x+1)) { y = x+1 while(set.has(y)) y++ longest = longest>y-x?longest:y-x } } return longest } arr = [2, 10, 3, 12, 5, 4, 11, 8, 7, 6, 15] console.log(longestConsecutive(ar...
true
85d336b0ea18ee4f800fcc4f5a61e112ae82fc68
JavaScript
lucywood620/qtpw46-prog2
/server.js
UTF-8
352
2.734375
3
[]
no_license
//importing from nodejs const http = require('http'); //importing app const app = require('./app'); //assigning a port for the project to run const port = 3000; //creating server with http command and passing in listenener as a paramater const server = http.createServer(app); //restart server and start listening on...
true
be6c859c6d2b54e4977ea6703fb7c14571f65e31
JavaScript
MrP/demos
/rottenTomatoes/rottenTomatoesChartPainter.js
UTF-8
1,170
2.703125
3
[]
no_license
define(['ramda', 'google', 'rottenTomatoesMovieClassifier', 'rottenTomatoesMovieVariables'], function(ramda, google, movieClassifier, variables){ var getDataArray = function(bins, label, getBinLabel/*(bin)*/){ var bars = ramda.map(function(bin){ return [getBinLabel(bin)].concat(ramda.values(movieClassifier.getRat...
true
9dd68ca663906b2fb31c27ad9c2c4aa7055c6acd
JavaScript
GoldenFlash/androidNotification
/app/hb/AirAQIInfo.js
UTF-8
4,796
2.578125
3
[]
no_license
/** * Created by 都玉新 * Author:2017/6/6 * Function:空气质量指数相关信息类 * Desc: */ import CommonUtil from '../common/CommonUtil' class AirAQIInfo { constructor(strAQI) { this.AQI=""; //空气质量指数 this.Grade="";//空气质量指数级别 this.GradeNum=0;//空气质量级别数 this.GradeClass="";//空气质量指数类别 this.GradeColor="";//空气质量指数表示...
true
6144badeb0434194f9deda71562e2f91278df4d0
JavaScript
saurabh-221/Weather-Cli-App
/weatherCliApp.js
UTF-8
992
3.171875
3
[]
no_license
let request = require('request'); const argv = require('yargs').argv; let apiKey = 'fb749890f7a7e03effe6d5eb27daeaf7'; let city = argv.c || 'bangalore'; let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}` request(url, function (err, response, body) { if (err) { console.lo...
true
3fe4056e8124f29cf4f269e38cd071b68a99f2ad
JavaScript
chenzizhao/step70-2020
/src/main/webapp/scripts/classes/recommended-video-display-class.js
UTF-8
1,716
2.984375
3
[]
no_license
class VideoListDisplay{ #CARD = { element: 'div', className: 'card'}; #CARDBODY = { element: 'div', className: 'card-body p-3'}; #THUMBNAIL = { element: 'img', className: 'card-img-top'}; #TITLE = { element: 'h5', className: 'card-title'}; #TEXT = { element: 'p', className: 'card-text'}; constructor(contai...
true
92338092a81c4cbc28d563b3692873fe4b991de9
JavaScript
felipecodes/react-dom-lite
/src/DOMComponentTree.js
UTF-8
849
2.546875
3
[]
no_license
// @flow import type { OpaqueHandle } from 'react-reconciler'; export const HostComponent = 5; export const HostText = 6; const ComponentInstanceMap: WeakMap< Element | Text, OpaqueHandle > = new WeakMap(); export function cacheHandleByInstance( instance: Element, internalHandle: OpaqueHandle ) { Componen...
true
1b7aa1cdc7d574af462a3565585b2284d315bd89
JavaScript
soboleva-JS/art
/src/js/modules/sliders.js
UTF-8
2,042
2.953125
3
[]
no_license
const sliders = (slides, dir, prev, next) => { let slideIndex = 1; let paused = false; //флаг остановки слайдера const items = document.querySelectorAll(slides); function showSlides (n) { if (n>items.length) { slideIndex =1 ; } if (n<1) { slideInde...
true
e76e8cfb0a22839c6dd746e7d7c2d7ff8dc01f7f
JavaScript
EliezerRguez/react-todo-application
/src/js/component/home.jsx
UTF-8
997
2.90625
3
[]
no_license
import React, { useState } from "react"; import TaskList from "./taskList.jsx"; import TaskListElement from "./taskListElement.jsx"; //create your first component const Home = () => { const [list, setList] = useState([ "Dinner at 9pm", "Meeting in Helsinki next week" ]); const fecha = new Date(); const hoy = ...
true
0d87bda489e30f78f28ba06e6bfdb7c0c984e35c
JavaScript
nueldona/whiteBlackApp
/app.js
UTF-8
594
2.9375
3
[]
no_license
setTimeout(() => { document.getElementById('bgSplash').classList.add('fade'); }, 4000); function createAcc() { document.getElementById('loginSection').style. display ="none"; document.getElementById('signUp').style.display = 'block'; } // hng function // function details(value) { // return console.log(value);...
true
ea5be7208c3a6409c020f27cce2db2d8e06111f5
JavaScript
df-wilson/book-manager-express
/controllers/authController.js
UTF-8
4,962
2.828125
3
[]
no_license
let tokenRepository = require("../repositories/tokenRepository"); let authRepository = require("../repositories/authRepository"); exports.login = function(req, res) { console.log("authController::login - request body: " + JSON.stringify(req.body)); const errors = validateLogin(req.body.email, req.body.password)...
true
2f7c487347be2b30938b29960e6bd65bf03cc33e
JavaScript
alexmaracinaru/typewriter
/typewriter.js
UTF-8
2,067
4.28125
4
[]
no_license
"use strict"; //getting the text from HTML to JS const text = document.querySelector(".typewritten").textContent; //clearing the text from HTML document.querySelector(".typewritten").innerHTML = ""; console.log(text); const typekey1 = document.querySelector("#typekey1"); const typespace = document.querySelector("#types...
true
1a98d915fc6f8706482feec30e9da02b0b842e43
JavaScript
ajolote96/phaserbook
/Capítulo9/Textos estáticos/src/scenes/Bootloader.js
UTF-8
1,196
2.546875
3
[]
no_license
class Bootloader extends Phaser.Scene { constructor() { super('Bootloader'); } init() { console.log('Scene Bootloader'); } preload() { this.load.path = './assets/'; this.load.image(['cubix', 'cubix_fondo']); } create() { // this.cubix = this.add.image(...
true
a2198594faf2da914f1e7b4257a6083a8e8b7cf1
JavaScript
Guilherme-Almeidaa/trybe-exercises
/Web Fundamentals/Bloco_4/Exercises_4.1/Exercise_3.js
UTF-8
229
3.671875
4
[]
no_license
let valor1 = 45; let valor2 = 70; let valor3 = 48; if (valor1 > valor2 && valor1 > valor3) { console.log(valor1); } else if ( valor2 > valor1 && valor2 > valor3) { console.log(valor2); } else { console.log(valor3); }
true
f786ee8dc85801bc5f161d9d5acff1be81301f7a
JavaScript
eliotwinder/chess-insights
/pgnEater/parseGame.js
UTF-8
1,726
3.15625
3
[]
no_license
var PGN = require('./PGN'); var FEN = require('./FEN'); var parseMove = require('./parseMove'); var storage = { fenkey: { whiteWins: 0, blackWins: 0, moves: { 'd4': 'newFEN' } } }; module.exports = parseGame = function(pgnString){ var pgn = new PGN(pgnString); var fen = new FEN("rnbqkbnr/...
true
ee2074e187d5c754c0bfe0738807e0a0e57098bf
JavaScript
markverbeck/query-string-demo
/app/public/app.js
UTF-8
1,257
3.21875
3
[]
no_license
$(document).ready(function(){ // -------Parse Query String------ var url = window.location.href; var queryString = url.substring( url.indexOf('?') + 1 ); var parseQueryString = function( queryString ) { var params = {}, queries, temp, i, l; // Split into key/value pairs queries = querySt...
true
dd09a8d05a47770426902182090294548b51449d
JavaScript
mavrovski/JavaScriptPrograming
/JS Fundamentals - януари 2018/03Exercise: Syntax, Operators and Logic Flow/13LastMonth.js
UTF-8
250
3.1875
3
[]
no_license
function lastMonthDays(date) { let days = date[0] let month = date[1] let year = date[2] let newDate = new Date(year,month-1,0) let daysCount = newDate.getDate() return daysCount } console.log(lastMonthDays([13, 12, 2004]));
true
11901fdd4d21d6a57ec9ff260bfe40442b788a82
JavaScript
SkyFlame00/shri-algorithms
/binary-tree-level-order-traversal.js
UTF-8
658
3.296875
3
[]
no_license
/** * Definition for a binary tree node. * function TreeNode(val) { * this.val = val; * this.left = this.right = null; * } */ /** * @param {TreeNode} root * @return {number[][]} */ var levelOrder = function(root) { if (!root) return []; let queue = [{...root, level: 0}], order = []; while (queue....
true
a0306693811b867ffc55832ecc00a1c062da2f79
JavaScript
aeyuk/HearHere
/App/Components/SlideUpImage.js
UTF-8
1,678
2.53125
3
[]
no_license
import React, { useEffect, useRef, useState } from 'react'; import { Animated, Dimensions, Easing, StyleSheet, View, Image } from 'react-native'; export const SlideUpImage = ( props ) => { // Initial position of image const animatedValue = useRef(new Animated.Value(0)).current; const [isVisible, setIsVisib...
true
da4f3ef441a1e2f3a5f4b623007eded3e1614b08
JavaScript
casualGamer-dev/Jarvis
/toxication.js
UTF-8
864
2.515625
3
[]
no_license
const {google} = require('googleapis'); API_KEY = 'AIzaSyDBT9j6-Ks5xuigiiOSJ0p5G6FJPLurCC8'; DISCOVERY_URL = 'https://commentanalyzer.googleapis.com/$discovery/rest?version=v1alpha1'; module.exports = async(message) =>{ if(message.channel.name === "chatbot") return google.discoverAPI(DISCOVERY_URL) .then(c...
true
e9aa41ff7ef3fab4025703c7ad4cce63272ce819
JavaScript
katrina376/chandelier
/script.gs
UTF-8
2,639
2.734375
3
[]
no_license
DB_ID = '__SPREADSHEET_ID__'; ACA_API_USER = '__USERNAME__'; ACA_API_PASSWORD = '__PASSWORD__'; VERS = '1.00'; function doPost(e) { var queryString = e.postData.contents; var resultString = getStuinfo_(queryString); return ContentService.createTextOutput(resultString).setMimeType(ContentService.MimeType.XML...
true
d092bde126975652daaa417d2c6f7155218da49f
JavaScript
lak23shita/University-Management-System
/Student_DBMS/Backend/app/models/model.js
UTF-8
6,837
2.734375
3
[ "MIT" ]
permissive
const sql = require('../db.js'); const genericQueries = { create: 'INSERT INTO %name% SET ?', findById: 'SELECT * FROM %name% WHERE %primary% = ?', getAll: 'SELECT * FROM %name%', updateById: 'UPDATE %name% SET', remove: 'DELETE FROM %name% WHERE %primary% = ?', removeAll: 'DELETE FROM %name%' }; /** * D...
true
2bd9597fef60c5561c9b69b9139fbd016521a0c9
JavaScript
AndyMMunro/ShirtsAnMore.io
/client/src/components/pages/Products.js
UTF-8
2,006
2.5625
3
[ "MIT" ]
permissive
import React, {useEffect, useState} from 'react'; import '../Products.css'; import Products from './ProductsPage'; import Cart from './Cart'; const PAGE_PRODUCTS = 'PRODUCTS'; const PAGE_CART = 'cart'; //import ProductsCard from "../ProductsCard" //import Axios from "axios"; //import '../../App.css'; // import { Link ...
true
d55a4ce74b03e0ba96eac46be5441faa5ae3beaf
JavaScript
TardivoJP/TI-Academy
/Ciclo 2 - Javascript/Exercícios Extra/lista1/lista1_ex16.js
UTF-8
2,279
3.5
4
[]
no_license
/*Faça um programa que receba o ano de nascimento de uma pessoa e ano atual, calcule e mostre: a) a idade dessa pessoa; b) quantos anos essa pessoa terá em 2030;*/ function lst1_ex16(){ ano_nasc=parseInt(prompt("Insira seu ano de nascimento")); while(ano_nasc<=0){ ano_nasc=parseInt(prompt("Caramba, não sabia que...
true
8c2f343cc3d0e60ca04ffe1c0bb2d001859216d0
JavaScript
kyliau/playground
/misc/disjoint_set.js
UTF-8
1,859
3.703125
4
[]
no_license
// Input // a_id b_id c_id // x 0 9 // y 0 7 // z 1 7 // t 1 6 // s 9 2 // Step 1: Break the input into pairs let input = [ ["ax", "b0"], ["ax", "c9"], ["ay", "b0"], ["ay", "c7"], ["az", "b1"], ["az", "c7"], ["at", "b1"], ["at", "c6"], ["as", "b9"...
true
c0322e740a8d3c820507fc8cfb12e701fd6b185b
JavaScript
samhe8283/todo
/server.js
UTF-8
1,017
2.75
3
[]
no_license
var express = require('express'); var app = express(); var bodyparser =require('body-parser'); var _ = require('underscore'); var PORT = process.env.PORT || 3000; var todos=[ ]; var todoid = 1; app.use(bodyparser.json()); app.get('/', function(req,res){ res.send('Todo API Root'); }); //GET /todo app.get('/todo...
true
629e2b7a64449ce7494e5b3a4c4591259ef19ff7
JavaScript
hanschrome/nodejs-mockup
/routes/login.js
UTF-8
966
2.78125
3
[]
no_license
var express = require('express'); var router = express.Router(); /* POST LOGIN */ router.post('/', function(req, res, next) { console.log('OK: POST REQUEST TO /login HAS BEEN PERFORMED'); /** * Get values from request body json dataType: json */ const email = req.body.email; const password ...
true
ddfb61e14b326e9cb3d2c93d36512f96ccb44013
JavaScript
QuantumImmortality/Fullstack-Discord-Bot
/src/input/commands/get.js
UTF-8
791
2.6875
3
[]
no_license
const db = require('../../mongoDB/dbCommands'); const endpoint = require('../../../config/config.json').dbEndpoint; /** * Get a meme from the database * @param client the requesting client * @param message origination point of message * @param args the args sent with the command * @returns {Promise<void>} */ exp...
true
74dcb25513d1855bf04a36f71d33ff361ecd5453
JavaScript
tecWang/Tools
/ReadLineByLine/index.js
UTF-8
512
2.546875
3
[ "MIT" ]
permissive
var readline = require('readline'); var fs = require('fs'); var os = require('os'); var fReadName = './companies.txt'; var fWriteName = './result.txt'; var fRead = fs.createReadStream(fReadName); var fWrite = fs.createWriteStream(fWriteName); var objReadline = readline.createInterface({ input: fRead, }); objRead...
true
6db7bc5da816705f4a6a65a818d34495349a2960
JavaScript
seriiserii825/html-art
/src/js/modules/showMoreStyles.js
UTF-8
783
2.59375
3
[]
no_license
import {getResource} from "../services/resources"; export default function showMoreStyles(trigger, wrapper) { const btn = document.querySelector(trigger); getResource('../assets/db.json').then((res) => showCard(res.styles)); function showCard(data) { btn.addEventListener('click', () => { data.forEach(item => ...
true
33b4bac90cabd0171ed7f38f07a6486fd1299d46
JavaScript
albertogomezp/javascript-practices
/03-let_y_var.js
UTF-8
260
3.421875
3
[]
no_license
'use strict' alert("HOLA ('0')/"); var numero=40; console.log(numero); if(true) { var numero=50; console.log(numero); } console.log(numero); let texto="Text"; console.log(texto); if(true) { let texto="Curso "; console.log(texto); } console.log(texto);
true
f8cea52fe1595cc42161614b75c89c28c1b9e528
JavaScript
BabacarDrame/JavaScript
/10 projets js/notfication-toast/notification.js
UTF-8
966
3.40625
3
[]
no_license
var btun =document.querySelector('#btn'); var container=document.getElementById('container'); // ici j'aic utilisé des fonction fleché en java script ça fonctionne // de la meme maniere que les fonctions cassiques btun.addEventListener("click", () => { creernotification(); }); function creernotifi...
true
d82c15167389f6c5c1fd16da214e96701ba87f62
JavaScript
digitalmethodsinitiative/emaps
/code_project_7,8,9/scripts/scrap_cigrasp.js
UTF-8
3,195
2.625
3
[ "Apache-2.0" ]
permissive
var fs = require('fs'), cheerio = require('cheerio'), MongoClient = require('mongodb').MongoClient; // Output var var scraped = [], db; // TODO: split the type into arrays // Connection to db MongoClient.connect('mongodb://127.0.0.1:27017/cigrasp', function(err, database) { db = database; var colle...
true
3ca09616bc2f641f87f529c75044147ee0ceaffc
JavaScript
vancuongbui/ReactWithRoute
/src/components/posts_new.js
UTF-8
4,164
2.671875
3
[ "MIT" ]
permissive
import React, {Component} from 'react' import {Link} from 'react-router-dom' import { Field, reduxForm } from 'redux-form'; import {connect} from 'react-redux' import {createPost} from '../actions' class PostsNew extends Component { renderTitleField(field) { const {meta: {touched, error} } = field ...
true
e5a98809d7884e4332e2ce883b2b44db11c553a6
JavaScript
s749312025/shell-node
/build/old/js/home.js
UTF-8
3,291
2.609375
3
[]
no_license
var isRefresh = false request({ type: "post", url: "/api/command/list", data: {}, dataType: "json", success: function (response) { if (response.status == 0 && response.fileList && response.fileList.length > 0) { let list = ` ${response.fileList.map(item => { ...
true
bfc3eb7c850e8fdd46c7b94370520c6b3ea71dcb
JavaScript
intel/zephyr.js
/samples/tests/ButtonEnable.js
UTF-8
1,292
2.71875
3
[ "Apache-2.0" ]
permissive
// Copyright (c) 2016-2017, Intel Corporation. // Test code for Arduino 101 that uses two buttons on IO2 and IO4 to control // the two onboard LEDs. // // This version tests freeing a callback by changing the callback of btn2 // dynamically in response to btn1 state. Btn2 will only work to control its // LED while btn...
true
d11263851a5e461ae179dd72833e6a12ecf42fcd
JavaScript
claytonchristian11/w6d1
/arguments.js
UTF-8
2,131
4.40625
4
[]
no_license
function sum(args) { let actualArgs = Array.from(arguments); let result = 0; for (var i = 0; i < actualArgs.length; i++) { result += actualArgs[i]; } return result; } function sum2(...args) { let result = 0; for (var i = 0; i < args.length; i++) { result += args[i]; } return result; } // co...
true
7eb1bcafa9f409eca9ae82e0c08cb8fc72726f5c
JavaScript
zeakd/rothko-project
/src/hA-util.js
UTF-8
177
2.96875
3
[]
no_license
/* add utility method */ Math.mod = function(a, n){ if( a < 0 ){ return this.mod(a + n, n); }else{ return a%n; } }
true
5a699efb1524940e2da8f2decdd62c27766b8b4e
JavaScript
crstffr/strmr-common
/auth.js
UTF-8
5,798
2.5625
3
[]
no_license
var rpg = require('rpg');// random pass generator var Promise = require('promise'); var fbref = require('./refs/root'); var authRef = require('./refs/auth'); var User = require('./models/user'); module.exports = new Auth(); function Auth() { var _this = this; var _user; var _valid = new Promise(functi...
true
336bacd3844d15669be1a15777a3ef6cdef88aa5
JavaScript
spianoDev/100DaysOfCode2019
/Days 61-70/Day67.js
UTF-8
602
3.9375
4
[]
no_license
// 6kyu on CodeWars: https://www.codewars.com/kata/5208f99aee097e6552000148/train/javascript // Complete the solution so that the function will break up camel casing, using a space between words. // // Example // solution("camelCasing") == "camel Casing" function solution(string) { // after much trial a...
true
7933621a44d1d0f44ebf7bb08e6213b66c2ab0dc
JavaScript
Willian6/sistema.js
/sistema.js
UTF-8
1,347
3.65625
4
[]
no_license
let numeroDeAlunos = 10; let contador = 0; if(contador === 0){ console.log("O número atual é ZERO") } else if (contador % 2 == 1 ) { console.log("O numero " + contador + " é IMPAR") }else { console.log("O numero " + contador + "é PAR") } contador++; while ( contador <= numeroDeAl...
true
fe97246ce0f4a31f9703e6dfc7dff1329d258cf4
JavaScript
anshulkapoor018/Web-Programming-1
/Lab6/tasks/seed.js
UTF-8
2,155
2.515625
3
[]
no_license
const connection = require('../config/mongoConnection'); const data = require('../data/'); const bands = data.bands; const albums = data.albums; const main = async () => { const db = await connection(); await db.dropDatabase(); //Creating first Band const LinkinPark = await bands.addBand("Linkin Park",["Ches...
true
971e8694f44ef12b2b499b0c4d45ff507dbdac23
JavaScript
startom/projet-LO07
/form_dispo.js
UTF-8
2,148
2.984375
3
[]
no_license
var tableau; var phase = 0; var pressedx; var pressedy; var date = 0; function setup(i,j) { tableau = new Array(); for (var x = 0; x < i; x++) { tableau[x] = new Array(); for (var y = 0; y < j; y++) { tableau[x][y] = -1; } } } function hovered(i,j) { if(phase) { $tmp1 = pressedx*tableau[0].length+pre...
true
e3510bc6e046c819a1ee947c73060eb1a73c93e5
JavaScript
Konstantin-Kolom/goit-js-hw-12-countries
/src/js/them.js
UTF-8
3,063
2.625
3
[]
no_license
import { fetchCountries } from './fetchCountries.js' import countryCardTpl from '../templates/country.hbs' import countryInfoTpl from '../templates/information.hbs' import { refs } from './refs.js' import Notiflix from "notiflix"; const DEBOUNCE_DELAY = 300; export let name = ""; ////////////// Разметка в HTML и нат...
true
15eb69a977ab2a8e4d5c64cce39c81aa2312204c
JavaScript
Dani-Gonzo/techdegree-project7
/src/components/PhotoContainer.js
UTF-8
818
2.5625
3
[]
no_license
import React from 'react'; import Photo from './Photo.js'; import NotFound from './NotFound.js'; const PhotoContainer = props => { // Extracts search term from route parameter and uses regex to relace underscores with spaces for results title let title = props.match.params.tag; title = title.replace(/_/g,...
true
43fb59d73bd2a72405c99917febeb53a47d9e723
JavaScript
pioneer22/wxProjects
/GuaHongQi/pages/index/index.js
UTF-8
2,592
2.65625
3
[]
no_license
//index.js const ctx = wx.createCanvasContext('getImg') let { log } = console Page({ // 生成图片 generateImg(e) { let index = e.currentTarget.dataset.index let headImg = e.detail.userInfo.avatarUrl log("headImg:", headImg) this.drawImg(headImg, index) }, //绘图 drawImg(headImg, index) { l...
true
86cd0da8cedd55108e02bec5afe39aa3ce6aaa45
JavaScript
towerofnix/dq5-text-adventure
/old-custom/locations/Fortuna/Monstergarten.js
UTF-8
3,175
2.671875
3
[]
no_license
'use strict' const Location = require('../../../Location') const Character = require('../../../Character') module.exports = class FortunaMonstergarten extends Location { constructor() { super({ name: 'Fortuna - Monstergarten', characters: { monty: new (require('../../characters/npc/Monty')),...
true
4dd2957b46f45cd0dd3fedda7bfec277fc6b3a07
JavaScript
ddepu11/random-user-react-app
/src/App.js
UTF-8
4,705
2.515625
3
[]
no_license
import "./App.css"; import { useEffect, useState } from "react"; import { FaUserAlt, FaMailBulk, FaRegCalendarAlt, FaSearchLocation, FaPhone, FaUserShield, } from "react-icons/fa"; function App() { const [person, setPerson] = useState(); const [title, setTitle] = useState("default"); const [value, s...
true
a85785ceba2f8bb61518530e605445cbb2b27ecd
JavaScript
lfernando-en/Entrega1Tareas
/index.js
UTF-8
1,096
2.75
3
[]
no_license
const {cursos, disp_curso, argv} = require('./data.js') const express = require('express') const app = express() if (argv._[0] == 'inscribir') { console.log(argv.i); if (argv.i <= 3) { console.log('entre al if') let curso_encontrado = cursos.find(course => course.id == argv.i); name = c...
true
1720a1162ce529603d88cbb4f59e9fc879851efe
JavaScript
SitanHuang/CardEmpires
/card.default.mod.js
UTF-8
2,415
2.921875
3
[]
no_license
var CARD_COLORS = ['#9C27B0', '#3F51B5', '#009688', '#CDDC39']; var CARDS = []; class Card { constructor (name, description, color, player) { this.id = Math.random() * 100000; this.name = name; this.description = description; this.color = color; this.player = player; } ...
true
1262f1c6a32f2207d005088ddce69e0c83e238e5
JavaScript
klequis/flash-cards
/src/components/Page/index.jsx
UTF-8
1,516
2.515625
3
[]
no_license
// Page import React, { Component } from 'react'; import { connect } from 'react-redux' import * as selectors from '../../store/selectors' import * as actionCreators from '../../store/actions' import Card from './Card' import * as ku from '../../lib/ke-utils' import styles from './style.css' class Page extends Compon...
true
2c9b42f354304f4685c3f5ff09ecd3c038a0c9f6
JavaScript
DevashishNayak/part5
/bloglist/src/App.js
UTF-8
4,453
2.6875
3
[]
no_license
import React, { useState, useEffect } from 'react' import './App.css' import Blog from './components/Blog' import LoginForm from './components/LoginForm' import BlogForm from './components/BlogForm' import Togglable from './components/Togglable' import blogService from './services/blogs' import loginService from './ser...
true
c4c0dc3cd368bf8fbd86ea22962f0509877cc542
JavaScript
jtoddp14/POS-Management
/lib/aesutil/aes.js
UTF-8
3,142
2.96875
3
[ "MIT" ]
permissive
/** * Created by IgorLomachuk on 04.10.2016. */ /** * AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt * @type {exports} */ // encrypt/decrypt functions var MergeRecursive = function (obj1, obj2) { for (var p in obj2) { try { // Property in destination o...
true
f32cb3759720de7056f2ef3ed1e7d188b27be398
JavaScript
rdoby99/OGETableFilter
/script.js
UTF-8
2,214
2.953125
3
[]
no_license
const selectorContainer = document.querySelector("#selectors"); const trs = document.querySelectorAll("div.tableFilterWrap tr"); const selectors = document.querySelectorAll("div.tableFilterWrap select") // Filters rows based on table filters selectorContainer.addEventListener('change', (e)=> { e.preventDefau...
true
c12e0635f030b84ffd42e7b65e19b299e024b3ae
JavaScript
srmono/angdemocrud
/training/js/day2/events.js
UTF-8
1,395
3.6875
4
[]
no_license
function fn() { alert('hi'); } // var btn = document.getElementById('btn'); // //btn.onclick = fn; // btn.onclick = function(){ // alert('hi') // } // Events? // Types of Events // Binding event on Element directly // Bind event by id ref // Bind event with addEventListener // Bubbling phase // Capturing phase // Ca...
true
a02347731ca83d73c13f935988a95dd208f7fe64
JavaScript
myketo/collection
/public/scripts/search_suggestions.js
UTF-8
1,790
2.59375
3
[]
no_license
function findSuggestions(search, field) { $.post("../app/includes/search_suggestions.php", {'search': search, 'field': field}, function(data){ if(!data) return; // console.log(data); var arr = $.parseJSON(data); // console.log(arr); $(".search-suggestions").html(""); ...
true
a635d2b81c5d7e60a6ddb9d72d81ba01d993b1a2
JavaScript
Shiva4820/Todoapp
/src/components/Todo.js
UTF-8
1,623
2.640625
3
[]
no_license
import React, { Component } from 'react' class Todo extends Component { constructor(){ super(); this.state={ tasks:[], currTask:'' } } handleChange=(e)=>{ console.log(e.target.value) this.setState({ currTask:e.target.value...
true
8396209b6250f7f556692487b93a98b5a04d7bba
JavaScript
macaraphael/sistema_desenvolvimento
/views/js/empty_feild.js
UTF-8
315
2.75
3
[]
no_license
function EmptyField(id) { var Fid = document.getElementById(id); var TheDefaultValue = Fid.defaultValue; var TheValue = Fid.value; //alert(TheDefaultValue+" "+TheValue) if(TheDefaultValue == TheValue){ Fid.value = ''; } $('#busca').value(''); } function mostrarTexto(id){ }
true
d03ed148b1e79e0e78cdfc4c3fb739829b25493c
JavaScript
AlexanderKeny10/readme-gen
/utils/generateMarkdown.js
UTF-8
1,151
2.53125
3
[]
no_license
// function to generate markdown for README function generateMarkdown(data) { const newLicenseName = data.license.replace(/ /g,"%20"); return ` # ${data.title} ![License](https://img.shields.io/badge/license-${newLicenseName}-blue.svg) ## Description ${data.description} ## Table of Contents * [Ins...
true
758bab42b1106ff6cc79e4eff945f065a426762c
JavaScript
DinaTaklit/React-Fundamentals
/src/component/6.UseReducer/index.js
UTF-8
1,943
2.5625
3
[]
no_license
import React,{useState, useReducer} from 'react' import Modal from './Modal' import {reducer} from './reducer' const initialState = { people: [], showModal: false, modalContent: '' } export default function Index() { const [name, setName] = useState('') const [state, dispatch] = useReducer(red...
true
bccda374f2b5e858a6453a14216044a47b951822
JavaScript
AbhishekDoshi26/bhavikdodia2000.github.io
/js/main2.js
UTF-8
1,278
2.84375
3
[ "MIT" ]
permissive
// Your web app's Firebase configuration var firebaseConfig = { apiKey: "AIzaSyD5tZjiWD8oMSDZOIQ8AK-iW4Z-Yp6lwJQ", authDomain: "sample-207b3.firebaseapp.com", databaseURL: "https://sample-207b3.firebaseio.com", projectId: "sample-207b3", storageBucket: "sample-207b3.appspot.com", messagingSender...
true
a3dfb7203317b475254172ad66dc787f5f431486
JavaScript
cfiander/GetReq_Mike_Chris
/scripts/index.js
UTF-8
3,240
2.890625
3
[]
no_license
'use strict'; const apiKey = 'bcq3DfNaarB4lSrBJbxNRkw9f3Pj0XCjG4zXPzOZ'; const searchUrl = 'developer.nps.gov/api/v1/parks'; const stateCodes = { 'Alabama' : 'AL', 'Alaska' : 'AK', 'Arizona' : 'AZ', 'Arkansas' : 'AR', 'California' : 'CA', 'Colorado' : 'CO', 'Connecticut' : 'CT', 'Delaware' : 'DE', '...
true
898d9bcbe541b6c8385c1dc20fad5ad3352d8eb3
JavaScript
Withyooou/VueMall
/src/store/mutations.js
UTF-8
719
2.59375
3
[ "MIT" ]
permissive
/** * mutations原则: * (1)唯一目的就是修改state中的状态 * (2)尽可能使每个方法完成的事情单一一点 */ import { ADD_COUNTER, CUT_COUNTER, ADD_TO_CAR, CLEAR_CAR, CHECKED_CHANGE, CLEAR_CAR_ITEM } from './mutation-types' export default { [ADD_COUNTER](state, payLoad) { payLoad.count ++ }, [CUT_COUNTER](state, ...
true
acb0683f89e4f4bcc596007493b4d81f1d0ae119
JavaScript
esaadeh/Node.js-MySQL
/bamazonCustomer.js
UTF-8
2,955
3.328125
3
[]
no_license
// Packages required for this app var mysql = require('mysql'); var inquirer = require('inquirer'); var cTable = require('console.table'); // Connection variable with all the requisite settings var conn = mysql.createConnection({ host: 'localhost', user: 'root', password: 'password', database: 'bamazon...
true
fc297c7a1bb7cd5e8c49c2ff69e60f93d5d8eee4
JavaScript
ashish-shm/js_dom
/assignments/events/2. backgroundChange/main.js
UTF-8
382
3.21875
3
[]
no_license
// Add Event document.addEventListener("click",randomColor); // Manupulate function randomColor() { let firstrgbval = Math.floor( Math.random() * 2000 ); let secondrgbval = Math.floor( Math.random() * 2000 ); let thirdrgbval = Math.floor( Math.random() * 2000 ); document.body.style.backgroundCol...
true
0ff5cf5cd4eb2e9c86af683f975fd6aa2feaed9c
JavaScript
nikhilamunipalli/javascript_dicegame
/app.js
UTF-8
3,566
3.453125
3
[]
no_license
/*------- INITIALIZATION ------*/ //initializing connections with buttons var newGameDOM = document.querySelector('.btn-new'); var rollDiceDOM = document.querySelector('.btn-roll'); var holdDOM = document.querySelector('.btn-hold'); //initializing connections with player panels var player0DOM = document.querySelector...
true
dad28597a97673c2a6477c359b11f5442336c7fc
JavaScript
tsilva19/CampeonatoNodeJS
/src/controllers/jogos-controllers.js
UTF-8
1,755
2.890625
3
[]
no_license
const mongoose = require('mongoose'); const Times = mongoose.model('Times'); const Jogos = mongoose.model('Jogos'); exports.listTimes = async (req, res) => { try{ const data = await Times.find({}); res.status(200).send(data); } catch(e){ res.status(500).send({ message: 'Falha ao listar ...
true
985066d192029a012f88c4db5e5c6cfb755c5d18
JavaScript
JustQu/MeteoCourseWork
/web/register.js
UTF-8
5,000
2.984375
3
[]
no_license
function func(form) { // form.action="register.php" var errorField = document.getElementById("ErrorField"); var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { // 4: request finished and response is ready // 200: "OK" if (xhttp.readyState == 4 && xhttp.status == 200){ var response = ...
true
25798849851417be9dbaebe4632174681ec60d4d
JavaScript
samwang910325/gamemory
/name/name.js
UTF-8
11,718
2.75
3
[]
no_license
const input = [document.getElementById("person-num"), document.getElementById("memorize-time"), document.getElementById("recall-time")] const inputBlock = document.getElementById("input-block"); const startButton = document.getElementById("start-button"); const countBlock = document.getElementById("count-block"); const...
true
4698668b5bfe20d0be45e222cfc0e9658bf6c6ef
JavaScript
pokupaj/learning
/8/8.2.js
UTF-8
400
3.40625
3
[]
no_license
const readlineSync = require("readline-sync"); let howMuchWords = readlineSync.question("Сколько слов?\n> "); let n = parseInt(howMuchWords); let str = ""; let words = ""; for (let i=0; i<n; ++i) { console.log(i+1, " слово"); words = readlineSync.question("> "); if (i<n-1) { str += (words + ", ")...
true
2e51ca6b78ad08b96e28d17e7731c5493293a9ae
JavaScript
colinmckean/NewsAPI_example
/public/Source.js
UTF-8
697
2.6875
3
[]
no_license
var Source = function (sourceInfo) { this.id = sourceInfo.id; this.name = sourceInfo.name; this.logo = sourceInfo.urlsToLogos.small; this.description = sourceInfo.description; }; Source.prototype = { getHtml: function(){ var imgDiv = document.createElement('div'); var img = document.createElement('im...
true
4ae6d4e71ff1481d6b441b7b1c59714a83f32fe1
JavaScript
NicolasVid/MOT
/Front-end/src/middleware/cardsMiddleware.js
UTF-8
1,150
2.546875
3
[]
no_license
import axios from 'axios'; import { POST_SCORE, GET_SCORES, storeScores, storeMessage, togglePending, } from '../actions/scores'; const cardsMiddleware = (store) => (next) => (action) => { switch (action.type) { case POST_SCORE: { store.dispatch(togglePending(true)); axios.post('https://sec...
true