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
9b7d32e3ea460fa7c9f06c715ee752b6d655075b
JavaScript
yagu0/erdiag
/parser.js
UTF-8
15,217
2.90625
3
[]
no_license
// ER diagram description parser class ErDiags { constructor(description, output, image) { this.entities = { }; this.inheritances = [ ]; this.associations = [ ]; this.tables = { }; this.mcdParsing(description); this.mldParsing(); this.output = output || "graph"; this.image = image || "svg"; } stati...
true
bb8f2c8de4d2a11bfe5c456cc12570643c5deaac
JavaScript
xeon2007/node-chat
/app/database/connection.js
UTF-8
1,194
2.578125
3
[]
no_license
/** * Establishes connection to database using node-mysql * and node-promise-mysql for promises and connection pooling */ const mysql = require('mysql') const promise_sql = require('promise-mysql'); var pool = null; function getPool(host, user, password, connectionLim) { pool = promise_sql.createPool({ ...
true
1c1c969722fe85c3cb37f67dc3f4a385dda1c5a0
JavaScript
appodols/BuenosLeidos
/frontend/components/my_rating.jsx
UTF-8
3,330
2.609375
3
[]
no_license
/*jshint esversion: 6 */ import React from 'react'; import { Link } from 'react-router-dom'; import StarRatingComponent from 'react-star-rating-component'; class MyRating extends React.Component { constructor(props){ super(props); this.state = {buttonName: "",rating: 0}; // this.hasGivenReview = this.has...
true
4b882bb066e7750eb44d805b69f3a1863d6351cc
JavaScript
arpita221b/Fitness-Website
/javascript.js
UTF-8
201
2.5625
3
[]
no_license
window.addEventListener("scroll",function(){ var header=document.querySelector("header"); let windowPosition= window.scrollY>100; header.classList.toggle("blurrycontent",windowPosition); })
true
5122b92a15b50afca35ccf31f0d38d2b10a11c61
JavaScript
softallice/lifeos
/resources/js/mixins/tables/paginated.js
UTF-8
1,670
2.609375
3
[]
no_license
export const paginatedMixin = { data () { return { filter: { page: 1, }, paginate: { nextPageUrl: null, prevPageUrl: null, lastPage: 0, currentPage: 0, }, }; }, w...
true
8ae3acfe532f88431a33113fb82c7a8df469e8d5
JavaScript
itanium-R/selfAttendanceManager
/tools.gs
UTF-8
3,414
3.21875
3
[]
no_license
function getToday(){ var now = new Date(); now = Utilities.formatDate(now,'JST','yyyy/MM/dd'); return now; } function getNow(){ var now = new Date(); now = Utilities.formatDate(now,'JST','yyyy/MM/dd HH:mm:ss'); return now; } // date2-date1の日数を計算し,intで返す function findDiffOfDate(date1,date2){ date1 = new D...
true
6454dc20d983abc2ee1def8626a0770fd865f507
JavaScript
tjschutte/Node-Site
/public/hosted-projects/Homework9/ExampleObjects/plane.js
UTF-8
11,147
2.75
3
[ "BSD-2-Clause" ]
permissive
/** * Created by Yusef. */ /** A Very Simple Textured Plane using native WebGL. Notice that it is possible to only use twgl for math. Also, due to security restrictions the image was encoded as a Base64 string. It is very simple to use somthing like this (http://dataurl.net/#dataurlmaker) to create o...
true
80290988bf091d21e4e921b8b04fc9e5476e5615
JavaScript
stack-labs-tech/blockchain-js
/blockchain-js-supply-chain/identity-registry.sm.js
UTF-8
2,067
2.796875
3
[ "MIT" ]
permissive
/** * This is a VERY VERY basic identity server * * Really the main problem is reapay attacks. * * There is a scheme to prevent that that I invented, will be implemented later on */ ({ /** * identity registry * * register user */ init: function () { this.data.identities = {}...
true
837c99a10c67576b1a5d93ee7f111bbc335de0c6
JavaScript
jellenm/books
/05es6/01enviroment/es6/12promise.js
UTF-8
5,117
3.625
4
[]
no_license
console.log('promise对象'); // Promise.prototype.then方法:链式操作 // Promise.prototype.catch方法:捕捉错误 // Promise.all方法,Promise.race方法 // Promise.resolve方法,Promise.reject方法 // async函数 //基本用法 // let promise = new Promise(function(resolve,reject){ // if(succss){ // resolve(value); // }else{ // reject(erro...
true
a2450cb324db2578a01786e90712784fc4566a3a
JavaScript
zh3305/MapleStory_Script
/奇幻国度2015开服脚本/Scripts/npc/9071002.js
GB18030
4,299
2.984375
3
[]
no_license
/* * ﹫԰볡Ա */ var status = -1; function action(mode, type, selection) { if (mode == 1) { status++; } else { if (status == 0) { cm.dispose(); } status--; } if (status == 0) { cm.sendSimple("áɣҪʹù﹫԰ȻӦҡΪʲôأ\r\n#b#L0##t4001513##l\r\n#L1##t4001515##l\r\n...
true
4ec926ab726186f7775a478d998d5948baa25358
JavaScript
umanandt/textutils
/src/Component/TextForm.js
UTF-8
4,280
3.015625
3
[]
no_license
import React, { useState } from "react"; let emailText; export default function TextForm(props) { const [text, setText] = useState(""); const [emaill, getEmaill] = useState(""); const onChangeHandle = (e) => { setText(e.target.value); }; const changeUppercase = () => { let newText = text.toUpperCa...
true
933733cbe87377bd342595db6a0e58015f3bd691
JavaScript
YingHu1234/Front-End
/W6C11_starter-awesome/js/script.js
UTF-8
4,123
4.0625
4
[]
no_license
$(document).ready(function(){ /*********** PUT THINGS HERE ****************/ /****** QUESTION 1 ************/ /*document.getElementById('return5th_submit').onclick = function(){ var text = document.getElementById('return5th_input').value; document.getElementById('return5th_display').innerHTML = text.charAt(...
true
4042fad813f09acff2dc2cef196efb0433734c4e
JavaScript
Vincenzo7677/FSWD60-JS-DAY02-Vincenzo-Jamal-Markus
/ATM.js
UTF-8
264
3.515625
4
[]
no_license
function atm(a){ var note1=Math.floor(a/100); var note2=Math.floor((a%100)/50); var note3=Math.floor(((a%100)%50)/20); var note4=Math.floor((((a%100)%50)%20)/10); document.write("100: "+note1 + " 50: "+ note2 + " 20: " + note3 + " 10 " + note4); } atm(50);
true
a890060136c2a9677e18a5c12fe3389efb47cc61
JavaScript
ProZoom/Code
/4-JavaWeb/0-EditTest/test.js
UTF-8
19,325
4.0625
4
[]
no_license
var konggestr="        "; //空格 printf(konggestr+"===========数组===========") //变量是松散型的,可以指向任意类型的数据 var name = "student",age=12; //underfined、null、boolean、string、number为基本数值类型。逗号一并定义初始化多个变量。基本包装类型String、Boolean、Number通过valueOf()可以获取基本数值类型,可以实现自动装箱和拆箱操作。 var names=[];//定义数组并初始化为空 names = ["小明","小红"...
true
8d172d5143aaf88756d7c1ee14b337de045a3dbe
JavaScript
L8HER/Website-With-Games
/Tic-Tac-Toe.js
UTF-8
3,251
3.53125
4
[]
no_license
let OrigBoard; const Player1= 'O'; const Player2= 'X'; const AiPlayer= 'X'; let gameTurn=0; let Ai; let empty; const winCombos=[ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 4, 8], [2, 4, 6], [0, 3, 6], [1, 4, 7], [2, 5, 8] ] const cells=document.querySelectorAll('.cell'); startGame(); f...
true
2a26e7201190f297f2ecf266598a7fec12a4218f
JavaScript
phamus/Place-sharing-backend
/src/components/user/user.services.js
UTF-8
1,087
2.515625
3
[]
no_license
const User = require("./user.model"); const HttpError = require("../../library/helper/errorHandlers"); const bcrypt = require("bcryptjs"); exports.signUp = async data => { const { email, name, password } = data; let hashedPassword = await bcrypt.hash(password, 12); const user = new User({ name, image: ...
true
21e6f1949d6929b1eb5dff0a361d37b03bce5976
JavaScript
bmanandhar/FCC_Basic_Algorithm
/236_02_factorial.js
UTF-8
151
3.125
3
[]
no_license
//#232 function factorialize(num) { var factorial = 1; for (var n = 2; n <= num; n ++) factorial *= n; return factorial; } factorialize(5);
true
85831d4f543b931f4b4595736b9a72bf7ac8ea63
JavaScript
Servoy/svyMultiLevelMenu
/svyMultiLevelMenuExample/forms/main.js
UTF-8
1,908
2.59375
3
[ "MIT" ]
permissive
/** * Callback method when form is (re)loaded. * * @param {JSEvent} event the event that triggered the action * * @private * * @properties={typeid:24,uuid:"33C2865D-9CDF-4253-ABD7-334B68E2F386"} */ function onLoad(event) { var OM6 = { itemId: 'OrderF', text: 'Order F', enabled: false } var OM5 = { i...
true
418e996293acc91921427e9805b320bb231e2de1
JavaScript
la-celton/zen-pokeapi
/sources/pokemon-ui/app/jspm_packages/npm/twitter-stream-channels@1.0.0/examples/online/simple.keywords.js
UTF-8
1,363
2.53125
3
[ "MIT" ]
permissive
/* */ (function(process) { var TwitterStreamChannels = require('../../main'); var credentials = require('../../twitter.credentials.json!systemjs-json'); var timeout = 10000; var client = new TwitterStreamChannels(credentials); var connected = false; var channelsInput = { "colors": "blue,white,yellow,gr...
true
7e16936e68514f7a397b0ff226aaf911c4986b8d
JavaScript
kgraves/ctci
/edition4/js/ch04/4-3.js
UTF-8
628
3.9375
4
[ "MIT" ]
permissive
function Node(value, left, right) { this.value = value; this.left = left; this.right = right; } function binSearch(lo, hi, array) { if (lo > hi) return null; var curr = Math.ceil((hi + lo) / 2); var node = new Node(array[curr]); node.left = binSearch(lo, curr-1, array); node.right = binSearch(curr+1,...
true
6273ba45b5d9bb107185d75fbcca0a85f22bea22
JavaScript
arian-ab/Rotate-star
/1.js
UTF-8
875
2.96875
3
[]
no_license
let start = document.querySelector('#start'); let Stop = document.querySelector("#stop"); let star = document.querySelector(".star"); let anim; var degre = 0 , zoom = 1 , zoom_c = 1, click_counter = 0; start.addEventListener("click" ,() => { starter = 0; click_counter++; if (click_counter == 1){ anim =...
true
46f74bc14691aabec3c25e7eb762049c77307c62
JavaScript
emi-sabathier/react-hooks-store-test
/store/store.js
UTF-8
1,202
2.953125
3
[]
no_license
// store.js import React, { createContext, useContext, useReducer } from 'react'; // permet de générer le provider de l'app const StoreContext = createContext(); const initialState = { favorites: [], }; const reducer = (state, action) => { console.log('reducer',state) switch(action.type) { case "A...
true
b8be82f7dace0ed22d40970d1335abef7eea7441
JavaScript
ShahzadSyed/CNC-Assignments
/JS-Assignment/chp_35_to_38/fac.js
UTF-8
356
4.65625
5
[]
no_license
function findFactorial(number){ var facorial = 1; while(number !== 1 ){ facorial = number * facorial; number--; } return facorial } var userInput = Number(prompt("Enter a number")); var result = findFactorial(userInput); console.log(`Factori...
true
774d60ba704f1ce32aadb482dd88eff825a066c7
JavaScript
dark-glich/Javascript-Topics
/Basic Topics/Scopes.js
UTF-8
824
4.125
4
[]
no_license
// Scopes /** * Scopes are determined lexically : * Lexical scope means that in a nested group of functions, * the inner functions have access to the variables and other resources * of their parent scope. */ var ParentVar = "parent variable" function child(statement) { console.log(statement + ParentVar)...
true
f67d2bf7accba0bcb35d9785fa468de47686651c
JavaScript
huangtonyj/CodingNotebook
/algorithms/bubbleSort.js
UTF-8
444
3.609375
4
[]
no_license
function bubbleSort(arr, sortFn = (a, b) => a - b) { const swap = (a, b) => { const temp = arr[a]; arr[a] = arr[b]; arr[b] = temp; }; for (let i = 0; i < arr.length; i++) { for (let j = 0; j < arr.length - 1; j++) { const currentEl = arr[j]; const nextEl = arr[j + 1]; if ...
true
e1ebe2f3b036c6908c7a52a3623316295b5f2730
JavaScript
swissquote/crafty
/packages/crafty/src/watch.js
UTF-8
3,392
2.75
3
[ "Apache-2.0" ]
permissive
/* * Taken from https://github.com/gulpjs/glob-watcher/pull/42/ * as glob-watcher will not be upgraded for the forseeable future */ const chokidar = require("../packages/chokidar"); const debounce = require("../packages/just-debounce"); const asyncDone = require("../packages/async-done"); const isNegatedGlob = requ...
true
60c7898a0283910cd8521ce196275c4c95fdbab0
JavaScript
strongliang/learn_node
/args.js
UTF-8
194
3.1875
3
[]
no_license
// slicing and summing // the first two are fixed: 'node', <program-name> console.log(process.argv.slice(2, process.argv.length).reduce( function(a, b) {return Number(a) + Number(b);} ));
true
f7f6d32407c49917867f82f4a6d3ca639a871013
JavaScript
coolkid2021/ineedmysprites1
/sketch.js
UTF-8
1,136
2.65625
3
[]
no_license
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; var bin1,bin2,bin3; var ground1; var paper; function preload() { } function setup() { createCanvas(1600, 700); engine = Engine.create(); world = engine.world; ground1 = new Ground(400,680,2800,20)...
true
68bb5044503b069cee010646692a46e80dcdd477
JavaScript
ogm710811/my-trello-api
/routes/card-routes.js
UTF-8
5,702
3
3
[]
no_license
const express = require('express'); const mongoose = require('mongoose'); const ListModel = require('../models/list-model'); const CardModel = require('../models/card-model'); const cardRoutes = express.Router(); /* Card Method Action Description POST createCard It will create a card ne...
true
c321aab8f1a071b8593139f770744649b64ef10a
JavaScript
alexh95/alexh95.github.io
/js/ImageStore.js
UTF-8
493
2.890625
3
[]
no_license
class ImageStore { constructor() { this.images = []; this.imageLoadedCount = 0; this.imagesToLoad = 0; } loadImage(src) { ++this.imagesToLoad; const image = new Image(); const reference = this; image.onload = () => ++reference.imageLoadedCount; image.src = src; const index = this.images.length; ...
true
28b1bcfa6556d6ec3c1e798754cf0bb5dcfab42f
JavaScript
shreyansh23/Music-Stream-App
/frontend/src/components/streamController.js
UTF-8
2,811
2.734375
3
[]
no_license
import React from 'react'; import { streamSocket } from '../webSocket.js'; export default class StreamController extends React.Component { constructor(props) { super(props); this.state = { url: "https://www.youtube.com/watch?v=Dx8J125s4cg", play: false, mute: false, duration: 0, ...
true
97889635c40e7002dd5408d84c4c8030fefbfe79
JavaScript
2789239172/react-note
/06.hook/src/component/04.useCallback.jsx
UTF-8
539
2.859375
3
[]
no_license
import React, { useState, useEffect, useCallback } from 'react' /* 返回一个函数, 第二个参数用于设定那些数据发生变化时才可以执行该函数, 用于一些由关联性的数据更改 */ export default () => { const [count, setCount] = useState(0) const [count2, setCount2] = useState(0) return ( <div> {count} <button onClick={() => {setCount(count+1)}}>ad...
true
2194d8e0918dd153320870d306db8e3cc124c35f
JavaScript
BlackHC/UnityDimRunner
/Assets/Custom/PlayerRepositioning.js
UTF-8
926
2.515625
3
[]
no_license
#pragma strict /* we always snap to the z axis */ static var repositionPlayer : boolean = false; static function GetRepositioningPivot(gameObject : GameObject) { return gameObject.transform.Find("RepositioningPivot") || (gameObject.transform.parent && gameObject.transform.parent.Find("RepositioningPivot")); } f...
true
ae7e93213e3e4aa654bb8ad84f03abaf4ab3cd38
JavaScript
iamAFengZi/NodeJS
/学习资料/01/02-fs/02-fs.js
UTF-8
3,921
3.875
4
[]
no_license
// // 1. 文件写入 // // 加载 fs 模块 // var fs = require('fs'); // // 创建要写入文件的字符串内容 // var msg = 'hello world!你好世界!'; // console.log('1111'); // // 执行文件写入操作 // fs.writeFile('./abc.txt', msg, 'utf8', function (err) { // // 如果此次文件写入操作成功,那么 err 就是 null // // 只要 err 不是 null,表示文件写入操作失败! // if (err) { // throw err; // ...
true
43aa69245c223a1b6c578b0196e4e57059f77864
JavaScript
bxhuynh/competitive-programming
/LeetCode/two-sum.js
UTF-8
370
3.15625
3
[]
no_license
/** * @param {number[]} nums * @param {number} target * @return {number[]} */ var twoSum = function (nums, target) { const N = new Map(); for (let i = 0; i < nums.length; i++) { N.set(nums[i], i); } for (let i = 0; i < nums.length; i++) { const findIndex = N.get(target - nums[i]); if (findIndex ...
true
07b6932691b6a4e64d21835fbf553d34ea63e7ec
JavaScript
dineshR86/ReduxAdvancedSample
/src/containers/search_bar.js
UTF-8
1,631
2.828125
3
[ "MIT" ]
permissive
import React,{Component} from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {fetchWeather} from '../actions/index'; class SearchBar extends Component{ constructor(props){ super(props); this.state={term:''}; this.onInputChange=this.onInputC...
true
84fdbf34cf2f01c10555e138841998494a0dc70d
JavaScript
SamAng219255/Amospia-Site
/misc/Calculator/integral.js
UTF-8
1,542
2.828125
3
[]
no_license
Math.integral = function (func,range,units) { var unit=(range[1]-range[0])/units; var total=func(range[0]); for(var i=(range[0]+unit); i<(range[1]-(unit/2)); i+=unit) { total+=(func(i)*2); } total+=ignore(func(range[1])); total*=(unit/2); return total; } Math.derivative = function (func,x,h) { return (func(x+...
true
d1a5f5ad3c4a24da2d29cdc91048f440b387495d
JavaScript
gou-le/ccobj2
/js/registerCopy.js
UTF-8
1,277
2.671875
3
[]
no_license
// $("#but").click(function(){ // var name = $("#name").val(); // var pwd = $("#pwd").val(); // var jonpwd = $("#pwdRton").val(); // var mtipName = judgeUser(name); // var mtipPwd = judgePwd(pwd); // var mitpJonPwd = judgeRepwd(pwd,jonpwd); // // console.log(mtipName,mtipPwd,mitpJonPwd)...
true
0f7f467c29b102cf2771c425d5aa48fabe1c0082
JavaScript
biginferno/Driven-Assesment
/src/board/column.js
UTF-8
3,992
2.765625
3
[]
no_license
import React, {Component} from 'react' import TilePiece from './tile-piece'; export default class Column extends Component { constructor(props){ super(props); //Initialize Column dimensions and player options this.state = { cur_col:0, cur_row:0, col_...
true
216ff192d8c4ca2b30125d438ddd31aac9f3856d
JavaScript
RiqueBR/homework701
/hw_pubsub_prime_checker_start/src/views/result_view.js
UTF-8
580
2.921875
3
[]
no_license
const PubSub = require('../helpers/pub_sub.js') const ResultView = function (){ }; ResultView.prototype.bindEvents = function () { PubSub.subscribe('PrimeChecker:result-calculated', (event) => { const check_prime = event.detail; this.displayResult(check_prime) }) }; ResultView.prototype.displayResult =...
true
d777a317bcf46e96552921fb847b154ae6464aef
JavaScript
ZhangCoder0812/web-
/.history/12 - ajax/1 - ajax的基础知识_20210419092017.js
UTF-8
7,303
3.046875
3
[]
no_license
/* ajax,axios,$ajax,fetch 的区别? - 都是基于TCP(HTTP/HTTPS)从服务器获取数据 - ajax,axios,$ajax 核心是XMLHTTPRequest fetch 是es6新增的Api,浏览器新提供的一种和服务器通信的机制 - ajax ajax:async javascript and xml 异步的js指的不是js异步编程,指的是页面局部刷新。 作用:实现 数据请求+客户端渲染 达到局部刷行 早期基于xml「可扩展的标记语言」的数据格式和服务器进行交互, 使用起来不太...
true
efe2a5f6de08f044c48160851d09bbcb05bbc46f
JavaScript
nkizito92/fewpjs-js-fundamentals-arithmetic-lab-online-web-ft-110419
/index.js
UTF-8
221
2.90625
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Write your code here // Write your code let num1 = 2 let num2 = 31 const multiply = num1 * num2 const random = Math.floor(Math.random(2) * 10) const mod = 10 % 6 const max = Math.floor(Math.max(1, 6, 7, 9, 2, 20))
true
fb8dbe8fd9e20ef98b2ed078c80756d5834f03a3
JavaScript
robison-brooks/robison-brooks.github.io
/Transitions/main.js
UTF-8
12,964
2.625
3
[]
no_license
function onload() { // document.getElementById("new").style.display = "none"; // localStorage.clear(); //remove this when done. document.getElementById("new").disabled = true; document.getElementById("search").disabled = false; document.getElementById("btn-group").style.display = "none"; var res = d...
true
a8cc05030a99f2ca6842f9bcbd2d68b2c0ecb55d
JavaScript
Slei03/Lab6_CSE110Shop
/scripts/script.js
UTF-8
1,048
3
3
[]
no_license
// Script.js window.addEventListener('DOMContentLoaded', () => { // TODO if(localStorage.getItem("products")==null){ console.log("gere"); fetch("https://fakestoreapi.com/products") .then(response => response.json()) .then(data => { localStorage.setItem("products", JSON.stringify(data))}...
true
3df27d894e38b99924a76c1eb1c400c0c34f25f3
JavaScript
shuimi/kubsu-webgl-lab
/src/components/webgl/utils/maths.js
UTF-8
522
2.734375
3
[]
no_license
import { mat4, vec3 } from 'gl-matrix'; export const toRadians = (deg) => deg * (Math.PI/180); export const createTransformationMatrix = (x, y, z, rx, ry, rz, scale) => { const matrix = []; mat4.identity(matrix); mat4.translate(matrix, matrix, vec3.fromValues(x, y, z)); mat4.rotateX(matrix, matrix, to...
true
9b6311ae01616268487ae20ab6afeb668d7d2ceb
JavaScript
teeeemoji/compute-anchor
/src/compute.js
UTF-8
2,368
2.578125
3
[ "MIT" ]
permissive
function getElementHeight(element) { if (element === window) { return window.document.documentElement.getBoundingClientRect().height; } else { return element.getBoundingClientRect().height; } } function getOffsetTopAndHeight(container, element, offsetTop = 0) { if (!element) { return -Infinity; }...
true
8085653be532fba01de5ec4fff60f2eee2014548
JavaScript
OleksandrUtkin/github-search-app
/src/store/actions/getRepos.js
UTF-8
1,145
2.625
3
[]
no_license
import axios from 'axios'; export const GET_REPOS_SUCCESS = 'GET_REPOS_SUCCESS'; export const GET_REPOS_FAILURE = 'GET_REPOS_FAILURE'; export const fetchReposSuccess = (repos) => { return { type: GET_REPOS_SUCCESS, payload: repos } }; export const fetchReposFailure = (errorMsg) => { retur...
true
20e739fa1facbb38ae86f7fd8333a4f9aa2f86ec
JavaScript
WellSantos-Dev/learning
/JavaScript/Conceitos Básicos/dimensões/dimensoes.js
UTF-8
931
3.09375
3
[]
no_license
/* O professor explicou que o .offSet mostra a dimensão dos elementos, porém, contando a borda, paddind... Acho que da pra resolver isso com * { box-sizing: border-box; margin:0; padding:0 } ... no css! O clientWidth pega a largura excluindo o scroll-bar o clientHeight não pega esse conteudo O scrollWidth e o s...
true
5886666073f639e977babac1afb63b1a7a9fa27d
JavaScript
deefactorial/openmoney-api
/test/util.js
UTF-8
1,834
2.6875
3
[ "Apache-2.0" ]
permissive
var NodeRSA = require('node-rsa'); exports.getRandomstring = function(length) { var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for (var i = 0; i < length; i++) text += possible.charAt(Math.floor(Math.random() * possible.length)); return text; }...
true
6d67772c17554a1f5687bd6f6011ff59bae69f4a
JavaScript
batrashi/JS_skills_demo
/fuses.js
UTF-8
3,114
3.6875
4
[]
no_license
/*Goal You are going to write a program to predict whether a specific usage pattern of electrical appliances will cause the main fuse to blow. You have three pieces of data. 1. There are n appliances in a room, each of them has an electrical current consumption value. 2. A usage pattern: you will click the powe...
true
80845490bda6d26a95051a6cbcb7d10315c950fe
JavaScript
guolijungg/MyGitHub
/6-1/6-1计算器/jsj.js
UTF-8
5,127
3.25
3
[]
no_license
//计算器盒子容器 var box = document.getElementById("box"); //工具栏 var close = document.getElementById("close"); var resize = document.getElementById("resize"); //结果面板 var res = document.getElementById("res"); var express = document.getElementById("express"); //计算面板的按键 var spans = document.querySelectorAll(".calcPanel ...
true
8cf2696ea694887dc85724f20f3d1c6baa25ef41
JavaScript
rodrigowe1988/Exerc-cios-Digital-House
/ex005.js
UTF-8
99
3.3125
3
[ "MIT" ]
permissive
//início de tudo: o tão famos `Hello World` var saudacao = `Hello World`; console.log(saudacao);
true
7f83a84a65f90592d6f0d53ae473bd8df506784d
JavaScript
CPSC362/TripCost
/assets/js/tests/trip-cost.js
UTF-8
1,813
2.703125
3
[]
no_license
// function: (function() { var tripCostObject; var vehicle; var directionsRequest; // Expecting googleDirectionsService global module("Trip Cost", { setup: function() { vehicle = new Vehicle({ year: 2006, make: "Scion", model: "tC"...
true
20e7691d523295287ce07a6d582bddaf208fc74a
JavaScript
Malaxor/modern-javascript
/09. JavaScript Patterns/05. Mediator Pattern/app.js
UTF-8
1,016
3.328125
3
[]
no_license
const User = function(name) { this.name = name; this.chatroom = null; } User.prototype = { send: function(message, to) { this.chatroom.send(message, this, to); }, recieve: function(message, frm) { console.log(`${frm.name} to ${this.name}: ${message}`); } } const Chatroom = function() { co...
true
512b7630631eae622223a3626c441e0c79b34dd9
JavaScript
relentlessbreakfast/constellation
/server/database/github-controller.js
UTF-8
1,396
2.59375
3
[ "ISC" ]
permissive
/* * @Author: kuychaco * @Date: 2015-06-10 16:19:56 * @Last Modified by: kuychaco * @Last Modified time: 2015-06-13 19:30:49 * * ---------------------------- * Connect to github API * Get issues from demo repo * Create issues for demo * ---------------------------- */ 'use strict'; var GitHubApi = require('github...
true
7630146f94169e64be577f1b6e8f99477ce26630
JavaScript
Slimmerd/RI0Fwebsite
/FrontEnd/ssr_ri0f_website/redux/auth-reducer.js
UTF-8
3,104
2.625
3
[]
no_license
import {AuthAPI} from "../api/api"; import {stopSubmit} from "redux-form"; import {notificationWindow} from "../utils/notificationWindow"; import Cookies from "js-cookie"; const SET_USER_DATA = '/auth/SET_USER_DATA'; const SET_AUTH_DATA = '/auth/SET_AUTH_DATA'; const AUTH_IS_FETCHING = '/auth/AUTH_IS_FETCHING'; const...
true
81fdab21f9bb841726afa088472f906a32a1b3a1
JavaScript
Zaryab123/node-article-app
/routes/articles.js
UTF-8
2,998
2.515625
3
[]
no_license
const express = require('express') const router = express.Router() const Article = require('../models/article') const User = require('../models/user') //Home page router.get('/', (req, res) => { Article.find({}, (err, articles) => { if (err) { console.log(err) } else { res....
true
bb6fb1f49caf23e58aebd56389902b9f34cacdbc
JavaScript
evocert/kweutils
/lib/vendor/scribe/js/scribe.mixin.events.js
UTF-8
1,888
2.6875
3
[]
no_license
(function(Scribe) { "use strict"; Scribe.mixin.events = { // Events on: function(types, fn) { var type, events, args; if (!fn) { return this; } types = types.split(/\s+/); events = this.events || (this.events = {}); args = Array.prototype.slice.call(arguments, 1); args[0] = this; wh...
true
0bb655165e13628ecb993cd9b40d559ac3d205c4
JavaScript
RadzhabovRoman/telcompany
/public/js/script_sumpay.js
UTF-8
417
3.109375
3
[]
no_license
document.addEventListener('change', function () { price = {}; price['static ip'] = 100; price['good number 500'] = 500; price['tarif1'] = 200; price['tarif2'] = 300; let sumArray = document.getElementsByName("answer"); let sum = 0; for (let i=0; i<sumArray.length; i++) { if (sumArray[i].checked) { ...
true
09f102a6e5c2eda5af74c49ab4c74e380c1f18a8
JavaScript
dzdidi/test_sheets
/compare_and_write/lib/compare_and_write.js
UTF-8
2,147
2.8125
3
[]
no_license
/* S. - Single Responsibility Principle - can be changed only due to the change invocation type of a function (spawns child process) O. - Open Close Principle - Closed for changes / no additions can be detected L. - Liscov Substitution Principle - invoked as a helper function I. - Interface Segregation Principl...
true
c5bf588733be581e664c47d361f95436b6a79972
JavaScript
patelrohan750/basic-javascript-concepts-
/IIFE (Immediately Invoked Function Expression)/index.js
UTF-8
913
4.15625
4
[]
no_license
/* IIFE (Immediately Invoked Function Expression) -->As the name suggests IIFE is a function in javascript which immediately invoked and executed as soon as it is defined. Variables declared within the IIFE cannot be accessed by the outside world and this way you can avoid global scope from getting polluted. So the...
true
dca13db350b05272f641b6c2fb2769be91833fa1
JavaScript
ywgu/jd
/generatetemplate2.js
UTF-8
5,544
2.578125
3
[]
no_license
/** * Created by William Gu on 2017/4/25. */ // NOTE: // 1. the x="123" must NOT have space between x and =; use code format before run this program // 2. NO transform for text or image component is allowed var fs = require("fs"); var path = require('path'); var stream = require('stream'); var transform = require('s...
true
c3f80d94be88d5bcefcbdc174f1abf457fbe6c90
JavaScript
ivanberry/basic-concept-on-React
/src/Components/Timer.js
UTF-8
798
2.625
3
[]
no_license
import React, { Fragment, PureComponent } from 'react'; // Impelement as PureComponent class Timer extends PureComponent { constructor() { super(); this.state = { count: 0 }; } componentDidMount() { this.interval = setInterval( () => this.setState(prevState => ({ count: prevState.count + 1 ...
true
3bed42a45d57547fc7a91a574187a627184c946f
JavaScript
varya/dichtbij-frontend
/environment/includes/js/common.js
UTF-8
92,705
2.765625
3
[]
no_license
/*----------------------------------------------------------------------------------------------*/ // Some common stuff /*----------------------------------------------------------------------------------------------*/ // Global list of js objects if (typeof (oLst) == "undefine...
true
fa5dc7cb40e1153d6fdc427a46327061c8474be1
JavaScript
dnbrwstr/colorchat-server
/src/lib/rateLimit.js
UTF-8
694
2.84375
3
[]
no_license
const LAST_HOUR_MAX = 1000; const LAST_MINUTE_MAX = 30; const LAST_SECOND_MAX = 1; let rateLimit = function (fn) { let lastHour = 0; let lastMinute = 0; let lastSecond = 0; return function (data, cb) { ++lastHour; ++lastMinute; ++lastSecond; if ( lastSecond > LAST_SECOND_MAX || la...
true
361668174447995dd706c5377ec025e7f284736a
JavaScript
stndrYdv306/imad-app-v2
/server.js
UTF-8
3,252
2.625
3
[]
no_license
var express = require('express'); var morgan = require('morgan'); var path = require('path'); var app = express(); app.use(morgan('combined')); var articleOne={ title:'Article one | Satyendra Yadav', heading:'ArticleOne', date:'February 11,2017', content: `<p> This is my first article with the he...
true
f52512b30308d95cd0032f358203617c8e626838
JavaScript
lebrygan/jeanforteroche
/js/manageComment.js
UTF-8
1,826
2.859375
3
[]
no_license
//Buttons for the visitor view var signalButtons = document.getElementsByClassName("signal"); for (var i = signalButtons.length - 1; i >= 0; i--) { signalButtons[i].addEventListener("click", (e)=>{ var signaled = new FormData(); signaled.append("comment", e.target.name); ajaxPost("http://cosmopoly.fr/contr...
true
4b3dce4ba49d7390a88ae505d276d605c4238ac6
JavaScript
artbegolli/node-app
/app/index.js
UTF-8
674
2.828125
3
[]
no_license
const express = require('express') const axios = require('axios') const request = require('request'); const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello!')) app.listen(port, () => { console.log(`Hello app listening on port ${port}!`) console.log('Making request to world service...
true
256ac0d8a1a26d0330bb37b7b30c4bba7e0385d5
JavaScript
egonzalias/burger_builder
/src/components/Burger/Burger.js
UTF-8
852
2.671875
3
[]
no_license
import React from 'react' import BurgerIngredient from './BurgerIngredients/BurgerIngredient'; import './Burger.css' const burger = (props) => { let ingredients = Object.keys(props.ingredients) .map(key =>{ props.ingredients[key] = props.ingredients[key] < 0 ? 0 : props.ingredients[key]; retu...
true
546883eea9058584d46875ac7ac3c2fff8776e25
JavaScript
Auugustocesar/goNode
/modulo1/Desafio/index.js
UTF-8
920
2.671875
3
[ "MIT" ]
permissive
const app = require('./config') const moment = require('moment') app.get('/', (req, res) => { res.render('main') }) app.post('/check', (req, res) => { // Tentei utilizar o novo jeito de se formatar data porem não deu certo, // ficou com invalid Date - moment(data, 'DD/MM/YYYY') const DATA_NASCIMENTO = moment(...
true
e68f0bbaf31cbfafb7ff95cd184d8e0736aa81b0
JavaScript
maxuapro/site-resume-dev
/src/pages/Story.js
UTF-8
1,077
2.515625
3
[]
no_license
import React from 'react' import classes from './Story.module.css' const Story = props => { return ( <> <h1 style={{ color: 'white', borderBottom: '1px solid aqua', marginBottom: '20px' }}>Story</h1> <div className={classes.storyblock}> <p className={classes.text}>Hi...
true
43adfd72ef91eede4ca7c9aca81c89df1103fe60
JavaScript
MihRajaa/props_checkpoint
/src/Profile/ProfileComponent.js
UTF-8
831
2.765625
3
[]
no_license
import React from 'react' import propTypes from 'prop-types' const ProfileComponent = (props) => { const {fullName, bio, profession, handleName} = props.data console.log(typeof(fullName)) return ( <div> {props.children}<br /> <strong>Full Name: </strong> {fullName} <br /> ...
true
860077b35d2576780ba5698060dc5596c5ccb43f
JavaScript
lybenson/algorithm
/leetcode/125.js
UTF-8
812
4.21875
4
[]
no_license
/** * 给定一个字符串,验证它是否是回文串,只考虑字母和数字字符,可以忽略字母的大小写。 */ /** * @param {string} s * @return {boolean} */ var isPalindrome = function(s) { s = s.toLocaleLowerCase() let left = 0 let right = s.length - 1 while (left < right) { if (!isValid(s[left])) { left++ continue } if (!isValid(s[right...
true
bbb4c9b6b8edaf28b3d41124474ae6164f9ffee8
JavaScript
kapopken/chrome-extension
/spec/commonpygmy.js
UTF-8
2,616
2.875
3
[ "Apache-2.0" ]
permissive
describe("commonpygmy", function() { describe("addFilterInput", function() { it("adds the input to the node", function() { var input = { id: 'the-id' }; var parent = { appendChild: function() {} }; spyOn(parent,'appendChild'); commonpygmy.addFilterInput(input, parent); expect(parent.appendChild).toHa...
true
cabaf7f0baa57f21514bf235dd8b1d3fe6a83085
JavaScript
ericandrewlewis/learn-html-game
/script.js
UTF-8
1,672
2.625
3
[]
no_license
const textareas = document.querySelectorAll(".codemirror-readonly"); for (let i = 0; i < textareas.length; i++) { const editor = CodeMirror.fromTextArea(textareas[i], { mode: "text/html", theme: "one-dark", tabSize: 2, readOnly: true }); } const iframe = document.querySelector(".document-display-i...
true
07a074b5b1250946211c055566d6aa5ea6a14005
JavaScript
adrianoosses/final-front
/src/containers/Profile/Profile.jsx
UTF-8
3,141
2.65625
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import axios from 'axios'; import './Profile.css'; import CURRENT_URL from '../../constants/constants'; export default class Profile extends Component { constructor() { super(); this.state = { users: [], products: [], }; ...
true
cb43268eae7ecc8a253e33c98a5540dc3959903f
JavaScript
EMDevelop/bankTechTest
/src/bankAccount.js
UTF-8
269
2.578125
3
[]
no_license
class BankAccount { constructor() { this.transactions = []; } getStatement() { const statement = new StatementReport(); return statement.create(this.transactions); } storeTransaction(transaction) { this.transactions.push(transaction); } }
true
ba0189590e9646a6327a8884188f5aa80a2322fe
JavaScript
Thefakedeal/shopdharan-app
/hooks/useFetch.js
UTF-8
800
2.84375
3
[]
no_license
import { useState, useEffect } from "react"; export default function useFetch(url) { const [loading, setLoading] = useState(true); const [result, setResult] = useState(); const [err, setErr] = useState(""); useEffect(() => { const fetchItems = async () => { let options = { method: "GET", ...
true
aff75f36a89f6d1567c7af174767cfce80d238e9
JavaScript
poncho02/soap_inventory
/controller/controllerDownload.js
UTF-8
2,839
2.625
3
[]
no_license
'use strict' const { Parser } = require('json2csv'); const soap = require('soap'); exports.download = async (req, res, next) => { var url = process.env.url; var args = { cliente: process.env.client_id , llave: process.env.key_id }; soap.createClient(url, function(err, client) { client.ObtenerLis...
true
c7349dba8a8dadb5c7bf31dc3fedbd975554081c
JavaScript
rayzlui/l33t_code
/modifyString.js
UTF-8
715
3.765625
4
[]
no_license
//From 1576 in LeetCode /** * @param {string} s * @return {string} */ let alphabet = 'abcdefghijklmnopqrstuvwxyz'.split(''); let alphabetIndex = alphabet.reduce((acc, curr, index) => { acc[curr] = index; return acc; }, {}); function modifyString(s) { let string = ''; for (let i = 0; i < s.length; i++) { ...
true
32226b138422ce7fff39fe94d3977d6c661dd699
JavaScript
mpwoz/site-tracker
/js/background.js
UTF-8
2,660
3.09375
3
[]
no_license
// Global variables to keep track of state var currentUrl = null, // The domain of the page we're currently on startTime; // The milliseconds time that we first visited the page var updateCurrentTab = function() { // get the currently active tab in the currently focused window chrome.windows.getCurre...
true
18d7e6e1b59ef08f2462a14ae37790078a18cb66
JavaScript
xxxupnodown/normalTest
/仿网易云 动态轮播/jsonserver.js
UTF-8
518
2.78125
3
[]
no_license
function ajax(params){ var myRequest if (window.XMLHttpRequest){ myRequest = new XMLHttpRequest(); }else if (window.ActiveXObject){ myRequest = new ActiveXObject('Microsoft.XMLHTTP'); } myRequest.open("GET",`http://localhost:3000/${params.url}`, true); myRequest.send(); myRequest.onreadystatechange = functio...
true
01703aa3939aa96753b9788eae104b7be49e12f3
JavaScript
harshiv7/cse-chapter
/js/preloader.js
UTF-8
670
2.578125
3
[]
no_license
$(document).ready(function() { var counter = 0 ; var c = 0; var i = setInterval(function(){ $(".loadingPage .counter h1").html(c); $(".loadingPage").css("width" ,c + "%" ); counter++; c++; if(counter == 101){ clearInterval(i); } }, 50); $(...
true
08a882e03fd528c0bf43ff7e07d8e71ceb5d3020
JavaScript
wangjuanwjww/class
/ajax/ajax.js
UTF-8
660
2.953125
3
[ "Apache-2.0" ]
permissive
function ajax(obj){ var xhr=new XMLHttpRequest(); obj.url+='?rand='+Math.random(); xhr.onreadystatechange=function(){ if(xhr.readyState==4){ if(xhr.status==200){ obj.success(xhr.responseText); } } } var params=[]; for(var name in obj.data){ var key=encodeURIComponent(name); var value=encodeURIC...
true
89ab2750f1d3f1c2067b7d4450795be5dfed0087
JavaScript
diabagatekelly/python-capstone
/static/script.js
UTF-8
3,877
2.609375
3
[]
no_license
$(".results-list").each(function() { let item = $(this)[0] let itemText = item.innerText let lastLetter = itemText[itemText.length-1]; if (lastLetter === ',') { let updatedItem = itemText.slice(0, itemText.length-1); $(this).text(updatedItem) } }) $(".span-results-list").each(function() { let child...
true
d1c835123c52842a7ed26fb292ac01920b42875d
JavaScript
kevinamorim/ComputerNetworkSecurity
/content/scripts/scripts.js
UTF-8
2,930
3.5
4
[]
no_license
// str -> String to process // key -> Key used to cipher/decipher // mode -> 0 - decipher ; 1 - cipher function process(str, key, mode) { var result = ""; var k = 0; for(var i = 0; i < str.length; i++) { var charCodeOriginal = str.charCodeAt(i); if(charCodeOriginal < 65 || charCodeOriginal > 90) continue; ...
true
598502bfc32163d7424d93ce1f202def92b61ee6
JavaScript
evgenyneu/two_galaxies
/js/trajectories.test.js
UTF-8
1,591
3.078125
3
[ "LicenseRef-scancode-public-domain", "Unlicense" ]
permissive
import { init, update } from './trajectories.js'; var expect = chai.expect; describe('Trajectories', () => { it('init', () => { var positions = [1, 0, 0, -1, 0, 0]; let size = 5; let result = init(positions, size); expect(result.points).to.equal(1); expect(result.trajectories[0].length).to.equ...
true
1eaca703dcc673175c0aaa112c37239d101ed8c2
JavaScript
manish9may/Javascript-concepts
/hackerrank-problems-master/max-toys.js
UTF-8
475
3.265625
3
[]
no_license
function processData(input) { var num = input.split("\n"); var NandK = num[0].split(" "); var n = parseInt(NandK[0]); var k = parseInt(NandK[1]); var prices = num[1].split(" "); prices.sort(function(a, b) {return a - b}); var count = 0, sum = 0; for (var i = 0; i < prices.length; i++) { sum += parse...
true
4028f012a0a3c816835c1a86e1dbe8941ea6ce87
JavaScript
DEVANGKUSHWAH/collabwizard-frontend
/src/utils/cookies.js
UTF-8
414
2.578125
3
[]
no_license
import { Cookies } from "react-cookie"; const cookies = new Cookies(); export function getCookie(name){ cookies.get(name); // console.log("Get Cookies"); } export function setCookie(name,value,options){ cookies.set(name,value,options); // console.log("Cookies Stored") } export function removeCooki...
true
172e1f9469f65a7640e7f94985aa6a5562ca0227
JavaScript
conort/NodeTest
/ps-intro-to-node/node-1-intro/3-callback.js
UTF-8
529
3.765625
4
[]
no_license
var maxTime = 1000; var evenDoubler = function(v, callback){ var time = Math.floor(Math.random()*(maxTime+1)); if(v%2){ callback(new Error("Odd input"), 0, time); } else { callback(false, v*2, time); } }; var handleResults = function(err, results, time){ if(err){ ...
true
91c21db97ece690066d936ef495ce716e9fb00a7
JavaScript
amclin/advent-of-code
/2018/day-01/part-2/chronalCalibrator.js
UTF-8
1,027
3.125
3
[ "MIT" ]
permissive
const parseData = require('../../inputParser').parseData /** * Calculates a frequency from a list of values * @param {String} input list of values */ function getFrequency (input) { const adjustments = parseData(input) return adjustments.reduce( (total, current) => total + current ) } /** * Finds the fi...
true
ff76d8399ba17be143a918f6b72bbd079924e192
JavaScript
N2AZ/SangRoyale
/screenshot.js
UTF-8
1,013
2.78125
3
[ "MIT" ]
permissive
var system = require('system'); // Web Address (URL) of the page to capture var url = "http://www.salemioche.net/html.php"; // File name of the captured image var file = "saveit" + ".png"; var page = require('webpage').create(); // Browser size - height and width in pixels // Change the viewport to 480...
true
83761d723243cec41cdd4f96cba6e67336038e96
JavaScript
CamiloSerrano95/LoginFirebase
/app.js
UTF-8
2,785
2.953125
3
[]
no_license
function registrar() { alert("Diste un click registar"); var email = document.getElementById('email').value; var pass = document.getElementById('contrasena').value; console.log(email +" "+ pass); firebase.auth().createUserWithEmailAndPassword(email, pass) .then(function(){ verif...
true
613449a8456d0f2fb3718fe51f3bdef538824341
JavaScript
Ruchichauhan2007/bloom
/bloom/dashboard/script/js/supplies.js
UTF-8
10,537
2.765625
3
[]
no_license
var cardList; var PatientSupplyInfo = null; var SupplyConfigInfo = null; $(document).ready(function() { var id = $("#contextPatientId").val(); if (id != "" && !isNaN(id)) { addButtons(); $("#name").html($("#contextPatientName").val()); } else { id = $("#currentUserId").val(); ...
true
48bbd7378d41487071eb176866181d21f92af0af
JavaScript
juissi999/meerkat
/server/handlers/fileHandlers.js
UTF-8
2,407
2.578125
3
[ "MIT" ]
permissive
const multer = require('multer') const path = require('path') const fs = require('fs') const File = require('../models/file') // use webpack config file to get build directory const wpconf = require('../../webpack.config') const builddir = wpconf.output.path const MAX_UPLOAD_SIZE = Number(process.env.MAX_UPLOAD_FILE_...
true
023a5c7e87a85cc62bc478f45f25c8e0d38ecb82
JavaScript
lvwanting/task0003-me
/js/gtd.js
UTF-8
22,521
2.734375
3
[]
no_license
var cate; var childCate; var task; var cateText = '[' + '{' + '"id": 0,' + '"name": "默认分类",' + '"child": [0]' + '},' + '{' + '"id": 1,' + '"name": "百度IFE项目",' + '"child": [1, 3]' + '}' + ']'; var childCateText = '[' + '{' + '"id": 0,' + ...
true
3d4692acbe654b994c05c77bb1f71244b9124d95
JavaScript
nimbus2009/Bouncing-bubbles
/sketch.js
UTF-8
1,030
3.4375
3
[]
no_license
var balls=[]; var des; function setup() { createCanvas(windowWidth,windowHeight); des=createButton("Destroy"); des.position(20,100); des.mousePressed(destroyB); } function draw() { background(0,191,255); for(var x=0;x<balls.length;x++) { balls[x].update(); balls[x].display(); } text("Click a...
true
6465d6529a80299e5ef09c1cf1ffa446167b6ce5
JavaScript
rosariohg/Aplicaciones-Web
/6. librerias/proyecto/underscore.js
UTF-8
958
3.25
3
[]
no_license
var _=require("underscore") // var lista = [1,2,3,4,5,6]; // _.each(lista,function(item){ // console.log(item); // }) var empleados = [ { "id":1, "name":"soni", "designation":"SE", "salary":25000 }, { "id":2, "name":"rohit", "designation":"SSE", "salary":35000 }, { "id":3, "name":"akansha",...
true
ee52af8ef53f0c5961f61a46b10a4cec083e7580
JavaScript
dannycoole/Waffle-Bastion
/handlers/levelHandler.js
UTF-8
4,330
2.65625
3
[ "GPL-3.0-only" ]
permissive
/** * @file levelHandler * @author Sankarsan Kampa (a.k.a k3rn31p4nic) * @license GPL-3.0 */ const levelUpMessages = xrequire('./assets/levelUpMessages.json'); /** * Handles user's experience points and levels * @param {Message} message Discord.js message object * @returns {void} */ module.exports = async mes...
true
1ea3c41ddc26350b60dde2ccac0c3c3fb420e81c
JavaScript
norayr-h1-y/project
/xotaker.js
UTF-8
2,231
2.96875
3
[]
no_license
var LivingCreature = require("./mayr-class.js"); module.exports = class Xotaker extends LivingCreature{ constructor(x, y, index) { super(x, y, index); this.energy = 5; this.directions = []; } stanalNorKordinatner() { this.directions = [ [this.x - 1, this.y - 1], ...
true