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
c5a3af46effc62e6e68caa2f082cd78ba231f796
JavaScript
codecolony/nodejs
/prime numbers/prime.js
UTF-8
437
3.125
3
[]
no_license
#!/usr/bin/env node var fs = require('fs'); var outfile = "primes.txt"; var arr = [2]; var not_prime = false; for(i=3;arr.length<100;i++){ for(j=2;j<=Math.ceil(Math.sqrt(i));j++){ if(i%j===0){ not_prime = true; break; } } if(not_prime === false) arr.push(i); not_prime = false; } out = arr.toString()+...
true
9a3bcac4d1b91d1ff1c8aa610c6dec08e0583d78
JavaScript
jordanabderrachid/velo-app
/public/js/services/map.js
UTF-8
894
2.640625
3
[ "MIT" ]
permissive
'use strict'; angular.module('velo-app').factory('mapService', ['stationService', function (stationService) { var map; return { buildMap: function (onClick) { map = L.mapbox.map('map', 'mapbox.streets'); map.on('click', onClick); return map; }, d...
true
06d3accf2a9cd7a196b7381fabfe3bd35e0565b7
JavaScript
kostadinlambov/kl-instagram
/instagram/client/src/infrastructure/userService.js
UTF-8
3,324
2.640625
3
[ "MIT" ]
permissive
export const userService = { isAuth: () => { const token = localStorage.getItem("token"); if (token !== null && token !== undefined) { try { const payload = JSON.parse(atob(token.split(".")[1])); const role = payload["role"]; if (payload) { if (role !== null || role !=...
true
51d069c319948757160903a1f5a782b60503b643
JavaScript
IgorGorbov/music-with-react
/src/api/index.js
UTF-8
1,363
2.640625
3
[]
no_license
import axios from 'axios'; import { SERVER_USERS_URL } from '../constants/ApiConstants'; import { FORM_LOGIN, FORM_REGISTER } from '../constants/Validate'; export const fetchData = async url => { return await axios.get(url).then(response => response.data); }; export const postData = async (url, data) => { return ...
true
076eb2c469956ded725fffa5aeb1df658cfb7f9e
JavaScript
riyajk/react-movie-mania
/src/actions/movie.js
UTF-8
700
2.5625
3
[ "MIT" ]
permissive
import axios from 'axios'; const loadMovies = (movieList) => ({ type: 'LOAD_MOVIE_LIST', movieList }); export const fetchMovieList = () => { return (dispatch, getState) => { let startDoc = getState().movie.startDoc, limit = getState().movie.limit; axios.get(`http://localhost:3001/movie?start=${sta...
true
167b9ce107d5bc561d43c4df6b2d12093736bc7a
JavaScript
openseattle/convictionvacation
/src/logic/type/CalculatorOutput.js
UTF-8
769
2.734375
3
[ "MIT" ]
permissive
export class CalculatorOutput { constructor(targetDate, convictions) { this.targetDate = targetDate; this.convictions = convictions; } getConviction(id) { let matchingConviction = null; this.convictions.forEach(conviction => { if (conviction.id === id) { matchingConviction = convict...
true
0b0b2257762e72aa89ffdcb0ab1fb4f209df946d
JavaScript
Zippo-81/module14_homework
/14.4_task5.js
UTF-8
633
3.5
4
[]
no_license
if (localStorage.getItem("name") === null) { let ask = prompt('Назовите пожалуйста Ваше имя'); let date = new Date().toLocaleDateString(); let time = new Date().toLocaleTimeString().slice(0,-3); localStorage.setItem("name", ask); localStorage.setItem("date", date); localStorage.setItem("time", time); } els...
true
43a502b1ca1e46bdb25253eaa8f3895408ae8bf3
JavaScript
m1mzz/react_test-2
/src/store/reducers/weather.js
UTF-8
642
2.734375
3
[ "MIT" ]
permissive
import { GET_WEATHER, SET_WEATHER, SET_WEATHER_LOADING, SET_WEATHER_ERROR } from '../actions/actionsTypes' const defaultState = { weather: null, isLoading: false, error: '' } function reducers(state = defaultState, action) { switch (action.type) { case GET_WEATHER: return state case SE...
true
761c0f9a57e8aa65b195405d71ba6901cbb96490
JavaScript
ericguti90/COFB_FIB
/public/js/search.js
WINDOWS-1252
2,188
3.125
3
[ "MIT" ]
permissive
function isHTML(str) { var a = document.createElement('div'); a.innerHTML = str; for (var c = a.childNodes, i = c.length; i--; ) { if (c[i].nodeType == 1) return true; } return false; } findOnArray = function(array_search, arg) { var special_chars = {"":"A", "":"A", "":"E", "":"E", ""...
true
90f09d1c0a70f148c3cb35fcb3b8265e58fc59a2
JavaScript
JimmyLv/dojo-scaffold-js
/src/dojo/fizzBuzz.test.js
UTF-8
467
2.5625
3
[ "Apache-2.0" ]
permissive
import { fizzBuzz } from './fizzBuzz' describe('Test FizzBuzz', () => { const testCases = it.each` input | expected ${1} | ${'1'} ${3} | ${'Fizz'} ${5} | ${'Buzz'} ${15} | ${'FizzBuzz'} ${100} | ${'Buzz'} ` testCases( 'should return $expected when given $input...
true
227b7ed30b66006c8896f64f2ac77873016e911f
JavaScript
pY6xJKN8pN/rosaenlg
/packages/rosaenlg-countries/lib/countries.js
UTF-8
601
2.53125
3
[ "ODbL-1.0", "CC-BY-4.0", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
/** * @license * Copyright 2019 Ludan Stoecklé * SPDX-License-Identifier: Apache-2.0 */ /* eslint-disable @typescript-eslint/no-unused-vars */ const countries_LANG = JSON.parse(COUNTRIES_PLACEHOLDER); function getCountry_LANG(ids) { let key; if (ids.cca2) { key = 'cca2'; } else if (ids.cca3) ...
true
1d19e8f2752f93426bbfd2c541960973a9ec5bcb
JavaScript
rishallen/front-end-expecting
/src/components/Post.js
UTF-8
2,423
2.578125
3
[ "Apache-2.0" ]
permissive
import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import './Post.css'; import PostList from './PostList' const axios = require('axios'); const Post = (props) => { // const[message, setMessages] = useState([]); // const getMessages = () => { // axios /...
true
b7738e8eea8840bed12f16c245365a6af16b3294
JavaScript
hankyulkim93/cruddy-todo
/datastore/index.js
UTF-8
3,780
2.515625
3
[]
no_license
const fs = require('fs'); const path = require('path'); const _ = require('underscore'); const counter = require('./counter'); var items = {}; // Public API - Fix these CRUD functions /////////////////////////////////////// exports.create = (text, callback) => { counter.getNextUniqueId((err, id) => { fs.writeF...
true
1f17c08c0287cf7639af0ad8f306a98fbcea5ec4
JavaScript
Calvinh7/vshcool-assignments
/exercises/10.2-10.6/warmups/treasure/main.js
UTF-8
1,259
3.453125
3
[]
no_license
// var inscription = ("Banh mi woke skateboard ipsum ipsum lorem, kombucha scenester banjo. Franzen mlkshk consequat, PBR&B irony listicle irony pop-up sriracha salvia. Shabby chic eu iceland next level iceland iceland drinking vinegar fanny pack woke minim chicharrones migas.") // var arr = inscription.split(" ").sort...
true
f329d7272f31d55879f57fa2bb38607893c933a2
JavaScript
sfreeley/kennel-sf
/src/components/employees/EmployeeEditForm.js
UTF-8
5,020
3.265625
3
[]
no_license
import React, { useState, useEffect } from "react"; import EmployeeManager from "../../modules/EmployeeManager"; import LocationManager from "../../modules/LocationManager"; const EmployeeEditForm = props => { //(1) useState declared and will render whatever is returned (when rendering, initially every value will ...
true
172aaf84d8e7ee6b2f69eb69fde1de3f4163cb40
JavaScript
suna05/javascript01
/step04/test16.js
UTF-8
700
4.5625
5
[]
no_license
//3월 21일 - 함수의 아규먼트를 받아 저장하는 내장 변수 "arguments" "use strict" function f1(){ console.log(arguments.length) console.log(arguments) console.log("-----------------------------------------") } f1() f1(10) f1(10, 20, 30) f1(10, 20, 30, 40) function f2(a, b) { console.log(arguments.length) console.log(arguments) ...
true
0381326b54e128f74f745edb5cd481b60749a67f
JavaScript
nidhinkk23/TestYantra-ELF-13TH-DEC-Nidhin_K_K
/React-JS-Concept/Dec-11/ConditionalRendering/cr.js
UTF-8
2,070
3.125
3
[]
no_license
class ConditionalRendering extends React.Component { constructor(props) { super(props) this.state = {//inside constructor use this. adminName: 'Chandru', userName: 'Guru', isAdmin: false, adminId: 100, userId: 200 } } chang...
true
c76d3c382fd4a71eb22f2f424c120c0c2aaf2db5
JavaScript
shelterCrazy/shelter
/WarriorFightingDemo/packages/consolerx/core/manager.js
UTF-8
4,105
2.828125
3
[]
no_license
'use strict'; // 数据源,从外部获取 log 信息后,就直接存在这里 var __messages = exports.list = []; // 显示数据,从数据源筛选出来的显示数据 // 这个数据直接用于 vue 的数据绑定 // 所以应该避免使用 array[i] = xxx 这样的用法 // 只能够使用 pop() splice() push() 等方法,否则会破坏数据绑定 var __RenderItems = exports.RenderItems = null; exports.SetRenderItemsBy = function ( array ) { __messages.length =...
true
97cc75f5a66e2d77f61af565dc3a246f0937a293
JavaScript
SerhiiShemehon/weblink-test
/src/app/setRadioInput.js
UTF-8
474
2.8125
3
[]
no_license
const setRadioInput = (container, label, data) => { if (data[label] === "undefined" || !data[label]) { return false; } const labels = container.querySelectorAll('label'); labels.forEach((elem) => { const labelText = elem.innerText.toLowerCase(); const labelInput = elem.querySele...
true
aa181046f83be42e0d2c0fc2aece1a6b8964643a
JavaScript
ketangupta34/ProjectWhatNext
/script/script1.js
UTF-8
1,051
2.6875
3
[]
no_license
//Nav Bar animation on scroll function navScroll() { console.log("Scrolled function"); var top = document.getElementById("navbar"); var ypos = window.pageYOffset; console.log(ypos); if (ypos > 660) { top.style.background = "rgba(60,60,60,1)"; } else if (ypos > 630) { top.style.background = "rgba(60,...
true
a7f011d69ea24a008eb3d7b34a2262bab055b9c7
JavaScript
jorgam8/redsocial.io
/js/ForUsuarios.js
UTF-8
1,608
2.875
3
[ "CC0-1.0" ]
permissive
import {cod} from "../libs/utils"; import {InfoPasatiempos} from "./InfoPasatiempos"; import {InfoPrivilegios} from "./InfoPrivilegios"; const SIN_PASATIEMPO = /* html */ `<option value="">-- Sin Pasatiempo --</option>`; export class ForUsuarios { /**@param {InfoPrivilegios} privilegio */ renderP...
true
cf4381a55b2d02c39e4d32763e10689cbaf2b816
JavaScript
eGluZl/algorithm
/src/dp/fbi.js
UTF-8
302
3.3125
3
[]
no_license
/** * @param {number} n * @return {number} */ const fib = function (n) { if (n < 1) {return 0} if (n === 1 || n === 2) {return 1} let prev = 1, curr = 1 for (let i = 3; i <= n; i++) { const sum = prev + curr prev = curr curr = sum if(i === n){ return curr } } }
true
018b27ab3dd38e7301da2450009a9926cd53568c
JavaScript
gpanah/lernen
/leetcode/algorithms/longestPalindromicSubstringDual.js
UTF-8
2,741
3.40625
3
[]
no_license
module.exports = function(s) { //Whole string is palindrome if (isPalindrome(s)) { return s } let longestPalindrome = s.substring(0,1) if (s.length >= 2 && isPalindrome(s.substring(0,2))) { longestPalindrome = s.substring(0,2) } let chars = s.split('') let dict = {} for(i=0; i < chars.length;...
true
87c801052a51ac29d9141bf0b83e2a0446d377aa
JavaScript
mbublitz1/JavaScript
/Oct 19 - Node List/NodelistIntro/Scripts/main.js
UTF-8
782
3.65625
4
[]
no_license
var select = document.querySelector('.items') select.addEventListener('change', function (evt) { //create a list depending on the number of list items the user selects var numOfItems = evt.target.value; var list = '<ul>'; var count; for (count = 0; count < numOfItems; count++) { list = list + '<li>' + '<inpu...
true
b5abc12ef0962026c4e23b16887d4e07bfc5c79b
JavaScript
DenisKamchatov/JS
/Hard-JS/closure-func.js
UTF-8
1,446
4.0625
4
[]
no_license
/* ФУНКЦИИ ЗАМЫКАНИЯ */ /* Мы вызываем функцию urlGenerator и в параметр записываем в domain. Внутри этой функции возвращаем еще одну функцию, параметром которой является url и которая возвращает какое-то значение. Чтобы данная функция работала нормально нужно создать функцию (comUrl) и присвоить ей значен...
true
063f4011c622b8f28c2764b9aaebcca13dc11cb9
JavaScript
ivicakopes/G-project
/src staro/Details.js
UTF-8
1,345
2.53125
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; import fire from './config/Fire'; class Details extends Component { constructor() { super(); this.state = ({ user: null, curentUser: null, }); this.authListener = this.authListener.bind(this); } component...
true
5388f42adb727c74b91f4f6c608951a50dfb1657
JavaScript
r5atom/insufficient-fare
/docs/_script/insuffare.js
UTF-8
2,478
2.765625
3
[]
no_license
function insuffare (CurBalStr) { var CurBal = Number(CurBalStr) var SingleFare = 2.75 //var SingleFare = 1.35 var BonusThres = 5.5 var BonusPerc = 1.05 var BuyUnit = 0.05 var UseBonus = true var Silent = true var FixRounding = true var pageTar = document.getElementById("PageTarget") // id where to wr...
true
65772631468dd6bc34ad742f6ead19dcc8c8e777
JavaScript
themooserooster/creative-coding-week-4
/CreativeCoding.Star.js
UTF-8
3,012
3.203125
3
[]
no_license
var CreativeCoding = CreativeCoding || {}; (function () { CreativeCoding.Point = function (x, y) { this.x = x; this.y = y; } CreativeCoding.Rectangle = function (x, y, width, height) { this.x = x; this.y = y; this.width = width; this.height = height; ...
true
7d4cf1ab9c53c361bb8afb7df7b1492aec04dba8
JavaScript
DanielSeehausen/fi-field-day
/code/old-for-reference/browser-board-client/src/conn/wsInit.js
UTF-8
1,010
2.546875
3
[]
no_license
import config from '../config.js' import { setCellValue, setCellValues } from './receive' const GREETING = "Client websocket opened" const FAREWELL = "Client websocket closed" const ERROR = "Client websocket errored" const wsConn = wsConn || new WebSocket(config.WSSERVERENDPOINT) const dispatcher = { 'setTile': se...
true
8662fe6b1effcd137f71f68bfe2dca2441927b04
JavaScript
wfabror/praxis-academy
/novice/01-02/latihan/pengendali alur/conditionalStatementIf-Else.js
UTF-8
113
3.328125
3
[]
no_license
let x = 4; let y = 3; if ((x === y)) { console.log("Angka Sama!"); } else { console.log("Angka Beda!"); }
true
db63e9ccd0b34d257c5cc3a6bd4aefebe5b2ecc4
JavaScript
mars8256/bitacora
/actividad.js
UTF-8
1,393
2.859375
3
[]
no_license
const url = 'http://www.502sdhs.com/bitacora/actividad' const txtId = document.getElementById('txtId') const txtDescripcion = document.getElementById('txtDescripcion') function fetchActividades(){ fetch(url) .then(response => response.json()) .then(data => loadTableData(data)) } function fetchSaveActi...
true
47ff96b545358d2be485e7d192e96752c8d48b4b
JavaScript
TTumyr/Canvaz
/src/art/Insidiae/script.js
UTF-8
1,540
2.703125
3
[ "MIT" ]
permissive
const canvas = document.getElementById("koreanFlagCanvas"); const krFlg = canvas.getContext("2d"); krFlg.fillStyle = "#fff"; krFlg.fillRect(0, 0, 600, 400); krFlg.translate(135, -125); krFlg.rotate((30 * Math.PI) / 180); krFlg.fillStyle = "#000"; krFlg.fillRect(100, 150, 15, 100); krFlg.fillRect(125, 150, 15, 100);...
true
2b442ccdb1b5a40039d56f5f07590348e9b88470
JavaScript
omedvedew/startup
/app.js
UTF-8
1,775
2.59375
3
[]
no_license
// mobile-menu script let burgerBtn = document.querySelector(".burger"); console.log(burgerBtn); let mobileMenuWindow = document.querySelector(".mobile-menu"); function showMobileMenu () { mobileMenuWindow.classList.toggle("mobile-menu-active"); burgerBtn.classList.toggle("burger-active"); }; burgerBtn.addEve...
true
2d5c57bc76dada958ba0ca3184b932e826e75f09
JavaScript
FakeTerrible/js-Algorithms
/Algorithm/reverseList.js
UTF-8
526
3.140625
3
[]
no_license
import ListNode from "../DataStructure/ListNode.js"; // 翻转链表 /** * * @param {ListNode} head * @returns {ListNode} */ var reverseList = function (head) { // 判断链表是否为空或只有一个节点 if (head == null || head.next == null) { return head; } // 迭代方式进行反转链表 let p = null, cur = head, next; whi...
true
990d2391c6217aee113114de0c2b6d7a1a28e5ee
JavaScript
mfulton26/d3-array
/test/extent-test.js
UTF-8
4,445
3.0625
3
[ "BSD-3-Clause" ]
permissive
const tape = require("tape-await"); const d3 = require("../"); tape("extent(array) returns the least and greatest numeric values for numbers", (test) => { test.deepEqual(d3.extent([1]), [1, 1]); test.deepEqual(d3.extent([5, 1, 2, 3, 4]), [1, 5]); test.deepEqual(d3.extent([20, 3]), [3, 20]); test.deepEqual(d3.e...
true
c398c536fad5fb00831205c4e7ddccc475ee6d9a
JavaScript
toubhie/gaj_gh2
/assets/js/ajax_calls.js
UTF-8
776
2.828125
3
[ "MIT" ]
permissive
function loadJobRecommendations(){ $(document).ready(function(){ //Perform Ajax request. $.ajax({ url: '/jobs/get-candidate-job-recommendations', type: 'get', success: function(data){ //If the success function is execute, ...
true
194b4818f96e3a2ca514391043f494c9bc531cee
JavaScript
YanaSelyutina/gitLabs
/js/proc.js
UTF-8
9,158
3.59375
4
[]
no_license
/** *@let object $operationEnum объект-перечисление всех операций * в калькуляторе $openum */ let operationEnum = { NONE: 0, DIV: 1, MUL: 2, SUB: 3, ADD: 4, SQRT: 5, SIN: 6, COS: 7, LOG: 8, EXP: 9, SQR: 10 }; /** *@let float $f первое число для вычислени...
true
f62856b3b8cca58d5cba998b82601ebaf39c93db
JavaScript
tungeric/hackerrank-playground
/javascript/03_plus_minus.js
UTF-8
1,233
3.640625
4
[]
no_license
// input: arr = [-4 3 -9 0 4 1] // output: console log // 0.500000 // 0.333333 // 0.166667 process.stdin.resume(); process.stdin.setEncoding('ascii'); var input_stdin = ""; var input_stdin_array = ""; var input_currentline = 0; process.stdin.on('data', function (data) { input_st...
true
170a5c1cfd0e5dad2685a8d80a2803c0f6f6279e
JavaScript
chmilvs/rick-and-morty_app
/src/utils/hooks/useCharacters.js
UTF-8
625
2.734375
3
[]
no_license
import axios from "axios"; import { useEffect, useState } from "react"; export default function useCharacters(page) { const [characters, setCharacters] = useState([]); const [error, setError] = useState([]); const [loading, setLoading] = useState(false); useEffect(() => { setLoading(true); axios ...
true
acfe77766ff9402f40063ac9c4fe4f3f40612050
JavaScript
joanjoantan/off-main-thread-examples
/redux-react-comlink/reducer.js
UTF-8
629
3.0625
3
[]
no_license
const initialState = { count: 0 }; const delayFunction = () => { console.log('Start to delay...'); const seconds = 3; const start = new Date().getTime(); const delay = seconds * 1000; while (true) { if (new Date().getTime() - start > delay) { break; } } console.log('Finished delaying'); }; ...
true
8f8896ea910a6219c79a393ce0e62dd7a04663f2
JavaScript
hamu-software-and-design/hamu-web-manager
/client/src/services/__mocks__/server.js
UTF-8
790
2.78125
3
[]
no_license
import database from './database.json' /** * Simulates a server response * @param {json} data The data to wrap. * @param {boolean} fulfilled Whether the simulated event should succeed * @return {Promise} JS Promise wrapping the event */ export function simulateServerResponse(data, fulfilled = true, e = new Error(...
true
4943f8f032bf0d9ef4d4c72b7f6091d4235e0ed2
JavaScript
ggviana/crypto-communism
/src/communism.js
UTF-8
2,088
2.578125
3
[]
no_license
import { spawn } from 'child_process' const ANTHEM_PATH = './resources/ussr_anthem.mp3' let defaultDeviceCache = null export default { spread } const play = ({ timeout }) => new Promise(resolve => { const music = spawn('ffplay', ['-nodisp', '-autoexit', ANTHEM_PATH]) if (timeout) { setTimeout(() => { ...
true
3ec300a72f128ac2501e25d8f5064d2c6da983c9
JavaScript
sam-meech-ward-lighthouse-labs/2018-07-03_Dev_Workflow
/breakout/example.js
UTF-8
239
3.78125
4
[]
no_license
var x = 0; // point A console.log('A: ', x); function a() { // point B console.log('B: ', x) x++; // point C console.log('C: ', x) return x; } // point D console.log('D: ', x); x = a(x); // point E console.log('E: ', x);
true
e3bf30469cdcefe13e50885cb95c952b7068d501
JavaScript
saranae00/kleague
/src/graph/components/BarGraph.js
UTF-8
1,759
2.671875
3
[]
no_license
import React, { useRef, useEffect } from 'react'; const BarGraph = value => { const canvas = useRef(null); useEffect(() => { const ctx = canvas.current.getContext('2d'); const x = value.total === 0 ? 0 : canvas.current.width * (value.value / value.total); animate( ctx, ...
true
5c5215b24dd96eb0c69bc7dba3967b19d551c5e1
JavaScript
mpaulbot/electron
/bin/fetch.js
UTF-8
1,585
2.546875
3
[ "MIT" ]
permissive
const decompress = require('decompress'); const deleter = require('delete'); const fetch = require('node-fetch'); const fs = require('fs'); const fsPromises = fs.promises; const { path } = require('./path'); const downloadDist = async (version) => { console.log('downloading:', version); await deleter.promise([path...
true
28c12e9c2dfb6dcadb4c24a83c987a0bd6b815db
JavaScript
xwb1102/Cloud-disk
/云/js/content/folders.js
UTF-8
5,337
3.09375
3
[]
no_license
/* 1.微云下有 id:0 我的音乐 pid:0 我的文档 pid:0 渲染 传入一个ID给你,你给我这个ID下的所有子级 */ const folders = document.querySelector('.folders'); const fEmpty = document.querySelector('.f-empty'); render(0); function render(id){ //每次渲染前将之前的渲染内容清空 folders.innerHTML = ''; //拿到某个id下的所有子数据,这里是进行赋址的操作,如果...
true
167925d7cbf014c2a4bbb16e785ff388dd2c315f
JavaScript
AU-Landing-Project/au_group_tag_menu
/views/default/js/au_group_tag_menu.js
UTF-8
571
2.59375
3
[]
no_license
define(['jquery'], function($) { $('input[type="hidden"].augtm').each(function(index, element) { var $form = $(element).parents('form').first(); var val = $(element).val(); // look for a guid input var $guid_input = $form.find('input[name="guid"]').first(); var guid = 0; if ($guid_input && $guid...
true
08cf0bdbca012849ddc2763369fada51b43c2486
JavaScript
slurmulon/hyper-mesh
/src/entity.js
UTF-8
1,184
2.625
3
[ "MIT" ]
permissive
import { HyperLink } from './link' /** * Entity instance belonging to a single JSON Hyper-Schema */ export class HyperEntity { /** * @param {*} instance * @param {HyperSchema} schema */ constructor (instance, schema) { this.instance = instance this.schema = schema } /** * Creates a ne...
true
911366c2f9cda1b710f8262c7b678fe1f91813a3
JavaScript
LescanoMicaela/intro-react-tutorial
/src/containers/Series/index.js
UTF-8
2,119
3.125
3
[]
no_license
import React, {Component} from 'react'; import SeriesList from '../../components/SeriesList'; import Loader from '../../components/Loader'; //we have the logic in this component //we separate logic and presentional components. class Series extends Component{ state = { series: [], //INPUT VALUE seriesName:...
true
9b4c64a1efd16605c1d3bb248d4bee04223efd3c
JavaScript
karmodaniel/estudos-javascript
/array/arrayMetodos.js
UTF-8
829
4.1875
4
[]
no_license
const pilotos = ['Vettel', 'Alonso', 'Raikkonen', 'Massa'] //pop remove o ultimo elemento do array pilotos.pop() console.log(pilotos) //push adiciona elementos no array pilotos.push('Vestappen') console.log(pilotos) //shift remove o primeiro elemento do array pilotos.shift() console.log(pilotos) //unshift adiciona...
true
3e1f51566b82dd284ded021e94afb1b8b203a639
JavaScript
sandra-widmark/nodejs-uppgifter
/E_1_node.js/e_1_16/app.js
UTF-8
1,090
2.515625
3
[]
no_license
var http = require('http'); var querystring = require('querystring'); http.createServer(function (req, res) { if(req.url === '/') { res.writeHead(200, "OK", {'Content-Type': 'text/html'}); console.log(req.url, res.statusCode); var stream = require('fs').createReadStream("index.html", "utf"); stream...
true
93773efd25fd4d53c66aaa1a777b48a245347024
JavaScript
atmanishk/StickyNotes
/src/reducer.js
UTF-8
2,089
3.03125
3
[]
no_license
export const initialState = { array: [], weekday: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] } export const actionTypes = { ADD_CONTENT: "ADD_CONTENT", DELETE_CONTENT: "DELETE_CONTENT", MODIFY_CONTENT: "MODIFY_CONTENT", SELECT_CONTENT: "SELECT_CONTENT", }; const reducer = (state, action...
true
548f2956a1e447c1ea21597cffbd6c68cf0c4666
JavaScript
ABoyCDog/LeetCode
/2020-1213周赛.js
UTF-8
1,814
3.78125
4
[]
no_license
// 5625. 比赛中的配对次数 // 给你一个整数 n ,表示比赛中的队伍数。比赛遵循一种独特的赛制: // 如果当前队伍数是 偶数 ,那么每支队伍都会与另一支队伍配对。总共进行 n / 2 场比赛,且产生 n / 2 支队伍进入下一轮。 // 如果当前队伍数为 奇数 ,那么将会随机轮空并晋级一支队伍,其余的队伍配对。总共进行 (n - 1) / 2 场比赛,且产生 (n - 1) / 2 + 1 支队伍进入下一轮。 // 返回在比赛中进行的配对次数,直到决出获胜队伍为止。 // 示例 1: // 输入:n = 7 // 输出:6 // 解释:比赛详情: // - 第 1 轮:队伍数 = 7 ,配对次数 = 3 ,4 支队伍...
true
3f941024e1f698f50592b3bb18d015d6eeebbf58
JavaScript
josejamart/react-learn
/state-management-with-react-hooks/src/pages/home/reducer.js
UTF-8
1,171
2.765625
3
[ "MIT" ]
permissive
export const initState = { list: [] }; export const reducer = (state, action) => { switch (action.type) { case "LOAD": return { ...state, list: action.todos } case "ADD_ELEMENT": return { ...state, list: [...state.list, action.payload] ...
true
75c8aee7e18d7a399109e84554e40cdc28570faf
JavaScript
manishkumarroy/chat-application
/frontend/src/reducers/authReducer.js
UTF-8
581
2.546875
3
[]
no_license
const initialState = { userDetails: {}, chatList: [], friendList: [], newNotificationsCount: "" } export default (state = initialState, action) => { switch (action.type) { case "setUserDetails": return { ...state, userDetails: { ...action.payload.user } } case "setFriendList": re...
true
ef6336c1a62f58fa33732c2958c606d3eae2c245
JavaScript
developmentseed/osm-teams-node-example
/server.js
UTF-8
1,152
2.609375
3
[ "MIT" ]
permissive
// server.js // where your node app starts // init project const express = require("express"); const { login, callback, logout } = require("./login"); const app = express(); // we've started you off with Express, // but feel free to use whatever libs or frameworks you'd like through `package.json`. // http://express...
true
77bfd896a73f4f974622de6c8bcd1edf6dc11688
JavaScript
JeppeFriis/Solar-system-sim-p5js
/physics/Time.js
UTF-8
289
2.53125
3
[]
no_license
export function getJ2000(UNIX_time) { var a = new Date(UNIX_time); var y = a.getFullYear() - 2000; var m = a.getMonth(); var D = a.getDate(); var UT = a.getHours() + a.getMinutes()/60; d = 367*y - 7 * ( y + (m+9)/12 ) / 4 + 275*m/9 + D - 730530; return d; }
true
fe95eaebe1f223b8cf2bd64b5aeec046f899301f
JavaScript
MDGSF/JustCoding
/javascript-leetcode/44.通配符匹配.js
UTF-8
1,573
3.703125
4
[ "MIT" ]
permissive
/* * @lc app=leetcode.cn id=44 lang=javascript * * [44] 通配符匹配 * * https://leetcode-cn.com/problems/wildcard-matching/description/ * * algorithms * Hard (25.08%) * Likes: 207 * Dislikes: 0 * Total Accepted: 12.3K * Total Submissions: 48.7K * Testcase Example: '"aa"\n"a"' * * 给定一个字符串 (s) 和一个字符模式 (p)...
true
cc324b32693db0ee02f2ce1290f95e9ed85623f7
JavaScript
palikhov/adventure
/public/lib/message.mjs
UTF-8
1,603
2.53125
3
[]
no_license
const log = console.log.bind(console); // import {worker} from "./boot.mjs"; //## Firefox do not support worker modules yet! // URL relative to containing HTML page. export const worker = new Worker('worker/worker.js', {type:"classic"}); const jobs = {}; const dispatch = { pong(){ log("Worker is alive"); }, ...
true
46f0c62c351c669fcbfdf792d992a29f1e394300
JavaScript
Fuzzy-chan/reactMemoryGame
/src/components/Game.js
UTF-8
3,080
3.15625
3
[]
no_license
import React, { Component } from "react"; import Image from "./Image"; import Jumbotron from "./Jumbotron"; import Container from "./Container"; import data from "../data.json"; class Game extends Component { state = { data, score: 0, topScore: 0 }; //shuffle function to randomize ...
true
d8efb88434d172194d36a33debe4a3685a4cbdd2
JavaScript
jasancheg/ReduxSimpleStarter
/src/reducers/reducer_weather.js
UTF-8
447
2.640625
3
[ "MIT" ]
permissive
import { FETCH_WEATHER } from '../actions/index'; export default function(state = [], action) { console.log('action received', action); // never do state = something // Avoid mutate the state by do push // or any operation over the same state // concat is a good solution for it and // return a complete ne...
true
28ebd0597c35db41897d228a377c5eb0279bc366
JavaScript
caterinavanherpt/GrowPlantGrow
/dev/scripts/app.js
UTF-8
9,115
2.875
3
[]
no_license
// pseudo code // components: // app // nav // add new plant form, // plant info card, // plant display card, // loginpage, // user flow: // - user logs in by typing in username and password and pressing submit // - user is brought to main page with instructions and new plant card // - user enters new plant in...
true
91c20d205bc4142afe3c5f45a901b0e4f42717ea
JavaScript
n8gallagher/javascript-course
/basics-assignment-1-start/assignment.js
UTF-8
198
3.5
4
[]
no_license
let userInput = 14; let result; result = userInput + 18; result += 3; result = result / 2; result -= 1; alert(result + ' is the result'); alert(userInput + ' is the userInput');
true
9bfbe936ac1a91fa5d885e9e8c3eccb978e7090f
JavaScript
alexboia/LVD-FluentUi-LoginBox
/src/FakeLoginService.js
UTF-8
1,244
2.703125
3
[ "BSD-3-Clause" ]
permissive
import { successMessage, errorMessage } from "./components/LoginBoxUtility.js"; const TestData = { correctCredentials: { userName: 'test', password: 'test' } }; export default class FakeLoginService { constructor(config = null) { this._config = this._mergeConfig(config || {}); } _mergeConfig(config) { r...
true
8d38c4539d2231707ee773aefdf072ba238dd80c
JavaScript
yoh-nak/jeed-training
/public/demo/js/recipe1/chapter08/153/sample/js/sample.js
UTF-8
301
2.96875
3
[]
no_license
window.addEventListener("load", function(){ // 指定したID名を持つ要素の色を赤色にする document.getElementById("myHeader").style.color = "red"; // 指定したIDを持つ要素の内容を「Item3」にする document.getElementById("myItem").innerHTML = "Item 3"; }, false);
true
ff4e00667168a952f4fc62fef24cfa9f73334315
JavaScript
Hung2410/MindXCS
/SS2/BTVNS2/appbtvn2.js
UTF-8
1,345
3.921875
4
[]
no_license
//Bai 1 //1.1 for (let i = 0; i <= 7; i++) { console.log(i); } //1.2 let n1 = Number(prompt('Enter a number ?')); for (let i = 0; i < n1; i++) { console.log(i); } //1.3 let n2 = Number(prompt('Enter a number ?')); for (let i = 3; i < n2; i++) { console.log(i); } //1.4 let c4 = Number(prompt('Enter a num...
true
a618cd84ce771d8f92b1c0b458477ed49a38e291
JavaScript
TCJ-ZJ/leetcode
/solution/leetcode-293-Flip Game.js
UTF-8
911
4.3125
4
[]
no_license
/*Flip Game You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take turns to flip two consecutive "++" into "--". The game ends when a person can no longer make a move and therefore the other person will be the winner. Write a ...
true
e06cdad7acaf92c160a82f00dc14df4a88f6080a
JavaScript
YaqoobAslam/NodeeXp
/Java_T_Point/stringdecoder_example1.js
UTF-8
454
2.875
3
[]
no_license
const StringDecoder = require('string_decoder').StringDecoder const decoder = new StringDecoder('utf8') const buf1 = new Buffer.from('this is a test') console.log(decoder.write(buf1)); //prints: this is a test const buf2 = new Buffer.from('7468697320697320612074c3a97374', 'hex') console.log(decoder.write(buf2));//p...
true
27779da2642528007abb159045be851dc3e99fed
JavaScript
gygy7151/Vue.js2-Spring5-web-app
/chap01/p.38.js
UTF-8
1,642
4.375
4
[]
no_license
// 매개변수 기본값 // ES6에서 함수 매개변수의 기본값을 정의 가능 // ES5에서 동일구현이 코드 가독성 떨어뜨림 // ES6 const shoppingCart = []; function addToCart(item, size = 1) { shoppingCart.push({ item: item, count: size}); } addToCart('Apple'); //size는 1 addToCart('Orange', 2) //size는 2 // ES5에서 addToCart와 동일한 함수코드 function addT...
true
5e64523b7d8dcbaa18557d07e79b5e107877bc4a
JavaScript
KhadijaNoor777/note_app
/build/app.js
UTF-8
2,568
3.1875
3
[]
no_license
var title = document.forms["f1"]["title"]; var description = document.forms["f1"]["description"]; var notes = []; var note = new Note("", ""); function add(){ note = new Note(title.value, description.value); notes[0] = note; view(); } var $data = $('<div></div>') function view(){ //$data.css('display', ...
true
9d868eb25fc91efa2580f04aabb638a961df227a
JavaScript
nerona/mayqueen
/tools.js
UTF-8
8,409
2.703125
3
[]
no_license
// 手机类型判断 // var BrowserInfo = { // userAgent: navigator.userAgent.toLowerCase(), // isAndroid: Boolean(navigator.userAgent.match(/android/ig)), // isIphone: Boolean(navigator.userAgent.match(/iphone|ipod/ig)), // isIpad: Boolean(navigator.userAgent.match(/ipad/ig)), // isWeixin: Boolean(navigator.u...
true
247fecac01a9bee702f48cbaad691831f286a650
JavaScript
joephon/joephon.wxml
/reducers/home.js
UTF-8
1,151
2.5625
3
[ "MIT" ]
permissive
import { ON_HOME_LOAD_START, ON_HOME_LOAD_FAILURE, ON_HOME_LOAD_SUCCESS, ON_HOME_PLAY_VOICE, ON_HOME_STOP_VOICE, ON_HOME_HIDE, } from '../common/constants' const home = { loading: false, thoughts: [], count: 0, error: '', playing: false, which...
true
179878694c3ea082a1f30921cd4bf4e705a0ae3b
JavaScript
no5no6/vue2-demo
/src/utils/_ajax.js
UTF-8
1,546
2.859375
3
[]
no_license
// import _ from 'lodash' export default class AJAX { constructor({ms = 2000}) { this.ms = ms; }; get(url, callback) { if(this.isTrue()) console.info('此浏览器不支持localStorage, 请更换浏览器重试!'); this.process(url, ({database, table, param}) => { let tables = JSON.parse(localStorage.getItem(database)); ...
true
b94f83f7e61797ea5009d4113c22d53089e6a114
JavaScript
aluizrech/app-cardapio-online-react
/src/Components/DadosPagamento/DadosPagamento.js
UTF-8
4,425
2.515625
3
[]
no_license
import React, {Component, Fragment} from "react"; import {Button, Chip, TextField} from "@material-ui/core"; import './DadosPagamento.css'; import NumberFormat from "../../Utils/NumberFormat"; import LocalStorageUtils from "../../Utils/LocalStorageUtils"; import PedidoService from "../../Services/PedidoService"; expo...
true
3c81c21726f5bd8aa6e9ded2ffe82acd1569f24e
JavaScript
EngAly/ajax_tutorial
/ajax/7_getJsonObject.js
UTF-8
323
3.109375
3
[]
no_license
var xhr = new XMLHttpRequest(); xhr.open('GET', 'object.json', true); // If specified, responseType must be empty string or "text" xhr.onload = function () { if (xhr.readyState === xhr.DONE) { if (xhr.status === 200) { console.log(JSON.parse(xhr.responseText)); } } }; xhr.send(nul...
true
7b7153e37efaceb89e04b4f577e7a7070752bf66
JavaScript
Alfredo20164920/Coffee-and-Cake
/js/bgParallax.js
UTF-8
1,084
2.78125
3
[]
no_license
(function () { /*========================================================== = Objeto con Propiedades de Parallax = ==========================================================*/ var pparallax = { seccion: document.querySelector(".parallax"), recorrido: null, limite: null } /*==================...
true
bea6f0f2ca70b4a1ed9b120d11889b0a1bfbe3ec
JavaScript
ayushkumar731/mongoose-validator
/controllers/userController.js
UTF-8
2,154
2.5625
3
[]
no_license
const User = require('../model/user'); const handleDuplicateField = (err) => { let message; const keys = Object.keys(err.keyValue); if (keys.includes('email')) message = 'User already exists'; return message; } const handleCastError = (err) => { const message = `Invalid ${err.errors.path}: ${err.errors.valu...
true
faae507e2a479a0711f930d7e289e10f55e39889
JavaScript
java-wendaoyu/hksys02
/src/main/resources/static/js/paperDetail.js
UTF-8
4,954
2.546875
3
[]
no_license
$().ready(function () { var url = decodeURI(window.location.search); var paperId = parseInt(url.split("&")[0].split("=")[1]); var courseId = parseInt(url.split("&")[1].split("=")[1]); var className = url.split("&")[2].split("=")[1]; var courseName = url.split("&")[3].split("=")[1]; var program =...
true
af2897994fe43e74e5c45cdf0ca94146b16750d8
JavaScript
carlosdanieldrury/t141-nodejs-basics
/01-hello-world/hello.js
UTF-8
326
3.484375
3
[]
no_license
//const args = process.argv; const args = process.argv.slice(2); // cuts the 2 default values of the argv command console.log('----> Hi there!') function print(value, index) { console.log('%s: %s', index, value); } args.forEach(print); //args.forEach((value, index) => { // console.log('%s: %s', index, value)...
true
90832890da233c4f4224142bf0bbbff9f5b1f8de
JavaScript
paweltru/coursera-angularjs
/assignment3-solution/scripts/app.js
UTF-8
2,182
2.609375
3
[]
no_license
(function () { 'use strict'; angular.module('NarrowItDownApp', []) .controller('NarrowItDownController', NarrowItDownController) .service('MenuSearchService', MenuSearchService) .directive('foundItems', FoundItemsDirective) .constant('ApiBasePath', "https://davids-restaurant.herokuapp.com"); function FoundItemsDirec...
true
a939ac8b5f7c787404eaf84412581efe0dbeba8f
JavaScript
FlinnBurgess/scientific-publication-trends
/src/inputs/InputForm.js
UTF-8
3,548
2.6875
3
[]
no_license
import {useState} from 'react'; import {Button, TextField} from '@material-ui/core' import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles((theme) => ({ formContainer: { marginTop: '30px', }, inputForm: { display: 'flex', justifyContent: 'center', ...
true
ee8d4fc1fae353f0bba5bbfae90112469847b187
JavaScript
kh1335/movie_project
/src/List.js
UTF-8
6,123
2.609375
3
[]
no_license
import React from 'react'; class Search extends React.Component { render() { return ( <div> <form name="search-form" className="form-inline text-center search-form"> <div className="form-group"> <label htmlFor="search-field" className=...
true
3c388f8b5d9c61ea2056d62d1436ba26823a5ca9
JavaScript
erikapaige/employeeDirectory
/src/components/EmployeeTable/EmployeeTable.js
UTF-8
1,236
2.625
3
[]
no_license
// bring in React package import React, { Component } from 'react' // bring in Table component form Reactstrap import { Table } from 'reactstrap' import EmployeeData from '../../employees.json' class EmployeeTable extends Component { render () { return ( <Table> <thead> <tr...
true
3be7254cddc5093f65c3682a346596094cf9de9b
JavaScript
michalgil13/Waluty
/src/components/CurrenciesTable/RatesList.js
UTF-8
2,223
2.609375
3
[]
no_license
import React from 'react' import { Table } from 'react-materialize' //draws table of exchange rates const RatesList = (props) => { const ratesToday = Object.entries(props.rates[0]) const ratesYesterday = Object.entries(props.rates[1]) for(let i = 0; i < ratesYesterday.length; i++){ if(ratesTod...
true
dc26c2dd9f92b29a12bd9c4a4b6294c69556e29f
JavaScript
juan2357/juan-choice
/app.js
UTF-8
1,301
2.859375
3
[ "MIT" ]
permissive
(function() { var app = angular.module('choice', []); app.controller('ChoiceController', function() { this.person = gems; }); app.controller('TabController', function(){ this.tab = 1; this.setTab = function(newValue){ this.tab = newValue; }; this.isSet = function(tabName){ return this.ta...
true
8f7caa6e0f77341b03435bdf5566115ed1fdfb0b
JavaScript
vakolesnikov/weather_app
/src/asyncActions/index.js
UTF-8
2,533
2.6875
3
[]
no_license
import * as actions from '../actions'; import weatherApi from '../api/weatherApi'; const MAX_CITIES_COUNT = 10; const MIN_CITY_NAME_LENGTH = 3; export const searchCity = city => (dispatch, getState, api) => { if (city.length >= MIN_CITY_NAME_LENGTH) { api.weather.searchCity(city).then(res => { ...
true
3babd02045dbf4ecc47aaca45701efe3b0f612e1
JavaScript
justinkizer/a-A-Daily-Projects
/W6D1/Towers of Hanoi/skeleton/js/view.js
UTF-8
872
3
3
[]
no_license
class View { constructor(game, $el) { this.game = game; this.$el = $el; this.setupTowers(); this.render(); } setupTowers() { for (let i = 0; i < 3; i++){ const $ul = $("<ul>"); for (let j = 0; j < 3; j++) { let $li = $("<li>"); $ul.append($li); } ...
true
bafa903848c6111f9c7eb65b9b82aeb1241f425c
JavaScript
oespino/water-puzzle-solver
/lib/states.js
UTF-8
2,702
2.828125
3
[]
no_license
import tubeLib from './tubes' export default { deepCopy(state) { let copy = [] state.forEach((el) => { let tube = [...el]; copy.push(tube); }); return copy }, isFinalState(state) { if (!state) return false for (let el of state) { ...
true
edec118dc3efca4aa091991a484c756081afbe78
JavaScript
thdwlsgus0/til
/재귀/3.js
UTF-8
152
3.609375
4
[]
no_license
// for 반복문 사용하기 const sumTo = (n) => { let sum = 0; for(let i=1; i<=n; i++){ sum+=i; } return sum; } console.log(sumTo(100));
true
d5f17233e4af2316e658d6012e9ce71f46bc331b
JavaScript
jie2001/2021
/js模块/day10/定时器.js
UTF-8
475
3.4375
3
[]
no_license
// 过多长时间之后,做的一些事情(一次) setTimeout(function(){ console.log("hehe") },2000) // 每隔多长时间做一次 setInterval(function(){ console.log("1") },1000) // 定时器它的返回值代表的就是.此定时器在当前页面的第几个 clearInterval // 清除定时器 var num=0; var time2=setInterval(function(){ num++; if(num>10){ clearInterval(time2); time...
true
7f54676214c42dc536542f7095464b2ab64461d8
JavaScript
n1re/JavaScriptPractise
/AlgorithmsAndDataStructures/sorts/select.js
UTF-8
629
3.625
4
[]
no_license
'use strict'; function swap(arr, from, to) { const tmp = arr[to]; arr[to] = arr[from]; arr[from] = tmp; } function swapSmallestTo(i, arr) { const smallest = Infinity; let startI = i; for (let i = startI; i < arr.length; i++) { const v = arr[i]; if (v < smallest) smallest = v; } swap(arr, i, ...
true
db47ff537f4c5fcf5e9a5132f9217d6d0a8fe327
JavaScript
federai/GIFOS
/Javascript/carrusel.js
UTF-8
3,136
2.578125
3
[]
no_license
//-------------------------------------------------------API CONNECTION GIFS TRENDIGS---------------------------------- var screen = window.innerWidth; var favssave = JSON.parse(localStorage.getItem("ids")); var buttonLeft = document.getElementById("left"); var buttonRight = document.getElementById("right"); var index...
true
25b260ee38465187d58f73de9cc9dcdf7d0307c8
JavaScript
EmORz/Simple_Example_Projects
/Csharp-Exam-Project-master/Forum/Forum/wwwroot/js/site.js
UTF-8
2,681
2.953125
3
[ "MIT" ]
permissive
function typeEmoticonInTextarea(el, newText) { var start = el.prop("selectionStart"); var end = el.prop("selectionEnd"); var text = el.val(); var before = text.substring(0, start); var after = text.substring(end, text.length); el.val(before + newText + after); el[0].selectionStart = el[0].s...
true
9d9b6107d14d19f4c821f3487bf02a0300f5d3bc
JavaScript
DestinyXie/MixH5
/lib/image-loader.js
UTF-8
5,281
2.640625
3
[ "MIT" ]
permissive
/** * Created by tingkl on 16/8/1. */ var base = require('mix-util'); function getPromise(paths, callback, time, percent) { var map = {}; for (var i = 0; i< paths.length; i++) { map[paths[i]] = false; } var count = 0; var fakePercent = 0; var it = setInterval(function() { fak...
true
9f2656147e1434635558b4569133ac5d7fcb678c
JavaScript
SusanaG-code/ejercicios-de-Adalab
/module-02-javascript/lesson-2.3/exercice-02-access-control/js/main.js
UTF-8
624
3.90625
4
[]
no_license
'user strict'; // Prepararemos una variable y le asignaremos un nombre. Posteriormente, si el nombre es el tuyo o el de tu compañera mostraremos el mensaje "Bienvenida, (tu nombre aquí)". // Si el nombre es diferente al tuyo deberá mostrar "Lo siento pero el usuario que has introducido no está registrado". const na...
true
64efeab98b72775c4254d1e04180cbb235d146da
JavaScript
arpsabbir/a20200615-7
/最新影视双端对接苹果修复注册/app/前端/js/bluebird_window.js
UTF-8
25,395
2.6875
3
[]
no_license
(function (){ //注册命名空间 window["窗口操作"] = {} function 取打开窗口(){ return plus.webview.currentWebview().opener(); } function 执行代码(窗口,代码){ if(typeof(窗口)=="string"){ var a = 取指定窗口(窗口); a.evalJS(代码); }...
true
a90cb4d480fe51e245f8736f855ffbd3202472b0
JavaScript
albert-garcia316/algorithems_after_dark
/3-25.js
UTF-8
1,619
3.84375
4
[]
no_license
// This problem was asked by Facebook. // Given an unordered list of flights taken by someone, each represented as (origin, destination) pairs, and a starting airport, compute the person's itinerary. If no such itinerary exists, return null. If there are multiple possible itineraries, return the lexicographically sm...
true
f6694d34f18ada1e85840a40f4178c64d4e3e649
JavaScript
akm-y/pub_sns_chat
/server.js
UTF-8
5,182
2.71875
3
[]
no_license
const express = require('express') const app = express() const server = require('http').createServer(app) //httpサーバーの作成 //const server = createServer(app)でもサーバーは作成できるが、expressのサーバーを動かすとなると多くのmoduleが必要になる。 //httpだけであれば必要最低限の構成でサーバーを起動できる const portNumber = 3005 //番号はなんでも良いが、他で使用している番号と重ならないように注意 const isProd = process...
true
91da03f4968883080a8ec5d4700299ce2fe088ef
JavaScript
Yambo92/mobx-concept
/src/AppList/App_02_computed.js
UTF-8
1,830
2.71875
3
[]
no_license
import React, { Fragment } from 'react'; import { inject, observer } from 'mobx-react' import {SearchTextField} from '../components/SearchTextField' //mui stuff import Grid from '@material-ui/core/Grid' import Paper from '@material-ui/core/Paper' import { observable, computed, decorate } from 'mobx' //1. using @comp...
true
d23018c31eb3c2826af195aa00d11c1dfbb0c6ad
JavaScript
yujie0707/study
/week06/master.js
UTF-8
1,114
2.859375
3
[]
no_license
// parent.js const childProcess = require("child_process"); const net = require("net"); // 获取cpu的数量 const cpuNum = require("os").cpus().length; let workers = []; let cur = 0; for (let i = 0; i < cpuNum; ++i) { workers.push(childProcess.fork("./worker.js")); console.log("worker process-" + workers[i].pid); wor...
true