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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d5c6485e3c6d80efbd123052a44844edca1d1ef3 | JavaScript | BrianMcPhillips/pokedex | /src/SearchPage.js | UTF-8 | 1,857 | 2.734375 | 3 | [] | no_license | import React from 'react';
import styles from './App.css';
import request from 'superagent';
//import Search from './Search.js';
import PokeItem from './PokeItem.js';
class SearchPage extends React.Component {
state = {
search: '',
searchBy: 'pokemon',
isLoadig: false,
pokeState: []
}
handleCli... | true |
5e16ef4c2e27abdfd6a31cd54de03cfe23c82926 | JavaScript | CaiSenYu-N/caishuo-learn-note | /work/十一月/20181105/parentNode/js/main.js | UTF-8 | 443 | 3.171875 | 3 | [] | no_license | var innerBox = document.getElementsByClassName('innerbox')[0];
var pNode = innerBox.parentNode;
var btn = document.getElementsByClassName('btn')[0];
btn.onclick = function(){
//css中的属性写法在js中为驼峰命名法,如:background-color在js中应写为backgroundColor;
innerBox.style.backgroundColor = 'pink';
pNode.style.backgroundColor = 'gr... | true |
ec20f2ee852fa1145f2e076fa33f227d9ca1eabb | JavaScript | NaturalNode/natural | /spec/sentence_tokenizer_parser_spec.js | UTF-8 | 6,409 | 3 | 3 | [
"LicenseRef-scancode-wordnet",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
Copyright (c) 2011, 2020 Chris Umbel, Hugo W.L. ter Doest
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merg... | true |
d0ef92705d673f4c5284ca5a8a74d337a116edbd | JavaScript | brandonbloom/jseg | /src/schema.js | UTF-8 | 8,054 | 2.6875 | 3 | [] | no_license | let {getOwn} = require('./util');
let banInsanity = (s) => {
if (s === '__prototype__') {
throw Error('insanity.');
}
}
let compareLids = (x, y) => {
if (x.lid < y.lid) {
return -1;
}
if (x.lid > y.lid) {
return 1;
}
return 0;
};
class Type {
constructor(schema, name) {
banInsanity... | true |
9f180efc093c61fb62b1b2366e8c0be8c0d12a9e | JavaScript | ae-taylor/react-forms-boxes | /src/NewBoxForm.js | UTF-8 | 1,606 | 3.203125 | 3 | [] | no_license | import React, { useState } from "react";
/** Form for creating a new box to add to a list.
*
* Has state for the height/width/backgroundColor of the item;
* on submission, sends {height, width, backgroundColor} to fn
* rec'd from parent.
*
* BoxList -> NewBoxForm
*/
function NewBoxForm({ addBox }) {
const ... | true |
3c3f249c4afc5366d183553c249760a1874c4e09 | JavaScript | henidahmen/dom | /script.js | UTF-8 | 2,313 | 2.78125 | 3 | [] | no_license | // console.log (document)
// var totalTag = document.getElementById("total")
// var totalTag = document.querySelector("total")
// var imgs = document.getElementsByTagName("img")
// var imgs = document.querySelctorAll("img")
var btnsAddTag = document.getElementsByClassName("add");
var checkTags = document.querySel... | true |
d60f4f0ccd27a0177e3bd518152c45641f9ac06a | JavaScript | nate-parrott/arglitch | /aredit/src/TouchRecognizer.js | UTF-8 | 3,105 | 2.796875 | 3 | [] | no_license | import React, { Component } from 'react';
let edgeZoneWidth = 50;
let MODES = {normal: 'normal', rightEdge: 'rightEdge', bottomEdge: 'bottomEdge'};
export default class TouchRecognizer extends Component {
constructor(props) {
super(props);
this.node = null;
this.reset();
}
render() {
return <div... | true |
a5bef61381b0496c0cc593cef087449c761b3fc2 | JavaScript | lty9900/test | /node/5-15 node/express中获取请求的相关信息.js | UTF-8 | 554 | 2.65625 | 3 | [] | no_license | /**
* Created by Administrator on 2017/5/15.
*/
/*
* 没有 express 我们通过什么方法获得请求的信息
* 通过 url 模块 url.parse(req.url,true);
* pathname 获取路径
* query 获取参数
* */
var express = require("express");
var app = express();
app.get("*",function(req,res){
console.log(req.url);//req.url 获取url
console.log(req.path); //... | true |
a69662e4e65c356831ed53cca4a04ccb01159fae | JavaScript | shafrazi/restaurant_page | /src/modules/home.js | UTF-8 | 2,922 | 2.578125 | 3 | [] | no_license | const renderHero = () => {
const imgWrapper = document.querySelector(".img-wrapper");
const img = document.createElement("img");
img.setAttribute("src", "img/hero_image.jpg");
img.setAttribute("class", "hero-img");
imgWrapper.appendChild(img);
};
const renderMain = () => {
const mainDiv = document.querySel... | true |
fb88a14b41d5ed2b70bdc3b247609656a013cc1f | JavaScript | OSU-CS493-Sp18/final-project-team-0-5 | /api/classes.js | UTF-8 | 5,781 | 2.796875 | 3 | [] | no_license | const router = require('express').Router();
const validation = require('../lib/validation');
/*
* Schema describing required/optional fields of a class object.
*/
const classSchema = {
name: { required: true },
primary_attribute_fid: { required: true },
save_attribute_one_fid: { required: true },
save_attrib... | true |
06db8cae2439bf4ce819832ae161881d1bc3f54c | JavaScript | TooTallNate/input-event | /lib/index.js | UTF-8 | 2,626 | 2.59375 | 3 | [
"MIT"
] | permissive | const fs = require('fs');
const ref = require('ref');
const util = require('util');
const events = require('events');
const Struct = require('ref-struct');
/**
* The C struct looks like this:
*
* struct input_event {
* struct timeval time;
* unsigned short type;
* unsigned short code;
* un... | true |
93304a4e954beb300b7b225a64c5ba7be38fb675 | JavaScript | CastlesGames/CastlesGames.github.io | /Knights&Castles/scripts/main.js | UTF-8 | 7,418 | 2.65625 | 3 | [] | no_license | /*Variables globales*/
var player, cartas, items;
var nivelTutorial;
var cofre, enfermeria, combate;
var numNivel = 1;
var numCombateBoss = 1;
var nombreLocalizacion;
var enTutorial = true;
var dificultadNormal = true;
var isPaused = false;
var contador_seg, contador_min, seg, min, cronometro;
var gameUser;
var gameTim... | true |
b29d461a51c99b54a6b41cecdba2a50f01254e7c | JavaScript | saluk/keyteki | /test/server/cards/03-WC/ImperialRoad.spec.js | UTF-8 | 3,242 | 2.71875 | 3 | [
"AGPL-3.0-only"
] | permissive | describe('Imperial Road', function () {
describe("Imperial Road's ability", function () {
beforeEach(function () {
this.setupTest({
player1: {
house: 'untamed',
inPlay: ['imperial-road'],
hand: ['flaxia', 'tantadlin', 't... | true |
5b1bdc950f7f167e7d2ee7693cca039a88856587 | JavaScript | marjanapesic/webparser | /js/main.js | UTF-8 | 1,047 | 2.625 | 3 | [] | no_license | $( document ).ready(function(){
$("#mainsubmit").click(function(){
$.ajax({
url: 'index.php',
dataType: 'json',
type: 'post',
data: { url: $('#urltext').val(), items: $('#items').val() },
success: function( data, textStatus, jQxhr )
{
$('#response').html('');
var len... | true |
5ff83b9840e10d9f90e9d41654afcdc509c55f62 | JavaScript | kazamx/tissini | /src/components/Producto.jsx | UTF-8 | 1,355 | 2.59375 | 3 | [] | no_license | import React from "react";
import "./css/producto.css";
//import Carrito from './Carrito';
const Producto = ({ producto, carrito, agregarProducto, productos }) => {
const { nombre, precio, id, imagen } = producto;
//Agregar producto al carrito
const seleccionarProducto = (id) => {
const producto = productos... | true |
169e0d6302f8530551f582d28c43aa139ea490f2 | JavaScript | nassirmz/polls | /server/controllers/userController.js | UTF-8 | 1,605 | 2.53125 | 3 | [] | no_license | const bcrypt = require('bcryptjs');
const db = require('../db');
module.exports = {
createUserController(user) {
const queryStr = 'Insert into users (name, email, password) values ($1, $2, $3) returning id, name, email;';
const { name, email, password } = user;
const saltRounds = 10;
return bcrypt.h... | true |
2d1442c1254bdfd3123ce82d89c8dd838a23a849 | JavaScript | amrut-patil/nodejs-sample-1 | /web-server/public/js/app.js | UTF-8 | 1,532 | 3.375 | 3 | [] | no_license |
console.log('client side js file loaded!');
// fetch("http://puzzle.mead.io/puzzle").then((response) => {
// response.json().then((data) => {
// console.log(data);
// });
// })
// fetch("http://localhost:3000/weather?address=Kolhapur").then((response) => {
// console.log("------")
// response... | true |
ddf972b6a705a67929441173c86e5547086e67ba | JavaScript | mygitforjob/test | /src/App.js | UTF-8 | 1,819 | 2.859375 | 3 | [] | no_license | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Time from './Time';
import Day from './Day';
import Calendar from './Calendar';
class App extends Component {
constructor(props) {
super(props);
let date = new Date();
let month = date.getMonth() + 1;
... | true |
59270a12046c3cd1a79ac8bef2b29dbbfced989f | JavaScript | SNMAGNET/backup | /javascriptEX/javascriptEX3.js | UTF-8 | 853 | 3.21875 | 3 | [] | no_license |
for(var a=0; a<5; a++){
for(var b =0; b<5; b++){
document.write("★");
}
document.write("<br>");
}
document.write("<br>");
document.write("<br>");
for(var c=0; c<3; c++){
for(var d =0; d<5 ;d++){
if(d%2==0){
document.write("★");
}
else{
docu... | true |
c9d945a2d3abce059c66f195a7658fdcdb0e534e | JavaScript | vergilxz/MTranzavilidad-Urocal_Banano | /urocalbackend/components/malezacontrol/maleza.controller.js | UTF-8 | 2,669 | 2.703125 | 3 | [] | no_license | // Une varias capas
// Se comunica con el modelo
// *Pendiente: Añadir capa de validación a todos los controladores
//const userDto = require('./users.dto');
const malezaModel = require('./maleza.model');
module.exports = {
// Crear un nuevo Control de Maleza
async createMaleza(req, res) {
// Añadi... | true |
0207f837ce8f5ee7f81e786c4c95e764af424a1a | JavaScript | zhejuhao/Order-Master-JS | /JS/ChoosePerson.js | UTF-8 | 701 | 2.65625 | 3 | [] | no_license | /**
* Created by liqi on 16/1/12.
*/
window.onload = function () {
addli();
}
function addli() {
$.getJSON("../JSON/NameInfo.json", function (data) {
var name = data.name;
var ul = document.getElementById("add-name");
for (var i = 0; i < name.length; i++) {
var li = docume... | true |
7c5144a2dc4508bd92b535ad5ff53906d0696d90 | JavaScript | antoneekstrom/ray-marching-2d | /index.js | UTF-8 | 8,468 | 2.6875 | 3 | [] | no_license |
/// <reference path="node_modules/@types/p5/global.d.ts" />
const MODE_RENDER = "render";
const MODE_SCENE = "scene";
let ray;
let camera;
let objects;
let objectCount = 10;
let renderMode = MODE_SCENE;
let autoMarch = true;
let marchingOptions;
class Transform {
constructor(pos, s, c) {
this.pos = po... | true |
179712d84f94e97d9c3f7767c708bbc07e78fae0 | JavaScript | debugcheck/TLReactNativeProject | /view/component/course5.js | UTF-8 | 1,959 | 2.609375 | 3 | [
"MIT"
] | permissive | /**
* Course 5
* React Native控件之ProgressViewIOS进度条讲解
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
ProgressViewIOS
} from 'react-native';
import Util from '../utils';
class ProgressViewExample extends Component{
constructor() {
super()
this.stat... | true |
6435ce4fa6de432b1cb804b44e55a91c3cd6c6a2 | JavaScript | d4n1elchen/Kururinpo | /server.js | UTF-8 | 1,289 | 2.59375 | 3 | [] | no_license | var express = require('express');
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
const { Client } = require('pg');
const client = new Client({
connectionString: process.env.DATABASE_URL,
ssl: true,
});
client.connect();
var port = process.env.PORT || 3000;
s... | true |
2a8e7284d4d1e6cf416fbdb4a12fda827e916917 | JavaScript | Dhanapandi555/internship_assignment | /App.js | UTF-8 | 1,391 | 2.5625 | 3 | [] | no_license |
import React,{useState} from 'react';
import { StyleSheet, Text, View ,TextInput, Button} from 'react-native';
export default function App() {
const[name,setname]=useState("")
const[job,setjob]=useState("")
const submitData=async()=>{
fetch("https://reqres.in/api/users",{
method:"post",
he... | true |
f5685efe1df30fff10081d1817c8c546a1c4cc23 | JavaScript | coral/twocb | /files/dynamic/complement.js | UTF-8 | 2,164 | 3.046875 | 3 | [
"MIT"
] | permissive | // Animation speed in milliseconds. Higher numbers are slower
state = {
speed: 100,
};
var speed = 10000;
// Percent of color wheel for ends. 1/2 is complementary, 1/3 and 2/3 is triadic, etc
var colorPercent = 1 / 2;
// Percent to dim the center blend. Higher numbers are darker.
var percentDim = 0.7;
var position... | true |
bf3c915c73c33345aae7cc86ee55b16ca6f260a3 | JavaScript | the-cc-dev/choo-sse | /index.js | UTF-8 | 1,698 | 2.53125 | 3 | [
"MIT"
] | permissive | /* global EventSource */
var assert = require('assert')
module.exports = sse
var events = sse.events = {
OPEN: 'sse:open',
CLOSE: 'sse:close',
MESSAGE: 'sse:message',
ERROR: 'sse:error'
}
function sse (route, opts) {
opts = opts || {}
assert.equal(typeof name, 'string', 'choo-sse: route should be type st... | true |
b6ccd6fa4e703e848a28dfd0ab1c6e7b7cfb6948 | JavaScript | edostler/codeclan_classwork | /week_13/day_1/homework/start_point/controllers/films.js | UTF-8 | 1,036 | 2.78125 | 3 | [] | no_license | //since we don't have a database we'll use our front end models at the moment
var films = require('../client/src/models/films')();
var Film = require('../client/src/models/film');
var Review = require('../client/src/models/review');
var express = require('express');
var filmRouter = new express.Router();
filmRouter.g... | true |
9b0cbfaf19732a325b02b01f940e514b65d3521e | JavaScript | Natasha-B/Robot_SEM819 | /Centrale de Commande/Application/public/map.js | UTF-8 | 374 | 2.59375 | 3 | [] | no_license | //https://leafletjs.com/examples/crs-simple/crs-simple.html
var map = L.map('mapid', {crs: L.CRS.Simple});
var bounds = [[0,0], [720,1000]];
var image = L.imageOverlay('iu.jpeg', bounds).addTo(map);
map.fitBounds(bounds);
var map = L.map('mapid', {
crs: L.CRS.Simple,
minZoom: -3
});
var sol = L.latLng([ 1... | true |
57610f6aee1ad1aa38c21f5299b4effbaef16a4e | JavaScript | Thearness12/kweb.3rd | /clac.js | UTF-8 | 238 | 2.5625 | 3 | [] | no_license | const clac ={};
clac.add = function(a, b){
return a + b;
};
clac.subtract = function(a,b){
return a - b;
};
clac.mult = function(a,b){
return a * b;
};
clac.div = function(a,b){
return a / b;
};
module.exports = clac; | true |
88fd0fcebed65fdea1267d5216937225a399f657 | JavaScript | arbyte-br/Arbyte-Atividades | /turma-2/marimaiko/Lista_6/E9.js | UTF-8 | 404 | 3.890625 | 4 | [] | no_license | // [O censor] - Faça um programa que receba uma frase e troque a
// palavra ‘bosta’ por ‘estrume’. (eu sei, nosso trabalho como programador de vez em
// quando é uma estrume) .
// Utilize o método replace()
let rs = require('readline-sync');
let frase = rs.question('Insira uma frase com bosta: ');
let replace... | true |
bd2ff05afa848e1042640646a5425226b1ae1895 | JavaScript | sjt145/LiveWeatherForecast | /src/store/reducers/liveweather.js | UTF-8 | 636 | 2.65625 | 3 | [] | no_license | import * as actionType from '../actions/types';
const initialState = {
weather: [],
error: null
};
function weather(state = initialState, action) {
switch (action.type) {
case actionType.LIVEWEATHER_SAVE_START:
return { ...state, loading: true, error: null };
case actionType.L... | true |
aba2fbfaa1c16dde04fb710bf2a5ca2f5bb00053 | JavaScript | Numel2020/Javascript-EX | /src/part1.js | UTF-8 | 1,328 | 4.28125 | 4 | [] | no_license | let variable = 1;
let variable2 = 1;
console.log(typeof variable);
// value and the type being equal ===
console.log(variable === variable2);
console.log(isNaN(variable));
/////////////////////////////////////
let var1 = {
name: "Max"
};
console.log(typeof var1);
// dfferent ways to write fun... | true |
f8d267e7cf50572a910b17fbe8bfefb00e697584 | JavaScript | gianmegantara/udemy-courses | /model/product.js | UTF-8 | 980 | 2.984375 | 3 | [] | no_license | const fs = require('fs'); // import module filesystem
const path = require('path'); //import module path for directory
const p = path.join(
path.dirname(process.mainModule.filename),
'data',
'product.json'
); //make a variable p for descript the path data/json data
const getProductFromFile = cb => {
... | true |
fad20f748ecf790f7220c00d6893377abfd8c133 | JavaScript | sirarthurnell/Spaceship | /js/keyboard.js | UTF-8 | 408 | 2.546875 | 3 | [] | no_license | var keyboard = (function(){
var pressedKeys = [],
keys = {
top: '38',
down: '40',
left: '37',
right: '39',
s: '83',
};
$(window).keydown(function(e){
pressedKeys[e.which] = true;
});
$(window).keyup(function(e){
pressedKeys[e.which] = f... | true |
f3ea686124ea3d92eb418e2e14fa3bee0e7abbe8 | JavaScript | codacy-badger/BattleBot | /commands/roles/letsago.js | UTF-8 | 753 | 2.890625 | 3 | [] | no_license | module.exports = { name: 'letsago', description: 'Gives the author the Verified role', aliases: ['letago', 'letsgo'], usage: ' ', modonly: false, async run(client, message, args) {
// Currenty disabled
if (message.author.id !== client.config.ownerID) return;
// Sets the verified role
let role = messag... | true |
f4d5e6a9fa0938ecc70218b664af68ced03af744 | JavaScript | blipn/matchmaking-js | /src/interface/logs.js | UTF-8 | 548 | 2.5625 | 3 | [
"MIT"
] | permissive | const fs = require('fs');
let errors = true;
let infos = true;
const log = (data) => {
if (data.error && errors) {
fs.appendFile('matchmaking.log', `\n${new Date()} : ERROR : ${data.error}`, (err) => {
if (err) throw err;
});
} else if (infos) {
fs.appendFile('matchmaking.log', `\n${new Date()} ... | true |
3fb2afccf493a4c1175a4f3a884b1f15cf58b37c | JavaScript | rpgreen/ndevdemo | /react-site/src/components/DataPanel.js | UTF-8 | 2,137 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | import {Component} from "react";
import React from "react";
const refreshPeriod = 2000;
class DataPanel extends Component {
constructor(props) {
super(props);
this.state = {
isLoading: false,
error: null,
items: []
};
}
render() {
retur... | true |
a5a11a8540836d9bf726e57032645af87bbd2fc7 | JavaScript | BlairCalgary/cohort4 | /react-02/src/python/syntax.js | UTF-8 | 3,158 | 4 | 4 | [] | no_license | const syntax = {
// number
addTwo: (x) => {
return x+2;
},
// string
addHone: (x) => {
return x + 'Hone';
},
// boolean
isNameBlair: (x) => {
return (x==='Blair');
},
isBoolean: (x) => {
return (typeof(x)==='boolean');
},
// array
i... | true |
1a39e7dcd950756fa736afd42404bfe1b8c6e636 | JavaScript | numbqr123/huiqianzhushou | /site/Public/common/js/controls/messageControl.js | UTF-8 | 4,131 | 2.578125 | 3 | [
"MIT"
] | permissive | /**
* Created by ManonLoki1 on 15/10/27.
* 消息控件
*/
//消息模块
define(['jquery'], function () {
var modal_id = "control-modal-tips";//弹窗ID
var refereceCount=0;//引用数量 用于分离各自窗体的Dom引用
/**
*
* @param config 配置信息 Object
* @param callback 回调函数 function
*
* 配置信息定义
* type alert / confir... | true |
21ab4c4156453ad0e6b1e647884c21fa7aec4e4a | JavaScript | polzuka/yet_another_exchange_project | /src/backend/connectors/kraken.js | UTF-8 | 4,726 | 2.53125 | 3 | [] | no_license | 'use strict';
const rp = require('request-promise');
const SortedMap = require('collections/sorted-map');
const Connector = require('./connector');
const ConnectorLoggingContainer = require('../logger');
const logger = ConnectorLoggingContainer.add('kraken');
const KRAKEN_URL = 'https://api.kraken.com';
const API_V... | true |
daead3163ca97cd331d62c6e5ec6aa1fce3d3edd | JavaScript | BallingerBallingerAndBallinger/ConsumeRoom | /src/entities/party-goer.js | UTF-8 | 3,161 | 2.765625 | 3 | [] | no_license | (() => {
var entityBase = require('../crappy-entity.js');
function initialize(renderer, movementHandler) {
var constructor = () => {
var entity = entityBase.initialize(renderer, movementHandler);
var render = renderer;
var steps = 0;
var stepsGenerator = () => Math.round(10 + Math.rando... | true |
9d6287764bb174eb2b9612e171b45d73e175ad4e | JavaScript | giftphiri/Student-Life-Planner | /todo.js | UTF-8 | 3,161 | 3.359375 | 3 | [] | no_license | var ToDoCounter = -1;
var key = [];
var storeKey = [];
// Create a "close" button and append it to each list item
var myNodelist = document.getElementsByTagName("LI");
var i;
for (i = 0; i < myNodelist.length; i++) {
var span = document.createElement("SPAN");
var txt = document.createTextNode("\u00D7");
span.cla... | true |
8919f69c65aafa21ee79562e56b95f3b01c6d86f | JavaScript | neskoc/js | /kmom01/lab1/answer.js | UTF-8 | 7,355 | 3.765625 | 4 | [
"Apache-2.0"
] | permissive | /**
* @preserve 0d499be94d6cf42818017169f0d31b35
*
* 0d499be94d6cf42818017169f0d31b35
* js
* lab1
* v1
* necu20
* 2020-10-30 01:15:15
* v4.0.0 (2019-03-05)
*
* Generated 2020-10-30 02:15:15 by dbwebb lab-utility v4.0.0 (2019-03-05).
* https://github.com/dbwebb-se/lab
*/
/*jshint maxcomplexity:false */
/* ... | true |
99a68822551110d763c5b955e063fc4f0e727a63 | JavaScript | aafernands/Project_Sample | /project_sample/src/components/Welcome.js | UTF-8 | 252 | 2.546875 | 3 | [] | no_license | import { Component } from "react";
import "../App.css";
class Welcome extends Component {
render() {
console.log(this.props);
return (
<h1>
Welcome {this.props.name} your age is {this.props.age}
</h1>
);
}
}
export default Welcome;
| true |
bb496e74d6d40fb6fa4ce2adf80cc5140e230922 | JavaScript | vickazy/FaceRecognition | /GUIFaceRecognition/linkjs/trainface.js | UTF-8 | 1,203 | 2.609375 | 3 | [] | no_license | function add_face(){
const {PythonShell} = require('python-shell');
var path = require("path");
var name = document.getElementById("person").value
console.log(name);
var options = {
scriptPath : path.join(__dirname, '/../'),
mode: 'text',
encoding: 'utf8',
pythonPath: '/usr/bin/python3',
... | true |
7a7be8c9e0d99f37fe4a9043652bd9c7fa742e1a | JavaScript | Sadrsys/fixed-merkle-tree | /src/merkleTree.js | UTF-8 | 5,520 | 2.875 | 3 | [] | no_license | // keccak256("tornado") % BN254_FIELD_SIZE
const DEFAULT_ZERO = '21663839004416932945382355908790599225266501822907911457504978515578255421292'
const defaultHash = require('./mimc')
// todo ensure consistent types in tree and inserted elements?
// todo make sha3 default hasher (and update tests) to get rid of mimc/sna... | true |
b6b19ed1c720ddfc9f330351a179d9001551f271 | JavaScript | marbrb/games-flask | /static/src/index.js | UTF-8 | 2,521 | 3.140625 | 3 | [] | no_license | 'use strict';
let canvas = document.getElementById('canvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
conf.WIDTH = canvas.width;
conf.HEIGHT = canvas.height;
function Game(canvas){
this.ctx = canvas.getContext('2d');
this.generador = generate_balls(1000, 10);
this.baller = n... | true |
7d42c0d4561b87b935326454742b579df97f801e | JavaScript | brianbirir/lbs | /js/map.js | UTF-8 | 4,552 | 3.203125 | 3 | [] | no_license | //Map Javascript Functions
//gelocation function
function geolocationSuccess(position) {
//map positions
var lat = position.coords.latitude;
var long = position.coords.longitude;
//output latitude and longitude into text fields
sendLatLong(lat, long);
//get center coordinates
var ... | true |
1b0cc77c0c3903d077cbd354de3d6918fb49fbf8 | JavaScript | rafapirotto/ArqSoftPractica | /Pirotto-Moraes-Auth-master/services/organization.js | UTF-8 | 483 | 2.578125 | 3 | [] | no_license | const OrganizationRepository = require("../dataAccess/organization");
const organizationRepository = new OrganizationRepository();
class OrganizationService {
constructor() {}
async getOne(name) {
return await organizationRepository.getOne(name);
}
async getAll() {
return await o... | true |
ae0bbbaa6521f911c48b0d143b9565f28fe39d38 | JavaScript | sergiomata/layer-node | /components/message/controller.js | UTF-8 | 647 | 2.53125 | 3 | [
"MIT"
] | permissive | const store = require('./store');
const addMessage = (user,message) => {
return new Promise ((resolve,reject) =>{
if(!user || !message){
console.error("[messageController] no hay usuario o mensaje")
return reject('datos incompletos');
}
const fullMessage = {
... | true |
3f6262f18b123907291980f74acfbf835d989f3c | JavaScript | pauEscarcia/AplicacionesInternet- | /AIpauT6vf2/SCRIPTS/AJAX.JS | WINDOWS-1250 | 3,974 | 2.90625 | 3 | [] | no_license |
function objetoAjax(){
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
re... | true |
df49df1ecc11a4b81f22f09d2d374d4082230d67 | JavaScript | adzhou/oragle | /WebKit/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/javascript_unittests.js | UTF-8 | 2,133 | 3.125 | 3 | [
"BSL-1.0"
] | permissive | /*
* Copyright (C) 2011 Google Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version... | true |
585b77e17011931ab3bfaa048e4fccbff2367edb | JavaScript | travel-consensus/travel-consensus | /server/apis/task-api.js | UTF-8 | 4,110 | 2.734375 | 3 | [] | no_license | require('../server-helper'); // Keep me near the top; I load a few global utilities.
var TaskAPI = require('express').Router();
var Task = require(__models + '/task');
var Message = require(__models + '/message');
var Suggestion = require(__models + '/suggestion');
module.exports = TaskAPI;
/*
POST t... | true |
1d1a823b5d819331284233af8b6273302796f5dc | JavaScript | tchak/ember-dataloader | /tests/unit/dataloader-test.js | UTF-8 | 3,763 | 2.765625 | 3 | [
"MIT"
] | permissive | import DataLoader from 'ember-dataloader';
import { run } from '@ember/runloop';
import { module, test } from 'qunit';
module('DataLoader', function() {
test('#load(1)', async function(assert) {
let loader = new DataLoader(async keys => keys.map(key => `item ${key}`));
let data = await run(() => loader.load(... | true |
258f32926bb538e6149725272bed79e36b9bb6b2 | JavaScript | validate-io/uppercase | /lib/index.js | UTF-8 | 734 | 3.21875 | 3 | [
"MIT"
] | permissive | /**
*
* VALIDATE: uppercase
*
*
* DESCRIPTION:
* - Validates if a value is an uppercase string.
*
*
* NOTES:
* [1]
*
*
* TODO:
* [1]
*
*
* LICENSE:
* MIT
*
* Copyright (c) 2014. Athan Reines.
*
*
* AUTHOR:
* Athan Reines. kgryte@gmail.com. 2014.
*
*/
'use strict';
// MODULES //
var isString = require( 'validate... | true |
bd78f73e5033f36da8d38ef3fa4105306b4dc9f2 | JavaScript | alliewas/cta-near-me | /frontend/src/components/Arrival.js | UTF-8 | 1,326 | 2.71875 | 3 | [] | no_license | import React from "react";
var pluralize = function(base, value) {
if (value != 1) {
return base + "s";
} else {
return base;
}
}
var shortTime = function(value) {
if (value) {
var d = new Date(value);
var hours = d.getHours();
var ampm = "PM";
if (hours < 12) {
ampm = "AM";
... | true |
03d396755c23be4dd32497acc50732ad90968f2c | JavaScript | R-J/vanilla-cli | /src/NodeTools/library/sass-utility.js | UTF-8 | 5,737 | 2.6875 | 3 | [
"MIT"
] | permissive | /**
* @copyright 2009-2017 Vanilla Forums Inc.
* @license MIT
*/
const path = require("path");
const fs = require("fs");
const chalk = require("chalk").default;
const { print, printVerbose, printError } = require("./utility");
module.exports = {
createSassTool
}
function createSassTool(sourceDirectories) {
... | true |
e48849e82f5f24238a189d9ac222cbc76abde95c | JavaScript | harryvu801/personal-project | /public/js/profCtrl.js | UTF-8 | 3,361 | 2.53125 | 3 | [] | no_license | app.controller('profCtrl', ($scope, mainService, $state)=> {
$scope.userBooks= [];
function getUser() {
mainService.getUser().then((user)=> {
console.log('USER DATA',user);
if (user) $scope.currentUser = user;
else $scope.currentUser = 'NOT LOGGED IN';
})
}
getUser();
function g... | true |
22a0aa365aeff62d0be023eadd22d750209321ee | JavaScript | Awpatterson217/is-lib | /lib/isMap.js | UTF-8 | 221 | 2.90625 | 3 | [
"MIT"
] | permissive | "use strict";
/**
* Is val an instance of Map
* @param {*} val
* @returns boolean
*/
const isMap = (val) => {
return !!(
val
&&
{}.toString.call(val) === '[object Map]'
);
}
module.exports = isMap;
| true |
fcaaebd7a9662d78a9bb9b678ba893165b3be313 | JavaScript | Disha-Jadhav/Project-24 | /sketch.js | UTF-8 | 1,112 | 2.84375 | 3 | [] | no_license | const Engine = Matter.Engine;
const World = Matter.World;
const Bodies = Matter.Bodies;
const Body = Matter.Body;
var box1, box2, box3;
var paper1;
var ground1;
function setup()
{
createCanvas(1000, 700);
engine = Engine.create();
world = engine.world;
box1 = new box(800, 644, 200, 20);
box2 = new box(700... | true |
9594db197ac7f063cbcd31418134a8263db11bb8 | JavaScript | DazhiLi-hub/Dazhi-Project | /Web-Application/WebApplicationHW5/problem2/calculate.js | UTF-8 | 2,467 | 3.53125 | 4 | [] | no_license | var unit
function calculate()
{
console.log(unit);
var shape=document.getElementById("shape");
console.log(shape.value);
var r=document.getElementById("radius");
console.log(r.value);
var h=document.getElementById("height");
console.log(h.value);
var v;
var pi=3.1415926;
if (unit... | true |
3e55ed382bea0ee68aab9536c419995ef5179414 | JavaScript | saschak07/car-driver-ui | /src/Containers/Drivers/Drivers.js | UTF-8 | 1,680 | 2.5625 | 3 | [] | no_license | import React,{Component} from 'react'
import Driver from '../../Components/Driver/Driver'
import axios from '../../axios';
import {withRouter} from 'react-router-dom'
import './Drivers.css'
//import { withRoute } from 'react-router-dom'
class Drivers extends Component{
state = {
driverList:[]
}
com... | true |
1adcc137ef44321103a211fb45b1d79acf0169cd | JavaScript | sidiki97/JavaScriptBook | /readInputOutput/greeter.js | UTF-8 | 391 | 3.796875 | 4 | [] | no_license |
let readInput = require('readline-sync');
let name = readInput.question('What is your name? ');
console.log(`Hello, ${name}`);
// Functions
function firstName() {
let firstName = readInput.question('First name: ');
return firstName;
}
function lastName() {
let lastName = readInput.question('Last name: ');
r... | true |
ece32768ec9a67442c065c1aebd21ba13ccd0d66 | JavaScript | LeResKP/xmltool | /webmedia/js/xmltool.js | UTF-8 | 11,560 | 2.5625 | 3 | [
"MIT"
] | permissive | if (typeof xmltool === 'undefined') {
/*jshint -W020 */
xmltool = {};
}
/** @namespace */
xmltool.form = {};
(function($) {
/**
* Update the prefix of the element which belong a list.
* @param {jQuery} $btn - The button clicked used to get all the next element
* @param {string} position... | true |
cfc4990560cbb131e4d4dbdabd5cceb6dfa0a70b | JavaScript | rteslaru/cah-meteor | /server/methods.js | UTF-8 | 725 | 2.53125 | 3 | [] | no_license | Meteor.startup(function() {
if (Cards.find().count() === 0) {
Meteor.call('loadCards');
}
});
Meteor.methods({
loadCards: function() {
var whiteCards = Assets.getText("wcards.txt").split('<>');
var blackCards = Assets.getText("bcards.txt").split('<>');
whiteCards[0] = white... | true |
34b7d4973941d815206cea585dd98f761ac36c2f | JavaScript | fuaditrockz/nimbly-testing-boilerplate | /src/components/PostForm/index.js | UTF-8 | 2,291 | 2.546875 | 3 | [] | no_license | import React, { Component } from 'react'
import { Container, Row, Col, Card, Form, Button } from 'react-bootstrap'
class PostForm extends Component {
constructor(props) {
super(props)
this.state = {
dataInput: {
title: '',
content: ''
}
}
this.handleInputChange = this.hand... | true |
0750db2b1164d713061df3f341afb2b409ee6bd5 | JavaScript | acevedo93/Movie-Search | /js/app.js | UTF-8 | 2,661 | 2.921875 | 3 | [] | no_license |
/*-----------------js---------//
Hecho por:David Acevedo
para:prueba EGO
2017
//-----------------------------*/
(function(d){
let form = d.getElementById('form');
let container = d.getElementById('container-result');
let config = {
apiKey:'2eef05c086fcf6d9c34d52f54f47812d',
};
function msnErr (error... | true |
c7a202c3ba142cb370de5d4610e26fe9dc869771 | JavaScript | razakhawaja/Connect-4- | /client.js | UTF-8 | 2,819 | 2.9375 | 3 | [] | no_license | // 2010006
const socket = io()
const buttons = []
const buttonClickHandler = ev => {
ev.preventDefault()
socket.emit('buttonPress', ev.target.value, socket.id)
}
socket.on('updatedGrid', uGrid => {
clientBoard = uGrid
createGridwButtons() // update client side grid with server side grid
setState("") ... | true |
b413f71ce64bc984016294492611f69a71df0dd2 | JavaScript | Caco74/web_escuela | /js/index.js | UTF-8 | 3,514 | 3.3125 | 3 | [] | no_license | // Hemos omitido los acentos en los comentarios por compatibilidad
//Define las variables que necesites
let pasados = [];
let proximos = [];
let hoy;
let eventos;
$(document).ready(function () {
//Carga los datos que estan en el JSON (info.json) usando AJAX
$.ajax({
url: 'http://127.0.0.1:5500/info.json'
... | true |
f0ca8bec3e7d19511d6cfb39a4265d9186d3899d | JavaScript | step-batch-7/graph-sukhiboi | /test/test_mst.js | UTF-8 | 2,297 | 2.5625 | 3 | [] | no_license | const assert = require('chai').assert;
const { Graph, getMST, getMSTByKruskal } = require('./../src/graph');
describe('getMST', () => {
it('should get the minium spanning tree from sparsely connected nodes from both the algorithms', () => {
const pairs = [
['a', 'b', 5],
['a', 'c', 8],
['b', 'c... | true |
bb260f66fe5e090ea42d181062434d7879c5f210 | JavaScript | watcherdm/memblox | /memblox.js | UTF-8 | 5,793 | 2.625 | 3 | [
"MIT"
] | permissive | (function(window, document, undefined) {
if(!window.console || !console.log){
console = {};
console.log = alert;
}
/* randomInt
* @param low : the low number in the return set
* @param high : the high number in the return set
*/
function randomInt(low, high){
return Math.floor(Math.random... | true |
ff4beab65f22dd2a68867b54adfe60f61482e324 | JavaScript | francois80/exo_canvas2 | /exo1_canvas/assets/js/script.js | UTF-8 | 602 | 2.859375 | 3 | [] | no_license | var canvas = document.getElementById("mon_canvas");
var ctx = canvas.getContext("2d");
//cornet de glace
ctx.beginPath();
ctx.moveTo(200, 200);//point de départ
ctx.lineTo(250,100);//de la pointe vers la droite(côté droit du cone)
ctx.lineTo(150,100)//dessus du cone
//ctx.lineTo(200,200);//de la gauche vers le bas(côt... | true |
be2fa4bc9683b3bf6db609c3819ae645f9a3d88d | JavaScript | FatecdeItaqua/jovensintegrais | /adm/js/main.js | UTF-8 | 2,822 | 2.578125 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | $(() => {
window.location.hash = ""
window.onpopstate = function (event) {
let paginaDestino = window.location.hash.replace(/#/, '')
this.setConteudoPaginaClicada(paginaDestino)
}
window.location.hash = "colaborador"
$(document).on('click', '.trigger', function (event) {
... | true |
3d85209b28b5f04901ef0b6a5b3d3c7f051bc358 | JavaScript | zerkalica/lom_atom | /src/conform.js | UTF-8 | 2,329 | 2.78125 | 3 | [] | no_license | // @flow
export const handlers: Map<mixed, Function> = new Map([
[
Array,
function arrayHandler<Target: mixed[], Source: mixed[]>(target: Target, source: Source, stack: mixed[]) {
let equal = target.length === source.length
for(let i = 0; i < target.length; ++i) {
... | true |
32a4526e1c26a7e93f1b5da268a3c20a391f8070 | JavaScript | jonghak96/javascript | /04_23/js/forEach.js | UTF-8 | 1,676 | 3.296875 | 3 | [] | no_license | (function() {
var obj = {
// init : function() {} // ECMA Script 5
init() {
this.forEachFn();
},
forEachFn() {
console.log("forEachFn();");
// 체크박스 배열처리
let chk = document.querySelectorAll("input[name='chk']");
... | true |
eea392ed9abdfcc06257d0b34a1de90cf63f2d3d | JavaScript | geowe2-ce/geowe-gis | /api/tool/info/QuickFeatureInfoTool.js | UTF-8 | 1,807 | 2.578125 | 3 | [
"MIT"
] | permissive | import { ToggleButtonTool } from '../base/ToggleButtonTool';
import FeatureInfoControl from '../../control/FeatureInfoControl';
export class QuickFeatureInfoTool extends ToggleButtonTool {
constructor(map) {
super({ id: "quickFeatureInfoTool", map: map });
this.featureInfoControl = new Feat... | true |
d9363567378dae25745a28feb62be61bdeb833d1 | JavaScript | alexandre-mace/seed | /client/src/components/dashboard/MyProjects.js | UTF-8 | 1,438 | 2.515625 | 3 | [] | no_license | import React from 'react';
import {fetch} from "../../services/dataAccess";
import MyProjectsMobile from "./MyProjectsMobile";
import MyProjectsDesktop from "./MyProjectsDesktop";
export default function MyProjects(props) {
const [projects, setProjects] = React.useState([]);
// We call a new fetch because those d... | true |
068faa76f66d6c26d8af84a18c49e3484fa9c442 | JavaScript | akshay2042000/projects | /pro1/project1.js | UTF-8 | 326 | 3.140625 | 3 | [] | no_license | let date;
let time;
let a;
const opt={weekday : 'long', year : 'numeric', month : 'long', day:'numeric'};
setInterval(() => {
a=new Date();
time=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds();
date=a.toLocaleDateString(undefined,opt);
document.getElementById('d').innerHTML=time+"<br> ON "+date;
}, ... | true |
0e42fbe8afec84ad80bb6e8713b7cbea5a255932 | JavaScript | phrabos/MTP-server | /lib/models/Brew.js | UTF-8 | 1,857 | 2.734375 | 3 | [] | no_license | const pool = require('../../pool');
module.exports = class Brew {
id;
teaID;
userID;
weight;
waterVolume;
temperature;
time;
infusions;
notes;
tags;
rating;
constructor({
id,
tea_id,
user_id,
weight,
water_volume,
temperature,
time,
infusions,
notes,
tags,
rating,
}) {
this.id = i... | true |
2eb590c48d63c0f6622b3eecf33fcb0c0a67dbe1 | JavaScript | varunlvs/varunlvs.github.io | /Data Visualization/projects/1.5/js/app.js | UTF-8 | 1,650 | 2.96875 | 3 | [] | no_license | var margin = { top: 10, right: 10, bottom: 100, left: 100};
var width = 600 - margin.left - margin.right;
var height = 400 - margin.top - margin.bottom;
var g = d3.select('#chart-area').append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.appen... | true |
83c028319648c37c8494b68b956d02bdbe2fd2d1 | JavaScript | YavorGrancharov/Softuni-Modules | /JS Applications - March 2018/Templating - Lab/Contact Book/app.js | UTF-8 | 856 | 2.75 | 3 | [] | no_license | $(() => {
let details;
let data;
async function f() {
data = await $.get('data.json');
let dataObj = {
contacts: data
};
let contacts = await $.get('templates/contacts.html');
let contactsTemplate = Handlebars.compile(contacts);
details = await $.... | true |
ef521f2474e320f48ed6eaf32468005059224458 | JavaScript | Gresliebear/jubilant-market | /Front-end/demo/src/components/Handlers/HandlersLib.js | UTF-8 | 717 | 2.640625 | 3 | [
"MIT"
] | permissive | import React, {useState} from 'react'
// refactor using custom Hooks
function useAmountValidate(props) {
const [totalAmount, setAmount] = useState(0);
const [depositError, setError] = useState("");
const AmountHandler = (event) => {
console.log("Handler",)
if(event.target.value <=... | true |
54cb79c7283bebe2c0f10ba87531d418af0e7b61 | JavaScript | celestedubini/todolist-with-pern-stack-and-sequelize | /client/src/components/ListTodo.js | UTF-8 | 1,001 | 2.640625 | 3 | [] | no_license | import React, { Fragment, useEffect, useState } from "react";
import Accordion from "./Accordion";
import './ListTodo.css';
const ListTodo = () => {
const [todos, setTodos] = useState([]);
const Aisles = ['Baking', 'Beverage', 'Bread', 'Personal Care', 'Candy and Snack', 'Canned Goods', 'Condiment', 'Dairy', '... | true |
5dcd8e9d16506a11069a39c7a0fe1f0a7214cda9 | JavaScript | anjana-kb/Luminarmearnstack | /javascript works/functions/ARRAY METHODS/filter.js | UTF-8 | 203 | 3.671875 | 4 | [] | no_license | //print even numbers
var arr=[10,11,12,13,14,15,16]
console.log(arr.filter(num=>num%2==0));
//print names starting with r
var names=["ram","ravi","arun"]
console.log(names.filter(name=>name[0]=='r')); | true |
cf9d2ca3f22129c35cff6ff0a93d4e5d36c90816 | JavaScript | golozubov/ranges | /src/RangeCollection.js | UTF-8 | 3,932 | 3.40625 | 3 | [] | no_license | import { InvalidRangeError } from './InvalidRangeError';
import { RangeTreeNode } from './RangeTreeNode';
export class RangeCollection {
constructor() {
this.tree = null;
}
/**
* Adds a range to the collection
* @param {Array<number>} range - Array of two integers that specify beginning... | true |
bf7db89cfb53a30511c78edf0a902628db89b697 | JavaScript | lpzraf/flask-postgresql-note-taking-app | /application/static/scripts.js | UTF-8 | 402 | 2.609375 | 3 | [] | no_license | (function () {
var clockElement = document.getElementById( "clock" );
function updateClock ( clock ) {
clock.innerHTML = new Date().toLocaleTimeString();
}
setInterval(function () {
updateClock( clockElement );
}, 1000);
}());
$('.message .close')
.on('click', function(... | true |
797442ee09b6bc13728369319a2b6fcc436dd940 | JavaScript | koji-kimura/study-js-ES6 | /src/spread.js | UTF-8 | 617 | 3.375 | 3 | [] | no_license | const defaultColors = ["赤", "緑"];
const userFavoriteColors = ["オレンジ", "黄"];
const fallColor = ["茶色", "紅葉"];
let x = defaultColors.concat(userFavoriteColors);
let y = ["青", ...defaultColors, ...userFavoriteColors];
console.log(x);
console.log(y);
///引数は可変長演算子
function validateShoppingList(...items) {
if (items.in... | true |
54d877ed8d1fd13ee2e68dbaef7b6c394234fb7e | JavaScript | OrionOctupus/React_quiz_app | /src/components/FinishedQuiz/FinishedQuiz.jsx | UTF-8 | 2,299 | 2.65625 | 3 | [] | no_license | import React from 'react';
import s from './FinishedQuiz.module.css';
import Button from '../UI/Button/Button';
import { Link } from 'react-router-dom';
const FinishedQuiz = (props) => {
console.log('obh', props.results);
//альтернативный способ
// let successCount = Object.keys(props.results).reduce((total, ke... | true |
6acc0251addb21dacef0bf5914ff67f21f6b18ce | JavaScript | heeroluo/letsblog | /dal/_db.js | UTF-8 | 2,520 | 2.71875 | 3 | [
"MIT"
] | permissive | /*!
* LetsBlog
* Database accessing interfaces
* Released under MIT license
*/
'use strict';
const mysql = require('mysql');
const appConfig = require('../config');
const pool = mysql.createPool(appConfig.database);
/**
* 执行数据库请求
* @method query
* @param {String} cmd SQL命令
* @param {Any} [args] 命令参数
* @ret... | true |
1bb71098a52770b3b00730eced403dcc7c8fd194 | JavaScript | Mirinankpakisaac/SPSoundHit.github.io | /play.js | UTF-8 | 1,837 | 3.203125 | 3 | [] | no_license | "use strict" //ECMAScript Version 5 and above => Feature: strictly typed js
var button = document.querySelectorAll(".btn");
var bar = document.querySelectorAll(".bar");
var body = document.getElementById("body");
var navText = document.querySelectorAll(".navbar_item a");
//var audio = new Audio("sounds/audio... | true |
3bfb047248390877e1dfcbcc96a5e10b783df921 | JavaScript | Ing-Web/JS-2016 | /js-08/js-08/02-acceder.js | UTF-8 | 1,364 | 3.796875 | 4 | [] | no_license | /*
Acceder a elementos
Tenemos dos formas:
getElements -> obtiene elementos por nombre, id, clase
querySelector -> obtiene elementos por selectores de css
*/
// var parrafo = document.getElementById('parrafo');
// var links = document.getElementsByTagName('a');
// var parrafos = document.getElementsB... | true |
17a68c1314cb512809dfed502ba5642214962fb8 | JavaScript | FrancescoCerofolini/js-fizzbuzz | /js/main.js | UTF-8 | 1,556 | 2.84375 | 3 | [] | no_license | // PER QUANTO RIGUARDA LA CONSEGNA NON HO CAPITO SE DOVESSIMO FARE UN ESERCIZIO VELOCE COME QUELLO DI STAMANI E QUINDI
// "SNACK", STAMPANDO SOLTANTO LA CONSEGNA DELL' ESERCIZIO NELLA CONSOLE O SE DOVESSIMO DARGLI TUTTA
// UN IMPAGINAZIONE CARINA E UN LAYOUT PARTICOLARE. VISTO CHE NON SPECIFICATO HO PREFERITO SEMPL... | true |
f7e43f3076df7d980abd8cfc73a109152ff2b12f | JavaScript | mohayonao/web-audio-test-api-2 | /src/utils/emit.js | UTF-8 | 352 | 2.515625 | 3 | [
"MIT"
] | permissive | "use strict";
function emit(instance, type, ...args) {
if (typeof instance.dispatchEvent === "function") {
if (typeof instance[`on${ type }`] === "function") {
instance[`on${ type }`].apply(instance, args);
}
if (instance._ && instance._.emitter) {
instance._.emitter.emit(type, ...args);
... | true |
a417d9b65f8e315d86c30dbda4c4e9c385b5bfde | JavaScript | apruebameprofe/Jesus-take-the-wheel- | /FASE 4 WEBSOCKETS/websockets/target/classes/static/src/states/charsel.js | UTF-8 | 7,477 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | Jesus.charselState = function(game) {
}
//Este es el state mas complejo despues de level , aqui se selecciona el personaje tanto gráficamente como en stats
var hitsAvailable;
var speedAvailable;
var perSelect= 1;
var numOpciones = 3;
var clicked3 = false;
var opcionesp;
var myownID;
//IDS del spritesheet de los p... | true |
cdbfdacc3f5a11b7a98c1e011a538e129a475370 | JavaScript | nightire/ember-animated | /tests/dummy/app/components/each-demo.js | UTF-8 | 558 | 2.703125 | 3 | [
"MIT"
] | permissive | /* if changes are made here please also reflect them in
the comments in the docs */
import Component from '@ember/component';
import move from 'ember-animated/motions/move';
import { fadeOut } from 'ember-animated/motions/opacity';
export default Component.extend({
init() {
this._super();
this.items = ['A', ... | true |
f1e74daf39881359dafedb750fc7198a0829a2fd | JavaScript | Maaz-Mehtab/Java-Script-Mark-Sheet | /app.js | UTF-8 | 2,198 | 2.875 | 3 | [] | no_license | var StudentName = document.getElementById("StudentName");
StudentName.innerHTML = prompt("Enter your student Name");
var FatherName = document.getElementById("FatherName");
FatherName.innerHTML = prompt("Enter your Father Name");
var RollNo = document.getElementById("RollNo");
RollNo.innerHTML = prompt("En... | true |
20d9bddf5b9389ffb5f7b11144e9447c984596c9 | JavaScript | clynagh/wk_10-day_4-Lab-Record_Store | /record.js | UTF-8 | 406 | 3.125 | 3 | [] | no_license | Record = function(artist, title, genre, price){
this.artist = artist;
this.title = title;
this.genre = genre;
this.price = price;
}
Record.prototype.getDetails = function(){
var details = "";
details += this.artist + ", "
details += this.title + ", "
details += this.genre + ", "
details += this.price... | true |
c7445b5217a6d055b5312ac2e8c14c73bc8fa9a2 | JavaScript | Michael-Stroh/SCUBAMATE | /AWScode/editDives/index.js | UTF-8 | 3,887 | 2.53125 | 3 | [] | no_license | 'use strict'
const AWS = require('aws-sdk');
AWS.config.update({region: "af-south-1"});
exports.handler = async (event, context, callback) => {
let body = JSON.parse(event.body);
var DiveID = body.DiveID;
var AccessToken = body.AccessToken;
var Buddy = body.Buddy;
var InstructorLink = body.Instruc... | true |
a24b546391e8cff985247697ac26744badbf9ea4 | JavaScript | veganaut/veganaut | /app/veganaut/components/sessionModule.js | UTF-8 | 3,509 | 2.59375 | 3 | [
"MIT"
] | permissive | (function() {
'use strict';
/**
* Service that handles sessions
* @param $q
* @param $rootScope
* @param backendUrl
* @constructor
*/
var SessionService = function($q, $rootScope, backendUrl) {
this._$q = $q;
this._$rootScope = $rootScope;
/**
... | true |