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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
dc767dfabafb68c5778b5ea4d86532c79d2cf959 | JavaScript | AlesiaSk/MRZ2 | /matrix.js | UTF-8 | 10,422 | 3.375 | 3 | [] | no_license | /* Автор - Скороход Алеся */
var T1 = 0;
var Tn = 0;
var sumNum = 0;
var Lavg = 0;
var modTime = document.getElementById("modTime").value;
var sumTime = document.getElementById("sumTime").value;
var subTime = document.getElementById("subTime").value;
var compTime = document.getElementById("compTime").value;
var sqTim... | true |
460eeee59c1c9e552774a47a217606c78d61801f | JavaScript | h-enjin/Study | /JavaScript/minigame1/main.js | UTF-8 | 4,088 | 2.828125 | 3 | [] | no_license | enchant();
window.onload = function() {
core = new Core(320, 320);
core.fps = 16;
// ゲームで使用するファイル読み込み
core.preload('chara0.png', 'map2.png', 'clear.png');
core.onload = function() {
// バックグラウンドのスプライト作成
var bg = new Sprite(320, 320);
bg.backgroundColor = "#4abafa";
// サーフィス作成
var image = new Surface(32... | true |
d6a59e6a57289c87069a1a97f7fc454a1493e3d2 | JavaScript | maotinggang/car-data | /src/lib/zone.js | UTF-8 | 1,014 | 2.765625 | 3 | [] | no_license | import math from 'lodash/math'
/**
*@description 判断点是否在多边形内
* @param {Object} data
* @returns {Boolean}
*/
const isInner = (testPointX, testPointY, pointsX, pointsY, callback) => {
let ptNum = pointsX.length
let result = false
let pointMinX = math.min(pointsX)
let pointMinY = math.min(pointsY)
let pointMa... | true |
e0c8b974d83b000f27978ec22fbea22615b62e17 | JavaScript | Jaharim/JS-Array-Challenge | /Challenge/harrykim14/forEachReduce/solve.js | UTF-8 | 109 | 2.921875 | 3 | [
"MIT"
] | permissive | const inputArray = [100, 10, 20, 40];
// write your codes
let sum = 0;
inputArray.forEach(el => sum += el);
| true |
b685172a03aca9d8b08e8d679ab3f8e608988e47 | JavaScript | fangjj/meteor-down | /lib/stats.js | UTF-8 | 1,237 | 2.875 | 3 | [
"MIT"
] | permissive | var _ = require('underscore');
function Stats () {
this.reset();
}
Stats.prototype.reset = function() {
this.start = new Date();
this.data = {};
}
Stats.prototype.track = function (type, name, value) {
this.data[type] = this.data[type] || {};
this.data[type][name] = this.data[type][name] || [];
this.data... | true |
126265e8cb1855be1c8a88eb5e9e41eca8248225 | JavaScript | fugitivelabs/yote-cli | /lib/v_0.7.0/templates/client/components/Update.js.jsx | UTF-8 | 3,342 | 2.546875 | 3 | [] | no_license | /**
* Updates a single __name__ from a copy of the selcted __name__
* as defined in the __name__ reducer
*/
// import primary libraries
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
// import third-party libraries
import _ from 'loda... | true |
9965b0bf6ad5ca34104f85d870d265bc288c1c1b | JavaScript | amm834/nodeJS | /008 - Event Emitter With Parameter.js | UTF-8 | 194 | 2.796875 | 3 | [] | no_license | const EventEmitter = require("events");
var myEmitter = new EventEmitter();
myEmitter.on('doIt', function(action) {
console.log(`I am doing ${action}.`)
});
myEmitter.emit('doIt', 'Homework'); | true |
77b7e248a49fdf9954ef8fff192796b3462de197 | JavaScript | joelamajors/TreehouseCourses | /JavaScript/JavaScript_and_the_DOM/2-getting-a-handle-on-the-DOM/vid-3-select-element-by-type/start/app.js | UTF-8 | 635 | 3.75 | 4 | [] | no_license | /* jshint esversion: 6 */
/*
const myHeading = document.getElementsByTagName('h1')[0];
const myButton = document.getElementById('myButton');
const myTextInput = document.getElementById('myTextInput');
// what about an element that doesn't have an id?
// const myParagraph = document.getElementsByTagName('p');
// but ... | true |
4a38b004cf69579fc48726f46a567e4dffee0ebe | JavaScript | victor-enogwe/url-shortener | /routes/index.js | UTF-8 | 2,020 | 2.75 | 3 | [] | no_license | var express = require('express');
var router = express.Router();
if (typeof localStorage === "undefined" || localStorage === null) {
var LocalStorage = require('node-localstorage').LocalStorage;
localStorage = new LocalStorage('./storage');
}
/* GET home page. */
router.get('/', function(req, res, next) {
res.re... | true |
afebac67937ccb80aed1e1dca780ea197319f44d | JavaScript | daviale/pronodejs | /MODULARIII-BACKEND/src/middlewares/authJwt.js | UTF-8 | 2,237 | 2.546875 | 3 | [] | no_license | import jwt from "jsonwebtoken";
import config from "../config";
import User from "../models/User";
import Role from "../models/Role";
// d verificar token
export const verifyToken = async (req, res, next) => {
let token = req.headers["x-access-token"];
if (!token) return res.status(403).json({ message: "No token... | true |
0983e1089157e7b097c89fd4f8f1f3639d03b895 | JavaScript | nickstav/Geohash | /src/Algorithms/userLocation.js | UTF-8 | 1,122 | 3.34375 | 3 | [] | no_license | async function getUserLocation() {
if (navigator.geolocation) {
console.log("geolocation available");
let position = await getCoords();
return {
latitude: position.coords.latitude,
longitude: position.coords.longitude
};
} else {
console.log('geolo... | true |
03ff44a407951b30b91054b2f0361c7e4138922f | JavaScript | Sphinm/ego | /js/upload/tag.js | UTF-8 | 5,235 | 2.90625 | 3 | [] | no_license | /**
* Tag
* 自定义标签组件
* */
(function () {
var html = `<div class="m-tag">
<div class="f-cb">
<label class="tag_title">标签</label>
<ul class="tag_list"></ul>
</div>
<div class="f-cb">
<label class="tag_recommend">推荐标签</label>
<ul class="tag_rec_list"></ul>
</div>
</div>`;
function Tag(opt... | true |
1f57b9990a6e3a0771f809ae10c30c32a23bfe75 | JavaScript | fakhrulislam684boss/gallary-image-project | /index.js | UTF-8 | 221 | 2.90625 | 3 | [] | no_license | let currentImg = document.querySelector('#currentImg')
let imgs = document.querySelectorAll('.imgs')
imgs.forEach(img =>{
img.addEventListener('click',(e)=>{
currentImg.src = e.target.src
})
})
| true |
fd5b84c81e6e18940ae1332ac3a3aba778065f9d | JavaScript | vlilja/Lunabrackets | /Front/src/js/helpers/helper.js | UTF-8 | 2,660 | 2.84375 | 3 | [] | no_license | import phrases from '../../Phrases';
import eightBall from '../../images/8ball.png';
import nineBall from '../../images/9ball.png';
import tenBall from '../../images/10ball.png';
import straightPool from '../../images/rackedballs.jpg';
function findHighestScore(player) {
let highestScore = 0;
if (player.leagues) {... | true |
b0e6fd588b410685ce8e8f41f195c6156b20026c | JavaScript | aphy18/Buy-Sell-Listing-Website | /routes/search.js | UTF-8 | 2,415 | 2.6875 | 3 | [] | no_license | const express = require('express');
const router = express.Router();
module.exports = (db) => {
// GET /search
router.get("/", (req, res) => {
const templateVars = { id: req.session['userID'], arrayofcars: undefined}
return res.render('search', templateVars);
});
router.post("/", (req, res) => {
... | true |
e1fc5515ef5a48ffa3820254e8b5e7b6008b05a9 | JavaScript | tylertsui/EnsembleInterview | /src/components/FilmDetails.js | UTF-8 | 4,074 | 2.625 | 3 | [] | no_license | import React, { useState, useEffect } from "react";
import axios from "axios";
import { Link } from "react-router-dom";
import { useLocation } from "react-router";
import { specie_link, world_link, vehicle_link, starship_link, film_character_link } from "../strings/String";
import LinkBlockList from "../common/LinkBlo... | true |
15a1442dcdafe8f1f8b4f2ae89a892fff1b72599 | JavaScript | indecisiveid/bread-neverthanksupport | /templates/updated-template/static/js/like_button.js | UTF-8 | 796 | 3.296875 | 3 | [
"MIT",
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | 'use strict';
const e = React.createElement;
class LikeButton extends React.Component {
constructor(props) {
super(props);
this.state = { liked: false,
thing: 'Hi' };
}
componentDidMount(){
this.getHelloWorld();
}
getHelloWorld() {
fetch('/api').then(res => res.json()).then(data => {... | true |
4498d7c7f72e72929391941ae1683021fa46fa55 | JavaScript | zjt86/textfield-rotate-placeholder | /dist/script.js | UTF-8 | 1,274 | 2.703125 | 3 | [
"MIT"
] | permissive | new Vue({
el: '#app',
data: {
keywords: [
'iPad Pro',
'Macbook Pro',
'iMac',
'iPhone',
],
isFocusing: false,
currentIndex: 0,
animationTriggerFlag: true,
},
computed: {
before() {
let keyword = this.keywords[this.currentIndex]
return (this.isFocusing) ... | true |
033eba3ac852dbd57143b0a4fcba7ba3a28349d2 | JavaScript | vunv-altplusvn/chat-pdo | /js/common.js | UTF-8 | 4,114 | 2.546875 | 3 | [] | no_license | $(document).ready(function () {
contentBox = $('#content-box');
message = $('#message');
contentBox.scrollTop(contentBox[0].scrollHeight);
// click send button
$('#send').click(function () {
sendMessage();
});
// press enter
$('#message').pressEnter(function () {
sendMessage();
});
$('div.m input[type=... | true |
69d6ac15361bb1746d70888a14bb2f7ea34da3b2 | JavaScript | DEMENYACA/Front-End | /form.js | UTF-8 | 1,296 | 2.765625 | 3 | [] | no_license | <<<<<<< HEAD
var first_name=document.getElementById("first_name");
var last_name=document.getElementById("last_name");
var e_mail=document.getElementById("e_mail");
document.getElementById("sub1").addEventListener("click",displayThankYou);
function displayThankYou(){
document.getElementById("name").innerHTML = "T... | true |
75888b5759b8ddf981762a3447d28da9eac0559c | JavaScript | wgoltz/lcgv2 | /00_util.js | UTF-8 | 9,658 | 2.75 | 3 | [] | no_license | //const opType = {
// MORE_EQUAL: 1,
// LESS_EQUAL: 2
//}
//Array.prototype.arrayOfPointsSortedByJD_FindIndex = function(optype, value)
//{
// var t = Object(this)
// var length = t.length
// if (length == 0)
// return null // empty array
// var jd
// var maxI = length - 1
... | true |
7ec6c2718702d7f8d4a473de5ffc40e6f09486d8 | JavaScript | lhy-1227/copy_museum | /copy_museum/public/login/index.js | UTF-8 | 2,162 | 2.625 | 3 | [] | no_license | const initBlocks = function () {
var backArea = $("#backArea");
for (let i = 0; i < 3; i++) {
let left = Math.random() * 100 + "%";
let top = Math.random() * 100 + "%";
let style = "left:" + left + "; top:" + top + ";";
let tempELement = "<div class='unangular-rectangle' style=... | true |
3573690743ccdfa62a1c9d582af3ff6a124a0d2f | JavaScript | accodeing/code-challenges | /10 - Web word count/Hannes/count.js | UTF-8 | 439 | 3.578125 | 4 | [] | no_license | var wordElement = document.getElementById('word');
var letterElement = document.getElementById('letter');
var resultElement = document.getElementById('result');
var countLetters = function() {
countOccurrences(letterElement.value, wordElement.value);
};
var countOccurrences = function(letter, word) {
var regExp =... | true |
bbc9b2962f0a5b49e4606b2657ba373277376603 | JavaScript | aaaasmile/cupservice | /static/js/local/gfx/static-scene-gfx.js | UTF-8 | 6,773 | 2.546875 | 3 | [
"MIT"
] | permissive | import Helper from '../shared/helper.js?version=100'
export class StaticSceneGfx {
constructor() {
this._backSprite = null
this._container = null
this._sorted_list = []
this._component_in_front = null
this._components = new Map()
this._isDirty = false
this._canvas_h = 0
this._canvas_w... | true |
57722727cb36aa58f73a36dab540f5e778822bd5 | JavaScript | UA-SRC-data/GardenRootsWeb | /www/js/view/SmallHistogram.js | UTF-8 | 2,951 | 2.765625 | 3 | [] | no_license | class SmallHistogram extends Histogram {
contaminant;
cover;
greyBackGround;
text;
selectContaminant;
/**
* This is the constructor
* @param {D3Selection} svg - the main svg dom
* @param {Controller} controller - a instance of controller object
* @param {string} translate
... | true |
2cc758a64e277777869722564de7e7d551c0c8cf | JavaScript | RUPAAK/SOCIO_APP | /models/userModel.js | UTF-8 | 1,129 | 2.5625 | 3 | [] | no_license | const mongoose= require('mongoose')
const bcrypt= require('bcryptjs')
const userSchema= mongoose.Schema({
username:{type: String, required: true, min:3, max: 20, unique: true},
email: {type: String, require: true, max: 50, unique: true},
password: {type: String, require: true, min: 6},
profilePicture: ... | true |
d6caf63258299015fe4dde95b0578b3d4c10e60e | JavaScript | benjaminhuanghuang/redux-skypey | /src/components/Main.js | UTF-8 | 739 | 2.671875 | 3 | [] | no_license | /*
By default activeUserId will be null, then <Empty /> will be shown.
As soon as a user is clicked, the activeUserId becomes the user_id of the clicked contact,
<Main /> will render the conversations of the clicked user by <ChatWindow /> component.
*/
import React from "react";
import "./Main.css";
import Empt... | true |
676e1d9e603f101e076c05ee328274b807ed88a0 | JavaScript | wstaszewski/codewars | /js/BitCounting.js | UTF-8 | 141 | 3.140625 | 3 | [] | no_license | var countBits = function(n) {
const base = (n).toString(2).split('');
return base.reduce((sum, num) => sum + Number(num), 0);;
}; | true |
136de20ccf4eaeb0330394ba53253a3ed0c367fb | JavaScript | Barandis/kessel | /src/combinators/chaining.js | UTF-8 | 13,936 | 2.875 | 3 | [
"MIT"
] | permissive | // Copyright (c) 2020 Thomas J. Otterson
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import {
argFnFormatter,
argNumFormatter,
argParFormatter,
argStrFormatter,
assertArray,
assertFunction,
assertNumber,
assertParser,
assertString,
formatter,
} from... | true |
87bc1b919dafa6f839a51981eac8c59edf4910b0 | JavaScript | Webini/toto-transcoder | /src/media.js | UTF-8 | 7,240 | 2.71875 | 3 | [] | no_license | const assert = require('assert');
const forcedRegex = /force/i; //to find forced subtitles
const _ = require('lodash');
const FFmpeg = require('fluent-ffmpeg');
/**
* Find all tracks for a given codec and a specific regex
* @param {String} codeType Code type name => video, audio, subtitle ...
*... | true |
e87689aaeff448b3ea8762a37f52cf97fb6607c4 | JavaScript | lmnnarciso/lightweight-charts | /lib/prod/src/formatters/volume-formatter.js | UTF-8 | 1,442 | 2.90625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | var VolumeFormatter = /** @class */ (function () {
function VolumeFormatter(precision) {
this._private__precision = precision;
}
VolumeFormatter.prototype.format = function (vol) {
var sign = '';
if (vol < 0) {
sign = '-';
vol = -vol;
}
if (vol... | true |
642fbcfc9b70de95a6e8a35c76da07d2827f580f | JavaScript | LukaszSarzynski/CodeCombat-solutions | /forest/return-to-thornbush-farm.js | UTF-8 | 632 | 3.671875 | 4 | [
"MIT"
] | permissive | // The function maybeBuildTrap defines TWO parameters!
function maybeBuildTrap(x, y) {
// Use x and y as the coordinates to move to.
hero.moveXY(x, y);
var enemy = hero.findNearestEnemy();
if(enemy) {
// Use buildXY to build a "fire-trap" at the given x and y.
hero.buildXY("fire-trap", x... | true |
6c44984019d42b26ca162858bbb77d5aea119dc8 | JavaScript | uselessaddress/WebDevelop | /形形色色的下拉菜单/IE浏览器判断代码.js | UTF-8 | 507 | 2.828125 | 3 | [] | no_license | window.onload = function(){
var isIE = !!window.ActiveXObject;
var isIE6 = isIE && !window.XMLHttpRequest;
if(isIE6){
var Lis = document.getElementsByTagName("li");
for(var i = 0;i<Lis.length;i++){
Lis[i].onmouseover = funcion(){
var u = this.getElementsByTagName("ul")[0];
if(u!=undefined){
u.sty... | true |
003e461dc6fdb89802cc43c66c1569146ecbaa24 | JavaScript | JGovreau/Full-Stack-Course-2020 | /part3/phonebook/mongo.js | UTF-8 | 1,105 | 3.109375 | 3 | [] | no_license | const mongoose = require('mongoose')
const addPerson = (name, phone) => {
const person = new Person({
name: name,
phone: phone
})
person.save().then(result => {
console.log(`Added person!`)
mongoose.connection.close()
})
}
const displayPeople = () => {
console.log("Phonebook:")
Person.f... | true |
7a436d849c7807cd177db50479478b96eb131ab6 | JavaScript | mottaquikarim/JavaScriptDevelopmentRemote | /Lecture_19/class_notes/webtask.simple.js | UTF-8 | 2,185 | 2.515625 | 3 | [] | no_license | const airtableBase = (config) => {
// destructing
const {apiKey, baseId} = config;
const Airtable = require('airtable');
const base = new Airtable({apiKey: apiKey}).base(baseId);
const selectionOpts = {
maxRecords: 99,
view: "Grid view"
}
return {
list: () => {
return new Promise((resolve, rejec... | true |
5ae7fec960fa319ea6f0826b91901e7ce9a75b9d | JavaScript | Riya-Soni/JavaScript | /output.js | UTF-8 | 677 | 3.484375 | 3 | [] | no_license | //q6 What will be the output of the code below?
var Y = 1;
if (function F(){})
{
y += Typeof F;//unexpected identifier
</span>
}
console.log(y);
/* q11 What will be the output of the following code?
var Employee =
{
company: 'xyz'
}
var Emp1 = Object.create(employee);
delete Emp1.company Console.log(emp1.company);//u... | true |
b8625e930fd6508c3513cf92586877263d1a3657 | JavaScript | okwolf/fxchain | /src/makeFxRuntime.js | UTF-8 | 2,380 | 2.578125 | 3 | [] | no_license | const { isFn, isArray, isFx, isObj } = require("./utils");
const makeQueue = (queue = []) => ({
enqueue: queue.push.bind(queue),
dequeue: queue.shift.bind(queue),
clear: () => (queue.length = 0),
notEmpty: () => queue.length > 0
});
module.exports = ({
state: initialState = {},
mergeState = (lastState, ne... | true |
7c535818f84e36de985d68b103c8fc1060d45f26 | JavaScript | 401-advanced-javascript-MichaelEclavea/data-structures-aglorithms-401 | /code-challenges/sort/sort.js | UTF-8 | 781 | 3.265625 | 3 | [
"MIT"
] | permissive | 'use strict';
// let array = [8,4,23,42,16,15];
function insertionSort(arr){
let newArray = [];
newArray = arr.sort(function(a, b){
return a - b;
});
return newArray;
}
function reverseSort(arr){
let newArray = [];
newArray = arr.sort(function(a, b){
return b - a;
})
... | true |
1422d1340cf0440a3b34e37510c577147af72098 | JavaScript | omersefademirci/Projects | /project1/epES5.JS | UTF-8 | 2,469 | 3.390625 | 3 | [] | no_license | //Course Contructor
function Course(title,instructor,image) {
this.title=title;
this.instructor=instructor;
this.image=image;
}
//UI constructor
function UI() {
}
// dışarıdan gelen bilgilerin tanımlanmasını
UI.prototype.addCourseToList=function (course) {
const list =document.getElementById('cou... | true |
6a852cc1fe4059702d7527d4b53e74dad8eda504 | JavaScript | ah903/prototype | /app/js/factories/registerfactory.js | UTF-8 | 1,931 | 2.578125 | 3 | [] | no_license | ///////////////////////////////////////////////////////////////////////////////
// Home Factory
///////////////////////////////////////////////////////////////////////////////
// LD042 Advanced Web Engineering
// Andrew Hall 2016
///////////////////////////////////////////////////////////////////////////////
angular.mo... | true |
7cdd625ac46fcbca7ff7124271ff7f98064ea2b4 | JavaScript | Mrshulan/Go-ahead_FE | /JavaScript_basic/handlewriting/compose.js | UTF-8 | 5,234 | 3.21875 | 3 | [
"MIT"
] | permissive | function compose () {
var args = arguments
var start = args.length - 1
return function () {
var i = start
var result = args[start].apply(this, arguments)
while(i--) result = args[i].call(this, result)
return result
}
}
// // 利用reduce
// function compose(...funcs) {
// if(funcs.length === 0)... | true |
52a9303a5b6d5f15c40d5041429669463ebedc7a | JavaScript | jueunham/2020FintechAcademy | /0922/prac03.js | UTF-8 | 325 | 3.578125 | 4 | [] | no_license | function multi(p1, p2) {
return p1 * p2; // p1, p2의 곱연산의 결과를 반환
}
//work1 더하기, 나누기, 빼기;
function sum(p1,p2) {
return p1+p2;
}
function division(p1,p2) {
return p1/p2;
}
funciton minus(p1,p2) {
return p1-p2;
}
//es6문법
const multiful = (p1,p2) => {
return p1 * p2
} | true |
d9559e6d55970fd3258c7a160521203bad178b03 | JavaScript | bassguitarbill/great-adventure | /script/BeatEmitter.js | UTF-8 | 813 | 3.203125 | 3 | [] | no_license | define(function() {
function BeatEmitter(beat, mediaElement, downbeat, upbeat) {
this.beat = beat;
this.element = mediaElement;
this.downbeat = downbeat || (() => {});
this.upbeat = upbeat || (() => {});
this.isDownbeat = false;
this.intervalID = 0;
};
BeatEmitter.prototype.start = function() {
... | true |
95d1dd0500bb52d6e436bab61e8b35841598063d | JavaScript | bosskey59/js-deli-counter-js-apply-000 | /index.js | UTF-8 | 720 | 3.5 | 4 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | function takeANumber(katzDeliLine, name){
katzDeliLine.push(name);
let number = katzDeliLine.length ;
return "Welcome, " +name+ ". You are number "+ number +" in line.";
}
function nowServing(line){
let currentName = line.shift();
if (currentName === undefined){
return "There is nobody waiting to be serv... | true |
19f849c8f8b89828cd3d89223e07a44f70e52607 | JavaScript | petrvolny/burner-wallet | /src/components/Scanner.jsx | UTF-8 | 1,698 | 2.515625 | 3 | [] | no_license | import React from 'react';
import QRCodeScanner from "./QRCodeScanner.js"
export default class Scanner extends React.Component {
constructor(props) {
super(props);
}
onQRCodeValidate(location){
console.log("Scanner: onQRCodeValidate",location)
if(location.indexOf("http")>=0){
//w... | true |
6198288fb26a2fe319a0e13d12f590a05a6e545e | JavaScript | rens202/lingogame | /src/main/webapp/js/register.js | UTF-8 | 1,750 | 3.15625 | 3 | [] | no_license | //send the user data to the
function register() {
let formData = new FormData(document.querySelector("#regform"));
let username = formData.get("username").toString();
let password = formData.get("password").toString();
let object = {};
formData.forEach(function (value, k... | true |
19ba551608ccb664da5025fd2166d1e3a9859de5 | JavaScript | rafgroup/projectrm- | /Break and Continue.js | UTF-8 | 426 | 2.9375 | 3 | [] | no_license | var x = 0;
var y;
var z;
function validation() {
label: while (x < Infinity) {
y = eval( prompt("please enter a name",""));
if (y === "abcdefgh") {
break;
}
if (y === true) {
z = eval(prompt("please enter a number"));
}
else {
... | true |
ed0eba10fd9099132a8b334aae4ef562790b73a1 | JavaScript | Gina137/Pixel-Art-Maker | /js/jQ.js | UTF-8 | 1,425 | 2.703125 | 3 | [] | no_license | $(function(){
//animation
$('header').slideDown(1000,function(){
$('section:eq(0)').fadeIn(2000,function(){
$('section:eq(1)').show(1000,function(){
$('section:eq(2)').slideDown(1000,function(){$('footer').fadeIn(2000)})})
})
})
//building the Form
//Grid Height input
$("form").... | true |
e47f7bd7b35e33191d0a3230bef5c92b35f0a97a | JavaScript | ChelriCerdae/ChelriCerdae.github.io | /war.js | UTF-8 | 4,677 | 3.515625 | 4 | [] | no_license | function random(upperBound) {
return Math.floor(Math.random() * upperBound)
}
function getDisplay(rank, suit) {
return ranks[rank] + ' ' + suits[suit]
}
function shuffle(array) {
for (let i = 0; i < array.length * 10; i++) {
const index1 = random(array.length)
const index2 = random(array.length)
... | true |
ab645f0029e632e0c0aaf7be190d654f91d0739e | JavaScript | marcoscaceres/buttshock-js | /lib/ET312.js | UTF-8 | 1,942 | 2.71875 | 3 | [] | no_license | "use strict";
const Handcrank = require("./handcrank");
function generate_checksum(data) {
var accum = 0;
for (var i = 0; i < data.length; ++i) {
accum += data[i];
}
if (accum > 256) {
return accum % 256;
}
return accum;
}
function verify_checksum(data) {
const checksum = data.readUInt8(data.len... | true |
a6ddd2a7a489cfcef787e28ee431dde9d97585a3 | JavaScript | green-fox-academy/jnsmtnr | /week-08/day-1/dojo/poker.js | UTF-8 | 491 | 2.96875 | 3 | [] | no_license | 'use strict';
const vd = require('./validCard');
function whichHandWins(handOne, handTwo) {
if (!Array.isArray(handOne) || !Array.isArray(handTwo)) {
return 'at least one hand isn\'t an array';
};
if (handOne.length != 5 || handTwo.length != 5) {
return 'at least one hand has not five cards';
};
if ... | true |
cff4615995e753f3318beaac4b7f3efae37072b6 | JavaScript | Tim1986/dnd-game | /fighting/findInitiative.js | UTF-8 | 517 | 2.71875 | 3 | [] | no_license | function findInitiative(Dex) {
if (Dex === 8 || Dex === 9) {
Modifier = -1
} else if (Dex === 10 || Dex === 11) {
Modifier = 0
} else if (Dex === 12 || Dex === 13) {
Modifier = 1
} else if (Dex === 14 || Dex === 15) {
Modifier = 2
} else if (Dex === 16 || Dex === 17) ... | true |
9bc902098cbe8a31de51eadab1a181187510238b | JavaScript | MethodExists/react-dnd-html5-backend | /lib/NativeDragSources.js | UTF-8 | 3,414 | 2.5625 | 3 | [
"MIT"
] | permissive | var _nativeTypesConfig;
function _defineEnumerableProperties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if ("value" in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } return obj; }
function _classCallCheck(instance, Constructor) { if ... | true |
f9391662f5c9fe93b0a811001103fd38e37dfbb2 | JavaScript | MarienDelahaye/Exercices_DOM | /Exercice1/main.js | UTF-8 | 715 | 3.3125 | 3 | [] | no_license | // Functions //
function displayP(){
var changeColor = document.getElementsByTagName("p");
var i;
for (i = 0; i < changeColor.length; i++) {
if (i % 2 == 0 ){
changeColor[i].style.backgroundColor = "red";
} else {
changeColor[i].style.backgroundColor = "tran... | true |
333c161a5e1032b33feceb12b3d5383b2b4bbffe | JavaScript | Luoyangs/one-ui | /build/merge-md.js | UTF-8 | 1,400 | 2.625 | 3 | [] | no_license | const fs = require('fs')
const path = require('path')
const allFiles = [];
const allFiles2 = [];
const filePath = path.resolve(__dirname, '../examples/docs');
const filePath2 = path.resolve(__dirname, '../packages/card/README.md');
function readFile(filePath, allFiles) {
fs.readdir(filePath, (error, files) => {
... | true |
6151656c963d348d2c88bcc1b30a5cc9349a4db6 | JavaScript | zhorakh/github-finder | /src/containers/repositories/index.js | UTF-8 | 2,031 | 2.671875 | 3 | [] | no_license | import Template from "./template";
import { httpClient } from "../../services/httpService";
import {pageParam, paramName, perPage, perPageParam, searchReposUrl} from "../../api";
class Repositories {
constructor() {
Template.init();
Template.render();
this.page = 1;
this.serchValue ... | true |
c5ddbd1d629dc928e54e0679fdb6da91d5c9adad | JavaScript | dennerpl/trybe-exercises | /bloco_4_introducao_javascript/dia4_3/triangulo_a_direita.js | UTF-8 | 386 | 4.09375 | 4 | [] | no_license | // Para o segundo exercício, faça o mesmo que antes, mas que imprima um triângulo retângulo com 5 asteriscos de base.
let tamanhoBase = 5;
let linhas = "*";
if (tamanhoBase > 1) {
for (let i = 0; i < tamanhoBase; i += 1) {
if (i == 0) {
console.log(linhas)
} else {
linhas = ... | true |
a8c0279fc01b0182b89770dd34394f6561a46fb2 | JavaScript | AmithaLingala/desktop | /script/ui/application.js | UTF-8 | 2,942 | 2.796875 | 3 | [] | no_license | import Process from '../process.js';
import Paths from '../../data/paths.js';
export default class Application extends Process {
/**
*
* @param {string} title Title of the current window.
* @param {number} pid process-id for the current window.
* @param {number} ppid process-id for the parent... | true |
3ec40b02eea5483938d587a45a3a5ae1ebaacbed | JavaScript | RodrigoBarrios88/inversiones | /SISTEM/assets.3.6.2/js/modules/finanzas/presupuesto.js | WINDOWS-1258 | 3,870 | 2.578125 | 3 | [] | no_license | //funciones javascript y validaciones
function Limpiar(){
texto = "Desea Limpiar la Pagina?";
acc = "wndow.location.reload();";
ConfirmacionJs(texto,acc);
}
function Submit(){
myform = document.forms.f1;
myform.submit();
}
function pageprint(){
boton = document.getEle... | true |
5065f60fed73dae957605e5533e8dab0f8747a7b | JavaScript | ernestboey/code-kata-20190706 | /fizzbuzz.js | UTF-8 | 623 | 3.21875 | 3 | [] | no_license | function fizzbuzz(num) {
if (!num) {
return [];
}
let arr = [];
for (let i = 1; i <= num; i++) {
t = "";
if (i % 3 == 0) t += "fizz";
if (i % 5 == 0) t += "buzz";
if (!t) {
let iStr = i.toString();
index3 = iStr.indexOf("3");
index5 = iStr.indexOf("5");
if (index3 ==... | true |
096147f43648ae97d28fb3dfd10ac2e4b7b630f6 | JavaScript | cao777/mudwllz2-utf8 | /www/example.js | UTF-8 | 4,843 | 2.734375 | 3 | [] | no_license | /**
* Determine the mobile operating system.
*
* @returns {Boolean}
*/
function isMobile() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone must come first because its UA also contains "Android"
if (/windows phone/i.test(userAgent)) {
return true;
}
if (/a... | true |
dd52c474a4be593fcb8332a08ab9ddc85a74779a | JavaScript | nedakst/Image-and-text-positions | /02-06/js/main.js | UTF-8 | 1,150 | 2.53125 | 3 | [] | no_license | var html = document.getElementById("html");
var html2 = document.getElementById("html2");
var kaire = document.getElementById("kaire");
var desine = document.getElementById("desine");
var paslpeti = document.getElementById("paslepti");
var apacia = document.getElementById("apacia");
var atstatyti = document.get... | true |
482603ff77e62dfa7791c6b91e1fd20f4d79b6de | JavaScript | lekha-123/adv80projectparagraph | /main.js | UTF-8 | 497 | 2.953125 | 3 | [] | no_license | function getparagraph ()
{
var inputs=[]
for (i=1;i<7;i++)
{
inputs.push(document.getElementById("textinput"+i). value);
}
inputs.join(".");
document.getElementById("showparagraph").innerHTML=inputs.join(".");
}
function getparagraph1 ()
{
var inputs1=[]
for (i=1;i<7;i++)
... | true |
03b0de357d1335e36101d48df9492a4c9f142396 | JavaScript | nssk1999/WA_C2K | /subset/theme.js | UTF-8 | 724 | 2.890625 | 3 | [] | no_license | const themeMap = {
dark: "light",
light: "solar",
solar: "dark"
};
const bgChange = () => {
document.body.classList.toggle( 'bg-dark' );
document.querySelector( 'form' ).style.borderColor = 'blue'
}
const theme = localStorage.getItem( 'theme' )
|| ( tmp = Object.keys( themeMap )[ 0 ],
... | true |
fa8342f5fd288027f7aa5cdfffdd1f56fdc43d25 | JavaScript | sireeshatumma/lms-pro-24 | /sketch.js | UTF-8 | 760 | 2.515625 | 3 | [] | no_license |
const Engine = Matter.Engine;
const World = Matter.World;
const Bodies = Matter.Bodies;
const Body = Matter.Body;
function preload()
{
}
function setup() {
createCanvas(800, 700);
engine = Engine.create();
world = engine.world;
//Create the Bodies Here.
ground = new Ground(400, 680, 800, 10)
paper = new ... | true |
d416e145b01bbb547a0d2866a21e215fc392b02c | JavaScript | mebonilla9/controltotal | /web/js/home/home.vista.js | UTF-8 | 969 | 2.609375 | 3 | [] | no_license | var that;
var homeVista = {
init:function(){
console.log('Vista de inicio cargada!')
that = this;
that.activarSidebar();
},
activarSidebar:function(){
$("#navBar").find(".item").on('click',that.cargarVista);
},
cargarVista:function(){
var seleccionado = $(this).attr('id')
... | true |
c3cf029fd61e11d55aaf9074f325d6873ec59f1c | JavaScript | onesh/tunneling-proxy-101 | /http.client.js | UTF-8 | 788 | 2.6875 | 3 | [] | no_license | var http = require('http');
const url = require('url');
// make a request to a tunneling proxy
const options = {
port: 3034,
hostname: '127.0.0.1',
method: 'CONNECT',
path: '127.0.0.1:3035'
};
const req = http.request(options);
req.end();
req.on('connect', (res, socket, head) => {
co... | true |
dbea242b2363bcd95fb81b8f2ea8996e2d9143da | JavaScript | kimar0ne/wcm-mobile-demo | /resources/src/main/webapp/js/dataService.js | UTF-8 | 8,990 | 2.59375 | 3 | [] | no_license | /**
<<<<<<< HEAD
* @author markdowney
*/
=======
* @author markdowney
*/
>>>>>>> 7b653f0b28fe86c6f6e85c2c0309a8833d5110d4
/*jslint */
/*global openDatabase: true, $: true */
"use strict";
var dataService = (function () {
//Load the database
var db;
function errorHandler(transaction, error) {
... | true |
63d9f356fc18c04895d2092b1069e2049c456431 | JavaScript | neoskx/todo-react-meteor | /client/app/Task.jsx | UTF-8 | 2,810 | 2.796875 | 3 | [] | no_license | // Task component - represents a single todo item
Components.Task = React.createClass({
getInitialState: function () {
return {editText: this.props.todo.title};
},
toggle: function () {
//Todos.update(this._id, {$set: {completed: !this.completed}})
DBUtility.Todos.updateTodoList(this... | true |
f8b2007f6d55304158e584091eae90f17c1bc0d5 | JavaScript | AaronAcerboni/automatic-file-backup | /lib/Watcher.js | UTF-8 | 1,764 | 2.75 | 3 | [] | no_license | var fs = require('fs'),
ncp = require('ncp'),
slash = require('slash'),
path = require('path');
function backup (item) {
var file = item['file'],
location = item['backup to'] || getSittingDirectory(file),
overwrite = item['single backup'] || false;
//slash() normalises slash format betwee... | true |
d2d763be5c43ae74f0cebffd8270746b4915b465 | JavaScript | SamanthaCBajis/JSLab1PT1 | /js/script.js | UTF-8 | 953 | 3.90625 | 4 | [] | no_license | "use strict";
let answer = prompt("Do you want to play a game?");
if (answer.toLowerCase() === "yes") {
console.log(prompt("Great, Please enter your name"));
let wins = 0;
let userHP = 40;
let grantHP = 10;
while (userHP <= 40) {
userHP = userHP - Math.floor(Math.random() * 2 + 1); {
console.log(`Sam's healt... | true |
eb9eb1de0e178ed0e02a47120cc1b193d1b1ca5d | JavaScript | JJking666/front_note | /js_base/Event/event/initEvent/index.js | UTF-8 | 534 | 3.03125 | 3 | [] | no_license | let mevent = document.createEvent("HTMLEvents");
mevent.initEvent("click", true, false);
let app = document.querySelector("#app");
app.onclick = () => {
console.log("app click");
}
app.onfocus = () => {
console.log("focus")
}
let btn = document.querySelector("#btn");
btn.onclick = () => {
app.dispatchEvent... | true |
a8a553fa5863e12a04fcb4d148f90cde51890501 | JavaScript | n0p/InThings | /server/services/mail.js | UTF-8 | 842 | 2.53125 | 3 | [] | no_license | 'use strict';
var nodemailer = require('nodemailer');
// create reusable transporter object using SMTP transport
var transporter = nodemailer.createTransport({
host: 'HOST',
secure:false,
tls: {rejectUnauthorized: false},
port: 587,
auth: {
user: 'MAIL',
pass: 'PASS'
},
de... | true |
7eab6e9154f98a86c501c7e2bd6aba2361ecfa98 | JavaScript | solgamd/React-Drills-1 | /src/components/App.jsx | UTF-8 | 1,262 | 2.96875 | 3 | [] | no_license | import React from 'react';
import './button-styles.css';
import "./text-styles.css";
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
text: "",
hasLoaded: false,
placeholder: "{this.state.text}"
};
// this.han... | true |
4d3865e69eb85c8c6a0e80e4d83d6caba50efa1f | JavaScript | weikinman/TDSC | /src/utiles.js | UTF-8 | 5,886 | 2.6875 | 3 | [] | no_license | (function(root){
var slice = [].slice;
var Utils = {};
Utils.Device = new function(){
var userAgent = this.userAgent = self.navigator.userAgent.toLowerCase();
var isWindows = userAgent.indexOf('windows')>0?true:false;
var isLinux = userAgent.indexOf('linux')>0?true:false;
... | true |
3dd589b2c66c83197405a5cb94c7a118e331ea27 | JavaScript | berlin75/study | /nodejs/crawler/keke123/crawlerkeke0.js | UTF-8 | 4,588 | 2.5625 | 3 | [] | no_license | const http = require('http');
const fs = require('fs');
const path = require('path');
const cheerio = require('cheerio');
var indexUrl = 'http://www.keke123.cc/gaoqing/list_5_2.html';
crawlerIndex(indexUrl,"./new/");
//列表页获取内容页url,并添加后缀成数组
// var htmlUrlArr = ["http://www.keke123.cc/25797.html","http://www.keke123.c... | true |
f273164e6f7372006fd328e509a5e30111a84674 | JavaScript | powerdmy/Socket.io-chatApp | /public/main.js | UTF-8 | 1,589 | 2.640625 | 3 | [] | no_license | $('.gla-wra button').click(function(e) {
e.preventDefault();
var txt = $('#loginName').val().trim();
if (txt != '') {
socket.emit('login', txt);
} else {
$('.gla-wra p').html('Please set the nickname:)').css('color', 'red');
}
... | true |
f0462554acc8cd3fe850d022ca30c0e7153bed8d | JavaScript | codingwithadi/multiflexapp | /src/Card.jsx | UTF-8 | 863 | 2.625 | 3 | [] | no_license | //props is used in this code. Passing the function argument as a props it a name in convrntion we can use it any name here but this is prefferable. syntax is {props.attribute name}
import React from 'react';
function Card(props){
return (
<>
<div className = "card-container">
... | true |
840f4fc84e00307271c1708a5a6f3adf58643aae | JavaScript | PrajwalGrandhi/VirtualPet-1 | /sketch.js | UTF-8 | 1,171 | 3.4375 | 3 | [] | no_license | //Create variables here
var dog,happyDog,database,foodS,foodStock;
var dogI,happyD;
var gar;
function preload()
{
//load images here
dogI = loadImage("images/dog.png");
happyD = loadImage("images/dogHappy.png");
gar = loadImage("images/garden.jpg");
}
function setup() {
createCanvas(500,500);
database ... | true |
42ef0a3d789021aba793421a29eb32687bbd0623 | JavaScript | oneilhughes723/OdinProject | /Etch-A-Sketch/script.js | UTF-8 | 3,268 | 3.46875 | 3 | [] | no_license |
let activeSelection = 'darken';
//initializes rows array to accessing cells more easily in other funcitons
let rows = [];
//function that prompts user for grid dimensions
function promptGrid() {
let grid = prompt('Enter a number between 1 and 100 for your grid size');
//if invalid response, promptGrid call... | true |
ccb2c6033ecf1e7e5b6348a72cff083e3646f69d | JavaScript | Andro-Pangani/City-Problems-Next.Js | /serverComponents/controlPanel.js | UTF-8 | 7,685 | 2.609375 | 3 | [] | no_license | import { json } from "body-parser";
import { useCallback, useEffect, useRef, useState } from "react";
import {
changeAdminsName,
changeAdminsPassword,
createNewAdmin,
getAllAdmins,
deleteAdmin,
} from "../Csr/Components/functions/loginUser";
// ADMIN LIST ITEM COMPONENT ==> ==> ==>
const AdminItemComponent =... | true |
548a15d054f76d8b224172ddce4742f137bf6345 | JavaScript | MichaelNaghavipour/Daily-Coding-Challenge | /solutions/71-80/Problem73.js | UTF-8 | 1,012 | 3.484375 | 3 | [
"MIT"
] | permissive | /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^reverseLinkedList" }] */
// Problem 73
//
// This problem was asked by Google.
//
// Given the head of a singly linked list, reverse it in-place.
//
// https://leetcode.com/problems/reverse-linked-list/
//
// O(N) Time complexity
// O(1) Space complexity
// ... | true |
1e008a5de90375f4cb1c7f15110dbf5bf74fafca | JavaScript | traqnzlatanov77/TelerikAcademy | /JavaScript-OOP/TelerikAcademy-Functions and function expressions-Homework/tasks/task-1.js | UTF-8 | 1,210 | 4.21875 | 4 | [] | no_license | /* Task Description */
/*
Write a function that sums an array of numbers:
numbers must be always of type Number
returns `null` if the array is empty
throws Error if the parameter is not passed (undefined)
throws if any of the elements is not convertible to Number
*/
function solve() {
return function sum(... | true |
4cc80e911b63db25f0acc2f11ee4c83c2666640b | JavaScript | VadimGridinsky/practica | /script/reviews.js | UTF-8 | 1,734 | 2.59375 | 3 | [] | no_license | var lastResFind="";
var copy_page="";
function TrimStr(s) { // обрезание пробелов
s = s.replace( /^\s+/g, '');
return s.replace( /\s+$/g, '');
}
function FindOnPage(inputId) {
var obj = window.document.getElementById(inputId);
var textToFind;
if (obj) {
textToFind = TrimStr(obj.value);
} else {
... | true |
231fbd6c1094a267bf0b7064474995e37146901d | JavaScript | Abikk/webtasks | /week5/T2.js | UTF-8 | 105 | 2.53125 | 3 | [] | no_license | function changeImage(image){
document.getElementById("main").src = document.getElementById(image).src;
} | true |
be09860efd85bf960770dd357b3365cf59e87dfd | JavaScript | seecog/redux-custom-middleware | /src/store/cricket.reducer.js | UTF-8 | 350 | 3.015625 | 3 | [] | no_license |
let iniState = {
runs : 0
}
console.log('Inside the cricket reducer');
let cricketReducer = (state=iniState,action) =>{
if(action.type=="FOUR"){
console.log('Four runs',state);
return {
...state,
runs : state.runs + 4
}
}
if(action.type=="SIX"){
return {
...state,
runs : state.runs + 6
}
}
return state;
}
... | true |
53443d39b89d784f81bb4291f5f85facd2dbf89f | JavaScript | BenDiuguid/node-intro | /examples/HelloWorld.js | UTF-8 | 572 | 3.203125 | 3 | [
"MIT"
] | permissive | var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/html"});
console.log("request received.");
response.end("<h1>Hello World</h1>");
});
server.listen(8000);
console.log("Server running at http://127.0.0.1:8000/");
// closure... | true |
40047f40ebfae8da3c3536d008744dbc652ee496 | JavaScript | AgustinTafura/JPL-React | /src/context/OrderContext.jsx | UTF-8 | 2,420 | 2.625 | 3 | [] | no_license | import { createContext, useContext } from "react";
import { getFirestore } from "../firebase";
import { UserContext } from "../context/UserContext";
import { CartContext } from "../context/CartContext";
import firebase from "firebase/app";
import "@firebase/firestore";
// Creamos el espacio de memoria
export const Orde... | true |
1c362ca1700b675c86fb67ccfb5ab9fc0f5d99f0 | JavaScript | auhin4/react-unit-tests-course | /src/components/Greeting.test.js | UTF-8 | 1,494 | 2.765625 | 3 | [] | no_license | import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Greeting from './Greeting';
describe('Greeting component', () => {
test('renders Hello World as a text', () => {
//Arrange
render(<Greeting />);
//Act
//...nothing
... | true |
9b55bf51b815da75335d118e09f8c24c577ce0e8 | JavaScript | binkobon/Exercise_7 | /attempt 2/uh.js | UTF-8 | 263 | 2.625 | 3 | [] | no_license | var kek;
//var normalNum;
//var normal = normalNum;
function preload() {
kek = loadJSON("kek.json");
}
function setup(){
createCanvas(800,800);
background(0);
}
function draw(){
stroke(255);
fill(255);
text(kek.ichi, 400,400);
}
| true |
1147bb364daf47e61f701a315282930680548265 | JavaScript | tuanab/js-data-examples | /server/sql/app/lib/safeCall.js | UTF-8 | 320 | 2.765625 | 3 | [
"MIT"
] | permissive | // This little generator simply saves us a lot of boilerplate code
module.exports = function (Promise) {
function safeCall(method) {
return function (req, res, next) {
return Promise.try(function () {
return method(req, res, next);
}).catch(next).error(next);
};
}
return safeCall;
};
| true |
9c93a283b8365a4ee7a50fd8f356a6911f025cdd | JavaScript | MikhailTsyganov/goit-js-hw-07 | /src/js/task-04.js | UTF-8 | 451 | 3.421875 | 3 | [] | no_license |
const spanValue = document.querySelector('#value')
const btnEl = document.querySelectorAll('#counter button');
let counterValue = 0;
const increment = function () {
counterValue += 1;
spanValue.textContent = counterValue;
}
btnEl[1].addEventListener('click', increment)
const decrement = functio... | true |
fdc3a917d74e3fa2c62fc665a0cf8f9cc93d80a2 | JavaScript | yyfullstack/nodejs_in_action | /demo/unit5/redis_demo/publish.js | UTF-8 | 315 | 2.515625 | 3 | [] | no_license | var redis = require('redis');
var client = redis.createClient(6379, '127.0.0.1');
function zadd(key, score, member) {
client.zadd(key, score, member, function () {
client.publish('chat1', member);
})
}
for (var i = 0; i < 10; i++) {
zadd('z', i, '' + i);
console.log('第 ' + i + '次');
} | true |
12072649ac599972111a2ca69261e4a33a50c0be | JavaScript | raetang/inventory-program | /static/income.js | UTF-8 | 2,780 | 3.59375 | 4 | [] | no_license | const yearSelect = document.getElementById("income-year");
const monthSelect = document.getElementById("income-month");
const daySelect = document.getElementById("income-day");
const monthOptions = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November","December"]... | true |
0e90a2b96795bccc5cc04b1eeb1c1c3a818f9679 | JavaScript | hudhudhud/practice | /hw/src/assets/js/myaxios.js | UTF-8 | 1,665 | 2.578125 | 3 | [] | no_license | import axios from 'axios'
import common from './common.js'
axios.create({
baseURL: common.apiUrl,
//timeout: 1000,
});
var myaxios={
get(url,op){
//允许跨域携带cookie
axios.defaults.withCredentials = true
if(op){
op={params:op}
}
return axios.get(url,op)
},
post(url,op){
if(typeof FormData !== 'undefi... | true |
7b9933cc1f32517e74756967d616c62cc4bdb63a | JavaScript | zjgyb/nodejs | /mynode/3/windows_exe.js | UTF-8 | 279 | 2.6875 | 3 | [
"MIT"
] | permissive | var cmd = require('child_process').spawn('cmd', ['/c', 'dir\n']);
cmd.stdout.on('data', (data) => {
console.log('stdout: ' + data);
});
cmd.stderr.on('data', (data) => {
console.log('stder: ' + data);
});
cmd.on('exit', (code) => {
console.log('child~ ' + code);
}) | true |
86bb296437d613eb414c1ebfa761299d7c209fd4 | JavaScript | AlexandraBulaceanu/SudoImprove_SmartHack2020 | /dilpus_client/js/main.js | UTF-8 | 8,544 | 3 | 3 | [] | no_license | // Elements
const nameElement = document.getElementById('userNameOrEmail')
const addProduct = document.getElementById('addItProduct')
const addProductForm = document.getElementById('addProductForm')
const productList = document.getElementById('listaProduse')
// Constants
const BASE_URL = 'http://localhost:8080'
// -... | true |
d307fc46e43e44f90a5bbfd828cc020075b07895 | JavaScript | danielshaw0369/CIM540 | /CIM540/HW/p5/final/sketch.js | UTF-8 | 4,341 | 2.734375 | 3 | [] | no_license | var images = [];
var wordprocessor = "assets/wp.jpg";
var wp = {};
const playwrite = `
But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain has born and I will give| you a complete
account of the system, and expound the actual teachings
of the great explorer of the truth, the |m... | true |
d9be46db972483acf5b6c9531b049e97604a9251 | JavaScript | DieBesten/DieBesten.github.io | /js/srm.js | UTF-8 | 8,778 | 2.671875 | 3 | [] | no_license | class Srm{
constructor(type, x, y, label, days){
this.type = type;
this.duration = 120;
// Influences on other variables
this.i_pro = 0;
this.i_stress = 0;
this.i_ablenkung = 0;
this.i_krankheitstage = 0;
this.i_ablenkungFrequency = 0;
this.label = label;
this.position = createVector(x,y);
th... | true |
15ccdc0db57ad3293a5a1f07a348b525a68ee7b4 | JavaScript | spacemeowx2/fluent.js | /fluent-bundle/src/bundle.js | UTF-8 | 5,961 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | import {FluentNone} from "./types.js";
import {resolveComplexPattern} from "./resolver.js";
import Scope from "./scope.js";
/**
* Message bundles are single-language stores of translation resources. They are
* responsible for formatting message values and attributes to strings.
*/
export default class FluentBundle ... | true |