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
fcf3c1785dd966ea8c183ade7667f79fed8fd68d
JavaScript
harinks/my-learning
/javascript-101-master/workouts-106/accountant.js
UTF-8
580
3.921875
4
[]
no_license
/* An accountant is still unable to sum things up. It's either an invalid result or even not a number. Add some code so that the final sum will fit. Mission is accomplished if console.log() at line #18 runs. NOTE: it's prohibited to modify the code of the IIFE itself. */ (function accountant() { ...
true
e328500ec6dd92e21f5a8fc832a22288c4905159
JavaScript
Gomathi-Janakiram/Instagram_clone_backend
/routes/post.js
UTF-8
3,995
2.515625
3
[]
no_license
const express = require("express") const router = express.Router() const mongoose = require("mongoose") const Post=mongoose.model("Post") const requireLogin=require("../middleware/requireLogin") // listing all the posts router.get("/allpost",requireLogin,(req,res)=>{ Post.find() // .populate("postedBy") if w...
true
f6d8e33580a0edeb836b96701c9e15fbaeff82b9
JavaScript
Vishalkapoor123/messenger-4746
/client/src/store/utils/reducerFunctions.js
UTF-8
3,571
2.75
3
[]
no_license
import { setMessageToRead } from "./thunkCreators"; import store from ".."; export const addMessageToStore = (state, payload) => { const { message, sender, activeConversation } = payload; // if sender isn't null, that means the message needs to be put in a brand new convo if (sender !== null) { const newConv...
true
0c1c6f4c1db17c61580f546d6832c556e9ca82c8
JavaScript
kbgar24/node-course-2-todo-api
/playground/mongodb-update.js
UTF-8
978
2.578125
3
[]
no_license
// const MongoClient = require('mongodb'); const {MongoClient, ObjectID} = require('mongodb'); var obj = new ObjectID(); console.log(obj); MongoClient.connect('mongodb://localhost:27017/TodoApp', (err,db) => { if (err) { console.log('Unable to connect to MongoDB server'); } else { console.log('Connected ...
true
b7bcca63819fa58795a89bfd26c11a3a777dd52c
JavaScript
stanJ/js-test
/js/delegate.js
UTF-8
600
2.96875
3
[]
no_license
document.addEventListener('DOMContentLoaded', function() { var oUl = document.getElementById('ul-test'); oUl.addEventListener('click', function(e) { //window.event不是一个标准特性,来源于ie,firefox不支持 var event = e || window.event; //event.srcElement不是一个标准特性,来源于ie,firefox不支持 var target = event.target || event.s...
true
1df0e2cd175a59eb9e908bba7ef9061b6225f1b9
JavaScript
Gazer/3DG-Live
/follow.js
UTF-8
559
2.546875
3
[ "MIT" ]
permissive
var sys = require("sys"), EventEmitter = require('events').EventEmitter; var followers = []; function Follower(request, response) { if (!(this instanceof Follower)) { return new Follower(request, response); } EventEmitter.call(this); this.response = response; this.request = request; followers.p...
true
3cdf23e769f92219668c9bd38437235a30ddc088
JavaScript
igorpioneer/ericprydz
/assets/js/main.js
UTF-8
9,915
2.625
3
[]
no_license
$(document).ready(function(){ ispisNav(); ispisFooterNav(); ispisFooterIco(); if(url.indexOf("index.html") != -1){ ispisAlbum(); slajder(); } if(url.indexOf("about.html") != -1){ slajderAbout(); } if(url.indexOf("author.html") != -1){ ...
true
962ac3a17d8b86c30df3a8757e897e5a6c3d4439
JavaScript
ohnobenito/employee-directory
/src/App.js
UTF-8
2,432
2.96875
3
[ "MIT" ]
permissive
import React, { Component } from "react"; import employees from "./data/employees.json"; import NavBar from "./components/NavBar/NavBar" import TableHeader from "./components/TableHeader/TableHeader"; import TableBody from "./components/TableBody/TableBody"; class App extends Component { state = { employees, ...
true
ae4bb801f72b40b45183495a2c91c03ddc889199
JavaScript
tfimos/userscripts
/partyparrot.user.js
UTF-8
2,023
2.71875
3
[]
no_license
// ==UserScript== // @name party parrot - PARTY OR DIE // @namespace https://github.com/jmhobbs/cultofthepartyparrot.com // @version 0.3.2 // @description There's no parrot like party parrot! // @author cuidas // @match http://*/* // @match https://*/* // @downloadURL https://raw.g...
true
5363285d3973e5385022f95ff005a370152e68d9
JavaScript
behnam/raw-viewer
/public/libheif-worker.js
UTF-8
628
2.53125
3
[]
no_license
/* global postMessage */ const fs = require('fs-extra'); const decode = require('heic-decode'); const raw = async (filepath) => { const buffer = await fs.readFile(filepath); const { width, height, data } = await decode({ buffer }); return { width, height, data }; }; // eslint-disable-next-line no-undef onmessa...
true
1c8f0f5669cdc8b9db0cf838f049f3048156ff34
JavaScript
nataliaamachowskaa/wsei-javascript-zadania
/1_Zadania/obowiązkowe/11_DOM_Eventy/js/zadanie02.js
UTF-8
230
2.71875
3
[]
no_license
document.addEventListener("DOMContentLoaded", function () { function showMessage(e){ console.log('Hura! Działa!'); } document.querySelector('#mainBtn') .addEventListener('click',showMessage,false); });
true
fdd9b51958b42899fd4a6e29ffd5be7477f39bdc
JavaScript
devitasari/codewars
/mexicanWave.js
UTF-8
487
3.375
3
[]
no_license
function wave(kata){ // Code here var kata1 = kata.split('') var wave = [] for (var i=0; i<kata1.length; i++) { if (kata1[i] === ' ') { continue } else { var kataBaru = '' kata1[i] = kata1[i].toUpperCase() for (var j=0; j<kata1.length; j++) { ...
true
331d2404a086c52c358dc8e4ae4ae1ec1f73fdfa
JavaScript
EmilcyFelipe/jogo-da-memoria
/game.js
UTF-8
250
2.625
3
[]
no_license
let cardsToMatch=[]; //Verifica as cartas clicadas function match(){ if(cardsToMatch[0].children[1].children[0].className==cardsToMatch[1].children[1].children[0].className){ return(true); }else{ return(false); } }
true
4cc21eb088625ce0e261b9ccdcac6e557b061fd0
JavaScript
teranatu/GAOGAO_LP
/js/addmain.js
UTF-8
2,160
2.8125
3
[]
no_license
$(document).ready(function() { 'use strict'; // ========================================================================= // // Get markerposition // ========================================================================= // $(window).scroll(function (){ $(".marker-animation").each(function(){ var position = $...
true
1eac7a06939b82e866ee4b7f57652f1def59c727
JavaScript
ianevangelista/Miniprosjekt
/client/src/components/CommentForm.js
UTF-8
2,164
2.625
3
[]
no_license
// @flow import React, { Component } from "react"; import { getComments, addComment } from "../Service"; export default class CommentForm extends Component< { articleId?: any }, { brukernavn: string, kommentar: string, sak_id: any } > { constructor(props: any) { super(props); this.state = { b...
true
ced0507046ff9b09dda2f3b5cb10051b554b6dc3
JavaScript
MAlnouri/NodeBlackJack
/routes/users.js
UTF-8
1,694
2.90625
3
[]
no_license
var express = require('express'); var router = express.Router(); let serverPlayerArray = []; // our "permanent storage" on the web server // define a constructor to create player objects var Player = function (userName, password, wins, losses, money) { this.userName = userName; this.password = password; this.w...
true
f4dfd9e96bb360b9b6e95dc3413f33d1f4fee34e
JavaScript
walkingeyerobot/smw-timer
/death.js
UTF-8
2,964
2.671875
3
[]
no_license
function main() { var msgFunc; var answers = []; var statusDiv = document.querySelector('#status'); function makeNewConnection() { console.log('connecting...'); // statusDiv.textContent = 'connecting...'; var connection = new WebSocket('ws://localhost:8080'); connection.onopen = function () { ...
true
10660e1818770edc0e97e23061382ceb59374d33
JavaScript
adam-weiler/team_js_testing_reinforcement
/team.test.js
UTF-8
892
3.265625
3
[]
no_license
const teamObj = require('./team.js'); test('what happens when input is supplied', () => { const result = new teamObj('Raptors', 7, 6); expect(result).toBeInstanceOf(Object); expect(result.teamName).toEqual('Raptors'); expect(result.level).toEqual(7); expect(result.points).toEqual(0); }); test('wh...
true
2d8457189116eae2758783cb1d9bd1a14341cdd0
JavaScript
mrpehlivan/PlayWithEcmaScript6
/topics/4-spreadOperator.js
UTF-8
987
4.3125
4
[]
no_license
//Describe : Spreading of elements of an iterable collection (like an array or even a string) into both literal elements and individual // function parameters. //Example 1 : //Before Ecmascript 6 format function sum(a,b){ return a+b; } let nums = [3,4] console.log(sum(nums[0],nums[1])) //Output is: //7 //Ecm...
true
d04d1a47905e1bbac916023a0e30c1a6951568e3
JavaScript
osamthing/javascript-tutorial
/es5/3-3-2.js
UTF-8
656
4.375
4
[]
no_license
/* これは難しい。 new演算子を用いて呼び出された場合はreturnがなくてもその関数の値を返す。 */ var myFunc = function(){ this.prop1 = 'bar'; this.prop2 = 'foo'; this.method = function(){ return this.prop1+this.prop2; } return this.prop1; } var obj1 = new myFunc(); // var obj1 = new myFunc(); var obj2 = myFunc(); console.log(obj1.method()); //bar...
true
6c842c94206212c339cb3cd440ac096af122f793
JavaScript
github/codeql
/javascript/ql/test/query-tests/LanguageFeatures/ExpressionClosures/tst.js
UTF-8
133
3.078125
3
[ "MIT" ]
permissive
// NOT OK [1, 2, 3].map(function(x) x * x); // OK [1, 2, 3].map(function(x) { return x * x; }); // OK [1, 2, 3].map((x) => x * x);
true
93cf8e6fa810f7be65db51f7ec319e3410f65e0c
JavaScript
hoanbka/coderbyte-2
/medium 06 - string scramble.js
UTF-8
302
3.078125
3
[]
no_license
function StringScramble(str1,str2) { var arr1 = str1.split(""); var arr2 = str2.split(""); for(var i = 0; i < arr2.length; i ++) { var foundAt = arr1.indexOf(arr2[i]); if(foundAt !== -1) { arr1.splice(foundAt, 1); } else { return false; } } return true; }
true
1a4889bf0ab455744908235a896a50e117d126b4
JavaScript
Morganamilo/super-productivity
/electron/dbus.js
UTF-8
3,834
2.703125
3
[ "MIT" ]
permissive
'use strict'; // only optionally require dbus let isDBusError = false; let dbus; try { dbus = require('dbus-native'); } catch (e) { console.log('NOTE: Continuing without DBUS'); console.error(e); isDBusError = true; } const CONFIG = require('./CONFIG'); const serviceName = CONFIG.D_BUS_ID; const interfaceNam...
true
458e62d13ad5b1600906e9b290f8c7eb983e88e7
JavaScript
jairorudas/stepByStepInJavaScript
/portugues/5-funções/metodo_toString.js
UTF-8
311
3.671875
4
[ "Apache-2.0" ]
permissive
/* Metodo toString(). Basicamente o que ele faz na funções é retornar ela como uma String. vemos . . . */ function Cafe ( aroma, acidez, estado ) { this.aroma = aroma, this.acidez = acidez, this.estado = estado } Cafe.toString(); //Copia este codigo no console e você verá a string.
true
a1ef7adb4abc9d3c99c70ce9fe055bdb77037693
JavaScript
huhaoshow/Study
/Node.js第3天/04-源代码/code/user/app.js
UTF-8
6,738
2.703125
3
[]
no_license
//我们需要和客户端通讯、需要读写文件 const http = require('http') const fs = require('fs') const path = require('path') //要处理url地址 const urlModel = require('url') // 引入模块 const querystring = require('querystring') //1. 创建服务器对象 let app = http.createServer(); //2. 监听端口 app.listen(3003, () => { console.log('server is running at ht...
true
2bf53633fce6731e17f2267631d125633d3121e5
JavaScript
lianghao208/tornado_websocket
/static/js/update_med.js
UTF-8
9,389
2.734375
3
[]
no_license
/** * Created by Administrator on 2017/11/21. */ function getMedTable(id) { var request = new XMLHttpRequest(); request.open("GET", "/search/getMedById?id="+id); request.setRequestHeader("Content-type","application/x-www-form-urlencoded"); //TODO 补全代码 request.send(); request.onreadystatechang...
true
f2d52be420fd7288445c7eb25aa53bcafb05f5f3
JavaScript
wzt824/track
/track/js/indexpublic.js
UTF-8
5,233
2.953125
3
[ "Apache-2.0", "MIT" ]
permissive
// 头部点击效果 function fun1() { let headUls=document.getElementsByClassName("headUls")[0].children; let n = 0; for (let i=0,len=headUls.length;i<len;i++){ headUls[i].onclick = function () { for (let j=0,len=headUls.length;j<len;j++) { document.getElementsByClassName("LiUls")[...
true
d99be93df5db85d0b11d0ae8d7f4ad634ae7b4b7
JavaScript
Janteby1/phase2_test
/static/main.js
UTF-8
1,964
2.84375
3
[]
no_license
$(document).ready(function(){ console.log("Hi there!") $('.wcards_button').on('submit', function(event){ event.preventDefault(); console.log ("clicked!"); //for testing $.ajax({ method: "GET", url: ("/cards/white"), //just goest to url success: function(data){ ...
true
ca84f08ff8b474b27cf1f90670a21a00d93e9a49
JavaScript
Nestormike/fort
/src/reducers/companies.js
UTF-8
531
2.625
3
[]
no_license
import {EXPAND_COMPANY, SET_COMPANIES} from "../constants/constants"; const initialState = { companies: [], currentCompany: null } export function companiesReducer(state = initialState, action) { switch (action.type) { case SET_COMPANIES: return {...state, companies: action.companies};...
true
a020666d6eff60734dbb4e6d4a99590a8cadcec5
JavaScript
phil0x1/ScriptableWidgets
/tankstellenpreisev2_beta.js
UTF-8
6,004
2.734375
3
[]
no_license
// Version 2.0.3b // Check www.scriptables.net for more widgets // Use www.scriptdu.de to keep the widget up-to-date const files = FileManager.local() const configPath = files.joinPath(files.documentsDirectory(), "widget-tankstelle.json") const configExits = files.fileExists(configPath) let configuration = await load...
true
b0ebdfe418fa07a91b36dac6d5f4f5e3b803a590
JavaScript
CodingDojoTulsaMay2018/Tom_Reese
/MEAN/js_fundamentals/ninja_class_3.js
UTF-8
1,884
3.640625
4
[]
no_license
class Ninja{ constructor(name){ this.name = name; this.health = 100; this.speed = 3; this.strength = 3; } drinkSake() { this.health += 10; console.log(`You drank some local booze! Your current health is ${this.health}`); return this }; showStats(){ ...
true
04fabd417a12662dd06abf2a785c20846c8b0cf9
JavaScript
giterdun345/mongodbMongoose
/myApp.js
UTF-8
3,204
2.96875
3
[]
no_license
const mongoose = require('mongoose'); require('dotenv').config(); require('mongoose') mongoose.connect(process.env.MONGO_URI, {useNewUrlParser: true, useUnifiedTopology: true}) const PersonSchema = new mongoose.Schema({ name:{type: String, required:true}, age: Number, favoriteFoods: [String] }) let Person = mo...
true
bee9c5673f0c8a55837cde63edd4db7feda80f7e
JavaScript
daytona/lds
/lds-styleguide/src/helpers/object2query.js
UTF-8
338
2.671875
3
[ "MIT" ]
permissive
export default function object2query(obj) { const queries = []; Object.keys(obj).forEach((key) => { queries.push(`${key}=${(typeof obj[key] === 'object' ? JSON.stringify(obj[key], null, 0) : obj[key])}`); }); return encodeURI(queries.join('&').replace...
true
2bf8110d3e65d46d98da2dad09457a9ae1e3ae27
JavaScript
crystalfn/LeetCode
/leetCode/dynamicPlanning/MaximumSubarray.js
UTF-8
719
3.859375
4
[]
no_license
/** * 最大子序列和 * Maximum Subarray * * Given an integer array nums, * find the contiguous subarray (containing at least one number) * which has the largest sum and return its sum. * * Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Output: 6 Explanation: [4,-1,2,1] has the largest sum = 6. */ /** * mad...
true
7b05109764488d081b5905c3184b7a312d14764e
JavaScript
rs22/acme-dns-01-desec
/lib/index.js
UTF-8
4,082
2.578125
3
[ "MIT" ]
permissive
'use strict'; const defaults = { baseUrl: 'https://desec.io/api/v1' }; module.exports.create = function(config) { // config = { baseUrl, token } const baseUrl = (config.baseUrl || defaults.baseUrl).replace(/\/$/, ''); const authtoken = config.token; let request; function api(method, path, form) { con...
true
a804f37e8ec2736061185476a3f4ca370879b621
JavaScript
CarolineHoeg/3sem2020-Week5
/04-friday-exercises/01-Countries-Europe/src/index.js
UTF-8
1,336
2.90625
3
[]
no_license
import 'bootstrap/dist/css/bootstrap.css' let url = "http://restcountries.eu/rest/v1/alpha?codes"; let map = document.getElementById("svg2"); map.addEventListener("click", getCountry); var previous; function getCountry(evt) { let country = evt.target.closest('path'); if (previous == null) { previous...
true
2a04f35e61c77f836150159e1baed2b259adbd95
JavaScript
panasik/reactjs-gmp-2021
/src/app/util/hooks/toggle.test.js
UTF-8
1,640
2.546875
3
[]
no_license
import {render, screen} from '@testing-library/react'; import '@testing-library/jest-dom/extend-expect'; import userEvent from '@testing-library/user-event'; import React from 'react'; import {useToggle} from "./toggle"; function UseToggleComponent() { const [flag, toggle] = useToggle(false); return (<> ...
true
ed3d82873ce07ea4249a9b9e78e0476ac873d907
JavaScript
mon7792/card
/coin-card-demo/src/ui/game/game.js
UTF-8
348
2.671875
3
[]
no_license
/* * game responsible for creation of new game * * */ class GameSession{ constructor(){ this._id=""; this._players = new Map(); this._playerTurnID = ""; } get getPlayersInSession(){ return this._players } addPlayer(playerID, player){ this._players.s...
true
2caafc8625d1472436673a6e00308df26893ee0f
JavaScript
spiderworm/DRX
/src/util/SmartClassFactory.js
UTF-8
1,150
2.96875
3
[]
no_license
import objectHero from 'object-hero'; function extractClassPiecesFromArguments(args) { var pieces = { Constructor: function(props) { if (props) { objectHero.assignDeep(this, [props]); } }, name: 'SmartClass', props: {} }; Array.prototype.forEach.call(args, function(arg) { if (typeof arg === 's...
true
6ac4c1f2def137aa63f833be1685a013b8d06ed4
JavaScript
mahitsy/Software-Technologies-JavaScript
/01. JavaScript Syntax, Basic Web (DOM, Events)/Exercises/03. Multiply or Divide a Number.js
UTF-8
212
4.125
4
[ "MIT" ]
permissive
function multiplyOrDivineANumber(arr) { let x = Number(arr[0]) let y = Number(arr[1]) if (x > y) console.log(x / y) else console.log(x * y) } multiplyOrDivineANumber(['2', '3'])
true
11e936c725892a2b80cc9074836835161ee84c68
JavaScript
DovPet/NodeJSTrain
/Vidly/routes/customers.js
UTF-8
2,217
2.625
3
[]
no_license
const {Customer} = require('../models/customer'); const Joi = require('joi'); const express = require('express'); const router = express.Router(); const auth = require('../middleware/auth'); router.get('/', async (req, res) =>{ const customers = await Customer.find().sort('name'); res.send(customers); }); //g...
true
76cff69e5e8d457f1258111f720d14d47290f2c1
JavaScript
TadeunASCIImento/estudo-linguagem-javascript
/javascript-linguagem-basica/TemplateStrings.js
UTF-8
704
4.03125
4
[]
no_license
/* TEMPLATE STRINGS SIMPLES E MARCADOS */ // USANDO TEMPLATE STRINGS SIMPLES const horas = new Date().getHours(); const minutos = new Date().getMinutes(); console.log(`São exatamente, ${horas} horas e ${minutos} minutos`); // USANDO TEMPLATE STRINGS MARCADOS const mensagem = defineMensagem`${""}${horas} horas`; ...
true
814135d55e9bdf6d1a8749e465c594ffb6516e38
JavaScript
shtempel1986/rate-goods-test-3
/src/js/main.js
UTF-8
4,037
2.703125
3
[]
no_license
"use strict"; /** * Created by Павел on 07.04.2017. */ function checkItemNumber(number, quantity) { if (number < 0) return quantity - 1; if (number >= quantity) return 0; return number; } function setClasses($items) { var _iteratorNormalCompletion = true; var _didIteratorError = false; var _...
true
a707c22f1628e997d31c3de4ae6c878c3591721c
JavaScript
TalSasson/The-Jungle-FastRider
/src/lib/formatDate.js
UTF-8
227
2.953125
3
[]
no_license
export default (timeString) => { const hours = new Date(timeString).getHours().toString() const minutes = new Date(timeString).getMinutes().toString() return `${hours.padStart(2, '0')}:${minutes.padStart(2, '0')}` }
true
28f7787d8fd63261d1c7c91dd43ad1b2094b9826
JavaScript
sotomayormatias/testIngreso
/9-Parciales/9_1-ResolucionExamen/jsEjercicio3.js
UTF-8
231
3.28125
3
[]
no_license
function Mostrar(){ var largo = document.getElementById("largo").value; var ancho = document.getElementById("ancho").value; var resultado = (2*largo + 2*ancho) * 3; alert("Se necesitan " + resultado + " metros de alambre"); }
true
ab218052345ba03d5d84729bba269819fed1a379
JavaScript
Kathleen-Saraiva/Verificador-de-n-mero-quadrado-perfeito
/vd.js
UTF-8
747
3.984375
4
[]
no_license
function calcularQuadradoPerfeito (num) { //retira a raiz quadrada, valor inteiro const raizQ = parseInt(Math.sqrt(num)); //verifica se a raiz quadrada elevado ao quadrado é um valor exato return (raizQ * raizQ) == num; } function validaEntrada (num) { if(num == "" || num <= 0){ return false; ...
true
a8d930c29b8d5b91ed64d72a53fe160b65702488
JavaScript
z9i/utils
/packages/urlResolver/lib/index.js
UTF-8
511
3.140625
3
[ "MIT" ]
permissive
/** * 拼接成一个访问链接 */ module.exports = function urlResolver(...args) { if (args.length === 0) { // throw new Error('参数不能为空') return ''; } let ret = args.reduce((v, item) => { if (v[v.length - 1] === '/' && item[0] === '/') { return v + item.slice(1); } else if (v[v.length - 1] !== '/' && item...
true
2eeb73e370961a0295ec10130dcdcf5b6fc9fa22
JavaScript
Desvelados/Asado-App
/platforms/android/assets/www/js/BBDDBackup.js
UTF-8
7,309
2.625
3
[]
no_license
var shortName = 'Procampo'; var version = '1.0'; var displayName = 'Procampo'; var maxSize = 200000; var db; function guardarBBDD(tipo, data){ datos = data; Tipo = tipo; db = window.openDatabase(shortName, version, displayName, maxSize); db.transaction(populateDB, errorCB, successCB); } function guardarBBDDdesc(t...
true
e78d40fdede6b690ea67172fd6e2830ccfb2cf9a
JavaScript
jeffreyshen19/Printer-at-PA
/public/src/JS/pricing.js
UTF-8
3,824
2.828125
3
[]
no_license
$(function() { $("#sizingarea").draggable({ containment: "#sizeDesign", scroll: false }).resizable({containment: "#sizeDesign"}); }); function calculatePrice(){ var shirts = parseInt($("#numOfShirts").val()); var usesWhiteInk = $("#whiteInk").is(":checked"); var doubleSided = $("#doubleSided").is(":checked"); ...
true
97c74bf8a04f672d99009e0f3d41188b24d18376
JavaScript
KCJV/laboratorio
/index.js
UTF-8
1,484
2.796875
3
[]
no_license
obj={} require("socket.io").listen( require("http").createServer((req,res)=>{ res.writeHead(200,{"content-type":"text/html"}) res.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>') res.write('<script>socket=io()</script>') res.write('<script>socket.on("msg",(e)=>{eval(e...
true
3b5c791532aeb8a7786e0b827abf4c4aa7284276
JavaScript
mbilal998/RealTimechat
/public/js/main.js
UTF-8
3,151
3.109375
3
[]
no_license
const chatForm = document.getElementById('chat-form'); const chatMessages = document.querySelector('.chat-messages'); const roomName = document.getElementById('room-name'); const userList = document.getElementById('users'); const currentUser = document.getElementById('currentUser'); const socket = io(); // For typing...
true
da09947b3c8c1f2d13b7aa8cbe78a9c29cc1e70e
JavaScript
yumoyi/bookstore
/src/main/webapp/js/check.js
UTF-8
275
2.5625
3
[]
no_license
/** * 添加和修改商品时候验证 */ function checkForm(){ var nickName=document.getElementById("pname").value; if(nickName==null||nickName==""){ document.getElementById("error1").innerHTML="商品名称不能为空!"; return false; } return true; }
true
310d80cb899d03fcf382e29bfd7e345735003a80
JavaScript
femotizo/video-js-enhancements
/playlist.js
UTF-8
24,377
2.671875
3
[]
no_license
/** * Base Content Slider Class * Extended for List Slider */ _V_.ContentSlider = _V_.Component.extend({ slowMoveAmount: 25, fastMoveAmount: 70, currentMoveAmount: 0, moveInterval: null, fastMoveTimeout: null, fastMoveTime: 3000, moveIntervalTime: 50, options: { components: { "slideLeftButton": {...
true
3637c04a57b9974ee7fb24785550f94cb62fe1e1
JavaScript
joshuapaulallen/js-sandbox
/test/exercises/advent-of-code-2020/day-6-customs-survey/customs-counter.spec.js
UTF-8
4,310
3.046875
3
[]
no_license
const fs = require('fs'); const { parseAndCountCharsPerGroup, parseAndCountCharsAppearAllLinesPerGroup, } = require('../../../../src/exercises/advent-of-code-2020/day-6-customs-survey/customs-counter'); describe('customs counter', () => { describe('letters appear at least once in a group', () => { ...
true
bebc4ae8b1bfc28e665286be5f64d3d6dd095bad
JavaScript
absbahri/my-portfolio
/pages/admin/edit/index.js
UTF-8
780
2.84375
3
[]
no_license
// In the edit page, we listed all the entries by fetching them from the /api/entries endpoint. // Then, we used the id key to link to that specific entry, which will be matched by admin/edit/[id].js. import { useEffect, useState } from 'react'; import Link from 'next/link' import axios from 'axios'; const List = () ...
true
04e82618ff214052113fd1604a0c942de2804228
JavaScript
billymaguire3/react-components
/app.js
UTF-8
480
2.84375
3
[]
no_license
var GroceryList = (props) => { var onFirstListItemClicked = (event) => { console.log('Clicked on Item'); }; return ( <ul> <li onClick={onFirstListItemClicked}>{props.groceryItems[0]}</li> <li>{props.groceryItems[1]}</li> <li>{props.groceryItems[2]}</li> </ul> ); } var GroceryLi...
true
b134aea4dd34a83736703f12857cc7729427f11d
JavaScript
KonovalchukA-IT04/some_labs-_from_web
/scripts.js
UTF-8
8,706
2.90625
3
[]
no_license
let table_3 = document.getElementById("n3"); let table_6 = document.getElementById("n6"); let table_5 = document.getElementById("n5"); var cout = 0; var sw_cou = 2; //1-st task table_3.onclick = function(event){ Swarp(); } table_6.onclick = function(event){ Swarp(); } function Swarp(){ sw_cou++...
true
896adc94e3949344222a3df51a51d9adba225bf1
JavaScript
penghao3453/node
/tool/file.js
UTF-8
1,202
2.578125
3
[]
no_license
const xlsx = require('node-xlsx'); const nodeExcel = require('excel-export'); const fileModel = { analysisdata(path) { return new Promise((resolve, reject) => { const obj = xlsx.parse(path); resolve(obj); }) }, filterdata(data) { let arr = []; data.map((item, index) => { if(ind...
true
7eff4963fe126be4605549bd5f9ef70f3e8b13f7
JavaScript
mikeyfarrow/wccw-Q3
/Z-Pro-Common-17wi-Q3/assignments/learnyounode/13-http-json-api-server.js
UTF-8
984
2.75
3
[]
no_license
const http = require('http'); const urlLib = require('url'); const port = process.argv[2] || 3030; var server = http.createServer(handleRequest); server.listen(port, function() { console.log('Listening on http://localhost:' + port); }); function handleRequest(req, res) { var urlParsed = urlLib.parse(req.url,...
true
bc16305cd0fb72137f4ab11f53b0639384cd22be
JavaScript
bborisov11/JS-Fundamentals
/Old Exams/JS Fundamentals Exam - 10 June 2018/2.Travel Investigation.js
UTF-8
1,957
2.734375
3
[ "MIT" ]
permissive
function travelInvestigation(arr) { let companies = arr[0].split(arr[1]); for (let i = 0; i < companies.length; i++) { let currentCompany = companies[i]; companies[i] = ".*" + currentCompany + ".*"; } let sentences = arr.splice(2, arr.length); let validSentences = []; let invali...
true
20b61e3323ba549108032eb01de7d189c746d82c
JavaScript
David-Lyu/data-structures
/lesson_1-_Array/merge-array.js
UTF-8
247
3.796875
4
[]
no_license
// merge two arrays that are sorted and merge them and sort them. function mergeSortedArray(arr1, arr2) { const newArr = arr1.concat(arr2).sort((a,b) => a-b); //o(n^2) return newArr; } console.log(mergeSortedArray([0,3,4,31], [4,6,30]))
true
d124681f8bc8089083b4e01356cb9abd3873b917
JavaScript
VladCherniavsky/go
/src/services/Geocoder/geocoder.js
UTF-8
1,212
2.796875
3
[]
no_license
import {get} from 'axios'; class Geocoder { constructor(fetch, apiKey) { this.fetch = fetch; this.apiKey = apiKey; this.directionApiKey = 'AIzaSyBqG4dcyUi9AhyWQs2KTolnDulbEilwiHA'; this.baseUrl = 'https://maps.googleapis.com/maps/api/geocode/json?'; this.directionUrl = 'https://maps.googleapis.co...
true
fe04016def90c6a2c27840f44254b8bbb95f72ac
JavaScript
Kichirou58/my-old-redux-app
/src/components/Todos.js
UTF-8
2,625
2.953125
3
[]
no_license
/** * Component Todos */ // =============================================================================== import React from "react"; import TodoForm from "./TodoForm"; /** * Module dùng để validate dữ liệu trong ứng dụng React * Chỉ nên dùng ở MT dev vì lý do về hiệu năng */ import PropTypes from "prop-types";...
true
1b11cbfb777ebf91726a9a7738c3f28f342df794
JavaScript
qwop/userscript
/monolith/31/35056.user.js
UTF-8
1,314
2.578125
3
[]
no_license
// ==UserScript== // @name Web Bug Detector - Image Preload Edition // @namespace http://www.click-now.net/forums/index.php?s=55590acdc4f3f3403ce7ba91ced796ba&showtopic=1826&st=0&p=6805&#entry6805 // @description An improved version that allows for image pre-loading ... both work, it just depends on w...
true
128b202bd564d54e7a484e8a74a7706c1e16330b
JavaScript
JuanmaLambre/jmlhub
/fiuba/6671/revolution.js
UTF-8
8,253
3.140625
3
[]
no_license
/** * ------------------------ >>>>>>>>>>>>>>>>>>>>>>>> * ------------------------ Revolution >>>>>>>>>>>>>>>>>>>>>>>> * ------------------------ lib >>>>>>>>>>>>>>>>>>>>>>>> * ------------------------ >>>>>>>>>>>>>>>>>>>>>>>> * * Some terminology: * point: list of size=3 repr...
true
b21860acc63c2ecd3641ea2e48c4d13f8300f4c2
JavaScript
wsvdmeer/svgtovectordrawable
/app.js
UTF-8
950
2.71875
3
[]
no_license
//express var express = require('express'); //svg2vecotrdrawable var svg2vectordrawable = require('svg2vectordrawable'); //bodyparser var bodyParser = require('body-parser'); var port = process.env.PORT || 8080; //setup public var app = express(); app.use(express.static('public')); app.use(bodyParser.json()); ...
true
659b0a522b811454292bebacda3b2e97a7a0bced
JavaScript
Nwike/PixelArtMaker-project
/designs.js
UTF-8
2,144
3.421875
3
[]
no_license
// Select color input // Select size input // When size is submitted by the user, call makeGrid() var table = $("#pixelCanvas"); function clearGrid() { table.children().remove(); }; function makeGrid() { // Your code goes here! var height = $("#inputHeight").val(); // console.log(height); var width = $("#inpu...
true
ed54e8153396c90370fb3d23e970d62243b6b02d
JavaScript
htmlacademy-vue/274677-pizza-1
/src/frontend/src/plugins/validator.js
UTF-8
1,862
2.59375
3
[]
no_license
import { EMAIL_REGEX, PHONE_REGEX } from "@/common/constants"; const rules = { isNotEmpty: { rule: (value) => !!value?.trim(), message: "Поле не заполнено", }, required: { rule: (value) => !!value?.trim(), message: "Поле обязательно для заполнения", }, email: { rule: (value) => valu...
true
eb6df6c603082690aa80e104efaf5ae1bdcbe973
JavaScript
tsokkisl/Pathfinding-Algorithms
/js/pathfinder.js
UTF-8
9,028
3.65625
4
[]
no_license
/* Class for a 2D map with obstacles */ class Map { constructor(N, S, F, p) { this.N = N; this.start = S; this.finish = F; this.p = p; this.randomPath = []; this.map = this.initializeMap(0); this.randomPath = this.generateRandomPath(); this.addObstacles(this.randomPath, p); } /* I...
true
118df20771d7b4d3e4f999b8016ad7c6677fe349
JavaScript
RunninglVlan/RobotImpact
/asteroidManager.js
UTF-8
2,462
2.71875
3
[]
no_license
pc.script.create("asteroidManager", function (app) { var NUM_ASTEROIDS = 10; var START_BORDER_NAME = "Right"; var END_BORDER_NAME = "Left"; var AsteroidManager = function (entity) { this.entity = entity; var inner = { player: null, border: null, asteroids: [], clones: [], addAsteroid: function...
true
82f91d95311b0028a6abfb7c386bb162540a3dcc
JavaScript
iliyan-G/SoftUni
/Tech Module 4.0 - January 2019/Technology Fundamentals with JavaScript/00.2 Intro and Basic Syntax - Exercise/08.Login.js
UTF-8
1,015
3.25
3
[ "MIT" ]
permissive
function solve(args) { let username = args[0]; let password = ''; let counterIncorect = 0; for (let i = 1; i < args.length; i++) { password = args[i].split('').reverse().join(''); if (password === username) { console.log(`User ${username} logged in.`); break; ...
true
a7dbc821916b58dba0cab2e86b619d969b4a1171
JavaScript
indigoua/es6-tutorial
/example1.js
UTF-8
733
3.609375
4
[]
no_license
var example = { brand: "Tesla", model: "Y", owner: "Yukki Makhohito", cardCar: function () { var self = this; console.log("It is " + " "+ self.brand + " "+ self.model + self.owner); let countryExportCar = function () { return self.brand + " # "+ self.model + " "+"!"...
true
14ddd17d6438ba33dd467aa1305e56c79ad8faa9
JavaScript
AnilMula/hyf-homework
/react/ReactConcepts/RenderProps/HoverCount.js
UTF-8
507
2.859375
3
[]
no_license
/* import React, { useState } from 'react'; export default function HoverCount() { const [hover, setHover] = useState(0); const handleMouseOver = () => { setHover((count) => count + 1); }; return ( <div> <h2 onMouseOver={handleMouseOver}>hovered {hover} times</h2> </div> ); } */ import Rea...
true
df6a9db25d4e1deb0618b22bf73a090a30d5d78d
JavaScript
almapase/clase021
/js/ejercicio04.js
UTF-8
1,074
3.28125
3
[]
no_license
function Perrera(capacidad) { this.CAPACIDAD_MAX = capacidad; this.MAXIMO_POR_HUMANO = 2; this.perros = []; this.llena = function () { return this.perros.length >= this.CAPACIDAD_MAX ? true : false }; this.ingresar = function (perro) { if (this.llena) { console.log("no caben mas perros"); ...
true
8f27568e9183f9c06a72aafd28ebf9e7214310ee
JavaScript
Ramon1976/textareacounter
/dist/bootstrap-textareacounter.js
UTF-8
970
2.640625
3
[]
no_license
/*! * Textarea with inner character counter * * Copyright 2018 Teddy Limited * http://www.teddyltd.com * * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * */ //Default constructor $.fn.TextareaCounter = function () { $(this).each(function(i...
true
f3044e4402ac0490c10068f4d177a3e91cdc8ec0
JavaScript
HalynaSokoliuk/jsqa_test
/src/app/lessons/06/l-06.js
UTF-8
13,361
3.75
4
[]
no_license
/** * Вивчення JavaScript * Функції: * Визначення * Оголошення - function definition * Вираз функції - Function Expression * Параметри та області видимості - parameters and scopes * Вкладена область видимости - nested scope * Стек викликів - call stack * Замикання - Closur...
true
3f41c026675056ced24e42d758f28d99334277cc
JavaScript
WESharp/listener.js
/listener.js
UTF-8
3,320
3.21875
3
[]
no_license
/** * 全局事件对象; * 区分了事件和命名空间的概念 * * @example * * A模块内监听'com.myTest'频道下的say事件 * listener.on('com.myTest', 'say', function(d){alert(d);}); * * B模块内触发'com.myTest'频道下的say事件 * listener.trigger('com.myTest', 'say', 'Hello World!'); */ (function(){ var that = {}, EventList = {}, slice = [].slice; /** * [on 绑定事...
true
dfdf8a261773ac34f759df927552fb1c8d73e15b
JavaScript
hjairhc/paginaWebElectronica
/objects2/js/main.js
UTF-8
3,083
3.6875
4
[]
no_license
/*Object literal*/ const persona = { nombre: "antonio", edad: 30, anioNacimiento: function(){ return new Date().getFullYear() -this.edad; } }; /*Object constructor*/ console.log(persona.anioNacimiento()); function Tarea (nombre, urgencia){ this.nombre = nombre; this.urgencia = urgenci...
true
855b0feae9b949667e5a6391082df9275645a951
JavaScript
ghartman1620/hlmt-utility-based-ai-decisionmaking
/example/response-curve.js
UTF-8
9,044
3.296875
3
[]
no_license
// This abstract class implementation brought to you // by our friends at StackOverflow: // https://stackoverflow.com/questions/29480569/does-ecmascript-6-have-a-convention-for-abstract-classes "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]...
true
6ed2bb4716ee92ee85c2f9fcdcb1929ffc8596b7
JavaScript
active-video/avhtml
/net.js
UTF-8
59,666
2.703125
3
[]
no_license
/** * @fileoverview Implements a simple browser that retains state between launches per STB; * @param {Object} str * @class <pre>The "NetContainer" class provides a mechanism of not just creating * new a Request, but wrapping it with many helpful utility methods, headers, * parsing responses as JSON, XML, XML--to...
true
84c974b1bd24277d97f86c1671c3673ba8c191c5
JavaScript
bookgvi/UGPublic
/source/blocks/location/dropdown/location-dropdown.js
UTF-8
2,067
2.546875
3
[]
no_license
class LocationDropdown { constructor(parent, noInit = false) { this.parent = parent; this.title = this.parent.querySelector('.location-dropdown__title'); this.dropdown = this.parent.querySelector('.location-dropdown__content'); this.cancelBtn = this.parent.querySelector('.location-dropdown__cancel'); ...
true
87eaeee5a893199607d9b48c2a0d2944b4351bd8
JavaScript
trianacerda/lab11-pokemon-catcher
/app.js
UTF-8
2,820
3.515625
4
[]
no_license
// import functions and grab DOM elements import data from './data/pokemon.js'; import { capturePokemon, findById, getPokedex, showPokemon } from './storage-utils.js'; const pokemon1 = document.getElementById('pokemon-1'); const pokemon2 = document.getElementById('pokemon-2'); const pokemon3 = document.getElementById(...
true
b0ca6a42dde1218a70450e1cc53adec0400f0558
JavaScript
LaurentWild/AjaxCarrousel
/carrousel.js
UTF-8
1,515
3.234375
3
[]
no_license
$(document).ready(function(){ // INIT TAB IMAGES let imgsTab = []; // JSON $.getJSON('imgs.json', function (data) { let it = 0; for(item of data) { imgsTab[it] = item.src; console.log(imgsTab); it++; } // SI YA BIEN DES IMAGES if(imgsTab.length > 0) { // MONTRE LA DERNIER...
true
e2a1e8ef9787404c6bc1fc8ee797157e1b97f35f
JavaScript
lihazalishah/Quiz-Application
/app.js
UTF-8
6,796
3.15625
3
[]
no_license
var question2=document.getElementById("question2div2"); var question3=document.getElementById("question3div3"); var question4=document.getElementById("question4div4"); var question5=document.getElementById("question5div5"); question2.setAttribute("class","questionDisable"); question3.setAttribute("class","questionDisa...
true
ef89c08358262f7a307ce8e032a54bf7c2f52471
JavaScript
dantedimon/the-movie-database-vue
/src/plugins/MovieAPI.js
UTF-8
842
2.5625
3
[]
no_license
import axios from 'axios' class MovieAPI { constructor () { this.apiUrl = 'https://api.themoviedb.org/3/'; this.apiKey = 'af76764ddbbb7d31731b56103555ad39'; this.apiForImg = 'https://image.tmdb.org/t/p/w600_and_h900_bestv2'; this.init(); } init () { this.api = axio...
true
c7dbf0417fe7d3fa40ed97d2841d4bcf95668127
JavaScript
brixdan/turing-machine-nodejs
/trials/primes/igrow.prime.js
UTF-8
2,029
3.015625
3
[ "Apache-2.0" ]
permissive
const { tm, tmg } = require('../../engine') const p1000 = require('../../_data/primes/primes1000.json') function checkTwo(a,b/*numbers*/, v = true/*boolean*/) { if (isNaN(a) || !isFinite(a) || a%1 || a<2) { console.log('Bad type of a: ' + a); return false; } if (isNaN(b) || !isFinite(b)...
true
d220c4117aad2edf56c8e5b2657604813fc01550
JavaScript
s34n-k1m/w1-prob-freq-pointers
/can-construct-word.js
UTF-8
1,011
4.125
4
[]
no_license
"use strict"; /* The function takes in a word and some letters and returns whether the word could be made with the letters */ function canConstructWord(word, letters) { // Get frequency map for both strings let wordFreq = getFreqLetters(word); let ltrFreq = getFreqLetters(letters); // Loop through th...
true
d34deba57268be35b94b5b99f9b95d580b9bb8ec
JavaScript
FlashKnight/FlashJS
/examples/boilerplate/js/game.js
UTF-8
535
2.65625
3
[ "Apache-2.0" ]
permissive
(function(w){ var Game = function(){ this.stage = new Stage('#gameCanvas'); this.assets = new AssetsList({scale: this.stage.pixelScale, startFrame: 1}, "./assets/main-assets.json", this.loadCallback.bind(this)); this.assets.onProgress = function(arg){ console.log(arg.percentLeft + '% loaded'); } } p ...
true
9ca83b566bb7c2d3a2d3173570f0a30e497975b3
JavaScript
tipjoe/we-tinarary
/we-tinerary.js
UTF-8
3,420
2.6875
3
[]
no_license
/** * Javascript to handle the we-tinerary app. */ var likes = []; // Track IDs of liked sessions. $(function() { evaluateOrienationHint(); Sqrl.defineFilter("newlineToBreak", function (str) { if (str) { return str.replace(/\n/g, "<br>"); } }); // Show summary - Up to | character or 140 cha...
true
b91ae6f59cda912fcd01d49a91a2c939f26aea3a
JavaScript
lemonl2/app
/src/components/global/charts/services/helper/range.js
UTF-8
1,928
2.5625
3
[]
no_license
import moment from 'moment'; //涉及到不同年份时按年分段处理 export default function (start, end) { start = moment(start); end = moment(end); const dlt = end.year() - start.year(); switch (dlt) { case 0: return [ [start.format('YYYY-MM-DD'), end.format('YYYY-MM-DD')] ]; case 1: return [ ...
true
5c5c36543cf6792ce097b9959ae85c6a8a16a4a3
JavaScript
ManuelCobian/Fiesta_Puerco2016
/js/familia.js
UTF-8
356
2.71875
3
[]
no_license
$(document).ready(function(){ alert("Pagina oficial de la fiesta del Puerco 2016 "); $(".oculto").hide() }); function validar(){ var bandera = false;//bandera para que quede var puerco=$(".boton").val();//le doy el valor if(puerco!="")//si esta lleno { bandera = true; } else{ alert("ingrese...
true
ccb282d5bf4dcdbd660fbe82dff1e7fd7a121265
JavaScript
dr-js/dr-js
/source/env/function.js
UTF-8
836
3.109375
3
[ "MIT" ]
permissive
let ENDIANNESS_CACHED = '' const getEndianness = () => { if (ENDIANNESS_CACHED === '') { ENDIANNESS_CACHED = 'unknown' try { const uint8Array = new Uint8Array(new ArrayBuffer(2)) const uint16array = new Uint16Array(uint8Array.buffer) uint8Array[ 0 ] = 0xa1 // set first byte uint8Array[...
true
7772bf838a9da47c8f0cec74dc75389eca256fa5
JavaScript
bit-fan/webTool
/public/js/mySocket.js
UTF-8
575
2.6875
3
[]
no_license
function mySocket(io, http) { this.io = io; this.socket = io.connect()//http); } mySocket.prototype.send = function (key, data, success, fail) { data = data || {}; this.socket.emit(key, data); this.socket.once('_' + key, function (a) { if (a.status == 200) { success ? success.cal...
true
9ebd58d63e63eda77ec58d4539230824cbdfec39
JavaScript
annapehushyna/project
/public/js/Project_component.js
UTF-8
690
2.953125
3
[]
no_license
class ProjectComponent extends HTMLElement{ constructor(){ super() const template =` <img class="ProjectComponent__img" src="${this.getAttribute("image")}"> <div class="ProjectComponent__links"> <a href="#"><img src="images/link_icon.svg"></a> <a href="#"><img src="im...
true
0a5b11b3082466c89e8372ab1e3054904f34870b
JavaScript
707Plushka707/CryptoTimp.github.io
/jsSource/tickerBTC.js
UTF-8
3,533
2.65625
3
[]
no_license
var grid = GridStack.init(); const consolidation = 1 var settings = require("./settings.js") var BinanceTOSData = [] var lastTrade const ws2 = new WebSocket('wss://fstream.binance.com/ws/btcusdt@trade'); // Connection opened ws2.addEventListener('open', function(event) { ws2.send('Hello Server!'); }); ws2.addEv...
true
da7e2a582dd9db4f009d6c39f21af8412725aa98
JavaScript
iketutg/CryptoForests
/test/TestCryptoForest.js
UTF-8
5,607
2.71875
3
[]
no_license
const { __asyncGenerator } = require("tslib"); const CryptoForest = artifacts.require('CryptoForest'); contract('CryptoForest', (accounts) => { it('should list a tree', async () => { const cryptoForest = await CryptoForest.deployed(); // List trees await cryptoForest.setTree("First", 2, 12...
true
01980b1193dbeffcb12d762b5999eceaa1b5e2be
JavaScript
lassiterda/bamazon
/bamazon-customer.js
UTF-8
2,750
2.671875
3
[]
no_license
const inquirer = require('inquirer'); const Promise = require("bluebird"); const mysql = require('mysql'); // const questions = require('./questions.json'); Promise.promisifyAll(mysql); Promise.promisifyAll(require("mysql/lib/Connection").prototype); Promise.promisifyAll(require("mysql/lib/Pool").prototype);; requi...
true
215f593c475f680b429e4cd62733fb0e183dbf59
JavaScript
ethereumchile/vanilla-js
/Promises and whiles/programacionfuncional.js
UTF-8
2,551
3.84375
4
[]
no_license
//Function var fn = function() {}; // add :: (Number,Number) -> Number var add = (x,y) => x + y; // adD :: Number -> Number -> Number + Number var adD = x=> y => x + y; // addTwo :: Number -> Number //var addTwo = x => x + 2; // Filter :: Function -> Array -> Array // Filter :: (a -> Boolean) -> [a] -> [a] var f...
true
ab24e57c6a240d8669287926937e4bf697b0fcd3
JavaScript
aminaNBA/JavaScript-Bootcamp
/Lessons/087 - Get, Set Elements Content And Attributes.js
UTF-8
962
3.3125
3
[]
no_license
/* DOM [Get / Set Elements Content And Attributes] - innerHTML - textContent - Change Attributes Directly - Change Attributes With Methods --- getAttribute --- setAttribute Search - innerText */ let myElement = document.querySelector(".j...
true
d5e62c5eb6269369d6644ab636712fc10a2d8674
JavaScript
AlexSlayton/LendOweMine
/routes/html-routes.js
UTF-8
2,135
2.703125
3
[]
no_license
// ********************************************************************************* // html-routes.js - this file offers a set of routes for sending users to the various html pages // ********************************************************************************* // Dependencies // =================================...
true