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
320fae09e874c326074a6391cffd9a219767040b
JavaScript
imjul1an/bidding.client
/app/scripts/services/dataService.js
UTF-8
600
2.546875
3
[ "MIT" ]
permissive
'use strict'; angular .module('clientbiddingApp') .service('dataService', dataService); dataService.$inject = ['$http', '$rootScope']; function dataService($http, $rootScope) { var config = window.config; return { getItem: getItem, }; function getItem (id) { return $http.get(config.api + '/auction/...
true
a767b164d04e107dcdca51018752b62c6ef21fba
JavaScript
gontztech/CursoIngresoJS
/6-InstruccionFor/jsIteracionesFor (3).js
UTF-8
211
2.515625
3
[]
no_license
function mostrar() { var repeticiones = prompt("ingrese el número de repeticiones"); for(repeticiones =1; repeticiones++ ; ){ if (repeticiones >1){ alert ("Hola UTN FRA");} } }//FIN DE LA FUNCIÓN
true
a8a429bd7077df8753f1588d5890829089d96467
JavaScript
jonathan-d-martin/pharcoder-mobile
/src/client/components/SyncInterface.js
UTF-8
2,542
2.53125
3
[]
no_license
/** * SyncInterface.js * Client side */ 'use strict'; var UPDATE_QUEUE_LIMIT = 8; module.exports = { init: function () { var self = this; this.registerField('type', 'string'); this.knownBodies = {}; this.events.on('sync', deserializeWorld.bind(this)); } }; var deserializeWo...
true
3f7ac2c94a04071f036777be0b6f1d614c60aba2
JavaScript
inappcloud/stack-next
/test/func.js
UTF-8
1,340
2.796875
3
[]
no_license
'use strict'; let assert = require('assert'); let test = require('mocha').test; let stack = require('..').stack; let fn = require('..').fn; function eq(actual, expected, done) { try { assert.equal(actual, expected); done(); } catch(e) { done(e); } } let func = fn({ name: 'addOne', args: { v...
true
e897e0a3e3be5ba42195f4cb550327a83be4601b
JavaScript
chojooyoung/vanilla-js
/day3_module2_todolist/todoCount.js
UTF-8
686
2.65625
3
[]
no_license
import {checkArrayType,checkKeyword} from "./validator.js" export default function TodoCount ({$target, initialState}) { const $todoCount=document.createElement('div') $target.appendChild($todoCount) checkKeyword(new.target,TodoCount) this.validate = state=>{ checkArrayType(state); ...
true
3d736c98e8a7c9aff21af0879ee6522aec3140df
JavaScript
amit3512/ramkumarpradhan
/client/src/components/Main.js
UTF-8
5,552
2.6875
3
[]
no_license
import CreateUser from './CreateUser'; import UpdateUser from './UpdateUser'; import {useDispatch} from 'react-redux'; import React, { useState, useEffect } from 'react'; import {addUser, addUsers, updateUser, updateUsers} from '../actions/userActions'; import axios from 'axios'; import {Redirect} from 'react-router-do...
true
88a1623d91400e2c578abf65c660b9b543ba1f7a
JavaScript
Uerica/course_JavaScript
/js-new-practice/javascript_function/Array/array_forEach.js
UTF-8
1,310
4.6875
5
[]
no_license
//>>forEach() 方法會將陣列內的每個元素跑一遍 //會傳入elem,index,array三個參數 const arr =[1,2,3]; arr.forEach((elem,index,array) => console.log(elem,index,array));//1 0 [ 1, 2, 3 ] //2 1 [ 1, 2, 3 ] //3 2 [ 1, 2, 3 ] //copy陣列 //以前用for迴圈慢慢存 let arr1 = ['a','b','c']; let arr2 = []; for(let i=0; i<arr1.length; i++){ arr2.push(arr1[i]);...
true
f6e66ee8298991e4119a930b7251b15de2bca60b
JavaScript
AnnaBalab/AnnaBalab.github.io
/js/components/header.js
UTF-8
8,168
2.578125
3
[]
no_license
var headerSliderBlock = document.getElementById('headerSliderBlock'); var headerBlock = document.getElementById('headerBlock'); var headerMenuBlock = document.getElementById('header__menuBlock'); var headerAboutProductsContainer = document.getElementById('headerAboutProductsContainer'); var headerBakeryHeading = docume...
true
e4926f6b4e43f3b9198f12a711c2ecdd98bca332
JavaScript
RobertBarachini/SP_ST1
/app_client/services/posts.services.js
UTF-8
1,799
2.515625
3
[]
no_license
(function(){ function aggAppPosts($http, auth) { function getPosts(){ return $http.get("/api/posts") }; function getPostByID(id){ return $http.get("/api/posts/" + id) }; function addPost(title,owner,body,description,hashtags,likes,dislikes,comments){ return $http.post("/api/posts...
true
731cab63487c4c624cbabc920e109be48a21bcb7
JavaScript
lawlorseanr/subclass-dance-party
/src/pulsingDancer.js
UTF-8
975
2.734375
3
[]
no_license
var makePulseDancer = function(top, left, timeBetweenSteps) { makeColorChangeDancer.call(this, top, left, timeBetweenSteps); this.sizeRate = 2; this.sizeLimit = 40; this.size = Math.floor( Math.random() * this.sizeLimit ); this.$node = $('<span class="dancer spinner"></span>'); }; makePulseDancer.prototype ...
true
2573610200fab9bcdc0c75dff5ada09970daf398
JavaScript
digitalant8/7bighas
/console/js/admin-custom.js
UTF-8
244
2.546875
3
[]
no_license
$(document).ready(function(){ var fileurl = $(location).attr('pathname'); var filename = fileurl.substring((fileurl.lastIndexOf("/") + 1), (fileurl.length)); $('ul.nav > li > a[href="'+filename+'"]').parent().addClass('active'); });
true
bf485fa07e02b0f66dfe2b970c089ef105e2dafe
JavaScript
GodsDev/backyard
/src/js/debug.js
UTF-8
2,727
2.921875
3
[ "MIT" ]
permissive
//backyard 1 /*! debug functions v1 */ 'use strict'; //http://stackoverflow.com/questions/7585351/testing-for-console-log-statements-in-ie if(typeof(debugging) === 'undefined') var debugging = true;//or false; // or true function consoleMsg() { if(debugging) { alert(message); } } try { console.lo...
true
3ff13c43ca14a28f7ccc65ecc2df5234f0a6027c
JavaScript
wabawden/Shopping_list
/app/javascript/packs/application.js
UTF-8
1,998
2.515625
3
[]
no_license
// This file is automatically compiled by Webpack, along with any other files // present in this directory. You're encouraged to place your actual application logic in // a relevant structure within app/javascript and only use these pack files to reference // that code so it'll be compiled. require("@rails/ujs").start...
true
c9fade5bfcd25f65fac24e006434e6a7aa1d77b6
JavaScript
bojoyzhou/mm
/js/Edge.js
UTF-8
1,821
2.859375
3
[]
no_license
import EventEmitter from 'events' function createSvgElement(tagname, attr) { let xmlns = "http://www.w3.org/2000/svg" let node = document.createElementNS(xmlns, tagname) for (let i in attr) { if (attr.hasOwnProperty(i)) { node.setAttribute(i, attr[i]) } } return node } ...
true
128af8b4aad84dbfcae9b8bfe31b2e7dd30d4f8e
JavaScript
cburkins/poc-oidc-bare-react-boostrap4
/src/providers/privateRoutePassProps.jsx
UTF-8
1,964
2.59375
3
[]
no_license
///* /src/routes/privateRoute.jsx */ import React from "react"; import { Route } from "react-router-dom"; import { AuthContextConsumer } from "./authProvider"; export const PrivateRoutePassProps = ({ component, ...rest }) => { console.log("start PrivateRoute() component"); // - - - - - - - - - - - - - - - - -...
true
6a85e6ebf3f388a41abee847fa616ce3c5ab5f7c
JavaScript
JayMcGee/Aquarius
/node-bootstrap/public/scripts/Aquarius_UITools.js
UTF-8
709
2.609375
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////// /** * @brief Aquarius_UITools * * @details A collection of function to manage the interface * * @author Jean-Pascal McGee * @date 13 MAY 2015 * @version 1.0 : First Version */ /** * @brief setButtonStatus * @details Funct...
true
6ae0662dac2cd07926e582c33e467e075ec734fc
JavaScript
ranjith093/SalesIcon-CRM-backend-API
/src/utils/mail/beautifyName.js
UTF-8
358
3.171875
3
[]
no_license
function CapitalizeFirstLetter(str){ return str.substring(0,1).toUpperCase()+str.substring(1).toLowerCase() } function beautifyName(name){ const middlename = CapitalizeFirstLetter(name.middlename)+' ' || '' return CapitalizeFirstLetter(name.firstname)+' '+middlename+CapitalizeFirstLetter(name.lastname) ...
true
968ede96103bfc31d8d8e7e31ef15c73766a25de
JavaScript
Lismey23/Project_1
/assets/javascript.js
UTF-8
4,502
3.390625
3
[]
no_license
//initial google sheet api function call to display the content held in the associated google sheet getGoogleSheetData(); function getGoogleSheetData(){ //google sheets API request call var urlSheet = "https://sheets.googleapis.com/v4/spreadsheets/10KzkFG-9gv5m5-PrkunguT3BvJwU8kA01Vi0WOovg_8/values/FormResponse1!A2:...
true
a2d2f1d5d034216290784c8ee72c3e1f4d1d3dc5
JavaScript
yceline-yu/color-boxes-react
/src/BoxList.js
UTF-8
1,003
2.75
3
[]
no_license
import React, { useState } from "react"; import { v4 as uuid } from "uuid"; import Box from "./Box" import NewBoxForm from "./NewBoxForm"; /** BoxList * * Props: * -? * * States: * -state of boxes = [{height, width, background, id}...] * * App -> BoxList -> Box */ function BoxList() { const [boxes, setB...
true
fb8a6ed91daa6e18e2e5f424e00fe5eaa49dee5a
JavaScript
pjanowski2000/Memory-Game-Using-MQTT-AND-HTTP
/main_app_front/src/components/Gameroom.js
UTF-8
6,623
2.625
3
[]
no_license
import React, { useState, useEffect } from 'react'; import Chatroom from './Chatroom.js' import uuidv4 from 'uuid'; const axios = require('axios'); const mqtt = require('mqtt'); const Gameroom = ({ name, usernick, type }) => { const mqtt = require('mqtt'); const [Client, setClient] = useState(mqtt.connect('ws://10...
true
ed4b454d4543b9a2338441ba00d02c063c011169
JavaScript
xiaoRoy/java-script-play-ground
/src/tutorial/intruduction.js
UTF-8
4,007
4.25
4
[]
no_license
/** * A re-introduction to JavaScript (JS tutorial) * https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript */ //Number Math.sin(3.5) var circumference = 2 * Math.PI * 3 var count = + '42' // 42 var countA = + '010' //10 var countB = + '0x10' // 16 var notANumber = parseInt('hello...
true
feefa5019ee482e5e81f9aa5b3998692f831e18c
JavaScript
AMA-Zine/amazine-fe
/src/hooks/threads.js
UTF-8
559
2.640625
3
[]
no_license
import { useState, useEffect } from 'react'; import { getThreads, getThreadById } from '../services/thread-api'; export const useThreads = () => { const [threads, setThreads] = useState([]); useEffect(() => { getThreads() .then(fetchedThreads => setThreads(fetchedThreads)); }, []); return { thr...
true
7c165dc0dab19a7a58915ca32395c21a849989bd
JavaScript
yago-huayta/js-curso
/32-json.js
UTF-8
308
3.015625
3
[ "MIT" ]
permissive
'use strict' // JSON = JavaScript Object Notation var pelicula = { titulo: "Batman vs Superman", year: 2017, pais: "Estados Unidos" }; var peliculas = [ {titulo:"la verdad", year:"2016", pais:"asdfvsdfv"}, pelicula ]; var index; for(index in peliculas){ } console.log(pelicula);
true
f8a6724854b5906a2d51f86a138b033e5caf3d3a
JavaScript
naimsulejmani/aggregate.js
/index.js
UTF-8
1,841
3.03125
3
[]
no_license
export function GroupBy(array, columns) { if (!array.length || !columns.length) return; var array = array; var columns = columns; var retArr = {}; var initialize = function (type) { if (type == 'sum' || type == 'avg') { for (var str of columns) { retArr[str] = 0; } } else if (type == 'min' || type ...
true
76a6b36516fde1bb8e48ce80ab1ff507a940aa79
JavaScript
mgraver/FamilyJornal-
/familyjournal/public/javascripts/Nav.js
UTF-8
1,053
2.65625
3
[]
no_license
function removeRequest(id) { let element = document.getElementById(id); element.parentElement.removeChild(element); } function checkRequests() { if ( $('#requestList').children().length == 0) { $('#requestList').append('<small>You have no requests at this time.</small>'); } } function acceptRequest(id) { remov...
true
96087c4b2d77a655c62afc9ead405043fcb6eebc
JavaScript
KamrulSumon/Front-end
/AngularJS/AngularJS-Projects/VoteGuru/public/services/newPollService.js
UTF-8
887
2.765625
3
[ "MIT" ]
permissive
(function(){ 'use strict'; angular .module('plunker') .factory('newPollService', newPollService); function newPollService(){ return { deleteOption: function(arrayOfOptions, index){ var len= arrayOfOptions.length; if(len-1 !== index){ ...
true
741ce3a1b2ed16e1c744400142938242788e56f9
JavaScript
cnchg/timeago.js
/src/locales.js
UTF-8
990
3.109375
3
[ "MIT" ]
permissive
/** * Created by hustcc on 18/5/20. * Contract: i@hust.cc */ const EN = 'second_minute_hour_day_week_month_year'.split('_'); const ZH = '秒_分钟_小时_天_周_个月_年'.split('_'); const zh_CN = (number, index) => { if (index === 0) return ['刚刚', '片刻后']; const unit = ZH[parseInt(index / 2)]; return [`${number} ${unit}前`, ...
true
d17056fee4b2fb3bdd80fcbbe2bc598088b18e4a
JavaScript
mirlabraga/simons-sweet-shop
/app.js
UTF-8
740
2.734375
3
[]
no_license
const packService = require('./src/shop.service.js'); function readInputParameters() { const args = process.argv.slice(2); console.log(`[INFO] the sweets ordered is ${args}.`); return args; } async function main() { const dataInput = readInputParameters(); try { const result = await packService.getBestP...
true
d3e484b5f58476fc4d9c220ce94c1d4634e2f7ca
JavaScript
lion-ctrl/yummy-frontend-test
/src/components/RegisterForm.js
UTF-8
2,757
2.625
3
[]
no_license
import React, { useState } from "react"; import Map from "./Map"; import PropTypes from "prop-types"; const RegisterForm = ({ setAlert }) => { const [data, setData] = useState({ idCode: "", name: "", phone: "", }); const [location, setLocation] = useState({ lat: "10.48801", long: "-66.87919", ...
true
c15d59be13543af024b4dbbd22ca950bb7cf1f3b
JavaScript
GeorgeBekh/anki-french-conjugations
/get-definitions.js
UTF-8
1,523
2.578125
3
[]
no_license
"use strict"; const sqlite3 = require("sqlite3").verbose(); const request = require("request-promise"); const { promisify } = require("util"); (async function() { const verbs = ( await select( "./test.db", ` SELECT lemme, AVG((freqlemfilms2 + freqlemlivres) / 2) AS avg, ...
true
a02581bb93af00c5fd35664f950a4a0b0d630994
JavaScript
donnydsm001/Todo-List
/TodoList/indexx.js
UTF-8
1,055
3.5625
4
[]
no_license
var btn = document.querySelector('.bouton'); var input = document.querySelector('input'); //var submit = document.querySelector('input[type="submit"]'); var ul = document.querySelector('ul'); function createEvent(){ var li = document.createElement("li"); li.appendChild(document.createTextNode(input....
true
6e7ae89971edbb310393a07f353531b6faaafaf2
JavaScript
visonforcoding/bgq
/webroot/mobile/js/activity_index.js
UTF-8
3,177
2.53125
3
[ "MIT" ]
permissive
var activity = function () { var opt = { page:2 }; $.extend(this, opt); }; activity.prototype.init = function () { var obj = this; this.setDet(); this.bindEvent(); this.scroll(); setTimeout(function(){ obj.getData(); }, 2000); }; activity.prototype.setDet = function...
true
4d8594f44d536faa2d760e35bb395dcf288aa6e7
JavaScript
meowmeowplus/myShop
/api/app/model/product.model.js
UTF-8
3,360
2.890625
3
[]
no_license
const sql = require("./db.js"); // constructor const Product = function(product) { this.title = product.title; this.price = product.price; this.description = product.description; this.category = product.category; this.image = product.image; }; //create new product Product.create = (newProduct, result) => {...
true
5f4e239aa56951f9d126aa622153038fdf1c345c
JavaScript
dsaini17/WebDev
/Assignments/ToDo/todo.js
UTF-8
725
3.421875
3
[]
no_license
window.onload = function () { "use strict"; let btn = document.getElementById('btn'); let result = document.getElementById('result'); let input = document.getElementById('inp'); let value = ""; btn.onclick = function () { //value += `<li> ${inp.value} </li>`; //result.innerHTML ...
true
b68dd9d7db32965235bd43942aaed56415d9b301
JavaScript
ferralucho/Algorithms
/Arrays/longestItem.js
UTF-8
562
4.28125
4
[]
no_license
// longestItem // Takes any number of iterable objects or objects with a length property and returns the longest one. // Use Array.sort() to sort all arguments by length, return the first (longest) one. const longestItem = (...vals) => [...vals].sort((a, b) => b.length - a.length)[0]; longestItem('this', 'is', 'a'...
true
937990e7c5fd79ddb03f9c62020a352b102f25e6
JavaScript
Chakshu12345/e-Comapp
/ecomreact/src/sagaapp/sagas/index.js
UTF-8
2,863
2.890625
3
[]
no_license
import ProductsHttpService from './../../services/catservice'; // import an operator model from redux-saga/effects for managing async calls import { takeLatest, all, call,put } from "redux-saga/effects"; // write a function that will access the service and perform async oepration function fetchDepartments(){ let...
true
2ae8045de75d4cebf394b4572ed75c69490bd3b8
JavaScript
joaoaffonsooliveira/curso-web-moderno-completo-2021
/fundamentos/numerosAlgunsCuidados.js
UTF-8
319
3.234375
3
[]
no_license
console.log(7 / 0); // infinito console.log('10' / 2); // 5 console.log('3' + 2); // 32 console.log('3' - 2); // 1 console.log('Show!' * 2); // NaN console.log(0.1 + 0.7); // console.log(10.toString()); não consegue chamar o literal console.log((10.345).toString(2)); //agora reconhece sim o literal usando parenteses
true
fa9055abeb557f64f981d3a4d4d5ec6c575f5fb9
JavaScript
petyoMitkov/JavaScript
/JSFundamentals - Conditions & Loops/L09. Colorful Numbers.js
UTF-8
1,355
4.65625
5
[]
no_license
/* Colorful Numbers Write a JS function to print the numbers from 1 to n. Return a string holding HTML list with the odd lines in blue and even lines in green. See the example for more information. The input comes as array of one string element, holding the number n. The output should be returned as a result of yo...
true
db5bd6582c4eabb444e23093b1873a13a1f4ffba
JavaScript
Samucarsanti/Back-End-2019
/Ficha1/3.js
UTF-8
991
4.0625
4
[]
no_license
var numero_mes = 12; var resultado = " "; function nmes(numero_mes) { switch (numero_mes) { case 1: this.resultado = "Janeiro"; break; case 2: this.resultado = "Fevereiro"; break; case 3: this.resultado = "Março"; break; case 4: this.resultado =...
true
7c94efae19fb2aae4cf82972f3c3b953c777b986
JavaScript
dev-experiments/react-app
/src/shared/utils/Location.js
UTF-8
716
2.640625
3
[]
no_license
class Location { constructor() { this.urlParameters = ''; } URL() { return window.location.href; } GET(key) { //return } GETALL() { return this.paramsAsJson(); } paramsAsJson() { if (!this.urlParameters) { this.urlParameters = win...
true
24c39a94d41f6c3bd215d46572035eb34c073904
JavaScript
junisan/RequestHandler
/src/Model/User.js
UTF-8
921
2.578125
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
const mongoose = require('mongoose'); const bcrypt = require('bcryptjs'); let userSchema = mongoose.Schema({ id: String, name: {type: String, required: true, unique: true}, email: {type: String, required: true, unique: true}, passwd: {type: String, required: true}, ap: {type: String, required: tr...
true
fd3c1e3f707d86b523506bfe7f606c0bbc433d97
JavaScript
ckaiser258/React-Practice-Code-Challenge
/sushi-saga-client/src/App.js
UTF-8
692
2.765625
3
[]
no_license
import React, { Component } from 'react'; import SushiContainer from './containers/SushiContainer'; import Table from './containers/Table'; // Endpoint! const API = "http://localhost:3000/sushis" let fetchSushi = () => { fetch(API) .then(resp => resp.json()) .then(sushis => { console.log(sushis) }) } cla...
true
fde29ee9054ee18fbd2d1f1fdeb07930764e25ed
JavaScript
dtengtech/localWeather
/main.js
UTF-8
3,044
3.625
4
[]
no_license
let latitude; let longitude; let tempC; let tempF; function geoFindMe() { if (!navigator.geolocation){ output.innerHTML = "<p>Geolocation is not supported by your browser</p>"; return; } function success(position) { latitude = position.coords.latitude; longitude = position.coords.longitude; ...
true
4d88c4c2f42fed88baa6491f6e9f088f0697cbf6
JavaScript
hannahbates/innocent-application
/js/main.js
UTF-8
2,439
2.75
3
[]
no_license
/*! * Igneosaur JavaScript Library v1 * http://igneosaur.co.uk/ * * Copyright 2013 Igneosaur * Released under the MIT license * * Date: Mon Jul 01 2013 */ (function ($) { 'use strict'; /*jslint browser: true*/ /*global $, jQuery*/ /* Vars */ var smoothiesData = [], activeSmoothie =...
true
b51a20264f7ed93ccca903504629ab7800deff0f
JavaScript
ShaumikRahman/css-todo-app
/js/extension.js
UTF-8
2,590
3.140625
3
[]
no_license
let setting; if (localStorage.getItem('setting').length == 0) { setting = 'all'; localStorage.setItem("setting", JSON.stringify(setting)); } else { setting = JSON.parse(localStorage.getItem('setting')); } const trackerButtons = document.querySelectorAll('.tracker-button'); checkBlue(); trackerButtons.forEach(b...
true
75c2a1e3935bd6352f1e57f82ad4606931fca412
JavaScript
crowdedjs/behavior-tree-js
/src/Node/ParallelNode.js
UTF-8
1,732
3.15625
3
[ "MIT" ]
permissive
import BehaviorTreeStatus from "../BehaviorTreeStatus.js"; /** * Runs child's nodes in parallel. * * @property {string} name - The name of the node. * @property {number} requiredToFail - Number of child failures required to terminate with failure. * @property {number} requiredToSucceed - Number...
true
b5cfb6becce4d173f81e79c32145b522e948f7de
JavaScript
AustinScott3573/theonequiz
/javascripts/AugmentedIIFE.js
UTF-8
227
3
3
[]
no_license
var FruitMaker = (function(fruitMaker) { fruitMaker.slices = function(name, number) { var fruitSlices=[]; for (var i=0; i<number; i++) { fruitSlices.push(name); } return fruitSlices; }; })(FruitMaker);
true
02e77d6044de45738f3de785625a852bb5d252fa
JavaScript
ScottDikowitz/BenchBnB
/app/assets/javascripts/stores/bench.js
UTF-8
1,338
2.859375
3
[]
no_license
(function(){ var _benches = []; var _marks = []; var CHANGE_EVENT = 'CHANGE'; var BenchStore = window.BenchStore = $.extend( {}, EventEmitter.prototype); BenchStore.all = function(){ //return a shallow copy so consumer cannot mutate original return _benches.slice(0); }; BenchStore.find = functi...
true
c325001f7497e5a080d73df52defabe476e811a0
JavaScript
MatthewGreenspun/MERN-Poll-App
/backend/routes/users.js
UTF-8
2,281
2.65625
3
[]
no_license
const express = require("express"); const router = express.Router(); let User = require("../models/user.model"); router.route("/").get((req, res) => { User.find() .then((users) => res.json(users)) .catch((err) => res.status(400).json("Error: " + err)); }); router.route("/:id").get((req, res) => { ...
true
69198329c358d813afd2be9a36659228b70835ec
JavaScript
chris-topher-d/hackreactor-exercises
/103_getSquaredElementsAtProperty.js
UTF-8
156
3.03125
3
[]
no_license
function getSquaredElementsAtProperty(obj, key) { let numbers = Array.isArray(obj[key]) ? obj[key] : []; return numbers.map(num => Math.pow(num, 2)); }
true
1826e420b014d54810dcecada3331505b24c9384
JavaScript
benthecarman/ln-telegram
/test/commands/test_check_access.js
UTF-8
1,315
2.515625
3
[ "MIT" ]
permissive
const {test} = require('tap'); const checkAccess = require('./../../commands/check_access'); const makeArgs = overrides => { const args = {from: 1, id: 1, reply: () => {}}; Object.keys(overrides).forEach(k => args[k] = overrides[k]); return args; }; const tests = [ { args: makeArgs({from: undefined}), ...
true
72900aa6b893df8636178d6318e2bfbe405f7435
JavaScript
budstamper/assignments
/exercises/es6-skiing/app.js
UTF-8
1,973
3.765625
4
[]
no_license
function collectAnimals(...rest) { // console.log(rest) return rest } collectAnimals("dog", "cat", "mouse", "jackolope", "platypus"); // ["dog", "cat", "mouse", "jackolope", "platypus"] const fruit = ["apple", "pear"]; const sweets = ["cake", "pie"]; const vegetables = ["carrit"]; const food = { fruit...
true
8390608ff65d3479af8f34b10d42817ff20be079
JavaScript
glowingmoth/adams-auto-db-client
/src/components/CustomerUpdate.js
UTF-8
3,512
2.671875
3
[]
no_license
import React, { useState, useEffect } from 'react'; import { Link, useParams, useHistory } from 'react-router-dom'; import Axios from 'axios'; const CustomerUpdate = ({customerDetails}) => { const { id } = useParams(); const history = useHistory(); const initialFormState = { firstName: '', lastName: ''...
true
2c13603d4d78e3a3a88fb61d277b57a25c44fe31
JavaScript
ebkoala/koala
/lib/global_helpers.js
UTF-8
753
3.109375
3
[]
no_license
// chech that the userId owns the documents ownsDocument = function(userId, doc) { return doc && doc.userId === userId; }; round = function(number, decimals) { return Math.round(number * Math.pow(10, decimals)) / Math.pow(10, decimals); }; calculateDistance = function(location){ if (Geolocation.latLng()) { ...
true
7467feeba1903b2312a60346781b1a96330f6adb
JavaScript
nemss/SoftUni-Education
/10.JS Fundamentals/01.JavaScriptSyntax/07.NextDay.js
UTF-8
270
3.46875
3
[ "MIT" ]
permissive
function nextDay(year, month, day){ let date = new Date(year, month - 1, day); date.setTime(date.getTime() + (24 * 60 * 60 * 1000)); return date.getFullYear() + "-" + (date.getMonth() + 1) + '-' + date.getDate(); } console.log(nextDay(2016, 9, 29))
true
152f8113c464c716118709fef13a9e1c018ba2a1
JavaScript
0xClpz/load-balancing-pocs
/node-app/server/index.js
UTF-8
400
2.71875
3
[]
no_license
const app = require('express')() const emojis = ["🔥", "😂", "⚡️", "🎉", "😏", "🎃", "🥖", "🍉"] const randomServerId = () => emojis[Math.floor(Math.random() * emojis.length)] const serverID = `Server ID: ${randomServerId()}${randomServerId()}` app.get('/', (req, res) => { res.send(serverID) }) app.listen(8080, (...
true
039187f251376a115958ad7c2036e82766310f65
JavaScript
emdiet/WebRTCConnection.js
/WebRTCConnectionTest.js
UTF-8
1,065
3
3
[]
no_license
/** * Created by forge on 02.10.2017. */ const connFact = (id, timeout = 1000) => { return new WebRTCConnection( ()=>console.log("c"+id+":open"), ()=>console.log("c"+id+":close"), ()=>console.log("c"+id+":standby"), (message)=>{ console.log("c"+id+": receives...
true
31a9747c1b2fe489e8e69f3c3690bbd5aa653bfc
JavaScript
jnlindsay/nature-of-code
/Mass Steering/sketch.js
UTF-8
352
3.296875
3
[]
no_license
var triganisms = []; function setup() { createCanvas(windowWidth, windowHeight); for (let i = 0; i < 100; i++) { var triganism = new Triganism(); triganisms.push(triganism); } } function draw() { background(0); for (let triganism of triganisms) { triganism.gen(); triganism.average(triganisms); tri...
true
b83800e615186cb14678903800a1347a5c84c72a
JavaScript
Winguweb/a-tu-servicio
/app/assets/javascripts/helpers/numbers.js
UTF-8
640
2.734375
3
[ "MIT" ]
permissive
/** * Url Helper by @mjlescano * Helper to manipulate or work with the url */ ;(function(){ ATSB.Helpers.numbers = { toPercentage: function(value) { return value * 10000 / 100 }, toNOf: function(ref, value) { return Math.max(0,Math.min(10, Math.round(value*10/ref))) }, toNOfTen: functi...
true
777a211db79d1791cb753475835fb251c0e48df3
JavaScript
mizchi/overworld
/lib/overworld/aggregator.js
UTF-8
1,377
2.640625
3
[]
no_license
// This class is real Aggregator instance // but user was given IAggregator var Aggregator = (function () { function Aggregator(aggregator) { if (!aggregator.aggregate && aggregator instanceof Function) this.aggregator = new aggregator(); else this.aggregator = aggregator; ...
true
098c5cc4287eaf1b0e1f0aac2fe085af4f168ee0
JavaScript
thejmazz/UofTBiohacks
/static/src/assets/js/viz.js
UTF-8
4,482
2.890625
3
[]
no_license
import d3 from 'd3' /** * Voronoi graph as an illustration of dividing cells. * @param {string} id the id of the dom element to append the renderer into * @return {none} just calls render() at the end */ export default function(id) { // Create, append, get canvas context const canvas = document.createEleme...
true
bf30103b77adbb56eca516e5d24297a100cc19bb
JavaScript
SConaway/react-native-testfairy
/index.js
UTF-8
16,030
2.546875
3
[ "Apache-2.0" ]
permissive
'use strict'; var util = require("util"); var React = require('react-native'); const findNodeHandle = React.findNodeHandle; const TestFairyBridge = React.NativeModules.TestFairyBridge; let originalFetch = null; class TestFairy { /** * Initialize a TestFairy session with options. * * @param appToken Your key a...
true
f5a77292fb6d21fc23c42a3f2e8a2a67798cd624
JavaScript
Chrisart12/React-TP
/src/redux/calculation/calculationReducer.js
UTF-8
1,698
2.5625
3
[]
no_license
import { GET_NUMBER, RESET_CHOICE, GET_MULTIPLICATION, INCREMENT_SCORE, RESET_ALL } from "./calculationTypes"; const inintialState = { userResponse: 0, numberOne: 0, numberTwo: 0, total: 0, nbrOfQuestion: 2, score: 0 } const calculationReducer = (state = inintialState, action) => { switc...
true
f7b99ef7cbfb2e253655184c3a15fd63efb5fc19
JavaScript
libertyzhao/algorithm-test
/dataStructure/linear_list/MyArray.js
UTF-8
4,480
3.921875
4
[]
no_license
// 动态数组 class MyArray { constructor(capacity = 10) { if (Array.isArray(capacity)) { const arr = capacity; this.data = new Array(arr.length); for(let i = 0 ; i < arr.length ; i++){ this.data[i] = arr[i]; } this.size = arr.length; ...
true
5adde5cf935ac4d320bf3c9ec248d8a9407e4314
JavaScript
vladkornea/codesample
/js/error-handler.js
UTF-8
4,278
2.625
3
[]
no_license
;(function registerWindowErrorHandler() { var MAX_ERRORS_REPORTED = 10 // IE10 does not support const var errorsReportedCount = 0 var previousErrorHandler = window.onerror window.onerror = handleWindowError return // functions below function handleWindowError (messageOrEvent, errorFileUrl, lineNumber, column, ori...
true
88e9537595ed9a4b58ebdfc2322b090a9c063741
JavaScript
akrambichri/qilturoMobile
/reducers/CategoriesReducer.js
UTF-8
594
2.9375
3
[]
no_license
import { FETCH_CATEGORIES, FETCH_CATEGORY_ARTICLES, ATTEMPT_CATEGORIES_REQUEST } from "../actions/categoryActions" export default (state = [], {type,payload}) => { switch(type){ case ATTEMPT_CATEGORIES_REQUEST: return {...state,loading:true} ...
true
d1c4b944221444fff4de481bf52f32c3c9a35287
JavaScript
ngl4/liri-node-app
/liri.js
UTF-8
13,949
2.71875
3
[]
no_license
//read and set any environment variables with the dotenv package require("dotenv").config(); //import keys.js file var keys = require("./keys"); //fs npm var fs = require("fs"); //request npm var request = require("request"); //moment npm var moment = require("moment"); //node-spotify-api npm var Spotify = require("n...
true
c43736d7d2ea9dfe59343a32e7a59c3e600486fd
JavaScript
vladimirangarita/MiPrimeraAplicacionWeb
/MiPrimeraAplicacionWeb/Scripts/Curso.js
UTF-8
6,915
2.796875
3
[]
no_license
window.onload = function () { voz("Bienvenido a la pagina curso"); } listar(); function listar() { $.get("Curso/listarCurso", function (data) { //alert(data); crearListado(["Id Curso", "Nombre Curso","Descripcion"], data); }); } var btnBuscar = document.getElementById("btnBuscar"); b...
true
15fb887c7e8bdfe15d9f062df0bcd9080cbb954f
JavaScript
Itari10/TSP-SPM-2019
/chess-game/src/Components/PlayerBox.js
UTF-8
3,609
2.5625
3
[]
no_license
import React from 'react'; import '../Style/PlayerBox.css'; import Timer from './Timer'; import SurrenderButton from './SurrenderButton'; import {Themes} from "./Square" const PlayerBox = (props) => { return ( <div className={determineClassName()}> <div className={"row"}> <div...
true
385b20d6970a8d56e5d4ace6c5e0e697a31e5508
JavaScript
gpjp-hades/kanon-app
/app/lib/book.js
UTF-8
663
2.734375
3
[ "MIT" ]
permissive
'use strict' class Book { constructor(id, region, author, name) { this.id = id this.name = name this.author = author this.region = region } toString() { return this.author + (this.author?": ":"") + "<b>" + this.name + "</b>" } toHTML() { if (typeof ...
true
0bdeed44228cb33dc459a281db6384c11614c476
JavaScript
altsanz/blissbooker-gh-searcher
/src/client/app/dashboard/dashboard.controller.js
UTF-8
2,005
2.53125
3
[ "MIT" ]
permissive
(function() { 'use strict'; angular .module('app.dashboard') .controller('DashboardController', DashboardController); DashboardController.$inject = ['$q', 'dataservice', 'logger', 'reposPerPage', 'pagesFirstTime', 'ghApiFirstPage']; /* @ngInject */ function DashboardController($q, dataservice, logg...
true
33ae70ec0e8621c80333f87044e238643c6d678a
JavaScript
Ashwin1950/ransom-notes
/script.js
UTF-8
2,852
3.609375
4
[]
no_license
var magazineWords, word, flag1 = 0, notAvail = []; const disp1 = document.getElementById("disp1"); const disp2 = document.getElementById("disp2"); //splitting the magazine text into separate words function splitMagazine(str) { if (!str) { alert("Invalid!!! Don't leave the boxes empty!"); dis...
true
810b0644a4813e146f25c2ce56d83f6ac0834ea7
JavaScript
sdolidze/react-hooks-interval
/src/levels/Level03.js
UTF-8
316
2.671875
3
[]
no_license
import React, { useEffect, useState } from 'react'; // run only once export default function Level03() { console.log('renderLevel03'); const [count, setCount] = useState(0); useEffect(() => { setInterval(() => { setCount(count + 1); }, 300); }, []); return <div>count => {count}</div>; }
true
be6472dc7f89af0f57fe09997f7f9faf68755df8
JavaScript
GregoryBrinkman/scripts
/weather.js
UTF-8
966
2.875
3
[]
no_license
var fetch = require('node-fetch'); fetch("http://w1.weather.gov/xml/current_obs/display.php?stid=KMDH").then((res) => { res.text().then((response) => { // <location> // <station_id> // <latitude> // <longitude> // <observation_time> // <weather> // <t...
true
6d3545854cfd4bf587d6d670a53d4234fba380f5
JavaScript
Abdulrazzak1995/js-exercises-tdd
/II.write-tests/05-get-second-third-smallest/get-second-third.test.js
UTF-8
450
3.25
3
[]
no_license
// example var getsecondthird =require("./get-second-third"); test("Get second third smallest" , function(){ //Arrange var myArray = [90,5,11,8,6]; var unchanged = [90,5,11,8,6]; var expected = [6,8]; //Act var result = getsecondthird(myArray); //Assert expect(result).toEqual(expected); expect(myArray).toEqual(unc...
true
4ffaefcf2227ef04a5bea160cb4b2d1651412c2b
JavaScript
mrhm-dev/react-blog
/app/components/Fimg.jsx
UTF-8
684
2.859375
3
[ "MIT" ]
permissive
// - Import react components import React, {Component} from 'react' // - Import app API import * as FileAPI from 'FileAPI' // - Create Fimg component class export default class Fimg extends Component { // Constructor constructor(props){ super(props) // Default state this.state = { url: '' } // Bind...
true
754838138e32ebbcdc32e5abb0a9938ac8657b3e
JavaScript
LeonardoFurtado/learn-javascript
/fundamentals/numbers.js
UTF-8
1,296
3.96875
4
[]
no_license
const price = 50.0 const price2 = Number('2.1') const price3 = Number('3.0') console.log(price); console.log(price2); console.log(price3); console.log(Number.isInteger(price)); console.log(Number.isInteger(price2)); console.log(Number.isInteger(price3)); const n1 = 9.89 const n2 = 7.75 const total = n1 * 2 + n2 * 3...
true
6a83400159fd325f67626e631ca58398096c42bf
JavaScript
ryanwyllie/moodle-dpl
/src/js/reducers/categoryReducer.js
UTF-8
1,708
2.8125
3
[]
no_license
const initState = { categories: [], fetching: false, fetched: false, loading: [], error: null, }; export default function reducer(state=initState, action) { switch (action.type) { case "FETCH_CATEGORIES": { return {...state, fetching: true} } case "FETCH_CATEGORIES_REJECTED": {...
true
16dcf85a31e3ebc9c87b2d37cf9cdcb7d8a86958
JavaScript
sumedhak27/Skill-Development
/Sd-Project/Website/EntcProject/public/index.js
UTF-8
11,498
2.546875
3
[]
no_license
var config = { apiKey: "AIzaSyBM5QSzk8_ePeLPy0Biq6vXwySVGyYJ1VA", authDomain: "studentdatabase-e40b3.firebaseapp.com", databaseURL: "https://studentdatabase-e40b3.firebaseio.com", projectId: "studentdatabase-e40b3", storageBucket: "studentdatabase-e40b3.appspot.com", messagingSenderId: "55806773...
true
0df0b31a4d94cbfcfb29361d4cca44e192b402a4
JavaScript
patrickw098/Tritone
/frontend/components/modal/create_server.jsx
UTF-8
3,770
2.71875
3
[]
no_license
import React from 'react'; import SearchBox from './search_box'; class CreateServer extends React.Component { constructor(props) { super(props); this.state = { name: "", button: "create", id: null } this.handleChange = this.handleChange.bind(this); this.handleServerSelect = th...
true
4fd947dd6cc8c2fb8ca555bccca6896d0251cef8
JavaScript
gauthamhc/first_react_app
/src/Paraa.jsx
UTF-8
593
2.875
3
[]
no_license
import React from 'react'; function Paraa() { return ( let curTime = new Date(2020, 5, 2, 12); curTime = curTime.getHours(); let greeting = ""; if(curTime >=1 && curTime <12) { greeting = 'Good Morning'; cssStyle.color = 'green' } else if (curTime >=12 && curTime <16) { greeti...
true
3c13817d89b5bd752aebf5581b0148283f57c1de
JavaScript
SheCodesAus/plus-perth-2020-works-on-my-machine-react
/src/Components/EventSummaryCard/EventSummaryCard.jsx
UTF-8
1,217
2.5625
3
[]
no_license
import React from "react"; import { convertDateTime } from "../../Helpers/ConvertDateTime"; import EventTypeTag from "../EventTypeTag/EventTypeTag"; import "./EventSummaryCard.css"; function EventSummaryCard({ event, mentorId }) { const start = convertDateTime(event.event_start); const end = convertDateTime(event....
true
75d9f2693be6c8a318a6c101fb90fc707f19ed69
JavaScript
rlukins/grafprog_2dcar
/src/index.js
UTF-8
5,812
2.65625
3
[]
no_license
import * as THREE from 'three'; import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'; import carModel from './assets/car2.gltf'; import skybox from './assets/skybox.jpeg'; import asphalt from './assets/asphalt.jpg'; class Main ...
true
df7976434498f1a2373720cdd9c6b51b408cd929
JavaScript
JuanFTP/curso_cells
/juan_ftp/js_val_form_01/main.js
UTF-8
759
2.953125
3
[ "MIT" ]
permissive
var email = document.getElementById("mail"); email.addEventListener("keyup", function(event) { if(email.validity.typeMismatch) { email.setCustomValidity("¡Yo esperaba una dirección de correo!"); } else { email.setCustomValidity(""); } }); var form = document.getElementById("novalidate_form...
true
4506c809e32c5ab0cfef2e52e0d5cd20498bf4b6
JavaScript
wang12124468/events
/src/core/Events.js
UTF-8
1,335
2.546875
3
[]
no_license
import { addEventListener } from './addEventListener'; import { asyncDispatchEvent, dispatchEvent, syncDispatchEvent } from './dispatchEvent'; import { removeAllEventListener } from './removeAllEventListener'; import { removeEventListener } from './removeEventListener'; export function Events() { this._liste...
true
b7d95368a5d9cd4273dca18b465a4676ef29200c
JavaScript
trevorspielman/inspire
/app/components/image/image-service.js
UTF-8
345
2.703125
3
[]
no_license
function ImageService() { var url = '//bcw-getter.herokuapp.com/?url='; var url2 = 'http://www.splashbase.co/api/v1/images/random' var apiUrl = url + encodeURIComponent(url2); this.getImage = function getImage(callWhenDone) { $.get(apiUrl) .then(imageRes => { imageRes = JSON.parse(imageRes) callWhenD...
true
142b89b3cb310bffbb6d3e9d647849d134783b95
JavaScript
lyndseybrowning/javascript-design-patterns
/src/promise/promise.js
UTF-8
975
3.015625
3
[]
no_license
const Promise = function() { let completed = []; let failed = []; let status = 'progress'; let data = null; const promise = { done(fn) { completed.push(fn); if(status === 'done') { fn(data); } return this; }, failed(fn) { failed.push(fn); if(status ...
true
32f899c2125505a93fa1b415f7b44de36f314c7a
JavaScript
LostinLimbo/Backend
/Associations/References.js
UTF-8
906
2.578125
3
[]
no_license
var mongoose = require("mongoose"); mongoose.connect("mongodb://localhost/blog_demo_2", { useNewUrlParser: true, useUnifiedTopology: true }); var Post = require("./models/post"); var User = require("./models/user"); // Find user // Find all posts for that user // User.findOne({email: "bill@feet.com"}).populate("pos...
true
2bbddb6281baae5cc0eccddc0bbd1d2754b79676
JavaScript
Morehooks/react_portal
/src/App.js
UTF-8
2,880
3.5
4
[]
no_license
import React, { Component } from 'react'; import './App.css'; import Person from './Person/Person' class App extends Component { state = { person : [ {id : 1, name : "Max", age : 28}, {id : 2, name : "Manu", age : 25}, {id : 3, name: "Steph", age: 22} ], other : "Other", showPersons...
true
c0860e64ab80e28ec657c212ad7c0de9cc9859ba
JavaScript
alexey-ernest/find-a-donor
/lib/services/donor.service.js
UTF-8
2,683
2.84375
3
[ "MIT" ]
permissive
/** * @fileOverview Donor business logic layer. */ var validation = require('../utils/validation'); module.exports = function (db) { var Donor = db.Donor; return { /** * Registers a new donor. * * @param {Object} donor Donor data. * @param {Function} fn Callback. ...
true
b08705ac96fbad85a007e8f6527c7c19dfbf2d09
JavaScript
visa4/thor
/app/lib/storage/indexed-db/dexie/DexieManager.js
UTF-8
1,454
2.859375
3
[]
no_license
class DexieManager { constructor(nameDatabase) { /** * @type {String} */ this.nameDatabase = nameDatabase; /** * @type {Array} */ this.schema = []; /** * @type {number} */ this.version = 1; /** ...
true
7bcb6fcbbd9ab29d858825dda200594ba48d481d
JavaScript
adeaver/personal-olinjs
/countries/routes/adddata.js
UTF-8
1,485
3.078125
3
[]
no_license
var mongoose = require('mongoose'); var Country = require('../models/country'); var addData = function(req, res) { // I'm assuming that type, name, and continent are all coming in as request variables // Population data should be csv format console.log(req.body); var countryName = req.body.name; var years = req....
true
89df27233a39c54d91d470cada5e88ba35f8539b
JavaScript
AdventureGunter/RatkusSoftTZ
/controllers/indexController.js
UTF-8
2,688
2.515625
3
[]
no_license
/** * Created by User on 10.07.2017. */ let Artist = require('../db/models/artist'); let ConcertPlace = require('../db/models/concertPlace'); let Performance = require('../db/models/performance'); module.exports.getArtists = function (next) { return Artist.find() .then(artists => artists) .catch(...
true
b3ad309a0a2063a1f3eb722688f89fb332494e06
JavaScript
MatteoMeneguzzi/js-jsnacks-blocco-1
/js/script.js
UTF-8
2,837
4.21875
4
[]
no_license
// Snack 1 // Il software deve chiedere per 5 volte all’utente di inserire un numero. // Il programma stampa la somma di tutti i numeri inseriti. // Esegui questo programma in due versioni, con il for e con il while // var richieste = 5; // var sum = 0; // for (var i = 0; i < 5; i++) { // var number = parseInt(prom...
true
c7c37e3b947b99538110f8074f2b6a43a8cc232e
JavaScript
JennyArtorias/frontend-nanodegree-resume
/js/resumeBuilder.js
UTF-8
6,007
2.765625
3
[]
no_license
/* * A series of JSON setups that contain the data. Their display functions make * use of helper.js to put them on the page. */ var bio = { "name": "Artorias Abysswalker", "role": "Gate Guardian", "contacts": { "mobile": "000 000 000", "email": "Abysswalker@gmail.com", "github": "Abyss", "twitter": "@Da...
true
d59871536de89ab8bee3bb013e88b25145a34a7a
JavaScript
DanielGomes-Dev/Job-Finder
/src/controllers/jobController/index.js
UTF-8
1,067
2.5625
3
[]
no_license
const jobController = require('./jobsController'); const get_params = (body) => { const { title, description, salary, company, email } = body; const job = { title, description, salary, company, email }; return job; } module.exports = { async index(req, res) { const allJobs = await jobControlle...
true
22af513ff9092006c307bd2c27119d36f3a5f94e
JavaScript
Pyrophorus/YAMG
/yamg/maps/random/yamg/placers.js
UTF-8
36,246
2.953125
3
[]
no_license
/** * This is the placers part of YAMG library * * author: Pyrophorus * * alpha 3 : february 2018 * * Please note all this library requires the creation of a tiles map object using the special function: * * var g_TOMap = createTileMap(wHeight,sLimit); * */ //================== Painting and populating ==========...
true
859aee39e4d0818af3641eec13a45fee7eb0c6fb
JavaScript
rgpass/bubble
/app/components/attendee/attendeeController.js
UTF-8
1,693
2.71875
3
[]
no_license
app.controller('AttendeeCtrl', function($scope, $firebaseObject, $firebaseArray) { // CREATE USER ON LOAD var randomKey = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 8); var defaultAttendee = { name: '', overall: 'good', speed: 0, volume: 0, key: randomKey }; var refObject = new Firebase("http...
true
1a462dd7b4091cee7f79eee44c2ae0061b939acd
JavaScript
mvarshney/simjs-source
/tests/buffer-tests.js
UTF-8
8,225
3.078125
3
[]
no_license
function testBufferBlockedPuts() { var sim = new Sim(); var buffer = new Sim.Buffer('a', 100); var Entity = { count: 0, start: function () { // at time 0, put 60 units -- succeed this.putBuffer(buffer, 60).done(function () { assertEquals(this.time(), 0); this.count++; }); // put 60 units...
true
964b886bcb7fe38fac01f96d96311e45773ee406
JavaScript
odessajsconf/nodejscon
/resources/lang/js/en/preparty-speakers-en.js
UTF-8
6,840
2.53125
3
[]
no_license
export const PrepartySpeakersEn = [ //Example /*{ image : '../public/img/speakers/eugen_gavrilenko.jpg', name : 'Eugen Gavrilenko', position : 'Senior software engineer', company : 'Lohika', place : 'Odessa, Ukraine', rept : [ { title : 'The learning how to learn [Ru]', ...
true