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
5d5f7d2dc24fe9834de0383843920738fbc1a537
JavaScript
TANGQingMiss/data_structure
/javascript/LCS_R.js
UTF-8
460
2.921875
3
[]
no_license
/** * @param {number[]} nums * @return {number} */ var longestCommonSubsequence = function(nums1,nums2) { function lcs(nums1,nums2,m,n){ if(m == 0 || n == 0){ return 0; }else if(nums1[m - 1] == nums2[n - 1]){ return lcs(nums1,nums2,m-1,n-1)+1; }else{ ...
true
c2eef0f3377d5dbe9e1f4f02e81793849aefe9d1
JavaScript
kuprienko0/kony
/HW8/script.js
UTF-8
3,114
3.484375
3
[]
no_license
let example2 = 'Yesterday, we bumped into Laura. It had to happen, but you can\'t deny the timing couldn\'t be worse. ' + 'The "mission" to try and seduce her was a complete failure last month. By the way, she still has the ring I gave her. ' + 'Anyhow, it hasn\'t been a pleasurable experience to go through it....
true
e8335c59630da45b29671b0df90f8ac649a6b9d5
JavaScript
jimmytuc/node-mock-examples
/test/network-spec.js
UTF-8
743
2.875
3
[ "MIT" ]
permissive
const got = require('got') function getRepoDescription (owner, repo) { const url = `https://api.github.com/repos/${owner}/${repo}` return got(url, { json: true }) .then(response => response.body) .then(info => info.description) } describe('mocking network calls', () => { const nock = require('nock') c...
true
6700b49e2f63394ce2936205556c4237175ceb7c
JavaScript
TBanda27/Restaurant-Website
/src/Testimony.js
UTF-8
2,486
2.671875
3
[]
no_license
import React, {useState, useEffect} from 'react' import {FaQuoteLeft} from 'react-icons/fa'; import data from './testimonialsData'; const Testimony = () => { const [people, setPeople] = useState(data); const [index, setIndex] = useState(0); useEffect(() => { const lastIndex = people.length -1; ...
true
02600bde3f45466db0eb7a3fa899de4d1f7c1a96
JavaScript
claudios96/ticketing-system-frontend
/app/scripts/service/storage.service.js
UTF-8
2,361
2.640625
3
[ "Apache-2.0" ]
permissive
'use strict'; /** * @ngdoc service * @module ticketsystem.storageService * @name storageService * @description Service manages the operation save/load user data. */ mainAngularModule.service('storageService', ['$rootScope', function ($rootScope) { let userInformation = {}; let logged = false; ret...
true
efd3ac328b1050ef58ff2b75478915218e142aeb
JavaScript
iostream/chromatone-helper
/src/cli/index.js
UTF-8
1,169
2.8125
3
[]
no_license
var service = require("../service.js"); /** * Example call: * node index.js --scales="1 2 3 4 5 6 7, 1 2 3 4 5" --chords="2 5 1" --voicings="1 3 5 6" --chromaticRoot=0 */ var params = parseCliArguments(process.argv); var generatedBy = process.argv.join(" "); var midiWriter = service.generateMidi(params.scales, par...
true
ee5de4b9b0fb3567204952aea64400eec3aa3651
JavaScript
LinasKri/6-js-intro
/js/09-reverse.js
UTF-8
757
3.890625
4
[]
no_license
// 2 // const text = 'abcdef'; let reverse =''; for (let i = 0; i < text.length; i++) { reverse = text[i] + reverse } console.log(text, '->' , reverse); // GALIMI VARIANTAI // // for (let i = 0; i < text.length; i++) { // reverse += text[text.length - 1 - i] // } // for (let i = text.length; i >= 0; i--) { ...
true
0fac37d38ebee0bcddd239d5a33be7867a90bf97
JavaScript
dogada/fast-redux
/test/createStore.spec.js
UTF-8
969
2.640625
3
[ "MIT" ]
permissive
/* global describe, expect, it */ import { createStore } from 'redux' import { rootReducer } from '../src' function initStore (preloadedState) { const store = createStore(rootReducer, preloadedState) return store } describe('createStore', () => { it('should restore primitive state from initial value', () => { ...
true
4eef5ff5203677acb5ad164d1341c5023260b877
JavaScript
abhikamalia/AskMe
/backend-AskMe-dev/services/authService.js
UTF-8
1,713
2.609375
3
[ "MIT" ]
permissive
const { SALT_ROUNDS } = require('../scripts/constants') const { logErrorLocation, generateToken } = require('../scripts/utils') const bcrypt = require('bcryptjs') const { addUser, getUserData } = require('../mongo/CRUD') exports.signUp = async (req) => { try{ const { email , password , firstName, lastN...
true
f18e319ca15ab4049feed7391fea1d22b698b41a
JavaScript
devgru/color-cube
/script.js
UTF-8
2,213
2.921875
3
[]
no_license
var maxSpeed = 3; var maxSpeedSq = Math.pow(maxSpeed, 2); var container; var camera; var controls; var scene; var renderer; init(); function move(p, t) { var distance = p.distanceToSquared(t); var isTooFar = distance > maxSpeedSq; if (isTooFar) { var step = new THREE.Vector3() .subVectors(t, p) ...
true
dba5e4b2a78fad907a039b988a872ddf6f741e0f
JavaScript
zawet/qkyh5-ssgl
/js/HFive.js
UTF-8
2,316
2.578125
3
[]
no_license
define(function(require,exports) {//dedine闭包 //自动变化以头部的距离,i为想离头部有多远,可以负数 exports.qkyh5_topa_header=function (i,jq){ if(jq==1){ var titHeight = $('.qkyh5_header').height()+i; }else{ var titHeight = $('.qkyh5_header').offset().height+i;} //console.log(titHeight); $(".qkyh5_main").css({"paddingTop":titHeight+"px...
true
b6a126006ae924dd3996920652d3ea1a98f0d72d
JavaScript
thiagomurakami/projectEulerNode
/test/1/004.js
UTF-8
1,815
3.609375
4
[]
no_license
/* eslint-env mocha */ // Largest palindrome product // Problem 4 // A palindromic number reads the same both ways. The largest palindrome made // from the product of two 2-digit numbers is 9009 = 91 × 99. // Find the largest palindrome made from the product of two 3-digit numbers. const expect = require('chai').expe...
true
48c8d6476661d6ecfd735012aff2d2fab4dc4917
JavaScript
HanksCheng/FoodTrust
/food_BlockChain_test/www/js/foodin-list_conn.js
UTF-8
5,368
3.25
3
[]
no_license
<<<<<<< HEAD var ws = new WebSocket("ws://192.168.68.50:6001"); ws.onopen = function () { console.log('open'); ws.send(3); }; var datas = []; ws.onmessage = function (event) { datas.push(event.data); if(datas[0] == "check"){ ws.send(localStorage.address); } console.log(datas) //從py...
true
17f1b3256021ba50bb9635a776e023c0772f36fa
JavaScript
VioletFlare/game
/tests/DraggableManager.test.js
UTF-8
1,579
2.84375
3
[]
no_license
/* DraggableManager - Makes dragging UI elements inside the UILayer possible. */ import DraggableManager from './../src/UI/DraggableManager'; import FakeDOMMouseEvent from './fakes/FakeDOMMouseEvent'; const checkSetCurrentTarget = () => { const draggableManager = new DraggableManager(), fakeDomEvent = new...
true
015ee46a7d842d80baceea48ad7dafeac7a028c9
JavaScript
cloneforyou/content-review-lookup
/dist/ko.pokemon/WikiTabs.js
UTF-8
2,996
3.140625
3
[ "CC-BY-4.0" ]
permissive
/** * WikiTabs * * Switches contents via list of buttons * Requires CSS setup (see MediaWiki:WikiTabs.css) * * @Configuration * Import [[MediaWiki:WikiTabs.js]] and [[MediaWiki:WikiTabs.css]]. * How to import sheets: http://community.wikia.com/wiki/Help:Including_additional_CSS_and_JS * * @Usage * 1. Wrap ...
true
e18d99a2cc66669516fff29481555e2b1819475f
JavaScript
abshir24/HomeworkAnswers
/algorithmhw3.js
UTF-8
609
4.8125
5
[]
no_license
//The function accepts a number and a power function power(num,exponent){ //this returnValue variable stores the value of // num^exponent var returnValue = Math.pow(num,exponent) //return that value return returnValue } console.log(power(2,2))//this should print out 4 //the random number value ...
true
6e26d37ccb23c90ff6973d0550862f712863a16b
JavaScript
Luiko/dungeon-crawler
/simulator.js
UTF-8
2,356
2.671875
3
[ "MIT" ]
permissive
import { createStore } from "redux"; import reducer from './src/reducers'; import initial_state from './src/initial_state'; import { fightEnemy, pickHealth } from "./src/actions"; const { log } = console; let store = createStore(reducer, initial_state) log('Dungeon 1'); let state = store.getState(); let { health: { ...
true
8eb78909f9b7664c1a03145e45e43374b3bc3c7f
JavaScript
mturnshek/semi-autonomous-control
/web/markov_action_generator.js
UTF-8
735
3.421875
3
[ "MIT" ]
permissive
class MarkovActionGenerator { constructor() { this.chance_of_random_action = 0.3; this.none = [1, 0, 0, 0, 0]; this.left = [0, 1, 0, 0, 0]; this.up = [0, 0, 1, 0, 0]; this.right = [0, 0, 0, 1, 0]; this.down = [0, 0, 0, 0, 1]; this.action = this.random_action(); } random_action() { ...
true
ac0bbb38e25987f9180b2e93f09023d05a6605c1
JavaScript
M0R4DK155/Orinoco
/js/components/cart.js
UTF-8
2,885
2.984375
3
[]
no_license
/* eslint-disable no-unused-vars */ /* global orinoco Component */ //Composant panier class Cart { /** * contenu du panier * @type {Array} */ contentBasket; constructor(domTarget) { this.DOM = document.createElement("div"); //Nom de la balise ciblée pour créer un nouveau noeud dans le DOM ...
true
60337b8896c3dcbd795251d09ea132607c55a186
JavaScript
AndreyTaran212/task26.11.12
/assets/js/index.js
UTF-8
2,136
3.046875
3
[]
no_license
'use strict' const userList = document.getElementById('usersList'); const user={ name: "Mathew Alex", img: './assets/images/icons/user_icon.png', information: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam eos est expedita quasi. Ad animiassumenda dicta earum esse laudantium maxime o...
true
8bd62a541afe818903bce45cee0bdf69394c4728
JavaScript
RuchirSaxena/StarWarsAPI
/assigment_starwars/src/components/Search.js
UTF-8
1,450
2.609375
3
[]
no_license
import React, { Component } from 'react'; import axios from 'axios'; import config from '../config/config'; import Planet from './Planet'; class Search extends Component { constructor(props) { super(props); this.search = this.search.bind(this); } state = { palnetsData: [], ...
true
1b026370e6c8e05d6dd48240051810093512bf91
JavaScript
wesleyburch/campsite
/routes/campgrounds.js
UTF-8
3,223
2.765625
3
[]
no_license
//using express router var express = require("express"); var router = express.Router(); // new router instance var Campground = require("../models/campground"); var Comment = require("../models/comments"); var middleware = require("../middleware"); // our main file is an idex file. so specifying the parent folder will ...
true
284b7840faf48fdb96f5de0367e04d7be6432931
JavaScript
macindex/DIOBootcampNodejs-Desafios
/05-Solução de Problemas com JavaScript/Desafio-03.js
UTF-8
4,972
3.3125
3
[]
no_license
/* //### Desafio - Melhor amigo do Pablo Todo final de ano ocorre uma festa na escola. As inscrições para participar da festa são abertas no início de julho. No momento da inscrição, o aluno pode escolher se quer ser "O Amigo do Pablo" na festa ou não. O mais lógico seria escolher a opção Sim, afinal, é um privilégio s...
true
85c740a06fbb9161f1a925a67989f956f5dba9cd
JavaScript
skylyth/blog
/markdown/progress/1-1/1.js
UTF-8
397
3.625
4
[]
no_license
var a = 'Hello World!'; function first() { console.log('Inside first function'); second(); console.log('Again inside first function'); } function second() { console.log('Inside second function'); } first(); console.log('Inside Global Execution Context'); // Inside first function // Inside seco...
true
5a5d46c13fcf4d2b29a842b619bfa0c801b72977
JavaScript
hongmaoxiao/eventemitter8
/test/listeners.test.js
UTF-8
797
2.703125
3
[]
no_license
import EE from '../EventEmitter'; describe('EventEmitter listeners', () => { test('should return empty array when there is no specify type', () => { const ee = new EE(); expect(ee.listeners()).toEqual([]); }); test('should return array with function', () => { const ee = new EE(); const fn = ()...
true
8e51a927d438b22f68198c5732174e8d802fb21b
JavaScript
libsyz/restaurants_with_cart
/app/javascript/plugins/init_show_cart.js
UTF-8
1,826
2.546875
3
[]
no_license
import { csrfToken } from "@rails/ujs"; const initShowCart = () => { const cartContainer = document.querySelector('#cart'); if (cartContainer) { getCart(cartContainer); } } const getCart = (cartContainer) => { if (window.localStorage.order) { // make a post request with the current order // submit...
true
a652d9375d98037bfc8bc7be1d04f8d626b22b4f
JavaScript
ritakanani/javascripting-
/function-arguments.js
UTF-8
132
3
3
[]
no_license
function math(numberOne, numberTwo, numberThree) { return (numberTwo * numberThree) + numberOne; } console.log(math(53, 61, 67));
true
5d7ebdf0c6730aee3876700ecc626ec47b571ed5
JavaScript
andreiskandar/codewars
/7kyu/7kyu-orderedCountOfCharacters.js
UTF-8
450
4.34375
4
[]
no_license
// 7kyu - Ordered Count of Characters // Count the number of occurrences of each character and return it as a list of tuples in order of appearance. For empty output return an empty list. // Example: // orderedCount("abracadabra") == [['a', 5], ['b', 2], ['r', 2], ['c', 1], ['d', 1]] function orderedCount(str) { ...
true
0baba8bd7cae11bae77fbe3a623a1ede40f69e9b
JavaScript
chenshoshana/memegen
/js/meme-service.js
UTF-8
1,853
2.578125
3
[]
no_license
'use strict' var gKeywords = { 'happy': 12, 'funny puk': 1 } var gImgs = [ { id: 1, url: '1.jpg', keywords: ['angry'] }, { id: 2, url: '2.jpg', keywords: ['animals'] }, { id: 3, url: '3.jpg', keywords: ['animals', 'babies'] }, { id: 4, url: '4.jpg', keywords: ['animals'] }, { id: 5, url: '5.jpg', ke...
true
9da5d9797d5f23f06f5ddd00651b37d28baf19a7
JavaScript
Amit0412/congenial-octo-spoon
/TimeTesterproject.js
UTF-8
2,035
3.015625
3
[]
no_license
<!DOCTYPE html> <html> <head> <title>My File</title> <style> #shape{ border: 5 px solid black; height: 200px; width: 200px; border-radius: 50%; background-color: blue; display: none; ...
true
f3835f25d69450ad8be5fe516f058c0bfb95760f
JavaScript
davidwu92/Hangman-Game
/assets/javascript/game.js
UTF-8
4,393
3.875
4
[]
no_license
//word bank const carbon = [`c`, `a`, `r`, `b`, `o`, `n`] const oxygen = [`o`, `x`, `y`, `g`, `e`, `n`] const nitrogen = [`n`, `i`, `t`, `r`, `o`, `g`, `e`, `n`] const chlorine = [`c`, `h`, `l`, `o`, `r`, `i`, `n`, `e`] const fluorine = [`f`, `l`, `u`, `o`, `r`, `i`, `n`, `e`] const plutonium = [`p`, `l`, `u`, `t`, `o`...
true
0422e8abe54bdef41e63d14655a3810f4a83411e
JavaScript
Vimalraveendra/food-recipe
/src/Containers/App.js
UTF-8
2,467
2.671875
3
[]
no_license
import React, { Component } from "react"; import RecipeSearch from "../Components/RecipeSearch"; import "./App.css"; import RecipeList from "../Components/RecipeList"; const API_KEY = process.env.REACT_APP_API_KEY; const APP_ID = process.env.REACT_APP_API_ID; class App extends Component { state = { recipes: [],...
true
b5c3a3159288b9949eb04218dcc9172c9ba75d8d
JavaScript
vasa-c/pizza-test-frontend
/plugins/price.js
UTF-8
747
2.5625
3
[]
no_license
import Vue from 'vue'; Vue.prototype.currentCurrency = function () { return this.$store.getters["price/currentCurrency"]; }; Vue.prototype.price = function (price, count, cur) { const currency = cur || this.$store.getters["price/currentCurrency"], label = this.$store.getters["price/curLabels"]...
true
5daf080ad175ee3bf0b14f9197fad14deae696f2
JavaScript
tonype/cookbook-app
/api/src/controllers/recipes.controller.js
UTF-8
1,494
2.65625
3
[]
no_license
'use strict'; const express = require('express'); const router = express.Router(); const debug = require('debug')('cookbook:recipes'); const Recipes = require('../models/recipes.model'); const listRecipes = async (req, res, next) => { try { const recipes = await Recipes.list(); debug(`returning al...
true
f4942a6fee6264f9bfabd971239290857ba231bd
JavaScript
3StackGames/subtle-scheme
/webserver/controllers/user.js
UTF-8
1,254
2.671875
3
[]
no_license
var mod = module.exports = {} var bcrypt = require('bcrypt') var User = require('../models/user') var userService = require('../modules/userService') /* API Welcome */ mod.isUsernameTaken = function (req, res, next) { var username = req.body.username.toLowerCase() userService.isUsernameTaken(username) ...
true
c8ef9a0f394641a98a6cecc4b979876fa7498a9e
JavaScript
lesimor/nomadcoin
/src/blockchain/utils.js
UTF-8
560
2.671875
3
[]
no_license
const CryptoJS = require("crypto-js"); const createHash = (index, previousHash, timestamp, data, difficulty, nonce) => CryptoJS.SHA256( index + previousHash + timestamp + JSON.stringify(data) + difficulty + nonce ).toString(); const getTimestamp = () => Math.round(new Date().getTime() / 1000); const s...
true
578d59bfae6c15940caa638c4478beffcf9c751a
JavaScript
anders88/sweeper_game
/resources/public/js/instructions.js
UTF-8
769
2.59375
3
[]
no_license
"use strict"; $ (function() { var InstructionModel = Backbone.Model.extend({ url: "/instructions.json", initialize: function () { this.set({host: window.location.origin}) } }); var InstructionsView = Backbone.View.extend({ template: _.template($("#instructionsTe...
true
760b81e4ca507ff09997078c6c0251de09f5e062
JavaScript
juanjosearriaza/project5
/index.js
UTF-8
1,102
2.921875
3
[ "MIT" ]
permissive
const images = document.getElementsByClassName("teddycarousel") function getNames() { fetch('http://localhost:3000/api/teddies') .then((res) => res.json()) .then((data) => { let html = ``; for (i = 0; i < data.length; i++) { images[i].src = data[i].imageUrl; let queryStri...
true
26fa1b1ce1cb954ade7ff8457dcc1132f3c05564
JavaScript
DeanGilewicz/generator-ll-prototype
/app/index.js
UTF-8
10,723
2.65625
3
[]
no_license
'use strict'; // YEOMAN MODULES var yeoman = require('yeoman-generator'); var yosay = require('yosay'); // CORE NODE MODULES - npm install --save [name of module] // be sure to be in generator-[name] directory // EXTERNAL NODE MODULES // https://github.com/sindresorhus/chalk var chalk = require('chalk'); // https://...
true
9cb9ad210fa345ae51279120fa95101a8b80c03b
JavaScript
ecjia/ecjia-daojia
/content/apps/withdraw/statics/js/koala.js
UTF-8
1,684
2.515625
3
[]
no_license
; (function ($) { $.fn.koala = function (selector, options) { var defaults = { delay: 200 }; var events = ["keydown", "keypress", "keyup"]; if (arguments.length === 1 && (typeof (options) === 'undefined' || selector === null)) { options = selector; ...
true
6d6b8ea745c8f15f3355bea237ae08d8f56fe1c6
JavaScript
userotti/cobblestone-keep
/src/components/ui/MapGeneratorPanel.js
UTF-8
3,612
2.546875
3
[]
no_license
import React, { useState } from 'react'; import styled from 'styled-components'; import useStore from '../../store'; const SidePanel = styled.div` margin-left: 0.2rem; padding: 0.5rem; background-color: #567; `; const SidePanelHeading = styled.h4` color: white; font-family: Helvetica; `; const SidePanelC...
true
ce809bce8065ca5eff2964ac04c5a12e9b0de074
JavaScript
joeltonluz/cursoWebModerno
/01.Fundamentos/ternario.js
UTF-8
224
3.6875
4
[]
no_license
//const resultado = nota => nota >= 7 ? "Aprovado" : "Reprovado"; function resultado (nota) { if (nota >= 7) { return "Aprovado" } else { return "Reprovado" } } console.log(resultado(8))
true
32cafff899dc11b057f35385135e939b5c39c44a
JavaScript
glurbi/euler-js
/problem15.js
UTF-8
426
2.8125
3
[]
no_license
"use strict" let done = new Map(); function routes(rights, downs) { let key = rights + "_" + downs; if (done.has(key)) return done.get(key); if (rights == 0 || downs == 0) return 1; let rightRoutes = routes(rights - 1, downs); let downRoutes = routes(rights, downs - 1); let tota...
true
690215d37e3ef244396a5d4b0880ba4dd5f121ac
JavaScript
LanceStasinski/FreeCodeCamp_Practice
/algorithms/dnaParing.js
UTF-8
180
2.53125
3
[]
no_license
function pairElement(str) { const ACID_ARR = str.split('') const PAIRS = { A: 'T', T: 'A', C: 'G', G: 'C' } return ACID_ARR.map(val => [val, PAIRS[val]]) }
true
6823073497decc04d857dd86b464533f7b6c7d3a
JavaScript
qichen-ca/react-pdf
/packages/layout/src/steps/resolveTextLayout.js
UTF-8
1,297
2.625
3
[ "MIT" ]
permissive
/* eslint-disable no-param-reassign */ import * as R from 'ramda'; import * as P from '@react-pdf/primitives'; import layoutText from '../text/layoutText'; const isType = R.propEq('type'); const isSvg = isType(P.Svg); const isText = isType(P.Text); const isNotSvg = R.complement(isSvg); const isNotText = R.complem...
true
2344ccdc676ac7a5bb6e185c540dc034472fef9e
JavaScript
r3ledbetter/Fantegio
/server.js
UTF-8
36,140
3.109375
3
[]
no_license
var server = require('http').createServer(handler); var url = require('url'); var io = require('socket.io').listen(server); var fs = require('fs'); var portNumber = 32421; console.log("Server running on port " + portNumber + "."); server.listen(portNumber); // Listen for initial connection // Execute setupBoard for e...
true
093b0677d9ef074332e4f748eb59fa674bd77a87
JavaScript
kaeltran16/MusicLovers
/MusicLovers/Scripts/app/Controllers/followingsController.js
UTF-8
832
2.640625
3
[ "MIT" ]
permissive
var FollowingController = function (followingServices) { var button; var done = function() { var text = button.text() === "Following" ? "Follow?" : "Following"; button.toggleClass("btn-info").toggleClass("btn-default").text(text); }; var fail = function() { alert("Something went...
true
11631b66349074b55fe932671ef738c9f244236e
JavaScript
eliace/ergo-js
/js/core/events.js
UTF-8
13,949
2.703125
3
[ "MIT" ]
permissive
//= require object /** * @name Ergo.events * @namespace */ /** * * @class * @name Ergo.events.Event * @extends Ergo.core.Object */ // Ergo.defineClass('Ergo.core.Event', 'Ergo.core.Object', /** @lends Ergo.events.Event.prototype */{ // // _initialize: function(baseEvent) { // this.base = baseEvent; // ...
true
9816974dbeaa2d45c366a2d2a90cde475a2cc015
JavaScript
athena0304/leetcode-study
/src/88-合并两个有序数组/index.js
UTF-8
917
3.921875
4
[]
no_license
// 给定两个有序整数数组 nums1 和 nums2,将 nums2 合并到 nums1 中,使得 num1 成为一个有序数组。 // 说明: // 初始化 nums1 和 nums2 的元素数量分别为 m 和 n。 // 你可以假设 nums1 有足够的空间(空间大小大于或等于 m + n)来保存 nums2 中的元素。 /** * @param {number[]} nums1 * @param {number} m * @param {number[]} nums2 * @param {number} n * @return {void} Do not return anything, modify nums...
true
30afd5739103eb747f802010f82d0b3588a9dacf
JavaScript
dan-lee/500-server
/index.js
UTF-8
311
2.515625
3
[]
no_license
#!/usr/bin/env node const port = process.argv[2] || 5000 if (!port) { console.log('Usage: 500-server [PORT]') process.exit(1) } require('http') .createServer((req, res) => { res.statusCode = 500 res.end() }) .listen(port, () => console.log(`The 500-server is running at localhost:${port}`))
true
623ffe395122bcbd228a5a653e2affa2a673883a
JavaScript
yeonhaneul/Nodejs-2020
/09.Node기본/03.process객체의이벤트.js
UTF-8
852
3.234375
3
[]
no_license
// exit 이벤트를 연결 process.on('exit', function(code) { //function과 =>는 같은 역할을 한다. console.log('프로세스가 종료되었습니다.'); console.log('exit code:', code); }); // uncaughtException 이벤트를 연결 process.on('uncaughtException', error => { console.log('예외가 발생했습니다.'); console.log('uncaughtException 매개변수\n', error); }); ...
true
b4074d28d6a731d5703098bfaad6f3f2ecf5da8e
JavaScript
samuelle107/umami-website
/src/components/multi-options.jsx
UTF-8
1,784
2.546875
3
[]
no_license
import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; const MultiCheckBoxContainer = styled.div` display: flex; flex-direction: column; margin: 24px 0; `; const OptionWrapper = styled.p` font-size: 14px; margin: 4px 0; `; const Headi...
true
595cf14ddc288f4e385f9eb7dfa6193d729ed1e6
JavaScript
RandallRobinson4/js-looping-and-iteration-filter-lab-v-000
/index.js
UTF-8
417
3.859375
4
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
// Code your solution in this file function findMatching(array, string) { return array.filter(name => name.toUpperCase() === string.toUpperCase()); } function fuzzyMatch(array, string) { return array.filter(name => name.startsWith(string)) } function matchName(array, string) { let result = [] for (const user o...
true
ae74a3e1c097053c189a13921b995024a7b71b3a
JavaScript
JohnLapis/js-studies
/scope.js
UTF-8
247
3.296875
3
[]
no_license
function t1() { var x = 1; console.log(x); // 1 if (true) { var x = 2; console.log(x); // 2 } console.log(x); // 2 } let a = [1, 56, 5] function t2() { a = 4 a.push(45) return a } console.log(t2())
true
6bf5819bb524d1b275caf9e93573af106903bf5b
JavaScript
liujian10/myBlog
/src/util/common.js
UTF-8
514
2.515625
3
[ "MIT" ]
permissive
/** * Created by liujian on 2017/6/12. */ const setRem = () => { document.documentElement.style.fontSize = document.documentElement.clientWidth * 100 / 1920 + 'px'; }; export const initRem = () => { if (window.addEventListener) { document.addEventListener('DOMContentLoaded', function () { setRem(); ...
true
9a153960527e90345df60b131a4488b8e500f98d
JavaScript
AlbericoD/Game-Typer-Jquery-CSS
/js/events.js
UTF-8
901
2.65625
3
[ "MIT" ]
permissive
function btnReiniciar(tempo) { $("#btn-reiniciar").click(function () { campo.attr("disabled", false); campo.val(""); $("#contador-palavras").text("0"); $("#contador-caracteres").text("0"); $("#tempo").text(tempo); cronometro(campo, tempo); console.log("reinici...
true
666718fe689179ac5cc8f7780f0eee82b5846888
JavaScript
laurenriddle/nutshell
/src/scripts/app/createContentContainer.js
UTF-8
875
2.796875
3
[]
no_license
// Author: Manila Bui // Creates the html for secondary container, which goes into the main container. // This container holds the side nav, primary content for the individual pages + form container. const pages = ["Home", "Events", "Tasks", "Messages", "News", "Friends"]; const createNavLink = page => `<p class="navL...
true
541bc0bfa432f7c8f48fb5441bc0b5fb65bb5a9e
JavaScript
guitassinari/javascript-benchmarks
/increment.js
UTF-8
316
2.59375
3
[]
no_license
var Benchmark = require('benchmark'); var Suite = new Benchmark.Suite; Suite.add('++', function(){ var c = 0; c++; }) .add('Normal sum', function(){ var c = 0; c = c + 1; }) .on('complete', function(){ this.forEach(function(suite){ console.log(suite.toString() + '\n'); }) }) .run();
true
7b2a372f8eb0ff363bd5a5d807146d1f2fc9e98a
JavaScript
prendradjaja/vchess
/client/src/variants/Janggi.js
UTF-8
17,580
2.546875
3
[ "ISC" ]
permissive
import { ChessRules, Move, PiPo } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class JanggiRules extends ChessRules { static get Monochrome() { return true; } static get Notoodark() { return true; } static get Lines() { let lines = []; // Draw all inter-squares lines...
true
1df69700889a7aed30205a824464b6a0d8c9134e
JavaScript
Terence95/removeclassmthod
/dom.js
UTF-8
868
3.5
4
[]
no_license
window.onload = function () { var box = document.getElementById('box'); // alert(hasClass(box,'aa')); // alert(box.className); addClass(box,'ccc'); addClass(box,'aaa'); addClass(box,'bbb'); // 如果要清空className // box.className = 'eee'; //这样就能全部清空了 removeClass(box,'ccc'); ...
true
42e578792a007c833adea46a7c69c46a7b819fa7
JavaScript
britt-ryant/JsBin-work
/JSBin Projects/JS Acessing Arrays/jsbin.lufunit.js
UTF-8
537
3.5625
4
[]
no_license
// Write your code below this line var contacts = [ { firstName: "John", lastName: "Doe", phone: "(512) 355-0453", email: "johndoe@email.com", },{ firstName: "jane", lastName: "Doe", phone: "(312) 641-2203", email: "janedoe@email.com", },{ firstName: "Suzie", lastNam...
true
c1e8f735e0b6da90525b14c188f83cd034fd37c8
JavaScript
Delvoid/FCC-sudoku-solver
/controllers/sudoku-solver.js
UTF-8
3,796
3.4375
3
[]
no_license
const letterToNumber = (row) => { switch (row.toUpperCase()) { case 'A': return 1 case 'B': return 2 case 'C': return 3 case 'D': return 4 case 'E': return 5 case 'F': return 6 case 'G': return 7 case 'H': return 8 case 'I': ret...
true
02ec2016213ee5cf4a0f645f5083f7a5ba77990b
JavaScript
guoshan/qa
/2015/07/03/夜聆风-选项卡-20150703/js/tab.js
UTF-8
2,408
2.5625
3
[ "MIT" ]
permissive
/** * Created by yelingfeng on 2015/7/3. */ var Tab = function(){ var id = "tab" + new Date() - 0 ; var defaultOption = { animateClass: "fadeIn animated", activeClass : "on" } var tab = function(){ this._init.apply(this,arguments); }; tab.prototype = { //初始化 ...
true
1f2a7743bd70a14e847c0539dd86170e1af3a8f9
JavaScript
slashworks/mootools-getClassName
/mootools.getClassName.js
UTF-8
383
2.90625
3
[]
no_license
(function() { "use strict"; Element.implement("getClassName", function(param) { var classArr; if(!param) return false; classArr = this.get('class').split(" "); if(typeOf(param) === 'string') { return classArr.filter(function(item, index) { return item.contains(param); }); } if(!param...
true
6e96f243115db4417edd2f309642f22836bd08b4
JavaScript
johntvale/Exercicios-Trybe
/Bloco_4/Dia_4/exemplos/For In.js
UTF-8
662
3.71875
4
[]
no_license
// Declaração do objeto Pizzas let pizzas = { sabor: 'Palmito', preco: 39.90, bordaCatupiry: true }; // Console.log(KEY) Exibe as chaves atribuídas no objeto pizzas for (let key in pizzas){ console.log(key); } // Console.log(PIZZAS) Exibe tudo por 3 vezes, conforme a quantidade de keys no objeto. for (let key...
true
fc17f7eca3bf18dc412699ea533b8e1e53bf5ea7
JavaScript
Abh1shekSingh/Hactoberfest-First-PR
/Websites/Music Player/index.js
UTF-8
2,771
2.84375
3
[]
no_license
window.onload = function () { document.getElementById("loading").style.display = "none"; const songs=[{ id:1, name:"Jaan Meri Jaa Rahi Sanam", singer:"Jubin Nautiyal, Tulsi Kumar", source:"1.mp3" }, { id:2, name:"Sanseinn", singer:"Sawai Bhatt", ...
true
24e4fb7529f56cbe8282f6257221628c7317a3ee
JavaScript
lexyblazy/Algorithms-DataStructures-Playground
/Algorithms/palindrome/index.js
UTF-8
383
2.96875
3
[]
no_license
const _clean = str => str.replace(/[^a-zA-z]/g, "").toLowerCase(); const palindromes = str1 => { return ( _clean(str1) .split("") .reverse() .join("") === _clean(str1) ); }; const palindromes2 = str => { str = _clean(str); return str.split("").every((s, index) => s === str[str.length - 1...
true
7da6e2aaeab8a690a3ec99b059bd525d5e4a4ab1
JavaScript
CooperAleks/jbk-mzn
/src/js/components/_popup.js
UTF-8
1,112
2.65625
3
[]
no_license
import {OVERLAY, DOC, BODY} from '../constants'; const ACTIVE = 'is-active', NOSCROLL = 'no-scroll'; class Popup { constructor(options) { this._target = $(options.target); this._showHand = $(options.showHand); this._hideHand = this._target.find(options.hideHand); this._init(); } _read(e) { const t...
true
8e9ab71163134f34edc69a7ccbb1c990a33c9928
JavaScript
michalkiv25/Pixabay
/js/search/app.js
UTF-8
1,083
2.671875
3
[]
no_license
let picQuan =30; let cont = 0 window.onload=()=>{ init() } let init=()=>{ let elem = document.getElementById("root") elem.innerHTML=` <div class="container" id="topDiv"> <h1>Your search page </h1> <small id="counter"></small> <div class="row"> <label for="userInput">What are you searching for? </label> ...
true
06dc1b3ee7c0523d5d853c462641bd79d8437d2e
JavaScript
xyos/paging
/FIFO.js
UTF-8
450
2.671875
3
[]
no_license
exports.run = function(data,frames){ var queue = new Array(); var page_faults = 0; if (frames == 0) return data.length; for (var i = 0; i < frames; i++) { queue.push(''); }; for (var i = 0; i < data.length; i++) { if (find(queue,data[i])){ } else { queue.shift(); queue.push(data[...
true
8e0fa9f2d86fadb8650fb3a510dbd9bf3019d560
JavaScript
victorocna/chess-viewer
/src/functions/getMoveNumber.js
UTF-8
183
2.71875
3
[]
no_license
export const getMoveNumber = (fen) => { const split = fen.split(' '); const side = split[1]; const fullmove = split[5] * 1; return side === 'w' ? fullmove - 1 : fullmove; };
true
6efae6824883e8a2253cda7c15b200bdc4bbf72b
JavaScript
AndreGeng/EsitNewsReaderV04
/Source/lib/hpit/source/Utils.js
UTF-8
1,621
2.734375
3
[]
no_license
/** * HP IT Mobility Framework 5.0 * Copyright 2012 (c) HP * * Utility functions. */ hpLogin.Utils={ /** * <p>Gets the String that is nested in between two Strings. * Only the first match is returned.</p> */ substringBetween: function(str, open, close){ if(str && open && close){ ...
true
6740f65374e480cfb3bc00abc59044d3a50235a9
JavaScript
arronharden/pi-weather-app
/server/routes/measurements.js
UTF-8
1,210
2.515625
3
[]
no_license
var express = require('express') var router = express.Router() var measurementsControllers = require('../controllers/measurements-controller') /* GET measurements listing. */ router.get('/', function (req, res, next) { _invokeController(measurementsControllers.getMeasurements, req, res) }) router.get('/summary', fun...
true
f1ade6566d5e21f30b2828dd7882a53bd1453f9e
JavaScript
wgwolanski/dawgpizza
/orders/pizza-scripts.js
UTF-8
2,572
3.15625
3
[]
no_license
$(function(){ // $(".sort-ui .btn").removeClass("active"); // render(Employees.entries); // $(".sort-ui .btn").click(function() { // var sortBtn = $(this); // sortObjArray(Employees.entries, sortBtn.attr('data-sortby')); // render(Employees.entries); // sortBtn.addClass("a...
true
7cdc0500fc0c45a568c668cb4c57fc1be6f28fe4
JavaScript
oleoneto/Bottler
/Templated/static/js/albums.js
UTF-8
4,301
2.796875
3
[ "MIT" ]
permissive
/* // albums.js // Developed by Leo Neto on Dec 18, 2017. // Ekletik Studios. Open-source License. */ var allSongs = $('audio'); var songIcons = $('button > i'); var pageTitle = document.getElementsByTagName('title'); var mainTitle = pageTitle[0].textContent; var currentSong; var currentButton; var currentIcon; var c...
true
540990efe3385500efc505b05455b9a3ee7428fb
JavaScript
tormibg/SoftUni
/Homework/JavaScriptAdvanced/01/Problem08.ConsoleModule/app.js
UTF-8
1,890
3.203125
3
[]
no_license
(function () { 'use strict'; var specialConsole = (function () { var replacePlaceHolders = function (msg, args) { var pattern = new RegExp(/{(\d+)}/g), match = pattern.exec(msg), strToReplace, indexOfArgument, tex...
true
4868678400370aac7cefd19e1b8c6fbd7a82d29f
JavaScript
joycejoycejoyce/yumibuy
/src/Pictures/Pictures.js
UTF-8
732
2.515625
3
[]
no_license
import React from 'react'; class Picture extends React.Component{ constructor(props){ super(props); } state={ pictures: [], } componentDidUpdate(prevProps){ const self = this; // handle picture display if (prevProps.pics !== self.props.pics){ ...
true
474b69865e0aa3317f105e5686daf12df45e92f2
JavaScript
brenohennrique/Project_Node_Vue
/expressRoutes/profileRoutes.js
UTF-8
1,655
2.65625
3
[]
no_license
'use strict'; import express from 'express'; var app = express(); var profileRoutes = express.Router(); // Require Profile Model in our routes module var Profile = require('../models/Profile'); // Defined store route profileRoutes.route('/add').post( (req, res) => { var profile = new Profile(req.body); profile...
true
3356b3520ce7580b60cb0cf3eb69ac68dac7ff13
JavaScript
kam3r0nz/js-advanced-functions-generalized-map-and-reduce-lab-onl01-seng-pt-070620
/index.js
UTF-8
424
3.109375
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function map(obj, fn) { const array = [] for (const key in obj) { array.push(fn(obj[key])) } return array } function reduce(src, fn, accumlator) { const keys = Object.keys(src) let i = 1 if (accumlator) { i = 0 } else { accumlator = src[keys[0]] } for (i;...
true
e1a840d11038e416a48ebd249a501874b9c15a5e
JavaScript
moliayesha7/post_category_backend_api
/src/models/post.model.js
UTF-8
2,490
2.8125
3
[]
no_license
var dbConn = require('../../config/db.config'); var Post = function (post) { this.title = post.title; this.slug = post.slug; this.author = post.author; this.content = post.content; this.status = post.status ? post.status : 1; this.created_at = new Date(); this.updated_at = new Date(); } //...
true
c4d1123d961ca2e441d13db7958f1ff58861fd67
JavaScript
Code-Stallions/Feed-the-horse
/NRH/JavaScript/main.js
UTF-8
37,830
3.015625
3
[]
no_license
$(document).ready(function() { //Result field loader// $('.numbersOnly').keyup(function() { // It will only allow numbers to be entered in the text field// this.value = this.value.replace(/[^0-9\.]/g, ''); }); $('#ResultBody').hide(); // It hiddes the result window but its reveled after button is c...
true
069e8ef1962a9c83662b62b6a6d604d952b18aa8
JavaScript
tranvu14/PreTest
/Snake/snake.js
UTF-8
2,116
3.359375
3
[]
no_license
(function() { var board = document.querySelector("#board"); for (let i = 0; i < 20; i++) { var tr = document.createElement("tr"); tr.setAttribute("id", `${i}`); for (let j = 0; j < 20; j++) { var td = document.createElement("td"); td.setAttribute("id", `r${i}c${j}...
true
e4977e93ec7e5bf824a322fdcacef4b8b395ee28
JavaScript
vwelve/animelee
/commands/charinfo.js
UTF-8
2,470
2.734375
3
[]
no_license
exports.run = (client, message, args) => { if(!client.profile.has(message.author.id)){ return message.channel.send("You have not started Animelee!") }; let checking = args[0]; let characters = client.profile.get(message.author.id, "characters") if (0 < checking && checking <= charact...
true
b787f6658f6ca9d9eaf0e6027bfaef52490b7a1d
JavaScript
FDunigan/TriviaGame
/assets/javascript/app.js
UTF-8
855
3.484375
3
[]
no_license
var i = 30; function timer() { var x = document.getElementById("timer").innerHTML = i; i--; } var m = setInterval("timer()", 1000); function xx() { clearInterval(m); } setTimeout("xx()", 31000); function checker() { var question1 = document.quiz.question1.value; var question2 = document.quiz.qu...
true
3592c9855248adf8c31842fbfbe0bb7defdbe914
JavaScript
tlapana/sipuliton
/client/src/modules/login/components/LoginGlobalFunctions.js
UTF-8
3,017
2.515625
3
[]
no_license
//Tried to get this work but didn't get this working const AuthApi = require('aws-amplify'); var userLoggedIn = false; var authenticatedUserData = {}; function configure(config){ AuthApi.Auth.configure({ Auth: { mandatorySignIn: false, region: config.cognito.REGION, userPoolId: config.cognito...
true
faac070856e2dcf9358b96b377abfb25f3ffa067
JavaScript
charlesjamb/foodme-withAuth0
/src/views/Fridge/Fridge.jsx
UTF-8
1,638
2.515625
3
[]
no_license
import React, {Component} from 'react'; import './../Home/Home.css'; import './../grid.css' import Ingredient from './../Ingredient/Ingredient'; export default class Fridge extends Component { constructor(props) { super(props); this._handleButtonClick = this._handleButtonClick.bind(this); this._copyIngr...
true
7046697eb3226dd99c787675d5582ff5a4b7d66b
JavaScript
Tiago-130414/-OLC1-Proyecto2_201313722
/Go/src/template-files/js/Guardar.js
UTF-8
848
2.78125
3
[]
no_license
function abrir_archi() { //buscando elementos var pestanaAct = document.getElementsByClassName("tab-pane fade in active"); var cajatxt = pestanaAct[0].getAttribute("id"); //obteniendo texto var txt = document.getElementById('text'+ cajatxt).value; console.log("texto en caja: " + txt); //definiendo tit...
true
be2d53603407190f214d8fc23dd2c6b606b54e0a
JavaScript
Belyenochi/Jason-Tomas-
/parser/backDescent.js
UTF-8
1,764
3.359375
3
[]
no_license
const assert = require('assert'); /* Grammar: S->sAd A->ab|c */ class compilerEngile { constructor(input) { this.input = input; this.cursor = 0; } compilerS() { this.eat('s'); this.compilerA(); this.eat('d'); } compilerA() { let save; ...
true
1f66740ee7904780e458fe1243faa41e4cf0ffd6
JavaScript
felippenardi/lottie-react-web
/src/stories/TransitionWithOptions.js
UTF-8
1,498
2.90625
3
[ "MIT" ]
permissive
import React from 'react'; import Lottie from '../index'; import * as animationDataA from './TwitterHeart.json'; import * as animationDataB from './beating-heart.json'; /** * TransitionWithOptions: demonstrates how you can switch to a * new animation with different options. For example, you can start * with a loope...
true
ff59b7abc6c5e72178c44dd44ec8a0ddaaae4a4b
JavaScript
JapaJordan/CursoJavascriptDalton
/Nivel 1/Capitulo_1/problema1_1.2/cofla.js
UTF-8
3,694
2.640625
3
[]
no_license
let moneyCofla = prompt("Cuanto dinero tienes Cofla: "); let moneyRoberto = prompt("Cuanto dinero tienes Roberto: "); let moneyPedro = prompt("Cuanto dinero tienes Pedro: "); let moneysinTecho; let ticketLotery = 1.5; moneyCofla = parseInt(moneyCofla); if (moneyCofla >= 0.6 && moneyCofla < 1) { alert("Comprate el he...
true
712e59c34b83c13c6d9f7af0ca3606057c427436
JavaScript
beerwithstraw/JavaScript-Projects
/countdownTimer/script.js
UTF-8
840
3.671875
4
[]
no_license
const daysF = document.getElementById('days'); const hoursF = document.getElementById('hours'); const minutesF = document.getElementById('minutes'); const secondsF = document.getElementById('seconds'); const ganjebday = "1 January 2021"; function countdown(){ const bdayDate = new Date(ganjebday); const cu...
true
2bd4001f11a31d230ac6f6d2834b3ceb8fb4d5b9
JavaScript
YagneshP/contactkeeper
/models/User.js
UTF-8
1,134
3
3
[]
no_license
const mongoose = require('mongoose'); const bcypt = require('bcryptjs'); const UserSchema = mongoose.Schema({ name: { type: String, required: true }, email: { type: String, required: true, unique: true }, password: { type: String, required: true }, Date: { type: Date, default: Date.now } }); ...
true
fc85be709c20bafffd9275b69fe09bd9d7b134a7
JavaScript
0villads0/image
/main.js
UTF-8
186
2.703125
3
[]
no_license
window.addEventListener("load", () =>{ image() }); function image(){ link = document.createElement("a") link.href = "berd.png" link.download = "image.png" link.click() }
true
cdd9eb6a6ba7fe783174f4ebb02adff94ec7c7fc
JavaScript
cleidigh/ThunderKdB
/xall/x68/611-signature-switch/src/compose/compose.js
UTF-8
2,968
2.765625
3
[]
no_license
browser.runtime.onMessage.addListener(request => { switch (request.type) { case "ping": return Promise.resolve("pong"); case "appendSignature": if (request.value.prepend) { document.body.appendChild(createElement(request.value.prepend)); } ...
true
491134924b2c15840e137bd5f7eebcf83f6bef55
JavaScript
ogr1k/1000573-what-to-watch-4
/src/reducer/data/data.js
UTF-8
6,389
2.53125
3
[]
no_license
import {extend} from "../../utils.js"; import {AppRoute} from "../../constants.js"; const initialState = { films: [], isFilmsFetching: false, promoFilm: {}, comments: [], isFavouriteFetching: false, favouriteFilms: [], isServerAvailable: true }; const parseFilmData = (film) => { if (!film) { retu...
true
605a4ec320e1bd255cccd335eba2b608e00f18bf
JavaScript
Ivonne5/lim-2018-05-bc-core-am-cipher
/src/index.js
UTF-8
550
3.25
3
[]
no_license
//llamando a mis variables// let offset=document.getElementById("offset"); let string=document.getElementById("string"); //generando evento para desencadenar la funcion cifrar// document.getElementById("encode").addEventListener("click",()=>{ document.getElementById("change").value=cipher.encode(offset.value, str...
true
92d0519c2885a701b6683b72bac41e3decdac697
JavaScript
samanthajuniper/TG-Pre-Work
/Code-Academy-Exercises/Introduction-To-JavaScript/Arrays/Create-an-Array.js
UTF-8
299
4
4
[]
no_license
const hobbies = ['cooking', 'crafting', 'coding']; console.log(hobbies); /* The variable "hobbies" on line 1 is assigned an array, denoted by square brackets, that contains three strings. When this variable is logged to the console the following is printed: [ 'cooking', 'crafting', 'coding' ]. */
true
f82f7f36b1133b56dd97167da5d799de7c27860f
JavaScript
fushengruomengzhang/vue3-sfc-loader
/src/bootstrap.js
UTF-8
2,010
2.921875
3
[ "MIT" ]
permissive
// polyfill only stable `core-js` features - ES and web standards: import "core-js/stable"; /* no longer needed // 1/ // // add sticky flag support // // src: https://github.com/paulmillr/es6-shim/issues/376#issue-118172552 if ( !('sticky' in global.RegExp.prototype) ) { const OriginalRegExp = global.RegExp; ...
true
1c9132bcd9b5f14ea355bbc1e60b168b90ba5878
JavaScript
seokheecho/bitcamp-cloud-computing
/bitcamp-nodejs/src/step01/ex01.js
UTF-8
1,155
3.21875
3
[]
no_license
// 주제: Node.js 소개 // Node.js? // - 구글에서 공개한 V8 자바스크립트 엔진을 사용하여 // 웹브라우저 밖에서도 자바스크립트를 실행할 수 있도록 만든 프로그램이다. // - 자바스크립트 기본 API를 그대로 사용할 수 있다. // - 웹브라우저에서 실행하는 것이 아니기 때문에 // 웹브라우저에서 제공하는 window, history, location, navigator, // screen, document API는 사용할 수 없다. // - Node.js는 데스크톱의 자원을 직접 사용할 수 있도록 별도의 라이브...
true
190dc9b2f551f810aafbb0205a806038a34dbc9e
JavaScript
channy666/test
/week2/ALG101/2-8-3.js
UTF-8
199
3.3125
3
[]
no_license
function devide (num) { var devideNum = [] for (var i = 1; i <= num; i++) { if (num % i === 0) { devideNum.push(i) } } console.log(devideNum) } devide(52)
true