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
8297c4f670d45af6dc31d9f5e58efa824a75c057
JavaScript
wangkailang/simply-cli
/commands/md2pdf.js
UTF-8
2,078
2.59375
3
[ "MIT" ]
permissive
const mdpdf = require('mdpdf'); const path = require('path'); const fs = require('fs'); const listDirFiles = require('../utils/list-dir-files'); const { error, success } = require('../utils/output'); async function asyncConvert(options) { await new Promise((resolve, reject) => { mdpdf.convert(options).then((pdfP...
true
0199a7d9d260376ec20c19ac4981b43563f32499
JavaScript
srouse/protodata
/lib/ProtoDataDeserializer.js
UTF-8
1,559
2.59375
3
[ "ISC" ]
permissive
var ProtoDataDeserializer = function () { this.last_id = 0; this.id_hash = {}; } ProtoDataDeserializer.prototype.rebuildFromSerializedString = function ( json_str ) { var data = JSON.parse( json_str ); this.rebuildFromSerializedJSON( data ); } ProtoDataDeserializer.prototype.rebuildFromSerializedJS...
true
30de294b66f0c88b63ecc09d33206101c672a19f
JavaScript
tayurus/real-russia
/blocks/steps/steps.js
UTF-8
691
2.71875
3
[]
no_license
$('[data-steps]').click(function(){ let currStep = $(this).attr('data-steps'); //hide all steps $("[data-step]").hide(); //show next step $("[data-step="+currStep+"]").show(); $(window).scrollTop(0); $(".steps__item_active").addClass("steps__item_visited"); $(".steps__item").removeCla...
true
0c86f4b7d9ee20f11cf87d4663039d5ccbf4cf6c
JavaScript
FattyboyN/blinksocks
/src/utils/speed-tester.js
UTF-8
606
3.3125
3
[ "Apache-2.0" ]
permissive
export class SpeedTester { _totalBytes = 0; _lastTime = Date.now(); _lastSpeed = 0; /** * put some bytes to measure later * @param bytes */ feed(bytes) { this._totalBytes += bytes; } /** * return speed in byte/s * @returns {number} */ getSpeed() { const now = Date.now(); ...
true
f656dea22587ed6a2d786a8eda4b01e7405eaf3e
JavaScript
Adrymne/leaderboard
/src/store/selectors.test.js
UTF-8
3,193
2.5625
3
[]
no_license
import * as sut from './selectors'; import { UserList, toListKey, Maybe, SortField, SortOrder } from 'types'; describe('isDataInActiveList', () => { const subject = sut.isDataInActiveList; it('no data loaded for active list', () => { const LIST = UserList.RecentTop; const state = { userList: { ...
true
3b7d8221351785ccf04316abf61fed7cd1e2ac11
JavaScript
lerwine/FlowDefinitelyTyped
/flow-types/types/katex_vx.x.x/flow_v0.25.x-/katex.js
UTF-8
2,986
2.734375
3
[ "MIT" ]
permissive
declare module "katex" { /** * Documentation: https://katex.org/docs/options.html */ declare export interface KatexOptions { /** * If `true`, math will be rendered in display mode * (math in display style and center math on page) * * If `false`, math will be rendered in inline mode ...
true
8f611f0a4ba163d93fea025c1f5ff7921c58fb67
JavaScript
youozhan/p5Intro
/04/js/sketch.js
UTF-8
1,144
3.515625
4
[]
no_license
var dancingWords = []; var texts; // create a new object class DanceSpan { constructor(element, x, y) { element.position(x, y); this.element = element; this.x = x; this.y = y; } brownian() { this.x += random(-6, 6); this.y += random(-6, 6); this.element.position(this.x, this.y); } ...
true
9d53fb675dc031ab69e006c41b19776475845666
JavaScript
sigridurbara/sigridurbara.github.io
/Verkefni08-Fígúruskopp/sketch.js
UTF-8
3,310
3.125
3
[]
no_license
// Hér kemur kóðinn þinn: var kisaX = 100; var kisaY = 100; var hradiX = 5; var hradiY = -6; var andlitKisu = 115; //var eyruKisu = 60; var minnieyruKisu = 20 //inn í eyrun var auguKisu = 40; //var stig = 2; function setup() { createCanvas(800,500); //rectMode(CENTER); //textFont("Courier New",16); //textStyle(B...
true
380e1d00ae88d04075f13b9dc54b7b52d91e6c80
JavaScript
fanwei207/Julia
/script/julia.validate.js
UTF-8
1,679
3.546875
4
[ "MIT" ]
permissive
 //短日期:2013-04-01 function isDate(str) { var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/); if(r == null) return false; var d= new Date(r[1], r[3]-1, r[4]); return (d.getFullYear() == r[1] && (d.getMonth() + 1) == r[3] && d.getDate() == r[4]); } ...
true
0c04c2d3a7941cd478c97cc1fccc271cada2889c
JavaScript
Bunyapron/mdt-test1
/assignment6/register.js
UTF-8
678
3
3
[]
no_license
window.onload = pageLoad; function pageLoad() { let myForm = document.getElementById("myForm") myForm.onsubmit = validateForm } function validateForm() { //ถ้าตรวจสอบแล้วว่ามีการ register ไม่ถูกต้องให้ return false ด้วย let password = document.forms["myForm"]["password"].value let repassword = do...
true
7db71e6a4ac67768bd05e7a320084e93e3ce0511
JavaScript
alexandrospopov/parisLumiere
/histogram_mois.js
UTF-8
6,666
2.625
3
[]
no_license
var margin = {top:20, right:50, bottom:0, left:20}, width = 600 - margin.left - margin.right, height = 400 - margin.top - margin.bottom; var histHeight = height/4; var format = d3.timeParse("%Y-%m-%d"); var formatDateIntoYear = d3.timeFormat("%Y"); var startDate = new Date("2016-01-0...
true
82fd9dd76e0f5407a1b93c6b3594aa93a067e09b
JavaScript
priyankajakob/eventsregistration-frontend
/src/components/registrations/Preview.js
UTF-8
3,871
2.578125
3
[]
no_license
import React from 'react' import axios from '../../config/axios' import '../../styles/Registration.css' export default class PreviewComp extends React.Component{ constructor(props){ super(props) this.state = { registerFormData: {}, userFormData: {}, registered: ...
true
00f36fdb26a5ccd268a1ad3fb40ac76d894f174a
JavaScript
renew-js/renew-lib
/src/features/factory/providers/FactoryProvider.js
UTF-8
768
2.765625
3
[ "MIT" ]
permissive
export class FactoryProvider { constructor (defaultFactory) { this.defaultFactory = defaultFactory; this.factory = defaultFactory; } set (factory) { if (!factory.createShape || !factory.createConnection || !factory.createLabel ) { throw n...
true
86309c52e4fd6ad0e86b1019727278f68654d700
JavaScript
liuj32/PersonalBlog
/算法/LeetCode_problem-and-solution/1403.非递增顺序的最小子序列/solutions.js
UTF-8
530
3.328125
3
[]
no_license
/** * @param {number[]} nums * @return {number[]} */ var minSubsequence = function(nums) { var sum = nums.reduce((a, b) => a+b, 0) var half = Math.floor(sum / 2) var tempSum = 0 var res = [] for(var i=0;i<nums.length;i++) { for(var j=i+1;j<nums.length;j++){ if (nums[i] < nums[...
true
dd2e283f79659583a2c4012e1e0014299f70bee6
JavaScript
AustinBratcher/shipengine-js
/src/models/package.js
UTF-8
1,355
2.90625
3
[ "ISC" ]
permissive
// TODO change name to parcel to not conflict with JS keyword class Package { // TODO add label messages // https://docs.shipengine.com/docs/custom-label-messages /** * * @param {Object} weight - Object with description of package weight * @param {number} weight.value - decimal number value of pack...
true
9d3ab13557f7ef2d8afab9d7ea68bb5c4f24fcab
JavaScript
Bytesu/my-koa
/labs/js/random.js
UTF-8
494
3.0625
3
[]
no_license
/** * Created by byte_ on 2015/7/6. */ function Random (){} Random.prototype.random1 = function(){ return Math.random().toString(36).substr(2, 15); } Random.prototype.random2 = function(len){ var test = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; len = len?len:32; var pwd = ''; var maxP...
true
d4f68c8c9ff5fe8f20bacb661c152b86882a5979
JavaScript
jongho123/NodeBackendPractice
/tests/routes/auth.test.js
UTF-8
4,488
2.515625
3
[]
no_license
const expect = require('chai').expect; const request = require('supertest'); const app = require('../../app'); const db = require('../../mysql_db'); const bcrypt = require('bcrypt'); const user_data = { username: 'auth_test1', password: '1234' }; const user_data2 = { username: 'auth_test2', password: '1234' };...
true
a8e91557a8a9ceec70cd39131e3c3c7c8f5f9c4d
JavaScript
bloodred17/WSA
/JSProject/ToDoApp/js/app.js
UTF-8
1,005
3.421875
3
[ "MIT" ]
permissive
let todos = renderTodos(); //Get input from search field const searchText = document.getElementById('input_todo-search'); if(searchText.value === ""){ renderTable(todos); }else if(searchText.value === "*0000#"){ const incompleteTodos = todos.filter((todo) => { if(todo.status === false){ ret...
true
4b2ffdada12d46ec4e4c93a213bb42286428b56e
JavaScript
kakhlaghi/IdeaMe
/src/actions/postServices.js
UTF-8
1,865
2.8125
3
[]
no_license
export function fetchPosts (dispatches) { return function(dispatch){ dispatch({type: 'LOADING POSTS'}) fetch('http://localhost:3001/api/v1/posts.json', { method: 'GET' } ) .then(response => response.json()) .then(postCollection => { dispatch(...
true
f2fdfc7324ed39acf08a9979dbe13d13d0f95b14
JavaScript
ickhov/USAstronautsVisualization
/scripts/map.js
UTF-8
11,314
2.609375
3
[]
no_license
var treeMap = {}; var selectedNames = {}; var networkGraph; var svg = d3.select("#map"); var boundingBox = svg.node().getBoundingClientRect(); // grab the width and height of our containing SVG var height = boundingBox.height; var width = boundingBox.width; var stateCode = { 'Alabama': 'AL', 'Alaska': 'AK',...
true
4375e46ffcbe8ada1460fd259ec4ffa265afc9be
JavaScript
lucaBallabio/gestioProgetto
/Progetto personale/js.js
UTF-8
694
2.765625
3
[]
no_license
var vettQuantità = []; var vettAlimenti = []; var vettCosto = []; numEl = 0; var c=0; function aggiungiTabella() { for (var i = 0; i < numEl; i++) { if (vettAlimenti[i] == a) { vettQuantità[i] = vettQuantità[i] + 1; c=1; } } if (c=0) { vettAli...
true
3f91f1b4b2a520ea5a340cb02a3c5e84cf3d33a9
JavaScript
Kacper-Szata/UIGame
/JS/oldScript.js
UTF-8
5,169
3.453125
3
[]
no_license
var headStickman = new Array("./IMG/AIR_stickman.png","./IMG/EARTH_stickman.png","./IMG/FIRE_stickman.png","./IMG/WATER_stickman.png"); //enemyElement.src = //var randomNum = Math.floor() //health function GameObject() { var health = 100; var element = "./IMG/EMTPY"; } var player //timer const startingMi...
true
b298e99b2171d5c7dc128a2fde0bc86e7bd90bae
JavaScript
LanceRabbit/spree-frontend
/src/counter/redux.js
UTF-8
572
2.875
3
[]
no_license
// actions const INCREMENT = 'counter/INCREMENT'; const initState = { count: 0, } // reducer const reducer = (state = initState, action) => { switch (action.type) { case INCREMENT: { return { ...state, count: state.count + 1, }; } default: return state } } export d...
true
33e8c42ad098050faee458a4aa8fd042f8554cfa
JavaScript
eriheriyadi97/game-of-life-es6
/test/domain/coordinateSpec.js
UTF-8
4,808
3
3
[ "MIT" ]
permissive
import Coordinate from 'lib/domain/coordinate'; import Cell from 'lib/domain/cell/cell'; describe('Coordinate', function() { beforeEach(() => { this.coordinate = new Coordinate(3, 3); }); it('should throw exception when invalid coordinates provided', () => { should.throw(() => { /*eslint no-new:0 ...
true
dd415f4f01dd16cc49fe5c5ca79f47fd8f8a12e0
JavaScript
eivindml/nova-do
/Scripts/main.js
UTF-8
3,933
3.125
3
[]
no_license
var treeView = null; exports.activate = function() { // Do work when the extension is activated // Create the TreeView treeView = new TreeView('do', { dataProvider: new FruitDataProvider(["Hello"]), }); treeView.onDidChangeSelection(selection => { // console.log("New selection: " + selection.map((e) => e.na...
true
c38ae0edebffd6925705e67f4896d4d7d6fe3295
JavaScript
SheetalBhyravajosula/ProjectsTracker
/services/employeeServices.js
UTF-8
2,923
2.515625
3
[]
no_license
const employeeSchema = require("../schemas/employeeSchema"); const projectSchema = require("../schemas/projectSchema"); const exists = "Exists"; const doesNotExist = "DoesNotExist"; exports.getEmployees = function (callback) { employeeSchema.aggregate( [ { $lookup: { from: "Project", ...
true
f5b2e820a9d53c882e329d2b75b654506e67f634
JavaScript
Mpilo-Pillz/ToDo-API
/public/appromise.js
UTF-8
503
2.65625
3
[]
no_license
const http = new fikaTTP; http.get('/api/todos') .then(data => console.log(data)) .catch(err => console.log(err)); let userInput = document.getElementById('todoInput').value; const data = { name: userInput }; http.post('/api/todos', data) .then(data => console.log(data)) .catch(data => console.log(err)); http.put('...
true
b082bde9259c30a0c436325633861a70da749295
JavaScript
i-try-it/try-cote-js
/ping-pong/client.js
UTF-8
291
2.5625
3
[]
no_license
var cote = require('cote'); var client = new cote.Requester({ name: 'client' }); function sendRequest(){ console.log('sending ping...'); client.send({ type: 'ping' }, function(res) { console.log('reseived', res); }); }; setInterval(sendRequest, 2000);
true
1d996f8f35b9f1e57af363130e13dcd41d59e519
JavaScript
sudo-woodo-dev/HotSpotz
/hotspotz_frontend/src/components/Profile.js
UTF-8
3,063
2.515625
3
[]
no_license
import React, { Component } from 'react'; import { Grid, Row, Col } from 'react-bootstrap'; import '../css/Login.css'; import AuthService from '../services/AuthService' import StarRatingComponent from 'react-star-rating-component'; import NavigationPages from './NavigationPages' import '../css/NavigationPages.css'; co...
true
0fdcd35b9f84c02bcd354ae611e0e5457ac48bba
JavaScript
arunreturns/react-school-ui
/src/api/fetchAPI.js
UTF-8
1,215
2.96875
3
[]
no_license
/* global fetch */ function handleErrors(response) { if (!response.ok) { console.log("Error in fetch", response.statusText); } return response.json(); } export function doGet(fetchUrl) { let getData = { method: 'GET', credentials: 'include' }; return fetch(fetchUrl, getData) .then(handleEr...
true
5dbd5dc5fa1b226e05c1818d19fb4dba2fc63448
JavaScript
hunter-s70/TicTacToe
/source/js/controller.js
UTF-8
4,008
2.6875
3
[]
no_license
//Points Table // 1 | 1 | 1 // ---|---|--- // 1 | 1 | 1 // ---|---|--- // 1 | 1 | 1 // ----------------------------------------------- //if player put value in column ---> 1 point app.controller('TicTacCtrl', function($scope, $timeout) { $scope.audioEffects = { draws: 'audio/draws.wav', winner: ...
true
e554caa581d7b24524fbc44d2622bb09abb30a03
JavaScript
swguilbeault/sorting-visualized
/js/column.js
UTF-8
953
2.515625
3
[]
no_license
class Column { static hue = 0; constructor(id, value) { this.id = id; this.value = value; this.pos = null; this.pos0 = 0; this.color = new HSLA_Color(Column.hue, 1, 0.75); this.color0 = new HSLA_Color(Column.hue, 1, 0.75); this.color_b = new HSLA_Color(Column.hue, 1, 0...
true
6cf6353e964c9a07c3ba10bade9b134edb6d44cf
JavaScript
liusimin0206/Front-end-Learning
/test1/104.二叉树的最大深度.js
UTF-8
1,038
2.9375
3
[ "ISC" ]
permissive
/* * @Author: your name * @Date: 2020-11-18 14:58:39 * @LastEditTime: 2020-11-18 14:59:11 * @LastEditors: your name * @Description: In User Settings Edit * @FilePath: \test1\104.二叉树的最大深度.js */ /* * @lc app=leetcode.cn id=104 lang=javascript * * [104] 二叉树的最大深度 */ // @lc code=start /** * Definition for a bin...
true
a0c3f0e6d3959bdb0cf770721f854823e7f79438
JavaScript
wdpoppe/webpack-website-starterkit
/src/index.js
UTF-8
875
2.671875
3
[]
no_license
import _ from 'lodash'; import Max from './max.jpg'; import printMe from './print.js'; require('../src/app.scss'); function component() { var element = document.createElement('div'); var btn = document.createElement('button'); // Lodash, now imported by this script element.innerHTML = _.join(['Hello', 'webpack...
true
55d2ce4fceaf8d6a542001d58c27360599eef2aa
JavaScript
LevianthProject/Javascript
/learn/Basic/015_basic_program/recursive.js
UTF-8
807
3.828125
4
[ "MIT" ]
permissive
// implementasi recursive untuk mencari ujung dari garis geometri // yang perlu diketahui : // a = suku pertama // n = banyak suku // cara kerja : // setiap pemanggilan function ,kita akan merubah nilai n dari variabel u1, misalnya n = 4, maka u1 = 3 // kemudian kita melakukan pengecekan dari variabel u1 , jika lebi...
true
693aa3758e838fa576ed63d6936404060b470c59
JavaScript
Maciej-Dutkiewicz/8.6.-Instrukcje-warunkowe-if-switch-oraz-short-if
/js/scripts.js
UTF-8
569
3.578125
4
[]
no_license
var a = prompt('Wartość zmiennej a dla równania (a*a)+(2*a*b)-(b*b)'), b = prompt('Wartość zmiennej b dla równania (a*a)+(2*a*b)-(b*b)'), value = (a*a)+(2*a*b)-(b*b); console.log('Podstawiamy do poniższego równania zmienne ' + 'a = '+ a + ' i ' + 'b = ' + b); console.log('Wynik równania ' + 'value = (a*a)+(2*a*b)-(b*...
true
f914cff4fc55758bca21b6c74058b76966923a13
JavaScript
diegosv2000/CRUD-with-FirestoreDB
/src/app.js
UTF-8
6,769
3.046875
3
[]
no_license
// Initialize Cloud Firestore through Firebase firebase.initializeApp({ apiKey: 'AIzaSyAMEQ3U2m-wylRoMGbS8poo_rEuc6mu3Nw', authDomain: 'crud-v2-d7711.firebaseapp.com', projectId: 'crud-v2-d7711' }); var db = firebase.firestore(); // Show Form function formD(){ document.getElementById("data").innerHT...
true
ee16d6522dcc327bfa3e2528c40eb049822ea393
JavaScript
YemreAybey/ToDo-App
/src/modules/toDo.js
UTF-8
230
2.578125
3
[]
no_license
class ToDo { constructor(title, date, status, descr = 'Dont Forget', isDone) { this.title = title; this.date = date; this.status = status; this.descr = descr; this.isDone = false; } } export default ToDo;
true
ecf62eb9e0ea5f79b1859a8c1ca0113d7eb660e1
JavaScript
marcellinamichie291/kraken-api-universal-client
/src/utils/createBuildApiSignature.test.js
UTF-8
1,200
2.625
3
[ "MIT" ]
permissive
import createBuildApiSignature from './createBuildApiSignature' describe('createBuildApiSignature', () => { it('throws if secret is missing', () => { const attemptCreateGetSignature = () => { return createBuildApiSignature() } expect(attemptCreateGetSignature).toThrow(/"secret" is missing/) }) ...
true
1c3b990d29ebd0414dc2e0a5efdf7528d409add7
JavaScript
edmondtam1/can-u-sing
/w1d3/jc/01-searchInsertPosition.js
UTF-8
1,099
4.5
4
[]
no_license
/** * Input: Array (sorted), Integers (target value) * Output: Integer (index of target or index where it would be if inserted in order) * * Rules * - Assume no duplicates * * [1, 3, 5, 6], 2 * [1] return idx++ * * [1, 3, 5, 6, 8], 7 * [6,8] * [8] return idx-- * * Algo * - O(N) * - Iterate over array,...
true
1bd0cc46e56720224f9922a5764694c7c3c5add8
JavaScript
krusli/ws-4-sample-solution
/models/db.js
UTF-8
231
2.765625
3
[]
no_license
let faker = require('faker'); var NO_OF_USERS = 10; let users = []; for (let i=0; i<NO_OF_USERS; i++) { users.push({ name: faker.name.findName(), email: faker.internet.email() }); } module.exports = users;
true
6346ce87983e88a8558ed68284dddefdecbea8be
JavaScript
JBonfim/vitrinedigital
/public/teste/js/app.js
UTF-8
1,668
2.84375
3
[]
no_license
//Model var Tweet = Backbone.Model.extend({ post:{ text:null, title:null } }); //Colection var Tweets = Backbone.Collection.extend({ model:Tweet }); //URL: https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=twitterapi&count=2 //...
true
4fa203777a13686cb7038f8fbc5bcc24125a72c4
JavaScript
Eifel42/starNotary
/smart_contracts/test/StarNotaryClaimTest.js
UTF-8
2,037
2.546875
3
[ "MIT" ]
permissive
const StarNotary = artifacts.require('StarNotary') contract('Claim StarNotary', accounts => { const user1 = accounts[1]; beforeEach(async function () { this.contract = await StarNotary.new({from: accounts[0]}) }) describe('claim new star', () => { const createUser = accounts[1]; ...
true
19f1b1c9586ac343dc309f32aaecfa1f68ef72ef
JavaScript
WarGier/library
/js/app.js
UTF-8
1,422
3.734375
4
[]
no_license
'use strict' let myLibrary = []; const bookLibraryList = document.querySelector('.books-list'); const bookTitle = document.querySelector('.book-title'); console.log(bookTitle.textContent) function Book( title, author, pages, read ){ this.title = title; this.author = author; this.pages = pages; this....
true
59078f62d00ec94e5d082e56ecb814b3dd679d20
JavaScript
daw-malaga-2020/advanced_js
/students/elisabet_rodriguez/practices/04_sum_of_minimuns/src/main.js
UTF-8
260
3.21875
3
[]
no_license
export const sumOfMinimums = (arr) => { let total = 0 for(let i=0; i<arr.length;i++){ let minimum = arr[i][0] for(let j=0; j<arr[i].length;j++){ minimum = Math.min(minimum, arr[i][j]) } total += minimum } return total }
true
f20561cc3606abe8b0edaaae5ec6837eb7af0a87
JavaScript
lyskos97/simple-ecommerce
/src/models/user.js
UTF-8
1,283
2.546875
3
[]
no_license
const mongoose = require('mongoose'); const { hashSync, compareSync } = require('bcrypt'); const Product = require('./product'); const UserSchema = new mongoose.Schema( { firstName: { type: String }, lastName: { type: String }, email: { type: String, required: true, ...
true
3eda08d65b52949f234ade86cef9ec72e6a3aeba
JavaScript
cherepanov92/zar-marathon
/src/routes/Game/routes/Board/index.js
UTF-8
4,678
2.734375
3
[]
no_license
import { useContext, useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { PokemonContext } from '../../../../context/pokemonContext'; import PokemonCard from '../../../../components/PokemonCard/PokemonCard'; import PlayerBoard from '../../../../components/PlayerBoard'; import s ...
true
0c53198316206aa2c8e3df376f336fe4d5e6c025
JavaScript
jetpks/better-irc
/lib/dispatcher.js
UTF-8
2,279
2.671875
3
[]
no_license
(function() { "use strict"; var events = require('events') , dispatcher = new events.EventEmitter() , raw , opts , c ; /* the bread and butter */ function handle(data) { data = data.split('\r\n'); data.forEach(function(line) { if(/^:/.test(line)) { dispatcher.emit(l...
true
9e8487d9607331c8a770b33650f57888e4d421c8
JavaScript
jdhartley/terminal-for-fitbit
/common/settings.js
UTF-8
2,321
2.53125
3
[ "Unlicense" ]
permissive
const DATA_LINE_MAP = { TIME: 'Time', TIMESECS: 'Time with seconds', DATE: 'Date', BATT: 'Battery', STEP: 'Step count', LVLS: 'Elevation gain', DIST: 'Distance', HRRT: 'Heart rate', CALS: 'Calories burned', AZMS: 'Active Zone Minutes', }; const getDatalineObjectByValue = (value)...
true
0ab62551145f2b37837efde197971c9df95937a7
JavaScript
MattMcAlear/Dodgeball
/js/main.js
UTF-8
7,718
2.734375
3
[ "MIT" ]
permissive
'use strict'; (function(){ var balls = [], worldObjects = []; function startGame(){ // set the scene size var WIDTH = window.innerWidth, HEIGHT = window.innerHeight; // set some camera attributes var VIEW_ANGLE = 45, ASPECT = WIDTH / HEIGHT, NEAR = 0.1, FAR = 10000; // get the DOM element to attach to...
true
adad4f803f8d02ab3b89a324f6af1cf313c4be1b
JavaScript
Sengkhun/distributed-database
/server/functions/helper.js
UTF-8
381
2.984375
3
[]
no_license
import _ from 'lodash'; export const removeLastComma = (value) => { const index = value.lastIndexOf(','); return value.slice(0, index) + value.slice(index + 1); }; // ---------------------------------------- export const compareArrayElements = (arr1, arr2) => { _.forEach(arr2, element => { if (arr1[el...
true
7ea7b02928629c48e172959253f1a311ef094c40
JavaScript
Joker0001/old-fusion
/commands/configs/prefix.js
UTF-8
1,080
2.59375
3
[]
no_license
module.exports.run = async (bot, message, args, database) => { if (message.author.id !== '216691050293624833' && !message.member.hasPermission('ADMINISTRATOR')) return message.channel.send(('Você **não possui** permissões suficientes.')); if (!args[0]) return message.channel.send({ embed: { ...
true
c89cfbe0fff57d7c419467ce81ff53b260437a09
JavaScript
prince-thind-archive/jest-testing
/reverseString/reverseString.test.js
UTF-8
881
3.0625
3
[]
no_license
import reverseString from "./reverseString"; test.skip('invalid input',()=>{ expect(reverseString()).toBe(null); expect(reverseString(null)).toBe(null); expect(reverseString(undefined)).toBe(null); expect(reverseString(NaN)).toBe(null); expect(reverseString(' ')).toBe(null); }) test.skip('sing...
true
c3ee64230da1e941e8d6248d1bbc49aecfe2325d
JavaScript
wwwnghks/exchange
/hap/Exchange/src/main/webapp/resources/js/birth.js
UTF-8
712
2.984375
3
[]
no_license
var today = new Date(); var toyear = parseInt(today.getFullYear()); var start = toyear - 5 var end = toyear - 70; document.write("<font size=2><select name=mem_birth1>"); document.write("<option value='' selected>"); for (i = start; i >= end; i--) document.write("<option>" + i); document.write("</select>년 "...
true
a55145adca9d009c57887f2d098c89b74bc84c1a
JavaScript
dannykustin/TextToBrail
/js/convert.js
UTF-8
4,019
4.15625
4
[]
no_license
// 97 = ASCII code for 'a' // 65 = ASCII code for 'A' var input; $(document).ready(function() { $("#submitbutton").click(function() { input = $("#inputfield").val(); $('#output').empty(); interpretString(input); }); }); /* Check special characters Check numbers Check letters */ ...
true
e689da605c2126effb2d9e64140e1340af7b0fb0
JavaScript
kanafas/kanafas
/utils/Numbers.js
UTF-8
2,823
3.875
4
[]
no_license
export class Numbers { /** * Remapuje hodnotu na novou škálu * @param value Současná hodnota na remaping * @param min1 Současné minumunm * @param max1 Současné maximum * @param min2 Nové minimum * @param max2 Nové maximum */ static remap(value, min1, max1, min2 = 0, max2 = 1) ...
true
0a0baa69e9a7eca84a9a4fff16df678a81b43205
JavaScript
vatsalpande/FCCJSSolutions
/CardCounting/solution.js
UTF-8
582
3.109375
3
[]
no_license
( function IIFE() { "use strict"; var count = 0; function cc(card) { // Only change code below this line var plusCard = [2,3,4,5,6]; var minusCard = [10, 'J', 'Q', 'K', 'A']; var betInfo; if(plusCard.indexOf(card) != -1){ count = count +1; }else ...
true
5b6e08197302f1a1adf7aaf5c92ec6f87c3ef05e
JavaScript
MaZarrr/svisni-sushi
/src/utils/filtersProducts.js
UTF-8
1,247
2.984375
3
[ "MIT" ]
permissive
const filterProducts = (product, searchText, priceFilter, checkboxFilter) => { const search = (items, txt) => { if(txt === undefined) { return items } return items.filter((node) => { return node.name.toLowerCase().indexOf(txt.toLowerCase()) > -1 }) }; ...
true
93cbbc5c0cac890f3428e2b72c959f86dfaff278
JavaScript
habemus/intercomm
/previous/lib/promise-try.js
UTF-8
191
2.53125
3
[]
no_license
const promiseTry = (fn, args) => { return new Promise((resolve, reject) => { try { resolve(fn.apply(null, args)) } catch (err) { reject(err) } }) } module.exports = promiseTry
true
9fc185abde75af7380cf305fb401ea158f2a9e17
JavaScript
chiquitto/PokedexAppAlloy
/app/controllers/PokemonDetailType.js
UTF-8
1,963
2.671875
3
[ "Apache-2.0" ]
permissive
function generateTypeCell(typeId, classes) { var view = $.UI.create("View", { classes : ['typeCell'].concat(classes), }); /* var widget = $.UI.create("Widget", { typeId: typeId, src: 'TypeLabel', }); */ var widget = Alloy.createWidget('TypeLabel', 'widget', { typeId : typeId, src : 'TypeLabel', }); ...
true
9a7114689df3ecbd86a067a54aa78d9c7e5646d3
JavaScript
jhermsmeier/node-apple-data-compression
/lib/adc.js
UTF-8
2,011
2.875
3
[ "MIT" ]
permissive
var ADC = module.exports /** @type {Number} Chunk is a data run */ ADC.CHUNK_DATA = 0x80 /** @type {Number} Chunk is a 3 byte code */ ADC.CHUNK_THREE = 0x40 /** @type {Number} Chunk is a 2 byte code */ ADC.CHUNK_TWO = 0x3F /** * Get the type of a chunk by its marker byte * @param {Number} byte * @returns {Number} ...
true
a1b4948f841109b096790b4891c92ca490da1a15
JavaScript
pluto7783/infiCod
/infiCod/WebContent/WEB-INF/jsp/CE/content/ifr/ifr.js
UTF-8
382
2.703125
3
[]
no_license
function onLoadFuc(){ console.log("===== ifr.js 11 =====") } /* var ifr = document.getElementsByTagName("iframe"); var ifrlength = ifr.length; for (var i = 0; i < ifrlength; i++){ ifr[0].remove(); } */ /** * querySelectorAll 셀렉터를 이용한 제거 */ var ifr = document.querySelectorAll("iframe") ifr.forEach(function(r){ r...
true
9730cbaf37dcca6bf46d14b00f8b9e1e0ecac46f
JavaScript
signey173607/nc-students
/react/w2/lectures/src/5-export-import/exports.js
UTF-8
524
2.890625
3
[]
no_license
// Named Export -> import { originalName } from './file-path' // you can multiple named exports per file export const message = "Hello how are you?"; export const messag = "Hello how are you?"; export const messa = "Hello how are you?"; export const mess = "Hello how are you?"; // Default Export -> import anyNameYouWa...
true
5f1c94c7f2c8a814ace65dc20d433cd592c717ab
JavaScript
glifchits/waterloohacks
/App/src/WeatherContainer.js
UTF-8
3,472
2.6875
3
[]
no_license
'use strict'; import React, { Component, StyleSheet, Image, View, Text, TouchableOpacity } from 'react-native'; var Icon = require('react-native-vector-icons/Ionicons'); var BottomMetrics = React.createClass({ render() { return ( <View style={styles.bottomMetrics}> <Text>{`Wind Spee...
true
bbe43ec182adf6f89a3293b48a0119be5238fabc
JavaScript
Sisa95/first_terminal_test
/test/findItemsOver.test.js
UTF-8
782
2.515625
3
[]
no_license
let assert = require("assert"); let findItemsOver = require("../functions/findItemsOver"); describe('findItemsOver' , function(){ it('Should return items over 25' , function(){ assert.deepEqual(findItemsOver([ {name : 'apples', qty : 10}, {name : 'pears', qty : 37}, {nam...
true
b546dd85e70db80839efd80919c249b2ea634c39
JavaScript
alperenmehmet/innovance-patikadev-react-bootcamp
/Homework-01-Bill-Gates-Money/index.js
UTF-8
3,561
3.4375
3
[]
no_license
import productList from './productList'; class BillGatesApp { constructor(productArray) { //Store your variables that could change somewhere in app this.store = { products: productArray.map((product) => ({ ...product, amount: 0 })), money: Number.MAX_SAFE_INTEGER, }; this.root ...
true
16056bc03ca06ad40a026e29a33a2af3fcd24f51
JavaScript
ericwangqing/12307
/lib/controllers/api.js
UTF-8
1,682
2.640625
3
[]
no_license
'use strict'; // var Tickets = require('../api/tickets'); var ticketsManager = require('../api/tickets-manager').getInstance(); var A_DAY = 24 * 60 * 60, mongoose = require('mongoose'), Thing = mongoose.model('Thing'), Train = mongoose.model('Train'); var setCacheControl = function(res, maxAge){ res.set...
true
0df27ca2bb559932443adb7953f19f5f2cdd03b9
JavaScript
EdicarlosLS/Criador-de-Cena
/js/formatadorpadrao.js
UTF-8
443
3.15625
3
[ "MIT" ]
permissive
function FormatadorPadrao() { this.formatar = function (elementos) { var string = ""; for (var i in elementos) { string += "new " + elementos[i].etiqueta + "("; string += elementos[i].x * 2 + ", "; string += elementos[i].y * 2 + ", "; string += element...
true
bf9fb5988cb8be907a2e912cbee20a8bc6342670
JavaScript
kasdd/test
/public/controllers/PostController.js
UTF-8
1,331
2.546875
3
[]
no_license
(function () { angular.module('flapperNews').controller('PostController', PostController) PostController.$inject = ['postService', 'auth', 'post'] function PostController(postService, auth, post) { var vm = this; vm.post = post; vm.addComment = addComment; vm.deleteCommen...
true
4dfbc7756839aa93cf95dab25c7c08449c9442d9
JavaScript
justin-m-lacy/chargrid
/util/charutils.js
UTF-8
1,345
3.359375
3
[]
no_license
import { BLOCK_CHAR } from "../consts"; /** * @const {RegExp} NonWord - matches nonword characters. */ export const NonWord = /\W+/gi; /** * @const {RegExp} WhiteSpace - regex matching whitespace. */ export const WhiteSpace = /\s+/gi; /** * Get length of longest word. * @param {string[]} words */ export functi...
true
961c172231a8f92c9e777e9fd783570ab90a6316
JavaScript
rafaelfsobral/alura-fundamentos-js
/JS - Arrays/media-for.js
UTF-8
191
2.96875
3
[]
no_license
const notas = [10, 6.5, 8, 7.5] let somaDasNotas = 0; for (let i=0; i<notas.length; i++){ somaDasNotas += notas[i] } let media = somaDasNotas/notas.length console.log(media)
true
eb9e1f36bc254d5288937623a32a2f4db9ba2a7a
JavaScript
kubar123/stockControl
/assets/js/main.js
UTF-8
12,294
2.671875
3
[]
no_license
/* Creator:Jakub Rybicki Creation Date: 12/08/2015 */ var APIURL="http://tafeapi.lansoftprogramming.com/index.php"; function getNumFromValTextBox(elem){ var num=$(elem).parent().find('input').val(); num=parseInt(num); return num; } function setNumToValTextBox(elem, val){ var num=$(elem).parent().find('input').va...
true
34f59115a7269459657a10d96e83435b2d924869
JavaScript
PabloSanz11/node_proyecto1
/routes/pokemon.js
UTF-8
4,822
3.125
3
[]
no_license
const express = require('express'); const pokemon = express.Router(); const db = require('../config/database'); // const pk = require('../pokedex.json').pokemon; Importar la base de datos y extraer el elmento especifico // '' para indicar cuando es texto como tal ////Busqueda por IDs /:id([0-9]{1,3}) 2do get ////Proce...
true
2197f42f11e02ba9d7ad6b1d2801902ef6d6620c
JavaScript
ForSakenSoul35/Zepto-learning
/js/useZepto.js
UTF-8
2,527
3.171875
3
[]
no_license
// 使用zepto实现轮播图 $(function(){ /* 实现轮播图 步骤: 1.添加首尾两张图片 2.重新设置图片盒子宽度和图片的宽度 3.开启定时器 实现自动轮播 4.添加移动端的滑动事件 实现手动轮播 5.添加过渡效果结束之后的监听 */ //1.添加首尾两张图片 //获取轮播图元素 var banner = $(".jd_banner"); var bannerWidth= banner.width(); //获取图片盒子 var imgBox = banner.find("ul:first-of-type"); //获取点标记 var indicat...
true
e62bea941b2c0b6dee2f3ced78f46cf1dfdc5d05
JavaScript
okeken/node-login-system-template
/controllers/signup.js
UTF-8
1,020
2.59375
3
[]
no_license
const bcrypt = require("bcryptjs"); const User = require("../models/user"); const saltRouds = 12; exports.userRegistration = async (req, res) => { const { password, username, email } = req.body; try { if (!username || !password || !email) return res.status(400).json({ status: false, mess...
true
9aed61872008ab449a9f6cd6969de50608c83f7d
JavaScript
vivek-khokhar/capsule_Project
/static_HTML_templates/scripts/cartService.js
UTF-8
2,008
2.859375
3
[]
no_license
export default class CartService { constructor() { this.cartItems = [{ "name": "Fresho Kiwi - Green, 3 pcs", "imageURL": "/static/images/products/fruit-n-veg/kiwi-green.jpg", "description": "Kiwis are oval shaped with a brownish outer skin. The flesh is bright green and j...
true
74ec1591d32f5dd7a0ced98b66a0197f3dc03ece
JavaScript
vernomcrp/tracker_project
/tracker_project/assets/js/geojson_utils.js
UTF-8
996
3.109375
3
[ "MIT" ]
permissive
function fromLatLng(latLng) { return { "type": "Point", "coordinates": [ latLng.lng(), latLng.lat() ] } } function toLatLng(geoJson) { return new google.maps.LatLng( geoJson.coordinates[1], geoJson.coordinates[0] ); } function fromPolygon...
true
808f55ba37d901fbbdbb7fefc519a2a4b664502d
JavaScript
blude/projecteuler
/problems/problem1.js
UTF-8
465
4.1875
4
[]
no_license
/** * Problem #1 - Multiples of 3 or 5 * * If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. * The sum of these multiples is 23. * Find the sum of all the multiples of 3 or 5 below 1000. * * Answer: 233168 */ window.log = console.log; function findSum(maxNum) { ...
true
d5aae7ec2d67ba652ef7701419fec9903f926545
JavaScript
pirainogi/euler_algos
/largest_prod.js
UTF-8
325
3.5625
4
[]
no_license
function largestProd(num){ arr = num.split("").map(Number) const reducer = (acc, curr) => {return acc * curr} let product = 0 for(let i = 0; i<arr.length; i++){ let thirteen = arr.slice(i, i+13) let temp = thirteen.reduce(reducer) if(temp > product){ product = temp } } return produ...
true
6372ca47a8be4b4c49d2bc8e73e7d9487ac210dc
JavaScript
josephmarshall/rock-paper-scissors
/index.js
UTF-8
3,290
3.875
4
[]
no_license
var wins = null; var losses = null; var ties = null; document.getElementById("rock-button").addEventListener("click", function(){ userChoice("rock") }); document.getElementById("paper-button").addEventListener("click", function(){ userChoice("paper") }); document.getElementById("scissors-button").addEventListener(...
true
0bad50d2c0a1674cc201573626ab59af7ead8c06
JavaScript
dotnetCarpenter/monads
/hasTests/partial.js
UTF-8
623
3.15625
3
[]
no_license
"use strict" module.exports = partial const tap = require("tap") const curry = require("./curry") const add = (a,b, c) => a + b + c function partial(f, ...args) { return curry(f).bind(f, ...args) } tap.equal( curry(add)(1)(2)(3), 6, "should be equal to 6") let a = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19] const take = ...
true
a2a7b5d01373cb4919fa89c1e6cf8e87154af5da
JavaScript
ztopia/Typescript_study
/chapter02/part01/dist/05_抽象类.js
UTF-8
729
3.546875
4
[ "MIT" ]
permissive
"use strict"; (function () { /* 以abstract 开头的类是抽象类 抽象类和其他类区别不大,只是不能用来创建对象 抽象类就是专门用来被继承的类 抽象类中可以添加抽象方法 */ class Animal { constructor(name) { this.name = name; } } class Dog extends Animal { sayHello() { ...
true
e987258688e26ce01a4853667e0a4d13439f2791
JavaScript
ChenKaslasi/protfolio-proj
/projs/stockView/js-list/list-controller.js
UTF-8
1,014
2.9375
3
[ "MIT" ]
permissive
'use strict' ; function onPageload() { renderSectors() renderSymbolList(glist) } function renderSymbolList(data) { var htmlString = ` <thead><tr><th>Symbol</th><th>Name</th><th>Sector</th></tr></thead><tbody>` data.forEach(item => { htmlString += `<tr> <td><a class="profileLink" onclick="onPr...
true
80a76ffbd1e6b4b8bbbfb4cdeb564070f337bd54
JavaScript
CJEF/JavaScript-by-Vladilen-Minin
/mamikon.js
UTF-8
14,225
2.84375
3
[]
no_license
(function () { var body = document.querySelector('body'); //прелоадер >>>>>>>>>>>>>>>>>>>>>>*/ var preloader = document.querySelector('.loader'); //body.classList.add('overflow'); window.onload = function () { window.setTimeout(function () { preloader.classList.add('disable'); //document.body.classList.r...
true
f8857a8bf8eacad7ebf6fc30cca94ee90888fef6
JavaScript
ErosMLima/Training-Jan-2021
/Modules/NodeJS/Day10/Vatsal Parmar/Practice Exercise/index.js
UTF-8
1,315
3.1875
3
[]
no_license
const mongoose = require("mongoose"); var mongoDB = "mongodb://localhost/db1"; mongoose.connect(mongoDB, { useNewUrlParser: true, useUnifiedTopology: true }); var db = mongoose.connection; db.on("error", console.error.bind(console, "MongoDB connection error:")); const employeeSchema = new mongoose.Schema({ ID: Numbe...
true
4a28819fe46c48852ebc023933e1657a2004d8f0
JavaScript
PiterChernysh/Webpack
/6_6.1_6.2_plugin-proposal-class-properties/dev/components/Test/redux.js
UTF-8
1,063
2.8125
3
[]
no_license
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { createStore } from 'redux'; // reducer const reducer = (count = 1000, action) => { switch(action.type) { case 'INCREMENT': return count + 1; case 'DECREMENT': return count - 1; default: return count; ...
true
9465a23826fb12c8a7177f561ebd2e50544dc56f
JavaScript
diversivo/adidasMemo
/src/components/streaming/clock/index.js
UTF-8
2,792
2.78125
3
[ "MIT" ]
permissive
import React, { useState, useEffect, useRef } from 'react'; import RadialAnimation from './radial-animation' const Clock = () => { const [seconds, setSeconds] = useState(0); const [minutes, setMinutes] = useState(0); const [hours, setHours] = useState(0); const [days, setDays] = useState(0); const [milisTim...
true
df3f33394075f8aa5ab5fa1bc42110b0b21376d8
JavaScript
rgabeflores/OnTime
/app/redux/reducers/userReducer.js
UTF-8
4,359
2.78125
3
[]
no_license
/** * User Reducer */ import { TOGGLE_MODAL, TOGGLE_EDIT_MODAL, SET_DAY, CREATE_USER, CREATE_USER_FULFILLED, FETCH_USER, FETCH_USER_FULFILLED, REQUEST_REJECTED, SET_USER_EMAIL, SET_USER_EMAIL_FULFILLED, SET_USER_NAME, SET_USER_NAME_FULFILLED, NEW_ACCOUNT, ADD_T...
true
4e4e484139138492805a7cc150f124d49ab90970
JavaScript
kissenger/gpxReadWrite
/run.js
UTF-8
562
2.59375
3
[]
no_license
const gpxRead = require('./src/gpxRead.js').gpxRead; const fs = require('fs'); const fileName = 'mendip_way.gpx'; const dir = './tests/data/' loadFile(dir+fileName) .then( function(buffer) { gpxResult = gpxRead(buffer); }) .catch( function(error) { console.log(error); }) /** * Load the data ...
true
a7305eec18360f1a255e0d4c5e08de4985f83a96
JavaScript
whitneycormack/MusicHistory2
/songs.js
UTF-8
1,028
3.328125
3
[]
no_license
var songs = []; songs[songs.length] = "Legs > by Z*ZTop on the album Eliminator"; songs[songs.length] = "The Logical Song > by Supertr@amp on the album Breakfast in America"; songs[songs.length] = "Another Brick in the Wall > by Pink Floyd on the album The Wall"; songs[songs.length] = "Welco(me to the Jungle > by Guns...
true
7bd778ed6666db918e7b31cd08fe06a0d6a9d767
JavaScript
Natejoestev/default-chrome-extension
/options_script.js
UTF-8
2,255
2.875
3
[]
no_license
function range(x, y) { var array = []; for (var i = x; i <= y; i++) { array.push(i); } return array; } //get settings from storage let settings = load_dict("settings"); //localStorage.getItem("settings"); if (settings == null) { //no settings console.log("No settings found"...
true
c604158932f58ef33af80f95309c9a48406c81d2
JavaScript
laurenemarcus/pig_latin
/spec/specs.js
UTF-8
353
2.875
3
[]
no_license
describe('pigLatin', function() { it("adds 'ay' to the end of words that start with a vowel", function() { expect(pigLatin("owl")).to.equal("owlay"); }); it("puts the first consonant at the end of the word followed by 'ay' for a word that starts with a single consonant", function() { expect(pigLatin("day...
true
16674ce5a6c1a69cdc28390d146af3adc55f2334
JavaScript
lcxfs1991/LittleJumper
/src/GameResultLayer.js
UTF-8
2,517
2.640625
3
[]
no_license
/** * Created by lcxfs1991 on 8/10/14. */ var GameResultLayer = cc.Layer.extend({ secondResult: 0, ctor:function (gameJudge, result) { this.secondResult = result; this._super(); this.init(gameJudge, result); }, init:function (gameJudge, result) { this._super(); ...
true
4a9348a8e4072326fb7ed5e8a111cda734721473
JavaScript
green-fox-academy/matyaspeterfi
/week-07/day-03/app.js
UTF-8
3,043
3.09375
3
[]
no_license
const express = require('express'); const app = express(); const PORT = 8080; const path = require('path'); app.use(express.static('assets')); let bodyParser = require('body-parser'); app.use(bodyParser.urlencoded({ extended: false })); const jsonParser = bodyParser.json(); app.listen(PORT, () => { console.log(`Now...
true
c08a1756fa00eca0f323fb58778abea82c0d95b5
JavaScript
tusharkhandejod/Import-Export-module-assignments-JavaScript
/functional programs/Assignment 4/selectionSort.js
UTF-8
731
3.859375
4
[]
no_license
let readline = require('readline-sync'); let arraysize = readline.questionInt("\nEnter the array size : ") let array = []; for (let i = 0; i < arraysize; i++) { array[i] = readline.questionInt("\nEnter the " + i + " th array element : ") } console.log("\nArray : " + array) function selectionSort(array) { let...
true
fa232aad0b56674735709993bfc5b33fbd159287
JavaScript
cpranav1998/Streak
/src/habitClass.js
UTF-8
683
2.59375
3
[ "MIT" ]
permissive
import {decorate, observable, autorun, action, computed} from "mobx"; class appStore { habits: []; maxStreak(name) { return this.habits.filter( habit => habit.name === name )[0].maxstreak; } streak(name) { return this.habits.filter( habit => habit.name === name )[0].streak; } set setStreak(nam...
true
d44d4369f97810bc4af77f4478d213d628381974
JavaScript
ARicardo97/Practica
/03-bases-node/app.js
UTF-8
591
3.21875
3
[]
no_license
//const argv = require('yargs').argv; //cuando viene llaves despues de un let o un cost...significa que es una destructuración const { crearArchivo} = require('./multiplicar/multiplicar'); //let base = 7; //Recibiendo parametros desde la Terminal let argv = process.argv; //el proceso que se envia segun la posicion ...
true
700a054f8df30ea2a32d430da371242928ef54b3
JavaScript
liuduanyang/ruanjian_zuoye
/移动web开发/shopping_app/js/car.js
UTF-8
6,483
2.5625
3
[]
no_license
var list_show=document.getElementById("list_show"); var sum=document.getElementById("prices"); var pricesnum=0; window.onload=function(){ if(localStorage.getItem('status')=='true'){ $.ajax({ url:'http://datainfo.duapp.com/shopdata/getCar.php', type:'POST', dataType:'JSONP...
true
d31327ae288a4d434030acbb97dae97933850ffb
JavaScript
marfriaz/gymbnb-client
/src/routes/GymListPage/GymListPage.js
UTF-8
2,521
2.53125
3
[]
no_license
import React, { Component } from "react"; import GymListItem from "../../components/GymListItem/GymListItem"; import SearchBox from "../../components/SearchBox/SearchBox"; import GymListContext from "../../contexts/GymListContext"; import GymApiService from "../../services/gym-api-service"; import { Section } from "../...
true
ed10d2f6fa6eee5cc9b9661b239bf7e31a2e75c3
JavaScript
mosfiqur-rahman/CodeStylometry_JS
/CodeStylometry/Dataset Creator/js_dataset/17authorsYfiles/saph/solution1***2.txt
UTF-8
1,761
3.078125
3
[]
no_license
function parseData () { var time = Date.now(); var solution = ''; var n,m,k,l,row; var text = $("code").value; var array = text.split(/(?:\r\n|\r|\n)/); var numberOfCases = array[0]; var T = parseInt(numberOfCases); console.log(T); for(n=1;n<=2*T;n=n+2){ soluti...
true