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
8e3735e92f974d8b9d8f929eea5c636419628e4f
JavaScript
ehgoodenough/stick-them-with-the-pointy-end
/source/scripts/models/Spear.js
UTF-8
3,478
2.578125
3
[ "MIT" ]
permissive
import Pixi from "pixi.js" import Geometry from "scripts/utility/Geometry.js" import Sound from "scripts/utility/Sound.js" import config from "config.js" var SPEAR_TEXTURE = Pixi.Texture.fromImage(require("images/spear.png")) var WALL_HIT_SOUND = new Sound(require("sounds/wallhit.mp3")) // The raycast's resolution va...
true
edabd016b01363109dee571a20762f1740e09bad
JavaScript
baiNan-git/pets
/pets/js/move.js
UTF-8
976
2.84375
3
[]
no_license
function move(ele,json,callback){ clearInterval(ele.a); ele.a = setInterval(() => { var onoff = true; for(var i in json){ if( i == "opacity"){ var iNow = parseFloat(getStyle(ele,i))*100; }else{ var iNow = parseFloat(getStyle(ele,i)); ...
true
990657896858dbff2305e063d5e7ec0416833aee
JavaScript
byeong0430/javascript-exercises
/events_and_callbacks/introduction_to_callbacks/calling_a_callback_function_more_than_once.js
UTF-8
3,663
4.46875
4
[ "CC-BY-4.0" ]
permissive
// 1. Scroll to the bottom to get to the use cases. // 2. Uncomment the next use case and make it work. Frequently this means replacing // `____`s with code of your own. // 3. Verify it works by running the file with the `node` command line program. // 4. Repeat until all use cases are functioning. // This function...
true
aba7f72ad0bbcae2a911c5783ca77b27429440ee
JavaScript
AlexKardone/sv-log
/dist/js/common.js
UTF-8
1,482
2.859375
3
[]
no_license
$(document).ready(function() { // Scroll to top button $(window).scroll(function() { if ($(this).scrollTop() > 50 ) { $('.scrolltop:hidden').stop(true, true).fadeIn(); } else { $('.scrolltop').stop(true, true).fadeOut(); } }); $(function(){$(".scroll").click(function(){$("html,body").an...
true
b9723e5ccdd35e57d06aa180658305fb3d663747
JavaScript
ahodyna/web-experiments
/js-experiments/index_35_nested_loops.js
UTF-8
402
2.96875
3
[]
no_license
// node.exe .\js-experiments\index_35_nested_loops.js function print(str) { process.stdout.write(str) } print("a") print('l') process.stdout.write('i') process.stdout.write('n') process.stdout.write('a') process.stdout.write('\n') process.stdout.write('a') process.stdout.write('l') process.stdout.write('i'...
true
a0a1a6881b3d83e90d61483c2ab9499de76e38f0
JavaScript
nanopx/simple-object-schema
/src/SchemaDefinition.js
UTF-8
2,639
2.78125
3
[ "MIT" ]
permissive
import * as utils from './utils'; export const SCHEMA_KEY = Symbol('SchemaDefinition::_schema'); export const OPTIONS_KEY = Symbol('SchemaDefinition::_options'); class SchemaDefinition { definitions = []; isSchemaDefinition = true; constructor(options = {}) { const { throwOnDefinitionError = true } = opti...
true
e3b52234cc1462a451f301370ecd7535edbeff9a
JavaScript
PrinzEugen7/Statistics
/JavaScript/Basic/Sum/main.js
UTF-8
273
3.9375
4
[]
no_license
// ๅˆ่จˆๅ€คใฎ่จˆ็ฎ— function calc_sum(data) { var sum = 0; for (i=0; i<data.length; i++) { sum = sum + data[i]; } return (sum); } // ใƒกใ‚คใƒณ function main() { data = new Array(1, 2, 3, 4, 5); alert( "่จˆ็ฎ—็ตๆžœใ€€:ใ€€" + calc_sum(data) ); }
true
6562be4a4fc741e711b0c017e732b086d61f55b6
JavaScript
prazhusleecooper/PRT_fe
/src/pages/AddCustomer.js
UTF-8
13,460
2.53125
3
[]
no_license
import React, { Component } from 'react'; import { ToastContainer, toast } from 'react-toastify'; import * as Icon from 'react-feather'; import '../styling/AddCustomer.css'; var validate = require('validate.js'); //* CONSTRAINTS for the email validation for Validate.JS var constraints = { emailAddress: { ...
true
bf2a2bd5583e3941d83a02b9268f56b80cba80ed
JavaScript
thomaslu3/cs4300sp2020-lgl47-pcm82-ml2359-tal82
/app/static/scripts/home.js
UTF-8
1,683
2.890625
3
[]
no_license
function toast() { document.getElementById('toaster').style.backgroundImage = 'url(/static/images/toaster_down.png)'; document.getElementById('toast').style.backgroundImage = 'url(/static/images/toast.png)'; document.getElementById('toaster').style.transform = 'translate(-53%, 0%)'; document.getElementById('...
true
15781cab53297761f79fb71180c5d029b7f8579d
JavaScript
FrumiousB/tumbscraper
/appstate.js
UTF-8
6,750
2.625
3
[]
no_license
/* Persistent config for Tumblr Scraper Requires database module but invoker shouldn't know that */ var mongoose = require('mongoose'); var logger = require('./multilog.js'); var db = undefined; // filled in by init var DbConfig = undefined; var configSchemaInitializer = { locator: String, tumblrOau...
true
270e383deca8a802aa50dd73ee29c4c9eb6a6203
JavaScript
vladimirhambardzumyan24/homework16-Prototype-This-New
/baby-const.js
UTF-8
271
3.625
4
[]
no_license
class Person { constructor(name, age, favoriteToy) { this.name = name; this.age = age; this.favoriteToy = favoriteToy; } play() { return `Playing with ${this.favoriteToy},`; } } let baby1 = new Person("Erik", 7, "car"); console.log(baby1.play());
true
b445a4c6ba75a62641f3dd0a23f3a6ec9c8ddb13
JavaScript
xm94/software-2-machine-learners
/server/utils/riskMatrix.js
UTF-8
4,189
2.578125
3
[]
no_license
const officegen = require('officegen') const fs = require('fs') var findings = require("../dao/findings") var systems = require("../dao/systems") // Create an empty Excel object: let xlsx = officegen('xlsx') // Officegen calling this function after finishing to generate the xlsx document: xlsx.on('finalize', function...
true
ad68a7370700539e40555bc7cfdcfa0e7199e9de
JavaScript
rubyataj/rubyataj.github.io
/test-site/scripts/main.js
UTF-8
4,988
3.953125
4
[]
no_license
// This is a comment //event, beides gleich, das letzte รผberschreibt /*let myHTML = document.querySelector('html'); myHTML.onclick = function() {alert('Ouch!');}; document.querySelector('html').onclick = function() { alert('Ouch! Stop poking me!'); }*/ const myHeading1 = document.querySelector('h1');...
true
76a066066b895b858f21b03964ce6ba6033ef18d
JavaScript
melisgokalp/alexa-skill-theoffice
/lines.js
UTF-8
3,253
2.515625
3
[]
no_license
var languageStrings = { "en": { "translation": { "FACTS": [ "Iโ€™m Beyoncรฉ, always.", "Itโ€™s Britney, bitch.", "Would I rather be feared or loved? Easy. Both. I want people to be afraid of how much they love me.", "Sometimes Iโ€™ll start...
true
7c7e68278d948962edef80d0fcfedef8073347da
JavaScript
batiste/component-entity
/tests/components/position.js
UTF-8
284
2.625
3
[ "MIT" ]
permissive
/** * Class PositionComponent * * @author Adrian Gaudebert - adrian@gaudebert.fr * @constructor */ var PositionComponent = { "x": 0, "y": 0, "z": 0, "isAtOrigin": function() { return this.x === 0 && this.y === 0 && this.z === 0; } }; module.exports = PositionComponent;
true
1a28e12a675951773a364790f142bb1de83cdbc1
JavaScript
HRABOVENSKYI/React-tutorial
/src/index.js
UTF-8
376
2.65625
3
[]
no_license
import React from "react"; import ReactDom from "react-dom"; function Greering() { return ( <div> <Person /> <Message /> </div> ); } const Person = () => ( <h2> Jamaika <Word /> </h2> ); const Word = () => "Cool"; const Message = () => { return <p>This is my message</p>; }; ReactDom...
true
ebd3d9cfcec3ec0c1e6a8a9d79c303463de592fc
JavaScript
mbisurgi-designfreed/todos-list
/playground/mongoose-queries.js
UTF-8
1,299
2.578125
3
[]
no_license
const { ObjectID } = require('mongodb'); const mongoose = require('../server/db/mongoose'); const Todo = require('../server/models/todo.model'); const User = require('../server/models/user.model'); // const id = '5a5942508c1d21ad626c0eeb'; // if(!ObjectID.isValid(id)) { // console.log('ID not valid'); // } // T...
true
c54a25a0f80e23a6adff28f6f7df45da45702cc7
JavaScript
prettier/prettier
/tests/format/flow-repo/poly/implicit_bounded_instantiation.js
UTF-8
449
3.0625
3
[ "MIT" ]
permissive
// @flow class Base {} class Middle extends Base {} class Child extends Middle {} class C<T: Middle> { meth(a: T): T { return a; } } // T is implicitly (bounded by) Middle in constructor call if not provided. // Explicit type arg is required in annotation - here a wildcard captures it. var a: C<*> = new C();...
true
0a372726c7dce0fafa7272525db24bf9488250e4
JavaScript
TonchoLozev/Course-JavaScript-Fundamentals
/06.Lab-Arrays-and-Matrices/04.First-and-Last-K-Numbers.js
UTF-8
178
3.21875
3
[]
no_license
function firstAndLast(arr) { let k = arr.shift(); console.log(arr.slice(0, k)); console.log(arr.slice(arr.length - k, arr.length)); } firstAndLast([2, 7, 8, 9]);
true
d4902d7bc659a514e6f54a520d87b8ab86de0842
JavaScript
AlexGreau/JSProject
/js/game.js
UTF-8
2,614
3.40625
3
[]
no_license
let players = []; let bubbles = []; let timer; let currentLevel = 1; function initGame1Player() { // Keyboard listeners window.onkeydown = keyDown; window.onkeyup = keyUp; // Player creation // Constructor takes number of hooks (1 by default), // then optionnaly the initial x coord ...
true
9c576cbba11c6de5bc12e7361e38ead16a2ae0ea
JavaScript
npmcomponent/eldargab-async-memo
/index.js
UTF-8
567
2.515625
3
[ "MIT" ]
permissive
module.exports = function memoize(fn) { var err , val , callback , callbacks , done = false return function(cb) { if (done) return cb(err, val) if (callback) return (callbacksย || (callbacks = [])).push(cb) callback = cb fn(function(error, value) { err = error val = valu...
true
81893d9442ef9e31f655659bf3ca8ead560cb5bc
JavaScript
crudick/job-scraper
/src/api/monster.js
UTF-8
4,064
2.703125
3
[]
no_license
const _ = require('lodash'); // Import helper functions const { compose, composeAsync, extractNumber, enforceHttpsUrl, fetchHtmlFromUrl, extractFromElems, fromPairsToObject, fetchElemInnerText, fetchElemAttribute, extractUrlAttribute } = require("./helpers"); // monster.io (Base URL) const BASE_URL = "https...
true
28adbe3c02623dc2e7a0ab4e2a399c6eeb61bec5
JavaScript
yshfqz/statrc
/utils/mail.js
UTF-8
1,234
2.53125
3
[]
no_license
const nodemailer = require("nodemailer") // ๅˆ›ๅปบๅ‘้€้‚ฎไปถๅฏน่ฑก let transporter = nodemailer.createTransport({ host: "smtp.qq.com",// ้‚ฎไปถๅ‘้€่€…็š„้‚ฎ็ฎฑไธปๆœบ(่งไธ‹ๆ–นๆŸฅๆ‰พ) port: 465,// ็ซฏๅฃๅท secure: true, // ็ซฏๅฃๅทไธบ465ๆ˜ฏไธบtrue,ๅ…ถไป–็ซฏๅฃไธบfales auth: { user: 'namedebeishang@qq.com', // ้‚ฎไปถๅ‘้€่€…็š„้‚ฎ็ฎฑๅœฐๅ€๏ผŒๅฆ‚:99835885@qq.com pass: 'xedcyrutlomgbdda', // ้‚ฎไปถ...
true
d373e57c40af2f75edc63967851e74497e6e0276
JavaScript
karanevive/ES6-ES2015
/05_string_number_methods.js
UTF-8
476
4
4
[]
no_license
"use strict" let theString = 'Hello, my name is Brad and I love JavaScript'; // startsWith() // endsWith() // includes() console.log(theString.startsWith('Hello')); console.log(theString.endsWith('JavaScript')); console.log(theString.includes('love')); //Hex console.log(0xFF); # 255 // Binary console.log(0b101011)...
true
452927c93cc3674414c000bf3177472bab0c423c
JavaScript
Roharui/GAME_ENGINE
/drawable.js
UTF-8
563
2.96875
3
[]
no_license
const draw = { draw(obj){ this.clear() obj.forEach(x => { x.draw() }) }, line(x, y){ ctx.beginPath() ctx.moveTo(x[0], x[1]) ctx.lineTo(y[0], y[1]) ctx.stroke() }, arc(loc, size) { ctx.beginPath() ctx.arc(loc.x, lo...
true
f641ce844d7e9926e0fbb1a444ea7d2ae3e7d7cd
JavaScript
spanich/ds_and_algorithms
/new.js
UTF-8
566
2.8125
3
[]
no_license
function List(){ this.listSize = 0; this.pos = 0; this.dataStore = []; this.clear = clear; this.find = find; this.toString = toString; this.insert = insert; this.append = append; this.remove = remove; this.front = front; this.end = end; this.previous = previous; this.next = next; this.hasNex...
true
fe7eeb7bc8955118d76a58fa5f8835fe5c4e1d30
JavaScript
easyitleipzig/Pong
/Pong_original/objects.js
UTF-8
4,973
2.703125
3
[]
no_license
var playground = { sizeX: 800, sizeY: 400, margin: 10, id: 'playground', init: function(x, y, margin){ if(x !== undefined) {this.sizeX = x}; if(y !== undefined) {this.sizeY = y}; if(margin !== undefined) {this.margin = margin}; var myPlaygroundDiv = document.createElement('div'); myPlaygroundDiv.id = th...
true
cd8a81f18ba0feb32caa82c4fbcf999161db677d
JavaScript
infoyou/SHCarShow
/CarShow/Resource/html/utils.js
UTF-8
960
3.203125
3
[]
no_license
// JavaScript Document function IsEmail(strg) { var patrn = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; if (!patrn.exec(strg)) return false; return true } /** ไธญๆ–‡ ่‹ฑๆ–‡ๅคงๅฐๅ†™ ๆ•ฐๅญ— ไธญๅˆ’็บฟ ไธ‹ๅˆ’็บฟ ็ฉบๆ ผ ๅ…จ่ง’ */ function isChinaOrNumbOrLett(s){ // var regu = "^[0-9a-zA-Z...
true
24572e7f60c927f75fcad7f2e97c31108b117655
JavaScript
6uddy/805385-keksobooking-18
/js/filters.js
UTF-8
2,357
2.90625
3
[]
no_license
'use strict'; (function () { var MAX_FILTER_RESULTS = 5; var PRICE_MIDDLE = 10000; var PRICE_HIGH = 50000; var filterForm = document.querySelector('.map__filters'); var Filters = { TYPE: filterForm.querySelector('#housing-type'), PRICE: filterForm.querySelector('#housing-price'), ROOMS: filter...
true
6eca00f6967895f07858408b4f87fe5e7fa725e0
JavaScript
rbabaci1/Github-User-Card
/src/App.js
UTF-8
4,159
2.703125
3
[]
no_license
import React, { Component } from 'react'; import { Button } from 'reactstrap'; import Header from './components/Header'; import InputForm from './components/InputForm'; import UserCard from './components/UserCard'; import FollowerCard from './components/FollowerCard'; export default class App extends Component { st...
true
7000042397260b5779da614824103b343bd797b0
JavaScript
leslieyi/postwork-data-structures-and-algorithms
/14-week-11/01-days-2-to-3--depth-first-graph-traversal/javascript/graph_dfs.js
UTF-8
557
3.125
3
[]
no_license
function isPath(graph, vertexA, vertexB) { // type your code here } if (require.main === module) { // add your own tests in here let graph = { jan: ["john", "jambaby"], john: ["carl"], jambaby: [], carl: ["jambaby"], dave: [] }; console.log("Expecting: true"); console.log(isPath(graph,...
true
f839096394d0cc70745acb3c2a7cb7dcb623d4fb
JavaScript
Weerklank/RandomPasswordGenerator
/script.js
UTF-8
2,810
3.703125
4
[]
no_license
// Arrays var special = ["!","@","#","$","%","^","&","*","(",")","-","+","_","=","{","}","[","]",";",":","~","`","'","?","/"]; var numbers = ["1","2","3","4","5","6","7","8","9","0"]; var lcLetters = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; var ucLetters...
true
a609553ea3a6882d6ca315b7d1903ac97d742436
JavaScript
RickGove/Coding-Challenges
/Leet Code/13 ZigZag Strings.js
UTF-8
1,321
3.90625
4
[]
no_license
var convert = function (s, numRows) { if (numRows === 1) return s; let newStr = ''; let mapped = {}, x = 0; while (x < numRows) { mapped[x] = ''; x++; } let char = 0; let key = 0; let up = true; while (char < s.length) { mapped[key] = mapped[key] + s[char]; if (up) { if (key !== numRows - 1) ...
true
ae3dea8c41aa67b4006959a64cfd4a950ca4bbee
JavaScript
brian-norman/Splitwisr
/server/service/database.js
UTF-8
3,181
2.59375
3
[]
no_license
const external = require('./external.js'); // fetches balances for current user function fetch(current_user, res, db) { let userToBalance = [] db.ref("Receipt").once("value", function(snapshot) { let ret = snapshot.val() for (let transaction in ret){ if(ret[transaction]['payer'] ==...
true
4f3a2b9df2d8c506d0e092f1c7a965b4a824e021
JavaScript
HeySharma/coolJsStuffs
/color.js
UTF-8
456
3.40625
3
[]
no_license
function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; } const btn = document.getElementById('magic'); const clr = document.querySelector('body'); document.getElementById(...
true
08e39e9e3bf4c207b193774954c54d83f3a06eca
JavaScript
jimjimH/Algorithm-practice
/DataStructure_SinglyLinkedList.js
UTF-8
3,477
4.125
4
[]
no_license
// class Node { // constructor(value) { // this.value = value; // this.next = null; // } // } class SinglyLinkedList { constructor(value) { this.head = { value, next: null }; this.tail = this.head; this.length = 1; } append(va...
true
8a3683afd38d4c6f45894890511e54f5321036f6
JavaScript
BradFabian/updated_portfolio
/public/js/index.js
UTF-8
2,714
3.109375
3
[ "MIT" ]
permissive
const navToggle = document.querySelector(".nav-toggle"); const navLinks = document.querySelectorAll(".nav__link"); navToggle.addEventListener("click", () => { document.body.classList.toggle("nav-open"); }); navLinks.forEach((link) => { link.addEventListener("click", () => { document.body.classList.remove("n...
true
c18546ae0fdbbe6fff26c80b3c4010db33db0690
JavaScript
EOSullivanBerlin/frontman_challange
/spec/FizzBuzzSpec.js
UTF-8
1,288
3.3125
3
[ "MIT" ]
permissive
describe('fizzbuzz', function(){ var javabuzz; beforeEach(function() { javabuzz = new JavaBuzz(); }); describe('knows when a number is divisable', function() { it('by three', function() { expect(javabuzz._isDivisableBy(3, 3)).toBe(true); }); it('by five', function() { expect(javab...
true
ba98ca2a46f0ca5a33a3a84306ebe1d55e5e2e75
JavaScript
LinnikD/This-is-pirate
/public/js/game/util/getRandomInt.js
UTF-8
173
2.515625
3
[]
no_license
define( function(){ getRandomInt = function(min, max) { var a = Math.floor(Math.random() * (max - min + 1)) + min; return a; } return getRandomInt; });
true
da07de8893bce3dc88581808ef1607bcc6e7ca18
JavaScript
NetClub/ife2016spring
/task_24/task.js
UTF-8
4,313
2.84375
3
[ "MIT" ]
permissive
(function() { var timer = null; var stack = []; var click_node = null; var EventUtil = { addHandler: function(el, type, handler) { el.addEventListener ? el.addEventListener(type, handler, false) : el.attachEvent('on' + type, handler); }, removeHandler...
true
05d9e6e3d5f7135fb5a63d4dd1cf601fcb60a445
JavaScript
hblee12294/js-algo
/companies/bd/unique.js
UTF-8
482
3.078125
3
[]
no_license
function unique(arr) { return Array.from(new Set(arr)) } function uniqueMap(arr) { const map = new Map() arr.forEach(item => { map.set(item, 0) }) return Array.from(map.keys()) } const input = [ 1, 1, 'true', 'true', true, true, 15, 15, false, false, undefined, undefined, nul...
true
7ac1e79ad3c28628c18431a410ce388253cdf25b
JavaScript
DTStanev/ChatApp
/WebChat/WebChat/ClientApp/src/components/Account/Login.js
UTF-8
3,296
2.609375
3
[ "MIT" ]
permissive
๏ปฟimport React, { Component } from 'react' import { Link, Redirect } from 'react-router-dom'; import * as constants from '../Common/ComponentConstants'; export default class Login extends Component { constructor(props) { super(props) this.state = { user: { username: '',...
true
d827a02ecae7db20823583cd1e85950b1c0001e2
JavaScript
vladalekseev/Antagosoft
/src/CommentList.jsx
UTF-8
1,332
2.609375
3
[]
no_license
import React from 'react'; import NewComment from './NewComment.jsx' export default class Article extends React.Component{ constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); this.state = { comments : props.comments } } handleClic...
true
36b6ad8e33ef159b303570e775cf22cbeda9f4e0
JavaScript
blackbird-89/PayWay
/routes/createChild.js
UTF-8
2,295
2.671875
3
[]
no_license
const User = require('../mongoose-models/user.model'); const sendMailToChild = require('../send-email.js'); function createChild(app) { app.post('/api/createchild', async (req, res) => { const { user } = req.session; const parent = await User.findById(user._id); const child = await User...
true
b64474515e8cd7993f976bf0aa7cede3682e6ec9
JavaScript
andrey0902/layout
/recursion1/t.js
UTF-8
653
3.5625
4
[]
no_license
var mas = [222,[[99,35],53],23,1,[55,[44,55,555]],4]; var mas3 =[[222, 99, 35, 53, 23, 1, 55, 44, 55, 555, 4],[222, 99, 35, 53, 23, 1, 55, 44, 55, 555, 4]]; function alignArray(mass){ var array =[]; return function align(mass){ for (var i =0; i<mass.length; i++){ if(mass[i] instanceof Array){ align(mass[...
true
50af26bb0b8dde05a100200aaaab2398d87e2a14
JavaScript
SimonGutierrez/Algos
/LinkedIn-Course/Introduction.js
UTF-8
529
4.28125
4
[]
no_license
// find the greatest common denom for two numbers const gcd = (num1, num2) => { while (num2 !== 0) { let temp = num1; num1 = num2; num2 = temp % num2; } return num1; } console.log(gcd(20, 8)) // 4 console.log(gcd(60, 96)) // 12 // stacks and queues const stackExample = () => ...
true
a032c676c80f781cba40ceefd82c662f462cf4f6
JavaScript
IamShiv26/geo-loc
/docs/script.js
UTF-8
579
2.828125
3
[]
no_license
const getLocation = document.getElementById("geolocation"); getLocation.addEventListener('click', evt=>{ if('geolocation' in navigator){ console.log("hiiii"); navigator.geolocation.getCurrentPosition(position=>{ console.log("hi"); let latitude = position.coords.latitude; ...
true
95bbbecaf01b5d51d24c13937197ea8036c85377
JavaScript
GrasieliMaciel/node3-weather-website
/src/utils/geocode.js
UTF-8
1,430
2.984375
3
[]
no_license
const request = require('request') const urlGeo = 'https://api.mapbox.com/geocoding/v5/mapbox.places/Los%20Angeles.json?access_token=pk.eyJ1IjoiZ3Jhc2llbGkiLCJhIjoiY2tuZ2Y1ajVnMGFycDJubnQxZ2JsMmxpdSJ9.gU5M0nVuhPlQ_uiYgjoMHA&limit=1' // const urlGeo = 'https://api.mapbox.com/geocoding/v5/mapbox.places/naoexiste.json?acc...
true
26949598264f95d05c69400ce93f5df8f03550a8
JavaScript
hpmtissera/chess
/chess.js
UTF-8
23,761
3.09375
3
[]
no_license
console.log("chess"); const unicodes = new Map(); unicodes.set('BK', "\u{265A}"); unicodes.set('BQ', "\u{265B}"); unicodes.set('BR', "\u{265C}"); unicodes.set('BB', "\u{265D}"); unicodes.set('BN', "\u{265E}"); unicodes.set('BP', "\u{265F}"); unicodes.set('WK', "\u{2654}"); unicodes.set('WQ', "\u{2655}");...
true
56f6f5c77df6d4f671b06602a81f5a833c08e972
JavaScript
JarrettD5309/word-guess-game
/assets/javascript/game.js
UTF-8
7,047
3.828125
4
[]
no_license
// assigns var to html element var currentBand = document.getElementById("screen_word"); var screenGuesses = document.getElementById("guesses_left"); var screenGuessLetters = document.getElementById("guess_letters"); var winsBrow = document.getElementById("wins_span"); var lossesBrow = document.getElementById("los...
true
ba2207fa349311eb5aab429bc511d5b4c5b67d49
JavaScript
swapnilbhakare/shopping-cart
/src/Pages/Cart.js
UTF-8
4,064
2.65625
3
[]
no_license
import { getQueriesForElement } from "@testing-library/react"; import React, { useContext, useEffect, useState } from "react"; import { CartContext } from "../CartContext"; const Cart = () => { let total = 0; const [products, setProducts] = useState([]); const { cart, setCart } = useContext(CartContext); const...
true
9a6362380cb1c190033a5c9829f9d06ecb3e4108
JavaScript
Jeannie-Thai/Codecademy-JavaScript-Projects
/Secret Message.js
UTF-8
954
4.21875
4
[]
no_license
//Transform an array of strings into a secret message! let secretMessage = ['Learning', 'is', 'not', 'about', 'what', 'you', 'get', 'easily', 'the', 'first', 'time,', 'it', 'is', 'about', 'what', 'you', 'can', 'figure', 'out.', '-2015,', 'Chris', 'Pine,', 'Learn', 'JavaScript']; //console.log(secretMessage.length); se...
true
c4efc2f65cb34753ae6c82b46199e6b150aee3d5
JavaScript
earl12/mypharmaFinal
/public/js/my_scripts/get.jquery.js
UTF-8
736
2.75
3
[ "MIT" ]
permissive
//retrieving barangays through city id /** Used for the User Information **/ function retrieveBarangaysThruCity(id, url) { console.log(url); $.ajax({ method: 'GET', url: url, data: { 'id': id }, success: function (data) { console.log(data); ...
true
b486dc98733ee32174d381ee4725613edbb000da
JavaScript
drop-grav/reviews-module
/database/generatePostgresData.js
UTF-8
2,094
3
3
[]
no_license
const faker = require('faker'); const fs = require('fs'); const numOfReviews = 50000000; const numOfRooms = 10000000; const numOfUsers = 30000000; function generateReviews() { let reviews; let custId = Math.ceil(Math.random() * numOfUsers); let custDate = faker.date.past().toISOString(); let custReview = faker....
true
de5b8130d6e33db4e4317d1e8d6300e994cfc352
JavaScript
kevinqiyefa/problem-solving-practices
/Ksum.js
UTF-8
1,670
4.03125
4
[]
no_license
// 18. 4Sum // Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. // Notice that the solution set must not contain duplicate quadruplets. // Example 1: // Input: ...
true
091314f13a1fdd084660288c7d2bdeb823baad7b
JavaScript
kszgbr/angular-redux
/app.cnfg.js
UTF-8
2,156
2.609375
3
[]
no_license
(function () { /******************************************************************************* This function is responsible to combine all the given reducers and create the store for the application which represents the state of the application. It has to be called in the applications config phase to make...
true
45fb17c96a812d9f3c3d6900baa92655fda381d7
JavaScript
waiter-yu/mmm
/js/listclass.js
UTF-8
1,792
2.515625
3
[]
no_license
//ๅŠ ่ฝฝ้กต้ขๅฎŒๆˆๅ‘่ตทๅคงๅˆ†็ฑปJAXA่ฏทๆฑ‚ // $.get('http://193.112.55.79:9090/api/getcategorytitle','',function(res){ // var htmlStr = template("temp",res); // $('.main_ul').html(htmlStr); // },'json') $.ajax({ type: 'get', url: "http://193.112.55.79:9090/api/getcategorytitle", dataType: 'json', success: function (r...
true
b442a8c65a7895d1002ab12816ef757c930d1fd8
JavaScript
mikaelrss/react-valid8
/example/src/App.js
UTF-8
1,452
2.75
3
[ "MIT" ]
permissive
import React, { Component } from "react"; import Form from "react-valid8"; export default class App extends Component { handleSubmit = values => { console.log("This function is handling submit"); console.log("MY values brings all the bois to the yard", values); }; validateValues = values => { cons...
true
2b20b2ba83cd59be602028599de840d2e2bb3fd8
JavaScript
biniek-io/classify-triangle
/lib/group-by/group-by-result.model.js
UTF-8
372
2.921875
3
[]
no_license
/** * Model to keep values for GroupBy class * @see GroupBy */ class GroupByResult { /** * Constructor * @param {*} value * @param {number} amount */ constructor(value, amount) { this.value = value; this.amount = parseFloat(amount); } /** * Increment amount of counted values */ increment() { ...
true
36e22d2968a244483bef3db8d92de2bad21b61f6
JavaScript
roybarak80/flicker_app
/assets/js/script.js
UTF-8
3,048
2.5625
3
[]
no_license
var template; function jsonFlickrFeed(json) { console.log(json); $(".row").empty(); $.each(json.items, function (i, item) { var d = new Date(item.date_taken); var n = d.toLocaleDateString(); var authorName = item.author.replace(/ *\([^)]*\) */g, ""); template = `<div clas...
true
5990ae50a6734c21253e93f902e5cac967238957
JavaScript
klfoulk16/flask-app-tutorial
/static/scripts.js
UTF-8
1,434
2.78125
3
[]
no_license
function showMenu() { // expand phone header menu const phone_menu_btn = document.getElementById('phone_menu_btn'); const phone_menu = document.getElementById('phone_menu'); if (phone_menu.style.display == 'block') { phone_menu.style.display = 'none'; phone_menu_btn.textContent = 'Menu'; ...
true
5f5bc7d35a86bd793dd132a16dc7eaa28d21c614
JavaScript
dragomir-parvanov/If-else-tree-editor
/navbar.js
UTF-8
2,468
2.8125
3
[]
no_license
//navbar functions function zoomIn(){ Client.Fov.X*=0.9; Client.Fov.Y*=0.9; } function zoomOut(){ Client.Fov.X*=1.1; Client.Fov.Y*=1.1; } function pointer(){ PointerIsActive=true; deactivateOtherButtons(0); } function addQuestionNodeButton(){ document.getElementById('addQuestionNode').classLi...
true
28ef82942e0f2496287f1c6b662195e625f096a4
JavaScript
googlearchive/dialogflow-audio-recorder-nodejs
/public/javascript/audiodemo.js
UTF-8
9,066
2.53125
3
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
// Copyright 2019, Google, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
true
15f6ad4a39d42307add864b76f48a872e929a7a1
JavaScript
pradeep0601/collab-ui-react
/tools/markdownToHTML.js
UTF-8
984
2.546875
3
[ "MIT", "BSD-3-Clause", "BSD-2-Clause" ]
permissive
const fs = require('fs-extra'); const showdown = require('showdown'); const converter = new showdown.Converter(); function convertMarkdown(file, outFile) { const mkdown = fs.readFileSync(file).toString('utf8'); const html = converter.makeHtml(mkdown); // const wrappedHtml = ` // import React from 'react'; ...
true
8ce5d5da2db1ed47e0cafe2699ac1eda4d52e80a
JavaScript
DragonWolfLeo/paint-and-chat
/src/util/util.js
UTF-8
512
2.6875
3
[]
no_license
// Creates an object containing funnctions to add and remove event listeners from an array of args function eventListenerSetup(target, ...argsArray){ return ["add", "remove"].reduce((acc, action)=>{ acc[action] = () => argsArray.forEach(args=>{ target[action+"EventListener"](...args); }); return acc; }, {});...
true
ffaf555ef84f7f565c66fe4cdfe1f449de3435bf
JavaScript
jessicahuang523/VAD-questionnaire
/static/js/click_image.js
UTF-8
1,172
3
3
[]
no_license
var best, worst; function radio(id){ var imgID = id.slice(0, -3); showBorder(imgID); } function showBorder(id){ var name = id.charAt(0); var tags = document.getElementsByName(name); for (t=0; t<tags.length; t++){ tag = tags[t] if(tag.style.borderColor == "red"){ tag.sty...
true
ab34660b1e305eb22d235c363fc7beb9c39a1f3e
JavaScript
DmitrySimonchuk/gld-fd2-07-21
/JS/arrays/task-10.js
UTF-8
622
3.953125
4
[]
no_license
// ะŸะพะดัั‡ะธั‚ะฐั‚ัŒ ะฒ ัั‚ั€ะพะบะต "dskjdhfkjshdfkjhsdkjureyteiruyiqywehjkh" ะพั‚ะดะตะปัŒะฝะพ ะบะพะปะธั‡ะตัั‚ะฒะพ ะฑัƒะบะฒ r, k, t // ะธ ะฒั‹ะฒะตัั‚ะธ ะฒ ะบะพะฝัะพะปัŒ console.info('Task-10'); const str = "dskjdhfkjshdfkjhsdkjureyteiruyiqywehjkh"; const arr = Array.from(str); let countR = 0; let countK = 0; let countT = 0; arr.forEach((elem) => { elem === '...
true
0b977311dad1a5447809db3cfbb415f5c91f2021
JavaScript
lukecampbell/flaskmonitor
/flaskmonitor/static/chart.js
UTF-8
2,355
2.609375
3
[ "Apache-2.0" ]
permissive
/* * flaskmonitor/static/chart.js * Author: Luke Campbell * Dependencies: * <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'> </script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> */ google.load("visualization", "...
true
bc5223d120f8ff58b93055e1dafb44ab7fd1a282
JavaScript
J0seRivera/ValidasionDeDatosRegEx
/js/RegEx.js
UTF-8
3,539
3.515625
4
[ "Apache-2.0" ]
permissive
var button= document.getElementById("button"); button.addEventListener("click", validarDatos); function validarDatos() { validarNombre(); validarEmail(); validarDireccion(); validarContraseรฑa(); validarFecha(); validarGenero(); validarDPI(); validarNIT(); validarCodPost(); validarTelefono(); } var ...
true
58aa56b82b6c4c0cd6362fd41cba90b5004e6795
JavaScript
SafalFrom2050/course-management-system
/Frontend/src/pages/Student/Grades/GradePage.js
UTF-8
2,684
2.53125
3
[]
no_license
/* eslint-disable no-unused-vars */ import './GradePage.css'; import { React, } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; export default function GradePage() { const { gradeInfo } = useLocation(); const user = JSON.parse(localStorage.getItem('userData')); const history = useHist...
true
8389a60bc88301965078453691ef60ec5658dd31
JavaScript
pradas/issue_tracker_consumer
/client/utils.js
UTF-8
1,272
3.78125
4
[]
no_license
function timeDifference(time) { var previous = new Date(time); var current = new Date(); var msPerMinute = 60 * 1000; var msPerHour = msPerMinute * 60; var msPerDay = msPerHour * 24; var msPerMonth = msPerDay * 30; var msPerYear = msPerDay * 365; var elapsed = current - previous; ...
true
6ff758e5d47e8166208528a4b3fded76eafb1799
JavaScript
albizures/nm-hunter
/src/__tests__/methods.test.js
UTF-8
2,689
2.65625
3
[ "MIT" ]
permissive
// const { mockA } = require('../__mocks__/directoriesSizes') // const { keys } = Object // console.log = () => {} // const ENV = process.env.testEnv // const { // search, // getDiskUsage, // getTotalDiskUsage, // sortByFolderSize, // getByteSize // } = require('../methods') describe('Search Tests', () => {...
true
f3e550da050c736bf73c0ba214f99c1de5813b88
JavaScript
howdyai/trello-ciscospark
/config/index.js
UTF-8
833
2.6875
3
[ "MIT" ]
permissive
const fs = require('fs') exports.init = () => { if (! fs.existsSync(__dirname + '/config.json')) { const config = { orgId: '', orgName: '', token: '', } try { fs.writeFileSync(__dirname + '/config.json', JSON.stringify(config)) } catch (err) { throw new Error('Could not write config file...
true
068883551d9d43f4d432995e9ce1376e1079b21a
JavaScript
jriccrussel/reactjs-project
/src/Pagination/utils.js
UTF-8
696
2.984375
3
[]
no_license
const paginate = (followers) => { const itemsPerPage = 10 const numPages = Math.ceil(followers.length / itemsPerPage) // Creating new array(new data) base sa number of 'itemsPerPage' const newFollowers = Array.from({ length: numPages }, (_, index) => { // start sa index // 'index' c...
true
67ea7e2b295fffe319ac1ecf227bbc768bafec98
JavaScript
bruno77176/JavaScript
/chapitre_5/js/minimum.js
UTF-8
197
3.359375
3
[]
no_license
function min(a, b){ if (a <= b){ return a; } else return b; } var nb1 = Number(prompt("premier nombre?")); var nb2 = Number(prompt("second nombre?")); console.log(min(nb1, nb2));
true
c054317003adec04dfaaba153afc9c1eac3189ff
JavaScript
DBills-stack/Box-Office
/app.js
UTF-8
64
2.6875
3
[]
no_license
const now = new Date(); alert(`Hello Welcome, today is ${now}`);
true
5ec82d01dab1068400fe7d6d09415fcce692fa84
JavaScript
Cinetx/Roxy-kids
/js/swiper.js
UTF-8
1,543
2.546875
3
[]
no_license
(()=>{ const breakpoint = window.matchMedia('(min-width: 1367px)'); let productSwiper; const breakpointChecker = function () { // if larger viewport and multi-row layout needed if (breakpoint.matches === true) { // clean up old instances and inline styles when available if (productSwiper !== ...
true
44a4331476faf5bc4ea00307aa445adeed4f6877
JavaScript
JanCizmar/MountIN
/backend/src/controllers/tour.js
UTF-8
12,869
2.640625
3
[ "MIT" ]
permissive
"use strict"; const TourModel = require('../models/tour'); const UserModel = require('../models/user'); const MessageModel = require('../models/message'); const create = (req, res) => { if (Object.keys(req.body).length === 0) return res.status(400).json({ error: 'Bad Request', message: 'The reque...
true
15f41b46e3c0b89a5538e4564ed5e84db1fe82fe
JavaScript
KostNik/js_base
/arrays/arrays_5_splice.js
UTF-8
286
3.0625
3
[]
no_license
var array = new Array("banana", "orange", "mango"); let outSplice_1 = array.splice(2, 0, "Lemon", "Cabbage"); console.log(outSplice_1); console.log(array); let outSplice_2 = array.splice(0, 1); console.log(outSplice_2); console.log(array); console.log(array.concat(["next_array"]));
true
c8e5ff3ff93be6a306ab4519298518955f026378
JavaScript
kiranruba/practice-codes
/jqu/crime.js
UTF-8
2,007
2.578125
3
[]
no_license
const readline = require('readline'); const fs = require('fs'); const rl = readline.createInterface({ input: fs.createReadStream('crime.csv') }); var univ=[]; var year=[]; var obj,i=0; var f=0; console.time("helo"); rl.on('line', function(line){ var tot=line.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/); i...
true
0b0b7cbe640d78d9bb4ff6f17f2a93303451cf55
JavaScript
uss-hopper/snap-challenges-GinoVillalpando
/snap-11-25-2019.js
UTF-8
579
3.984375
4
[ "Apache-2.0" ]
permissive
let string be defined function deleteVowels(string) { iterate through string using a for loop search and split any vowels from the string then replace with empty character using regexp return the string } let array be defined create function that console.logs math.max to check the array for the greatest number...
true
b4d8c7d2ff3d4121cf2ad68b26d434e35062fcaa
JavaScript
ckruse/cforum_ex
/assets/js/components/autolist/index.js
UTF-8
1,783
2.859375
3
[ "MIT" ]
permissive
import { t } from "../../modules/i18n"; import { parse } from "../../modules/helpers"; class Autolist { constructor(element) { const tpl = element.querySelector("template"); this.root = element; this.template = tpl.content.firstElementChild; this.listElement = this.template.nodeName; this.index ...
true
f74f7f9beec38f4d6ce8f97da28b1c9ef6cfe46d
JavaScript
noureddine8/fruit-stock-api
/controllers/index.js
UTF-8
989
2.78125
3
[]
no_license
import { retrieveStockByCity, transferQuantity } from "../services/index.js"; export const getStockByCity = async (req, res) => { const city = req.params.city; try { const store = await retrieveStockByCity(city); res.status(200).json({ store }); } catch (error) { res.status(404).json({ message: "An e...
true
04129918188cfef3ef7555339bc7992877c1d510
JavaScript
nguyenbinh23/reactjs
/src/components/use-effect/index.jsx
UTF-8
2,237
3.265625
3
[]
no_license
import { useState, useEffect } from "react"; function LearnUseEffect(props) { const [time, setTime] = useState(0); let [hello, setHello] = useState("hello"); function clicked() { setTime(time + 1); } function sayHello() { setHello((hello += " hello")); console.log(hello); } function changePro...
true
cc26b68e975e9d1ed1e714d11b09d526df4d688f
JavaScript
guilhermelouzavio/javascript
/Array/Map2.js
UTF-8
628
3.859375
4
[]
no_license
const carrinho = [ '{"nome": "Borracha" , "preco" : 3.45 }', '{"nome": "Caderno" , "preco": 13.90}', '{"nome": "Kit de Lapis" , "preco" : 41.22}', '{"nome": "Caneta" , "preco": 7.50}' ] // Retornar um array apenas com os precos // minha resolucao const apenasPreco = carrinho.map(function(json) { ...
true
9a93fcca3e68de513545c93229217f93245ec516
JavaScript
isabroch/pokespeech
/onClickTranslate.js
UTF-8
528
3.203125
3
[]
no_license
document.addEventListener("DOMContentLoaded", function(event) { onClickTranslate(); }); // Keeping function separate because it should be able to run alone function onClickTranslate() { var pokeSpeech = document.querySelectorAll("pokespeech:not(.traslated)"); for (var i = 0; i < pokeSpeech.length; i++) { // ...
true
1d9abfffc788ebbfd621fcd97573e7ac9df4072a
JavaScript
gajus/react-elevator
/src/app/components/Grid/index.js
UTF-8
8,660
2.546875
3
[]
no_license
// @flow import React from 'react'; import Hammer from 'hammerjs'; import dynamics from 'dynamics.js'; import './main.css'; type AxisType = 'horizontal' | 'vertical'; type DirectionType = 'north' | 'east' | 'south' | 'west'; type CompleteCallbackType = () => void; const transition = ( targetElement, cardWidth: nu...
true
b1ce8cbc841c0b6583c77dbc99e4270ce21f6e0c
JavaScript
rudy-digipen/p5.js-workshop
/examples/student_games/2021/Kim Hyunjin/particle.js
UTF-8
938
3.140625
3
[]
no_license
class Particle { constructor( start_x, start_y ) { this.position = new p5.Vector( start_x, start_y ); this.velocity = new p5.Vector(); this.acceleration = new p5.Vector(); this.color = color( 249, 253, 34, 255 ); this.size = 20; } update( delta_time_seconds ) ...
true
bf8ae117576b9dae726cd2182eae66f7d5bfc82a
JavaScript
akshayhonap619/honap-akshay-webdev
/assignment/model/widget/widget.model.server.js
UTF-8
6,271
2.625
3
[]
no_license
/** * Created by Akshay on 8/9/2017. */ var mongoose = require('mongoose'); var widgetSchema = require('./widget.schema.server'); var pageModel = require('../page/page.model.server'); var widgetModel = mongoose.model("widgetModel",widgetSchema); widgetModel.findWidgetsByPageId = findWidgetsByPageId; widgetModel...
true
7aa360a691239231c67a36214bb7bddca43251ce
JavaScript
Sammthings/Frontend_for_designers
/Opdracht 3/js/script.js
UTF-8
342
2.734375
3
[]
no_license
function startRequest() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { // Action to be performed when the document is read; console.log(xhttp.responseText); } }; xhttp.open("GET", "http://dennistel.nl/movies", t...
true
c34d95330c353bbad3c0c353f6dfc3f1bc09bde0
JavaScript
DenysSidorov/NodeJS_l2_game_log
/start-game.js
UTF-8
1,812
3.203125
3
[]
no_license
var colout = require('colout'); var readline = require('readline'); var fs = require('fs'); var pathFile = process.argv.slice(2)[0] || 'log.txt'; // buffer of asks for write to file var bufferString = ''; function addToBuffer(element) { bufferString += element; } // config readline const rl = readline.createInte...
true
4222459216a8d2dd5db4b69ca32889f71b9c886e
JavaScript
terrifricker/our-solar-system
/client/src/components/planets/Planet.js
UTF-8
1,733
2.703125
3
[ "MIT" ]
permissive
/** * Base component for all planet components. */ import { Renderer, Scene, Sphere } from "../../utils/3D"; import { useRef, useEffect } from "react"; import { AnimationCallback, SphereOptions } from "../../utils/3D/Sphere"; import { SceneOptions } from "../../utils/3D/Scene"; import { nanoid } from "nanoid"; /** ...
true
59a4575fdb7a345fce24734bd0730fd3b60a009c
JavaScript
NotHolst/TransportFeverMapEditor
/mapeditorapp/app/components/logic/tools.js
UTF-8
3,133
2.8125
3
[]
no_license
export class Option { constructor(name, value, min, max) { this._name = name; this._value = value; this._min = min != null ? min : -Number.MAX_VALUE; this._max = max != null ? max : Number.MAX_VALUE; this._onChanged = () => {}; } set onChange(method) { this._onChanged = method; } get name() { retur...
true
254c5dcc3a76eec99d05fb19a6eac20241a3ac9c
JavaScript
whdgns5059/openSISE
/src/main/webapp/js/chart.js
UTF-8
6,392
2.515625
3
[]
no_license
$('#totalDeal').on('click',function(){ console.log('ํ™•์ธ'); var dl_excv_area = document.getElementById('excv_area').value; var artcl_gu = document.getElementById('artcl_gu').value; var artcl_dong = document.getElementById('artcl_dong').value; var artcl_zip = document.getElementById('artcl_zip').value; var art...
true
de4e4355fa039084c7cfa71a263e93e2d54a8335
JavaScript
Prateek-Pandey-96/Rexify
/static/js/contact.js
UTF-8
784
2.859375
3
[]
no_license
$(document).ready(function(){ $('#three').addClass('underlinePerma'); $('#submitButton').click(function(){ var name = $('#senderName').val(); var email = $('#senderEmail').val(); var emailRegEx = /\S+@\S+\.\S+/; var query = $('#senderQuery').val(); if(name === "" || name.length <=3...
true
41d8c8f917da07796b127bf6c3498a3e86ecf8d1
JavaScript
chalermpondasri/node-garmin
/Garmin-TCPServer.js
ISO-8859-3
52,755
2.65625
3
[]
no_license
//------------- requires --------- var cluster = require('cluster'); var net = require('net'); var Utils = require('util'); var buffer = require('buffer'); var http = require('http'); var pg = require('pg'); var colors = require('colors'); var pgConnectionInfo = { user: 'postgres', ...
true
59c7584c935f74248d094272ff06aa362ef68966
JavaScript
lokmen-abid/toy-problems
/editDistance.js
UTF-8
691
4.03125
4
[]
no_license
/** * * Given two strings, find the minimum number of edits/operations required to convert the first string into the second string, given that the only operations can be insertion, removal, or replacement. * Challenge: Do this in O(m x n) time, where m, n are the respective lengths of str1 and str2. * * @function ...
true
c0025cbcf67202415a2e4a1226e295cd4054af6a
JavaScript
moloni73/ProyectoD10
/src/js/index.js
UTF-8
1,417
2.890625
3
[]
no_license
/* eslint-disable */ import "file-loader?name=[name].[ext]!../index.html"; import "../assets/img/rigo-baby.jpg"; import "../assets/img/4geeks.ico"; //import 'breathecode-dom'; //DOM override to make JS easier to use import "../style/index.scss"; function raimag() { var imagarray = []; imagarray[0] = "&spades;"; /...
true
a89ba533aaa661c4f568fd14b57a5e497e3951cc
JavaScript
VVMachine/nodejs-hw
/contacts/contacts.validators.js
UTF-8
1,460
2.515625
3
[]
no_license
const Joi = require("joi"); const { Types: { ObjectId }, } = require("mongoose"); function validateNewContact(req, res, next) { const newContactValidation = Joi.object({ name: Joi.string().min(1).required(), email: Joi.string().email().required(), phone: Joi.string().min(10).required(), subscripti...
true
5c2ec0d2129d82e79c9fdfc513b9346445c958ff
JavaScript
Sephiroth25896/EpiKyoot
/lib/MyCookie.js
UTF-8
358
2.796875
3
[]
no_license
function decodeCookie(cookieString = "") { const cookies = cookieString.split(';'); let cookie = {}; cookies.forEach(function (item) { const crumbs = item.split('='); if (crumbs.length > 1) cookie[crumbs[0].trim()] = crumbs[1].trim(); }); return cookie; } const MyCookie = { deco...
true