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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8096aee8a63fd4d07c40673e8a0c69b485c405b3 | JavaScript | ferflores/squarebook | /src/modules/serverComm/httpActions.js | UTF-8 | 2,258 | 2.609375 | 3 | [] | no_license | import errorMessage from '../errorMessage';
import axios from 'axios';
import def from '../defaultData';
function displayNoItemsData(config){
config.drawingActions.drawData({name:def.noData.name, points: def.noData.points.slice(0)}, -1, true);
config.state.currentIndex++;
}
function postData(config, responseHandl... | true |
490f8e39f511eb375b6bfb20d4f11c0e1449533d | JavaScript | SimoPrG/JavaScriptFundamentalsHomework | /Functions/script.js | WINDOWS-1258 | 4,438 | 4.3125 | 4 | [
"MIT"
] | permissive | //Problem 1. English digit
//Write a function that returns the last digit of given integer as an English word.
function getLastDigit(number) {
switch (number % 10 | 0) {
case 0:
return 'zero';
case 1:
return 'one';
case 2:
return 'two';
case 3:
... | true |
afe5b5e41fd2c2c05e18620f098ba9ed6cf00c1e | JavaScript | Remoguima/CRUD-Vue-ExpressJS-BackEnd | /Controllers/patient.js | UTF-8 | 1,382 | 2.859375 | 3 | [] | no_license | //Import functions from patientData
import {getPatients, getPatientById, insertPatient, updatePatientById, deletePatientById, } from "../Patient/patientData.js";
//get ALL Patients
export const showPatients = (req,res) => {
getPatients((err, results) => {
if(err){
res.send(err);
} else{... | true |
186e075bdbf26d2c6076fd62eba9ce5072537cdb | JavaScript | levi-sr93/formacao_nodejs | /1-introducao_ao_nodeJs/app.js | UTF-8 | 552 | 4.0625 | 4 | [] | no_license | const calculadora = require("./calculadora");
let resultadoSoma = calculadora.soma(10, 10);
let resultadoMultiplicacao = calculadora.multiplicar(10, 10);
console.log(resultadoSoma)
console.log(resultadoMultiplicacao)
console.log(calculadora.nome)
// let mostrarSite = true ;
// const site = 'www.google.com'
//... | true |
452931cbde010c5672d6a1e1a40ecde62eca9008 | JavaScript | hfming/java_web | /javaScript/ECMAScript 基础语法/04 变量的使用细节.js | UTF-8 | 796 | 4.34375 | 4 | [] | no_license | // 变量的使用细节
// 1、var 关键字在定义变量的时候可以省略不写
variable = "没有使用 var 关键字定义的变量";
// 打印输出
document.write(variable + "<br>");
// 2、 变量名可以重复, 后面的将覆盖前面的变量
var visible = true;
visible = "变量名可以重复, 后面的将覆盖前面的变量";
document.write(visible + "<br>");
// 3、 变量的类型取决于值的类型
var color = "red";
var num = 25;
document.write(typeof color + "<br>... | true |
1994d852f4427808c150759472b0fe37187654de | JavaScript | diyewu/qlvip | /src/main/webapp/tq/js/index.js | UTF-8 | 3,009 | 2.578125 | 3 | [] | no_license | //自带js
var swiper ;
//自带js结束
window.onload = function() {
swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
paginationClickable: true,
direction: 'vertical',
onInit: function(swiper) { //Swiper2.x的初始化是onFirstInit
swiperAnimateCache(swiper); //隐藏动画元素
swiperAnimate(s... | true |
10e8fe5c53a8b0d304572915f1f8edb83fa54749 | JavaScript | Stokolyas/BackendJs | /project3.js | UTF-8 | 390 | 2.625 | 3 | [] | no_license | //1 - 5
'use strict';
const Cat = require('./project2');
// генерация групп котов
function catsGroupGenerate(n, legsCount) {
var list = []
for (var i = 0; i < n; i++) {
let cat = new Cat()
cat.legsCount = legsCount
list[i] = cat
}
return list //возвращение массива котов
}
catsGroupGenerate(4)
module... | true |
78cb1e173ca7ffa5a6456adae0ec2b2d2c80f6c3 | JavaScript | cpdundon/cruise_skinny_frontend | /src/components/vessels/VesselInput.js | UTF-8 | 1,159 | 2.5625 | 3 | [] | no_license | import React, { Component } from 'react'
import { connect } from 'react-redux'
import { createOrUpdateVessel } from '../../actions/vessels.js'
const initState = { name: '', operator: '', }
class VesselInput extends Component {
state = initState
handleOnChange(event) {
this.setState({
[event.target.n... | true |
f3594e7d1a9009007335d9d7deff30c482fc7586 | JavaScript | timolsson/relaxo-meditation | /app.js | UTF-8 | 2,017 | 2.96875 | 3 | [] | no_license | const app = () => {
const track = document.querySelector(".track");
const play = document.querySelector(".play");
const outline = document.querySelector(".moving-outline circle");
const video = document.querySelector(".vid-container video");
const sounds = document.querySelectorAll(".sound-picker button");
... | true |
b39f875a398fd61527683d2ee2fe8e3955edd50a | JavaScript | felicefelicis/veille_TP2 | /tp2.js | UTF-8 | 2,435 | 2.6875 | 3 | [] | no_license | // req = request
// res = resultat
// importations
const express = require('express');
const bodyParser= require('body-parser');
const MongoClient = require('mongodb').MongoClient;
const ObjectId = require('mongodb').ObjectID;
const app = express();
var db; // variable qui contiendra le lien sur la BD
app.set('view ... | true |
0e02583e828eab52b1bfa5bcefe1968ed9c2dc17 | JavaScript | CarlWilcoxon/prime-jquery-server-side-calculator | /server/public/scripts/client.js | UTF-8 | 2,598 | 3.421875 | 3 | [] | no_license | console.log('js');
let mode = '';
let modeSymbol = '';
let num1 = 0;
let num2 = 0;
$(document).ready(onReady);
//onReady first, then the rest in order
function onReady() {
console.log('DOM is ready.');
//load history
loadHistory();
//setup event handlers
$('#calculator').on('click', '.modeSelect', select... | true |
81461ecd4eab447c8a9ee328c3fca43b3c8f17ed | JavaScript | dorucioclea/inukshuk | /inukshukApp/scripts/apiCalls.js | UTF-8 | 8,699 | 2.75 | 3 | [] | no_license | import { Alert} from 'react-native';
import {
storageGet,
storageMultiGet,
storageRemove,
storageMultiRemove,
storageSet,
} from './localStorage.js';
var localIp = 'inukshuk.me';
var localPort = 1985;
// var localIp = '192.168.1.90';
// var localPort = 8080;
var mockUserId = 260;
/** HANDLE ERRORS
* Handle ... | true |
03debde9cb58e5c726951e86c5f7369357a05953 | JavaScript | SiarhKul/star-wars | /src/API/api.test.js | UTF-8 | 1,892 | 2.546875 | 3 | [] | no_license | import axios from "axios";
import { getResources } from "./getResources";
import { getSpecificResours } from "./getSpecificResours";
import { URL_GET_PEOPLE } from "./urls";
jest.mock("axios");
describe("Test API", () => {
afterEach(() => {
jest.clearAllMocks();
});
describe("Function testing 'getResources'", (... | true |
938274c8a650f0e26f864b39ff46dc478c0fa20c | JavaScript | Miteshdv/Form-Creator | /customcomponents/TruncatedLabel.jsx | UTF-8 | 518 | 2.5625 | 3 | [] | no_license | import React from 'react';
class TruncatedLabel extends React.Component {
truncate( label )
{
var isTooLong = label.length > 14,
s_ = isTooLong ? label.substr(0,13) : label;
return isTooLong ? s_ + '...' : s_;
};
render()
{
var truncatedStr = this.truncate(this.props.value)
... | true |
8c7bd7d7af3bb62aef469b6d178ae7aa6e1fc5bf | JavaScript | nelseric/fhack-yo | /lib/Util.js | UTF-8 | 1,727 | 3.09375 | 3 | [
"MIT"
] | permissive | import uniq from 'underscore';
export default {
getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
},
wordLikeness(word_a, word_b) {
let likeness = 0;
for (var i = 0; i < word_a.length; i++) {
if(word_a[i] === word_b[i]) {
likeness++;
}
}
retu... | true |
ad6f39f41a0d5264122fbdd196d9948c130cd2ab | JavaScript | 0ttone/js-jsnacks-blocco-5 | /snack 1/js/script.js | UTF-8 | 825 | 3.703125 | 4 | [] | no_license | /*Snack 1.
Creare un oggetto palla che abbia le seguenti proprietà.
Nome = palla
Peso = 10
*/
var palla = {
name: 'palla',
peso: 10
}
console.log('Esercizio snack 1', palla)
/*Snack1. - la continua.
Attraverso un prompt dare la possibilità all’utente
di modificare il peso della palla.
*/
var newpeso =... | true |
d4c294ce48b827c0c12d4cefff93212fb09ec06f | JavaScript | ConradArq/ScrumBoard | /script.js | UTF-8 | 12,513 | 2.75 | 3 | [] | no_license | var Task=function(description,personName,hours){
this.description=description;
this.personName=personName;
this.hours=hours;
}
Task.prototype.toString=function(){
return "Description: "+this.description+", Assigned to: "+this.personName+", Estimated hours: "+this.hours+", Hours spent on the task: "+(this.hoursSpent... | true |
70e29a2af4d94c9707660131cbb77697da65c839 | JavaScript | bzar/2dshooter | /proto/2dshooter-javascript/entities.js | UTF-8 | 13,246 | 2.84375 | 3 | [] | no_license | function World(gravity) {
this.gravity = gravity;
this.entities = {all: [], segmentGroups: []};
}
World.prototype.add = function(entity) {
entity.world = this;
this.getEntityGroup("all").push(entity);
for(var i = 0; i < entity.groups.length; ++i) {
var group = this.getEntityGroup(entity.groups[i]);
g... | true |
87e6814f9c9f4b8c20a89c9296ddc1707aa09a40 | JavaScript | thesourav123/s2 | /js/NotasVentaServiceService.js | UTF-8 | 11,186 | 2.734375 | 3 | [] | no_license | //
// Definitions for schema: http://pedidos.maestro.com.co/
// http://localhost:8080/TestWebService/services/NotasVentaServicePort?xsd=notasventaservice_schema1.xsd
//
//
// Constructor for XML Schema item {http://pedidos.maestro.com.co/}testService
//
function pedidos_maestro_com_co__testService () {
this.typ... | true |
5a02c65163f48c0c3fc3399a702339ccf932f9b0 | JavaScript | two-ticks/p5js-projects | /sketches/katex_example.js | UTF-8 | 3,126 | 2.796875 | 3 | [] | no_license | let tex;
let tex1;
var temp='';
let pr;
let text1=['sin^{6}(x) = \\bigg( \\dfrac {e^{xi}-e^{-xi}} {2i} \\bigg) ^{6} = \\dfrac {1} {-64} \\bigg( {e^{xi}-e^{-xi}} \\bigg) ^{6}' , '\\\\ = \\dfrac {1} {-64} \\bigg( \\binom{6}{0} e^{6xi}e^{-0xi} - \\binom{6}{1} e^{5xi}e^{-xi} + \\binom{6}{2} e^{4xi}e^{-2xi} - \\binom{... | true |
ec34ffe912b138afa0e0bc1f1044a93648051b5c | JavaScript | aditiadj/hello-test | /app/index.js | UTF-8 | 126 | 3.265625 | 3 | [] | no_license | console.log("Hello Math")
const add = (number1, number2) => {
return number1 + number2
}
console.log("1 + 1 =", add(1, 1)) | true |
c854b30f39ada93f7c78ae74c1996b698bfdb394 | JavaScript | kol-93/temabit-lecture | /test.js | UTF-8 | 1,079 | 2.96875 | 3 | [] | no_license | const { createReadStream, createWriteStream, open, close, read } = require('fs');
const {promisify} = require('util');
const BLOCK_SIZE = 65536;
async function* readFileAsFD(filePath, blockSize = BLOCK_SIZE) {
const fd = await promisify(open)(filePath, 'r');
try {
let closed = false;
while (!closed) {
const... | true |
bd128d8d718640fb4f7226c3db113f84e9aa7729 | JavaScript | Henrique-Moreira/mole-game | /front end/js/login.js | UTF-8 | 781 | 2.640625 | 3 | [
"MIT"
] | permissive | $(document).ready(function () {
$("#btnLogin").click(function () {
let $user = $("#user").val();
let $pwd = $("#pwd").val();
if ($user && $pwd) {
$.getJSON("https://backend-molegame.herokuapp.com/usuarios",
function ($registros) {
if ($registro... | true |
605bf0cffe8c33fe85275aba57de3f8a75db6b46 | JavaScript | rsiddiqui275/nagarro_Web_App | /public/index.js | UTF-8 | 3,316 | 2.78125 | 3 | [] | no_license | $(() => {
updateHead();
})
function updateHead() {
var headHtml;
$('#head').empty();
if (sessionStorage.getItem("name") == undefined) {
headHtml = `
<button id="loginButton" class="btn btn-success float-right" onclick=login()>Login</button>
<input type="text" id="... | true |
9d83bf0b1f26acedb640ce7b8f81ffd40f394475 | JavaScript | dkhatkar/word-chunks-app | /src/WordChunksForm.js | UTF-8 | 1,975 | 2.6875 | 3 | [] | no_license | import React from 'react';
import Form from 'react-bootstrap/Form'
import Row from 'react-bootstrap/Row'
import Button from 'react-bootstrap/Button'
class WordChunksForm extends React.Component {
constructor(props){
super(props);
this.updateValue = this.updateValue.bind(this);
this.handleS... | true |
3bde803926c7e353feba880ef137615794da75d0 | JavaScript | ishuria/yessirpopesamaBlog | /models/post.js | UTF-8 | 11,889 | 2.59375 | 3 | [] | no_license | var mongodb = require('mongodb').Db;
var settings = require('../settings');
var ObjectID = require('mongodb').ObjectID;
function Post(name, head, title, tags, post) {
this.name = name;
this.title = title;
this.tags = tags;
this.post = post;
this.head = head;
}
module.exports = Post;
// 文章保存
Post.prototype.save ... | true |
f6d4f90ccd39cc2763eea95cfd2a73d042098f54 | JavaScript | AJWurts/WeatherVis | /backend/airportdata.js | UTF-8 | 991 | 2.8125 | 3 | [
"MIT"
] | permissive | const axios = require('axios');
const AirportData = {
resolveIdent(airportId) {
if (airportId.slice(0, 1) === "K") {
return airportId;
}
if (airportId.length == 3) {
return "K" + airportId;
}
return airportId;
},
getCoordinates(airportId) {
return axios.get(`https://api.aeron... | true |
3947f5b3067d82e3384eafd729d0324e3a926be4 | JavaScript | crawfam/henry-crawford-poetry-vs2017 | /HenryCrawfordPoetry/Scripts/custom.js | UTF-8 | 8,176 | 3.140625 | 3 | [] | no_license |
function getLastLineWord(words) {
var n = words.split(" ");
return n[n.length - 1];
}
function getRhyme(word) {
//var words = json_data.sort(function (a, b) { return parseInt(a.numSyllables) < parseInt(b.numSyllables); })
// SEE: https://stackoverflow.com/questions/6536475/sorting-a-jquery-list-pop... | true |
7bfa141e4d17625d8c8412dc9bcb6a3553a30e09 | JavaScript | graemeerickson/travel-roulette | /main_app/static/js/app.js | UTF-8 | 5,599 | 2.71875 | 3 | [] | no_license | let map;
$(document).ready(function () {
$('.sidenav').sidenav();
$('select').formSelect();
window.sr = ScrollReveal();
sr.reveal('.search-section');
let delay = 1000;
let cities = ['Barcelona', 'Cancun','Dubai','Tokyo','Maui','Seattle'];
let input = document.getElementById('destination-box');
input.s... | true |
3ad5a37ea9610715304182d16d66bacc4728593b | JavaScript | RHieger/just-express | /express301/userRouter.js | UTF-8 | 856 | 2.953125 | 3 | [] | no_license | // userRouter.js
//
// This module contains the route for '/user' and works
// in concert with the routerApp.js module to send
// responses for HTTP requests.
// Robert Hieger
// May 10, 2019
// Import Express module:
const express = require('express');
// Instantiate object of type Router()
let router = express.R... | true |
a6a18ec01c5c30e4f2982fcd8f37de479d443aa4 | JavaScript | rickynyairo/music-shop | /apps/api/src/controllers/genre.controller.js | UTF-8 | 1,400 | 2.609375 | 3 | [
"MIT"
] | permissive | /**
* The Genre controller contains all static methods that handle genre requests
*/
import { Genre, Sequelize } from "../sequelize/models";
import { HTTP404Error } from "../utils/httpErrors";
// const { Op, literal } = Sequelize;
/**
* @class Genre
*/
class GenreController {
/**
* get all genre... | true |
bf94624cccaa5405ee643818eb7086ea570b7759 | JavaScript | drshriveer/data-structures | /sprint-one/src/functional-shared/stack.js | UTF-8 | 577 | 3.34375 | 3 | [] | no_license | var makeStack = function(){
var instance = {};
instance.storage = {};
instance.mySize = 0; // Hint: set an initial value here
_.extend(instance, stackMethods);
return instance;
};
var stackMethods = {};
/////////////////////////////////////////
stackMethods.push = function(value){
this.mySize++;
... | true |
91e846e9239834a529d242eaad7ff534cd805523 | JavaScript | greg93john/intro-to-nodeJS | /intro-to-NodeJS/index.js | UTF-8 | 420 | 3.265625 | 3 | [] | no_license | // jshint esversion:6
var superheroes = require("superheroes");
var supervillains = require("supervillains")
var mySuperheroName = superheroes.random();
var mySupervillainName = supervillains.random();
console.log(mySuperheroName);
console.log(mySupervillainName);
function GetSuperheroName() {
return ... | true |
127d0aea49f19963bd29363a21385afc5db055cd | JavaScript | teclone/forensic-js | /src/modules/Event/Drivers/MouseDriver.js | UTF-8 | 7,677 | 2.75 | 3 | [
"MIT"
] | permissive | /**
*@module MouseDriver
*@memberof EventDrivers
*/
/**
* event initialization options.
*@typedef {Object} MouseEventInit
*@private
*@property {boolean} [bubbles=true] - boolean value indicating if event bubbles
*@property {boolean} [cancelable=false] - boolean value indicating if event is
* cancelable
*@prop... | true |
5f56a7809782ff012cba82ea386d1b0655ec3806 | JavaScript | Yustynn/decision-theory-case-study | /web/part2/js/log.js | UTF-8 | 598 | 2.890625 | 3 | [] | no_license | histories = []
function resetHistory() {
history = [];
}
function addHistory(position, rewardType) {
let { x, y } = position;
let obj = [x, y, rewardType];
history.push(obj);
}
function logHistory() {
let string = JSON.stringify(history);
histories.push(history);
let log = {
rounds,
history: string,
};
... | true |
1149c945821dea36874735d08564d1fa7b7f282c | JavaScript | Roach/node-slack-example | /example.js | UTF-8 | 1,644 | 3.078125 | 3 | [] | no_license | // Load environment variables from `.env` file (optional)
require('dotenv').config();
// Required Slack libraries
// Slack Events API adapter
const createSlackEventAdapter = require('@slack/events-api').createSlackEventAdapter;
const slackEvents = createSlackEventAdapter(process.env.SLACK_VERIFICATION_TOKEN);
// Slack... | true |
44ead571b131ba2962d24cdfdf0a13fc0cb728b2 | JavaScript | emeery/blog | /src/reducers/PostReducer.js | UTF-8 | 327 | 2.546875 | 3 | [] | no_license |
import {CARGA_POST} from '../acciones/index';
const estadoInicial = { todos:[], unPost: null }
// PostReducer
export default function(state=estadoInicial, accion) {
switch(accion.type) {
case CARGA_POST:
return {...state, todos: accion.payload.data }
default:
return state;
... | true |
02f176b229a8a5f4b1c71c7402358b6de3056363 | JavaScript | leenav3/SupplyMission | /Box.js | UTF-8 | 636 | 3.109375 | 3 | [] | no_license | class Box{
constructor(x,y,w,h){
this.body1=Bodies.rectangle(x,y,w,h);
World.add(world,this.body1);
this.body2=Bodies.rectangle(x-w/2,y,20,100);
World.add(world,this.body2)
this.body3=Bodies.rectangle(x+w/2,y,20,100);
World.add(world,this.body3)
}
display()... | true |
a47d0302b31bdee83424e0ad5ebc998dcf81cf38 | JavaScript | lgrcyanny/PartyTime | /app/models/party.js | UTF-8 | 2,756 | 2.59375 | 3 | [
"MIT"
] | permissive | /**
* Model Dependencies
*/
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
var _ = require('underscore');
var utils = require('../../lib/utils');
/**
* Party Schema
*/
var PartySchema = new Schema({
host: {type: Schema.ObjectId, ref: 'User'},
partyName: {type:... | true |
4808a71e3d22b56c343499df7e86a85613976f03 | JavaScript | tembra/ascii-faces-ecommerce | /src/client/components/Product.jsx | UTF-8 | 2,311 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | import React from 'react'
import PropTypes from 'prop-types'
import { PRODUCTS_ENTITY } from '../constants'
import { addToShoppingCart } from '../actions'
import * as money from '../utils/money'
import * as timestamp from '../utils/timestamp'
/**
* Product component that renders a single product.
* @param {String} ... | true |
7a9333bb6f1365e98da0be4679e95d595155b095 | JavaScript | jesusbotella/pomodoro | /tests/unit/src/components/Timer.spec.js | UTF-8 | 2,841 | 2.515625 | 3 | [
"MIT"
] | permissive | import { shallowMount } from '@vue/test-utils';
import Timer from '@/components/Timer.vue';
jest.useFakeTimers();
function createTimerComponent(propsData = { time: 121 }) {
return shallowMount(Timer, {
propsData,
});
}
describe('Timer.vue', () => {
it('should render properly', (done) => {
const timer =... | true |
726edce5cc568b5aa95a8b84a451c3b5df420568 | JavaScript | jcharles22/Blitz | /src/context/GrabTheCoin/GrabTheCoinCanvas.js | UTF-8 | 3,109 | 2.890625 | 3 | [] | no_license | import React, { Component } from 'react';
import GameContext from '../GameContext'
import '../../Canvas.css';
import '../../BrickBreakerCanvas.css'
import GrabTheCoinGame from './GrabTheCoinGame';
export default class GrabTheCoinCanvas extends Component {
static contextType = GameContext;
state = {
... | true |
03c8ed5103fbdb4f689b348a6e5e3b6bbcbfe341 | JavaScript | danielmeeusen/wikipedia-api | /js/index.js | UTF-8 | 3,863 | 2.59375 | 3 | [] | no_license | $(document).ready(function(){
$(".topNav").hide();
$('.searchresults').hide();
$('.topSearch-btn').on("click", function(){
topSearchResults();
});
$('#searchbtn').on("click", function(){
initToTop();
searchResults();
});
var top = false;
// Submits form to reformat page and display search result.
... | true |
4ed588dd1834a56445679a3c883419430b7a792c | JavaScript | Lays-Maiara/checkpoint-programacao-imperativa | /chekpoint-26-08.js | UTF-8 | 2,311 | 3.890625 | 4 | [] | no_license | /*
Sala:
Integrantes:
*/
//Aula 09 - Checkpoint - Microondas
/*Alimentos e seus respectivos tempos em segundos:
1 - Pipoca – 10 segundos (padrão);
2 - Macarrão – 8 segundos (padrão);
3 - Carne – 15 segundos (padrão);
4 - Feijão – 12 segundos (padrão);
5 - Brigadeiro – 8 segundos (padrão);*/
function m... | true |
e53e281df42f681719b4c7bef77d100ee7113c2e | JavaScript | etopeojo/background-gradient | /script.js | UTF-8 | 1,540 | 3.5 | 4 | [] | no_license | var cssh3 = document.querySelector("h3");
var color1 = document.querySelector(".color1");
var color2 = document.querySelector(".color2");
var body = document.getElementById("gradient");
var button = document.querySelector("button");
var bodyBackground = window.getComputedStyle(body).getPropertyValue('background');
css... | true |
f25806fbc41de142a616346f7c920bbb726a1bb6 | JavaScript | HCoban/Coussie | /frontend/components/review/show.jsx | UTF-8 | 1,647 | 2.515625 | 3 | [] | no_license | import React from 'react';
import StarRatingComponent from 'react-star-rating-component';
class ReviewShow extends React.Component {
constructor({review, deleteReview, currentUser}) {
super();
this.currentUser = currentUser;
this.handleDelete = this.handleDelete.bind(this);
this.deleteReview = delete... | true |
fe925117848e792ff31d7a67c0adc83e1a280054 | JavaScript | Slava2510/Tanks | /scripts/bomb.js | UTF-8 | 464 | 2.59375 | 3 | [] | no_license |
function Bomb(props) {
var img = document.createElement("img") ;
img.src = BOMB_SRC ;
document.documentElement.appendChild(img) ;
this.img = img ;
$(img).css({
"top" : (this.y=props.y) ,
"left" : (this.x=props.x)
}) ;
Bomb.size = Block.size/4 ;
$(img).css({
"widt... | true |
e7cb4195880ae3afe8fac194e0d255d321ebedb2 | JavaScript | guncho2/angularjs-to-do | /app.js | UTF-8 | 1,402 | 3.59375 | 4 | [] | no_license |
//Register the app as a module using AngularJS's
//.module() method
angular
.module('to-do', [])
.controller('ToDoController', ToDoController);
//Register that controller as well and declare the
//controller's function.
function ToDoController(){
//We stored an integer in our counter app, but our
//t... | true |
cff87dc452186c6edbc7234c2dd242df1f46c2c8 | JavaScript | monsieurdule/13E034IP | /js/index.js | UTF-8 | 368 | 2.6875 | 3 | [] | no_license | var modal;
function klikDugme() {
loginModal.style.display = "block";
}
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
function start() {
document.getElementById("loginBtn").addEventListener("click", klikDugme);
modal = document.getElem... | true |
070366c8fc695991708f7824f1fdfd9a99d03a41 | JavaScript | foxtara1/Node-Express-Lab | /server.js | UTF-8 | 2,165 | 2.609375 | 3 | [] | no_license | const express = require('express');
const bodyParser = require('body-parser');
const server = express();
server.use(bodyParser.urlencoded({ extended: true }));
server.use(bodyParser.json());
server.use(express.json());
const db = require('./data/db.js');
server.get('/', (req, res) => {
res.json('Server running....... | true |
601aeb6ebd803eff8f87450dbc4b4b70d4aa82e5 | JavaScript | dasushan/js-practice | /02Basics/learnIfElse.js | UTF-8 | 101 | 2.5625 | 3 | [] | no_license | var who = 'user'
if (who === 'user') {
var display = 'Access Granted';
}
console.log(display);
| true |
cda6668cb0c99a7d696249325e991b69c5397bcb | JavaScript | talshnitzer/react-expensify-app | /src/playground/redux-101.js | UTF-8 | 3,373 | 3.6875 | 4 | [] | no_license | import { createStore} from 'redux';
//action generators are functions that return action objects
//if input object doesn't exist we default it to an empty object
//if increment by not use one.
//incrementBy - set equal to 1 If there's an object provided and it doesn't include 'incrementBy'.
//if there is no object pro... | true |
daa2a368b5096e73763a73754de5f2041dcbeea4 | JavaScript | petterastedt/startpage | /js/main.js | UTF-8 | 3,845 | 3.109375 | 3 | [] | no_license | // DOM ELEMENTS
const toggleDark = document.querySelector('#switch'),
clockDisplay = document.querySelector('.time'),
onOff = document.querySelector('.on-off'),
body = document.querySelector('body'),
logo = document.querySelector('.logo'),
icon = document.querySelector('.icon'),
... | true |
25ea1bb2ce88297777bd64c57d39c07142c1631a | JavaScript | quoctri2008/test1 | /.history/js/register_20210908214618.js | UTF-8 | 350 | 2.59375 | 3 | [] | no_license | function Validator(options) {
console.log(option.rule);
const formElement = document.querySelector(options.form);
if (formElement) {
console.log(formElement);
}
}
// Validator(option);
// // định nghĩa rule
Validator.isRequired = function (seletor) {
return seletor;
};
Validator.isEmail = function (seleto... | true |
5a05f5defe088beb9e4cdaf2041c4ae2e3306c24 | JavaScript | hyrskykari/tampere_event_site | /js/eventslist.js | UTF-8 | 883 | 2.75 | 3 | [
"MIT"
] | permissive | var events;
$(document).ready(function() {
$('#events').click(function(){
$.getJSON("http://visittampere.fi:80/api/search","type=event&text=music&limit=5",function (data){
// save the list of events
// no real change - just want to force new git commit
events = data;
var infoHTML = "";
//output summary ... | true |
1b597ce8fe6d6ed184c0c8d11d919b85e0d7eb6b | JavaScript | shalomin/resume | /script.js | UTF-8 | 63 | 2.546875 | 3 | [] | no_license | function myName(name){
console.log(name)
}
myName('Shalom') | true |
96a4eb116cdbfa3bf8076a9506563d41f0976e25 | JavaScript | Emiiru127/Simple-Visual-Novel-Engine-Web- | /Scripts/Objects/Notify.js | UTF-8 | 902 | 3.34375 | 3 | [] | no_license | class Notify{
constructor(){
this.name = "notify";
this.box = document.createElement("div");
this.message = document.createElement("div");
this.button = document.createElement("button");
this.box.setAttribute("id", "notifyBox");
this.message.setAttribute("id", "no... | true |
1dbd4ff4c12c9d34506c633eb77ddbb8fe0d8643 | JavaScript | bogdanbikics/lang-coach | /public/javascripts/public/models/points-model.js | UTF-8 | 432 | 2.515625 | 3 | [] | no_license | define('points-model', ['jquery', 'knockout'], function ($, ko) {
function PointsModel(words) {
var self = this;
self.totalPoints = ko.computed(function () {
var sum = 0;
$.each(words(), function (pos, word) {
sum += word.points;
});
r... | true |
7c738de139a6d0432c43c05c31024ffd4acf3125 | JavaScript | KanishDabreo/lhl-lectures | /w03d01-intro-to-web-servers/demo-nodeJS/server.js | UTF-8 | 612 | 2.875 | 3 | [
"MIT"
] | permissive | const http = require('http');
const server = http.createServer((req, res) => {
console.log("WHAT IS HAPPENING?!!??");
console.log(req.url);
if (req.url === '/') {
res.end('<h1>welcome to my home page!!!</h1>')
} else if (req.url === '/cats') {
res.end('Welcome to cats! Im alergic to cat... | true |
08c19ee91b42add4df449e473a02ab23af32ab5c | JavaScript | andrerondon/Code-Core--Web-Application | /semester_2/14th_promises/index.js | UTF-8 | 2,104 | 3.484375 | 3 | [] | no_license | const fsPromises = require('fs').promises
const fs = require('fs')
// Promises workshop
// https://www.youtube.com/watch?v=RvYYCGs45L4
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
// The most popular way to deal with asynchronous actions in JavaScript
// Promise is a con... | true |
52bb2d71a974ea23b44feb73e3af2b518b4fe090 | JavaScript | Earthware/panolens.js | /src/panorama/EmptyPanorama.js | UTF-8 | 574 | 2.859375 | 3 | [
"MIT"
] | permissive | (function(){
'use strict';
/**
* Empty panorama
* @constructor
* @param {number} [radius=5000] - Radius of panorama
*/
PANOLENS.EmptyPanorama = function ( radius ) {
radius = radius || 5000;
var geometry = new THREE.Geometry(),
material = new THREE.MeshBasicMaterial( {
color: 0x000000, opacit... | true |
2084f06c6f949ba4ba4ed53d927e2243cbe3e447 | JavaScript | nutboltu/react-faker | /src/utils/Faker.js | UTF-8 | 2,308 | 2.5625 | 3 | [] | no_license | import responseBuilder from './responseBuilder';
import { newMockXhr } from 'mock-xmlhttprequest';
class Faker {
constructor(apiList) {
this.MockXhr = newMockXhr();
this.MockXhr.onSend = this.mockXhrRequest;
self.realFetch = self.fetch;
self.realXMLHttpRequest = self.XMLHttpRequest;
self.fetch =... | true |
55e3bdd34541b59b1ac17dfae05dd2d5be2373b4 | JavaScript | ndrafke/dictionary-app | /src/Result.js | UTF-8 | 2,713 | 2.59375 | 3 | [] | no_license | import React from 'react'
import {Card} from 'react-bootstrap';
//Results from search displayed on bootstrap Card:
export default function Result({result}) {
//Styles for displaying json data returned from API call:
const definitionStyles = {
listStyle: "none"
}
const listStyles = {
... | true |
1dcfc60d98e6e9a3750444ecd26eec03962942c2 | JavaScript | danilajessi/danilajessi | /js/product-info.js | UTF-8 | 6,036 | 3.09375 | 3 | [] | no_license |
const maxRating = 5;//maximo 5 estrellas
function showImagesGallery(array) {
let htmlContentToAppend = "";
for (let i = 0; i < array.length; i++) {
let imageSrc = array[i];
htmlContentToAppend += `
<div class="col-lg-3 col-md-4 col-6">
<div class="d-block mb-4 h-100">
... | true |
bf04c5cd8f91d036dfac5af60de3c0968ecaf429 | JavaScript | NewAgeSMBTraining/mini-project-ajay | /employee-management-system-react/src/components/User/ChangePassword.js | UTF-8 | 2,754 | 2.546875 | 3 | [] | no_license | import { useRef } from "react";
import { HTTP } from "../../packages/axios";
import validator from "validator";
import style from "./ChangePassword.module.css";
const ChangePassword = (props) => {
const oldPasswordRef = useRef();
const newPasswordRef = useRef();
const newPasswordConfirmRef = useRef();
const o... | true |
3145583cfd3c0eb48c808a94c56ba74200a7a8b7 | JavaScript | dollarshaveclub/eslint-config-dollarshaveclub | /tests/fixtures/ember/pass/pass.js | UTF-8 | 251 | 3.90625 | 4 | [
"MIT"
] | permissive | const multiLineArray = [
1,
2,
3,
]
const singleLineArray = [ 1, 2, 3 ]
let x = 2
x = 3
if (x === 3) {
console.warn('foo')
} else if (x === 2) {
console.warn('bar')
} else if (multiLineArray === singleLineArray) {
console.warn('baz')
}
| true |
b4e4346df8d6fc34d97dd4324f9f3aec9deb9924 | JavaScript | annant/resume-builder | /src/services/auth.service.js | UTF-8 | 833 | 2.65625 | 3 | [] | no_license | const users = [
{
userName: 'agupta@gmail.com',
password: 'abcd1234',
firstName: 'Brian',
lastName: 'Fahey',
contact: '1234567890'
},
{
userName: 'agupt1a@gmail.com',
password: 'abcd1234',
firstName: 'John',
lastName: 'Miller',
... | true |
6cc7f833d2aea2619576697bfb6132ab0978afc6 | JavaScript | VizuaaLOG/BulmaJS | /src/plugins/message.js | UTF-8 | 3,369 | 2.59375 | 3 | [
"MIT"
] | permissive | import Bulma from '../core';
import DismissableComponent from '../dismissableComponent';
/**
* @module Message
* @since 0.1.0
* @author Thomas Erbe <vizuaalog@gmail.com>
* @extends DismissableComponent
*/
export class Message extends DismissableComponent {
/**
* Handle parsing the DOMs data attribute A... | true |
975e9e3fc5d89659c17c927a39866122f3e56937 | JavaScript | MV5174/Project3 | /sempiternal/src/Components/Game/Monsters/Mage3/reducer.js | UTF-8 | 642 | 2.53125 | 3 | [] | no_license | const initialState = {
//position along x and y axis of the player
position: [40, 400],
direction: "West",
currentCD: 0,
hp: 9,
att: 1,
maxCD: 3,
attacking: false,
locked: false,
isAlive : true,
}
const mage3Reducer = (state = initialState, action) => {
switch (action.type) ... | true |
4463ef278ce199bb77651499ebdcc03c4bc6701d | JavaScript | Curry3O/headWeb | /漫谈大前端/js/JS手写代码/数据结构/字典函数.js | UTF-8 | 1,216 | 4 | 4 | [] | no_license | //封装字典 Map
function Dictionary(){
this.item = {};
//字典中添加键值对
Dictionary.prototype.set = function(key,value){
this.item[key] = value;
}
//判断字典中是否有某个key
Dictionary.prototype.has = function (key) {
return this.item.hasOwnProperty(key);
}
//从字典中移除元素
Dictionary.prototype.r... | true |
5dea763f04ca12c48abce091c7e1c561796fabff | JavaScript | maxkudosh/cookie-consent-sample-project | /lib/operation-result/operation-result.js | UTF-8 | 937 | 2.828125 | 3 | [] | no_license | class OperationResult {
#isSuccessful
#data
#errorType
get isSuccessful() {
return this.#isSuccessful;
}
get data() {
if (!this.#isSuccessful) {
throw new Error('Cannot extract data from unsuccessful operation result');
}
return this.#data;
}
... | true |
6cbe1b97cb0541cb7a2af58ca3ab1cdef220ac2b | JavaScript | euangoddard/clr | /src/js/favicon.js | UTF-8 | 1,111 | 2.75 | 3 | [
"MIT"
] | permissive | 'use strict';
var each = require('lodash.foreach');
var FAVICON_ID = 'favicon-link';
var IMAGE_TYPE = 'image/png';
var set_favicon = function (colour_name) {
var link = document.getElementById(FAVICON_ID);
link.href = create_favion(colour_name);
};
var get_colour_from_name = function (colour_name) {
... | true |
070fde0832a0145abee7d764f2e12f0d9af9e8e5 | JavaScript | megaboy101/clementine-practice | /app/controllers/userController.client.js | UTF-8 | 1,554 | 3.578125 | 4 | [
"MIT"
] | permissive | /*
Contoller function to retreive user data
from the api and push it to the DOM
*/
(function(){
// Variables have || null in case property doesnt exist to avoid errors
var profileId = document.querySelector('#profile-id') || null;
var profileUsername = document.querySelector('#profile-username') || null;
va... | true |
a57db4929f88c76aa6601fffe8220ed323ac5695 | JavaScript | rprohitprasad/CFC_JS_Assignments | /Assignment2/3-upperlower.js | UTF-8 | 253 | 3.65625 | 4 | [] | no_license | function character(ch){
let charCode = ch.charCodeAt(0);
if(charCode > 64 && charCode < 91){
console.log("UpperCase");
}
else if(charCode > 96 && charCode < 123){
console.log("LowerCase");
}
}
character('R'); | true |
492f56f7f2e21ce6e58ad4b72f1b2aca32c26f36 | JavaScript | nishuibaichuan/Qpet | /src/main/webapp/resources/static/front/js/carts.js | UTF-8 | 2,728 | 2.671875 | 3 | [] | no_license | //====功能:复选框全选、取消=====//
//=====全选/取消全部商家店铺及商品=====//
function ToggleCheckAll(e) {
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "checkbox" && (inputs[i].id.indexOf("chkCItem") > 0 || inputs[i].id.indexOf("chkItem") > 0 || inpu... | true |
80b4bb12a9a7ca8ca21794675d0794912a51b865 | JavaScript | LiuL0703/algorithm | /LeetCode/JavaScript/92. Reverse Linked List II.js | UTF-8 | 1,090 | 3.53125 | 4 | [] | no_license | /**
* Definition for singly-linked list.
* function ListNode(val) {
* this.val = val;
* this.next = null;
* }
*/
/**
* @param {ListNode} head
* @param {number} m
* @param {number} n
* @return {ListNode}
*/
var reverseBetween = function(head, m, n) {
if(!head) return;
const res = head;
let... | true |
e1565bd2e1f9636b4ae6f54808b8720b329cb3a1 | JavaScript | rohitv007/3d-design | /src/js/scrolling.js | UTF-8 | 373 | 2.90625 | 3 | [] | no_license | // var count = 0
// window.addEventListener('mousewheel', (e) => {
// console.log('scrolling')
// if (e.deltaY > 0)
// count++;
// else
// count--;
// scroll(count);
// })
// function scroll(count) {
// document.getElementById('3d_app').setAttribute('style',
// 'transf... | true |
b4e899c14524832b991642b24eca4d93426111fc | JavaScript | jiangshanmeta/meta | /src/1578.minimum-time-to-make-rope-colorful.1700/solution.js | UTF-8 | 481 | 3.546875 | 4 | [
"MIT"
] | permissive | /**
* @param {string} s
* @param {number[]} cost
* @return {number}
*/
var minCost = function (s, cost) {
let result = 0;
let index = 0;
while (index < s.length) {
let c = cost[index];
let max = c;
const char = s[index++];
while (index < s.length && s[index] === char) {
... | true |
f538ea6327b207384edb2b250b385312b71de80d | JavaScript | polunwu/FCC-Intermediate-Algorithm-Scripting | /c13_Sum_All_Primes/c13.js | UTF-8 | 416 | 3.65625 | 4 | [] | no_license | function sumPrimes(num) {
let list = [];
// create an array of 2 to num
for (let i = 2; i <= num; i++) {
list.push(i);
}
for (let test = 2; test <= Math.sqrt(num); test++) {
for (let i = 0; i < list.length; i++) {
if (list[i] % test === 0 && list[i] / test !== 1) {
list[i] = 0;
}
... | true |
8380a104f679fe1fb6a94a7aebc8040d766b985f | JavaScript | Jelena-Jess/JS_GitHub_Finder | /github.js | UTF-8 | 1,328 | 3.40625 | 3 | [] | no_license | //using ES6 classes
//https://github.com/settings/applications - register a new OAuth application to get Client ID and Client Secret
class GitHub {
constructor() {
//client ID and secret from github website:
this.client_id = '...';
this.client_secret = '...';
this.repos_count = 5;
this.repos_so... | true |
0b66f207d6c77c60140292b339a08ce4d0a92043 | JavaScript | si-2019/SI-FRONTEND | /reactapp/src/MIKE/components/BodovanjeProjekataStudenti/BodovanjeProjekataStudenti.js | UTF-8 | 3,815 | 2.75 | 3 | [] | no_license | import React, { Component, Fragment } from 'react';
import { Form, FormGroup, Label, Input, Table, Button } from 'reactstrap';
//import 'bootstrap/dist/css/bootstrap.css';
import TabelaGrupa from './TabelaGrupa.js'
import { sveGrupeProjekta } from '../../api/projekti_zadaci';
import { upisBodovaPojedinacno, upisBodov... | true |
8bac75af5fa6d2eee48ba60842a199fe3093762e | JavaScript | imPZH/IfeTask | /task019/task019v2.js | UTF-8 | 3,707 | 2.859375 | 3 | [] | no_license | window.onload = init;
function init(){
var ranks = document.getElementById("ranks");
var btn = document.getElementById("button1");
EventUtil.addHandler(btn , "click",Controller.push_left);
var btn = document.getElementById("button2");
EventUtil.addHandler(btn , "click",Controller.push_right);
var btn = document.g... | true |
7f0d0a1396a0a96ea887704c43f565078eb6fe04 | JavaScript | nickmeldrum/operate-on-subdirectories-node | /src/operate-on-all-sub-directories.test.js | UTF-8 | 811 | 2.5625 | 3 | [] | no_license | const fs = require('fs-extra')
const path = require('path')
const fsOperations = require('../')
const testPath = path.join(__dirname, '../tmp')
const randomString = () =>
Math.random()
.toString(36)
.substring(7)
describe('operateOnAllSubDirectories', () => {
beforeEach(async () => fs.emptyDir(testPath))... | true |
1e7ba6999a4c979128b1d625c7cc368aef05ecce | JavaScript | Faheem-Khan97/NewIn | /navbar.js | UTF-8 | 342 | 2.8125 | 3 | [] | no_license | const hamBtn = document.getElementById("ham-btn");
const navLinks = document.getElementById("nav-links");
hamBtn.addEventListener('click', () => {
console.log("clicked")
const height = navLinks.offsetHeight;
navLinks.style.transition = "transform 0.6s ease-in-out"
navLinks.style.transform = `translat... | true |
b6e9da9da0e0ba1bbbf5853f528b1264afd73377 | JavaScript | mirostraka98/Tilde | /js/script.js | UTF-8 | 260 | 3.21875 | 3 | [] | no_license | var cisloJedna = +prompt("Napíš prvé číslo");
var cisloDva = +prompt("Napíš druhé číslo");
alert (cisloJedna + cisloDva)
if((cisloJedna + cisloDva) % 2 == 0) {
alert ("Číslo je párne")
}
else {
alert ("Číslo je nepárne")
} | true |
353ebe69e177b09d2b3d9513e83ecd471b6573dc | JavaScript | LXiong/zhongpai | /src/main/webapp/js/supertool/avatar.js | UTF-8 | 1,456 | 2.53125 | 3 | [] | no_license | (function() {
var $, Avatar;
$ = jQuery;
Avatar = (function() {
function Avatar(elem, target, options) {
this.elem = elem;
if (typeof target === 'string') {
target = $(target);
}
this.target = target;
this.options = options != null ? options : {};
this.hidden = true... | true |
afed74a46b31f98e8452c716c04df754632c8705 | JavaScript | nullpotent/halal | /js/imgutils.js | UTF-8 | 2,192 | 2.78125 | 3 | [] | no_license | (function() {
"use strict";
define([], function() {
var ImageUtils;
ImageUtils = (function() {
function ImageUtils() {
this.hit_ctx = this.createCanvas(1, 1).getContext("2d");
/*
@todo
Ovo treba biti maks velicine
*/
this.tint_ctx = this.createCa... | true |
60458c4ac80e977f8577cf8f179d5777e9690e4c | JavaScript | HarrisonMS/hmseaborn-port | /src/components/home/homeC.component.jsx | UTF-8 | 2,944 | 2.65625 | 3 | [] | no_license | import React from "react";
const HomeC = () => (
<section id="home-c" className="text-center py-2">
<div className="container">
<h2 className="section-title">My Creative Process</h2>
<div className="bottom-line"></div>
<p className="lead">
All of my projects are based off of a practiced formula to get ... | true |
532da55d07d7d4260d3b783dc3272fc5897507b1 | JavaScript | JetBrains/kotless | /examples/ktor/shortener/src/main/resources/static/js/shortener.js | UTF-8 | 1,506 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | window.onload = function () {
let btn = document.getElementById("shorten-button");
let input = document.getElementById("shorten-input");
function url(path, params) {
return path + "?" + Object
.keys(params)
.map(function (key) {
return `${key}=${encodeURIComp... | true |
7a41fcfdb0cb0defc406c30836c48d4ad489b4de | JavaScript | JoannaAnaiz/LIM010-Cipher | /src/cipher.js | UTF-8 | 2,021 | 3.125 | 3 | [] | no_license | window.cipher = {
encode: (entrada1, desplazamiento) => {
let codificar = '';
for(let i = 0; i < entrada1.length; i++){
let codAscii = entrada1.charCodeAt(i);
if(codAscii >= 65 && codAscii <= 90){
let code = (codAscii - 65 + desplazamiento)%26 + 65 ;
codificar += String.fromCharCod... | true |
134ee25137c804ecd2113e8d4faa3ab51c37fc5c | JavaScript | braamconradie/Webhook-and-API.AI-Echo-Sample | /index.js | UTF-8 | 9,715 | 2.625 | 3 | [] | no_license | 'use strict';
const express = require('express');
const bodyParser = require('body-parser');
const request = require('request');
const restService = express();
restService.use(bodyParser.urlencoded({
extended: true
}));
restService.use(bodyParser.json());
restService.post('/echo', function(req, res) {
var... | true |
d928f88333f72a7184677f6220354cbd08312fcd | JavaScript | LuisAli22/estacion-espacial | /js/Comandos/MoverseHaciaLaIzquierda.js | UTF-8 | 295 | 2.609375 | 3 | [] | no_license | MoverseHaciaLaIzquierda.prototype= new Comando;
MoverseHaciaLaIzquierda.prototype.constructor=MoverseHaciaLaIzquierda;
function MoverseHaciaLaIzquierda(escena){
this.escena=escena;
}
MoverseHaciaLaIzquierda.prototype.ejecutar=function(evento){
this.escena.moverseHaciaLaIzquierda(evento);
}
| true |
b1b1fa0af48a3334e45c1fdd6a246487d602a198 | JavaScript | dumadi1/gioleelab | /script.js | UTF-8 | 2,632 | 3.109375 | 3 | [] | no_license | var name;
var emailed;
function compose(stage){
console.log(stage);
var message=document.getElementById("message");
var sample=document.getElementById("sample");
if(stage == "Sample Received"){
message.value="Thank you for Dropping off your sample with sample information, "+sample.value+" , It ... | true |
dfed443f512eaa5c0882c7aba1b2bfaa700fb477 | JavaScript | getnacelle/nacelle-smile.io-nuxt-module | /example/store/search.js | UTF-8 | 3,995 | 2.515625 | 3 | [
"MIT"
] | permissive | export const state = () => ({
query: null,
autocompleteVisible: false,
filtersCleared: false,
searchData: {},
filteredData: null,
loadedData: false,
searchLoading: false,
resultsToDisplay: 12
})
export const getters = {
queryOrigin(state) {
if (state.query && state.query.origin) {
return st... | true |
334d0dfa2759153eb1c0a314d98682d6b6f52c90 | JavaScript | HwyToHell/colt-steele | /10-js-intro/01-stalker.js | UTF-8 | 157 | 3.1875 | 3 | [] | no_license | var first = prompt("enter first name");
var last = prompt("enter last name");
var age = prompt("enter age");
console.log(first + " " + last + " @ " + age);
| true |
24e998f51fec1e231cbc99b0053f7386910e2d21 | JavaScript | uwitdat/gear-guru-sell-and-buy | /controllers/posts.js | UTF-8 | 3,425 | 2.65625 | 3 | [] | no_license | const Guitar = require('../models/guitar');
const Amp = require('../models/amp')
const Post = require('../models/post')
const User = require('../models/user')
module.exports = {
showGuitars,
showVintageGuitars,
showModernGuitars,
showSolidBody,
showHollowBody,
showBelow1000,
showAmps,
s... | true |
25486abecf0b7b3f2ae38503de6fe043c48a65a2 | JavaScript | Rosinele/FrontEndbyFacebookDeveloperCircles | /01 - Programação Básica/conhecendo objetos/script.js | UTF-8 | 230 | 2.8125 | 3 | [] | no_license | console.log("estou no inicio do script")
document.write("Esta é uma linha");
document.writeln("Está é uma linha com writeln");
document.write("Outra linha");
//window.location.reload();
console.log("cheguei no fim do script") | true |
84ad939ca07b2e0923b76cec05d37abc44700494 | JavaScript | ElrieM/CI_MS2_Sudoku-Game | /assets/js/index.js | UTF-8 | 386 | 2.65625 | 3 | [] | no_license | /* jshint esversion: 6 */
// Runs practice game
// Practice game has the ability to play various game
document.getElementById('btn-practice').addEventListener("click", function () {
window.location.href = 'practice.html';
});
// Runs challenge game
document.getElementById('btn-challenge').addEventListener("clic... | true |
a067c0c86b7854a7551760b546e7119af2bce678 | JavaScript | bluerover/siloapp | /sails_app/config/bootstrap.js | UTF-8 | 14,350 | 2.609375 | 3 | [] | no_license | /**
* Bootstrap
*
* An asynchronous boostrap function that runs before your Sails app gets lifted.
* This gives you an opportunity to set up your data model, run jobs, or perform some special logic.
*
* For more information on bootstrapping your app, check out:
* http://sailsjs.org/#documentation
*/
module.exp... | true |
dc71ea7e36ee4fa021fb06ecbc8fe48c741cca87 | JavaScript | Anntroy/webpack_basics | /src/js/module-b.js | UTF-8 | 116 | 2.859375 | 3 | [] | no_license | export const printConsole = (str) => {
let string = 'Hello from console to';
console.log(`${string}${str}`);
};
| true |