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
e6fc2cbceaa7fd21aeccb82e03ea2cb9f7f4ebe8
JavaScript
jimobrien/data-structures
/sprint-two/src/graph.js
UTF-8
1,627
3.625
4
[]
no_license
var Graph = function(){ this.nodes = {}; }; Graph.prototype.addNode = function(newNode, toNode){ var nodeCount; var node = {}; node.value = newNode; node.edges = {}; this.nodes[newNode] = node; if (toNode) { this.addEdge(newNode, toNode); } nodeCount = 0; for (var key in this.nodes) { i...
true
5db9d6bb14151014de261edbe2a3e7f2b79f46cc
JavaScript
olegpisklov/leetcode
/leetcode/medium/Candy Crush 1D/index.js
UTF-8
1,986
4.15625
4
[]
no_license
// recursive approach const main = (str) => { let stable = true; let start = 0; let end = 0; for (let i = 0; i < str.length; ++i) { if (stable && str[i] === str[i + 1] && str[i] === str[i + 2]) { stable = false; start = i; } else if (!stable && str[i] !== str[...
true
ab6dc41918071ca03e02496ff5df84152820c045
JavaScript
BrunoMarini/oJogo
/scripts/Banco.js
UTF-8
4,022
2.546875
3
[]
no_license
//Constantes Base de Dados const MongoClient = require('mongodb').MongoClient; const assert = require('assert'); const fs = require('fs'); const path = require('path'); function fetchFile(filename) { return path.join(__dirname + filename); } let mongourl = ""; if (process.env.mongourl == undefined) { var authdata...
true
c904a2fb91f34ba403bd38cd17ef81c007708647
JavaScript
predatorfromekb/javascript-task-2
/phone-book.js
UTF-8
3,773
3.265625
3
[]
no_license
'use strict'; /** * Сделано задание на звездочку * Реализован метод importFromCsv */ const isStar = true; /** * Телефонная книга */ let phoneBook = []; function buildPhoneBookRecord(phone, name, email) { return { phone: phone, name: name, email: email }; } function findIndexOfPh...
true
8f80da81f93084024dfa9f4e18b1b925abd948fd
JavaScript
ukates/TwilioJavaScriptFiles
/ducktypium.js
UTF-8
1,684
4.1875
4
[]
no_license
// JavaScript source code class Ducktypium { calibrationSequence = new Array(0); color = ''; constructor(color) { if ((color == 'red') || (color == 'yellow') || (color == 'blue')) { this.color = color; } else { throw new Error("Wrong Color"); } }...
true
0ae2788aedcf485e09b36f2a21ddde02c5553bad
JavaScript
Oyxing/yixiexampp
/nodejs/mongodb/dome/02.查询数据库.js
UTF-8
833
2.515625
3
[]
no_license
const MongoClient = require('mongodb').MongoClient; //noinspection JSAnnotator let url = "mongodb://localhost:27017/yxmysql"; //数据库名 yxmysql //noinspection JSAnnotator let ObjectId = require('mongodb').ObjectID; // 连接数据库 MongoClient.connect(url, function(err, db) { if (err) { console.log("数据库连接失败"); ...
true
0e1a418f9b00e4be70f5f813438b7bdddf769658
JavaScript
AsminBudha/todo
/src/hoc/WithAdd.js
UTF-8
1,544
2.625
3
[]
no_license
import React from 'react'; import InputBar from '../components/InputBar'; import AppConstants from '../constants/common'; /** * HOC with Add feature having UI input field and button. * * @param {Object<React.Component>} Component */ const withAdd = (Component) => { return class extends React.Component { /...
true
074eb76e33530e985db840a1d14d197b53d7fab7
JavaScript
siddarthkanted/easyShoppingChromeExtension
/popup.js
UTF-8
1,480
2.6875
3
[]
no_license
function openTabs(){ var productName = document.getElementById("productNameText").value; var urlArray = urls(productName); urlOpener(urlArray); } function urlOpener(urlArray){ for (var count in urlArray) { chrome.tabs.create({url: urlArray[count], "active":true}); } } String.format = function() { var s =...
true
556dad31704c832353c2472ee2c863fa1f7d5d6f
JavaScript
riolly/hacktiv8
/Week-3/live-code/2.js
UTF-8
2,714
3.6875
4
[]
no_license
/** * * Retake Exam * * Untuk mengambil ulang suatu ujian akhir semester, seorang student diharuskan memiliki absensi 75% atau lebih. * Buatlah suatu program yang akan menghitung hal ini. Program ini akan digunakan untuk mengecek apakah seorang student bisa mengikuti 'retake' suatu ujian atau tidak pada * seme...
true
21024e539fa7eb8fe295c8eaa8b0f86cb30b07ec
JavaScript
patridge/StackGeography
/StackGeography/scripts/JSLINQ.js
UTF-8
9,928
2.875
3
[ "GPL-1.0-or-later", "GPL-3.0-only", "MS-RL", "MIT" ]
permissive
//----------------------------------------------------------------------- // Part of the LINQ to JavaScript (JSLINQ) v2.2 Project - http://jslinq.codeplex.com // Copyright (C) 2010 Chris Pietschmann (http://pietschsoft.com). All rights reserved. // This project is licensed under the Microsoft Reciprocal License (Ms-RL...
true
38324b5659b8618d4c7b7f8886afe5f77aac595a
JavaScript
ktt649/The-Outskirts
/scripts/store/generate-merch.js
UTF-8
864
2.859375
3
[]
no_license
for (var i = 0; i < merch.length; i++) { // generate html for the merch document.writeln("<div class=merch>"); // generate html for the image inside each box and the product description document.write("<img src='"); document.write(merch[i].photoLocation); document.write("' alt='"); document.write(merch[i].desc...
true
bb5555776c66802cb664d2ca786715e8de5c70e6
JavaScript
shunfu/webgl-experiments
/octahedron/js/octa.js
UTF-8
6,523
3
3
[]
no_license
// Some cross-browser issues. Kindly skip over this function. (function() { var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; window.requestAnimationFrame = requestAnimati...
true
5ea39f63818eef7a60fefbed3cb80f5ed1adb8f6
JavaScript
des-des/blog
/lib/templator.js
UTF-8
392
2.546875
3
[]
no_license
const content = require('./content') const memo = require('./memo') module.exports = async (strings, ...args) => { const results = (await Promise.all(args)) .map(result => Array.isArray(result) ? result.join('') : result) const html = strings.reduce( (output, next, j) => output + next + ...
true
67192ca063485e0ff96c8d64f467a2b1b8f04101
JavaScript
dlabuchaibe/Make-it-real
/condicionalesEj6.js
UTF-8
608
4.40625
4
[]
no_license
/*Diseñar un algoritmo que calcule la nota final de cualquier asignatura a partir de 2 notas parciales. El algoritmo debe mostrar, además de la nota final, un mensaje que indique el resultado: 0 - 2.0 : Pésimo 2.1 - 2.9 : Insuficiente 3.0 - 4.0 : Aceptable 4.1 - 5.0 : Bueno */ var nota1 = 4.5 var nota2 = 4 var prom =...
true
6c18ac43c4d88a4895850c25b96e91c06886c045
JavaScript
dagarvishwajeet/cloudflare-assignment
/index.js
UTF-8
3,182
2.75
3
[]
no_license
const links = [ { "name": "Amazon", "url": "https://www.amazon.com/" }, { "name": "Google", "url": "https://www.google.com/" }, { "name": "Yahoo", "url": "https://www.yahoo.com/" } ] const socialLinks = [ { url: 'https://www.linkedin.com/in/v-dagar/', icon: 'https://simpleicons.org/icon...
true
a4af47cb40ee52a58d536d1175ec7817a207d94f
JavaScript
huandv21-8/HTML-CSS-JS
/Review/R01/js/insert.js
UTF-8
379
2.5625
3
[]
no_license
var btnInsert = document.getElementById("btnInsert"); btnInsert.onclick = function () { var divContent = document.getElementById("content"); var para = ""; for(var i=0; i<4;i++){ para += '<div class="video">'; para += '<img src="http://bit.ly/35fYIrl">'; para += '<p>Taylor swift song</p>'; para +=...
true
58d7bf02dc371d6663c97389847094086b307cf1
JavaScript
MathewsCoelho/gpa
/assets/javascript/funcao.js
UTF-8
9,478
2.578125
3
[]
no_license
$(document).ready(function ($){ $("input[name='btnCadastro']").on("click", function (event) { var nome = $('input[name="nome"]').val(); var email = $('input[name="email"]').val(); var senha = $('input[name="senha"]').val(); var confSenha = $('input[name="confSenha"]').val(); ...
true
61b127198bcaac61f5c7ca0833d804e640dc2f41
JavaScript
sheybusta/separation-of-concerns
/separated/flip-book/src/logic.js
UTF-8
177
2.8125
3
[ "MIT" ]
permissive
export const reverseAndUpper = str => { const upperCased = str.toUpperCase(); const reversed = upperCased .split('') .reverse() .join(''); return reversed; };
true
430aa55a3e755c302a5c457a08b5c2543d16f970
JavaScript
jakub1990/portfolio
/to_do_list/script.js
UTF-8
672
3.375
3
[]
no_license
const inputField = document.querySelector(".todo"); const buttonAdd = document.querySelector(".buttonAdd"); const buttonClear = document.querySelector(".buttonClear"); const ul = document.querySelector("ul"); buttonAdd.addEventListener("click", function() { if(inputField.value === "") { alert("Add a task!"); }...
true
b7b07ee53149a8fa62ad48b7563772194c8b1872
JavaScript
JasminkaMitrovic/TS1
/force-app/main/default/aura/applicationForm/applicationFormController.js
UTF-8
746
2.640625
3
[]
no_license
({ clickCreate: function(component, event, helper) { var validApplication = component.find('expenseform').reduce(function (validSoFar, inputCmp) { // Displays error messages for invalid fields console.log('Validating field'); inputCmp.showHelpMessageIfInvalid(); ...
true
f9733903f6746598ba07cf5faffe948027a2619e
JavaScript
PabelAndino/syscredito
/vistas/scripts/cuentascobrar.js
UTF-8
7,021
2.546875
3
[]
no_license
var tablah,tablaf,tablas; function init() { fechaActual() listarHipotecas() listarAbonos() //cargamos los items de categoria } function fechaActual() { var now = new Date(); var day = ("0" + now.getDate()).slice(-2); var month = ("0" + (now.getMonth() + 1)).slice(-2); var today = n...
true
cbfa9f9b0c522597291b02908eb9d0a41ae47534
JavaScript
notxesnad/triangle-calculator
/public/js/controllers.js
UTF-8
709
2.671875
3
[]
no_license
'use strict'; /* Controllers */ angular.module('myApp.controllers', []) .controller('AppCtrl', function ($scope, CalculatorService) { $scope.side_a = 2.1; $scope.side_b = 2.1; $scope.side_c = 4; $scope.active = 'active'; $scope.triangles = [{ name: 'not', uniqueSides: 0 }, { name: 'equilateral', uniq...
true
e032702a9b5365c935f72cfbf3815155445fafea
JavaScript
analytics-ufcg/enquadrados
/front/js/enquadrados.js
UTF-8
386
2.71875
3
[]
no_license
function count_workers(data) { var total = 0; for (worker_type in data) { if (data[worker_type]['ativo']) { total += data[worker_type]['quantidade']; } } return total; } function count_workers_com_inativos(data) { var total = 0; for (worker_type in data) { to...
true
d66d47871010953e1cb37e1a216749b102fc2588
JavaScript
rakeshbhatt10/ai_enabled_youtube_playlist_manager
/src/Components/Components/Utils/TfUtils/TfToxicity.js
UTF-8
848
2.703125
3
[]
no_license
import * as toxicity from '@tensorflow-models/toxicity'; let toxicityModel; async function loadToxicityModel() { toxicity.load().then((model) => { try { toxicityModel = model; } catch(e) { console.log(e); } }).catch((e) => { console.log("Error ...
true
2de8201922aa230709364e66f1c867ce6ac8d396
JavaScript
kermitt/challenges
/js/FlipWordsButNotSentence.js
UTF-8
757
3.5
4
[]
no_license
const {log, verdict} = require('./Tester') const flip = (word) => { // huh - looks like java return word .split("") .reverse() .join(""); } const solution = (original) => { let words = original.split(" ") words = words.map(word => flip(word)).join(" ") return words } verdi...
true
831dd5c55b3c27c20f3a82611b0bf25303be15d6
JavaScript
jepetko/my-angularjs-project
/WebContent/js/app-12/ShoppingBagCtrl.js
UTF-8
1,813
2.59375
3
[ "MIT" ]
permissive
(function() { "use strict"; angular.module('shoppingbag-app',['products-services']) .service('BagService', function() { this.bag = {}; this.getBag = function() { return this.bag; }; this.isEmpty = function() { for(var key in this.bag) { return false; } return true; }; }) .controller(...
true
72cb5e038d785fd0e1067a571503850db9adfced
JavaScript
jpradzynska/power-up-page
/src/components/games/Games.react.js
UTF-8
4,033
2.515625
3
[]
no_license
import React from 'react'; import { Parallax, Background } from 'react-parallax'; import ButtonComponent from '../shared/ButtonComponent.react'; import HeaderComponent from '../shared/HeaderComponent.react'; import LogoComponent from '../shared/LogoComponent.react'; import TrianglesTitleComponent from '../shared/Triang...
true
becb6e3b50bada0febce2a3b601106239cc9cf90
JavaScript
mferreira98/WebStockApp
/stock.js
UTF-8
1,238
3.5
4
[]
no_license
var names = []; function getStockArray(){ $(".names").each(function(){ names.push($(this).text()); }) return names; } getStockArray(); function createURL(symbol){ return "https://api.iextrading.com/1.0/stock/" + symbol + "/quote"; } function getLatestPrice(symbol){ $.getJSON(createURL(symbol), function(...
true
ba358fc3e0a3f0b1093a9b9487553ab8f9f2a390
JavaScript
imtaotao/oops
/src/vdom/modules/class.js
UTF-8
675
2.578125
3
[ "MIT" ]
permissive
function updateClass(oldVnode, vnode) { const elm = vnode.elm if (elm) { let oldClass = oldVnode.data.class let klass = vnode.data.class if (!oldClass && !klass) return if (oldClass === klass) return oldClass = oldClass || {} klass = klass || {} for (const name in oldClass) ...
true
225d261a2c9d962fc09f56eec38a73904c2ef586
JavaScript
madhushree007/react-redux
/todoApp_TEST.jsx
UTF-8
1,427
2.84375
3
[]
no_license
const todo = (state, action) => { switch (action.type) { case "ADD_TODO": return { id: 0, text: action.text, completed: false }; case "TODO_TOGGLE": if (state.id != action.id) { return state; } return { ...state, completed: !state.completed }; default: return state; ...
true
359ac61bb8cc0e633e92bcf301e7b0114ed1f93c
JavaScript
heya/globalize
/processFile.js
UTF-8
3,254
2.71875
3
[ "BSD-3-Clause", "AFL-2.1" ]
permissive
'use strict'; var fs = require('fs'); var path = require('path'); var mkdirp = require('mkdirp'); // parsing constants var doubleQuotedString = /"((?:\\"|[^"])*)"/g, singleQuotedString = /'((?:\\'|[^'])*)'/g, startPattern = /\s*\(\s*\[\s*/g, middlePattern = /\s*,\s*/g, endPattern = /\s*\]/g, definePattern = ...
true
0f7c7b44f0531d9c924510c5b310ef32a7ff56c1
JavaScript
npiv/joldem
/lib/tokenizer.js
UTF-8
5,089
2.84375
3
[ "Apache-2.0" ]
permissive
var model = require("./model"); var util = require("./util"); function formatForOutput(combo) { return combo .split("") .map(function(c) { return /[akqtj]/.test(c) ? c.toUpperCase() : c}) .join(""); } /** * Grouping AcKc... into AKs leaving rest untouched */ function level1To2(comboList)...
true
de183b01d9fd95c24697070cf5f179adbb501447
JavaScript
DeyvisonSoares/exerciciosBloco4
/trybe-exercises/fundamentos/bloco-4-introducao-a-javascript-e-logica-de-programacao/dia-1-javascript-primeiros-passos/ex01.js
UTF-8
240
3.09375
3
[]
no_license
let player = { name: 'Marta', lastName: 'Silva', age: 34, medals: { golden: 2, silver: 3 } }; console.log(player.name + ' ' + player.lastName + ' ' + 'completou' + ' ' + player.age + ' ' + 'anos.');
true
8b865925a4d199d9afa09873ceea722cc3bd9d3a
JavaScript
k-rush/something-different
/lambda/login/index.js
UTF-8
6,306
2.515625
3
[]
no_license
'use strict'; var crypto = require('crypto'); var async = require('async'); var waterfall = require('async-waterfall'); const doc = require('dynamodb-doc'); const dynamo = new doc.DynamoDB(); /** * Validates username and password for Something Different website. * To recieve validation token, make post request with ...
true
8614b03e35e7450bff74983c84a685edd0c90ccd
JavaScript
ioio-creative/web-canvas
/Example/threejs/threejs-demos/js/shader_demo2.js
UTF-8
2,051
2.59375
3
[ "MIT" ]
permissive
var APP = APP || {}; APP.ShaderDemo2 = function() { this.actors = []; this.ready = false; var self = this; this.init = function() { APP.startTime = new Date().getTime(); APP.updateInterval = 75; APP.nextUpdate = APP.updateInterval; APP.spawnThreshold = .3; APP.stageSize = 10; camera.setLens(13, 7....
true
4ce9e8cb300a99053722cdcb3ed6a0e007428f19
JavaScript
chasetsutsui/marvel-hangman
/javascript/logic.js
UTF-8
2,417
3.828125
4
[]
no_license
var answers = ["spiderman", "hulk", "thor", "wolverine", "groot"]; var currentAnswer = ""; var lettersInAnswer = []; var blanks = 0; var lettersAndBlanks = []; var wrongGuesses = []; var wins = 0; var losses = 0; var guessesLeft = 8; function hangman() { currentAnswer = answers[Math.floor(Math.random() * answe...
true
d3aad41fce5ec6751e578a36130be86052f12684
JavaScript
OttoChamo/Clase1TypeScript
/ejemploClase.js
UTF-8
217
3.203125
3
[]
no_license
var Persona = (function () { function Persona(nombre) { this.nombre = nombre; } Persona.prototype.saludar = function () { return "Hola soy " + this.nombre; }; return Persona; }());
true
e9485204abd1e6f3576ccf22041c239eb6ec6d58
JavaScript
jgsanchezg/Dynamic-Multi-Theme
/index.js
UTF-8
371
2.71875
3
[]
no_license
// Import stylesheets import './style.css'; import './functions.js' // Write Javascript code! const appDiv = document.getElementById('app'); appDiv.innerHTML = `<h1>Dynamic Multi Theme</h1>`; appDiv.innerHTML += `<br><button onclick="changeTheme('themeOne')">Theme One</button>`; appDiv.innerHTML += `<br><button onclic...
true
5ad026a87fe39d4b089a54c552dfeccf7d26e306
JavaScript
vitorkaio/react-reduxRxjsDropDown
/src/App.js
UTF-8
915
2.578125
3
[]
no_license
import React, { Component } from 'react'; import styled from 'styled-components'; import Mobile from './components/mobile/Mobile.jsx'; const AppWrapper = styled.div` height: 100vh; display: flex; justify-content: center; align-items: center; font-size: 30px; color: cornflowerblue; `; class App extends C...
true
95e1514d64a343d86410c7fe4761d864f3840362
JavaScript
tigo-di/removeElement
/dist/removeElement.js
UTF-8
1,684
3.140625
3
[]
no_license
/* Add .removeElement to div, p, ul or ol. It's all. by Tiago Dias @tigo */ ;(function(){var buttonAction = function buttonActionF(event) { var classTemp = 'removeelement' + numberRandom(); this.parentNode.setAttribute('class',classTemp); removeElement('.' + classTemp); }; ;var buttonCreate = fun...
true
3fffbfb2dd68017d117d7e8cf4219ee3ac7782eb
JavaScript
samuelnoye/kelvinweather
/kelvinWeather.js
UTF-8
390
4.5
4
[]
no_license
//assign value to kelvin const kelvin = 292 //assign value to celsius let celsius = kelvin - 273 //calculate Fahrenheit let fahrenheit = celsius * (9 / 5) + 32 //convert Fahrenheit to whole number fahrenheit = Math.floor(celsius * (9 / 5) + 32) console.log(`The temperature is ${celsius} degrees ${fahrenheit...
true
98acb90d25f05b3fa5eddafd30a2096a860276db
JavaScript
josselinlh/Organic
/js/ArticleMetro.js
UTF-8
1,435
2.71875
3
[]
no_license
function ArticleMetro(title, contentArgument, id) { this.title = title; this.id = id; this.idColor = id%4+1; this.contentArgument=contentArgument; this.refreshView(); } ArticleMetro.prototype.refreshView = function() { this.setContent(); this.setContentArticle(this.contentArgument); } ArticleMetro.prototyp...
true
9c29d6c728c4ff4c5a75d57bbf51b7b123ba70a7
JavaScript
ayyjohn/listenToThis
/frontend/reducers/queue_reducer.js
UTF-8
985
2.609375
3
[]
no_license
import { CLEAR_QUEUE, POPULATE_QUEUE, UPDATE_ID, UPDATE_INDEX, UPDATE_PLAYING } from '../actions/queue_actions'; import { merge } from 'lodash'; const _defaultState = { tracks: [], index: -1, playing: true, id: -1 }; const QueueReducer = (state = _defaultState, action) => ...
true
767d6648c4139005c74c1fe2c516ccf902dc582a
JavaScript
a-ignatov-parc/atvjs
/src/navigation.js
UTF-8
13,595
2.71875
3
[ "MIT" ]
permissive
import _ from 'lodash'; import Page from './page'; import Parser from './parser'; import Menu from './menu'; // few private variables let menuDoc = null; let loaderDoc = null; let errorDoc = null; let modalDoc = null; /** * Default options. * * @type {Object} */ let defaults = { templates: { status: {...
true
f9d6ff8e19bafb5fd936a1a8ae09adc004b6001b
JavaScript
tartakovskyi/advanced-js
/lesson_05/PlayList/src/index.js
UTF-8
938
2.84375
3
[]
no_license
import Song from './components/song'; import Movie from './components/movie'; import PlayList from './components/playlist'; const play = document.getElementById('btn-play'); const stop = document.getElementById('btn-stop'); const next = document.getElementById('btn-next'); const list = document.getElementById('list')...
true
fc8d63f5681adc3eba5385c63a952f8aeb1da47b
JavaScript
mObren/ethereum-crawler
/services.js
UTF-8
1,586
2.625
3
[]
no_license
import axios from "axios"; const apiKey = "HG7UWGF9M9KTGQP677NFVI4M3DZACMZS7B"; export const getTransactions = (address, startBlock, pageCount) => { return axios.get( `https://api.etherscan.io/api?module=account&action=txlist&address=${address}&page=${pageCount}&offset=50&startblock=${startBlock}&endblock=9999999...
true
7838fd23f576321b0fc443dcb33beff699a133aa
JavaScript
Bryan-Guner-Backup/DOWN_ARCHIVE_V2
/LAMBDA_LABS/merchos-be/routes/productsRouter.js
UTF-8
1,606
2.53125
3
[ "MIT" ]
permissive
const router = require("express").Router(); const Products = require("../models/productsModel"); module.exports = router; // GET STORE PRODUCTS router.get("/:store_id", (req, res) => { const { store_id } = req.params; Products.findByStoreId(store_id) .then((products) => { if (products.length > 0) { ...
true
c806b178f209a6a0e723a1936bb224be320e7b71
JavaScript
jastien/jstien
/221/finalproject/js/mainscript.js
UTF-8
2,091
3.546875
4
[]
no_license
//JS FOR SLIDESHOW var slideIndex = 1; showSlides(slideIndex); function plusSlides(n) { showSlides(slideIndex += n); } function currentSlide(n) { showSlides(slideIndex = n); } function showSlides(n) { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElements...
true
c0e07269ba2634b050733b17e12c13a274cead2b
JavaScript
nycodev/fundamentosjs-aulas
/capitulo1/demo09-object-get-set.js
UTF-8
993
4.25
4
[]
no_license
//usa-se _ antes de uma varíavel quando se quer criar uma variável 'privada' (isso é uma convenção entre programadores, //para ninguém acessá-las por fora) const pessoa = { _nome: '', _idade: 20, //get é usado para interceptar o valor get nome () { return this._nome }, //set é usado par...
true
8a38d8931c665805c4d055e9bda0a0377b45564f
JavaScript
IsraelOrtuno/vee-validate
/tests/validate.spec.js
UTF-8
2,515
2.65625
3
[ "MIT" ]
permissive
import { validate } from '@/validate'; import { extend } from '@/extend'; import { confirmed, numeric } from '@/rules'; test('returns custom error messages passed in ValidationOptions', async () => { extend('truthy', { validate: Boolean, message: 'Original Message' }); const customMessage = 'Custom Mess...
true
a8d47a460199722d38fe40415a7dc965ba96d62f
JavaScript
taquocy/herokuAgriUDAEthBLC
/app.js
UTF-8
570
2.78125
3
[]
no_license
// Require packages and set the port const express = require('express'); const port = 3002; const app = express(); app.get('/', (request, response) => { console.log(`URL: ${request.url}`); response.send('Hello, Server!'); }); app.get("/about", (request, response) =>{ response.json({ name: "Ta Quoc Y", ...
true
63e65b6e0209f753b47fdc5b8e6313d52633ac8b
JavaScript
cdfagonde/contatoo3
/config/passport.js
UTF-8
1,401
2.578125
3
[]
no_license
// config/passport.js var config = require( './config' )(); var passport = require( 'passport' ); var GitHubStrategy = require( 'passport-github' ).Strategy; var mongoose = require( 'mongoose' ); module.exports = function() { // declarando uma variável para nos ajudar var githubCallback = 'http://' + config.domai...
true
277ad21bb49b62e472c54aeda8b296b9d8a21325
JavaScript
SOPT-27th-Server-5team/YoonKaYoung
/assignment/week1/level3.js
UTF-8
1,153
3.59375
4
[]
no_license
//member element: {"name", "part", "status", "gender"} let memberCtn = require('./members'); //members.js 모듈?! 불러오기 const members = memberCtn.member; //불러온 모듈에서 배열 가져오기 ob = members.filter(item => item.status === "OB"); //ob list yb = members.filter(item => item.status === "YB"); //yb list const mixArr = function(arr)...
true
ba70c87ed6c528d7e947e28f882f7fe4d0926e56
JavaScript
jAndreas/iDebit
/public/js/modules/es5shim.js
UTF-8
28,273
3.140625
3
[]
no_license
(function (definition) { // RequireJS if (typeof define == "function") { define(definition); // CommonJS and <script> } else { definition(); } })(function () { if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { // .length is 1 // 1. Let Target be the this value. var target = ...
true
796680d0106bfcd8a83b750679ccd96cc714e18a
JavaScript
ruthvik-github/hybridguard2.0
/evaluation/realAndroidapps/net.innolife.k.ent_9/net.innolife.k.ent_9-HybridGuard/assets/www/js/innonewsindexlist.js
UTF-8
3,150
2.765625
3
[]
no_license
var innonews; var innonewstoday; var innodb1; var innodb2; var innonewshot; $('#innonewsIndexListPage').on('pageinit', function(event) { getInnonewsIndexList(); getInnonewsTodayIndex(); getinnodbStarIndex(); getinnodbDramaIndex(); getinnonewsHotIndex(); }); function getInnonewsIndexList() { $....
true
edcd6691b6a41e79a46eb98922413461bb401724
JavaScript
royriojas/codepainter
/lib/rules/space_after_control_statements.js
UTF-8
2,519
2.6875
3
[ "MIT" ]
permissive
var assert = require('assert'); var Rule = require('../Rule'); var util = require('../util'); function SpaceAfterControlStatementsRule() { SpaceAfterControlStatementsRule.super_.apply(this, arguments); } module.exports = util.inherits(SpaceAfterControlStatementsRule, Rule, { name: 'space_after_control_statements...
true
abeee3c038be90bbce49bdb764430d1632f77aa8
JavaScript
baoatwork/my-cdv-ss20
/my-work/week4/datazine-template/js/cover.js
UTF-8
1,000
2.546875
3
[]
no_license
let viz = d3.select("#container") .append("svg") .attr("id","viz") .attr("width",5000) .attr("height",1000) ; viz.append("svg:image") .attr("xlink:href","resource/paperreverse.png") .attr("width",1200) .attr("x",0) .attr("y",0) ; viz.append("svg:image") .attr("xlink:href","resource/yinya...
true
0b2b7d6fb1bd3006886a5afbe3b5b9643a29f485
JavaScript
fatih-iver/Intro-to-JavaScript
/JuliaJames.js
UTF-8
534
4.125
4
[ "MIT" ]
permissive
/* * Programming Quiz: JuliaJames (4-1) */ var x = 1; while (x < 21) { var output = "" var divBy3 = x % 3 === 0; var divBy5 = x % 5 === 0; var divBy15 = divBy3 && divBy5; // check divisibility if(divBy15){ output = "JuliaJames"; }else if(divBy5) outpu...
true
6d6669e40a86c3ab9cdb5bb077c697ca9be4dc12
JavaScript
assemyych/webtasks
/family.js
UTF-8
1,025
3.203125
3
[]
no_license
var FAMILY_FILE = JSON.stringify([ {"name": "Assem Tolen", "born": 2000, "father": "Murat Abdrakhmanov", "mother": "Nurzhamal Aubakirova"}, {"name": "Nurzhamal Aubakirova", "born": 1967, "father":"Aluarbek", "mother": "Bibigul"}, {"name": "Murat Abdrakhmanov", "born": 1964, "father":"Tolen", "mother": "Kuttykyz"}, ...
true
990a3ec81deaae3c2a9a0d49c26e5d5c9e5811aa
JavaScript
kylexrose/express-cr-hw
/routes/todoRouter.js
UTF-8
1,143
2.75
3
[]
no_license
const express = require("express"); const router = express.Router(); const uuidv4 = require("uuid").v4; let todos = [ { id: "haf24jd", todo: "do laundry", done: "false" }, { id: "jp2nkl2", todo: "wash dishes", done: "true" ...
true
90f642bfe967ced4e85f336249b8dc1e898732b4
JavaScript
davguij/cryptobee-api
/src/balance/balance.js
UTF-8
1,013
2.8125
3
[]
no_license
const http = require('../common/http'); const axios = require('axios'); function getBalance(coin, addresses) { let allReqs = []; addresses.forEach((address) => { let request = http.get(`https://api.blockcypher.com/v1/${coin}/main/addrs/${address}/balance`) .then(data => { return { address: data.address...
true
a27a93c69b211ef083000858a62aaf8830bfc115
JavaScript
aunhengly/startnow-ops200-prove-it-works
/src/js/lib/Mortgage.js
UTF-8
616
2.8125
3
[]
no_license
module.exports = class Mortgage { constructor (principal, interest, term, period) { this.principal = principal; this.interest = interest; this.term = term; this.period = term * 12; } calculation(P, r, n) { return P * ((r * Math.pow((1 + r), n)) / (Math.po...
true
efc360ffd70dad344ababac195f0eb76fd90f702
JavaScript
Omar-Selim97/udac-Review
/js/app.js
UTF-8
5,550
2.96875
3
[]
no_license
//1-scroll navbar window.addEventListener('scroll', () => { var header = document.querySelector('header'); header.classList.toggle('sticky', window.scrollY > 0); }); //2-Reveal scroll window.addEventListener('scroll', reveal); function reveal() { var doscroll = document.querySelectorAll('.reveal'); fo...
true
6113042a59f574113400eb29e1ed74b8d48b409d
JavaScript
YahirKeym/indicadoresreact
/src/components/Mandos/FormularioMandos/AddVariable.js
UTF-8
782
2.59375
3
[]
no_license
import CreaEtapas from "../CreaEtapas"; import AddOneElement from "../../Generales/AddOneElement"; /** * El componente AddVariable nos ayudara a implementar la creación * de una nueva variable. * @param {*} e Evento del boton que está mandando a llamar * @param {*} oObjeto Es el componente padre (this) * @param {*...
true
18fca72fec1c95f13641be4f99cb0c40fa6e485e
JavaScript
parroit/billpanel
/test/model/user-validator_test.js
UTF-8
4,590
2.671875
3
[ "MIT" ]
permissive
'use strict'; var chai = require('chai'); chai.expect(); var should = chai.should(); var AuthStorage = require('../../lib/model/auth-storage'), validateUser = require('../../lib/model/auth/user-validator'), authStorage; describe('AuthStorage', function() { before(function(done) { authStor...
true
3abce233f6e3db23d52cac431750f4065bdae751
JavaScript
christianraymond/conditionally_done
/weekOrWeekend.js
UTF-8
321
3.28125
3
[]
no_license
const assert = require('assert'); var weekOrWeekend = function(day){ if(day.startsWith('S') && day.endsWith('day')){ return 'weekend'; } else{ return 'week'; } }; assert.equal(weekOrWeekend('Sunday'), 'weekend'); assert.equal(weekOrWeekend('Wednesday'), 'week'); console.log (weekOrWeekend('Monday'));...
true
194009887498a5438441d2e12e0a492234d6b251
JavaScript
AdiGarmendia/overly-excited
/overly-excited.js
UTF-8
92
2.59375
3
[]
no_license
function addExcitement(sentence) { console.log(sentence); } addExcitement("Excitement!");
true
e40f013c5380aaf63fcd6a1c175aa535e2804f96
JavaScript
jpsm83/random-beers
/src/pages/RandomBeer/RandomBeer.js
UTF-8
906
2.671875
3
[]
no_license
import React, { Component } from 'react'; import BeerService from '../../services/beers.service'; import BeerDetail from '../../components/BeerDetail/BeerDetail'; export default class RandomBeer extends Component { constructor(props) { super(props); this.state = { beers: [], }; this.b...
true
fe2ede09a4f2d0a995711be9901aeabff5096602
JavaScript
VeselinBPavlov/reactjs-fundamentals
/06. Events and Forms - Exercise/client/src/components/form/Index.js
UTF-8
3,256
2.734375
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import PokemonField from './formFields/PokemonField'; import Input from './formFields/Input'; export default class Index extends Component { constructor() { super(); this.state = { pokemonName: '', pokemonImg: '', pokemo...
true
996f26d3b9fdc72dc0835a30c29cdf18d22e688a
JavaScript
eigentopia/PS
/js/app/com/dadc/lithium/view/widgets/TabbedButtonWidget.js
UTF-8
4,671
2.625
3
[]
no_license
var TabbedButtonWidget = function( caption ) { var m_root_node = engine.createContainer(); var m_caption = caption; var m_selected_container; var m_disabled_container; var m_inactive_container; var This = this; this.refreshWidget = function( caption ){ m_caption = caption; ...
true
52b0be19ad4ddf260751f0fdacbca40af1a56bc2
JavaScript
cuddeford/api-poll
/example.js
UTF-8
434
2.78125
3
[]
no_license
const Poller = require('api-poll') const endpoint = 'https://cat-fact.herokuapp.com/facts/random?animal=cat&amount=1' const randomFact = new Poller(endpoint, { repeat: 2000, //ms variance: { min: 200, //ms max: 2500 //ms }, fetchHeaders: { "Origin": "google.com" } }) random...
true
09a39d72b31813da74154c6728fba564c930bcce
JavaScript
BrianARuff/DataStructures_JavaScript
/Stacks/baseConverter.js
UTF-8
422
3.46875
3
[]
no_license
const Stack = require("./Stack"); function baseConverter(num, base) { const stack = new Stack(); let baseString = ""; const digits = "0123456789ABCDEF"; while (num > 0) { stack.push(Math.floor(num % base)); num = Math.floor(num / base); } while (!stack.isEmpty()) { baseS...
true
7a7c99ac8cc6a0f1e98d45b5c127c546034fa76f
JavaScript
mosse/chatterbox-server
/client/scripts/app.js
UTF-8
4,458
2.890625
3
[]
no_license
$(function(){ // YOUR CODE HERE: // var message = "This is a test. Of REST. The best." // var postMessages = function() { // $.ajax({ // // always use this url // url: 'https://api.parse.com/1/classes/chatterbox', // type: 'POST', // data: JSON.stringify(message), // contentType: 'application/jso...
true
96ed133fa9b17bb652379eca07197e149099f518
JavaScript
tainenko/Leetcode2019
/javascript/985.sum-of-even-numbers-after-queries.js
UTF-8
2,279
3.984375
4
[]
no_license
/** * [985] Sum of Even Numbers After Queries https://leetcode.com/problems/sum-of-even-numbers-after-queries/description/ * algorithms * Easy (65.93%) * Source Code: 985.sum-of-even-numbers-after-queries.js * Total Accepted: 16K * Total Submissions: 24.6K * Testcase Example: '[...
true
abe1bf6e737176e91e7e4a8db34f43367b6fea89
JavaScript
obrim222/JSArrays
/index.js
UTF-8
1,736
3.71875
4
[]
no_license
let userList = [ { firstname: "John", lastname: "O", age: 20, }, { firstname: "Johno", lastname: "Ob", age: 50, }, ]; const getUserlist = function () { for (let i = 0; i < userList.length; i++) { document .getElementById("tableBody") .insertAdjacentHTML( "befor...
true
5e78a330098862444818c1a90dc6fb3060bc0557
JavaScript
soeurette/vschool
/exercises/day21/constractionstud.js
UTF-8
761
2.921875
3
[]
no_license
var Students = function (name,dob,phone,grades){ this.stdName = name; this.stdDob = parseInt(dob); this.stdPhone = phone; this.stdGrades = grades; this.age = function() { var D = new Date(); var date = D.getFullYear(); age = date -this.stdDob ; console.log(age); } }; var student1 ...
true
e38a906626194159b6986c84bcf10141487b7b63
JavaScript
LuisPaGarcia/vanquisher-nextjs
/src/utils/hooks/useToggle.js
UTF-8
235
2.53125
3
[]
no_license
import { useState } from "react"; function useToggle(initialValue = false) { const [value, valueSet] = useState(initialValue); const toggle = () => valueSet(!Boolean(value)); return [value, toggle]; } export default useToggle;
true
d715f85497e7bd0c0ca7b7a9e87db61be0aec26d
JavaScript
ashp07/mqtt-pub-sub
/subscribe.js
UTF-8
458
2.53125
3
[]
no_license
const BROKER_URL = "mqtt://localhost:1883"; const TOPIC_NAME = "test"; const CLIENT_ID = "subscribe.js"; var MQTT = require("mqtt"); var client = MQTT.connect(BROKER_URL, {clientId: CLIENT_ID}); client.on("connect", onConnected); client.on("message", onMessageReceived) function onConnected() { client.subscribe(TO...
true
91115086d617a133bc882c563094c766db3aac29
JavaScript
Fernison/NodeJS
/graphql-course/graphql-basics/src/playground/myModule.js
UTF-8
754
2.734375
3
[]
no_license
/* The major difference between require and import, is that require will automatically scan node_modules to find modules, but import, which comes from ES6, won't. But now most people would use babel to compile import and export, which will make import act the same as require, but the future version of Nod...
true
562affffa23ae5bea04b5b4f2867ade4c3e51788
JavaScript
Ankita-Upadhyay/cruzhacks2019
/src/components/contacts.js
UTF-8
3,626
2.703125
3
[]
no_license
import React, { Component } from 'react'; import {Grid, Cell, List, ListItem, ListItemContent} from 'react-mdl'; class Contact extends Component{ render() { return( <div class="back1"> <img src="https://res.cloudinary.com/dkcjqlakt/image/upload/v1547954711/slugcharityfin...
true
fc457cab6dbc7b946c6e8b9d547a276fc0bdae68
JavaScript
lewisfrost/working_banners
/BP/V5/Complete Specs_North_Seas/WSJ/JRDL_0267_Orchard_Post_BP_300x250/js/script.js
UTF-8
1,725
2.53125
3
[]
no_license
var tw = TweenLite; var imgArr = ['flip1','flip2','flip3','flip4','flip5','flip6','flip7','flip8','flip9', 'flip10','flip11','flip12','flip13','flip14','flip15','flip16','flip17', 'flip18','flip19','flip20']; var imgArr2 = ['flip22','flip23','flip24','flip25','flip26','flip27','flip28...
true
8608f17a316b3606cca0a7c81e4367cfc3a7f3a3
JavaScript
Bdarmits/LA-Coursework
/Contours/non_maximum_suppression.js
UTF-8
1,019
2.625
3
[]
no_license
function getPixelNeighbors(dir) { var degrees = { 0: [{ x: 1, y: 2 }, { x: 1, y: 0 }], 45: [{ x: 0, y: 2 }, { x: 2, y: 0 }], 90: [{ x: 0, y: 1 }, { x: 2, y: 1 }], 135: [{ x: 0, y: 0 }, {x: 2, y: 2 }] }; return degrees[dir]; } function nonMaximumSuppress(canvas, dirMap, gradM...
true
4fe28d175c848120be3048efa98bf17a20804dee
JavaScript
io-ma/Zed-Shaw-s-books
/ljsthw/ex13/code.js
UTF-8
171
2.59375
3
[]
no_license
const geometry = require('./geometry'); let area51 = geometry.area(2.8); let circ2 = geometry.circumference(6); console.log(`Area: ${area51}, Circumference: ${circ2}`);
true
e9897ee7a9b52df7fc3d8a4def544bedda91bc81
JavaScript
lavrukev/JS
/offline/JS_010/index.js
UTF-8
357
3.375
3
[]
no_license
// использование переменной this var div = document.getElementsByTagName('div'); // div.onclick = fillDiv; не сработает for (var i = 0; i < div.length; i++) { div[i].onclick = fillDiv; } function fillDiv() { this.style.background = 'gold'; this.getElementsByTagName('p')[0].style.display = 'block';...
true
1f7e52aa0a95d407033d7a30c1536cfaa77f7b21
JavaScript
AleksGlinskiy/test-select
/MySelect.js
UTF-8
4,857
2.921875
3
[]
no_license
class MySelect { constructor(target, params) { this.element = typeof target === 'string' ? document.querySelector(target) : target; this.data = params.data; this.element.classList.add("my-select"); this.element.innerHTML = MySelect.template(this.data); this.elInput = th...
true
2401c8f57a324663245d0c113d3fc8d3421e1f9d
JavaScript
philbuchanan/component-kit
/js/scripts.js
UTF-8
7,001
2.6875
3
[]
no_license
(function() { 'use strict'; var duration = 200; /** * Tooltips Class */ var Tooltip = function(reference) { var _self = this; this.reference = reference; this.tooltip = document.createElement('div'); this.popper = null; this.options = { baseClass: 'c-tooltip', position: 'bottom', ...
true
84be856674b36853b235b1a8a55bb5f60450305d
JavaScript
whemmingsson/genart
/grid_2/js/sketch.js
UTF-8
601
2.828125
3
[ "MIT" ]
permissive
let grid, grid0; function setup() { createCanvas(701, 701); colorMode(HSB); ellipseMode(CORNER); //Cones //grid = new Grid(10,10, SHAPES.drawConeShape); //One diagonal line per cell, with two layers //grid0 = new Grid(50,50, SHAPES.drawDiagonalLine0); //grid = new Grid(25,25, SHAPES.drawDiagonalLi...
true
d6ccf487b4be702dc0a6292c7ce3b1af9db41899
JavaScript
Yamikamisama/dreams
/app/assets/javascripts/public/youtube_data.js
UTF-8
7,803
2.578125
3
[]
no_license
YouTubeData = {} YouTubeData.Account = { getUserChannel: function() { // https://developers.google.com/youtube/v3/docs/channels/list var request = gapi.client.youtube.channels.list({ // "mine: true" indicates that you want to retrieve the authenticated user's channel. mine: true, part: 'id,...
true
176f7e79154d82d773a4ca8e1a885d083777e7b4
JavaScript
jjwallace/Pink-JellyFish
/src/Main.js
UTF-8
2,088
2.9375
3
[ "MIT" ]
permissive
/** * @author Jesse Jay Wallace <jjaywallace@gmail.com> * @overview * http://www.jjwallace.info/ * Pink JellyFish Phaser 2 CE Sample */ function MainState(){ BasicGame.Main = function (game) { this.game; this.add; this.camera; this.cache; this.input; this.load; this.math; this.sound; this.stage; this.time; this.twee...
true
538536139d23ef087c6ff74fbf5a0116bc505f13
JavaScript
Grubbyfans/javascriptDesignMode
/原型模式/01.js
UTF-8
726
3.40625
3
[]
no_license
function A() { this.a = '1' this.b='2' } A.prototype = { c:'3', d:'4' }; function B() { } /* * 原型模式实现B类继承A类的属性 * */ B.prototype = new A(); var obj = new B(); /* * 组合寄生模式1 * */ function C(){ A.call(this) } C.prototype = A.prototype; var obj2 = new C(); /* * 组合寄生模式2 * */ function D() { A.cal...
true
66a2ef396e441e1d3e16b521d35d83b574dd8c39
JavaScript
vekymkd/JavaScript
/Objects/Basics/HomeworkPart1.js
UTF-8
527
4.125
4
[]
no_license
function Animal(name,kind,speak){ this.name = name; this.kind = kind; this.speak = function(){ return document.getElementById("creation").innerHTML = `${this.kind} with name ${this.name} says: Hey Bro!!!!`; } } function createAnimal(name,kind,speak){ name = document.getElementById("name").v...
true
216421cef87cb1f7f26ec6427db30674b766ee1c
JavaScript
raykit/myserver
/routes/modules/community-order-list.js
UTF-8
698
2.53125
3
[]
no_license
var express = require('express'); var router = express.Router(); var mock = JSON.stringify(require('../../mocks/community-order-list.json')) function returnObj (obj, len, page) { console.log('obj', obj.Results.length) let arr = obj.Results let a_len = arr.length let new_arr = [] for (let i = 0; i < a_len; i...
true
453a75819343bd19f537b432d13d47bd748a2760
JavaScript
torresga/launch-school-code
/lessons/215_lessons/lesson_3/problem3.js
UTF-8
5,642
4.5625
5
[]
no_license
// Problem Description // A collection of spelling blocks has two letters per block, as shown in this list: // B:O X:K D:Q C:P N:A // G:T R:E F:S J:W H:U // V:I L:Y Z:M // This limits the words you can spell with the blocks to only those words that do not use both letters from any given block. You ...
true
09c0fe043d0dae0a372b9e12f724641bc6a4cb5a
JavaScript
SreemanthG/hack-at-home-2-backend
/src/index.js
UTF-8
1,400
2.6875
3
[ "MIT" ]
permissive
/* eslint-disable linebreak-style */ /* eslint-disable no-console */ const Filter = require('bad-words'); const express = require('express'); const cors = require('cors'); const app = express(); app.use(express.json()); app.use(cors()); app.get('/', (req, res) => { res.json({ message: 'Welcome to api', }); })...
true
af5038ceece6b91bc5e9c4d896647207e0443de9
JavaScript
storozenko-ig/gameXandO
/js/xando.js
UTF-8
4,443
3.21875
3
[]
no_license
const defaultGameFeild = [ [0, 0, 0], [0, 0, 0], [0, 0, 0], ]; function max(a, b) { return a > b ? a : b; } function min(a, b) { return a < b ? a : b; } function XandOGame() { this.player1 = null; this.player2 = null; this.gameFeild = [...defaultGameFeild]; this.complit = false; this.createPlayer...
true
6b2297c395747cf29c737a0e43d1439b74a70c8e
JavaScript
patrick-webdev/N215
/travelfly/app/tours.js
UTF-8
2,533
3.140625
3
[]
no_license
let data = $.getJSON("data/tours.json", function(data){}); function tours_create_cards(){ let tourData = data['responseJSON']; let container = document.getElementById("tour"); $.each(tourData, function(idx, tour){ tour = tour[0]; let content = ''; content += '<div class="location-price tour-' + tou...
true
ce93dd7b14b828af6b115d17b8111603dbdc0c9d
JavaScript
ihasan98/uni-application-tracker
/API/helpers/users.js
UTF-8
1,314
2.5625
3
[]
no_license
const db = require("../models"); exports.getsUsers = function(req, res) { db.User.find({}) .then(function(users) { res.json(users); }) .catch(function(err) { res.status(500).send(err); }); }; exports.createUser = function(req, res) { const {username, contact, email, fullname, password} = req.b...
true
8e1292dded8a3c3f3a5f1c091bc60581532048fa
JavaScript
Attackerator/Backend
/test/test-helper.js
UTF-8
4,000
2.546875
3
[]
no_license
'use strict'; const User = require('../model/user'); const Stats = require('../model/stats'); const Character = require('../model/character'); const Spell = require('../model/spells'); const Skill = require('../model/skills'); const Attack = require('../model/attack'); const Save = require('../model/save'); const debu...
true
3b4092015ed59168516776936753aa73ab84d39d
JavaScript
DuyTan1605/client-caro-frontend
/src/actions/actionGetRanking.js
UTF-8
1,025
2.515625
3
[]
no_license
import fetch from 'cross-fetch'; import ActionType from '../constants/actionTypes'; import config from '../config'; export function actionGetRanking(status, rankingInfo) { return { type: ActionType.GET_RANKING, status, rankingInfo }; } export default function fetchRankingInfo(token) {...
true
dbf36794c499764edeae550f1f298c8144043b89
JavaScript
iserifith/pong-ping
/pong.js
UTF-8
5,496
2.75
3
[]
no_license
const app = new Vue({ el: '#app', data: { user: { x: 0, y: document.getElementById('cvs').height / 2 - 100 / 2, width: 10, height: 100, color: '#fff', score: 0 }, ai: { x: document.getElementById('cvs').width - 10, y: document.getElementById('cvs').height ...
true