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
dc7677be5cecdf27b39710240aa317a4da21ffbf
JavaScript
uddish/Ipu-result-scrape
/app.js
UTF-8
3,420
2.578125
3
[]
no_license
var express = require('express'); var bodyparser = require('body-parser'); var http = require('http'); var cheerio = require('cheerio'); var request = require('request'); var app = express(); var FormData = require('form-data'); app.use(bodyparser.urlencoded({extended: true})); app.use(bodyparser.json()); //Convert ...
true
a3357dfcf6fcf8647b6884f8f25d05e98656e3fa
JavaScript
callum-oakley/advent-of-code-2016
/days_01_to_21/src/day-05.js
UTF-8
3,730
3.765625
4
[]
no_license
/* --- Day 5: How About a Nice Game of Chess? --- You are faced with a security door designed by Easter Bunny engineers that seem to have acquired most of their security knowledge by watching hacking movies. The eight-character password for the door is generated one character at a time by finding the MD5 hash of some...
true
c5667f42e0fabf16dfdd323c0293d854206adc4c
JavaScript
myh-iliana/Short-way
/short-way.js
UTF-8
1,889
3.5
4
[]
no_license
const departure = [0.4, 1]; const destination = [0.9, 3]; const perfectCity = (start, finish) => { const startX = start[0]; const startY = start[1]; const finishX = finish[0]; const finishY = finish[1]; let shortWay; const isInteger = Number.isInteger(startX) && Number.isInteger(startY) ...
true
e6e4394a0352ece77270677fdf9d4ae95bea1914
JavaScript
chauhanravinder/Introduction-to-JavaScript-ES6
/19 Import And Export (Task)/index.js
UTF-8
484
4.375
4
[]
no_license
// **Challenge** // Inside of the file data.js, create a function add, that will receive 2 numbers and return the sum of them. // Make sure to export this function. // - Import the function add, into the index.js file // - Create a variable result, that will hold the result of the function add when you call it and pa...
true
d261d363b3689a7f9bcc260b47f2ad8c4f33db19
JavaScript
MrAlpacaGames/GoatDetective
/scripts/Logic/GM.js
UTF-8
3,271
2.90625
3
[]
no_license
class GM { constructor() { //---------------------------- // Attributes //--------------------------- this.canMove = true; this.HUDInteracted = false; /** * This is the state of the Game. * 0 = The Game has just started. The only room available ...
true
c2b7019dc83fd22ba316fafa9cf7855110635654
JavaScript
atroxff/shop-manager
/src/main/resources/static/model1/js/product/product_chg.js
UTF-8
4,598
2.8125
3
[ "MIT" ]
permissive
//表单校验并提交 function validateAndSubmit(){ //校验信息置空 document.getElementById("pname_tip").innerHTML=""; document.getElementById("price_tip").innerHTML=""; document.getElementById("count_tip").innerHTML=""; document.getElementById("pimage_pic_tip").innerHTML=""; document.getElementById("pimage_pic2_t...
true
2ea12bf3e9f9fc26770400dfd154c6515b577071
JavaScript
igoist/Config
/Chrome/Snippets/0006.js
UTF-8
1,193
4.125
4
[]
no_license
/** * [带你彻底弄懂Event Loop](https://segmentfault.com/a/1190000016278115) */ const case1 = () => { /** * d1 d2 case: * [0, 0] - 1 4 7 5 2 3 6 * [10, 9] - 1 4 7 5 6 2 3 * [10, 10] - 1 4 7 5 2 3 6 */ const d1 = 0; const d2 = 0; console.log(1); setTimeout(() => { console.log(2); Prom...
true
b735c7af05e0847e90046488c3e591bf1de8e238
JavaScript
zeetec20/ZeeTrav
/public/components/packet/ItemPacket.jsx
UTF-8
4,151
2.53125
3
[]
no_license
let slugify = window.location.pathname.split('/').reverse()[0] let numberWithCommas = (x) => { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } fetch(`${MAIN_URL}/api/packet/get`) .then(response => response.json()) .then(response => { let packet = response.filter(res => res.slugify == slugify)[0]...
true
c03738a8aabc842534a5fd9b74f2cd79551026b2
JavaScript
Abhishek1410Mehta/CoronaGame
/game.js
UTF-8
1,934
3.171875
3
[]
no_license
function init() { canvas=document.getElementById("mycanvas"); console.log(canvas); W=700 H=400 canvas.height=H canvas.width=W pen=canvas.getContext('2d'); console.log(pen); score=0; game_over=false; e1={ x:150, y:50, w:60, h:60, speed:20, }; e2={ x:300, y:150, w:60, h:60, speed:30, }; e3={ x:450, y:20, w:60, h:60, spee...
true
c6d967478e8c8efd5141c5218c95f3904163c777
JavaScript
hanhanhan/flies_n_pies
/flyaway.js
UTF-8
1,369
2.90625
3
[]
no_license
"use strict"; //Canvas setup let canvas = document.getElementById('canvas'); let context = canvas.getContext('2d'); canvas.width = 0.9 * document.documentElement.clientWidth; canvas.height = 0.8 * document.documentElement.clientHeight; let canvasPlacement = canvas.getBoundingClientRect(); // canvas.onmousemove = mou...
true
2847fdaef381c70ec51ec30f644e186d228ae63f
JavaScript
anaeljonasgit/string-to-url-link
/toUrl.js
UTF-8
1,020
2.53125
3
[]
no_license
function toUrl(string, base_url, boolean, word_limit, param, param_toUrl){ if (param && param_toUrl){ param = '/'+toUrl(param) } string = string.toLowerCase().split(' '); New_string = []; string.filter(word => { if (!isNaN(word)){ New_string.push(word); } else{ New_string.push(word.normalize("NFD").replace(/[^a-zA...
true
f1c819b05d113c1c77fc9b6b544fbda2bce0a1b0
JavaScript
selloutdesign/hotness
/js/app.js
UTF-8
2,175
3.703125
4
[]
no_license
$(document).ready(function(){ /*--- Display information modal box ---*/ $(".what").click(function(){ $(".overlay").fadeIn(1000); }); /*--- Hide information modal box ---*/ $("a.close").click(function(){ $(".overlay").fadeOut(1000); }); /*--- New Game ---*/ var prevGuesses = []; ...
true
20f0f71fe721dbecd0e1703cf8ce96b711bd1a16
JavaScript
HauseMaster2B2T/Final-Project
/script.js
UTF-8
1,923
4.15625
4
[]
no_license
const myMessage = 'INSTRUCTIONS: You need to enter your age and day of week (capitalizing first letter of weekday), then select the movie. Finally, last step is to click the buttons in this order: Age, Day, and Movie. Then the program will print the ticket price to the screen and give you the option to print the page i...
true
53d54abceb675fbb74c9df706d3cdf61985477bb
JavaScript
theqabalist/AOC2016
/solution23.js
UTF-8
2,568
2.546875
3
[ "Unlicense" ]
permissive
/*eslint no-confusing-arrow: off*/ const scaffold = require('./scaffold'); const {pipe, set, curry, join, reduce, and, prop, map, split, lensIndex, __, over, lensProp, inc, dec, head, tail} = require('ramda'); const {sleep} = require('sleep'); const initMachine = curry((a, instructions) => ({ pc: 0, registers:...
true
f9e5e9a7b78eb7106df0e62c8fb7335ed2502cfc
JavaScript
Miceuz/Aylike
/assets/js/services/DhtmlService.js
UTF-8
12,412
2.71875
3
[]
no_license
function DhtmlService() { }; /* DhtmlService.prototype.addVideo = function(videoItem) { var videoElement = document.getElementById(videoItem.youtubeId+'_item'); if(!videoElement) { videoElement = createVideoPlaceholder(videoItem); } var elBody = "<a href=\"#\" onclick=\"playYoutubeVideo('"...
true
caf2c20434d91a5a10ba3fe29072d533b4702c02
JavaScript
gedesasoft/gedesasoft.github.io
/SoftMaths/spiderbasic/forge/sha1.js
UTF-8
5,490
2.84375
3
[ "MIT" ]
permissive
/** * Secure Hash Algorithm with 160-bit digest (SHA-1) implementation. * * @author Dave Longley * * Copyright (c) 2010-2015 Digital Bazaar, Inc. */ (function() { /* ########## Begin module implementation ########## */ function initModule(forge) { var sha1 = forge.sha1 = forge.sha1 || {}; // used for word stora...
true
052f56bc77a6c7b65185acb8ad1fd4803770c2aa
JavaScript
SourceOf0-HTML/processing-p5.js
/sketch_190925a/sketch_190925a.js
UTF-8
734
3.234375
3
[]
no_license
/* t=0 draw=_=>{c=cos;s=sin;v=vertex;createCanvas(S=500,S);H=S/2;fill(0);R=S/8;N=~~map(A=c(t+=.02)+1,0,1,3,30);a=PI/2;r=A*H;translate(H,H);rotate(t/2);beginShape(TRIANGLE_STRIP); for(i=N+1;i;--i){v(c(a)*r,s(a)*r);v(c(a+=b=PI/N)*R,s(a)*R);a+=b}endShape()} /**/ function setup() { createCanvas(S=500,S); H = S/2; R ...
true
ee2e688248226e58c2e6a2f07fa4f94797b33f13
JavaScript
jimmyb2508/javascript-basics-express
/src/controllers/booleans.js
UTF-8
885
3.140625
3
[]
no_license
const { negate, truthiness, isOdd, startsWith } = require('../lib/booleans'); const negation = (req, res) => { res.status(200).json({ result: negate(req.body.value) }); }; const truth = (req, res) => { res.status(200).json({ result: truthiness(req.body.value) }); }; const odd = (req, res) => { const realNumber...
true
5f9b870142fe478d7a2a3bbcce4cff78510baa0b
JavaScript
cams007/SSE
/Proyecto-Inicial/public/js/estudiosRealizados.js
UTF-8
175
2.671875
3
[ "MIT" ]
permissive
function showElement() { var x = document.getElementById( "hide_element" ); if (x.style.display === "block") x.style.display = "none"; else x.style.display = "block"; }
true
b9b840badc134feedca11c365aea5be563c2eeee
JavaScript
tuanio/image-slide-js
/script.js
UTF-8
1,958
3.3125
3
[ "Unlicense" ]
permissive
// first declare var back = document.getElementById("back"); var next = document.getElementById("next"); var mainPic = document.getElementById("main-pic"); // image var image = []; // index of image var i = 0; // declare radio choises var rad = []; // rad[0] = document.getElementById("rad-zero"); // ra...
true
c35405177883648b99f4c75f3b4c9715955643a5
JavaScript
aviato26/expressAPI
/models/user.js
UTF-8
1,271
2.515625
3
[]
no_license
let mongoose = require('mongoose'); let Schema = mongoose.Schema; let bcrypt = require('bcrypt'); let User = new Schema({ fullName: { type: String, required: true }, emailAddress: { type: String, required: true, match: /\S+@\S+\.\S+/, index: { unique: true, ...
true
88909242bba166327c8616ba020d58f8f04ccbde
JavaScript
mariannav22/accenture
/JS/distance.js
UTF-8
197
3.609375
4
[]
no_license
function distance(x1, y1, x2, y2) { let x = Math.abs(x1 - x2) let y = Math.abs(y1 - y2) let result = Math.sqrt(x ** 2 + y ** 2) return result; } console.log(distance(5, 2, 5, 2))
true
127b0a95dabb1c87c27574fa02a72800baf63018
JavaScript
Yash0605/Light-and-Dark-Mode
/script.js
UTF-8
1,993
3.15625
3
[]
no_license
const DARK_THEME = 'dark'; const LIGHT_THEME = 'light'; const TITLE_HOME_DARK = 'Welcome to the Dark side'; const TITLE_HOME_LIGHT = 'Welcome to the Light'; const rootElement = document.documentElement; const toggleButton = document.querySelector('input[type=checkbox]'); const nav = setVariables('nav'); const textBox ...
true
7caa61398fb0e678eb1bc781d2a1de185612a0e3
JavaScript
Javran/leetcode
/path-sum-iv/solution.js
UTF-8
1,118
3.5
4
[ "MIT" ]
permissive
/** * @param {number[]} nums * @return {number} */ const pathSum = nums => { // idea: turn it into full binary tree array rep // then do path sum as usual. // we at most have 1+2+4+8 = 15 elements const vals = new Uint8Array(15).fill(0xff) nums.forEach(num => { // turn to 0-based const dep = Math....
true
b760c2ed09b15f400ec7b68df8e7c1fb26c33508
JavaScript
wqking/jincu
/test/Getter_test.js
UTF-8
1,633
2.90625
3
[ "Apache-2.0" ]
permissive
import * as assert from 'assert'; import { Getter } from '../lib/accessor/Getter.js'; describe('Getter', () => { context('by constant', () => { it('null', () => { let getter = null; getter = new Getter(null); assert.strictEqual(getter.get(), null); }); it('undefined', () => { let getter = null...
true
dc61b7da33f17a16a121f7331fd2aff8185375b0
JavaScript
bkentropy/bkentropy.github.io
/projects/more-matchy/part1.js
UTF-8
12,581
3.6875
4
[]
no_license
// //Use this file to implement Part One of your project // var cat = { // species: "calico", // tagline: 'I will knock everything over', // noises: ['meow', 'hiss','prrr'] // } // var slowpoke = { // species: 'sloth', // tagline: 'Just you wait', // noises: ['aaaaa', 'bbbbbb', 'cccccccc', 'ddd...
true
ca968c4b07769569d0c5c126bf26860475ba1ea0
JavaScript
ebnhxcode/catalogo_servicios_tic
/public/js/other_libs/validadores.js
ISO-8859-1
8,046
3.265625
3
[ "MIT" ]
permissive
// JavaScript Document // JavaScript Document /* FUNCIONES DE VALIDACIN PARA USO EN FORMULARIOS */ /* * Funcin usada para aceptar la pulsacin de teclas numricas solamente en un campo de texto HTML. * Trabaja bien en: Mozilla Firefox, IE6, IE8, Safari * Forma de uso: * <input type="text" onKeyPress="return accept_n...
true
5e7b9b4a5ceeac9b4ca9df4134ed5d1da85b3300
JavaScript
Charlie-Brownie85/vue-spotifake
/src/utils/functions.js
UTF-8
876
2.734375
3
[]
no_license
export const getTokenParams = hashString => { return hashString.slice(1) .split('&') .reduce((prev, curr) => { const [title, value] = curr.split('='); prev[title] = value; return prev; }, {}); }; export const setAuthHeader = (axiosInstance, token) => { try { if (token) { axiosInstance.d...
true
cfaded8e0a8d27e1c0e83c8294e39942f8218561
JavaScript
vatergo/jino
/js/index.js
UTF-8
7,943
2.59375
3
[]
no_license
function onSubmit() { event.preventDefault(); let value = document.querySelector('.input-block__input').value; if (value) { value = value.replace(/[^a-z0-9.]/gi, ''); let span = document.querySelector('.sub-block__info'); let a = document.querySelector('.sub-block__reg'); spa...
true
becb20994a353f1d3de983c29969f30fd727a321
JavaScript
foundling/Data-Structures-and-Algorithms
/binarysearch.js
UTF-8
435
3.453125
3
[]
no_license
function binarysearch(target, list) { let li = 0; let ri = list.length - 1; let checkIndex; while(li <= ri) { checkIndex = Math.floor(li + (ri - li)/2); if (target === list[checkIndex]) return checkIndex; else if (target > list[checkIndex]) li = checkI...
true
ffffdb44ad2ee85e98068ece6e5e0e49a1159ff0
JavaScript
ripetersen/ascii.design
/buffer.js
UTF-8
1,808
3.171875
3
[]
no_license
export class Buffer { constructor(backgroundChar = ' ') { this.backgroundChar = backgroundChar this.rows = new Map() this.minRow = Number.MAX_SAFE_INTEGER this.maxRow = Number.MIN_SAFE_INTEGER this.minCol = Number.MAX_SAFE_INTEGER this.maxCol = Number.MIN_SAFE_INTEGER this.width = 0 th...
true
32c7ba17ac77a4b6a2c9039d195b394db464e26b
JavaScript
rgonzalezfro/node-training
/LearnYouNode/05-filtered-ls.js
UTF-8
1,047
3.3125
3
[]
no_license
/** * Create a program that prints a list of files in a given directory, filtered by the extension of the files. You will be provided a directory name as the first argument to your program (e.g. '/path/to/dir/') and a file extension to filter by as the second argument. For example, if you get 'txt' as the sec...
true
e72e47f3a6eabec814d6a2a5bde4f8348a380df3
JavaScript
nyblad/nyblad-survey
/code/src/App.js
UTF-8
5,777
3.203125
3
[]
no_license
import React, { useState } from 'react' import { Summary } from './components/Summary' import './app.css' export const App = () => { //useState Hooks const [question, setQuestion] = useState(1) const [text, setText] = useState("") const [select, setSelect] = useState("") const [radioButton, setRadioButton]...
true
d7d761f4a8b7729ae5c00e60fbeac2a744fe4eef
JavaScript
komald4/Timer
/src/components/timer.component.jsx
UTF-8
2,237
2.578125
3
[]
no_license
import React,{useEffect,useState,useRef} from 'react' import "./timer.css"; function Timer() { const [counter,setCounter]=useState(0); const [isActive,setIsActive]=useState(false); const refSlice1= useRef(null); const refSlice2= useRef(null); const progressBarUpdate=function(x,x_percentage){ ...
true
894a6414b0ed98357e2dc1ea77fc63d10f143919
JavaScript
joebordes/bunny
/examples/validation/dist/index.js
UTF-8
72,868
2.5625
3
[ "MIT" ]
permissive
var babelHelpers = {}; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var jsx = function () ...
true
5382b0f04bc6f95519cd4b95a811327902014665
JavaScript
Anushreejain27/tower-siege-3
/tower-siege2-main/chain.js
UTF-8
510
2.578125
3
[]
no_license
class chain{ constructor(bodyA,pointB){ var options={ bodyA:bodyA, pointB:pointB, stiffness:0.01, length:30 } this.pointB=pointB this.chain= Constraint.create(options) World.add(world,this.chain) } display(){ if(this.chain.bodyA){ push() var pA=this.chain.bodyA.position var pB=this.pointB stroke(96...
true
817fd9fbd9aaf32665e7f9e3c2dc3e066b63f42e
JavaScript
jbogp/bioWeb3D
/js/utils.js
UTF-8
14,930
2.578125
3
[ "AFL-2.1", "LicenseRef-scancode-unknown-license-reference", "AFL-3.0" ]
permissive
/*************************************************************************** UTILS FUNCTIONS ***************************************************************************/ //Shorten the vertex function function v(x,y,z){ return new THREE.Vector3(x,y,z); } //Initializing Three.js renderer function initRender...
true
edc1fecbad5f1c809caf0cbbd53e367e81415bbe
JavaScript
panboren/docs-example
/source/view/do_DataTable/index.ui.js
UTF-8
4,997
2.578125
3
[]
no_license
//进页面显示效果------------------------------------------ var do_DataTable = ui("do_DataTable_1"); // 实例化 var title = [ "部门", "姓名", "出生日期", "年龄", "户籍所在地", "就职时间", "婚姻状况", "联系电话" ]; var title_width = [ "250", "200", "250", "180", "250", "200", "200", "200" ]; //var title_width = [ '450', '200', '450', '180', '250', '200', '2...
true
aa14d0b07c8bfff23b096d986289c76bdf52f58f
JavaScript
Muhibullah-09/JavaScript_All_Topics
/Splice_Function/index.js
UTF-8
596
3.96875
4
[]
no_license
/* //Add value without replacing var food = ['burger' , 'pizza' , 'snacks']; console.log(food); food.splice(1 , 0 , "burger2.0"); console.log(food); //Add value with replacing var food = ['burger' , 'pizza' , 'snacks' , 'chipas' , 'pepsi']; console.log(food); food.splice(3,2,"burger2.0");//ismay 2 jo h wo index 3...
true
521eeedef3854f7f7bd2b12f964ee0d1a2b84233
JavaScript
Yauheni23/kicker-backend
/app/services/admin-service.js
UTF-8
866
2.5625
3
[]
no_license
const bcrypt = require('bcryptjs'); const AdminRepository = require('../repositories/admin-repository'); class AdminService { constructor() { this.adminRepository = new AdminRepository(); } async getAdmin(filter = {}, password) { const user = await this.adminRepository.getOne(filter); if(!user) { ...
true
6fb1d11a0a371ff40472097f2c652c95ac2ad2ce
JavaScript
estotriramdani/estotriramdani.github.io
/js/pages/portfolios.js
UTF-8
1,337
2.640625
3
[]
no_license
import portfolios from '../data/portfolios.js'; import { content } from '../dom-elements/index.js'; import detailSkeleton from '../template/detail-skeleton.js'; import { detailPortfolio } from '../template/detail.js'; import itemsCardSkeleton from '../template/items-card-skeleton.js'; import { itemsCardPortfolios } fr...
true
d7e7ac40382d215d94d4d41c66b093e76f404aaf
JavaScript
amansethi00/build
/basics/cash-register-app/app.js
UTF-8
2,337
3.3125
3
[ "MIT" ]
permissive
const billAmt = document.querySelector("#bill-amt"); const cashGiven = document.querySelector("#cash-given"); const output = document.querySelector("#output"); const btn = document.querySelector("#btn"); const btn1 = document.querySelector("#btn1"); const cash = document.querySelector("#cash") btn1.addEventListener("cl...
true
9d5d1fcaf85e5e1c6094bd11bcc5b71fb3f97f3a
JavaScript
amandawinkles/mini-apps-2
/challenge_3/client/components/App.jsx
UTF-8
4,569
2.90625
3
[]
no_license
import React from 'react'; import ScoreCard from './ScoreCard.jsx'; class App extends React.Component { constructor(props) { super(props); this.state = { numOfPins: 0, frameNum: 1, bowlNum: 1, bowlNumsArr: [], bowlScore: 0, bowlScores: [], strike: 0, spare: 0,...
true
1b4aeff3d628db35347f28fac065bacbf1b687f5
JavaScript
decanus/Ganked
/GankedAssets/js/src/elements/steam-search.js
UTF-8
1,308
2.5625
3
[]
no_license
/** * (c) 2015 Ganked.net <feedback@ganked.net> */ import { forEach } from '../utils/for-each'; import { getClipboardData } from '../dom/clipboard/get-clipboard-data'; import { unique } from '../std/array/unique'; /** * * @type {string[]} */ const DELIMITERS = [ "http://steamcommunity.com/id/", "http://s...
true
52fb5ba08ab9d8b3f2d3e8f47b9142a9bb3182a7
JavaScript
madera0608/process
/KimeticApk/platforms/browser/www/include/500/ManejoCliente-500.js
MacCentralEurope
4,995
2.828125
3
[ "Apache-2.0" ]
permissive
function objectToString(o){ var parse = function(_o){ var a = [], t; for(var p in _o){ if(_o.hasOwnProperty(p)){ t = _o[p]; if(t && typeof t == "object"){ a[a.le...
true
d8ef4220dce849dd064ee23fabd12470499cb982
JavaScript
Da-Sheng/zujian2
/sliderCOM/js/slider.js
UTF-8
5,742
2.546875
3
[]
no_license
/* *options: * oDiv * imgs * hrefs * * */ function Slider(options){ if(!options){ throw new Error("请传入参数"); }else if(!options.oDiv){ throw new Error("请给options传入一个属性叫oDiv且包含一个div对象") }else if(!Array.isArray(options.imgs)){ throw new Error("请传入链接数组"); } this.oDiv=options.oDiv; this.imgs=options.imgs; ...
true
89c9e7f74c71be52ba64befd33eb6adef7372e74
JavaScript
vojtechszocs/react-playground
/src/redux-saga/sagas/notes.js
UTF-8
2,612
2.59375
3
[ "MIT" ]
permissive
import { call, put, select, takeEvery } from 'redux-saga/effects' import { reloadDataOnChange } from '../app-settings' import dataTypes, { checkError } from '../data-types' import { getNoteById } from '../selectors' import remoteApi from '../api/remote' import { TYPE_LOADING_NOTES, loadingNotesSucceeded, loadingNot...
true
faf220487819d2814ec8ef8ed12fdfb95a9bf64a
JavaScript
leonardomunsa/exercicios-trybe
/exercises/introducao-a-javascript-e-logica-de-programacao_4/exercicio_p2_4.js
UTF-8
337
3.796875
4
[]
no_license
function biggestChar (array) { let palavraMaior = array[0]; for (let letras in array) { if (palavraMaior.length < array[letras].length) { palavraMaior = array[letras]; } } return palavraMaior; } console.log(biggestChar(['José', 'Lucasalmeida', 'Nádia', 'Fernanda', 'Cai...
true
8a49c08962b2f2d318bf08003a8564eda322bc24
JavaScript
marciock/spa
/src/component/Icons.js
UTF-8
763
2.59375
3
[]
no_license
export class Icons extends HTMLElement{ constructor(){ super(); } connectedCallback(){ const div=document.createElement('div'); const img=this.getAttribute('img'); const text=this.getAttribute('text'); const link=this.getAttribute('link') ...
true
a7b24c55b1508e615c9881e1131b560bf7a2d39d
JavaScript
serkozyrev/LotteryTicketsReact
/src/components/TicketNumbersSection.js
UTF-8
2,242
2.578125
3
[]
no_license
import React, { useContext, useEffect } from "react"; import NumbersContext from "./context/numbers-context"; import SubmitButton from "./SubmitButton"; import ClearButton from "./ClearButton"; import RandomButton from "./RandomButton"; import "./TicketNumbersSection.css"; const TicketNumbersSection = () => { const...
true
2cf78c5748fb9dc2953fe1d5a9d7dc18099bc0c1
JavaScript
joanasmramos/FEUP-SINF
/backend/controllers/log.js
UTF-8
1,742
2.671875
3
[]
no_license
'use strict'; const Log = require('../database/models/log'); function addLog(type, processId, stepId, message) { if (processId === "") processId = undefined; if (stepId === "") stepId = undefined; const newLog = new Log({ type, processId, stepId, message, }); newLog.save() ....
true
b3f93e5edbcdf651041836091dda77bdcf154df3
JavaScript
QQ1350995917/web.foodslab.cn
/src/frontend/asserts/mine_order.js
UTF-8
7,104
2.71875
3
[]
no_license
/** * Created by dingpengwei on 9/8/16. */ function requestMineOrder() { let orderEntity = new Object(); orderEntity.cs = getCookie(KEY_CS); let url = BASE_PATH + "/order/retrieves?p=" + JSON.stringify(orderEntity); asyncRequestByGet(url, function (data) { var result = checkResponseDataFormat(...
true
036bc164a57eb6aa7732adcd9ed64eb96f05e113
JavaScript
AmrAbdulrahman/smarter-code
/src/Interpreter/Utils/concat.js
UTF-8
98
2.765625
3
[]
no_license
export function concat(destination, source) { source.forEach(elem => destination.push(elem)); }
true
2bc4e91d8deee5262e45d6f831e47cab93d97570
JavaScript
fastndead/microservices-nodejs
/customers/customers.js
UTF-8
2,290
2.75
3
[]
no_license
import express from "express"; import bodyParser from "body-parser"; import db from "./db.js" const app = express(); const port = 4546; const dbInstance = new db(); app.use(bodyParser.json()); app.get('/customers', (req, res) => { dbInstance.getAll("customers").then(result => { res.status(200).send(resul...
true
2bdd46e64238399448bd68de81e203bc08435760
JavaScript
grame-cncm/inscore
/javascript/pages/worker.js
UTF-8
258
2.546875
3
[]
no_license
var w = "onmessage = function(e) {" + " postMessage(" + " (e && e.data &&" + " ((typeof e.data.a === 'function' && e.data.a()) ||" + " e.data" + " )" + " ) + 1" + " )" + " }" console.log (btoa(w));
true
05771cdedc129f3d95ac91e5aa390ca3572bd2d6
JavaScript
aman-lohan-au2/Admin
/Interview-Preparation/Week4/Day2/Challenge/postorder.js
UTF-8
258
2.515625
3
[]
no_license
function post_order(root, nodes) { if (root && root.left) { post_order(root.left, nodes); } if (root && root.right) { post_order(root.right, nodes); } nodes.push(root.data); return nodes; } post_order(root, []);
true
5e043bd43d4d6a54b9bca5bef907236a9a88b0a7
JavaScript
wavila88/Calculator-react
/src/components/Calculator.jsx
UTF-8
8,161
3.015625
3
[]
no_license
import React from 'react'; import './Calculator.css' export default class Calculator extends React.Component { constructor(props) { super(props); this.state = { output: '', operatorArray: [], equalValue: '' }; this.insertNumber = this.insertNumber.bind(this); this.clearDisplay = this.clearDisplay....
true
b2e3628f284be81fd0b56aeeb32e38a5f207ffd1
JavaScript
lantien/server_insgrp
/app/controllers/album.controller.js
UTF-8
6,548
2.578125
3
[]
no_license
const Album = require('../models/album.model.js'); const User = require('../models/user.model.js'); const fs = require('fs'); const formidable = require('formidable'); const path = require('path'); const rimraf = require('rimraf'); exports.create = (req, res) => { //Validate request if(!req.body.name) { ...
true
e669d097baef4ac36d7ea6a49862543a69786ce9
JavaScript
ohhunkwon/restaurant
/src/website.js
UTF-8
2,465
2.859375
3
[]
no_license
import { loadHome } from "./home" import { loadMenu } from "./menu" import { loadContact } from "./contact" function createHeader() { const header = document.createElement('header') const h1 = document.createElement('h1') const i = document.createElement('i') i.classList.add('fas', 'fa-pizza-slice', 'f...
true
ad1cf7fa7f54867fb81f069c0f980669cf9c0362
JavaScript
jamesor/BlueStonePickleCase
/src/App.js
UTF-8
877
2.53125
3
[]
no_license
import React, { Component } from 'react'; function makeSections(ary) { return ary.map(sec => { let paragraphs = sec.items.map(prg => <p>{prg}</p>); return ( <section> <h2>{sec.head}</h2> {paragraphs} </section> ) }); } class App extends Component { render() { const DB...
true
b0291fd5d7f9bec5d6887fa81d2dbb2af6329ff8
JavaScript
rjsaran/multicache
/lib/utils.js
UTF-8
228
2.8125
3
[]
no_license
'use strict'; // Return a clousre next function // Expect an array exports.iterator = function iterator(coll) { let i = -1; let len = coll.length; return function next() { return ++i < len ? coll[i] : null; }; };
true
636d0b744a52d1f35c4806358d81c6e1569670cf
JavaScript
beatrizdominguez/crypto_monitor
/src/index.js
UTF-8
1,056
2.765625
3
[]
no_license
// const http = require('http'); // const axios = require('axios'); // const hostname = '127.0.0.1'; // const port = 3000; // const server = http.createServer((req, res) => { // res.statusCode = 200; // res.setHeader('Content-Type', 'text/plain'); // res.end('Hola Mundo'); // }); // server.listen(port, hostnam...
true
cc9e1dcf21671677b37c2dd8521eff60ced81af0
JavaScript
lew42/fusk
/tpl/index.js
UTF-8
4,491
3.203125
3
[]
no_license
app.module("tpl", [], function(){ /* either el has to handle refs, or .tpl has to dig for them? if nodeType === 1, for each child w/ nodeType === 1, if it has a class, use the first class..? digging is a little complicated: * invalid class names ("some-thing")? actually, that's not a problem, it shouldn't error... ...
true
b6fd20e511d2ab50769fbf5cfa60d297b03cd3c7
JavaScript
khushiiii03/Excel_Clone
/script.js
UTF-8
6,450
2.765625
3
[]
no_license
const ps = new PerfectScrollbar('#cells', { wheelSpeed: 5, wheelPropagation: true, }); function findRowCOl(ele) { let idArray = $(ele).attr("id").split("-"); let rowId = parseInt(idArray[1]); let colId = parseInt(idArray[3]); return [rowId, colId]; } for (let i = 1; i <= 100; i++) { let str...
true
c9163b65005624a5981fe339f44cd6ab97dcd510
JavaScript
imachines/IMA-Interactive-Machine-Learning
/w02-ml5-posenet/ml5-posenet-01-basics/js/sketch.js
UTF-8
1,104
2.796875
3
[]
no_license
let video; let poseNet; let poses; function setup() { createCanvas(640, 480); video = createCapture(VIDEO); video.size(640, 480); video.hide(); poseNet = ml5.poseNet(video, modelReady); poseNet.on('pose', function (results) { poses = results; }); } function draw() { background(0); image(vide...
true
0d80c02c4bf13efe091e55a50b39a4f831927aa0
JavaScript
chrisjgilbert/express-thermostat
/public/src/thermostat.js
UTF-8
1,790
3.265625
3
[ "MIT" ]
permissive
'use strict'; var DEFAULT_STARTING_TEMP = 20; var DEFAULT_MIN_TEMP = 10; var PSM_ON_MAX_TEMP = 25; var PSM_OFF_MAX_TEMP = 32; var LOW_USAGE_LIMIT = 18; var MED_USAGE_LIMIT = 25; function Thermostat() { this.temperature = DEFAULT_STARTING_TEMP; this.minTemperature = DEFAULT_MIN_TEMP; this.maxTemperature = PSM_ON...
true
996d1b9b21d968c727dcf5af5216a12c8418e9d0
JavaScript
mnoko33/practice
/this/quiz05.js
UTF-8
101
2.609375
3
[]
no_license
const logThis = () => { console.log(this); } const myObj = { name: "sag1v" } logThis.apply(myObj)
true
8782a0bb4475afc3e276f7ffdfcc8e3016277e48
JavaScript
mhevery/dart-node.js
/lib/protractor.js
UTF-8
1,531
2.609375
3
[]
no_license
var vm = require('vm'); var fs = require('fs'); var crypto = require('crypto'); var exec = require('child_process').exec; var describes = []; // EXPORT GLOBAL APIs. global.DartObject = function(o) { this.o = o }; global.describe = function(name, body) { describes.push({name: name, body: body, its: []}); }; globa...
true
76d8ccb8f838c5932a0d5a8270185daa63a8e783
JavaScript
cemalkilic/tindify
/routes/index.js
UTF-8
7,655
2.765625
3
[ "MIT" ]
permissive
var url = require('url'); var path = require('path'); var querystring = require('querystring'); var https = require('https'); var request = require('request'); var session = require('express-session'); var PLAYLIST_NAME = "Tindify"; var routes = {}; /* Homepage (/) */ routes.home = function(req, res) { res.render(...
true
c27759a73335e395714abab9234e1e89ca106959
JavaScript
AAI-USZ/FixJS
/input/50-100/after/4b8301046ea1e9b0cf98c372708652c427bf9ae8_0_1.js
UTF-8
631
2.5625
3
[ "MIT" ]
permissive
function (){ if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/Android/i)) { $(window).bind('orientationchange', function(event) { if (window.orientation == 90 || window.orientation == -90 || window.orientation == 270) { $('meta[name="viewport"]').attr('cont...
true
c03187bc037ac1020c8f3bf54759669f22420834
JavaScript
wanderdust/geoapp
/server/utils/openSocketsGroups.js
UTF-8
827
2.71875
3
[]
no_license
let OpenSocketsGroups = class { constructor () { this.openSockets = []; } addSockets (groupId, socketId) { let newSocket = {groupId, socketId}; let alreadyExists = this.openSockets.filter((data) => { return data.groupId +'' === groupId + '' && socketId +'' === data.socketId + '' }) if (alreadyE...
true
28671b918303631c1722b6c45caabcc6148f0b3c
JavaScript
101companies/101repo
/contributions/html5tree/client/javascript/model/employeeModel.js
UTF-8
2,160
2.53125
3
[ "MIT" ]
permissive
var employeeModel = {}; employeeModel.url = 'server/employeeServer.php'; // init request-parameter employeeModel.initEmployee = function(id) { employeeModel.employee = {}; employeeModel.employee.id = id; employeeModel.employee.table = "employee"; } // load data for employee employeeModel.load = function(...
true
208c7de4d47bcf340173c472b4e7a2433c17040d
JavaScript
Dafondo/papasquat
/melonJS/src/renderable/container.js
UTF-8
31,952
2.578125
3
[ "MIT" ]
permissive
/* * MelonJS Game Engine * Copyright (C) 2011 - 2018 Olivier Biot * http://www.melonjs.org * */ (function () { /** * Private function to re-use for object removal in a defer * @ignore */ var deferredRemove = function (child, keepalive) { this.removeChildNow(child, keepalive); }; ...
true
ce316f7db29882eae19fa14088b53ff87fcaeac5
JavaScript
noutop/StoryMe
/routes/story-routes.js
UTF-8
4,079
2.578125
3
[]
no_license
// routes/project-routes.js const express = require('express'); const mongoose = require('mongoose'); const router = express.Router(); const Story = require('../models/story-model'); // const Task = require('../models/task-model'); // <== !!! // GET route => to get all the stories for discovery page router.get('/sto...
true
d9e8e488a14ae6442c86320a63368ec9d63275e6
JavaScript
qubick/GcodeParser
/lib/parser.js
UTF-8
3,076
2.703125
3
[]
no_license
var fs = require('fs') ,validator = require('validator') //var vic = require('victor'); //var lineReader = require('line-by-line'); ,path = require('path') var inFile = "../data/tian-layer5.gcode" var outFile = "output.csv" //var inFile = "../data//new1.gcode" //var outFile = "new1.csv" var rDist ...
true
95c5490790fc1c8866fed6d95553a3c3587bc73a
JavaScript
umaqgeek/react-native-practice-v3
/src/store/reducers/tempats.js
UTF-8
1,243
2.734375
3
[]
no_license
import { ADD_TEMPAT, DELETE_TEMPAT, DELETE_ALL_TEMPAT, PILIH_TEMPAT, UNPILIH_TEMPAT } from '../actions/actionTypes'; const initialTempat = { tempat: [], selectedTempat: null }; const tempatReducer = (state=initialTempat, action) => { switch (action.type) { case ADD_TEMPAT: return { ...state, ...
true
be34bb346bd55c48fc5827b02438b0d75c05a6bb
JavaScript
emnuelly/jogo-do-canhao-java-script
/js/Game.js
UTF-8
1,278
3.125
3
[]
no_license
class Game { constructor(gameEngine) { this.gameEngine = gameEngine; this.playerOne = true; this.controls = null; this.ai = null; } setControls(controls) { this.controls = controls; controls.start(this); } setAi(ai) { this.ai = ai; ai.start(this); } addElement(gameElemen...
true
b920d6348512fcd409916c7c8500816d12d60585
JavaScript
anshuaishuai95/big_event_01
/assets/js/index.js
UTF-8
1,877
2.890625
3
[]
no_license
//入口函数 $(function () { //获取用户信息 getUserInfo() //退出登录,其他地方用不到 所以不用封装成函数 let layer = layui.layer //点击退出。弹出一个提示框 $('#btnLogout').click(function () { //eg1 layer.confirm('确定要退出登录?', { icon: 3, title: '提示' }, function (index) { //do something //弹窗 销毁token 跳转到...
true
1970e8210795787712ed10f9802917095d14e336
JavaScript
rohanhrk/2_cricinfo_HW
/activity/5_extractMathInfo.js
UTF-8
1,170
2.875
3
[]
no_license
// let request = require("request"); // let cheerio = require("cheerio"); // let infoArr = []; // function extractMatchInfo(html) { // let chSel = cheerio.load(html); // //date ,venue ,result and opponent name for that match // let description = chSel(".match-info.match-info-MATCH .description"); // // ...
true
6a4d92cc9de431591618ba81fe4e4ecc18ab55f0
JavaScript
llinzeyang/fish
/js/ane.js
UTF-8
930
2.96875
3
[]
no_license
//海葵 var aneObj=function(){ this.rootx=[]; this.headx=[]; this.heady=[]; this.amp=[];//摆动幅度 this.alpha=0; } aneObj.prototype.num=50; aneObj.prototype.init=function(){ for(var i=0;i<this.num;i++){ this.rootx[i]=i*16+Math.random()*20; this.headx[i]=this.rootx[i]; this.heady[i]=canHeight-...
true
68fe84004c44d418fb44a3e8114e25d7294a003d
JavaScript
AmirMhKE/Django-Upload-Photo-Site
/static/account/js/dashboard_statistics.js
UTF-8
2,243
2.5625
3
[]
no_license
$(document).ready(function() { let stat = JSON.parse($("#stat").html()); let chart = { type: 'column' }; let title = { text: $(".title").text() }; let subtitle = { text: 'آمار اخیر' }; let xAxis = { categories: stat["dates"].map((value) => { ...
true
75420adff84590ff7d72d11c93d12a26f639a878
JavaScript
kavitachana/Node-training-Apr-2017
/Labs/Ch09-Validation-Security-RelationalData/Exercise14-Relations/End/code/lib/parse-interests.js
UTF-8
248
2.6875
3
[]
no_license
'use strict'; module.exports = function parseInterests(interests) { if (interests == null) { return []; } else { return interests.split(",").map((item) => { return item.trim(); }).filter((item) => { return (item !== ""); }); } };
true
ff78e8903b9924d518816ccebd9841e6d8eb6481
JavaScript
Mastansheik/movies-list
/src/App.js
UTF-8
1,767
2.671875
3
[]
no_license
import React, { useState } from "react"; import axios from "axios"; import "./App.css"; import CardUi from "./cardsUi"; function App() { const [Value, setValue] = useState(""); const [response, setReponse] = useState([]); const [userMessage, setuSerMessage] = useState(false); const [loader, setLoader] = useSta...
true
165f061dd8b06872995fdd879929a24dbafef0a9
JavaScript
w12-platform/W12-Product-Blockchain-Protocol
/test/token/WTokenTestHelper.test.js
UTF-8
6,921
2.546875
3
[]
no_license
require('../../shared/tests/setup.js'); const utils = require('../../shared/tests/utils.js'); const WTokenTestHelperTest = artifacts.require('WTokenTestHelper'); const WToken = artifacts.require('WToken'); const oneToken = new BigNumber(10).pow(18); contract('WTokenTestHelper', async (accounts) => { const ctx = ...
true
040fbd7e611feed0033a072c7b06504f686dc9b3
JavaScript
sassymcnugget/yeeteroni-and-cheese
/controllers/users.js
UTF-8
2,200
2.609375
3
[]
no_license
//require const db = require('../models') //controllers const index = (req, res) => { db.User.find({}, (err, foundUsers) => { if (err) console.log(`error in users#index: ${err}`) res.status(200).json({ users: foundUsers }) }) } const results = (req, res) => { let bandQuery = req.bod...
true
c7dcb84588635efa5e98c588116b655b5ef4f3f4
JavaScript
Yjx1125/Gshopper
/src/js/details.js
UTF-8
3,360
2.640625
3
[ "MIT" ]
permissive
//转购物车页 let $buy = $(".carts .buy"); init(); $(".buy").focus(function () { $(this).css("background", "#FF5224"); }) $(".buy").blur(function () { $(this).css("background", "#ffffff"); }) //为减号添加事件 let num = $(".r-number").val(); $(".r-min").click(function () { // console.log(152); // $(this).css("bac...
true
4dd0964bc0ffde6c73339c75dc4329183d49021d
JavaScript
atsid/breadboard
/app/util/links.js
UTF-8
869
3.046875
3
[ "Apache-2.0" ]
permissive
"use strict"; /** * Finds a specific link object within a collection by looking for a rel match. * For example, finding the "self" link within the links on an object. * @param links * @param rel * @returns {*} */ exports.find = function (links, rel) { var result, reg = new RegExp(rel); links.some...
true
be3fc366a70ed391f02ecc0019c634d52d1533dd
JavaScript
RitamAgrawal/robot-friends
/src/container/card.js
UTF-8
1,577
2.5625
3
[]
no_license
import React from "react"; const CardItem = (props) => { return ( <div onClick={props.showCardDetail}> <h3>{props.name}</h3> <p>{props.email}</p> </div> ); }; const CardDetail = (props) => { return ( <div onClick={props.hideCardDetail}> <h3>username: {props.username}</h3> <p>...
true
07218ce89e2ff37e70d668779e2abf17f8bb2e01
JavaScript
nibble-4bits/my-codewars-solutions
/solutions/format_a_string_of_names_like_bart_lisa_maggie/solution.js
UTF-8
288
3.0625
3
[ "MIT" ]
permissive
function list(names){ let formattedStr = names.map(x => x.name).join(', '); let lastCommaIdx = formattedStr.lastIndexOf(','); if (lastCommaIdx > -1) formattedStr = `${formattedStr.slice(0, lastCommaIdx)} & ${formattedStr.slice(lastCommaIdx + 2)}`; return formattedStr; }
true
8528f37c53d09954872112b5fc3635a5bed324fd
JavaScript
1092334069/weipage1.1
/assets/js/formCheck.js
UTF-8
6,911
2.84375
3
[]
no_license
/* * 表单校验插件 * 参数:option{ * checkForm 待校验表单 * } * doCheck()对checkForm执行遍历校验 * doCheckOne(form) 校验单个表单,form待校验的表单标签 * doCheckList(formList) 校验多个表单,formList为表单标签列表 * */ (function(window,$){ var formCheck = function(option){ this.option = option; //待检测的表单 this.checkForm = undefined; //待执行校验的表单列表 ...
true
15821cb4bf2a7a3d9b806c0d0e60c197cd1b616d
JavaScript
anandlal1080/employee-tracker
/app.js
UTF-8
2,219
2.796875
3
[]
no_license
const connection = require("./connection"); const inquirer = require("inquirer"); const logo = require("asciiart-logo"); const { ROLE } = require("./questions/color"); const { DEPARTMENT } = require("./questions/color"); const { EMPLOYEE } = require("./questions/color"); const { VIEW } = require("./questions/color"); c...
true
8ceb52432dd9bcbcc8277790d052a6022a22d56d
JavaScript
ivanwonder/JS-Sorting-Algorithm
/test/tries.spec.js
UTF-8
872
2.875
3
[]
no_license
const { TST } = require("../algorithm/Tries"); const assert = require("assert"); describe("Test Tries", function() { it("get\\put\\delete key|value", function() { const tst = new TST(); tst.put("a", 1); tst.put("ab", 2); assert.strictEqual(tst.get("a"), 1); assert.strictEqual(tst.get("ab"), 2); ...
true
e3b62c6f61c2ca3c17d3da4b83b2d6ef4363028d
JavaScript
zouyujie/CommonPlatform2
/Secom.Smp.Web.Home/obj/Release/Package/PackageTmp/Content/js/lib/datatables/js/DataTablesExt.js
UTF-8
2,801
2.515625
3
[ "MIT" ]
permissive
//*********************************2017-07-06-Zouqj***************************************** //---------------------------DataTables UI控件的扩展js,请确保引用了此js的页面元素命名一致,引入此js之前请先引用jquery------------------------------------------- var table_h = 0; //表格的高度 var table_h1 = 0; $(function () { table_h = $("#divSearch") ? $(do...
true
8e6c44981ffdb1e0c8f118e6713e2e4a7e7b53d1
JavaScript
santiagoAA98/ES6
/output/desctructurarObjeto.js
UTF-8
581
3.109375
3
[]
no_license
"use strict"; var USUARIO = { nombre: 'Carlos', correo: 'carlos@gmail.com', edad: 22, pais: 'paraguay' }; var nombre = USUARIO.nombre, edad = USUARIO.edad; console.log("el se llama ".concat(nombre, " y su edad es ").concat(edad)); //ahora con utilizando una funcion var mostrarInfo = function mostrarInfo(_...
true
7da2e898fd79d999917dcbd9a34ff71d161befab
JavaScript
nitinski/datingApp
/server.js
UTF-8
1,219
2.734375
3
[]
no_license
// Load the express module (Where do you think this comes from?) var express = require("express"); var app = express(); var path = require("path"); // require body-parser var bodyParser = require('body-parser'); //app.use(bodyParser.urlencoded()); app.use(bodyParser.json()); require('./server/config/mongoose.js'); ...
true
89ba75b2056287b9c67b5a534f299cb7dffcc570
JavaScript
butlerx/connect4
/assets/js/index.js
UTF-8
5,058
2.96875
3
[ "MIT" ]
permissive
var gameField = new Array(), board = document.getElementById("board"), currentCol, currentRow, currentPlayer, id = 1, won = false; newgame(); function newgame(){ prepareField(); placeDisc(Math.floor(Math.random()*2)+1); } function checkWinner(row,col){ if(getAdj(row,col,0,1)+getAdj(row,col,0,-1) > 2 || getAdj(...
true
b1da9adc773e97be16ee8871d7aa0a69e562d121
JavaScript
carlindgren/fe19tp2_orange
/src/components/Charts/objectFunctions.js
UTF-8
6,631
3.0625
3
[]
no_license
import { isWithinInterval, subDays } from 'date-fns' import { response1 as response } from './response1' export const titleTypes = [...new Set(response.map(item => item.title_type))]; //****ta bort alla sammanfattningar i requestet.******/ const compareArr = ["Sammanfattning natt", "Sammanfattning vecka", "Sammanfat...
true
45fbfdd9e7a083d8b3308b00191f2b642a2a8551
JavaScript
Align1993/nodeJS
/es6/class/test.js
UTF-8
1,831
4.0625
4
[]
no_license
function Point(x, y) { this.x = x; this.y = y; } Point.prototype.toString = function () { // toString() ==> this return '(' + this.x + ',' + this.y +')'; } var p = new Point(9, 1); console.log(Object.keys(Point.prototype)); // es声明的类支持枚举 // es6 class class PointN { constructor(x, y) { this...
true
86c39cd5cc375b460131dab78057ddfa40bcc843
JavaScript
colest/mycodejournal
/client/src/actions/projectActions.js
UTF-8
1,468
2.53125
3
[]
no_license
import { GET_PROJECTS, GET_PROJECT_DETAILS, CREATE_PROJECT, UPDATE_PROJECT, PROJECTS_LOADING } from './types'; import axios from 'axios'; export const getProjects = () => dispatch => { dispatch(setProjectsLoading()); axios .get('/api/projects') .then(res => dispatch({ ...
true
2fdb1260e56fd7c8323051cd848b8bda39d9d9bd
JavaScript
YaroslavW/trening-js
/FB-tasks/Geim-How_much_$_need_to_living/index.js
UTF-8
816
3.828125
4
[]
no_license
function addData() { const age = prompt("Type your age"); // console.log(age); const elAge = document.getElementById("age"); const elMoney = document.getElementById("money"); elAge.innerHTML = age; let money = null; let number = Math.random() * 10 + 1; if (age < 10) { money = Math.round(age / number...
true