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
c7ab87f5063e97d2037e604692f4f306c4fffeca
JavaScript
CeciNB/Node
/3._Data_API/app.js
UTF-8
2,614
3.03125
3
[ "MIT" ]
permissive
const express = require('express'); const app = express(); app.use(express.json()); const PORT = 8080; const notes = [ { id: 0, title: 'Shopping', text: 'Mango, Lime, Salat', }, { id: 1, title: 'Remember this', text: 'Putty, Sandpaper', }, { ...
true
8966d4ac5720da1a8e5439e986f2a4691138fdc2
JavaScript
CrimeDC/analytics
/public/js/mapdev.js
UTF-8
8,219
2.8125
3
[]
no_license
/***** GLOBALS *****/ var previousPage = ""; var map, GeoMarker; var markerLocation = document.getElementById('markerLocation'); var directionsDisplay; var directionsService = new google.maps.DirectionsService(); // page switching var switchPage = function(currentPage, newPage) { var currentPage = document.getElem...
true
1f537458c4000f6013233d1a4dc99e0aa7b5302b
JavaScript
umeshanthem/heroku-test-
/index.js
UTF-8
716
2.5625
3
[]
no_license
var express = require('express'); var app = express(); var fs = require('fs'); var add_data = function (line , cb){ fs.appendFile("heroku.txt" , line); return cb(null); }; app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/public')); // views is directory for all template files ap...
true
1eeeea645d16c65ffcb45de7138afe62e7ebd2b3
JavaScript
harrison-cross-mmd/greasemonkey-scripts
/scripts/routerFill.user.js
UTF-8
3,262
2.53125
3
[ "MIT" ]
permissive
// ==UserScript== // @name Router Fill // @namespace https://github.com/crosshj/greasemonkey-scripts // @updateURL https://github.com/crosshj/greasemonkey-scripts/raw/master/scripts/routerFill.user.js // @downloadURL https://github.com/crosshj/greasemonkey-scripts/raw/master/scripts/routerFill.user.js //...
true
4c5e5808209678b0c487f894be043f71580c8848
JavaScript
wafaulhimam/ga10-task
/js/new.js
UTF-8
763
3.625
4
[]
no_license
// expected input const arr = ['a', 'b', 'b', 'c', 'd', 'e']; // expected output // const newArr = ['a', 'b', 'c', 'd', 'e']; function myReduce(array) { if(Array.isArray(array)) { for(let i = 0; i < array.length; i++) { const sameVal = (element) => element === array[i]; if(array.s...
true
ba9c71a400c0d7e6c519723796397a7c5453c3e9
JavaScript
MuniVenkatesh/ReactAssignment
/UI/src/js/components/Initial.js
UTF-8
1,603
2.625
3
[]
no_license
var React=require("react"); var Navbar=require("./Navbar"); var InitialMovies=React.createClass({ getInitialState: function() { var initial=[]; $.ajax({ url: "/movies", dataType: 'json', async:false, success: function(data){ initial=data; }.bind...
true
7c31388f9a4815b980512a0c7f88f00dd458d6ca
JavaScript
fullbin/mahjong-server
/js/base/room.js
UTF-8
1,358
3.140625
3
[]
no_license
/** * 房间基类构造函数 * @param {String} - 房间id * @param {Function} - 游戏构造函数 */ var Room = function (roomId, gameConstructor) { this.roomId = roomId; this.gameConstructor = gameConstructor; this.gameCount = 0; // 记录游戏局数 this.playerSequence = []; // 玩家顺序 this.playerDatas = {}; // 玩家数据:玩家id - 玩家数据对象 t...
true
0e483801eaee0a77635802012d51c4a89d2403ab
JavaScript
amyzhaosicong/WebScience
/lab10/lab10_Sicong_Zhao/javascripts/calendar.js
UTF-8
4,339
2.828125
3
[]
no_license
$(document).ready(function() { // read tweets data from server and parse them to certain csv file $.get("../tweets.json", function(tweets) { console.log(tweets); var dates = []; var counts = []; var dates_index = 0; for (var i = 0; i < tweets.length; ++i) { // transfer date format // Thu May 07 20:30:...
true
06b93a9eed938ff32b3b0fd70c7137fb5cf03491
JavaScript
ihgrant/museamp
/src/reducers.spec.js
UTF-8
2,760
2.859375
3
[ "MIT" ]
permissive
const test = require("tape"); import reducer from "../src/reducers"; test("reducers", function(t) { let state = reducer(undefined, {}); t.deepEqual( state, { chosenSongId: -1, chosenPlaylistId: -1, library: [], playback: { paused: true, progress: 0, songId: -...
true
4d2c3046469f22c18deff451dfb584400b50f337
JavaScript
romdj/trading
/NodeJSLibraryTests/checkTickerSymbol.js
UTF-8
733
2.828125
3
[]
no_license
const fs = require('fs'); const nasdaqList = require('../DataSets/NASDAQ.json'); const cts = require('check-ticker-symbol'); const validList = []; const wrongList = []; nasdaqList.map((ticker) => { if (cts.valid(ticker)) { // validList.push(ticker); } else { // wrongList.push(ticker); } }); // var symbo...
true
26d7e43b162cb11d9b86fd1bae99e4c65efac3da
JavaScript
carabunnell/Billboh_Final
/client/src/components/cityHistory.js
UTF-8
3,462
2.515625
3
[]
no_license
import React, {useState} from 'react'; import {BrowserRouter as Router, Route} from 'react-router-dom'; import './App.css'; import { Header, Layout, Drawer, Navigation, Content } from 'react-mdl'; function App() { const [user,setUser] = useState(null) return ( <div className="App"> <div style={{height: '...
true
eb088a6fc93b1aaa03e2221a61e2ccdcfad9030f
JavaScript
Treeless/league
/public/js/leagueapp.js
UTF-8
5,397
2.84375
3
[]
no_license
const API = "http://localhost:8080/api"; class TodoApp extends React.Component { // LEARNING REACT: Code from https://reactjs.org/ and changed //Setup state and event listeners constructor(props) { super(props); this.state = { loading: false, account: {}, matches: [], text: '' }; th...
true
5a8f63b5fed7ae3a9b61d60a8488971f80867075
JavaScript
terrenjpeterson/raspberry
/api/getRecentMoistureHistory.js
UTF-8
5,147
2.953125
3
[]
no_license
// lambda function written in nodeJS to aggregate moisture history console.log('loading required functions'); var aws = require('aws-sdk'); console.log('starting to execute function'); exports.handler = function(event, context) { // start executing function console.log('processing request'); // bui...
true
20f4882e96bf6a7431e4d08d7429fc895d2baabc
JavaScript
bbeck/keyboard-shortcuts-for-google-search
/js/extension.js
UTF-8
7,272
2.5625
3
[]
no_license
var chevronImageUrl = chrome.extension.getURL("images/chevron.gif"); var helpPopupUrl = chrome.extension.getURL("html/help.html"); /** Move the selection to the next search result. */ var doNextSearchResult = function() { var selectedItem = $("li.selected_search_item"); if (selectedItem.length == 0) { debug("U...
true
64578904b752447597fbe1f9c417a43083f688a4
JavaScript
t1ngt1ng/code
/canvas/utils/shape/Moon1.js
UTF-8
1,416
3.28125
3
[]
no_license
/** * author : t1ng * createTime : 2018/11/28 * description : 圆角矩形 * example: code/canvas/drawShape/drawMoon.html */ function Moon1(d = 2, r = 200, color) { this.x = 0; this.y = 0; this.d = d;//控点,r的倍数 this.color = color || 'yellow'; this.r = r;//圆角半径 this.rotation = 0;//旋转角度...
true
4416ad2d16ffcfaaa9b4e766bc5a8840d8038ec1
JavaScript
Nilker/VueStudy
/Projects/WebpackVue_day6/src/main.js
UTF-8
2,504
3.265625
3
[]
no_license
// main.js 是项目的 JS 入口文件 console.log('ok'); // 如何在 webpack 构建的项目中使用 Vue 进行开发 // 复习,在普通网页中如何使用 vue: // 1.使用 script 标签引入 vue 包 // 2.在 index 页面中创建一个 id 为 app 的 div 容器 // 3.通过 new Vue 得到一个 vm 的实例 // 在 webpack 中尝试使用 Vue: // 注意:在 webpack 中,使用 import vue from 'vue' 导入的 Vue 构造函数,功能不完整,只提供了 runtime-only 的方式,并没有提供像网页中那样的使用方式 i...
true
f7b83162797b05a74a8ac876157bfbcae21ffb55
JavaScript
KharkovaIrina/QA_Course
/codewars/Reversed sequence.js
UTF-8
151
3.359375
3
[]
no_license
function reverseSeq(n) { let arr = []; for (let i = n; i >= 1; i--) { arr.push(i); } return arr; } console.log(reverseSeq(5));
true
ead78e538a3c1e9cfde89b250dbca3eb499ba3ce
JavaScript
shashankshetty1996/pb-javascript-course
/examples/event_loop/001example.js
UTF-8
422
3.453125
3
[]
no_license
// console.log("Hello all"); // setTimeout(function setTime() { // console.log("Hello from setTimeout"); // }, 2000); // console.log("This is new setup for me"); // const btn = document.querySelector("#btn"); // btn.addEventListener("click", clickHandler); // function clickHandler() { // console.log("clicked me...
true
1d1a6fd1a25ebb1e80b9d97fed4dfe26b4a9ab78
JavaScript
lot5000/SpicyExperiments
/Stroking/Blowing.js
UTF-8
3,790
3.296875
3
[]
no_license
/** * Start blowing * @param bpm The bpm you want to start with * @param duration The duration in seconds this should last */ function startBlowing(bpm, duration, avoidStop = false) { startStroking(bpm); sendBlowingTaunts(duration * 1000); if (!avoidStop) { sendMessage(random("Stop", "You can s...
true
4cb2cbe8fcd22070940aede528a44c191381f020
JavaScript
manny525/devathon-project
/src/routers/course.js
UTF-8
1,431
2.546875
3
[]
no_license
const express = require('express') const Course = require('../models/course') const authFaculty = require('../middleware/authFaculty') const authStudent = require('../middleware/authUser') const router = new express.Router() router.post('/courses/new', authFaculty, async (req, res) => { try { const faculty...
true
a9748a731032f09faf492f532268e93170454446
JavaScript
Danack/Blog
/public/js/react/src/template_editor.jsx
UTF-8
3,727
3.15625
3
[ "MIT" ]
permissive
function handleErrors(response) { if (!response.ok) { throw Error(response.statusText); } return response; } class BlogTextArea extends React.Component { constructor(props) { // props.content = "foobar"; super(props); this.state = { value: '', ...
true
8a829e191c1d2b87b430d054788739a9966a386c
JavaScript
Grizzlyblack/hexapawn
/resources/js/components/PlayerController.js
UTF-8
986
2.78125
3
[]
no_license
export function activate(vue, clickedPawn) { vue.activePawn = clickedPawn; setMoveablePositions(vue); } export function deactivate(vue) { vue.activePawn = null; vue.moveablePositions = []; } export function setMoveablePositions(vue) { vue.blocked ? null : vue.moveablePositions.push(vue.activePawn-3); vue.activ...
true
2a3fc246e9877889c9996d4d64b150a23c800a92
JavaScript
Chinmay-395/Tic-Tack-Toe
/src/components/useState/HookCounterFive.js
UTF-8
1,342
3.625
4
[]
no_license
//This is noted from webDevSimplified //youtube channel; video --> https://youtu.be/O6P86uwfdR0 import React, { useState } from 'react' /* In class-components the states are initialized inside the `constructor` method, similarly the initializations in the useState hook works the same. So, it takes the functio...
true
c2b551afa4b9ae04fbe95a01b52b5966f9033c07
JavaScript
msnorma/chuck-norris-api-reactjs
/src/components/categoryList.js
UTF-8
957
2.65625
3
[]
no_license
import React from "react"; import Category from "./list"; import JokeBox from "./box"; class CategoryList extends React.Component{ state = { categories: [] } async componentDidMount(){ const apiFetchCategory = await fetch(`https://api.chucknorris.io/jokes/categories`); c...
true
0d8bdaa3d1dbeb36215b91e6c416b1a1df08d00d
JavaScript
curm90/code-wars
/js/7-kyu/2019/june/factorial.js
UTF-8
420
4.46875
4
[]
no_license
// https://www.codewars.com/kata/factorial-1/train/javascript function factorial(n){ if (n === 0) return 1 return n * factorial(n - 1) } function factorial(n) { let result = 1 while (n > 0) { result *= n n-- } return result } console.log(factorial(0), 1); console.log(factorial(1), 1); console....
true
0a9dbb59f621cf3d4f0e8d0e006f814d60d073a8
JavaScript
iigmir/sorting-algorithm
/bubble.js
UTF-8
794
3.828125
4
[ "MIT" ]
permissive
// Bubble Sort var bubbleInput =[69,81,30,38,9,2,47,61,32,79]; // First, sorting once var bubbleInputFirstStep = bubbleInput; for (var i=0; i<bubbleInputFirstStep.length; i++) { if ( bubbleInputFirstStep[i]<bubbleInputFirstStep[i+1] ) { var swapval = bubbleInputFirstStep[i]; bubbleInputFirstS...
true
4bcfcb7d198feae483aa910d2cdd0ee7efb3c893
JavaScript
divyajeetsingh/react-learning
/src/component/userGreting.js
UTF-8
1,320
2.640625
3
[]
no_license
import React, { component, Component } from 'react' // import { threadId } from 'worker_threads'; class Greeting extends Component { constructor() { super() this.state = { isLogged: true } } render() { //Fourth Approach here return this.state.isLo...
true
c63b541ca3357371c6c2a58d704c34a1582b3088
JavaScript
senner007/recursiveFunction
/ai.js
UTF-8
4,606
3.078125
3
[ "MIT" ]
permissive
$(document).ready(function () { var divs = $('.wrapper').find('div'), obj = {}; $('.wrapper').on('click', 'div',function () { this.classList.toggle('set') divs.css('border', 'none'); divs.each(function (i,el) { var $el = $(el); var tempArr = [] var ...
true
e7a9b3d8d5321f4a197e006cfd33d0825f706a5e
JavaScript
hygorchristian/caixa-seguradora
/scripts/app.js
UTF-8
1,553
3.421875
3
[]
no_license
const main = document.getElementById('main'); // Construindo funcao para carregar o json de um arquivo local para compatibilidade com o IE === const loadLocalJson = (path, callback) => { const xobj = new XMLHttpRequest(); xobj.overrideMimeType('application/json'); xobj.open('GET', path, true); xobj.onreadystat...
true
c152cd05cf553c0fd78dcfb03a6fb8965c2ec0e1
JavaScript
AndreiRailean/react-clock
/src/utils/timeFormatter.js
UTF-8
904
2.703125
3
[]
no_license
import moment from 'moment' import 'moment-duration-format' export const stopwatchFormat = (ms) => { const time = moment.duration(ms, 'milliseconds') let format = 'mm:ss.SSS' if (time.hours()) { format = 'h:mm:ss.SSS' } const output = time.format(format, { forceLength: true, trim: false }) return out...
true
33450398f412d92784713b0a1acf5ff6f549ee85
JavaScript
Stefan-Stefanov/SoftUni
/Programming-Basics/exams/Easter-Eggs-Battle.js
UTF-8
1,055
3.796875
4
[]
no_license
function solve(input) { let eggsPlayerOne = Number(input[0]); let eggsPlayerTwo = Number(input[1]); let i = 2; let win = false; let winner = input[i++]; while (winner !== "End of battle") { switch (winner) { case "one": eggsPlayerTwo--; break;...
true
522a2bf3fa2f5548de4d72cfedb65548ad0a5da1
JavaScript
wuqianye/City_Zip_Search
/src/components/ZipSearch.jsx
UTF-8
2,157
2.96875
3
[]
no_license
import React from "react" class ZipSearch extends React.Component { constructor() { super() this.state = { cities: [] } this.zipSearch = this.zipSearch.bind(this) } zipSearch(e) { const output = document.getElementById("output") output.innerHTML...
true
bcf2089149c655bb4c66df41189b30c3218be837
JavaScript
aryan-13/Is-your-birthday-lucky
/app.js
UTF-8
876
3.9375
4
[]
no_license
const birthD = document.querySelector('#b-date'); const luckyNum = document.querySelector('#luck-num'); // BUTTON SELECTOR const checkBtn = document.querySelector('.btn'); // OUTPUT const output = document.querySelector('.display-result'); // VARIABLES var dob = 0; var lnum = 0; checkBtn.addEventListener('click', () ...
true
42685594a54586a2a361f7e0ccb80ee8e61cef3f
JavaScript
dgdblank/chatterbox-server
/server/request-handler.js
UTF-8
1,946
2.84375
3
[]
no_license
var fs = require('fs'); var index = fs.readFile('../client/index.html'); // information to include in response header var headers = { "access-control-allow-origin": "*", "access-control-allow-methods": "GET, POST, PUT, DELETE, OPTIONS", "access-control-allow-headers": "content-type, accept", "access-control-max...
true
b4dfad399fa47bb6317de1bc7d82eea8135cf152
JavaScript
nickfujita/mytunes
/views/LibraryEntryView.js
UTF-8
1,268
2.703125
3
[]
no_license
// LibraryEntryView.js - Defines a backbone view class for the entries that will appear within the library views. These will be inserted using the "subview" pattern. var LibraryEntryView = Backbone.View.extend({ tagName: 'div', className: 'col s12 m4 l3', // template: _.template('<td><%= artist %></td><td><%= ...
true
a6ef95886ac8452b0c3d03a1a6e0f947d37f9ad7
JavaScript
blueara/blue-sea
/Fetch/index.js
UTF-8
553
2.53125
3
[]
no_license
import auth from "./auth.js"; import image from "./image/1.jpg"; export default function Home() { const [list, setList] = useState([]); const [isLoading, setIsLoading] = useState(true); function getData() { Axios.get(API_URL).then((res) => { console.log(res.data); setList(res.data); ...
true
1fd422201097516e53dd5f7b2424c7bcafe8cb6c
JavaScript
zhishaofei3/nodejsTest
/file/writeFile.js
UTF-8
1,054
3.015625
3
[]
no_license
const fs = require('fs') fs.writeFile('log2.txt', '你好哦!!!!', {flag: 'wx'}, err => { if (err) { throw err } console.log("It's saved") }) // Flag 描述 // r 以读取模式打开文件。如果文件不存在抛出异常。 // r+ 以读写模式打开文件。如果文件不存在抛出异常。 // rs 以同步的方式读取文件。 // rs+ 以同步的方式读取和写入文件。 // w 以写入模式打开文件,如果文件不存在则创建。 // wx 类似 'w',但是如果文件路径存在,则文件写入失败。 // w...
true
c3f808685bb04d58e3afc274f6b9d9416fe2562e
JavaScript
MellKay/PokemonSuggestions
/src/Components/App.js
UTF-8
842
2.703125
3
[]
no_license
import React, { useState } from "react"; import "./App.css"; import SearchField from "./SearchBar/SearchField"; import OptionsList from "./AutoComplete/OptionList"; let header = "https://fontmeme.com/permalink/200228/78c019343aff9b02f2900e2278bde900.png"; function App() { const [input, setInput] = useState(""); ...
true
f1ef3a8a0c42f7635d409cb3811c18253c43e0f2
JavaScript
kataing/mini-apps-1
/challenge_2/server/flattenObj.js
UTF-8
758
3.078125
3
[]
no_license
const createColumns = (json) => { let keys = Object.keys(json); let columns = keys[0]; for (let i = 1; i < keys.length; i++) { if(keys[i] !== 'children') { columns = columns + ',' + keys[i]; } } return columns + '\n'; } const createRows = (json) => { let keys = Object.keys(json); let rows =...
true
38d629ad3b9565a26355736467d0d7b05a4f04e5
JavaScript
GeneralYouri/sudoku-checker
/src/check.js
UTF-8
11,058
3.65625
4
[ "MIT" ]
permissive
const assert = require('assert').strict; /** Main Puzzle class, controls the grid and all relevant rule instances */ class Puzzle { size; grid; rules; constructor(size) { this.size = size; this.grid = Array.from(Array(this.size)).map(() => Array.from(Array(this.size)).map(() => new Cel...
true
f211b3a51a09436ee556e27e4e6802f738016b87
JavaScript
OlgaZS/lab-react-ironcontacts
/src/App.js
UTF-8
2,427
2.90625
3
[]
no_license
import React, { Component } from "react"; import "./App.css"; import Contact from "./components/Contact"; import contacts from "./data/contacts.json"; import Button from "./components/Button"; class App extends Component { state = { contacts: contacts.splice(0, 5) // 5 selected contacts }; randomActor = () ...
true
5aa850eeacbec8189a3fe0d9561e0d62884c4ee3
JavaScript
peol/socialhapy-discord
/src/discord/commands/nice.js
UTF-8
541
3.0625
3
[ "MIT" ]
permissive
/** * Provides a trigger with a chance of responding "nice nice nice..." if * the message contained the word "nice". * * @param {Object} A discord.io bot instance * @param {...args} The default callback arguments from a discord.io `message` event */ const cap = 0.70; export function register( bot, message ) { if ( m...
true
c688aac5936bc0a6f8d87c84e18b056e05cf140c
JavaScript
miraj00/test
/server/models/User.js
UTF-8
2,877
2.59375
3
[]
no_license
// const { Schema, model } = require("mongoose"); // const bcrypt = require("bcrypt"); // const { isEmail } = require("validator"); // const contactSchema = require("./ContactUs") // const userSchema = new Schema( // { // username: { // type: String, // minLength: 6, // maxLength: 16, // ...
true
ab0d89e1ff33c8838d6b6a5eef9e4b76da2f75f2
JavaScript
langjeff/HW_03_JS_PasswordGen
/script.js
UTF-8
5,467
3.859375
4
[]
no_license
// ***************DECLARING GLOBAL VARIABLES FOR PASSWORD GENERATOR********************* // variable in card footer for 'Generate Password' button var generateBtn = document.querySelector("#generate"); // create variables for boolean storage of character type confirmations var confirmLow; var confirmUp; var confirmNu...
true
b148867d072b896a0302bf481b572017b55926c9
JavaScript
topliceanu/learn
/js/duffel/client.js
UTF-8
1,201
2.71875
3
[ "MIT" ]
permissive
const request = require('request'); const factory = (airlineId) => { switch(airlineID) { 'a': return searchA; break; 'b': return searchB; break; } } // @param {String} origin // @param {String} destination // @param {Date} departureDate // @return {Array<Flight>} // /* Flight: * arrival_timestamp: * ...
true
094de3dd2aa38590ce7d188ac08632850000b1ec
JavaScript
weezwo/create-store-lab-v-000
/src/components/UserInput.js
UTF-8
864
2.640625
3
[]
no_license
import React, { Component } from 'react'; class UserInput extends Component { constructor(props){ super(props); this.state = { username: '', hometown: '', } } handleChange = (ev) => { this.setState({ [ev.target.name]: ev.target.value, }) } handleSubmit = (ev) => { ...
true
2f71db20f4389296b6c92f48563034e799892e02
JavaScript
mjstewart/commentarr
/src/main/webapp/js/components/Comments/CommentFeed.js
UTF-8
32,986
2.53125
3
[]
no_license
import React from 'react'; import Immutable from 'immutable'; import CreateCommentButton from './../CommentForm/CreateCommentButton'; import CommentForm from './../CommentForm/CommentForm'; import FeedSettingActivator from './../FeedSettings/FeedSettingActivator'; import FeedSettingControls from './../FeedSettings/Feed...
true
eed10fcddff96fc8f7b307a9d38d1f762cafa2a3
JavaScript
al-zolochevski/components-animate-on-scroll
/animate-on-scroll.js
UTF-8
431
2.59375
3
[]
no_license
var showElementsOnScreen = function () { // TODO: z('.aos-fade').forEach(...) document.querySelectorAll(".aos-fade").forEach(function (element) { var zElement = z(element); if (zElement.isOnScreen()) { zElement.addClass("aos-animate") } else { zElement.removeClas...
true
4fa79ffb99a0125ccd62bfdacf1ebad5201ba1e7
JavaScript
ravirajput99/NS-Minor-project-TodoList
/js/todo.js
UTF-8
6,673
3.203125
3
[]
no_license
var btn = document.querySelector("button"); var list = document.querySelector(".todos"); var search = document.querySelector(".search"); var addinput = document.getElementById("input"); let todos, tick; if (tick != null) { document.querySelector(".tick"); } if (JSON.parse(localStorage.getItem("todolist")) != null) { ...
true
45eb8cf944dceb63105ad58bda05acae13c7c923
JavaScript
zeel/cart-app
/src/reducers/stories.js
UTF-8
1,599
2.734375
3
[]
no_license
import constants from 'constants/constants'; import update from 'react-addons-update'; /** * returns updated list * @param list * @param item * @param index */ function getReplacedItemInList(list, item, index) { return update(list, { $splice: [ [index, 1, item] ] }); } /** * pe...
true
c7535658e8107d789d26fb37f03e189a90e0d9ce
JavaScript
Ponnis/Dat256
/project/src/login/LoginView.js
UTF-8
1,695
2.625
3
[]
no_license
import React from 'react'; import PropTypes from 'prop-types'; import './TextInputStyle.css'; // renders the view for login class LoginView extends React.Component { constructor(props) { super(props); this.state = { focussed: (props.locked && props.focussed) || false, v...
true
d87d3bc4e641259fe72ab1b5272e58d81cf31a93
JavaScript
brnoam/aula-partica-javascript-function-2
/atv1/at1.js
UTF-8
1,014
4.96875
5
[]
no_license
//**1) Criar uma função de seta (arrow function) que recebe 2 parâmetros e retorna a multiplicação deles. **// //** a) Chamar a função e exibir o resultado no console.**// var mult = (valor1,valor2) => { let vlr = valor1 * valor2 return vlr } console.log(mult(2,3)) //**2) Criar uma função de seta (a...
true
5b54c42358d80cc1947fae7214ad2a0330df5f2e
JavaScript
grldchz/code-challenges
/diagonalDifference.js
UTF-8
492
3.625
4
[]
no_license
/** 3 11 2 4 4 5 6 10 8 -12 */ function diagonalDifference(arr) { let n; if(arr[0].length){ n = arr[0].length; } else{ n = arr.shift(); } let diag1 = 0, diag2 = 0; for(let i=0;i<n;i++){ if(Array.isArray(arr[i])){ for(let j=0;j<n;j++){ if (i == j){ diag1 += arr[i][j]; ...
true
7846f932e0d9e51f155afa915c48c797d313df2b
JavaScript
santoyoalfredo/Web-Development-Learning
/Keeper App/src/components/CreateArea.jsx
UTF-8
1,344
2.53125
3
[]
no_license
import React, { useState } from "react"; import Fab from '@material-ui/core/Fab'; import Add from '@material-ui/icons/Add'; import Zoom from '@material-ui/core/Zoom'; function CreateArea(props) { const [note, setNote] = useState({ title: "", content: "" }); const [focused, setFocus] = useState(false); fun...
true
a4c14c47a339cb79e3b1bdb3d8715d9e9779cc36
JavaScript
devSudhir/assignment
/src/Components/Pagination.jsx
UTF-8
901
2.765625
3
[]
no_license
import axios from "axios"; export const Pagination = (props) => { //console.log(props); let pages = new Array(props.numberOfPages).fill(0); const handleClick = async (value) => { const res = await axios.get( `http://localhost:8030/students/?page=${value}` ); console.log("male response"...
true
fadf32fef9a3d1338dc741402ff16ca20b33e302
JavaScript
theotime-me/pzm
/packages/ajax.js
UTF-8
2,745
2.6875
3
[]
no_license
/* PREVENT */if (typeof Prizm === "undefined") alert(`====== Prizm's core is missing ======\nYou have to install Prizm to continue\n>>>>>> https://bit.ly/prizm-js <<<<<<`); Prizm.data.ajax = {}; Prizm.ajax = ({ url, urls, method, callback, cb, data, async, headers, success, error, progress, parse, id}) => { // url: s...
true
76684e99f46bf7fc7db6afcf103266ef7eb84129
JavaScript
KeymoniSS/WEB151
/script.js
UTF-8
916
3.453125
3
[]
no_license
var insultParts = [{bodyPart: "ear", adjective: "hairy", animal: "rhino", animalpart: "butt"}, {bodyPart: "head", adjective: "slimy", animal: "pig", animalpart: "tail"}, {bodyPart: "nose", adjective: "crooked", animal: "boar", animalpart: "nose"}] ; var insult = {}; insult.randomize = function() { ...
true
492f82b0fcd8feba57f5fd03bef6637989fbbae1
JavaScript
2-water-my-plants/react
/waterplantsapp/src/components/UpdatePlant.js
UTF-8
2,543
2.625
3
[]
no_license
import React, { useState, useEffect } from 'react'; import { withRouter } from 'react-router'; import { axiosWithAuth } from '../authorization/axiosWithAuth.js'; import styled from "styled-components"; const Form = styled.form` display: flex; flex-direction: column; width: 800px; margin: 0 auto; align-items:...
true
a6edf4c3884c143449b44b2eb952d8f945ed17a5
JavaScript
andresfqm/SEA_WEB
/SEA/web/resources/js/scrollup.js
UTF-8
2,674
3.25
3
[]
no_license
//https://www.kirupa.com/html5/animated_scroll_to_top_with_easing.htm document.addEventListener("DOMContentLoaded", function () { "use strict" var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; var body...
true
53af9b07e6e88051c84d7915361b0f46c1d4863d
JavaScript
Linny1637314031/jikexueyuan-work
/test-06/01-full-calculator/calculator.js
UTF-8
4,921
3.890625
4
[]
no_license
//在计算机上显示当前时间 setInterval(function(){ var date = new Date(); var str = date.toLocaleString(); document.getElementById("time").innerText = str; },1000); //在开始函数之前要初始化 var num = 0, result = 0, numshow = 0; //数字为0,结果为0,显示器上的数字为0 var operate = 0; //判断输入状态的标志 var calcul = 0; //判断计算状态的标志 var quit = 0; //防止重复按键的标...
true
ccbeb3b130046e0c7a02a03ca486bec8b2992cfa
JavaScript
itzsaga/redux-dispatch-practice-v-000
/src/reducers/managePets.js
UTF-8
681
3.1875
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
'use strict' export let state export function managePets (state = { pets: [] }, action) { switch (action.type) { case 'ADD_PET': return { pets: [...state.pets, action.pet] } case 'REMOVE_PET': let removalIndex = state.pets.findIndex(x => x.id === action.id) return { pets: [...state.pets.sli...
true
2e7764a58002575d24f8b4596ffc6a0618ccadef
JavaScript
sanyamagrawal/hotel-booking
/scripts/main.js
UTF-8
16,485
2.75
3
[ "Unlicense" ]
permissive
/* This app has the following task completed and remaining are partially completed. STATUS : Complete : Imagine there's a json feed with hotels similar to the current one. Design the json format and use it to display similar hotels on the page. Improve the room table. Some ideas you may consider: allow the user to sort...
true
dd373434dc008c011e27bfb28ec998629f252179
JavaScript
JimenaMV/Event-delegation
/event delegation/app.js
UTF-8
2,338
3.609375
4
[]
no_license
console.log("works"); /* Variabes globales */ //Nodos const buttonGetButtons = document.querySelector("#btnBotones"); const allButtons = document.querySelector("#botones"); const background = document.querySelector("#background"); // let eventDelegation = document.querySelector(e.target.classList[1]); //Listeners /...
true
6c30a6fe4ef43abedaa51e27cd0fc53ade96c3d6
JavaScript
Anonymous08-sr/Frontend-Task
/src/components/utils.js
UTF-8
184
3.703125
4
[]
no_license
export function resolveAfterFewSeconds(delay = 500) { return new Promise((resolve) => { setTimeout(() => { resolve("resolved"); }, delay); }); }
true
3cfb7c1b54c5a8bac705c6cb4ad2e3a0f6c8c42d
JavaScript
raqib-rasheed/video-project-react
/src/App.js
UTF-8
758
2.515625
3
[]
no_license
import React from 'react' import './App.css'; import video from "./util/forest_fire_mountains_natural_disaster_634.mp4" function App() { const [playing,setPlaying] = React.useState(true) function controlVideo(e){ let video = e.target.parentElement.parentNode.firstChild setPlaying(!playing) playing?vid...
true
0d956d7ce113f0f11ccf0912fff48fca9e88a8c8
JavaScript
yassineabdelmoula/js-checkpoint
/GOMYCODE/js/main.js
UTF-8
815
3.21875
3
[]
no_license
function bold() { var a = document.getElementById("baby"); if (a.style.fontWeight=="bold") a.style.fontWeight="inherit"; else a.style.fontWeight="bold"; } function underline() { var a = document.getElementById("baby"); if (a.style.textDecoration=="underline") a.style.tex...
true
4e719467e98851784e27b6e0e48575dbb3d7540e
JavaScript
capn-21/vs-code-web-dev
/format.js
UTF-8
521
2.859375
3
[]
no_license
function validateForm() { var name = form["name"].value; if (name === "") { alert("First name cannot be left blank."); return false; } var name = form["phone"].value; if (name === "") { alert("phone cannot be left blank."); return ...
true
d2637d4becf24bc250e7ce7370703e21e9a5c643
JavaScript
jl-fb/zygo-challenge
/src/utils/LocalStorage.js
UTF-8
776
2.9375
3
[]
no_license
import { LocalStorage } from "quasar"; export function getFromLocalStorage(key) { try { return LocalStorage.getItem(key); } catch (error) { console.error("Erro ao recuperar tarefa no localStorage"); } } export function setToLocalStorage(key, value) { try { /* NOTE O Quasar recupera dados co...
true
10968de52423a82d538d2b3329cc7c904104d1dd
JavaScript
calbertts/martian-robots
/src/core/robot.js
UTF-8
2,307
3
3
[]
no_license
const { once, EventEmitter } = require('events'); const events = require('./events'); class Robot { constructor(robotInfo, messenger) { const { x, y, orientation } = this._getParts(robotInfo); this.x = Number(x); this.y = Number(y); this.orientation = orientation;...
true
3cbc0dbed89a3f8d5fe503fc3b5487abe3335717
JavaScript
matthewpalmer/stockalert-scraper
/notifier.js
UTF-8
5,649
3.03125
3
[]
no_license
/* make an array of keys with currentalerts and their respective user by looping through users in db and getting their currentalerts array, then concat these into the userscurrentalerts array loop through the userscurrentalerts array and perform stockScraper on it check if any of the prices/tickers present have ...
true
46ec1686c62091088c9b83386d0ad63d2f41c3fb
JavaScript
Lelith/adventofcode20
/day14/part1.js
UTF-8
1,144
2.96875
3
[ "MIT" ]
permissive
const utils = require('../utils'); function applyBitMask(mask, value) { const newValue = [...value]; mask.forEach((item, i) => { if (item !== 'X') { newValue[i] = item; } }); return newValue.join(''); } function executeProgram(programm) { let mask = ''; const memory = []; programm.forEach((...
true
d8fe9785c379309438feda8ff167b196dacee6f1
JavaScript
pinstripeninjas/mobile-aviation
/src/components/MatrixLine/MatrixLine.jsx
UTF-8
1,867
2.796875
3
[]
no_license
import React, { Component, Fragment } from "react"; import Criteria from "../Criteria/Criteria"; import "./MatrixLine.css"; class MatrixLine extends Component { state = { clickCriteria: false, criteriaLocation: 0, }; render() { let { name, dataType, category, value, criteria } = this.props; // set initial...
true
986ca4a4a6077ab7878d396440d3bf0968c401f6
JavaScript
LuisCondeesnayra/simongame
/index.js
UTF-8
2,366
2.828125
3
[]
no_license
$(".container").hide(); var colores = ["red", "green", "blue", "yellow"]; var arregloJugador = []; var audio; var nivel = 0; var contador=0; var score=0; var arregloSecuencia = []; $(document).keypress(function(event) { console.log(event.key); if (event.key == "Enter" && nivel == 0) { $("#title").htm...
true
ab9e9387e5d949e00b9f5ce531bb93f7e3029e73
JavaScript
sheltoG/pomodoro-timer
/script.js
UTF-8
496
3.578125
4
[]
no_license
var timer = 1500; var secondsRemaining; var interval; function convertSeconds(timer) { var min = Math.floor (timer / 60); var sec = timer - (min * 60); //add a leading zero (as a string value) if seconds less than 10 if (sec < 10) { sec = "0" + sec; } return min + ':' + sec; } //timer Function function myTimer(...
true
2875bb5f698de724f6bf189696cb9821d88ead74
JavaScript
dreamyguy/gitinsight
/backend/helpers/arrayMaxMin.js
UTF-8
305
3.328125
3
[ "MIT", "LicenseRef-scancode-proprietary-license" ]
permissive
/* jshint esversion: 6 */ // Get max/min number in array: max | min // ------------------------------------------------------------ module.exports = function(arr, type) { var n; if (type == 'max') { n = Math.max(...arr); } else if (type == 'min') { n = Math.min(...arr); } return n; };
true
6034e64dde8af6712b571c9a736eaec0ac882fe2
JavaScript
shikhasharma2610/Basic-consepts-of-javascript
/iterator/project1.js
UTF-8
665
3.484375
3
[]
no_license
function myiterator(array){ let counter=0; return { next: function(){ if(counter<array.length){ counter++; return{ done:false, value:counter }; }else{ return{ ...
true
ff01692f4bee0ea7619a824fa5be98bf85143349
JavaScript
k8s-study/report-service
/src/validators.js
UTF-8
2,713
2.640625
3
[ "MIT" ]
permissive
const validator = require('validator'); const moment = require('moment'); const DATE_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSZ'; const commonValidators = { url: { required: true, validate: value => validator.isURL(value, { require_protocol: true }), message: 'invalid URL format', }, datetim...
true
09dab74bc7260b9003b0e07483a9f52f0fdca4b9
JavaScript
kalibani/transaction_list
/src/utils/helper.js
UTF-8
904
2.953125
3
[]
no_license
export const formatDate = (date) => { const d = new Date(date); const years = new Intl.DateTimeFormat('id', { year: 'numeric' }).format(d); const month = new Intl.DateTimeFormat('id', { month: 'long' }).format(d); const days = new Intl.DateTimeFormat('id', { day: '2-digit' }).format(d); const formatted = `${d...
true
49bddd3d10ba2a3f8f6978383b78a8c7fdc6bfc2
JavaScript
skyhacker2/online_testing_system
/testing_web/src/main/webapp/static/test/spec/mocha/rfl/array.js
UTF-8
1,599
3.0625
3
[]
no_license
define(['rfl'], function(rfl) { var array = rfl.array; describe('rfl#array', function() { describe('#isArray', function() { it('[] should be array.', function() { expect(array.isArray([])).to.be.ok(); }); it('Number should not be array.', function() { expect(array.isArray(123)).to.not.be.ok...
true
eac38e299017ed7a427eacce6f4ecad834ed3319
JavaScript
UzaiSindiko/fancy-todo-1
/client/js/apis.js
UTF-8
713
2.796875
3
[]
no_license
$(document).ready(()=>{ if(localStorage.getItem('token')){ fetchNews() } }) function fetchNews(){ $.ajax({ method: 'get', url: `${baseUrl}/apis/news` }) .done(news =>{ $('#news-list').html('') news.articles.forEach(newsdata => { printNews(newsda...
true
6f3984d4451acf208358c99d9f064234923a1141
JavaScript
ChanGarciaV/Jquery
/JQUery/Chapter04/listings/4.1.js
UTF-8
1,062
2.546875
3
[ "MIT" ]
permissive
$(() => { $('#switcher-large') .click(() => { }); // const $firstPara = $('p') .eq(1) .hide(); // .fadeOut(1000); // $('a.more') // el selector puede ser por ID o por clase // .click((e) => { // funcion flecha // e.preventDefault(); // if ($firstPara.is(':hidden')) { // ...
true
d3da0ca74fba93fd3f51af57f77f75b7a2967e6b
JavaScript
gusevroman/redux-location-state
/src/helpers.js
UTF-8
3,935
2.53125
3
[ "Apache-2.0" ]
permissive
import lodashGet from 'lodash/get'; import lodashIsEqual from 'lodash/isEqual'; import lodashSet from 'lodash/set'; export const RLSCONFIG = 'RLSCONFIG'; export const OVERWRITE_ACCESSORS = 'overwrite-accessors'; const helperAccessors = { get: lodashGet, set: lodashSet, isEqual: lodashIsEqual, }; let paramEncod...
true
4e3f470ea5b4e9bcb987a7e4757c9a665be8b600
JavaScript
kherr9/SimpleUptime
/src/SimpleUptime.WebApp/src/CheckService.js
UTF-8
850
2.53125
3
[]
no_license
export default class CheckService { constructor(baseUrl) { this.baseUrl = baseUrl; } getChecks() { return fetch(this.baseUrl + '/api/httpmonitors') .then(function (response) { return response.json(); }); } addCheck(check) { return fet...
true
5ac49617ff86b9b955a0600fdbfa0b88ff64278e
JavaScript
jinhujie/exercise-for-Front-End-Interview-Notebook
/1-js/__tests__/1-50.test.js
UTF-8
957
3.15625
3
[]
no_license
import { operatorNew } from '../1-5'; test('1-50 called operatorNew("")', () => { expect(() => operatorNew('')).toThrow(TypeError) }); test('1-50 called operatorNew(() => ())', () => { function Foo(){} expect(operatorNew(Foo)).toStrictEqual(new Foo()); }); test('1-50 called operatorNew(() => null)', () => { fu...
true
6a1e53ef24c540b089828603c6f3e9beefa24023
JavaScript
Nandhini31/SB
/src/store/reducers/todos.js
UTF-8
1,686
2.828125
3
[]
no_license
import {ADD_TODO, REMOVE_TODO, TOGGLE_TODO} from "../constants" import moment from "moment" let todoId = 0 const initialState = { listOfLists: [{ name: "Team to do list", id: 0, createdDate: moment().format('dddd D MMMM'), todos: [] }] } export const todos = (state = initialState, action) => { ...
true
b870024718ea8156861cbf4278f45c600562290e
JavaScript
vschau/CrkingtheCode
/1-ArraysAndStrings/6-StringCompression.js
UTF-8
892
4.28125
4
[]
no_license
// Implement a method to perform basic string compression using the counts // of repeated characters. For example, the string aabcccccaaa would become a2blc5a3. If the // "compressed" string would not become smaller than the original string, your method should return // the original string. You can assume the string ha...
true
833b2c1a725e2091f8c193e979635ee1c1d46d5b
JavaScript
umamiMike/archived_projects
/web/Ep-Js-Base-Converter/js/scripts.js
UTF-8
562
2.90625
3
[]
no_license
var baseConvert = function(input, baseFrom, baseTo) { //console.log(input,baseFrom,baseTo); return parseInt(input, baseFrom).toString(baseTo); //return '11'; }; $(document).ready(function() { $("form#baseconvert").submit(function(event){ var input = $("input#target").val(); var baseFr...
true
c24b1d99d0a5779762cba4c69facdfb2cc32a571
JavaScript
pannelltyler91/chatt_app
/src/components/MyProfile.jsx
UTF-8
3,158
2.703125
3
[]
no_license
import { useState, useEffect } from "react"; const MyProfile = () => { const [currentUser, setcurrentUser] = useState(""); const [users, setUsers] = useState([]); const _handleSubmit = (e)=>{ e.preventDefault(); console.log(e.target.fn.value,e.target.ln.value,e.target.un.value,e.target.pw.value,e.ta...
true
7094985b6af1d525073c7ef6b58ba7b111429ff6
JavaScript
VioletteJacobs/date-js
/public/js/main.js
UTF-8
535
4.03125
4
[]
no_license
// # Exercice 3 // - Créer un programme qui va nous afficher la date d'aujourd'hui avec le format jj/dd/aaaa // méthode forcée // let jour= prompt("quel jour sommes nous? JJ") // let mois = prompt("Quel mois? MM") // let annee = prompt ("quelle année AA" ) // let date= ()=>{ // alert (`Nous sommes le ${jour}/$...
true
cb206711e9688b2958bd46f44f6a8da363b40cc2
JavaScript
AAI-USZ/FixJS
/input/50-100/after/4a575ea9afb1a97ea04dc2e1119f4e5ce5c5f37a_3_1.js
UTF-8
274
2.640625
3
[ "MIT" ]
permissive
function(chain){ // this is "after" chain var l = chain.length, f; return !l ? 0 : l == 1 ? (f = chain[0], function(){ f.apply(this, arguments); }) : function(){ for(var i = 0; i < l; ++i){ chain[i].apply(this, arguments); } }; }
true
760adedcd8701c363a9364bc93ba60ee16c41acc
JavaScript
bachloxo/learn_code
/removeArrayPart.js
UTF-8
496
4.3125
4
[]
no_license
/* Remove a part of a given array between given 0-based indexes l and r (inclusive). Example For inputArray = [2, 3, 2, 3, 4, 5], l = 2, and r = 4, the output should be removeArrayPart(inputArray, l, r) = [2, 3, 5]. */ function removeArrayPart(inputArray, l, r) { // Delete from l until r - l + 1 to include r /...
true
0b9b0939e23b85037caec27a0ed69727010bd230
JavaScript
gaurav-tb/crm-old
/scripts/cal.js
UTF-8
1,661
2.609375
3
[]
no_license
window.onload = function(){ g_globalObject = new JsDatePick({ useMode:1, isStripped:true, target:"div3_example" /*selectedDate:{ This is an example of what the full configuration offers. day:5, For full documentation about these settings please see the full version of the code. ...
true
76b6c34a4f83f4ccfef0cac47969898ce48dd8ad
JavaScript
biglianmao/pcmStreamPlayer
/src/lib/stream-player.js
UTF-8
5,651
2.859375
3
[ "MIT" ]
permissive
mport wavify from "./wavify"; import concat from "./concat"; const pad = buffer => { const currentSample = new Float32Array(1); buffer.copyFromChannel(currentSample, 0, 0); let wasPositive = currentSample[0] > 0; for (let i = 0; i < buffer.length; i += 1) { buffer.copyFromChannel(currentSamp...
true
4abde13e089f90ff53546d838946a554d6de9506
JavaScript
geishoui/maplecheck2
/script.js
UTF-8
2,282
3.109375
3
[]
no_license
var score = 4; var score1 = 1; var score2 = 1; var score3 = 1; var score4 = 1; var rank_name; function onChanged(n,ab){ document.getElementById('btn'+n).disabled = false; if(n==1){ if(ab=='A'){ score1 = 1; } else { score1 = 0;} } if(n==2){ if(ab=='B'){ score2 = 1; } else...
true
a57d52cf2517e7c68ecdd1ad4ebbac3bcdf068b6
JavaScript
kurdin/nyama
/framework/helpers/underscore/str.js
UTF-8
1,323
3
3
[ "BSD-3-Clause" ]
permissive
/** * Helper library contains functional of underscore library * and additional functions for Nyama framework. * * @author Dmitriy Yurchenko <evildev@evildev.ru> * @link http://nyama.evildev.ru/ * @copyright Copyright (c) Dmitriy Yurchenko <evildev@evildev.ru>, 2014 * @license http://nyama.evildev.ru/license/ *...
true
3822ca6eac9cf1cb20441664daeb897efbb6b6af
JavaScript
ycccccccyc/INUNKNOWN_RN
/scripts/image_utils.js
UTF-8
2,967
2.59375
3
[]
no_license
/** * @license * Copyright 2019 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requ...
true
e3eb486af23b856c12552fe95b5a9a144c0bc263
JavaScript
gcontrol/GravityPrototype
/js/js-CanvasController.js
UTF-8
1,375
2.609375
3
[]
no_license
var CanvasController = Class.extend({ init: function() { this.canvas = document.getElementById('canvas'); this.context = this.canvas.getContext('2d'); //this.canvas = new Raphael(document.getElementById('page'), 2000, 2000); //Raphael(parseInt($('.feed_panel').css('width').replace('px', '')...
true
1a0888c3a9eb13c1462716a0d1cb594aa17a8e1a
JavaScript
PrestonLaw/CSE535-Project4
/server/assets/js/animation.js
UTF-8
4,626
2.671875
3
[]
no_license
// javascript. var stopwords = ["a", "about", "above", "after", "again", "against", "all", "am", "an", "and", "any","are","aren't", "as","at","be","because","been","before","being","below","between","both","but","by","can't","cannot","could","couldn't", "did","didn't","do","does","doesn't","doing","don't","down","duri...
true
547c54b7d45799fbcab0ef02935fb215fafd9a1d
JavaScript
KatGitHub/Telerik-Academy-Homeworks
/JavaScript Fundamentals/Functions/scripts.js
WINDOWS-1258
5,520
4.21875
4
[]
no_license
//Problem 1. Write a function that returns the last digit of given integer as an English word. var num = -1267; console.log('Problem 1 output:'); console.log('test number: ' + num); console.log(returnLastDigitAsWord(num)); function returnLastDigitAsWord(n) { return returnDigitAsWord(returnLastDigit(n)); } functi...
true
b0f0742a65f43858d20264ffde8d60e828d7c3f7
JavaScript
beck410/Library_App
/app/js/library/library.factories.js
UTF-8
2,123
2.515625
3
[ "MIT" ]
permissive
;(function(){ 'use strict'; angular.module('Library') .factory('libFactory', function($http, $location, FIREBASE_URL){ function _libraryUrl(id){ if(id){ return FIREBASE_URL + 'books/' + id + '.json'; } else { return FIREBASE_URL + 'books.json'; } ...
true