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
6b3e923f0bf07e10fb5f04cde8f5b18e3a17f3a0
JavaScript
timothyawest/calculator
/src/App.js
UTF-8
3,726
3.015625
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import SetDisplay from './components/SetDisplay'; import SetButtons from './components/SetButtons'; class App extends Component { constructor(props){ super(props); this.state = { history:[{ display: "", number: null, operati...
true
bf71d0fdad1be06216a2025c93b2c1f53d748549
JavaScript
kraduddev/msi_tfm_1516
/algorithms/Iteractivo.js
UTF-8
8,405
2.953125
3
[]
no_license
var algorithms = algorithms || {}; algorithms.Iteractivo = function(){ this.calcInitialPosition = function (numChars, chars){ var charArray = []; var valueArray = []; var result = []; var valueToInsert; var valueToInsert2; var holePos; var sup; var inf; var mid; for (var i=0; i<numChars; i++){...
true
0ebe118822216da3e1681b060255873a4f1bda78
JavaScript
MatthewZaso/code-library
/packages/odo-expandable/src/expandable-group.js
UTF-8
1,816
2.953125
3
[ "MIT" ]
permissive
/** * @fileoverview A wrapper for multiple Expandable elements that will * allow them to operate coherently in an accordion type fashion. * * @author Matt Zaso <matt.zaso@odopod.com> */ import Settings from './settings'; import ExpandableItem from './expandable-item'; class ExpandableGroup { constructor(element...
true
b6632690886be0829b8413675f1de11aef38a972
JavaScript
NotWoods/csv-to-pouch
/cmd.js
UTF-8
2,729
2.609375
3
[ "MIT" ]
permissive
const parseArgs = require("minimist"); const helpText = ` Examples: csv-to-pouch http://localhost:5984/mydb < data.csv csv-to-pouch --db http://localhost:5984/mydb -i data.csv csv-to-pouch /path/to/mydb < data.csv csv-to-pouch http://localhost:5984/mydb -u myUsername -p myPassword < data.csv Options: --db ...
true
f4ec9405d44a0adb265f372ed8a2dc9a25f34d3e
JavaScript
lemind/frontendplay-website
/Content/Scripts/comment.js
UTF-8
2,177
2.921875
3
[ "MS-PL" ]
permissive
// this file is for the comment functionality // comment box is loaded async (to prevent spam) (function() { var newCommentObj = id('blogNewComment'); if(newCommentObj === null) { return; } var ID = newCommentObj.getAttribute('data-post'); var commentLink = '/comment/' + ID; // get comme...
true
33ef766dd3a94f71342a50446f9aea1bbac0c6ce
JavaScript
kevy7/dateSuggestion
/validation/validateRegistration.js
UTF-8
1,092
3.03125
3
[]
no_license
const validator = require("validator"); const isEmpty = require("is-empty"); module.exports = (data) => { let err = {}; //We're going to be pushing error messages into this object /* Data being passed in from req.body username user_email first_name last_name pa...
true
5f2c4589d0d2b61bf22f2249728f98aed358ac38
JavaScript
jiangchengxu/30DaysOfReact
/Code/11th_challenge/src/components/Post.js
UTF-8
675
2.734375
3
[]
no_license
import React, { Component } from 'react'; class Post extends Component { constructor(props){ super(props); this.state = { active: false, } } toggleBody = () => { this.setState((state) => ({ active: !state.active })); } render() { cons...
true
56f9de5b59695c7082bcec1e433c205868eac690
JavaScript
spereznetto/BotonAntipanico
/js_logistica/skin0/js/panel-secundario.js
UTF-8
4,167
2.546875
3
[]
no_license
function mostrarPanelSecundario(container, panelID, titulo, controlador, metodo, item, onCompleteCallBack) { if ($(panelID).length > 0) { $(panelID).remove(); } var divSecundarioHTML = ''; divSecundarioHTML += ' <div id="' + panelID.replace("#", "") + '" class="panel-secundario mdc-elevati...
true
b87407bbc5720c00abb670ca073fb953aef27e07
JavaScript
tewshi/js-challenge
/src/report.js
UTF-8
2,771
2.859375
3
[]
no_license
const { getTrips } = require('api'); const { getAllDrivers, getAllVehicles, toDouble } = require('./utils'); /** * This function should return the data for drivers in the specified format * * Question 2 * * @returns {any} Driver report data */ async function driverReport() { // Your code goes here try { ...
true
0b041df3d98e21448aa2168b0fcc37c061754fb7
JavaScript
Rijeos/cultura-colectiva
/server/api/version/version.controller.js
UTF-8
2,437
2.9375
3
[]
no_license
/** * Using Rails-like standard naming convention for endpoints. * GET /api/versions -> index * POST /api/versions -> create * GET /api/versions/:id -> show * PUT /api/versions/:id -> update * DELETE /api/versions/:id -> destroy */ 'use ...
true
672aab3d1c7a649688a565a607cd3b0971a120b7
JavaScript
manoj-g-nair/crowdlogger
/unconfigured/clrms/search-task-assistant/core/task.js
UTF-8
6,445
2.9375
3
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
/** * Encapsulates a task. This is mainly a wrapper around a basic object, * providing update functions that will mark the data as inconsistent with the * DB. Recognized fields and their defaults: * <ul> * <li>timestamp: -1 * <li>id: -1 * <li>searchIds: [] * <li>displayName: "" * </ul> * * @para...
true
23f30b55b01111948f492fe58ed918acde7c978a
JavaScript
Unosquare-CoE-JavaScript/alberto-gutierrez
/solid/strategic/strategicExercise.js
UTF-8
454
3.09375
3
[]
no_license
class Fedex { calculate(pack) { return 1.4; } } class UPS { calculate(pack) { return 1.5; } } class USPS { calculate(pack) { return 2.4; } } const pack = { somethin: "some" }; // strat pattern class Shipping { constructor(company) { this.company = new company(); } calculate(pack) {...
true
f703e819cd03548acd3389a4327438a6d0c6d449
JavaScript
arinmsn/Eloquent-JS
/Ch6/VectorType.js
UTF-8
1,857
5.1875
5
[]
no_license
/* Instructions Write a class *Vec* that represents a vector in two-dimensional space. It takes x and y parameters (numbers), which it should save to properties of the same name. Give the Vec prototype two methods, plus and minus, that take another vector as a parameter and return a new vector ...
true
3d59cd6822462ceed3c32a37be3af8be4dba09c9
JavaScript
advaiswamy/Delta_Web_dev_task_3
/subpages/invite/template.js
UTF-8
1,004
2.734375
3
[]
no_license
var xhttp = new XMLHttpRequest(); var id = location.search.split('id=')[1]; xhttp.open("GET", "invite/template.php?id="+id, true); xhttp.send(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4) { var state = JSON.parse(this.responseText); console.log(state); if (state.template == 'birthd...
true
1c13d494827eab7586596688b7ee1ec6da652324
JavaScript
zhangfeixiang/cocos-example
/tower-of-hanoi/assets/script/block.js
UTF-8
1,536
2.625
3
[]
no_license
cc.Class({ extends: cc.Component, properties: { colorAtlas: cc.SpriteAtlas, //颜色集 }, init(blockIndex) { //第几号的方块 this.node.getComponent(cc.Sprite).spriteFrame = this.colorAtlas.getSpriteFrame(blockIndex); //0,1,2 this.node.width = 80 + blockIndex * 40; //80,120,160 }, o...
true
2349548afae8f241bd74e0e2baba5faff2cfd273
JavaScript
x-G-h-o-s-t-x/forums
/core/js/shout_idle.js
UTF-8
2,621
2.71875
3
[ "MIT" ]
permissive
/** **************************************************** * @author: Ghost * * @copyright: 2016 * **************************************************** **/ $(document).ready(function () { var idleTime = 0, refresh = 10000, timeout = 300000; /...
true
de42219d715c7be66a22d07837087af1911007b0
JavaScript
delucco/solo
/src/Views/weaponsView.js
UTF-8
317
2.53125
3
[]
no_license
var WeaponsView = Backbone.View.extend({ initialize: function(){ this.render(); }, render: function(){ this.$el.children().detach(); this.$el.append( this.collection.map(function(weapon){ return new WeaponView({model: weapon}).$el; })); $('body').append(this.$el); } })
true
030d91dcdcc9401db312686c3b1f2902c955182a
JavaScript
npmcdn-to-unpkg-bot/prot
/section2.js
UTF-8
3,591
2.6875
3
[]
no_license
var margin = {top: 20, right: 50, bottom: 0, left: 50}, w = 1100 - margin.left - margin.right, h = 400 - margin.top - margin.bottom; var padding = 20; var barPadding = 2; var radio = 10; var dataset = [ ["01/01/2016", 50], ["02/02/2016", 100], ["03/03/2016", 84], ["14/05/2016", 31], ["04/04/2016", 89], [...
true
7a21f3925dc0858ee34a8e2852ed04bbf3ead4eb
JavaScript
katarzyna-da-silva/Node
/js/program.js
UTF-8
827
3.09375
3
[]
no_license
//Poprawne enkodowanie zapewnia, że program "zrozumie" co do niego mówimy (odczyta wartość jako string z kodowaniem UTF-8) : process.stdin.setEncoding('utf-8'); //nasłuchiwanie na zdarzenia odczytu : //na zdarzenie (.on) odczytu (readable) wykonujemy funkcje : process.stdin.on('readable', function() { // metoda...
true
e6971c55275755f4671a04ed12f3d1281e102dce
JavaScript
chrisminsukim/ECE191
/mern-smart-mat/backend/routes/descriptions.js
UTF-8
612
2.703125
3
[]
no_license
const router = require('express').Router(); let Description = require('../models/descriptions.model'); router.route('/').get((req, res) => { Description.find() .then(descriptions => res.json(descriptions)) .catch(err => res.status(400).json('Error: ' + err)); }); router.route('/add').post((req, res) => { ...
true
3fdaac938f15d3b55b8bccca022a47e735ea0919
JavaScript
Alaev/game-architecture-demo
/simpleGame/Systems/moveSystem.js
UTF-8
824
2.96875
3
[]
no_license
import {Entity} from "game-platform"; function moveSystem() { let entities = Entity.getByComps(['SPEED', 'DESTINATION', 'POSITION']); entities.forEach((entity) => { // Where are we now? let {x: currX, y: currY} = entity.components['POSITION']; // Where are we going? let {x:destX, y:destY} = entit...
true
9d9f28472ba049862eddc5c698cdd1a89230d82b
JavaScript
BojoZahariev/RestaurantPrebuild
/location.js
UTF-8
1,135
3.03125
3
[]
no_license
const addressDiv = () => { let address = document.createElement('p'); address.id = 'address'; return address; }; const mapDiv = () => { let mapLocation = document.createElement('div'); mapLocation.id = 'map'; return mapLocation; }; const hoursDiv = () => { let hours = document.createElement('p'); hours.id =...
true
3dd4a23fd8a2e4def4886e0fe0d5dd1f704ef116
JavaScript
Tanmay53/cohort_3
/submissions/sm_034_Venkat/week_3/day_2/assaignments/taxcalculator.js
UTF-8
1,067
3.234375
3
[]
no_license
function tax(income, savings) { var income = income || 1200000; var tax = 0; var rebate = 0; var savings = savings || 400000; if (income < 250000) { console.log('No_Tax') } else { if (income > 250000 && income <= 500000) { rebate = savings * 0.5; if (r...
true
10658c4a11ba641347dc0b10adab97281f4b3655
JavaScript
fraziermork/framework
/test/router-test.js
UTF-8
4,291
2.6875
3
[ "MIT" ]
permissive
'use strict'; const fs = require('fs'); const chai = require('chai'); const chaiHttp = require('chai-http'); chai.use(chaiHttp); const expect = chai.expect; const request = chai.request; var Router = require( __dirname + '/../lib/router.js'); var router = new Router(); var simplee = require(__dirname + '/../module.js...
true
a6179f9aba49010bcf657a7b2386f1c0021df5fe
JavaScript
daisy-carolin/JAVASCRIPT1
/javascript.js
UTF-8
1,985
3.59375
4
[]
no_license
// objects var student={ Name:"Beth", Age:23, ID:37069806, }; console.log(student); let person={ Fname:"Beth", Lname:"Wanjiru", Age:24, City:"Kenya" }; console.log(person); let book={ Author:"Chinua Achebe", Title:"Things Fall Apart", Pages:326 }; console.log(boo...
true
a8e4e313f28fb0089920c758d428060e9c44324a
JavaScript
ericawright/w2d3-lhl
/index.js
UTF-8
2,237
2.828125
3
[]
no_license
const PORT = process.env.PORT || 8080; const express = require("express"); const app = express(); const bodyParser = require("body-parser"); const uuid = require("uuid"); app.set("view engine", "ejs"); // Automatically parses the JSON for us app.use( bodyParser.urlencoded({ extended: false }) ); var dogsDB =...
true
09a4c77b46c976559dd12432a9f4589815387273
JavaScript
brenogntt/todo-app-frontend
/src/components/todo/LoginComponent.jsx
UTF-8
3,561
2.765625
3
[]
no_license
import React, { Component } from 'react'; import AuthenticationService from './AuthenticationService.js' class LoginComponent extends Component { constructor(props) { super(props) this.state = { username: 'breno.gianotto', password: '', hasLoginSucceed: false, ...
true
97c349acf1bf36ef85b09d3537dac6465dba9b77
JavaScript
topidesta/crud-app
/src/components/Login/index.js
UTF-8
2,332
2.5625
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import Swal from 'sweetalert2'; class Login extends Component { constructor(props) { super(props); this.state = { adminEmail: 'admin@example.com', adminPassword: 'qwerty', userEnteredEmail: null, userEnteredPassword: null }; this.han...
true
40481cd75294f9ba1e045a7601b626e0b3df0796
JavaScript
ynonp/ebay-react
/ajax/src/timer_functions.js
UTF-8
583
3.140625
3
[]
no_license
import React, { useState, useEffect } from 'react'; // https://overreacted.io/making-setinterval-declarative-with-react-hooks/ export default function Timer(props) { const [ticks, setTicks] = useState(0); // if second paramter is not passed -> re-init the effect each render // if second parameter is [] -> crea...
true
ccf1f6c9df22e63b5355396939a7320d48f73a64
JavaScript
luizbinda/Web1
/TrabalhoCanvas/Grafico2.js
UTF-8
1,490
3.375
3
[]
no_license
var canvas = document.getElementById("quadro07"); var ctx = canvas.getContext("2d"); ctx.font = "20px Arial"; function Circle(x, y, raio, anguloInicial, AnguloFinal, sentido, cor) { ctx.beginPath(); ctx.fillStyle = cor; //Informa a cor do preenchimento ctx.arc(x, y, raio, anguloInicial, AnguloFinal, sentid...
true
4531a5c00b605daf753cc8d48b1e8deb75fa8c91
JavaScript
CChenYixin/git_task
/task/task13/main.js
UTF-8
2,558
2.515625
3
[]
no_license
var login = document.getElementsByClassName('login')[0], flipModal = document.querySelector('.flip-modal'); function $(selector) { return document.querySelector(selector); } login.addEventListener('click', function(e) { e.stopPropagation(); flipModal.classList.add('show'); }); flipModal.addEventLi...
true
cb84f2296519547e895fc011c0d440b21191cc1b
JavaScript
JNKielmann/PiClock
/src/backend/matrixRenderer/ledMatrix.js
UTF-8
488
2.890625
3
[]
no_license
import Matrix from 'node-rpi-rgb-led-matrix' class LedMatrix { constructor() { this.matrix = new Matrix() } width() { return this.matrix.getWidth() } height() { return this.matrix.getHeight() } setPixel(x, y, { r, g, b }) { this.matrix.setPixel(this.width() - y, x, r, g, b) } clear...
true
087636a7876f303ee5e4da2d9b77c82fde4ac609
JavaScript
dhedden1126/Biodiversity
/js/plots.js
UTF-8
4,245
2.53125
3
[]
no_license
function init() { var selector = d3.select("#selDataset"); d3.json("samples.json").then((data) => { console.log(data); var sampleNames = data.names; sampleNames.forEach((sample) => { selector .append("option") .text(sample) .property("va...
true
5f6582ba572644509d47dd26005fd68e8fe4d979
JavaScript
JaredDjour/InstaDjour
/frontend/components/comments/comment_form.jsx
UTF-8
2,562
2.515625
3
[]
no_license
import React from "react"; class CommentForm extends React.Component { constructor(props) { super(props); this.state = { body: "", post_id: this.props.postId }; this.handleSubmit = this.handleSubmit.bind(this); this.handleChange = this.handleChange.bi...
true
daf0a8a01d5fc36ceddf87b465530fd245096b2a
JavaScript
BrianBabb/Bamazon
/bamazonCustomer.js
UTF-8
2,634
2.859375
3
[]
no_license
var inquirer = require("inquirer"); var mysql = require("mysql"); var connection = mysql.createConnection({ host: "localhost", // Your port; if not 3306 port: 3306, // Your username user: "root", // Your password password: "$kyl1ne22", database: "bamazon" }); connection.connect(function (err) { i...
true
341ae7feb3cfc668a1a97287b1beeae2b00086e2
JavaScript
ModernAdmiral/Code-Challenges
/LeetCode/DeleteNodeInLL.js
UTF-8
556
3.734375
4
[]
no_license
/** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } */ /** * @param {ListNode} node * @return {void} Do not return anything, modify node in-place instead. */ var deleteNode = function (node) { // This solution works because we are guranteed th...
true
096013ba5a37bac65a1bd70b118b196053b9e876
JavaScript
dantasrafael/curso-vue
/exercicios-web/funcao/arrowFunction3.js
UTF-8
889
3.328125
3
[]
no_license
console.log('------ Com function normal ------') let comparaComThis = function (params) { console.log(this === params) } comparaComThis(global) comparaComThis(module.exports) comparaComThis(this) console.log('------ Com function normal com bind ------') const obj = {} comparaComThis = comparaComThis.bind(obj)...
true
70048913cdbdcc445a709ddc553505be90b514ba
JavaScript
MargotGuo/TW-homework-repo-front-end
/Week-05-Basic-ES6-OOP/03-collection-operation/main/superposition_operation/own_elements_operation/subscript_is_even/calculate_median.js
UTF-8
396
2.515625
3
[]
no_license
"use strict"; const rank_desc = require("../../../map/rank_desc.js"); const comput_median = require("../../../reduce/compute_median.js"); const calculate_median = (collection) => { const evenSubscript = collection.filter((number, index) => index % 2); const sortArr = rank_desc(evenSubscript); const median = com...
true
8df0a48ce7ad14dece77ed9b28ea269a211d3fd6
JavaScript
asmuelle/OpenJSCAD.org
/packages/modeling/src/maths/mat4/fromZRotation.test.js
UTF-8
1,245
2.734375
3
[ "MIT" ]
permissive
const test = require('ava') const { fromZRotation } = require('./index') const { compareVectors } = require('../../../test/helpers/index') test('mat4: fromZRotation() should return a new mat4 with correct values', (t) => { const rotation = 90 * 0.017453292519943295 const obs2 = fromZRotation(rotation) t.true(c...
true
86cdc5f7f20c6b57fc5be7c15117dea95f43a44d
JavaScript
jyunming-chen/socket-threejs
/index4.js
UTF-8
1,306
2.765625
3
[]
no_license
var app = require('express')(); var server = require('http').Server(app); var io = require('socket.io')(server); var port = 3000; server.listen (port, function() { console.log ('listening on port ' + port) }); app.get('/', function(req, res){ res.sendFile(__dirname + '/index4.html'); }); var nID = 0;...
true
3008c9fdfce43c19e9778e8a41fa3c28bc62b341
JavaScript
chriswillphoto/exercism
/javascript/gigasecond/gigasecond.js
UTF-8
202
2.75
3
[]
no_license
class Gigasecond { constructor(date) { this.input = date; this.giga = 1000000000000; } date() { return new Date(this.input.valueOf() + this.giga); } } module.exports = Gigasecond;
true
01ba987dde8211ad6afd56a4e1a3fa2b4ede060f
JavaScript
Favii4/Final-Modelos-2
/js/mainDash.js
UTF-8
7,214
2.71875
3
[]
no_license
var puntajesBank = []; function initApp() { cargarPuntajesBank() cargarPuntajesSpace() cargarPuntajesMario() } function cargarPuntajesBank() { ///User information is obtained var infoPuntBank = firebase.database().ref().child("bankHero") var infoPuntBankPromise = infoPuntBank.on('value', fun...
true
014c9d4ea55f019f1fb1a83a6da3afd8e56d50cc
JavaScript
fernandoPalaciosGit/full-pokedex
/app/components/services/pokemon.fact.js
UTF-8
3,791
2.703125
3
[ "MIT" ]
permissive
( function(){ var PokemonFactory = function($http, $q, $filter){ // request for all the pokemon list var all = function(){ // maintain a dormant state until all promises have just run var deferred = $q.defer(); $http.get('data/pokemons.json', {cache: true}) .success(function(data){ defer...
true
7e507999b4c448cbdcc37cd5539ba7e058410ffa
JavaScript
georgec12104531/codingChallenges
/subset.js
UTF-8
413
2.984375
3
[]
no_license
const subset = (nums) => { let result = []; let current = []; const getSubset = (result, current, rest) => { if (current.length) { result.push(current); } for(let i = 0; i < rest.length; i++) { newCurrent = current.concat([rest[i]]) newRest = rest.slice(i + 1); getSubset(resu...
true
f354b6ac4aaa2b5e14c935057e6365a4f710c80f
JavaScript
ma-ranaivoson/book-store-api
/controllers/auth.js
UTF-8
2,730
2.5625
3
[]
no_license
const asyncHandler = require('../middlewares/asyncHandler'); const User = require('../models/User'); const jwt = require('jsonwebtoken'); const ErrorResponse = require('../utils/ErrorResponse'); // @route GET /api/v1/auth // @desc Connect to an user account // @access Public exports.connect = asyncHandler(async ...
true
3cc88401212eec5320e093865fe2ff6776ac5313
JavaScript
kevinmartinjos/siq
/src/utils.js
UTF-8
922
2.625
3
[]
no_license
var winston = require('winston'); var Exception = function(message){ return { errorMessage: message }; }; var Utils = (function(){ return { /* Helper function to check for falsy values */ isNullOrEmpty: function(value){ if(value === undefined || value === null) return true; if(typeof value ===...
true
153e338cf8754f1a8ad43d3909a0f655939d5916
JavaScript
shresthashashank/DrumKit
/index.js
UTF-8
2,082
3.609375
4
[]
no_license
var length = document.querySelectorAll(".drum").length; //Sound by click for( i= 0; i < length; i++){ document.querySelectorAll(".drum")[i].addEventListener("click" , function(event){ var buttonLetter = this.innerHTML; // Stores the innerHTML content of each button clicked. makeSound(butto...
true
b31ddaaee0497d754d55d2802c50de23d3953482
JavaScript
DreamZoom/NZJ
/nzj/WebRoot/js/report.js
UTF-8
7,993
2.65625
3
[]
no_license
$(document).ready(function() { var monthArr = []; var trainTolAmount = []; var joinTolAmount = []; var tolAmount = []; var guestTolAmount = []; var pieCleanerAmount = 0.0;//保洁员 var pieSisterAmount = 0.0;//育儿嫂 var pieNannyAmount = 0.0;//保姆 var pieMaternityAmount = 0.0;//月嫂 var pieOtherAmount = 0.0;//其...
true
d3cec66c0c0759010c791700762154b9917c930a
JavaScript
Edson-Menezes/petShop-node
/index.js
UTF-8
1,400
2.8125
3
[]
no_license
const http = require("http"); const url = require("url"); const petshop = require("./petshop"); const server = http.createServer((req, res) => { res.writeHead(200, { "Content-Type": "text/plan; charset=UTF-8"}); let urlCompleta = url.parse(req.url, true); let queryString = urlCompleta.query; let rota = urlCompleta.p...
true
65ac2be3242beb30de6dd55368721e5a57cc3a4d
JavaScript
w74/snapback
/client/templates/dbtable.js
UTF-8
2,359
2.515625
3
[]
no_license
var DBCOUNT = new ReactiveVar(0); Session.set('cphoto', null); Template.dbtable.helpers({ // The count here is implmented mainly as a method to see whether an add or delete call was fulfuilled ct(){return DBCOUNT.get();}, photo(){return Session.get('cphoto');} }); Template.login.events({ /** * [On login page, ...
true
5c96402006360a5773d8abcba0d656b77d276d6e
JavaScript
Dearkano/leetcode
/1143. Longest Common Subsequence.js
UTF-8
530
3.515625
4
[]
no_license
/** * @param {string} text1 * @param {string} text2 * @return {number} */ var longestCommonSubsequence = function (text1, text2) { const m = text1.length; const n = text2.length; const dp = new Array(n + 1).fill(0); let pre = 0; for (let i = 1; i <= m; i++) { pre = 0; for (let j = 1; j <= n; j++) ...
true
243083099e27d61eac9fe060aeabfe41c88969a4
JavaScript
ahmedboudhina/REST_API
/src/JS/reducers/errorReducer.js
UTF-8
464
2.59375
3
[]
no_license
import { GET_ERROR, CLEAR_ERROR } from "../constants"; const initialeState = { msg: {}, status: null, id: null, }; const errorReducer = (state = initialeState, action) => { switch (action.type) { case GET_ERROR: return { msg: action.payload.msg, status: action.payload.status, id: action.payload.id }...
true
6383b978fd65968ced3c878917de56810d8e3691
JavaScript
sheshiru/lab-javascript-basic-algorithms
/starter-code/basic-algorithms.js
UTF-8
1,434
4.28125
4
[]
no_license
// Names and Input console.log("I'm Ready!"); var hacker1 = "Ismaël"; console.log("The driver's name is " + hacker1); var hacker2 = prompt("What's the navigator's name?"); console.log("The navigator's name is " + hacker2); if (hacker1.length > hacker2.length) { console.log( hacker1 + "has the longest name, it h...
true
c307dd6369efb1bb8b09e26aeafa744affa86404
JavaScript
claudiaps/TCC
/TCC_2/code/boxPlotFrequency/frequencyLabel.js
UTF-8
1,103
2.78125
3
[]
no_license
var moment = require('moment'); function openFile() { return require('../data/data_github_nextCloud_updated.json'); } // function getClosedIssues() { // const file = openFile(); // const { repos } = file; // const { nextcloud: repoName } = repos; // const { issues } = repoName; // return iss...
true
c775a7526ccd2deea9053e89249efaea2cf24066
JavaScript
xpaweee/FrontendExamples
/ExchangeCalculator/script.js
UTF-8
733
3.015625
3
[]
no_license
const currenctEl_one = document.getElementById('currenct-one'); const currenctEl_two = document.getElementById('currenct-two'); const amountEl_one = document.getElementById('amount-one'); const amountEl_two = document.getElementById('amount-two'); const rateEl = document.getElementById('rate'); const swap = document.ge...
true
974cd321d07d822be2001898c60c4a29c675387f
JavaScript
nata-rojas/Informatica-2L
/Pagina con contador/contador.js
UTF-8
387
3.28125
3
[]
no_license
let visitas = localStorage.getItem("visitas") console.log(visitas) let contar = 0 let contado = localStorage.getItem("contado") console.log(contado) if (contado == null) { localStorage.setItem("contado", 1) } else { contar = parseFloat(contado) + 1 console.log(contar) localStorage.setItem("contado", co...
true
f7d3618be7a4ee56b28762337d7b475a6735ec6e
JavaScript
black-codher-bootcamp-2021-vaughan/command-line-and-git-assessment-iriahbee
/.autograding/setup.js
UTF-8
2,319
3.125
3
[]
no_license
const fs = require('fs'); const path = require('path'); const readline = require('readline'); const { exec } = require("child_process"); const cleanPath = resolvePath('./output.txt'); /** * Tests if a file exists * @param {string} filePath * @returns */ function fileExists(filePath) { try { return fs.exist...
true
0536322bc633daa18ec3f21a0eef13afb6a3cbdd
JavaScript
swc-project/swc
/crates/swc_ecma_minifier/tests/terser/compress/reduce_vars/for_in_prop/output.mangleOnly.js
UTF-8
133
2.515625
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
var o = { foo: function() { for(this.b in [ 1, 2 ]); } }; o.foo(); console.log(o.b);
true
ebb0e5939eb792d75998e1301752b30a9e97aab5
JavaScript
luandryl/monitor_api
/src/controllers/Auth.Controller.js
UTF-8
1,980
2.515625
3
[]
no_license
/** * AuthController handle with login and signup process. * @module AuthController */ 'use strict' import User from '../models/User.Model' import config from '../config/jwt' import jwt from 'jsonwebtoken' import HashPassword from '../services/HashPassword' export default class AuthController { signup (req, res)...
true
cd98f7ee03933ecb2ddd7d0473671b83fb52b78d
JavaScript
Daniel1984/fp-parcel-space-invaders
/src/actors/enemies.js
UTF-8
315
2.671875
3
[]
no_license
import Rx from 'rxjs/Rx'; const ENEMY_COUNT = 1500; export default canvas => ( Rx.Observable.interval(ENEMY_COUNT) .scan((enemyArray) => { const enemy = { x: parseInt(Math.random() * canvas.width), y: -30, }; enemyArray.push(enemy); return enemyArray; }, []) );
true
c4c59da6fb6b4296a568f66ce2fca6a63b4854d5
JavaScript
polyakov-artem/redux-quiz
/src/store/actions/quizListPageActions.js
UTF-8
865
2.609375
3
[]
no_license
import axios from '../../axios/axios'; import { QUIZ_LIST_LOADING_STARTED, QUIZ_LIST_SUCCESS, QUIZ_LIST_ERROR, } from '../actionTypes/actionTypes'; export function getQuizList(){ return async function(dispatch){ dispatch(quizListLoadingStarted()); try{ const response = await axios.get('/quizes.js...
true
e14f930f182e64dd8356de53a81ee74afa4b9690
JavaScript
2joom/2joom
/b_example/b_basic/js/src/jquery_on_01.js
UTF-8
4,350
2.828125
3
[]
no_license
// jquery_on_01.js (function($){ /* var h1 = document.getElementsByTagName('h1')[0]; h1.style.backgroundColor = '#f55'; h1.style.height = 150; h1.style.color = '#fff'; */ var h1 = $('h1'); $('h1').animate({backgroundColor:'#f55',height:70, padding:'1rem'},500,'easeInOutBounce'); var btnUl = $('.btn_area...
true
421ecd386d05d22f549a12314e519d49213408fe
JavaScript
surajpatidar6647/surajpatidar
/javascript/on page loading/myjavascript.js
UTF-8
1,509
3.8125
4
[]
no_license
//print all scores /*var scores=[10,13,0,120,89,55,60,22,0,100] for (var i=0; i<scores.lenth; i++) console.log(scores [i]); */ // print how many century and half century and 0(zero) in this variable /* var scores=[10,13,0,120,89,55,60,22,0,100] var c=0, hc=0, z=0; for (var i=0; i<scores.lenth; i++) */ // sort...
true
23f836b3aa1bc0bf86844aaae307c6a9c801637f
JavaScript
Mustafa-Filiz/Weather-Forecast-Website--React
/src/App.js
UTF-8
4,000
2.546875
3
[]
no_license
import './App.css'; import React, { useState, useEffect, useRef } from 'react'; import axios from 'axios'; import LineChart from './components/LineChart'; import Card from './components/Card'; import SearchArea from './components/SearchArea'; import ResultArea from './components/ResultArea'; import LoadingPage from './...
true
144fb5232e4f3d94c453adba887a2d30e13f0b30
JavaScript
ArjithaVivekanandan/Call-Back-HELL
/script.js
UTF-8
1,807
2.6875
3
[]
no_license
var time=10; var counter=document.createElement("P"); counter.setAttribute("class","h1 text-center text-primary") setTimeout(()=>{ counter.innerHTML=time; document.body.append(counter); time--; setTimeout(()=>{ counter.innerHTML=time; time--; ...
true
c94ef758ad1eecea2fb25cd1b13bb45e6b0097ca
JavaScript
kip-guile/node-api1-project
/index.js
UTF-8
2,863
2.921875
3
[]
no_license
// implement your API here const express = require('express') const cors = require('cors') const db = require('./data/db') const server = express() server.use(cors()) server.use(express.json()) server.put('/api/users/:id', updateUser) server.get('/api/users/:id', findUser) server.delete('/api/users/:id', deleteUse...
true
66e0d658bd35d68d0c541ac36b30b0494d0cfa5e
JavaScript
kugared94/milestone-3-project
/static/js/upload.js
UTF-8
725
2.765625
3
[]
no_license
$(document).ready(function(){ function encodeImageFileAsURL() { var filesSelected = $("#image").prop('files'); if (filesSelected.length > 0) { var fileToLoad = filesSelected[0]; var fileReader = new FileReader(); fileReader.onload = function(fileLoadedEvent) { ...
true
947f68f96a81382ba3a80ffd5539b49c6f365f4f
JavaScript
JWolf82/Exercise5_Week2
/script.js
UTF-8
648
2.828125
3
[]
no_license
var profile = document.getElementById("profilePic"); profile.addEventListener('click', function(){ profile.innerHTML = "<img src='http://dn0.iconfinder.com/data/icons/iconshock_guys/512/andrew.png'>" }); var nameInfo = document.getElementById("names"); nameInfo.addEventListener('click', function(){ nameInfo.i...
true
a8691b92fd6a08e1da118bb320756d8bf6446307
JavaScript
michaldziadon/michaldziadon.github.io
/kurs_wrzesien/17.10.2020/jq_examples/js/4-each-find.js
UTF-8
513
2.90625
3
[]
no_license
$(document).ready(function(){ // tutaj dla konkretnego // $(`ul`).each(function(index){ // console.log(index); // //tutaj przesunie kazdy o 10px // $(this).css(`margin-left` , 10 * index + `px`); // }); //tutaj dla wszytskicj U $(`ul`).each(function(index){ $(this).fi...
true
a3ae4eed4cda71aecdf9085f98149ce79ef62b18
JavaScript
Emilius77/HTML-CSS3
/public_html/Lez13_Ajax_2_img/indexjs.js
UTF-8
1,192
2.640625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ $("#slideshow").data("fotoCorrente",-1); function mostraFotoSuccessiva() { var fotoCorrente = $("#slideshow").data("fotoCorrente"...
true
9582d71c40eebe54cd2bd96cfacde87c267fedc5
JavaScript
lacha156/week2CodingAssignment
/loops.js
UTF-8
931
4.53125
5
[]
no_license
// 6A var i = 0 while (i <= 100){ console.log (i); i += 2; } // 6B b. A while loop that prints every 3rd number going backwards from 100 until we reach 0 var i = 100; while (i >= 0){ console.log(i); i = i - 3; } // 6C. A for loop that prints every other number from 1 to 100 for (var i = 1; i < 10...
true
03897e1ff4203d190283c59bae0a631dbe5371ff
JavaScript
Rahat47/fokira-bank-updated
/assets/js/app.js
UTF-8
3,809
3.65625
4
[]
no_license
'use strict' // new notification snackbar // this pops a new snackbar notification at the top class Snackbar { constructor() { this.snackbar = document.createElement('div') } init() { this.snackbar.classList.add('snackbar') document.querySelector('body').appendChild(this.snackbar) ...
true
dc847cdb988a29b57e2ccf865bf101f27427d356
JavaScript
A-EYE-Team/swagger-docs
/src/app/operation/operation.controller.js
UTF-8
1,086
2.71875
3
[ "MIT" ]
permissive
'use strict'; SwaggerDocs.controller('OperationCtrl', function OperationCtrl($rootScope, $scope, $stateParams) { /* * Determines if this operations should be highlighted * * @param operationName {string} * * @return {boolean} - true if this operation should be highlighted */ $scope.shouldHighlig...
true
3c1d1645f095a6040db6d8375270580e86890a40
JavaScript
coolinmc6/babbles-no-redux
/src/lib/babbleHelpers.js
UTF-8
1,153
3.453125
3
[]
no_license
export const generateID = () => Math.floor(Math.random()*1000000); export const timeStamp = () => { const monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; const date = new Date(); const day = date.getDate(); con...
true
015ee775d215b10332e454a00f560dd6f2bb3a94
JavaScript
dldygks1408/Js_study
/l41_nodejs_http.js
UTF-8
905
3.265625
3
[]
no_license
// require('http') import와 동일한 역활로 nodejs가 기본으로 가지고 있는 api를 import 한다. // 서버 언어는 http 객체를 배우는 것을 의미 // jsp를 배운다는 것은 java 기반의 http 객체를 배운다. // http를 이루는 가장 중요한 객체는 request, respones이다. // 서버언어에서 가장 중요한것은 사용자의 요청(request)에 따라 서버가 응답(response)을 다르게 하는 것이다. // 응답을 다르게 하기 위해 db에 내용을 요청에 따라 바꾸는 것이 백엔드가 하는 일이다. const htt...
true
1941dff5013405ea2fe6d8438ecdd865d1c0312a
JavaScript
nbili/is-sorted-ts
/dist/is-sorted-ts.js
UTF-8
453
2.953125
3
[ "MIT" ]
permissive
"use strict"; function defaultComparator(a, b) { return a - b; } function checksort(array, comparator) { if (!Array.isArray(array)) throw new TypeError('Expected Array, got ' + (typeof array)); comparator = comparator || defaultComparator; for (var i = 1, length = array.length; i < length; ++i) ...
true
d2ee5191c6cd43f867f1f64d4350a38d4827c81b
JavaScript
viraj2002/WeatherReport
/server.js
UTF-8
1,207
2.640625
3
[]
no_license
require('dotenv').config({ path: 'config.env' }); const express=require("express"); const app=express(); const bodyParser=require("body-parser"); const https=require("https"); app.use(bodyParser.urlencoded({extended:true})); app.use(express.static("public")); app.get("/",function(req,res){ res.sendFile(__dirname...
true
52a44944d5e527e318b33a5d66c20197f1b3a620
JavaScript
PaoloLongatoJayway/aws-sam-hello-world
/lambdas/pass_message/index.js
UTF-8
648
2.53125
3
[]
no_license
'use strict'; const parseEvent = require('./parse-event'); const createLocation = require('./create-location'); const response = require('./response'); exports.handler = function(event, context, callback) { switch (event.httpMethod) { case 'POST': { const message = parseEvent(event); ...
true
e63a3b9ac35304ca22b46b5a6399a1999acca2f9
JavaScript
YahtzeeMaster26/idle3.html
/js/utils.js
UTF-8
1,132
3.234375
3
[]
no_license
"use strict" const D = Decimal const nD = x => new D(x) D.prototype.mod = function(x) { return this.minus(this.div(x).floor().times(x)) } function format(input, f = 2) { const x = nD(input) if (x.gte("eeee10")) return `10^^${format(x.slog(), 4)}` if (x.lt("1e4")) return x.toFixed(f) let exponent = x.log10().flo...
true
186ad10172394dcdb68e2edec51dfa5567393b3d
JavaScript
vinodh1988/react-client-redux
/src/Redux/actions/actionTriggers.js
UTF-8
715
2.578125
3
[]
no_license
export const loginTrigger = (userCredentials)=>{ return { type: "PERFORM_LOGIN", data: userCredentials } } export const resourceTrigger = ()=>{ return { type: "RESOURCE_TRIGGER" } } export const filterResources =(resources,skill)=>{ console.log(resources,skill) if(skill=="")...
true
91bf9566a0ddd449fb1f210239df48f1ea261456
JavaScript
neu-self-image-experiments/sie-firebase
/src/firebase/api/users.js
UTF-8
7,780
2.71875
3
[ "MIT" ]
permissive
import { firestore, auth } from '../firebase'; import { StatusCodes } from 'http-status-codes'; import { firestoreCollections as collections } from '../constants'; // ============ SIGN UP ============= // How to sign up a user: // 1. call signUp to register user to firebase.auth() // 2. signup will call generateUser...
true
6d86090c9ba64af14ef5d86a4da9d222b7c00ff7
JavaScript
jnthnch/n-queens
/src/solvers.js
UTF-8
3,676
3.453125
3
[]
no_license
/* _ ___ ___ | |_ _____ _ __ ___ / __|/ _ \| \ \ / / _ \ '__/ __| \__ \ (_) | |\ V / __/ | \__ \ |___/\___/|_| \_/ \___|_| |___/ */ // hint: you'll need to do a full-search of all possible arrangements of pieces! // (There are also optimizations that will allow you to skip a lot of the dead s...
true
21bec6096541d41842f44b59acd83b8e9200c377
JavaScript
mateuslsilva28/CursoWebModernoComJavaScript2019Completo
/05-Arrays/87-VisaoGeral.js
UTF-8
766
3.9375
4
[]
no_license
//Array em JS é um objeto //Não existe array nativo em js console.log(typeof Array, typeof new Array, typeof []) let aprovados = new Array('Bia', 'Carlos', 'Ana') console.log(aprovados) aprovados = ['Bia', 'Carlos', 'Ana'] console.log(aprovados[0]) console.log(aprovados) aprovados[3] = 'Paulo' aprovados.push('Abia')...
true
cf7829f7c508e7c9a05e56aba21538c2f73f2b9f
JavaScript
lesson2017/lesson
/node.js/project/221/module/db_mysql_pool.js
UTF-8
1,888
2.625
3
[]
no_license
/** * @author : by Ghost * @date : 2017/2/21 * @description : * */ /** * @author : by ghost * @date : 2016/12/07 * @description : node.js连接mysql,连接池的使用方式 */ var mysql = require('mysql'); var pool = mysql.createPool({ host : "localhost", user : "root", password : "admin", port : '3306', data...
true
ff18e31ada55a42f8979eebf383891b9a4bbde4d
JavaScript
fiveoclockshadow/election-night
/client/public/js/data.js
UTF-8
4,870
2.875
3
[]
no_license
(function(){ "use strict"; window.election = window.election || {}; // console.log("I am in data.js"); ////Creation of Object candidate with it's properties $(".formCrtCand").on("submit", function CreateCand(event){ event.preventDefault(); var candidate = { name: $("#new-name").val(), imag...
true
c729268a8d1eb033ccca1c57c9abc66170933da2
JavaScript
mredmundto/subclass-dance-party
/spec/blinkyDancerSpec.js
UTF-8
1,157
2.734375
3
[]
no_license
describe('mario', function() { var mario, clock; var timeBetweenSteps = 100; beforeEach(function() { clock = sinon.useFakeTimers(); mario = new Mario(10, 20, timeBetweenSteps); //mario = makeMario(10, 20, timeBetweenSteps); }); it('should have a jQuery $node object', function() { expect(mar...
true
0dd3c51f021286b7cd5862277405d08c3591dc83
JavaScript
ganorberg/algorithms-javascript
/stacks-and-queues/stack-via-queues.js
UTF-8
1,664
4.3125
4
[ "MIT" ]
permissive
/* Implement a MyStack class which implements a stack using two queues. * * My assumptions: * - no capacity on any structure * - methods of interest are push, pop, size, peek * - push should return true * - pop may be called on empty queue, and undefined will be returned */ // Could make linked list to trade in...
true
2e2861b32d02daa6c87bfd18edecc889eb8d858d
JavaScript
Deepthiv286/JavaScript
/DataStructures/hashingFunction.js
UTF-8
4,177
3.671875
4
[]
no_license
/**************************************************************** * * Execution :Default node cmd>node hashingFunction.js * Purpose :To create a slot of 10 to store chain of numbers that belong to each slot to * efficiently search a number from a given set of number. * * @description * ...
true
4b0f2e58f54eb23e1ba05c1bbaddf3efecc3d55c
JavaScript
Ciervos/PracticaStartUp
/src/components/LocalEjercicio/index.js
UTF-8
781
2.984375
3
[]
no_license
import React, { useState } from "react"; function LocalEjercicio() { const [inputValue, setInputValue] = useState(""); const [locals,setLocals] = useState(""); function save() { localStorage.setItem("inputValue", inputValue); } function read() { let algo = localStorage.getItem("inputValue"); se...
true
be53c112fcd66ca113b46f49c114901a11e41b0f
JavaScript
MRSS02/flexbox-activity
/script.js
UTF-8
5,145
3.015625
3
[]
no_license
let onRRpage = false function enviar(x) { alert(`Sua ${x} foi enviada!`) } function buttonUpdate(tela) { document.title=tela; function branco(botao) { botao.className = `button`; } [...document.getElementsByName("button")].forEach(branco); document.getElementById(tela).className += ` selected` ...
true
759cc3c32f81c6a1f0b5305e3a4486f237f1fafc
JavaScript
open-abbott/peril
/lib/peril.player.js
UTF-8
2,689
3.03125
3
[]
no_license
module.exports.create = function ( options ) { return new Player( options ); }; function Player( options ) { this.game = options.game; this.client = options.client; this.color = options.color; this.cards = []; this.startingArmies = 0; this.armies = 0; switch ( options.playerCount )...
true
062324f473d9d687731d5428834dd5c617be9ded
JavaScript
tuanht/js-crawl
/test/utils-test.js
UTF-8
3,042
2.78125
3
[]
no_license
/** * Unit test for functions in utils.js */ module("utils.js"); /** * Test `getLocationFromUrlString` function with "https://www.google.com.vn/" * as param */ test('getLocationFromUrlString("https://www.google.com.vn/")', function() { var location1 = getLocationFromUrlString("https://www.google.com.vn/"); ...
true
d6248000a849a44f655efd95cfab592ee70f6845
JavaScript
eoja82/Mine-Sweeper
/public/login.js
UTF-8
8,659
2.59375
3
[]
no_license
const loginModal = document.getElementById("loginModal"), noAccount = document.getElementById("noAccount"), loginForm = document.getElementById("loginForm"), navLogin = document.getElementById("navLogin"), navLogout = document.getElementById("navLogout"), navCreateAccount = document.getEle...
true
370aff0289cbcd6c51fb08033d840262cd0fbefe
JavaScript
myindexlike/mform
/js/bootstrap.validate.ru.js
UTF-8
2,612
2.671875
3
[]
no_license
/** * Bootstrap validate * Russian lang module */ $.bt_validate.fn = { 'required' : function(value) { return (value != null) && (value != '')}, 'email' : function(value) { return /^[a-z0-9-_\.]+@[a-z0-9-_\.]+\.[a-z]{2,4}$/.test(value) }, 'www' : function(value) { return /^(http:\/\/)|(https:\/\/)[a-z0-9\/\.-...
true
479271ee5e3b3ab90b9972d986b09e651ddeba41
JavaScript
JamieBort/LearningDirectory
/JavaScript/CodingChallenges/LeetCode/0523ContinuousSubarraySum/attempt02.js
UTF-8
1,156
3.890625
4
[]
no_license
// attempt02.js // // Example 1: // // Input: nums = [23,2,4,6,7], k = 6 // // Output: true // // Explanation: [2, 4] is a continuous subarray of size 2 whose elements sum up to 6. // const nums = [ 23, 2, 4, 6, 7 ]; // const k = 6; // // Example 2: // // Input: nums = [23,2,6,4,7], k = 6 // // Output: true // // Exp...
true
d84bc02fc3382ee4c12c0f339d63bc686d513770
JavaScript
SCbaris/Psychic-Game
/assets/javascript/game.js
UTF-8
2,618
3.640625
4
[]
no_license
var hak=9, win=0, lose=0, correct=0, sel, userChoise, compGuess, count=-1, guessList=[]; var wintext = document.getElementById("win-text"); var losetext = document.getElementById("lose-text"); var haktext = document.getElementById("hak-text"); var guessListText = d...
true
2bef5860a512b0192817913a7b4ebe9c0feb9d11
JavaScript
TirzahMJ/dftl
/DontforgettheLyrics/script.js
UTF-8
607
2.53125
3
[]
no_license
function valid() { cor = "0" incor = "0" test0 = document.myform.elements[0].value; test1 = document.myform.elements[1].value; if (test0.toLowerCase() == "live") { ++cor; } else ++incor if (test1.toLowerCase() == "cry") { ++cor; } else ++incor alert("you got " + cor + " right\n And you got " + incor + " wrong. You got ...
true
ed0a6fa10665265098768c00a993414ec95e928d
JavaScript
brandya101/liri-node-app
/node-homework/liri.js
UTF-8
1,553
3.03125
3
[]
no_license
require('dotenv').config(); var a= process.argv[2]; var b = process.argv[3]; //If else statements to get first item if(a === "my-tweets"){ var twitter = require("twitter"); var client = new twitter({ consumer_key: process.env.TWITTER_CONSUMER_KEY, consumer_secret: process.env.TWITTER_CONSUMER_SECRET, acc...
true
a8dd081b185404ba8a9e753c3db8ee5d2133009e
JavaScript
VinodKumar424/Typescript
/Arrowfunctions.js
UTF-8
403
3.671875
4
[]
no_license
var Print = function () { return console.log("hello type Script"); }; Print(); //numbers var Print1 = function (x, y) { return console.log("sum is " + (x + y)); }; Print1(5, 3); //strings var Print2 = function (x, y, z) { return console.log("Company is " + (x + y + z)); }; Print2("Glory", "Auto", "Tech"); //operation v...
true
3260c6792017a1135e9c07468f1b177a97c5f29d
JavaScript
kennethcurrie/demos
/1week/3day/01-closure.js
UTF-8
234
3.28125
3
[]
no_license
function outer() { let a = 5; let b = 20; return (newValue) => { if (newValue) { a = newValue; } return a; } } let inner = outer(); console.log(inner()); console.log(inner('hello')); console.log(inner());
true