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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9d3c67af189944f111de72c5c2cdb6e969f94bd8 | JavaScript | locke189/react-sudoku | /src/button-bar.jsx | UTF-8 | 777 | 2.609375 | 3 | [] | no_license | import React from 'react';
import styled from 'styled-components';
import Button from './button';
const Main = styled.div`
display: flex;
flex-direction: column;
`;
const FirstRow = styled.div`
display: flex;
`;
const SecondRow = styled.div`
display: flex;
`;
const firstButtons = [1, 2, 3, 4, 5];
const second... | true |
1c0ee703ea198540aa72e059febf7c5aaea697de | JavaScript | Amit-ps/fdf1400141904365ddd1 | /screens/randomAsteroidList.js | UTF-8 | 2,018 | 2.640625 | 3 | [] | no_license | import React, { useState, useEffect } from 'react';
import {Text, TouchableOpacity, ScrollView, StyleSheet} from 'react-native';
import { fetchRamdomIds } from '../util';
export default function RandomAsteroidListScreen({navigation}) {
const [list, setList] = useState([])
const getRandomAsteroidIdList = asyn... | true |
87acc431a9ebbb6211a9fa2f474ffd301aa3d635 | JavaScript | jerome-chua/connect-four | /src/comp/leaderboard.js | UTF-8 | 3,838 | 3.015625 | 3 | [] | no_license | import axios from 'axios';
// -------------------- Player List Section ----------------------
// Player List Container.
const playerListRowColComp = (title, table) => {
const playerListCol = document.createElement('div');
playerListCol.classList.add('col-12');
playerListCol.setAttribute('id', 'playerlist-col');... | true |
220fb6547433084f8530ef958cd8b15f73cead33 | JavaScript | apigeecs/soap-js-mapr | /apigee/apiproxy/resources/jsc/JSMapr.js | UTF-8 | 15,650 | 3.375 | 3 | [
"MIT"
] | permissive | // https://github.com/mikedunker/JSMapr
// License: MIT
// Version: 0.0.1
(function () {
var sep = "/";
var mapCommands = [];
var logFunc = null;
function log() {
if (isFunction(logFunc)) {
var str = "";
for (i = 0, len=arguments.length; i < len; i++) {
var arg = arguments[i];
if (isObjectOrArray(... | true |
20c6bce1ff6839bf7c1c5ec2f5a4e8db769daeee | JavaScript | anatoliykot/jump-work-test | /app/containers/LoginPage/reducer.js | UTF-8 | 549 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | /*
*
* LoginPage reducer
*
*/
import { fromJS } from 'immutable';
import {
CHANGE_USERNAME,
CHANGE_USERPASSWORD
} from './constants';
const initialState = fromJS({
username: '',
userpassword: ''
});
function loginPageReducer(state = initialState, action) {
switch (action.type) {
case CHANGE_USERNAM... | true |
b8670a44e0100d428efa860f1b6db0a506482fe1 | JavaScript | AshRing/React-Expensify | /src/playground/redux-expensify.js | UTF-8 | 6,162 | 3.28125 | 3 | [] | no_license | console.log('running...');
import {createStore, combineReducers} from 'redux';
import uuid from 'uuid';
////////////////////////////////////////////////////////////////
//EXPENSES REDUCER & ACTION GENERATORS
////////////////////////////////////////////////////////////////
//ADD_EXPENSE
const addExpense = ({descript... | true |
c9136234a07856475ba88f430e10bf850b961782 | JavaScript | vspaceone/web | /scripts/internal/app.js | UTF-8 | 10,758 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | var tmpChartMaschinenraum;
var tmpChartBruecke;
var humChartMaschinenraum;
var humChartBruecke;
var SPACEAPIURL = "https://vspace.one/spaceapi.json"
function updateDoorstate() {
console.log("Updating doorstate!");
$.getJSON(SPACEAPIURL)
.done(function(data, textStatus) {
$("#doorstate").r... | true |
8c36631f776d793bb37dbe438232a5bf0875db2c | JavaScript | lgandecki/bikeramp-clone | /src/api/lib/TripsRepository.js | UTF-8 | 750 | 2.75 | 3 | [] | no_license | const moment = require('moment')
const _ = require('lodash')
let trips = []
class TripsRepository {
static save(trip) {
trips.push(trip)
}
static findAllWeekly(currentTimestamp = moment().format('X')) {
const startingTimestamp = moment.unix(+currentTimestamp).subtract(7, 'days').format('X')
return th... | true |
3d5457b0e50590c6bd1120aad2f24c671532a276 | JavaScript | Ludimilla1325/Typescript | /9-project/src/components/base-component.js | UTF-8 | 1,288 | 2.546875 | 3 | [] | no_license | "use strict";
//Component Base Class - abstract cuz people should not instialized but should alqays be used for inheritance
// Genering rending
Object.defineProperty(exports, "__esModule", { value: true });
//default - this is the main, the default export file
var Component = /** @class */ (function () {
function ... | true |
a64eead79697ed7175e381476c4368842020f478 | JavaScript | GroceReady/Groceready | /Backend/controllers/user.js | UTF-8 | 3,282 | 2.546875 | 3 | [
"ISC"
] | permissive | const { request } = require("express");
const pool = require("../db/db.js");
// const householdHandler = require("./household.js")
function newUser(user, response) {
var uid = user.body.id;
var uname = user.body.fullName;
console.log("UID " + uid);
console.log("UNAME " + uname);
var sqlQuery =
"INSERT ... | true |
7dde7fb51663d58d58aab2004df603605fc8c785 | JavaScript | victorwiedmer/AcessoWebServiceTiss | /AcessoWebService/js/alert.js | UTF-8 | 3,922 | 2.5625 | 3 | [] | no_license | //window.alert = function (texto) {
// dialogAlert(texto);
//};
var dialogAlert = function (texto) {
var alturaBox = 200;
var larguraBox = 500;
var alturaBody = alturaBox - 15;
var larguraBody = larguraBox - 10;
var alturaBoxTexto = ((alturaBody / 100) * 65);
var alturaBoxBtn = ((altura... | true |
26d1a61a6844970693b87d341083cdb39ba6af92 | JavaScript | ukyo/nico-friends-manager | /js/utils.js | UTF-8 | 1,292 | 2.9375 | 3 | [] | no_license | (function() {
function copyObject(o) {
var ret = {};
for(var k in o) {
o.hasOwnProperty( k ) && ( ret[k] = o[k] );
}
return ret;
}
function type(v) {
return v.constructor.name;
}
function _dateToString(o) {
var t;
for (var k in o) {
if ( o.hasOwnProperty( k ) ) {
t = type( o[k] );
t === "Date" && ( ... | true |
7a10b3fce1db74297807468bd6835df9d9297a81 | JavaScript | bcashbusters/godfather | /public/service-worker.js | UTF-8 | 3,349 | 2.8125 | 3 | [] | no_license | // In production, we register a service worker to serve assets from local cache.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on the "N+1" visit to a page, since previously... | true |
51b48f7f73909296abd378e080d985c2a5018c3f | JavaScript | minsu3/functions-lab | /4.js | UTF-8 | 926 | 3.734375 | 4 | [] | no_license | function panDigital(num) { //pass on the parameter
let numString = num.toString() //make num into a string (numString)
let numArray=[] //define numArray
// fill out array
for(let i=0; i<numString.length; i++) { //numString.length is the length of that string
let index = Number(numString[i]... | true |
8f464efff606c581c0c1a476eff5c1c974f4b639 | JavaScript | jmanero/resume | /lib/page.js | UTF-8 | 4,901 | 2.890625 | 3 | [] | no_license | 'use strict';
const Assert = require('assert');
const EJS = require('ejs');
const File = require('./file');
const Path = require('path');
const YAML = require('js-yaml');
/**
* Dynamically generate pages from YAML and EJS layouts
*/
class Page {
/**
* Create an Express handler function to serve pages
* @retu... | true |
850e8d24bf072a4c19b6364cd26dc23428d4da56 | JavaScript | guignol1981/advent-of-code | /days/day-1/star-1/solution.js | UTF-8 | 196 | 2.921875 | 3 | [] | no_license | const input = require('./input');
const solution = input
.map(e =>
Math.floor(e/3 - 2)
)
.reduce(
(acc, cur) => (acc+=cur),
0
);
console.log(solution);
| true |
36a308ec326610b13b9106550d609ebde77c7fb7 | JavaScript | gkim98/entropy | /public/controllers/friend.js | UTF-8 | 944 | 3.25 | 3 | [] | no_license | $("#person1").on("mouseenter", function() {
console.log("clicked");
for(var i=0; i<myAccessories.length; i++) {
document.getElementById(accessories[myAccessories[i]].id).style.visibility = "hidden";
}
document.getElementById(accessories[4].id).style.visibility = "visible"
document.getEleme... | true |
aa51e1d2e05417045eae8de03d911e4ce33d245e | JavaScript | OGonzalezNYC/building-forms-lab-online-web-sp-000 | /src/components/BandInput.js | UTF-8 | 1,461 | 3.203125 | 3 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // Add BandInput component
import React, { Component } from 'react';
//import {connect} from 'react-redux';
class BandInput extends Component {
state = {
name: ''
}
handleChange = event => {
//debugger;
this.setState({
name: event.target.value
});
}
handleSubmit = event => {
event.pr... | true |
2ef09d18bae97a42f350dd3381a673b230871a74 | JavaScript | spencermountain/spencers-chrome-extensions | /simple/content.js | UTF-8 | 990 | 2.59375 | 3 | [] | no_license |
function graph(){
return "<div id='d3graph' style='position:fixed; right:30px; bottom:50px; opacity:0.8; background:white; border:1px solid grey; border-radius:5px; width:300px; height:150px; background:white; x-index:12;'> hiii there</div>"
}
chrome.runtime.onMessage.addListener(
function(request, sender, send... | true |
ecfbafdbf12c0383021e1f6c67fed38f9fef990e | JavaScript | heinnerzapata/Cross-domain-dummy | /src/main.js | UTF-8 | 3,810 | 2.546875 | 3 | [] | no_license | var $btnShowAlert = document.getElementById('btnShowAlert');
var $dataContainer = document.getElementById('txtReceived');
var $listenerActive = document.getElementById('listener-active');
var $listenerNoActive = document.getElementById('listener-no-active');
var $stateContainer = document.getElementById('state-contai... | true |
1c17c94f47b89260eea9a9bddfce88667e5dadbe | JavaScript | let374/Prosper | /prosper.js | UTF-8 | 8,379 | 2.578125 | 3 | [] | no_license | var WIDTH = 800,
HEIGHT = 350,
MARGINS = {top: 0, right: 25, bottom: 25, left: 100},
PADDING = 25,
xRange = d3.scale.linear().range ([MARGINS.left, WIDTH - MARGINS.right]),
yRange = d3.scale.linear().range ([HEIGHT - MARGINS.top, MARGINS.bottom]),
rRange = d3.scale.linear().range([5,20]),
colours = ["#000000","#... | true |
d8a9fed04c67a30c3333a37601c66ba24d60ca59 | JavaScript | AdamKlevfors/DIT355-Distributed-Systems-Development- | /visualiser/src/circuitbreaker.js | UTF-8 | 898 | 2.859375 | 3 | [] | no_license | class CircuitBreaker {
constructor(timeout){
this.isOpen = false;
this.errorTimeStamp;
this.currentTimeStamp;
this.timeout = timeout;
}
executeAction(drawOnMap,data){
if(this.isOpen){
this.currentTimeStamp = Math.floor(Date.now() / 1000)
if(... | true |
2eabcbd1f033492fe6f593bb34a721623a2a1979 | JavaScript | anazeneli/prism | /fire/seed.js | UTF-8 | 1,085 | 3.03125 | 3 | [] | no_license | const firebase = require('firebase')
require('firebase/firestore')
require('./setup')(firebase)
const db = firebase.firestore()
// get reference to our data
// in node, ~ is not a correct alias
const seed = require('../data/colors')
const {rgb2hex, rgb2hsv, hsv2hsl} = require('color-functions')
const colors = db.co... | true |
5011ccb58375b8f4f063a94a85c05b47aa5e7f75 | JavaScript | AxonTeam/AxonCore | /src/Errors/AxonCommandError.js | UTF-8 | 1,619 | 2.796875 | 3 | [
"MIT"
] | permissive | /**
* Custom error with better formatting and context informations.
* Used for errors thrown by AxonCore commands.
*
* @author KhaaZ
*
* @class AxonCommandError
* @extends Error
*
* @prop {CommandContext} context - Command Context containing all informations about the command execution
*/
class AxonCommandErr... | true |
aecd125e1905892a8eaeef0e69f18bc00f5ceb6a | JavaScript | MelanieAlmuina/CursoIngresoJS | /5-InstruccionWhile/jsIteracionesWhile-07.js | UTF-8 | 618 | 3.5625 | 4 | [] | no_license | /*
Al presionar el botón pedir números hasta que el USUARIO QUIERA
e informar la suma acumulada y el promedio.
*/
function mostrar()
{
var contador;
var acumulador;
var respuesta;
var numerosIngresados;
contador=0;
acumulador=0;
respuesta='si';
while(respuesta=="si")
{
numerosIngresados=prompt("Ingres... | true |
062a3ddfca44e93813976e35af9e2493649de1ee | JavaScript | shibii/va-client-svelte | /src/services/util.js | UTF-8 | 342 | 2.734375 | 3 | [] | no_license | import { parse, format, formatDistanceToNow, differenceInDays } from "date-fns";
export const formatTimestamp = (ts) => {
let time = parse(ts, "yyyy-MM-dd HH:mm:ss", new Date());
if (differenceInDays(new Date(), time) < 4) {
return formatDistanceToNow(time, { addSuffix: true });
} else {
return format(t... | true |
f280fe30c9f3bbb22f7b0cd595107990eebc520a | JavaScript | lucascossitt/Deejay | /structures/TimeUtils.js | UTF-8 | 581 | 2.65625 | 3 | [] | no_license | module.exports = {
msToTime(s) {
const ms = s % 1000
s = (s - ms) / 1000
const secs = s % 60
s = (s - secs) / 60
const mins = s % 60
const hrs = (s - mins) / 60
return hrs > 0 ? (this.pad(hrs) + ':') : '' + this.pad(mins) + ':' + this.pad(secs)
},
pad(n, z) {
... | true |
737f065940432336e66770d3848158d1fec14142 | JavaScript | podmaxs/mini-thread | /sample.js | UTF-8 | 855 | 2.71875 | 3 | [] | no_license | var thread = require('./thread');
var responses = [];
var list = [];
function test(name){
var hash = "";
while(hash.length !== 5){
var tm = new Date().getTime().toString().substr(-4),
cam = 0;
for(var i = 0; i<4; i++){
if(tm.charAt(i) !== "") {
cam = cam ... | true |
2d4b61a777edebacc6e66fabdcb3a79824c68058 | JavaScript | okaoui/catprod-frontend | /src/components/add-product.js | UTF-8 | 4,654 | 2.671875 | 3 | [] | no_license | import React, { Component } from "react";
import ProductDataService from "../services/product.service";
import CategoryDataService from "../services/category.service";
import Select from 'react-select';
export default class AddProduct extends Component {
constructor(props) {
super(props);
this.onChangeN... | true |
d778db5c6ba5cac7f271fe97e89567189eef6e8d | JavaScript | Abhiraj441/tmuxdcbot | /commands/pool.js | UTF-8 | 1,786 | 2.53125 | 3 | [
"Artistic-2.0"
] | permissive | const { SlashCommandBuilder } = require('@discordjs/builders');
const { MessageEmbed } = require('discord.js');
const { titleCase } = require('./../util.js');
const name = 'pool';
const description = 'List all the songs in a pool on your profile!';
const aliases = [];
const operatorOnly = false;
module.exports = {
... | true |
b80697effd7705aaf6f7975f811c088c8968c823 | JavaScript | farzd/expo-redux-boilerplate | /reducers/a.js | UTF-8 | 176 | 2.53125 | 3 | [] | no_license | export default function(state = {a: false}, action) {
switch (action.type) {
case 'a':
return {...state, a:!state.a}
default:
return state;
}
} | true |
1bfcbf8a8fccf72fe7072f50c9b94a9d180ad2ff | JavaScript | abbylow/cicd-demo | /server.js | UTF-8 | 563 | 2.609375 | 3 | [] | no_license | 'use strict';
const express = require('express');
// Constants
const PORT = 8080;
const HOST = '0.0.0.0';
// App
const app = express();
app.get('/', (req, res) => {
return res.send('Received a GET HTTP method');
});
app.post('/', (req, res) => {
return res.send('Received a POST HTTP method');
});
app.put(... | true |
0d2780b84557e8687620f87f79dfb4ff9b89b53a | JavaScript | nishant-sethi/HackerRank | /10 days of js/Day 8 Create a Button/button.js | UTF-8 | 155 | 2.65625 | 3 | [
"Apache-2.0",
"MIT"
] | permissive |
var clickbtn= document.getElementById('btn');
var count=0;
clickbtn.onclick=function(){
count+=1;
clickbtn.innerHTML=count;
} | true |
1eef86bca6e051496e8adb9050d49cf194835f7e | JavaScript | ibrahimalanshor/adminto | /src/js/dropdown.js | UTF-8 | 627 | 2.8125 | 3 | [
"MIT"
] | permissive | const dropdowns = document.querySelectorAll('.dropdown')
const openDropdown = function (e) {
e.preventDefault()
const dropdownMenuClass = this.nextElementSibling.classList
dropdownMenuClass.toggle('block')
}
const outsideClick = (target, dropdown, toggle) => {
if (!dropdown.contains(target) && target !== to... | true |
f21a839aa2f490d8604036b159cff7b0846897af | JavaScript | SLIIT-IT-Project-2021/Thaulla-Bojun | /BACKEND/routes/shortcomings.js | UTF-8 | 829 | 2.578125 | 3 | [] | no_license | const router = require('express').Router();
let User = require('../models/shortcomings');
router.route('/add').post( (req, res) => {
const scid = req.body.scid;
const scitem = req.body.scitem;
const itemid = req.body.itemid;
const qty = req.body.qty;
const reqdate = req.body.reqdate;
c... | true |
e99942018efde9f5fcd3fc0af4152ddd2de66169 | JavaScript | MANIDHAR962/LinkSharingProject | /src/main/resources/static/js/checkEmailExistsForInvitation.js | UTF-8 | 946 | 2.578125 | 3 | [] | no_license |
$(document).on('focusout', '#inviteEmail', function () {
var email = this.value;
var check = $.ajax({
url: "/checkEmailExistsInSystem",
data: {"email": email},
method: "GET"
});
check.done(function (data) {
if (data=="yourself") {
document.getElementById('inv... | true |
ea9f1549f0222727859e6cb4a36ed2b2b70032c7 | JavaScript | future4code/dumont-pokedex4 | /projeto-pokedex/src/global/GlobalState.js | UTF-8 | 1,235 | 2.8125 | 3 | [] | no_license | import React, { useEffect, useState } from 'react'
import axios from 'axios'
import { baseUrl } from '../constants/urls'
import GlobalStateContext from './GlobalStateContext.js'
const GlobalState = (props) => {
// pokemonList é a lista de 20 pokemons
// pokedex é a lista de pokemons da pokedex, que será usada depo... | true |
3334e34738e55ebd1a72b0ccf308d0a6d7c2a932 | JavaScript | robshoe187/Team-Profile | /__tests__/Employee.test.js | UTF-8 | 855 | 3.1875 | 3 | [] | no_license | const Employee = require('../lib/Employee.js');
test('creates an employee object', () => {
const employee = new Employee('Rob', 1,'rob.shoe187@gmail.com');
expect(employee.name).toBe('Rob');
expect(employee.id).toBe(1);
expect(employee.email).toBe('rob.shoe187@gmail.com');
});
test('test getName... | true |
5a9eb920dbae2b4f96f35d9cd5b60864f8b76d97 | JavaScript | montshejohn/Assignments | /freecodecamp-projects/no-repeats.js | UTF-8 | 909 | 3.265625 | 3 | [] | no_license | var temp;
var permus = [];
function perms(str,counter) {
if (!counter) {
counter = str.length;
console.log("start");
}
temp = str;
if (counter === 1) {
} else {
for (var i = 0; i < counter - 1; i++) {
perms(temp,counter - 1);
if (counter % 2 === 0) {
let splited = temp.split("... | true |
a9c1678c6763f27fdd2d243748dd678c64768aea | JavaScript | TunikiCharitha/ARCdetection | /src/pool.js | UTF-8 | 3,877 | 2.609375 | 3 | [] | no_license | /* jshint esversion: 6, curly: true, eqeqeq: true, forin: true */
/***********************************************************************************
* Title: Hamsters.js *
* Description: 100% Vanilla Javascript Multithreading & Parallel Execution Library ... | true |
e12b4dbbfd6b6ccdecf6c9846b6ed2cafa76aa7b | JavaScript | basiji/RJD | /modules/v1/podcasts.js | UTF-8 | 783 | 2.546875 | 3 | [] | no_license | module.exports = function(req, res, connection){
// Recive showId
if(!req.query.showid)
return res.sendStatus(404);
var showId = req.query.showid;
// Receive list of podcasts
var sql = '';
if(showId === 'featured')
sql = "SELECT * FROM app_podcasts WHERE featured = 1 ORDER by ... | true |
f3264cd0085b66ace096935edbff76c85132e7f3 | JavaScript | nicolaskruger/free_code_camp_clock_25_5 | /src/index.js | UTF-8 | 7,346 | 2.59375 | 3 | [] | no_license | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import { connect, Provider } from 'react-redux';
import { createStore } from 'redux';
const PLAY = "PLAY";
const STOP = "STOP";
const TOGGLE = "TOGGLE";
const RESET = "RESET";
const ZERO_EVENT = "ZERO_EVENT";
const TICK = "TICK";
const ... | true |
f5b39f88e3ce2c17df9acad30aedee1aa5993587 | JavaScript | pradeeppadmarajaiah/javascript-es | /Chapter 17 - Prototype.js | UTF-8 | 957 | 3.640625 | 4 | [] | no_license | function User(fName, lName, age,) {
this.fName = fName;
this.lName = lName;
this.age = age
}
//inside parent method
User.prototype.printUserDetails = function() {
console.log(`Hello ${this.fName} ${this.lName} . Your entered age is ${this.age}`);
};
const user1 = new User("Pradeep", "P", 29)
User.prototype.c... | true |
88e2c24edab757626a1ff2b27a1501b362e61702 | JavaScript | lackaff-gilligan/weekend_challenge_2 | /server/routes/calculate_router.js | UTF-8 | 991 | 3.03125 | 3 | [] | no_license | var express = require('express');
var router = express.Router();
// bring in doCalculation.js module
var calculateThis = require('./../modules/doCalculation.js');
//will be the current calculation's answer
var answer;
//stores the calculations in string form
var history = [];
//POST route
router.post('/', function(r... | true |
eea686930baa0828510c2848e366ea118b82ac58 | JavaScript | tan14142/tan14142.github.io | /Projects/Project-Euler/P3.js | UTF-8 | 247 | 2.9375 | 3 | [] | no_license | m => {
const primes = [];
let i = 3;
while (i < m) {
if (m % i === 0 && primes.every(p => i % p)) {
primes.push(i);
if (primes.reduce((p1, p2) => p1 * p2) === m) {
return primes.pop();
}
}
i += 2;
}
} | true |
cd84ef688150d9b1002ac5647cca94a8625f32c7 | JavaScript | kvasdopil/aoc | /2019/19/02.js | UTF-8 | 3,004 | 2.96875 | 3 | [] | no_license | const { assert, file, array2d } = require("../../utils");
const parse = text => {
return text.split(",").map(i => parseInt(i, 10));
}
const context = (prog, input) => ({
pos: 0,
base: 0,
mem: prog.reduce((res, val, i) => ({ ...res, [i]: val }), {}),
input
});
const execute = context => {
const getv = typ... | true |
7adc8ec95bc7c3a6ba8295b73416b2b9a7ac1b38 | JavaScript | kferny1/LIRI-BOT | /liri.js | UTF-8 | 5,048 | 2.53125 | 3 | [] | no_license | var keys = require("./keys.js");
var twitter = require("twitter");
var client = new twitter({
consumer_key: 'keys.twitterKeys.consumer_key',
consumer_secret: 'keys.twitterKeys.consumer_secret',
access_token_key: 'keys.twitterKeys.access_token_key',
access_token_secret: 'keys.twitterKeys.access_token_s... | true |
22c09267cc6b1820e9c1cbb35b230df9fd6de961 | JavaScript | bwhite001/3612ICT-GCPC-DATA | /clientscripts/weekly.js | UTF-8 | 1,891 | 2.703125 | 3 | [] | no_license | function search(location, backurl, date, seriesid)
{
var searchTxt = $('#searchBox').val();
if(searchTxt != "")
{
$.ajax({
type: 'POST',
url: 'json.php',
data: {code: 's', type: 'search', date:date, seriesid:seriesid, query: searchTxt, location: location, backurl: backurl},
dataType: 'json',
success... | true |
5cef8681e190743c225ba61049bb949fa5bb18eb | JavaScript | angus-c/blog | /src/for_in_loops/04.normal_iteration_sequence.js | UTF-8 | 255 | 3.59375 | 4 | [] | no_license | var obj = {a: 1, b: 2, c: 3}, result = [];
obj.e; //referenced but not assigned
obj.f = 'bar'; //1st assignment
obj.e = 4;
obj.dd = 5;
obj.f = 'foo'; //2nd assignment
for (var prop in obj) {
result.push(prop);
}
result.toString(); //"a,b,c,f,e,dd"
| true |
52a26a109de71464891156e366d13392eef5ecd8 | JavaScript | Plasmoxy/plasmoxy.github.io | /dev/OtherStuff/PixiJS/learningPixi/centeredPlayer/js/Player.js | UTF-8 | 3,091 | 3.234375 | 3 | [] | no_license | class Player extends Sprite {
constructor(x,y,texture, movekeys) {
super(texture);
this.movekeys = movekeys;
this.position.x = x;
this.position.y = y;
/* set anchor to center */
this.anchor.set(0.5, 0.5);
this.scale.set(0.5, 0.5);
this.direction = -Math.PI/2; // global player dire... | true |
09a8646a4c681ad01b2f94feddd83cdc4492f447 | JavaScript | jromanz/jQuery | /js/canvitas.js | UTF-8 | 1,932 | 3 | 3 | [
"MIT"
] | permissive |
$(document).on("ready",function(){
var canvas = $("#draw")[0];
var context = canvas.getContext('2d');
context.font = "38pt Arial";
context.fillStyle = "rgba(0,0,200,1)";
context.fillText("Hola Canvas",canvas.width/2 - 150,canvas.height/2 + 15);
context.strokeText("Hola Canvas",canvas.width/2 - 150,canvas.height... | true |
585ac043bb933aa28b066f36a7d5bbbc096aef25 | JavaScript | vinayrl/education | /src/assets/javascripts/bootdemo/index/services/registerService.js | UTF-8 | 1,239 | 2.609375 | 3 | [
"MIT"
] | permissive | (function() {
var registerService = function($http) {
var register = function(credentials) {
/*
* var data = 'j_username=' +
* encodeURIComponent(credentials.username) + '&j_password=' +
* encodeURIComponent(credentials.password);
*/
/*
* var datum = 'firstname=' + credentials.firstname... | true |
6836c7b85a7db5852180dd00cc8c250ee77a2feb | JavaScript | matiasfacio/svgGraph | /src/components/Canvases.js | UTF-8 | 2,519 | 3.671875 | 4 | [] | no_license |
const arraysOfCanvases = [];
const drawDynamicCircles = (d, factor, totalCases) => {
if (!factor) return null;
d.beginPath();
d.arc(50, 50, 40, 0, (factor[1] / totalCases) * 2 * Math.PI, false);
d.fillStyle = "white";
d.lineTo(50, 50);
d.fill();
};
export const addElement = (totalCases, nummerObject) =>... | true |
7dc5c1619d57c248a14cda87e5165954146b134a | JavaScript | VasilDimitroff/SoftUni-JavaScript-Advanced | /03. Objects and Composition - Lab/3.City Taxes.js | UTF-8 | 854 | 3.875 | 4 | [] | no_license | function cityTaxes(city, population, treasury){
let cityObj = {};
cityObj.name = city;
cityObj.population = population;
cityObj.treasury = treasury;
cityObj.taxRate = 10;
cityObj.collectTaxes = function(){
cityObj.treasury += cityObj.population * cityObj.taxRate;
Math.floor(city... | true |
d89b3442e7cc968545701cd6ea03ce0e8243f2a1 | JavaScript | LuisMaestre/Triviagame | /assets/javascript/app.js | UTF-8 | 2,433 | 3.125 | 3 | [] | no_license |
$(document).ready(function(){
$('input[name=clowns]').change(function(){
if($('input[name=clowns]:checked').val() === "CORRECT") {
alert('You have selected the correct answer!');
} else {
alert('You have selected the wrong answer!');
}
});
});
$(document).ready(function(){
$('input[name=... | true |
091a438cec6503db1afc32d7717b509be676544b | JavaScript | Cyjin-jani/NodeJs-Basic | /Chapter3. 노드 기능들/3.4 노드내장객체/nextTick.js | UTF-8 | 613 | 3.21875 | 3 | [] | no_license | setImmediate(() => {
console.log('immediate');
});
//이벤트 루프가 다른 콜백 함수들보다 nextTick의 콜백 함수를 우선으로 처리하도록 만듬.
process.nextTick(() => {
console.log('nextTick');
});
setTimeout(() => {
console.log('timeOut');
}, 0);
Promise.resolve().then(() => console.log('promise'));
// process.nextTick은 setImmediate나 setTim... | true |
5bc9cda8a50468e98c22c233f07fde243f9e0338 | JavaScript | Haugen/rick-and-morty | /data/app.js | UTF-8 | 705 | 2.609375 | 3 | [] | no_license | const fs = require('fs');
const express = require('express');
const app = express();
app.use('*', (req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET');
next();
});
app.use('/episode/:id', (req, res) => {
const episode = JSON.parse(fs.r... | true |
370864698440dc109b5c14b65e814db57b039d15 | JavaScript | ayumitanaka13/javascript-w4d2 | /01-axios-header/app.js | UTF-8 | 204 | 2.71875 | 3 | [] | no_license |
const getDataJokes = async () => {
const res = await axios.get('https://icanhazdadjoke.com', {
headers: { 'Accept': 'application/json' }
});
console.log(res.data);
};
getDataJokes(); | true |
6be3d36658a098cf03852ba96f54409d51b5b7b0 | JavaScript | MartinGoodwell/wcrpg-client | /js/titleScene.js | UTF-8 | 4,202 | 2.90625 | 3 | [] | no_license | // create a new scene named "Title"
let gameScene = new Phaser.Scene('Title');
var uiScale = 2;
// load asset files for our game
gameScene.preload = function() {
gameScene.loadAudio();
// load images
this.load.image('field', 'assets/field.png');
this.load.image('vengeance', 'assets/vengeance.png');
... | true |
2cc5978090e556d4aafece6b4f54ac544e53a1c9 | JavaScript | zoolsher/AndCloud-Service | /src/until/ChannelManager.js | UTF-8 | 1,859 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | import Channel from './Channel';
import Logger from './Logger';
import uuid from 'uuid';
var _singleton = null;
//Single Instance
/**
* (ChannelMannger)
*
* @class ChannelManager
*/
class ChannelManager {
static getInstance(){
if(_singleton == null){
_singleton = new ChannelManager();
... | true |
61a785d248102d06d8ecda0fa96df9db767d2fe3 | JavaScript | ofvariedtrajectory/khp-lens-crx | /static/js/focal2.js | UTF-8 | 2,248 | 2.609375 | 3 | [] | no_license | console.log('focal2')
// var XHR = window.XMLHttpRequest
// var open = XHR.prototype.open
// var send = XHR.prototype.send
// XHR.prototype.open = function (method, url, async, user, pass) {
// this._url = url
// console.log('open', url);
// open.call(this, method, url, async, user, pass)
// }
// XHR.prototype... | true |
afc4c2eb0732642b02b4e815e870db4e49bcbb0a | JavaScript | rommijares/fsw-110 | /week6/event_worksheet/mousemove/app.js | UTF-8 | 231 | 2.953125 | 3 | [] | no_license | const box = document.getElementsByClassName('red-box')[0]
box.addEventListener('mousemove' , function(event) {
let x = event.clientX
let y = event.clientY
box.textContent = 'x position: ' + x + ' y position: ' + y
});
| true |
d4ee34a06ae5107ee44b9944b85e88d8a7b85b9f | JavaScript | basantashubhu/futsal-management-system | /resources/assets/fgp/timesheet.js | UTF-8 | 3,710 | 2.8125 | 3 | [] | no_license | /*
time in time out calc in 12 hours format
*/
var Intelligent = {
calculateTime(start, end, operator = true) {
if (start == "") {
start = "0:00";
} else if (start == "0:00") {
} else {
if (start.match(/\d{1,2}:\d{1,2}$/) === null) {
start = "0:00";
} else if (operator) {
let [hour, min] =... | true |
4db2ac05be2eedebd8decf604e12d6859a98cf2f | JavaScript | kkig/simpsons-quote-generator | /script.js | UTF-8 | 889 | 3.640625 | 4 | [] | no_license | const quoteButton = document.querySelector('.quoteButton');
const endpoint = 'https://thesimpsonsquoteapi.glitch.me/quotes';
const getQuote = () => {
fetch(endpoint)
.then(response => {
return response.json();
})
.then(data => {
displayQuote(data[0].quote);
displayChara(data[0].character);
})
.catc... | true |
1fab0fb38e38fc78510906b4c62a6347bf45995a | JavaScript | sauriemma/mongoose-demo | /server.js | UTF-8 | 3,933 | 2.859375 | 3 | [] | no_license | // if you are must connect to multiple databases,
// you must connect to each database by using the createConnection method
var bodyParser = require("body-parser");
var mongoose = require('mongoose');
var express = require("express");
var app = express();
var router = express.Router();
// This could be put in fil... | true |
7fd2b0caa2bcc29674f46305c37d4a81d27899df | JavaScript | camac/YNABHelper | /ynabhelper/src/components/Transaction/Transaction.js | UTF-8 | 836 | 2.53125 | 3 | [] | no_license | import React from 'react';
import * as ynab from 'ynab';
const Transaction = () => {
const accessToken = "";
const ynabAPI = new ynab.API(accessToken);
(async function() {
const budgetsResponse = await ynabAPI.budgets.getBudgets();
const budgets = budgetsResponse.data.budgets;
... | true |
9f07d7c4ccaa6dff58c039b78c921090fcb4ffed | JavaScript | AnweshaPaul12/webrtc-online-video-streaming | /js/vedio.js | UTF-8 | 926 | 2.65625 | 3 | [] | no_license | (function() {
var video = document.createElement('video');
video.width = 400;
video.height = 300;
video.autoplay = true;
video.controls = true;
var container = document.querySelector('.booth'),
butt = document.querySelector('button'),
vendorUrl = window.URL || window.webkitURL;
navigator.getMedi... | true |
a15c53e9845e5785aabfac56689a7644c4e1aab6 | JavaScript | JaewooNam/myFirstReactApp | /blog/src/reducers/postReducer.js | UTF-8 | 751 | 3.28125 | 3 | [] | no_license | /* Bad
< Array >
1. Removing an element from an array
state.pop()
2. Adding an element to an array
state.push('hi')
3. Replacing an element in an array
state[0] = 'hi'
< Object >
4. Updating a property in an object
state.name = 'Sam'
5. Adding a property to an object
state.age = 30
6. Removing a property fro... | true |
4e471df728052119bc5d3aa376dd31e0eb54b9fe | JavaScript | HUS-SFI/USC_3js | /mainCode.js | UTF-8 | 14,130 | 2.578125 | 3 | [] | no_license | var width = window.innerWidth
var height = window.innerHeight
var camera, renderer, scene
var spotLight
var surfaceMesh,
goalMesh,
postMesh,
post2Mesh,
goalkeeperMesh
var groundBody,
groundShape,
ball,
ball2,
ballBody,
ballShape,
field,
goalkeeper,
goalShape,
goalBo... | true |
36b6a837d346d72585693f9a30054477cae8845c | JavaScript | MiroslavF/diplomovka_repo | /src/network-analysis/clustering-coefficient-distribution.js | UTF-8 | 2,103 | 2.515625 | 3 | [] | no_license | const config = require('../config');
const { cachingWrapper } = require('../utilities');
const getClusteringCoefficient = require('./helpers/clustering-coefficient');
const getNodeToNeighboursMap = require('./helpers/node-to-neighbours-map');
const roundCoefficients = config.analysis.clusteringCoefficientDistribu... | true |
22564cf22e911e6a30625afb095cc74194ad3bd0 | JavaScript | marcelus20/puddy_m | /tests/validateNegativeIntegers.test.js | UTF-8 | 1,200 | 2.625 | 3 | [
"MIT"
] | permissive | import {
IntegerValidationError,
NegativeIntegersError,
NumberValidationError,
} from "../src/models/errors";
import { validateNegativeIntegers } from "../src/validators/complexValidators";
test("validateNegativeIntegers should resolve if number is 0.", () => {
return expect(validateNegativeIntegers(0)).reject... | true |
a3da0203e35d92d7468427c1755f4cc58b10b066 | JavaScript | WafelT/NoteApp | /app.js | UTF-8 | 2,150 | 3.21875 | 3 | [] | no_license | const addBtn = document.getElementById('add__button');
let tasks = [];
window.onload = function() {
if (JSON.parse(localStorage.getItem("tasks")) != null)
tasks = JSON.parse(localStorage.getItem("tasks"));
console.log(tasks);
showTasks();
};
function showTasks() {
document.getElemen... | true |
540b7ad333a327cbe76dd91387316b2651a85e69 | JavaScript | Zurine/appfrigo | /src/main/webapp/resources/js/workPath.js | UTF-8 | 2,030 | 3.203125 | 3 | [] | no_license | var map;
var marker;
//var labels = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//var labelIndex = 0;
$( document ).ready(function() {
initMap();
});
function initMap() {
var array = JSON.parse($('#locationData').val());
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: array[0].latitud, lng: arr... | true |
bc6db3c3331738ef31c425e0db199bcff033b082 | JavaScript | enterpriseih/codeWarsTraining | /Katas/2019/8kyu/23-RemoveStringSpaces.js | UTF-8 | 1,043 | 3.625 | 4 | [] | no_license | /**
*
* Simple, remove the spaces from the string, then return the resultant string.
*
*
*/
// Test Case
// Test.describe("Example tests",_=>{
// Test.assertEquals(noSpace('8 j 8 mBliB8g imjB8B8 jl B'), '8j8mBliB8gimjB8B8jlB');
// Test.assertEquals(noSpace('8 8 Bi fk8h B 8 BB8B B B B888 c hl8 BhB fd'), '88B... | true |
0fdd395a8b20dfaad4f89d00e953e9810349d31d | JavaScript | Orso83/React-Weather-App | /src/components/DailyWeather.js | UTF-8 | 7,707 | 2.859375 | 3 | [] | no_license | import { useEffect, useState } from 'react';
import { Accordion, AccordionDetails, AccordionSummary, Typography, Grid, makeStyles } from '@material-ui/core';
import { ExpandMore } from '@material-ui/icons';
import DataOutput from './DataOutput';
const DailyWeather = (props) => {
// Use custom CSS.
const classes =... | true |
0bcc81c86c6983bd7b51ffed9ed3ad7bebc2a740 | JavaScript | BitHug1/justATest | /S10L108 While Loops Problem Set/script.js | UTF-8 | 552 | 3.953125 | 4 | [] | no_license | var loop1 = -10;
var loop2 = 10;
var loop3 = 300;
var loop4 = 5;
console.log("-10 to 19");
while (loop1 <=19) {
console.log(loop1);
loop1++;
}
console.log("Even 10 to 40");
while (loop2 <=40) {
console.log(loop2);
loop2+=2;
}
console.log("Odd 300 to 333");
while (loop3 <=333) {
if (lo... | true |
c924312da2935ff946a1376cd3f0c874fbe9d329 | JavaScript | asgeraga/IbaTechTasks | /javascript/Homework/h5/js/main.js | UTF-8 | 595 | 3.046875 | 3 | [] | no_license | let tabs = document.querySelectorAll(".tabs-title");
let content = document.querySelectorAll(".tabs-content li");
for (const item of tabs) {
item.addEventListener("click",()=>{
document.querySelector(".active").classList.remove("active");
item.classList.add("active");
for (const co... | true |
b201759cbd7d459f3e7ce120fe1d62367be9344e | JavaScript | MonevDejan/SEDC | /HomeWork/JavaScript/Homework_09 (Exercise)/Hide-show_div/hide-show_div.js | UTF-8 | 900 | 3.234375 | 3 | [] | no_license | $("<div>").addClass("container").insertBefore("script[src='hide-show_div.js']");
function createDivWithClass (nameOfclass)
{ $("<div>").addClass(nameOfclass).text("Here is some random text").appendTo(".container"); }
function createButton(buttonName)
{ $("<button>").text(buttonName).insertBefore("script[src='hide-sho... | true |
9575128f0a594c0d9918fd7d8100034153b09024 | JavaScript | Komsomol/cloudinary-background-image-removal | /uploadBase64.js | UTF-8 | 1,329 | 2.53125 | 3 | [] | no_license | require('dotenv').config();
var cloudinary = require('cloudinary');
var base64Img = require('base64-img');
var async = require("async");
// Set your API information
cloudinary.config({
cloud_name: process.env.CLOUD_NAME,
api_key: process.env.API_KEY,
api_secret: process.env.API_SECRET
});
let imagePath = 'images/... | true |
da33e3e1c29b399171707f075e98daccb759b248 | JavaScript | WxyNeverGiveUp/nodeStudy | /routes/6/6.36.js | UTF-8 | 433 | 3.171875 | 3 | [] | no_license | /*使用readStream对象的pipe方法 管道执行复制*/
var fs = require('fs');
var file = fs.createReadStream('./message.txt');
var out= fs.createWriteStream('./anotherMessage.txt'); // 默认option值为true表示可以继续写
file.pipe(out,{end:false}); // 复制操作,并设置为false,表示不关闭文件
file.on('end',function () {
out.end('再见'); // 可以继续写入
console.log('触发了end事件... | true |
7f98e5491fb2e204341ec7757ffe972c208ac7ea | JavaScript | MMAlaeddin/CoinCounter | /src/coin-counter.js | UTF-8 | 1,457 | 3.796875 | 4 | [
"MIT"
] | permissive |
function CoinCounter(amount) { // amount = 1.25
const newAmount = amount * 100; // amount = 125
console.log(newAmount);
const result = [];
// const index = 0;
// return newAmount;
// rcountQuarters(newAmount);
return function countQuarters(newAmount) {
const quarters = newAmount / 25; //quarters = 5... | true |
ad94c87ee55bd18b08044b53a5f6e19bd2699919 | JavaScript | T-dubb/Madcamp4-Game-App | /backend/src/util/GameroomUtil.js | UTF-8 | 5,773 | 2.71875 | 3 | [] | no_license | const GameroomModel = require("../models/Gameroom");
const UserModel = require("../models/User");
var current_num = 0;
//roomInfo라는 json에 roomtitle, 그리고
//userID에 개설자(User의 _id) 등을 넣어서 보냄
function addRoom(roomInfo,callback){
//console.log(roomInfo)
initplayers = [roomInfo.user._id, ]
const newRoom = new Ga... | true |
6b271b5807474ecd5c892ce45c337b3ca5a2327a | JavaScript | PatrickWalsh6079/JavaScript | /JS_basics/Methods.js | UTF-8 | 609 | 4.53125 | 5 | [] | no_license | // METHODS
// find indexOf() method to find index of character in String
var txt = "abcdefghijkl"
var pos = txt.indexOf("h");
console.log(pos);
// use slice method to return word in String at a specific index range
var txt = "I can eat bananas all day";
var x = txt.slice(10,17);
console.log(x);
// use replace method... | true |
651de914dc11c1bb19724d3da66a9d0d6abe866e | JavaScript | thonglk/joboserver | /JDContent/sale.js | UTF-8 | 14,080 | 3.125 | 3 | [] | no_license | const JD = [];
JD[0] = function ({ storeName, address = '', jobName = '', salary = '', hourly_wages = '', working_type = '', time = '', jobUrl = '', storeUrl = '', figure = '', unit = '', experience = '', sex = '', deadline = '', description = '', contact = '0971456089 (Mai)' }) {
if (salary) salary = `Với mức lư... | true |
d917f6288f9b8dbaee6d42acd88495764c8ed0f2 | JavaScript | jrudolph0313/Rudolph_Julian_WPF | /Conditionals_worksheet/js/script.js | UTF-8 | 3,356 | 3.640625 | 4 | [] | no_license | //Conditionals Worksheet
//Julian Rudolph
//1-22-14
// Stuff your face 1
//competitor must weigh more than 250 lbs to compete
//assign compWeight to the input of a prompt from user
var compWeight=prompt("Please input the competitors weight in pounds.");
//check output
//comment out, it works
//console.log(compWeig... | true |
884198c9853be10fedcba20f1c4e61fdf9ac77ca | JavaScript | brydzu/jpp | /examples/jpp.js | UTF-8 | 1,094 | 3.0625 | 3 | [] | no_license | const assert = require('assert');
const parse = require('@brillout/jpp/parse');
const stringify = require('@brillout/jpp/stringify');
const obj = {
date: new Date(),
undefined: undefined,
NaN: NaN,
Infinity: Infinity,
regexp: /^\d+$/g,
};
// All of `obj` can be serialized with JSON++
const obj_jpp = parse(... | true |
ae269a1bd66c5f1d8652480715c1e2f30ac1f79d | JavaScript | nth-commit/GestureJS | /script/third/customdomevents.js | UTF-8 | 2,581 | 3 | 3 | [] | no_license | (function () {
var customEventTypesRegister = {};
var customEventTypesByElement = {};
var nativeAddEventListener = EventTarget.prototype.addEventListener;
var nativeRemoveEventListener = EventTarget.prototype.removeEventListener;
EventTarget.prototype.addEventListener = function(type, listener) {
addCustomEve... | true |
de1efe2627a4af51260f91a5339babbfcd5ef225 | JavaScript | weterpoo/DesignStorm | /public/js/results.js | UTF-8 | 5,574 | 2.546875 | 3 | [] | no_license | var socket = io();
var COLOR = "#ff5757";
function formatTime(minutes, seconds) {
str = minutes.toString() + ":";
if (seconds.toString().length == 1) {
str += "0" + seconds;
} else {
str += seconds;
}
return str;
}
// Function for creating tables in the .pdf
function voteTable(data, columns) {
... | true |
603a8481f1ff968a24591be98e92352b7f1477b9 | JavaScript | mgborgman/javascript-exercises | /tempConversion/tempConversion.js | UTF-8 | 280 | 2.984375 | 3 | [] | no_license | const ftoc = function(deg) {
var result = 0;
result = (deg - 32) * (5/9);
return (Math.round(result * 10) / 10);
}
const ctof = function(deg) {
var result = 0;
result = (deg * (9/5)) + 32;
return (Math.round(result * 10) / 10);
}
module.exports = {
ftoc,
ctof
}
| true |
f723de0dbc2ff92c18d191cee36b2bb4c08d1916 | JavaScript | GCHQDeveloper911/cypress | /packages/driver/src/cypress/command.js | UTF-8 | 2,616 | 2.625 | 3 | [
"MIT"
] | permissive | const _ = require('lodash')
const utils = require('./utils')
class $Command {
constructor (obj = {}) {
this.reset()
this.set(obj)
}
set (key, val) {
let obj
if (_.isString(key)) {
obj = {}
obj[key] = val
} else {
obj = key
}
_.extend(this.attributes, obj)
re... | true |
09a0c61579945a3c8d005b53b25d497c14d688ed | JavaScript | gabriellima09/DrinkIt | /DrinkIt.WebApp/Scripts/Clientes/Script_CreateClientes.js | UTF-8 | 2,016 | 2.5625 | 3 | [
"MIT"
] | permissive | //Script para a tela create de clientes
$('#clienteCpf').mask('000.000.000-00', { reverse: true });
$('#clienteCep').mask('00000-000', { reverse: true });
//$('#clienteNumCartao').mask('0000-0000-0000-0000', { reverse: true });
$('#clienteCodSeg').mask('000', { reverse: true });
$('#clienteMesVal').mask('00', { rever... | true |
7ca5cbce272914798e70af0b24c3b52e0062e0ee | JavaScript | Theodore-Idoko/MernStack-Places-App | /src/user/components/UserItem.js | UTF-8 | 1,188 | 2.5625 | 3 | [] | no_license | import React from 'react';
import { Link } from 'react-router-dom';
import './UserItem.css';
import Avatar from '../../shared/components/UIElement/Avatar';
import Card from '../../shared/components/UIElement/Card';
const UserItem = props => {
// UserItem is used to display what is passed down from the UserList
/... | true |
ae3e26285a1252623d57111489585d5a47292c5f | JavaScript | rturceaninov/homework-N10 | /index.js | UTF-8 | 198 | 2.796875 | 3 | [] | no_license | var myCurentAge = 34;
for (var i = 3; i<=myCurentAge; i=i+3){
console.log("AGEmultiples_of_3",i);}
for (var i = myCurentAge; i<=myCurentAge; i=i+3); {
alert("myCurentAge 34");
}
| true |
266bb632e08b15e4a1b998baf5d7cef2f5e339d0 | JavaScript | emanjaber/ToDoApp-Eman-Alaa | /js/scriptN.js | UTF-8 | 1,495 | 3.078125 | 3 | [] | no_license | // Create a new list item when clicking on the "+" button
function newElement() {
var li = document.createElement("li");
var inputValue = document.getElementById("Basic").value;
var t = document.createTextNode(inputValue);
var divToDo = document.createElement("p");
divToDo.appendChild(t);
if (inputValue ==... | true |
2ee42f195985c73df32df29a6ee1d7ce85118c29 | JavaScript | harishm72/ipl-data-expressJS | /client/javascript/plotter.js | UTF-8 | 4,887 | 2.515625 | 3 | [] | no_license | // let requirejs = require('requirejs');
// let $ = requirejs('jquery');
// console.log($.get('/luckyteams'))
$(document).ready(() =>{
$('#lucky').show(() => {
var processed_json = new Array();
$.get('/luckyTeams', (data) => {
// Populate series
let result = [];
... | true |
9a12f3ab1d0ffa594d6c746e42c9b38881c657b1 | JavaScript | uperficialyu/js-data-structure | /code/sort/quicksort.js | UTF-8 | 826 | 2.65625 | 3 | [
"MIT"
] | permissive | /* @Description 快速排序
* @Author: yushunping
* @Date: 2020-11-15 20:37:23
* @Last Modified by: yushunping
* @Last Modified time: 2020-11-27 21:55:27
*/
const quicksort1 = (arr) => {
let quickSort = (arr) => {
let len = arr.length
if (len < 2) {
return arr
} else {
// 选标尺元素
let flag ... | true |
346bc49697d7ec1e2774869c77d35e331294a1d4 | JavaScript | timweigel/codecademy_javascript_syntax_iii | /buildALibrary.js | UTF-8 | 3,272 | 3.390625 | 3 | [] | no_license | class Media {
constructor (title) {
this._title = title;
this._isCheckedOut = false;
this._ratings = [];
}
get title() {
return this._title;
}
get isCheckedOut() {
return this._isCheckedOut;
}
get ratings() {
return this._ratings;
}
getAverageRating() {
let ratingLength = this._ratings.lengt... | true |
31ecae637b3091748990406540d13f343f4e85d1 | JavaScript | sp1r1tcruh3r/ErrorHandlingJs | /HexletFSNodeFileDirStats.js | UTF-8 | 1,648 | 3.3125 | 3 | [] | no_license | /*
Задача состоит в том, чтобы реализовать тип Stats и его формирование посредством динамической диспетчеризации благодаря подтипам Node.
Stats.js
Реализуйте тип Stats со следующим интерфейсом:
constructor
isFile()
isDirectory()
Node.js
Реализуйте надтип Node, интерфейсом которого являются функции:
... | true |
5c431c157de9697ca0c64b2378d700033ff4dbab | JavaScript | K-Smiley/React_Practise | /src/index.js | UTF-8 | 1,255 | 3.203125 | 3 | [] | no_license | import React from 'react'
import ReactDOM from 'react-dom'
// index.js file, has App comonent to send to index.html
const App = () => {
const course = {
name: 'Half Stack application development',
parts: [
{
name: 'Fundamentals of React',
exercises: 10
},
{
... | true |
1dacd836b41531fb4bce4462d02b129f19e65dc3 | JavaScript | michaLewicki/michalewicki.github.io | /script.js | UTF-8 | 1,485 | 2.96875 | 3 | [] | no_license | function showOrHideProperties(e) {
var element = e.getElementsByClassName("properties")[0];
var content = element.innerHTML;
if (element.classList.contains("hidden")) {
element.innerHTML = "";
disableOthers(e);
element.classList.remove("hidden");
e.className += " sele... | true |