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
253cc73e903d60c6d49c64995039c17c14133999
JavaScript
thisistaimur/Course
/02-Programming-Basics/2020-10-13-Intro-Data-Structures/solutions/waell.js
UTF-8
3,482
4.65625
5
[]
no_license
//01 // 1. Declare a variable named myArray and store an array that contains 5 elements. Print the array. let myArray = ["aaa", "bbb", "ccc", "ddd", "eee"]; console.log(myArray) // 2. Access the 3rd element in the array and save that to another variable named thirdElement. Print the thirdElement. thirdElement = myArra...
true
ff543a2b7098a17bb1088513bae65ca2b87a38ef
JavaScript
risesk/avito-safedeal-trainee
/src/components/CardContainer/CardContainer.jsx
UTF-8
1,215
2.515625
3
[]
no_license
import React, {Component} from 'react'; import './cardContainer.css' import { config } from '../../utils/config'; class CardContainer extends Component { constructor(props) { super(props); this.state = { error: null, isLoaded: false, cards: [] }; } componentDidMount() { fetch(c...
true
d48cfd7150e4abd7f157db3ae3d212d83564f8c1
JavaScript
rayoowoo/leetcode
/0310.js
UTF-8
1,568
3.265625
3
[]
no_license
function findHeight(n, edges, startNode) { let count = 0; let nodes = [startNode] while (nodes.length < n) { count++; nodes.forEach(node => { edges = edges.filter(edge => { if (edge.includes(node)) { nodes.push(edge.filter(el => el !== ...
true
b936a13234f6b4b96a135611dc19b433bd7fa8ec
JavaScript
VarunKumarPalugula/dev-proj
/src/app/widgets/surface3D/js/layers/ProgressBar.js
UTF-8
2,153
2.765625
3
[]
no_license
/** * Created at 23.01.2015 * @author {@link http://artzub.com|Artem Zubkov} */ "use strict"; var layers = layers || {}; /** * ProgressBar * @param {Object} [options] * @constructor * @implements layers.BaseLayer */ layers.ProgressBar = function(options) { var that = this; var max , pos ...
true
e407968766845a933679aa11fecc387df80fc03a
JavaScript
junajan/safetr
/model/email.js
UTF-8
1,110
2.734375
3
[]
no_license
const cheerio = require('cheerio'); const moment = require('moment'); const _ = require('lodash'); const Email = class { constructor () { console.log("Initing email parser") } getAirportKey (str) { const init = str.indexOf('('); const fin = str.indexOf(')'); return str.substr(init+1,fin-init-1) ...
true
dc7c7383cd5d59aee4c4b73855aed78f6fad8cba
JavaScript
katewindy/refactoru-lingo
/public/quiz.js
UTF-8
1,641
3.234375
3
[]
no_license
function buildQuestion (word, language) { var el = $('<div>'); el.append($('<p class="word">'+ word + '</p>')); el.append($('<input type="text" name="answer" placeholder="answer">')); el.append($('<input type="submit">')); return el; } $(document).on('ready', function (){ $('#chooseLanguage').on('submit',func...
true
b7ca8bf49457e66a80871d5006aeefaaea9bea7d
JavaScript
Rhpozzo/FCC-Intermediate-Algorithm-Scripting-Challanges
/Search&Destroy.js
UTF-8
360
3.265625
3
[]
no_license
function destroyer(arr) { let nArr = arr; let arrV = []; let result = []; for (let i = 1; i < arguments.length; i++) { arrV.push(arguments[i]) } for (let diff of nArr) { if (arrV.indexOf(diff) == -1) { result.push(diff) } } return result; } console....
true
2ddcbd9425611021a0f22e4453d61f54f75a78ff
JavaScript
sjoerdapp/sia-cluster
/http/scripts/chart.js
UTF-8
6,239
2.6875
3
[ "MIT" ]
permissive
function pieChart(holder, data, height){ var $holder = d3.select(holder); var width = $holder.node().clientWidth; height = height || 450; var radius = Math.min(width, height) / 2.5; $holder.style('height', height+"px") var svgRoot = d3.select(holder) .append("svg") .attr("width", width) .attr("height", hei...
true
822e44ee9bc2baf3fe699f92b7b9f5fd07e088e0
JavaScript
arielgk/minimal-redux-mock-tests
/src/api/ItemApi.js
UTF-8
2,522
3.140625
3
[]
no_license
import delay from "./delay"; const items = [ { id: 1, title: "item 1" }, { id: 2, title: "item 2" }, { id: 3, title: "item 3" }, { id: 4, title: "item 4" }, { id: 5, title: "item 5" } ]; /** * * @...
true
fae846865f4b09ec395c125bebc6991cfd345253
JavaScript
toyatojo/WeatherWebsite
/FirstFinal.js
UTF-8
2,014
2.65625
3
[]
no_license
import React, { useState, useEffect } from 'react' import './style.css' export default function FirstFinal() { const [city, setCity] = useState(null) const [search, setSearch] = useState("City") useEffect(() => { const fetchAPI = async () => { const url = `https://api.openwe...
true
640e937de2ebfb32e7444f83f133d44154e715a5
JavaScript
kjergens/katieinbrooklyn
/js/rotate.js
UTF-8
1,563
2.65625
3
[ "MIT" ]
permissive
var rotation = 0; jQuery.fn.rotate = function(degrees) { $(this).css({'-webkit-transform' : 'rotate('+ degrees +'deg)', '-moz-transform' : 'rotate('+ degrees +'deg)', '-ms-transform' : 'rotate('+ degrees +'deg)', 'transform' : 'rotate('+ degrees +'deg)', '-we...
true
3705d057c2bda4ff6dc107a57cf5f4f7818ae38a
JavaScript
Canua/ReactView
/Desktop/practice/js/menubar2-ajax.js
UTF-8
1,166
3.34375
3
[]
no_license
var toggle = document.getElementById('toggle-content'); var requestURL = 'content.json'; var request = new XMLHttpRequest(); request.open('GET', requestURL); request.responseType = 'json'; request.send(); // <ul> // <li><a class="link" href="#">Main</a></li> // <li><a class="link" href="#">Link</a></li> // <li>...
true
f309e90bfad9687876e3180c4f9046b439945bc3
JavaScript
rangeoshun/wrom
/src/shared/pixel.js
UTF-8
1,912
3.046875
3
[]
no_license
"use strict"; module.exports = class Pixel { constructor(drawn, r, g, b, coords) { const pixel = this; if (drawn instanceof Array) { pixel[4] = drawn; } else { pixel[0] = drawn || 0; pixel[1] = r || 0; pixel[2] = g || 0; pixel[3] = b || 0; pixel[4] = coords; } ...
true
0059d0f9f6b928860ba96bc085225732c64c4b86
JavaScript
camiNOsolo/raspberryNodeMongoTemp
/index.js
UTF-8
2,783
2.625
3
[]
no_license
var express = require('express'); var app = express(); var server = require('http').Server(app); var io = require('socket.io')(server); var fs = require('fs'); var sys = require('util'); var exec = require('child_process').exec; var comando; var MongoClient = require('mongodb').MongoClient; var raspberry; funct...
true
2981925e08c3349611ff6850a85a85d08d9592ac
JavaScript
imann24/GreenFields
/scripts/random.js
UTF-8
236
2.96875
3
[]
no_license
/** * @author: Isaiah Mann * @desc: Random range code */ function Random (min, max) { this.min = min; this.max = max; } Random.prototype.generate = function () { return Math.random() * (this.max - this.min) + this.min; }
true
3b3c3ad59ebf572ff41f4b3fbc336708f4105f06
JavaScript
seemabmahajan/catchaTune
/js/app.js
UTF-8
4,411
2.75
3
[]
no_license
console.log(" catchaTune Project"); const songs =[ { id:1, name: "Just the way by Bruno Mars", artist: "Bruno Mars", audioFile:"media/JustTheWayYouAre.mp3", answerChoices:[{id:1,song:"Just the way by Billy Joel"}, {id:2,song:"Just the way by Bruno Mars"}, {id:3,song:"Mirrors by Justin Timberlake"}...
true
ec369eda6a628e54876d987088aa2c05cf0056f1
JavaScript
mascarenhasjoyson/Task-4
/Task 4/5_countries_using_USD/script.js
UTF-8
434
3.078125
3
[]
no_license
// 1.create an instance xml http var request=new XMLHttpRequest(); // 2.create a connection request.open('GET','https://restcountries.eu/rest/v2/all',true); // 3.send the request request.send(); // 4.load the response request.onload=function(){ var data=JSON.parse(this.response); var res=data.filter((i...
true
31dcefc0f020fe62a40721d20765d94cecdc1864
JavaScript
spaceapi-community/SpaceRadar
/store/spaces.js
UTF-8
4,461
2.578125
3
[]
no_license
import moment from 'moment'; import ical from "cal-parser"; import registerPush from "../registerPush.js"; const fetchDirectory = () => dispatch => fetch('https://api.spaceapi.io/v2') .then( response => response.json(), err => console.log(err) ) .then( json => dispatch(directoryFetched(json)), ...
true
e2ed923e2f1f03f98fa7706201e97fdedec578ef
JavaScript
notshekhar/trained-tic-tac-toe-bot-using-neuralnework-tfjs-
/src/train_model.js
UTF-8
2,807
2.625
3
[]
no_license
const fs = require("fs") const tf = require("@tensorflow/tfjs") require("tfjs-node-save") let file = fs.readFileSync("normalized_data-1b.json") let json = JSON.parse(file) const { model, modelConv2d } = require("./model") const { input, output } = json const [TRAIN_DATA_SIZE, TEST_DATA_SIZE] = [input.length, 1000] ...
true
562399177e2cca2b4023362c2534bdc450a990d5
JavaScript
Nongchaozhe/LeetCode
/242 ValidAnagram.js
UTF-8
493
3.4375
3
[]
no_license
/** * @param {string} s * @param {string} t * @return {boolean} */ var isAnagram = function(s, t) { let m = {}; if (s.length != t.length) { return false; } s.split('').forEach(element => { m[element] ? m[element]++ : (m[element] = 1) }); for (const iterator of t.split('')) {...
true
5b90c170697c1a11f9f95624561a5731591d9898
JavaScript
Ritesh294/COVID-19_Visualisations
/Visualisation 1/js/graph.js
UTF-8
3,160
2.828125
3
[]
no_license
var dataAverage = []; var dataRows = []; var currentCountry; function createGraph(country){ currentCountry = country; createDataForGraph(country); var chart = new CanvasJS.Chart("svgMap-tooltip-graph", { animationEnabled: false, theme: "light2", // "light1", "light2", "dark...
true
1eb6ffba39ddbc0c11c006b29f86ff15c290b73a
JavaScript
danielle076/javascript_basics
/j_loopVoorbeelden.js
UTF-8
3,198
4.5
4
[]
no_license
// 1. Maak een for-loop die 3 keer "Hooray!" logt in de console. for (let i = 0; i < 3; i++) { console.log('Hooray!'); } // 2. Maak een for-loop die loopt van 0 tot 9 en logt de getallen 0 tot 9. // Echter, beginnend met het getal 3, zal er een > voor elk getal staan. // Beginnend met het getal 6, komt er >> voor...
true
569ee2c51998d29aa21ebf55a29340486b9be2b9
JavaScript
yestay90/algos
/LeetcodeExcercices/ConsecuitiveSequence/LongestConsecutiveSequence.js
UTF-8
690
3.71875
4
[]
no_license
var inputs = [100, 4, 200, 1, 3, 2] longestConsecutive(inputs) function longestConsecutive(nums){ var dic = new Set() var max = 0 for (var i = 0; i < nums.length; i++){ let value = nums[i] dic.add(value) } for (var value of dic){ var localMax = 0 if (dic.has(...
true
962ba99036d777848cea9a0dfd9c3ae3ac58c4a5
JavaScript
danmalcolm/jasper
/spec/XMLDemo.js
UTF-8
3,574
2.65625
3
[ "BSD-3-Clause" ]
permissive
describe("XML Demo", function () { var xmlParser = (function () { var parse = Jasper.parse; // valid node name var identifier = parse.using(function() { var first = parse.letter().once(), rest = parse.any(parse.letter(), parse.digit(), parse.char('_-')).many().text(); return parse.sequence([first, res...
true
b69df9f4f1f25d82e9e8c9c7196be39e6adbdc1f
JavaScript
Tongqinwei/hhlab_ser2
/web/web-end/js/detail.js
UTF-8
2,114
2.6875
3
[]
no_license
// <tr> // <td>1</td> // <td>Mark</td> // <td>Otto</td> // <td>@mdo</td> // </tr> //信息: 订单编号 相关用户 创建时间 状态 详情(封面,书名 ,作者, 编号, 待定 预计还书时间和 实际还书时间) var order_num; $(function () { applyId = GetQueryString(order_num); $.ajax({ url:'', type:'GET', success:function(result){ //初始化用户信息 console.lo...
true
9889c8d4ad7f996f7ca22df927d6a1e48701c013
JavaScript
Ajeesh1/Html-works
/JS Section/decuition making/fizbuz.js
UTF-8
281
3.765625
4
[]
no_license
var num=5; // if(num%15 !=0){ // console.log("fizbuz"); // } // else if(num%3 !=0){ // console.log("fiz"); // } // else if(num%5==0){ // console.log("buz"); // } var result=""; if(num %3==0){ result+="fiz" } if(num %5==0){ result+="buzz" } console.log(result);
true
d45781c1997a121f66a441e82abb25037f7bd557
JavaScript
yingjie0904/server
/buffer/1.buffer.js
UTF-8
3,048
3.0625
3
[]
no_license
let fs = require('fs') let path = require('path'); let r = fs.readFileSync(path.resolve(__dirname, 'note.md')); // // 默认文件 读取出来的都是buffer // // 内存的表示方式是buffer 内存是二进制的 (十六进制 八 十) // // 进制转化问题 0.1 + 0.2 != 0.3 (因为需要将值存到内存中,保存时候存储的是二进制的,0。1和0.2都变大了) console.log(r); // 进制转化 整数转进制 // 小数 *2 取整 0.1转 0.00011001100110011。。。。1...
true
ae1a6257fa10103c3240a7131e0fec4011efdb3a
JavaScript
NickGroesch/counterpointTools
/translators.js
UTF-8
11,256
2.578125
3
[ "MIT" ]
permissive
// To maximize tonal functionality when translating chromatics into pitch classes we adopt the convention that // relative to a minor key we will include b2, #4, #7, #3, #6 //TODO: should #3 be #2? // relative to a major key we will include b7, #1, #2, #4, #5 // which allows for maximum use of secondary dominants and m...
true
e38b8f40952761f42be1aa60ad773904ea214c5f
JavaScript
OneDayOf/practical_js
/12_слайдер_форма_правила/app/js/modal.js
UTF-8
768
2.703125
3
[]
no_license
document.querySelectorAll('.modal-show').forEach((e) => { e.onclick = showModal; }); document.querySelectorAll('.modal-close').forEach((e) => { e.onclick = closeModal; }); document.querySelectorAll('.modal-wrap').forEach((e) => { e.onclick = (event) => { let target = event.target; if(target.classLis...
true
159f2e5304d3c8fc1ddf43db40a01169faf8dd04
JavaScript
Just-a-Unity-Dev/qpbot
/commands/config/disableverify.js
UTF-8
1,301
2.59375
3
[ "MIT" ]
permissive
const Discord = require("discord.js") const Schema = require("../../models/verifyToggle") module.exports = { name: 'disableverify', description: 'Toggle switch to enable/disable the verification system. True to disable, false to enable', args: true, usage: "[true or false]", category: "Config", async execute ...
true
09f8418b4c166a6b1058a7c783ec199f67e977e0
JavaScript
nagarajbyndoor/node-poc
/Nodejs-Express-Sequelizejs-PostgreSQL/app/controller/profile.controller.js
UTF-8
2,233
2.578125
3
[]
no_license
const db = require('../config/db.config.js'); const Profile = db.profiles; // Post a Profile exports.create = (req, res) => { // Save to PostgreSQL database Profile.create({ "firstname": req.body.firstname, "lastname": req.body.lastname, "age": req.body.age, "profileId": req....
true
30d2e01c3076183fb030adad0f7def373c2c85bd
JavaScript
hwypengsir/htmlcssjs
/p3.js
UTF-8
487
3.0625
3
[]
no_license
function myTime(){ var time = new Date(); var hour = time.getHours(); var minute = time.getMinutes(); var second = time.getSeconds(); var hourDeg = hour%12*30 + minute*0.5 ; document.getElementById("hour").style.transform = "rotate(" + hourDeg + "deg)"; document.getElementById("minute")....
true
c08cdb4e5d5dc769109f3038c802579a8991b629
JavaScript
overkazaf/Leetcode
/RangeSumQuery-Mutable/main.js
UTF-8
971
3.90625
4
[]
no_license
/** * @constructor * @param {number[]} nums */ var NumArray = function(nums) { this.sum = []; this.nums = nums; var s = 0; for (var i = 0, l = nums.length; i < l; i++) { s += nums[i]; this.sum[i] = s; } }; /** * @param {number} i * @param {number} val * @return {void} */ NumArray.p...
true
013dc9aa27cefb2c4655f2d23740da7a1803ffd4
JavaScript
mvm-sp/read-db
/docs/modalityext.js
UTF-8
5,030
2.515625
3
[]
no_license
/** * @api {get} /modalityext/ Read all data of a modalityext * @apiVersion 1.1.0 * @apiName getAll * @apiGroup modalityext * @apiPermission Token Validation * * @apiDescription This route reads modalityext data * * * @apiExample Example usage: * curl https://{HostAddres}/api/v1/modalityext/ * ...
true
8c325189981871c0902c79458e3275991777cb9a
JavaScript
Mel1207/JS---REVIEWS
/JS-2k20/DOM/9-EventBubbling-Delegation.js
UTF-8
1,205
3.296875
3
[]
no_license
// EVENT BUBBLING - This event will call the function of related parent elements even if the parent element is not click // document.querySelector('.lead').addEventListener('click', function () { // console.log('Lead'); // }); // document.querySelector('#form').addEventListener('click', function () { // conso...
true
a44b9a588cadfb827c9f69f05a418a5903a53810
JavaScript
julianztz/4490esa
/indexer/indexer.js
UTF-8
1,914
3.140625
3
[]
no_license
// general modules import * as util from "./libs/util/util"; import {FileMetrics} from "./libs/util/metrics"; // logging module import {logger} from "./libs/logging/logger"; // file system object representation import {FileSystemObject} from "./libs/fileutils/filesystemobject"; // command-line arguments import {root...
true
11ca81976c4c1fbb5e5031b19ef307a087b7f5c1
JavaScript
truexin1292/h5-pc
/src/assets/js/webSocketCommon.js
UTF-8
3,605
2.8125
3
[]
no_license
class WebSocketCommon { /* 配置构造器 */ constructor (url, options) { this.url = url || '' this.options = options || {} this.url = options.url || '' // websocket路径 this.messageType = options.messageType || '' // 消息类型 this.autoReconnect = options.autoReconnect || true // 是否自动重连,按目前后端设计的websocket方案,是只能...
true
558356c576b849c14647c8d718dfb54d5a138a97
JavaScript
webduinoio/webduino-blockly
/components/blockly-src/generators/python/math.js
UTF-8
14,535
2.8125
3
[ "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/** * @license * Visual Blocks Language * * Copyright 2012 Google Inc. * https://developers.google.com/blockly/ * * 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.apa...
true
a83cda8f9b017cdd5842688c69859fd20c27a1d4
JavaScript
lucasmoauro/Recetas-Backend
/controllers/recipeGet.js
UTF-8
1,073
2.734375
3
[]
no_license
const { request } = require("express"); const { Bakery, Chocolatier, Pastry } = require("../models"); const recipesGet = async (req = request, res) => { const { menu } = req.params; const { q } = req.body; switch (menu) { case "bakery": const bakery = await Bakery.find({ q }) return res.status(...
true
6a6c190d0a2a2d9efea75109cb6e40fe27e12e69
JavaScript
horingring/React
/src/App.js
UTF-8
4,570
2.734375
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import Subject from './components/Subject'; import ReadContent from './components/ReadContent'; import CreateContent from './components/CreateContent'; import Nav from './components/Nav'; import Control from './components/Control'; import UpdateContent from...
true
9ec535fc599d26ea0cac81f493981d43e723ae56
JavaScript
jedevc/terrapin
/js/preprocessor.js
UTF-8
572
2.6875
3
[ "MIT" ]
permissive
const traps = { for: /for.*\)\s*{/, while: /while.*\)\s*{/, if: /if.*\)\s*{/, function: /function.*\)\s*{/, class: /class.*{/ } const allTraps = new RegExp('(' + Object .values(traps) .map(v => v.source) .join('|') + ')') export class TrapProccessor { constructor (snippets) { this.snippets = sni...
true
80dde94e751d598e7728d12fba130ea55b942446
JavaScript
takumifukasawa/jsdoitArchives
/src/archives/[2015.9.16] 2つの円周上の点を結んで動かす/index.js
UTF-8
4,494
2.71875
3
[]
no_license
(function(window, document, undefined) { "use strict"; var NUM = 36; var RADIUS = 1; var LINE_WIDTH = 1; var INNER_R = 50; var OUTER_R = 200; var CENTER = { x: window.innerWidth/2, y: window.innerHeight/2 }; var DT_INNER = 0.2; var DT_OUTER...
true
68025d3fd9e5165bbf65edacd862519502eefbfc
JavaScript
CLooker/HackerRank
/permutation-equation.js
UTF-8
268
3.296875
3
[]
no_license
// https://www.hackerrank.com/challenges/permutation-equation/problem const permutationEquation = nums => [...nums].sort((a, b) => a - b).map(num => { const nextNumIdx = nums.indexOf(num) + 1; const val = nums.indexOf(nextNumIdx) + 1; return val; });
true
4e5731a3835fa1813154aa91c1dbe8d3a8210011
JavaScript
ammy-bajwa/2tok2
/routes/adminSettings.js
UTF-8
1,589
2.578125
3
[]
no_license
const { ADMIN_SETTINGS } = require("../constants/logs"); const { updateAdminSettings, getLatestAdminSettings, } = require("../models/adminSettings"); const { logThis } = require("../models/logs"); const catchHandler = (err, res, msg) => { res.json({ error: msg || "Something went wrong !", err }); //console.err...
true
700c8b866a826430baaaff4ba32a61121dd0e902
JavaScript
Megaplayonline/mastertv
/code/script.js
UTF-8
2,090
2.59375
3
[]
no_license
//load window window.onload = function(){ //code document.getElementById("load").style.display = "none"; document.getElementById("home").style.display = "block"; } /*setTimeout(function(){ document.getElementById("load").style.display = "none"; document.getElementById("home").sty...
true
bd215f0fff027448fb8ce3d63ab50e54852b891c
JavaScript
MichelleW31/TableReservation
/scripts/script.js
UTF-8
2,377
3.0625
3
[ "MIT" ]
permissive
$(document).ready(function(){ var tables = $("#table"); var container; var oldText; var name; var size; //Creates tables and classes for(var i=0; i<9; i++){ tables.append("<div>" + (i+1) + "</div>"); } $("#table div").attr("class","tabledivs available"); //brings up form and enters table numbe...
true
a592eba7a60e76a82d885ccf4b1713fb66914caf
JavaScript
Kagan-Of-Sky/NodeJS-SimpleChat
/server.js
UTF-8
8,269
2.578125
3
[]
no_license
/* Mark Kaganovsky 100963794 */ /* Some code provided by Andrew Runka. */ // Modules const http = require('http').createServer(handler); const io = require('socket.io')(http); const fs = require('fs'); const url = require("url"); const mime = require("mime-types"); // Constants const ROOT = "./public"; const PORT = ...
true
1ba965ca95ba53765e5b3db2486c7962e3c0e14d
JavaScript
qdx/butterfly
/src/math/MathUtility.js
UTF-8
491
3.21875
3
[]
no_license
class MathUtility{ static distance(x1, y1, x2, y2){ return Math.sqrt( Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2) ); } static distance_square(x1, y1, x2, y2){ let x_sub = x1 - x2; let y_sub = y1 - y2; return x_sub * x_sub + y_sub * y_sub; } // return x when min < x < max, o...
true
bcc6e75427be9a3c3647bbf3adc33cad3ee83fe7
JavaScript
JinsYin/open-admin-ui
/src/libs/getdate.js
UTF-8
2,373
3.265625
3
[ "MIT" ]
permissive
// 引入 moment 时间插件 import moment from 'moment' // 获取今日/昨日/本周/上周/本月/上月 时间 // export default { // 获取今日的开始结束时间 export const getToday = () => { let obj = { starttime: '', endtime: '' } obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD HH:mm:ss') obj.endtime = moment(moment().valueO...
true
d34a0d78741cd70ad51634f9ea8c1737c6cb28d2
JavaScript
HilennJames/BasicCalculator
/server.js
UTF-8
1,041
2.859375
3
[]
no_license
var express = require('express'); var app = express(); var api = express.Router(); const PORT = 4300; const cors = require('cors'); app.use(cors()); app.use(express.json()); app.use((res,req,next)=>{ res.header("Access-Contro-Allow-Origin", "*") res.header("Access-Control-Allow-Headers", "Origin, X-Reques...
true
1de2fc7914326395d4e32bb15163ec3a74e813de
JavaScript
ispa16/Pagina_web
/dc/video.js
UTF-8
1,336
2.921875
3
[]
no_license
var video = document.getElementById("videoPlayer"); function playPause() { if (video.paused) video.play(); else video.pause(); } function reload() { video.load(); } function makeLarge() { video.width = 100 ; } function makeSmall() { video.width = 250; } function make...
true
cb440a18ad436fbf9995538a7967aa52c8d44737
JavaScript
Suddenly-Entertainment/Mewars
/resources/Code/Include/Tilemap.js
UTF-8
3,536
2.75
3
[]
no_license
Crafty.c("Tile", { /** * Initialisation. Adds components, sets positions, binds mouse click handler */ init: function() { this.addComponent("2D, Canvas, Mouse"); }, /** * Convenience method for creating new boxes * @param x position on the x axis * @param y position on t...
true
a6724c7fdcceebe3334c782e1478e593c257f478
JavaScript
MagicHacker/eslint-config-attack
/test/possible-errors/no-duplicate-case/error.js
UTF-8
155
2.65625
3
[ "MIT" ]
permissive
/** * 禁止在switch语句中出现重复的case */ const foo = '' switch (foo) { case '1': break; case '2': break; case '1': break; }
true
41182fd95a08135d8c601613bdd7059bc2aa3d40
JavaScript
Anu-tochka/shop
/src/validation.js
UTF-8
815
2.796875
3
[]
no_license
'use strict'; const jsform = document.getElementById('js__form'); const jsbutton = document.getElementById('js__button'); const jsname = document.getElementById('name'); const jsphone = document.getElementById('phone'); const jsemail = document.getElementById('email'); let inputs = jsform.querySelectorAll('input'); jsb...
true
9adab4d174b9ec5b14f9edc560041cc891c511b4
JavaScript
jiyoung-dev/javascript-tutorial
/javascript-for-beginners/3.8/app.js
UTF-8
1,006
3.828125
4
[]
no_license
const h1 = document.querySelector("div.hello:first-child h1"); function handleTitleClick(){ const clickedClass = "active"; // constains(), remove(), add() 사용해서 CSS 클래스 접근하기 /* if (h1.classList.contains(clickedClass)){ h1.classList.remove(clickedClass); // className없는 초기상태로 돌아감 } else { h1.classList.a...
true
2457cf0ca4f23c304b0b66faed35269221d5a492
JavaScript
Sfeir/angularmovie-100
/routes/api.js
UTF-8
2,190
3.140625
3
[]
no_license
"use strict"; var _ = require('lodash'), MOVIES = require('./data/movies').movies; /** * variable to act as a generated id * @type {number} */ var ID = 9; /** * Fetch all movies * If category query is provided, fetch movies filtered by category */ exports.fetchMovies = function (req, res) { var movies = ...
true
761df591512e3990162f8b7125523722603e19c4
JavaScript
pstrum/sea-d45-javascript
/week_1/oct_29_event_emitters/inclass_code/ee_demo2.js
UTF-8
410
3.328125
3
[]
no_license
var EE = require('events').EventEmitter; var inherits = require('util').inherits; var MyConstructor = function() { this.awesome = true; this.on('unicorns', function() { console.log('unicorns!'); return this.awesome; }); }; inherits(MyConstructor, EE); MyConstructor.prototype.something = function() { ...
true
14cfa775cbd90c7a969f99851d09c12e17c83165
JavaScript
baygen/Shop
/client/app/components/catalog/properties.js
UTF-8
1,321
2.65625
3
[]
no_license
import React from 'react'; import ReactDOM from 'react-dom'; import axios from 'axios'; import Value from 'components/catalog/prop_value' export default class Properties extends React.Component { constructor(props) { super(props); this.state = { props:[], value:[] } }; getProp(){ axi...
true
2c9e74b215baecef9363316bcfba36e462890ef1
JavaScript
zhangran/kissy
/src/dom/sub-modules/base/coverage/src/base/style.js
UTF-8
93,809
2.84375
3
[ "MIT" ]
permissive
function BranchData() { this.position = -1; this.nodeLength = -1; this.src = null; this.evalFalse = 0; this.evalTrue = 0; this.init = function(position, nodeLength, src) { this.position = position; this.nodeLength = nodeLength; this.src = src; return this; } ...
true
bdf5d42a1acfde65fec587fea5cfdcf371d7cb0c
JavaScript
wearelucid/nuxt-netlify-functions-example
/functions/hello-name-post.js
UTF-8
409
2.890625
3
[ "MIT" ]
permissive
// eslint-disable-next-line require-await export async function handler(event) { // Only allow POST if (event.httpMethod !== 'POST') { return { statusCode: 405, body: 'Method Not Allowed', headers: { Allow: 'Get', }, } } const data = JSON.parse(event.body) const name =...
true
6fa457fbdcf1519198ca6ff9fff9f8a3da9c8999
JavaScript
ggcaponetto/dns-scanner
/src/iputil.js
UTF-8
2,714
2.78125
3
[]
no_license
// eslint-disable-next-line no-unused-vars const chalk = require('chalk'); // eslint-disable-next-line no-unused-vars function IpUtil(version = 4) { const addPadding = (number, totalNumberOfDigits) => { const missingZeros = totalNumberOfDigits - number.toString().length; let paddedString = number.toString();...
true
53413fd6f18e2ca9aa8b6f5db178a52079b506ab
JavaScript
devalade/trading_app
/public/js/components/chart/PlaceOrder.js
UTF-8
587
2.546875
3
[]
no_license
// Select DOM elemt let domSellOrder = document.getElementById('sellOrder'); let domBuyOrder = document.getElementById('buyOrder'); //Variables // function function order(chart, priceOrder, ) { const PriceLine = { price: 42267.71, color: '#be1238', lineWidth: 1, lineStyle: Lig...
true
81c5435da47cee5a45cc9d11e60e4cc664f4d388
JavaScript
Mamuuut/CanvasGame
/BoneGame/www/js/libs/GameEngine/Views/ScrollView.js
UTF-8
2,308
2.75
3
[]
no_license
/** * @author Mamut */ define( [ "GameEngine/Factories/ViewFactory", "GameEngine/Helpers/ImageLoader", "GameEngine/Views/Sprite", "GameEngine/Views/LevelGroupView", "GameEngine/Models/LevelObject" ], function( ViewFactory, ImageLoader, Sprite, LevelGroupView, LevelObject ) { function ScrollView( ...
true
ba95e1c3fe6cb044602aba7199e31b9c4d5e8c1d
JavaScript
Agallo10/femden-backend
/routes/denuncias.js
UTF-8
1,339
2.5625
3
[]
no_license
/* Denuncias '/api/denuncias' */ const { Router } = require('express'); const { check } = require('express-validator'); const { validarCampos } = require('../middlewares/validar-campos'); const { validarJWT } = require('../middlewares/validar-jwt'); const{ getDenuncias, crearDenuncias, actualizarD...
true
bfe05b89298085e59dbdd6abc79eb92152e1e9d3
JavaScript
fu-chau/nodewpg
/java_script/index038.js
UTF-8
143
3.265625
3
[]
no_license
const name = 'Robert'; let numberOfLetters = name.length; console.log ('My name is', name, 'and it has', numberOfLetters, 'characters long');
true
e73efcebb58fdf5a3d5a414950e37c317e51afb5
JavaScript
xshthebat/ACM
/670.js
UTF-8
449
3.53125
4
[]
no_license
var maximumSwap = function(num) { let arr = num.toString('10').split(''); arr = arr.map((item)=>{ return parseInt(item); }) let newarr = [...arr].sort((a,b)=>b-a); for(let i=0;i<arr.length;i++){ if(arr[i]!==newarr[i]){ let temp =arr[i]; arr[i] = newarr[i]; ...
true
05d8be24081ff6ba4f078328abc4d79fc5a176cc
JavaScript
leighwhite96/to-do-list
/src/components/App/index.js
UTF-8
1,179
2.59375
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import List from '../List' class App extends Component { constructor(props){ super(props); this.state = { input: "", todo: [] } this.onChange = this.onChange.bind(this); this.onSubmit = this.onSubmit.bind(this); this.o...
true
5c4ef1886e85a826cf3941021300a6837bf9aed5
JavaScript
huutri148/WebsiteQuanLyBanGiay
/backend/controllers/Todo.controller.js
UTF-8
1,897
2.859375
3
[]
no_license
const Todo = require("../models/Todo.model"); // @desc Fetch all todos // @route Get/api/todos // @access Public const getList = async (req, res) => { await Todo.Get((result) => { if (result) { res.send(JSON.stringify(result)); } else { res.status(404); throw new Error("Color not found "); ...
true
3c9d066280adb599fd408356cba731d0be159edd
JavaScript
vouill/reactTableApp
/src/modules/filterTable.module.js
UTF-8
818
2.71875
3
[]
no_license
// Constants const UPDATE_FILTERS_START = '[EventFilters] Updating event start' const UPDATE_FILTERS_END = '[EventFilters] Updating event end' // Actions export const updateStartFilter = (start) => { return { type: UPDATE_FILTERS_START, payload: start } } export const updateEndFilter = (end) =...
true
6c83298c187c130a6cbdf3fc8e86372686c3d47a
JavaScript
yusufjiruwala/c6
/webapp/generic/DataCell.js
UTF-8
1,006
2.734375
3
[]
no_license
sap.ui.define([], function () { 'use strict'; function DataCell() { if (!(this instanceof DataCell)) { throw new TypeError("DataCell constructor cannot be called as a function."); } this.mValue = null; this.mLabel = ""; }; DataCell.create=function (mValue,mLa...
true
2e1d6f90f5f9a99dc69ee1ebafa779da0009e626
JavaScript
serbinario/seracademico-laravel
/public/js/mestrado/planoEnsino/planoAula/create_conteudo_programatico_plano_aula.js
UTF-8
1,779
2.78125
3
[ "MIT" ]
permissive
// Evento para adicionar linhas para grid de taxas $('#btnAddConteudoPlanoAula').on( 'click', function () { // Recuperando o valor do conteúdo var conteudo = $('#conteudo_plano_aula').val(); // Verificando se foi passado valor válido if (!conteudo) { swal('Você deve criar um conteúdo!', "Click ...
true
1925fba744c1e3404ea8aa1a0fac6e391a29c0e2
JavaScript
shuise/tech-research
/libs/google_closure/closure/goog/ui/basicmenu.js
UTF-8
23,038
2.59375
3
[ "MIT" ]
permissive
// Copyright 2006 The Closure Library Authors. All Rights Reserved. // // 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 requ...
true
74c7db792437871307d25b450042e85a8a629db8
JavaScript
viveksyngh/learnyounode
/10-time-server.js
UTF-8
690
2.953125
3
[]
no_license
var net = require('net'); var server = net.createServer(function(socket) { var now = new Date(); var year = now.getFullYear(); var month = now.getMonth() + 1; var date = now.getDate(); var hours = now.getHours(); var minutes = now.getMinutes(); if(month < 10) { month = '0' + month ...
true
1b5533bcbb45eab7db813f37062f1e3fb528201c
JavaScript
npmcomponent/entity-arrows
/index.js
UTF-8
1,694
3.28125
3
[ "MIT" ]
permissive
/*! * * arrows * * MIT * */ /** * Module dependencies. */ var Keys = require('entity-keys'); var merge = require('yields-merge'); /** * Control flags. */ var ctrl = { left: 1, up: 2, right: 4, down: 8, shoot: 16 }; /** * Opposite directions flags. */ var opp = { 1: 4, 2: 8, 4: 1,...
true
1ebc93ae362fc65a25a00ae1aed09acfc232a39d
JavaScript
daliDeli/project-BitShowReact
/src/services/DataService.js
UTF-8
820
2.6875
3
[]
no_license
import Series from "../entities/Series"; import { getAll, getOne, getByName} from "../services/fetchService"; export const getAllSeries = (success, failure) =>{ getAll( seriesData => { success(seriesData.data); }, error =>{ failure(error); } ); }...
true
35961bd3b28c3869fc1a5e7a55faaf2d4b50bc14
JavaScript
elizasohn/animal
/js/scripts.js
UTF-8
1,872
2.765625
3
[]
no_license
$(document).ready(function(){ $("form").submit(function(event){ var animal = $("input:radio[name=animal]:checked").val(); if (animal === "turtle") { $(".alligator").hide(); $(".dog").hide(); $(".squirrel").hide(); $(".hedgehog").hide(); $(".frog").hide(); $(".z...
true
7a2efe0838a2e91749b2cc78eb96ce4f5a595ea7
JavaScript
remarkies/ichbinich-playground
/scripts/version3.js
UTF-8
2,816
3.03125
3
[]
no_license
let ImageList = document.getElementById('images'); loadImages(); async function loadImages() { let images = await getImages(); let gridColumnsSize = getGridColumnsSize(images); let gridRowsSize = getGridRowsSize(images); ImageList.style.gridTemplateColumns = 'repeat(' + (2 * gridColumnsSize) + ', au...
true
f870afab5769032ae6ef5e02acba62c98cf1b092
JavaScript
leandrokoiti/ValidadorAutomato
/ValidadorAutomato/wwwroot/js/etc/string.js
UTF-8
274
2.984375
3
[]
no_license
String.prototype.format = function () { var ret = this.toString(); var parms = arguments; var pLength = parms.length; for (var i = 0; i < pLength; ++i) { ret = ret.replace(new RegExp("\\{" + i + "\\}", "gi"), parms[i]); } return ret; };
true
65c472bea63ad620d33c21102e604dfe27c66ea4
JavaScript
hn18vs/lab9
/JsExercise/exercise3/script.js
UTF-8
351
3.484375
3
[]
no_license
function output() { var number1 = document.getElementById("num1").value; var number2 = document.getElementById("num2").value; var sum = parseInt(number1) +parseInt(number2); console.log(sum); if(sum) { document.getElementById("sumOut").innerHTML = sum;} else { alert("Please ...
true
afd6adf96987191fc2e2ba7a8b5d3b3fb1300951
JavaScript
info340b-au19/SpotGen
/src/Components/CreatePage/CreatePage.js
UTF-8
14,063
2.671875
3
[]
no_license
import React, { Component } from "react"; import Navbar from "../Navbar/Navbar"; import SelectPlaylists from "./SelectPlaylists/SelectPlaylists"; import FilterSongs from "./FilterSongs/FilterSongs"; import CreatePlaylist from "./CreatePlaylist/CreatePlaylist"; import { getUserData, getUserPlaylists, getNumberOfS...
true
c88425013c9922f00d6ba255848aed1de8a02497
JavaScript
chuhaienko/credit-calculator
/index.js
UTF-8
1,843
2.921875
3
[ "MIT" ]
permissive
'use strict'; const moment = require('moment'); let options = { startDate : moment(), amount : 1000000, rate : 10, months : 60, monthPay : 0 }; console.dir(getPayments(options), {depth: null}); function getPayments (options) { const amount = options.amount; const startDate = moment(optio...
true
d8b1f79837fb714990a6452423aebf307824955c
JavaScript
OfficeDev/Outlook-Add-in-JavaScript-ModuleExtension
/lib/sample.js
UTF-8
7,588
2.796875
3
[ "MIT" ]
permissive
/* * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. * See LICENSE in the project root for license information. */ (function () { "use strict" // The initialze function is run each time the page is loaded. Office.initialize = function (reason) { $(document).ready(f...
true
d6e7ad2740199d8b4a63152b53019b5542aa5d3e
JavaScript
tientran007/playmusicv2
/JS/musicmethod.js
UTF-8
7,749
2.890625
3
[]
no_license
var song = document.getElementById("defaultsong"); var playlist = []; var imgsong = []; var audiosong = []; let playbntstatus = true let loopbtnstatus = true; let randombtnstatus = true; function playmusic(song) { if(playbntstatus) { song.play(); playbntstatus = false; document.getElementById("songlogo")...
true
3c10fe0b05f9524216e007229060db19434b34b1
JavaScript
tarwater/clayholt.com
/public/javascripts/app.js
UTF-8
745
2.765625
3
[ "MIT" ]
permissive
$(document).ready(function () { //blink link stuff var colors = [ "#ff8d00", "#00f2f9", "#15f600", "#ff5454", "#f284f9", "#9a5aff", "#0061fc"]; var interval; $('.blinkLink').hover(function () { var link = $(this); interval = w...
true
d874cd3795e7984010024d4562619e8bd7364d6d
JavaScript
yooSeeFly/async
/mocha_test/concat.js
UTF-8
2,829
2.84375
3
[ "MIT" ]
permissive
var async = require('../lib'); var expect = require('chai').expect; var assert = require('assert'); describe('concat', function() { it('concat', function(done) { var call_order = []; var iteratee = function (x, cb) { setTimeout(function(){ call_order.push(x); ...
true
419d2255572548d3e40329aca33a00562feb5a3a
JavaScript
kaifronsdal/MatterJS_Class_Demo
/script.js
UTF-8
2,965
2.625
3
[]
no_license
// start boilerplate code var Engine = Matter.Engine, Render = Matter.Render, Runner = Matter.Runner, Composite = Matter.Composite, Composites = Matter.Composites, Constraint = Matter.Constraint, MouseConstraint = Matter.MouseConstraint, Mouse = Matter.Mouse, World = Matter.World, Ev...
true
4dda4cf5d25209cae53ff31411f07443fec0b059
JavaScript
sareh/exercism
/javascript/allergies/allergies.js
UTF-8
673
3.140625
3
[]
no_license
var Allergies = function (score) { this.allAllergies = ['eggs', 'peanuts', 'shellfish', 'strawberries', 'tomatoes', 'chocolate', 'pollen', 'cats']; this.list = function () { var i, allergies = []; for (i = 0; i < this.allAllergies.length; i++) { if (score & Math.pow(2,i)) { allergies...
true
464e7fa6bff7ee0c870597792b18f7e58fdc929c
JavaScript
lenninIbarrraGonzalez/JavaScript
/moviendoPersonajeCanvas/js/main.js
UTF-8
3,787
3.953125
4
[]
no_license
//ancho y alto para el canvas const canvasWidth = 850; const canvasHeight = 350; const canvas = document.getElementById('canvas'); //inicializando el ancho y el alto del canvas canvas.width = canvasWidth; canvas.height = canvasHeight; //contexto 2d para el canvas const ctx = canvas.getContext("2d"); //**********...
true
cbc862862229da374f2b9a29083585f2474defc7
JavaScript
hoppula/mobx-react-router
/src/sync.js
UTF-8
927
2.5625
3
[ "MIT" ]
permissive
import { observe } from 'mobx'; export const syncHistoryWithStore = (history, store) => { // Initialise store store.history = history; // Handle update from history object const handleLocationChange = (location) => { store._updateLocation(location); }; const unsubscribeFromHistory = history.listen(ha...
true
13365ccd72c3d082bdff7c4a025440356d7103b7
JavaScript
Alchemistst/full_stack_open
/part4/blog_list_frontEnd/src/components/NewBlogForm.js
UTF-8
1,677
2.6875
3
[]
no_license
import React, { useState } from 'react'; import blogServices from '../services/blogs'; const NewBlogForm = ({ blogs, setBlogs, setMessage, toggleVisibility, }) => { // State const [title, setTitle] = useState(''); const [author, setAuthor] = useState(''); const [url, setUrl] = useState(''); // Methods ...
true
7d8826f5415211f5824168fe12d159a35e22eefa
JavaScript
LucasMMF/javascript-studies
/JavaScript e ECMAScript para Iniciantes (Português)/Módulo C - Entendendo o DOM/aula_09/Introducao_ao_DOM.js
UTF-8
2,971
4.1875
4
[ "MIT" ]
permissive
/* Q01: Qual é a diferença entre usar =, == e === em códigos escritos em JS? R: A diferença entre =, == e === é que o = é um operador de atribuição, ou seja, uma variável "recebe" um dado. Exemplo: var x = 3. Neste caso, não significa que x é igual a 3, mas sim que a variável x está recebendo e armazenando o valor 3. ...
true
7bcd4fddc68f2bd864ef0c97dffb71d23423a45f
JavaScript
fizker/mocha-multiline-reporter
/test/unit/formatter.delimiters.js
UTF-8
1,084
2.515625
3
[ "WTFPL" ]
permissive
describe('unit/formatter.delimiters.js', function() { var formatter = require('../../src/formatter') describe('When using double-quotes', function() { it('parses the content correctly', function() { var result = formatter('"abc\\nde" "abc\\nde"') expect(result).to.equal( '|abc| |abc|\n' + '|de | |de...
true
a8e96164f54723b45b8359336149a7fda36ee4f4
JavaScript
MatthewTaylor9758/Stack-Overflow-Clone
/client/src/pages/NewQuestion.js
UTF-8
2,986
2.65625
3
[]
no_license
import React, { useState } from 'react'; import { useSelector } from 'react-redux'; import { askQuestion } from '../store/questions'; import '../newQuestionPage.css' function NewQuestion() { const [title, setTitle] = useState(''); const [body, setBody] = useState(''); const [tags, setTags] = useState(''); const...
true
5d2e2f30f825fc696629e28fae46ec026830153a
JavaScript
CHINMAY6656/todo-edited
/src/Result/index.js
UTF-8
2,185
2.625
3
[]
no_license
import React, { useContext, useState } from "react"; import { useLocation } from "react-router-dom"; import { useEffectOnce } from "react-use"; const axios = require("axios").default; const qs = require("querystring"); function Index() { const [s, setS] = useState(0); let l = useLocation(); const [r...
true
aeda17d6bc381939b2394a873bdf2e31d8e7c0f4
JavaScript
RekGRpth/modules
/ffi/test.js
UTF-8
1,623
2.546875
3
[]
no_license
const { ffi } = just.library('./ffi.so', 'ffi') const handle = just.sys.dlopen() if (!handle) throw new Error('Clould not create handle') function atoi (str) { const fn = just.sys.dlsym(handle, 'atoi') if (!fn) throw new Error('Could not find symbol') const cif = new ArrayBuffer(8) const dv = new DataView(cif)...
true
0cb1c45c405e4167260963a412161c1c3ee9931a
JavaScript
xxxxxxRIFATxxxxxx/inch-to-feet
/js/script.js
UTF-8
284
3.953125
4
[]
no_license
// Define UI var inch = document.querySelector("#inch"); var result = document.querySelector("#result"); // Define Function function inchToFeet() { var feet = inch.value / 12; result.innerText = feet; }; // Define Event Listener inch.addEventListener("keyup", inchToFeet);
true
da08e333502d72de0586fbfd4a635c828875f89a
JavaScript
kenianbei/OpenJSCAD.org
/packages/examples/old/complex/example003.jscad
UTF-8
661
2.609375
3
[ "MIT", "CC-BY-SA-3.0", "CC-BY-NC-4.0", "CC-BY-4.0" ]
permissive
// title : Example 003 // author : OpenSCAD.org, adapted by Rene K. Mueller // license : MIT License // description: example003.scad ported to OpenJSCAD.org // file : example003.jscad function example003 () { return difference( union( cube({size: [30, 30, 30], center: true}), cube({...
true
3d26a16836b641130950669e4f4271d5e44727cf
JavaScript
Nadychan/WebKMTCourse
/script/modal_box.js
UTF-8
1,029
2.96875
3
[]
no_license
let openModal = document.querySelector('.modal-open') let closeModal = document.querySelector('.modal-close') let disableModal = document.querySelector('.modal-disable') let enableModal = document.querySelector('.modal-enable') let modal_box = document.querySelector('#modal') //add class modal openModal.addEventLi...
true
ac178da4229e13bb7f453169f98a83b6ed4e604a
JavaScript
Da9elgit/Macro-Explain-o-Matic
/html/rate_lib.js
UTF-8
7,609
3.078125
3
[ "Apache-2.0" ]
permissive
// Javascript code for making AJAX calls to rate a macro, // and then update the rating on the page. // Requires http_lib, util to be loaded. // Rating control library var rate_lib = { // Constructor // The rater_obj is the div that selects rating, // while rating_obj is the div displays the rating. i...
true
a616555023e3c1400905997089c155de093f6f47
JavaScript
ascartabelli/lamb
/src/core/sliceAt.js
UTF-8
1,044
2.828125
3
[ "MIT" ]
permissive
import _makePartial3 from "../privates/_makePartial3"; import slice from "./slice"; /** * Given the <code>start</code> and <code>end</code> bounds, builds a partial application * of {@link module:lamb.slice|slice} expecting the array-like object to slice.<br/> * See also {@link module:lamb.dropFrom|dropFrom} and {@...
true