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
26a49535592f38830f4ff281fe82792c5d894b10
JavaScript
Jaytack/codewars-2
/Beta/anagram-or-not.js
UTF-8
434
3.515625
4
[]
no_license
// http://www.codewars.com/kata/anagram-or-not/solutions/javascript/me function isAnagram(test, original){ test = test.replace(/[\W]/g,'').split('').map(v => v.toLowerCase()).join('') original = original.replace(/[\W]/g,'').split('').map(v => v.toLowerCase()).join(''); if (test.length !== original.length) retur...
true
c00dd9582058869e7845da5c24524e86106e87db
JavaScript
grzegorz-s/space-launches
/src/utils/api.js
UTF-8
830
2.78125
3
[]
no_license
import axios from 'axios'; const apiUrl = 'https://launchlibrary.net/1.2' function checkNext(element, index, array) { const launchDate = new Date(element.net).getTime(); const today = new Date().getTime(); if (launchDate > today) { return element; } } export function fetchNextLaunches() { return axio...
true
b76e37827fd8659b6769d15c8e4f3a4983391401
JavaScript
hramirezq/Codegym
/domain/problem/Update.domain.js
UTF-8
1,576
2.71875
3
[]
no_license
const CodegymError = require('../../commons/errors/Codegym') const ProblemRepository = require('../../infrastructure/Problem.repository') const domainProblemUpdate = {} domainProblemUpdate.run = (id, data) => { domainProblemUpdate.validate(id, data) const problem = ProblemRepository.updateProblem(id, data) ...
true
0d6c04015aaa84bf9e2875088aeac50256587b9e
JavaScript
ShanequaSmith/RandomGeneratorWk3
/script.js
UTF-8
2,336
3.703125
4
[]
no_license
// DOM elements const resultEl = document.getElementById('result'); const lengthEl = document.getElementById('length'); const uppercaseEl = document.getElementById('uppercase'); const lowercaseEl = document.getElementById('lowercase'); const numbersEl = document.getElementById('numbers'); const specialEl = docume...
true
f1f39285e3c559b380a623c6416654ae676e2eda
JavaScript
AaronInvernon/JSActivity
/js/index.js
UTF-8
343
3.109375
3
[]
no_license
let btns = document.getElementsByClassName("btn"); let screen = document.getElementById("screen"); function insert(num){ screen.value = screen.value+num } function c(){ screen.value=''; } function equal(){ let operation = screen.value if(operation){ screen.value = eva...
true
2470031db1584478ed572d91a0d6ec631c04de27
JavaScript
TheAlpher/AutoHaven
/public/js/forgotpassword.js
UTF-8
1,413
2.734375
3
[]
no_license
$(".click-me-2").click(function async(event) { // Don't follow the link event.preventDefault(); error = []; // Log the clicked element in the console var x = document.querySelector("#newsletter-email").value; // if(!x) { // error.push('please enter email') // inner // } // <div id="adjad" style=...
true
ec9fa620c67a10b5289bccfc8fcfcfc719817fd1
JavaScript
shal1y/bee-line
/extra/helper.js
UTF-8
1,130
2.921875
3
[ "MIT" ]
permissive
/** file-name : helper.js project-name : bee-line Created by SS Virk on 30 Sep, 2015. */ var helper = { pathToArray: null, hasMatch: false, isParam: false, getArgsAndParams: function(hash, matches) { var i = -1, item, params; while (++i < matches.length) { item = matches[i]; param...
true
e509b01de7cdbfed248eb96a674ece4f13594faf
JavaScript
carloschimal/frontend
/js/view.js
UTF-8
3,555
3.28125
3
[]
no_license
MVC.View = class View { constructor(elem){ this.eventHandler() this.elem = elem } eventHandler(){ document.body.addEventListener("onLoadData", (event) => { this.updateView(event.detail) }) } notify(data){ const onLoadDataEvent = new CustomEvent("onLoadData",{detail:data, bubble...
true
9102d7507dcb423375ab7cbefe0cefae6f32f8fa
JavaScript
gbobo1997/VoltaireTest
/app1/home_Logic.js
UTF-8
9,219
2.609375
3
[]
no_license
var markdown = require( "markdown" ).markdown; fetchGroups(); var span = document.getElementsByClassName("close")[0]; var modal = document.getElementById('myModal'); var currentGroup = 'Home'; span.onclick = function() { modal.style.display = "none"; } window.onclick = function(event) { if (event.target == modal...
true
43f9b8678506f8dd8705d03003f470a2b5ad39f5
JavaScript
barbara456/xupt-food
/static/mock/insert2.js
UTF-8
434
2.875
3
[]
no_license
const fs = require("fs"); let data = JSON.parse(fs.readFileSync("food.json").toString()).data; let w = Object.keys(data.foods).map(item => data.foods[item]).flat(); fs.writeFileSync("food_.json", JSON.stringify(w, null, 4)); console.log(Object.assign({}, ... "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(item => { ...
true
a09129a26c02e7e5b27ac0c744f50874c7cb7ff6
JavaScript
AnnaJanuszewska/Classic-Arcade-Game
/js/app.js
UTF-8
3,715
3.625
4
[]
no_license
/* This work was inspired by MATTHEW CRANFORD "Arcade Game Walkthrough" https://matthewcranford.com/arcade-game-walkthrough-part-6-collisions-win-conditions-and-game-resets/ & Udacity Webinar "FEND P3: Classic Arcade Game Clone walkthrough with Llon" https://www.youtube.com/watch?v=oz7pHJ65...
true
db41156af4e9dde79adc7cc0e1949d8079002dba
JavaScript
dgnsstyles/WebDesignCourse
/javascript/main.js
UTF-8
2,595
4.0625
4
[]
no_license
// alert('el javascript funciona'); /* tipos de Datos: Numeros Strings Arrays Objetos */ // var number1 = '35'; /* var number2 = '75'; */ /* alert('mi numero favorito es '+number1); */ // las únicas elementos que deben estar en una variable son// // numeros, letras, guion bajos, y signo $ // deben ...
true
960424c3ddfc1e88e55e322ac1c035e3eb7e2c07
JavaScript
MaxTheMitchell/chinscooperz-site
/front_end/dynamic/js/game/board.js
UTF-8
2,359
3.546875
4
[]
no_license
class GameBoard { constructor(cellGrid=[]){ this.cellGrid = cellGrid.map(row=>{ return row.map(cell=>{ cell.__proto__ = new Cell cell.content = "" return cell }) }) } display() { let html = "" this._get...
true
f2339a42259b997cd7a83c41bb3fab0a6159431a
JavaScript
plusxp/base-component
/scripts/compile.js
UTF-8
2,393
2.53125
3
[ "MIT" ]
permissive
let suffix = `}));`; function getPrefix(DEFINES, REQUIRES, ROOTS, ARGS, NAME) { return `(function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD define([${DEFINES}], factory); } else if (typeof module === 'object' && module.exports) { // Node / CommonJS ...
true
e878ec71ca1721fa490f9be457ea6b325907bcf5
JavaScript
SmarkSeven/vue-one
/src/store/music.js
UTF-8
2,344
2.5625
3
[]
no_license
// import axios from 'axios'; const music = { state: { musicId: 0, title: undefined, // 文章标题 author: undefined, // 文章作者 musicTitle: undefined, // 音乐名 singer: undefined, // 演唱者 album: undefined, // 专辑 playList: [], // 音乐播放列表 playIndex: -1, // 当前播放项下标 playState: 'pause', // 播放状态 p...
true
950336f0d19692dcc8433d3940622cf8cb01cb6a
JavaScript
kaygeeklaas/react-expensify-app
/src/playground/redux-101.js
UTF-8
2,634
3.4375
3
[]
no_license
import {createStore} from 'redux'; //Action generators- function that return objects /*const IncrementCount=(payload={})=>({ type:'INCREMENT', incrementBy:typeof payload.incrementBy==='number'?payload.incrementBy:1 }) // OR const IncrementCount=({incrementBy})=>({ type:'INC...
true
ec25a4ee931883eafa8c35b0556a9954ecb8ba8a
JavaScript
lupo72/phaser3-typescript-boilerplate
/depreceated/game/actors/Player.js
UTF-8
4,086
2.640625
3
[ "MIT" ]
permissive
class Player extends BaseActor { body; constructor(config) { super(config, "Player"); config.scene.add.existing(this); config.scene.physics.add.existing(this); this.speedX = 150; this.speedY = 200; this.canClimb = false; this.jumping = false; // this.lay...
true
40c2e3723fc0e90340be657c4c934d5d2db01bfe
JavaScript
matthewgil/matthewgil.github.io
/Gil_ Decisiontree.js
UTF-8
2,228
2.96875
3
[]
no_license
var questionNumber = 1; fill(0, 0, 0); text("Do I have my lab coat and goggles?", 50,50); //root node question text("is it in my backpack?", 50,100); text("yes", 75,120); text("no",125,120); fill(122, 1, 1); ellipse(298, 196, 104, 120);//hoodie fill(255, 224, 189); ellipse(302,200,91,100);//head fill(122, 1, 1); r...
true
1814dc8244811cfbb2a12d43af6208aed9382537
JavaScript
softlight0629/iub
/src/cookie/cookie.js
UTF-8
1,175
2.828125
3
[]
no_license
(function() { var doc = document, MILLISECONDS_OF_DAY = 24 * 60 * 60 * 1000, encode = encodeURIComponent, decode = decodeURIComponent; function isNotEmptyString(str) { return typeof str === "string" && str !== ""; } var Cookie = { get: function(name) { var ret, m; if (isNotEmptyString(name)) { ...
true
1ff2d3ef290496ed0f2bea7265ddd5d2bb8053d6
JavaScript
Goldcap/TAHealth
/web/js/.svn/text-base/formvalidate_v6.js.svn-base
UTF-8
22,088
2.796875
3
[ "MIT" ]
permissive
//Pass through function //For legacy Forms var thisValidator = new FormValidator(); function checkForm(validator,theForm) { thisValidator.init( theForm ); thisValidator.checkForm(); if ( thisValidator.debug == 0 ) { return thisValidator.validated; } else { if (thisValidator.debug == 2) { co...
true
67f4d39f5edbaf0ea33e938fb10041f0f9e37910
JavaScript
likenhp/Algorithms
/practice.js
UTF-8
5,615
4.21875
4
[]
no_license
/* Input: "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. */ var lengthOfLongestSubstring = function(s) { let start = 0 let max = 0 let container = {} for (let index = 0; index < s.length; index++) { if (container[s[index]]) { // empty the container container = ...
true
bc08d6b0297cba57e87f1574433733eef663dcd5
JavaScript
SanjithaPraba/PeacePlannerV2
/all_screens/AsyncTestScreen/AsyncTestScreen.js
UTF-8
2,636
2.59375
3
[]
no_license
import React, { Component } from "react"; import { StyleSheet, View, Text, ScrollView, TouchableOpacity, Touchable, TextInput } from "react-native"; import AsyncStorage from '@react-native-async-storage/async-storage'; const STORAGE_KEY = '@save_name' //link for reference: https://heartbeat.fritz.ai/building-offline-...
true
78a3d994f84f931b05cda6f187e4df1c714d13b4
JavaScript
goodhood-eu/i18n-modular
/lib/sync.js
UTF-8
3,829
2.625
3
[ "MIT" ]
permissive
const fs = require('fs'); const path = require('path'); const escapeRegex = require('escape-string-regexp'); const { debug, getModuleId, getDictionaryRegex, getLanguage, getCleanSeed, getCleanGenerated, getSortedObject, getDeepSortedObject, } = require('./utils'); const getFiles = (dirPath, regex...
true
88aaea629fffd656fd25f3c57ba6d4a35af0c232
JavaScript
danielrussellLA/toyProblems
/islandsCount.js
UTF-8
2,153
4.15625
4
[]
no_license
// Given a string representation of a 2d map, return the number of islands // in the map. Land spaces are denoted by a zero, while water is denoted by a dot. // Two land spaces are considered connected if they are adjacent (but not diagonal). // (!!!) NOTICE: Newline characters in the inputs have been replaced with ...
true
5e92d738a94ae14edd17f0ec3a5a5d8c968ca17c
JavaScript
karlkire/Eesrakendus
/clock.js
UTF-8
603
2.875
3
[]
no_license
// Avalikud muutujad let clockContainer // = null window.onload = function () { init() } .flip-clock-wrapper ul { position: relative; float: left; margin: 5px; width: 20px; height: 30px; font-size: 27px; font-weight: bold; line-height: 29px; border-radius: 6px; background: #000;...
true
29f7007b2f901a433dd05bfac226ce0293980335
JavaScript
gregbrunk/tic-tac-toe
/js/tic-tac-toe.js
UTF-8
3,563
3.84375
4
[]
no_license
//This allows the JS to load AFTER the DOM has loaded. window.onload = function(){ var body = document.querySelector('body'); var playerTurnHeadline = body.querySelector('#playerText'); var turn = 0; var globalGameBoard = []; function Board() { this.gameBoard = []; this.resetButton = body.querySelector('.res...
true
09107ecb5c14d51624328d0a16a8f6fee2dfaf26
JavaScript
yasuhiro-okada-aktsk/sample_phoenix_react
/web/static/js/rest/components/auth/SignUp.jsx
UTF-8
1,930
2.515625
3
[ "MIT" ]
permissive
import React, { Component, PropTypes } from 'react'; export default class SignUp extends React.Component { constructor(props) { super(props); } handleSubmit(e) { e.preventDefault(); var name = this.refs.name.value.trim(); var email = this.refs.email.value.trim(); var password = this.refs.pas...
true
a5de58ca44ee63ac85d38e3109ea9c753cb3d74d
JavaScript
cikay/Tamerlane-Chess-VanillaJs
/js/makeMove.js
UTF-8
21,147
2.96875
3
[]
no_license
/*ClearPiece fonksiyonu, hamle yapan taşın hamle yapmadan önce bulunduğu kareyi ve oyundan alınan taşın bulunduğu kareyi boşaltır.*/ function ClearPiece(sq) { /* sq karesindeki taş pce değişkenine atanır.*/ var pce=GameBoard.pieces[sq]; var index; var t_pceNum=-1; HASH_PCE(pce,sq); /*sq kare...
true
3310a238577e4147721552f0cce5f6836a8a47a5
JavaScript
aguaviva/myTensorflow
/src/ConvHelpers.js
UTF-8
758
2.921875
3
[]
no_license
function ReverseKernel1D(kernel) { return kernel.slice().reverse(); } function Add1DPaddingMat(input) { var b = input.slice(0); b.unshift(Array(input[0].length).fill(0)); b.push(Array(input[0].length).fill(0)); return b; } function Conv1DInputForward(nonPaddedInput, weights, bias, padding) { v...
true
0f11aa9701e1c27885d52f61860875dfd18357c4
JavaScript
frostdog1/alpha-better-cw
/client/src/screens/HomeScreen.js
UTF-8
2,084
2.71875
3
[]
no_license
import "./HomeScreen.css"; import { useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; // Components import Product from "../components/Product"; // import the product actions to allow for displaying the data import { getProducts as listProducts } from "../redux/actions/productActions";...
true
31d87fa00110ab5b5cb45a1380bc3cf5a5d2e88f
JavaScript
the-cc-dev/assertthat
/dist/constraints/null.js
UTF-8
449
2.578125
3
[ "MIT" ]
permissive
'use strict'; var cmp = require('comparejs'); var fail = require('../fail'); var isNull = function isNull(actual) { return function () { if (cmp.eq(actual, null)) { return; } fail('Expected %s to be null.', [actual]); }; }; isNull.negated = function (actual) { return function () { if (!...
true
47714895f334e0ccee479332acd61daa42ff2b25
JavaScript
FredericBriolet/fredericbriolet.github.io
/js/script.js
UTF-8
11,434
2.53125
3
[]
no_license
var renderer, canvas, camera, scene, rayCaster, mouseClickPosition; var monoliths = [], monolithMeshes, clock; var rotationX = rotationY = 0; var mouseOver = false; const lerp = .03; const lerp2 = .1; let screenWidth, screenHeight; let audioManager = null; let meshesRotation = 0; let meshesRotationTarget = 0; let useO...
true
7fa9ef0c3a1941c3a92379f517718a78c79afa8c
JavaScript
cenfochocolate/proyecto
/public/js/controlador_actualizar_perfil_padre.js
UTF-8
4,904
2.609375
3
[]
no_license
'use strict'; const id_usuario = sessionStorage.getItem('idu'); const input_nombre = document.querySelector('#txt_nombre'); const input_url_foto=document.querySelector('#previewimg'); const input_papellido= document.querySelector('#papellido'); const input_sapellido = document.querySelector('#sapellido'); const input...
true
4723407fa3b8bbd905c141bd57edf04a9c9d1daf
JavaScript
Fnafe/wsei
/js/events.js
UTF-8
3,171
3.28125
3
[]
no_license
var elementsCounter = 0; var rowTemplate = document.querySelector("#first_row").cloneNode(true); var objContainer = document.querySelector("#newObjContainter"); var inputField = document.querySelector("#todo_input_text_field"); var selectedRow; function AddNewElement(){ var fontelloIcon = document.createElement("i"...
true
ce9cd3e25a8e8aae7e500b33a10f957e12e05a61
JavaScript
gsyan888/html5_fun
/html5_charades/question-set-2.js
UTF-8
2,031
2.65625
3
[]
no_license
//======================================================= // HTML5 Carades 題庫設定檔 //======================================================= //------------------------------ //計時器時間選項 // 最多可以設三個時間選項 //------------------------------ timer_items = '60, 90, 120'; //------------------------------ //出題時是否要以亂數來選題 // true ...
true
f715019ab1cbe6de53256b96bf248b9fe771e743
JavaScript
z1tta/AvatroBot
/src/events/logs/emojiUpdate.js
UTF-8
709
2.5625
3
[]
no_license
const { MessageEmbed } = require("discord.js"); module.exports = async (client, oldEmoji, newEmoji) => { if (client.isEnabled("logs", oldEmoji.guild) == false) return; if (client.eventEnabled("emojiUpdate", oldEmoji.guild) == false) return; const logChannel = await client.logChannel(oldEmoji.guild); const embe...
true
e902700ad5f657f61e73567d2179794cd006b578
JavaScript
nkiateam/polestar-utils
/src/DateUtil.js
UTF-8
1,001
3.078125
3
[ "MIT" ]
permissive
const zerofill = (n, digits) => { let zero = ''; let sn = n.toString(); if (sn.length < digits) { for (let i = 0; i < digits - sn.length; i++) { zero += '0'; } } return zero + sn; }; export const getDateToString = (date) => { const year = date.getFullYear(); co...
true
0911ca9bdbf82cbffa21133fc8a2579ab2814128
JavaScript
Nunez350/React_Redux
/Javascript_Rohan/Ch03/JavaScript/position-in-dom.js
UTF-8
2,970
3.359375
3
[]
no_license
function processDOM() { /* * Notice that the elements logged to the console are "live", so they will * adopt the classes even though they are logged before the classes are applied */ var output = '<table><tr><th>Item</th><th>Value</th></tr>'; var element = document.getElementById('this_one'...
true
8c9cbb5f1c7bd670923f5af8ed505b0651cdf608
JavaScript
raphamatsu/temperatura
/script.js
UTF-8
172
2.859375
3
[]
no_license
function calcular(temp) { temp = document.getElementById("celsius").value temp = ((temp * (9/5)) + 32) document.getElementById("fahr").value = `${temp}` }
true
bcfc617238e2d6281e645885f7770758e0b910ff
JavaScript
ChaseHo/Vue-bookStore-frontEnd
/src/store/modules/category.js
UTF-8
3,531
2.796875
3
[]
no_license
import * as types from '../mutation_types' import axios from 'axios' const state = { categories: [], books: { computer: Array, history: Array, literature: Array, economics: Array }, allBooks: [] } const mutations = { [types.RECEIVE_CATEGORIES] (state, data) { state.categories = data.cat...
true
963bafd530e20df393e16056c4172e25536cefdb
JavaScript
ademardiazcr/TAVO2021VUE
/Mensajeria/resources/js/Request.js
UTF-8
13,428
2.65625
3
[ "MIT" ]
permissive
function addParametro( parametros, parametro, valor, valor2, operador, Ndata ) { xmlParm = null; if (operador=="" && Ndata == 0) { parametros =parametros+ "<ParamItem>" + String.fromCharCode...
true
4d508a819eda79fd47a79b7a19a899fc4b3b2e27
JavaScript
doanhuyc/Learning-Javascript-Node.js
/JavaScript/Object.js
UTF-8
1,500
4.28125
4
[]
no_license
/*Author : Huy Cuong Doan Date : August 25 2017 Role: Object in JS*/ //create literal Object var person1 = { firstName: "Huy Cuong", lastName: "Doan", age: 25, getFullName: function(){ return this.firstName+" "+this.lastName; }, address:{ phone:"5145032969", email:"hcuong.doan@gmail.com", street:"Saint F...
true
a0fe29551cfbed1b0aa072ddaf6616b961c65931
JavaScript
Louis-yes/plateup
/api.js
UTF-8
1,011
2.640625
3
[]
no_license
const app = require('express')() const sources = require('./sources/sources').list app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); res.header("Access-Control-Allow-Credentials", "true")...
true
82a38c771a7e95f0a53a4b4eaa6a07e6927ade4c
JavaScript
tcurley42/js-basics-functions-lab-online-web-sp-000
/index.js
UTF-8
681
3.546875
4
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
// Code your solution in this file! function distanceFromHqInBlocks(blocks) { return Math.abs(42-blocks); } function distanceFromHqInFeet(blocks) { return Math.abs(42-blocks)*264; } function distanceTravelledInFeet(block1, block2) { return Math.abs(block1-block2)*264; } function calculatesFarePrice(start, dest...
true
4b67587a3b2321effdc15b4880e7d1175e511ee2
JavaScript
okayshankha/a-star-algorithm
/sketch.js
UTF-8
2,467
2.859375
3
[]
no_license
var canvasW = 600; var canvasH = 600; var rows = 100; var cols = 100; var current, currentIndex; var start = [0, 0]; var end = [rows - 1, cols - 1]; var tentative_gScore; var neighbour; var grid = new Array(rows); var OpenSet = new Array(); var ClosedSet = new Array(); function setup() { //frameRate(1); cr...
true
b73f1c9202ac73c382071654cbcd51c3a0b6809e
JavaScript
lalbricenov/thermodynamic_cycles
/auxiliary.js
UTF-8
641
2.984375
3
[]
no_license
var absWidth = 1280; var absHeight = 720; //transformation between systems of reference function rToAbs(real){ return [absWidth*real[0]/width,absHeight*real[1]/height]; } function absToR(abstract){ return [width*abstract[0]/absWidth,height*abstract[1]/absHeight]; } function absToY(absY){ return heig...
true
eb7e506ae51a5cbd2e8fc2bb8ac4037a916dc15d
JavaScript
dglsrbrown/Bootstrap_Deconstructed
/app.js
UTF-8
742
2.921875
3
[]
no_license
/* Dynamic Tab */ let path = window.location.pathname; let page = path.split('/').pop(); let tabDisplayName = document.querySelector("#current"); function checkTab() { switch (page) { case "index.html": tabDisplayName.innerHTML = "Home"; break; case "grid.html": ...
true
7c09d643c69432cdfadbc6083e1da4885926b55a
JavaScript
dannycalleri/polytron
/src/layout/info/Info.jsx
UTF-8
804
2.53125
3
[]
no_license
import React from 'react'; import './Info.css'; export default function Info(props){ const classes = []; classes.push('info'); if(props.alignTop){ classes.push('info--top'); } if(props.alignBottom){ classes.push('info--bottom'); } if(props.modifier){ classes.push(`info--${props.modifier}`)...
true
1515d8586dd9e2cb1b9d81e5b96126c2624bd980
JavaScript
syalbee/penjualan
/assets/js/unminify/dashboard.js
UTF-8
788
2.6875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// console.log(stok_hariUrl); function getDays() { let now = new Date(), bulan = now.getMonth() + 1, tahun = now.getFullYear(), hari = new Date(tahun, bulan, 0).getDate(), totalHari = []; for (var o = 0; o <= hari; o++) { totalHari.push(o); } return totalHari; } $.ajax({ url: transaksi_hariUrl, type: "...
true
2869377787849d59452bd35494caf9483a53d861
JavaScript
Manuel28G/Canvas-Paint
/Js/Circle.js
UTF-8
1,467
3.390625
3
[ "MIT" ]
permissive
function ReturnRadius(x1,x2,y1,y2){ d=Math.sqrt( Math.pow((x2-=x1),2) + Math.pow((y2-=y1),2) ); r=d/2; return r; } function ReturnCenter(x1,x2,y1,y2){ Xnueva=(x1 + x2) /2; Ynueva=(y1 + y2)/2; return [Xnueva,Ynueva]; } function DrawHTML5Circle(centerX,centerY,radius,color){ context.beginPath(); co...
true
0cbae9f3074ad9027d48b165e1090d40602fa11e
JavaScript
Querelle/js-html-css-revolut
/js/script.js
UTF-8
695
2.84375
3
[]
no_license
$(document).ready( function() { // mostrare dropdown $('.hover').mouseenter( function() { $(this).children('.dropdown-container').show(); }); // nascondere dropdown $('.hover').mouseleave( function() { $(this).children('.dropdown-container').hide(); }); /...
true
c92e73428c56bb361a5ad9548d3f69c09c4f6825
JavaScript
Grit03/Record.
/JS/toDo.js
UTF-8
1,325
2.984375
3
[]
no_license
const toDo__box = document.querySelector(".toDo__box"); const toDo__text = document.querySelector(".toDo__text"); const toDo__category = document.querySelector(".category__text"); const dropdownIcon = document.querySelector(".fa-caret-down"); const toDo__category__list = document.querySelector(".category__text__list");...
true
e31f22e7d1e13a343132e261057ca06b93ba6ef7
JavaScript
llos-inc/lltools
/characters/characterPUTHandler.js
UTF-8
2,157
3
3
[]
no_license
/* ** CharacterPUTHandler -- handles PUT (update) requests from the database */ // Require statements const mongoose = require("mongoose"); const Joi = require("joi"); // Character model -- db schema already defined in DBModule const Character = mongoose.model("Character"); // Character validation schema ...
true
86f2bc4b07de8bc36744d931f29655df4becaac6
JavaScript
Jenniferrmuniz/lab-react-ironnutrition
/starter-code/src/components/TodaysFood.jsx
UTF-8
1,210
2.828125
3
[]
no_license
import React, { Component } from 'react' class TodaysFood extends Component { // state = { // foodList: <li></li> // } // calculateTotal = () => { // let total = 0; // for(let i=0; i<this.props.foodList; i++){ // if(this.props.foodList.quantity){ // ...
true
9f5edf9a8050043da09e50792ded768c149d17dd
JavaScript
commercetools/ui-kit
/packages/components/inputs/rich-text-utils/src/localized/localized.spec.js
UTF-8
3,106
2.828125
3
[ "MIT" ]
permissive
import { createLocalizedString, isEmpty, omitEmptyTranslations, } from './localized'; const emptyValue = ''; describe('createLocalizedString', () => { describe('when existingTranslations is not passed', () => { it('should properly initializeValue', () => { expect(createLocalizedString(['en', 'de']))...
true
66e7f03453ab6f64397e5c999e4485dff8f2b367
JavaScript
grjyoshna/CheckYourBudget
/app.js
UTF-8
9,498
2.6875
3
[]
no_license
var budgetController = (function(){ var Expense=function(id,description,value) { this.id=id; this.description=description; this.value=value; this.percentage=-1; }; Expense.prototype.calPercentage=function(totalIncome){ if(totalIncome>0) { this.percentage=Math.round((this.value/totalIncome)*100); ...
true
9f09cc245331ae6c3ac9288c6dfd74784f886b90
JavaScript
j0u135/adnwebmx
/src/main/webapp/js/cargaArchivoCsvUsu.js
UTF-8
14,216
2.625
3
[ "MIT" ]
permissive
/** * Funciones para el jsp CargaArchivoCsv.jsp */ var fecha = new Date(); var anioActual = fecha.getFullYear(); var mesActual = fecha.getMonth(); //Lo regresa en número iniciando en 0 pera enero var arrUsers; var arrIndiNomAnioUser; var archConErr = false; var selArch = false; var contEne = 0; var contFeb = 0; var c...
true
9fa452f76cd554a217cccfba33f9dd8e8b560d4c
JavaScript
ITliuxiangyu/nodeCourse
/node/node06/code1/nodeAndMongodb.js
UTF-8
4,064
2.90625
3
[]
no_license
var mongodb = require('mongodb'); // 设置数据库信息, 连接数据库 // 第一个参数: 主机 // 第二个参数: 端口号 // 第三个参数: auto_reconnect 自动连接 var mongoServer = new mongodb.Server('localhost', 27017, {auto_reconnect: true}); // 创建数据库对象 // safe: 是否使用线程安全 (当多个线程同时访问数据库时会有线程安全问题) var db = new mongodb.Db('stu', mongoServer, {safe: true}); // 打开数据库 db.ope...
true
6f56e01dbb0fd4453ccaa81fbe7abafd7ed4a616
JavaScript
xiaotianxia/demos-2017
/星级打分/starScore.js
UTF-8
1,379
2.984375
3
[]
no_license
function StarScore(conf) { this.config = { container: '', starClass: 's-star', ativeStarClass: 's-star_active', onClick: function() {} }; this.index = 0; this.isClicked = false; this.config = $.extend(this.config, conf); this.$container = this.config.contain...
true
1b046ec9b22e8731ffaa8651af0c252e0ac4b6bc
JavaScript
Marquets/Practicas-DVI
/P3/practica3.js
UTF-8
16,283
2.609375
3
[]
no_license
var game = function() { // Set up an instance of the Quintus engine and include // the Sprites, Scenes, Input and 2D module. The 2D module // includes the `TileLayer` class as well as the `2d` componet. var Q = window.Q = Quintus() .include("Sprites, Scenes, Input, 2D, Anim, Touch, UI, TMX, Audio") // Maximize ...
true
e1a363ed4d2ce6e5cef0141373d898db63b3f40c
JavaScript
AlexanderHMagno/portfolio
/Recursos/Js/objects.js
UTF-8
8,719
2.65625
3
[]
no_license
quotes = { 'cheerful': [{ author: "—George Matthew Adams", quotes: "I say to myself that I shall try to make my life like an open fireplace, so that people may be warmed and cheered by it and so go out themselves to warm and cheer." }, { author: "—Orison Swett Marden", quotes: "It is the hopeful, buoyant, chee...
true
713d1a25514cd3427cfba36d9958e07b6a8ff24a
JavaScript
TimAaronSharp/fall-gregs-list
/public/app/components/computers/computer-service.js
UTF-8
2,127
2.84375
3
[]
no_license
function ComputerService(){ var baseUrl = 'http://localhost:5000/api/computers' var computers = [] function logError(err){ console.error(err) } function Computer(config){ this.title = config.title.value, this.cpu = config.cpu.value, this.ram = config.ram.v...
true
be04747c156a74d11509f080a0b32fda2cb2e9cc
JavaScript
taichi0514/googleCalendarNotification
/index.js
UTF-8
1,503
2.515625
3
[ "MIT" ]
permissive
function eventCheck1() { var date = new Date(); var endDate = new Date(Date.parse(date) + 1000 * 60 * 60 * 24 * 1); Logger.log("now:" + date); Logger.log("endDate:" + endDate); var events = CalendarApp.getDefaultCalendar().getEventsForDay(date); for (var i in events) { var title = events[i].getTitle(); ...
true
5920a6ad0d2733b680dd41b77ae24651d2f8e7dc
JavaScript
brocahontaz/codesnippet-platform
/src/controllers/snippetController.js
UTF-8
5,219
2.71875
3
[]
no_license
/** * Snippet controller * * @author Johan Andersson * @version 1.0 */ 'use strict' const Snippet = require('../models/snippet') const snippetController = {} /** * Snippet index, redirect back. * * @param {object} req the Express request object * @param {object} res the express response object */ snippetC...
true
965b87dc665f5e42b875c9ffb644a203527375cd
JavaScript
google-code/awfmootools
/fadeAnim.js
UTF-8
1,486
2.625
3
[]
no_license
/** * @author Arian Stolwijk */ var fadeAnim = new Class({ Implements: Options, options: { duration: 250, max: 0.8, min: 0.2 }, initialize: function(elmt,options){ this.elmt = document.id(elmt); this.setOptions(options); this.elmt.set('tween',{duration:this.options.duration...
true
fc516ba8037ddd6bfc060f7099fcf77a5ffeb754
JavaScript
HamzaGhaziani/myapp
/src/Input.jsx
UTF-8
726
2.921875
3
[]
no_license
import React, {useState} from 'react'; function InputBox() { let[email, setEmail] = useState(""); let[passowrd, setPassword] = useState(""); console.log(email,passowrd); return ( <div> <input className="User Name" type="text" value= {email} onChange={ (even...
true
9a23c22c6f998b79b2960772c07aafb4b5f1289c
JavaScript
AndreTheHunter/coding-test-2016
/lib/TrafficLight.js
UTF-8
937
3.078125
3
[ "MIT" ]
permissive
function TrafficLight(name, colour) { this.name = name //TODO add colour name validation this.colour = colour this.startGreen = colour === 'green' } //time (minutes) between light changes TrafficLight.INTERVAL = 5 //sets the colour of a light at a specific time TrafficLight.prototype.changeColour = function chang...
true
bbcedf89dce3f23b38405f85c9eb6b3be814f542
JavaScript
acoullandreau/cv_website
/scripts.js
UTF-8
4,938
2.609375
3
[]
no_license
page_correspondance = { 0:'home', 1:'introduction', 2:'contact_form', 3:'testimony', 4:'exp_pro', 5:'skills', 6:'achievements', 7:'exp_pers', 8:'education', 9:'passions' } nav_bar_correspondance = { 0:'nav-bar-presentation', 1:'nav-bar-temoignages', 2:'nav-bar-exp-pro', 3:'nav-bar-competences', 4:'nav-b...
true
ad1e9526106dff2a2aa39480ecda2bc5b20dd0c7
JavaScript
linuxboss182/WOTS
/api/yelp.js
UTF-8
1,743
2.75
3
[]
no_license
/** * Created by jtgaulin on 3/26/18. */ YELP_API_KEY = "r8KrGCJBLtuOlFc5tVjy_wsGdxm7fmKfq7GaLIAfpMzevLOOmjd7rv0z8Y4m_uGL_vq0hUaZBzgxXzwWS4GpcirIPLKzjmXkfAVUWqHHfbMDxGnegJD84L7YUdqyWnYx"; const fusion = require('yelp-fusion'); var yelp = function () { yelp.client = fusion.client(YELP_API_KEY); }; yelp.se...
true
fb2f266ee023be456a2c5d188e09b0647b7625aa
JavaScript
aahoo/fold
/app/elements/micro/x-card.js
UTF-8
597
2.5625
3
[]
no_license
/** `x-cards` is a basic wrapper to create cards. The intro text after fresh installation is made using this element and configured using the default json model. */ Polymer({ is: 'x-card', extends: 'div', hostAttributes: { class: 'card li relative', draggable: 'true', }, attached() { if(this.mod...
true
e58db00d4a3efd484ddfe110aa44fe821d2a59ae
JavaScript
SleepyOcean/ocean-lab
/src/utils/util.js
UTF-8
4,756
2.890625
3
[]
no_license
import Config from "./config"; import axios from "./axios"; let util = {}; util.objectToMap = function(obj) { let map = new Map(); for (let o of Object.keys(obj)) { map.set(o, obj[o]); } return map; }; util.jsonToMap = function(jsonstr) { return this.objectToMap(JSON.parse(jsonstr)); }; util.parseJson = functi...
true
734fd61bc38ca899a65c18407b314a4ed8857556
JavaScript
Rodeeo/Rodeeo.github.io
/otherWork/aperionlookup.js
UTF-8
3,156
2.640625
3
[]
no_license
$(function () { // Mask user input $('#infoNumber').mask('000-000-0000'); $('#infoLookup').click(function () { var captcha_response = grecaptcha.getResponse(); if (captcha_response.length === 0) { alert('Please complete captcha'); return; } grecaptc...
true
9905eef2ca889e1d12bbffe52b87fd265739153d
JavaScript
zyjack/album
/web/WEB-INF/static/js/menu.js
UTF-8
2,465
2.515625
3
[ "MIT" ]
permissive
/** * Created by 墨盒 on 2017/8/16. * 上下文菜单js */ function loadMenu(data) { $(data.owner).on('mouseover', function () { var $this = $(this); if ($this.find('.plus').length > 0) { } else { $this.css('position', 'relative') .append($('<img src="http://...
true
1aea88afda5768e266631a4c856bd26c2d087b06
JavaScript
2gnc/alrorythms-js-implementation
/src/other/05-reverse-words.js
UTF-8
314
3.453125
3
[]
no_license
const reverseWords = str => { const wordsArr = str.split(' '); const reversedArr = wordsArr.map(word => { let newWord = ''; for (let i = word.length - 1; i >= 0; i--) { newWord += word[i]; } return newWord; }); return reversedArr.join(' '); }; module.exports = reverseWords; // O(n)
true
76623db92bd680f7a53d7a4fdac2d8e345b90415
JavaScript
Marklongchamps/PRSET_CODES
/CODE_PRESENTS/javaScript_Presets.js
UTF-8
353
2.875
3
[]
no_license
import React from "react" const QuestForm = (props) => { return( <h1>hello</h1> ) } export default QuestForm //need dummy text in line six or it will not work. array = ["This website is for losers LOL!"] function disemvowel(str) { var string = array.map(x => x.replace(/[aeiouAEIOU]/g, '')); retur...
true
c4e05f8589972f187065e8f0b7d4a9103327beb1
JavaScript
jfeng702/JS-Exercises
/rotate.js
UTF-8
508
4.0625
4
[]
no_license
// Given input let matrix1 = [ [1,2,3], [4,5,6], [7,8,9] ]; // // rotate the input matrix in-place such that it becomes: // [ // [7,4,1], // [8,5,2], // [9,6,3] // ] function rotate(matrix) { for (let row = 0; row < matrix.length; row++) { for (let col = 0; col < matrix.length; col++) { matrix[...
true
ed08350eb523ccae180f815ae7de702417604b3a
JavaScript
vnim94/entertainment
/src/content.js
UTF-8
632
3.0625
3
[]
no_license
const content = document.querySelector('#content'); export const loadContent = (data) => { let card; let img; data.forEach(item => { card = document.createElement('a'); card.type = "image"; card.classList.add('card'); card.href = item.link; img = document...
true
6ca318d4ad7dfbc67d358a702cdd5f3d2add0406
JavaScript
ModestYjx/GFLMiniProgram
/client/src/packageTask/pages/task_schedule/layer/index.js
UTF-8
859
2.890625
3
[ "Apache-2.0" ]
permissive
import * as tfc from '@tensorflow/tfjs-core'; import * as tfl from '@tensorflow/tfjs-layers'; export default async() => { // A sequential model is a container which you can add layers to. const model = tfl.sequential(); // Add a dense layer with 1 output unit. model.add(tfl.layers.dense({units: 1, in...
true
01413b6c18c6de0294c99b4f8868562a792034b6
JavaScript
justinhunt/moodle-filter_poodll
/amd/src/pollyhelper.js
UTF-8
12,576
2.53125
3
[]
no_license
/* jshint ignore:start */ define(['jquery', 'core/log'], function ($, log) { "use strict"; // jshint ;_; log.debug('Polly Helper: initialising'); return { sentenceURLs: [], sentencetexts: [], wordstarts: [], wordcounts: [], textblock: false, textstring: fal...
true
5849029855ca040231e063ebd6c0c8d64394a624
JavaScript
Watemlifts/desktopiq
/packages/app/src/Application.js
UTF-8
6,275
2.890625
3
[ "MIT" ]
permissive
import { Container } from '@pixi/display'; import { autoDetectRenderer } from '@pixi/core'; /** * Convenience class to create a new PIXI application. * * This class automatically creates the renderer, ticker and root container. * * @example * // Create the application * const app = new PIXI.Application(); * *...
true
6194df7d28793695c97e0a3862dd899256342e11
JavaScript
nathanhood/drills3
/app/js/es6/a8.es6.js
UTF-8
1,581
3.09375
3
[]
no_license
/* global _:true */ /* jshint unused:false */ /* global moment:true */ /* jshint camelcase:false */ /* global AmCharts:true */ (function(){ 'use strict'; $('document').ready(init); function init(){ $('#block').click(block); $('#default').click(defparams); $('#rest').click(rest); $('#spread').cl...
true
543462f905df8d7100ab8ecddeae332501924151
JavaScript
damimonge98/nodeployment
/src/routes/modules/modules.js
UTF-8
3,069
2.625
3
[]
no_license
const express = require('express'); const router = express.Router(); const Module = require('../../models/module'); const Lecture = require("../../models/lecture"); const Video = require("../../models/video"); //--------------------Get all modules-------------------- //ordenar modulo por orden; router.get('/', async ...
true
e21790857394e4c93e773aa063632031d56958d0
JavaScript
john-m-spens/GunTracingVisualization
/WebContent/js/tracemap.js
UTF-8
10,172
2.78125
3
[]
no_license
/** * */ var path; var svg; var g; var gunTraceData; var gunTraceList = new Array(50); var currentWidth; var currentHeight; /******* displayMap - Loads map shapes and gun data from JSON files and displays the map width, height - size (in pixels) of the displayed map. Width is the important parameter due to the c...
true
03599a068e02ee3103f14bb580db715f76d924d8
JavaScript
gridsane/micropul
/test/utils/index_test.js
UTF-8
557
2.6875
3
[]
no_license
import * as utils from '../../src/utils'; describe('Utils', () => { it('gets array element by rotated index', () => { expect(utils.atIndex([1, 2], -3)).toBe(2); expect(utils.atIndex([1, 2], -2)).toBe(1); expect(utils.atIndex([1, 2], -1)).toBe(2); expect(utils.atIndex([1, 2], 0)).toBe(1); expect(u...
true
f5c92c4cc7aba7ce0180122a6f2edc63af2bd011
JavaScript
ASO1501012/FamiLyist
/www/class/ListManager.js
UTF-8
2,075
2.578125
3
[ "MIT" ]
permissive
document.write('<script type="text/javascript" language="JavaScript" src="class/Connect.js"></script>'); document.write('<script type="text/javascript" language="JavaScript" src="class/LocalDBManager.js"></script>'); //クラス名『ListManager』を定義 ListManager = function(){} ListManager.prototype.getGoodsList = functio...
true
a5bedfdf4694a83335932f530eacb4464831a419
JavaScript
Sarsum/PasteServer-dockerized
/storage/fileStorage.js
UTF-8
4,027
2.703125
3
[ "MIT" ]
permissive
const config = require("../config"); const fs = require("fs"); const crypto = require("crypto"); class FileStorage { async prepare(storageConfig) { this.path = storageConfig.path; if (!fs.existsSync(this.path)) { fs.mkdir(this.path, error => { if (error) ...
true
30dcfd27053a31afbdf5295396e34625ba8e7179
JavaScript
romarioarruda/cod3r-cursos
/node/moduloClient.js
UTF-8
180
2.625
3
[]
no_license
//Modo de import Commons.js const modA = require('./moduloA') const modB = require('./moduloB') console.log(`Módulo A: ${modA.ola}`) console.log(`Módulo B: ${modB.hello()}`)
true
998c3e8c24c7c5afccf5b3fa55dd2a3c11938b37
JavaScript
Ramya-Geethika/lotide
/middle.js
UTF-8
452
2.84375
3
[]
no_license
const eqArrays = require('./eqArrays.js'); const middle = function(array) { let mid = 0; let result = []; let size = array.length; if (size <= 2) { return []; } if (size % 2 !== 0) { mid = array[Math.floor(size/2)]; result [0] = mid; return result; } if (size % 2 === 0) { mid = size...
true
d9b15da785acfc12b585b345b2c2d90fbe765956
JavaScript
mikehn/ReactWorkshop
/src/components/Modal.jsx
UTF-8
2,535
2.515625
3
[ "MIT" ]
permissive
import React, { useRef, useEffect, useState } from "react"; import { createPortal } from "react-dom"; import userPlaceHolder from "../assets/userPlaceHolder.png"; /** * A correct way to do a modal, with separate dome element * */ function M({ children, isOpen }) { const [elem, setElem] = useState(null); useEff...
true
312ec7e84ac885bd456931a513b79ee3ded35ea9
JavaScript
MoophHD/js-challenges
/checkio/the_stone_wall.js
UTF-8
668
3.53125
4
[]
no_license
// https://js.checkio.org/mission/the-stone-wall function stoneWall(wall) { let horizontalWall = []; wall = wall.split("\n"); for (let i = 0; i < wall.length; i++) { let row = wall[i]; for (let j = 0; j < row.length; j++) { if (!horizontalWall[j]) horizontalWall[j] = ''; ...
true
7e86b483933aa465fe9997d61052c2db5367a925
JavaScript
purohitankit/GridComponent
/src/GridComponent.js
UTF-8
1,784
2.546875
3
[]
no_license
import React from 'react'; import './GridComponent.css' import Popup from "reactjs-popup"; var tableTD = []; var tableTR = []; var arrTH = []; var arrTR = []; function getHeaders(lst, arrTH, arrTR) { for (var i in lst) { var val = lst[i]; for (var j in val) { var sub_key = j; ...
true
c01b6b37d1cac803c36e296ce5485d6ae8f19f3e
JavaScript
carlanlinux/DWEC
/EjerciciosMayo/5_IndexedDB.js
UTF-8
16,763
3.140625
3
[]
no_license
//Creamos una variable donde guardaremos la base de datos. let db; //Seleccionamos la tabla sobre la que se van a montar los datos usando su etiqueta const tablaDatos = document.getElementById('tbody'); const campos = document.getElementsByTagName("input"); window.onload = function () { document.getElementById("ab...
true
fcd8c1908fce761d02f678c22f39e86113a429c0
JavaScript
tymiles003/dispatch
/app/scripts/filters/date.filter.js
UTF-8
253
2.53125
3
[]
no_license
(function(){ 'use strict'; function asDate(){ return function(raw) { if(raw === null) { return new Date(); } return new Date(raw); }; } angular .module('dispatchApp') .filter('asDate', asDate); })();
true
f85f16f12c2fa84a51ae67552a99d5f716e3ba8b
JavaScript
ivanshcherbyna/js-spa-contact-list-app
/src/app.js
UTF-8
1,347
2.546875
3
[]
no_license
'use strict'; import { isValid, openAuthModal, addButtonsListener } from './utils'; import { Contacts } from './Contacts'; import './styles.scss'; console.log('%c App is working', 'color:green'); window.addEventListener('load', Contacts.renderContacts); const form = document.querySelector('#submit-form'); const name...
true
e108f1cad40242035ac5d7243d6767c205a89230
JavaScript
nTodorovski/Code-Wars
/Get the Middle Character/script.js
UTF-8
258
3.171875
3
[]
no_license
function getMiddle(s){ let arr = s.split(""); if(arr.length % 2 === 0){ return arr[Math.floor((arr.length-1)/2)]+arr[(Math.floor((arr.length-1)/2)+1)]; } else if(arr.length % 2 === 1){ return arr[(arr.length-1)/2]; } }
true
0f9e07fad9b3473d20e68b28897f663dddfd8fd6
JavaScript
wangkalbi-gernessen/algorithm_practices
/bit/findTheDifference.js
UTF-8
397
3.59375
4
[]
no_license
'use strict'; /** * @param {string} s * @param {string} t * @return {character} */ const findTheDifference = function(s, t) { let str = ""; for(let i = 0; i <= t.length - 1; i++){ if(t[i] !== s[i]){ str += t[i]; } } return str; }; console.log(findTheDifference("abcd", "abcde")); console.l...
true
5a365f62dfec910cc78a177509a383c145a232a3
JavaScript
tedkimdev/hwba1
/utils/generateReport.js
UTF-8
2,467
3.078125
3
[]
no_license
/* generate report object */ // { // id: 1, // name: 'A', // totalAverage: 70, // courses: [ // { finalGrade: 90.1, id: '1', name: 'Biology', teacher: 'Mr. D' }, // { finalGrade: 51.8, id: '2', name: 'History', teacher: ' Mrs. P' }, // { finalGrade: 74.2, id: '3', name: 'Math', teacher: ' Mrs. C' } ...
true
b7978255eb5489875302efda0498cc90bf373b45
JavaScript
humanshado/todomvc-stimulus
/js/controllers/todos_controller.js
UTF-8
4,206
2.65625
3
[]
no_license
application.register('todos', class extends Stimulus.Controller { static get targets() { return [ 'newTodo', 'todoList', 'todoTemplate', 'main', 'footer', 'counter', 'clearCompletedButton'] } connect() { this.load(); this.filter(); this.updateLayout(); window.addEventListener('hashchange', this.filter.bin...
true
ec16b3038c869305ac0614bb2e76bfa3f24a5c73
JavaScript
samp64/ExchangeApp
/src/constants.js
UTF-8
330
2.84375
3
[]
no_license
const days = Array.from(Array(32).keys()); days.shift(); const months = Array.from(Array(12).keys()); months.shift(); const years = [ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 ]; export { days, months...
true
e511bda90c970bb6392fa754f659ee24323bdec7
JavaScript
sudesh-poojari/javascript-es6-demo
/js/classes.js
UTF-8
471
4
4
[]
no_license
"use strict"; console.log('===== ES6 Object oriented programming ====='); class Human { constructor () { this.name = 'Mahatma Gandhi'; } greet() { console.log(this.name + ' says hello'); } } let human = new Human(); console.log('Human greetings'); human.greet(); class Programmer extends Human { constructo...
true