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
0aa63951cddbb26392dbdfdd6e3b6956cdccabeb
JavaScript
kaoryogata/projeto_react
/projeto/site-cursos/src/store/actions/curso.js
UTF-8
3,241
2.640625
3
[]
no_license
import axios from 'axios'; const URL = 'http://localhost:3200/api/cursos'; export const SET_VALOR_CURSO_TYPE = 'SET_VALOR_CURSO_TYPE_'; export const SET_VALOR_CURSO_LISTA = 'SET_VALOR_CURSO_LISTA'; export const SET_VALOR_CURSO_MSG_SUCESSO = 'SET_VALOR_CURSO_MSG_SUCESSO'; export const SET_VALOR_CURSO_MSG_ERRO = 'SET_VA...
true
122625ae136020299fb293bc3ea88ea67176a70c
JavaScript
Cat9Yuko/ECMAScript
/Passage22/export命令.js
UTF-8
1,240
3.40625
3
[]
no_license
/* * @Author: Cat9Yuko * @Date: 2020-11-09 15:51:48 * @Last Modified by: Cat9Yuko * @Last Modified time: 2020-11-09 16:52:53 */ // 模块功能主要由两个命令构成: export和import. export命令用于规定模块的对外接口, import命令用于输入其他模块提供的功能. // 一个模块就是一个独立的文件. 该文件内部的所有变量, 外部无法获取. 如果希望外部能够读取模块内部的某个变量, 就必须使用export关键字输出该变量. 下面是一个JS文件, 里面使用export命令输出...
true
4139f39c26e1eac9c29df9584ead34bfe561f87a
JavaScript
Makarov1999/870737-kekstagram-20
/js/data.js
UTF-8
3,021
3.015625
3
[]
no_license
'use strict'; (function () { var PHOTO_COMMENTS = [ 'Всё отлично!', 'В целом всё неплохо. Но не всё.', 'Когда вы делаете фотографию, хорошо бы убирать палец из кадра. В конце концов это просто непрофессионально.', 'Моя бабушка случайно чихнула с фотоаппаратом в руках и у неё получилась фотография луч...
true
56bb82dfe90ae5ad7add87ba0684b34079f10ab7
JavaScript
TylerEli617/merp_test.js
/index.js
UTF-8
8,678
3.140625
3
[ "Apache-2.0" ]
permissive
function shuffle(array) { var index = array.length; while (index !== 0) { var swapIndex = Math.floor(Math.random() * index); index--; var swapValue = array[swapIndex]; array[swapIndex] = array[index]; array[index] = swapValue; }; } function getPrintAndLog(print,...
true
867db45e4fceda2775465534c61efec5a8d430e6
JavaScript
Aman09Singh/Capgemini_ADAPT
/ES6 & TypeScript/Assignment 3/Ques2.js
UTF-8
1,431
3.421875
3
[]
no_license
class Accountss{ private total_Balance: number; constructor(balance: number){ this.total_Balance = balance; } get Balance(){ return this.total_Balance; } deposit(amount:number){ this.total_Balance += amount; console.log("Deposited : $"+ amount); ...
true
cd9732180a78e8576044f92137f268a421bca8dd
JavaScript
Kalliope-Kat/suchNice
/assets/js/main.js
UTF-8
31,080
2.53125
3
[ "CC-BY-3.0" ]
permissive
var CANVAS_WIDTH = 800; var CANVAS_HEIGHT = 600; var FPS = 30; var RADTODEG = 180/Math.PI; var DEGTORAD = Math.PI/180; var vel = 8; var angle = 360; var throwAngle, mouseDragDistance; var itemX, itemY; var gravityY; var itemsToThrow, numberOfHits; var canvas, stage, queue, context; var gameState; var startButton, inst...
true
5df316e484df7e40341aca11e0123db8495e1a2e
JavaScript
jeffreypriebe/scjs-jQNgRe-Places
/jQuery/js/app.js
UTF-8
2,511
2.8125
3
[ "MIT" ]
permissive
/*global util, ENTER_KEY, ESCAPE_KEY */ jQuery(function ($) { 'use strict'; var App = { init: function () { this.todos = util.store('places'); this.bindEvents(); this.render(); }, bindEvents: function () { $('#add-new').on('click', this.create.bind(this)); }, render: function () { var list =...
true
0d0786be89852e8974144eb7ffa0c8170bf9c15f
JavaScript
2016144108/ES6
/lesson_12 异常处理/lesson_12.js
UTF-8
292
2.578125
3
[]
no_license
let message=''; try{//可能出现问题的代码块 //fu(); message='没有出现问题'; }catch (e) {//捕获异常 console.log(e); console.log(e.message); message='出现问题:'+e.message; }finally {//一定会执行,不论出没出错 console.log(message); }
true
71d1f5e1b7497a5c9806d134c54ba7bf1f62d33b
JavaScript
TKais/Insta-Lite
/frontend/src/components/ImageContainer.js
UTF-8
1,044
2.828125
3
[]
no_license
import React, { useState, useEffect } from 'react'; import Image from './Image'; import Loader from './Loader'; function ph(res) { return Object.keys(res).map(item => res[item]); } function ImageContainer(props) { const [photos, setPhotos] = useState([]); const [loading, setLoadingState] = useState(false); co...
true
acd62172414fb14de0e8c961f159041b5a7fd8df
JavaScript
JKCamus/Q-S
/base/并发控制.js
UTF-8
2,488
3.46875
3
[]
no_license
function multiRequest(urls = [], limit, iteratorFn) { const len = urls.length; const result = Array(len).fill(false); let count = 0; return new Promise((resolve, reject) => { const start = () => { let curr = count++; if (curr >= len) { // 请求全部完成就将promise置为成功状态, 然后将result作为promise值返回 ...
true
1a8afddacf8a1df27538c251a0d0882dc0f577a7
JavaScript
hougrammer/hearts
/hearts.js
UTF-8
10,067
3.546875
4
[]
no_license
// Suits order can be redefined if we don't like this. const SUITS = ['Clubs', 'Diamonds', 'Hearts', 'Spades']; // Point values of all the special cards const SPECIALS = { 9: 50, // 10 of Clubs "multiplier" 23: 100, // Jack of Diamonds "goat" // Hearts: // The 2, 3 and 4 are not actually worth -1 point...
true
578f5efdbb9f1bdea01207e28d544207f13a5f78
JavaScript
coffeemori92/javascript-algorithm
/01_chapter1-2/55_하노이의탑.js
UTF-8
286
3.21875
3
[]
no_license
const route = []; function hanoi(num, start, end, sub) { if(num === 1) { route.push([start, end]); return 1; } hanoi(num - 1, start, sub, end); route.push([start, end]); hanoi(num - 1, sub, end, start); return route; } console.log(hanoi(3, 'A', 'C', 'B'));
true
ff8705f55bd7a614e793285149f6786735dc4378
JavaScript
gcruchon/adventofcode
/2020/13/timeBeforeTheyMeet.js
UTF-8
344
3
3
[]
no_license
const timeBeforeTheyMeet = (bus1, bus2) => { let meetingTime = bus1.startTime + bus2.minutesAfter; for (let i = 0; i < bus2.busId; i++) { if (meetingTime % bus2.busId === 0) { return (meetingTime - bus2.minutesAfter); } meetingTime += bus1.busId; } throw "Buses never meet!"; }; module.export...
true
de696a01cc27a42c054f619080c6a238844165e9
JavaScript
mariaPazBeltran/SCL011-Social-Network
/test/app.spec.js
UTF-8
3,535
2.828125
3
[]
no_license
import { miFuncionTesteableExp, miOtraFunctionTesteableExp } from '../src/js/app'; const chai = require('chai'); describe('Nuevo Usuario', () => { it('Debería retornar true si completa todos los campos', () => { //expect(validateNewUser ('Lisa','lisa.simpson@gmail.com','mypass')).toBe(true); }); it('Debería...
true
2935ec6ed89333fff604294c54db27734f931b9e
JavaScript
ronn9419/create-redux-actions
/src/createActions.js
UTF-8
4,645
2.765625
3
[ "MIT" ]
permissive
/* eslint-disable valid-jsdoc */ import isObject from './utils/isObject' import isArray from './utils/isArray' import isString from './utils/isString' import isFunction from './utils/isFunction' import merge from './utils/merge' const defaultPayloadMetaCreator = (arg1, arg2, arg3) => [arg1, arg2, arg3] /** * Create...
true
86647d70a4b017a6fc0c6942ac15efc564d248f4
JavaScript
B4zZinGa/akademia108
/4-repo-js/4-arrays/js/script.js
UTF-8
1,071
4.21875
4
[]
no_license
//LICZY OD ZERA var imiona = ['Paweł', 'Krzysztof', 'Kasia', 'Nicole', 'Kamil']; //console.log(imiona[2]); //tu wyświetliło kasie /*console.log(imiona); imiona[5] = 'Monika'; imiona[6] = 'Marcin'; console.log(imiona); */ //push dodaje elemnt na końcu tablicy i z automatu przypisze kolejny indeks /*imiona.p...
true
f79bb630956bfef1eb01bf1d2f9f78a8372eb75e
JavaScript
iGusky/03-counter-app-fh
/src/PrimeraApp.js
UTF-8
459
2.5625
3
[]
no_license
import React from 'react'; import PropTypes from "prop-types"; // import React, { Fragment } from 'react'; //* Functional components const PrimeraApp = ( {saludo, subtitulo} ) =>{ return (<> <h1>{saludo}</h1> <p>{ subtitulo }</p> </>); } //* Restricciones de los Props PrimeraApp.propTypes = { s...
true
c6a98721b70a1d7595fcefc256f3c4717849da64
JavaScript
asabriye/lotide
/head.js
UTF-8
292
3.109375
3
[]
no_license
const assertEqual = require('./assertEqual'); const head = function(array) { return array[0] }; const assertEqual = require('./assertEqual'); // TEST CODE assertEqual(head([5,6,7]), 5); //PASS assertEqual(head(["Hello", "Lighthouse", "Labs"]), "Helloo"); //FAIL module.exports = head;
true
03b9f55a1971a5b8e1c26c918972215627b3e5f2
JavaScript
wojciechadamczyk/Javascript
/2_DOM/1_Wyszukiwanie_elementow/js/app.js
UTF-8
864
3.28125
3
[]
no_license
/** * Created by Jacek on 2016-01-11. */ document.addEventListener("DOMContentLoaded", function () { /* Poniżej napisz kod rozwiązujący zadania */ var articleFirst = document.querySelector('article.first'); //dostajemy pojedynczy element bo query selector! //var allH1 = articleFirst.getElements...
true
7185207355232742ee9a1587a8a920ba1a2d47d5
JavaScript
chasballew/gitbook-plugin-select
/index.js
UTF-8
2,224
2.796875
3
[]
no_license
module.exports = { // Map of hooks hooks: {}, // Map of new blocks blocks: {}, // Map of new filters filters: { // Given an array of hashes, return an array of hashes where the // specified key/value match is found // filter_by_key_value([{"id": "chas"}, {"id": "frank...
true
b978208c96d755137b924f17ed46e12f0f8c56ba
JavaScript
Jwyman328/fitnessAppNodeFrontEnd
/src/reducers/challengeReducers/pastChallengePageReducer.js
UTF-8
730
2.578125
3
[]
no_license
import React from 'react'; function pastChallengeReducer(state, action){ switch(action.type){ case 'pastChallengesFetchAttempt': return { ...state, isLoading:true, isError:false, } case 'pastChallengesFetchError': ...
true
163aaf77d2fa0e79cc7b2dea3dfe9c734a804cf1
JavaScript
418sec/locutus
/src/php/network/inet_pton.js
UTF-8
1,561
2.921875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
module.exports = function inet_pton (a) { // eslint-disable-line camelcase // discuss at: https://locutus.io/php/inet_pton/ // original by: Theriault (https://github.com/Theriault) // example 1: inet_pton('::') // returns 1: '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' // example 2: inet_pton('127.0.0.1') // ...
true
ec161a704ee9ee1d1866837c05df4365ed75c488
JavaScript
shamwow/webrtc-chat
/src/js/classes/Message.js
UTF-8
781
2.828125
3
[ "MIT" ]
permissive
export default class Message { constructor(opts) { // TODO: type checking if (!opts.text || !opts.author) { console.log(opts); throw new Error('A message must have text and an author'); } this.text = opts.text; this.author = opts.author; } clo...
true
fe418fdd49be3a389fc92589f73f3ed0652e1cd3
JavaScript
oseogun/JavaScript-Part1-ES6
/4_functions/syllogism.js
UTF-8
1,781
4.53125
5
[]
no_license
/* * Sample code to demostrate Javascript functions syntax using the Syllogism */ /* * --Scenario One-- * All men are mortal. * Socrates is a man. * Therefore, socrates is mortal. */ // Define function function mortalIdentifier(person){ // Initialize an array of individuals const men = ["Socrates","Plato","Arist...
true
48210a36f0c60d99f7c3136049a6eae266e84411
JavaScript
sravannerella/ChocoLayer
/main.js
UTF-8
557
2.53125
3
[]
no_license
const {app, BrowserWindow} = require('electron'), path = require('path'), url = require('url'); function createWindow(){ let window = new BrowserWindow({ titleBarStyle: 'default', minHeight: 500, minWidth: 500, show: true }); window.once('ready-to-show', function(){ window.show(); }); window....
true
91bd8696a79987cd1a61f40730ec9fabc75445ff
JavaScript
cosminpopescu14/YearProgress
/index.js
UTF-8
628
2.90625
3
[]
no_license
const ProgressBar = require("./ProgressBar"); let getDayOfYear = require('./node_modules/date-fns/getDayOfYear') const bar = new ProgressBar(); const total = 365; let current = 0; //let now = new Date().toJSON().slice(0,10).replace(/-/g,'/'); bar.init(total); current = getDayOfYear(new Date()) bar.update(current); ...
true
bed1597f3eafbc3f4f708fa8d6370ad634003d7f
JavaScript
EdwardDeaver/ControlMyLights
/OLD/LocalServerComponents - Uses Express Backend/UserRateLimiting/UserRateLimiting.js
UTF-8
1,734
3.21875
3
[]
no_license
// Don't allow a user to spam the chat. // This is also to help save my hardware from crashing. // class UserRateLimiting { constructor(timeoutLength, maxSize) { this.UserNameTime = new Map(); //Empty Map this.timeoutlength = timeoutLength; this.maxSize = maxSize; this.entryAmou...
true
c62cd9db9273c8e626e2bb4fb77882cae63ad793
JavaScript
mendesgaby7/Projeto-2-bimestre
/scripts.js
UTF-8
586
3
3
[]
no_license
const main = document.querySelector('main'); const botao = document.querySelector('#button') if(localStorage.getItem('img_url')) { main.innerHTML = '<img src="'+localStorage.getItem('img_url')+'">' } botao.addEventListener('click', gerarImagem) function gerarImagem() { fetch('https://api.thecatap...
true
acae4b882b95cbea199a28e17c853fed82b85ff5
JavaScript
Peturman/resume-app
/src/until/filterTools.js
UTF-8
666
2.53125
3
[ "MIT" ]
permissive
export function getIndustries (industry, industryId, secondIndustryId, industrySource) { const foundIndustry = industry.filter((item) => { return item.value === industryId })[0] if (foundIndustry) { const foundSecondIndustry = foundIndustry.children.filter((item) => { return item.value === secondInd...
true
8348ffb1a4515091e4ac57eb9aa481274cb4d1c7
JavaScript
shivam905/react_with_php
/react-php/react_with_php/src/App.js
UTF-8
1,114
2.515625
3
[]
no_license
import React from 'react'; import './App.css'; import axios from 'axios'; import ContactForm from './comp/ContactForm.js'; class App extends React.Component { state = { contacts: [] } componentDidMount() { const url = 'http://localhost/api/contacts.php' axios.get(url).then(response => response.data)...
true
03aca8668d073f0b6628a65214f19e68cb256f92
JavaScript
iancoleman/iancoleman.io
/polynomial-interpolation/app.js
UTF-8
5,365
2.65625
3
[]
no_license
let points = []; let randPoints = []; let mousePoint = []; let chart = document.getElementById("chart"); let kplusplus = document.querySelectorAll(".kplusplus"); let ctx = chart.getContext("2d"); let margin = 10; // do not put random points within margin/2 px of the edge let coeffs = []; let liveUpdate = true; functio...
true
c474d9c549f9a0d94b0980d6297a98f0c15a5bf5
JavaScript
gbutt/rally-node-ng
/src/features/schema.js
UTF-8
1,314
2.625
3
[ "MIT" ]
permissive
(function(){ 'use strict'; /** Get the workspace schema @param {object} workspace - The workspace object - @member {string} ObjectID - @member {object} SchemaVersion @return {promise} */ var schema = function(workspace) { var self = this; function getWorkspace(ObjectID) { var ref; ...
true
b0221bb481c34bc43cd8897e3fb1b9911a7c7cd8
JavaScript
Gabriel-Lewis/node-weather-app
/playground/callback.js
UTF-8
138
2.890625
3
[]
no_license
var getUser = (id, cb) => { var user = { name: 'Gabriel', id } cb(user) }; getUser(2, (user) => { console.log(user); });
true
ba941d4ea903d7cf497f2b124b14669b5dc2d2c2
JavaScript
sellisonm/ui-framework-comparison
/bin/generate.js
UTF-8
5,692
2.8125
3
[ "MIT" ]
permissive
'use strict' const path = require('path') const fs = require('fs') const table = require('markdown-table') const allCriteria = require(path.join(__dirname, '../criteria.json')) const candidates = require(path.join(__dirname, '../candidates.json')) const candidatesMap = buildCandidatesMap() const implementations = bu...
true
79b3a669df592cd2a4cd9def58c10e8a8984bd35
JavaScript
mateuszroth/swift-tvos-tvml-pokemon-app
/iOS-to-tvOS-example/application.js
UTF-8
3,668
3.0625
3
[]
no_license
//# sourceURL=application.js // // application.js // iOS-to-tvOS-example // // Created by Mateusz Roth on 21/01/2021. // /* * This file provides an example skeletal stub for the server-side implementation * of a TVML application. * * A javascript file such as this should be provided at the tvBootURL that is ...
true
d67359767c73b5946a5e9c1048a735d8a998fa28
JavaScript
funnicus/EloquentJavaScript_interesting-exercises
/A-List.js
UTF-8
876
4.28125
4
[]
no_license
// Your code here. function arrayToList(arr){ let list = {value: null, rest: null} list.value = arr[0]; if(arr.length > 1) list.rest = arrayToList(arr.splice(1, arr.length)); else list.rest = null; return list; } function listToArray(list){ let arr = []; for (let node = list; node; node = node.rest...
true
aa75dd8e950e366708f3e608b7a80eb37093035e
JavaScript
sami7757/AngularServicesFactories
/script.js
UTF-8
1,057
2.765625
3
[]
no_license
// Code goes here var a = 0; angular.module('myapp', []) .controller('myctrl', ['$scope', 'myService', 'myFactory', function($scope, myService, myFactory) { $scope.firstName = "Enter ..."; $scope.data = "will be added soon!!" $scope.users = {}; $scope.clickService = function() { $scope.serviceVa...
true
aa4bd6cdc46d15c701e64b177f7391780e12d9b0
JavaScript
xianxianwang2020/prog209mobile0315
/routes/users.js
UTF-8
2,147
2.703125
3
[]
no_license
var express = require('express'); var router = express.Router(); let serverItemArray = []; // our "permanent storage" on the web server // define a constructor to create item objects var ItemObject = function (pID,pName, pCategory,pBrand, pCondition,pPrice, pOwner,pImageLink) { this.ID=pID; this.Name = pName; ...
true
8898d4a02e8f21cc67ac367314ee645331aa5986
JavaScript
matthinz/worky-mcworkflowface
/src/util/jsonish.js
UTF-8
626
3.3125
3
[ "MIT" ]
permissive
// JSON-ish parsing / stringification used for workflow and activity inputs and activity results. // We serialize `undefined` as "", `null` as "null", and everything else as JSON. function parse(input) { if (input === undefined || input === '') { return undefined; } if (input === 'null') { ...
true
8cc514658854c5c3f9d9b0213021d033ee4327e1
JavaScript
PeterKow/clientAurity
/app/utils/storage.js
UTF-8
1,178
2.921875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
let storageObject = {} const storage = { set, get, remove, clearAll, } const db = { setItem, getItem, removeItem, clear, } let dbStore = {} init() export default storage function set(key, value) { storageObject.setItem(key, value) } function get(key) { return storageObject.getItem(key) } funct...
true
fae81e39ed313975f61cd64facab8e279d0d22be
JavaScript
ChekhGit/ProjectSPP
/frontend/src/main/webapp/resources/js/statistic.js
UTF-8
3,870
2.765625
3
[ "MIT" ]
permissive
let controlsArray = []; window.onload = function () { initControlsArray(); setOnSelectHandler(); setOnClickForClearAllButtons(); dataOrganizer = new DataOrganizer(); dataOrganizer.getData(controlsArray[0][0], 0); dataOrganizer.getData(controlsArray[1][0], 0); }; function initControlsArray(){ ...
true
b5c118cd1ab2325c01c8735d4963efd592891023
JavaScript
devleague/prep-js-functions
/tests/functions.spec.js
UTF-8
10,035
2.96875
3
[]
no_license
'use strict'; const Test = require('tape'); const Util = require('util'); const Fs = require('fs'); const Vm = require('vm'); const Path = require('path'); let filePath = Path.resolve(__dirname, './../functions.js'); const IndexFileRaw = Fs.readFileSync( filePath, { encoding : 'utf8' }); let sandbox = {}; const Scri...
true
4e15ad4d1a120f706b318f5f4edafe5644b40de3
JavaScript
ErosMLima/exercicios-web
/função/arrowFunction1.js
UTF-8
516
4.1875
4
[]
no_license
// function arrow sempre será uma function anônima. // função normal let dobro = function(a) { return 2 * a } // reescrevendo a função com arrow function "=>" dobro = (a) => { return 2 * a } dobro = a => 2 * a // return implícito console.log(dobro(Math.PI)) //------------------------OUTRO EXEMPLO -...
true
68f4104bbef09cad7c88b90b333d4c155575fbae
JavaScript
kveola13/verbose-octo-parakeet
/14-OOP/starter/script.js
UTF-8
3,104
3.625
4
[]
no_license
"use strict"; const Person = function (firstName, birthYear) { this.firstName = firstName; this.birthYear = birthYear; }; const ola = new Person("Ola", 1992); console.log(ola); const jens = new Person("Jens", 2017); const john = new Person("John", 1920); console.log(jens, john); console.log(ola instanceof Person...
true
3856672add8d302e7f106cce07232d2149047d97
JavaScript
mruffalo/fourfront
/src/encoded/static/components/browse/components/SortController.js
UTF-8
8,021
2.5625
3
[ "MIT" ]
permissive
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import url from 'url'; import queryString from 'querystring'; import _ from 'underscore'; import { isServerSide, Filters, navigate, object } from './../../util'; export class SortController extends React.Component { static propTypes = ...
true
22877f0caede192d960171015e88533180e73cf8
JavaScript
AlbertoBujan/practicaBack
/app/controllers/api/get-data.js
UTF-8
420
3.109375
3
[]
no_license
"use strict"; const url = "https://anapioficeandfire.com/api/characters/583"; async function getLordFromHouse(url) { const houseResponse = await fetch(url); const house = await houseResponse.json(); const lordResponse = await fetch(house.currentLord); const lord = await lordResponse.json(); console.log(lor...
true
e5d6a9609c90b05d9c9bcb0ff36b1329171a7365
JavaScript
mohhaidir/code-warz-kyu-me
/CountTheDigit.js
UTF-8
1,201
4.59375
5
[]
no_license
/* Take an integer n (n >= 0) and a digit d (0 <= d <= 9) as an integer. Square all numbers k (0 <= k <= n) between 0 and n. Count the numbers of digits d used in the writing of all the k**2. Call nb_dig (or nbDig or ...) the function taking n and d as parameters and returning this count. #Examples: n = 10, d = 1, th...
true
7358b2782618f7edcc42f73ea95882e2801f64f6
JavaScript
mstaessen/chi
/assets/js/messages/twitter.js
UTF-8
2,881
2.515625
3
[]
no_license
var twitterTemplate = Hogan.compile( '<div class="twitter" id="message-{{id}}">\n\ <img src="http://www.gravatar.com/avatar/?d=mm&s=72" alt="profile picture" />\n\ <h4>{{{from}}}</h4>\n\ <div class="message">{{{content}}}</div>\n\ <div class="labels">{{#labels}}<a href="#" class="label" data-label="labe...
true
45c2621a4a66485ab1519999890913f5c5f8b8ca
JavaScript
PeteSchuster/pete-schuster-react
/src/containers/App.js
UTF-8
1,588
2.5625
3
[]
no_license
import React, { Component } from 'react' import PageHeader from '../components/layout/PageHeader' import PageFooter from '../components/layout/PageFooter' import Routes from '../routes' import Triangle from '../components/svgs/Triangle' import Circle from '../components/svgs/Circle' import Star from '../components/svgs...
true
dcda0e5887d6ad15e18b6bea56065691712b5455
JavaScript
yu423358812/map-demo
/src/pages/home/store/reducer.js
UTF-8
740
2.625
3
[]
no_license
import { fromJS } from 'immutable'; import * as constants from './constants'; const defaultState = fromJS({ lat: 40.6944277, lng: -73.9845459, mLat: 40.6944277, mLng: -73.9845459, addressName: '', isInfoOpen: true }); export default function home(state = defaultState, action){ switch(action.type) { case co...
true
4461dbc60a3c7eab4684838b58f752de13e67b98
JavaScript
matthewpoletin/mountainpier-web
/src/service/authService.js
UTF-8
2,652
2.75
3
[]
no_license
"use strict"; import { get, post, patch, del } from "./../util/http-utils"; /** * Class for request on auth * @author Matthew Poletin */ class AuthService { /** * login - Authorizes user in web application * @param {object} credentials - Data of user * @param {string} credentials.username - Username of use...
true
5a119839143a76b110eb68a7a27e080259d78efd
JavaScript
akshitagour1/paper
/paper.js
UTF-8
671
2.65625
3
[]
no_license
class Paper { constructor(x,y) { var options ={ isStatic:false, 'restitution':0.3, 'friction':0, 'density':1.2 } this.body = Bodies.rectangle(x, y, width, height, options); this.width = 75; this.height = 75; this.image = loadImage("paper.png"); World.add(wor...
true
35a661c118626448dd4f5c30b93140468de2d19e
JavaScript
plack2/OCR
/OCR.js
UTF-8
1,718
3.109375
3
[]
no_license
function myFunction() { var uploder = DriveApp.getFolderById("画像をアップロードするフォルダのIDを入力") var files = uploder.getFiles() //ファイル一覧 var arr = []; while(files.hasNext()){ var loadFile = files.next(); arr.push({name:loadFile.getName(), id:loadFile.getId()}); //連想配列に格納 } //連想配列をソート arr.sort(function...
true
a0737b4f4970114d391294bfa60a55c7be95b7fe
JavaScript
EricaBabb/discover-job-search
/client/src/utils/localStorage.js
UTF-8
928
2.515625
3
[ "MIT" ]
permissive
// export const getSavedJobIds = () => { // const getSavedJobIds = localStorage.getItem('saved_jobs') // ? JSON.parse(localStorage.getItem('saved_jobs')) // : []; // return getSavedJobIds; // }; // export const saveJobIds = (jobIDArr) => { // if (jobIDArr.length) { // localStorage...
true
3713dd927113fd2d2d232532d003e331b60b26cd
JavaScript
agco/cultivator
/lib/migrator.js
UTF-8
6,607
2.71875
3
[]
no_license
/** * This is a wrapper around mongodb-migrations so it can function the way we would like it to. * * The version to migrate to is stored in config.migrations.currentVersion * */ 'use strict' // dependencies const _ = require('lodash') const mm = require('mongodb-migrations') const path = require('path') const Pr...
true
74a96a1a72d38a19f15e60fdc8ac2589daa1134f
JavaScript
Harsha-Nandini-konduri/arcadegame
/js/app.js
UTF-8
2,291
3.15625
3
[]
no_license
// position of Enemies in the game var Enemy = function(x, y, spd) { this.x = x; this.y = y; this.spd = spd; this.sprite = 'images/enemy-bug.png'; }; //Fixing the position of player var Player = function(x, y) { this.x = x; this.y = y; this.sprite = 'images/char-horn-girl.png'; }; var player = new Player(...
true
18747d47b1a0f03a46037b232cccd9cf2fd31f78
JavaScript
AnaisDias/LAIG
/TP2/reader/primitives/Plane.js
UTF-8
1,795
3.359375
3
[]
no_license
/** * Plane CGFnurbsObject object, which is a NURBS surface of order 1 on U and V * * @constructor * @param scene {CGFscene} - Scene object will be drawn on * @param parts {int} - Parts on U and V */ function Plane(scene, parts) { CGFnurbsObject.call(this,scene); this.parts = parts; this.obj = nu...
true
6fe477e01ce4e90ae91584976c9b47dad529211f
JavaScript
TimeNovaData/redesign-ezaligner
/assets/js/modules/dropdown.js
UTF-8
1,295
2.796875
3
[]
no_license
export default function menuDropdown(){ const telaMobile = window.matchMedia('(max-width: 1024px)') const menuDropdown = document.querySelectorAll('[data-dropdown]'); menuDropdown.forEach((menu)=>[ ['click', 'touchstart'].forEach((eventoUsuario)=>{ menu.addEventListener(eventoUsuari...
true
4defec483a90d375c9346c4a88416deecfed087a
JavaScript
wangweiyi722/taskmaster
/client/src/components/TaskCreate.js
UTF-8
1,831
2.578125
3
[]
no_license
import React from 'react'; import {Field, reduxForm} from 'redux-form'; import {connect} from 'react-redux'; import {selectEvent} from '../actions'; import {createTask} from '../actions'; class TaskCreate extends React.Component { //renderInput is passed an argument with various properties whenever it is called wi...
true
ce0bce195b1fd7295dbe9b121341e35d1587a1d5
JavaScript
daniloborozan1998/SingUp
/SingUp/VisualBusiniessCards-master/VisualBusinessCards/script/login.js
UTF-8
635
2.546875
3
[]
no_license
const menu = document.querySelector('#mobile-menu'); const menuLinks = document.querySelector('.navbar__menu'); const signUpButton = document.getElementById('signUp'); const signInButton = document.getElementById('signIn'); const container = document.getElementById('container'); signUpButton.addEventListener('...
true
7fa19e1e53857c8346379690613cbec79c0146f1
JavaScript
jsantos17/NCrypto
/server/js/scriptPolling.js
UTF-8
616
2.625
3
[ "MIT" ]
permissive
var button; var destination; var origin; $(document).ready(function(){ button=$('#btn_submit'); destination=$('#destination'); origin=$('#origin'); button.click(create); origin.focus(); $('#form_container').bind("keypress", filterKeys); }); function filterKeys(e) { if(e.which == 13) { ...
true
4b4c2b8b94825bf09f45dc5f53296b718c853552
JavaScript
michaeljmcd/sheepshead
/routes.js
UTF-8
1,119
2.5625
3
[ "BSD-3-Clause" ]
permissive
'use strict'; var User = require('./user/user').User, Room = require('./room/room').Room, userRepository = require('./user/user-repository'), roomRepository = require('./room/room-repository'), util = require('./util/utility-functions'), parse = require('co-body'), winston = require('winston')...
true
d702e4949acc5ff8b327808eb89bcb262a96658c
JavaScript
ChipCastleDotCom/meteor-seconds-conversion
/seconds-conversion.js
UTF-8
924
2.984375
3
[ "MIT" ]
permissive
SecondsConversion = { duration: function(seconds) { var converted = '0:00'; try { if (!seconds || isNaN(parseFloat(seconds))) { throw new Error('requires a positive integer'); } var SECONDS_PER_MINUTE = 60; var SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE; var remainder = ...
true
f7902f926d2c5b51eca3440acff26f0dd5e8e571
JavaScript
adminproac/react-ShowGifsGIPHY
/src/helpers/getArrGifs.js
UTF-8
472
2.5625
3
[]
no_license
export const getArrGifs =async(Categoria)=> { const url = `https://api.giphy.com/v1/gifs/search?q=${ encodeURI(Categoria) }&limit=10&api_key=3enA7rbUd95herOu2DmFinlXSOdi2Box`; const resp = await fetch(url) const {data} = await resp.json(); const ArrGifs = data.map((x)=>{ return { ...
true
1bbd9d5df98a664a210a301326a9fbd45f6a646c
JavaScript
TsvetDimitrov/JS-Softuni-Advanced
/JS-Softuni-Applications/Exam Preps/Movies/src/notification.js
UTF-8
597
2.984375
3
[ "MIT" ]
permissive
const succBox = document.getElementById('successBox'); const errBox = document.getElementById('errorBox'); export function successBox(message) { succBox.innerHTML = `<p class="notification-message" id="successBox">${message}</p>`; succBox.style.display = 'block'; setTimeout(() => { succBox.style...
true
b08b2d5f9a692b0e4a0701070ea14b8b5ca821aa
JavaScript
ChildeRowland/nycda_angularjs_102
/review/src/app/testFilters/testFilters.controller.spec.js
UTF-8
1,761
2.703125
3
[]
no_license
(function() { 'use strict'; // Controller TESTS describe('Test TestFilterController', function() { var toTest; beforeEach(module('review')); beforeEach(inject(function(_$controller_, _NAMELIST_) { toTest = _$controller_('TestFilterController', { NAMELIST: _NAMELIST_ }); })); ...
true
d0a79ea8bcd847e1a4b6c3f6f21184c5664947af
JavaScript
ishvar99/react-filter
/src/App.js
UTF-8
3,563
2.703125
3
[]
no_license
import React, { useState } from "react" import "./App.css" import "bootstrap/dist/css/bootstrap.min.css" import CardComponent from "./Card" import NavbarComponent from "./Navbar" import { Search } from "./Search" import Filters from "./Filters" function App() { const cards = [ <CardComponent key="0" t...
true
22fbeaf1c43a077fbb4852de3c7929ca45b0a55c
JavaScript
abstractfactory/labs
/qml/spa/ch01/spa.js
UTF-8
885
2.515625
3
[ "MIT" ]
permissive
"use strict"; /*global spaSliderLoader */ var configMap = { extended_height: 434, extended_title: "Click to retract", retracted_height: 16, retracted_title: "Click to extend", template_url: "SpaSlider.qml" }, toggleSlider, onClickSlider, initModule; /* * Extend ...
true
1b68e1f21081169288562e47d294243dc700b45b
JavaScript
CUBRID/node-cubrid
/test/Timezone.js
UTF-8
28,346
2.75
3
[ "MIT" ]
permissive
'use strict'; const expect = require('chai').expect; const Timezone = require('../src/utils/Timezone'); const testSetup = require('./testSetup'); // const CAS = require('../src/constants/CASConstants'); // test the Timezone module's function or method describe('Timezone', function() { describe('format', function() ...
true
681e494a0233be0cadfbe36bbdc57bd16ff961be
JavaScript
giovanninp/node-nopique
/src/controllers/Athletes/AhtletesController.js
UTF-8
1,584
2.5625
3
[]
no_license
const Athlete = require('../../models/Athlete'); const locationPoint = require('../../utils/locationPoint'); // const thereIsAtDB = require('../utils/thereIsAtDB'); module.exports = { async index (req,resp) { const athletes = await Athlete.find(); return resp.json(athletes); }, async ...
true
3be9ae11bb6b4155655428a1d9825d5020d099b9
JavaScript
ksr229/protractor
/04_first_protractor_test.js
UTF-8
1,342
3.140625
3
[]
no_license
describe('Find and enter first number', function () { it('Open Test Website', function () { console.log("Starting the test"); browser.manage().window().maximize(); browser.get('https://juliemr.github.io/protractor-demo/'); browser.sleep(4000); element(by.model("first")).sendK...
true
cc3d40514f096c426bb9e9b2b42e44d54fe2e06d
JavaScript
Anna-Dominika1/JS
/2_module/Practik-work 2/js/task2.js
UTF-8
136
3.296875
3
[]
no_license
// const name = "Василь"; // const hello2 = function(name) { // console.log(`Привіт,${name}`); // }; // hello2();
true
dece06f6b68146e323eb96004825db9028d0f86f
JavaScript
yang12318/WeekDay
/pages/detail/detail.js
UTF-8
6,985
2.515625
3
[]
no_license
// pages/detail/detail.js var mailId = -1; let ip = 'https://wkdday.com:8080/weekday/mail/mail' var attachip = 'https://wkdday.com:8080/weekday/mail/attachment' let downloadip = 'https://wkdday.com:8080/weekday/mail/attach' let attachDetailip = 'https://wkdday.com:8080/weekday/mail/attachment' Page({ /** * 页面的初始数...
true
b7997cf82ec29238d2dbee44bf536b3b62c7c751
JavaScript
Ankygurjar/mern-starting--blog
/client/src/Components/AddPost.js
UTF-8
1,530
2.625
3
[]
no_license
import React, {Component} from 'react'; import axios from 'axios' export default class AddPost extends Component{ constructor(){ super(); this.state = { title:'', category: '', description: '' } this.onSubmit = this.onSubmit.bind(this); this.onChange = this.onC...
true
38f1c267c8df9221560fd405944fdab86c280e9b
JavaScript
tconn89/techdrone
/public/js/waveform.js
UTF-8
1,324
3.453125
3
[]
no_license
var MIN_DOMAIN = 200 var MAX_DOMAIN = 1200 var ctx1 = setup() var smallPI = Math.PI / 100 var F = function(x,t){ var fx = 10* Math.sin((x-t) * smallPI ) + 140 + 10*Math.cos((x-t) * smallPI) return fx } var G = function(x){ var fx = Math.pow(x, 2) + 100 if(x < -10 || x > 10) return 200 return fx } const d...
true
1011a8385ecd508b35d09d8aa79f10adeaec9b8d
JavaScript
ashad912/react-redux-advanced
/server-auth/models/user.js
UTF-8
681
2.625
3
[]
no_license
const mongoose = require('mongoose') const bcrypt = require('bcrypt') const Schema = mongoose.Schema const UserSchema = new Schema({ email: { type: String, unique: true, lowercase: true }, password: { type: String, minlength: 3 } }) UserSchema.pre('save', asyn...
true
966c6fb69aac1a84e26ba459536c6aeb49b00f9c
JavaScript
Olli-Archives/express-mongoose-quiz
/lib/routes/colors.js
UTF-8
1,124
2.640625
3
[]
no_license
const Color = require('../models/Color'); const { Router } = require('express'); module.exports = Router() .post('/', (req, res, next) => { const { name, hex, red, green, blue } = req.body; Color .create({ name, hex, red, green, blue }) .then(created=>{ res.send(creat...
true
f6b89a6dfc15bdc5f8009065d7128b44ff5ac012
JavaScript
aliraza944/Hacker-Rank-Questions
/sparseArrays.js
UTF-8
537
3.71875
4
[]
no_license
const input = ["ab", "ab", "ca", "abc"]; const query = ["ab", "ca", "abc"]; // result [2, 0, 0] const matchingStrings = (input, query) => { let result = []; for (let k = 0; k < query.length; k++) { result[k] = 0; } for (let i = 0; i < query.length; i++) { for (let j = 0; j < input.length; j++) { ...
true
5e8315c5d65af2eff8f122bfd424e644832a08a0
JavaScript
baojie223/leetcode-js
/all/111.二叉树的最小深度.js
UTF-8
726
3.390625
3
[]
no_license
/* * @lc app=leetcode.cn id=111 lang=javascript * * [111] 二叉树的最小深度 */ // @lc code=start /** * Definition for a binary tree node. * function TreeNode(val) { * this.val = val; * this.left = this.right = null; * } */ /** * @param {TreeNode} root * @return {number} */ var minDepth = function (root) { ...
true
f799b6a3d9eee19bda3f751e7c31a93de1871e8c
JavaScript
linkedv0id/Sticky
/frontend/front-end/src/components/NoteForm.js
UTF-8
1,492
2.578125
3
[]
no_license
import React, { Component } from 'react'; import { notes } from '../data/notes.json' class NoteForm extends Component { constructor (props) { super(props); this.state = { chart_id:this.props.chartID, notes_text:[] }; this.handleInput = this.handleInput.bind(this); this.handleSubmit = ...
true
c955e1a4ca4c67a5a2fa454e06eb36b7626b4389
JavaScript
duanyoujia/1400310501messagewall
/config/db_handle.js
UTF-8
1,739
2.625
3
[]
no_license
var db_conf = require('./db_conf'); var connection = db_conf.getConnection(); /** * 查询数据接口 * @param req * @param res */ exports.getData = function (req, res) { var sql = "select * from tb_user"; var data = {}; /*新建对象*/ connection.query(sql, function (err, rows, fields) { /*rows为查询出的数据,可通过rows...
true
82cc0d913ad7d67e10c63da4642a14b705cf31e5
JavaScript
kopnik-org/kopnik-client
/src/bottle/bottle.spec.js
UTF-8
1,462
2.53125
3
[]
no_license
import Bottle from "bottlejs"; class $Main { constructor(small) { // console.log("constructor Main", small) this.a = "aaaa" this.small = small } } class $Small { constructor() { // console.log("constructor Small") this.b = "bbb" } } let $function = function () ...
true
3b324d0325206ac87ac0832630a938ff30080ada
JavaScript
yangyaochang/outco_teachable_practice
/warm_up/wordLadder.js
UTF-8
2,057
4.375
4
[]
no_license
// Identify if there is only one letter difference between two input strings function oneDiffenerce(word1, word2) { let count = 0 for (let i = 0; i < word1.length; i++) { if (word1[i] !== word2[i]) { count++ } if (count > 1) {return false} } return (count === 1) ? t...
true
2b82f8e3e29d68d7def777e26b41efeceb2443be
JavaScript
HexHelix/EncryptoMed-Frontend
/src/component/Scan.js
UTF-8
598
2.609375
3
[ "MIT" ]
permissive
import React ,{useEffect,useState} from 'react' export const Scan = (data,qrscan) => { const [found,setFound] = useState({info:'',bool: true}); useEffect (()=>{ if(qrscan!==''){ setFound({info:'0',bool: false}); data.forEach(element => { if (element[2] === qrsca...
true
a468ebf91b3c79b1784beadb8967141c024f294d
JavaScript
JordanLow/Diot
/game_files/blackjack.js
UTF-8
1,980
3.28125
3
[]
no_license
const Game = require('./game.js'); class Blackjack extends Game.game { constructor(){ super("blackjack"); this.deck = []; this.createDeck(); } start() { return message.channel.send("A game of BlackJack is starting!") } shuffle(array) { let currentIndex = array.length, temporaryValue, randomIndex; ...
true
495ca90ffa9899e361461cc2ff930298ede0f7c9
JavaScript
khacpv/altp-server
/sock/sock.js
UTF-8
2,386
2.671875
3
[ "MIT" ]
permissive
var socApp = { io: {}, app: {}, numUsers: 0 }; socApp.init = function(app, io) { this.io = io; this.app = app; this.io.on('connection', function (socket) { console.log('an user connected'); var addedUser = false; socket.on('test', function (data) { var cou...
true
5bf27ed40d8e6f8d6f836b43ea0cf9c323f79147
JavaScript
Lidemy/mentor-program-3rd-ChihYang41
/homeworks/week24/fe/hw1/reducers/getAllPosts.js
UTF-8
1,676
2.546875
3
[]
no_license
import { GET_ALL_POSTS, ADD_POST, DELETE_POST } from '../action'; const initState = { allPosts: [], isLoadingGetAllPosts: false, isLoadingDeletePost: false, isLoadingAddPost: false, getAllPostsError: null, deletePostError: null, addPostError: null, }; // reducers export default function allPostsReducer(...
true
ba28d37a5387240e4dd5110ba2e7cbdc4f2d5a08
JavaScript
ebi-gene-expression-group/scxa-gene-search-form
/__test__/LabelledSelect.test.js
UTF-8
2,904
2.796875
3
[]
no_license
import React from 'react' import renderer from 'react-test-renderer' import { shallow } from 'enzyme' import Select from 'react-select' import LabelledSelect from '../src/LabelledSelect' import * as species from './utils/species' const props = { name: `Species`, topGroup: species.getRandomSet(), bottomGroup: s...
true
3754e42a8fdc12f17914978713bcea0a08b7dbff
JavaScript
maithiquynhnhu/test
/public/js/home/slide.js
UTF-8
1,933
3.359375
3
[]
no_license
var slideIndex=0; // KHai bào hàm hiển thị slide function showSlides() { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.len...
true
2c4782cb48a2f262c01a1210298d393b2d194d87
JavaScript
Perfect-Server-Swift-LearnGuide/Today-News-Admin
/webroot/js/look_article.js
UTF-8
2,001
2.578125
3
[ "Apache-2.0" ]
permissive
$(function(){ // 总页数 var page = Math.ceil(parseInt($("#article_total").attr("value")) / 6) // 初始化分页插件 laypage({ cont: 'page', //容器。值支持id名、原生dom对象,jquery对象, pages: page, //总页数 skip: false, //是否开启跳页 skin: '#FFA000', groups: 5, //连续显示分页数 first: '首页', //若不显示,设置false即可 last: '尾页', //若不显示,设置false...
true
f633737362be00fd1450e09645abc23fd7467869
JavaScript
leo-3108/mi-gdw-wglebensmittelplanung
/_arbeitsblaetter/Gedrath/AB1/grundlagen_javascript_2.js
UTF-8
518
3.109375
3
[]
no_license
/** * TH Koeln - Campus Gummersbach * Grundlagen des Web (Medieninformatik Ba.) * * @author Finn Nils Gedrath * @arbeitsblatt 1 */ // Ausgabe des Namens console.log("Finn Nils Gedrath"); // Bewertungs-Definition const max_bewertung = 4; let bewertung = 0; let anzahl_bewertung = 0; // Logging const log = functi...
true
78733f797d1ed3fd6998c491202b034258c3c515
JavaScript
bitcoin-api/bitcoin-api
/2-api/utils/business/getIfApiIsOnData.js
UTF-8
2,412
2.578125
3
[ "BSD-3-Clause" ]
permissive
'use strict'; const { utils: { stringify, redis: { doRedisRequest, // getClient, }, javascript: { jsonEncoder } }, constants: { redis: { keys: { cacheOnAndOffStatus } } }...
true
a810b54b73b48f1cc03ec17223c465d4b264d0d9
JavaScript
MujunZ/reactjs.org
/plugins/gatsby-remark-codepen-examples/index.js
UTF-8
1,771
2.75
3
[ "CC-BY-4.0" ]
permissive
const {existsSync} = require('fs'); const {join} = require('path'); const map = require('unist-util-map'); const CODEPEN_PROTOCOL = 'codepen://'; const DEFAULT_LINK_TEXT = 'Try it on CodePen'; module.exports = ({markdownAST}, {directory}) => { map(markdownAST, (node, index, parent) => { if (!directory.startsWit...
true
d97c087d65e9f256987e96c1499546d8854bfe99
JavaScript
karen1994/nimble
/views/app/js/salidaMoto.js
UTF-8
6,843
2.796875
3
[]
no_license
function salidaMoto() { var connect, form, response, result, numConsecutivo, numConsecutivoDet, identMoto, autoridadSalMoto, oficEntSalMoto, fecSalMoto, oficioSalMoto, tomoSalMoto, folioSalMoto, cedPersona, nomPersona, ape1Persona, ape2Persona; //Parametros capturados del formulario de HTML numConsecutivo= _...
true
524086dcfce7d55cf60283189ad95be0327a90a5
JavaScript
Haroon-jay/Website-MyMoviefy
/public/js/navbar.js
UTF-8
727
2.703125
3
[]
no_license
var getElementID = function(id){ return document.getElementById(id); } $(document).ready(function(){ $('.menu-toggle').click(function(){ $('.menu-toggle').toggleClass('active') $('nav').toggleClass('active') }) }) function openSearch() { document.getElementById("myOverlay").style.heigh...
true
99acb5145fbc2513e746e6af27e6639f7c2cfaf6
JavaScript
nasser85/teacher-creature
/browser/js/common/factories/UtilsFactory.js
UTF-8
330
2.5625
3
[]
no_license
app.factory('UtilsFactory', function() { var utilsFactory = {}; utilsFactory.init = function(user) { window.scroll(0,0); document.body.style.backgroundImage = ""; if (user) { document.body.style.backgroundColor = 'white'; } else { document.body.style.backgroundColor = 'black'; } } return utilsF...
true
87bf6ef950b7fc7ee816cfaa507f2178e3ab09bf
JavaScript
kay-ltu/LTU-reboot-Digital-Coding
/module-3/scripts/scope.js
UTF-8
354
3.953125
4
[]
no_license
// global scope - available to everything //local scope - only available to the function that called it, unless you return the value. var globalScope = 'GLOBAL SCOPE' console.log( globalScope); function scope () { var localScope = 'LOCAL SCOPE'; console.log(globalScope); return localScope; } var scopeValue = sc...
true
39fd908d9dc2a1a259e4cf224c5918d505521a2b
JavaScript
Miangame/miangame.github.io
/practicas/DWEC/Tema 3. Objetos predefinidos en javaScript/DNIExpresionesRegulares/js/validarDni.js
UTF-8
1,747
3.828125
4
[]
no_license
/** * Realiza la comprobación del dni. * Para ello, crea un formulario con tres campos: nombre, dni y fecha de nacimiento. * Al perder el foco de la caja de texto del DNI se realizará la comprobación. Aparecerá un mensaje (Derecha o abajo) en rojo, indicando: * formato incorrecto * letra incorrecta * introduce dn...
true
23f2b0a3927f845fe0917162d3c08f3061639672
JavaScript
baidu/BIPlatform
/designer/src/main/resources/public/report-ui/src/core/xjschart/src/adapter.js
UTF-8
10,676
2.59375
3
[ "Apache-2.0" ]
permissive
/** * adapter of xjschart * Copyright 2012 Baidu Inc. All rights reserved. * * @file: JS图的适配 * @author: sushuang(sushuang) * @depend: xutil */ (function() { var xutil = window.xutil; var X = window.xjschart; var R = window.Raphael; var util = X.util = {}; var xobject = xutil.objec...
true
b61f0b02cf02ff538d310590a68690c70e62ab25
JavaScript
Hernandezgg/AplicationPhone
/src/js/validaciones.js
UTF-8
1,111
3.109375
3
[]
no_license
function soloLetras(e){ key = e.keyCode || e.which; tecla = String.fromCharCode(key).toLowerCase(); letras = " áéíóúabcdefghijklmnñopqrstuvwxyz"; especiales = "8-37-39-46"; tecla_especial = false for(var i in especiales){ if(key == especiales[i]){ tecla_especial = true; ...
true