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
b6925988678bf0280493b346e6130b11f45b8027
JavaScript
gnirala254/invoice-pdf-generator
/src/store/reducers.js
UTF-8
606
2.671875
3
[]
no_license
const initialState = { quantity: "", rate: "", amount: "", tax: "", discount: "", total: [], }; export const MyReducer = (state = initialState, action) => { switch (action.type) { case "QUANTITY": return { ...state, quantity: action.payload, }; case "RATE": retur...
true
fbe46a91f8acfc8959197cd5e3aba0ebb7cf00dd
JavaScript
slaFFik/EnvatoBalance
/1.0/background.js
UTF-8
2,260
2.90625
3
[ "MIT" ]
permissive
// Force reload the balance once clicked on an icon chrome.browserAction.onClicked.addListener(function(tab) { do_request(true); }); function do_request(stop){ var error = false; var balance = false; var results = false; var username = localStorage["envato_username"]; var key = local...
true
332bf1ba8d8902e59a4df9f25fe13c8158d77528
JavaScript
handeebrar/react-tutorial
/es6/filter.js
UTF-8
118
3
3
[]
no_license
const numbers = [1,2,3,4,5]; const controlNumbers = numbers.filter(number => number < 3); console.log(controlNumbers);
true
8e8059f5558c790d5edb68f2c161c185825dfeaa
JavaScript
BillyBernard/web-sprint-challenge-single-page-applications
/cypress/integration/form_test.spec.js
UTF-8
1,490
2.625
3
[]
no_license
describe("Forms App", () => { beforeEach(() => { cy.visit('http://localhost:3000/pizza'); }); // Helpers const nameInput = () => cy.get('input[name=name]'); const sizeInput = () => cy.get('select[name=size]'); const pepperoniInput = () => cy.get('input[name=pepperoni]'); const bananaPep...
true
76efeed52a12d8cd194159a2f1e08c791a5ab8ba
JavaScript
saradoubleu/deck-of-cards
/src/components/App.js
UTF-8
1,619
2.578125
3
[]
no_license
import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import Button from "./Button/Button"; import CardDeck from "./CardDeck/CardDeck"; import "../i18n"; import { cardSuite, cardRank } from "../data/data"; import { standardCardDeckGenerator, shuffle } from "../helpers/cardGeneration";...
true
50c328e5112fb55664e2aad4e72bf66d5ef817a4
JavaScript
olaysco/timetable-generator
/public/js/dashboard/index.js
UTF-8
1,559
2.84375
3
[ "MIT" ]
permissive
/** * An object for managing tasks related to courses */ function Timetable(url, resourceName) { Resource.call(this, url, resourceName); } App.extend(Resource, Timetable); Timetable.prototype.init = function() { var self = this; Resource.prototype.init.call(self); $(document).on('click', '.print-bt...
true
6fb4b0d998567034c0511e4c1885c2b4d945fc1d
JavaScript
BZF8989/Distance2Pi
/src/assets/utils.js
UTF-8
1,835
3.5625
4
[]
no_license
export function distinctCountries(array) { return [...new Set(array.map(x => x.country))]; } /* object to map @return map<any, any> */ const objectToMap = (obj => { const map = new Map(); Object.keys(obj).forEach(key =>{ map.set(key, obj[key]); }); return map; }); /* Map to array */ fun...
true
5bf1a5c26c7a673fa7d013c4f3c938b14a04173b
JavaScript
minhd/playground
/flickr/app/scripts/main.js
UTF-8
772
2.515625
3
[]
no_license
$(function(){ searchFlickr('hero'); }); $(document).on('submit', '#search_form', function(e){ e.preventDefault(); searchFlickr($('#query').val()); }); function searchFlickr(search_term){ $('#result').html('Loading...'); $.getJSON('http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?', { tags: ...
true
7e16eec6157a1ecd74cf6408c92a0f47b1c96248
JavaScript
jasontread/sierra-os
/www/html/lib/SRAOS_AjaxServiceParam.js
UTF-8
3,696
2.75
3
[]
no_license
// {{{ Header /* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ | SIERRA::OS : PHP RIA Framework http://code.google.com/p/sierra-os | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ | Copyright 2005 Jason Read ...
true
3d027da5e3b13944fbe000bcd98c8fa19ebd345a
JavaScript
codertony/learn-demo
/2.promise/hisotry2/1.promise.js
UTF-8
327
2.65625
3
[]
no_license
let Promise = require('./promise'); let p = new Promise((resolve, reject) => { setTimeout(() => { reject('没钱了') }, 1000); }); p.then((data) => { console.log(data); }, (err) => { console.log(err); }) p.then((data) => { console.log(data); }, (err) => { console.log(err); }) console.log(2)...
true
e2df10b40eabe9c7b1580493d8ecc6792463e61b
JavaScript
jasomusc/ShoppingCart
/ShoppingCartWeb/Scripts/PageScripts/Home.js
UTF-8
6,497
2.875
3
[]
no_license
//HARDCODED VARIABLE FOR DEMO var cartId = 2; //Page Ready $(document).ready(function () { GetItems(); GetCartItems(); }); //Rebind Items after a change function ReBindItems() { $('#divCartItems').attr("hidden", "hidden"); $('#divCartItemsLoading').removeAttr("hidden"); $('#divCartItems').empty(...
true
a9cd4e86b84b1016f4d095993624470f77ccc9c2
JavaScript
jtomaszon/blackECM
/web/static/lib/nav.js
UTF-8
1,176
2.765625
3
[ "MIT" ]
permissive
/* A ideia deste modulo e servir para navegação de paginas, assumindo que este é um Single Page App. */ define(['jquery'], function($) { var mainContext = $('#main-context'); /* Este metodo substitui o div principal main-context */ function toPage(options, isSection) { var navDiv = mainContext; if(isSectio...
true
450d967cf203055b65b50d187f36e105ed616b40
JavaScript
dtalley/Station
/client/source/web/index.js
UTF-8
5,027
2.609375
3
[]
no_license
//console.time = function(){}; //console.timeEnd = function(){}; Orionark.Application = function() { this.onNetworkMessage = this.onNetworkMessage.bind(this); this.onClientReady = this.onClientReady.bind(this); this.onBaseLoaded = this.onBaseLoaded.bind(this); this.onWindowResized = this.onWindowResize...
true
295ace8f56aefa66c26b4e861acf79fc311ec630
JavaScript
albiurs/edu_codecademy_full-stack-engineer
/src/02_learn_javascript/06_arrays/03_update_elements.js
UTF-8
756
4.8125
5
[]
no_license
// Update Elements // In the previous exercise, you learned how to access elements inside an array or a string by using an index. Once you have access to an element in an array, you can update its value. let seasons = ['Winter', 'Spring', 'Summer', 'Fall']; seasons[3] = 'Autumn'; console.log(seasons); //Output: ['W...
true
375dba9031ec55e3305e756786da28cc3205837b
JavaScript
eryhuang/CruzHacks-1
/public/main.js
UTF-8
8,288
2.6875
3
[]
no_license
var submitButtonElement = document.getElementById('submit'); var messageInputElement = document.getElementById('message'); var messageFormElement = document.getElementById('message-form'); var messageListElement = document.getElementById('messages'); var initialized = false; // this boolean flag is used so we don't t...
true
0e315984a7d4f1583921b516a1a15c0e2906e9b5
JavaScript
everett-lee/GaussCalculator
/src/components/utils/StringToFractionUtil.js
UTF-8
816
3.421875
3
[]
no_license
// 0 or 1 dash followed by optional digits and 0 or 1 slash // then optional digits const RE = /^-{0,1}\d*\/{0,1}\d*$/; const maxValLength = 10; /** * Checks that an input String can be * parsed as a fraction * * @param {String} val * @param {Number} maxLength */ const checkFraction = (val, maxLength = maxV...
true
89cfd82c62137e2321c7410913a3d1fc112206ee
JavaScript
airic-j/tour-de-brews
/scripts/adminView.js
UTF-8
5,009
2.546875
3
[]
no_license
(function(module){ var adminView = {}; adminView.init = function() { console.log('should load the admin page'); $('section').hide(); $('#admin').show(); $('#routeSubmit').click(newRide); adminView.initMap(); }; // start map var map; // initialize map and other details adminView.initMa...
true
a7ff34babced473b3d2d92265c6682245a99d5ee
JavaScript
SachinKalsi/currency-api
/util/change-base-currency.js
UTF-8
1,682
2.984375
3
[]
no_license
const currencies = require('../constants').currencies; function changeBaseCurrency(source, destination, currency_values, price) { // source : currency in which currency_values are present // destination: destination currency // currency_values: array of objects of the form ( {name: 'INR' , value: 100}) ...
true
be2302bcd9110fbc11b284bc96ee1946b52bced1
JavaScript
Jonathanko52/JobHuntApp
/src/server/taskController.js
UTF-8
4,424
2.546875
3
[]
no_license
const axios = require("axios"); const cheerio = require("cheerio"); module.exports = { retrieveHtmlSimplify: (req, res) => { console.log("SMPLIGY HIT", req.params); let jobTitle; let company; let companyLink; let location; req.body = axios .get("https://simplify.jobs/p/" + req.params.li...
true
a13d3f3c1aa33191b6a26e65e26faae2280a9069
JavaScript
Http127001/todo
/src/components/addForm/validation.js
UTF-8
573
2.53125
3
[]
no_license
import { ADD_FORM_CONST } from "./constant"; export const validate = (values) => { const error = {}; error.title = ""; error.priority = ""; var titleValue = values.title; var priorityValue = values.priority; if (values.title === undefined) { titleValue = ""; } if (values.priority ===...
true
1a8fa53e65c67aedc192e48f6072cb1187b95f1b
JavaScript
Cirivas/prueba-ripley
/src/services/request-retry.js
UTF-8
558
2.59375
3
[]
no_license
import request from 'request'; const SIMULATED_ERROR_RATE = 10; // Represents 10% const requestRetrier = options => new Promise((resolve) => { request(options, (error, r, response) => { if (error) { return resolve(requestRetrier(options)); } // Generate an integer between 0 and 100 // If it is...
true
cc9aeb35f548b0b69ddc9dc0a4e255a2e5fac469
JavaScript
nychka/payway
/www/js/modules/payment/service_interface.js
UTF-8
7,423
2.6875
3
[]
no_license
/** * Manifesto to any additional service, who wants to cooperate with payment block * * @author Nychka Yaroslav * @email y.nychka@tickets.com.ua * @date 21 September 2017 * @version 1.0.5 * * 1. MUST implement all functionality defined in this interface * * 2. MUST notify about any cost changes using notify(...
true
e2b8c838ff935f83e7c85ad0ad0407dab9b80328
JavaScript
RickCarlino/boxed_value
/build/index.js
UTF-8
972
3.203125
3
[]
no_license
"use strict"; function box(value) { // FIRST PASS: // Cover the "easy cases"- use cases where typeof doesn't act weird. switch (typeof value) { case "string": return { kind: "string", value: value }; case "number": return { kind: "number", value: value }; case "boolean": return { kin...
true
a61cda5b5b010f35965ffabd8450697714792c4c
JavaScript
DanHefrman/Resource-Store-2
/GOOGLE/qpp/traceur/test/feature/Syntax/ExpressionValidation.js
UTF-8
514
3.21875
3
[ "BSD-3-Clause" ]
permissive
"use strict"; // test MemberLookupExpression function f(a) { var b = [42]; return (a || b)[0]; } assertEquals(42, f(null)); assertEquals(43, f([43])); // test NewExpression var a, b = function () { this.ans = 42; }; assertEquals(new (a || b)().ans, 42); a = function () { this.ans = 43; }; assertEquals...
true
8ed389cfd8fcf8d7a2e12593f0fb1cc1eea1cfd6
JavaScript
mittmedia/site-scripts
/src/lib/client.js
UTF-8
1,735
2.765625
3
[]
no_license
/* Ta reda på skärmhöjd och bredd */ var getClientHeight = function() { return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight; }; var getClientWidth = function() { return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clie...
true
7f9865313a3634326a9586e1781334b0edfa81e2
JavaScript
greshnik557/testrepo
/Lab.4.js
UTF-8
1,237
2.921875
3
[]
no_license
/*Загрузка файла на сервер: создайте форму для загрузки файла на сервер. Напишите скрипт, который примет загружаемый файл и разместит его на сервере*/ let http = require('http'); let fs = require('fs'); let formidable = require('formidable'); http.createServer((req, res) => { if(req.url == '/upload') { le...
true
c20e6e3086abb869d705d706bc946e4ab5109055
JavaScript
lis874/lis874.github.io
/projects/random-boxes/main.js
UTF-8
213
2.59375
3
[ "MIT" ]
permissive
$(function() { $('.button').click(function(){ var number = (Math.floor(Math.random() * 5) + 1); $('.box').removeClass('color'); $('.box').eq(number).addClass('color'); console.log("number") }); });
true
7511367e276d7a923960f1572d415ff48d9e4af8
JavaScript
13Woods/lodash-source-code-analysis
/reject.js
UTF-8
1,105
3.140625
3
[ "CC0-1.0", "MIT" ]
permissive
import filter from './filter.js' import filterObject from './filterObject.js' import negate from './negate.js' /** * `filter`的相反方法, * 此方法 返回 predicate(断言函数) 不 返回 truthy(真值)的collection(集合)元素。 * * @since 0.1.0 * @category Collection * @param {Array|Object} collection 要迭代的集合 * @param {Function} predicate 每次迭代时调用的函...
true
60b0ccf07a30e656e6667b6fceb5d97c3e6257b3
JavaScript
turekjesse/quiver-client
/src/components/Boards/Boards.js
UTF-8
1,363
2.640625
3
[]
no_license
import { useState, useEffect } from 'react' import { Header, Grid, Image, Segment } from 'semantic-ui-react' const Boards = () => { const [boards, setBoards] = useState([]); const getBoardsIndex = async () => { try { const response = await fetch('http://localhost:8000/boards/'); const data = await respo...
true
01b497c176ec9839a18a8f185ff1abd959ff6b46
JavaScript
ArushCoder/Feed-the-rabbit
/sketch.js
UTF-8
1,096
2.9375
3
[]
no_license
var garden,rabbit; var gardenImg,rabbitImg; var apple,appleImg var Oranleaves,OranleavesImg function preload(){ gardenImg = loadImage("garden.png"); rabbitImg = loadImage("rabbit.png"); appleImg = loadImage ("apple.png") OranleavesImg = loadImage ("orangeLeaf.png") } function setup(){ createCanvas(400,4...
true
f74e8ba87166edbfdc81413c9573800f70f7938f
JavaScript
sRege28/twitter-sentiment
/services/webScraper.js
UTF-8
2,303
2.75
3
[]
no_license
var cheerio = require("cheerio"); var request = require("request") var links = new Array(); function scrapeData(company, cb) { request({"uri": company["URL"], "method": "GET"}, function (error, response, html) { this.ans = {}; this.ans.x = null; this.ans.company = company["Company Name"]; //con...
true
3ae4a97bd479b260098a1ddb3da665da07460112
JavaScript
NJIT-CS490-SP21/johnTICTACTOE
/src/Board.js
UTF-8
1,558
2.625
3
[]
no_license
import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import Box from './Box'; function Board({ username, userList, board, setBoard, moveCount, setCount, winner, socket }) { function onClickSquare(index) { if (board[index] != null || winner) { return; } let move = 'ERROR'; ...
true
940c0dbc25be677726f5d362bcb4c875fa5932fd
JavaScript
bxb0911/PCIG
/1.stack&queue/8.maxTree.js
UTF-8
2,059
3.5625
4
[]
no_license
// MaxTree // 数组必须没有重复元素 // MaxTree是一棵二叉树,数组的每一个值对应一个二叉树节点 // 包括MaxTree树在内且在其中的每一棵子树上,值最大的节点都是树的头 class Node { constructor(data) { this.value = data this.left = null this.right = null } } function getMaxTree(arr) { const nArr = new Array(arr.length) for (let i = 0; i !== arr.length; i++) { ...
true
09da66de79149cea4639b3fa51c7130048572a22
JavaScript
JanMouwes/uni-se2-project-reversi-online
/Reversi-Website/Static/src/js/modules/reversi/view/svg-util.js
UTF-8
1,056
2.71875
3
[]
no_license
Reversi.BoardElementFactory.SVGUtil = (() => { /** * * @param {Element} target * @param {Array | Object} attributes * @private */ let setAttributesNS = (target, attributes) => { if (!(target instanceof Element)) throw new Error("target not an HTMLElement"); if (attribute...
true
91bef05ca3fbbf9cec473403e2a163fa3779dace
JavaScript
shreyasck/GameDev
/Express/public/javascripts/home.js
UTF-8
1,239
2.515625
3
[]
no_license
/** /** * Updated by nasir 6:45 * Created by shreyas on 11/11/2016. */ $('input[type="submit"]').mousedown(function(){ $(this).css('background', '#2ecc71'); }); $('input[type="submit"]').mouseup(function(){ $(this).css('background', '#1abc9c'); }); $('#loginform').click(function(){ $('.login').fadeTog...
true
41bf96e29c3069e31e6dfeac5e79476bbae97002
JavaScript
TravelFiend/bike-shop
/products/render-bike.js
UTF-8
2,270
3.15625
3
[]
no_license
// import findById from '../common/utils.js'; let emptyCart = []; export const CART_KEY = 'cart'; export const addToCart = (theCart, id) => { let present = false; theCart.forEach(item => { if (item.id === id){ item.quantity++; present = true; } }); if (present){ ...
true
5bf68220f4ed1a43d59d9c40b384e5dfbc64a671
JavaScript
NathanielWroblewski/quasicrystalline-waveforms
/public/javascripts/app.js
UTF-8
883
2.640625
3
[]
no_license
(function () { const defaultOrder = 7 const width = 375 const height = 375 const frames = 80 const phases = utils.distribute(frames) // Canvas setup const element = document.querySelector('.wavebox') const context = element.getContext('2d') const next = loop => window.requestAnimationFrame(loop) /...
true
f30c85d4203107dd4c29c83a7c4cae8a8ced870d
JavaScript
saraheisa/electricitymap-contrib
/web/locales/translation-helper.js
UTF-8
1,205
2.765625
3
[ "MIT" ]
permissive
const fs = require('fs'); const readline = require('readline-sync'); require('colors'); const languages = fs.readdirSync('.') .filter(f => f !== 'en.json' && f.endsWith('.json')) .map(f => f.replace('.json', '')); console.log('Languages you can translate: ' + languages.join(', ').green); const language = readline...
true
a9ec6fd38d0a18be2f3a73d8fb3da27c3ae8d6f5
JavaScript
YeScraft/Skillfactory-module-c3_9-YeSergey
/main.js
UTF-8
4,210
2.796875
3
[]
no_license
text = document.querySelector("#city"); // При изменении поля ввода в городе вызывается функций сохранения названия города в cookies text.addEventListener('input', setSity); checked = {}; let frm = document.forms[0]; let fieldset = frm.elements.checkboxes; // При обновлении страницы, если в сookies сохранён г...
true
69f9ca3b72f3c8f6bd9b255e3a7a561e551e8feb
JavaScript
alexde57/PicoPlaca
/ext/validacion.js
UTF-8
1,680
3.15625
3
[]
no_license
function validateCampoTexto( campo ) { var regexp= /^[a-z]([a-z_])+$/i; if (campo.length > 60 || campo.length < 3 ) { return [false,"El campo de tener entre 3 y 60 caracteres!",""]; }else{ return [true,"",""]; } } function validatePass(campo) { var RegExPattern = /^([0-9a-zA-Z])+$/; ...
true
04eda8987ead852c5eeb572fcab98f5db196b4e6
JavaScript
Dev-Desk-Q/BackEnd
/middleware/restrict.js
UTF-8
1,270
2.8125
3
[ "MIT" ]
permissive
const jwt = require("jsonwebtoken") function restrict(role) { // user roles - student is base user, helper is admin const roles = ["student", "helper"] return async (req, res, next) => { const authError = { message: "Invalid credentials", } try { // Don't need cookies unless React 2 requireme...
true
c0b07b70b3ba8e84c97d5aa169e77aa1435e3cb3
JavaScript
NSergeiV/974273-code-and-magick-18
/js/stat.js
UTF-8
2,401
2.9375
3
[]
no_license
'use strict'; var CLOUD_Y = 10; var CLOUD_X = 100; var CLOUD_HEIGHT = 270; var CLOUD_WIDTH = 420; var SHADOW_CLOUD = 10; var COLUMN_WIDTH = 40; var COLUMN_HEIGHT = 150; var COLUMN_DISTANCE = 50; var LINE_HEIGHT = 20; var rivalPosition = CLOUD_X + COLUMN_DISTANCE; var maxTime = 0; window.renderStatistics = function (c...
true
14ef35a938ec7c696b39fdd9338ceee934b8d1f1
JavaScript
sehrish-ishaq92/Chapter-1-67-Js-
/chapter#35-38/Task8/hypo.js
UTF-8
174
2.984375
3
[]
no_license
var base=prompt("enter base"); var per=prompt("enter per"); var ans; function demo1(base, per){ ans= Math.sqrt(base*base + per*per); document.write(ans); } demo1(base, per);
true
723f17bc0b641a47cda6536c1c2999918a290902
JavaScript
PacktPublishing/Flux-Architecture
/Chapter 7/reacting-to-events/stores/my-store.js
UTF-8
1,185
3.078125
3
[]
no_license
'use strict'; import { EventEmitter } from 'events'; import dispatcher from '../dispatcher'; import { SORT } from '../actions/sort'; // Constants for the direction label // of the sort button. const ASC = 'sort ascending'; const DESC = 'sort descending'; class MyStore extends EventEmitter { constructor() { sup...
true
7654510701398d094ae57a68ca2c62cff7e7b75b
JavaScript
dhruvinparikh/defi-legos-trial
/scripts/migrate-imports.js
UTF-8
1,846
2.578125
3
[ "MIT" ]
permissive
#!/usr/bin/env node const { promises: fs } = require('fs'); const path = require('path'); const pathUpdates = { }; async function main (paths = [ 'contracts' ]) { const files = await listFilesRecursively(paths, /\.sol$/); const updatedFiles = []; for (const file of files) { if (await updateFile(file, upda...
true
7180d387d859ea2f92df0e8264a56d3852ab755c
JavaScript
123-mmz/SecondFile
/Secoprogram/src/js/guanggao.js
UTF-8
1,578
2.5625
3
[]
no_license
function guangGao(opt) { var defaultOpt = { iw: 300, ih: 300, } Object.assign(defaultOpt, opt); var box = document.getElementById(defaultOpt.ele); console.log(box); box.style.width = defaultOpt.iw + 'px'; box.style.height = defaultOpt.ih + 'px'; box.onmouseover = funct...
true
b2fc34181db0d2f0e32d9e06330230f9345d90c3
JavaScript
modularjs/backbone
/src/underscore/collections/where.js
UTF-8
547
2.78125
3
[ "MIT" ]
permissive
define([ 'underscore/collections/find', 'underscore/collections/filter' ], function (find, filter) { "use strict"; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. return function(obj, attrs, first) { var method = ...
true
4977f8939de72cdaa8ce95e008fc927b04285df6
JavaScript
cs-fullstack-2019-fall/javascript-classes2-cw-marcus110379-1
/index.js
UTF-8
875
4.5
4
[]
no_license
//alert("test"); // ### Exercise 1 // Create a Movie class. Make all the following attributes: movieName, rating, and yearReleased. Create three different methods to change each attribute. Outside of the class create two different Movie objects, assign values to each object, and print them to the console. class Movie...
true
b968926fc22bfa6b78d858ca5776b014ac8efc7b
JavaScript
podliashanyk/fs_project_frontend
/src/components/timeselection/TimeSelection.jsx
UTF-8
8,290
2.921875
3
[]
no_license
import React, { useState, useEffect } from "react"; import "./timeselection.scss"; /** * @author Sigmund Sandring <sigmundsgranaas@gmail.com> * * Renders a selectable timetable * * @deprecated * * @param {*} props * @returns React element time selection table */ function TimeSelection(props) { const [reserv...
true
84d073520671df8e0c36193f46bcebd4d8662ab6
JavaScript
mousedoc/ruriweb-contents-blocker
/core/storage.js
UTF-8
448
2.640625
3
[ "MIT" ]
permissive
let map = {}; map['active'] = false; var storage = chrome.storage.local; Storage = { set: function (key, value, callback) { var obj = {}; obj[key] = value; storage.set(obj, function (result) { callback(key, value); }); }, get: function (key, callback) { ...
true
6b19be5c20db25ab035416cf5d2280038c94a09c
JavaScript
NguyenMinhKha038/new
/src/commons/utils/rsa.js
UTF-8
869
2.703125
3
[]
no_license
import NodeRSA from 'node-rsa'; export class RSA { /** *Creates an instance of RSA. * * @param {string} encryptedKey * @memberof RSA */ constructor(encryptedKey) { this._encryptedKey = encryptedKey; this._key = new NodeRSA(); this.loadKey(); } loadKey() { this._key.importKey(thi...
true
29ba39757d769b85ec2a871e43a9a8001e4dff5a
JavaScript
ZoraidaRiosAjdie/Proyecto-integrado
/script/reserva.js
UTF-8
5,734
2.6875
3
[]
no_license
$(document).ready(function(){ var butaca = null; var tipoButaca = null ; var proyeccion = null; $.post("../controlador/proyeccion.php", function(r){ var obj = JSON.parse(r); var fechaHoy = new Date (); var milHoy = fechaHoy.getTime(); for (let i = 0; i < obj.length; i++) ...
true
76d5b5f99d8c89efd08b07505bafd9b604293bf1
JavaScript
Waingart/panel
/controllers/users/tpl/users.2.editor.js
UTF-8
2,878
2.53125
3
[]
no_license
$('#updateModal button.submit').click(function(){ var $btn = $(this).button('loading'); var postData = $("#updateModal form").serializeArray(); var formURL = '/users/update'; $.ajax( { url : formURL, type: "POST", data : postData, success:function(data,...
true
abf4db7b31213034a915b921e4a6bb63a571eda4
JavaScript
bouchat-marieange/react.js
/React.JS avec Anthony Welc - youtube/generateurDeCitations/src/components/App.js
UTF-8
3,496
3.203125
3
[]
no_license
import React from 'react'; // On importe React import Citation from './citation'; // On importe le fichier Citation (qui contient uniquement la citation et auteur) import citations from '../citations';// On importe le fichier citation à partir de son emplacement par rapport au fichier index.js donc ./ puisque dans le m...
true
950e649c25b0c143cd8e3226cfd6be3392ee6238
JavaScript
Janicehlobo/Downtown_Hfx
/scripts/showAttirbute.js
UTF-8
2,142
2.578125
3
[]
no_license
$(document).ready(function(){ $.post("scripts/database/ShowAttribute.php", null, function(data){ // Change the data from plain text that PHP echo'd to a JavaScript object data = JSON.parse(data); var p = document.getElementById("Attributestable"); var out = "<table>" + "<tr><th>"+ "s...
true
c67f70c5dbf467fce37a2d3a1a87e9147de690f3
JavaScript
ndstephens/JavaScript-360-algorithms
/3_Reverse-a-String/index.js
UTF-8
642
4.75
5
[]
no_license
// Reverse a String // Write a function that takes in a string and reverses its value // ('code') => 'edoc' const reverseString = str => { return str .split('') .reverse() .join('') } console.log(reverseString('code')) console.log(reverseString('reverse')) console.log(reverseString('hey buddy')) // // ...
true
3c29a80d44644da9405669ceb8c1e8e27bd1690f
JavaScript
chles/backgroundGradient
/index.js
UTF-8
4,112
3.03125
3
[]
no_license
// 1- Plugin // 2- Call ////// // 1- backgroundGradient plugin ////// (function($) { $.fn.backgroundGradient = function( options ){ var defauts = { "colors" : new Array( [237,80,83], // first color left [233,97,61], // first color right [237,25,76], // second colo...
true
f760ea76ff24beb678923107d6f159fbaaa71898
JavaScript
OlyaKr/alignment
/globalAlignment.js
UTF-8
2,700
3.0625
3
[]
no_license
//Global Alignment var doGlobalAlignment = function(firstSequence, secondSequence, outStructure) { var table = initializeTable(firstSequence, secondSequence); var way = initializeTable(firstSequence, secondSequence); for (i = 2; i < firstSequence.length + 2; i++){ table[i - 1][1] = (i - 2) * (- 2); way[i...
true
93964be52fcf9c8895e4747881250c8939103b94
JavaScript
vanokako/Vanya
/src/SoundManager.js
UTF-8
1,544
3.15625
3
[]
no_license
'use strict' class SoundManager { constructor() { this.audios = {}; // звуковые эффекты this.context = new AudioContext(); // аудиоконтекст this.loading = 0; // Количество загружающихся в данный момент звуков } load(files) { console.log("Loading sounds: ", files); ...
true
da39097f48f1b41a221a41140a8f5e9a1a0fd41b
JavaScript
JewelYueng/Logger
/logger/index.js
UTF-8
720
2.703125
3
[]
no_license
const log4js = require("log4js"); const layout = { type: 'pattern', pattern: '%d{yyyy-MM-dd hh:mm:ss} %h-%z %s %m%n' } class Logger { constructor(config) { Object.keys(config.appenders).forEach(a => { config.appenders[a].layout = layout }) log4js.configure(config) this.logger = log4js } ...
true
f411206e61647796917e210a6836f57c8cc6dd45
JavaScript
luhar63/ReactTimer
/app/components/Timer.jsx
UTF-8
1,447
2.75
3
[]
no_license
var React = require("react"); import Clock from 'Clock'; import Controls from 'Controls'; var Timer = React.createClass({ getInitialState:function (){ return { count : 0, timerStatus : 'stopped' }; }, componentDidUpdate : function (prevProps,prevState){ console.log("component Did updat...
true
374d8d338e614934f37c11a6becabd40200bed97
JavaScript
mattriese/hackOrSnooze
/js/nav.js
UTF-8
1,544
2.875
3
[]
no_license
"use strict"; /****************************************************************************** * Handling navbar clicks and updating navbar */ /** Show main list of all stories when click site name */ function navAllStories(evt) { console.debug("navAllStories", evt); hidePageComponents(); putStoriesOnPage(); ...
true
5a6517ddbce3e5b0cf914164b0c7b1baf7e53b82
JavaScript
NJUST-FishTeam/ProblemPackApp
/static/js/modules/filemanager.js
UTF-8
4,132
2.703125
3
[]
no_license
class FileManager { constructor(){ this.fs = require("fs"); this.path = require("path"); this.unzip = require("unzip"); this.archiver = require('archiver'); } readFile(filePath, successFunc, errorFunc){ this.fs.readFile(filePath,'utf-8', function(readErr, ...
true
bbf9ac59ecd3318de3bcd9eefff23ce659ad1ac9
JavaScript
apache/netbeans
/webcommon/javascript2.model/test/unit/data/testfiles/model/functionInGlobal.js
UTF-8
383
3.109375
3
[ "Apache-2.0" ]
permissive
function printSomething() { formatter.println("printSomething executed"); } var text = "hello from global"; this.printSomething(); function anotherFunction() { //this.printSomething(); this.anotherInAnother = function anotherInAnother() { formatter.println(text); } } this.anotherFunct...
true
b849a864e1b8495b52baa32c8dbeb7324f88f223
JavaScript
valeriavalles/Foro-de-Opinion
/public/js/topicRespuesta.js
UTF-8
2,009
3.078125
3
[]
no_license
var topicId = getParameterByName('topic_id'); /* Imprimir el tema del respectivo topic id */ const obtenerTema = function() { $.ajax({ url: `http://examen-laboratoria-sprint-5.herokuapp.com/topics/${topicId}`, // dataType: 'json', contentType: 'aplication/json' }).done(añadirTema) .done(obtenerRespu...
true
c19a4c17ee5272706e28f729a2dcb142f4274bea
JavaScript
haein919/webP
/c_code/e_jquery/js/src/ex_16_like_pinterest.js
UTF-8
4,084
3.109375
3
[]
no_license
// ex_16_like_pinterest.js (function($){ /** todo list * [o] 카드 js에서 구현하기 * [x] json 파일 생성해서 불러오기 / 이미지 리스트화 처리 * [o] 생성된 ul의 가로 크기를 li의 갯수만큼 담을 수 있도록 수정 */ // 실제 데이터 형식에서는 // [ // {"title":"카드 제목", "content":"카드내용", // "imgSrc":"random_001.jpg", "imgAlt":"이미지설명"}, // {"title":"카드 ...
true
140c05062b27ed241787c994b9e6d4393821428c
JavaScript
JazzFiend/AdventOfCode
/2015/Day01_NotQuiteLisp/NodeJS/main.js
UTF-8
783
3.5
4
[]
no_license
var fs = require("fs"); var calculateFloor = function(floorString) { var currentFloor = 0; var basementTracker = true; for (var i = 0; i < floorString.length; ++i) { if(floorString[i] === '(') { ++currentFloor; } else if(floorString[i] === ')') { --currentFloor; } else if(Number(floorStri...
true
55c7ef7540c4b6afd8835971b1b2bb39fcd69eaf
JavaScript
explicitjs/explicit
/lib/applyDefinitions.js
UTF-8
1,540
2.640625
3
[]
no_license
'use strict' function applyDefinition (options) { return definition => { if (definition._raw) { return definition._rawContent } let method = definition.$ let wraps for (const plugin of options.plugins) { const field = `$${plugin.name}` if (definition[field] === undefined || !plu...
true
d9f884baf9623a9a5437c154f503e4ec456a35ba
JavaScript
zygout1/host1
/commandes/roles.js
UTF-8
1,425
2.546875
3
[]
no_license
const Discord = require("discord.js"); module.exports.run = async (client, message, args) => { await message.delete(); const a = message.guild.roles.get("697971991361355806"); const embed = new Discord.RichEmbed() .setTitle(`Obtenez le rôle ${a.name}`) .setDescription(`Réagissez avec 🅰️ pour ...
true
26e314c8f022795899a0e62f6f2bcfdec25504ed
JavaScript
AlexeiDorofeev/leetcode
/src/new/1281.js
UTF-8
263
3.265625
3
[]
no_license
export function subtractProductAndSum(n) { const digits = Array.from(String(n), Number); const prod = digits.reduce((a, b) => a * b); const sum = digits.reduce((a, b) => a + b); return prod - sum; } const n = 4421; console.log(subtractProductAndSum(n));
true
0f1554331528202558f846953d28ad803caad9dc
JavaScript
krnets/codewars-practice
/7kyu/Alphabet war/index.js
UTF-8
1,823
4.25
4
[]
no_license
// 7kyu - Alphabet war /* There is a war and nobody knows - the alphabet war! There are two groups of hostile letters. The tension between left side letters and right side letters was too high and the war began. Write a function that accepts fight string consists of only small letters and return who wins the fight. ...
true
4ed549ece163f05bd564f84f7cab2e9a8fd75bbf
JavaScript
freebz/Express-in-Action
/ch03/ex3-3.app.js
UTF-8
293
2.921875
3
[]
no_license
// 예제 3.3 Express의 Hello, World var express = require("express"); var http = require("http"); var app = express(); app.use(function(request, response) { console.log("In comes & request to: " + request.url); response.end("Hello, world!"); }); http.createServer(app).listen(3000);
true
2317c1514292f350b9d4311f47a58dd3fa08b12e
JavaScript
eandy5000/db_intro
/server/public/assets/scripts/app.js
UTF-8
669
2.984375
3
[]
no_license
$(document).ready(function(){ $('#search').submit(function(event){ event.preventDefault(); var values = {}; $.each($(this).serializeArray(),function(i, field){ values[field.name] = field.value; }); $.ajax({ type:"GET", url: "/data", ...
true
3970197878c2ea893ad6b8fa5e9aadc130c1a11c
JavaScript
BGCX067/falconeame-svn-to-git
/trunk/falconeame.js
ISO-8859-1
1,153
2.625
3
[]
no_license
//Funcion a la que es llamada desde la barra function JoneameNotifier(doc){ $(doc).click(this.goToInbox); } JoneameNotifier.prototype = { goToInbox: function() { jetpack.tabs.open("http://joneame.net/mafioso/Juez_Falcone/conversacion"); jetpack.tabs[ jetpack.tabs.length-1 ].focus(); }, noti...
true
a8a3b902fed30069cb020accf4804bfebbeb7c98
JavaScript
napretko/receptko.github.io
/JS/nakupovalni-seznam.js
UTF-8
1,199
3.515625
4
[]
no_license
var input = document.getElementById("one-item"); var groceryContainer = document.getElementsByClassName("grocery-container")[0]; var count = 1; var currentVh = 100; input.addEventListener("keydown", function(event){ if(event.key == "Enter"){ addItem(); } }); function addItem(){ var item = "- " + document.ge...
true
63a956b056c118be73265d29d0a94047e244461a
JavaScript
DavidShefcik/davidshefcik.com-client
/src/react/pages/Home/components/commands/projects.js
UTF-8
1,126
2.84375
3
[]
no_license
/* * David Shefcik 2020 */ /* Imports */ // Modules import { request } from "graphql-request"; /* Queries */ const projectsQuery = ` { projects { name description repositoryURL } }`; /* Function */ const run = async (args) => { return new Promise((resolve, reject) => { request(process.env.NODE_...
true
542ea41dae4562c9509e237306136694b2ece6fa
JavaScript
ShieldBattery/rally-point
/gen-id.js
UTF-8
773
2.953125
3
[ "MIT" ]
permissive
// ID generation similar to cuid.slug, but without process fingerprints since they aren't useful for // this application (and removing them frees up some more bytes for more entropy). Also keeps a // constant size at all times const blockSize = 4 const base = 36 const discreteValues = Math.pow(base, blockSize) functio...
true
d4503430570481fd17be1f6c076e0732dbaddb5d
JavaScript
wjopenice/ZSWH
/pet2/public/js/user.js
UTF-8
300
2.8125
3
[ "Apache-2.0" ]
permissive
$(function(){ $(".start_time").change(function(){ var start_time = $(".start_time").val(); $(".end_time").attr('min',start_time); }); $(".end_time").change(function(){ var end_time = $(".end_time").val(); $(".start_time").attr('max',end_time); }); });
true
6772f8fda99d0446794b43317dd158541b7f8437
JavaScript
Yousef-Nour/MERN-Stack
/AdvancedMern/Authors/client/src/views/Main.js
UTF-8
1,938
2.515625
3
[]
no_license
import React, {useState, useEffect} from 'react'; import axios from 'axios'; import {Link} from '@reach/router'; import UpdateButton from '../components/UpdateButton'; import DeleteButton from '../components/DeleteButton'; const Main = props => { const mainStyle = { display : "flex", flexDirection...
true
c2dd3fb52b82e65c89b5c059c361d839255418c4
JavaScript
JosefJezek/Zdrojak
/app/middleware/http406.js
UTF-8
238
2.625
3
[]
no_license
/** * Kontrola, zda muzeme vratit data v JSON * * Pokud ne, vratit HTTP kod 406. */ module.exports = function() { return function(req, res, next){ if (!req.accepts('json')) { return next(406); } next(); }; };
true
72d4a99030f01a4cf0dfce1cff745bd9e5c35d07
JavaScript
derekschlabach/derekschlabach.github.io
/js/Pieces/Pawn.js
UTF-8
1,942
3.265625
3
[ "MIT" ]
permissive
// Pawn SubClass function Pawn( color, square ) { this.name = 'Pawn'; Piece.call( this, color, square ); this.dir = ( square.row <= 3 ) ? 1 : -1; this.getAllowedMoves = function( board ) { var squares = []; var square1 = board[ this.square.row + this.dir ][ this.square.col ]; if ( square1.piece == null ...
true
a92912939dc45d6c6ff39856c03aadfbe303ff85
JavaScript
aaronburmeister/CodeWars
/javascript/4kyu/HumanReadableDurationFormat.js
UTF-8
1,199
3.875
4
[]
no_license
// https://www.codewars.com/kata/52742f58faf5485cae000b9a/javascript function formatDuration (seconds) { if (seconds == 0) return "now" else { let humanReadable = [] // function to figure out times function timeTest(time, units) { if (seconds >= time) { const timeUnits = Mat...
true
c5a864cc49a6aca067d2f9281b660d0eca603432
JavaScript
jenbonapace/temperature
/script.js
UTF-8
406
3.5
4
[]
no_license
window.alert("hi") var Farenheit = prompt("Enter a temperature in Degrees Farenheit"); var Celsius; Celsius = (Farenheit - 32) / (9 / 5); Farenheit = (Celsius * 9 / 5 + 32); console.log("The temperature in Celsius is " + Celsius + " degrees"); prompt(If you would like to conver to Degrees Farenheit from...
true
57bf84fc7871baffa870364123406289ebcf3406
JavaScript
sufay3/Contract-Event-Watcher
/app.js
UTF-8
2,932
2.546875
3
[]
no_license
var _ = require("underscore"); var Web3 = require("web3"); var MongoClient = require("mongodb").MongoClient; var watch = require("./watch.js") const WEBSOCKET_URL = "ws://localhost:8546"; const MONGO_URL = "mongodb://localhost:27017"; var App = function (options) { this.options = options; this.initialized = ...
true
feb3db6357cfa86cc1775f5f528661a1bca9d036
JavaScript
x404/games-oop
/js/class/Modal.js
UTF-8
1,405
3.203125
3
[]
no_license
/* * Modal with results of game */ class Modal { constructor(countSuccess = 0, countError = 0) { this.init(); this.countSuccess = countSuccess; this.countError = countError; } init() { this.isOpened = false; } show() { const html = ` <div class="modal"> <div class="modal-inner"> ...
true
60e929751e8defda1e62cda7b0e4694e4daa0896
JavaScript
YaroslavShypunov/currency-exchange
/src/reducers/__tests__/ChangerReducer.test.js
UTF-8
1,946
2.921875
3
[]
no_license
import ChangerReducer from '../ChangerReducer' import { _SET_CHANGER_FULL_INFORMATION, _SET_CHANGER_INFORMATION } from '../../actions' // test data let action = _SET_CHANGER_FULL_INFORMATION({ fromCurrency: 'USD', toCurrency: 'EUR', fromNumber: 1000, toNumber: 908.6, rate: 0.9086, changeButtonC...
true
6c87faceb4a88501a49590b63f68e05be75001b8
JavaScript
PKJedi/node-mmo
/public/js/game.js
UTF-8
5,849
2.90625
3
[]
no_license
/** * Test Game Script */ (function() { var canvases = $('#game > canvas'), // Game background & environment field = canvases[0], fieldContext = field.getContext('2d'), // Player layer actors = canvases[1], actorsContext = actors.getContext('2d'), // Over-player layer ...
true
6c0b9e66a54de08fd4a748ebd1b0a5e5f82705b5
JavaScript
FranklinUmeObi/Field-Of-Vision-Dashboard
/Test Components/distanceTravelled.js
UTF-8
1,243
3.21875
3
[]
no_license
"use strict"; const fs = require("fs"); let rawdata = fs.readFileSync("dict.json"); let data = JSON.parse(rawdata); function distance(data){ //total distanceTravelled by all players assuming players labelled 1-22 inclusive for(int i = 1; i < 23; i++){ distanceTravelled(data[i]); } //this nested fun...
true
8a35a61bb5e2fd30707bf10f445ac986b8833eb3
JavaScript
fredyfx/woodhouse
/client/scripts/app.jsx
UTF-8
1,189
2.59375
3
[ "ISC" ]
permissive
import React from 'react'; import ReactDOM from 'react-dom'; import Group from './components/group-component.jsx'; class App extends React.Component{ render(){ const groups = this.props.groups; const groupItems = groups.map((group) => <Group key={ group.name } name={ group....
true
6749f3d46b84eff48d5c643925a776277c61ea05
JavaScript
leolai2010/DojoAssignments
/MEAN/MEAN_stack/PracticeAlgo/MaxMinAverage.js
UTF-8
351
3.34375
3
[]
no_license
function maxMinAvg(arr){ var max = 0; var min = 0; var sum = 0; for(var i=0; i<arr.length; i++){ if(max<arr[i]){ max = arr[i]; } if(min>arr[i]){ min = arr[i]; } sum += arr[i] var avg = sum/arr.length; } console.log(max,min,a...
true
165e5d559c3a612b6be75b4b8a95c07532035298
JavaScript
AausB/udemy-node-2-todo-api-2017-11
/server/config/config.js
UTF-8
487
2.71875
3
[]
no_license
// is set by heroku to "production" const env = process.env.NODE_ENV || 'development'; if (env === 'development' || env === 'test') { const config = require('./config.json'); // automatically consverted inot an JS object // extract the relevant config object (development or test) const envConfig = config[env]; ...
true
9d8a428290b1950099565ae86b5941c273794a6e
JavaScript
mitthoma/A-Cut-Above-Website
/script.js
UTF-8
4,825
2.53125
3
[]
no_license
//animating page elements with animate.css let scrollpos = window.scrollY const header = document.querySelector(".stylist") const header_height = header.offsetHeight const header2 = document.querySelector(".stylist2") const header2_height = header2.offsetHeight const header3 = document.querySelector(".stylist3") c...
true
2de2b0692abd43f5377bbfacafb4ecaa0835d123
JavaScript
cgeosoft/cryptocodes
/src/components/game/game.service.js
UTF-8
2,581
2.6875
3
[]
no_license
(function () { 'use strict'; angular .module('app') .factory('GameService', GameService); /* @ngInject */ function GameService(RandomService, WordsData) { var service = { _game: null, Init: Init, }; return service; ...
true
b375d513f5646bfa907aa219dac5c9b4836057d7
JavaScript
ayresjulia/Divide-conquer
/count-zeroes.js
UTF-8
490
3.296875
3
[]
no_license
function countZeroes (arr, leftIdx = 0, rightIdx = arr.length - 1) { if (arr[leftIdx] === 1 && arr[rightIdx] === 1) { return 0; } while (leftIdx <= rightIdx) { let midIdx = Math.floor((rightIdx + leftIdx) / 2); let midVal = arr[midIdx]; if (midVal > arr[rightIdx]) { leftIdx = midIdx + 1; } else if (mid...
true
3646da892813feb97b4b9f5432ae9bf64a9234ad
JavaScript
future4code/Helany-Melo
/quinzena2/funcoes-de-array/index.js
UTF-8
2,621
3.65625
4
[]
no_license
// Exercicio1 //a.Será impresso três objetos diferentes com os nomes e apelidos //b. Será impresso somente os primeiros nomes //c. Será impressso somente os dois primeiros nomes e 'chijo' ficará de fora // Exercício de Escrita // const pets = [ // { nome: "Lupin", raca: "Salsicha"}, // { nome: "Polly...
true
1af1ba20ad9e472bb4f866468d8b37fe73364ee5
JavaScript
architect/utils
/to-logical-id/index.js
UTF-8
475
2.703125
3
[ "Apache-2.0" ]
permissive
/** * convert .arc typical dash-case-stuff into PascalCaseStuff */ module.exports = function toLogicalID (str) { str = str.toString().replace(/([A-Z])/g, ' $1') if (str.length === 1) return str.toUpperCase() str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase() str = str.charAt(0).toUpperCase() + str.sl...
true
34d1b68a35a7568a088ea0a2d2b9830219c65ab4
JavaScript
token27/slack-bot-team-helper
/src/events.js
UTF-8
3,880
2.671875
3
[ "MIT" ]
permissive
//for listening to events const {createEventAdapter} = require('@slack/events-api'); const slackSigningSecret = process.env.SLACK_SIGNING_SECRET; const slackEvents = createEventAdapter(slackSigningSecret); //for posting messages const {WebClient} = require('@slack/web-api'); //posting messages const {SLACK_BOT_TOKEN, ...
true
57a88b6da3f5efc09921c5ac084bfddd977da7dd
JavaScript
ScorchingShade/Web_Practice
/TypeScript/firstCode.js
UTF-8
220
2.90625
3
[]
no_license
var abc = /** @class */ (function () { function abc(a) { this.a = a; } abc.prototype.m = function () { console.log(this.a); }; return abc; }()); var k = new abc(10); k.m();
true
cd0270b4b3e6ab8ae8055eb2e80a5636a49804cb
JavaScript
suresh-kumara-gist/responsive-practice
/m/media.reggaestation.net/sites/all/modules/linkit/editors/ckeditor/linkitDialog.js?v=7.3
UTF-8
1,452
2.53125
3
[]
no_license
/** * @file * Linkit ckeditor dialog helper. */ (function ($) { // Abort if Drupal.linkit is not defined. if (typeof Drupal.linkit === 'undefined') { return ; } Drupal.linkit.registerDialogHelper('ckeditor', { init : function() {}, /** * Prepare the dialog after init. */ afterInit :...
true
0ea315c1f22a72d69bdacdffe403110aa76c74fc
JavaScript
jjacobgreen/website
/rocket_golf/upload/hud.js
UTF-8
1,061
3.03125
3
[]
no_license
class HUD { constructor() { this.life_size = 12; } show_velocity(rocket) { fill(0, 120, 255); var rounded_velocity = Math.round(rocket.vel.copy().mag() * 10) / 10; text('Velocity: '.concat(rounded_velocity.toString()), 10, 20); } show_launch_velocity(rocket) { var rounded_launch_velocit...
true