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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
275a4428c7aa178ff81f4f5fc7e8b5e7fb47da0b | JavaScript | davidporosnicu/catch-of-the-day_V2 | /src/components/Inventory.js | UTF-8 | 1,676 | 2.609375 | 3 | [] | no_license | import React from 'react';
import AddFishForm from './AddFishForm';
class Inventory extends React.Component {
handleChange = (e, key) => {
const fish = this.props.fishes[key];
const updatedProperty = { ...fish, [e.target.name]: e.target.value }
this.props.updateFish(key, updatedProperty);
}
r... | true |
b371be969fdfcd087a54ee76df579ff29038d03b | JavaScript | ronaldmanzano02/superheroes | /src/views/Favourites/index.js | UTF-8 | 1,595 | 2.515625 | 3 | [
"MIT"
] | permissive | import React, { useEffect, useState } from "react";
import { Link, useHistory } from "react-router-dom";
export function Favourites() {
const [superhero, setSuperhero] = useState({ loading: true, result: {} });
let history = useHistory();
useEffect(() => {
const fetchData = async () => {
await fetch(`... | true |
b6349a6419c6c5f46da3eff391e5bb8dd464d38c | JavaScript | agrobost/BomberGlyphe | /game_server/cell/wood.js | UTF-8 | 363 | 2.578125 | 3 | [] | no_license | var Basic = require("./basic.js");
module.exports = WoodCell;
function WoodCell(column, line) {
"use strict";
Basic.call(this, column, line);
this.type = "wood";
}
WoodCell.prototype = Object.create(Basic.prototype);
WoodCell.prototype = {
constructor: WoodCell,
isWalkable: function () {
"u... | true |
fc6d3fdf7c6e84becd53f9b55e8cc72d1ca321f1 | JavaScript | garixlegends-crypto/JS | /js select 100 ans/script.js | UTF-8 | 150 | 2.53125 | 3 | [] | no_license | document.write('<select>');
for(var i = 1900; i <= 2021; i++){
document.write('<option> 1900 </option>');
}
document.write('</select>');
| true |
f5816612a24baddd27b72f33a8386e037682a79c | JavaScript | automatingadwords/AdWords-Scripts-Snippets | /email-sheet-contents.js | UTF-8 | 4,657 | 2.96875 | 3 | [] | no_license | //pass a SETTINGS object containing EMAIL (csv of email addresses) and LOG_SHEET_URL (the sheet with the date)
//INPUT_TAB_NAME must also be defined outside the function, or passed
//formatting will need adding depending on the data type. Usually the first x columns are strings, then the following are numbers
functio... | true |
72d828440a8dee2c0c05b218e9dadfbbbc3eff73 | JavaScript | CB721/Clicky-Game | /src/mario/Mario.js | UTF-8 | 2,928 | 3 | 3 | [] | no_license | import React, { Component } from "react";
import Wrapper from './components/Wrapper';
import Header from './components/Header';
import Main from './components/Main';
import Footer from './components/Footer';
import characters from "./characters.json";
class Mario extends Component {
state = {
title: "Click an im... | true |
a55f65e6da8293cec3a58ab49f7af9d793d90926 | JavaScript | bianbianzhu/react-jiangren-tutorial | /src/context.js | UTF-8 | 559 | 3.578125 | 4 | [] | no_license | // function f () {
// console.log(this)
// }
// f();
// this.message = "123";
// const f = () => {
// console.log(this);
// }
// f();
// const dragon = {
// weapon: 'fire',
// attack: () => {
// console.log(`attack with ${this.weapon}`);
// }
// }
// dragon.attack();
const man = {
... | true |
b69b25a07d5b65799a1a98bd541c00d75f319c8d | JavaScript | joebartels/quick-model | /lib/mixins/tests/normalize-mixin-test.js | UTF-8 | 3,923 | 2.59375 | 3 | [] | no_license | const { expect} = require('chai');
const normalizeMixin = require('../normalize-mixin');
const Model = require('../../model');
const {
one,
many,
} = Model;
describe('normalizeMixin', function() {
describe('#normalizeAttribute', function() {
const subject = Object.create(normalizeMixin);
subject.seria... | true |
7cc2bb0e43fffacc200f9f62ee31252b7f0b3a54 | JavaScript | pyxld-kris/activity__block-bots__player-vs-machine | /.DO_NOT_TOUCH/classes/BlockBot.js | UTF-8 | 23,048 | 2.828125 | 3 | [] | no_license | /**
* @author Kris Gano <kris@pyxld.com>
* @copyright 2019 Dev Launchers
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
import Phaser from "phaser";
//import Color from "phaser/display/color";
import FloatingMessage from "./FloatingMessage.js";
import PositionDisplay from "./Po... | true |
3a0ac53ff8724a06ee8728f21d12811b2357e703 | JavaScript | yasuomaidana/htmlPractice | /pJs/js/FirstHomework.js | UTF-8 | 857 | 2.75 | 3 | [] | no_license | function onHover(element){
let _class = element.className;
_class=_class.replace("beige","gray")
element.className=_class;
}
function onLeave(element){
let _class = element.className;
_class=_class.replace("gray","beige");
element.className=_class;
let img = element.getElementsByTagName("div... | true |
f1ea1ffe9b847b0e7412191553a3bca7c4cb409f | JavaScript | ChenKaslasi/protfolio-proj | /projs/book-shop/js/util-service.js | UTF-8 | 955 | 3.671875 | 4 | [
"MIT"
] | permissive | 'use strict';
function makeId(length = 6) {
var txt = '';
var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
for (var i = 0; i < length; i++) {
txt += possible.charAt(Math.floor(Math.random() * possible.length));
}
return txt;
}
function getRandomIntInclusive(min, max... | true |
317881ea9dbc5d60b592935b1ca6e6661c244263 | JavaScript | rahul3103/flightnetwork | /src/components/mov.js | UTF-8 | 4,193 | 2.65625 | 3 | [] | no_license | // users/' + this.props.match.params.id
import React, { Component } from 'react';
import { schema, Type } from 'lovefield';
import axios from 'axios';
import './mov.css';
class Movie extends Component {
constructor(props) {
super(props);
this.state = {
movie: '',
posterIMG: '',
overview: ... | true |
f20a984b638d107df195c5b19df26d257bab5280 | JavaScript | connorclark27/portfolioSite | /js/app.js | UTF-8 | 4,035 | 2.953125 | 3 | [] | no_license | /* Open and Close Navigation*/
function openNav() {
var expand = document.getElementById("sideNavigation");
expand.classList.toggle("openNavigation");
var blur = document.getElementById("homeContent");
blur.classList.toggle("homeContentBlur");
}
/*Hamburger Menu to Close Button*/
$(document).ready(fun... | true |
eb7df23b98060f419071c972fbba014b35f7c78f | JavaScript | Enriquedonaire/Covid-Tracker | /src/components/Graphic.js | UTF-8 | 3,145 | 2.703125 | 3 | [] | no_license | import React, { useState, useEffect } from 'react';
import axios from 'axios';
import { Line, Doughnut } from 'react-chartjs-2';
const Graphic = ({ data, country }) => {
const [dailyData, setDailyData] = useState({});
useEffect(() => {
const loadData = async () => {
const data = await loa... | true |
cc5a71294c6f8c8f32b3655e150dbb29f97d7e49 | JavaScript | injaneb/flappybird-DQN | /js/bird.js | UTF-8 | 402 | 3.1875 | 3 | [] | no_license | class Bird{
constructor({speed}){
this.speed = speed;
this.x = 50;
this.y = 250;
this.alive = true;
}
restart(){
}
jump(){
if(this.y > 10) this.y -= this.speed * 3.5;
}
show(){
if(this.y < 500) this.y += this.speed;
else{t... | true |
c05e208fe3196ce44f42076e75419722e73dc857 | JavaScript | oliverellmers/p5jsExperiements | /js/faceTrackingPoseBasic.js | UTF-8 | 1,469 | 2.890625 | 3 | [] | no_license | /*
Example taken from ml5js repository:
https://github.com/ml5js/ml5-examples/tree/master/p5js/PoseNet
*/
let w = 640;
let h = 480;
let video;
let videoCopy;
let poseNet;
let poses = [];
let skeletons = [];
var imageRatio = 1;
function setup() {
createCanvas(windowWidth, windowHeight);
imageRatio = windowHeigh... | true |
9b11509a5f3260aa6fcac9bb20072f8faed4b216 | JavaScript | acrianimo/Challenges | /Sorting/sorting.js | UTF-8 | 2,875 | 3.8125 | 4 | [] | no_license | /* Implementation of fundamental sorting algorithms */
function bubbleSort(arr, comparator = (a, b) => a - b) {
for(let i = 0; i < arr; i++) {
for(let j = 0; j < arr.length - 1 - i; j++) {
if (comparator(arr[j], arr[j + 1]) > 0) {
swap(arr, j, j + 1);
}
}
... | true |
e257f8e9b5f0f944db8cbe7e8c149a68cfcef943 | JavaScript | Praneethachodey/Programming-Constructs | /function.js | UTF-8 | 1,627 | 3.78125 | 4 | [] | no_license | const readline = require('readline-sync');
//1.)
let choice = readline.question("enter the scale you want to convert from");
switch(choice){
case 'C':
var temp= readline.question("enter the temp");
while(toCheckTemp(temp)){
temp = readline.question("enter the correct temp");
}
... | true |
fae667087d5d62318b1c7b05eaa8edbda377c28c | JavaScript | ricardomatias/node-lyrics | /lib/getHometown.js | UTF-8 | 1,220 | 2.625 | 3 | [
"MIT"
] | permissive | 'use strict';
var request = require('superagent');
var filter = require('lodash.filter');
var { parseJSON, LYRICS_API } = require('./utils');
function getHometown(artist, opts) {
// Return error if artist arg is missing
if (!artist) {
return done(new Error('"artist" cannot be an empty string'));
... | true |
4f2aeb51d16514bdb0dcc6dd77bb6dcfa6328d64 | JavaScript | fufylev/GeekBrains | /JS-2/Lesson_8/calculator/js/calculator.js | UTF-8 | 1,552 | 2.921875 | 3 | [] | no_license | const app2 = new Vue( {
el: '#app2',
data: {
input: '',
mathOp: null,
operations: {
"-": ( a, b ) => a - b,
"+": ( a, b ) => a + b,
"*": ( a, b ) => a * b,
"/": ( a, b ) => a / b,
"^": ( a, b ) => Math.pow( a, b )
},
... | true |
08b1a64569f9bb543060d5cb4e10f1a09c36f8db | JavaScript | micky-wj/FiveSixUI-Super | /src/components/Button/__tests__/index.test.js | UTF-8 | 16,019 | 2.71875 | 3 | [] | no_license | import React from 'react';
import { shallow, render, mount } from 'enzyme';
import Button from '..';
const ButtonGroup = Button.Group;
// 测试覆盖率只能表明你测到了,但并不能保证所有情形你都测到了,因此使用以下情形对测试case进行约束
// 以下为大致的测试步骤,使用渐进的顺序
// step1. test custom use
// 正常场景测试,主要测试是否会报错,倾向使用shallow以加快测试速度;
// step2. test special use
// ... | true |
d35db4613b2c4bed34618b7b8c3b050547ff5a04 | JavaScript | kdj924/JS_Training | /reverseItAll.js | UTF-8 | 166 | 3.15625 | 3 | [] | no_license | const text = "Hello World and Coders";
function reverseItAll(str) {
return str.split('').reverse().join('');
}
const result = reverseItAll(text);
console.log('result', result); | true |
0c0beaaec2436dfdffc4b41c24a0beab3d3b2852 | JavaScript | sebaperez/gaia | /src/orquestador/service/calendario.js | UTF-8 | 4,224 | 2.59375 | 3 | [
"MIT"
] | permissive | var request = require('request');
var config = require('../config/config').config;
var moment = require('moment');
moment.locale('es')
process.env.TZ = 'America/Buenos_Aires'
var timeHelper = require('../helpers/timeHelper');
var log = require('log4js').getLogger();
log.level = 'debug';
module.exports.obtenerHueco = f... | true |
14550993d108647de4ed739ef7a1c7abd45084c7 | JavaScript | spemmelaar/bubble_server | /PromiseTest.js | UTF-8 | 567 | 2.859375 | 3 | [] | no_license | var first = Promise.reject(6);
first.then(
function resolve(value) {
console.log('Resolve first');
console.log(value);
},
function reject(value) {
console.log('Reject first');
console.log(value);
}
).then(
function resolve(value) {
console.log('Resolve second');
console.log(value);
},
function rejec... | true |
6522deba1d26338e2f5d765ee2ae2ed5b0b616bc | JavaScript | ZakRabe/chatty | /public_html/js/main.js | UTF-8 | 2,743 | 2.890625 | 3 | [] | no_license | var inputText = ["Tell us how a simple chat on public transport made you smile, made you think, made your day, or ultimately changed your life...","Name", "City", "Email Address"];
$('textarea')
.click(function(){
if($(this).val() == inputText[0]){
$(this).val('');
};
})
.blur(function(){
if($(this).val() == ''... | true |
2c4d40db4772a37842ce135520df0c2901f44e90 | JavaScript | AlexanderShpilka/React_StephenGrider_Udemy | /projects/streams/client/src/components/Modal.js | UTF-8 | 2,174 | 3.125 | 3 | [] | no_license | import React from 'react';
import ReactDOM from 'react-dom';
const Modal = props => {
return ReactDOM.createPortal(
<div
className="ui dimmer modals visible active"
onClick={props.onDismiss} // *
>
<div
className="ui standard modal visible active"... | true |
8567e9bdd0d79824c98485d9e28266dd3857e4a1 | JavaScript | v1kd/SocketIO | /Chat/index.js | UTF-8 | 584 | 2.578125 | 3 | [] | no_license | 'use strict';
import express from 'express'
import http from 'http'
import socketio from 'socket.io'
const app = express()
const appHttp = http.Server(app)
const io = socketio(appHttp)
const hello = 'Hi'
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html')
})
io.on('connection', socket => {
... | true |
bcb8271d065b24f9286469bfc542ed6cc43814fd | JavaScript | BemwaMalak/FEND | /landing-page/js/app.js | UTF-8 | 4,381 | 3.25 | 3 | [] | no_license |
//function for creating navbar items
function makeUL() {
// Get the list element
const list = document.getElementById('navbar__list');
for (var i = 1; i < 5; i++) {
// Create the list item:
let itemholder = document.createElement('li');
// Set its contents:
let item = item... | true |
35ce9b820323427ecf023d5f980df3ebc01a8d8a | JavaScript | ninja076786/Project-88 | /main.js | UTF-8 | 3,249 | 3.046875 | 3 | [] | no_license | var canvas = new fabric.Canvas('myCanvas1');
var width_block=30;
var height_block=30;
var player_x=10;
var player_y=10;
var player_object="";
var block_image="";
function player_update(){
fabric.Image.fromURL("player.jpg",function(Img){
player_object=Img;
player_object.scaleToWidth(150);
player_object.scaleT... | true |
85bd6cc0d6d1bed4824f96a5de7a1dc572ba9f1a | JavaScript | mayaugi/dice | /index.js | UTF-8 | 680 | 3.65625 | 4 | [] | no_license |
var randomNumber1 = Math.floor(Math.random() * 6) + 1
var randomImg1 = "images/" + "dice" + randomNumber1 + ".png"
var randomImg1Src = document.querySelectorAll('img')[0].setAttribute("src", randomImg1)
var randomNumber2 = Math.floor(Math.random() * 6) + 1
var randomImg2 = "images/" + "dice" + randomNumber2 + ".png"... | true |
ad2cb6160f8ae997e2a05a8d37e76b27f90ee568 | JavaScript | codyprashant/GUVI-ZEN-daily-assignments | /advancedJS/06_10_2020/script.js | UTF-8 | 2,179 | 4.0625 | 4 | [] | no_license | var array1 = [20, 30, 40, 50, 62];
var array2 = [20, 30, 'Gupta', 40, 50, 'Prashant'];
// ES6 way of writing reduce logic to add all values from left to righvt of array
var reduceFunction = function (array, func, total) {
if (total === void 0) { total = 0; }
for (var i = 0; i < array.length; i++) {
tota... | true |
61c6e9646d48e553ec946d5493565961929d28ed | JavaScript | Ruqayah22/node-js-playlist | /public/assets/todo-list.js | UTF-8 | 1,083 | 3.140625 | 3 | [] | no_license | // this function to add new item to (to-do) list.
$(document).ready(function(){
$('form').on('submit', function(){ //when we press buttom submite in our browser it do :
var item = $('form input'); //add the text we write it in textbar in our braowser to the var(item).
var todo = {item: item.val()}; //ad... | true |
7143e98986473fc1fe1fed471d3b2fbf0db467c9 | JavaScript | yangxin1994/farvekonfigurator | /color-modular/colorb3d.js | UTF-8 | 119 | 2.53125 | 3 | [] | no_license | (function() {
// Make the color #b3d
HTMLElement.prototype.colorb3d = function() { this.style.color = '#b3d' }
})() | true |
20f566019f2db3dc41507e39aabae3f004c3a1f7 | JavaScript | original-kyogre/my-date-picker | /test/EasyDate.test.js | UTF-8 | 974 | 2.703125 | 3 | [] | no_license | const should = require('should');
import EasyDate from '../app/EasyDate';
/**
* @test
* @arow
*/
describe('EasyDate', () => {
//获取当前月份+1 月
describe('#new', () => {
let date = new EasyDate("+1m");
it('should create instance', () => {
let some = date.toDate();
let today... | true |
be6aebae3a97bdbd8971b9e2fee5665e9096f6fb | JavaScript | marcobrasci1986/angularSpringBootBaseline | /src/main/resources/static/test/e2e/features/step_definitions/stepDefinitions.js | UTF-8 | 1,625 | 2.734375 | 3 | [] | no_license | 'use strict';
var EmployeePage = require('../support/pages/employeePage');
/**
* 1. Start Application
* 2. Run locally: protractor protractor.conf.js --params.baseUrl http://localhost:8080/
*/
module.exports = function () {
this.World = require("../support/world.js").World;
var employeePage = new Employee... | true |
5fb41eb5fdae13ca52ff8c782d106096434599d9 | JavaScript | 1793523411/my-mian-note | /code/tmp/字符串处理/demo02.js | UTF-8 | 173 | 3.15625 | 3 | [] | no_license | //剑指 Offer 58 - II. 左旋转字符串
var reverseLeftWords = function(s, n) {
let arr = s.split("")
arr = arr.concat(arr.splice(0,n))
return arr.join("")
}; | true |
d6b3281cd4c46ec70b2ddee7330502a6f0dde351 | JavaScript | Clinician/app-web-auth2 | /src/js/utils/Utility.js | UTF-8 | 7,660 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | /* global module, require */
var $ = require('jquery');
/**
* creates an object containing methods to handle front-end (prints, views) and data processing
* @param page {String}
* @constructor Utility
*/
var UtilityConstructor = function (page) {
this.genericError = '';
this.$infoBlock = $('#infoBlock');
t... | true |
8ee21dd0b7e64f0b65aabdbac7eb7e52ce1df6e2 | JavaScript | shivamd20/CodeChamp | /microservices/api/src/main/resources/ui/src/RunResultArea.js | UTF-8 | 3,308 | 2.578125 | 3 | [] | no_license | import React from 'react';
import Card from 'material-ui/Card';
import Button from 'material-ui/Button';
import CheckIcon from 'material-ui-icons/Check';
import { CircularProgress } from 'material-ui/Progress';
class RunResultArea extends React.Component{
state={
language: 'java',
version: 'lates... | true |
2870f2a0e021856ffa686e7389c9778f6b553f74 | JavaScript | SMagloori/WebdriverIO-1 | /pageobjects/product_page.js | UTF-8 | 727 | 2.515625 | 3 | [] | no_license | class ProductPage {
async sortProducts(visibleText){
const selectBox = await $('.product_sort_container');
await selectBox.selectByVisibleText(visibleText);
}
async addItem(itemName){
const item = await $(`.//div[@class='inventory_item_name' and text()= '${itemName}']/../../followin... | true |
22c0cc13a0a95fc868b1e864d9b99a8497a59b7e | JavaScript | chechenxm/TW_works | /Task115/oo-basic-step-by-step-example-es6/src/practice_10/student.js | UTF-8 | 575 | 2.765625 | 3 | [] | no_license | import Person from "./person.js";
import Class from "./class.js";
class Student extends Person{
constructor(id, name, age, klass){
super(id, name, age);
this.klass = klass;
}
introduce(){
if(this.klass.leader === undefined || this.klass.leader.id !== this.id){
return sup... | true |
09a9c7674fbcd1a922472c2a9069f644b04398f6 | JavaScript | Tony-Liuduan/interview | /js/deepcopy/deepcopy.js | UTF-8 | 1,652 | 3.34375 | 3 | [] | no_license | function deepcopy(obj) {
if (typeof obj === "object") {
const res = obj.constructor === Array ? [] : {};
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
res[key] = deepcopy(obj[key]);
}
}
return res;
} else {
return obj;
... | true |
ffc543a001690497a696b5c26e3ae56bad40e580 | JavaScript | Poojan-patel/codeforces-app | /public/js/compare_it_client.js | UTF-8 | 3,545 | 2.75 | 3 | [] | no_license | console.log("script loaded Successfully")
const Form = document.querySelector(".compare-handles")
const Add = document.querySelector(".plus-button")
const Handles = document.querySelector(".get-handles")
const Submit = document.querySelector(".compare-handles > input")
const DataOfHandles = document.querySelector(".han... | true |
d97f5cf17c409b0353cb7c3374857c02fd69b6b8 | JavaScript | raghunandan15102009/crumpled-balls-1 | /sketch.js | UTF-8 | 673 | 2.65625 | 3 | [] | no_license |
const Engine = Matter.Engine;
const World = Matter.World;
const Bodies = Matter.Bodies;
const Body = Matter.Body;
var ball,gd,box1,box,box2;
function setup() {
createCanvas(1200, 2000);
engine = Engine.create();
world = engine.world;
ball=new Paper(200,350);
gd=new Ground(600,400,1200,20);
box1=new Box(10... | true |
2cedcea79fa68abcbad22f51296eec1300cbcba2 | JavaScript | eric-hoppenworth/newsScraper | /controllers/routes.js | UTF-8 | 2,779 | 2.8125 | 3 | [] | no_license | // Require request and cheerio. This makes the scraping possible
var request = require("request");
var cheerio = require("cheerio");
//connect models
module.exports = function(routes,mongoose){
var models = require("../models/models.js")(mongoose);
const Article = models.Article;
const Comment = models.Comment;
... | true |
160c8dfea881db22f3c9826d67d675b6989949c6 | JavaScript | DolArt/Brain-Games | /src/games/gcd.js | UTF-8 | 584 | 3.140625 | 3 | [] | no_license | import getRandomIntNum from '../getRandomIntNum.js';
import runGameEngine from '../index.js';
const getGCD = (num1, num2) => ((!num2) ? num1 : getGCD(num2, num1 % num2));
const getGameData = () => {
const firstNumber = getRandomIntNum(1, 100);
const secondNumber = getRandomIntNum(1, 100);
const question = `${f... | true |
c6da1fb975e053db20c91febcc2bb7aed889afcc | JavaScript | MSegimon/Chat-Bot | /assets/main.js | UTF-8 | 3,411 | 2.875 | 3 | [
"MIT"
] | permissive | const voice = document.querySelector(".voice");
const voice2text = document.querySelector(".voice2text");
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
const recorder = new SpeechRecognition();
let marker1 = 0;
let marker2 = 0;
let currentBotMessage;
function addBoiText(text)... | true |
fa888d7c2125ab49e596929ec93d539972815a51 | JavaScript | Darkmap/ts-enum-utils | /src/ts-enum-utils.js | UTF-8 | 893 | 2.796875 | 3 | [] | no_license | "use strict";
/**
* @fileoverview Provides utilities for dealing with TypeScript's enum.
*/
exports.__esModule = true;
function listEnumMemberNames(enumType) {
return listEnumMemberNamesHelper(enumType);
}
exports.listEnumMemberNames = listEnumMemberNames;
function listNumericEnumMembers(enumType) {
return li... | true |
5a4734c0b73a6ba2c5e5d99c02733c1a29ecc9a3 | JavaScript | shanebruggeman/webdraw | /code/javascript/database_testing.js | UTF-8 | 1,837 | 2.625 | 3 | [] | no_license | $(document).ready(function() {
correctHeight();
getProfilePicture();
// $("#uploadimage").submit(function(e){
// uploadImage(e);
// });
});
var correctHeight = function() {
var bodyHeight = $("body").height();
$(".wrapper").height(bodyHeight);
}
var uploadImage = function(e) {
e.preventDefault();
var data... | true |
3c21d6844df95ec688cca556f2ebf7a9cd4c5e09 | JavaScript | saaage/fleetmed_client | /src/redux/reducers/reviewReducer.js | UTF-8 | 646 | 2.609375 | 3 | [] | no_license | const initialState = {
allReviews: [],
fetching: false,
fetched: false,
error: null
}
export default function reducer(state = initialState, action) {
switch (action.type) {
case 'FETCH_REVIEWS':
return { ...state, fetching: true }
case 'FETCH_REVIEWS_FULFILLED':
return { ...state, allRevi... | true |
6632b9e2051bacf354259ccb77dea3a27b38118d | JavaScript | islegmar/SVGMovies | /web/html/js/widgets/WidgetVideoFotograma.js | UTF-8 | 8,659 | 2.9375 | 3 | [] | no_license | /**
* Representa UN fotograma dentro de un step
*/
function WidgetVideoFotograma(id) {
this.id = id;
// Donde se hace el render de los elementos gráficos del widget
this.container;
// Si es true, quiere decir que este fotograma no se mostrará en el play final
this.disabled = false;
// Si se true, quie... | true |
b9a47f500a05a687c300d5b892a54fc1f7777051 | JavaScript | NoemiR/wdi-11-lab-scope-callbacks-pokemon | /js/app.js | UTF-8 | 5,234 | 3.125 | 3 | [] | no_license | console.log("homework")
// class Cardsinplay {
// constructor(name, damage)
// }
// cardCount(){
// }
// }
const library = [{name: "Bulbasaur", damage:60},
{name: "Caterpie", damage:40},
{name: "Charmander", damage:60},
{name: "Clefairy", damage:50},
{name: "Jigglypuff", damage:60},
{name: "Mankey", damage:30... | true |
ef5e8d281645acc213d5bd5a1086b1ad025cb101 | JavaScript | PraveenKuber/ExcelStudy | /ExcelStudy-Web/src/main/webapp/assets/js/isValid.js | UTF-8 | 7,809 | 2.625 | 3 | [
"MIT"
] | permissive | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
* <%--
Document : isExist
Created on : Nov 24, 2017, 11:05:08 AM
Author : Bhaskara
--%>
xmlhttp.readyState ==... | true |
c04e5a8974b60d9c88b85581e9b5adc9425bb070 | JavaScript | Rahul9046/finding-falcone | /src/components/planet-dropdown.js | UTF-8 | 923 | 2.515625 | 3 | [] | no_license |
import React from 'react';
import { Select } from 'antd';
import "antd/dist/antd.css";
const { Option } = Select;
const PlanetDropDown = (props) => {
let {planets, selected} = props;
planets = planets.map((planet, index) => {
let planetName = planet.name;
return (
<Option key={inde... | true |
86c4cab7f52e2798425cb8ef0acd3f60edc828dc | JavaScript | liyang31tg/deno | /cli/tests/node_compat/test/parallel/test-stream-asIndexedPairs.mjs | UTF-8 | 1,976 | 2.5625 | 3 | [
"MIT"
] | permissive | // deno-fmt-ignore-file
// deno-lint-ignore-file
// Copyright Joyent and Node contributors. All rights reserved. MIT license.
// Taken from Node 18.12.1
// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually
import '../common/index.mjs';
import { Readable } from 'stream';
... | true |
4857cea2ed325db0c96a7a118b38d973bfe6efa8 | JavaScript | rfox90/meteor-dragula | /package.browserify.js | UTF-8 | 1,116 | 2.984375 | 3 | [] | no_license |
// Dragula can't be loaded until the document.body is. So we have to do some
// semi weird stuff here.
//
// Browserify will atuomatically inject the module in a browserified way and
// wrap the contents of this file in a function that gets passed the module.
// We delay execution of this module until window.o... | true |
1c873995f82c6d5b2d09f1ffb094918b89768b50 | JavaScript | jroblak/sagdc2014 | /src/js/entities/clickable_maker.js | UTF-8 | 737 | 2.625 | 3 | [] | no_license | /*
This serves as a registry so the game_screen can automatically make objects
out of what it finds in the Tiled maps.
*/
var clickables = {
Door: require('./clickables/door'),
Floor: require('./clickables/floor'),
LightSwitch: require('./clickables/light_switch'),
};
module.exports.create = function(game... | true |
b89fb4486b128613331b34ab6dbae5aafc1259bb | JavaScript | arittrosaha/AMazingGame | /solvers/human.js | UTF-8 | 4,497 | 3.046875 | 3 | [] | no_license | import { draw } from '../setup/grid.js';
export default function HumSolve (maze) {
draw(maze);
let current = maze[0];
let previousPath = [];
let targetFound = false;
current.highlight('yellow');
current.explored = true;
window.humanCallback = (event) => {
if (event.defaultPrevented) {
retur... | true |
72c4061c943e83066ee77fe577ade9c308cd04d3 | JavaScript | lichaozhy/ui | /src/ui/draggable.js | UTF-8 | 5,636 | 2.5625 | 3 | [
"MIT"
] | permissive | import Controller from './utils/controller';
import './utils/event';
const STATE = { IDLE: -1, READY: 0, MOVING: 1 };
let dragover = document;
function noOp() {
return;
}
function DefaultOptions() {
return {
handled: false,
constraint: false,
delay: 50,
threshold: 0,
axis: null,
dataFactory: noOp,
dr... | true |
9c50b6c0f97a07ca039d6ff7425acccbfa43bcc6 | JavaScript | devongovett/wc-hooks | /src/hooks.js | UTF-8 | 4,088 | 2.734375 | 3 | [] | no_license | let currentStore;
let currentDispatcher;
let index = 0;
let effects;
let layoutEffects;
let unmountEffects;
export function createHooks(fn) {
let store = [];
let _effects = [];
let _layoutEffects = [];
let _unmountEffects = [];
let isUpdating = false;
let updateQueued = false;
let update = () => {
i... | true |
9d077841b64756652a8fcf11e12bc0913240751a | JavaScript | OlegUrmanov/lvl8 | /Task 1/help.js | UTF-8 | 661 | 3 | 3 | [] | no_license | function time() {
const date = new Date();
const hours = date.getHours();
const minutes = date.getMinutes();
const time = `${hours}:${minutes}`;
return time;
}
function date() {
const d = new Date();
const ymd = `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`;
return ymd;
}
function timeDelay(time... | true |
07251ef56cdc12da008dfbccf2940e05d8114abc | JavaScript | auto-js/autojsDemo | /小游戏/挑战巅峰.js | UTF-8 | 9,608 | 2.703125 | 3 | [] | no_license | 作者QQ: 1811588980
*完成时间: 2019年2月8日 下午9:51:22
*测试机型: meizu_M5 Note
*Auto.js版本: 4.1.0 Alpha5
*屏幕: 1080*1920~~~~其他屏幕不知道能不能用。
*API: 24
*备注: 修复最后一步不走的问题。
**/
//定义悬浮窗控制模块,命名为(悬块)。
function 悬块(window, view) {
//判断是否缺少构造参数。
if (!window || !view) {
//缺少构造参数,抛出错误。
throw "缺参数";
};
//记录按键被按下时的触摸... | true |
f2508ddbeefd90cf9ac92bf76d9e24d2deb27c4f | JavaScript | dmoreira317/CRA-Calc-React | /src/components/NumberInput.jsx | UTF-8 | 1,383 | 2.875 | 3 | [] | no_license | //RAFCP snippet
import React, { useState } from "react";
import PropTypes from "prop-types";
import Resultado from "./Resultado";
import { operaciones } from "../helpers/operaciones.js";
const NumberInput = () => {
const [numeros, setNumeros] = useState({
numero1: 0,
numero2: 0,
});
const {
handleCh... | true |
8960e9d0814e4934b15608a48ae5bfa116c1f42d | JavaScript | carlos-herrera-cervantes/notes-app-nodejs | /notes.js | UTF-8 | 1,384 | 3.125 | 3 | [] | no_license | const fs = require('fs');
/**
* @Add
*/
//#region snippet_Add
var addNote = (title, body) => {
var notes = fetchNotes();
var note = {
title,
body
};
var duplicateNotes = notes.filter(note => note.title === title);
if (duplicateNotes.length == 0) {
notes.push(note);
saveNotes(notes);
ret... | true |
353c1a258b937571d91fba61e94821c0f1373ef6 | JavaScript | trentnsmith/DSA-Recursion | /fibonacci.js | UTF-8 | 335 | 3.859375 | 4 | [] | no_license | function fibonacci(n) {
let seq = [1, 1]
if (n===0) {
console.log(0);
return;
}
if(n===1){
console.log(1)
return;
}
if(n===2){
console.log(seq)
return;
}
for (let i = 2; i <= n; i++) {
seq.push(seq[i-1]+seq[i-2])
}
console.log(seq)
}
... | true |
ab920e52154d8b1dce41874bea402a1c82e7ff78 | JavaScript | Lucky-Star-999/Minesweeper | /api/public/javascripts/BoardMaking.js | UTF-8 | 3,656 | 3.515625 | 4 | [] | no_license | // Import classes
var bombExceptFirstClick = require('./BombExceptFirstClick.js');
var relativeSquares = require('./RelativeSquares.js');
// This class is to create the 2d array representing squares and bombs on a board
class BoardMaking {
constructor(first_click_position, number_of_bombs, number_of_squares_a_row,... | true |
4288172b254784d449d6b6804bd753f1bcc118f4 | JavaScript | thansen29/Quack-Man | /lib/game_view.js | UTF-8 | 7,839 | 2.515625 | 3 | [] | no_license | import QuackMan from './duck';
import Board from './board';
import boardModel from './board_model.js';
import Game from './game';
import Database from './database';
import _ from 'lodash';
class GameView {
constructor(ctx, game){
this.ctx = ctx;
this.game = game;
this.countdown = this.countdown.bind(this... | true |
0939e5dc4561811bc233e13db608490475456d88 | JavaScript | WAPEETY/peppe289.github.io | /js/main.js | UTF-8 | 876 | 3.15625 | 3 | [] | no_license | var lang = 1;
function switchLang(){
if(lang == 0){
lang = 1;
var nascondi = document.getElementsByClassName('eng');
var mostra = document.getElementsByClassName('ita');
document.getElementById('pulsante').textContent="clicca per inglese"
for(let i=0; i < nascondi.length; i+... | true |
e38cde833130d4995df8b22f2ddeddef0e3a98d3 | JavaScript | Soopthunder/patrimonio_turismo_1 | /services/db.js | UTF-8 | 791 | 2.546875 | 3 | [] | no_license | "use strict";
const mongoose = require('mongoose');
const bcrypt = require('bcryptjs');
const User = require('../models/user');
const connectDB = async () => {
try {
await mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true });
const user = await User.findOne()
if (!user) {
... | true |
5012afd03d85662462edc164f04877e5357b8984 | JavaScript | aryehraber/statamic-logbook | /resources/js/logbook.js | UTF-8 | 1,288 | 2.953125 | 3 | [
"MIT"
] | permissive | // Submit form on select change
const setupSelectListenter = () => {
const select = document.querySelector('select[name=log]')
if (select) {
select.addEventListener('change', () => select.form.submit())
}
}
// Confirm deletion of logs
const setupDeleteListeners = () => {
const deleteButtons = Array.from(d... | true |
5b37a14917cc76619672c7c82da0f9253018e8ef | JavaScript | matis-dk/movieidea | /dev/js/mainGalleryController.js | UTF-8 | 3,612 | 2.609375 | 3 | [
"MIT"
] | permissive |
// The monitorMovieElements is monitoring how many pages that are
// currently loaded and the total number of hits
let monitorMovieElements = {
total_pages: 0,
current_page: 0,
fetched: false
}
function loadMovies (con) {
return Promise.resolve(fetchTMDb(con))
}
function controllerMovies (con, direc... | true |
69178f3b1489f84cf06091a5295adc2f484c2b25 | JavaScript | victorhqc/website-2018 | /src/client/themes/utils.js | UTF-8 | 1,284 | 2.515625 | 3 | [] | no_license | import capitalize from 'lodash/capitalize';
const setSpacing = (props, keyName) => {
if (!props[keyName]) {
return '';
}
const defaultProps = typeof props[keyName] === 'number'
? {
top: props[keyName],
bottom: props[keyName],
right: props[keyName],
left: props[keyName],
}
... | true |
ea2fd5f1a378b8a408dd6c4236d9d65b44d15f72 | JavaScript | dozertdc/Algorithms | /CrackingTheCodingInterview/1.2/IsPermutation.js | UTF-8 | 2,063 | 4.78125 | 5 | [] | no_license | // not efficient, but a good starting point to understand the problem
// O(n log n)
function isPermutation(string1, string2) {
// if they are not equal length they cannot be permutations
if(string1.length !== string2.length){return false;}
// sort string 1
string1 = string1.split('').sort().join('');
... | true |
49f3a153c0a7a02925b3580d22b623c15ff295b3 | JavaScript | apb-inc/AlertGFCI | /tessel/liveOutlet/index.js | UTF-8 | 612 | 2.875 | 3 | [] | no_license | var tessel = require('tessel'); // Import tessel
var pin = tessel.port.B.pin[2];
pin.pull('pullup');
var hasBeenOn = false;
console.log("Start");
setInterval(function(){
pin.read(function(error, value) {
if(value===1 && !hasBeenOn){
hasBeenOn = true;
console.log("Outlet On");
... | true |
af2d09042ed0215a4ea69072c3de78ce86ae7a96 | JavaScript | huangdaiyi/antd-game-admin | /src/utils/HOR.jsx | UTF-8 | 1,647 | 2.640625 | 3 | [
"MIT"
] | permissive | import update from 'react-addons-update';
class ReducerMaker {
constructor({ actionChecker, reducerName, data } = {}) {
this.actionChecker = actionChecker;
this.reducerName = reducerName;
this.data = data;
this.reducerFunction = this.reducerFunction.bind(this);
this.makeReduer = this.makeReduer.b... | true |
273a316936a894f2cb9d302e7ac21e4a841b1939 | JavaScript | mongodb-js/log | /lib/parse-query-shape.js | UTF-8 | 1,007 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | var map = require('lodash.map');
var isObject = require('lodash.isobject');
var isRegExp = require('lodash.isregexp');
var isArray = require('lodash.isarray');
var clone = require('lodash.clone');
var debug = require('debug')('mongodb-log:parse-query-shape');
var QUERY_OPS = '$exists $gt $gte $in $lt $lte $nin $regex'... | true |
9c3b15be2d2c5618eaebbce2799f9dd1d2e60f1d | JavaScript | kanush085/Myproject | /javaScript/Functionality/stopWatch.js | UTF-8 | 696 | 2.734375 | 3 | [] | no_license | /***********************************************************
*
* Execution :Default node cmd>node stopWatch.js
* Purpose :Is to calculate the time elapsed betweem the start and stop.
*
*@description
*
*
*@file :stopWatch.js
*@overview :stopWatch takes the userinput measure the e... | true |
61205ea06c164002424e5496b283283062956c26 | JavaScript | donna6355/handmade_plugin | /typing.js | UTF-8 | 1,383 | 2.96875 | 3 | [] | no_license | $(function() {
// <p /> 텍스트 타이핑 효과 만들기
const txtPrgFn = function(DOM, idx) {
let txt = DOM.eq(idx).text().trim();
let txtArr = [];
let txtShow = '';
let num = 0;
let timeOut = 0;
// <p />내용 Array로 저장
for (let i = 0; i < txt.length; i++) {
txtArr[i] = txt.slice(i, 1 + i);
}
... | true |
a39a6f41538380b4424e8fbe8e84c29f8d049537 | JavaScript | sabricalivar/mytinerarisabrinacalivar | /frontend/src/redux/reducers/citiesReducer.js | UTF-8 | 819 | 2.625 | 3 | [] | no_license | const citiesReducer =(state={allCities:[], selectCities:[], citySelected:{}}, action)=>{
switch(action.type){
case "GET_ALL_CITIES":
return {
...state,
allCities: action.payload,
selectCities: action.payload,
}
case 'GET_FILTERE... | true |
d918810562ea3b77c6075a1dccf7ba85b7ac6cff | JavaScript | oskarp/4ME104 | /JobFindr/src/js/Work.class.js | UTF-8 | 3,245 | 2.609375 | 3 | [] | no_license | var Work =
{
/*
START----------------------------------------------------------------------------
Name : Work.class.js
Version : 1.0
Author : Henrik Andersen
Mail : henrik.andersen@lnu.se
Date : xxxx-xx-xx
Time : xx:xx
DESCRIPTION-----------------------------------------------------------------------
... | true |
c7ab4b87929fd8b3d045f40a19fe21966c1a337c | JavaScript | Antarestai/Portafolioantares | /script/script.js | UTF-8 | 1,887 | 3.046875 | 3 | [] | no_license | // revelar al scrollear
window.addEventListener('scroll', reveal);
function reveal(){
var reveals = document.querySelectorAll('.reveal');
for(var i = 0; i < reveals.length; i++){
var windowheight = window.innerHeight;
var revealtop = reveals[i].getBoundingClientRect().top;
va... | true |
28c2828e225c4dc6f96704f03e1a996f1d938d6c | JavaScript | suhdev/sharepoint-yo-generator | /generators/app/configureprototypes.js | UTF-8 | 7,085 | 2.609375 | 3 | [
"MIT"
] | permissive | const fs = require('fs');
const path = require('path');
const addPrototype = require('./addprototype');
function readPrototypesRecursively(prototypeTemplatesDir, prototypes) {
if (fs.existsSync(prototypeTemplatesDir)) {
var files = fs.readdirSync(prototypeTemplatesDir);
var directories = [];
files = files... | true |
e13003346b6af43d59937e507fe90676606fcc64 | JavaScript | 2789143346/ideal-system | /src/assets/js/Change the viewport.js | UTF-8 | 571 | 2.65625 | 3 | [
"MIT"
] | permissive | var ometa=document.createElement('meta');
//固定的视口宽度,即设计图纸的宽度
var fixed=750;
//获取设备的宽度,在移动端中只可以用 window.screeen.width
var width=window.screen.width;
//视口宽度要缩放,放到设备中,求出缩放比例
var scale=width/fixed;
//设置meta的属性
var attr={
'name':'viewport',
//width=
'content':'width='+fixed+',initial-scale='+scale+',minimum-scale='+sc... | true |
bd84df4170ab49d4e84da0dbb2259d71b02469f4 | JavaScript | lancelee2885/Rithm-Coding-Challenge-Prework | /pick.js | UTF-8 | 227 | 3.265625 | 3 | [] | no_license | function pick(obj, arr){
// add whatever parameters you deem necessary - good luck!
let newObj = {};
for (i=0; i<arr.length; i++){
if (arr[i] in obj){
newObj[arr[i]] = obj[arr[i]];
}
}
return newObj;
} | true |
fe12f21c8169c2d9e778785f413ca322cc5d0f91 | JavaScript | malinichandran/react-groove | /client/src/playlists/AddPlaylist.js | UTF-8 | 4,621 | 2.53125 | 3 | [] | no_license | import React from "react";
import {useState, useContext} from "react";
import UserContext from "../auth/UserContext";
import Button from "react-bootstrap/Button";
import Alert from "../common/Alert";
import "./AddPlaylist.css";
import GrooveApi from "../api/api";
import { useHistory, useLocation } from "react-router-do... | true |
7f9e0ed0ff6dfe37b41604e5e72fe2a295bb323e | JavaScript | hpbuniat/csslint | /src/rules/ids.js | UTF-8 | 1,509 | 2.609375 | 3 | [
"MIT"
] | permissive | /*
* Rule: Don't use IDs for selectors.
*/
CSSLint.addRule({
//rule information
id: "ids",
name: "Disallow IDs in selectors",
desc: "Selectors should not contain IDs.",
browsers: "All",
//initialization
init: function(parser, reporter){
"use strict";
var rule = this;
... | true |
08a0661475787c6ac294ec580ed1b1613e265d4b | JavaScript | wdhif/codingame | /javascript/temp.js | UTF-8 | 2,052 | 3.125 | 3 | [
"Apache-2.0"
] | permissive | var inputs = readline().split(' ');
var nbFloors = parseInt(inputs[0]);
var width = parseInt(inputs[1]);
var nbRounds = parseInt(inputs[2]);
var exitFloor = parseInt(inputs[3]);
var exitPos = parseInt(inputs[4]);
var nbTotalClones = par... | true |
d3ed604a1425a88294991bd55d61abc2662f13d8 | JavaScript | damdeez/spendify | /webapp/src/helpers/helpers.test.js | UTF-8 | 3,286 | 2.703125 | 3 | [] | no_license | import {
calculateTotalValue,
validateUploadedData,
buildDataForChart
} from './helpers'
describe('calculateTotalValue function', () => {
it('Handles when nothing is passed into it', () => {
expect(calculateTotalValue()).toEqual(null)
})
it('Calculates the data and returns an object', () => {
cons... | true |
a8b9331468ba0e7e642be90f49df4518b1687b5f | JavaScript | hlawerd/nodejswpg | /js/index59.js | UTF-8 | 331 | 4.0625 | 4 | [] | no_license | let firstNumber = 30 ;
let secondNumber = 50 ;
if (firstNumber === secondNumber) {
console.log(`They are the same number`);
} else if (firstNumber > secondNumber) {
console.log(`\"${firstNumber}\" is bigger than \"${secondNumber}\"`);
} else {
console.log(`\"${secondNumber}\" is bigger than \"${firstNumbe... | true |
012686e84401520128fd3c0c30a8b06c9af2adb3 | JavaScript | siddhantsinha008/Portfolio | /src/components/Jokes.js | UTF-8 | 1,516 | 3.046875 | 3 | [] | no_license | import React ,{Component } from 'react';
export default class Jokes extends Component{
state={jokes:{},joke:[]};
componentDidMount(){
fetch('https://official-joke-api.appspot.com/random_joke')
.then(response=>response.json())
.then(json=>this.setState({jokes: json}))
.catch(... | true |
b358fc6d925e14c94bda02578e6e0a5bcb09adcd | JavaScript | John-Iracheta/testproject | /tests/createAccount_happy.js | UTF-8 | 3,044 | 3.015625 | 3 | [] | no_license | /**
This test will create a new account, purchse a course, fill out the user profile, sign the contract
and be ready to begin the LUII course.
*/
var CreateAccount = require('../lib/createAccount.page')
var Profile = require('../lib/profile.page')
var ChallengeQuestion = require('../lib/challengeQuestion.page')... | true |
d4ad13c193681321aa4be9dd5524498cbf8d5cb9 | JavaScript | linonetwo/hyper-visual | /src/search/history.js | UTF-8 | 1,884 | 2.828125 | 3 | [
"MIT"
] | permissive | // @flow
import { exec } from 'child_process';
import fs from 'fs';
import fuzzysearch from 'fuzzysearch';
import { flatten, zip } from 'lodash';
import path from 'path';
/**
* returns 500 recent history in an array
* TODO: get remote history when ssh to a server using child_process.exec
*/
async function readHisto... | true |
8378fd4e50db15a8959b41c88e1312667d6f5194 | JavaScript | MaddieYoung/alarmed | /www/js/script.js | UTF-8 | 4,393 | 2.875 | 3 | [] | no_license | //billemeyer.k@gmail.com
$(document).ready(function() {
//PREVENT DRAGGING
document.addEventListener('touchmove', function(e) { e.preventDefault(); }, false);
// Get Canvas & Context
var canvas = document.getElementById('clockCanvas');
window.ctx = canva... | true |
b8c50b950da7b20a7eaae3fed2636336fcbfb553 | JavaScript | Jessiehongtran/to_amp | /src/App.js | UTF-8 | 7,993 | 2.6875 | 3 | [] | no_license | import React from 'react';
import axios from 'axios';
import { API_URL } from './apiConfig';
import './App.css';
class App extends React.Component {
constructor(props){
super(props);
this.state = {
todo: [],
doing: [],
done: [],
task: "",
team: "programming"
}
}
compone... | true |
cf4af678154a892bd464e95000b619bedcea21ad | JavaScript | SirenHound/Leaflet.Polycurve | /L.Polycurve.js | UTF-8 | 5,855 | 2.859375 | 3 | [] | no_license | /** @typedef instruction
* @property {string} instr - M L H V C S Q T A Zz
* @property {L.LatLng} [latlng] - The only instructions that don't use this are 'H V Z'
* @property {Array.<L.LatLng>} [controls] - Control points for C S Q, array length 2 for C, 1 for S and Q
* @property {number} [lat] - V
* @property {number}... | true |
dae8641f51446c8ad085f27eb4ec100b956e4986 | JavaScript | alfieindesigns/afn-custominputfile | /js/afn-custominputfile.js | UTF-8 | 1,065 | 2.515625 | 3 | [
"MIT"
] | permissive | /**
* ----------------------------------------------------------------------------------
* jQuery customfileinput plugin
* Author: Alfie Nollora, alfienollora@yahoo.com
* Copyright (c) 2013 alfieindesigns
* licensed under MIT (alfieindesigns.com/code/afn-custominputfile/mit-license.txt)
* ------------------------... | true |
809d6e5c8320a5a8a9ad0ed0d1e346342e431134 | JavaScript | dnlsndbrg/school-crud-group-project | /model/MemberRegistry.js | UTF-8 | 1,133 | 2.78125 | 3 | [] | no_license | "use strict";
const memberDAL = require("../dal/member");
const boatDAL = require("../dal/boat");
const Member = require("./Member")
const Promise = require("promise");
class MemberRegistry {
constructor() {
this.members = [];
}
getAll() {
return memberDAL.fetchAll()
.then(membe... | true |
2cdcb5de8edeb54a43c7a29338419ff88234ac17 | JavaScript | zhiji6/mih | /MBS/src/main/webapp/assets/js/control/mss-calendar/CellData.js | UTF-8 | 976 | 2.6875 | 3 | [] | no_license | /**
* @constructor
* @inherit UIComponent
* @param
*/
function CellData(a) {
a || (a = {});
CellData.superclass_.constructor.apply(this, arguments);
this.dateTime = a.dateTime;
this.isEditable = a.isEditable;
};
Util.inherit(CellData, EventDriven);
CellData.prototype.getDateString = function(){
ret... | true |
7daf4d6b2b96d2e5bc203dcdd04db26f7f300fef | JavaScript | reflash/tiles-board-game | /src/services/board.js | UTF-8 | 1,608 | 3.640625 | 4 | [] | no_license | let repeat = (fn, n) =>
Array(n)
.fill(0)
.map(fn);
let rand = m => () => Math.floor(Math.random() * m + 1);
let generate = (n, m) => repeat(() => repeat(rand(m), n), n);
// Used the flood fill algorithm https://en.wikipedia.org/wiki/Flood_fill
let floodFill = (board, n, m, target_color, replacement_color) =... | true |
e8e91026903923330453351b57353df348868fb3 | JavaScript | tonyajay/hackathon | /src/pages/Review.js | UTF-8 | 3,871 | 2.625 | 3 | [] | no_license | import React from "react";
import { CollegeContext } from "../context/colleges";
import { CourseContext } from "../context/courses";
import { UserContext } from "../context/user";
import submitReview from "../strapi/submitReview";
import { useHistory } from "react-router-dom";
export default function Review() {
cons... | true |
3b9ba0e2768b580c4d93d04534a0a6d9962abe36 | JavaScript | rtruneh/nashville-201 | /class-08/review/app.js | UTF-8 | 2,910 | 3.65625 | 4 | [
"MIT"
] | permissive | 'use strict';
// Store Constructor
// what methods?
// Identify store locations
// Have a list of store hours
// Display that sales data in a table
// head row for column headings
// footer row for aggregate
// rows for each store that we have made
var allStores = [];
var hours = 14;
function CookieStore(name, mi... | true |