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
b6e7a5126ce26039aaed64d612d560ef1f30f615
JavaScript
FekadeTegeghe/cs445-2021-5-final-project
/script.js
UTF-8
4,847
2.640625
3
[]
no_license
// your code window.onload = loginAminApp; function loginAminApp() { const pageView = document.querySelector("#outlet"); let token; let timerId; const geokey = `1jwCRc01HYt6VS4GQSVQTMxsHTAIHqGt`; const loginElements = `<div class="log-form"> <h1 >Please Login</h1> Username : <input type="text" value=...
true
d607bd96489432498ff74a399c386d4abe75e010
JavaScript
GabrielaGuedes/ngos_microservices_system
/volunteers/test/interactors/update-area.test.js
UTF-8
2,266
2.671875
3
[ "MIT" ]
permissive
/* eslint-disable no-undef */ process.env.NODE_ENV = "test"; const chai = require("chai"); const UpdateArea = require("../../interactors/update-area"); const areas = require("../../models/areas"); require("dotenv/config"); require("../../config/db-connection"); const { expect } = chai; let createdArea = {}; let exist...
true
7372141745174c9801c1483ef407fbca1c17a08a
JavaScript
agness-anshukova/extractor-of-unique-letters
/ajax.js
UTF-8
716
2.640625
3
[]
no_license
$( document ).ready(function() { $("#btn").click( function(){ sendAjaxForm('result_form', 'ajax_form', 'ajax_form_handler.php'); return false; } ); }); function sendAjaxForm(result_form, ajax_form, url) { $.ajax({ url: url, type: "POST", dataType: "html", d...
true
ee070622526d8134914f0b95f231da42146dfa68
JavaScript
basic-success-discipline/legacy-of-hope
/static/js/cardcopy.js
UTF-8
1,167
2.703125
3
[]
no_license
$(document).ready(function(){ setEllipsis(); }); window.onresize = function(event){ setEllipsis(); }; var setEllipsis = function(){ for (var i =0; i<$('.cardcopy').length; i++){ var divHeight = $('.card h5').eq(i).height(); var lineHeight = parseInt($('.card h5').eq(i).css('line-height'...
true
1067ebf9e3b5d9f428569c7de14ab064a69f0d01
JavaScript
mpc-team/mpc-web
/includes/js/util.js
UTF-8
4,884
2.65625
3
[]
no_license
/* __Constants__ */ var SEARCH_RESULTS = "#search-results"; var INPUT_EMAIL = "#email"; var INPUT_ALIAS = "#alias"; var INPUT_PASSWORD = "#password"; var INPUT_CONFIRM = "#confirm"; var FILTER_BY_ALIAS = 0; var FILTER_BY_EMAIL = 1; var PERMISSION_ADMIN = 'admin'; /* #### End of Constants ##...
true
c00cb54f23035e006c6177e58f38f23afd198435
JavaScript
lajimenez/rock.js
/src/main/js/rock/graphics/engine/webgl/WebGLGraphicsEngine.js
UTF-8
19,444
2.71875
3
[ "MIT" ]
permissive
rock.namespace('rock.graphics.engine.webgl'); /** * Render engine to use with canvas and WebGL * http://www.khronos.org/registry/webgl/specs/latest/ * * @param {rock.graphics.engine.webgl.WebGLContext} context * the context * * @constructor * @extends rock.graphics.engine.ContextGraphicsEngine * *...
true
e5ba14a7e9e8d76fb46e0cb8ab0ce5c6152f5309
JavaScript
notei/wwwRealstate
/web/css/maps.js
UTF-8
2,405
3.109375
3
[ "BSD-3-Clause" ]
permissive
var marker; var lat_lng = {lat: 19.4326068, lng: -99.1353936}; var map; var geocoder; function initMap() { geocoder = new google.maps.Geocoder; map = new google.maps.Map(document.getElementById('map'), { center: lat_lng, zoom: 12 }); marker = new goo...
true
0fe920ce008cb4a8e3d00fc6e001da7e183e6dab
JavaScript
saicharanpogul/blofab
/src/reducers/BloodCounts.js
UTF-8
538
2.53125
3
[]
no_license
import { FETCH_BLOOD_COUNT_SUCCESS, FETCH_BLOOD_COUNT_FAILURE } from '../actions/types' const INITIAL_STATE = { totalBloodCount: '', aPositive: '', aNegative: '', bPositive: '', bNegative: '', oPositive: '', oNegative: '', abPositive: '', abNegative: '' } export default (state = INITIAL_STATE, a...
true
2697d6815bb92717450c322deb71be1beaff6d27
JavaScript
escudero89/dnd
/src/services/dices.js
UTF-8
1,353
3.140625
3
[ "MIT" ]
permissive
const PATTERN = /^\s*([+0-9/]+)\s*([\w\s]+)\s*\(([0-9d+\w ]*)(?:, ([0-9\-/x]*))?\)$/; const dY = y => Math.ceil((Math.random() * 1e10) % y); const XdY = (x, y) => [...Array(x)].map(() => dY(y)).reduce((curr, last) => (curr += last)); const d20 = () => dY(20); class DicesService { parse(content = '') { const l...
true
dc1942e0c9f8f17c96f7e3f9d0a8d6558669cbf0
JavaScript
mgmarlow/composition-inheritance-example
/inheritance.js
UTF-8
706
3.5
4
[]
no_license
function Employee (name) { this.name = name; } Employee.prototype.sayName = function () { console.log(this.name); } function Engineer (name) { this.name = name; this.performRole = function () { console.log('Coding...'); } } Engineer.prototype = Object.create(Employee.prototype); Engineer.prototype.const...
true
df964c625e0c357ef0cb26871d49ff534a24e4b2
JavaScript
SparkPayments/sparkpayments.github.io
/directory/js/create.js
UTF-8
742
3.03125
3
[]
no_license
function download() { let user = document.getElementById("username").value.toLowerCase(); let data = { metadata: { displayName: user, profilePicture: document.getElementById("profile").value }, dash: document.getElementById("address").value }; let fileNam...
true
6640fb855edeb8f88364a3c04150f0b5ef91577d
JavaScript
UO266499/u
/Ejercicio 7/Ejercicio7.js
UTF-8
2,478
3.078125
3
[]
no_license
class Ocultar{ ocultarH1(){ $(function(){ $("h1").hide(); }); } borrarParrafos(){ $(function(){ $("p").remove(); $("#borrarParrafos").remove(); }); } eliminarFooter(){ $(function(){ $("#footer")...
true
f571af27a53fc7afce4ee5d7b84851e6f880e92d
JavaScript
git-ss-dev/edu-node
/module 2/express.js
UTF-8
437
2.703125
3
[]
no_license
var fs = require('fs'); var express= require('express'); const app = express(); const port = 6600; app.get('/',(req,res)=>{ res.status(200).send('<h1>Welcome to api For Fs</h1>') }); app.get('/movies',(req,res) => { fs.readFile('db.json',(err,result) => { if(err) throw err; res.status(200).sen...
true
40d557f8a34c317593394265e4f36d6d0621dec9
JavaScript
tech-sketch/kinect_realtime_sample
/kinect_rest_sample/public/javascripts/script.js
UTF-8
834
2.96875
3
[]
no_license
window.addEventListener('load', function() { load(); var socket = io.connect('http://example.com:8888/'); // 受信したmsgをtextareaに表示 socket.on('message', function(msg){ data = msg; draw(); }); }, false); function load() { var canvas = document.getElementById("cvs1"); var ctx = canvas.getContext('2d'...
true
a8c18409e31c2814a911258f3d542589d4c1f14d
JavaScript
hmerritt/node-api-challenge
/resources/actionRouter.js
UTF-8
3,122
2.71875
3
[]
no_license
const express = require("express"); const db = require("../data/helpers/actionModel"); const router = express.Router(); // Get all actions // -> array router.get("/", validateActionId(), (req, res, next) => { res.send(req.action); }); // Get individual action // -> object router.get("/:id", vali...
true
30e7e0b6bec5a07164873f88a81c08da06f7ccc3
JavaScript
ma-fayez/ES6-Practise
/class.js
UTF-8
378
3.796875
4
[]
no_license
// Constructor Practice with similar classes class student { constructor(id, name) { this.id = id; this.name = name; this.Institute = "Chattogram Polytechnic Institute"; } } const student1 = new student(1, "Fayez"); const student2 = new student(2, "Sakib"); const student3 = new student...
true
c8d469da307c45ec26d868c63159f4ead995fd3a
JavaScript
alextwilson/jotter
/test/jotterTest.js
UTF-8
1,250
3.3125
3
[]
no_license
describe("Testing the Jotter object.", function(){ it("Tests whether the Jotters list is empty or not.", function(){ var jotter = new Jotter(); console.log(assert.isEmptyArray(jotter.displayList)); }); it("Tests whether the Jotters list is not empty after adding a note.", function(){ var jotter = new Jo...
true
2667231ae1ded7e59229660ee36397bb630f49ae
JavaScript
jacten-org/MM_Web
/client/src/components/Auth/Signup.jsx
UTF-8
2,411
2.609375
3
[]
no_license
import React, { Component } from 'react'; import axios from 'axios'; import Input from '../globals/Input/index.jsx'; import Button from '../globals/Button/index.jsx'; import style from './Auth.css'; const { REST_SERVER_URL } = process.env; class Signup extends Component { constructor() { super(); this.sta...
true
5881f5cc7af8d373235d5a3cebf5c2532c84c173
JavaScript
NayanKrishna13/ACA-32-Iron-Man-Level-2
/sketch.js
UTF-8
1,276
3.0625
3
[]
no_license
var bg, backgroundImg,ironMan,ironManImg; var stoneGroup,stoneImg; function preload() { backgroundImg = loadImage("images/bg.jpg"); ironManImg = loadImage("images/iron.png"); stoneImg =loadImage("images/stone.png"); } function setup() { createCanvas(1000, 600); bg = createSprite(580,300); bg.addImage(ba...
true
e2a743ed12e5124c8d8a55621cdb09985526da5c
JavaScript
feIgor/Film_OMDb_API
/5js.js
UTF-8
6,763
2.890625
3
[]
no_license
//const API_KEY = 'fd58e48d'; const API_KEY = '62864a3a'; // это мой ключ const URL = `http://www.omdbapi.com/?apikey=${API_KEY}`; const form = document.forms.search_form; const idCards = document.getElementById("search-watch"); let radioName; let value; let like = []; let globalArr = []; if (localStorage.getItem('...
true
ddd4ae31c0598b32f13ea86ed90b7350b6ba69f8
JavaScript
jhorn00/BusSimulator
/src/graph.js
UTF-8
4,906
3.359375
3
[]
no_license
//Contains information about entire graph class Graph{ constructor(){ this.graph = new Map(); //Key: name, Value: Node* this.nodeCount = 0; this.nodeList = []; } addNode(n){ this.nodeList.push(n); this.nodeCount++; if(!this.graph.has(n)){ ...
true
320df62868aedb36945cd55c70f9e505d33ffa4d
JavaScript
rsurendraidexcel/demo_angular
/cync-ngview/cync-app/assets/js/custom.js
UTF-8
31,132
2.5625
3
[]
no_license
var mqm = window.matchMedia("(min-width: 992px)"); var mqm_menu = window.matchMedia("(min-width: 768px)"); var MD5 = function (string) { function RotateLeft(lValue, iShiftBits) { return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits)); } function AddUnsigned(lX,lY) { ...
true
b32e123db2888259c6b3889d13676c4a1259b8fc
JavaScript
yojona/coyota.js
/lib/Screen/Screen.js
UTF-8
1,363
2.859375
3
[ "MIT" ]
permissive
export default class Screen { create (width, height) { this.init() this.width = width this.height = height this.canvas.width = width this.canvas.height = height this.context = this.canvas.getContext('2d') this.backgroundColor = 'black' this.clear() } init () { this.canvas =...
true
302c20700ad39c6511c5bcc21023f6e1824e568b
JavaScript
phongnm-dev/kintone-ui-component
/src/text/index.stories.js
UTF-8
2,515
2.53125
3
[ "MIT", "MPL-2.0", "BSD-3-Clause", "Apache-2.0" ]
permissive
import { Text } from "./index.ts"; import { storiesOf } from "@storybook/web-components"; storiesOf("text", module) .add("Base", () => { const root = document.createElement("div"); const text = new Text({ value: "Orange", className: "hoge var", id: "aaaaaa", textalign: "righttt", ...
true
559675e584f8f314875fcc0135ed1dd049fdd43b
JavaScript
ciochetta/cache-server
/server.js
UTF-8
1,565
2.828125
3
[]
no_license
const express = require('express'); const body_parser = require('body-parser'); const app = express(); let cache = {}; app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header('Access-Control-Allow-Methods', 'GET,POST,OPTIONS,DELETE,PUT'); res.header("Access-Control-Allow-He...
true
305c7987c10fa42f720904ea1de0688c634a2727
JavaScript
windldream/leetcode
/Interview/isUnique.js
UTF-8
202
3.265625
3
[]
no_license
/** * @param {string} astr * @return {boolean} */ var isUnique = function (astr) { for (let i = 0; i < astr.length; i++) { if (astr.lastIndexOf(astr[i]) !== i) return false } return true }
true
af3fff6053e28b808c22b72f2af83f365990217e
JavaScript
Living-Dead/city-liligo
/api/app.js
UTF-8
1,812
2.78125
3
[]
no_license
const cities = require('cities.json'); const express = require('express'); const app = express(); const port = 8085; const service = require('./cityService.js'); app.use(function(req, res, next) { res.set('Access-Control-Allow-Origin', 'http://localhost:4200'); res.set('Access-Control-Allow-Methods', 'POST, GE...
true
69fee0be56ecbb9b35daa1d4f2c67769cf4695d5
JavaScript
EndorphinCode/Vacations-project
/client/src/components/users.js
UTF-8
697
2.578125
3
[]
no_license
import React, { Component } from 'react'; import User from './user' class Users extends Component { state = { users: [], } componentDidMount() { this.fetchUsers(); } async fetchUsers() { try { const response = await fetch('/api/users') const result = await ...
true
3a0cd68a3803b2f489c3370c2c1d9dca3caea9d0
JavaScript
KrIsKa7a/JSCore
/JS Fundamentals/09.StringsAndRegularExpressions - Exercise/04.EndsWith.js
UTF-8
197
3.71875
4
[]
no_license
function endsWith(stringGiven, element) { console.log(stringGiven.endsWith(element)); } endsWith('This sentence ends with fun?', 'fun?'); endsWith('This is Houston, we have…', 'We have…');
true
5f622f49fb5d1ed3ca052d0ef03acde94adf0aa0
JavaScript
mterrysancsoft/vlipsyfordiscord
/bot.js
UTF-8
2,643
2.71875
3
[ "MIT" ]
permissive
require('dotenv').config() const axios = require('axios') const Discord = require('discord.js') const client = new Discord.Client() const DISCORD_BOT_TOKEN = process.env.DISCORD_BOT_TOKEN const VLIPSY_API_KEY = process.env.VLIPSY_API_KEY const VLIPSY_BASE_URL = 'https://vlipsy.com/vlip/' const VLIPSY_LIMIT = 10 const D...
true
58b3d49d7ba372ba6ddf94ba38e0f67451e3fef3
JavaScript
epiggy001/tequila
/test/oo_test.js
UTF-8
6,256
2.921875
3
[ "MIT" ]
permissive
define(['../basic/oo'],function (oo) { 'use strict'; return { RunTests: function () { module('Interface'); test('Create Interface', function () { var inf1 = oo.inf('inf1', ['function1', 'function2']); equal(inf1.name , "inf1", "Interface name is right" ); var function3 = 0; ...
true
1476fce23b9bb04cc653831ba525319a73d742bc
JavaScript
GeekInTheNorth/YouTrackInformationRadiator
/Website/Scripts/DevLog.js
UTF-8
16,858
2.515625
3
[]
no_license
var youTrackIssues = []; var issuedLogged = []; var apiStarted = 0; var apiCompleted = 0; var settings = undefined; $(document).ready(function () { ShowDevLog(); }); function ShowDevLog() { $.ajax({ type: "Get", url: "./Data/SiteSettings.json", dataType: "json", headers: { ...
true
6d46ded81786b838412e100bbd4f8a90075b867a
JavaScript
Javierggonzalvez/cursos
/JavascriptProject/js/script.js
UTF-8
627
3.28125
3
[]
no_license
'use strict' window.addEventListener('load', function (){ var results = document.getElementById('results'); var searchBtn = document.getElementById('searchBtn'); searchBtn.addEventListener('click', function(){ results.innerHTML = 'hola<br/>mundo'; //get hobby var hobbyField =...
true
23ef4431808510f6e823342fe103a7c3430220a6
JavaScript
LTUC/amman-javascript-401d5
/class-17/demo/chat-app/chat-client/chat.js
UTF-8
1,284
3.4375
3
[]
no_license
const inquirer = require('inquirer'); // library to get user input const net = require('net'); // TCP library built into node const client = new net.Socket(); const HOST = process.env.HOST || 'localhost'; const PORT = process.env.PORT || 4000; let name = ''; const messages = []; client.connect(PORT, HOST, () => { c...
true
3517a8ecbdcb2a1b3eb00d1d4d1bb6e9937f86ec
JavaScript
skipio11/dna-serverless-hol
/plc/src/lambda/token-heartbeat-checker.js
UTF-8
2,132
2.578125
3
[]
no_license
var AWS = require('aws-sdk'); const dynamoDb = new AWS.DynamoDB.DocumentClient(); var sqs = new AWS.SQS(); const tokenCheckSqsUrl = process.env.TOKEN_CHECK_SQS_URL; const tokenCleanSqsUrl = process.env.TOKEN_CLEAN_SQS_URL; const tokensTableName = process.env.TOKENS_TABLE_NAME; const sendCheckQueue = function(tokenId){...
true
0b9b27c700ffbd3bcb1be8fb177d121a43f3cda2
JavaScript
zaquielmayorga/exercises-js1
/week-3/InClass/exercise-H1.js
UTF-8
462
3.84375
4
[]
no_license
let estudiantes =["melina", "jhony", "jose", " jesus", "Zaquiel" , "maria"]; // // let yo = estudiantes.find( estoy => estoy=== "Zaquiel"); // if (yo === "Zaquiel"){ // console.log(me enconto) // } else { // console.log(no me encontraste) // } // console.log("yo:", yo); function findZaquiel(nombre){ if ...
true
149c0a21e9a57ac3cddf4c9580ffd3d97d36b2bc
JavaScript
minzhang2/study
/src/type/isObject.js
UTF-8
302
2.828125
3
[]
no_license
import toString from './toString' // 是否是Object类型 export default function isObject(value) { const type = typeof value; return value != null && (type == 'object' || type == 'function'); // const type = toString(value); // return value != null && (type == 'Object' || type == 'Function'); }
true
c75fa583b76cc6a74211a0548388a0aafbcf0945
JavaScript
BonIovi-InfoVis/GlobalWarming-InfoVis
/website/public/js/tempRise/radarChart.js
UTF-8
10,334
2.65625
3
[ "MIT" ]
permissive
function RadarChart(id, options, jsonTemp) { var cfg = { w: 700, //Width of the circle h: 700, //Height of the circle margin: {top: 20, right: 20, bottom: 20, left: 20}, //The margins of the SVG levels: 3, //How many levels or inner circles should there be drawn maxValue: 0, //What is the value ...
true
46ac5a249cd0d9b8c5fe7f128dc33aaf90954ae0
JavaScript
wmerfalen/screeps
/functions.general.js
UTF-8
722
3.140625
3
[]
no_license
/* * Module code goes here. Use 'module.exports' to export things: * module.exports.thing = 'a thing'; * * You can import it from another modules like this: * var mod = require('functions.general'); * mod.thing == 'a thing'; // true */ module.exports = { guid: function() { function s4() { retu...
true
e26bb5cea37c9763a8e67b4f6b0f93588e791a9d
JavaScript
heidarbozorg/todo
/tests/unit/logic/subtasks.test.js
UTF-8
3,853
2.65625
3
[ "MIT" ]
permissive
const subtasksLogic = require('../../../logic/subtasks'); const subtasksDB = require('../../../dp/subtasks'); describe('logic.subtasks.insert', () =>{ it('When passing invalid todo_id, should return 400 as status and error message', () => { const values = [null, '', undefined, 'ab', 0, -1]; values....
true
3556e6f15978da97e949cc0c59cfd63252f82cb6
JavaScript
ZachariBarnes/BackendCodingTest
/src/animation.js
UTF-8
4,056
3.734375
4
[]
no_license
// This method transforms our input to make sure speed is an integer and init is case insensitive const normalizeInputs = ((speedInput, initInput) => { const speed = Math.floor(speedInput); const init = initInput.toUpperCase(); // Returns a JSON object containing "speed" and "init" properties, we destructur this ...
true
ffc7e8b5fd72de326e408140ad0bd6271aec0f35
JavaScript
triangle0105/test
/Web/Scripts/Home/CallApiJs.js
UTF-8
1,898
2.84375
3
[]
no_license
// 创建XHR对象 function createCORSRequest(method, url) { var xhr = new XMLHttpRequest(); if ("withCredentials" in xhr) { // 针对Chrome/Safari/Firefox. xhr.open(method, url, true); } else if (typeof XDomainRequest != "undefined") { // 针对IE xhr = new XDomainRequest(); ...
true
73a0defd87a25060f75f34b227657486b28c5a46
JavaScript
hdyusf/common
/lib/judge.js
UTF-8
5,393
3.015625
3
[ "MIT" ]
permissive
/** * @description: 手机设备判断 * @return {string | boolean} */ export const isPhone = () => { const u = navigator.userAgent; const isAndroid = u.indexOf('Android') > -1; const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); if (isAndroid) { return 'A'; } if (isIOS) { return 'S'; } return fals...
true
f5ff1c6d3f08efe6e5743762b337f4623bfab32a
JavaScript
DevTeles/desafio-frontend
/src/store/modules/country/reducer.js
UTF-8
565
2.640625
3
[]
no_license
import produce from 'immer'; export default function country(state = [], action) { switch (action.type) { case '@country/ADD_SUCCESS': return produce(state, draft => { const { country } = action; const countryIndex = state.findIndex(p => p._id === country._id); if (countryIndex >= ...
true
23f4fc71af24c13aae16dace1c5aaa0b2f833156
JavaScript
SinYongJu/workspace-1
/javascript01/step03/test18_2.js
UTF-8
321
3.625
4
[]
no_license
"use strict" /* 프로그램 실행 중 예외 상황이 발생했을 때, 에외 정보를 알리는 명령어 */ function divide(a, b) { if(b == 0) return -12121212 return a/b } var result = divide(12121212 , -1) if( result == -12121212){ console.log('0으로 출력 X'); } else{ console.log(result); }
true
96bf864cf26bc448c89830628c934c52c7ff37a2
JavaScript
AntonJavits/react-native-exercises
/7-euro-converter/App.js
UTF-8
3,550
2.765625
3
[]
no_license
import { StatusBar } from 'expo-status-bar'; import React, { useState, useEffect } from 'react'; import { StyleSheet, Text, View, Button, TextInput, Image } from 'react-native'; import {Picker} from '@react-native-picker/picker'; export default function App() { const [exchangeRates, setExchangeRates] = useState([]...
true
e37ce46d5a99dac5237619f3975617c6b4dacfe4
JavaScript
StefanDimitrovDimitrov/JS--Advanced
/Arrays/22.Tic-Tac-Toe (not included in final score).js
UTF-8
284
3.359375
3
[]
no_license
function matrix(arr){ let rowSums = arr.map((el)=> el.reduce((a,b)=>a+b),0); let colSums = arr.reduce((a, b)=> a.map((x, i)=> x + b[i])) console.log(`${rowSums}______${colSums}`); } console.log(matrix( [ [100, 100, 100], [50, 50, 50], [1, 2, 3] ] ))
true
6d83cce566a4451f068874fa4e2d36444d8aeb18
JavaScript
emilti/Telerik-Academy-My-Courses
/JavaScript OOP/04.PrototypalOOP/tasks/task-1-2nd.js
UTF-8
10,250
3.6875
4
[ "MIT" ]
permissive
/* Task Description */ /* * Create an object domElement, that has the following properties and methods: * use prototypal inheritance, without function constructors * method init() that gets the domElement type * i.e. `Object.create(domElement).init('div')` * property type that is the type of the domElement * a va...
true
32cf2b621db751c9f9efeba8665a2a3111f39ec2
JavaScript
anhtq1998/zingmp3app
/main.js
UTF-8
7,482
2.515625
3
[]
no_license
const $ = document.querySelector.bind(document); const $$ = document.querySelectorAll.bind(document); const heading = $('header h2'); const cdThumb = $('.cd-thumb'); const audio = $('#audio'); const playClick = $('.btn-toggle-play'); const player = $('.player'); const progress = $('#progress'); const nextBtnClick = $('...
true
9c75745fa9400cfe77839cbec72ca538ce739c0c
JavaScript
MycoMK/datatypes-js
/script.js
UTF-8
1,175
4.03125
4
[]
no_license
console.log('connected'); // String, numbers,Boolean,null, // const card = { // name:'Peter', // age:25, // driving: true, // rating: 4.5, // } // const hello = `My name is ${name} and I am ${age}`; // console.log(hello); const word = 'Hello world' console.log(word.length); // 11 console.log(word[0]); // H ...
true
4e45fcbcfc76c6b29c0bc1620430d3b4953e67f8
JavaScript
windtoday/windtoday-core
/test/util/titleize.js
UTF-8
936
2.78125
3
[ "MIT" ]
permissive
'use strict' const should = require('should') const titleize = require('../../core/util/titleize') const fixture = { title: 'PROLIMIT CYBER BOOM 202 €129', price: 129, name: 'CYBER BOOM', image: 'http://foo.bar', link: 'http://foo.bar', size: 202, brand: ['north', 'sails'] } describe('core » util » ti...
true
7ca691b04ed931dca61f674930295b592b5b6f14
JavaScript
brobinson124/book
/src/apps/parking/react/components/garage-rates.js
UTF-8
1,413
2.546875
3
[ "MIT" ]
permissive
MyComponents.Rate = React.createClass({ render: function() { if (this.props.rate.RATE==undefined) {var rate = <li>{' '}</li>} else {var rate = <li>{'Rate: $'+ this.props.rate.RATE}</li>} if (this.props.rate.BEG==undefined) {var beg = <li>{' '}</li>} else {var beg = <li>{'Start: '+ this.props.r...
true
6d8a93c97792c0c7243d8a86e41582087ff76116
JavaScript
jgrey4296/jsRete
/src/ReteActionAssert.js
UTF-8
2,741
2.53125
3
[]
no_license
/** Defines the Assert Action @module ReteActionAssert @requires ReteArithmeticActions @requires ReteUtilities @requires ReteDataStructures @requires lodash */ import * as RDS from './ReteDataStructures'; /** @implements {module:ReteActionInterface} @class AssertAction */ let AssertAction = { ...
true
919fa3b837c7825f9c9aa18d6ced140943ec8f44
JavaScript
leannethng/beginner-javascript
/playground/7-closures.js
UTF-8
1,458
4.34375
4
[]
no_license
// function outer() { // const outerVar = 'Hey I am the outer Var!'; // function inner() { // const innerVar = 'Hey I am the inner Var!'; // console.log(innerVar); // console.log(outerVar); // } // return inner; // } // const innerFn = outer(); // innerFn(); // function createGreeting(greeting = ''...
true
a5740089341cc041808f396f20b7e0e038a89a91
JavaScript
summerjoyyoung/info343-finalproject
/game/src/AnswerCard.js
UTF-8
4,032
3.046875
3
[]
no_license
/** * Creates a card representing a card played by someone for the current round, allows current * question asker to click on a card and choose it as the winner for that question round */ import React from "react"; import firebase from "firebase/app"; export default class AnswerCard extends React.Component { c...
true
b0ff3ce09fc48cd8dbb661ba86636fc29c909545
JavaScript
mrxz/advent-of-code-2020
/10/day10.js
UTF-8
1,949
2.875
3
[]
no_license
let input = [ 111, 56, 160, 128, 25, 182, 131, 174, 87, 52, 23, 30, 93, 157, 36, 155, 183, 167, 130, 50, 71, 98, 42, 129, 18, 13, 99, 146, 81, 184, 1, 51, 137, 8, 9, 43, 115, 121, 171, 77, 97, 149, 83, 89, 2, 38, 139, 152, 29, 180, 10, 165, 114, 75, 82, 104, 108, 156, 96, 150, 105, 44, 100, 69, 72, 143, 32, 172, 84, 16...
true
6c8d34da5c2112f89e4891207d771bcd54b2c11a
JavaScript
MailenMancuso/GameOfLife
/lib/GameOfLife.js
UTF-8
272
3.078125
3
[]
no_license
class GameOfLife { constructor(x, y){ if(isNaN(x) || x < 1) { throw new TypeError("Invalid numbers of row"); } if(isNaN(y) || y < 1) { throw new TypeError("Invalid numbers of column"); } this.sizeX = x; this.sizeY = y; } } module.exports = GameOfLife;
true
a62d1860cd6ae893ba2e435eecd9d804a2ea4e60
JavaScript
nuodong/edison
/edison.js
UTF-8
4,361
2.65625
3
[]
no_license
#!/usr/bin/env node /** * This is Edison, a CLI tool to help developers get up and running with Intel Edison. */ /** * Define version, help info here */ var program = require('commander'), edisonCLI = require('./edison-cli.js'); /** * Define version, help info here */ program .version('0.0.5') .usage('[opti...
true
59447699b776f75667205477f2a057202b104ea4
JavaScript
Maheshron/NareshIt
/JavaScript/JavaScript_Development-master/JS_Starter_Template/12_JS_Math_Date_Objects/12_JS_Math_Date_Objects.js
UTF-8
3,003
4.53125
5
[]
no_license
/* Math Object Examples */ // Math PI and Sqrt var pivalue = Math.PI; console.log("The pi value is :"+ pivalue); // find the min of 4 numbers var min = Math.min(10,34,43,45,23,234,53,23,453); console.log(min); // find the Max of 4 num...
true
3079c22d73f2e703d64326dbce4ba298f6a46392
JavaScript
Noderiety/javascript100
/src/index.es6.js
UTF-8
673
3.546875
4
[]
no_license
// var arr = [1,2,3,4].map(value => value*2); // process.nextTick( ()=> console.log('hello')); // var a = 'asdf'; // var {a} = {a: 'asdf'}; var fn = ({a, b}) => { // if (!options.a) options.a = true console.log(a, b); } fn({ // a: 'hello', b: 'world' }) // console.log(arr); // /*jshint esnext: true*/ //...
true
6dfb66110a47c863f69bc147eea43347459706cf
JavaScript
perniax/myPetition
/redis.js
UTF-8
1,175
2.828125
3
[]
no_license
redis.js; //hay que ponerlo en una carpeta que se llame redis en el mismo nivel que index de la petition // the stuff put here will go to the redis branch var redis = require("redis"); var client = redis.createClient({ host: "localhost", port: 6379 }); //client is what allow to get data/commands f...
true
865540e70001cb96c9995907e7165fcfb80ed9c2
JavaScript
anusu90/NODE-PASS-BACKEND
/public/javascripts/mailsend.js
UTF-8
1,689
2.5625
3
[]
no_license
const nodemailer = require("nodemailer"); const crypto = require("crypto"); const backendURL = "http://localhost:3002/users" // const user = { // name: "Anunay", // email: 'anusu90@gmail.com' // } // let randString = crypto.randomBytes(8).toString('hex') async function welcomeMail (user,randString) { let...
true
fe7c85883852a819b46bc9367b68dcc260213f65
JavaScript
Devanship22/COMP229Lab2
/server/routes/contact.js
UTF-8
1,092
2.515625
3
[]
no_license
/* Student Name: Devanshi Patel StudentID: 301161377 Date: 19 June 2021 */ let express = require('express'); let router = express.Router(); let contactController = require("../controllers/contact") let passport = require('passport') // Setting the require Auth function for the authentication verification if user ...
true
3537738d8c2a0a9968630285a590cf73de56c246
JavaScript
marcospcury/JSLib
/Class.js
UTF-8
2,348
3.171875
3
[ "MIT" ]
permissive
var Class; Class = (function() { function Class() { } // Creates a new class, using the given prototype, and starts the inheritance chain Class.prototype.create = function(_prototype) { // Basic constructor, calls the init function of the base prototype function _class() { this.i...
true
ebd1b5906f41e452f107bc14b3ce8161be34473b
JavaScript
SherryPann/oo-basic-step-by-step
/src/practice_12/student.js
UTF-8
714
3.15625
3
[]
no_license
var Person = require("./person.js"); function Student(id, name, age, klass) { Person.apply(this, arguments); this.klass = klass; } Student.prototype = Object.create(Person.prototype); Student.prototype.constructor = Student; Student.prototype.super_introduce = Student.prototype.introduce; Student.prototype.i...
true
c1af93a1af23396cee48442dfc147dba43ab7912
JavaScript
jcyang36/myapp
/app.js
UTF-8
487
3.6875
4
[]
no_license
var assert = require('assert'); function addTwoNumbers(x, y) { return x + y; } function testAddTwoNumbers(){ var x=5; var y=1; var sum1=x+y; var sum2=addTwoNumbers(x,y); console.log('addTwoNumbers() should return the sum of its two parameters.'); console.log('Expect'+sum1+' to equal '+sum...
true
c32b0ab14ffcc64eff1286dd24308aae11be8374
JavaScript
Noshin0251/Backend
/js/chartJS_graph.js
UTF-8
538
2.65625
3
[ "MIT" ]
permissive
// ここから横幅だけをレスポンシブにして縦幅は指定したサイズで表示する window.onload = function() { var ctx = document.getElementById('canvas').getContext('2d'); ctx.canvas.height = 280; var myChart = new Chart(ctx, { type: 'line', data: { labels: ['1月', '2月', '3月'], datasets: [ { label: '入居者数', data: [6, 18, 28], ...
true
ac77dbd681788b121f73e51d87c72981fecd4355
JavaScript
muzishuiji/collect-sdk
/test/util.test.js
UTF-8
576
2.546875
3
[ "MIT" ]
permissive
var expect = require('chai').expect var util = require('../src/common/util.js') describe('util test', function () { it('random string length should be 32', function () { expect(util.random().length).to.be.equal(32) }) it('uuid string length should be 46', function () { expect(util.uuid().length).to.be.e...
true
5643d122e10d40f525577179dba0b1ae0a09c263
JavaScript
HankH18/loopsAndIterables2
/worksheet.js
UTF-8
3,518
4.15625
4
[]
no_license
// PART 0: Write a function called squareDance() that squares each number in an array. var squareDance = function(array) { var squared = [] for (var i = 0; i < array.length; i++) { squared[i] = (array[i]**2) } return squared } // PART 1: write a function called nicer(). // It should clean up the language in its...
true
3b8c5fe23592d6559a46113e46f6a91d47298331
JavaScript
rmajuri/robert-majuri
/src/utility/utility.js
UTF-8
540
3.03125
3
[]
no_license
export const splitOnStarHome = quoteBlock => { return quoteBlock.split('*').map(quote => quote.trim()) } export const splitOnStarHeader = (quoteBlock, limit) => { return quoteBlock.split('*', limit).map(quote => quote.trim()) } export const joinAndPushIntoArray = quoteArray => { return [quoteArray.join(' ')] } ...
true
2e4bdab4eb87443d7d604ba06034c717c854191a
JavaScript
ifoxxiedev/blog-microservices
/samples/nats-client/subscriber.js
UTF-8
2,150
2.53125
3
[]
no_license
const nats = require('node-nats-streaming') const config = require('./config') let natsConnection; /* Get connection from Nats Streaming */ function getNatsConnection() { const { clientId, clusterId, uri } = config.eventbus return new Promise((resolve, reject) => { if (natsConnection) return resol...
true
0bb5b1167cba549a693fc7530cf9f83b9b410ef0
JavaScript
KiranKumarAlugonda/AngularJS-directives
/js/2.editable-text.js
UTF-8
1,856
2.515625
3
[]
no_license
var app = angular.module('MyApp',[]); app.controller( 'MyCtrl', function ($scope) { $scope.textValue = 'Directives Rock!'; $scope.allDone = function () { alert('All Done'); } } ); app.directive( 'editableText', function () { return { scope: { ...
true
2163547cb89a35136381fddc1f92f0bd5579ff23
JavaScript
dvmarchuk/My-Website
/courses/csci240/javascript/practice.js
UTF-8
639
3.96875
4
[]
no_license
/** * Created by DennisMarchuk on 2/2/2018. */ console.log("test"); console.log(typeof x); // prints the type: “undefined” console.log(parseInt("1234blue")); var age = 20; console.log(age.toString()); var x = null; console.log(typeof x); // prints “object” var age = "18"; age = +age; // age now has type N...
true
65c487b21bce23dd059d4ae3973dadb19561fea8
JavaScript
Julow/Catch-the-UU-Matter
/js/background.js
UTF-8
2,052
2.609375
3
[]
no_license
/** * UU-Matter <https://github.com/JWhile/UU-Matter> * * Copyright (c) 2014 juloo * * background.js */ function Background(game) { this.super(game); this.blocks = []; var self = this; this.game.g.background_image.on_load = function() { self.render(); }; } Background.prototype.render = function() { i...
true
f7c70db151db93ffc75b7c420ce8420ed5c4b531
JavaScript
fakhrulislam684boss/javascript-Practise
/await.js
UTF-8
753
3.125
3
[]
no_license
function TakeOrder(a, b, c) { let Order = { item_1: a, item_2: b, item_3: c, }; return Order; } function ProcessOrder(order) { let Order = { ...order, processOrder: "Done", }; return Order; } function DeliveryOrder(order) { let Order = { ...order, Delivery...
true
658b87a03254ebdf8e7004c8d352b8784b347700
JavaScript
Stegur/ra-20-crud
/src/Components/CardsList/CardsList.js
UTF-8
2,313
2.734375
3
[]
no_license
import React, { Component } from 'react' import CardItem from '../CardItem/CardItem' import './CardsList.css' export default class CardsList extends Component { state = { url: "http://localhost:7777/notes", cards: [], content: "", } componentDidMount = () => { this.loadCar...
true
46c190600a04d29ac7c3f32194c96fb7dddc91bc
JavaScript
danilolmc/music-lyrics-finder
/js.js
UTF-8
812
3.109375
3
[]
no_license
function FindLyrics(singer,music){ return fetch(`https://api.lyrics.ovh/v1/${singer}/${music}`); } const form = document.querySelector("#form").addEventListener("submit", e => { e.preventDefault(); Submit(); }); async function Submit() { const singer = document.querySelector("#singer"); ...
true
dd6ec48245d5776d340affb1a60a075351545484
JavaScript
cloneforyou/content-review-lookup
/dist/breach-wanderers/Common.js
UTF-8
1,276
2.9375
3
[ "CC-BY-4.0" ]
permissive
/* Any JavaScript here will be loaded for all users on every page load. */ /* Sets the top property for stickyHeader tables */ function setStickyHeaderTop() { const stickyTables = document.getElementsByClassName('stickyHeader'); const headHeight = document.getElementById('mw-header-container').offsetHeight; for (...
true
4515b858d203f39acc07fadfac79dba7f72a7658
JavaScript
Abhishek-5622/WebCamera-and-gallery
/indexDb.js
UTF-8
7,111
2.859375
3
[]
no_license
let galleryContainerBox = document.querySelector(".gallery_container"); // /create request => create ya open database let request = indexedDB.open('Camera',1); //database let db; //on success request.onsuccess=function(e) { //store request result in database db = request.result; } //on error request.onerror=fun...
true
3a9fe58c7a0c1a335f88ccf878e5fdad2163cfd5
JavaScript
adamcameron/php
/general/src/regex/lineEndingWeirdness.js
UTF-8
601
2.796875
3
[]
no_license
var control = 'abc'; var experimentWithLf = 'abc' + String.fromCharCode(10); var experimentWithCr = 'abc' + String.fromCharCode(13); var p1 = /^abc$/; //var p2 = /\Aabc\z/; // not supported in JS var result = { control : { 'with ^$' : control.match(p1), // 'with \A\z' : control.match(p2) }, ...
true
9ca0d257fe7dbf08762e806b4e611e3007c7a82a
JavaScript
mpotra/benchmark-hr
/src/stats.js
UTF-8
3,101
2.75
3
[ "MIT" ]
permissive
import {tTable} from './tables'; import {maxOf, minOf, medianOf, pow, sqrt} from './math'; /******************************************************************************* * computeStats ******************************************************************************/ function computeStats(times) { if (times.len...
true
050a6bc62a0da08c7adc8a3133c9ba26e8a1bc77
JavaScript
mobilproject/Chrome-Extensions
/SPECIAL/LAA Okayama/content.js
UTF-8
871
2.703125
3
[ "MIT" ]
permissive
for (var i=1;i<document.querySelectorAll("[bgcolor='#ffd7eb']").length;i++) { var row = document.querySelectorAll("[bgcolor='#ffd7eb']")[i].getElementsByClassName("L_CELL"); console.log(row[0].innerText.replace(/\s/g, ' ') + "," +row[1].innerText.replace(/\s/g, ' ') + "," +row[2].innerText.trim().replace(/\s+/g, ' '...
true
fdfdfdad9830b9e68fc8292833a25fc29a88234a
JavaScript
koundinyag25/buzz1
/databse/insert.js
UTF-8
536
2.625
3
[]
no_license
const pg = require('pg'); const connectionString = process.env.DATABASE_URL || 'postgres://postgres:postgres@127.0.0.1:5432/buzz1'; const client = new pg.Client(connectionString); client.connect(); const query = client.query('INSERT INTO words (id,word,defiiation,level_id) VALUES (1,'abash','derogate',1), (2,'a...
true
9f8c2d94eddc3d8772458d5fcddcc5ecf7980c2b
JavaScript
Wilfredo12/TropiBusServer
/routes/timuserRoutes.js
UTF-8
7,967
2.6875
3
[]
no_license
/** * Author: Luis Toro * Creation Date: 3/18/2017 * * Description: Contains Bus Tracking app routes and queries * * Routes: * /getAllRoutes * /getRoute * /getAllStops * /getNearestStop * /getStopsFromRoute * /getBusLocation * /getMessages * /getBuses **/ var express = require("express"...
true
2bc15641669c5dae0a5f061f03f4a85d9c9a8c68
JavaScript
WebRTCGame/processing-tower-defense
/game/zones.js
UTF-8
1,127
2.703125
3
[ "MIT" ]
permissive
var CircleZone = function (x, y, r) { var cz = new Object(); Object.extend(cz, InertDrawable); var d = 2 * r; cz.color = SET.killzone_color; function circle(x, y, r, c) { context.beginPath(); var rad = context.createRadialGradient(x, y, 1, x, y, r); rad.addColorStop(0, 'rgba('+c+',1)'); ...
true
82f633e6ddaf27ae1cc3270fb6b9d464986cc4b8
JavaScript
octalmage/Chimera
/app.js
UTF-8
4,425
2.546875
3
[]
no_license
var gui = require('nw.gui'); var win = gui.Window.get(); var mb = new gui.Menu({type:"menubar"}); mb.createMacBuiltin("Chimera"); win.menu = mb; win.showDevTools(); block=0; //TODO: Use this event to update the url faster. win.on("document-start", function(f) { if (BrowserOne.mode!="mobilewidth") { ...
true
634b8599b7998352946c594ab10e4b42f366d66b
JavaScript
so-tha/Estudo-de-JavaScript-html-css
/ex46.js
UTF-8
223
3.859375
4
[]
no_license
/*Desenvolva um programa usando a estrutura “para” que mostre na tela a seguinte contagem: 0 5 10 15 20 25 30 35 40 Acabou!*/ let c = 0 for(let c = 0; c <= 40; c++){ console.log(c) }console.log(`Acabou!`)
true
ddf0413f85c948dff61d970deb8483463d355dee
JavaScript
aepaja/techtogether-hack
/front-end/src/views/library.jsx
UTF-8
1,562
2.5625
3
[]
no_license
import React, { useState } from "react"; import { makeStyles } from "@material-ui/core/styles"; import Track from '../components/track'; import data from '../color-data'; import Container from '@material-ui/core/Container'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/M...
true
df03789872d5d1e09b04a154d089e1afe8c32e32
JavaScript
Tanmaynihore/API
/Newfolder/tan.js
UTF-8
3,893
2.8125
3
[]
no_license
var bodyParser = require("body-parser") var express = require('express') var request = require('request') //var for api request var app = express() app.use(bodyParser.urlencoded({extended : true})); //checks the error and should be used always app.set("view engine","ejs") var movie_dict = [ { "name" : "star"...
true
19f7edbe521105339a5252d946789fa48bddd75b
JavaScript
huaqi996/www.dyttq.com
/dplayer/index/script.js
UTF-8
703
3.65625
4
[ "MIT" ]
permissive
const stars = () => { const count = 200; const section = document.querySelector('.section'); let i = 0; while (i < count) { const star = document.createElement('i'); const x = Math.floor(Math.random() * window.innerWidth); const y = Math.floor(Math.random() * window.innerHeight); const size...
true
316801211ebb3dbe031412c0ec41f1d9e79055d8
JavaScript
gaoyixin1989/MonitorBusinessSystem
/WebApplication/WF/Data/JSLib/onblur/08.校验Email.js
UTF-8
698
3.015625
3
[]
no_license
function checkMail(c) { var val = c.value; if (val == '') return; //存在@符号 var a = val.indexOf("@"); //是否存在点 var point = val.indexOf("."); //存在@,点,并且 点在@之后,且不相邻 if (a == -1 || point == -1 || point - a <= 1) { alert("Email格式不正确。正确的例如abc@ccflow.org"); c.select(); ...
true
1b7c08a1f127a27f001f4290424877087ff03254
JavaScript
alirezadir/web-dev-bootcamp
/campBook/middleware/index.js
UTF-8
2,371
2.84375
3
[]
no_license
var Camp = require("../models/camp"); var Comment = require("../models/comment"); var middlewareObj = {}; // Authentication middlewareObj.isLogegdIn = function(req, res, next){ // next is the next thing that comes after middleware e.g. function(req, res) if (req.isAuthenticated()){ return next(); // ex...
true
99e12278c81534c82f7617d87f74ec0862d75c1a
JavaScript
kingofno1/samplerest
/samplerest/db/constructSQLstatement.js
UTF-8
716
2.90625
3
[ "MIT" ]
permissive
 var insertSummonerInfo = function ( obj ) { var ins = "INSERT INTO summonerInfo ("; var val = "VALUES ("; for (var key in obj) { if (obj.hasOwnProperty(key)) { ins = ins + key + ','; val = val + '\'' + obj[key] + '\','; console.log(key + "->" + obj[key])...
true
dc0ad3200c6a46ee317939c0466ed17a370d8208
JavaScript
lou-lou123/dom-practice
/index.js
UTF-8
1,806
3.421875
3
[]
no_license
// Buttons // identify button const button = document.querySelector('button'); // identify invisibility const invisibleName = document.querySelector('invisible'); // identfiy what happens on click, name appears button.onclick = () => { invisibleName.removeChild('invisible'); } // Mouse Over // target the light...
true
12773c55420bda2f7ca2e9944c7275a5916a5049
JavaScript
figo2127/CS2102_2021_S1_Team69
/routes/summary.js
UTF-8
8,324
2.78125
3
[]
no_license
const router = require('express').Router(); const { authUser, authAdmin } = require('./verifyToken'); const pool = require("../db"); /** * input of format * { * "particularYear" : "2020", * "particularMonth": "10", * } * output a single integer * get the number of pet days of a carer in a particular month * ...
true
fbc8da79cd2fc604fb3603c6494649665ec1da85
JavaScript
rhjcjdjr/go
/public/js/chat.js
UTF-8
7,439
2.921875
3
[ "MIT" ]
permissive
/* chat.js */ /* message attributes grabber */ function MessageAttributesGrabber(user) { // finds all data about message (text, user, ...) // that is about to be sent user = user ? user : (window.Owner ? window.Owner : null); // collect all attrs this.grab = function() { var attributes = { user: null, ...
true
0df38a8880328218f90e7f89458a005e22387071
JavaScript
adamtysonsmith/RefactorU_Lecture_Code
/week7/angular-intro/controllers/api.js
UTF-8
815
2.890625
3
[]
no_license
var Animal = require('../models/animal.js'); var apiController = { get: function(req, res) { // Should be able to query for all animals in the db, or just one Animal.find({}, function(err, animals){ res.send(animals); }); }, create: function(req, res) { // ...
true
65b0e83f0a8a9751760590f8c733cee11c194316
JavaScript
secnec/full-stack-open-2018
/osa4/utils/list_helper.js
UTF-8
2,084
3.28125
3
[]
no_license
const dummy = (blogs) => { return(1) } const totalLikes = (blogs) => { return(blogs.reduce((total, current)=>total+current.likes,0)) } const favoriteBlog = (blogs) => { const likesArray = blogs.map(blog => blog.likes) let max = likesArray[0] let index = 0 for (let i =1; i<likesArray.length; i+...
true
93ce6f1221f0228789e50de6d728a8d014de78da
JavaScript
stanislaaavvv/PostOfficeOOP
/PostofficeFactory.js
UTF-8
2,137
3.171875
3
[]
no_license
/** * Created by user on 9/6/16. */ var workersFirstName = ['Ivan','Dimitur','Vasil','Petur','Stoyan']; var workersLastName = ['Karamfilov','Iliev','Petkov','Zaprqnov','Todorov']; var workersYear = ['15','16','10','22','11']; function PostofficeFactory (PostOffice) { this.postoffice = PostOffice; }; PostofficeFac...
true
057097ec819302b78349ca1b5bbb8c8392d2bf91
JavaScript
girasella/dataviz
/app_chart.js
UTF-8
4,685
2.875
3
[]
no_license
async function draw() { const data = await d3.csv('data/delittiPS2.csv', d3.autoType) console.log(data) let dimensions = { width: 1000, height: 500, margins: 50, }; dimensions.ctrWidth = dimensions.width - dimensions.margins * 2 dimensions.ctrHeight = dimensions.height -...
true