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
f08d1972872096505a5aff9c1dfaaf3dcd43ef25
JavaScript
hunterxx0/holbertonschool-web_back_end
/0x11-ES6_data_manipulation/2-get_students_by_loc.js
UTF-8
132
2.625
3
[]
no_license
export default function getStudentsByLocation(StudentsList, city) { return StudentsList.filter((obj) => obj.location === city); }
true
d005cab745383576a851e12d7168b6fe03482696
JavaScript
highjinker/Boond
/src/main/webapp/script/xhrHelper.js
UTF-8
1,191
2.78125
3
[]
no_license
function xhrHelper(){} xhrHelper.runHttpRequest = function(method, url, isAsync, callback, postData, headers, callbackArguments, errorCallback) { if(MyUtils.isNull(method) || MyUtils.isNull(url) || MyUtils.isNull(isAsync)){ throw "Method/URL/isAsync cannot be null"; } if(method == "POST" && MyUtils.isNull(postDat...
true
602920bf3300736d680aa96c9036f46593b18eea
JavaScript
cobotgil/example-api-js
/tutorial/WebSockets/EX-12a-Calculating-Open-PL-Solution/src/app.js
UTF-8
3,957
2.546875
3
[]
no_license
import { connect } from './connect' import { tvGet, tvPost } from './services' import { isMobile } from './utils/isMobile' import { DeviceUUID } from "device-uuid" import { getAvailableAccounts, queryAvailableAccounts, setAccessToken, getDeviceId, setDeviceId } from './storage' import { renderPos } from './renderPosit...
true
20b79246f2d4e0afd4fc11fb4010a1e1be23447d
JavaScript
hoppfull/Learning-FSharp
/WebServer/BankApp v1/validation.js
UTF-8
346
2.90625
3
[ "MIT" ]
permissive
function validateCredentials(username, password) { const usernamePattern = /^[a-zA-Z0-9-_.@]{4,}$/ const passwordPattern = /^[a-zA-Z0-9-_ .]{8,}$/ const usernameIsValid = username.match(usernamePattern) !== null const passwordIsValid = password.match(passwordPattern) !== null return { usernameIsVal...
true
8f373fa3108df1f3c887288e61f20a67b44c6ec0
JavaScript
sumitchohan/sumitchohan.github.io
/ExtJs/output.jsbin.com.js
UTF-8
1,263
2.921875
3
[]
no_license
function delay(ms) { return new Promise(function (resolve) { setTimeout(resolve, ms); }); } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download...
true
aaee6674611e2b9cdc8107dd1e6dff63e046e42f
JavaScript
axelduch/perlin-experiment
/main.js
UTF-8
2,478
2.625
3
[]
no_license
(function (window, document, undefined) { 'use strict'; var c = document.getElementById('canvas'), ctx = c.getContext('2d'), w = c.width, h = c.height, cx = w * .5, cy = h * .5, t = 0.000006, size = 4, delay = 30, mouseX = w *.5,...
true
79b31086e8ec894e83420e123448a99c38467425
JavaScript
EeshanPandey/healthassess
/.history/src/components/Piechart_20210712180450.js
UTF-8
1,431
2.546875
3
[]
no_license
import React from "react"; import Plot from "react-plotly.js"; var cityis = []; var canclist = []; var typlist = []; fetch('/piechart').then(res => res.json()).then(data => { // const cities = Array.from(data.city) // const cancer = // cityis=Array.from(data.city); sessionStorage.setItem('city', JSON.strin...
true
7132a49a89dba432fd4a7e1ccf4b7406053536fe
JavaScript
Brian-Demon/Scheduling-App-Google-Script
/Get Mondays.gs
UTF-8
254
2.90625
3
[]
no_license
function getMondays() { let array = []; let sheet = ssData.getSheetByName('Mondays'); let lastRow = sheet.getLastRow(); for( r = 1; r <= lastRow; r++ ){ let value = sheet.getRange(r, 1).getValue(); array.push(value); } return array; }
true
22e1b1361b36ed196e389b1c27430e5fb84add25
JavaScript
axelcorrea/ReactJS-Basico
/clase-dos/src/components/Lista.js
UTF-8
1,250
3.171875
3
[]
no_license
import "bootstrap/dist/css/bootstrap.css"; /*const alumnos = [ <li className="list-group-item"> Milton Amado </li>, <li className="list-group-item"> Jonatan Severo </li>, <li className="list-group-item"> Ezequiel Lopez</li>, <li className="list-group-item"> Augusto Soria</li>, <li className=...
true
a5b65e0a3dfa0eea7bbba50275d03e9ff0c4ca7c
JavaScript
noyalreji/algo-matrix-binary
/matrix-binary.js
UTF-8
2,336
4.1875
4
[]
no_license
// Javascript implementation to search // an element in a sorted matrix let MAX = 100; // This function does Binary search for x in i-th // row. It does the search from mat[i][j_low] to // mat[i][j_high] function binarySearch(mat, i, j_low, j_high, x) { while (j_low <= j_high) { let j_mid = Math.floor((j_low + j...
true
4f769e4c191225509bf7b39a4ee2a5cd14f7d3b2
JavaScript
joseluis0218/Pasantias_broderjobs
/instituto/static/js/buscar_cvs.js
UTF-8
1,007
2.53125
3
[]
no_license
$( "select" ) .change(function() { var rama = ""; var grado = ""; var genero = ""; var tiempo = ""; var ciudad = ""; $( "#select_rama option:selected" ).each(function() { rama = $( this ).text(); console.log(rama); }); $( "#select_grado option:selected" ).each(function() {...
true
1610e7fa6655f234aa05f887370e5098974ba7b6
JavaScript
L-Lisa/project-todos
/code/src/components/ToDoSummary.js
UTF-8
1,107
2.578125
3
[]
no_license
import React, { useState } from 'react' import { useSelector } from 'react-redux' import { Emoji } from "../library/Emoji" import { Title, Subtitle, P} from "library/Text" export const ToDoSummary = () => { const items = useSelector(state => state.ToDo.items) const doneItem = items.filter(item => item.completed) ...
true
6336a9c9daeb7a588205952d9ad131ccd71984bb
JavaScript
obiwankenoobi/startupEmailCrawler
/lib/lib.js
UTF-8
6,552
2.796875
3
[]
no_license
const request = require("request"); const cheerio = require("cheerio"); const exec = require("child_process").exec; const ProgressBar = require("progress"); const wordsToIgnore = require("./wordsToIgnore"); let emails = []; let visited = []; let count = 0; let maxDepth; let maxCallsInASite; let baseURL = ""; let t...
true
1fd2874a9735b5457a1148335aaa506f658ff5c4
JavaScript
danyr/redalert
/bg.js
UTF-8
10,500
2.703125
3
[ "Apache-2.0" ]
permissive
function CheckAlert() { $.getJSON( "http://www.oref.org.il/WarningMessages/alerts.json", function( data ) { //data.data = ["אשקלון 235, עוטף עזה 238, מנשה 102"]; correctData = CorrectDataFormat(data.data); if (correctData.length > 0) { console.log(Date()); console.log("Raw alarms: " + data.data.toString()...
true
b44bcceeacc11e80381842fba396726d2eccf3a4
JavaScript
xdpiqbx/minin-complex-js-in-simple-language
/js/014-02-fetch.js
UTF-8
1,971
3.421875
3
[]
no_license
const subject = "Урок 14. JavaScript. Запросы на сервер. Fetch, XMLHttpRequest (XHR), Ajax"; //https://youtu.be/eKCD9djJQKc?t=1266 const baseUrl = "https://youtu.be/"; const queryString = "eKCD9djJQKc?t=1266"; const url = `${baseUrl}${queryString}`; console.log(`=====-> ${subject} <-=====`); console.log(`====-> fetch...
true
096a588fd544c714f063dc855c1f7a1b4f3d3b23
JavaScript
Hogusong/CodeFight-JavaScript
/LeetCode/001_020/012_IntergerToRoman.js
UTF-8
1,195
3.984375
4
[]
no_license
/** * @param {number} num * @return {string} */ var intToRoman = function(num) { let roman = ''; let n = Math.floor(num / 1000); if (n > 0) { num = num % 1000; roman += 'M'.repeat(n); } n = Math.floor(num / 100); num = num % 100; if (n == 9) roman += 'CM'; else if (n > 4) roman += 'D' + ...
true
7e666f3f6a70bbe0fabeedeefaf5f3b5e5ca5f63
JavaScript
NishuGoel/component-libr
/lib/client-api/dist/pathToId.js
UTF-8
461
2.515625
3
[ "MIT" ]
permissive
"use strict"; require("core-js/modules/es.object.define-property"); require("core-js/modules/es.regexp.exec"); require("core-js/modules/es.string.match"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = pathToId; function pathToId(path) { var match = (path || '').match(/^\/s...
true
87cb4127fc672b691227957b1430d349cbf397ff
JavaScript
tryrezay/Arkademy
/5.js
UTF-8
165
3.046875
3
[]
no_license
var string3 = "purwakarta"; var hasil8 = string3.replace("purwakarta", "purwokerto"); console.log(hasil8) document.getElementsByTagName("p")[0].innerHTML = hasil8
true
32d782d510690bb81466badaec9738a725f242b1
JavaScript
Shaphen/a-A_Classwork
/Week_Nine/D5/jquery_lite/src/dom_node_collection.js
UTF-8
637
3.015625
3
[]
no_license
class DOMNodeCollection { constructor(HTMLeles) { this.eles = HTMLeles; } html(arg) { let newVals = []; if (arg) { for(let i = 0; i < this.eles.length; i++) { this.eles[i].innerText = arg; newVals.push(this.eles[i]) } }...
true
58c982d894c47fca9c50d22696560d685bf66f29
JavaScript
ryanrichardson2137/landing-page
/javascript-files/cart.js
UTF-8
279
2.8125
3
[ "MIT" ]
permissive
$(document).ready(function(){ $('#update').on('click', function(){ var price = 90; var quantity = $('tbody input').val(); var total = price * quantity; $('#total1').text('$' + total + '.00'); $('#total2').text(total + '.00'); }) })
true
c4370e1f24bf2affc59e1d58f54bfc8c9ed6119a
JavaScript
WebDevManuel/rick-and-morty
/main.js
UTF-8
1,541
2.765625
3
[]
no_license
import { createElement } from './lib/elements.js'; import './style.css'; import createCharacterCard from './components/characterCard.js'; import { fetchCharacters } from './lib/characters'; async function renderApp() { const appElement = document.querySelector('#app'); const headerElement = createElement( 'he...
true
ef9fcbde10a85286dc86f95a85a750d92676e2b0
JavaScript
marcomuser/lab-react-ironbook
/ironbook/src/App.js
UTF-8
2,834
2.859375
3
[]
no_license
import React, { Component } from 'react'; import users from "./users"; import "./App.css"; export default class App extends Component { state = { users, search: '', student: false, teacher: false } handleChange = event => { const target = event.target; const name = target.name; const...
true
434f73b82255151b2099ad7703d3875a2fc95115
JavaScript
EduardoOuro/React-Hooks
/src/views/examples/UseState.jsx
UTF-8
1,309
2.625
3
[]
no_license
import React, { useState } from 'react'; import PageTitle from '../../components/layout/PageTitle'; import SectionTitle from '../../components/layout/SectionTitle'; const UseState = (props) => { const [state, setState] = useState(0); const [name, setName] = useState(""); return ( <div className="...
true
7917e03d13ca0d7ece6a5470043b3b17e6c9272e
JavaScript
Wayne-Bai/AST-normalize
/data/onedayitwillmake/RealtimeMultiplayerNodeJs/js/BubbleDots/traits/GravityTrait.js
UTF-8
1,683
2.8125
3
[]
no_license
/** File: GravityTrait.js Created By: Mario Gonzalez Project : RealtimeMultiplayerNodeJS Abstract: This trait will cause an entity to chase a target Basic Usage: */ (function () { BubbleDots.namespace("BubbleDots.traits"); var RATE = 0.2; BubbleDots.traits.GravityTrait = function () { ...
true
4e72e14d3963e9136952101def28c54b148f2a68
JavaScript
Cpaster/algorithm-js
/括号生成/index.js
UTF-8
505
3.453125
3
[]
no_license
let result_res = []; let generateParenthesis = function(n) { handler(n, n, ""); return result_res; }; function handler(left, right, str) { if(left == 0) { for(let i = 0; i < right; i++) { str += ")"; } result_res.push(str); return; } if(left == right) { handler(left - 1, right, str +...
true
213d4693e68724196d6b15cbaa1c4e022e5c483c
JavaScript
CodeAcademyP110/p110-08-04-2019-shamssamedli
/src/main.js
UTF-8
272
3.625
4
[]
no_license
"use strict"; class Human { constructor(username, age) { this.username = username; this.age = age; } showInfo(){ return `${this.username} ${this.age}`; } } const samir = new Human("Samir Dadash-zade", 28); console.log(samir.showInfo());
true
09a773059446e2744bf4c31f3353bf9ee06e8042
JavaScript
thomas7-home/System_Capstone
/Server_Folder/js/bingo.js
UTF-8
1,621
3.75
4
[]
no_license
function numberGenerator() { var n = new Array(25); var nums = new Array(25); for (let i = 0; i < nums.length; i++) { var randomNumber = Math.floor(Math.random() * 70); for (let j = 0; j < n.length; j++) { if (n[j] == randomNumber) randomNumber = Math.floor(Math.random() * 70); }...
true
09f9f3b0f91772d536be102b09b63052a649a9a5
JavaScript
khanriazaoif/launch-school
/Introduction to Programming/functions/multiply.js
UTF-8
822
5.09375
5
[]
no_license
// Write a program that uses a multiply function to multiply two numbers and returns the result. Ask the user to enter the two numbers, then output the numbers and result as a simple equation. // $ node multiply.js // Enter the first number: 3.141592653589793 // Enter the second number: 2.718281828459045 // 3.14159265...
true
6e564026f410c1e96618aa29c299e02d3bcb7bd7
JavaScript
jnfq/web_JXZLPJ
/js/leader.js
UTF-8
8,224
2.625
3
[]
no_license
angular.module("myApp",[]) .controller("myCtrl",["$http","$scope",function($http,$scope){ var teacher_name = []; var teacher_score = []; var scoreAndNameObj = []; //需要的数据:被评价的教师姓名 及总分数 两个数组 // 获取所有教师姓名组成数组 $http.get("data/courseMess.json") .then(function(data){ var datas ...
true
18b9df877b69ac9be978aca55482e11ce58a498a
JavaScript
vdorot/Lettris-3D
/src/letter-generator.js
UTF-8
3,014
2.984375
3
[ "BSD-3-Clause", "MIT", "Unlicense" ]
permissive
define(['./scene/renderer', './random-letter', './scene/objects/letter'], function(Renderer, RandomLetter, Letter){ var LetterGenerator = function(scene, period){ this.scene = scene; this.timer = null; this.secondTimer = null; var defaultPeriod = 2000; this.period = period || defaultPeriod; this.sec...
true
b8f6611118cdb328b17d8500a1541eed8c1fcfb6
JavaScript
Aseelsamer/data-structures-and-algorithms401
/fifoShelterAnimal/fifo-animal.test.js
UTF-8
2,218
3.296875
3
[ "CC0-1.0" ]
permissive
'use strict'; const AnimalShelter = require('../fifoShelterAnimal/fifo-animal-shelter'); describe('AnimalShelter Class', () => { it('should recognize the class', () => { const shelter = new AnimalShelter(); expect(shelter).toBeDefined(); }); it('should successfully enqueue a new animal to an empty que...
true
6f8e2802abc64ba8b77371eba585ec155c0c596d
JavaScript
floretan/uno-ai
/src/Player.js
UTF-8
1,726
3.40625
3
[]
no_license
module.exports = class Player { constructor({deck, pile, label = ''}) { this.label = label; this.hand = []; this.deck = deck; this.pile = pile; } canPlay() { return this.hand.some(card => this.pile.canPlay({card})); } play() { // Very simple approach, play the first playable card. ...
true
00bfc991afdc9d4005eca619c2a38022ff3a5d45
JavaScript
DeanYCH/webpack-plugins
/packages/radar/src/radar/util.js
UTF-8
1,614
3.1875
3
[]
no_license
function TransformSyntax(str, opacity) { this.opacity = opacity || 0; this.origin = str; this.reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; this.hex = this.Rgb2Hex(); this.rgb = this.Hex2Rgb(); } /*16进制转为RGB*/ TransformSyntax.prototype.Hex2Rgb = function () { let sColor = this.origin.toLowerCas...
true
7124b0178aea7a6ca814e2bea84292fbcbbc302b
JavaScript
itprofastur/ejercicios-en-clase-l
/modulo-3-leccion-06-use-state-simple/src/components/App.js
UTF-8
2,265
3.734375
4
[]
no_license
import React, { useState } from 'react'; const App = () => { // con esto declaro la constante email que la voy a utilizar como variable del estado, la función setEmail y el valor inicial que aquí es un string vacío const [email, setEmail] = useState('asf@asfd.com'); const [address, setAddress] = useState({ c...
true
8d34a55838cd0ec933132b40beaed4839df3c8a7
JavaScript
ANILTON68/webmodern
/ANILTON JS/FUNDAMENTOS/003-Tipagem fraca.js
UTF-8
166
2.953125
3
[ "MIT" ]
permissive
let qualquer = "EU" console.log (qualquer) qualquer = 3,14 console.log(qualquer) qualquer = 3.14 console.log(qualquer) typeof qualquer console.log(typeof qualquer)
true
548a99e9b4932daa727ef145e4dd3170b83b70d7
JavaScript
jinfans/myRepository
/erp_web/src/main/webapp/js/trend_returnorder2.js
UTF-8
2,461
2.53125
3
[]
no_license
$(function() { $('#grid').datagrid({ title:'销售统计列表', url : 'report!returnorderTrend.action', singleSelect : true, columns : [ [ {field : 'name',title : '商品类型',width : 100}, {field : 'y',title : '销售额',width : 100} ] ], onLoadSuccess:function(data){ //在数据加载成功的时候触发。 //alert(JSON.strin...
true
4e4eb7acc57dc71dd8f7a5a03f22f96468879daa
JavaScript
HaQadosch/Learn-Redux-Starter-Files
/learn-redux/client/reducers/posts.js
UTF-8
466
2.765625
3
[]
no_license
const incrementLikes = (state, index) => { return [ ...state.slice(0, index), { ...state[index], likes: state[index].likes + 1 }, ...state.slice(index + 1) ] } export const posts = (state = [], { type, index, ...action }) => { const actions = { 'INCREMENT_LIKE': incrementLikes } l...
true
45cffcbd092ae3b66ad5ecbcdfb1b8be49a81145
JavaScript
Jacoby-Y/game-lib
/functions.js
UTF-8
16,285
3.28125
3
[]
no_license
const graphics = { circ(obj, pos={ x: 0, y: 0 }, scale={ w: 10, h: 10 }, angles={ start: 0, end: Math.PI*2, clockwise: true }, style={ fill: true, fillStyle: "red", stroke: true, strokeStyle: "black", strokeWidth: 1}) { // { x: 100, y: 100 }, { w: 20, h: 20 }, { fill: true, } if (obj.vector == undefined || ...
true
a43b5469c3f65e9e6d6548f01869ed10a779cc9a
JavaScript
johncollinson2001/canvuz
/js/canvuz/Canvuz.StaticPhoto.js
UTF-8
2,371
2.609375
3
[]
no_license
Canvuz.StaticPhoto = function(_x, _y, _width, _height, _rotation, _filename, _container) { //DRAW CONSTRUCTS ////////////////////////////////////////////////////////////////////////////////////////////// //draw the photos shadow effect this.drawShadow = function() { Canvuz.canvas.drawSVG().rect(thi...
true
ace258be3395dc95f30832d875d4b97de2ddf975
JavaScript
akaDarkNemesis/akaDarkNemesis.github.io
/forms_n_tables/script.js
UTF-8
5,716
2.765625
3
[]
no_license
var sno = 0; var data = []; var isEdit = false; var selectedRow; var sOrder = "asc"; var propsArray = ["name", "phn", "dob", "city", "gender"]; var sBtns = [ { id: "name", name: "Name" }, { id: "phn", name: "Phone" }, { id: "dob", name...
true
83b894c155e169b3e462c32bff902d10f7ac3a8e
JavaScript
jihun04/kokoa-clone-2020
/check-wifi.js
UTF-8
343
2.59375
3
[]
no_license
const noWifiIcon = document.querySelector(".no-wifi"), checkWifiBox = noWifiIcon.querySelector(".check-wifi"), checkWifiCloseBtn = checkWifiBox.querySelector("i"); function handleCheckWifiClick() { noWifiIcon.removeChild(checkWifiBox); } function init() { checkWifiCloseBtn.addEventListener("click", handleChec...
true
4553262333565dfb898f564f791e8f9b527471b4
JavaScript
anvaka/redsim
/src/scripts/dataclient.js
UTF-8
3,169
2.625
3
[ "MIT" ]
permissive
var createGraph = require('ngraph.graph'); var eventify = require('ngraph.events'); module.exports = dataClient; function dataClient($http, $q) { // Kick off graph download immediately $http.get('data/labels.json') .then(addLabelsToGraph); $http.get('data/links.bin', { responseType: "arraybuffer" }) .th...
true
997a348b517795acf329dd18e17934fdc9a3303c
JavaScript
chantysothy/react-template-project
/App/Reducers/StatusReducer.js
UTF-8
801
2.6875
3
[]
no_license
import { LOAD, SAVE } from 'redux-storage'; import { STATUS_NETWORK_UPDATE } from '../Actions/ActionTypes'; const initialState = { networkActivity: false, storageLoaded: false, networkStatus: false, }; function statusReducer(state = initialState , action) { switch (action.type) { case LOA...
true
61436ad83da9fccb198bc5a49a8e21ebee5e5abb
JavaScript
AHarryHughes/form-builder
/main.js
UTF-8
5,070
3.0625
3
[]
no_license
//HTML-------------------------------------------------------------------------- //grab body and css var bod = document.querySelector(".bod"); bod.style.margin= "auto"; bod.style.width= "400px"; bod.style.boxShadow= "5px 5px grey"; bod.style.borderRadius= "5px"; //create and save to var: head, main, and footer an...
true
c693c1380bc8c9a317c1c2641c91824e015a4e6e
JavaScript
Andruixxd31/web_dev_course
/smartbrain-api/server.js
UTF-8
1,333
2.59375
3
[]
no_license
//*--------setting up the server and it's dependecies ---------*/ const express = require('express'); const bcrypt = require('bcrypt-nodejs'); const cors = require('cors'); const knex = require('knex'); //controllers const register = require('./controllers/register'); const signin = require('./controllers/signin'); ...
true
a8e3035e105bfd178a675e5453f0280dc46738d5
JavaScript
4d-kanno/furigana
/chap1-9-2.js
UTF-8
76
2.8125
3
[]
no_license
let text = prompt('入力せよ'); console.log('入力したのは' + text);
true
eb9a2c4df3d9a75020d7b36c6655d8cf580bc052
JavaScript
MrBreakIT/MyAlgoFolder
/javascriptsAlgos/removeDups.js
UTF-8
1,799
3.5
4
[]
no_license
// function removeDups(str) { // var newStr = ""; // var couter = 0; // for (var i = 0; i < str.length; i++) { // for (var j=1 ; j < str.length; j++) { // if (str[i] == str[j]) { // console.log(str[i], str[j]); // couter += 1; // } // ...
true
eae9f89810a3c388319285abf8d13d73995d410a
JavaScript
FEND16/javascript2
/code/04_design_patterns.js
UTF-8
3,768
4.25
4
[]
no_license
/*====================================== = Module Pattern = ======================================*/ /** * Our Module which is a IIFE saved to a variable. The function will not * just be assigned, it will immedietly be run and return the object * after the return statement which consists of a ...
true
ec462cb9b7e92372cbd41bc47416f80b7c85727e
JavaScript
vinelandit/etnr
/js/sensors.js
UTF-8
8,134
2.84375
3
[]
no_license
class Sensors { constructor(gpsCallback=null,gpsErrorCallback=null,orientationCallback=null,orientationErrorCallback=null,motionCallback=null,motionErrorCallback=null) { this.gpsCallback = gpsCallback; this.orientationCallback = orientationCallback; this.motionCallback = motionCallback; this.gpsErrorCallback ...
true
cd0ee328f4cdd0dbb6bd5168e833c2e86183f379
JavaScript
hermajan/time
/src/time/clocks/normal.js
UTF-8
1,924
4.03125
4
[]
no_license
/** * Shows clock. * @param id ID of the element where the clock is shown. * @return Clock in format [hour]:[minute]:[second]. */ function clock(id) { var date=new Date; var hour=date.getHours(); var minute=date.getMinutes(); var second=date.getSeconds(); document.getElementById(id).innerHTML=(hour<10 ? "0" :...
true
0c9481365cb4102fdbdfb4ca60e1eaf63f4c0145
JavaScript
thanhbr/CodeWars
/7kyu_CatYearsDogYears(2).js
UTF-8
789
4.1875
4
[]
no_license
// 7kyu - Cat Years, Dog Yearrs (2) // This is related to my other Kata about cats and dogs. // Kata Task // I have a cat and a dog which I got as kitten / puppy. // I forget when that was, but I do know their current ages as catYears and dogYears. // Find how long I have owned each of my pets and return as a list ...
true
25d22b98636e6e8d4eb16a7a20d0f5c3bc4658d8
JavaScript
opendroid/js
/src/Language/promises.js
UTF-8
1,985
3.65625
4
[]
no_license
"use strict"; let fs = require("fs"); /** * next file has a callback function that will run when readFile is done reading. * the callback is called when current function stops to run. */ fs.readFile("./sampleTextFile.txt", function (error, data) { if (error) { console.log(error); return; } console.lo...
true
798741338deec243a75c94c4e3e78899d3c29d77
JavaScript
shellbj/haystack-ui
/src/components/traces/utils/traceQueryParser.js
UTF-8
1,882
2.53125
3
[ "Apache-2.0" ]
permissive
/* * Copyright 2017 Expedia, Inc. * * 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 required...
true
807272dd58b6cfb8958f9ae949792e278cdfcca2
JavaScript
sartorileonardo/js-es6
/test.js
UTF-8
964
3.015625
3
[]
no_license
//Install mocha to your project: npm i chai mocha --save /* Updated package.json file: "scripts": { "test": "mocha ./test.js" }, */ //Run: npm run test const chai = require('chai'); const expect = chai.expect; const calculator = require('./calculator'); describe('Calculator Tests', () => { describe('Ad...
true
37381be3e1e63a463327de68eacae314d810d99c
JavaScript
seriann/youtube_clone_RN
/api/youtubeApi.js
UTF-8
1,023
2.640625
3
[]
no_license
import axios from 'axios' //las api keys comentadas ya excedieron la cuota semanal (err status 403) //si la app devuelve el err status 403, abria que crear otra api key en google para poder probarla //const API_KEY= "AIzaSyDcC_2lHAxWdJ6LLjO_fKvHAi1nopVhsgI" //const API_KEY= "AIzaSyA1y3gy9MOO08frDrD6QGxpUVdEXF6O57Y" co...
true
cc25e760e75e84c5c94382ccca9155abed4e5915
JavaScript
Silvius-Development-Network/infinite_scroll
/src/js/main_fetch.js
UTF-8
1,180
3.015625
3
[]
no_license
function getPokemon(offSet){ return fetch(`https://pokeapi.co/api/v2/pokemon?offset=${offSet}&limit=10`) .then(res => res.json()) .then(function(data){ data.results.forEach(pokemon => { var section = document.createElement("section"); var h1 = document.cre...
true
de13ba372bd851f24858865d5b02aa587d0183ef
JavaScript
town2016/react-echarts
/src/plugins/tools.js
UTF-8
1,481
2.96875
3
[]
no_license
// 数据类型检测 export function dataType (data) { return Object.prototype.toString.call(data).slice(8, -1) } // 检测是否为数组,且数组内是否为%的字符串 export function arrayPercent (data) { if (dataType(data) !== 'Array') return false let flag = true for (var i = 0; i < data.length; i++ ) { var arr = data.split('%') ...
true
0762039f3767afc60584f0c6b26aa206c0d4dd91
JavaScript
ochirovaur2/food2work.com-
/src/js/index.js
UTF-8
5,325
2.796875
3
[]
no_license
// Global app controller import Search from "./modules/Search"; import { elements, renderLoader, clearLoader } from './views/base'; import * as searchView from "./views/searchView"; import * as recipeView from "./views/recipeView"; import * as listView from "./views/listView"; import * as likesView from "./views...
true
0329ccbf0e5f79d4e231a17f2b3c723b80896625
JavaScript
GuilhermeFelipeCampos/Cubos-Academy-Atividades
/Cubos Academy Modulo 1/Exercícios Back-End/back-integral-metodos-de-strings-e-arrays/extra-09/index.js
UTF-8
770
3.6875
4
[]
no_license
const nomes = ['Juninho', 'Léo', 'Guido', 'Dina', 'Vitinho', 'Nanda', 'joao', 'carlos', 'marcelo']; const tamanhoDoGrupo = 4; function grupos(nome, numero) { let cont = 1; let i = 0; if (nome.length <= numero) { console.log(`Grupo: ${nome.slice(0, numero)}`); } else if (nome.length > nu...
true
84c9932eff010c20dd1d643bcc4670f6ff0f6035
JavaScript
DiegoCorrea/labwebjs
/JS/Atividade/js/formulario.js
UTF-8
6,799
3.046875
3
[]
no_license
//Padronizar entradas $(document).ready(function(){ $('#fixo').mask("(00) 0000-0000"); }); $(document).ready(function(){ $('#fixoResponsavel').mask("(00) 0000-0000"); }); $(document).ready(function(){ $('#celular').mask("(00) 0 0000-0000"); }); $(document).ready(function(){ $('#celularResponsavel').mask("(00) ...
true
90a07d20c27be4424f51e8e04f074b46aa472114
JavaScript
vanderSangen88/Udemy-AngularJS-MasterClass
/03.16 Controllers - I am Javascript, I can Handle the Business Logic/app.js
UTF-8
819
3.0625
3
[]
no_license
(function() { var name = "myApp", requires = []; myApp = null; myApp = angular.module(name, requires); myApp.service("addSvc", function(){ this.add = function(firstNum, secondNum){ return parseInt(firstNum) + parseInt(secondNum); } }); myApp.service("subtractSvc", function(){ this.subtract = functi...
true
a7cbe868a13618e215d0bf86781e7cda090a0b99
JavaScript
NissanGoldberg/Learn2CodeApp
/server/loaders/loader.js
UTF-8
1,407
2.515625
3
[]
no_license
const {admin} = require('../config/firebase.config') const db = admin.firestore(); let questionList = {}; let userScoreList = {}; let assignmentList = {}; let assignmentListForDropdown = new Array(5); async function getQuestions() { const snapshot = await db.collection('questions').get(); snapshot.forEach((do...
true
90723c40d705ed8da0fbfa89f3a762a942052ac4
JavaScript
InterviewCandies/auto-suggestion-box
/assets/js/model.js
UTF-8
2,059
2.859375
3
[]
no_license
export class Suggestion { constructor(term, url) { this.term = term; this.url = url; } static filter(suggestions, userData) { return suggestions .filter((data) => { return data.Term.toLocaleLowerCase().includes( userData.toLocaleLowerCase() ); }) .map((data...
true
f8e9e6d6d8a9d37aad448f81317a7cd31c94d9aa
JavaScript
romunoff/StudyReact
/namechanger/src/components/App/index.js
UTF-8
1,481
2.671875
3
[]
no_license
import React, {useState, useEffect} from 'react' import View from '../View' import Change from '../Change' import './style.css' export default function App() { const [isVisible, setVisible] = useState(true) const [background, setBackground] = useState('white') const [users, setUsers] = useState([]) us...
true
7b207050d455055abaa25b99d1337ec15fa8f634
JavaScript
andrasq420/web1beadando
/app/src/Adatok.js
UTF-8
2,575
2.765625
3
[]
no_license
import React, { useState,useEffect, useReducer } from "react"; import axios from "axios"; import Counter from "./ageButton"; export default function Adatok() { const [value, setValue] = useState("0"); const [klub, setKlub] = useState([]); const [name, setName] = useState(""); useEffect(() =>...
true
c61dbfe98b4db0f721f0f6981fbea12c19da8e4f
JavaScript
ajaysharma12799/it-logger-frontend
/src/reducers/logReducer.js
UTF-8
1,599
2.546875
3
[]
no_license
import {GET_LOGS, SET_LOADING, LOGS_ERROR, ADD_LOGS, DELETE_LOGS, UPDATE_LOGS, SET_CURRENT, CLEAR_CURRENT, SEARCH_LOGS} from "../actions/types"; const initialState = { logs: null, current: null, loading: false, error: null }; // eslint-disable-next-line import/no-anonymous-default-export export defaul...
true
9c4ba4c03c7c62ed52d256dc2e33ba66ce181ab9
JavaScript
hugoleonardodev/trybe-exercises
/introduction-web-development/block_4/day_3/exercise_2.js
UTF-8
297
3.75
4
[]
no_license
var n = 5; for (var index = 0; index < 1; index++){ var linhaDeAsteriscos = ""; for (var linha = n; linha > 0; linha--){ linhaDeAsteriscos += " *"; console.log(linhaDeAsteriscos); } } // imprime um triângulo de asterisicos com parâmentro n igual a um número inteiro
true
8c8ecebf7aca156ca9d293ffd14974fe4039fcf1
JavaScript
TheRedstoneTaco/theredstonetaco.com
/public/scripts/portfolio.js
UTF-8
4,356
2.890625
3
[]
no_license
var knowledges = ['Semantic UI', 'Bootstrap 4', 'jQuery', 'AJAX', 'NodeJS', 'Mongoose', 'Express'] // on ready $(document).ready(function() { // animate landing section animate_landing(); // who needs default Skype API settings, anyway?!? // who needs actual css, anyway!??!? undoBadStuff(); ...
true
dbac778d00a4677266ea085e540fc0a69e06089b
JavaScript
intfoundation/intchain-wallet
/api/chainlib/Coins/undocoins.js
UTF-8
2,725
2.65625
3
[ "MIT" ]
permissive
/*! * undocoins.js - undocoins object for bcoin * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). * https://github.com/bcoin-org/bcoin */ 'use strict'; const assert = require('assert'); const BufferReader = require('../Utils/reader'); const StaticWriter = require('../Utils/staticwriter'); const CoinEn...
true
b688aca48375d877b906892f3952c22964ec239f
JavaScript
luisaGonzales/elAhorcado
/El ahorcado/ahorcado.js
UTF-8
3,299
3.28125
3
[]
no_license
//Para poder ver el proceso del juego, es necesaria la consola function obtenerPalabraSecreta() { var libreriaPalabras = ["m u l t i m e d i a", "i n t e r n a u t a", "s e r v i d o r", "p r o t o c o l o", "c o r t a f u e g o s", "n a v e g a d o r", "n o d o", "m a r c o", "p a g i n a", "t e l a r a ñ a", "d...
true
8fde6d000204f5c90ccb9786405710820e527b9b
JavaScript
nathanielop/fluxduct
/src/functions/parse.js
UTF-8
665
2.5625
3
[ "MIT" ]
permissive
import operators from '../constants/operators.js'; import FluxductError from '../constants/fluxduct-error.js'; export default (dictionary = {}, obj) => { const throwError = type => { throw new FluxductError(type, { dictionary, obj }); } if (!(obj instanceof Object)) throwError('expectedObject'); if (!Obje...
true
78893b7978f1b5a5439fa59942cc5a3d745169a8
JavaScript
mcstol/gercontas-app
/src/component/Listar/index.js
UTF-8
847
2.578125
3
[]
no_license
import React from "react"; import './style.css' export const Bills = ({id, type, value, onRemove, onUpdate }) => { const onClick = () => onRemove(id) const onAtualizar = () => onUpdate({id, type, value}) return( <tr> <td>{id}</td> <td>{type}</td><td>{value}</td> <td><button onClick={onAtualizar}...
true
482d4884b3c79a48f3aa26e8ec7d58a33bd47bf7
JavaScript
beersy001/cskplay
/app/webroot/js/cameraFlashes.js
UTF-8
593
2.65625
3
[]
no_license
function runCameraFlashes(delay){ return setInterval(function(){ var randomFlashId = Math.floor(Math.random() * 24) + 1; var count = 0; var flashElement = document.getElementById("flash" + randomFlashId); flashElement.style.display = "none"; var intervalId = setInterval(function(){ if(count < 2){ ...
true
403f7f70923235f0f2e31f2479e9a9cdf33a49d0
JavaScript
markmosterd/mosterd.online
/js/main.js
UTF-8
1,439
2.609375
3
[]
no_license
// Wait for DOM (Document Object Model) to load, that's just your website (excluding external files like images) $(document).ready(function(){ // Click the hamburger icon $('.toggle-mobile-menu').click(function(){ // Show the mobile menu $('#mobile-menu').toggleClass('mobile-menu-visible'); ...
true
73d73d1943c41c85c0f68fc92adb9524b473cccc
JavaScript
nvincenthill/projectEulerSolutions
/digitFifthPowers.js
UTF-8
867
4.25
4
[]
no_license
// Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: // 1634 = 1^4 + 6^4 + 3^4 + 4^4 // 8208 = 8^4 + 2^4 + 0^4 + 8^4 // 9474 = 9^4 + 4^4 + 7^4 + 4^4 // As 1 = 1^4 is not a sum it is not included. // The sum of these numbers is 1634 + 8208 + 9474 = 19316. // F...
true
3eb1e8f46e316626a4ac6ac9a2a6a5e5824f5bc2
JavaScript
FransEkstrand/d18prototyp
/2020/personlista/index.js
UTF-8
3,270
2.578125
3
[]
no_license
const express = require('express') const sqlite3 = require('sqlite3').verbose(); const { query } = require('express'); const app = express() const port = 3000 let bodyParser = require('body-parser'); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(express.static('publ...
true
6352e40f1447f0902d8f40402813b54c65979874
JavaScript
sammyne/2016-learning-javascript-3ed
/chapter10/map/entries.js
UTF-8
833
4.0625
4
[]
no_license
'use strict'; const u1 = { name: 'Cynthia' }; const u2 = { name: 'Jackson' }; const u3 = { name: 'Olive' }; //const userRoles = new Map(); const userRoles = new Map([ [u1, 'User'], [u2, 'User'], [u3, 'Admin'], ]); for (let e of userRoles.entries()) { console.log(`${e[0].name} -> ${e[1]}`); } // output ...
true
991ce5f09e280cae52f6339abd0027c55e3a8043
JavaScript
Achiever667/karima
/vendor/summernote/src/js/base/editing/Bullet.js
UTF-8
6,865
2.796875
3
[ "MIT" ]
permissive
define([ 'summernote/base/core/list', 'summernote/base/core/func', 'summernote/base/core/dom', 'summernote/base/core/range' ], function (list, func, dom, range) { /** * @class editing.Bullet * * @alternateClassName Bullet */ var Bullet = function () { var self = this; /** * toggle...
true
8855ce0e7c7053f6bc5336e52d1590b7c419ed8d
JavaScript
981377660LMT/algorithm-study
/chore/js/reverse很快.js
UTF-8
644
3.421875
3
[]
no_license
// reverse快 // !reverse:9.399999999906868 // for:14 // for2:11.70000000006985 let arr = Array(1e7).fill(0) let time = performance.now() arr.reverse() console.log(performance.now() - time) arr = Array(1e7).fill(0) time = performance.now() for (let i = 0; i < arr.length / 2; i++) { const temp = arr[i] ...
true
f74a2bd259f70039da19ddc6bf7162772a0095c1
JavaScript
winniehsuanyuan/2020VIS
/component/map/map.js
UTF-8
3,672
2.578125
3
[]
no_license
let select_date = '2012-01-08'; const CITY = ["臺北市", "嘉義市", "新竹市", "基隆市", "新北市", "桃園市", "臺中市", "彰化縣", "高雄市", "臺南市", "金門縣", "澎湖縣", "雲林縣", "連江縣", "新竹縣", "苗栗縣", "屏東縣", "嘉義縣", "宜蘭縣", "南投縣", "花蓮縣", "臺東縣"]; const CSV_FILE = "data/週成交量_crop_市場.csv"; // reference: https://www.learningjquery.com/2012/06/get-url-parameters-usin...
true
074996cae3ffbc7496fd21f0db4754913fa79da6
JavaScript
daniarzaq/h8-p0-w4
/urutkanAbjad.js
UTF-8
575
3.3125
3
[]
no_license
function urutkanAbjad(str) { var urut = []; var hasil = ''; for (var i = 0; i < str.length;i++){ urut.push(str[i]) urut.sort() } for (var i = 0; i < urut.length;i++){ hasil += urut[i] } return hasil } // TEST CASES console.log...
true
2d54a0c477c7cdd8cb170c0a8ab28a61a0a0e3f8
JavaScript
mattmerrill/organatron
/app/assets/javascripts/booking.js
UTF-8
6,671
2.65625
3
[]
no_license
var attendees = []; var people = []; var selectedContacts = []; function addAttendee(attendee) { $('.attendee').last().parents('.form-group').after('<div class="form-group"><div class="col-sm-12"><input class="form-control attendee" placeholder="Add Attendee"></div></div>'); $('.attendee').last().focus(); $('.at...
true
44de833af955c83b23bf8bab4013f4c77ed34ab6
JavaScript
stephenscaff/svg2avg
/src/assets/js/svg2avg/buildItems.js
UTF-8
2,540
2.609375
3
[]
no_license
import parseTransform from './parseTransform.js' /** * Build AVG Items * @param {object} SVG child properties * @return {object | undefined} */ export default function buildItems(children){ // Map over our svg items let items = [...children].map(child => { // Bail if not a group or path (no AVG support...
true
9a5a36349d655c0cb3a19eedbadfa3f9b55e4463
JavaScript
gtgan/TeaDistribution
/Xoom_curr/Xoom/app/routes/api-routes.js
UTF-8
2,886
2.78125
3
[]
no_license
// ********************************************************************************* // api-routes.js - this file offers a set of routes for displaying and saving data to the db // ********************************************************************************* // Dependencies // =====================================...
true
5b519c5abc4e525a81e0323394aba2027006a532
JavaScript
shage001/interview-cake
/src/bracket-validator/bracket-validator.js
UTF-8
1,254
3.890625
4
[]
no_license
/********************************************************************************************************************** * Let's say: * * '(', '{', '[' are called "openers." * ')', '}', ']' are called "closers." * * Write an efficient function that tells us whether or not an input string's openers and closers are ...
true
627b91872dc5fb59c14fc7e5884d823665c48402
JavaScript
Wave1994-Hoon/javascript-stduy
/fastCampus/javascriptAndHTML/counterExample/src/index.js
UTF-8
517
3.53125
4
[]
no_license
const number = document.getElementById('number'); const increase = document.getElementById('increase'); const decrease = document.getElementById('decrease'); // console.log(number.innerText); // console.log(increase.offsetTop); // console.log(decrease.id); increase.onclick = () => { const currentNumber = parseInt...
true
e6fd06f54f6c8756f955b9176e0da506ed07530b
JavaScript
raphaelgregg/pokedex
/src/service/api.js
UTF-8
927
2.90625
3
[]
no_license
let baseURL = `https://pokeapi.co/api/v2/pokemon/`; // const baseURL = `https://pokeapi.co/api/v2/pokemon?limit=${totalPokemon}`; async function api(pokemon) { let data=""; if(pokemon != undefined) { let response = await fetch(baseURL + pokemon); data = await response.json(); }els...
true
73e3564c4e3d2f5ca9ae838bc1d078422b2e42e1
JavaScript
lizethMarti/PupFinder
/src/store/listas.js
UTF-8
1,208
2.515625
3
[]
no_license
const store = { state : { listas:[{ id:'poodle', nombre: 3125668479 }, { id:'bulldog', nombre: 3605847852 }] }, getters : { listas(state){ return state.listas }, listaPorID(state){ ...
true
b641cc75bea8d1dee7a570093003b1baf1040aff
JavaScript
KyleKnolleLynch/simple-color-changer
/js/hex.js
UTF-8
462
3.375
3
[]
no_license
const btn = document.querySelector('.btn-hero'); const color = document.querySelector('.color'); const hexCode = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 'A', 'B', 'C', 'D', 'E', 'F']; btn.addEventListener('click', () => { let newColor = '#'; for (let i = 0; i < 6; i++) { const randomCode = hexCode[Math.floor(Math.rando...
true
f3605ebe0474eac16d2aa82c810bd9ff9f4ce92a
JavaScript
IvanJJill/npbfood-web-ui
/src/reducers/reducerMealDropped.js
UTF-8
1,321
2.65625
3
[]
no_license
import actions from '../actions/actionTypes'; import { getMealNameAndId } from '../utils'; export default (state = 0, action) => { switch (action.type) { case actions.MEAL_WAS_DROPPED: const payload = reducerMealDropped(state, action.payload); return payload; default: return state; } }; ...
true
6539eb22c289cd5def3f6becde924c4874621b62
JavaScript
dunnock/codinggame-ai
/maze/arena.js
UTF-8
1,595
2.9375
3
[]
no_license
// General class, reusable in all 2D mazes implementations // Arena is a multiline text representation of the battlefield, where // - every character represents type of the cell // - player is a subtype of Player const MAXWIDTHSHIFT = 14 class Arena { constructor(width, height, field, objects) { Object...
true
34d5d6ddb9e81ad15ac17cf39b959d8ac7192b05
JavaScript
MarinaGR/_BBDD
/js/funciones.js
UTF-8
6,105
2.59375
3
[]
no_license
var db; var name_db="Dummy_DB"; function onBodyLoad() { document.addEventListener("deviceready", onDeviceReady, false); db = window.openDatabase(name_db, "1.0", "Just a Dummy DB", 200000); //va en ondeviceready db.transaction(populateDB, errorCB, successCB); } function onDeviceReady() { /* document.a...
true
6a4f0f3d1d0d86842a621675111b839d5efb2947
JavaScript
micha149/homelib
/src/Connection.js
UTF-8
5,105
2.84375
3
[]
no_license
var Driver = require('./Driver/DriverInterface'), Message = require('./Message'), impl = require('implementjs'), invoke = require('underscore').invoke, without = require('underscore').without; module.exports = Connection; /** * The connection object represents an interface to the knx * bus. It need...
true
941ff73861264e6ce30b0258975b7d0b165bcf23
JavaScript
faahim/nest-tab
/src/Components/DayInfo.js
UTF-8
1,340
3.34375
3
[ "MIT" ]
permissive
import React from 'react'; import { currentWeekday } from "../utils/currentWeekday"; //Generate and renders text for day information section function DayInfo(props) { const day = currentWeekday(new Date()); //Structures weather text const weatherInfo = props.weather ? " It's "+props.weather.currently.summ...
true
b509fae05040738d474047e6e0f2e9a0cf8bd3bc
JavaScript
SidneyXu/learn-to-program
/coffeetime-parent/NodeGun/src/16_process.js
UTF-8
363
2.65625
3
[]
no_license
/** * Created by mrseasons on 16/3/9. */ process.on('exit', function (code) { console.log('exit code is', code); }); console.log(process.platform); setTimeout(function () { console.log('timeout'); }, 0); setImmediate(function () { console.log('immediate'); }); process.nextTick(function () { consol...
true
ce1cbc3526ff4ca8942f946948c8b48243b22e9b
JavaScript
huihuiye/web4
/HTML5/NO.2Audio、拖放、文件读取/作业/audioPlayer/AudioPlayer.js
UTF-8
1,360
2.671875
3
[]
no_license
/** * Created by liuyujing on 2016/12/10. */ (function () { function AudioPlayer(audioNode,superView) { this.audioPlayer = audioNode; this.audioListView = new AudioListView(audioNode,superView); this.audioList = this.audioListView.audios; } AudioPlayer.prototype.title = function ...
true
394e9df9542f9c5a5615c35248d7d3ab17be75de
JavaScript
Asmidus/Git
/JavaScript/Basics/index.js
UTF-8
107
2.71875
3
[]
no_license
console.log("hello fuck"); let a = "d"; a = 2; if (typeof a == "number") { console.log("true"); }
true
1dc9873b18320483174323e95bf7716ecfd3a4b4
JavaScript
jonathansham/amazoogle
/sketch.js
UTF-8
354
2.609375
3
[]
no_license
function setup() { noCanvas() let userinput = select('#userinput'); userinput.input(newText); function newText() { chrome.tabs.getCurrent(gotTab); function gotTab() { //send a message to the content script let message = userinput.value(); let msg = { txt: "hello" } chrome.tab...
true
c89042044609aef87b92a50ae6bd47cb3cc5ef6f
JavaScript
tomdionysus/moondial
/game/things/skeleton.js
UTF-8
719
2.65625
3
[]
no_license
const Container = require('../../lib/Container') module.exports = class Skeleton extends Container { constructor(options) { options.id = 'skeleton' options.description = 'A broken skeleton.' super(options) } init() { this.addThing('humerus') this.afterAction('take', (cmd) => { if(cmd.moveThingId==...
true
8c87ffaf83582e548be8bd691e2d645df4d5e683
JavaScript
srknml/Rick-and-Morty
/pages/characters/search-results/[search].js
UTF-8
1,089
2.515625
3
[]
no_license
import unfetch from "isomorphic-unfetch"; import React from "react"; import Utility from "../../../components/utility"; import _ from "lodash"; import Charactercard from "../../../components/charactercard"; import Layout from "../../../components/Layout/layout"; const searchpage = (chars) => { return ( <Layout ti...
true