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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c97aec32d80a3d73b38d77ce3a4879a2fade5cc2 | JavaScript | sairakaye/SOFENGG-VCA | /models/remark.js | UTF-8 | 2,638 | 2.875 | 3 | [] | no_license | /**
* This contains schema initialization and
* model functions for the remarks which is
* part of every form.
* November 23, 2018
* @ver 1.0
* @author Sai Manalili
*/
/**
* Module dependencies.
*/
const mongoose = require("mongoose")
const moment = require("moment")
/**
* Setting up Remark Schema
*/
var ... | true |
784cb3e40c69e13d1b7bc9dd168845c772698335 | JavaScript | MarieMarteau/Minus | /sceneInit.js | UTF-8 | 1,684 | 2.75 | 3 | [] | no_license | "use strict";
const sceneInit = (function() {
return {
// Création et ajout de lumière dans le graphe de scène
insertLight: function(sceneGraph,p) {
const spotLight = new THREE.SpotLight(0xffffff,0.3);
spotLight.position.copy(p);
spotLight.castShadow = true;
spotLight.shadow.mapS... | true |
f2a53bae49201ff43bfe744d5bf19c3338e9ca23 | JavaScript | n-ckr-ch-rds-n/make-news | /lib/articlelist.js | UTF-8 | 489 | 2.734375 | 3 | [] | no_license | (function(exports) {
function ArticleList() {
this._articles = [];
}
ArticleList.prototype = {
save: function(headline, content, url, date, thumbnail, image) {
var article = new Article(headline, content, url, date, thumbnail, image);
var articleId = this._articles.length + 1;
article._id = a... | true |
6a1f3060a55897af806bb1ed62f6589bc0d1ebd7 | JavaScript | yajatgrover45/PRO-C33 | /sketch.js | UTF-8 | 1,777 | 2.796875 | 3 | [] | no_license | var Engine = Matter.Engine;
Bodies = Matter.Bodies;
World = Matter.World;
Events = Matter.Events;
var ground;
var particles = [];
var plinkos = [];
var divisons = []
var divisonheight = 300;
var gameState = "end";
var particle;
var score = 0
var count = 0;
function setup() {
engine = Engine.create();
... | true |
444f3ae745b7a2a276905de4aeba6414e14a53bc | JavaScript | parasite83/crypto-display | /crypto-display.js | UTF-8 | 2,417 | 2.609375 | 3 | [] | no_license | (function ($) {
$.cryptoDisplay = function (element, options) {
var webSocket,
webSocketMsg,
price,
priceOld,
formatter,
diff,
status;
priceOld = 0;
diff = 0;
status = 'normal';
var defaults = {
channel: 'btcusd',
digits: 5,
delay: 1000
... | true |
a4b913b276bfb9524c435edc5b2a5fa80c6d7671 | JavaScript | kjbetts/NodeJS-Lab- | /tasks-routes.js | UTF-8 | 595 | 2.546875 | 3 | [] | no_license | var express = require("express");
var inMemoryDatabase = require("./in-memory-database");
var router = express.Router();
var tasksDb = inMemoryDatabase();
tasksDb.init([
{ text: "Feed the cats" }
]);
router.get("/tasks", function(req, res) {
res.send(tasksDb.readAll());
});
router.post("/tasks", function(req... | true |
f11ef5be97ba732da3ad4f926d8cefd5d7f55ae3 | JavaScript | cucho136/climapp | /index.js | UTF-8 | 1,924 | 2.953125 | 3 | [] | no_license | require('dotenv').config()
const {leerInput, pausa, inquireMenu, listarLugares}= require('./helpers/inquire');
const Busquedas = require('./Models/busquedas');
const main = async() => {
let opt=0;
const busqueda = new Busquedas();
do {
opt =await inquireMenu();
switch (opt) {
... | true |
85ec8fefb2ef2ea66986a699a5f7f0ab37b813a2 | JavaScript | nicofff/baas | /test.js | UTF-8 | 534 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | // Test whether ship placement is trully random
var _ = require("underscore");
var battleship = require("./game")
var tilesUsed = {}
var boardsSeen = {}
for (var i = 0; i < 10000; i++) {
var game = battleship.start();
var shipTiles = game.board.map(function(ship){
return ship.tiles;
});
shipTiles = [].concat.a... | true |
4f48377b35e1145e5d7981def152c3de2a458d2d | JavaScript | baintonw/fewpjs-fns-as-first-class-data-do-behavior-nyc-web-051319 | /index.js | UTF-8 | 929 | 4.25 | 4 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /* Given Code, don't edit */
function handleClick(e) {
const timeString = document.getElementById('time').value
displayMessage(greet(timeString))
debugger;
}
/* End Given Code, don't edit above here...*/
//greet is passed value in input
// let time = new Date();
// let HH = time.getHours();
// let MM = time.getM... | true |
09055fd074bd19d5f1efad2a184faa6841ab2183 | JavaScript | jakubkulhan/caddy-modules | /chrome/x/app.js | UTF-8 | 311 | 2.53125 | 3 | [] | no_license | const app = document.getElementById("app");
if (app.childNodes.length === 0) {
const tpl = document.getElementById("app-template");
app.appendChild(document.importNode(tpl.content, true));
tpl.parentNode.removeChild(tpl);
document.currentScript.parentNode.removeChild(document.currentScript);
} | true |
8fc28f4b86099fda27d6804f80441f16f8c6d187 | JavaScript | zemlyansckygrigorij/treasure | /js/test.js | UTF-8 | 9,749 | 3.296875 | 3 | [] | no_license | 'use strict' ;
// check function createElement
let div = document.createElement("div");
div.top = 100 ;
div.left = 100 ;
div.style.top = 100 + "px";
div.style.left = 100 + "px";
div.setAttribute("class", "element");
let checkDiv = createElement(100, 100);
describe("createElement", function() {
it("c... | true |
7ab7ef888b1f41111ad3ddc4563e047cac6877e1 | JavaScript | Vernanda16/Javascript-Lanjutan | /56-fungsi-array-find-index.js | UTF-8 | 1,196 | 4.15625 | 4 | [] | no_license | //fungsi array find()
/*
find digunakan untuk mempermudah kita mencari sebuah data dalam suatu array. Method find berbeda dengan
filter. Fungsi filter akan melakukan penyaringan terhadap array dan mengembalikan nilai berupa list of data
(array). Sedangkan find, hanya akan mencari 1 data saja sesuai dengan kriteria ya... | true |
a0d81582317ec4545fa1e83f0d74880323db9e5b | JavaScript | julian-okello/WIT6Wk2Ch1 | /scripts/agepanel.js | UTF-8 | 694 | 3.3125 | 3 | [] | no_license | function ageSubmitted() {
console.log("Reaching age submit fx");
var ageVal = $('#ageVal').val();
if (ageVal) {
ageVal = Number(ageVal);
}
// https://stackoverflow.com/questions/6665997/switch-statement-for-greater-than-less-than
if (ageVal < 18 && ageVal > 0) {
$('#resultBox')... | true |
e6946a413ae81c316ed35928ebfdc969e7b496bf | JavaScript | shukebeta/reduce-sample | /src/index.js | UTF-8 | 519 | 2.515625 | 3 | [] | no_license | import store from "./store"
import {addToCart, updateCart, deleteFromCart} from "./actions/cart-actions";
const unsubscribe = store.subscribe(() => console.log(store.getState()))
store.dispatch(addToCart('Coffee 500gm', 1, 250));
store.dispatch(addToCart('Flour 1kg', 2, 110));
store.dispatch(addToCart('Juice 2L', 1, 2... | true |
629bbd0bbf0a8a7de31694938dbdcf79c256d39d | JavaScript | farconada/webpack-cordova-react | /src/reducers/root.js | UTF-8 | 574 | 2.65625 | 3 | [] | no_license | let initialState = {
pendingNotifications: 0,
cards: []
};
const rootReducer = (state = initialState, action) => {
switch (action.type) {
case 'INC_PENDING':
return Object.assign({}, state, {
pendingNotifications: state.pendingNotifications + 1
});
ca... | true |
3c01d927d5147317179fb041dec1a061bd381371 | JavaScript | mmyjona/nt | /sr/235670 - 5f08a2198fe738884e2bfe1f5f40ef9dac4fa58314432ebe17af0ca4618a4092 - f9481b17e0fb7ca00cf930bf432b77b576b9be72c0640b9be92e6cb7c277a758.js | UTF-8 | 8,694 | 2.59375 | 3 | [] | no_license | "use strict";
// 地铁信息
var SubWayInfo = function(text) {
if (text) {
var obj = JSON.parse(text);
this.cityName = obj.cityName;
this.subWayNum = obj.subWayNum;
this.stationNameList = obj.stationNameList;
this.from = text.from;
} else {
this.cityName = "";
this.su... | true |
35d5fe3a984e543289535320715249b803cab66e | JavaScript | gracedme/advent-of-code | /2015/day06/day06.test.js | UTF-8 | 1,114 | 3.0625 | 3 | [] | no_license | const one = require('./one');
const two = require('./two');
describe("day 06 tests", () => {
describe("part one: how many lights are on", () => {
test("puzzle examples", () => {
expect(one("toggle 0,0 through 999,0")).toBe(1000);
expect(one("turn on 499,499 through 500,500"))... | true |
4604691978fba4085663b27d27584df9e139ad49 | JavaScript | exponentsoftware/fdoc-js-1-santosh-kumar-metikoti | /a3.js | UTF-8 | 464 | 3.6875 | 4 | [] | no_license | const sentence = `I am a teacher and I love teaching. There is nothing as more rewarding as educating and empowering people. I found teaching more interesting than any other jobs. Does this motivate you to be a teacher?`
const countWords=(sentence)=>{
let count = 0;
let array = sentence.split(" ")
for(let... | true |
e0514affdd43be94df2413cae0293f6d2b808827 | JavaScript | GustavoFSoares/rocketseat-bootcamp | /desafios/desafio-react/mobile/src/App.js | UTF-8 | 3,948 | 2.640625 | 3 | [
"MIT"
] | permissive | import React, { useState, useEffect } from 'react'
import { SafeAreaView, View, FlatList, Text, StatusBar, StyleSheet, TouchableOpacity, Button } from "react-native";
import { Repository } from './services/api'
export default () => {
const [repositories, setRepositories] = useState([])
useEffect(() => {
Reposi... | true |
ec4369699096a33e7fd4a04cef4f4904a8e52498 | JavaScript | Rekazz/webdev-learn-2 | /lw3/javascript/scripts/reg-user.js | UTF-8 | 1,247 | 2.9375 | 3 | [] | no_license | function regUser() {
var email = document.getElementById("email").value;
var passwd = document.getElementById("passwd").value;;
var confirmPasswd = document.getElementById("confirm-passwd").value;
var choice = document.querySelector('input[type=checkbox]');
if (email == "") {
alert("Требуется Заполнить... | true |
e52518fabd311b0d4819da6eb7521baa5a9e5984 | JavaScript | Lbuban/unit-test-practice | /name.js | UTF-8 | 166 | 2.609375 | 3 | [] | no_license | function name(nickname, fullname) {
if (nickname.length < fullname.length) && (nickname.includes(fullname.split)) {
return true
}
}
module.exports = name; | true |
f32f052268a92fc54d449d09c3a3cfa447935b81 | JavaScript | Comicraw/jsLessonsSeptember | /5-expresssionsAndOperators/02-comparisonOperators.js | UTF-8 | 1,159 | 4.3125 | 4 | [] | no_license | // // Equal
// '3' == 3;
// //Strict equal
// 3 === 3;
// // Not equal
// '3' != 4; // '!' in front of something means NOT that
// // Strict not equal
// '3' !== 3;
// // Greater than
// 3 > 2;
// // Less than
// 2 < 3;
// // Greater than or equal to
// 3 >= 2;
// //Less than or equal to
// 2 <= 3;
// // And
//... | true |
804f505260c40503f10988b73e49b24ea415fdfd | JavaScript | ganmyds/ganmyds.github.io | /otherwork/myblog/js/ArticleJsq.js | UTF-8 | 979 | 3 | 3 | [
"MIT"
] | permissive | var RemainTime=16;
var RemainWord;
var t;
function ClearHold(id)
{
$("#"+id).attr("placeholder","");
}
function ShowHold(id)
{
var value = $("#CodeInput").attr("value");
if(value == "")
{
$("#"+id).attr("placeholder","请输入");
}
}
//点击验证码
function GetCode()
{
$("#CodeDiv").css({"border":"2... | true |
f7e3c764ad51eeaf72f500a40f998df67e1116b3 | JavaScript | natlat13/natlat13.github.io | /lesson9/javascript/js9.js | UTF-8 | 2,270 | 3 | 3 | [] | no_license | const requestURL = "https://byui-cit230.github.io/weather/data/towndata.json";
fetch(requestURL)
.then(function (response) {
return response.json();
})
.then(function (jsonObject) {
const townsArray = jsonObject['towns']
for (let i = 0; i < townsArray.length; i++) {
... | true |
3843d2992e3728a9598b3322fb49089773ea4cd5 | JavaScript | grantortino/exercises | /PB-language-pitfalls/pitfall.js | UTF-8 | 585 | 3.8125 | 4 | [] | no_license | console.log();
console.log("What does NaN stand for? It stands for \"not a number\".");
console.log();
console.log("Check if \'hello\' is NaN ->", isNaN('hello'));
console.log("Check if 3 is NaN ->", isNaN(3));
console.log("What is the type of NaN? ->", typeof (NaN));
console.log();
let twoDigits = 0.1 * 0.2;
console.l... | true |
575e18b0a317feb3d576c3fd2fc2869679420f23 | JavaScript | nirastor/bjs-homeworks | /2.3-oop-es6/task.js | UTF-8 | 9,312 | 3.421875 | 3 | [] | no_license | // *** TASK1 ***
console.log('\n\n*** TASK 1 ***')
const INITIAL_MAX_BOOK_STATE = 100;
const MIN_BOOK_STATE = 0;
const ACCEPTABLE_BOOK_STATE = 30;
const FIX_QUALITY = 1.5
class PrintEditionItem {
constructor(name, releaseDate, pagesCount) {
this.name = name;
this.releaseDate = releaseDate... | true |
216989a5c7d967911234524a1c08c8cc586cfad7 | JavaScript | wuzixuan1104/myFPPractice | /src/practice/chain.js | UTF-8 | 203 | 2.984375 | 3 | [] | no_license | Array.prototype.chain = function (f) {
return this.reduce((acc, t) => acc.concat(f(t)), []);
}
const split = x => x.split(',');
const a = Array.of('cat,dog', 'fish,bird').chain(split);
console.log(a);
| true |
ff93d199ac05b8f31ee931e28218f137f960c1d4 | JavaScript | strawhatboy/node-self-referenced-json | /index.js | UTF-8 | 6,192 | 2.796875 | 3 | [] | no_license | 'use strict';
/*
*
*
*
*/
var _ = require('lodash');
var OUTPUT_TYPE = {
OBJECT: 'object',
STRING: 'string',
}
var TOKENS = {
VALUE: '$',
REFERENCE: '&',
BRACKET_LEFT: '(',
BRACKET_RIGHT: ')',
BRACE_LEFT: '{',
BRACE_RIGHT: '}'
}
module.exports = (function () {
function SelfRef... | true |
b24761f9ef42265e9b1947870f92cba501b90e39 | JavaScript | gaber85/acnh-countdown-timer | /src/components/Countdown.js | UTF-8 | 1,454 | 2.6875 | 3 | [] | no_license | import React, { useState } from 'react';
import moment from 'moment';
import momentTZ from 'moment-timezone';
import { useInterval } from '../hooks/useInterval';
const Countdown = () => {
const releaseDate = momentTZ.tz('2020-03-20 00:00', 'America/Toronto');
const [days, setDays] = useState(null);
const [ho... | true |
ffb59fde593aa86069b94199766a9b5b716fc66d | JavaScript | PauloVAS/milo | /script_serie.js | UTF-8 | 3,824 | 3.546875 | 4 | [] | no_license | window.addEventListener('load', start);
// Declarando Variáveis Globais
var GlobalNamesSerie = [];
var opnioes_serie = document.querySelector('#opnioes_serie');
var ul_serie = document.createElement('ul_serie');
var Input_serie = document.getElementById('Input_serie');
var form_serie = document.getElementById('Formula... | true |
f270903437b684f6939d9e3d093ecca343e4090d | JavaScript | RevanthNagarajan/ShortURL | /Server/app/controllers/url.controller.js | UTF-8 | 1,695 | 2.78125 | 3 | [
"MIT"
] | permissive | const URLSchema = require('../models/url.model.js');
exports.findURL = (req, res) => {
URLSchema.find()
.then(urls => {
res.send(urls || []);
}).catch(err => {
res.status(500).send({
message: err.message || "Some error occurred while retrieving urls."
});
});
};
// ... | true |
9c60220cdbe00924f13969660d83768028bbb155 | JavaScript | syzer/six-hackaton-2017 | /server/db/users.js | UTF-8 | 544 | 2.75 | 3 | [
"MIT"
] | permissive | const faker = require('faker')
// this generates users for you
const newUsers = () => {
return Array.from({ length: 50 }, (x, i) => ({
id: i + 1,
firstName: faker.name.firstName(),
lastName: faker.name.firstName(),
phoneNumber: faker.phone.phoneNumberFormat(),
friends: []
... | true |
e372d75d6cb56a85f26162c78d778d293b86806e | JavaScript | Be-Rude/lotide | /middle.js | UTF-8 | 1,262 | 3.59375 | 4 | [] | no_license | const assertArraysEqual = require('./assertArraysEqual');
const middle = function(input) {
let newArray = [];
if (input.length < 3) {
return newArray;
}
if (input.length % 2 !== 0) {
newArray.push(Math.ceil(input.length/2));
} else {
newArray.push((input.length/2), (input.length/2) + 1);
}
return... | true |
fbc0b4ea511fe98515b187b526bfbc73225dd1ff | JavaScript | ashutosh1297/Inventory-Management-app | /static/script.js | UTF-8 | 1,615 | 3.28125 | 3 | [] | no_license | // Using callback from http request
// url = "http://localhost:5000/reqForProdAtLoc"
function getProdListAtLocation(url, callback){
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.send()
xhr.onreadystatechange = function(){
if (xhr.readyState === 4){
if (xhr.status ==... | true |
06596902f2bafb1adbc16892f1266db045cb1839 | JavaScript | alex9508/F_Js_Plz | /arrays_intro.js | UTF-8 | 1,687 | 3.578125 | 4 | [] | no_license | let alex = {
nombre: 'Alejandro',
apellidos: 'Hernandez',
altura: 170,
cantidadDeLibros: 376
}
let pedro = {
nombre: 'Pedro',
apellidos: 'Perez',
altura: 183,
cantidadDeLibros: 348
}
let juana = {
nombre: 'Juana',
apellidos: 'Lopez',
altura: 149,
cantidadDeLibros: 704
}
let karen = {
nom... | true |
db31798f20bbbdef80198394b8106471740a7ce4 | JavaScript | jscortes523/js-bootcamp | /todo-app-storage/todo-app.js | UTF-8 | 3,088 | 2.90625 | 3 | [] | no_license | /* const todos = [{
text:'Walk the dog',
completed:true
},{
text:'Clean Bedroom',
completed:false
},{
text:'Run 5k',
completed: true
},{
text:'Study english',
completed:false
},
{
text: 'Do homework',
completed:false
},
{
text: 'Wash clothes',
completed: false
},
{
te... | true |
c3735036ef1e83a990f24b9b90bd3f472e631e7b | JavaScript | bitprj/intro-to-k8s-fcc | /services/manipulation-service/index.js | UTF-8 | 2,416 | 2.515625 | 3 | [] | no_license | const express = require('express')
const multer = require('multer')
const upload = multer()
const Jimp = require('jimp')
const faceapi = require('face-api.js')
const canvas = require('canvas')
const app = express()
var router = express.Router();
const PORT = 80
// require('@tensorflow/tfjs-node');
// for testing local... | true |
4a81a22a36613da8564c3de4d45964e8e8b4e622 | JavaScript | ckaylor33/javascript-notes | /Functions/IIFE/script.js | UTF-8 | 886 | 4.25 | 4 | [] | no_license | 'use strict';
// IMMEDIATELY INVOKED FUNCTION EXPRESSION
const runOnce = function () {
console.log(`This will never run again!`);
};
runOnce();
// can do this but nothing stops us later on running this function again
// we want to be able to execute a function immediately and not have to save it somewhere
(functio... | true |
c78b2b6d457bf628006914e2092f94a3b0705083 | JavaScript | neonbambina/seniorProject | /scripts/magic.js | UTF-8 | 300 | 2.734375 | 3 | [] | no_license | // toggles the mini menu inside of the photography heading
var drop = document.getElementById('photography');
var catagories = document.getElementById('photography__catagories');
function toggleMenu(){
catagories.classList.toggle('shown');
};
drop.addEventListener("click", toggleMenu, false); | true |
fec77df2399118d41027631e3a6ca7edacb9c4bd | JavaScript | BrenMB/Family-First | /src/services/apiRestClient.js | UTF-8 | 1,876 | 2.5625 | 3 | [] | no_license | import axios from "axios";
const axiosAPI = axios.create({
//baseURL: "https://family-first-api.herokuapp.com/api",
baseURL: "http://localhost:3000/api",
headers: {
Accept: "application/json",
"Content-type": "application/json",
},
});
async function signUp(user) {
const res = await axiosAPI.post(... | true |
3b4bc397054da1ba1a408096690632e449d9077a | JavaScript | fedefhm/CursoIngresoJS | /8-TPs/jsFerretePinturas.js | UTF-8 | 992 | 4.125 | 4 | [] | no_license | /*3. Para el departamento de Pinturas:
A. Al ingresar una temperatura en Fahrenheit debemos mostrar la temperatura en Centígrados con un mensaje concatenado (ej.: " 32 Fahrenheit son 0 centígrados").
B. Al ingresar una temperatura en Centígrados debemos mostrar la temperatura en Fahrenheit (ej.: "0 centígrados son 32 ... | true |
7e15535df55e5b43232299aff7f1a293eabe98c0 | JavaScript | Ding-c/CloudMusic | /js/newSong.js | UTF-8 | 1,192 | 2.546875 | 3 | [] | no_license | fetch("http://localhost:3000/personalized/newsong",{
method:"get",
mode:"cors",
credentials:"include"
})
.then(function(data){
return data.json()
})
.then(function(data){
// console.log(data.result)
// data.result[0].name
// data.result[0].song.alias[0]
// data.result[0].song.artists[0].... | true |
4520f59d145f7fd41353a6bd6a6eb6ccdd57c867 | JavaScript | navpreet1999/interactiveandscripting | /assignment5'/assignment5.js | UTF-8 | 521 | 3.703125 | 4 | [] | no_license | What is Array?
// 1. Collection of same datatype. (SAME COURSE + STUDENT)
// 2. Continuous Memory allocation.
// Create an array?
// var <NAME> = [<ITEM_1>, <ITEM_2> ,.......]
// Exercise 1: Create an array (fruits) of string type & add apple, orange, pineapple.
var fruits = ['apple', 'orange', 'pineapple... | true |
9cd109a926dd9bd41105ed70a50edd449e95821b | JavaScript | BR4VE/clean-code-practice | /chapter-6/1-data-object-anti-symmetry/examples.js | UTF-8 | 1,228 | 4.75 | 5 | [] | no_license | // Example 1:
// Procedural code (code using data structures) makes it easy to add new functions
// without changing the existing data structures
// OO code, on the other hand, makes it easy to add new classes without changing
// existing functions
// Procedural Code:
class Square {
constructor(topLeft, side) {
... | true |
526095f252aa611106e8c5c966a6a8174ea7407e | JavaScript | orcadaco/cdap | /cdap-ui/app/login/components/Card/index.js | UTF-8 | 2,828 | 2.6875 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"ISC",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"Artistic-2.0",
"Zlib",
"ICU",
"MIT",
"LicenseRef-scancode-unicode",
"BSD-3-Clause",
"NTP",
"NAIST-2003",
"LicenseRef-scancode-openssl"
] | permissive | /*
* Copyright © 2016 Cask Data, 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 t... | true |
7bcc7d3e02e0adf67c2d548337f69c65c6633b8a | JavaScript | aj34/HMR-Express | /src/main.js | UTF-8 | 1,473 | 2.671875 | 3 | [] | no_license | import d3 from 'd3';
import _ from 'lodash';
import './assets/styles.css';
// using lodash for random data
const dataSet = _.map(_.range(25), () => {
return {
x: Math.random() * 100,
y: Math.random() * 100,
radius: Math.random() * 40
};
});
// all d3 code below
const margin = {
top: 0,
right: 0,
... | true |
35e16f39821c92119b9cb6d40061b4eaed1b8a22 | JavaScript | btamsevi/TodoList | /src/itemList/itemList.test.js | UTF-8 | 1,487 | 2.671875 | 3 | [] | no_license | import React from 'react';
import ItemList from './ItemList';
import { shallow } from 'enzyme';
import {cleanup, fireEvent, render} from '@testing-library/react';
afterEach(cleanup);
let todos = [{'todos' : 'todos'}];
test('ItemList, when constructed, has classname "ItemList"', () => {
//arrange
const itemli... | true |
9fc66eb3da2e42e3f9aa2f686aad86a18dbc3b20 | JavaScript | codefool9/evolution | /src/pellet.js | UTF-8 | 1,147 | 3.15625 | 3 | [] | no_license | internal('pellet', function () {
function Pellet(context, x, y, radius, color) {
this.context = context;
this.x = x;
this.y = y;
this.radius = radius;
this.color = color;
this._area = Math.PI * radius * radius;
}
Pellet.prototype = {
update: function ... | true |
2588c7ce5d307121c20a139f22ef41951d32c8c1 | JavaScript | launcelotgobbo/tripplanner-live-ui | /public/js/utilities.js | UTF-8 | 1,156 | 2.65625 | 3 | [] | no_license | function getCurrentDayNum() {
return parseInt($('.day-buttons').find('.current-day').text());
}
function getMaximumDayNum() {
return $('.day-btn').length - 1;
}
function adjustCurrentDayTitle() {
var $dayTitle = $('#day-title').find('span').html('Day ' + getCurrentDayNum());
}
function removeCurrentDay(saveHotelL... | true |
c8b911ba4e5f07d6ac0183e7b13830ff417e3200 | JavaScript | Nick-Kumar/2118 | /benhamDisk.js | UTF-8 | 1,060 | 3.109375 | 3 | [] | no_license | function Benham(x,y,z){// inspired by benham disk
// This function takes in three inputs, namely x and y input for the coordinates of the disk on the screen.
// The z value determines the size of the disk.
// The following shapes and colours together constitute the structure of a benham disk
fill(255);
ellips... | true |
bc5694aacf7573f6dd2a1d3d54a207308bb0e841 | JavaScript | archer3cl/dice-roller | /src/components/configurationForm.js | UTF-8 | 2,811 | 2.609375 | 3 | [] | no_license | import { useState } from 'react';
import { useGameState } from '../lib/gameState';
import './configurationForm.css';
export default function ConfigurationForm() {
const newDie = { faces: 6 };
const [diceSettings, setDiceSettings] = useState([newDie]);
const [players, setPlayers] = useState(1);
const [gameState... | true |
3ef2c314c017d14b6438d6b74ecf9cb363266aec | JavaScript | Marileen/Gruppe05 | /comeet/dev/js/layer.js | UTF-8 | 1,157 | 3.15625 | 3 | [] | no_license |
/*
* Layer öffnen
*
* **/
function openLayer (item, event) {
event.preventDefault();
if (document.querySelector('.layer')) {
document.querySelector('.layer').classList.add('show');
}
//body
document.querySelector('body').classList.add('layer-open');
//Close Buttons
var close... | true |
412611c877dfcd2a561c035c2be23241a61ab865 | JavaScript | kutluduman/spinner | /spinner2.js | UTF-8 | 275 | 2.546875 | 3 | [] | no_license |
let symbolsArr = (['\r| ', '\r/ ', '\r- ', '\r\\ ', '\r| ', '\r/ ', '\r- ', '\r\\ ', '\r| ']);
let time = 0;
let incremental = 150;
for (const symbol in symbolsArr) {
setTimeout(() => {
process.stdout.write(symbolsArr[symbol]);
},time += incremental);
} | true |
a5810bf012f091657ba728fec5220ab3f1ff348c | JavaScript | Subway19/blog-app | /ui/article.js | UTF-8 | 5,052 | 2.734375 | 3 | [] | no_license | var currentArticleTitle = window.location.pathname.split('/')[2];
function loadCommentForm () {
var commentFormHtml = `
<div class="reply-form">
<h1 class="section-heading">Leave a reply </h1>
<p class="text">(You are currently Logged In)</p>
<!--Third row-->
<div class="row">
<!--Image column-->
<div class=... | true |
678bf7f3c8c30f3dd40b20a4e21b0d0fa54e89ac | JavaScript | Abdulhakimsg/exercises | /js/reverseString.js | UTF-8 | 629 | 4.21875 | 4 | [] | no_license | //Challenge : Reverse a string
//Expected Run : eg 'hello' -> 'olleh'
function reverString(str){
//Method 1
//Convert string to array first using split
//Then reverse the array using revers
//Parse the array back in to the string using join
return str.split('').reverse().join('');
//Metho... | true |
10b8e5c3057833457a0ada951b017fff57a974c1 | JavaScript | kaursima/UtilityWebApps | /RGB-HEX-Converter/rgb-to-hex-html-color-codes.js | UTF-8 | 4,255 | 3.3125 | 3 | [] | no_license | window.onload = () => {
const bt = document.querySelector('#convert');
bt.addEventListener("click" , event => {
const red = document.querySelector('#red');
const green = document.querySelector('#green');
const blue = document.querySelector('#blue');
const rgbArr =... | true |
57e2a8b81a86099caee414dba5d26bdeea52710f | JavaScript | TKRHinton/CalcApp | /routes.js | UTF-8 | 435 | 2.984375 | 3 | [] | no_license | let logic = require("./logic");
function coinFlipRoute(request, response) {
let flip = logic.flipCoin();
if (flip) {
response.send("Heads");
} else {
response.send("Tails");
}
}
function sumNumbers(request, response) {
let num1 = 2;
let num2 = 3;
let sum = logic.addNumbers(num1, num2)
resp... | true |
3126c58bcec378f558d4225ad184e9d4e016fabf | JavaScript | luuthanhvan/CRM-MERN-stack | /src/components/filters/DateRange.js | UTF-8 | 897 | 2.546875 | 3 | [] | no_license | import { useEffect, useRef } from 'react';
import DateRangePicker from 'react-bootstrap-daterangepicker';
import 'bootstrap-daterangepicker/daterangepicker.css';
function DateRange(props){
const { labelName, onSelectDate, value = {}, ...rest } = props;
const pickerRef = useRef();
useEffect(() => {
... | true |
cfa2851a703b826d17860aa669fbb0824c545ea8 | JavaScript | adryansherman/h8-p0-w2 | /exercise-13.js | UTF-8 | 553 | 4.0625 | 4 | [] | no_license | //true jika karakter x sama dengan 0
function xo(str) {
var freqX = 0;
var freqO = 0;
for (var i = 0; i < str.length; i++){
if (str.charAt(i) === 'x'){
freqX = freqX + 1;
}else if (str.charAt(i) === 'o' ){
freqO = freqO + 1;
}
}
if (freqX === freqO){
return true;
} el... | true |
c0a6bf8963b926b6071b67ceb4360bdae94a8285 | JavaScript | clarabrandt/ccbpigeons | /src/components/Lateral.js | UTF-8 | 2,652 | 2.578125 | 3 | [] | no_license | import React, { Component } from "react";
// import './Lateral.css';
import "./Lateral.css";
export default class Lateral extends Component {
constructor(props) {
super(props);
this.state = {
fotos: [],
artigos: []
};
this.showFotos = this.showFotos.bind(this);
this.showArtigos = thi... | true |
0e9e4a94cc1c99359dc7e73abba97e1351e0655e | JavaScript | alexthemac/typewriter | /typewriter.js | UTF-8 | 388 | 3.703125 | 4 | [] | no_license | const sentence = "hello there from lighthouse labs";
//LOOPS THROUGH EACH CHARACTER IN SENTENCE AND PRINTS EACH ONE 50 ms APART
for (let i = 0; i < sentence.length; i++) {
setTimeout(() => {
process.stdout.write(sentence[i]);
}, 50 + 50 * i);
}
//CREATES A NEW LINE AFTER EACH CHAR IN SENTENCE HAS BEEN LOGGED T... | true |
1b015ca9b7c26f29cacd726f2438067e035a152f | JavaScript | bn44/bn44 | /testexif.js | UTF-8 | 623 | 2.515625 | 3 | [] | no_license | var ExifImage = require('exif').ExifImage;
try {
new ExifImage({ image : '2.jpg' }, function (error, image) {
if (error){
console.log('Error: '+error.message);
} else{
console.log(image);
console.log("-------------------------------");
console.log(ima... | true |
03e5f778b46d3f1d0b45db23826064a3c7b14731 | JavaScript | zpf0918/xinda_javascrpt | /xu-lesson/lesson2/sample.js | UTF-8 | 175 | 3.453125 | 3 | [] | no_license | var obj = {
count: 1
}
function output(obj) {
obj = Object.assign({}, obj)
obj.count = obj.count + 1;
console.log(obj.count);
}
output(obj);
console.log(obj.count);
| true |
611f31cad7aae6cd1df0cb0f94cbfc4e9e660259 | JavaScript | AdityaGupta7/central-logging-system-FE | /src/service/data/redux/reducer.js | UTF-8 | 2,759 | 2.5625 | 3 | [] | no_license | import { combineReducers } from "redux";
import { FETCH_LOGS_LISTING_EMPTY, FETCH_LOGS_LISTING_FAIL, FETCH_LOGS_LISTING_REQ, FETCH_LOGS_LISTING_SUCCESS, FETCH_MASTER_SOURCE_FAIL, FETCH_MASTER_SOURCE_REQ, FETCH_MASTER_SOURCE_SUCCESS, UPDATE_FILTERS_LIST } from "./actionTypes";
const initialStateFiltersList = {
filt... | true |
75f0b410238426d6ad94c7dbd2f36ede6d30c7b4 | JavaScript | abatth/react-personal-portfolio | /src/components/Navbar.js | UTF-8 | 1,953 | 2.609375 | 3 | [] | no_license | import React, { useState } from "react";
import "./Navbar.css";
import logo from "../images/ab_logo.png";
const Navbar = () => {
const [navbar, setNavbar] = useState(false); //change navbar color when scrolling
const [burgerClick, setBurgerClick] = useState(false);
const changeBackground = () => {
// consol... | true |
d513ac7b8fce1b0d22fe10b7e8f3b3ce619b342a | JavaScript | ichiadrian/belajas_js | /day-4/find.js | UTF-8 | 233 | 3.3125 | 3 | [] | no_license | // dipakai untuk mencari data di dalam array, jika ditemukan, proses dihentikan
// menghasilkan anggota didalam array, dalah contoh di bawah adalah number 1
const array = [1, 1, 2, 2, 3, 3];
console.log(array.find((x) => x === 1));
| true |
6a8916ec866552c2b76066cf58cd37ba054a7468 | JavaScript | binoyanto/users-crud | /routes/indexRoutes.js | UTF-8 | 992 | 2.75 | 3 | [] | no_license | // 1) Primero me traigo express
// nombreModulo = require("modulo")
const express = require("express");
// 2) Pedirle a express el Router
const router = express.Router();
// me traigo el modulo path
const path = require ("path");
// Firma del get => ("/nombreRuta", (req, res) => {})
router.get("/ping", (req, res) => {... | true |
68a5c3fc0cd302e16930f40c15ec79f0be777a00 | JavaScript | ocnarferamed/tiendaReactNode | /frontend/tienda/src/pages/Details.js | UTF-8 | 1,878 | 2.609375 | 3 | [] | no_license | import React,{Component} from 'react';
import axios from 'axios';
import Images from './imgSources';
const urlBase = 'http://localhost:3001/api/products/all';
export default class Details extends Component{
state ={
products:[],
prod:[]
}
componentDidMount(){
... | true |
7b86b22a97c0b18e3a1b30c1a73c8efe1b50f94f | JavaScript | piecioshka/7balls | /src/app/helpers/utils.js | UTF-8 | 1,546 | 3.203125 | 3 | [] | no_license | /**
* @param {number} start Number which is down limit.
* @param {number} stop Number which is up limit.
* @returns {number}
*/
function random(start = 0, stop = 10) {
return parseInt(Math.random() * (stop - start + 1) + start, 10);
}
/**
* @param {Phaser.State} state Game state.
* @param {number} max Number... | true |
a6d0b81213edc63673b4e0fc62f3c7fade43b43b | JavaScript | ecaradec/oric1js | /src/keyboard.js | UTF-8 | 4,027 | 2.96875 | 3 | [
"MIT"
] | permissive |
// 11111110 FE
// 11111101 FD
// 11111011 FB
// 11110111 F7
// 11101111 EF
// 11011111 DF
// 10111111 BF
// 01111111 7F
function getKeyState(row, col) {
return keyboard[row][col];
}
function setKeyState(key,b) {
if(key.code == 'Digit3') // 3
keyboard[0][0x7f]=b;
if(key.code == 'KeyX') // x
... | true |
6e339ba7d8286080a545c556206e8c91ef6aaca5 | JavaScript | Dr-Rakcha/SimpleClock | /simpleClockOOP.js | UTF-8 | 4,412 | 3.03125 | 3 | [
"MIT"
] | permissive | function SimpleClock(id,options) {
this.settings = {
colorHourHand: 'black',
colorMinuteHand: 'black',
colorSecondHand: 'red',
colorNumber: 'black',
colorNumber90Deg: 'red',
colorDash: 'black',
colorText: 'black',
text: 'Quartz',
width: 600,
height: 600
};
for (var attrName in options) {
this.s... | true |
0ed66376885f6497f34a4f636409e9514da9efcb | JavaScript | svlanakom/LessonJS | /lesson/Lesson6Arroys/task9/index.js | UTF-8 | 178 | 3.265625 | 3 | [] | no_license | function reverseArray(arr) {
if (!Array.isArray(arr)) {
return null;
}
let newArr = arr.slice();
return newArr.reverse();
}
console.log(reverseArray([5, 6, 8, 9]));
| true |
b380f4e6d23b54af6a4a3013d17992a503caa13a | JavaScript | vdonoladev/aprendendo-programacao | /JavaScript/Curso_JavaScript&TypeScript/Seção 2 - JavaScript Básico - Iniciantes/aula14(let-vs-var-primeira-diferenca)/index.js | UTF-8 | 453 | 4.25 | 4 | [
"MIT"
] | permissive | // Podemos redeclarar variáveis quando utilizamos var
var nome = 'Víctor';
console.log(nome);
var nome = 'Rebeca';
console.log(nome);
// Podemos utilizar só o nome da variável para declará-la
nome = 'Víctor'; // NÃO FAÇA ISSO
console.log(nome);
// Não crie variáveis sem const ou let - REGRA
// Não podemos redeclarar... | true |
dc857d6b73d86e95f78b7ade7d37a0b2c5290087 | JavaScript | stalintouch/Javascript-Algorithms | /Advanced-algorithm-scripting/DNA-Pairing.js | UTF-8 | 342 | 4.0625 | 4 | [] | no_license | // The DNA strand is missing the pairing element. Take each character, get its pair, and return the results as a 2d array.
function pairElement(str) {
str = str.split('');
var arr= [];
var pair = {
A: "T", T: "A", C: "G", G: "C"
};
return str.map(function(item){
return [item, pair[item]]
})
}... | true |
dd428f117e1b60f82243d94fb6a1c346e23f6ec9 | JavaScript | DonStella/exercises | /20-PB-program-multiplechoice/20ale.js | UTF-8 | 2,005 | 4.03125 | 4 | [] | no_license | "use strict";
// Q1
console.log("Q1");
let red = 1;
let blue = 2;
let green = 3;
let yellow = 4;
let min = 1;
let max = 4;
let color = Math.floor(Math.random() * (max - min + 1)) + min;
switch (color) {
case 1:
console.log("red");
break;
case 2:
console.log("blue");
break;
... | true |
1f16a129fff15c0f588337f3060857110fa65831 | JavaScript | ece106/BU-fsw-113 | /week1/js/index.js | UTF-8 | 989 | 2.8125 | 3 | [] | no_license | function bankLetters(){
let text;
let favDrink = prompt("We have an important message for you, can I confirm your name please? Capitalize your first letter only!");
switch(favDrink) {
case "Brianna":
text = `Hello, Brianna. Greetings from CashMoney Bank. Because you are such a great cust... | true |
fd4a8ea1bf9acf8b3298eb4f88caaecba261bfc9 | JavaScript | iwanttocode12/reddit-clone | /public/script.js | UTF-8 | 3,411 | 2.59375 | 3 | [] | no_license | $(document).ready( () => {
var firebaseConfig = {
apiKey: "AIzaSyAkfkvoWXPF00fJl3wJSM-8k6Z5_0to2QE",
authDomain: "my-reddit-clone-9b68e.firebaseapp.com",
databaseURL: "https://my-reddit-clone-9b68e.firebaseio.com",
projectId: "my-reddit-clone-9b68e",
storageBucket: "my-reddit-clone-9b68e.appspot.com",
me... | true |
be0146314559f33b2941d5ca067555307980b880 | JavaScript | EthanHNguyen/VandyScheduler | /src/schedule.js | UTF-8 | 3,930 | 3.21875 | 3 | [
"MIT"
] | permissive | class Schedule {
constructor(classesArr) {
this.classesArr = classesArr; // all the classes to be put in schedule
this.scheduleArr = []; // Array of schedules
this.overlappedClasses = new Map();
this.sortClasses();
this.checkOverlapOfAllClasses();
}
/*
* Makes initial call to the recursive loop & se... | true |
5bd9ef26023afabc63d11a47d61e529200119f55 | JavaScript | yoh-nak/jeed-training | /public/demo/js/recipe1/chapter10/209/sample/js/sample.js | UTF-8 | 717 | 3.171875 | 3 | [] | no_license | window.addEventListener("load", function(){
// Canvas要素を読み出し
var myCanvas = document.getElementsByTagName("canvas")[0];
// コンテキストを取得
var context = myCanvas.getContext("2d");
if (!context){ return; }
// 画像を描画する
var imgObj = new Image();
imgObj.src = "images/sunflower.jpg";
imgObj.onload = function(){
... | true |
9bd228721a256daa932e52ba90368e5baffef6c3 | JavaScript | axeleax/react-redux-app | /src/redux/saga/demographicSaga.js | UTF-8 | 1,695 | 2.671875 | 3 | [] | no_license | import { put, takeEvery } from 'redux-saga/effects';
import { type as demographicFindPatientRequestType} from '../actions/demographicFindPatientRequest';
import { type as demographicFindPatientSuccessType} from '../actions/demographicFindPatientSuccess';
import { type as demographicFindPatientErrorType} from '../action... | true |
733299de12a3d776a8791db0da74c5a466128711 | JavaScript | dglauber1/deetcode | /src/main/resources/static/js/user.js | UTF-8 | 9,187 | 2.90625 | 3 | [
"MIT"
] | permissive | function popup(challengeName) {
var value = challengeName.value;
var edited = "<pre>" + value.split("\n").join("<br>") + "</pre>";
w2popup.open({
title: 'Solution',
body: '<div class="w2ui">' + edited + '</div>',
width : 700,
height : 500,
});
}
TABS = "<ul class='nav n... | true |
d0d1207365f39d3a6ba0d6216d1e68494476f497 | JavaScript | Ungdoong/Algorithm | /JavaScript/coupang_2020_2.js | UTF-8 | 2,021 | 3.1875 | 3 | [] | no_license | function solution (n, customers) {
let kiosks = Array.from({ length: n }, () => [0, false, 0])
for (const customer of customers) {
const time = customer.split(' ')
const month = time[0].split('/')[0]
const day = time[0].split('/')[1]
let arrive_date = new Date('2020-' + month + '-' + day + ' ' + t... | true |
295f2575301a0e756af0bcd60352019fc5bd1507 | JavaScript | VGMSoft/VirgileGuglielmi_5_04032021 | /frontend/js/pages/confirmation.js | UTF-8 | 406 | 2.734375 | 3 | [] | no_license | (() => {
displayData()
cleanCart()
})()
function displayData() {
document.querySelector(".orderId").innerHTML = getParam("orderId")
document.querySelector(".total").innerHTML = `${getParam("total")}€`
}
function cleanCart() {
localStorage.removeItem("cart")
localStorage.removeItem("amount")
}
functi... | true |
2203fca4fa42b9f8528d15d119e7a90062659e4d | JavaScript | rumblesan/snek | /src/code/language/typechecker/errors.js | UTF-8 | 1,637 | 2.59375 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | import { typeToString } from '../types';
export class TypeCheckerException extends Error {
constructor(message) {
super(message);
}
}
export class IncorrectPatchTypeException extends TypeCheckerException {
constructor(func, inputAst, funcAst) {
const msg = `Function ${func.name} expected a ${typeToStrin... | true |
3157089414915e6b84353d33e7c73c31d05c52ae | JavaScript | karthikeyansundaram2/task | /App.js | UTF-8 | 1,698 | 2.59375 | 3 | [] | no_license | import React, { Component } from 'react';
import axios from 'axios'
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {
email_id: '',
password:'',
};
}
handleChangeEmail = event => {
this.setState({ email_id: event.target.valu... | true |
b6a1d6ff5d4a960bed98003d46f92cac1fb37ef2 | JavaScript | Toumani/web-coding-challenge | /src/Shop.js | UTF-8 | 2,764 | 2.734375 | 3 | [
"MIT"
] | permissive | // External imports
import React, { Component } from 'react';
import { Thumbnail, Button, Glyphicon } from 'react-bootstrap';
import $ from "jquery";
import * as cookie from './cookies';
// In-app imports
import './Shop.css';
class Shop extends Component {
constructor(props) {
super(props);
this.state = {
... | true |
40cc8319c56dc05af53e3d5969f687ab2fc379c5 | JavaScript | hello-snsa/Unit3 | /DS/practice/8-phebo.js | UTF-8 | 851 | 3.28125 | 3 | [] | no_license | function runProgram(input) {
input=input.trim();
var n=Number(input);
// console.log(n)
function rec(n){
if(n==0){
return 0;
}
else if(n==1)
{
return 1;
}
else{
return rec(n-1)+rec(n-2);
}
}
console.log(rec(n));
... | true |
a832549316ebeea8b9eb4f977911fbffd5b81113 | JavaScript | traysonkelii/Grade-Tracker | /tracker/public/js/practice/practiceTracker.js | UTF-8 | 6,754 | 2.90625 | 3 | [
"MIT"
] | permissive | const practiceRecord = document.getElementById('practice-record');
const practiceReset = document.getElementById('practice-reset');
const stopwatchHours = document.getElementById('stopwatch-hour');
const stopwatchMin = document.getElementById('stopwatch-min');
const stopwatchSec = document.getElementById('stopwatch-sec... | true |
3f5231b7a7d80677755e3ed597faa942bb1a867f | JavaScript | delbury/learning | /algorithm/others/has-same-sub-tree.js | UTF-8 | 1,093 | 3.046875 | 3 | [] | no_license | /*
* function TreeNode(x) {
* this.val = x;
* this.left = null;
* this.right = null;
* }
*/
/**
*
* @param root1 TreeNode类
* @param root2 TreeNode类
* @return bool布尔型
*/
function isContainsI( root1 , root2 ) {
// write code here
if(!root1 || !root2) return false;
const strs = {
s1: '',
... | true |
402c5f5620256ac8b7f6f9ea1f3f03aa2c9c337d | JavaScript | wcarss/tetris | /js/utilities.js | UTF-8 | 2,863 | 3.1875 | 3 | [
"MIT"
] | permissive | "use strict";
function random_int(low, high) {
if (high === undefined) {
high = low;
low = 0;
}
return Math.floor(Math.random() * (high - low) + low);
}
function array_random(array) {
return array[random_int(array.length)];
}
function deg_to_rad(degrees) {
return (Math.PI * degrees) / 180;
}
funct... | true |
119d4b408fc6bfab88bd538e4593997fddd3aceb | JavaScript | sarathydom/MEANLearning | /implementingYiers.js | UTF-8 | 1,945 | 3.53125 | 4 | [] | no_license | /**
* Delaying work with timeouts:
* ----------------------------
* Use timeouts for works that has to be performed only once
* syntaxx : setTimeout(callback,delayMilliseconds,args)
* The setTimeout() returns a timer object ID , and this Id can be passed to clearTimeout() to cancel the timeout.
*/
function simp... | true |
30d5e1378a319dee12bc6b50da1af99a9dfd5dc8 | JavaScript | laurapareja/Exercises-Adalab-Grace | /Module 2/2.1.Intro a la programacion/Exercise 4. Adalaber seleccionada/main.js | UTF-8 | 274 | 2.59375 | 3 | [] | no_license | 'use strict';
const titleElement = document.querySelector('.title');
const adalaber1 = document.querySelector('li');
const adalaber2 = document.querySelector('#adalaber2');
// titleElement.innerHTML += adalaber1.textContent;
titleElement.innerHTML += adalaber2.textContent; | true |
aa1f44a0679c040837828e28a92343c264e9131f | JavaScript | EkowWhiteHatJr/pro-20 | /Project_19_(_LOL_GAME)_copy_copy_2021_05_27_18_01_10/sketch.js | UTF-8 | 2,353 | 3.03125 | 3 | [] | no_license | //defining the characters
var lolCube,lolCubeImg
var lolTri,lolTriImg,lolTrigroup
var lolBackground, lolBackgoundImg
var score = 0
var gameState = "play"
var invisibleGround
function preload(){
// loading in the objects
lolCubeImg = loadImage("lolCube.png")
lolTriImg = loadImage("Obstacle.png(LOL).png"... | true |
5f6248f708421f7a476074e9d4077f13d714a45b | JavaScript | oricalvo/course-zapgroup-advjs-2015-12 | /05 Where to delcare variables/app.js | UTF-8 | 166 | 2.6875 | 3 | [] | no_license | function run() {
return g;
var g = function () {
console.log("g");
}
//function g() {
// console.log("g");
//}
}
var x = run();
| true |
501190ac4f69d8ac1f2e823614022b2c49849eff | JavaScript | zkaj2g5/2021-example-git | /index.js | UTF-8 | 198 | 2.828125 | 3 | [] | no_license | console.log('hello');
console.log('master coach steve');
function add(a, b) {
return a + b;
}
function log(message) {
console.log(message);
}
function myCode(sushi) {
console.log(sushi);
}
| true |
e2c8964d16575ae05a59954d7808825329bc6f1e | JavaScript | EspenAateigen/jspracc | /js/script1.js | UTF-8 | 4,325 | 3.84375 | 4 | [] | no_license | /*
// Question 1
var fabric = "wool";
var threads = 15;
var isSoft = true;
// Question 2
var firstName = "Espen";
var lastName = "Aateigen";
var fullName = firstName + " " + lastName;
console.log(fullName);
// Question 3
var animal = "frog";
var typeOfAnimal = typeof animal;
console.log("The type of frog is:", typeO... | true |
a9828bf0a014c34d036478c3ba38df6da4edb67d | JavaScript | akaAntox/UPO_metodologie_prog_web | /Esercitazione_2/es_1-3.js | UTF-8 | 2,511 | 3.4375 | 3 | [] | no_license | "use strict";
var readlineSync = require('readline-sync');
function addTask(tasks) {
var desc = readlineSync.question("Description: ");
while (!desc)
desc = readlineSync.question("Please, insert a description: ");
var important = readlineSync.keyInYN("Is it important? ");
var pvt = readlineSyn... | true |
e6c780274686363f093fb7795e3d0245e5aedb37 | JavaScript | mjhwest/Random-Pword-Generator | /script.js | UTF-8 | 5,209 | 4.03125 | 4 | [
"MIT"
] | permissive | // Assignment Code
var generateBtn = document.querySelector("#generate");
// setting the password characters object
var characterOptions = {
numbers: "0123456789",
specialChar: "!@#$%^&*()?><}{~",
lowerLet: "abcdefghijklmnopqrstuvwxyz",
upperLet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
// Write password to ... | true |
0ccd2c0f77eaa8c29001797e996ac1b3d9f64a05 | JavaScript | xiLiD/vue-pc-modal | /src/views/network/components/resource/js/time.js | UTF-8 | 618 | 3.109375 | 3 | [] | no_license | function showLocale(objD) {
"use strict";
var str;
var hh = objD.getHours();
if (hh < 10) hh = "0" + hh;
var mm = objD.getMinutes();
if (mm < 10) mm = "0" + mm;
var ss = objD.getSeconds();
if (ss < 10) ss = "0" + ss;
str = hh + ":" + mm /* + ":" + ss */;
return str;
}
function ti... | true |
14608b347291f7dedea325f49bdbdd09a114e836 | JavaScript | shahed92/CRUD-App | /app.js | UTF-8 | 3,708 | 3.28125 | 3 | [] | no_license | // select all input
const nameValue = document.querySelector('#name');
const emailValue = document.querySelector('#email');
const numberValue = document.querySelector('#number');
const positionValue = document.querySelector('#position');
const submitForm = document.querySelector('.form');
let submitBtn = document.quer... | true |