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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8c224249805ea0e37149f691418e2a6f6d2ac24c | JavaScript | bravesoftdz/CRUDMongo | /TP.js | UTF-8 | 2,217 | 2.515625 | 3 | [] | no_license | var http = require('http');
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.json()); // support json encoded bodies
app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies
var MongoClient = require('mongodb').Mong... | true |
54d00a07056f4793e20a6d114602d742ae78548b | JavaScript | mikaelma/AngularProject | /server/index.js | UTF-8 | 14,346 | 2.53125 | 3 | [] | no_license | var express = require('express');
var app = express();
var path = require('path');
var dist = __dirname + "/../client/dist/";
var bodyParser = require('body-parser');
var jwt = require('jsonwebtoken');
var passhash = require('./passhash');
var mongoose = require("mongoose");
var Drink = require('./models/drink');
var U... | true |
8f1576a4511c459252d48ad57be15dc401b4058a | JavaScript | cbec-dev/etch_a_sketch | /script.js | UTF-8 | 2,282 | 3.46875 | 3 | [] | no_license | function drawGrid(rows, cols) {
const wrapper = document.querySelector('.grid-wrapper');
const gridContainer = generateGridContainer(rows, cols);
for(let i=0; i<rows; i++) {
const gridRow = document.createElement('div');
gridRow.classList.add('grid-row');
gridRow.style.display = 'f... | true |
a7f4e64f3d8a5dab834d33c36bbce3284cd68288 | JavaScript | nick-bennett/search-complexity-js | /index.js | UTF-8 | 1,461 | 3.703125 | 4 | [] | no_license | var assert = require('assert');
function linearSearch(haystack, needle) {
for (let i = 0; i < haystack.length; i++) {
if (haystack[i] === needle) {
return i;
}
}
return -1;
}
function binarySearch(haystack, needle) {
var lower = 0;
var upper = haystack.length;
while (upper > lower) {
let... | true |
093663b334a896eaf1011fe77e6699e74d007a7d | JavaScript | shinsewon/instagram | /sewonshin/js/main.js | UTF-8 | 3,236 | 3.3125 | 3 | [] | no_license | const textBox = document.querySelector(".inputBox"); //input ๋ณ์ ํ ๋น
const summitButtonClick = document.querySelector(".buttonBox"); //๋ฒํผ ๋ณ์ ํ ๋น
const feedComment = document.querySelector(".new_comments"); // ์๋ก์ด ๋๊ธ์ด ๋ฌ๋ฆด div ํ ๋น
const profileId1 = document.querySelector(".my_profile_id"); //s_sewon ์ด๋ฆ ํ ๋น
// 1. ์ฝ๋ ์์ ์ )๊ฒ์ ๋ฒ... | true |
529cd39d05dfb21ddda0845e78945c692da1530c | JavaScript | ValentinaBR/tienda-1 | /public/admin/js/main.js | UTF-8 | 1,480 | 2.53125 | 3 | [
"MIT"
] | permissive | $(document).ready(function(){
$(".btn-detalle-pedido").on('click', function(e){
e.preventDefault();
var id_pedido = $(this).data('id');
var path = $(this).data('path');
var token = $(this).data('token');
var modal_title = $(".modal-title");
var modal_body = $(".modal-body");
... | true |
7bb241450075f282a9a05445bcec6380c11962dc | JavaScript | torinberger/stokko-market | /server/database/controllers/user.js | UTF-8 | 720 | 2.546875 | 3 | [
"MIT"
] | permissive | const User = require('../models/user')
// # Structure
// class
// .function(params)
// .then(callback)
// .err(callback)
// # Methods
// GET -> getUsers ()
// GET -> getUserByID (id)
// GET -> getUser (target)
// ADD -> addUser (target)
// PUT -> updateHolding (id, changes)
module.exports = function (... | true |
f009518ac8d7eb784137913615afef1029d8b1d3 | JavaScript | marcellinamichie291/crypto_arbitrage2 | /Acquiring_Data/Bittrex.js | UTF-8 | 3,476 | 2.859375 | 3 | [] | no_license | const Utils = require('./Utils');
const Bittrex_root = "https://api.bittrex.com/v3";
// get base and quote asset from the Bittrex ticker name
function bittrex_get_assets(ticker) {
let l = ticker.split("-");
return {"base": (l[0]).toUpperCase(), "quote": (l[1]).toUpperCase()};
}
async function update_bittrex_... | true |
01c7389b2f86f43c408703730b9711b3ad75ef00 | JavaScript | jinster/superttt | /src/components/EachBoard/Square.jsx | UTF-8 | 435 | 2.5625 | 3 | [] | no_license | import React from "react";
class Square extends React.Component {
render() {
const boardnumber = this.props.boardnumber;
const squarenumber = this.props.squarenumber;
const hc = e => {
this.props.handleClick(boardnumber, squarenumber);
};
return (
<button className="square" onClick=... | true |
5f5e8ba61a85a1e1e54d7fabbf95b5266bc4ddd0 | JavaScript | Bakayoko99/javascript | /jour-03/jour03.js | UTF-8 | 2,002 | 3.796875 | 4 | [] | no_license |
// 01 - Array
var fruits = ["mango", "lemon", "blueberry"];
console.log(fruits);
console.table(fruits);
// 02 - Access
var ingredients = ["eggs", "milk", "butter"];
console.log(ingredients[1]);
console.log(ingredients.indexOf("butter"));
// 03 - Add and Remove
var objects = ["pen", "book", "lamp"];
objects.u... | true |
5330c3983c58c764b117b7b22854906ea1312ae9 | JavaScript | mianusmankhalid/digi-hr-app | /app/api/user/processor/error_processing.js | UTF-8 | 957 | 2.765625 | 3 | [] | no_license | import HttpError from '@digihr_errors/HttpError';
import InternetConnectionError from '@digihr_errors/InternetConnectionError';
/**
* Processes error to be more human friendly before returning control
* @param {Error} result
* @param {string} text
*/
export function processError(result, text) {
if (result instan... | true |
f53d9f381a96ca1fec39e072c20cd42321976000 | JavaScript | drudradas/newtons-cradle | /sketch.js | UTF-8 | 1,067 | 2.765625 | 3 | [] | no_license |
const Engine = Matter.Engine;
const World = Matter.World;
const Bodies = Matter.Bodies;
const Body = Matter.Body;
const Constraint = Matter.Constraint;
var roof1,bob1,bob2;
function preload()
{
}
function setup() {
createCanvas(800, 700);
engine = Engine.create();
world = engine.world;
//Create the Bodies ... | true |
cc9ac06b0d473bcdff254b8b112deb0a57a42d08 | JavaScript | JacobWylie/colt-steele-basics | /control-flow/script.js | UTF-8 | 5,762 | 4.03125 | 4 | [] | no_license | const logic = document.querySelector('.logic');
const conditionals = document.querySelector('.conditionals');
const guessingGame = document.querySelector('.guessingGame');
const loopText = document.querySelector('.loops');
// Logic
logic.innerHTML = `
const x = 10;
<p>const y = 'a';</p>
<p>y ==... | true |
43bdd93801722d35951561443cfb2afd2bd5fb7d | JavaScript | IAIAE/Praan | /src/api/static/of.js | UTF-8 | 1,024 | 2.96875 | 3 | [
"MIT"
] | permissive | import Stream from '../../Functor/Stream.js'
import Just from '../../Functor/Headspring/Just'
import FromArray from '../../Functor/Headspring/FromArray'
import FromPromise from '../../Functor/Headspring/FromPromise'
// import Empty from '../../Functor/Headspring/Empty'
function isPromise(data){
return !(data instan... | true |
d688cc9c03dac3361bb6c24701b9d8533422dec7 | JavaScript | weekendchow/Leetcode_JS | /easy/26. Remove Duplicates from Sorted Array/Array_Splice.js | UTF-8 | 337 | 3.203125 | 3 | [
"MIT"
] | permissive | var removeDuplicates = function(nums) {
let i, j, prev, len = nums.length;
let removed = [];
for(i=0; i<len; i++){
if(nums[i] === prev){
removed.push(i);
}
prev = nums[i];
}
for(j = removed.length-1; j>=0; j--){
nums.splice(removed[j],1);
}
return ... | true |
8d0c1a0f24752ee06b43d0331bc79fc137db1a48 | JavaScript | ezzel/My-JavaScript-Reference | /JavaScript/JS While Loop/script.js | UTF-8 | 879 | 4.28125 | 4 | [] | no_license | // Printing all numbers between -10 and 20
console.log("Printing all numbers between -10 and 20");
var number = -10;
while (number <= 20) {
console.log(number);
number++;
}
//Printing all even numbers between 10 and 40
console.log("Printing all even numbers between 10 and 40")
number = 10;
while (number <= ... | true |
de2a8d27751e8a1d8344de221e7cc85af0a77ccc | JavaScript | melindab/solo | /Example/assets/example.js | UTF-8 | 846 | 2.828125 | 3 | [] | no_license | $(document).ready(function() {
$('.ones').click(function() {
var findIt = pattern.indexOf($('.example').text(), '"A" 4 letters space');
$('.returns').html('<strong>Returns: </strong>' + findIt);
});
$('.wallet').click(function() {
var replaceIt = pattern.replaceAll($('.example').text(), '"Ra" at... | true |
e8e95e58053097abffcdf44cd9827049733346ce | JavaScript | Muqeet07/TodoApp | /src/todolistUsingFirebase/Todo.js | UTF-8 | 886 | 2.546875 | 3 | [] | no_license | import React from 'react';
import firebase from './firebase';
export default function Todo({todo}) {
const deleteFunction = () => {
const item = firebase.database().ref('todolist').child(todo.id);
item.remove();
}
const completeFunction = () => {
const item = firebase.database... | true |
51ac2f550969a14898ea3d517f65d03c9b231801 | JavaScript | arodriguezge/backend-weather-app | /geocode/geocode.js | UTF-8 | 889 | 2.796875 | 3 | [] | no_license | const axios = require('axios')
const weather = require('../weather/weather')
getLocation = (location, options) => {
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURI(location)}&key=AIzaSyBmED3bBLrIOIN2086bbwDlfgeGyq63rKU`)
.then(res => {
if (res.data.status === 'OK') {
... | true |
b2015567a32610fa2df7fb009a750556541943ec | JavaScript | ajudensi/SLC-Day-2 | /cliAPI/app.js | UTF-8 | 2,311 | 2.984375 | 3 | [] | no_license | 'use strict';
const request = require('request');
const cheerio = require('cheerio');
const readLine = require('readline');
const colors = require('colors');
const Table = require('cli-table');
const defaultUrl = 'http://www.imdb.com/title/tt3521164/';
const rl = readLine.createInterface({ input: process.stdin, outp... | true |
d989ee3c7b8c54f601abfed0cf08135f1a5cf1a2 | JavaScript | vegaonline/BARCQ_Django | /static/js/loadfile.js | UTF-8 | 1,287 | 2.859375 | 3 | [] | no_license | /*
** Function to load JSON and populate the frontend with respective circuit
*/
function LoadJson2(data2){
try{
var mydataExtended = JSON.parse(data2);
}
catch(e){
var mydataExtended = data2;
}
//var mydataExtended = data2;
var gatesdata = mydataExtended.instructions;
//console.log(gatesdata);
var numOf... | true |
f81953c904ce059bec28614cd08509b803bb6a43 | JavaScript | fuelmandevteam/FuelmanMERNApi | /routes/api/vendors.js | UTF-8 | 4,710 | 2.65625 | 3 | [] | no_license | const express = require('express');
const Vendor = require('../models/Vendor');
const router = express.Router()
const { check, validationResult} = require('express-validator');
// @route POST api/users
// @desc Register User
// @access Public
router.get('/',(req,res)=>{
res.send('vendors Route');
})
// ... | true |
efa9d0808d6aabbdb273ffa459a5270960c6d172 | JavaScript | elfanticos/miferreteria | /public/js/jslogin.js | UTF-8 | 809 | 2.515625 | 3 | [] | no_license | function validateLogin() {
var user = $('#user').val(),
pass = $('#pass').val();
if(user.length == 0 || user == '') {
$('#user').parent().addClass('is-invalid');
$('#user').parent().find('span').html('Ingrese el usuario.');
return;
}
if(pass.length == 0 || pass == '') {
$('#pass').parent().addClass('is... | true |
ace82f9a10aefc5949c4226a46b36476cb76a176 | JavaScript | matyskyle/react-javascript-repaso | /src/bases/07-desestructuracion-arr.js | UTF-8 | 558 | 3.59375 | 4 | [] | no_license | const personajes = [ 'Goku', 'Vegeta', 'Gohan', 'Trunks', ];
const [ , , , pj ] = personajes;
console.log( pj );
///////////////////////////////////////////////////////////
const retornaArreglo = () => {
return [ 'ABC', 123 ];
};
const [ letras, numeros ] = retornaArreglo();
console.log( letras, numeros );
////... | true |
330267b93a7221249419a82898bfe4401f49de2e | JavaScript | lisophorm/web-parent-app-v2 | /app/scripts/extractQueryParams.js | UTF-8 | 412 | 2.765625 | 3 | [] | no_license | function extractQueryParams() {
var match,
search = /([^&=]+)=?([^&]*)/g,
query = window.location.search.substring(1),
routeParams = {};
while (match = search.exec(query)) {
routeParams[decode(match[1])] = decode(match[2]);
}
return routeParams;
function decode(s) {
... | true |
23aec1096f6a44b522c4df67ef226732d5a7c055 | JavaScript | m0r1m0/todo-app | /src/App.js | UTF-8 | 640 | 2.625 | 3 | [] | no_license | import React, { Component } from "react";
import "./App.css";
class App extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="App">
<input
type="text"
placeholder="TODOใๅ
ฅๅใใฆใใ ใใ"
value={this.props.inputTodo} // connectใใๆ... | true |
315810a66ac01c4cb0088c19e5ee8a95b3687270 | JavaScript | Yohaldry/App-Daily-Bits | /App Daily_Bits/script/Perfil.js | UTF-8 | 4,427 | 2.78125 | 3 | [] | no_license | let form = document.getElementById('formPerfil')
let botonModificar = document.getElementById('modif')
let botonDelete = document.getElementById('eliminar')
form.addEventListener('submit', async (e) =>{
e.preventDefault();
const email = document.getElementById('correo').value
const nombre = docume... | true |
86277b1673072c6144b86a9993073bd3c089006c | JavaScript | quyunzhao/webpackDemo | /src/07-1.class-ๅฎไพๆนๆณๅ้ๆๆนๆณ.js | UTF-8 | 1,736 | 4.5 | 4 | [] | no_license | function Person(name, age) {
this.age = age;
this.name = name;
}
// info ๅฑๆง๏ผ็ดๆฅๆ่ฝฝ็ปไบๆ้ ๅฝๆฐ๏ผๆไปฅๅฎๆฏ ใ้ๆๅฑๆงใ
Person.info = "่ฟๆฏๅฎไพๅฏน่ฑก็ๆ่ฟฐ";
// ใๅฎไพๆนๆณใ
Person.prototype.say = function() {
console.log("hello:่ฟๆฏ Person ็ๅฎไพๆนๆณ");
};
// ใ้ๆๆนๆณใ
Person.show = function() {
console.log("่ฟๆฏ Person ็้ๆๆนๆณ");
};
const p1 = new Person("... | true |
bcb127416ec1fc47d119b8dff72ef55e6fca0850 | JavaScript | ulee1006/mern | /client/src/Edit.js | UTF-8 | 2,590 | 2.734375 | 3 | [] | no_license | import React, { Component } from 'react';
import axios from 'axios';
class Edit extends Component {
constructor(props) {
super(props);
this.state = {
pet: {
petname: "",
pettype: "",
description: ""
},
errors: {
petname: "",
pettype: "",
desc... | true |
9c66cfa96b414a211e82f7fabb9c722039ab3ad6 | JavaScript | isaacfarrow/NewZealand-Attractions-Website | /js/script.js | UTF-8 | 1,412 | 3.046875 | 3 | [
"MIT"
] | permissive | ๏ปฟ// function to validate the job application form
function checkForm() {
// resets all errors to default conditions
document.getElementById("errorName").innerHTML = "";
document.getElementById("errorEmail").innerHTML = "";
document.getElementById("errorInfo").innerHTML = "";
document.getElementById("erro... | true |
4367b2d3b310a84538a9ad0d09e4087c5ca074e5 | JavaScript | finn-no/carousel-js | /src/finn/carousel/touchNavigation.js | UTF-8 | 1,270 | 2.546875 | 3 | [
"MIT"
] | permissive | /*! carousel-js - 2013-06-14. Copyright (c) 2013 FINN.no AS - http://finn.no/; Licensed MIT */
/* global FINN */
(function (C) {
"use strict";
function getPosition(e) {
return {
x: e.targetTouches[0].pageX,
y: e.targetTouches[0].pageY
};
}
C.setupTouchNavigation... | true |
67d46436cc6e22e4a6b66a429422ee59bf3a2bcd | JavaScript | bennykula-git/first | /src/components/BasicForm.js | UTF-8 | 2,954 | 2.796875 | 3 | [] | no_license | import useInput from '../hooks/useInput';
const BasicForm = (props) => {
const {
enteredValue: firstName,
isEnteredValueValid: isFirstNameValid,
invalidEnteredValue: invalidFirstName,
valueInputChangedHandler: firstNameChangedHandler,
enteredValueBlurHandler: firstNameBlurHandler,
reset: rese... | true |
5923b77c5b0634c2f2f74e9c5cd20f055a64847c | JavaScript | adiy1212/FitYourself | /js/programs.js | UTF-8 | 1,722 | 2.515625 | 3 | [] | no_license | var app = angular.module("fproApp", []);
app.controller("programsController", function($scope, $http) {
$http.get("../json/fprograms.json").success(function(data) {
$scope.fprograms = data;
}).error(function(data, status, headers, config) {
alert("ERROR !!!");
});
// back to menu of programs //
$scope.bac... | true |
4c06c8b4769554fc410ea02159f8870ff56692af | JavaScript | Godspower12/filterable-contacts | /main.js | UTF-8 | 792 | 3.6875 | 4 | [] | no_license | // Create a variable
let filterInput = document.getElementById('filterInput');
// Create an Event listener
filterInput.addEventListener('keyup', filterNames)
// Create a function for filter names
function filterNames() {
// Get the input value
let filterValue = document.getElementById('filterInput').va... | true |
b9025ab8a46ef76f4e4bf1fd15ac97ba6909be47 | JavaScript | mlbiche/code-img | /src/LeaderboardView/LeaderboardView.js | UTF-8 | 2,122 | 2.53125 | 3 | [] | no_license | /**
* LeaderboardView component
*
* Define the leaderboard
*/
import React from 'react';
import { Container, Row, Col } from 'react-bootstrap';
import UserScore, { SCORE_TYPE } from '../UserScore/UserScore';
// Mock up upload User scores object constants
const MOCKUP_UPLOAD_SCORES = [
{ id: 0, username: 'Kryst... | true |
1aeefa49bd4a95c1c7633ae1f8a79b94d2141af0 | JavaScript | Chrinkus/year-three | /Scratch/fib.js | UTF-8 | 261 | 3.609375 | 4 | [
"MIT"
] | permissive | function fibonacciFinderN(n) {
"use strict";
let pre = 0,
cur = 1,
fib = 0;
for (let i = 2; i < n; i++) {
fib = pre + cur;
pre = cur;
cur = fib;
}
return fib;
}
console.log(fibonacciFinderN(300));
| true |
7e6209a67e499c41c5fc02d8887874992ab059c8 | JavaScript | keymer2000/TRABAJOS-VIRTUAL-GEEK | /3-condicionales/ejercicio1/retouno.js | UTF-8 | 288 | 2.546875 | 3 | [] | no_license |
const url = 'http://placehold.it/300x300';
var kajj = 'http://www.fillmurray.com/300/300';
document.querySelector("#cont").innerHTML = `
<img src="${kajj||url}" alt="texto de imagen" onerror="this.src='http://placehold.it/300x300';" />`;
| true |
077f72f915620a44f5ecf03bff30b6252a065490 | JavaScript | webmaster-zundux/ajax | /src/utils.js | UTF-8 | 4,958 | 3.171875 | 3 | [
"MIT"
] | permissive | /**
* JS implementation of PHP's http_build_query()
* @see https://github.com/vladzadvorny/http-build-query
* @type {httpBuildQuery}
*/
const httpBuildQuery = require('http-build-query');
/**
* Helpers functions
*/
module.exports = class Utils {
/**
* Encode data object to urlencoded string
* {name: 'tal... | true |
8756d35406e3443d83df89f73b767f715b8233aa | JavaScript | programmerchina/maoyan | /public/js/getwidth.js | UTF-8 | 329 | 2.8125 | 3 | [] | no_license | function getWidth(){
var cWidth = document.documentElement.clientWidth;
document.documentElement.style.fontSize = cWidth / 3.75 + "px";
// console.log(document.documentElement.style.fontSize);
}
getWidth()
window.load = getWidth;
window.addEventListener("orientationchange",getWidth)
window.addEventListener("resize",g... | true |
f3593d85c7f076f81535fcb4245ace9555ec0340 | JavaScript | sistemkoordinat/sistemkoordinat.github.io | /javascript2.js | UTF-8 | 5,656 | 3.140625 | 3 | [] | no_license | function ftampil(){
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;
for (i = 0; i < dropdown.length; i++) {
console.log(dropdown.length);
dropdown[i].addEventListener("click", function() {
this.classList.toggle("active2");
var dropdownContent = this.nextElementSibling;
i... | true |
9eee33e1c4362f1db64eab4b5ea2ae3e3777b123 | JavaScript | AutomatonSystems/automaton-script | /src/Word.js | UTF-8 | 488 | 2.625 | 3 | [
"Unlicense"
] | permissive |
export default class Word{
constructor(name, block, argPattern, encode, preExecute){
this.name = name;
this._flowControl = block;
this._args = argPattern;
this._encode = encode;
this._preExecute = preExecute;
}
get flowControl(){
return this._flowControl;
}
args(string){
return string;
}
pr... | true |
b586de6de3e7ed02fae2dea0e2ef781c7ac23589 | JavaScript | gtrabanco/nodejs | /nodeapi/server/routes/protected.js | UTF-8 | 666 | 2.53125 | 3 | [] | no_license | "use strict";
var auth = require('basic-auth');
var express = require('express');
var router = express.Router();
router.use(function (request, response, next) {
//Load the header
var user = auth(request);
//Check if the user exists
if (!user || user.name !== 'access' || user.pass !== 'access') {
... | true |
1082d5a97b31c154251e4d8a02f8ffdf492c6d08 | JavaScript | Rusty-Hermansen/MTGDeckBuilder | /App.js | UTF-8 | 832 | 2.765625 | 3 | [] | no_license | // CRUD user, deck, and card
import express from 'express'
const app = express();
app.use(express.urlencoded({extended:true}))
app.use(express.json())
app.listen(4000,()=>{
//Any logic that needs to happen as the server starts goes here.
console.log("started on port 4000");
});
app.get('/',(req, res)=>{
r... | true |
57a0ca8dc0411773d3ffd8f4799389d5d807a18e | JavaScript | Daybeling/APPEjercicio | /app.js | UTF-8 | 1,853 | 3 | 3 | [] | no_license | "use strict";
window.addEventListener('load', cargar);
function cargar(){
let form = document.getElementById("id_formulario");
let nombre = document.getElementById("nomb");
let apellidos = document.getElementById("apellidos");
let edad = document.getElementById("edades");
let domicilio = document.getElement... | true |
de9603568462a63a7d965c3cb8ef921ad14503fb | JavaScript | m3mnoch/gow-data | /support/gems.display.js | UTF-8 | 6,985 | 2.5625 | 3 | [] | no_license | $.namespace('gems.display');
gems.display.init = function() {
gems.common.log("display script loaded.");
gems.display.loadTroopData();
}
gems.display.loadTroopData = function() {
$.getJSON(gems.common.troopDataUrl, function(data) {
gems.common.troops = data;
gems.display.buildKeywordFilters();
$("#loadMessa... | true |
8cff54375feea274fcc70da38ce092d8473dc282 | JavaScript | gabrielfs7/graphql-sample-app | /frontend/src/pages/AbstractSign.js | UTF-8 | 2,301 | 2.703125 | 3 | [] | no_license | import React from 'react';
import ApiRequestService from '../services/ApiRequestService';
import './Form.css';
import './Sign.css';
class AbstractSign extends React.Component {
constructor(props) {
super(props);
this.emailElment = React.createRef();
this.passwordElment = React.createRef();... | true |
0e23e81a431206d70be03080280adbaa5a5029ac | JavaScript | Lesi21/Holiday-Gifts | /Game/js/states/play.js | UTF-8 | 18,141 | 2.6875 | 3 | [] | no_license | //ะะดะตัั ะดะพะฑะฐะฒะปัะตะผ ะธะณัะพะฒัะต ัะปะตะผะตะฝัั
//ะัะถะฝะพ ัะพะทะดะฐัั ะพัะดะตะปัะฝัะน ัะฐะนะป ะณะดะต ะฑัะดะตะผ ั
ัะฐะฝะธัั ะณะพัะพะฒัะต ััะฝะบัะธะธ
//ะะพะดะฐัะบะธ ะธ ะพััะฐะปัะฝัะต ัะปะตะผะตะฝัั ะดะพะปะถะฝั ะฟะพัะฒะปััััั ะทะฐ ัะบัะฐะฝะพะผ(ัะฟัะฐะฒะพ)
var flag=true;//ะผัะทัะบะฐ ะฒ ะธะณัะต ะฒะบะปััะตะฝะฐ
var pause = false;
var length_of_level;//ะดะปะธัะตะปัะฝะพััั ััะพะฒะฝั
var lives = 3;//ะบะพะป-ะฒะพ ะถะธะทะฝะตะน ะฟะตััะพะฝะฐะถะฐ
var score ... | true |
ce1eb18445c2c7867b1c855ab9614b5c87216430 | JavaScript | usco/glView-helpers | /src/planes/ImagePlane.js | UTF-8 | 1,400 | 2.6875 | 3 | [
"MIT"
] | permissive | import THREE from 'three'
import assign from 'fast.js/object/assign'//faster object.assign
class ImagePlane extends THREE.Object3D{
constructor (width, length, imgUrl, resolution, upVector) {
const DEFAULTS = {
width:200
,length:200
,imgUrl:""
,upVector:new THREE.Vector3(0,1,0)
... | true |
6b61e8e5639075ce1c311781dfb7cbc2c023dcc1 | JavaScript | NamPhanGitHub/sabansanbay | /Reinnovate AirportModel/public/util.js | UTF-8 | 605 | 3.078125 | 3 | [] | no_license | function createRequest() {
try {
request = new XMLHttpRequest();
} catch (tryMS) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (otherMS) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = null;
}
}
}
return request;
}
function showUse... | true |
090504b6d93892ec7f5f6ccec5a2f3d1b12d20ad | JavaScript | abg999/shopify | /public/js/show.js | UTF-8 | 1,502 | 2.90625 | 3 | [] | no_license | var li1=document.getElementById("li1");
var li2=document.getElementById("li2");
var li3=document.getElementById("li3");
var li4=document.getElementById("li4");
var zoomedimg=document.getElementById("zoomed-img");
var demo=document.getElementById("demo");
var demo2=document.getElementById("demo2");
var demo3=do... | true |
55d5b82f5410bc14dde93b96e14e14c512f24847 | JavaScript | lwq123x/dongyimai_parent | /dongyimai_search_web/src/main/webapp/js/controller/itemSearchController.js | UTF-8 | 4,409 | 2.75 | 3 | [] | no_license | app.controller('itemSearchController', function ($scope,$location, itemSearchService) {
$scope.search = function () {
$scope.searchMap.pageNo = parseInt($scope.searchMap.pageNo);
itemSearchService.search($scope.searchMap).success(function (response) {
$scope.resultMap = response;
... | true |
506db52400b768f6d9de0be9389e393009d7ef31 | JavaScript | westongame/bigl-custom-creator | /src/utils/history.js | UTF-8 | 3,331 | 2.8125 | 3 | [] | no_license | const HISTORY_LIMIT = 20;
const START_STEP = 0;
const START_ID = 0;
const APP_NAMESPACE = 'bccApp';
const INITIAL_HISTORY_STATE = {
step: START_STEP,
idMap: [START_ID],
};
const getHistoryRaw = () => {
try {
return localStorage.getItem(`${APP_NAMESPACE}-history`);
} catch (err) {
throw ... | true |
71ce58614890cb2260e1d5b92c80aa74dcdac1c9 | JavaScript | denrytech/curso-node.js-introduccion | /app.js | UTF-8 | 296 | 2.671875 | 3 | [] | no_license | // require('./datos');
// console.log(global.test);
// const messages = require('./messages');
// messages.hello("Denry");
// messages.bye("Denry");
// console.log(messages.number);
const { hello, bye, number } = require('./messages');
hello("Denry");
bye("Denry");
console.log(number); | true |
b29e92cee0d6942aa89413a79b7272663d05a4ce | JavaScript | chenhui996/design-mode-front | /src/08.่ฟญไปฃๅจๆจกๅผ-for-of.js | UTF-8 | 422 | 4.1875 | 4 | [] | no_license | // ่ฟญไปฃๅจๆจกๅผ - for...of
function each(data) {
// for...of: ES6 ไธ้จไธบๅผๅไบบๅๅๅค็๏ผๅณๆ ้ๆฏๆฌก้ฝๆๅ้ๅๅจใ
for (let item of data) {
console.log(item)
}
}
// ๆต่ฏ็จไพ
// ๆฐ็ป
let arr = [1, 2, 3, 4, 5]
each(arr)
// html ๆ ็ญพ
let nodeList = document.querySelectorAll('h1')
each(nodeList)
// Map ๅฏน่ฑก
let map = new Map()
map.set('a', 100)
map... | true |
bbc26cdc5fe2d85b2e320c4dc444e3d41bbd071c | JavaScript | yao20570/game1 | /assets/scripts/modules/createRole/panel/CreateRolePanel.js | UTF-8 | 7,569 | 2.5625 | 3 | [] | no_license | /**
* Created by on 2017/9/25.
*/
import BasicPanel from "BasicPanel";
import logger from "Logger";
import ConfigName from "ConfigName";
import ConfigDataManager from "ConfigDataManager";
let SEX = {
MAN:1,
WOMAN:2,
}
class CreateRolePanel extends BasicPanel{
initPanel(){
this._sex = SEX.MAN ... | true |
232d9e616941a3cdb5cc4e730e82a587d2c7ec02 | JavaScript | adam080880/arkademy_bootcamp_1 | /app.js | UTF-8 | 452 | 2.65625 | 3 | [] | no_license | const identity = require('./src/identity')
const validate = require('./src/validate')
console.log('Identity:')
Object.keys(identity).forEach((val, index) => {
console.log(val, ':', identity[val])
})
// Username and password check
let username = "username"
let password = "password"
console.log('\n')
console.log('... | true |
23aa14583c9945f8845d9b69e576ec0cce0f6090 | JavaScript | werwoolf/test_task | /JS/12.js | UTF-8 | 505 | 3.390625 | 3 | [] | no_license | let testData = [
1,
2,
1990,
85,
24,
"Vasya",
"colya@example.com",
"Rafshan",
"ashan@example.com",
true,
false,
];
let testData2 = [1, 2, 1990, 85, 24, 5, 7, 8.1];
let obj = {};
function array_combine(keys, values) {
for (i = 0; i < keys.length; i++) {
if (typeof keys[i] =... | true |
9f8ac83963033e52d11b1437bd50a0d0c343c194 | JavaScript | Laszlo888/frontend-javascript- | /javascript arrays/reverse.hu.js | UTF-8 | 542 | 3.296875 | 3 | [] | no_license | 'use strict';
// Hozz lรฉtre egy `numbers` vรกltozรณt az alรกbbi tartalommal: `[3, 4, 5, 6, 7]`
// Fordรญtsd meg a bejรกrรกs sorrendjรฉt, kezdd a vรฉgรฉrลl!
// - beรฉptett metรณdussal
// - egy รกtmeneti arrayt lรฉtrehozva, รฉs egy ciklus segรญtsรฉgรฉvel
// Logold ki a konzolra a megfordรญtott numbers tรถmb mindegyik elemรฉt
let numbers = ... | true |
463a0ad61ec1325b9cc978e342b674f64b8fe8ab | JavaScript | DonyAlUzzam/Pokemon-API | /database/seeds/DummySeeder.js | UTF-8 | 9,295 | 2.6875 | 3 | [] | no_license | 'use strict'
/*
|--------------------------------------------------------------------------
| DummySeeder
|--------------------------------------------------------------------------
|
| Make use of the Factory instance to seed database with dummy data or
| make use of Lucid models directly.
|
*/
/** @type {import('@a... | true |
f64de9cbdd5c6749fb55b9ff1632d6ff2f12cfa8 | JavaScript | theFool32/LeetCode | /094-binary-tree-inorder-traversal/binary-tree-inorder-traversal.js | UTF-8 | 886 | 3.5625 | 4 | [] | no_license | // Given a binary tree, return the inorder traversal of its nodes' values.
//
// Example:
//
//
// Input: [1,null,2,3]
// 1
// \
// 2
// /
// 3
//
// Output: [1,3,2]
//
// Follow up: Recursive solution is trivial, could you do it iteratively?
//
/**
* Definition for a binary tree node.
... | true |
2fa664ce677e6be36eae5232f5d40883c259b225 | JavaScript | kuzzmi/Kinopoisk-Magic-Button | /src/scripts/trackerSearch.js | UTF-8 | 1,516 | 2.78125 | 3 | [
"MIT"
] | permissive | function TrackerSearch(url, term, parseRules) {
this.searchUrl = url + encodeURIComponent(term);
this.parseRules = parseRules;
};
TrackerSearch.prototype.search = function(callback, errorCallback) {
var me = this;
ajax.get(me.searchUrl, function(response) {
var movies = new MoviesCollection();
... | true |
1ff61c63175af053b2b4b01404f1daa9ec9b5189 | JavaScript | helenfurtner/desafiogama | /assets/js/main.js | UTF-8 | 365 | 3.0625 | 3 | [] | no_license | var images = [];
images[0] = ['assets/images/headset.png'];
images[1] = ['assets/images/headset2.png'];
images[2] = ['assets/images/headset3.png'];
var index = 0;
function change() {
document.getElementById("mainPhoto").src = images[index];
if (index == 2) {
index = 0;
} else {
index++;
}
setTimeou... | true |
534929f6ff326293e62b8aee7a7367a62e778031 | JavaScript | aneeshashutosh/ascend-attendance-tracker | /controllers/attendee.js | UTF-8 | 498 | 2.515625 | 3 | [
"MIT"
] | permissive | const Attendee = require('../models/Attendee');
/**
* GET /people
* People page.
*/
exports.index = (req, res) => {
Attendee.find({}, function(err, people) {
res.render('people', {
title: 'People',
people: people
});
});
};
/**
* GET /api/people/
* Displays all peo... | true |
2d37db561639788a75fe085f767fe9f8207cb052 | JavaScript | pyromarton/pyromarton.github.io | /js/proba.js | UTF-8 | 1,052 | 4.0625 | 4 | [] | no_license | //รsszegzรฉs
let numericArray = [1, 2 , 3, 4, 5];
let sum = 0;
for (let i = 0; i < numericArray.length; i++) {
sum += numericArray[i];
}
console.log("Sum:", sum);
//Pรกros szรกmok keresรฉse
let db = 0;
for (let i = 0; i < numericArray.length; i++) {
if (numericArray[i] % 2 == 0) {
db++;
}
}
console.lo... | true |
5f1bb2e27a0287d5ce8fb032542e75334ecea1d0 | JavaScript | damo-da/restful-api-sample | /apiFiles/Math.js | UTF-8 | 262 | 2.796875 | 3 | [
"ISC"
] | permissive | const Add = (num1, num2) => {
return (num1 + num2);
};
const Average = (numArray) => {
let total = 0;
numArray.map(num => {
total += num;
});
return (total / numArray.length);
};
export default {
Add: Add,
Average: Average
} | true |
e50dce0127da97fc7308ae2cde8b824db10e5db3 | JavaScript | psb/assessment | /src/javascript_basics.js | UTF-8 | 672 | 3.765625 | 4 | [] | no_license | String.prototype.startsWith = function(string){
if (typeof(string) !== "string") {
throw new Error("Input argument was not a string");
} else if (this.substring(0, string.length) === string) {
return true;
} else {
return false;
}
};
var titleizes = function(string){
if (typeof(string) !== "strin... | true |
274b39752acfb33c060715f6109cd40d5fc7e9a4 | JavaScript | typescene/typescene.github.io | /pipeline.js | UTF-8 | 7,720 | 2.53125 | 3 | [
"MIT"
] | permissive | const fs = require("fs");
const path = require("path");
const { Pipeline } = require("markdown-pipeline");
// NOTE: this pipeline module adds ONLY global transform functions, and assets.
// No other content is added here.
//
// Transforms:
// - Add linked files from YAML front matter `add` property
// - Add a `toc` da... | true |
24ca19b7cdad27fafa5b144454bfda068f8047ae | JavaScript | victorpinon/Full-stack-open-part7 | /bloglist-frontend/cypress/integration/examples/blog_app.spec.js | UTF-8 | 3,388 | 2.78125 | 3 | [] | no_license | describe('Blog app', function() {
beforeEach(function() {
cy.request('POST', 'http://localhost:3001/api/testing/reset')
const user = {
name: 'User One',
username: 'user1',
password: 'pswd'
}
cy.request('POST', 'http://localhost:3001/api/users/', user)
cy.visit('http://localhost:3... | true |
b6d1953effdfc0c5c98735f592389229c16eed2d | JavaScript | Manjilan/race-game | /js/main.js | UTF-8 | 885 | 3.40625 | 3 | [] | no_license | var pikachu = document.getElementById("pikachu");
var bulbasaur = document.getElementById("bulbasaur");
pikachu.addEventListener("click", function(){
this.setAttribute("class", "raceMove");
});
bulbasaur.addEventListener("click", function(){
this.setAttribute("class", "raceMove");
});
// var pikachuPosition=pikachu... | true |
eac0b99ae78d4eb1994868b22d37a4a9ee3e2ab7 | JavaScript | SBrinkworth/another-node-example | /controllers/mainCtrl.js | UTF-8 | 623 | 2.59375 | 3 | [] | no_license | var users = require('./../data');
module.exports = {
getUsers: function(req, res, next) {
res.send(users);
},
addUser: function(req, res, next) {
var newUser = req.body;
users.push(newUser);
res.send(users);
},
updateName: function(req, res, next) {
var index = req.params.index;
var newName = req.bo... | true |
51e8de6df4bb9e953863b25670e67ea466ea3857 | JavaScript | tnagano99/Calculator | /calculator.js | UTF-8 | 3,430 | 3.921875 | 4 | [] | no_license | // create functions for basic math calculations
function add(x, y) {
let z = Number(x);
let w = Number(y);
let v = z + w;
return Number(v.toFixed(4));
}
function subtract(x, y) {
let v = x - y;
return Number(v.toFixed(4));
}
function multiply(x, y) {
let v = x * y;
retur... | true |
6f0c6c2602c36b2c390a9dc70516fb613ac7f4f7 | JavaScript | thinkful-ei20/tammy-jimmy-object-drills | /drill2.js | UTF-8 | 181 | 2.6875 | 3 | [] | no_license | 'use strict';
const obj = {
foo: 1,
bar: 'yellow',
fum: 'maybe',
quux: true,
spam: 'SPAM is a trademark',
};
for(let key in obj){
console.log(`${key}: ${obj[key]}`);
} | true |
1ba4c9c57b616e2e433caff69a565538581041b1 | JavaScript | cryptomaniablog/slither-clone | /src/sprites/PlayerSnake.js | UTF-8 | 2,119 | 2.890625 | 3 | [
"MIT"
] | permissive | import Phaser from 'phaser';
import Snake from './Snake';
import { Util } from "../utils";
export default class extends Snake {
constructor (game, spriteKey, x, y) {
super(game, spriteKey, x, y);
this.cursors = game.input.keyboard.createCursorKeys();
//handle the space key so that the player's snake... | true |
38dd21a85ecd1f1fc3236f95f34c0853290ca1f6 | JavaScript | cmm1156/javascript-intro-repo | /03-functionCombine.js | UTF-8 | 104 | 3.25 | 3 | [] | no_license |
function combine(argument1, argument2) {
console.log(argument1 + argument2)
}
combine("Bat", "man")
| true |
8d034d8431beca63dbd361dcaf6246e97a048399 | JavaScript | codelerium/webpack-pug-sass-es6-skeleton | /src/js/modules/article-compare.js | UTF-8 | 1,115 | 2.765625 | 3 | [] | no_license | import { calcGradientSteps } from '../helpers/color';
import {addAttribute} from "../helpers/dom";
export default class ArticleCompare {
constructor(options) {
this.wrapper = options.wrapper;
this.original = null;
this.edited = null;
this.stagesOriginal = null;
this.stagesEdited = null;
this.... | true |
270b72e8318dd97ba4d60b0265bb8a6365db3efd | JavaScript | martynaskadisa/Dashboardify | /ChromePlugin/content.js | UTF-8 | 1,918 | 2.78125 | 3 | [] | no_license | const HIGHLIGHT_CLASSNAME = 'dashboardify-highlight';
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
switch (request.action) {
case 'HIGHLIGHT_ELEMENTS':
console.log('Should highlight elements')
default:
return null
}
}
)
function ha... | true |
87cf3232885d72ac10c145369469c8e809e17cb0 | JavaScript | whyvic13/Survivable-Social-Network-on-a-Chip | /routes/chatPrivately.js | UTF-8 | 3,232 | 2.609375 | 3 | [] | no_license | var path = require('path');
var db = require('./database');
var fs = require('fs');
var commonWordsFile = path.join(__dirname, "./common-english-words.json");
var commonWords = JSON.parse(fs.readFileSync(commonWordsFile, 'utf8'));
function inserMessageSql(sender, receiver, message, senderStatus, timestamp, type){
va... | true |
fb861676efcc05b2fee6d0f467a53d09f4316704 | JavaScript | CLSnazel/battleship-react | /messing-around/checkForShips.js | UTF-8 | 853 | 3.078125 | 3 | [] | no_license | const checkForShips = (start, board, direction, size) => {
const rowCoord = start[0];
const colCoord = start[1];
if(direction === 'up') {
for(let i = 1; i < size; i++) {
if(board[rowCoord - i][colCoord] !== '๐') {
return true;
}
}
return false;
} else if (direction === 'down')... | true |
7b660fd4494b9eb5dadee25910ab700bdd909e08 | JavaScript | garosero/Algorithm | /programmers/์์ฅ.js | UTF-8 | 532 | 3.359375 | 3 | [] | no_license | function solution(clothes){
const clothMap = new Map();
let answer = 1;
clothes.forEach(element => {
const getValue = clothMap.get(element[1]);
if(getValue) clothMap.set(element[1],getValue+1);
else clothMap.set(element[1],1);
})
for (const element of clothMap) {
... | true |
88b34b7b434b47a5cabafafba4fde4bff04647d5 | JavaScript | limaluizpaulo/code-wars | /See You Next Happy Year.js | UTF-8 | 162 | 3.046875 | 3 | [] | no_license | let year = 1101
var b = String(year).split('')
let adicionar = () => this[0] + 1
if(b[3] == b[0] || b[1] || b[2]){
b[3]++
}
console.log(b)
| true |
9733a12029034986d3b6d71ad9080c086da965de | JavaScript | yehnan/phonegap_beginners_guide_code | /chapter 11/original/client/database.js | UTF-8 | 2,076 | 3.140625 | 3 | [] | no_license | // open the database
function initializeDB() {
var localDatabase = openDatabase(
"internetNews", // short name
"1.0", // version
"News From The Internet", // long name
50000 // maximum size in bytes
);
... | true |
d2a9049a885dab3abaf4027e1cebab60cc6d88c9 | JavaScript | miaklwalker/Front-end-mentor-monorep | /subtractive image analyze/main.js | UTF-8 | 1,459 | 2.953125 | 3 | [] | no_license | const canvas = document.getElementById("screen");
const context = canvas.getContext("2d");
export default function loadImage(url){
return new Promise(resolve=>{
const image = new Image();
image.addEventListener('load',()=>{
resolve(image);
});
image.src=url;
})
}
Pr... | true |
04794326c03fac3e689ccb7a98b375af1d0d8983 | JavaScript | ninawtt/CourseRegistrationSystem | /app/controllers/courses.server.controller.js | UTF-8 | 5,827 | 2.796875 | 3 | [] | no_license | const mongoose = require("mongoose");
const Course = mongoose.model("Course");
const Student = mongoose.model("Student");
function getErrorMessage(err) {
if (err.errors) {
for (let errName in err.errors) {
if (err.errors[errName].message) return err.errors[errName].message;
}
} else {
return "Unk... | true |
1a7f5663d81bc1c34cb6f81848b39158e37e1801 | JavaScript | davidggevorgyan/js-aca | /src/home-work-ten/author.js | UTF-8 | 666 | 3.203125 | 3 | [] | no_license | class Author {
constructor( name, email, gender ) {
this.name = name;
this.email = email;
this.gender = gender;
}
get name() {
return this._name;
}
set name( value ) {
this._name = value;
}
get email() {
return this._email;
}
set email( value ) {
this._email = value;
}
get gender() {
re... | true |
af6d204ee19a71f0dbc0cb394c97af5cb880b6a2 | JavaScript | candidodmv/openiddict-core | /oidc-react-app/src/components/privatePage.jsx | UTF-8 | 1,028 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | import React, {useState} from 'react';
import AuthService from '../services/authService';
export const PrivatePage = () => {
const [apiClientResponse, setApiClientResponse] = useState("Nothing yet")
const clickHandler = async () => {
const service = new AuthService();
const user = await servi... | true |
332058025f3b836080421a15593adaab1f3b9c6a | JavaScript | xifox/avi | /ciclo-3/actG2a/scripts/confG2a.js | UTF-8 | 288 | 2.546875 | 3 | [] | no_license | var fchs=new Array(12);
var fchsTxt=new Array(12);
var i=0;
while(i<12){var numero=(
Math.random()*12).toInt();
if (!fchs.contains(numero)) {fchs[i] = numero;i++};
};
fchsTxt=[
'theatre', 'shops', 'hospital', 'market', 'swimming pool', 'restaurant',
'', '', '', '', '', ''
];
| true |
8044276f786ea3720a05d16381c278fa554f009b | JavaScript | Jacklizeya/React.js-Interview-Chanllenge | /20210712 ReactUseContextSample.js | UTF-8 | 735 | 3.21875 | 3 | [] | no_license | // in App.js
import React from "react"
import Display from "./Display"
export const NumberContext = React.createContext()
export default function App() {
// Use the Provider to make a value available to all
// children and grandchildren
return (
<NumberContext.Provider value={42}>
<div>
<Disp... | true |
937730dfad595f563b18301ffe28f630a7b293df | JavaScript | kingbora/react-redux-saga | /src/utils/index.js | UTF-8 | 717 | 2.703125 | 3 | [] | no_license | /**
* Created by wenbo.kuang on 2018/6/8.
*/
export const utils = {
clone: (obj) => {
if (obj) return obj;
if (window.JSON) {
return JSON.parse(JSON.stringify(obj));
} else {
if (obj.constructor === Array) {
let myNewArray = [];
for (... | true |
703805adec45a384e8b71c4d90047b2b8d2a4af3 | JavaScript | nathanlubchenco/d3-modules | /core-modules/annotate.js | UTF-8 | 614 | 2.59375 | 3 | [] | no_license | //not convinced this is a useful module, todo: figure out if its use or something like it, is actually helpful
function annotate(config){
//TODO defaults for no line config = a collapsed point (or if that is still visible, some other solution
this.draw_line = function(svgContainer){
var l = svgContainer... | true |
50e8ffaba1c1b29709be8eb3bcf86f18327d4a03 | JavaScript | MariMax/code-wars | /katas/move-zeros/move-zeros.js | UTF-8 | 329 | 2.84375 | 3 | [
"MIT"
] | permissive | function move_zeros(arrNum, isRight = true){
const zeroArray = [];
let i = 0;
while (i<arrNum.length){
if (!arrNum[i]){
zeroArray.push(arrNum[i]);
arrNum.splice(i,1);
continue;
}
i+=1;
}
return isRight?arrNum.concat(zeroArray):zeroArray.concat(arrNum);
}
//module.exports = mo... | true |
e7d8df2fd5f179b442eb8bd8a3706bfeffed2367 | JavaScript | AlanDeveloper/POO | /Bรกsico/while.js | UTF-8 | 1,457 | 3.671875 | 4 | [
"MIT"
] | permissive | //mostra nรบmero de 1 a 10 juntos e separados
var N;
N=1;
BU=" ";
while (N!=10){
BU+=N+" ";
N++;
}
alert(BU);
//Exibir todos os anos bissestos dentro de uma faixa de ano determinada pelo usuรกrio
var N,N1,BU;
N=parseInt(prompt("Digite o 1 ano"));
N1=parseInt(prompt("Digite o 2 ano"));
BU=" ";
while (N<=N1){
if (N%4==... | true |
432d82d3daf8310f3daa41e04205b4d859af918f | JavaScript | GokulEvuri/BetterooNode | /betteroo_test/routes/functions.js | UTF-8 | 344 | 2.84375 | 3 | [] | no_license | // Push image(s) to s3 and get the reference
// Put reference with title and disc to DynamoDB
/**
store_post()
imgr - Image on Right reference from s3
imgl - Image on Left reference from s3
title - Text String of 'Title of the survey'
disc - Text String of 'Discription to the survey'
**/
function store_post(im... | true |
66761bc9b5e3be088b0bae8f4db100bdc6c84f86 | JavaScript | meftunca/frontend-dev | /js/jsPlugins/datePicker.js | UTF-8 | 10,293 | 2.65625 | 3 | [] | no_license | var datepicker = (function () {
var date = new Date(),
year = date.getFullYear(),
month = date.getMonth(),
day = date.getDate(),
month_count = 12,
months_short = [],
months_long = [],
day_count,
days = [],
week_day_count = 7,
... | true |
312565a71f045973d61291ed84c9837ef875bd2c | JavaScript | austintgriffith/paper-wallet | /batch.js | UTF-8 | 1,010 | 2.65625 | 3 | [] | no_license |
const util = require('util');
const exec = util.promisify(require('child_process').exec);
var merge = require('easy-pdf-merge');
var fs = require('fs')
const HOWMANY = 3
async function generate() {
let sources = []
for(let count=1;count<=HOWMANY;count++){
const { stdout, stderr } = await exec('node index... | true |
6c474d9d47ca9665b2d55698ee4d41e55f5537c0 | JavaScript | maksdk/kata | /arrays/09/solution.js | UTF-8 | 232 | 2.6875 | 3 | [] | no_license | const calculateSum = coll => {
if (coll.length === 0) return null;
let sum = 0;
for (let i = 0; i < coll.length; i++) {
if (coll[i] % 3 === 0) sum += coll[i];
}
return sum;
};
export default calculateSum; | true |
7f7cef5cf31ed664b88d56e1dde8182f42641dd9 | JavaScript | gargrave/gameon-client-quasar | /src/components/games/utils/gameValidator.js | UTF-8 | 1,654 | 2.6875 | 3 | [
"MIT"
] | permissive | import { cloneDeep, isEqual } from 'lodash'
import validator from 'validator'
import { valErrs } from '../../../globals/errors'
import GameModel, { parsePlatform } from '../../../models/game'
export function validate (data) {
let valid = true
let testData = cloneDeep(data)
let errors = GameModel.emptyValidation... | true |
d4dfaf92be51c6d8e50fba8d3c2cbc25ec83bb9e | JavaScript | abaron10/Ghost_software_testing_strategy | /VRT/index.js | UTF-8 | 3,754 | 2.53125 | 3 | [] | no_license | const playwright = require("playwright");
const compareImages = require("resemblejs/compareImages");
const config = require("./config.json");
const fs = require("fs");
const { scenarios, options, rutaV1, rutaV2 } = config;
async function executeTest() {
if (scenarios.length === 0) {
return;
}
let resultInfo... | true |
4f5afe3db5bb6a07733ac505a52af89a753f020c | JavaScript | saojun1024/koa-code | /context.js | UTF-8 | 1,410 | 2.8125 | 3 | [] | no_license |
const COOKIES = Symbol('context#cookies');
class Cookies {
constructor(req,res,options){
this.request = req
this.response = res
}
// ๆ นๆฎkey่ทๅๅผ
get(name){
const cookie = this.request.headers["cookie"]
// ๆ ผๅผ name=saojun;path=/;age=20
const arr = cookie.split(';')
let obj={}
arr.forEac... | true |
880f900312f5c44b9403f5cec7ebfadfac6e1400 | JavaScript | locksbentlygt/igme230 | /FINAL/final3.js | UTF-8 | 3,372 | 2.71875 | 3 | [] | no_license | var Engine = Matter.Engine,
//Render = Matter.Render,
World = Matter.World,
Bodies = Matter.Bodies;
var engine;
var ground;
var leftS;
var rightS;
var topS;
var world;
let circles = [];
let rows = [];
let goals= [];
let box1;
let box2;
let box3;
let choi... | true |
35174498c44a03283758e354702736db3691b193 | JavaScript | johnafolayan/loneguard | /js/cache.js | UTF-8 | 2,116 | 2.671875 | 3 | [] | no_license |
//stores all game data and everything that stores data
//images
var IMAGES = {
"antivirus": tmpCanvas(50, 50, function (c) {
c.beginPath();
c.strokeStyle = 'white';
c.lineWidth = 3;
shadow("white", 3, c);
circle(25, 25, 21, c);
c.stroke();
c.closePath();
c.strokeRect(24,24,1,1);
}),
"virus": tmpC... | true |