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
92964c0198f030288b2949eecd84967dc73b4d12
JavaScript
umarmw/Nightvision
/custom/commands/setSelect2Data.js
UTF-8
926
3
3
[ "MIT" ]
permissive
/** * Set a select2 value using select2("data", object) * * h3 Examples: * * browser.setSelect2Data("input[type=hidden].has-select2", {id:1, text: "hello"}) * * @author maxgalbu * @param {String} selector - jQuery selector for the select2 input/select2 * @param {Object} data - data of the element to be se...
true
24d95ab01f4263e29b4fe5d011abf3a2454a718c
JavaScript
DaGuT/beautiful-react-blog
/src/utils/formatErrors.js
UTF-8
365
2.6875
3
[]
no_license
export default function formatErrors(e) { const errors = {}; if (e.response && e.response.status === 422) { for (let error in e.response.data) { errors[error] = e.response.data[error][0]; } } if (e.response && e.response.status===401) { errors['invalid'] = "Invalid ...
true
2a5dd7aa2a72b1a34777ccab778f12f554846ea7
JavaScript
jarryfull/NodeJS-Server
/server_express/server.js
UTF-8
2,091
2.515625
3
[]
no_license
'use strict' const db = require('./connection') const express = require('express'); const cors = require('cors'); const bodyParser = require('body-parser'); const PORT = 8081; const app = express(); app.use(bodyParser.json()); app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); ...
true
6efd3cad232d53cdbf3e0c5a4255d5ea9656822f
JavaScript
lyndonpanton/react-calculator
/src/components/Calculator.js
UTF-8
3,034
3.046875
3
[]
no_license
import React from "react"; import Display from "./Display"; import Buttons from "./Buttons"; class Calculator extends React.Component { constructor(props) { super(props); this.state = { icons: ["mc", "m+", "m-", "mr", "c", "/", "x", "<=", "7", "8", "9", "-", "4", "5", "6", "+", "1", "2", "3", "...
true
d7f77092d2c840dc627f349567c0383198649d45
JavaScript
wasuradananjith/UCSC-Digital-Library
/models/borrow.js
UTF-8
2,087
2.53125
3
[]
no_license
const mongoose = require('mongoose'); const schema = mongoose.Schema; const borrowSchema = new schema({ email:{type:String}, student:{type:Object}, isbn:{type:String}, title:{type:String}, author:{type:String}, subject:{type:String}, borrowed_date:{type:String}, return_date:{type:String...
true
a33c3057c1d2d123077010e6bfe09de671e9549d
JavaScript
hakeemullahjan/OLX-APP
/js/category-ad.js
UTF-8
6,731
2.703125
3
[]
no_license
function searchFunc(){ var input, filter, ul, li, a, i; input = document.getElementById('searchtxt'); filter = input.value.toUpperCase(); ul = document.getElementById('category'); li = ul.getElementsByTagName('div'); for (i = 0; i < li.length; i++) { a = li[i].getElementsByTagName('...
true
8adcc9b99572ec8c3d1bafe25eec02ecec68d71e
JavaScript
a896853205/eat-something
/src/components/Main.js
UTF-8
7,747
2.828125
3
[ "MIT" ]
permissive
require('normalize.css/normalize.css'); require('styles/App.css'); import React from 'react'; import ReactDOM from 'react-dom'; /*食物随机数组*/ const FOODARRAY = ["腊汁肉拌饭","淮南牛肉汤饭","老林子鸡鸡腿","砂锅扯面","周记盒饭","旋转小火锅","黄焖鸡米饭","夏小面","玛咖鸡黄饭","郎朗水饺"]; const INTERVALTIME = 100; //间隔时间 const WINWIDH = document.bod...
true
cc7521df4b847bcc8ce1509fd6d48bb86862ded6
JavaScript
karmapa/karmapa.github.io
/pedurma_catalog/sutra_search/search_name.js
UTF-8
2,453
3
3
[]
no_license
var dosearch=function(tofind){ var ChResult=searchSutra(tofind,taishonames,1);//搜尋字,搜尋的陣列taishonames=中文 sutranames=藏文 var result=searchSutra(tofind,sutranames,0);//0,1用來讓藏文結果先不加連結 0不加 1加 if(ChResult.length != 0){ document.getElementById("result").innerHTML=ChResult.join("<br>"); document.getElementById("result_n...
true
1d11c24b9eade5e2a742171279e042d395e8bf5d
JavaScript
vivianeguimaraesdev/DIGITALHOUSECTD
/PROG IMPERATIVA/AULA15-PROMISSES/ex03.js
UTF-8
1,513
3.65625
4
[]
no_license
//Exercício 03 //ex02SetTime SetTimeOut /* Para demonstrar o uso de promessas, usaremos exemplos de retorno de chamadas: esperando por um tempo limite */ //host let dadosConexaoJson = '{"server":"192.168.0.1", "login":"admin", "senha":123}'; //console.log(dadosConexaoJson); //Convertendo para JS let dadosConexaoJS ...
true
fcb9f415aac51ffe40ee3e7af025274e3828d00b
JavaScript
DimoDimchev/BudgetTracker
/screens/historyScreen.js
UTF-8
3,332
2.84375
3
[]
no_license
import React, { useState, useEffect } from "react"; import { Text, View, FlatList } from "react-native"; import globalStyles from "../styles/global"; import add from "../generalFunctions/addArray"; import MonthCard from "../components/month"; import generateKey from "../generalFunctions/generateKey"; // base URI for t...
true
930ad179689e882815a5bc9ae06233832cc96f1d
JavaScript
haycco/jreplace
/src/test/resources/js/jquery-training.js
UTF-8
7,103
2.578125
3
[]
no_license
$(function () { //显示消息 function showMessage(message) { $('#messageDialog').dialog('open'); $('#messageDialog .msg').html(message); } //显示人员详细信息 function showPersonDetail() { var name = $('#personsTable').jqGrid('getGridParam', 'selrow'); if (name) { ...
true
880523d0e110e66aa48e71bf28f3e124288fee4c
JavaScript
keyi6/ai-games
/src/GoBang/negamax.js
UTF-8
2,200
2.734375
3
[ "MIT" ]
permissive
let E = require('./evaluation.js'); let Evaluation = E.Evaluation; const INF = 2684354564; const ALIVE_FIVE = 8; /* for identity representation */ const AI = 1; const PLAYER = -1; const TIE = 0; /* for point evaluation */ const POINT_SCORE = [0, 10, 100, 1000, 10, 100, 1000, 1000, 10000]; /* global var */...
true
baec5006a65d84a73ab84e71c1fedfe36f614186
JavaScript
CmdrCha0s/Centurion
/public/js/signin.js
UTF-8
573
2.6875
3
[]
no_license
$(document).on( "click", "#sign-in-btn", function(){ var _username = $('#inputEmail').val(); var _password = $('#inputPassword').val(); var _rememberMe = $('#remember-me-cb').is(':checked'); var _data = JSON.stringify({ username : _username, password: _password, rememberMe: _rememberMe }); $.ajax({ ...
true
fea218fc3ad9ce7479590399b3eaffcffd8b67cf
JavaScript
juanmatola/Leila-Sergi
/assets/js/modules/AnimatedNavbar.js
UTF-8
1,788
2.796875
3
[]
no_license
export default class AnimatedNavbar { constructor (navId,buttonId, logoId){ this.navbar = document.getElementById(navId); this.button = document.getElementById(buttonId); this.logo = document.getElementById(logoId); this.invert = false; this.status = 'closed'; this.in...
true
c17d3bd7de58dd57197ce3f834793be8657fce14
JavaScript
WilliamDann/canvas-to-trello
/src/canvas.js
UTF-8
2,581
2.828125
3
[]
no_license
var fs = require('fs'); var https = require('https') // get user todo items function getUserTodos(canvasKey) { return new Promise((resolve, reject) => { const options = { hostname: 'lwtech.instructure.com', path: '/api/v1/users/self/todo', method: 'GET', h...
true
7fa524884907eb4c166f91fdbeecb5fd31d4a299
JavaScript
crispydc/mobile-todo
/js/views/todoAppView.js
UTF-8
1,978
2.765625
3
[]
no_license
//Dependencies var $ = require('jquery'); var Backbone = require('backbone'); Backbone.$ = $; var _ = require('underscore'); var TodoList = require('../collections/TodoList'); var TodoView = require('./todoView'); // renders the full list of todo items calling TodoView for each one. var TodoAppView = Backbone.View.ext...
true
766a6f22c3ee8cf553a9cf7e5fca41d87acaf370
JavaScript
VelvetTrade/VelvetTrade.co
/src/useSticky.js
UTF-8
1,330
2.796875
3
[]
no_license
import { useEffect, useState, useRef } from "react"; export default function useSticky ( ) { const [ isSticky, setSicky ] = useState(false); const element = useRef(null); useEffect(() => { const handleScroll = () => { console.log(`Current Y = ${window.scrollY}, Top = ${element.current.getBound...
true
de998082918494de43e6c22fce5fe56aa092f5e6
JavaScript
ymranx/react-users
/src/tests/utils.test.js
UTF-8
883
2.671875
3
[]
no_license
import * as utils from "../utils"; const localStorageMock = (function () { const store = {}; return { getItem: function (key) { return store[key] || null; }, setItem: function (key, value) { store[key] = value.toString(); }, clear: function () { store = {}; }, }; })(); ...
true
60c44436d447ea5dda4ba4b5e712e6dafc27c289
JavaScript
Tinkerforge/generators
/tvpl/js/formRender.js
UTF-8
10,817
2.71875
3
[ "MIT" ]
permissive
/* formBuilder - git@github.com:kevinchappell/formBuilder.git Version: 1.5.2 Author: Kevin Chappell <kevin.b.chappell@gmail.com> */ 'use strict'; (function($) { 'use strict'; var Toggle = function Toggle(element, options) { var defaults = { theme: 'fresh', labels: { ...
true
eeda76292e0e93eabd5189f40b7ed4b113bf7d82
JavaScript
nuovecode/ilsitarellodiireneiaccio
/src/component/title.js
UTF-8
1,205
2.984375
3
[]
no_license
import { abstractComponent } from './abstract' import data from '../content/data.json' export class Title extends abstractComponent { constructor () { super() this.loopNum = 0 this.interval = parseInt(1000, 10) || 1000 this.txt = '' this.isDeleting = false this.typeText() } typeText...
true
b5e965261956a2b25bba9697766049120bba4c69
JavaScript
Lawlighty/Topics
/day04/index.js
UTF-8
416
3.484375
3
[]
no_license
// 下划线命名转成大驼峰命名 let a = "asds_efer_gghrt_ddddetet"; function myFunc() { if (!a) { return "on one"; } let b = a .split("_") .map((item, index) => { if (index === 0) { return item; } else { return item.replace(item[0], item[0].toUpperCase()); } }) ...
true
f06a8e366b969f7ad95329a4e745c68e629fcbd0
JavaScript
dmica/pet_shop
/app.js
UTF-8
13,946
2.59375
3
[]
no_license
//call the express framework to action var express = require("express"); //invoke the express package into action var app = express(); //call sql to action var mysql = require('mysql'); //set default view engine app.set("view engine", "ejs"); var fs = require('fs'); var bodyParser = require("body-parser"); app.use(b...
true
b64243948bb07cee1ee5da498dc84af31adbea8c
JavaScript
FuyuByakko/ESO-Logs-parser
/models/resolvers.js
UTF-8
2,357
2.8125
3
[]
no_license
function updateData(originalObj, updateInfo) { for (const [key, value] of Object.entries(updateInfo)) { originalObj[key] = value; } return originalObj; } module.exports = (knex) => { return { /* QUERY METHODS */ Logs: () => knex("logs").select(), ServerLogs: (req) => knex("logs") ...
true
8702b2ffb9b9470f6dea1b839dac870a7cbd5ede
JavaScript
colosa171183/pmui
/src/command/CommandPaste.js
UTF-8
3,523
2.890625
3
[]
no_license
(function () { /** * @class PMUI.command.CommandPaste * Class CommandPaste determines the actions executed when some shapes are pasted (redo) and the actions * executed when they're removed (undo). * * Instances of this class are created in {@link PMUI.draw.Canvas#paste}. * @extends PM...
true
07b2443568d6692d21c1aff46731d0e25f99d122
JavaScript
NikyDenis/Becode
/Javascript/SerieDeux/exo1/exo01.js
UTF-8
318
3.15625
3
[]
no_license
function surfaceRectangle(){ longueur=prompt ("Définissez la longueur?"); largeur=prompt ("Définissez la largeur"); alert(longueur*largeur); } function periSurface (){ longueur=prompt ("Définissez la longueur?"); largeur=prompt ("Définissez la largeur"); alert((+longueur+ +largeur)*2); }
true
12c841d48c3e239ffd1a1b8700c7cc4745fb7216
JavaScript
srinima/coursera-test
/mod2-solution-ang/scripts/app.js
UTF-8
1,424
2.625
3
[]
no_license
(function (){ 'use strict'; angular.module('Shop', []) .controller('ToBuyShoppingController', ToBuyShoppingController) .controller('AlreadyBoughtShoppingController', AlreadyBoughtShoppingController) .service('ShoppingListCheckOffService', ShoppingListCheckOffService); ToBuyShoppingController.$inject = ['S...
true
f416792d66910028ed15e8b4419ff50ac276bd32
JavaScript
kevin-fulcrum/Clases
/semana3/Clase3/index.js
UTF-8
3,798
4.21875
4
[]
no_license
// Semana 3 - Sesión 03 // define three example functions function first(){ console.log(1) } function second(callback){ setTimeout(() => { console.log(2) callback(); }, 0) } function third(){ console.log(3) } // first(); // second(third); // functions function fn() { console.log...
true
903748e70f9596ce710229f0b0342c49ce0adb11
JavaScript
jpalmerino305/game_of_bees
/js/main.js
UTF-8
9,728
2.78125
3
[ "MIT" ]
permissive
var all_bees = getBees(); var total_score = totalScore(); var is_playing = false; $(document).ready(function(){ loadBees(); loadPoints(); $('#reset').on('click', function(){ if (is_playing){ if (confirm('Are you sure?')){ reset(); } } }); $('#hit').on('click', function(){ ...
true
8c2973ecb4b5c5b6e4177978aa72b5e4025c79d6
JavaScript
sudheer007/SpringBootMVC
/src/main/resources/static/js/custom/employee.js
UTF-8
12,613
2.5625
3
[ "Apache-2.0", "MIT" ]
permissive
$().ready(function(){ $("#myModal").on("show", function () { $("body").addClass("modal-open"); }).on("hidden", function () { $("body").removeClass("modal-open") }); setTodayDate(); $("#firstName").blur(function(){ var alpha = /^[a-zA-Z]+(\s{0,1}[a-zA-Z0-9 ])*$/; if (!$...
true
9f272d2222ba40fd0cd4eee37aa8cdd44d249b15
JavaScript
jmavandi/scratch-project-v2
/client/src/store/reducers/activitiesReducer.js
UTF-8
6,801
2.890625
3
[]
no_license
import * as types from '../actionTypes.js' const initialState = { searchedActivities: [], viewActivity: {}, interestedInActivity: [], confirmedActivity: [], createdActivity: [] } const activitiesReducer = (state = initialState, action) => { switch (action.type) { case types.SEARCH_ACTIVITY: const...
true
fa3167edc034d5fb265ce2315ef908d430c5c3da
JavaScript
vormc2005/JavaScript-Interview-questions
/clouds/script.js
UTF-8
579
3.546875
4
[]
no_license
const c = [0,0,1,0,0,0,0,1,0,0] const jumClouds = (arr)=>{ //begginning position let jumps = 0 //loop through array and of numbers for(let i=0; i<arr.length; i++){ // console.log(i) // console.log(arr[i+1]) //if number = 0 then position ++ if(arr[i]===0 && arr[i+1]==...
true
f60339db4e28d009013f6317f3cbb8532ca00336
JavaScript
NHDrizzt/Modulo_Venda
/back/src/controllers/compra_controller.js
UTF-8
1,524
2.59375
3
[]
no_license
// const compraDAO = require(`../DAO/compra_dao`)() // module.exports = () => { // const controller = {} // controller.listarEstoque = (req, res) => { // if (req.body != undefined) { // compraDAO.listar() // .then((value) => { res.status(201).send(value) }) // ...
true
b3ab9f49132fab38a8bd8eb7bd187ec37cc3292c
JavaScript
theccode/AJAX_PHP
/jsdom/js/jsdom.js
UTF-8
772
3.15625
3
[]
no_license
function process() { let p = document.createElement('p'); let pText = document.createTextNode('Hey dude, here\'s is a cool list of colours'); p.appendChild(pText); let ul = document.createElement('ul'); let l1 = document.createElement('li'); let l1Text = document.createTextNode('Black'); ...
true
7655bef12bb7b95cfbb2b5ac47f7f3a4c805c438
JavaScript
TimeToogo/tunshell
/scripts/init.js
UTF-8
2,103
2.625
3
[ "MIT" ]
permissive
// === TUNSHELL NODE SCRIPT === (async () => { const process = require("process"); const https = require("https"); const fs = require("fs"); const os = require("os"); const { spawn } = require("child_process"); if (!args) { throw new Error(`args variable must be set`); } const getTarget = () => { ...
true
5920f10f1b1d4c41c30d4bc8d057ea8953ede817
JavaScript
cour64/jsPDF-GenerateGrid
/jspdf.plugin.generategrid.js
UTF-8
5,249
2.625
3
[]
no_license
/** @preserve * jsPDF Generate Grid plugin * @author John Attebury @attebury * MIT license. * */ /** * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * ...
true
498160fdd0792a6b84efadbeb4e6a3b3d1713faa
JavaScript
moiseorg/tp1-gr1-eq7
/FontEnd/src/app.js
UTF-8
951
2.875
3
[]
no_license
// Create a request variable and assign a new XMLHttpRequest object to it. var request = new XMLHttpRequest() // Open a new connection, using the GET request on the URL endpoint request.open('GET','https://api.github.com//orgs/moiseorg', true) //request.open('GET','https://api.github.com/repos/tallapatrick/tp1-gr1-eq7...
true
241378029b9fc4f8a6b79719706ace7f82a4361a
JavaScript
efren1990/rest-server-1
/server/server.js
UTF-8
2,066
2.875
3
[]
no_license
/**============================================================ * PROYECTO - REST SERVER: =============================================================*/ /**============================================== * IMPORTAR MODULOS =================================================*/ // ARCHIVO DE CONFIGURACIONES GLOBALES-> req...
true
d592621e5b2e867d386f614f8585468779bd8700
JavaScript
eomjinyoung/java93
/electron01-bit/step15/index.js
UTF-8
642
2.703125
3
[]
no_license
"use strict" const net = require('net') window.$ = window.jQuery = require('jquery') $('#send').click(() => { var host = $('#host').val(), port = parseInt($('#port').val()), message = $('#message').val(); var socket = new net.Socket() socket.setTimeout(500) socket.connect(port, host, () => { ...
true
0dcfb9289c0e4736b78057a8ef25ab5cd2a77052
JavaScript
trochepablo/testy
/tests/core/assertions/null_assertions_test.js
UTF-8
764
2.578125
3
[ "MIT" ]
permissive
'use strict'; const { suite, test } = require('../../../testy'); const { asserter, expectSuccess, expectFailureDueTo } = require('../../support/assertion_helpers'); suite('assertions about null', () => { test('isNull passes with a null value', () => { asserter.isNull(null); expectSuccess(); }); ...
true
b1a6bcedc89cfafa2c5e1043eb5f9facb059bd23
JavaScript
AdrianTeranPacheco/Proyecto-pagina-web
/js/main.js
UTF-8
2,165
3.25
3
[]
no_license
/* Animacion */ var byline = document.getElementById('byline'); bylineText = byline.innerHTML; bylineArr = bylineText.split(''); byline.innerHTML = ''; var span; var letter; for(i=0;i<bylineArr.length;i++){ span = document.createElement("span"); letter = document.createTextNode(bylineArr[i]); if(bylineArr[...
true
9205889136677eb530e857dfab5673d8aa2fb086
JavaScript
liyanlei58/onlyU
/only_u/js/util.js
UTF-8
1,185
2.875
3
[]
no_license
module.exports = { formatTime: function(date) { var year = date.getFullYear() var month = date.getMonth() + 1 var day = date.getDate() var hour = date.getHours() var minute = date.getMinutes() var second = date.getSeconds(); return [year, month, day].map(this.formatNumber).join('/') + ...
true
ee7337bdab5553a6bbd255185c3bfc30ab404419
JavaScript
giltayar/lets-meet-web
/client/src/AddMeetup.js
UTF-8
3,510
2.5625
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import axios from 'axios'; import { Redirect } from 'react-router-dom'; import "./AddMeetup.css"; class AddMeetup extends Component { state = { fullName: '', email: '', meetupSubject: '', where: '', when: '', description: '', howMuch: '', redirectToHome: f...
true
ac3e436305ec4e3d9973167468073939cfa0a920
JavaScript
julianv97/food-menu
/src/App.js
UTF-8
1,512
2.546875
3
[]
no_license
import React, { useState, useEffect } from "react"; import items from "./data"; import Categories from "./components/Categories"; import Menu from "./components/Menu"; console.log("data: ", items); function App() { const [menuItems, setMenuItems] = useState(items); const [categories, setCategories] = useState("")...
true
555aa91f1ba798656b721f04884d1a2b5e1d735a
JavaScript
erikeidt/lc3
/src/components/console/StdinStatus.jsx
UTF-8
3,705
2.640625
3
[ "MIT" ]
permissive
import React, {Component, PropTypes} from 'react'; import {Collapse} from 'react-bootstrap'; import Utils from '../../core/utils'; export default class StdinStatus extends Component { constructor() { super(); this.state = { showStdin: true, showRaw: false, }; ...
true
a37737654e179d1002a1687fb16d92b0379b26b0
JavaScript
mactinite/MessageBoard
/WebContent/js/pwdHash.js
UTF-8
838
2.640625
3
[ "MIT" ]
permissive
var app = angular.module("usersApp",[]); app.controller("RegisterUser",function($scope,$http){ }) /** * Accepts a form and hashes the password */ function processLogin(){ var form = document.getElementById("login"); var username = form.elements[0].value; var password = form.elements[1].value; var shaObj ...
true
b0d98b520230c0be319c6cafeeaadc806b7b52bd
JavaScript
Utkarsh1999/Trello
/src/components/PersonalTab.js
UTF-8
1,784
2.671875
3
[ "MIT" ]
permissive
import React, { Fragment, useEffect, useState } from 'react' import * as microsoftTeams from "@microsoft/teams-js"; import { Card } from '@uifabric/react-cards'; import { Text } from 'office-ui-fabric-react'; export default function PersonalTab() { const [values, setValues] = useState({ context:{...
true
1cf0dfc80660649fec4f9ec7147e88a5f9db39e1
JavaScript
dangyuhua521/js
/0625/微云/js/content.js
UTF-8
2,624
2.546875
3
[]
no_license
; (function () { var treeMenu = $('#bar') var breadNav = $('.content .bread-nav') //框选 var folders = $('.folders')[0]; folders.onmousedown = function (e) { var newDiv = document.createElement('div'); newDiv.className = 'kuang'; document.body.appendChild(newDiv); var f...
true
a05cbcdb423018a5e9d865b3cd0ae818e529cf23
JavaScript
ErikHaag/Cylindrical-Checkers-3D
/saveload.js
UTF-8
1,518
3.03125
3
[]
no_license
function saveGame() { let gameState = []; for (let i = 0; i <= 7; i++) { for (let j = 0; j <= 7; j++) { if ((i+j)%2 == 1) { let val = isMan(j,i); if (val == -1) { gameState.push('0'); }else{ if (men[val].isRed) { if (men[val].kinged == 0) { ...
true
be2dda45df312133df35bc84548b29f641d93fed
JavaScript
cnxtech/trace-typing
/trace-production/tests/tracing/function-declaration-return.js
UTF-8
530
3.234375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function f1 (j) { function f2 (c) { var sum = c; var x; try { sum *= j; if (sum > 4) { sum = -sum; } i = 0; while(i < sum) { console.log(i); i++; } do { ...
true
0217feda98a866366bd218304c38511aed477238
JavaScript
jollud/tic-tac-toe_bs
/public/js/bs_mult.js
UTF-8
36,141
2.828125
3
[]
no_license
document.addEventListener('DOMContentLoaded', function () { window.onbeforeunload = function () { //Removes all Redis records related to this game when the player leaves the page. let xhttp = new XMLHttpRequest(); xhttp.open('GET', 'bs_mult/leave?game_number=' + game_number + '&id=' + useri...
true
a79fd177de860246ffdbeff9723b0939a1e83d31
JavaScript
Erandakuruneru/nodeAPI
/routes/cities.js
UTF-8
394
2.578125
3
[]
no_license
var express = require("express"); var router = express.Router(); const cities = [ { name : "Kaduwela", code : "KD", }, { name : "Rajagiriya", code : "RJ", }, { name : "Colombo", code : "CB" } ]; router.get("/", function (req, res, next) { res.header("Access-Control-Allow-Origin"...
true
b480f25dbd6676a9b9093e2d985f1dfbcd85b6bd
JavaScript
Mangutov89/journal-JS
/src/ui.js
UTF-8
387
2.640625
3
[]
no_license
import { Entry } from './business.js'; $(document).ready(function() { $("#journalForm").submit(function(event) { event.preventDefault(); var inputTitle = $("#title").val(); var inputContent = $("#content").val(); var newEntry = new Entry(inputTitle, inputContent); var newWords = newEntry.words()...
true
3ace30d7a5a5200fe2130feea8d2f4c404e430c9
JavaScript
tHALL3000/web_project_4_javaScript_version
/src/components/PopupWithImage.js
UTF-8
444
2.59375
3
[]
no_license
/** @format */ import Popup from "./Popup.js"; class PopupWithImage extends Popup { constructor(PopupSelector) { super(PopupSelector); } open({ link, name }) { this._popupElement.querySelector(".modal__caption").textContent = name; const image = this._popupElement.querySelector(".modal__image"); image.src...
true
09e465a1821fcac4f2f933f0aa66e1619637a617
JavaScript
bartt/granite-park-chalet
/chalet.js
UTF-8
3,113
2.53125
3
[ "ISC" ]
permissive
#!/usr/bin/env node var debug = require('debug')('chalet'); var jsdom = require("jsdom"); var nma = require('nma'); var Prowl = require('node-prowl'); var prowl = new Prowl(process.env.PROWL_API_KEY); var fs = require('fs') var URL = 'http://www.graniteparkchalet.com/vacancy_g.html'; var APPLICATION = 'Granite Park C...
true
cf5924def21743bcbd2fa129c508cad3621799b6
JavaScript
fayez-baig/kentmoreland-codewars
/caseSwapping.js
UTF-8
306
3.96875
4
[]
no_license
// Given a string, swap the case for each of the letters. // // e.g. CodEwArs --> cODeWaRS const swap = (str) => { return str.split('').map((ltr) => { ltr.toLowerCase() === ltr ? ltr = ltr.toUpperCase() : ltr = ltr.toLowerCase(); return ltr; }).join(''); }; console.log(swap('TeSt'))
true
78e8d292f21236e2d4703371f0c6eb7796d0545f
JavaScript
luckywq/lanuch
/girdview/js/girdview.js
UTF-8
13,177
2.84375
3
[]
no_license
//GridView 包含5个menuview 父容器为div function StackView(div, controller) { View.call(this); //this.focus = new FocusView(); this.ctrl = controller; this.index = 0; this.currIndex = 0; this.selected = 0; this.items = []; this.div = div; this.isMenuMove = true; this.isFocusMove = false; this.render(); } StackV...
true
4effe139122c1ef3651fd7a5989e78d67b375bcd
JavaScript
ONatOl/Node.js
/Node/1/009_FolderModules/main.js
WINDOWS-1251
9,058
3.3125
3
[]
no_license
/* require(' ') 1. , 2. ' ' '/' - 3. ' ' '/', './', '../' - : 3.1 ' ' (. ) 3.2 , ' ', (. ) 4. node_modules 4.1 node_modules 4.2 node_modules, , 5. , */ //...
true
799c030992b0fd34e6e8921e92d17021dd5ec62c
JavaScript
helengilissen/6d-black-and-grey
/js/sketch.js
UTF-8
314
2.71875
3
[]
no_license
function setup() { createCanvas(400,400); // put setup code here } function draw() { // put drawing code here background(240); stroke (255,0,0); strokeWeight (2); line (200,0,200,400); if (mouseX > 200) { background (0); stroke (255,0,0); strokeWeight (2); line (200,0,200,400); } }
true
c01e4f59a325aa877cc56b7c6a697eaeb0a7663c
JavaScript
AdrielAlvarez/RandomPasswordGenerator
/pwdGenerater.js
UTF-8
1,180
3.484375
3
[]
no_license
const process = require('process'); const alpha = ["b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "s", "t", "u", "v", "w", "x", "y", "z"]; const nume = [1, 2, 3, 4, 5, 6, 7]; const speci = ["!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "[", "]", "{", "}", "å", "|"]; let password = []; l...
true
dc8a7f796f75230542e3dfe4291bcdc4edce693b
JavaScript
MantasSidabras/eshop
/client/src/api/CartProductApi.js
UTF-8
3,266
2.515625
3
[]
no_license
import Config from './Config'; import AuthApi from './AuthApi'; class CartProductApi { getAll = () => { return fetch(Config.url + `/cartProduct`, { method: 'GET', headers: { 'Authorization' : 'Bearer ' + AuthApi.getToken() } }) .then(res => { if (res.status === 401){ ...
true
b2cbd21a9139b2c1df96a7f3474cac1b976d5c53
JavaScript
jamigibbs/javascript-problems
/eloquent-javascript/05/your-own-loop.js
UTF-8
544
4.125
4
[]
no_license
function loop(value, testFunc, updateFunc, bodyFunc){ // Run the test function on the current loop value, and stops if that returns false. if(testFunc(value)){ for(var i = value; i > 1; i--){ // Call the body function, giving it the current value. bodyFunc(value) // Call the update fu...
true
fc38936e32e5a3389e5c0859886c9999e1e75686
JavaScript
Captainrom/infoskjerm
/src/Reddit.js
UTF-8
632
2.734375
3
[]
no_license
import React, { useState, useEffect } from "react"; const APIUrl = "https://www.reddit.com/r/dadjokes/top.json?t=day&limit=1"; const Reddit = () => { const [joke, setJoke] = useState({}); const getJoke = () => { fetch(APIUrl) .then((response) => response.json()) .then((json) => setJoke(json.data.c...
true
fdd87d4a1f5e7fb7a0ac984d82636cfe96d6fced
JavaScript
Neema93/snake-client
/input.js
UTF-8
1,372
2.96875
3
[]
no_license
const net = require("net"); //const myObject = require("./play.js"); //console.log(myObject.setupInput); let connection; const setupInput = function (conn) { connection = conn; const stdin = process.stdin; stdin.setRawMode(true); stdin.setEncoding("utf8"); stdin.resume(); stdin.on("data", handle...
true
88e3bf5110e0ee00397cb8b78e22bee6e57ff4ee
JavaScript
aprilandjan/tiny-tween
/dev/client/index.js
UTF-8
2,817
2.65625
3
[ "MIT" ]
permissive
import Tween from '../../src/index'; require('./index.css'); var el = document.getElementById('elBox'); var el1 = document.getElementById('elBox1'); // var onElChange = function () { // var wp = Tween.Wrapper.get(el) // console.log('change...', wp.x, wp.y) // } // var onElComplete = function () { // console.l...
true
727e63e8ea249652bb50e4f5477473ddefc33a8b
JavaScript
scottcarpenter28/365-day-coding-challenge
/365 day code challenge/scripts/arrayChunking.js
UTF-8
606
3.53125
4
[]
no_license
$(document).ready(function() { // Get value on button click and show alert $("#output").click(function() { let arr = $('#arr').val().split(", "); let len = parseInt($('#len').val()); if(len < 0) $('#ans').text("Length must be > 0"); else $('#ans').text(divideArr(arr,len)); }); }); fun...
true
b0e1426f6b17ab061f2d3f9da3a50f26ce94dc5c
JavaScript
ozobianwadibia/HackerRank
/30 Days Of Code Challenges/Day_05.js
UTF-8
324
3.9375
4
[]
no_license
// checking out loops function printMultiples(n) { for (let i = 1; i <= 10; i++) { // console.log(`${n} x ${i} = ${n*i}`); process.stdout.write((`${n} x ${i} = ${n*i}` + '\n')); } console.log(''); } printMultiples(5); printMultiples(7); printMultiples(10); printMultiples(2); printMultiples...
true
dd25adf3198947a2991887195781bbc68f36d7ca
JavaScript
NirajanMahara/messenger-clone-2021
/src/Message.js
UTF-8
1,304
2.96875
3
[]
no_license
import React, { forwardRef } from 'react'; import { Card, CardContent, Typography } from '@material-ui/core'; import './Message.css'; // `forwardRef` to track of the changes // changing to ES6 function & wrap everything of `Message` function inside `forwardRef()` // `forwardRef ({}, ref)` => higher order function // a...
true
417c625704b8f0f7921677ce88306961b4959561
JavaScript
sfdeloach/web-dev-bootcamp
/YelpCamp/ver6/models/comment.js
UTF-8
270
2.59375
3
[ "MIT" ]
permissive
// Import library var mongoose = require('mongoose'); // Schema setup var commentSchema = new mongoose.Schema({ text: String, author: String }); // Model created from schema, returned to calling script module.exports = mongoose.model("Comment", commentSchema);
true
91bfd940f6917ddfb643165621d015af1039d2a4
JavaScript
vguer/fortune-quiz
/js/scripts.js
UTF-8
364
3.34375
3
[ "MIT" ]
permissive
// Business logic const isLucky = (answers) { let luckyCount = 0; let unluckyCount = 0; answers.forEach((answer) => { if (answer === "lucky") { luckyCount++; } else { unluckyCount++ } }); if (luckyCount > unluckyCount) { return true } else { return false ...
true
c285d7db560fb4ab3e8633b5cc0b9193dba75ad3
JavaScript
irngld/bluebadge-client
/src/components/Random.js
UTF-8
2,610
2.65625
3
[]
no_license
import { useState, useEffect } from "react"; import DrinkDetails from "./DrinkDetails"; import "../components/Random.css"; import background from "../img/glass.jpg"; import styled from "styled-components"; import APIURL from "../helpers/environment"; const Button = styled.button` background-color: white; color: #b...
true
aaeec8b0036cbce0f2193003969acc92fbc31648
JavaScript
StartupWeekend15/Decision
/src/server/requestors/MoviesRequestor.js
UTF-8
4,471
2.671875
3
[ "ISC" ]
permissive
'use strict'; var FeedParser = require('feedparser'), DOMParser = require('xmldom').DOMParser, // jshint ignore:line request = require('request'), R = require('ramda'), movies = require('../../../test/assets/movieOptions'), Utils = require('../Utils'); var CATEGORIES = ['movies']; /** * MoviesRequ...
true
76bb3ed1174a963c0ee56c010074e87e1def7682
JavaScript
OmarAlMasadeh/LogicGatesSchematicPainter
/js/Grid.js
UTF-8
543
2.90625
3
[]
no_license
import {canvas,ctx} from "./CanvasManager.js"; export let spacing = 40; export function drawPoint(x, y){ ctx.fillRect(x-1,y-1,2,2); } export function drawPointGrid(){ //let t0 = performance.now() for(let i = 0; i<canvas.width ; i+=spacing) for(let j = 0 ;j<canvas.height;j+=spacing) ...
true
443c23adfedc3086f863723facffefc17f466467
JavaScript
nerionx/SimpleJSSigBox
/sig.js
UTF-8
3,391
3.640625
4
[]
no_license
/* Frymans signature code 2 options for use: 1. Create a canvas on your page with an ID, use sig.attachTo(canvasid) to attach it to a canvas whos position you have already defined 2. Use createContainer(parentID) to inset a canvas into the page automagically the parentid could be an empt...
true
5935a126e3902bf8c7c8845e95d7cf4ab4644835
JavaScript
alinizam/BLM417E_2019_2020_Fall
/Lesson8Javascript/example5.js
UTF-8
293
3.46875
3
[]
no_license
function add(a, b) { return a + b; } console.log(add(2, 5)); var addVar = function (a, b) { return a + b; } /* similar syntax var addVar=function add1(a,b){ return a+b; }*/ console.log(addVar(2, 5)); console.log( (function (a, b) { return a + b; })(2, 3));
true
6cba8eaf394dd0c94fdca5da33c8779dca787db3
JavaScript
jirrian/replace-image-ghost
/content_script.js
UTF-8
655
3.046875
3
[]
no_license
/* adapted from replace-image example */ var hoverImg = chrome.extension.getURL('ghost.jpg'); var allImages = document.getElementsByTagName('img'); var allSrcs = []; // store all original image sources for (var i = 0; i < allImages.length; i++){ allSrcs.push(allImages[i].src); } // add event listeners for hove...
true
143052c058613e3fdb859937bf5db1760f8c305c
JavaScript
revanthreddy/dataisthenewbacon
/public/jsResources/JsFramework/niVisualComponentModel.js
UTF-8
3,692
2.6875
3
[]
no_license
//**************************************** // Visual Component Model // National Instruments Copyright 2014 //**************************************** NationalInstruments.HtmlVI.VisualComponentModel = function (id) { 'use strict'; // Properties this.id = id; this.owner = null; this.rootOw...
true
14b39761d2b465fb0983d5f8e7b89b38254f33e3
JavaScript
koenongena/project-euler
/src/problem26.js
UTF-8
1,440
3.171875
3
[]
no_license
import * as R from "ramda"; export function lengthOfRecurringCycle(numerator, denominator) { const _lengthOfRecurringCycle = (n, d, result = "0", remainders = []) => { if (n === 0 || n === d) { return 0; } else if (n < d) { return _lengthOfRecurringCycle(n * 10, d, result + ...
true
cacf41dcaecda3f36d3ba16b90de1e97f942e902
JavaScript
CharlesMoone/forum
/public/javascripts/user/user.js
UTF-8
2,829
2.515625
3
[ "MIT" ]
permissive
"use strict"; var Login = function (obj) { this.url = obj.url || ""; this.method = obj.method || "post"; this.dataType = obj.dataType || "json"; this.data = obj.data || null; this.callback = obj.callback || function (data) {console.log(data)}; }; Login.prototype.check = function () { return !!t...
true
25ab2af721f6cc8d2efa8eb09bf7fc9c1365e211
JavaScript
kowoo0/learning-fnjs
/inflearn/pipe-go.js
UTF-8
1,093
4
4
[]
no_license
// reduce 이용 function _each(list, iter) { for (var i = 0; i < list.length; i++) { iter(list[i]); } return list; } var slice = Array.prototype.slice; function _rest(list, num) { return slice.call(list, num || 1); } function _reduce(list, iter, memo) { if (arguments.length == 2) { memo = list[0]; li...
true
87996e9b923bd102783b0e26630f367b80dce99a
JavaScript
ren-steven/Javascripts
/index.js
UTF-8
672
3.828125
4
[]
no_license
let name = "Eric Ren"; console.log(name); let firstName = "Eric"; let middleName = "Jiapeng"; let lastName = "Ren"; console.log(firstName, middleName, lastName, "Is My Full Name"); //Simple Math const Number_1 = 9; const Number_2 = 10; let Number_3 = 3; Number_3 = 2; console.log(''+ Number_1 + '+' + Number_2 + '+' + ...
true
5ce9088d19a62177cb4e9b7389ddd7d2a1bfe542
JavaScript
RabbiaSaleh/JavaScript-Problem-Solving-Practice
/Coding-Challenge-1/Topic-3_JS-Operator/Problem-2/app.js
UTF-8
858
3.828125
4
[]
no_license
//=== solving it output will be print in console log-- //------(their answer will be in true or False) var a = 5; var b = 10; var c = "5"; var x = a; // 1st condition a == c; let numb= a == c; console.log(numb); // 2nd condition a === c; let numb1= a === c; console.log(numb1); // 3rd condition a == x; le...
true
c950a1f1296651d5c41e6779d6c672888be0f84d
JavaScript
axhi/phase_0_unit_1
/week_3/9_gps1_2/our_solution.js
UTF-8
2,001
4.125
4
[]
no_license
// GPS 1.2 - JavaScript // YOUR FULL NAMES: // 1. Joey Sabani // 2. Dan Freed // 0. "YOU SIGNED... WHO?!" var actor1 = { name: "", age: 0, quote: "" } // 1. "Here they Come!" var actor1 = { //client one object literal name: "Adam Sandler", age: 47, quote: "That's your home! Are you too good for yo...
true
c573524ddb2b8691227c2b57ce43f401b02ba8f3
JavaScript
lgueye/eloquentjavascript
/test/unit/05_higher_order/flattening.spec.js
UTF-8
424
3.09375
3
[]
no_license
describe("flattening test suite", function() { it("flattenArray([[1, 2, 3], [4, 5], [6]]) should return [1, 2, 3, 4, 5, 6]", function() { // Given var input = [ [1, 2, 3], [4, 5], [6] ]; // When var actual = flattenArray(input); /...
true
0dff265f43fe36a73f2da2259db2bb8b33060e7a
JavaScript
aminebenkeroum/AppspotrChallenge
/oddDuck.js
UTF-8
909
3.296875
3
[]
no_license
var oddDuck = function(array){ var tempArray = array; for (i = 0; i < array.length; i++) { var counter = 0; for(j = 0 ; j < tempArray.length; j++){ // getting duplicates and count how many times duplicated if(array[i] === tempArray[j]){ counter++; } } // c...
true
4e9dda2e5a986b54de8837a116feeed8a1469898
JavaScript
jjrugger/joelbeevors
/source/_assets/js/components/particles.js
UTF-8
5,330
2.921875
3
[ "MIT" ]
permissive
function generateParticles(props) { const { numParticles, vel, maxConnections, maxConnectDistance, radius, lineColor, particleColor, canvas } = props; const ctx = canvas.getContext('2d'); canvas.height = window.innerHeight; canvas.widt...
true
43606cffeb7683faa1ef3c523397b022c197b137
JavaScript
cs147win2014/project
/routes/editCourse.js
UTF-8
6,543
2.734375
3
[ "MIT" ]
permissive
var models = require('../models'); var data = require("../data.json"); exports.addSyllabusFields_ajax = function(req, res) { allFields = req.body; console.log("CALLING THE RIGHT FUNCTION"); console.log(allFields); //Get the course ID number var id = ""; for(var key in allFields) { if(key.match("courseId"))...
true
f73ace58a168139306b80c66e6df525d70e65be0
JavaScript
aarontsosa/AirSpace-v1-
/public/javascripts/survey-create.js
UTF-8
2,995
2.640625
3
[ "MIT" ]
permissive
let socket = new WebSocket('ws://'+ window.location.hostname + ':3002'); // let socket = new WebSocket('ws://airspace.world:3002'); var counter = 1 function createTextBox(){ var location = $("[data-target='question-list']") counter ++; var p = $("<p class='qa-row'></p>"); var questionText= "Question " ...
true
fba54a0cdaa8aae832a39946a063a5f75fb4f3ce
JavaScript
dannygr664/juke
/docs/levels/mainMenu.js
UTF-8
2,564
2.6875
3
[]
no_license
const MAIN_MENU_SCREEN = 0; const HOW_TO_PLAY_SCREEN = 1; const CREDITS_SCREEN = 2; const MODE_SELECTION_SCREEN = 3; const NETWORK_SELECTION_SCREEN = 4; const ROLE_SELECTION_SCREEN = 5; const CONTROLLER_SELECTION_SCREEN = 6; const SONG_SELECTION_SCREEN = 7; class MainMenu { constructor() { this.initialBackground...
true
ae34c0e62d2806aa6c9aa0481697e04cf0ec2cb8
JavaScript
asadrazashah/mern-stack
/client/src/components/auth/SignUp.js
UTF-8
3,601
2.578125
3
[]
no_license
import React, { Component } from "react"; import { Container, Row, Col, Form, FormGroup, Label, Input } from "reactstrap"; import axios from "axios"; class Login extends Component { constructor() { super(); this.state = { name: "", email: "", password: "", confirmPassword: "" }; ...
true
8376f6b8fe9e49decda671a1f216918f3bd58464
JavaScript
dammo001/asteroids
/util.js
UTF-8
1,006
2.875
3
[]
no_license
(function () { if (typeof Asteroids === "undefined") { Asteroids = {}; } var Util = Asteroids.Util = function(){ }; // Util.prototype.inherits = function(ChildClass, ParentClass) { // var Surrogate = function() {}; // Surrogate.prototype = ParentClass.prototype; // ChildClass.prototype = new Surrog...
true
9ea62ebaa5e2c308a051dfd8957e6edc6163fb57
JavaScript
Jocelyne1604/Code-War-Katas
/credit-card-mask.js
UTF-8
518
3.859375
4
[]
no_license
// return masked string function maskify(cc) { // a place to store the masked number let masked = ""; // iterate over the string in reverse for (let i = cc.length - 1; i >= 0; i--) { const letter = cc[i]; // if the current index is greater than length - 4 if (i > cc.length - 5) { // append th...
true
4de168b8b5604acbc22e93f55b2d45de049937bc
JavaScript
Mihir-Naik/TURBO-RUSH
/js/main.js
UTF-8
8,400
2.796875
3
[]
no_license
$(function(){ // Variables var $start = $('#start') var $score = $('#score') var $restart = $('#restart') var $reload = $('#reload') var $p1 = $('#p1') var $p2 = $('#p2') var player1 = {score: null} var player2 = {score: null} var carExplosion = new Audio('src/explosion.wav') var countdownTimer = new Audio('src/beep.w...
true
6ab91f51566b5cf07f6c06a7b94f35f5d01dcee3
JavaScript
okada-mio/hackathon-ot-B
/chatapp/public/javascripts/memo.js
UTF-8
2,307
3.1875
3
[]
no_license
'use strict'; var i = 0; // メモを画面上に表示する function memo() { // ユーザ名を取得 const userName = $('#userName').val(); // 入力されたメッセージを取得 const message = $('#message').val(); // メモの内容を表示 if(message==""){ //alert("メッセージがありません."); }else{ if($('#memo-thread p').length!=0){ $('#m...
true
89b08b6f546e1ca10156e084b22b3bd088600235
JavaScript
Remco-Muller/AdventOfCode2020
/Day6/part1.js
UTF-8
259
3.5
4
[]
no_license
var arr = "hxcqxq,iwokvxwtouvikwvoc,oedijfhxcdivhjogecxfcidjoxfehodxeichfj,cuwvptsqyknzahbtzvxjnsplyespvxhyizmnrat,jkxigegikdqxgkwxicixgk,dubznrmlqizrbqumzrbuqmsvwperouzmbaqj,uqejzgwflkorvixslwjuocfzpevsaqigkrxn,gwyty,bqtycajktahyfcycftgatacy,gwmsmtgsagsvm,mucqvzntrfkhoiasydwxgbsxuvtwdmkayfrocznhqibgksdignqyabuxrovzwmh...
true
8bd9d4f2a895201128d72d6b6cc997cc2a4f0286
JavaScript
scrabblegenies/autocomplete
/src/App.js
UTF-8
6,385
2.6875
3
[]
no_license
import React, { Component } from 'react'; //axios import axios from 'axios'; //js import UserInput from './Components/UserInput.js'; import UserOutput from './Components/UserOutput.js'; import Error from './Components/Error.js'; import Wiki from './Components/Wiki.js'; import Clock from './Components/Clock.js'; import ...
true
41ba57c007b61ac191e2542d9fcb3b05b278843b
JavaScript
vitusik/Huji-Internet-Technologies
/Ex4/www/Binary_js.js
UTF-8
2,068
3.46875
3
[]
no_license
document.getElementById("b1").setAttribute('onclick',"post(1)"); document.getElementById('b0').setAttribute('onclick',"post(0)"); document.getElementById('ng').setAttribute('onclick',"reset()"); function reset(){ var postReq = new XMLHttpRequest(); postReq.open('DELETE','gamble/reset', true); postReq.send(null); ...
true
3b56032f1b640fff4c17dc9264a63b4348f5604e
JavaScript
xgbuils/obj-path
/src/method/empty.js
UTF-8
284
2.765625
3
[]
no_license
var isFunction = require('../helpers/type').isFunction function empty (base, name) { var value = base[name] if (value !== undefined && value !== null && isFunction(value.constructor)) { base[name] = (new value.constructor()).valueOf() } } module.exports = empty
true
9720f888620504c33030eb1794a56fc04e37dbdb
JavaScript
anshusaurav/Node-13
/day2/Question-9/app.js
UTF-8
1,713
2.84375
3
[]
no_license
const http = require("http"); const PORT = process.env.PORT|3000; var server = http.createServer(requestHandler); function requestHandler(req, res) { if(req.url === '/users' && req.method === "GET"){ res.writeHead(200, {'Content-Type': 'text/html'}) res.end(`<form> <label>N...
true
be49418b24f62ca639d8d1b18065529147eae775
JavaScript
touregeldi/react-todo-app
/src/redux/reducers/todo.js
UTF-8
903
2.78125
3
[]
no_license
const todo = (state =[], action) =>{ switch (action.type) { case 'ADD_TODO': return [ ...state, action.body ] case 'DELETE_TODO': let newarray = state.filter(item => item.id !== action.id) return[ ...newa...
true
30026ebf252df14fc2c4b2a3274af904628ec7df
JavaScript
AndreevNikita/nickandreev.space
/js/showphotobox.js
UTF-8
951
2.984375
3
[]
no_license
class ShowPhotoBox { constructor(htmlElement) { this.htmlElement = htmlElement; this.init(); } init() { this.htmlElement.onclick = () => { this.hide(); }; this.photoBox = this.htmlElement.getElementsByClassName("photo-box")[0]; this.closeButton = this.htmlElement.getElementsByClassName("close-button")[...
true