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
d42c18bd8c5fcd98fccc7d6e1fa047a87aec15b8
JavaScript
mike881205/liri-node-app
/liri.js
UTF-8
1,342
3.234375
3
[]
no_license
require("dotenv").config(); // ================================================================ // Switch Statement to Handle user input // ================================================================ // Assign a variable for user input command let command = process.argv[2] switch (command) { // If the comma...
true
5f06d61138fb5205a4c7ad72c09f76c932a199fd
JavaScript
lablup/deasync
/test.js
UTF-8
1,178
3.015625
3
[ "MIT" ]
permissive
var deasync = require('./index.js'); var cp = require('child_process'); var http = require('http'); var exec = deasync(cp.exec); var sleep = deasync(function (timeout, done) { setTimeout(done, timeout); }); var request = deasync(function (url, done) { http.get(url, function (res) { res.on('error', done); ...
true
42f761349762468dd4b912265948944a58606671
JavaScript
hoangbap010595/admintasiatemplate
/public/js/validateLoginData.js
UTF-8
592
2.875
3
[]
no_license
function validateData() { if( document.getElementById( "email" ).value.length != 0 ) { if( document.getElementById( "password" ).value.length != 0 ) { return true; } // end if else { alert( "El campo 'Contraseña' es obligatorio." ); do...
true
a257530f3456a4b6fb5ba864c0346e1d039523fe
JavaScript
cjose26/readMeGenerator
/index.js
UTF-8
2,665
3.140625
3
[ "MIT" ]
permissive
// Packages needed to run app const inquirer = require('inquirer'); const fs = require('fs') const generateMarkdown = require('./utils/generateMarkdown.js') // Array of questions used to build readme const questions = [ { name: "title", message: "What is the title of your project?", ...
true
15cdb0fd5a86937b70accdf74f9f37ff409260f5
JavaScript
craig-o-curtis/angularjs-es6-angular-patterns
/client/app/components/bookmarks/bookmarks.controller.js
UTF-8
1,861
2.8125
3
[ "Apache-2.0" ]
permissive
class BookmarksController { // declare locals constructor(BookmarksModel, CategoriesModel) { 'ngInject' // ABOVE THE FOLD // this.currentBookmark; // this.bookmarks; // this.deleteBookmark; // defined in $onInit // ABOVE THE FOLD this.BookmarksModel = Bo...
true
e724368a679ff9c9409842d9bc425da46f0665bd
JavaScript
Calterat/team-profile-generator
/lib/Classes.js
UTF-8
1,323
3.046875
3
[ "MIT" ]
permissive
const Employee = require('./Employee'); const Manager = require('./Manager'); const Engineer = require('./Engineer'); const Intern = require('./Intern'); const team = []; // this converts the original array from the inquirer packages and filters them into their prototype counterpart so the inherited functions operate...
true
017ea574729e2cab5eaf8f1bf6c44e41d54fff97
JavaScript
li-lihua/Jquery-Toast
/js/jquery.toast.js
UTF-8
2,247
2.671875
3
[]
no_license
/* Author:254359015@qq.com * Github: https://github.com/li-lihua/Jquery-Toast.git * Date:2019-03-26 * Desc: Jquery仿原生Android Toast提示插件 * Use: * $(this).showToast("用户名不能为空!");//默认隐藏时间2000 * $(this).showToast("用户名不能为空!", 50000); */ ;(function ($) { $.fn.showToast = function (msg, time) { var id = uu...
true
af9b57c5dff2cb5ee863a4547aa569f45fe247e5
JavaScript
aboud79/woocommerce-product-designer-tools
/pdp-integration/assets/frontend/js/pdp.js
UTF-8
659
2.53125
3
[ "Apache-2.0" ]
permissive
jQuery( document ).ready( function($) { $('a[class=zip-design]').each(function(){ $(this).click(function(){ var url_zip_design = $(this).data('href'); $.ajax({ url: url_zip_design, type: 'GET', beforeSend: function(_res) { if(typeof _res == 'object') { var res = _res; } else { ...
true
56a4cf6107acba4f7005e23e72018e94a5fcfec3
JavaScript
tublitzed/picture-smith
/app/assets/js/reducers/phrase.js
UTF-8
325
2.75
3
[]
no_license
// Remember here that this is only the phrase part of the state, // not the entire state object. const phrase = (state = '', action) => { switch (action.type) { case 'SUBMIT_PHRASE': return state; case 'CHANGE_PHRASE': return action.phrase; default: return state; } } export default ph...
true
285b0ed21a00e1c78fab1522c71a9049e721497e
JavaScript
yuhanrui/gerenbuke
/script/script.js
UTF-8
1,744
2.984375
3
[]
no_license
var imgs =["011.jpg","012.jpg","013.jpg","014.jpg","015.jpg","016.jpg","017.jpg","018.jpg","019.jpg"]; var xa = 0; var xb = 1; var xc = 2; var xd = 3; var xe = 4; var xf = 5; var xg = 6; var xh = 7; var xi = 8; function timea(){     xa++; if(xa==9){ xa=0; }     document.getElementById("a46")...
true
f25ec1e17d9cf201432b9718b07ce2b83c819b48
JavaScript
doikatsuya/hangman
/main_02.js
UTF-8
356
3.1875
3
[]
no_license
"use strict"; //関数 function showAd(message="AD"){//仮引数 console.log("------------"); console.log(`---- ${message} ----`); console.log("------------"); } showAd("Header AD");//実引数 console.log("Tom is great!"); console.log("Bob is great!"); showAd(); console.log("Steve i great!"); console.log("Rich is great!"); s...
true
a55d179d27aeda67a12069420ccf6dea88dfd2ab
JavaScript
gonefuture/mycloud
/news/src/main/resources/static/manager/js/select.js
UTF-8
704
2.90625
3
[]
no_license
$(function() { //加载第一个栏目 LoadFirst(); //使用async/await语句的fetch async function LoadFirst() { try { // 注意这里的await语句,其所在的函数必须有async关键字声明 let response = await fetch('/football/dict/list?pid=15000'); let data = await response.json(); $("...
true
0e0431ce437aa6479c99817f7879e91c1bcbc618
JavaScript
ausyau/connect-four
/connect4.test.js
UTF-8
745
3.25
3
[]
no_license
const WIDTH = 7; const HEIGHT = 6; it('make the board correctly', function() { // ... let board = [] makeBoard(); expect(board.length).toEqual(HEIGHT); expect(board[0].length).toEqual(WIDTH); expect(board.toEqual([[null, null, null, null, null, null, null], [null, null, null, null, nu...
true
b240a5c5539467640736b3b2cd7a99b93bc94087
JavaScript
clazellLS/landgrab
/server/worldManager.js
UTF-8
997
3.109375
3
[]
no_license
'use strict' class WorldManager{ constructor(io){ // the world grid: a 2d array of tiles this.world = [[]]; // size in the world in sprite tiles this.worldWidth = 50; this.worldHeight = 50; } createWorld(){ console.log('creating worlds') for (var x = 0; x < this....
true
719fbe328a09ff0bb1f33590b91fdb7c854f68d1
JavaScript
shovon/old-site
/twittersearch/script/twitterReader/AJAX.js
UTF-8
910
2.515625
3
[]
no_license
(function(window, undefined) { /** * The twitterReader namespace. */ if (window.twitterReader === undefined) window.twitterReader = {}; /** * The twitterReader.AJAX namespace. */ if (window.twitterReader.AJAX === undefined) window.twitterReader.AJAX = {}; /** * Retrieve a JSON file ...
true
5199cf03c817a661c5da2ecf9affb19bcbe59682
JavaScript
Toastacular/Toastacular.github.io
/Javascripts/Source/Places/place034.js
UTF-8
4,432
2.953125
3
[]
no_license
// Place: Meet Mrs Granger at the Wild Ranges function ShowPlace34(type) { var md = WritePlaceHeader(); var perMG = findPerson("MrsGranger"); var herName = perMG.getPersonName(); var clv = perMG.getCharmedLevel(); var sDH = clv == 1 ? "Dear" : "Hon"; perMG.place = 177; // Send her home perMG.other = 2.2; // ...
true
ba63623fe98cd608f5a786062556dca33b8e160a
JavaScript
Priyankasharma181/Loop
/forin.js
UTF-8
298
3.703125
4
[]
no_license
// for in loop let name=["komal","shweta","rani","swati","mahi","shanti","sarmistha"] for(let lname in name){ console.log(name[lname]); } // for of loop // // let name=["komal","shweta","rani","swati","mahi","shanti","sarmistha"] // // for(let lname of name){ // // console.log(lname); // }
true
b4059895be0eeefd291e5509881faac40218792b
JavaScript
thaiscav/Js_Json-Hospitalisations
/scripts/hospitalisations.js
UTF-8
7,432
2.765625
3
[]
no_license
//Thais Cavalcanti e Souza var dadosJason; var tab,list1 , codeEtab, list2; var strContentList,strContentList2,strContentTab; // Fermer table function fermerTab() { document.getElementById("tab").innerHTML = ""; strContentTab= ""; document.getElementById("container5-alert").innerHTML = ""; }// fin fermer ...
true
80f3477a37c5151dabaa5cc9a4f523609d849839
JavaScript
CastroLuis94/Anime-Final-Searcher
/frontend/javascript/app.js
UTF-8
2,509
2.875
3
[]
no_license
'use strict'; var Anime = { crear_letra_toggle: function($letra) { $letra.on('click', function() { var $this = $(this); if (!$this.hasClass('is-active')) { $('li.letra.is-active').toggleClass('is-active'); $this.toggleClass('is-active'); }...
true
ac257b44df8891ad7e82060291e95879e4f78c83
JavaScript
JKCHacking/PTCC_SCRIPTS
/python/Web/hr_ptcc_project/employee_profile/static/employee_profile/js/index.js
UTF-8
5,598
2.71875
3
[]
no_license
$(document).ready(function() { $("#add-employee-button").click(function(){ $("#addEmployeeModal").modal("dispose"); $("#addEmployeeModal").modal(); }); $("#employee-input-form").submit(function(e){ e.preventDefault(); var errorFlag = checkUserInput(); if...
true
c685cc84dc01ac28643d8c0aca2ef534443645e5
JavaScript
Serrjik/BezierCurve
/src/Camera.js
UTF-8
1,269
2.6875
3
[]
no_license
// Класс Camera собирает информацию о масштабе и сдвиге в приложении и канвасе. class Camera extends Observer { // Сдвиг от левого верхнего угла. #offsetX #offsetY // Масштаб. #scale constructor () { super() // Сдвиг от левого верхнего угла. this.#offsetX = 0 this.#offsetY = 0 // Масштаб. this.#sc...
true
6c0e077e9074b4b3c7fb278b69f9c79c55e93344
JavaScript
miguelzeph/Django_jquery_ajax_basic
/project/jquery/static/jquery_static/js/script.js
UTF-8
4,974
3.03125
3
[]
no_license
$(document).ready(function () { // By class use "." $('.por_class').text('Por classes "."'); // By ID use "#" $('#por_id').html('<strong>Por ID "#"</strong>'); // By TAG $('h1').text('Por Tag'); // By Attribute $('input[placeholder*=Password]').addClass('highlight'); // CSS select...
true
9382b507de1968690af854748aec3cde858d3757
JavaScript
CICCIOSGAMINO/gravatar-img
/test/gravatarimg.js
UTF-8
9,943
2.6875
3
[ "MIT" ]
permissive
// Node.js - tests of gravatarimg var chai = require('chai'); var expect = require('chai').expect; var gravatarimg = require('../index.js'); describe('Test on Gravatar-img Node.js module.', function(){ // test the md5 hash function describe('md5 hashing', function(){ it('Should return the MD5 hashing of this ...
true
03f293d1a827b02839efacb61758006a14bb8ddc
JavaScript
zhenghuahou/study
/public/js/teleprompter.js
UTF-8
894
2.890625
3
[]
no_license
$(document).ready(function() { $('textarea').focus(); $('form').on('submit', function(event) { event.preventDefault(); var text = $('textarea').val(); var y = 0; if (text == "") { text = "You should probably enter some text next time."; } $('body').css('backgroundColor', '#090919'); $('header ...
true
9106620833917a623bb9a2b902a4280ec2efe1b8
JavaScript
jenkinsci/blueocean-plugin
/jenkins-design-language/test/js/utils/rAf.js
UTF-8
261
2.8125
3
[ "MIT" ]
permissive
// a poor man's polyfill for requestAnimationFrame if (!window.requestAnimationFrame) { window.requestAnimationFrame = (callback) => { setTimeout(() => { if (callback) { callback(); } }, 0); }; }
true
b23216bef36ca5b8338ef22c2a370196f23c07b1
JavaScript
jmarthaller/chinook-frontend
/src/App.js
UTF-8
1,352
2.546875
3
[]
no_license
import React, { useState, useEffect } from 'react'; import './App.css'; import AlbumsContainter from './AlbumsContainer'; import NewAlbumForm from './NewAlbumForm'; function App() { const [albumsState, setAlbumsState] = useState([]) useEffect(() => { const fetchAlbumsOnLaunch = async () => { const resp...
true
361cbfbf068da0e886d88e40b080fdc6ce875ade
JavaScript
fbscott/currell-scott.BYU-I.io
/assets/js/pong.js
UTF-8
9,531
3.609375
4
[]
no_license
/***************************************************************************** * Recreation of the 1970's PONG game. * * Author: Scott Currell * * Adapted from Chris DeLeon's Udemy course: Code Your First Game: Arcade * Classic in JavaScript on Canvas * https://www.udemy.com/code-your-first-game/ *************...
true
020dcf9723642440c528c03673ae2e9eeb7f95e7
JavaScript
pom421/Formation-react
/restaurants/src/HelloWorld.js
UTF-8
864
2.8125
3
[]
no_license
import React, { Component } from 'react'; import PropTypes from "prop-types" class HelloWorld extends Component { constructor(props) { super(props) this.state = { counter: 0 } this.increment = this.increment.bind(this) } increment() { this.setState(prev => { return { counter: this...
true
d6534f0001183c80f3c083e833fb7c6a95a05781
JavaScript
syedarizvi/wikipediaSearch
/js/index.js
UTF-8
1,972
3.078125
3
[ "MIT" ]
permissive
$(document).ready(function() { //when search button is clicked $("#searchBtn").click(function() { //save value in searchbox to this variable var searchObj = $("#searchBox").val(); //wikipedia api url var url = "https://en.wikipedia.org/w/api.php?action=opensearch&search=" + searchObj + "&format=json&c...
true
2ba7855c709fb0cf43381f0bdceec6d74b4f7cbb
JavaScript
Elena-Sergienko/MLH
/helpers/nameRandom.js
UTF-8
288
3.40625
3
[]
no_license
function nameRandom(length) { let chars = 'ABCDEFGHIJKLMHOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for(let i = 0; i < length; i++){ str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; } module.exports = nameRandom;
true
e6b47fa713d8d5224afdd358f47efba5aa73caf3
JavaScript
gonzalowtf/asteroids
/js/bullet.js
UTF-8
577
3.03125
3
[]
no_license
var Bullet = Class.extend({ maxX : null, maxY : null, init: function(x,y,angle){ this.x = x; this.y = y; this.shallRemove = false; this.vel = { x: 5*Math.cos(angle), y: 5*Math.sin(angle) } }, update : function(){ this.prevx = this.x; this.prevy = this.y; if(0> this.x || this.x> this.max...
true
783f4c68e70fc6bcdbf915dfa3275aea362d46ce
JavaScript
krish-17/Enviclean_Backend
/src/database/blogDB.js
UTF-8
2,128
2.53125
3
[]
no_license
const Blog = require('../models/blogPost'); const createBlog = async (blog) => { try { await Blog.create(blog); let response = {}; response.payload = "Blog successfully created"; return {status: "success", payload: response['payload'], message: "Blog creation success."} } catch ...
true
5f140edf6b9495661b46a8a267d91560d9773c7d
JavaScript
MCVNick/my-blog-thing
/src/App.js
UTF-8
746
2.765625
3
[]
no_license
import React, { Component } from 'react'; import axios from 'axios' import './App.css'; class App extends Component { constructor() { super() this.state={ blogs: [] } } getBlogs() { axios.get(`/api/blogs`) .then(res => { this.setState({ blogs: res.data }) ...
true
3eacf37fc11c40c9e0cc3a64d3648ae6b48cf2b3
JavaScript
fahrberg/portfolio
/store/colors.js
UTF-8
1,542
2.90625
3
[]
no_license
export const state = () => ({ defaultColors: initialDefaultColors, currentColors: initialDefaultColors, inactiveColors: initialDefaultColors, }) const initialDefaultColors = [ '#6ba6e6', '#6ba6e6', '#6ba6e6', '#6ba6e6be', '#6ba6e6f8', '#6ba6e6be', '#6ba6e6e8', ] const shuffle = (array) => { cons...
true
83c5f5c0970c7ff9961d570168dcdb84547da77d
JavaScript
emilipla/OposJS
/Sesion6_y_13_21/funcIniMax.js
UTF-8
538
3.265625
3
[]
no_license
function maxi (x,y){ if (x > y) { return x } else { return y } } var a, b, c, d; a = parseInt(prompt ("Argumento a:")) b = parseInt(prompt ("Argumento b:")) alert ("Máximo:" + maxi(a,b)) /*document.getElementById("boton1").onclick = function(){ alert ("Máximo: " + maxi(a,b)) }*/ c = pars...
true
038842940009ca1c13c95e3179042313b8d314cd
JavaScript
paulbrtrd/WebGL
/js/Weapons.js
UTF-8
11,268
2.609375
3
[]
no_license
Weapons = function(Player) { // On permet d'accéder à Player n'importe où dans Weapons this.Player = Player; // Import de l'armurerie depuis Game this.Armory = Player.game.armory; // Positions selon l'arme non utilisée this.bottomPosition = new BABYLON.Vector3(0.5, -2.5, 1); // Changement...
true
52eb4f4f412679c9af1e2454f30ffdcdf3ee0a22
JavaScript
CptFoobar/Lens
/data/js/clock.js
UTF-8
937
2.90625
3
[ "MIT" ]
permissive
(function(){ browser.storage.local.get("showTimeDate").then((data) => { if (data.showTimeDate) showClocky(); }, null); var greetingFor = function(hours) { if(hours > 3 && hours < 12) return "Morning"; else if(hours >= 12 && hours < 16) return "Afternoon"; else return "Evening"; }; function getIconFor...
true
42835d07ee45ae7cf6d59ac721042c5744760b5e
JavaScript
codefellows/seattle-code-301d75
/class-04/inclass-demo/in-form-ation/src/App.js
UTF-8
2,625
2.890625
3
[]
no_license
import React from 'react'; import Button from 'react-bootstrap/Button'; import Container from 'react-bootstrap/Container'; import Form from 'react-bootstrap/Form'; import './App.css'; class App extends React.Component { constructor(props) { super(props); this.state = { username: 'user' } } ha...
true
599566b5c8ef6771c4581d88338f589bde6e6008
JavaScript
Leeruniek/webclient-ui
/src/text-input/input.jsx
UTF-8
6,866
2.65625
3
[ "BSD-3-Clause" ]
permissive
// @flow import * as React from "react" import cx from "classnames" import { isEmpty, is } from "@leeruniek/functies" import css from "./input.css" type LUInputPropsType = {| className?: string, inputClassName?: string, name?: string, type?: "text" | "password" | "hidden", value: string, defaultValue?: s...
true
1fdab6d57922a96a5b4a6d9b1def3e0fe889751a
JavaScript
botirkhuja/gulruz
/displayNavigationBar.js
UTF-8
595
2.90625
3
[]
no_license
var xmlhttp = new XMLHttpRequest(); var url = "navi.json"; xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var mArray = JSON.parse(xmlhttp.responseText); dispNaviBar(mArray) }; } xmlhttp.open("G...
true
df7bf2ffcd0e5c1d06fea405c4a0ce60151aade9
JavaScript
Coffey-May/WorkForce
/scripts/employees-customers/EmployeeCustomerProvider.js
UTF-8
399
2.765625
3
[]
no_license
let employeeCustomers = [] export const getEmployeeCustomers = () => { return fetch("http://localhost:8088/employeeCustomers") .then(res => { return res.json() }) .then(parsedEmployeeCustomers => { return employeeCustomers = parsedEmployeeCustomers }) } exp...
true
c2adcb08d77250cf9e15152f15c68f96120c223e
JavaScript
RenaultZC/web-design
/js/music.js
UTF-8
557
2.640625
3
[]
no_license
window.onload=function(){ var play=document.getElementById('play'); var bgm = document.getElementById('music'); var oBarrage = document.getElementById('barrage'); play.style.animation="play 1s linear infinite"; play.onclick = function () { if (bgm.paused) { bgm.play(); ...
true
64860c8920db56bd995dec0a6d869fe8fb72d220
JavaScript
barthelemyleveque/MERN
/backend/models/user.model.js
UTF-8
631
2.578125
3
[]
no_license
const mongoose = require('mongoose'); const Schema = mongoose.Schema;// In Mongoose, eveything starts with a schema, each schema maps to a MongoDB collection (<=> table) const userSchema = new Schema({ username: { type: String, required: true, unique: true, trim: true, minl...
true
7dc200e7f6f8d869eac6fd2d6378d8fc18a7bedd
JavaScript
DTU-GROUP17/final_frontend
/js/Classes/Weight.js
UTF-8
2,300
2.609375
3
[]
no_license
class Weight extends Model{ constructor(id, name, uri, created_at, created_by, updated_at, updated_by, deleted_at, deleted_by) { super(id); this.name = name; this.weightUri = uri; this.created_at = created_at; this.created_by = created_by; this.updated_at = updated_at...
true
648ec0969c833afc0f2a29d0865fcb0b1de4f299
JavaScript
woaidouya123/LeetCodeDemo
/count-complete-tree-nodes/count-complete-tree-nodes.js
UTF-8
1,101
3.640625
4
[]
no_license
/** 题目:完全二叉树的节点个数 给出一个完全二叉树,求出该树的节点个数。 说明: 完全二叉树的定义如下:在完全二叉树中,除了最底层节点可能没填满外,其余每层节点数都达到最大值,并且最下面一层的节点都集中在该层最左边的若干位置。若最底层为第 h 层,则该层包含 1~ 2h 个节点。 示例: 输入: 1 / \ 2 3 / \ / 4 5 6 输出: 6 */ /** * Definition for a binary tree node. * function TreeNode(val) { * this.val = val; * this.left = this.r...
true
2607987ba73092a4459afbc2c0c1f49566107d2c
JavaScript
jcharry/ITP
/imageTracing/sketch.js
UTF-8
2,965
3.03125
3
[]
no_license
var img; var shouldDraw; capture; function preload() { img = loadImage("assets/catdog.jpg") } function setup() { createCanvas(1440, 900); image(img, 0, 40); loadPixels(); capture = createCapture(VIDEO); capture.size(1300,900); shouldDraw = false; } function draw() { // image(capture,0,40,1300,...
true
24ed7c909b46a45e8d29dec6030a96901d5d80a5
JavaScript
SimonDing87/coding-challenges
/islands.js
UTF-8
2,016
4.25
4
[]
no_license
// This problem was asked by Amazon. // Given a matrix of 1s and 0s, return the number of "islands" in the matrix. A 1 represents land and 0 represents water, so an island is a group of 1s that are neighboring whose perimeter is surrounded by water. // For example, this matrix has 4 islands. // 1 0 0 0 0 // 0 0 1 1 ...
true
f2e9b444c6721c6b2f4fe956cd731d2b0d374821
JavaScript
rppbodo/synesthesia-addon
/content_scripts/text2melody.js
UTF-8
3,246
3.1875
3
[]
no_license
var tempo = 120; var base_duration = 4 * (1000 / (tempo / 60)); // We are considering (for now) a time signature of 4/4 var note_duration = 1/4; var letter2note = {}; letter2note['E'] = 'C'; letter2note['A'] = 'C#'; letter2note['R'] = 'D'; letter2note['I'] = 'D#'; letter2note['O'] = 'E'; letter2note['T'] = 'F'; letter...
true
58956b5021618af30ae3a86e8fff4667e4433e8c
JavaScript
Thebohemiangeek/cyberducktest
/public/js/scripts.js
UTF-8
2,464
2.859375
3
[]
no_license
// Scripts const menu = document.querySelector(".menu"); const hamburgerIcon = document.querySelector(".hamburger"); const searchIcon = document.querySelector(".search"); const search = document.querySelector(".searchBar"); const closeMenu = document.querySelector(".closeMenu"); const closeSearch = document.queryS...
true
fddacc9b9b07f403c79dbee352068065df32e1ea
JavaScript
thaymiller/spring-boot
/src/main/revisao.js
UTF-8
889
3.0625
3
[]
no_license
function exibeNome() { var elNome = document.getElementById('txtNome'); var elDisplay = document.getElementById('display'); elDisplay.innerText = elNome.value; } function novoContato() { var elListacontatos = document.getElementById('listaContatos'); var inputContato = document.createElement("input"); var labelC...
true
08c7e0a670c4d27cab2ce8c491d399dc78bfc6aa
JavaScript
andyding1/node-express-sequelize-reddit-clone
/jquery/logvote.js
UTF-8
2,377
2.625
3
[]
no_license
var $ = require('jquery'); $(document).ready(function() { $(".upvote").click(function() { var elem = $(this); var contentId = elem.attr("data-content"); $.ajax({ type:'POST', url:'/upvote', data: {contentId: contentId}, }).success(function (data){ console.log('su...
true
27a4e53ece60f2e268b6b2d646d8ef9306d59d25
JavaScript
383196802/MoneyMaker
/static/js/util.js
UTF-8
2,866
2.796875
3
[]
no_license
var currentGoogleUser = null /** * Make AJAX request. Requires jQuery to work. * @param {string} url Url to make request. * @param {string} type Type of request to make, 'GET', 'POST', etc. * @param {object} body Object to send (will pass through JSON.stringify) * @param {function} callback Called when response c...
true
76a47adea39bcea817394e85d6f5ed8f1842c2cb
JavaScript
GhostBadger/2021_dnd
/js/ddapp.js
UTF-8
1,784
3.40625
3
[ "MIT" ]
permissive
// wrap everything in an IIFE / module // a module is a JavaScript "pattern" - a programming convention // this keeps your code private - kinda like a "black box" - which is a best practice (() => { //identify the nodes of interest in the DOM const puzzleSelectors = document.querySelectorAll("#buttonHolder img"),...
true
d8f85880253741a4fd86c76684825a29f5db2ec4
JavaScript
horovykh/webusers
/assets/js/app.js
UTF-8
1,517
2.53125
3
[ "MIT" ]
permissive
$(document).ready(function () { $('#userRegistration').validate({ rules: { login: { required: true, minlength: 3 }, mail: { email: true, required: true }, password: { r...
true
9a8f6c3ab84b795939a561858030c05f782b2962
JavaScript
GorskiMaciej/JavaScriptCourseExercises
/Sec13ex02-counting-down/main.js
UTF-8
1,072
3.296875
3
[]
no_license
const targetTime = new Date('2019-09-27 15:00:00').getTime(); const coutningdown = () => { const nowTime = new Date().getTime(); const daysDisplay = document.querySelector('.d'); const hoursDisplay = document.querySelector('.h'); const minutesDisplay = document.querySelector('.m'); const secondsDis...
true
84c3b5432d9b35565aa77ebee3b8f950bcc071f5
JavaScript
Maneesha24/Algorithms
/PrintNum/printNum.test.js
UTF-8
403
3.046875
3
[]
no_license
const printNum = require("./printNum.js"); test("To print numbers", () => { expect(printNum(7)).toEqual([ 1, 2, 3, 4, 5, 6, 7]); }); test("To print numbers", () => { expect(printNum(10)).toEqual([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); }); test("To print numbers", () => { expect(printNum(25)).toEqual([1, 2, 3, 4, 5,...
true
a530ed35225a8d63304b11ad200442389f5a42ca
JavaScript
rankoliang/todo-list
/src/javascript/utilities/helpers.js
UTF-8
1,097
3.078125
3
[]
no_license
import { toDate, parseJSON } from "date-fns"; function objectMap(obj, callback) { return Object.fromEntries(Object.entries(obj).map(callback)); } function cast(type, load_format) { switch (type) { case Date: switch (load_format) { case "JSON": return parseJSON; default: ...
true
6f8980de01855fa77f7ce232301a09dfda285dfa
JavaScript
Galaxylaughing/js-testing
/src/is_palindrome.js
UTF-8
438
3.875
4
[ "MIT" ]
permissive
const reverseString = function(str) { let reversedString = ''; for (const char of str) { reversedString = char + reversedString; } return reversedString; } const isPalindrome = function isPalindrome(text) { // strip whitespace from text text = text.replace(/\s/g, ''); // create reversed version of...
true
3daeb70c055a1bb98bbfaa955e9a73c99f6728ec
JavaScript
breadmore/calendarapp
/src/Board.js
UTF-8
880
2.578125
3
[]
no_license
import React, {Component} from 'react' import axios from "axios"; export default class Board extends Component { componentDidMount() { this.setInnerHtml(); } setInnerHtml(){ axios.get('/api/board').then(function (res){ var doc = document.getElementById('RCA-header-text'); ...
true
1f898f0757bdbe173df4acba36cc0daeb3a6d4ce
JavaScript
NicoCapote/cedesoft
/js/popup.js
UTF-8
793
2.75
3
[]
no_license
var abrir = document.getElementById('inicio'), overlay = document.getElementById('overlay'), popup = document.getElementById('popup'), overlay2 = document.getElementById('overlay2'), popup2 = document.getElementById('popup2'), cerrar = document.getElementById('close'); abrir.addEventListener('cli...
true
4741bd1388723ce071e6cd256012222a655782a7
JavaScript
thiagommoreira/audio-similarity
/index.js
UTF-8
837
2.796875
3
[]
no_license
var AudioContext = require("web-audio-api").AudioContext; var MusicTempo = require("music-tempo"); var fs = require("fs"); var calcTempo = function (buffer) { var audioData = []; // Take the average of the two channels if (buffer.numberOfChannels == 2) { var channel1Data = buffer.getChannelData(0); ...
true
6474282fe5be6ee98ba71f1fba3b94fcb4f155c5
JavaScript
siawashkasra/network
/network/static/network/index.js
UTF-8
3,188
2.875
3
[]
no_license
window.addEventListener('DOMContentLoaded', (event) => { console.log('DOM fully loaded and parsed'); }); let current_record = 0 function edit_post(post_id) { let id = post_id.split(/(\d+)/); let content = document.querySelector("#cont" + String(id[1])).innerHTML // document.querySelector("#edit...
true
41c2575e30d12eb67f57edbb89794bd407fa6fb5
JavaScript
advplyr/media-namer
/src/sources/gbooks.js
UTF-8
2,220
2.578125
3
[]
no_license
const axios = require('axios') const GBOOKS_API_KEY = process.env.GBOOKS_API_KEY function cleanBookPayload(bookPayload) { var volumeInfo = bookPayload.volumeInfo || {} var publishedDate = volumeInfo.publishedDate var year = publishedDate ? publishedDate.split('-').shift() : 'N/A' var image = volumeInfo.imageLi...
true
27b0620be07c584482a8e0f4087202938415784c
JavaScript
guo-qifa/hamster-framework-system
/src/common/hamster-framework/src/bubble/lib/floatObj.js
UTF-8
4,296
3.921875
4
[]
no_license
/** * floatObj 包含加减乘除四个方法,能确保浮点数运算不丢失精度 * * 精度丢失问题(或称舍入误差,其根本原因是二进制和实现位数限制有些数无法有限表示 * 以下是十进制小数对应的二进制表示 * 0.1 >> 0.0001 1001 1001 1001…(1001无限循环) * 0.2 >> 0.0011 0011 0011 0011…(0011无限循环) * 计算机里每种数据类型的存储是一个有限宽度,比如 JavaScript 使用 64 位存储数字类型,因此超出的会舍去。舍去的部分就是精度丢失的部分。 * * ** method ** * add / subtract / multiply...
true
ee1acc0c2dbc6105a325f04860962e667dc4e37b
JavaScript
vootaaditya/project1
/reverse.js
UTF-8
112
3.390625
3
[]
no_license
var arr = [1, 2, 3]; for (var j = arr.length; j > 0; j--) { console.log("Reverse of given number :" + j); }
true
6fc0572716e54f377a8fe2db93a4a53c78531409
JavaScript
ephill2471/mad-lib
/story_maker.js
UTF-8
3,386
3
3
[]
no_license
function makeStory() { // comment out the line below once you're sure this page is properly connected // to your HTML file. // get form values var adjective = document.getElementById('adjective').value; var noun = document.getElementById('noun').value; var plural_noun = document.getEle...
true
d9bb4bef26defb3acda4a0dc4433f343eeb2dd82
JavaScript
yeri13/Precamp-03
/Class/03-javascript/04-timer.number.js
UTF-8
408
3.046875
3
[]
no_license
function getToken() { const aaa = String(Math.floor(Math.random() * 1000000)).padStart(6, "0"); document.getElementById("time").innerText = aaa; let count = 10 setInterval(() => { if (count > 0){ count = count - 1 document.getElementById("count2").innerText = count // document.get...
true
3b7478dc3ac446ce1d6e602e31ab554f971a4f1d
JavaScript
zsp540086/zsp540086.github.io
/workes/tianmao/js/function.js
UTF-8
933
3.078125
3
[]
no_license
'use strict'; function $(selector,ranger=document){ let type=typeof selector; if(type=='string'){ //获取 let select=selector.trim(); let slice=select.substring(1); let firstChar=select.charAt(0); if(firstChar=='.'){ return ranger.getElementsByClassName(slice); }else if(firstChar=='#'){ return docu...
true
74e421dcf400bfb7240ccbe01fde42aefa967f28
JavaScript
DataDrivenJS/the-letters-tutorial
/letters/letters-1/list.js
UTF-8
4,937
3.03125
3
[]
no_license
itemsUl = document.querySelector('.items ul'); function sortList(ul, property){ var new_ul = ul.cloneNode(false); // Add all list elements to an array var lis = []; for(var i = ul.childNodes.length; i--;){ if(ul.childNodes[i].nodeName === 'LI') lis.push(ul.childNodes[i]); } ...
true
04b342262445560ba5d939a9eabb6845a1cf162c
JavaScript
MoeYc/node-examples
/performance-temp/demo.js
UTF-8
1,567
3.171875
3
[]
no_license
const { createHash } = require('crypto') let result { console.time('F') const a = (Buffer.from('h')) const b = (Buffer.from('ello')) const c = (Buffer.from(', ')) const d = (Buffer.from('w')) const e = (Buffer.from('o')) const f = (Buffer.from('r')) const j = (Buffer.from('ld')) const buf = Buffer.c...
true
e093dc53bb277b6aa3732539cf0baef96c6444b7
JavaScript
fayssalaitb/react-one
/src/containers/App.js
UTF-8
2,099
2.953125
3
[]
no_license
import React, { Component } from "react"; import "./App.css"; import Persons from "../components/Persons/Persons"; import Cockpit from "../components/Cockpit/Cockpit"; //import { prependOnceListener } from "cluster"; class App extends Component { // the DAta i'am working with state = { persons: [ { id: "...
true
57b9dabc67c20270874c66f007854a7e3c63168b
JavaScript
vt5496/DatabaseOfJS
/IlyaKantorWithMyIdeas/10. Promises, async await/asyncMoreComplexity.js
UTF-8
620
3.84375
4
[]
no_license
const t = numb => console.log(numb) const str = 'first, second, third' const strToArr = str => str.split(', '); const arrReverse = arr => arr.reverse(); const arrSort = arr => arr.sort(); const arrToStr = arr => arr.join(', '); const promise = async (f, time = 1) => new Promise( resolve=> setTimeout(()=>resolve(...
true
9a677f31aff6f8eba6983b9a3a302f9775eda637
JavaScript
alexdant91/hurrycane
/models/etc-host.js
UTF-8
1,381
2.578125
3
[]
no_license
'use strict'; const ev = require('event-stream'), through = require('through2'), fs = require('fs'), _ = require('lodash') const startStr = '#custom:start', endStr = '#custom:end'; function attachData(buffer, hosts) { buffer.push(startStr); hosts.forEach(function (host) { buffer.push...
true
c7e3da1e9f66f40b53ca503d2d901cc326e94adc
JavaScript
yashhhguptaaa/Yield-Farming-Application
/src/components/Airdrop.js
UTF-8
1,116
2.8125
3
[]
no_license
import React, { Component } from 'react' export default class Airdrop extends Component { // Airdrop to have a timer that counts down // Initialize the countdown after our customers have staked a certain amount... 50 // Timer functationality , countdown, startTimer, state - for time to work.. construc...
true
c4f6b9a3dfa4bff5d4dd4c2a8055c1884e09fcfa
JavaScript
SAE-Web/welcome-mdisumma
/welcome-mdisumma/week-02/homework/script.js
UTF-8
298
3.984375
4
[]
no_license
//Challenge 1 let timer = 60; while (timer>0) { timer-- console.log(timer); } console.log("\"times's up!.\"" ); //Challenge 2 let numberOfPeople = 10; while (numberOfPeople>0) { numberOfPeople = numberOfPeople - 1; console.log(numberOfPeople + ' people left in the queue.'); }
true
5cf42385e08dfaa1c01a8353e618d7cfe76ff91b
JavaScript
Sarath33/Employee
/src/admin/store.js
UTF-8
402
2.53125
3
[]
no_license
// import React from 'react'; // export default function Store() // { // } // export const add = (it)=>{ // let detail = []; // if(localStorage.getItem("entries")){ // detail = JSON.parse(localStorage.getItem("entries")); // } // it = detail.concat(it); // localStorage.setItem...
true
c507e5f146fcc3fcc1d4170c4fc53bb5b1f10a5f
JavaScript
ilancohen100/memeGenerator1
/js/galleryService.js
UTF-8
3,647
3.015625
3
[]
no_license
var gKeywords = {'happy': 12,'funny puk': 1} var gImgs = [{id: 1, url: 'img/popo.jpg', keywords: ['happy']}]; var gNextID = 0; var gCurrImgId ; function createImg(path,keywords) { var image = { ID:(gNextID++).toString(), path, keywords } saveToStorage('nextID', gNextID); return i...
true
fb9035f35db44792bfb350cceb6fd047d39bc028
JavaScript
deminix1/TP-JS
/TP1 BLANC/src/css/functions.js
UTF-8
1,129
3.265625
3
[]
no_license
//Au clic sur le bouton du formulaire, il faut récupérer le contenu du champ (vous pouvez rajouter un attribut ID //ou utiliser un sélecteur prenant en compte le name) et ajouter un article dans la section ayant pour ID news //(le contenu HTML de l’article provient du champ input) let boutonSubmit = document.que...
true
38c58d172f57a0e7e357292eb10722533c9ffe28
JavaScript
brewtho97/ReactToDoApp
/playground/spread.js
UTF-8
401
4.40625
4
[]
no_license
/* function add(a, b) { return a + b; } console.log(add(3,1)); let toAdd = [9,5]; console.log(add(...toAdd)); let groupA = ['Tom', 'Matt']; let groupB = ['Andy']; let final = [...groupB, ...groupA]; console.log(final); */ let person = ['Andrew', 25]; let personTwo = ['Jen', 29]; function greet(name, age) { ret...
true
04f9555bc08e8dc47dbacdaf2ab50ce38e3b7a71
JavaScript
magnusmel/Learning-Web-Scraping-with-JavaScript
/Section 2/scrapeGoogleJquery.js
UTF-8
1,798
2.546875
3
[ "MIT" ]
permissive
var casper = require("casper").create({ verbose: false, logLevel: 'debug', pageSettings: { loadImages: false, loadPlugins: false, userAgent: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/7.0.540.0 Safari/525.19' }, clientScripts: [ 'pat...
true
08fadcb3835fafe7ad3985c5a560bbb68d541714
JavaScript
Prattyush15/JavaScript-Golden
/GhostInvasion!.js
UTF-8
3,160
4.125
4
[]
no_license
// Constants for main ghost body var HEAD_RADIUS = 35; var BODY_WIDTH = HEAD_RADIUS * 2; var BODY_HEIGHT = 60; var NUM_FEET = 3; var FOOT_RADIUS = (BODY_WIDTH) / (NUM_FEET * 2); // Constants for eyes var PUPIL_RADIUS = 4; var PUPIL_LEFT_OFFSET = 8; // This is how far left the pupil should be from the center of the gh...
true
f8d7588c1c458d599392ea5189e35e64f2a0ee3a
JavaScript
ryb73/dealers-choice-meta
/packages/game-ui/lib/cards/dc-card-front.js
UTF-8
1,597
2.546875
3
[ "MIT" ]
permissive
"use strict"; var CardDisplay = require("./card-display"), consts = require("../constants"), assets = require("../assets"); function DcCardFront(dcCard, fullSize) { this.CardDisplay_constructor(drawCard(dcCard, fullSize)); } function drawCard(dcCard, fullSize) { var blankBg = new createjs.B...
true
1843bbb307cec14a00f892f93bab0515c87c469e
JavaScript
kendyjack/Frontend-House
/JavaScript/es6/object_extend.js
UTF-8
1,767
3.90625
4
[ "Apache-2.0" ]
permissive
/* 对象扩展方法 */ //Object.assign 将多个源对象中的属性复制到目标对象中 const source1 = { a: 123, b: 123 } const target = { a: 456, c: 456 } //第一个参数是目标对象 也就是所有源对象的属性都会复制到目标对象中 const result = Object.assign(target, source1); console.log(result);//{ a: 123, c: 456, b: 123 } 后面对象的属性覆盖第一个对象的属性 可以看到a属性被源对象覆盖了 console.log(target);...
true
659c853e9bbb9f7c15b533b99ae4c6470c2931d1
JavaScript
geekfreak/lbTodo
/test/app.js
UTF-8
1,469
2.9375
3
[]
no_license
const chai = require('chai'); const assert = require('chai').assert; const fs = require('fs'); const vm = require('vm'); vm.runInThisContext(fs.readFileSync(`${__dirname}/../src/app.js`)); todos = []; const items = [ 'one', 'deux', 'tres', 'vier', 'cinc', 'seis', 'nomwe', ]; describe('Mocha is working', () => { ...
true
ebca670dda01b47d156dbbef2dc01740f21fbefa
JavaScript
jadervasque/projetoestudoscsharp
/CursoJavaScript/exercicios-uri/resolvidos/1015.js
UTF-8
625
3.84375
4
[]
no_license
var input = require('fs').readFileSync('/dev/stdin', 'utf8') var lines = input.split('\n') class Ponto { constructor(x, y) { this.x = x this.y = y } } let pontos = [] for (let i = 0; i < 2; i++) { const entrada = lines.shift().split(' ') // const entrada = prompt().split(' ') const...
true
ec7a9abd6fca756c3628b89ab4521036dfdb7d58
JavaScript
jlboyer/js-beatles-loops-lab-bootcamp-prep-000
/index.js
UTF-8
552
3.671875
4
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-public-domain" ]
permissive
// add solution here function theBeatlesPlay(musicians, instruments){ var stringArray =[]; for (var i = 0; i < musicians.length; i++) { stringArray[i] = `${musicians[i]} plays ${instruments[i]}`; } return stringArray; } function johnLennonFacts(facts){ var i = 0 while (i < facts.length){ facts[i] =...
true
30c6fc7ee9ff1c7e07065d824fbf099d8b2ab6de
JavaScript
dvbsknd/FCC-advanced-node
/auth.js
UTF-8
2,887
2.578125
3
[]
no_license
const passport = require('passport'); const LocalStrategy = require('passport-local'); const GitHubStrategy = require('passport-github').Strategy; const bcrypt = require('bcrypt'); const { ObjectID } = require('mongodb'); module.exports = (app, db) => { // User de/serialisation passport.serializeUser((user, done)...
true
1652e9fb93abf93514ddab5aa5c342ccfc421f89
JavaScript
avinash112233/es6-and-asychroncity
/specs/task25.spec.js
UTF-8
698
2.578125
3
[]
no_license
const chai = require("chai"); const expect = chai.expect; const ex8 = require("../task25"); const fs = require("fs"); describe("task 25 test running", () => { it("should be able to proper message on creation of file", function(done) { ex8 .created("Hello, This is Konfinity Infotech") .then(res => { ...
true
843db31cf6f67e8dcc1457f490979597c71b4360
JavaScript
MoeYc/ts-utils
/lib-cjs/dom/download.js
UTF-8
1,535
2.75
3
[]
no_license
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Download = void 0; class Download { static downloadOrJSON({ res, filename, onGetJSON }) { if (res.status === 200) { // Log(res); const blob = res.data; // 返回的是json if (res.dat...
true
c1c43171030f1707755995a38422fc8f22bcef97
JavaScript
afan31/nodejs-projects
/playground/5-es6-objects.js
UTF-8
600
3.640625
4
[ "MIT" ]
permissive
// Object property shorthand const name = 'Andrew' const userAge = 29 const user = { name, age: userAge, location: 'Philadelphia' } console.log(user) // Object destructuring const product = { label: 'Red Notebook', price: 3, stock: 201, salePrice: undefined, rating: 4.2 } // const {label: productL...
true
4ced29e5388b36b22df5e0cf747887519bdbf9df
JavaScript
Mahbubul-Hasan/JavaScript-Raw
/Freeze, Seal & Extansible/script.js
UTF-8
906
2.90625
3
[]
no_license
var objFreeze = { objectFreeze : "I want to check is it frozen???" }; Object.freeze(objFreeze); console.log(!Object.isFrozen(objFreeze)); if (!Object.isFrozen(objFreeze)) objFreeze.newFreeze = "Is new freeze item added???"; console.log(objFreeze); var FreezeAlternative = { newFreeze : "Is new fre...
true
f98450d9293fc7c90a26d3e81b39bb0959ef9d21
JavaScript
Ltrares/sound-js
/src/sound-node.mjs
UTF-8
7,558
2.765625
3
[]
no_license
import Notes from "./notes.mjs"; export default class SoundNode { constructor(type, name ) { this.id = this.guid(); this.name = name; this.time = 0; this.children = []; this.rate = 1.0; this.effectiveRate = this.rate; this.pitch = 1.0; this.effectiveP...
true
1d3531568ad6d58a0bcae5560c56ed7feead2192
JavaScript
azz/ast-grep
/src/index.js
UTF-8
1,780
2.625
3
[ "MIT" ]
permissive
import './polyfills'; import traverse from '@babel/traverse'; import omitDeep from 'omit-deep-lodash'; import deepEqual from 'deep-equal'; // import preprocess from './preprocess'; import parse from './parse'; export default (text, { pattern, anonymous }) => { const patternAsts = [].concat(getMeaningfulNode(parse(...
true
e7d2ef67ee769d5497a92d63e0adec321202eb09
JavaScript
slvdrew/avanegasjava
/main.js
UTF-8
458
3.953125
4
[]
no_license
var firstName = "Andrew"; var lastName = "Vanegas"; let myAge = 20; alert("My name is " + firstName + " " + lastName); alert("I am " + myAge + " years old "); if (myAge < 21) { alert("It is illegal for me to drink in the states."); } else if (myAge > 21) { alert("I am legally able to drink in the states....
true
951f7022fc42333838f013892d3e85e72657c8c8
JavaScript
kkaltenheuser/google-book-search
/client/src/components/list.js
UTF-8
996
2.546875
3
[]
no_license
import React, { useReducver } from "react" import items from "../App" const List = (items) => { const inputRef = useRef(); const [items, dispatch] = useReducer((state, action) => { switch (action.type) { case "add": return [ ...state, { id: state.length * Math.random(), ...
true
f2867987b8336d8697e959ed6cd2dcbc41ced370
JavaScript
Carolinadelb/gif
/app.js
UTF-8
1,057
3.109375
3
[]
no_license
window.onload = ()=>{ const btn = document.querySelector('button'); const img = document.getElementById('photo'); const url = 'https://api.giphy.com/v1/gifs/trending?api_key=AJx2Ei3LrZMOTPoBtkEUbv9BOu7H744o&limit=25&rating=G'; //call back va a estar esperando una llamada y recibiendo cosas const getJSON = (...
true
c288b30aea979faa2714ca66af5ee6df40733341
JavaScript
jlshaw117/leetcode
/easy/removeDuplicate.js
UTF-8
210
3.1875
3
[]
no_license
var removeDuplicates = function (nums) { for (let idx = 0; idx < nums.length; idx++) { if(nums[idx] === nums[idx + 1]) { nums.splice(idx + 1, 1); idx -= 1; } } };
true
5db5ca65710a7d71ade3cc44c02637b5b670a6e1
JavaScript
JavierRodriguezRegueiro/weather-map
/src/reducers/weatherReducer/weatherReducer.js
UTF-8
854
2.59375
3
[]
no_license
const weatherDefaultValues = { lng: -1.64323, lat: 42.81687, zoom: 10, city: '', summary: '', tmp: '', precProb: '', hourlyData: [{}], offset: 1 }; export const weatherReducer = (state = weatherDefaultValues, action) => { switch (action.type) { case 'SET_INFO': ...
true
974b501d9af7791baa7ccfc1349816fab3774a1a
JavaScript
Auron91/To-Do-APP
/public/js/fetch.js
UTF-8
3,103
3
3
[]
no_license
function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null...
true
0a89c9a5c32f408f514a016cab4841f84e773328
JavaScript
mycoberago/mean-backend
/controllers/message.js
UTF-8
687
2.71875
3
[]
no_license
// require message model var Message = require('../models/message'); module.exports = { // this function grabs message from the mongoose model get: function (req,res) { // attach user info to message using populate() Message.find({}).populate('user','-pwd').exec(function(err,result){ res.send(result)...
true