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
212f28da52ee1398456cec147dce9c11d3458678
JavaScript
Aadishshele/Angry-birds-constrained-bodies-
/Slingshot.js
UTF-8
1,454
2.625
3
[]
no_license
class Slingshot{ constructor(BodyA,pointB){ var options={ bodyA : BodyA, pointB : pointB, length : 0, stiffness : 0.01 } this.slingImage1 = loadImage("sprites/sling1.png") this.slingImage2 = loadImage("sprites/sling2.png") ...
true
31029688df8e678e120b0256a23cf66b18b00e3c
JavaScript
ebby89/Grocery-List
/js/scripts.js
UTF-8
761
3.40625
3
[]
no_license
$(document).ready(function(){ $("#groceries").submit(function(event){ var groceries = ["one", "two", "three", "four"]; var newGroceries = []; groceries.forEach(function(grocery) { var groceryInput = $("input#" + grocery).val(); newGroceries.push(groceryInput); }); newGroceries.sort()...
true
990be76171108e1b9f3b872f47edb452ac2f00bc
JavaScript
Mukeshnitp4u/Weather
/Src/Utils/index.js
UTF-8
897
3.40625
3
[]
no_license
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; const number = 1000 export const getDay = (timeStamp) => { const tSDetail = new Date(timeStamp * number); const day = tSDetail.getDay() return days[day] } export const getDate = (timeStamp) => { const tSDetail...
true
c9fbb3b9b2c9f86aa84b7a0f44505678776e26fd
JavaScript
DaniBilkis/clinical-trial-search
/server/modules/users.js
UTF-8
2,404
2.703125
3
[]
no_license
var mongoose = require( 'mongoose' ); var crypto = require('crypto'); var jwt = require('jsonwebtoken'); var userSchema = new mongoose.Schema({ email: { type: String, unique: true, required: true }, name: { type: String, required: true }, hash: String, salt: String }); userSchema.metho...
true
cd580e3250921918c797a3f3b78fc72e750a6f9e
JavaScript
definitinifed/dummy-rest-server
/api/appointment.js
UTF-8
2,976
2.546875
3
[ "MIT" ]
permissive
const express = require('express'); const router = express.Router(); const appointment = require('../repository/dummy-repository')('appointment'); module.exports = router; /** * @swagger * * definitions: * appointment: * type: object * required: * - startTime * - endTime * propertie...
true
daca81ca960de484cd16c11d4d71baa34df8d197
JavaScript
MBenBader/react-project
/src-old/store/reducers/country.js
UTF-8
636
2.84375
3
[]
no_license
const initial_states = { countries: [], regions: [], filter: "" } const countryReducer = (state = initial_states, action) => { switch (action.type) { case "SET_COUNTRIES": return { ...state, countries: action.payload } case "SET_REG...
true
cc7ea89e0fdd2bb9381d6f3c82356420725b5e70
JavaScript
britg/Node
/Assets/Scripts/Level/NodeManager.js
UTF-8
1,834
2.515625
3
[]
no_license
#pragma strict var gridCamera : Camera; var stream : StreamManager; private var node : GameObject; private var downPos : Vector3; private var upPos : Vector3; private var moveThreshold : float; private var gridStart : float = 480.0; function Start () { } function Update () { DetectInput(); } function DetectInput...
true
1294bb4e427dddb211094df137f2e1328197b3a3
JavaScript
SoftwareIntrospectre/Halloween-Hacktoberfest
/js/names.js
UTF-8
1,466
3.515625
4
[]
no_license
function readFile(file) { var f = new XMLHttpRequest(); f.open("GET", file, false); f.onreadystatechange = function () { if(f.readyState === 4) { if(f.status === 200 || f.status == 0) { allNames = f.responseText; } } } f.send(null); } readFile('names.txt'); var allNames = allName...
true
f2c5a44b6c7bd6030fba7da18bf2d1b48834789d
JavaScript
ThomasCms/CodewarsPHP-SQL-JS
/src/JS/4kyu/Snail.js
UTF-8
549
3.484375
3
[ "Unlicense" ]
permissive
snail = function(array) { let result; while (array.length) { // Steal the first row. result = (result ? result.concat(array.shift()) : array.shift()); // Steal the right items. for (let i = 0; i < array.length; i++) result.push(array[i].pop()); // Steal the bo...
true
852d023548587df6028a6eefd22de0dba8d1bb60
JavaScript
Eckersleyful/softwaretesting
/tests/clamp.test.js
UTF-8
665
2.609375
3
[]
no_license
import clamp from '../repototest/COMP.SE.200-2020-assignment/src/clamp.js'; import pkg from "chai"; const { expect, assert } = pkg; describe('clamp', function(){ describe(`#Clamps number within the inclusive lower and upper bounds.`, function(){ it("Try lower bound clamp", function(){ ...
true
8783fa7b960daf551dcc3aef5a9e09a15aa04da4
JavaScript
GeneralYouri/project-euler
/src/19/solution.js
UTF-8
1,574
3.53125
4
[ "MIT" ]
permissive
const isLeapYear = year => year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']; const monthLengths = [ [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], // normal year [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, ...
true
07f27403da19cdc6f43cc1deeeccdf3fcd9edc0e
JavaScript
gustavnikolaj/async-main-wrap
/examples/simple/add10.spec.js
UTF-8
732
3.015625
3
[ "ISC" ]
permissive
const add10 = require("./"); const expect = require("unexpected"); it("should add 10 to 1", () => { return expect(add10(1), "to be fulfilled with", 11); }); it("should add 10 to 11", () => { return expect(add10(11), "to be fulfilled with", 21); }); it("should add 10 to -1", () => { return expect(add10(-1), "to...
true
26e2f3857ec1512a5e6ed46ecdb8edead57c2eb1
JavaScript
MakerMacAttack/nurse-line
/client/src/components/PostCreate/PostCreate.jsx
UTF-8
1,578
2.546875
3
[]
no_license
import React, { useState } from "react"; import "./PostCreate.css"; import { createPost } from "../../services/Posts"; import { useHistory } from "react-router-dom"; const PostCreate = (props) => { const [post, setPost] = useState({ user: props.user, content: "", imgURL: "", }); let history = useHis...
true
665989cd31454b946b47d6c05d2f1b271303da8c
JavaScript
kkevin7/ci_fetch
/ensayo/assets/js/cancion.js
UTF-8
2,584
2.90625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
window.addEventListener('load', listener); url="http://localhost/ci_fetch/ensayo/cancion/"; function listener(){ recargar_tbody(); document.getElementById('btn-add').addEventListener('click', post); document.getElementById('btn-edit').addEventListener('click', post); document.getElementById('btn-cancel...
true
2b9689b88861fc1d1dbafbdb023e80395e45ab36
JavaScript
robert294-lab/warsztat_piekna
/warsztat_piekna/js/dotsGrid.js
UTF-8
344
3.015625
3
[]
no_license
const generateDots = () => { const dotHTML = '<div class="dotsGrid__dot"></div>'; const dotsGridHTML = []; for(let i=0; i<16; i++) { dotsGridHTML.push(dotHTML) } const grids = document.querySelectorAll('.dotsGrid'); grids.forEach(grid => { grid.innerHTML = dotsGridHTML.join('') ...
true
5aff352077d3f7795be1f7cffb1de10ac7e8e0f9
JavaScript
codefellows/seattle-102n51
/class-06/demo-class-project/js/ask-preference.js
UTF-8
318
3.359375
3
[]
no_license
var preference = prompt('Would you like a pickles or beets?') var message; if (preference === 'pickles'){ message = 'Pickles are Great!'; } else if (preference === 'beets'){ message = 'Beets are $$$!'; } else { message = 'Ok that\'s cool -don\'t answer correctly!'; } document.write('<h3>' + message + '</h3>')
true
bdd46ece2354c158bb1ed5059ba4c8395cc29b6c
JavaScript
jahpd/sussurro
/bin/www
UTF-8
1,439
2.6875
3
[]
no_license
#!~/.nvm/versions/node/v4.2.2/bin/node var app, chalk, debug, http, normalizePort, port, server; app = require('../dist/build'); debug = require('debug')('sussurro:server'); http = require('http'); chalk = require('chalk'); console.log(chalk.yellow("==> Sussurro server libraries loaded")); /* Get port from envi...
true
e30adb2a6fc8555488cddfe90f3ce68181f11549
JavaScript
ShivrajRath/JiveDiscussionQsExtractor
/server_old.js
UTF-8
5,240
2.5625
3
[]
no_license
/** * Modules for this project */ var express = require('express'), path = require('path'), cheerio = require('cheerio'); var app = express(); var jive = require('./app/jiveCaller'); // Excel export utility var nodeExcel = require('excel-export'); var config = require('./app/config.json')[app.get('env')]; ...
true
16933587dd610ec4bbaf0a947f2069a8dc8254b3
JavaScript
muhammadameensheikh/palindrome-checker
/script.js
UTF-8
880
3.765625
4
[]
no_license
var txtDis = document.getElementsByClassName('txt'); //function to check if string is a palindrome function palChecker(str){ var strLength = str.length; for(var i = 0; i < strLength / 2; i++){ if(str[i] != str[strLength - 1 - i]){ return txtDis[0].innerHTML='The text is not a Palindrome' ...
true
b24afc9f3343fa91e51c2aafaae15e4196166f77
JavaScript
jandos0492/Anario-js-problems
/Recursion/sum-of-digits-digital-root.js
UTF-8
176
2.8125
3
[]
no_license
'use strict'; function digital_root(n) { if ((n <= 9)) { return n } else { return digital_root(n.toString().split("").reduce((a, b) => { return a + +b; }, 0)) } }
true
a72e326f093d302f89355f61b48318b8fa75dff2
JavaScript
chifeanyi/schoolreg
/index.js
UTF-8
637
3.171875
3
[]
no_license
var myname = prompt ("What is your name : "); alert("Hello! " + myname + " Welcome to the official page of Ifeanyi Chukwujeme University"); function validateForm() { var x = document.forms["myForm"]["password1"].value; var y = document.forms["myForm"]["password2"].value; if (x==y) { alert ("Student ac...
true
c7710263d200461a4b8bce97413a3178e92cfd83
JavaScript
skaipio/webgl2_blackhole
/index.js
UTF-8
3,784
3.046875
3
[ "MIT" ]
permissive
const INITIAL_VALUES = { particleCount: 50000, particleSize: 2, speed: 0.5, gravitationalConstant: 10.0 } function ParamHandler(particleEmitter) { const paramsForm = document.getElementById("params-form"); const particleCountParam = document.getElementById("particle-count-param"); const particleSizeParam...
true
564f5ec9b4d884a11b41e8c4435ded8503612497
JavaScript
samsaksfithian/eloquent-javascript-exercises
/ch5_HOF/5-3_Everything.js
UTF-8
1,234
5.03125
5
[]
no_license
/* Analogous to the some method, arrays also have an every method. This one returns true when the given function returns true for every element in the array. In a way, some is a version of the || operator that acts on arrays, and every is like the && operator. Implement every as a function that takes an array and a...
true
90ab2aca3bd690308b24980a932b22c94e7a71bc
JavaScript
MazanaWB/Week-4-Homework
/script_2.js
UTF-8
3,391
3.25
3
[]
no_license
$(document).ready(function() { //define variables for each question // var questionOne = document.getElementById("quiz"); // var startButton = document.getElementById("start"); // var resultsContainer = document.getElementById("results"); // }); $( "#title" ).replaceWith( "Commonly used data types DO NOT i...
true
b4350e9fd06057b34498e3ed8c79e42ae69dde11
JavaScript
bleubidon/APP-G3A
/scripts/affichage_test_en_cours.js
UTF-8
2,389
2.640625
3
[]
no_license
window.onload = function () { var dps = []; var chart = new CanvasJS.Chart("chartContainer", { title: { text: "Test en cours" }, axisY: { includeZero: false }, data: [{ type: "line", dataPoints: dps }], optio...
true
f6b80e35d831d75ec7bdfd35d9a16b4e226577b8
JavaScript
guldun/Korganic
/Line.js
UTF-8
1,318
2.890625
3
[ "MIT" ]
permissive
/* * Korganic * * By Joshua Lawson - SphyrixNetworks * * ---------------- * * HTML5 Animation software built for use with KGE (Koron Game Engine) for building * 2D Animations and Menus for games built with KGE. For information about KGE * please visit http://www.kge.com.au for information about Korganic v...
true
888b4b932cb45735e4fe54ab13a7cb2fdf5152bb
JavaScript
marvinmvns/Fastrackgpsweb
/javascript/verificarStatusSinalGPS.js
UTF-8
1,376
2.703125
3
[]
no_license
var xmlhttpStatusGPS; function verificarStatusSinalGPS() { xmlhttpStatusGPS=GetXmlHttpObject(); if (xmlhttpStatusGPS==null) { alert ("Browser does not support HTTP Request"); return; } var url="menu_status_sinal_gps.php"; //url=url+"?imei="+imei; //url=url+"&sid="+Math.random(); xmlhttpStatusGPS.onrea...
true
61ed4c67135ca09ae5e2a63d25336891bc9266bd
JavaScript
moshiurr/to-do-V1
/script.js
UTF-8
7,592
3.46875
3
[]
no_license
//selectors const todoInput = document.querySelector(".todo-input"); const todoBtn = document.querySelector(".todo-btn"); const todoList = document.querySelector(".todo-list"); const filterTodos = document.querySelector('.filter-todos'); //evernt listeners document.addEventListener('DOMContentLoaded', retrieveFromLoc...
true
29a2975d8f217f73aedf12a42e09dc4a03285cb4
JavaScript
kononencheg/Photo-Cake
/application/model/records/recipe.js
UTF-8
1,690
2.734375
3
[]
no_license
/** * @extends {tuna.model.Record} * @param {!*=} opt_rawData Исходные данные экземпляра. * @constructor */ var Recipe = function(opt_rawData) { /** * * @type {string} */ this.name = ''; /** * * @type {string} */ this.desc = ''; /** * * @type {string} ...
true
00c4da1bc48cbdcc24f203e8cff610a99f8205ce
JavaScript
apquion/Tic-Tac-Toe
/src/index.js
UTF-8
6,709
3.21875
3
[]
no_license
import React from 'react' import ReactDOM from 'react-dom' import './index.css' function Square(props) { return ( <button className={props.className} onClick={props.onClick}> {props.value} </button> ); } class Board extends React.Component { /*Board is passed squares as slice */...
true
0ae2fdf2aff5d54fc02ea0882ee1bd03931c4ac7
JavaScript
gshokanov/pirple-node-homework1
/index.js
UTF-8
981
2.6875
3
[]
no_license
const http = require('http'); const server = http.createServer((req, res) => { handleRequests(req, res); }); server.listen(3000, () => { console.log('Server is listening on port 3000'); }); function handleRequests(req, res) { const method = req.method.toUpperCase(); const trimmedPath = req.url.replace(/^\/+|...
true
72d99edb1849bf767cf18a205b434cb98c4a6278
JavaScript
gantushig21/gantushig21.github.io
/w2d2/prob7.js
UTF-8
494
4.40625
4
[]
no_license
// In the definition of add() shown in question 6, identify the "free" variable. In the context of a function closure, // what is a "free" variable? // var add = (function(){ // let counter = 0; // return function() { // return counter =+ 1; // } // })(); // ####### Answer ######### // cou...
true
8d6897d066d9217fbd769f78d301b3d1bcd21ba4
JavaScript
LCHBook/simple-todo
/connectors/utils.js
UTF-8
1,546
2.65625
3
[]
no_license
/******************************************************* * big-todo * utilities * January 2015 * Mike Amundsen (@mamund) * Soundtrack : Keith Jarrett Charlie Haden "Last Dance" *******************************************************/ var fs = require('fs'); var folder = process.cwd()+'/files/'; exports.errorRe...
true
ec0518eeca737b5764254473643d9949127741ab
JavaScript
diogoyaguas/FEUP-LAIG
/Second Project/scenes/primitives/MyPatch.js
UTF-8
1,538
3.09375
3
[]
no_license
/** * Patch * @constructor */ /** * Creates a patch * * @class Patch * @extends {CGFobject} */ class Patch extends CGFobject { /** * Creates an instance of Patch. * @param {any} scene * @param {any} npointsU * @param {any} npointsV * @param {any} npartsU * @param {any} n...
true
6a659d7e6e70e4f252efd5218509a42035475ea3
JavaScript
Chrispykins/Music-Generation
/main.js
UTF-8
1,583
2.609375
3
[]
no_license
(function(global) { var sheetMusic; var notes; //string holding the id of the div where the sheet music is rendered var DOMstring= 'music'; var composer= new global.Composer({timeSig: [4, 4]}); global.composer= composer; function generateMusic() { var AbcString= ""; AbcString+= "L:1/" + composer.timeS...
true
e4661f8f94dea4e5dc1f8dc92c7624d26d863d1e
JavaScript
aoobao/g_demo
/canvas_image_load/src/js/ImageRender.js
UTF-8
2,397
2.984375
3
[]
no_license
let windowHeight = document.body.clientHeight * 0.8; let windowWidth = document.body.clientWidth * 0.8; let windowScale = windowHeight / windowWidth; export default img => { let height, width, canvas, ctx, dataArr, clearCount; let h = img.height; let w = img.width; let scale = h / w; if (windowScale > scale) ...
true
b32eefec8ae4255b86e0e52990af8e337f99cf11
JavaScript
grodrigues-dev/Tabelas-com-javascript
/js/app/models/Jogador.js
UTF-8
1,684
3.390625
3
[]
no_license
class Jogador { constructor (nome, gols, assistencias, finalizacoes, passes, impedimentos){ this._nome = nome; this._gols = gols; this._assistencias = assistencias; this._finalizacoes = finalizacoes; this._passes = passes; this._impedimentos = impedimentos; ...
true
3f20b2a41a0b6a1e9c1499ce71d984e40a45796c
JavaScript
WatchItTeam/WatchIt
/src/containers/AddToListBtn.js
UTF-8
4,432
2.53125
3
[ "MIT" ]
permissive
import React, { Component, Fragment } from "react"; import PropTypes from "prop-types"; import FontAwesomeIcon from "@fortawesome/react-fontawesome"; import { auth } from "../Firebase/firebase"; import { addToList, fetchOneFromList, updateWatchStatus, removeFromList, } from "../Firebase/lists"; import { success...
true
f96531bf8c228f52dd68a289e14c7e155b4e2591
JavaScript
danielalfb/gama-academy-ecommerce-tools
/desafio2/src/js/script.js
UTF-8
5,745
3.375
3
[]
no_license
let products = []; let format = { minimumFractionDigits: 2, style: 'currency', currency: 'BRL', }; let total = 0; let totalStock = 0; let averageTicket = 0; function fetchJson(url) { return fetch(url).then((ans) => { return ans.json(); }); } function showHTML(id, message, result) { let idName = docume...
true
1fa6804a97f8388a09ac40bab2cee59fbb1c61d2
JavaScript
martinhauke/stimulus-bridge
/test/util/get-stimulus-comment-options.test.js
UTF-8
1,605
2.625
3
[]
no_license
/* * This file is part of the Symfony Webpack Encore package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ 'use strict'; const getStimulusCommentOptions = require('../../dist/util/...
true
3ded3f81606c0f15dea351e00cb5965051ab6e71
JavaScript
web-driverify/web-driverify
/src/proxy/assets/drivers/document-handling.js
UTF-8
1,620
2.765625
3
[ "MIT" ]
permissive
import wd from '../utils/wd.js' import Promise from 'es6-promise' import element from '../utils/element' import { forEach } from 'lodash' wd.handlers.ExecuteScript = function (script, args) { // eslint-disable-next-line no-new-func let fn = new Function(script) args = convertArgs(args) let res = convertResults...
true
d9af1bbc4f2b0d3d02ad6e3e6faf433ce5536235
JavaScript
bcerc/pinto-rally-racer
/src/core/Decorators.js
UTF-8
2,086
2.6875
3
[]
no_license
function Template (name) { return $('#' + name + '-template').content.cloneNode(true); } function Templatable (o,templateName) { o.el = el('div'); o.el.classList.add(templateName); o.el.appendChild(Template([templateName])); } function Collectable (o,type) { if (!o.collections) o.collections = {}; o.colle...
true
0ee58cdb37ec8c062df87fef80a450f5344f66e0
JavaScript
melmsie/nekos.life
/commands/hug.js
UTF-8
699
2.671875
3
[ "Apache-2.0" ]
permissive
/** * Created by Tom on 7/29/2017. */ exports.run = async (client, message,args) => { if (args < 1) return message.reply(" :x: O.o you wanna hug yourself??"); let stats = await client.getStats(); stats.hug++; client.saveStats(stats); await client.snekfetch.get('https://nekos.life/api/hug')...
true
84965c66e9697689ef560bf264d37dc3d9d699bb
JavaScript
ThaisOliveiraRocha/server-livraria
/src/routes/routes.js
UTF-8
4,803
2.53125
3
[]
no_license
//rotas para GET, POST, UPDATE, DELETE module.exports = app => { const { listAllProducts, insertProduct, insertUser, listUser, deleteUser } = require("../config/db"); const { check, validationResult } = require("express-validator/check"); const express = require("express"); app.use(express.json()); app.get(...
true
89d618d7bba1a8a785c9397997f4fb39d35d15fa
JavaScript
beckinfonet/node-app
/index.js
UTF-8
742
2.65625
3
[]
no_license
const http = require("http"); // BUILT-IN HTTP MODULE (1) const express = require("express"); const app = express(); // const app = require("./app"); const port = process.env.PORT || 3000; const server = http.createServer(app); //CREATE A SERVER (2) const productEndpoints = require("./api/routes/products"); app.use(...
true
83026a2f0df695f025555234e8bbef0e2c43a83e
JavaScript
k1mtap/SkillerApp
/src/main/resources/public/javascript/profile.js
UTF-8
309
3.03125
3
[]
no_license
var tableContainer = document.getElementById("skillTable"); var skills = tableContainer.getElementsByTagName("tr"); for (var i = 0; i < skills.length; i++) { if (i <= 2) { skills[i].classList.add("highlight"); } else { skills[i].classList.add("fourthSkill"); break; } }
true
1f7b84c2f09547366838b8544778780a7e74d1ef
JavaScript
djonibourscheid/mini-projetos
/carousel/script.js
UTF-8
662
3.015625
3
[ "MIT" ]
permissive
window.addEventListener("load", () => { const images = document.querySelector(".images"); let counter = 0; let widthImage = document.querySelector(".images img").width; window.addEventListener("resize", () => { widthImage = document.querySelector(".images img").width; }) // Alternate image funct...
true
03c22ba6231e3362141cb233deac30ad6d19e0e6
JavaScript
zenvercoder/playground
/ajax/main.js
UTF-8
638
2.921875
3
[]
no_license
/** * Created by lisa on 7/21/16. */ $(document).ready(function(){ //notice the "." dot in front of ajax $.ajax({ //in a normal object, you don't need it to be in quotes, in a json object, the url does need to be in quotes because of all of those other languages "url": 'https://www.reddit.com/...
true
f4ed49db22813f5903fab760c68df2095e78ac33
JavaScript
Ashathkavi/order-booster-app-V1
/src/components/ManageFood/FoodListFilters.js
UTF-8
3,471
2.515625
3
[]
no_license
import React, {useState} from 'react' import {connect} from 'react-redux' import {setBoundryAmount, setCatTextFilter, setNameFilter, setSize} from '../../actions/foodFilters' import CategoryModal from '../ManageFood/CategoryModal' export const FoodListFilters = (props) => { // States to handle category MODAL ...
true
2cbcdbf5becd592c2862cbce813c2099fa651b62
JavaScript
GRASS-120/note-app-react-redux
/src/utils/calculateColor.js
UTF-8
111
2.9375
3
[]
no_license
export let calculateColor = (color) => { let style = { backgroundColor: `#${color}` } return style }
true
82ea5783b3d02b2b315e973907961905ab17b833
JavaScript
Misxiaoxiao/Study_Deme
/react-chat-room/src/reducer/chat/redux.js
UTF-8
1,959
2.578125
3
[]
no_license
import Types from './dispatch.type'; import io from 'socket.io-client'; const socket = io('ws://localhost:3000') const initialState = { chatmsg: [], users: {}, unread: 0 } export const chatReducer = (state = initialState, action) => { switch (action.type) { case Types.MSG_LIST: return { ...state, ch...
true
b78d46fee0d8e34caa120500a3b5b5235d5f5d25
JavaScript
nik123/rhino
/demo/javascript/react-app/base64.js
UTF-8
827
2.59375
3
[ "Apache-2.0", "LicenseRef-scancode-proprietary-license" ]
permissive
var fs = require("fs") source_directory = "./models" output_directory = "./src/picovoice" // Convert all WASM RHN binary model files to base64 strings; add a little JavaScript to export them let filenames = fs.readdirSync(source_directory) filenames.forEach(function (filename) { model = fs.readFileSync(`${source_di...
true
c5216a7f1539aae86ac26860295b6935257b0183
JavaScript
Dfishe16/jqueryHWeasy
/assets/javascript/game.js
UTF-8
1,821
3.546875
4
[]
no_license
$(document).ready(function() { //vars var wins = 0; var losses =0; var userNumber = 0; var diamondNumber = 0; var rubyNumber = 0; var emoraldNumber = 0; var crystalNumber = 0; var winningNumber = 0; //random nums function beginGame(){ winningNumber = Math.floor(Math.random() * 102) + 19; console.log("winningN...
true
9d44e15b09bf0579f5ab43acb161d173cfeedbd3
JavaScript
chrisedg87/BeanJS
/app/controllers/articles.server.controller.js
UTF-8
1,912
2.53125
3
[ "MIT" ]
permissive
'use strict'; /** * Module dependencies. */ var errorHandler = require('./errors.server.controller'), Article = require('../models/article.server.model'), _ = require('lodash'); /** * Create a Article */ exports.create = function(req, res) { var article = new Article(req.body); article.attributes.user_id = re...
true
352ece9ed0a70f2554d70df3e8f91dad90a2059d
JavaScript
ProjectB/ProjectB
/server/logic/Square.js
UTF-8
531
3.53125
4
[]
no_license
/************ SQUARE CLASS **********/ function Square(x,y,w,h) { this.pos = { x: x, y: y } this.size = { w: w, h: h } } Square.prototype = { lineWidth: 2, fillStyle: '#000000', strokeStyle: 'silver', init: function() { }, draw: function() { ctx.beginPath(); ctx.rect(this.pos.x, this.pos.y, ...
true
ea96a83d6b83d3ac3ce007ce6fdb1b99b903b903
JavaScript
13retonnian/list-stringer
/nouns-list.js
UTF-8
1,335
4.125
4
[]
no_license
const nouns = [ "bush", "shovel", "cave", "mouth", "shell", "tear", "razor", "nest", "pad", "fear", "prize", "power", "pocket", "cane", "pump", "mask", "junk", "kiss", "photo", "shower", "slide", "freedom" ]; // 1. Create a function `handleItem()` that accepts the (JS-create...
true
5ee5379bf5f89c19f4e7c6936199b3329b7f7eda
JavaScript
jaredbusta/api_crud-nodejs
/services/categories.services.js
UTF-8
651
2.703125
3
[]
no_license
const faker = require( 'faker'); const sequelize = require('../libs/sequelize'); class CategoriesService{ constructor(){ this.categories=[]; this.generar(); } generar(){ for(let i=0; i<15;i++){ this.categories.push({ id:faker.datatype.uuid(), ...
true
2e51eb5a603350123c9df98c9fd857ccf81b04af
JavaScript
g-ram84/lotide2
/test/tailTest.js
UTF-8
314
2.578125
3
[]
no_license
const tail = require("../tail"); const assert = require("chai").assert; describe("#tail", () => { it(`returns '[5, 6, 7]', from '[4, 5, 6, 7]`, () => { assert.deepEqual(tail([4, 5, 6, 7]), [5, 6, 7]); }); it(`returns '[2, 3]', from '[1, 2, 3]'`, () => { assert.deepEqual(tail([1, 2, 3]), [2, 3]); }); });
true
760d77c9b038652a208368ae7f7419a2d77e7f10
JavaScript
Bluestar123/cocoscreator
/ballSkip/assets/script/game.js
UTF-8
2,626
2.5625
3
[ "MIT" ]
permissive
cc.Class({ extends: cc.Component, properties: { ball_node: cc.Node, blockPrefab: cc.Prefab, blockBox: cc.Node, block_count: { type: cc.Integer, default: 3 }, scoreLabel: cc.Label }, // LIFE-CYCLE CALLBACKS: onLoad () { ...
true
d138ea680c6cac61a11efa5e28b0fff715471d91
JavaScript
green-fox-academy/EvaKulcsar
/week-04/day1/changeElements.js
UTF-8
384
3.59375
4
[]
no_license
'use strict'; // Hozz létre egy `numbers` változót az alábbi tartalommal: `[1, 2, 3, 8, 5, 6]` // Változtasd meg a 8-as számot 4-essé a map metódussal // Logold ki a 4. elemet const numbers = [1, 2, 3, 8, 5, 6]; let double = numbers.map(number=>{ if(number===8){ return number/2; } else { return numb...
true
a00cbd5171e9b620215de398f50c8c613dc8c6a5
JavaScript
carribus/clicker-game
/client/src/js/objects/polygon.js
UTF-8
2,345
3.015625
3
[ "MIT" ]
permissive
/** * Created by petermares on 19/03/2016. */ module.exports = Polygon; function Polygon(game, x, y, size, numberOfSides, fillColour, strokeColour, lineWidth) { this.backgroundColour = '#000000'; this.fillColour = fillColour || '#202050'; this.strokeColour = strokeColour || '#A0A0FF'; this.lineWidth...
true
987ca54070a6f7f1dae0d15010174c938b36c9e0
JavaScript
tuandungbrse/learn-rxjs
/src/ex19.mjs
UTF-8
985
3.234375
3
[ "MIT" ]
permissive
function() { var videos = [ { "id": 65432445, "title": "The Chamber" }, { "id": 675465, "title": "Fracture" }, { "id": 70111470, "title": "Die Hard" }, { "id": 654356453, "title": "Bad Boys" } ]; // Expecting this output... // [ // { // "65432445": "The Chamber", // ...
true
040a821777f2c6a5cd1fe2a776b23bfba3bfba0a
JavaScript
snaf-trip/water
/js/profiles-getOnload.js
UTF-8
1,541
3.109375
3
[]
no_license
const saveBtn = document.getElementById("save"); const editBtn = document.getElementById("edit"); var inputs = document.querySelectorAll("input"); var url = "http://localhost:3000/data"; function funonload() { sendRequest("GET", url).then(fillingData).catch(err => console.log(err)); } window.onload ...
true
6ef1bf338318f00082c4783cb04f69f4ea0931d9
JavaScript
r8ik/ZuoYe
/黑马优购/pages/index/index.js
UTF-8
5,009
2.6875
3
[ "MIT" ]
permissive
// js文件 // var sy;//记录手指的y坐标 Page({ /** * 页面的初始数据 */ data: { carouselList:[], navList:[], floordata:[], // desc: '',//刷新提示语 // hei: 0,//刷新view高度阈值 // scrolltop: 0,//scorll-view滑动离顶部的距离 // isindrag: false,//是否在下拉状态(必须要滑动到顶部才能触发) // scrollTop:0 }, /** * 生命周期函数--监听页面加载 ...
true
bd71d8a8418ec70b0e1b230caa9ef39b18234f81
JavaScript
ScarletSpace/test
/web/index.js
UTF-8
1,024
2.75
3
[]
no_license
$(document).ready(function () { var c = document.getElementById("canvas"); var context = c.getContext("2d"); // begin custom shape context.beginPath(); context.moveTo(170, 80); context.bezierCurveTo(130, 100, 130, 150, 230, 150); context.bezierCurveTo(250, 180, 320, 180, 340, 150); cont...
true
fb87dc0dc9c828fa65b7486c5bbf61978d68c1ac
JavaScript
jacobmartin1141/Project_Flashcards
/src/Layout/Home.js
UTF-8
1,804
2.765625
3
[]
no_license
import React, { useEffect, useState } from "react"; import { listDecks, listCards, deleteDeck, } from "../utils/api/index"; function DisplayDeck({deck, cards}) { const deleteHandler = () => { if(window.confirm("Delete this deck? You will not be able to recover it.")) { deleteD...
true
b0423d19353cbf6d999157034d7806e8fe0ff99e
JavaScript
royhanmardista/pixel-test
/javascipttest/sort.js
UTF-8
2,389
3.609375
4
[]
no_license
let numeric = [10, 9, 102, 66, 5421, 1, 0] let string = 'Wulan,Raharjo,Widya,Yuda,Cinta,Iskandar,Hidayat,Kusuma,Indah,Jusuf' let alphanumeric = 'Wulan,Raharjo,Widya,10,9,102,66,5421,1,0,Yuda,Cinta,Iskandar,Hidayat,Kusuma,Indah,Jusuf' let arrayAlphanumberic = ["Wulan", 1, 3, "Darto", "Cinta", "Cantik", "1makan", "000"] ...
true
bac1866553b0df0316d391019b1d53754c2dca36
JavaScript
cntt2-lydoan/devC_ex_redux
/src/redux/Reducers.js
UTF-8
1,633
2.703125
3
[]
no_license
import { GET_EMPLOYEES_SUCCESS, DELETE_EMPLOYEES_SS, UPDATE_USER, GET_EDIT_ITEM, OPEN, CLOSE, IS_ADD } from './Constants'; const initialState = { employees: [], loading: false, editItem: {}, isShow: false, updateUser: {}, isAdd: false }; function rootReducer(state = initialState, action) { ...
true
bb3d8a948e1e84c808ccd0cc6bd5019a70ea23a9
JavaScript
benjaminW78/cutTheRope
/sources/js/main.js
UTF-8
6,247
2.59375
3
[]
no_license
//Fonctions de synchronisation d'affichage require(["var/game","class/Player","components/requestanimFrame","config/config","config/box2dConfig","controllers/GarbageCollector"] , function(game,Player,requestAnimFrame,config,box2dConfig,garbageCollector) { notif = document.getElementById('notif'); btnStart ...
true
79e7498dbbfd3434356292fa778f0a82f3ffdab6
JavaScript
sbangade/challenge
/src/components/App.js
UTF-8
6,850
2.5625
3
[]
no_license
import React, {Component} from 'react'; import image from '../img/vumbulaitem.png'; import {ItemCard} from "./ItemCard"; import {Footer} from "./Footer"; import {Nav} from "./Nav"; import {Jumbtron} from "./Jumbtron"; import {AddItem} from "./AddItem"; class App extends Component { state = { story: '', name:...
true
e67b137d779c7cd0b56e99eb373cf8c0114df8f9
JavaScript
AngSin/Node-React_IoT_Simulator
/src/components/Reading.js
UTF-8
2,267
2.546875
3
[]
no_license
import React, { Component } from 'react'; import axios from 'axios'; import { ROOT_URL } from '../constants/server'; export default class Reading extends Component { constructor(props) { super(props); this.state = { isLoading: false }; this.toggleActive = this.toggleActive.bind(this); } toggleActive...
true
53e20252734b0680d9d1d4bbf57f8f342a16020e
JavaScript
riebling/ARENA
/events.js
UTF-8
9,238
2.59375
3
[]
no_license
AFRAME.registerComponent('pose-listener', { tick() { // var newRotation = new THREE.Quaternion(); // var newPosition = new THREE.Vector3(); // this.el.object3D.getWorldQuaternion(newRotation); // this.el.object3D.getWorldPosition(newPosition); var newRotation = this.el.object3D.quaternion; var newPosition...
true
fac1b01fcc49999c67d353846df6eda971876d4e
JavaScript
thinkful-ei-gecko/smiti-shawn-event-listeners
/fizzbuzz/solution.js
UTF-8
1,343
3.75
4
[]
no_license
'use strict'; /** * @param {number} num * @returns {*} Will return 'fizzbuzz'/'buzz'/'fizz' or the number */ function fizzbuzz(num) { if (num % 15 === 0) return 'fizzbuzz'; if (num % 5 === 0) return 'buzz'; if (num % 3 === 0) return 'fizz'; return num; } /** * Builds the HTML for the FizzBuzz output * @p...
true
45130abc281703166b9cb899cf13264a59398e49
JavaScript
AleksandarBisevac/pp
/cas7_function/vezbe1/task3.js
UTF-8
351
4.21875
4
[]
no_license
// Write a program that checks if a given number is a three digit long number. function is3Digit(num) { var abs = num; if (num < 0) { abs *= -1; } if (abs / 100 > 1 && abs / 100 < 10) { return "Given number " + abs + " is three digit number"; } else return "Given number is not a three digit number"; ...
true
98dbacb155bef27150f42d71a8676ded88ee94db
JavaScript
azenui25/homework
/YOUR_JAVASCRIPT_HERE.js
UTF-8
1,775
3.53125
4
[]
no_license
// create hero object const hero = { name: 'Asanga', heroic: true, inventory: [], health: 10, weapon: { type: 'AK47', damage: 2 } } // game logic functions function rest(hero) { if (hero.health == 10) { alert('Asanga is healthy') } else { hero.health = 10 } return ...
true
9929b85472ba31202deeba96ae7d2f509888d32e
JavaScript
ChidinmaOrajiaku/HelloBooksProject
/Client/actions/getCategory.js
UTF-8
936
2.546875
3
[ "MIT" ]
permissive
import axios from 'axios'; import { GET_CATEGORY_SUCCESSFUL, GET_CATEGORY_FAILED } from './types'; /** * Get category response if successful * @export getCategoryResponse * * @param {object} response * * @returns {object} of category response when request is successful */ export function getCatego...
true
4c33e506f6039f55e7916198e31d9adf83a13c05
JavaScript
steenk/aoc2k16
/07/07a.js
UTF-8
575
2.890625
3
[]
no_license
const fs = require('fs'), re_oxy = /(.)(.)\2\1/; fs.readFile('07.data', (err, stream) => { var data = stream.toString(), count = 0; for (var line of data.split('\n')) { line = line.replace(/(.)\1{3,}/, 'ABCD'); var outside = line.split(/\[.+?\]/); inbracket = line.match(/\[.+?\]/g), pass = false, no...
true
3a6fc5561b2ace18c9e6d5670abcf2451e28bb21
JavaScript
netoabel/node-chat
/src/chat/lib/model/domain/userList.js
UTF-8
877
2.640625
3
[ "MIT" ]
permissive
'use strict'; var User = require('./user'); function UserList() { this._list = []; } UserList.prototype = { constructor: UserList, add: function (user) { if (user && user instanceof User) { this.remove({userId: user.getUserId()}); this._list.push(user); } }, remove: function (args) { ...
true
5ee2bc208915adad8bad4211701df1e7d3f99faf
JavaScript
johnphoward/NBA-Database-Project
/frontend/src/GameMenu.js
UTF-8
2,122
2.5625
3
[]
no_license
import React from 'react'; import _ from 'underscore'; import VerticalMenu from './VerticalMenu'; import UIUtilities from './UIUtilities'; /* Special implementation of VerticalMenu to carry out game selection */ class GameMenu extends VerticalMenu { constructor(props) { super(props); this.state = { ...
true
e7fcded085bd924eb63ad09511ba47e8cad8760f
JavaScript
MikaelaSheldt/my-first-module
/index.js
UTF-8
158
2.515625
3
[ "MIT" ]
permissive
module.exports = { hello: function (name) { console.log(`Hello, ${name}.`) }, goodbye: function (name) { console.log(`Goodbye, ${name}.`) } }
true
dae208e4bb1b78ad6e4d24781c45d5aa6438d69a
JavaScript
bitfocus/companion-module-aja-kipro
/src/variables.js
UTF-8
1,273
2.515625
3
[ "MIT" ]
permissive
module.exports = { initVariables() { let variables = [ {name: 'TimeCode Hours', variableId: 'TC_hours'}, {name: 'TimeCode Minutes', variableId: 'TC_min'}, {name: 'TimeCode Seconds', variableId: 'TC_sec'}, {name: 'TimeCode Frames', variableId: 'TC_frames'}, {name: 'Transport State', variableId...
true
76352a0f0cb4fed1d49352e255934942569fd159
JavaScript
jeremytenjo/iLandlord
/src/components/Main/Home/Income/_state/Income/index.js
UTF-8
1,619
2.703125
3
[]
no_license
import firebase from 'firebase' export default function(state = [], action) { let incomeIndex, newState switch (action.type) { case 'SET_INCOMES': //data profile // let Tenants = [ // { // "incomeId": 1, // "name": "Jeremy Tenjo", // "unit": 1, // "amount": 475, // "p...
true
b509debea3044d85b992e326ded1fa396eda472f
JavaScript
Krometen/WarehouseWebClient
/src/App/component/presentationalComponent/Table.js
UTF-8
1,988
2.609375
3
[]
no_license
import React from "react"; import ReactDOM from "react-dom"; import { Provider } from "react-redux"; import { store } from "../../../App/store/store"; /* * props: * headers: массив заголовков столбцов таблицы; * data: JSON данные; * renderOnClick: компонент, который будет рендериться при нажатии на запись таблицы;...
true
a5cb3d9c201ea65f39224e83c765148ce6ae5158
JavaScript
chrisik999/Book-Store-App-With-Nodejs
/src/controllers/authController.js
UTF-8
3,504
2.71875
3
[]
no_license
const User = require('../models/user'); const bcrypt = require('bcrypt'); const jwt = require('jsonwebtoken'); const secret = "verySecureSECRET"; const expiry = 3600; exports.registerNewUser = (req, res) => { //fetch user details from req body const user = req.body.user; //check if user exist User.fin...
true
24920b3325803f93f1dd914dd71fe8a7a85d2d68
JavaScript
15259742825/dangdang
/js/index.js
UTF-8
2,978
2.75
3
[ "MIT" ]
permissive
// 轮播 (function() { var i = 0; var LIWIDTH = 796; var DURATION = 500; var LICOUNT = 8; var ulImgs = document.getElementById("ul-imgs"); var ulIdxs = document.getElementById("ul-idxs"); var lis = ulIdxs.children; function moveTo(to) { if (to == undefined) { to = i +...
true
671b50a0071d94420fdebaaf5f7090f4dc26447b
JavaScript
PongponCrb/JSX2_grade
/jsx2_bmi/components/BMI.js
UTF-8
721
2.90625
3
[]
no_license
export default class BMI{ bmiCalculate(weight, height){ return weight / height**2; } bmiCheck(sum, region){ let temp; if(region == 'Asian'){ if(sum >= 29.9){ temp = 'Obesity'; }if(sum >= 24.9 && sum < 29.9){ temp = 'Overweight'; }if(sum >= 18.5 && sum < 24....
true
99ddcc98e29a1d473ca347c8043ec54c7e6cd4a0
JavaScript
a-silver-lining/ctyun-price
/pages/jscode/jscode.js
UTF-8
1,809
2.765625
3
[]
no_license
// pages/jscode/jscode.js Page({ /** * 页面的初始数据 */ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { //定义一个变量 var 变量名 = “值” var name = "zhangsan" //字符串 var abc = 100 //整型 var hello = 100.98 //浮点型 var arr = ["java","python","php","nodejs","javascript","c++"...
true
b471554975991af9741f6de7d36b5871044babff
JavaScript
ibrahimyolbir/Exercises-Avancerad-JS-med-ReactJS
/vecka-2/Övning - Räknare/reknare/src/App.js
UTF-8
2,447
2.765625
3
[]
no_license
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { constructor(props) { super(props); this.increment = this.increment.bind(this); this.decrement = this.decrement.bind(this); this.incrementAll = this.incrementAll.bind(this); t...
true
4fb0b9ae22605f04e2996740e10ea1f9cfb4a7f1
JavaScript
a382695908/H5P
/source/src/background/base/rotate.js
UTF-8
3,763
2.875
3
[]
no_license
function Rotate (canvas, isCut) { this._ISCUT = isCut; this._IMG = canvas.clone(); }; Rotate.prototype = { process: function(callback) { this._CALLBACK = callback; return this; }, rotate : function(deg){ //旋转参数 var oldSize = this._IMG.getSize().clone(), canvas = document.createElement('canvas')...
true
587e54e59d993e1f8845a9b7d0f8cea03ffbb05a
JavaScript
chanwutk/label-paper-supplemental-materials
/benchmarks/src/ProjectionVector.js
UTF-8
5,020
2.953125
3
[ "BSD-2-Clause" ]
permissive
/*eslint no-unused-vars: "warn"*/ function angledLine(x1, y1, x2, y2, vx, vy, particles) { var i, tmp; if (x1 > x2) { tmp = x1; x1 = x2; x2 = x1; tmp = y1; y1 = y2; y2 = tmp; } if (vx < 0) { vx = -vx; vy = -vy; } for (i = 0; x1 + (vx * i) < x2; i++) { particles.push([...
true
2f38f3ea48ba371cd87f8fa8cd86a87ca8d2eda3
JavaScript
shileima/my-promise
/promise.js
UTF-8
1,312
3.25
3
[]
no_license
const PENDING = 'PENDING'; const RESOLVED = 'RESOLVED'; const REJECTED = 'REJECTED'; class Promise { constructor(excutor) { this.status = PENDING; this.value = undefined; this.reason = undefined; this.resolveCallbacks = []; this.rejectCallbacks = []; let resolve = (...
true
df6187848b8844aa2f9dfd76a4b7d6c58d890418
JavaScript
kashishgupta1990/rxjs-learn
/mergeMap-example.js
UTF-8
867
3.453125
3
[]
no_license
let Rx = require('rxjs'); let Operators = require('rxjs/operators'); let counter = 1; const getData1 = (param) => { return Rx.of(`retrieved new data with param ${param}`).pipe( Operators.delay(1000) ) } const getData2 = (param) => { return Rx.of(`retrieved new data with param ${param}`).pipe( Operators....
true
64dd4567b5a1f09630cde550e55600b6f6059435
JavaScript
Proglang-TypeScript/tsd-generation-report
/code/run-time-information-gathering/simple-examples/input-value.js
UTF-8
61
2.5625
3
[ "CC0-1.0" ]
permissive
function foo(a, b) { return a + b; } foo("hello", "world");
true
b2466c5a09241e007c14857a55bb0fa033ebaed7
JavaScript
mohammadkharma/Javascript
/studies/advanced_js.js
UTF-8
2,196
4.125
4
[]
no_license
// REST PARAMETERS: function sUUm(a, b) { return a + b; } console.log( sUUm (10, 10, 30, 37, 3, 5, 7, 23, 60));; // 110 function sUUmAll(...args) { let sum = 0; for(let arg of args) sum += arg; return sum; } console.log(sUUmAll(1, 10)); // 11 console.log(sUUmAll(1, 10, 10)); // 21 console.log(sUUmAll...
true
8bfcbee150072042c33e9d9b65bab12c1097f180
JavaScript
obsidian-11/Firebase-Blog
/admin.js
UTF-8
3,036
2.859375
3
[]
no_license
const form = document.querySelector('.form'); db.collection('blog').get().then(snapshot => { snapshot.docs.forEach(doc => { // console.log(doc.data()); }); }); //UPLOAD DATA TO DB form.addEventListener('submit', e => { e.preventDefault(); if(form.title.value.trim() && form.conte...
true
d3e80ecdb1c1699b5e2fe99826c2b74ae027b921
JavaScript
kimthiendung90/rsuite
/src/AutoCompleteItem.js
UTF-8
1,525
2.5625
3
[ "MIT" ]
permissive
// @flow import * as React from 'react'; import classNames from 'classnames'; import { getUnhandledProps, defaultProps, prefix } from './utils'; type ItemDataType = { label: any, value: any }; type Props = { classPrefix?: string, itemData: ItemDataType, onSelect?: (itemData: ItemDataType, event: Synthetic...
true
1a4ed4a94409dabf7201d54a4ec9b3599cdfbafa
JavaScript
how2die/website
/src/scenes/steinsakspapir/SteinSaksPapir.js
UTF-8
3,605
2.609375
3
[]
no_license
import React from 'react'; import 'scenes/steinsakspapir/SteinSaksPapir.css'; class SteinSaksPapir extends React.Component { constructor() { super(); this.state = {}; } intervall = 800; spillKlart = true; velg(valg) { if (!this.spillKlart) { return; } ...
true
79a5d0bbef937e6a5aab306f64fff90a3bee70c3
JavaScript
alexpxmort/front-gameplay
/src/requests/api/api.js
UTF-8
904
2.609375
3
[]
no_license
/** *Arquivo com funções de requisição HTTP *para comunicar com back end en NodeJs */ import axios from 'axios' const request = { "URL":'http://localhost:4500/' } let api = axios.create({ baseURL: request.URL, withCredentials: false, headers: { 'Access-Control-Allow-Origin' : '*', 'Accept': ...
true
533f91d100ac0c8f74ffede06ff6d9d68f11659d
JavaScript
xlb233/react-cloud-music
/src/application/Recommend/store/actionCreaters.js
UTF-8
1,150
2.546875
3
[ "MIT" ]
permissive
// 具体的action在此处定义 import * as actionTypes from "./constants" // 引入各action类型 import {fromJS} from "immutable"; import {getBannerRequest, getRecommendRequest} from "../../../api/request"; // 引入request,以在数据发生改变时发送请求,获取回复以改变数据 export const changeBannerList = (data) => ({ // banner改变的action type: actionTypes.CHANGE_BAN...
true
b9a7d39fa958213133e5feb3b168c097138769b3
JavaScript
WillDunwoody/etch-sketch
/javaetch.js
UTF-8
1,152
3.421875
3
[]
no_license
//This is the function for creating a new sketchpad. function createPad(x){ for (var rows = 0; rows < x; rows++){ for (var cols = 0; cols < x; cols++){ $('#container').append('<div class = "grid"></div>'); }; }; $('.grid').height(600/x); $('.grid').width(600/x); $('.grid').css('float', 'left'); ...
true