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
d4f8800dc1c0ee584055070c19241b3883f1b2c4
JavaScript
sveem/Vanilla-JavaScript
/Fundamentals/Letter Occurrences in String/letterInString.js
UTF-8
618
5.0625
5
[]
no_license
/* * Write a JS function that counts how many times a specific letter occurs in a given string. * The input comes as array of string elements. * The first element is the string to check and the second element is the letter to count. * The output should be returned as a result of your function. */ let string1 = ...
true
35a3886cab953663b044dc06e919b1a882db6b86
JavaScript
AniTarverdyan/todo-project
/index.js
UTF-8
2,330
3.734375
4
[]
no_license
const root = document.getElementById('root') function TodoForm(add) { const container = document.createElement('form'); container.innerHTML = ` <input type='text'/> <button>Add<button/> `; container.addEventListener('submit', (e) =>{ e.preventDefault(); const value = containe...
true
9c94eea4c9d0fd5258499ecf0afab7df12013080
JavaScript
InnovateUKGitHub/innovation-funding-service
/ifs-web-service/ifs-web-core/src/main/resources/static/js/ifs_modules/passwordToggle.js
UTF-8
1,516
2.703125
3
[ "MIT" ]
permissive
IFS.core.passwordToggle = (function () { 'use strict' var fieldName return { init: function () { var button = jQuery('.password-toggle button') var passwordInput = button.prev() var form = button.closest('form') var submitButton = form.find('[type=submit]') IFS.core.passwordToggl...
true
7eef21c65d7623d0421c1fbada10067fcbb6f1d8
JavaScript
pietrog/AssocApp
/back/components/events/EventDAL.js
UTF-8
7,041
2.8125
3
[ "MIT" ]
permissive
'use strict'; const EventSchema = require('./EventSchema'), assert = require('assert').strict, error_messages = require('./error_messages'), Logger = require('../logger').logger; const util = require('util'); class EventDAL { constructor() {} /* * Look for an event given so...
true
e3c32d73a3009ed0c8cf343deeaf82a6ba77340a
JavaScript
mahdeehasanbd1010/A-Study-Tool-for-Autistic-Children
/app/components/puzzle/Puzzle.js
UTF-8
6,508
2.578125
3
[ "MIT" ]
permissive
/* eslint-disable no-else-return */ /* eslint-disable react/jsx-no-undef */ /* eslint-disable import/no-unresolved */ /* eslint-disable global-require */ /* eslint-disable camelcase */ /* eslint-disable no-unused-vars */ /* eslint-disable import/prefer-default-export */ /* eslint-disable react/self-closing-comp */ /* e...
true
4eb1eec62be5312f7241272c9ac8f61867d827be
JavaScript
volchanskyi/w3schools
/JS/jsStringMethods.js
UTF-8
2,653
3.578125
4
[]
no_license
/** * Created by Administrator on 9/20/2016. */ function myIndexOf() { var str = "Please locate where 'locate' occurs!"; var pos = str.indexOf("locate"); document.getElementById("demo").innerHTML = pos; } function myLastIndexOf() { var str = "Please locate where 'locate' occurs!"; var pos = str...
true
e56afd69ab692561e3d0b39dc4b3c12147de6d64
JavaScript
Srivarshinisachayanthan/a23
/JS/emoji.js
UTF-8
4,641
3
3
[]
no_license
/* { This is emoji.js function : This function is used to send emoji easily while cliking the emoji's present in the emoji div its also capable to show and hide facility by the user : its appends the value to input message typed by the user or an null content too : } */ $('#emojis1').on('click', ()=...
true
3f4904f5a39ca6d246638981637602cb7fce41cb
JavaScript
DarceyLloyd/aftc-modules
/src/array/IsInArray.js
UTF-8
823
3.03125
3
[]
no_license
// JSODOC = { // "method": "isInArray", // "params": [ // { // "name": "needle", // "type": "*", // "required": true, // "default": null, // "info": "What you are looking for." // }, // { // "name": "haystack", // ...
true
82b9c929b975259e817cad00e28bcfbe12faf1b3
JavaScript
pzfender-pp/icwebreactapp
/src/components/section/Section1.js
UTF-8
2,674
2.6875
3
[]
no_license
import React, { useState, useEffect } from 'react'; import homebg0 from '../../img/homebg-0.jpg'; import homebg1 from '../../img/homebg-1.jpg'; import homebg2 from '../../img/homebg-2.jpg'; import '../../style/section/section1.css' const Section1 = () => { const [count, setCount] = useState(0); // useEffect for ...
true
2a67fa34d01339036663bb6f507ae34b63d3245b
JavaScript
Wachrip/makersTask
/js2/task24.js
UTF-8
299
3.96875
4
[]
no_license
class Animal { // constructor(name) { // this.name = name; // } } Animal.prototype.eat = function() { console.log("Eat this!"); } class Dog extends Animal { } Dog.prototype.bark = function() { console.log("Woof!"); }; var beagle = new Dog(); console.log(beagle.bark());
true
aba58fcd14dfdb5bdf513cbca6baf3eeffc0a810
JavaScript
ChaitanyaVSH/ReactGraphQLFrontEnd
/src/components/AddBook.js
UTF-8
2,265
2.5625
3
[]
no_license
import React, { Component } from 'react' import {graphql} from "react-apollo"; //https://stackoverflow.com/a/57466996 import {flowRight as compose} from 'lodash'; import {getAuthorsQuery, addBookMutation, getBooksQuery} from "../queries/queries"; export class AddBook extends Component { state= { bookname:...
true
dd36daffd42b304bb8da932c3652093a77966f26
JavaScript
andriyzagoruyko/laravel-react-landing-core
/resources/js/helpers/index.js
UTF-8
2,259
2.703125
3
[ "MIT" ]
permissive
export const getRandomKey = () => Math.round(new Date().getTime() + Math.random()); export const ucFirst = (str) => str ? str[0].toUpperCase() + str.slice(1) : ''; export function plural(word, amount = true) { if (amount === 1 || amount === false) { return word; } const plural = { ...
true
cc6462ddc5d4fb64a5a25a12360e33bfa05135a8
JavaScript
davidrielo/react-course
/exercises/13-html-attrs/GuestList.js
UTF-8
2,632
2.546875
3
[ "MIT" ]
permissive
import React from 'react'; import Guest from './Guest.js'; class GuestList extends React.Component { constructor(props) { super(props); this.state = { guestList: this.props.guestList, guestName: '', guestBrings: '', buttonStyle: { validStyle: { // TODO }, ...
true
95aca187c77ecb088c0c820a0878a69f7c00be93
JavaScript
grupoultra/laiguana
/activos/assets/js/main.js
UTF-8
6,056
2.734375
3
[]
no_license
var i; var divs = document.getElementsByClassName("titulo-wrap"); var wordsLimit = $(window).width() > 992 ? 50 : 13; function wordCount(str) { return getWords(str).length; } function getWords(str){ return str.split(" "); } function sliceWords(str){ return str.slice(0, wordsLimit); } function joinEllips...
true
17c1eeb6b5f67adcb0f096d5a738d172f5d399ae
JavaScript
StephanieRuthJones/react-d3-histogram-1
/example/main.jsx
UTF-8
1,579
3.015625
3
[]
no_license
var React = require('react'); var Stats = require('Stats'); var Histogram = require('Histogram'); var Main = React.createClass({ getInitialState: function() { var starter_nums = [ 0,1,1,2,3,3,3,3,4,4,4,4,4,5,5, 5,5,5,5,6,6,6,6,6,7,8,7,8,8,9 ]; return { ...
true
bc597246ca16f94f07b2eb4bab5c563552b23cc2
JavaScript
LindokuhleMomoza/umuziChallenge
/LindiMomoza.js
UTF-8
1,449
3.875
4
[]
no_license
//challenge 1 function check65(number1,number2){ if(number1==65 || number2 ==65){ return true; } if(number1+number2==65){ return true; } return false; } console.log(check65(23,65)); //challenge 2 var s1 = 7; var s2 = 8; var s3 = 9; var allSides = (s1 + s2 + s3)* 1/2; var allMinusS1 = allSides...
true
b10c1966ba3491375f2ad512eaa149b768a6f36c
JavaScript
victorette/js2dbDesigner
/static/js2db/draw2d/src/shape/basic/Rectangle.js
UTF-8
4,185
2.90625
3
[ "MIT" ]
permissive
/***************************************** * Library is under GPL License (GPL) * Copyright (c) 2012 Andreas Herz ****************************************/ /** * @class draw2d.shape.basic.Rectangle * A Rectangle Figure. * * See the example: * * @example preview small frame * * var rect1 = ...
true
c91d487257a0d899aedf95c2757c2afef737b7db
JavaScript
erukiti/bitcoin-complete-sample
/src/appendix-crypto/rot13.js
UTF-8
297
3.5
4
[ "MIT" ]
permissive
const rot13 = s => { return s.replace(/([a-mA-M])|([n-zN-Z])/g, (match, p1, p2) => { if (p1) { return String.fromCharCode(p1.charCodeAt(0) + 13) } else { return String.fromCharCode(p2.charCodeAt(0) - 13) } }) } console.log(rot13('Hello, World.')) // --> Uryyb, Jbeyq.
true
99630969fba3a185ce0fe91c508a69b4da4e985c
JavaScript
dm-grinko/github
/commit.js
UTF-8
784
2.875
3
[]
no_license
const moment = require('moment'); const shell = require('shelljs') const years = [ // 2020, // 2019, // 2018, ]; const commit = async(years) => { const promises = []; // for each year for (let y = 0; y < years.length; y++) { const YYYY = years[y]; // for each month for (...
true
75efb57ed2f5ffc1965aa4818b798745451c0ecb
JavaScript
yorchpave/Computer-Graphics
/6-gl-matrix/6-2-gl-matrix-matrices/js/main.js
UTF-8
541
3.34375
3
[]
no_license
"use strict" function main() { // Jugando con matrix (matrices) var ma = mat3.create(); mat3.set(ma, 1, 2, 0, 3, 4, 0, 5, 6, 1); var mb = mat3.fromValues(1, 2, 0, 3, 4, 0, 5, 6, 1); var mc = mat3.create(); mat3.add(mc, ma, mb); var msg = "Matriz A = " + mat3.str(ma) + "\n"; msg = msg + "Matri...
true
af743916b2b0bd97c44610d4ac774405e1e47c98
JavaScript
rawagschal/team-generator
/__tests__/Engineer.test.js
UTF-8
1,231
3.640625
4
[ "MIT" ]
permissive
const { test, expect } = require('@jest/globals'); const Engineer = require ('../lib/Engineer'); test('Creates a new Engineer object', () => { // mock values const name = "Rachel"; const id = 1; const email = "rachel@gmail.com"; const github = "rawagschal"; // pass mock values into mock Enginee...
true
51a702151dfe98ae856983fab585be4c5c35e74a
JavaScript
anasantos11/conquistandoSonhos
/src/validators/validators.js
UTF-8
1,310
2.84375
3
[ "MIT" ]
permissive
jQuery.validator.addMethod('preco', function (value, element) { var min = 0.01; var cleanValue = element.value.toString().replace(/^-/, '').replace(/^0*/, ''); var value = parseFloat(cleanValue.replace(/[^0-9]/g, '')); var retorno = !isNullOrEmpty(value) && !isNaN(value) && value >= min; return reto...
true
afe9a6d087b56ab2611baca5925c6fe2ef812d30
JavaScript
neonguyen/node-server-template
/controllers/user-ctrl.js
UTF-8
2,033
2.5625
3
[]
no_license
'use strict'; const User = require('../data/models/user-model'); const { _pick } = require('../helpers/objects'); class UserCtrl { static async actionReadAll(req, res) { const users = await User.find(); res.ok({ message: 'get all users', data: users, limit: user...
true
de88a6fd2978018002c2f87dc5c0eb77aa8427f5
JavaScript
jiyaan-project/react-functional-component-with-redux
/redux.js
UTF-8
1,621
2.515625
3
[]
no_license
import { createStore, applyMiddleware, compose } from "redux"; import logger from 'redux-logger' import thunk from "redux-thunk"; import actionInterceptor from './ActionInterceptor' const initialState = { todos: [ { id: 1, name: "Read a bit", complete: true }, { id: 2...
true
4346323ad18fff6f1917d70b5305f938b77cde15
JavaScript
silvertakana/intractive-physics
/sketch.js
UTF-8
1,112
2.953125
3
[]
no_license
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; var box = [],pickaxe,boxes = 100; var ground = [],ball = []; function preload() { } function setup() { createCanvas(800, 700); engine = Engine.create(); world = engine.world; //Create the Bodies ...
true
f6bcf3540fb8a7b3f3c5d5aea5f831daf5b7af1d
JavaScript
Vincent0700/leetcode-javascript
/daily/1619.ๅˆ ้™คๆŸไบ›ๅ…ƒ็ด ๅŽ็š„ๆ•ฐ็ป„ๅ‡ๅ€ผ.js
UTF-8
645
3.390625
3
[ "MIT" ]
permissive
/* * @lc app=leetcode.cn id=1619 lang=javascript * * [1619] ๅˆ ้™คๆŸไบ›ๅ…ƒ็ด ๅŽ็š„ๆ•ฐ็ป„ๅ‡ๅ€ผ */ // @lc code=start /** * @param {number[]} arr * @return {number} */ var trimMean = function(arr) { arr.sort((a, b) => a - b); const t = Math.floor(arr.length * 0.05); const a = arr.slice(t, arr.length - t); return a.reduce((acc,...
true
05769207fe103c07b368d9dbf59abef6c7836cfb
JavaScript
loud-neighborzzz/urbanoutfitters-images
/database/seed.js
UTF-8
1,936
2.875
3
[]
no_license
const db = require('./index.js') const Image = require('./Schema.js') const faker = require('faker') // sampleImage = { // itemId: null, // color: "", // url: "" // } //asdf /* i want 100 itemIds -the itemIds can be generated by incrementing i want 2 colors for every itemId -the colors can be randomly gener...
true
7cd5e3adbd98de4b9be865b41d154773b082c6dc
JavaScript
vokoshyv/leetcodePractice
/slidingWindowMaximum.js
UTF-8
286
3.171875
3
[]
no_license
/** * @param {number[]} nums * @param {number} k * @return {number[]} */ /* - iterate through elements - find the first and second most maximum element within that window */ var maxSlidingWindow = function(nums, k) { }; console.log(maxSlidingWindow([1,3,-1,-3,5,3,6,7], 3));
true
c4657d4f04f1d3d1f0f78c44448b304be76f1023
JavaScript
DanieLazo17/proyectoFinal
/WebContent/vistas/editar.js
UTF-8
906
3.109375
3
[]
no_license
/** * */ addEventListener("load", load); function $(demo){ return document.getElementById(demo); } function load(){ document.getElementById('txtNombre').addEventListener("keyup", validar); document.getElementById('txtApellido').addEventListener("keyup", validar); document.getElementById('numPosicion')...
true
3aacbcb69690bc97c8939cace6bdb4d8a3bca343
JavaScript
abshir24/AlgorithmPractice
/cs120/binary.js
UTF-8
379
2.875
3
[]
no_license
// Abshir Mohamed // CS120 // Convert numbers to their respective base numbers // 4/11/2018 // A. 100111 base 2 //B. 1101001 base 2 //C. 115 base 8 //D.177 base 8 //E.4F base 16 //F. 1A9 base 16 //G. 53 base 10 //H.169 base 10 //I. 26 base 10 //J. 157 base 10 //K. 245 base 10 //L. 41394 base 10 //+++++++++++++++++++++...
true
320ab0f15c46d747d555407ec017d81ba2ac1ba0
JavaScript
Javier2010204/curso-javascript
/EjerciciosPrimerBloque/fibonnaci/main.js
UTF-8
440
3.6875
4
[]
no_license
let inicio; let numero; let aux; const principal = 1; numero = prompt("fibonacci hasta?: "); for (var i = 1; i <= numero; i++) { console.log(i); aux = i; } /* console.log(" 1 "); console.log(" 1 1 "); console.log(" 1 2 1 "); console.log(" 1 3 3 1 "); console.log(" 1 4 6 4 1 "); conso...
true
8b2b6e47c6f217e324f86bd3d74864f6a060897d
JavaScript
qienze/Graduation-Project
/js/history.js
UTF-8
4,333
3
3
[]
no_license
class Window { constructor(nodeName, config) { this.canvas = document.querySelector(nodeName); this.handleChart = { 'temperature': null, 'fah': null, 'humidity': null, 'lux': null, }; this.dateList = { 'temperature': ['4.1', '4.2', '4.3', '4.4', '4.5'], 'fah': ['4...
true
85eeb4f38096ce395b019bb510679325b05b585e
JavaScript
DaltheCow/artist_profile
/src/reducers/profileReducer.js
UTF-8
1,013
2.765625
3
[]
no_license
import { RECEIVE_FIRST_NAME, RECEIVE_LAST_NAME, RECEIVE_BIO, RECEIVE_LOCATION } from '../actions/profileActions'; const defaultState = { firstName: 'First Name', lastName: 'Last Name', bio: 'Bio', location: 'Location', }; const ProfileReducer = (state = defaultState, action) => { Object.freeze(state); swi...
true
56b3ae71279cb7c5e02c5eccfa082d1a3ab956c7
JavaScript
ashenm/freecodecamp
/front-end/intermediate/algorithm-scripting/missing-letters.js
UTF-8
435
3.859375
4
[]
no_license
/** * Missing letters * Return missing letter in the passed letter range * * Ashen Gunaratne * mail@ashenm.ml * */ function fearNotLetter(str) { // mend case inconsistencies str = str.toLowerCase(); // range const start = str.charCodeAt(0); const end = str.charCodeAt(str.length - 1); for (let i =...
true
52f4697066814d53b3474990d5ab73183cdaa791
JavaScript
sautumn/databases
/server/db/index.js
UTF-8
2,978
2.703125
3
[]
no_license
var mysql = require('mysql'); var Promise = require('bluebird'); var con = mysql.createConnection({ host: 'localhost', user: 'root', password: '' }); con.connect(function(err) { if (err) { console.log('error'); return; } console.log('connection established'); }); con.query('USE Chat'); var quer...
true
28c36a198bef111271cfa2cbdcdbf005db63bc3c
JavaScript
boonook/vue-admin
/src/libs/axios/index.js
UTF-8
6,228
2.859375
3
[]
no_license
/* eslint-disable no-console */ import axios from 'axios' export default{ install(Vue,config){ config = config || {} Vue.prototype.$axios = createInstance(config) } } function createInstance(config){ function instance(options){ return instance.axios.request(options) } inst...
true
9b3d7b42de72d7decd5f42391c8a6ed447a4e215
JavaScript
storycoding/recast.ly
/src/components/App.jsx
UTF-8
2,129
2.8125
3
[]
no_license
class App extends React.Component { constructor () { super(); this.state = { 'currentVideo': window.exampleVideoData[1], 'currentDataSet': window.exampleVideoData, 'currentKeywords': 'cats and cucumbers' }; } newSearchRequest (userInputData) { this.state.currentKeywords = ...
true
4af74025b5fe523d79e083844cf95322f32d2e5d
JavaScript
NickolasT/basic-js
/src/carbon-dating.js
UTF-8
507
3.015625
3
[ "MIT" ]
permissive
const MODERN_ACTIVITY = 15; const HALF_LIFE_PERIOD = 5730; const RATE_CONSTANT = 0.693 / HALF_LIFE_PERIOD; module.exports = function dateSample(sampleActivity) { if ( typeof sampleActivity !== "string" || isNaN(Number.parseFloat(sampleActivity)) || sampleActivity === undefined || +sampleActivity...
true
97306425b15a89b7c30f7f1b3da7a8d3f8da4598
JavaScript
DanielGutmann/xreport
/src/xreport-embed/src/xreport-form/header.js
UTF-8
713
2.734375
3
[ "MIT" ]
permissive
import { XLabel } from './label'; import $ from 'jquery'; /** * Instantiates a new XHeader element. Mainly used for visually separating sections. * @class * @augments XFormElem */ function XHeader(text) { XLabel.call(this, text); this.type = "header"; } XHeader.prototype = Object.create(XLabel.prototype); XH...
true
4fdeb8c8350b9bdd41b9a90d0941e5ff94a4c71d
JavaScript
anderson-81/my-studies
/ecmascript/Study 02/07_proxy.js
UTF-8
3,090
4.21875
4
[]
no_license
/* PROXY O ES6 implementa a forma de intercessรฃo da meta programaรงรฃo usando Proxies. Semelhante ao ReflectAPI, a Proxy API รฉ outra maneira de implementar a meta programaรงรฃo no ES6. O objeto Proxy รฉ usado para DEFINIR O COMPORTAMENTO PERSONALIZADO PARA OPERAร‡ร•ES FUNDAMENTAIS. Um objeto proxy executa algumas operaรง...
true
1015e3bc5f1c492cb5d1fbe69c59018a955cad45
JavaScript
leplerjacob/webpack-from-scratch
/bundler.js
UTF-8
3,035
2.953125
3
[]
no_license
const fs = require("fs"); const babylon = require("babylon"); const path = require("path"); const traverse = require("babel-traverse").default; const babel = require("babel-core"); let ID = 0; function createAsset(filename) { const content = fs.readFileSync(filename, "utf-8"); const ast = babylon.parse(content, ...
true
9c445cefcda3f8575ede96657256c8b036509ce4
JavaScript
nQuisition/illusions-bot
/src/commands/index.js
UTF-8
3,507
2.71875
3
[]
no_license
const discordUtils = require("../utils/discordUtils"); const characterCommands = require("./characterCommands"); const teamCommands = require("./teamCommands"); const schedulerCommands = require("./schedulerCommands"); const githubCommands = require("./githubCommands"); const utilityCommands = require("./utilityComman...
true
ac8175f3ee66d7b23b70b3df736e7d4a8a94c208
JavaScript
lyj505/leetcode_javascript
/test/1.test.js
UTF-8
726
2.84375
3
[]
no_license
const LPS = require('../topics/Longest Palindromic Substring'); const testList = [ { origin: 'a', expect: 'a', }, { origin: 'bb', expect: 'bb', }, { origin: 'babad', expect: 'aba', }, { origin: 'cbbd', expect: 'bb', }, { or...
true
6ef775e8dbe15dbf486168c2994d1bb2f0885d98
JavaScript
nishizumi-lab/sample
/javascript/String/parseInt/main.js
UTF-8
242
3.8125
4
[]
no_license
function main() { // ๅค‰ๆ•ฐใฎๅฎฃ่จ€ใƒปๅˆๆœŸๅŒ– var x1 = '10'; var x2 = '10'; // ่จˆ็ฎ— var y1 = x1 + x2; var y2 = parseInt(x1) + parseInt(x2); // ็ตๆžœ่กจ็คบ alert('y1 = ' + y1 + '\ny2 = ' + y2 ); }
true
252069767448e52c3e6433e71b8282b6e7ef7d9f
JavaScript
yayadiallo60/marvel-front
/src/components/CharacterComics.js
UTF-8
1,287
2.515625
3
[]
no_license
import React, { useState, useEffect } from "react"; import { Link } from "react-router-dom"; import axios from "axios"; import Loader from "react-loader-spinner"; const CharacterComics = ({ id }) => { const [data, setdata] = useState(); const [isLoading, setIsLoading] = useState(true); useEffect(() => { con...
true
dd1fd9b34c7800b454526168f4ebdd11bb08a7f9
JavaScript
bradotron/Word_Guess_Game
/assets/game.js
UTF-8
6,843
3.890625
4
[]
no_license
// grab the gameDiv var gameDiv = document.getElementById("gameDiv"); // grab the play button var playBtn = document.getElementById("play-button"); // add a click listener to the play button that starts the game playBtn.addEventListener("click", playGame); // grab the quit button var quitBtn = document.getElementById...
true
d70b76a3655690a45895d071ddc2a0e179168174
JavaScript
Zaicevvv/Irish
/src/containers/MyCourses/helpers.js
UTF-8
990
2.984375
3
[]
no_license
import _ from 'lodash'; export const sortTopicsAlphabetically = courses => { const sorted = courses.reduce((array, item) => { let result = array; let key = item.title.charAt(0).toUpperCase(); if (result[key]) result[key].push(item) else result[key] = [item] return result; }, {}); return so...
true
8497bdfb1d7a39bb65f57c6ff29de4fdce3ff515
JavaScript
treasureDouDou/vue-blog
/src/plugin/plugin.js
UTF-8
1,564
2.53125
3
[ "MIT" ]
permissive
//vuex็Šถๆ€็ฎก็† import store from '@/vuex/vuex.js' import http from '@/util/axios.js' const plugin = { install(vue) { //้กต้ข็ญ‰ๅพ…ไธญ vue.prototype.loading = () => { store.state.loading = true }; vue.prototype.loadingClose = () => { store.state.loading = false }; ...
true
d1f059a03806c5f413465adffac4484ef7bf1393
JavaScript
alce65/JavaScript-BBVA-IT-19-22-Abril
/05_async/app.js
UTF-8
1,512
3.375
3
[]
no_license
document.addEventListener('DOMContentLoaded', main) function main() { const urlUsuarios = "https://jsonplaceholder.typicode.com/users" const nodoLista = document.querySelector('#lista') const nodoBotonVer = document.querySelector('#ver-usuarios') const nodoBotonAdd = document.querySelector('#add-user'...
true
45857befc1055548d248ff52940601a7c83842fc
JavaScript
alexreynolds/a-wee-compiler
/codegenutils.js
UTF-8
32,706
3.515625
4
[]
no_license
/* Alex Reynolds CMPU-331 Final Project codegenutils.js - Contains functions used to generate code - Object representations of: Execution Environment Static Data Table Heap Data Table Jumps Table */ // Execution Environment table object // Holds code generated // Uses an array of arrays to represent table...
true
14b58ef30aea5c66b5e6445c9cac5ab23e71da8b
JavaScript
WelitonAmartins/ForEachNeverMore
/04-concatAll/concatAll.js
UTF-8
667
3.484375
3
[]
no_license
const { categoriaFilmes } = require('./dados'); // tenho um array bidimensional // quero pegar o id de todos os videos em um array unidimensional e nao em um array bidimensional /* const filmesId = [] categoriaFilmes.forEach(catagoria => catagoria.videos.forEach(video => filmesId.push(video.id) ...
true
dc1f14f7f7d9bd1993a0f66e385c981164253912
JavaScript
anthonyrota/stackoverflowquestion-jest
/test/utils/hoistStatics.test.js
UTF-8
2,577
2.796875
3
[]
no_license
import hoistStatics from '../../src/utils/hoistStatics' describe('hoistStatics', () => { let statics let sym beforeEach(() => { sym = Symbol() statics = class { static [sym] = 'sym' static bar = 'baz' static property = 'staticProperty' property = 'property' stati...
true
efa3af2d2dcf6b4db4144fe2ecd8bfdc73126778
JavaScript
justhayleyk/UTMWebDev
/Activities/Week 10 - NodeJS/3. Tuesday/27-Inquirer_Geocode/Unsolved/inquirerGeocode.js
UTF-8
1,017
3.46875
3
[]
no_license
// Instructions: // Convert the below geocoding code from earlier today so that it uses inquirer.js instead of process.argv to handle the intake of user inputs. // Make sure your new code provides the exact same output as it did with process.argv. // HINT: You should not need to change *that much* code. // ==========...
true
75b3a2720b92b07e2a5d65080db98ba604f787fc
JavaScript
AGmustardtiger/Magic-8-ball
/docs/Magic8.js
UTF-8
1,005
3.734375
4
[]
no_license
//starting my code here :) //trying to get the user to shake the magic 8 ball const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); const messagesArr = ["As I see it, yes.", "Ask again later.", "Better not tell you now.", "Cannot predict no...
true
0a36067198c89266d052fa40c582528c9436bcd2
JavaScript
Ronald03/FastCars
/src/car.js
UTF-8
349
3.078125
3
[]
no_license
export default class Car { constructor(game, posX, posY) { this.car = document.getElementById("car"); this.width = 150; this.height = 200; this.position = { x: posX, y: posY }; this.game = game; } draw(ctx) { ctx.drawImage(this.car, this.position.x, this.position.y, 150, 200...
true
f6767be4d9eae570f61c3ce0c1675dfe7c7e421a
JavaScript
leeiopd/Til
/javascript/javascript/udemy/cleanCode/02_๋ณ€์ˆ˜๋‹ค๋ฃจ๊ธฐ/src/08/index.js
UTF-8
436
3.0625
3
[ "MIT" ]
permissive
function getElements() { const result = {}; result.title = document.querySelector(".title"); result.text = document.querySelector(".text"); result.value = document.querySelector(".value"); return result; } /////////////////////////////////////// function getElements() { return { title: document.quer...
true
841ed1b1f173d33bbbdbdcdd9bcff107a3d09720
JavaScript
fc-santos/Voyage
/js/generateCircuits.js
UTF-8
2,343
2.890625
3
[]
no_license
var allCircuits = null; function getCircuits(isAuthentifie) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechang...
true
75673da62ade6361f4dfe1501e228b524ac7d9d9
JavaScript
sadeqNick/todoApp
/todoApp/js/js.js
UTF-8
2,178
2.59375
3
[]
no_license
var myNodelist = document.getElementsByTagName("LI"); var i; for (i = 0; i < myNodelist.length; i++) { var span = document.createElement("SPAN"); var txt = document.createTextNode("\u00D7"); span.className = "close"; span.appendChild(txt); myNodelist[i].appendChild(span); } var list = document.query...
true
f3f0040089c7dbe6b4172038a141a7cf2bb792c7
JavaScript
Ironika/myJapan
/functions/helpers/Shared.js
UTF-8
610
2.53125
3
[]
no_license
const axios = require('axios') const convert = require('xml-js'); const { scansList, animeList } = require('../mangas'); const fetchRss = async (url) => { const response = await axios.get(url) const json = JSON.parse(convert.xml2json(response.data, {compact: true, spaces: 4})); return json } const isInLis...
true
7d2b1e17591908fdf35a40b99e7b8be7a43fa232
JavaScript
camlCaseTech/learn_crypto
/learn_crypto/scripts/directives/d3Directive.js
UTF-8
1,614
2.609375
3
[]
no_license
(function () { 'use strict'; // dynamic d3 bar chart for english letter frequency // make more general for other kinds of data // add character text labels and percentages // .text(function(d) { return d.key; }); angular.module('learnCryptoApp.directives') .directive('d3BarChart', ['d3', function(d3) ...
true
cbd1989d27fccf22e283ff4fe1978071f86cce25
JavaScript
xuqianli/0xb0t
/modules/readTest.js
UTF-8
443
2.859375
3
[]
no_license
exports.getDirections = function (arduinoConnection) { arduino = arduinoConnection; for (var i = 0; i < 5; i++) { console.log ('up ------ ' + i); arduino.writeDirection ('u'); // sleep(1000); console.log ('stop ------ ' + i); arduino.writeDirection ('r'); // sleep(1000); } } function sleep(mil...
true
2f650c04b2c5c7c0a73e37409294c1216dd1fd71
JavaScript
anphu7492/freshmen-app
/imports/ui/components/Locator.jsx
UTF-8
2,123
2.6875
3
[]
no_license
const React = require('react'); const INITIAL_LOCATION = { address: 'Aalto university, 02150 Espoo, Finland', position: { latitude: 60.184649, longitude: 24.827937 } }; const INITIAL_MAP_ZOOM_LEVEL = 14; const ATLANTIC_OCEAN = { latitude: 29.532804, longitude: -55.491477 }; let Locator = React.cre...
true
551c243a2399a8f6ddd2ca359042c1faa42e9677
JavaScript
49V/lighthouse-js-fundamentals
/merge-sort.js
UTF-8
1,483
3.90625
4
[]
no_license
/* Author : Moshe Lawlor Inspiration from https://hackernoon.com/programming-with-js-merge-sort-deb677b777c0 Note : I tried setting this up using pass by reference, but after quite a few hours I was unsuccessful. I then had to defer to find some help, and found this article useful for working out my mergeSort...
true
86b2db6102f2e29c1222e3474930fa0ed010f371
JavaScript
dwross/CS193c
/Assignment_2/assign2/bookland.js
UTF-8
4,078
2.90625
3
[]
no_license
var books = []; books[0] = {Author:"Thomas Mann", Title:"Death in Venice", Description:"One of the most famous literary works of the twentieth century, this novella embodies themes that preoccupied Thomas Mann in much of his work: the duality of art and life, the presence of death and disintegration in the midst of ex...
true
678756e2a23c683539d49ae40726f11ff2da0a00
JavaScript
Rehoni/Online-BookStore
/A6_3/javascript-and-jquery-deutche/c10/js/console-log.js
UTF-8
967
3.609375
4
[]
no_license
console.log('Und los geht\'s ...'); // Zeigt, dass das Skript lรคuft var $form, width, height, area; $form = $('#calculator'); $('form input[type="text"]').on('blur', function() { // Eingabe verliert Fokus console.log('Eingabe ', this.value ); // Schreibt Wert in Konsole }); $('#c...
true
5bec4dc1559836d6045676d2b6bef7654b741c69
JavaScript
matthewulrich/ReactWeather
/example-promise.js
UTF-8
506
3.671875
4
[]
no_license
function addPromise (a, b) { return new Promise (function (resolve, reject) { if(typeof a === 'number' && typeof b === 'number') { resolve (a + b); } else { reject('These are both not numbers'); } }); } addPromise(3, 4).then(function (sum) { console.log('promise success', sum); }, function (err) { cons...
true
1c20b732cccc0fbeec662dd4fb5e99cdeaab010a
JavaScript
adankro/react_E01
/src/index.js
UTF-8
660
2.9375
3
[]
no_license
import React from 'react'; import ReactDOM from 'react-dom'; const label_1 ="First Name:" var button ={'text':'submmit'}; function getTime() { return (new Date()).toLocaleTimeString() } //Create a react component const App = () => { return ( <div> <label className="label" htmlFor="name">{labe...
true
552137c68ec01c2ae6c56eabedc3d550b2526a85
JavaScript
utfpr-gp/web-ii
/2020-1/2020-09-08--pessoa-rica-pobre/2020-09-08--pessoa.js
UTF-8
107
2.65625
3
[]
no_license
class Pessoa { constructor(nome, idade) { this.nome = nome; this.idade = idade; } }
true
74635e19827b12edfcaf1c6f7e5696ae07be6aa4
JavaScript
airjp73/pettengillviolin
/maps/rental.js
UTF-8
1,496
2.546875
3
[]
no_license
function initRentalMap() { var map_center = { lat: 43.311693, lng: -70.705801 }; var map = new google.maps.Map(document.getElementById('map'), { zoom: 7, center: map_center, }); var johnson = { placeId: 'ChIJyTemcEmD44kRms7Un5a3ypY' }; var musicAndArts = { placeId: 'ChIJh9_uFT6FskwRgR2hNx1NdbQ' }; ...
true
97886a79ab36a1ee0748046d304e19718faf41b9
JavaScript
GermanOtniel/dashboard
/src/Services/dinamicas.js
UTF-8
3,057
2.765625
3
[]
no_license
// production //const baseURL = process.env.REACT_APP_BASE_URL; // development const baseURL = "http://localhost:3000" //CREO QUE NO SIRVE PARA NADA export function zoneById(id) { return fetch( baseURL + '/zona/one' ) .then(r=>r.json()) .then(zona=>{ return zona }) } // REPITO CREO QUE NO SIRVE PARA NAD...
true
b278cc0293972e76f4df27058e764a5beafbcde6
JavaScript
Sasa9163/pizzaOrderForm
/WebContent/js/valid-message.js
UTF-8
934
3.0625
3
[]
no_license
document.getElementById("btn_submit").onclick=function() { switch_validation("lastname","lastname-valid"); switch_validation("firstname","firstname-valid"); switch_validation("address","address-valid"); } document.getElementById("lastname").oninput=function() { switch_validation("lastname","lastname-valid"); } do...
true
a1186be5bf5875e757eece56082916719bcfa8cc
JavaScript
awwright/http-progress
/demo-patch-byterange-server/httpd.js
UTF-8
20,821
2.515625
3
[]
no_license
"use strict"; const http = require('http'); const fs = require('fs').promises; const { createReadStream } = require('fs'); const path = require('path'); http.createServer(handleRequest).listen(8080, function(){ console.log('<http://localhost:8080/>'); }); async function handleRequest(req, res){ const filepath = pa...
true
6f0eec6fd2508ba948255c3a405df4d0a0dc9157
JavaScript
MicleMing/platform
/src/lib/base/events.js
UTF-8
3,800
2.765625
3
[]
no_license
/** * @file class * @desc from aralejs events * @author lanmingming * @date 2016-3-1 */ var eventSplitter = /\s+/; var keys = Object.keys ? Object.keys : function (obj) { var result = []; for (var key in obj) { if (obj.hasOwnProperty(key)) { result.push[key]; } } return result; }; function Events ()...
true
7310ac670d922da464ca03a30b954e9da53e9711
JavaScript
dunayari/modulo-3-evaluacion-final-dunayari
/src/components/App.js
UTF-8
2,416
2.640625
3
[]
no_license
import '../styles/App.scss'; import { useEffect, useState } from 'react'; import callToApi from '../services/api'; import CharacterList from './CharacterList'; import Filters from './Filters'; import CharacterDetail from './CharacterDetail'; import { Route, Switch, useRouteMatch } from 'react-router'; function App() {...
true
58dcd44a404c7c4c92a18b5ddcdd7f99e5c6f286
JavaScript
izrulfizal/SmartMeter-Cordova
/www/js/autoPredict.js
UTF-8
5,524
2.921875
3
[]
no_license
function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } $.ajax({ type: 'GET', url: 'https://api.thingspeak.com/channels/759295/feeds.json?results=1', data: { get_param: 'value' }, dataType: 'json', success: function (data) { //console.log(data.feeds);...
true
f9ec3bcdc262468403e2470c7771d5411dc7084a
JavaScript
apuertadelaguila/lab-react-training
/src/components/greetings/Greetings.js
UTF-8
448
2.609375
3
[]
no_license
function Greetings({ lang, children }) { let greet; switch (lang) { case "en": greet = "Hello" break case "de": greet = "Hallo" break default: greet = "Hola" } return ( <div className="container"> <di...
true
fc4d55f7b028f2d531b0ff8f2bcee54c26a45fa8
JavaScript
uwgraphics/CellOViewer
/client/src/apis/tangler.js
UTF-8
783
2.859375
3
[ "BSD-3-Clause" ]
permissive
/*jshint esversion: 6 */ // @ts-check /* eslint-disable */ import { Graph } from "./graph.js"; /** * @param {Graph} graph */ export function primaryParent(graph) { // for every node, choose it's primary parent graph.nodes.forEach(function(node) { node.primaryParent = undefined; let maxChildren = 0; n...
true
a2d90ddc41c4812779009c2dde6de7cb0c943777
JavaScript
RynerNO/agentyzmin
/js/header-search.js
UTF-8
1,611
2.65625
3
[ "MIT" ]
permissive
const search_button = document.querySelector(".search-button-show"); const search_button_cancel = document.querySelector('.search-button-cancel') const header_nav = document.querySelector('.header__nav_hidden') const search_input = document.querySelector('.search-input') const search_results = document.querySelecto...
true
8b809380716f23c985a21dd52efc0432e73f9955
JavaScript
couleurs/SongShare
/routes/user.js
UTF-8
2,544
2.546875
3
[]
no_license
exports.login = function(db) { return function(req, res) { var username = req.body.username; var password = req.body.password; var users = db.get('users'); users.findOne({'username': username}, {}, function(e, doc) { if (doc) { if (doc.password == password) { setAvailability(...
true
7bc6bbd11f1ca8d20febd06e840061a66885e388
JavaScript
mukaya/atelier-testing
/Controllers/users.js
UTF-8
904
2.515625
3
[]
no_license
import { Error as MongooseError } from 'mongoose' import { User } from '../models/user' /** * * @param {Request} _ * @param {Response} res */ export const index = async (_, res) => { try { const users = await User.find() res.json(users) } catch (error) { if (error instanceof MongooseError) { r...
true
4f6565a61e35a27feded17927128cf9fbecdb365
JavaScript
rojan-rijal/internmate
/intern_app/main_app/app/static/js/posts.js
UTF-8
1,963
2.9375
3
[]
no_license
function createPost(){ var post = $.trim($("#post-content").val()); var token = $.trim($("#csrf_token_post").val()); if(post != ""){ $.post('../api/post/add', {post_body:post,csrf_token:token}).done(function(data){ alert("Data Loaded" + JSON.stringify(data)); }); } }; /* function name: loadAllPosts functio...
true
a17f1a7c63cd0897b4136bc53b6500efb40493bd
JavaScript
SLisovyi/810259-keksobooking-17
/js/show-info.js
UTF-8
3,340
2.5625
3
[]
no_license
'use strict'; (function () { var map = document.querySelector('.map'); var filterBlock = map.querySelector('.map__filters-container'); var cardTemplate = document.querySelector('#card').content.querySelector('.map__card'); // DOM ัะปะตะผะตะฝั‚ั‹ ะฑะปะพะบะฐ ะบะฐั€ั‚ะพั‡ะบะธ ะพะฑัŒัะฒะปะตะฝะธั var card = cardTemplate.cloneNode(true); ...
true
ec237311e497dd4ef81fa645a6d2546256f904c7
JavaScript
lbjjang/speedmall
/PC/js/layer.js
UTF-8
6,222
2.53125
3
[ "MIT" ]
permissive
function showInfo(flag, x, y) { //alert(x + " : " + y+" flag : "+flag); //flag.style.left=parseInt(x - 300)+"px"; //flag.style.top=parseInt(y - 5)+"px"; flag.style.visibility="visible"; //speedmall.style.left=parseInt(x - 300); //speedmall.style.top=parseInt(y - 5); //speedmall.style.visibility="visible"; } ...
true
5721f3fa10e1e9ebf03a7ccde5f0bd5783d19b82
JavaScript
gbabichev/ProjectRC
/Assets/Scripts/CarEngine.js
UTF-8
10,038
2.671875
3
[]
no_license
#pragma strict /* Car Mechanics Script George Babichev August, 2014 */ /// Defines wheel colliders var wheelFR : WheelCollider; var wheelFL : WheelCollider; var wheelRR : WheelCollider; var wheelRL : WheelCollider; // Defines the game object which wheel model is child of // I am using a 'sub-model' to align axis so the...
true
092aed6b60b51848d68ac2c444d2db9e2a67eaeb
JavaScript
txiverke/blog
/src/utils/__mocks__/setPromise.js
UTF-8
1,439
2.671875
3
[]
no_license
import config from '../../config' const users = { 4: {name: 'Mark'}, 5: {name: 'Paul'}, }; export const setPromise = { url: '', type: '', options: { method: null, body: null, mode: 'cors' }, // $FlowFixMe set method (val): string { this.options.method = val }, // $FlowFixMe set body (...
true
219dca079ba1e56081e11b40d98328d0fc8d025f
JavaScript
Superninjaboss/teddy
/commands/eval.js
UTF-8
448
2.625
3
[]
no_license
exports.run = async (client, message, args) => { if (message.author.id !== '193870645174468609') return; try { let evaled = await eval(args.join(' ')); if (typeof evaled !== "string") evaled = require("util").inspect(evaled); message.channel.send(evaled, {code:"xl"}); } c...
true
ea3e273048eba81e1f35f4def86238fc7a2163c9
JavaScript
lisabell-li/pnh-tutorial
/public/javascripts/letter.js
UTF-8
17,022
3.078125
3
[]
no_license
var varFeel =''; var letterDext=''; var feelingData = []; var counter = 1; var coCa =0; var data=0; var letterInLanguage=0; // DOM $(document).ready(function() { getURL(); hideCats(); createLetter(); $('#catButton').on('click', showCats); $('#vocTable #fee1').on('click', 'td a.linkChangeFeelNext',...
true
7b2d3288d9992670b6d0400d3f194eca9ab74140
JavaScript
Madakkak/Tourn
/client/src/reducers/invite.jsx
UTF-8
820
2.953125
3
[]
no_license
// // invite.jsx // // Invite button reducer // // Set invites boolean to true or false // This bool is evaluated to determine whether more // players can be invited to the tourn. function handleAllowInvites(state, allowInvites) { console.log('handleAllowInvites: new invite state =', allowInvites); return allowInv...
true
bec65442aaa2b81c98f8ad154431283cc52753ba
JavaScript
sami16kazah/3D-tetris-
/3D tetris/js/tetris.js
UTF-8
7,062
2.59375
3
[ "MIT" ]
permissive
if (!window.requestAnimationFrame) { window.requestAnimationFrame = ( function () { return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (/* function F...
true
ef56a73ef57b313d934dce1a691956e1c8474a53
JavaScript
squallvince/es2005
/js/demo.js
UTF-8
4,372
3.671875
4
[]
no_license
'use strict'; /*let f; { let a = 'secret'; f = function () { console.log(a); } } f()*/ /*var a = 'string'; console.log(window.a); let b = 1; console.log(window.b);*/ //Destructuring /*let [a, [b], d] = [1, [2, 3], 4]; console.log(a); console.log(b); console.log(d);*/ /*let [x = 1, y = x] = [2]; console.log...
true
890b9dd7935da02327e82cb0fdb4cc80e4c75eff
JavaScript
VoMinhTan1/webbandienthoai
/js/lienhe.js
UTF-8
1,367
2.734375
3
[]
no_license
function check_lienhe(){ var hoten=document.getElementById('hoten').value; var sdt=document.getElementById('sdt').value; var email=document.getElementById('email').value; var noidung=document.getElementById('noidung').value; var result=document.getElementById('result').value; if(hoten.length<2){ document.getEl...
true
f7c4fbdadeae80ecfc19377738d70ffde2817655
JavaScript
jinmatt/galaxy-trader
/libs/translator.js
UTF-8
3,386
3.703125
4
[]
no_license
/** * Constants as representation of Decimal to Roman numerals(with edge cases) mapping */ const DECIMAL = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]; const ROMAN = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']; /** * Intergalactic representation of credit units */ function In...
true
91f83ad4ab9725dfc778a5b29b2c89ee462e3978
JavaScript
aronduby/hwp-bridge
/admin/js/filters.js
UTF-8
921
2.640625
3
[]
no_license
'use strict'; /* Filters */ angular.module('myApp.filters', []) .filter("toArray", function(){ return function(obj, skipHash) { if(skipHash !== true) skipHash = false; var result = []; angular.forEach(obj, function(val, key) { if(!(key == '$$hashKey' && skipHash === true)){ result.push(val);...
true
f9e67ecd79953473ea3ff6704615eb54e00e4519
JavaScript
dongnguyen1999/course-web
/src/main/resources/static/web/js/validation.js
UTF-8
1,553
2.90625
3
[]
no_license
var submitForm = true; function showInvalid(inputTag, message){ inputTag.removeClass('is-valid'); inputTag.addClass('is-invalid'); inputTag.siblings('.invalid-feedback').html(message); submitForm = false; } function showValid(inputTag, message) { inputTag.removeClass('is-invalid'); inputTag.addClass('is-va...
true
112e6405f112f37953c1fc6852d97b2d7cf5b595
JavaScript
pleeplop/thejsway-code
/chapter07/js/examples.js
UTF-8
1,980
4.09375
4
[]
no_license
let movies = ["The Wolf of Wall Street", "Zootopia", "Babysitting"]; let elements = ["Hello", { message: "Hi mom"}, true]; console.log(`movies length ${movies.length}`); const emptyArray = []; console.log(`empty array length ${emptyArray.length}`); console.log(movies[0]); console.log(movies[1]); console.log(movies[2]...
true
d3b8c20684a12ca6a216030e67efff8f08c5fd37
JavaScript
bryant1410/Impact-Bootstrap
/impact/lib/plugins/imageblender/imageblender.js
UTF-8
1,681
2.6875
3
[ "MIT" ]
permissive
// Image Blender, v0.1 - https://github.com/deakster/impact-imageblender ig.module( 'plugins.imageblender.imageblender' ).requires( 'impact.image' ).defines(function () { ig.Image.inject({ onload: function( event ) { this.parent( event ); var hashIndex = this.path.indexOf("#"); if (hashIn...
true
2612c98c99f1127105ed1297d3c21e987eb93941
JavaScript
ZacBin9/leetcode
/(#92)Reverse-Linked-List-II.js
UTF-8
426
3.125
3
[]
no_license
var reverseBetween = function (head, left, right) { const preHead = new ListNode(-1) preHead.next = head let temp = preHead let step = 0 while (step < left - 1) { temp = temp.next step++ } let pre = null let cur = temp.next while (step < right) { let next = cur.next cur.next = pre ...
true
17c9678290866d14d1c4247d1a5b4f3e4da914c2
JavaScript
Jd1681/fizzBREF
/app.js
UTF-8
567
3.328125
3
[]
no_license
$(document).ready(function(){ promptUser(); }); function promptUser(){ var userInput = +prompt("Enter a number"); if(isNaN(userInput) || $.trim(userInput) == '') { promptUser() } else { fizz(userInput); } } function fizz(a) { for(var counter = 1; counter <= a; counter++) { if (counter % 3 == 0) { if ...
true
9a75390034d033d14f5f384e0e42f96d5a3cea0d
JavaScript
RaikaSantiago/Taller-clase
/Taller clase 3w/ejercicio1.js
UTF-8
600
4.15625
4
[]
no_license
/* * * Ejercicio 1: Implemente una funcion que retorne la suma de todos los elementos en el arreglo. * * Autor: Santiago Rivera Escobar Cod.1664066 * Fecha: 14/09/2018 * */ var arraySum = function(array) { var suma=0; for (var i = array.length-1;i>=0; i--) { suma += array[i]; } return...
true
820cc32747f5cd8ddcf2526905d018e60cb8a82a
JavaScript
Saber2pr/react-opensource-learning
/react/legacy-events/SyntheticEvent.js
UTF-8
5,686
2.609375
3
[ "MIT" ]
permissive
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* eslint valid-typeof: 0 */ import invariant from "shared/invariant" import warningWithoutStack from "shared/warningWithoutStack...
true