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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e03dac1e8033105a44c9f7a5e1fce1f67dba141c | JavaScript | iBore99/ASL-Commit-Software-Novembre-2017 | /Esempi/EsLogin/appLoginReg.js | UTF-8 | 6,364 | 2.546875 | 3 | [] | no_license | window.onload = function() {
new Vue({
el: '#appLoginReg',
data: {
linkVistaClienti: "",
disabilitaRegistrati: true,
/*Variabili flag che mi servono per decidere cosa mostrare
nella pagina in base ai dati inseriti*/
messaggioErroreUsern... | true |
acc699035836445a67257b7cb9d8088557b7b89e | JavaScript | MKSInc/bjs-homeworks | /2.1-functions/task.js | UTF-8 | 3,390 | 3.640625 | 4 | [] | no_license | 'use strict';
// ====================================================================================================
// Задача N1
function getSolutions(a, b, c) {
const D = b * b - 4 * a * c;
const result = {
D,
roots: []
};
if (D >= 0) {
const x1 = (-b + Math.sqrt(D)) / (2... | true |
4c33ab497686d971583af3fd9a3602ae307debc0 | JavaScript | Sahana-23/MERN_Thruskills | /js/Browser-Env/BOM/timing.js | UTF-8 | 250 | 3.34375 | 3 | [] | no_license | //
setTimeout(()=>console.log("one Second"),1000)
//
// setInterval(()=>console.log("Every 2 second"),2000)
var count=1;
var id = setInterval(()=>{
if(count==5){
clearInterval(id)
}
console.log("Every 2 seconds")
count++;
},2000) | true |
461fe9bbad22ac78376d294c2f98fa92bb277aca | JavaScript | AllTradesGames/procedural-world-cloud-functions | /get-user-data/index.js | UTF-8 | 2,763 | 2.84375 | 3 | [] | no_license | /**
* Responds to any HTTP request that can provide a "message" field in the body.
*
* @param {!Object} req Cloud Function request context.
* @param {!Object} res Cloud Function response context.
*/
const Datastore = require('@google-cloud/datastore');
const projectId = 'prototype-backend';
const datastore = new... | true |
caa98c0f59ddabed8cc06a3a9532e0892f0e65f3 | JavaScript | ryansebastian0828/SFRA | /cartridges/app_storefront_core/cartridge/scripts/util/SFTPUtils.js | UTF-8 | 6,381 | 2.546875 | 3 | [] | no_license | "use strict";
var File = require("dw/io/File");
var SFTPClient = require("dw/net/SFTPClient");
var Site = require("dw/system/Site");
var Logger = require("dw/system/Logger");
/**
* @function SFTPConnect
* @description connects to (s)ftp server
*/
exports.SFTPConnect = function () {
var SitePrefs = Site.getCurr... | true |
de4f3bf884cbe8246205a0ed9ea4cc8048cd359d | JavaScript | jssicasc/CustomerManagement | /src/index.js | UTF-8 | 3,014 | 3.125 | 3 | [] | no_license | const express = require('express');
const { v4: uuidv4 } = require('uuid');
const app = express();
app.use(express.json());
const clients = []; //enquanto não tem BD vamos salvar nossas contas criadas no array
//middleware de verificação de existência de cpf cadastrado
function verifyIfExistsAccountCPF(requ... | true |
97c7bc9743b7bfd71a4a94dc64ffe50808e552ac | JavaScript | mahithmadwesh94/guvi-events | /index.js | UTF-8 | 3,165 | 2.890625 | 3 | [] | no_license |
// var spanElement = document.getElementById('colorMeRed').addEventListener('mouseover', colorMeRed);
var spanElement = document.querySelector('.col-12.border.border-danger').addEventListener('mouseover', colorMeRed);
var spanElement = document.querySelector('.col-12.border.border-danger').addEventListener('mouse... | true |
ebf2d2df5324cf4b704c017e9f14f7bb56b8d0fa | JavaScript | VictorQueiroz/node-wow-dbc | /reader.js | UTF-8 | 2,521 | 3.03125 | 3 | [] | no_license | 'use strict';
var positions = {
columnsLength: 8,
recordsLength: 4,
recordLength: 12,
recordsBlockStart: 20,
magicNumber: 0
};
function Reader (buffer) {
if(!(buffer instanceof Buffer)) {
throw new Error('\'buffer\' must be an instance of Buffer');
}
this.buffer = buffer;
this.strings = th... | true |
e7ccb0e28af2ef2e10f098ca341ade8a497102d1 | JavaScript | BartlomiejTrojnar/school | /public/js/group/group.js | UTF-8 | 1,636 | 2.9375 | 3 | [
"MIT"
] | permissive | // ------------------------ (C) mgr inż. Bartłomiej Trojnar; 07.01.2022 ------------------------ //
// -------------------------- wydarzenia na stronie wyświetlania grup -------------------------- //
// ------------------------------- DODAWANIE/MODYFIKOWANIE GRUPY -------------------------------- //
// ---------- usta... | true |
984bfc01657fb5dad44e9bb61dbac5ea8e9dfac2 | JavaScript | jacobhoekert/klink_next | /components/EmailForm.js | UTF-8 | 2,468 | 2.703125 | 3 | [] | no_license | import React, { useState, useEffect } from 'react'
import validator from 'validator';
import {db} from '../firebaseConfig';
import '../styles/email_form.scss';
import newId from '../utils/newId';
const EmailForm = (props) => {
const [ inputValue, setInputValue] = useState('');
const [ isValidEmail, setEmailValidit... | true |
4cade63b03a5b4c5ba667ce9787b948b21e2957b | JavaScript | sergio-nunez-meneses/test-js-classes | /script.js | UTF-8 | 4,379 | 3.59375 | 4 | [] | no_license | /*
variables
constants are block-scoped, their values can't be changed through reassignment, and they can't be redeclared
the let statement declares a block scope local variable, optionally initializing it to a value
*/
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const wid... | true |
7bcbc286413cc2ed308c3f9265de49322ae76fce | JavaScript | almuhder/prep | /rp-starter-master/filter.js | UTF-8 | 4,825 | 4.15625 | 4 | [] | no_license | function each(coll, f) {
if (Array.isArray(coll)) {
for (var i = 0; i < coll.length; i++) {
f(coll[i], i);
}
} else {
for (var key in coll) {
f(coll[key], key);
}
}
}
function filter(array, predicate) {
var acc = [];
each(array, function(element, i) {
if (predicate(element, i)... | true |
132a8860fabbf3ab92466cbd4e57daf7b09a68a0 | JavaScript | jossmac/react-focus-marshal | /src/FocusMarshal.js | UTF-8 | 1,765 | 2.546875 | 3 | [
"MIT"
] | permissive | // @flow
import React, {
Component,
type ElementRef,
type ComponentType,
type Node,
} from 'react';
const { Consumer, Provider } = React.createContext();
const NOOP = () => {};
type Callback = (ElementRef<*>) => void;
type Props = {
children: Node,
};
type State = {
traps: Array<*>,
};
export class Focu... | true |
4f3b700f83219cb5ec3920cb9ebce7c45168eb21 | JavaScript | PetraGB/social-network | /src/bioeditor.js | UTF-8 | 2,216 | 2.53125 | 3 | [] | no_license | import React from "react";
import axios from "./axios";
export default class BioEditor extends React.Component {
constructor(props) {
super(props);
this.state = {
editing: false
};
this.editingOn = this.editingOn.bind(this);
this.updateDraft = this.updateDraft.bi... | true |
b2c6293ccb1f737d64cde16e7dfc1e8edc0d432f | JavaScript | Johnetordoff/ember-osf | /addon/components/file-browser-tree/component.js | UTF-8 | 3,715 | 2.515625 | 3 | [
"MIT"
] | permissive | import Ember from 'ember';
import layout from './template';
/**
* A row could represent a node, file-provider, or file, each of which has a
* different interface. RowProxy provides a consistent interface for everything
* the file browser needs to know.
*
* Important: Use `row.content` when passing a row model out... | true |
bd11762acfc337046928e95f05ee7042fef8f865 | JavaScript | Mangiaa/js-xmas-edition | /js/pruebas.js | UTF-8 | 1,678 | 2.984375 | 3 | [
"MIT"
] | permissive | function probarValidarNombre(){
console.assert(
validarNombre("") === "Este campo debe tener al menos 1 caracter",
"No esta bien hecha la funcion validar nombre con un solo caracter");
console.assert(
validarNombre('9384yhfdbkbiesdfhbedifudbsifjkbsdfikjcbfkxjcbsd;fkcdlfhlskndfm;ldskfnx... | true |
035d0c79b37c4b743051284013d8cb7d69df93c5 | JavaScript | jeroenoliemans/wonderolie-react | /src/services/portFolioService.js | UTF-8 | 729 | 2.625 | 3 | [] | no_license | // ajax request helper
function get(url) {
return new Promise(function(resolve, reject) {
var req = new XMLHttpRequest();
req.open('GET', url);
req.onload = function() {
if (req.status === 200) {
resolve(req.response);
} else {
reject... | true |
848b5d970e5d3d80d7d5d0a616191fb8c3304f53 | JavaScript | BearBullTech/stock-price-points-proxy | /stock-price-points/stockDataGenerator.js | UTF-8 | 2,960 | 3.453125 | 3 | [] | no_license | const faker = require('faker');
function getRandomValue(min, max) {
return Math.random() * (max - min) + min;
}
function percentageChange(valOne, valTwo) {
return (((valTwo - valOne) / valOne) * 100);
}
function stocksPurchased(startingVal, weekAverage) {
// AVERAGE PRICE
let returnVal;
if (percentageChang... | true |
57b5e6bf1150ac01cabc87a87c92057d51cef007 | JavaScript | yanqiuxiang/YanQiuXiang | /Jurisdiction/WebRoot/resource/js/reset.js | UTF-8 | 3,743 | 2.578125 | 3 | [] | no_license | /**
* @author liang xiong <ytspin@163.com>
* date:2017/3/29
* desc:共有接口函数,部分方法需先载入jquery.js
*/
/**
*封装获取get
*/
var $_GET = (function () {
var url = window.document.location.href.toString();
var u = url.split("?");
if (typeof(u[1]) == "string") {
u = u[1].split("&");
var get = {};
... | true |
b188728ce0f348e5b0ee74afb007c9ae8a6801a4 | JavaScript | HESUIJUN/web-learning | /js/promiseA+/index.js | UTF-8 | 6,792 | 3.828125 | 4 | [] | no_license | const PENDING = 'pending'
const RESOLVED = 'resolved'
const REJECTED = 'rejected'
function MyPromise(fn) {
// 首先我们创建了三个常量用于表示状态,对于经常使用的一些值都应该通过常量来管理,便于开发及后期维护
// 在函数体内部首先创建了常量 that,因为代码可能会异步执行,用于获取正确的 this 对象
// 一开始 Promise 的状态应该是 pending
// value 变量用于保存 resolve 或者 reject 中传入的值
// resolvedCallback... | true |
4006fd06b996eb5b822a2e2f982dae8d501fe405 | JavaScript | mj-schmitz/Udemy-ReactNative | /src/screens/ComponentsScreen.js | UTF-8 | 650 | 2.75 | 3 | [] | no_license | //createing a react component
import React from "react";
import {Text, StyleSheet, View} from "react-native";
const ComponentsScreen = () => {
//jsx, kind of like html
//props: things like Style to customize components
const name = "Mikey"
return (
<View>
<Text style = {styles.textStyle}> Ge... | true |
6e3f7c893193db3942f77da30b79514d1930759e | JavaScript | alicjakujawa/speedtest | /src/audioProvider.js | UTF-8 | 1,441 | 2.609375 | 3 | [
"MIT"
] | permissive | const audioContext = new (window.AudioContext || window.webkitAudioContext)()
import { store } from './main'
import { Reader } from 'jsmediatags'
import { updateProgress } from './actions'
// let sourceNode
let gainNode = audioContext.createGain()
let analyser = audioContext.createAnalyser()
let currentFileId = null
c... | true |
5f5425ba82abfe549e3ee7f45085375d002b6da7 | JavaScript | OlegFromOmsk/Blog-2 | /js/main.js | UTF-8 | 1,893 | 2.765625 | 3 | [] | no_license | function vis(){
var elements = document.querySelectorAll('.none');
for (var i = 0; i < 4; i++)
{
elements[i].classList.remove('none');
}
var elements = document.querySelectorAll('.none');
if (elements.length == 0)
{
document.getElementById("butt").classList.add('none');
}
window.scrollTo(0, document.... | true |
ac6a2a24815dbdde0786daa3a60bbd1eceb1cd45 | JavaScript | dwferrari/cvb_vizualized | /js.js | UTF-8 | 7,002 | 2.59375 | 3 | [] | no_license | var googleSheet;
function RemoveAccents(strAccents) {
return strAccents.normalize('NFD').replace(/[\u0300-\u036f]/g, "");
}
$( document ).ready(function() {
$('#startAnimation').click(function(){
let gridSelector=$('#gridSelector').val();
var url = "https://sheets.googleapis.com/v4/spreadsheets/1seCbvijwlS9I1... | true |
14c9401ee528f85114b2a019371d5496f1ec951f | JavaScript | Omnikorn/HR_system | /index.js | UTF-8 | 11,998 | 3.265625 | 3 | [
"MIT"
] | permissive | const mysql = require("mysql")
const inquirer = require("inquirer")
// Creating the connection to the server
const connection = mysql.createConnection({
host: "localhost",
port: 3306,
user: "root",
password: "",
database: "company",
})
// first run - run at the begining of the programme
connection.connect((err)... | true |
47a07bac7d440069a07d58aed1964cb438d26754 | JavaScript | getalfred/peekaboo | /screenshot.js | UTF-8 | 4,408 | 2.546875 | 3 | [
"MIT"
] | permissive | "use strict";
var page = require('webpage').create(),
system = require('system'),
fs = require('fs'),
address, imagePath, size, pageWidth, pageHeight, targetSelector;
if (system.args.length < 3 || system.args.length > 4) {
console.log('Usage: screenshot.js URL filename [css selector|xpath:path]');
... | true |
91a561472f35661a420b7c504f1165b78abb13ad | JavaScript | ahmedibra28/Leave-Reqest-App | /src/validations/ResignValidations.js | UTF-8 | 340 | 2.53125 | 3 | [] | no_license | export default function ResignValidate(values) {
let errors = {};
if (!values.employee) {
errors.employee = "Emp. ID is required";
} else if (!values.resign_type) {
errors.resign_type = "Resign Type is required";
} else if (!values.resign_date) {
errors.resign_date = "Resign Date is required";
}
... | true |
506f3cab3479efe6153bd141596a832d253f3a2d | JavaScript | TingC6190/Labs | /Chen_Ting_Lab3/Chen_Ting_Lab3.js | UTF-8 | 3,122 | 3.8125 | 4 | [] | no_license | // alert("JavaScript works!");
/*
Ting Chen
SDI 1505
Lab 3
*/
// variables
var yourName
var wakeUpTime = 9;
var workTime = 10;
var timeBetweenWork
var wakeUpOrNot
var whatToDo
var restroomOptions
var foodOptions
var numBanana
var numApple
timeBetweenWork = workTime - wakeUpTime;
// ask user for name
yourName = pro... | true |
37d094b635a07b8f4d628efcfa46164e21ac4df0 | JavaScript | kaipahl/defaults | /src/_js/foo/index.js | UTF-8 | 340 | 2.5625 | 3 | [] | no_license | import Foo from './foo';
export const FOO = {
/** {HTMLElement[]} */
foos: []
};
/**
* @returns {void}
*/
FOO.init = function() {
const that = this,
/** {NodeList} */
$foos = document.querySelectorAll('.js-foo-init');
if ( $foos.length ) {
$foos.forEach( function( $foo ) {
that.foos.push( new Foo($f... | true |
1413685eba9fb20a3c67a123acf385c422f57e5e | JavaScript | loyin/vue-exp | /src/commons/utils.js | UTF-8 | 1,185 | 2.8125 | 3 | [] | no_license | /**
* Created by yinshipeng on 2016/10/28.
* 如果要定义一个函数是用作工具类,命名方式为 methodNameUtil,然后注册到commonUtils对象中
*/
/**
* 将对象重新封装成{code:'',label:''}型对象
* 原对象属性为code 原对象属性值为label
* @param obj
* @returns {Array}
*/
function packObjCodeAndLabelUtil (obj) {
var objArr = []
for (var p in obj) {
var object = {}
obj... | true |
8b4735af6d30dd41975ff1b738a986fa161d0127 | JavaScript | MiKalla/CS50-FinalProject | /project/timer.js | UTF-8 | 2,806 | 3.09375 | 3 | [] | no_license | $(function()
{
var sec = 0;
var min = 0;
var hour = 0;
var timer;
// スタート
$('#start').click(function()
{
// 00:00:00から開始
sec = 0;
min = 0;
hour = 0;
$('#clock').html('00:00:00');
timer = setInterval(countup, 1000);
//イラスト切り替え&台詞隠し
... | true |
b832c4da9803a0dfc51c1c17eef1635dea8b7c13 | JavaScript | jpcode/algorithms | /codefights/arcade/lab_of_transformations/cipher26.js | UTF-8 | 775 | 3.234375 | 3 | [] | no_license | // Problem statement:
// https://codefights.com/arcade/code-arcade/lab-of-transformations/JeDDnToFtitiiWDZn
function sumc( m, i, l ){
var s = 0;
for ( var i = 0; i < m.length; i++ ){
s += l.indexOf( m[ i ] );
}
return s;
}
function getX( ci, cm, l ){
// will be improved...with math.
f... | true |
39b8e89446db2d18f70cbc2c668afd4ad39f0d8d | JavaScript | denn161/JS-prodvinutui | /components/Header/Header.js | UTF-8 | 731 | 2.953125 | 3 | [] | no_license |
class Header{
constructor() {
this.labelAdd = "Добавить";
this.labelRemove = "Очистить";
}
clickOpenBasket() {
mainPage.render();
}
clearBasket() {
ROOT_MAIN.innerHTML = "";
}
render() {
const htmlHeader = `
<div class="header__i... | true |
84a924903c53bf05df5242eb246bbc4e850d0d64 | JavaScript | froginafog/node_js_basics | /0020/main.js | UTF-8 | 409 | 2.921875 | 3 | [] | no_license | const module_1 = require('./module_1');
console.log("module_1.add(10,5): " + module_1.add(10,5));
console.log("module_1.subtract(10,5): " + module_1.subtract(10,5));
console.log("module_1.multiply(10,5): " + module_1.multiply(10,5));
console.log("module_1.divide(10,5): " + module_1.divide(10,5));
/*
module_1.add(10,5... | true |
a7116f7f6381e7265c7da7a26e174fc941bcc150 | JavaScript | rjdv-0911/Web-Development | /JavaScript Fundamentals/Day 1 continuation/function.js | UTF-8 | 1,370 | 4.9375 | 5 | [] | no_license | //THREE KINDS Of FUNCTION
//FUNCTION DECLARATION - you're declaring a function followed by name
// function greet(firstName = 'John', lastName = 'Doe'){
// //argument or variable
// if(typeof firstName === 'undefined'){
// firstName = 'John';
// }
// if(typeof lastName === 'undefined'){
// ... | true |
24f1cb8ea35d9748bdbf172dea54855a1549bca3 | JavaScript | dawsonrichey/small-projects | /javascript/style2.js | UTF-8 | 435 | 2.953125 | 3 | [] | no_license | 'use strict'
let admin = 'nothing';
let name = 'John';
admin = name;
alert(admin);
const ourPlanet = 'Earth';
let currentVisitor = "";
/*let greeting = 'Welcome to my website, ';
const namePersonal = prompt('Enter Your Name','');
let message = greeting + namePersonal + '.';*/
/*let user = 'John';
let age = 25;
let m... | true |
4968294c0af42dd262691fc5fdab7b77c80f3ca9 | JavaScript | pantherajs/tasklist | /lib/functions/next.js | UTF-8 | 1,373 | 2.734375 | 3 | [
"MIT"
] | permissive | /**
* @file lib/functions/next.js
*/
'use strict';
const run = require('./run');
const wrap = require('./wrap');
/**
* @param {TasklistWrapper} wrapper
* @param {Task} task
* @param {Object} ctx
* @param {AsyncFunction} next
* @return {Promise.<Object>}
* @private
*/
async func... | true |
2423d9400a8ab7c59635bb79500845b0c21fc798 | JavaScript | brandallk/CodeChallenges | /Coderbyte/JavaScript_Easy/21_Counting_minutes_1.js | UTF-8 | 1,079 | 3.734375 | 4 | [] | no_license | /* return the total number of minutes between two times */
function CountingMinutesI(str) {
var time1 = str.split("-")[0]
var time1Period = time1.slice(-2)
var time1Hours = Number(time1.split(":")[0]) == 12 ? 0 : Number(time1.split(":")[0])
var time1Mins = Number(time1.split(":")[1].substr(0, 2))
var time... | true |
ace5a7983d0255151c649cc144150436cf630673 | JavaScript | derekhound/control-center | /api/app/lib/service/ProductService/index.js | UTF-8 | 1,492 | 2.546875 | 3 | [] | no_license | var _ = require('lodash');
var Promise = require('bluebird');
module.exports = function(api, Sequelize) {
var Product = api.model.rds.Product;
/**
* Query products
*
* @promise {product[]} - An array of product objects
*/
function queryProducts()
{
var options = {
orde... | true |
d93177b79789844603c369659c9ec2d11f8b1b35 | JavaScript | lminuzzi/controlaccess | /web/js/portal/PortalJSController.js | ISO-8859-1 | 3,289 | 2.609375 | 3 | [] | no_license | $( function()
{
//criao e eventos do menu
addEventoMenu();
addEventoBusca();
});
function addEventoMenu()
{
var original = $( "#menu" ).clone( true );
original.find( ".k-state-active" ).removeClass( "k-state-active" );
$(".configuration input").change( function() {
var menu = $( "#menu"... | true |
adb2aa8274d3ff4e2ec0f00ef77474af853932a8 | JavaScript | pitpalac36/Java-Music-Festival | /tema8_react/festival/src/Artist.jsx | UTF-8 | 2,663 | 2.9375 | 3 | [] | no_license | import React from 'react';
class ArtistRow extends React.Component {
handleClickDelete = (event) => {
console.log('delete button pentru ' + this.props.artist.id);
this.props.deleteFunc(this.props.artist.id);
}
handleClickUpdate = (event) => {
console.log('update button pentru ' + t... | true |
6400ca57b30d680b88c0a6be7cb8bac4c56423ee | JavaScript | top9teen/Project-first | /src/main/resources/static/assets/js/loan_registration.js | UTF-8 | 11,707 | 2.703125 | 3 | [] | no_license | javascript:doRefreshCaptcha()// JavaScript Document
// JavaScript Document
/****************************************************/
// ### Checking Function ###
// 1. IsEmailCorrect(szEmail)
// 2. IsEmpty(szStr)
// 3. IsEngString(szStr)
// 4. IsThaiString(szStr)
// 5. IsAlphaNumeric(szStr)
// 6. IsNum... | true |
34e8c2d59086873def510c3caae063ce92b468d3 | JavaScript | ramansrsta/Modern-JavaScript | /Custom HTTP Library/app.js | UTF-8 | 1,100 | 2.859375 | 3 | [] | no_license | const http = new easyHTTP;
//Test for get request
// http.get('https://jsonplaceholder.typicode.com/posts',
// function(err,post)
// {
// if(err)
// {
// console.log(err);
// }
// else
// {
// console.log(post);
// }
// });
//test for post
const data= {
titl... | true |
5a4f75ca3e4950b01f6fed634744d93bd7187385 | JavaScript | NagarjunaMN/Full_Stack_MERN_Development | /js/conditions/dowhile.js | UTF-8 | 105 | 2.734375 | 3 | [] | no_license | i=1
do {
console.log(i)
i++
} while (i<=10);
i=9
do {
console.log(i)
i++
} while (i>10); | true |
fbbd4f9a295271984cdb441853d4feb58c9d9a4e | JavaScript | stu562/chatterbox-client | /client/scripts/messagesView.js | UTF-8 | 1,530 | 2.6875 | 3 | [] | no_license | var MessagesView = {
$chats: $('#chats'),
initialize: function() {
//creating the message
// var newMessage = new Messages();
// return newMessage;
// MessagesView.$chats.on('submit', MessagesView.renderMessage);
MessagesView.renderMessage();
// MessageView.initialize();
},
rende... | true |
ef768685dd7ed27a352494dfe9a01cb7ec929464 | JavaScript | jamesdasilva/flex-mask-core | /core/src/flex-mask-core/middlewares/prefix/prefix.js | UTF-8 | 756 | 2.578125 | 3 | [] | no_license | import removePrefix from './remove-prefix'
import applyPrefix from './apply-prefix'
const removeCmd = prefixWithCmd => prefixWithCmd.slice(2, prefixWithCmd.length - 1)
const Prefix = context => {
let prefix = ''
let maskStr = context.stringMask
const prefixWithCmdArray = maskStr?.match(/:\[[^;]+;/) ?? []
con... | true |
e948ba16a513f04f3acdbc2ca5c82388773388a8 | JavaScript | krang-drive/package-bot | /server.js | UTF-8 | 2,648 | 2.703125 | 3 | [] | no_license | const express = require('express');
const app = express();
const Client = require('node-rest-client').Client;
const client = new Client();
app.get('/start/:facilityId', (req, res) => {
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.ran... | true |
576f2d2b206b67dd717d6876aa2575919f2a1b65 | JavaScript | alvarofrutos/content-library | /models/user.js | UTF-8 | 2,059 | 2.5625 | 3 | [
"MIT"
] | permissive | const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const Schema = mongoose.Schema;
var UserSchema = new Schema({
firstName: { type: String, required: true, max: 100 },
familyName: { type: String, required: true, max: 100 },
email: { type: String, unique: true, required: true, max: 100 },
... | true |
a918bb2ad22d36ac4bfb638b1d338535d32b5581 | JavaScript | cnlon/ob.js | /src/util.js | UTF-8 | 2,660 | 3.15625 | 3 | [
"MIT"
] | permissive | import {DEBUGGING} from './constants'
/**
* Define property with value.
*
* @param {Object} object
* @param {String} property
* @param {*} value
* @param {Boolean} [enumerable]
*/
export function defineValue (object, property, value, enumerable) {
Object.defineProperty(object, property, {
value,
enum... | true |
831b910c5e921589ca36cc923a9ceded117c8e68 | JavaScript | MrYuto/connectfour.js | /src/utils/Row.js | UTF-8 | 1,305 | 2.90625 | 3 | [
"MIT"
] | permissive | const { hasFourConnects } = require('./Util');
const Player = require('../Player');
const Board = require('../Board');
const Bead = require('../Bead');
class Row {
/**
* Represents a row of the game board
* @param {Board} board The row board
* @param {Bead[]} beads The row beads
*/
constructor(board, be... | true |
0fe222af2f22c3dcbc83a760ff8a90afe3137132 | JavaScript | saparin/hello-sequelize | /test.getting_started.js | UTF-8 | 5,301 | 2.59375 | 3 | [
"MIT"
] | permissive | /*
* http://sequelizejs.com/articles/getting-started
*/
var Sequelize = require('sequelize')
, assert = require('assert')
, colors = require('colors');
module.exports = function(sequelize){
var User;
/*
* http://sequelizejs.com/articles/getting-started#connecting
*/
it('#001: Connecting to the dat... | true |
16275bc84aa7de1b685d182272f5ba3402a9c523 | JavaScript | Mr-flyer/garbage | /components/loadMore/index.js | UTF-8 | 3,514 | 2.71875 | 3 | [] | no_license | // components/load-more/index.js
Component({
properties: {
hasMore: {
type: Boolean,
value: false
},
// 加载中的显示文本
loadingText: {
type: String,
value: '加载中...'
},
// 加载失败的显示文本
failText: {
type: String,
value: '加载失败, 请点击重试!'
},
... | true |
52648d960bc8c7f55380e14904007569db016caa | JavaScript | lekkim2210/AngularFitnessApp | /server/AngularFitnessAppApi/controllers/userController.js | UTF-8 | 2,654 | 2.71875 | 3 | [] | no_license | import userModel from '../models/user';
let userController = {};
userController.registerUser = (req,res) => {
if(!req.body.name || !req.body.email || !req.body.password){
res
.status(400)
.json({"message" : "All fields required"});
return;
}
userMod... | true |
e8883eb830cded260f698e216fa2ab0de3f89704 | JavaScript | monemad/dsa-practice | /js_dsa/sorting_algorithms.js | UTF-8 | 2,873 | 3.84375 | 4 | [] | no_license | let array = [3,6,1,67,34,23];
const bubbleSort = arr => {
let noSwap;
for (let i = arr.length; i > 0; i--) {
noSwap = true;
for (let j = 0; j < i-1; j++) {
// We stop before i-1 since we are checking j+1 as well
if (arr[j] > arr[j+1]) {
[arr[j], arr[j+1]] = [a... | true |
c9b94039793f8d25cf56e4257b1c40f08b6890ff | JavaScript | crispinamuriel/1907-GHP-NY-WEB-FT | /01-junior-phase/03-DOM/flexbox-demo/script.js | UTF-8 | 301 | 3.171875 | 3 | [] | no_license | let div = document.getElementById("buttons");
let button1 = document.getElementById("button1");
div.addEventListener('click', function (event) {
console.log('Button is clicked!!!!')
console.log('event: ', event);
console.log('this: ', this);
console.log('target: ', event.target);
}); | true |
fbfa97c3866d52fea34082840fcebea7b9b13d31 | JavaScript | a1phaZ/new.balance.z-labz.ru | /server/routes/api/state/index.js | UTF-8 | 3,395 | 2.59375 | 3 | [] | no_license | const MoneyBox = require('../../../models/moneybox');
const Budget = require('../../../models/budget');
const Item = require('../../../models/item');
const toJson = require("../../../handlers/toJson");
const {createError} = require('../../../handlers/error');
const {isValid, isBefore} = require('date-fns');
const find... | true |
4c8f25179f23cb3a815e361bf8f272de3b7b5a07 | JavaScript | vkuchinov/vkuchinov.github.io | /watersheds/js/artefact.rippling.system.js | UTF-8 | 10,091 | 2.671875 | 3 | [] | no_license | /**
*
* @RIPPLING [CIRCULAR] SYSTEM
* Each particles would have its own lifetime and would be changes
* by a newer node from XML by its death.
*
* The new node would have its own unique position.
*
* @author Vladimir V. KUCHINOV
* @email helloworld@vkuchinov.co.uk
*
*/
"use strict"
var MAX_RADIUS = 24... | true |
195a575def8357ec6ebbcbf3ccc46f1d43c2e8d5 | JavaScript | employeesns/study-2 | /es6New/13-function.js | UTF-8 | 3,701 | 4.71875 | 5 | [] | no_license | /* //es6函数的默认值是惰性求值的
let x = 99;
function foo(p = x + 1) {
console.log('p:', p);
}
foo(); //p:100
x = 100;
foo(); //p:101 */
/* //函数的rest参数
function add(...values) {
let sum = 0;
console.log('values:', values);
for (let i in values) {
console.log('for in i:', i);
}
for (let i of values) {
sum ... | true |
c08711fa5c2d8fb861cd760c919c34ca400dcad9 | JavaScript | lxyqaq/html_css | /JavaScript/day02/03_Boolean.js | UTF-8 | 263 | 3.90625 | 4 | [] | no_license | /*
* Boolean 布尔值
* 布尔值只有两个,主要用来做逻辑判断
* true
* - 表示真
* false
* - 表示假
*
* 使用typeof检查一个布尔值时,会返回boolean
*/
var bool = false;
console.log(typeof bool);
console.log(bool); | true |
000714a649c3cdc4f3ce3c364a94b44dd4b92d3c | JavaScript | PonyThree/day-by-day | /day11_16/exercise/03_date_set.js | UTF-8 | 468 | 3.5625 | 4 | [] | no_license |
//本地时间字符串形式
/*var now=new Date();
console.log(now);
console.log(now.toLocaleString());
console.log(now.toLocaleDateString());
console.log(now.toLocaleTimeString());*/
//设置Date中的信息
var d1=new Date('2018-11-15 12:30:00');
d1.setFullYear(2021);
d1.setMonth(5);//0~11
d1.setDate(18);
//设置距离计算机元年的毫秒数,其他的日期时间都会发生变化
d1.setTim... | true |
3a5c703acc4b953de058e1c8f0283772f8bc53d4 | JavaScript | rptynan/rptynan.github.io | /js/conway.js | UTF-8 | 3,484 | 3.125 | 3 | [
"MIT"
] | permissive | /*
* Javascript implementation of Conway's Game of Life, intended to fill
* the entire background of a page.
* Licensed under MIT license, find the code at github.com/rptynan/tynan.me
* Richard Tynan
*/
var
// Necessary Variables
canvas, c, grid=[], ngrid=[], gh, gw, t, intcnt=0,
//Aestethic Variables
cs=15, ... | true |
06224a01bda9520eb5a1af3a5a712a195390ef83 | JavaScript | cheng022074/zbee-sdk | /src/data/message/channel/disconnect.fn.js | UTF-8 | 1,308 | 2.59375 | 3 | [] | no_license |
/**
*
* 连接
*
* @import get from data.message.get
*
* @import send from .send.body scoped
*
* @import add from event.listener.add
*
* @import remove from event.listener.remove
*
* @import disconnect from data.message.processive.disconnect scoped
*
* @import is from data.message.processive.disconnec... | true |
b1355aac8a934dbc01c4031a0067c3129bbf9919 | JavaScript | Codedacity/apiskincare | /helpers/dataloader.js | UTF-8 | 2,669 | 2.859375 | 3 | [] | no_license | const DataLoader = require("dataloader")
const pool = require("../db")
//this class is a helper to reuse dataloader accross my nested queries. This loads a single object response. eg author of books
module.exports.single = class single {
loaders = {}
load(table, column, id) {
const loader = this.findLo... | true |
96f19d75e8fb3287b357e764a06ca569c939c94f | JavaScript | windldream/leetcode | /dfs/colorBorder.js | UTF-8 | 845 | 3.109375 | 3 | [] | no_license | /**
* @param {number[][]} grid
* @param {number} r0
* @param {number} c0
* @param {number} color
* @return {number[][]}
*/
var colorBorder = function(grid, r0, c0, color) {
const visited = new Set();
const dirR = [-1, 0, 1, 0];
const dirC = [0, 1, 0, -1];
dfs(grid, r0, c0, grid[r0][c0], color, visited);
... | true |
4b53218df6f06604c422e8a78423b641c6cb6886 | JavaScript | scherbenokk/exercises | /curry/index.js | UTF-8 | 354 | 2.609375 | 3 | [] | no_license | 'use strict';
module.exports = function curry(fn) {
function cr () {
let args = Array.from(arguments);
let allParams = args[0].concat(args.slice(1));
if (allParams.length === fn.length) {
return fn.apply(null, allParams);
}
return cr.bind(null, allParams);
... | true |
3781d9131cb9fcd5c4f66ac8612b453cb53b5439 | JavaScript | msvargas/node-socket-pool | /src/utils.js | UTF-8 | 414 | 2.609375 | 3 | [
"MIT"
] | permissive | export function delegate (wrapper, key, methods) {
methods.forEach(method => {
wrapper.prototype[method] = function (...args) {
// this._socket
const origin = this[key]
const result = origin[method](...args)
return result === origin
// If the original method returns this, then ret... | true |
d4b69969b03e83e8198a1e96dfdcd2ac4ca11a2f | JavaScript | pedro-hos/caixa-eletronico | /ce-ui/public/js/controllers/caixa-eletronico.js | UTF-8 | 1,784 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | (function() {
'use strict';
angular.module('ce-ui')
.controller('CaixaEletronicoController', function ($scope, caixaEletronicoService) {
$scope.numero_invalido = "Digite um número Válido";
inicializa();
function inicializa() {
todos();
$scope.caixa = new caixaEletronicoService();
... | true |
f44dc04f653ff2d7f1099a32d08c66c660e2567b | JavaScript | prantlf/build-number-generator | /tests/format.js | UTF-8 | 811 | 2.53125 | 3 | [
"MIT"
] | permissive | import { parse as parseBuildTime, format as formatBuildTime } from '../dist/index.mjs'
import { strictEqual } from 'assert'
import tehanu from 'tehanu'
const test = tehanu(import.meta.url)
test('exports the `format` method', () => {
strictEqual(typeof formatBuildTime, 'function')
})
test('formats a build number pa... | true |
2af46716994fde20e07b3cad7c28684316b38d14 | JavaScript | ComFreek/ThreadLibrary.js | /tests/Thread.js | UTF-8 | 4,614 | 3.375 | 3 | [
"MIT"
] | permissive | asyncTest("Thread return value", function () {
var thread = new TL.Thread(function (data) {
return data * data;
});
thread.send(5, function (ret) {
ok(ret == 25, "Thread's return value successfully passed");
start();
});
});
asyncTest("Kill thread", function () {
var thread = new TL.Thread(function ... | true |
0a1ae13bcb0a4b0f62d189c7ad36751b6ce1acee | JavaScript | kishan2019/ipl-dataSet-kishan | /scripts/ipl.js | UTF-8 | 3,391 | 2.578125 | 3 | [] | no_license | export const getNoOfMatchesPlayed = (data) => {
let YearlyPlayedMatchsData = {};
for (let j = 0; j < data.length; j++) {
YearlyPlayedMatchsData[data[j].season] = YearlyPlayedMatchsData.hasOwnProperty(data[j].season) ? ++YearlyPlayedMatchsData[data[j].season] : 1;
}
return YearlyPlayedMatchsData;... | true |
7c23d1304d37246062d9acc0625d295f2a27011d | JavaScript | lcnvdl/node-essential | /src/system/validators/type-validator.js | UTF-8 | 491 | 2.9375 | 3 | [
"MIT"
] | permissive | const ValidatorBase = require("./validator-base");
class TypeValidator extends ValidatorBase {
constructor(parent, field, fieldName, typeOf) {
super(parent, field, fieldName);
this.typeOf = typeOf;
}
validate() {
if (typeof this.value !== this.typeOf) {
return Promise.r... | true |
66501be3539a7475da0f7ebc3fc9c67d7af44f14 | JavaScript | tbydza/simple-nodejs-webserver | /server.js | UTF-8 | 2,602 | 2.765625 | 3 | [
"MIT"
] | permissive | const http = require('http');
const url = require("url");
const path = require("path");
const fs = require("fs");
const hostname = '127.0.0.1';
const port = 8080;
const wd = process.cwd();
var ServeStatic = {
exists: function(path, callback){
fs.access(path, fs.constants.F_OK, (err) => {
if(err){
callback(e... | true |
77fa0b40aa402fb91dd1ed768154abf4e5071a65 | JavaScript | jhudson8/react-backbone | /tutorials/forms/step2/example.js | UTF-8 | 3,480 | 2.96875 | 3 | [
"MIT"
] | permissive | // initialize react-backbone
var React = require('react');
var Backbone = require('backbone');
var _ = require('underscore');
var ReactBackbone = require('react-backbone');
// MODEL
var MyModel = Backbone.Model.extend({
// add a dumb validation method which ensures first/last name length are > 5
validate: functio... | true |
9807f970b8f8815d580cf6d8ac47c5730443c7d6 | JavaScript | aminxxx/git_02 | /mugujie/js/details.js | UTF-8 | 5,238 | 2.96875 | 3 | [
"MIT"
] | permissive | var list = document.getElementsByClassName('cloth_list')[0];
var lis = list.getElementsByTagName('li');
var box = document.getElementsByClassName('mImg')[0];
var mImg = box.getElementsByTagName('img')[0];
var glass = document.getElementsByClassName('glass')[0];
var xImg = glass.getElementsByTagName('img')[0];
for(var ... | true |
a0df7533ff953c75f3f2c62f3fe833e482913efa | JavaScript | STEP-tw/head-sumandeepak8 | /src/parseInput.js | UTF-8 | 1,805 | 2.90625 | 3 | [] | no_license | const isOnlyCount = function (inputArg) {
return isFinite(inputArg[0]);
};
const isOnlyOption = function (inputArg) {
return isNaN(inputArg) && inputArg.length == 1;
};
const isOptionWithCount = function (inputArg) {
return isNaN(inputArg[0]) && inputArg.length > 1;
};
const hasNoDash = function(inputAr... | true |
b03a4ea3b581fc3b8370a2f660a2e3aaa44b4231 | JavaScript | haileymurto/pingpong | /js/scripts.js | UTF-8 | 637 | 3.5625 | 4 | [] | no_license | function pingPong(i) {
for(var i=1; i <= 100; i++){
if (i % 15 === 0) {
console.log("pingpong");
}
else if (i % 3 === 0) {
console.log("ping");
}
else if (i % 5 === 0) {
console.log("pong");
}
else {
console.log(i);
}
}
}
// Use console.log instead of return... | true |
1b3934b2268a45e421855e0eb2f665531f20e4dc | JavaScript | juancaacevedo10/fundamentosjs-virtual | /trabajo-virtual-geek/Fundamentos-de-Programación-Parte-Dos/ejercicio9/main.js | UTF-8 | 203 | 3.25 | 3 | [] | no_license | const name = 'juan david torres';
const contenedor = document.querySelector(".contenedor");
contenedor.innerHTML = `<h2>El nombre de mi compañero es ${name}, y está compuesto por ${name.length} caracteres</h2>`
| true |
2831b36a727097ce37191afbd8a504d23de4a9a0 | JavaScript | gogo-rulez/user-roles-management | /src/store/index.js | UTF-8 | 2,546 | 2.53125 | 3 | [] | no_license | import Vue from 'vue';
import Vuex from 'vuex';
import { database } from '@/mixins/firebaseMixin';
const roles = database.ref('/roles');
Vue.use(Vuex);
export default new Vuex.Store({
state: {
roles: [],
mq: '',
numberOfRoles: 0,
rolesLoaded: false
},
getters: {
ge... | true |
8bab1e8ae12c4bdeb3dd585ec35cb16e8d39eff0 | JavaScript | BensBaker35/HockeyDataVisualization | /gecoderTest.js | UTF-8 | 767 | 2.734375 | 3 | [] | no_license | var NodeGeocoder = require('node-geocoder');
var options = {
provider: 'mapquest',
apiKey: 'PoJDKmnhD9enApfLWQUJydLGSgkF94lT',
formatter: null
}
var options2 = {
provider:'here',
appId: 'rz0pTPqJroy1Dw6PLxhU',
appCode:'3Euqa6ozuTxUcUE_CxVVAA',
formatter: null
}
var geocoder = NodeGeocoder... | true |
592dca365454d51f5dc246ef7f067ed24659701a | JavaScript | abhijit2908/Constructor_Hangman | /word.js | UTF-8 | 454 | 3 | 3 | [] | no_license | var guesswords = require('./guessWords');
var pickedWord = function(word){
this.word = word.split("");
this.wordDisplay = function(){
return this.word;
}
this.wordHide = function(){
console.log(this.word.length)
var hiddenWord = [];
for (var i = 0; i < this.word.length; i++) {
hiddenWord[i] = "... | true |
ba1fb0e699c0e951ae2a6d662a70da7850922635 | JavaScript | juanguren/GifOS | /script/main.js | UTF-8 | 20,388 | 2.921875 | 3 | [] | no_license |
// ============ Number of app visits (Accumulator) ==================
function pageVisits() {
let getPageCount = localStorage.getItem("load");
if (getPageCount) {
getPageCount++;
localStorage.setItem("load", getPageCount);
} else{
let pageVisitCount = 1;
localStorage.setIt... | true |
5229a1f17615ca7b5e8a3d4f982c1d33f2a93934 | JavaScript | maheeri/js101 | /small_programs/100NextFeaturedNumberHigherThanAGivenValue.js | UTF-8 | 1,444 | 4 | 4 | [] | no_license | const LIMIT = 9876543201;
function featured(num) {
let nextOddMultiple = nextOddMultipleOfSeven(num);
while (!hasDistinctDigits(nextOddMultiple)) {
if (nextOddMultiple > LIMIT) {
return "There is no possible number that fulfills those requirements.";
}
nextOddMultiple += 14;
}
return nextOddM... | true |
39494ebe408337ab6781b5885dc45cc4e67fa24e | JavaScript | Jaimeloeuf/Promist | /server/Email_service/mailer.js | UTF-8 | 2,003 | 3.796875 | 4 | [
"BSD-3-Clause"
] | permissive | 'use strict'; // Enforce use of strict verion of JavaScript
const { print } = require('./utils');
// Factory function for fifo objects
function FIFO(handler) {
// Create a request_list variable that will be private once the function ends, but accessible via closure of this function
let request_list = ['hello'... | true |
8c527ef456720ae9ee411214888483980039e796 | JavaScript | TMBD/cordova-app-samples | /imcCalculator/www/js/index.js | UTF-8 | 2,202 | 3.109375 | 3 | [] | no_license | function calculerIMC(){
let heightElement = document.getElementById("height");
let weightElement = document.getElementById("weight");
let resultElement = document.getElementById("result");
let resultContainerId = document.getElementById("resultContainerId");
let imcValueElement = document.getElement... | true |
bd71eead593c17a6f3e3f64a79317f2e21e24d85 | JavaScript | Hillfigure/rvanbijnen-groentetuin | /farm.js | UTF-8 | 3,233 | 3.109375 | 3 | [] | no_license | // Assumption: 1 crop: data passed as [] / more crops: data passed as {}
// Since test-data may not be altered, suspect it to be a fixed datascructure.
// Therefore did not prepare all functions to check for both instances, except where needed.
// DO NOT SET CROPFACTOR TO 0, USE "none" - (exception not handled)
const... | true |
4dd9b7269fa4325cc00e35fb739e0e9b78b83ec5 | JavaScript | Wimaks/react-table | /src/components/test.js | UTF-8 | 2,131 | 3.3125 | 3 | [] | no_license | import React from 'react';
import students from '../students.json';
import './test.css';
/*
In this code we'll refactor the Table component
to use ES6 class & arrow syntax sugar.
*/
const Row = ({ id, name, age, email, hobby, remove}) => (
<div className="row">
<div className="remove">
<butt... | true |
04b86b11a88c77bc1e603828c24e812e0a4c3d4f | JavaScript | econtreras-1/ISTA330 | /practicum/week-3/question11.js | UTF-8 | 666 | 3.890625 | 4 | [] | no_license | /*
Given two integer arrays input1 and input2,
and the integer d, return the d-count
between the two arrays.
The d-count is defined as
the number of elements input1[i] such that
there is not any element input2[j]
where |input1[i]-input2[j]| <= d.
Example:
input: input1 = [2,1,26,3], input2 = [-5,-2,10,-3,7], d =... | true |
286e6a847bbda6cf4d8569c963a5fdfdeaa75f0f | JavaScript | Henrique1204/Balta-Node-API | /server/models/produto.js | UTF-8 | 953 | 2.59375 | 3 | [] | no_license | // Biblioteca mongoose.
const mongoose = require('mongoose');
// Classe que cria os schema do banco de dados.
const Schema = mongoose.Schema;
// Instância do schema.
const schemaProduto = new Schema({
// O campo de id é gerado automaticamente.
// Definindo um campo.
titulo: {
type: String, // Tipo ... | true |
3d80bb4c20be6207cf55aa66455ac88fd208bda9 | JavaScript | ravindranathbe/react | /FormEx3.jsx | UTF-8 | 819 | 2.625 | 3 | [] | no_license | import React from 'react';
import ReactDOM from 'react-dom';
class FormEx3 extends React.Component {
constructor(props) {
super(props);
this.state = {
message: ''
}
this.updateState = this.updateState.bind(this);
this.updateMessage = this.updateMessage.bind(this)... | true |
af88b028667e9aab631322c4338a410bfa82fcbb | JavaScript | henokali1/smart-house | /static/js/security.js | UTF-8 | 4,089 | 3.09375 | 3 | [] | no_license | $(document).ready(function(){
var mot = false
var intru = false
var gls = false
var lek = false
var playing = false
function startAlarm(){
if((mot || intru || gls || lek) & (!playing)){
playing = true
var x = document.getElementById("myAudio");
x.loop ... | true |
73fa3bcea1e14a5750190ccba2feeb115bfddf09 | JavaScript | omatztw/tkmninja | /goipai/Player.js | UTF-8 | 1,409 | 2.640625 | 3 | [] | no_license | var Const = require('./Const');
var Index = Const.Index;
var Card = Const.Card;
var CARD_SCORE = Const.CARD_SCORE;
var Player = function () { }
Player.clear = function (player) {
player.uid = '';
player.hand = [];
player.defense = [];
player.hidden = [];
player.offense = [];
player.peeping = f... | true |
15df015f5c2bf0f3577b735a62fa7a4ac576dece | JavaScript | jonahb/equirectangular_projection | /equirectangularProjection.js | UTF-8 | 5,677 | 3.34375 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | //
// Equirectangular Projection for Google Maps
// Author: Jonah Burke, http://jonahb.com
// This code is in the public domain.
//
//
// EquirectangularProjection constructor
//
// zoomLevels: The number of zoom levels to project (required)
//
// dimensons: An array of arrays, each representing the dimensions at... | true |
a799f0ab37dd8acb1ad296b357f1095ca8ecfe56 | JavaScript | iandownie/base-project | /base_js/modules/carousel.js | UTF-8 | 1,809 | 2.75 | 3 | [] | no_license | "use strict";
/**
* @doc driver
* @name Carousel
* @description
* Handles Carousel Functionality
*/
var Carousel = (function($){
function carouselFunctionality(){
var carousels = $('.carousel');
carousels.each(function(){
var carousel = $(this);
var slides = carousel.find('.slide');
var timing =... | true |
84bf9c331352f57e531bf46091216475f64e4a0b | JavaScript | mooimarkt/mooimarkt | /public/newthemplate/admin/dist/js/admin_users_ad.js | UTF-8 | 2,516 | 2.765625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | jQuery(function ($) {
let $user_form = $('#user-form');
let $profile_user_img = $('.profile-user-img');
$('#userPhotoUpload').fileupload({
dataType: 'json',
singleFileUploads: true,
done: function (e, data) {
if(
data.result.errors == 0 &&
... | true |
90dd51abfed6daeb3cca586af1bae00222e31755 | JavaScript | oimontgomery/13_Homework | /static/js/app.js | UTF-8 | 1,325 | 3.625 | 4 | [] | no_license | var tableData = data;
//Table building code
function generateTable(data){
var tbody = d3.select("tbody");
tbody.html("");
data.forEach(function(alienReport){
// Step 2: Use d3 to append one table row `tr` for each alien report object
var row = tbody.append("tr")
// Step 3: Use `Object.entries... | true |
093f80e17898e85df61fc0aa33e9b16610e0f823 | JavaScript | laraffa/to-do-list | /spec/specs.js | UTF-8 | 475 | 2.84375 | 3 | [
"MIT"
] | permissive | describe ("task", function (userInput) {
it("create a new task based on given properties", function() {
var testTask = new task ("2/1/16", "Clean my room")
expect(testTask.dueDate).to.equal("2/1/16");
expect(testTask.details).to.equal("Clean my room");
});
it("add the fullTask method to the dueDate",... | true |
7302f823eb62db9489a60572b1f1c286b782b14a | JavaScript | WebOfTrustInfo/satyrn | /src/state/kernel.js | UTF-8 | 2,387 | 2.84375 | 3 | [
"Apache-2.0",
"WTFPL",
"MIT",
"CC-BY-4.0",
"CC0-1.0",
"AFL-2.1",
"Unlicense",
"LGPL-2.0-or-later"
] | permissive | const child_process = require('child_process');
const os = require('os');
// This handles the state of a single notebook document.
export class Kernel {
constructor(state) {
this.state = state
//this.nodePath = "/Users/korsimoro/.nvm/versions/node/v8.1.1/bin/node"
//this.nodePath = "/tmp/wrapper"
th... | true |
160c2a382cc405f2b82b3ccc6d55f551735969cf | JavaScript | germanmahecha/JeuStornoway | /Assets/scripts/GameCtrl.js | UTF-8 | 2,867 | 2.71875 | 3 | [] | no_license | #pragma strict
public var nbDiamants:int= 0;
public var nbRubis:int= 0;
public var nbMaxDiamants:int;
public var nbMaxRubis:int;
public var viesDark:int=5;
public var dynamite:boolean=false;
public var dynamiteImage:UnityEngine.UI.Image;
public var diamants: UnityEngine.UI.Text;
public var rubis: UnityEngine.UI.Text... | true |
66a8d4736aa780749e78d7d73d3ec3567e24fd98 | JavaScript | kariem2k/playir | /html5/web/js/engine/base/CCBaseTypes.js | UTF-8 | 11,104 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | /*-----------------------------------------------------------
* http://softwareispoetry.com
*-----------------------------------------------------------
* This software is distributed under the Apache 2.0 license.
*-----------------------------------------------------------
* File Name : CCBaseTypes.js
* ... | true |
d1272e077d60f1d5fbf5397ebaa0518bed7f56f5 | JavaScript | MJez29/typemoji | /reload-chrome-extension/reload.js | UTF-8 | 1,659 | 2.609375 | 3 | [] | no_license | const ALARM_NAME = "Reload Chrome Extension Alarm";
function reloadExtension(id) {
return new Promise(resolve => {
chrome.management.setEnabled(id, false, (...args) => {
chrome.management.setEnabled(id, true, (...args) => {
resolve();
});
});
});
}
function openPage(id, pageToOpen) {
... | true |