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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
626aa166c72f5187f73d76801d089aea05753df4 | JavaScript | holly-ctrl/react-1-afternoon | /src/components/Topics/FilterObject.js | UTF-8 | 1,792 | 2.921875 | 3 | [] | no_license | import React, {Component} from 'react'
class FilterObject extends Component {
constructor() {
super()
this.state = {
unfilteredArray: [
{
name: 'Kanye West',
major: 'art',
age:32
},
... | true |
9c91b3485395f2be6f024750d6fc29afa65f175c | JavaScript | Rainiereed/P5.js-sprite-animation | /sketch.js | UTF-8 | 2,566 | 3.28125 | 3 | [] | no_license | /*
x 1. Load image of woman with bird in cage
x 2. Add interaction, something when the user clicks
x 3. Remove bird from cage
4. Play animation of bird flying from cage.
5. Ending somehow
*/
let spritesheet, spritedata;
let animation = [];
let bird;
let cageImg, noBirdImg;
let birdInCage ... | true |
35acc0f6f516a5354dfd9384c2769c10a9630161 | JavaScript | lanyage/chat | /src/redux/user.redux.js | UTF-8 | 3,336 | 2.578125 | 3 | [] | no_license | import { getRedirectPath } from '../util'
import axios from 'axios'
/**这里是redux的actions */
const AUTH_SUCCESS = 'AUTH_SUCCESS'
const ERROR_MSG = 'ERROR_MSG'
// const LOGOUT = 'LOGOUT'
const LOAD_DATA = 'LOAD_DATA'
const LOGOUT = 'LOGOUT'
/**初始状态 */
const initState = {
username: '',
type: '',
msg: '',
... | true |
195e5708f3e69d224083a37849589ca37c0ba564 | JavaScript | jaywcjlove/code-example | /src/kotlin.js | UTF-8 | 827 | 2.546875 | 3 | [
"MIT"
] | permissive | const code = `const val POINTS_X_PASS: Int = 15
val EZPassAccounts: MutableMap<Int, Int> = mutableMapOf(1 to 100, 2 to 100, 3 to 100)
val EZPassReport: Map<Int, Int> = EZPassAccounts
// update points credit
fun updatePointsCredit(accountId: Int) {
if (EZPassAccounts.containsKey(accountId)) {
println("Upda... | true |
c965fa44977b9f5f8f8433a1c4d8271d651e5e42 | JavaScript | RaduMilici/learning | /es6-tutorial/script.js | UTF-8 | 104 | 2.75 | 3 | [] | no_license | "use strict";
function log(s){
document.getElementById("text").innerHTML += "\n"+s;
console.log(s);
}
| true |
827d038507daa25fd98cfbe63437f6333a3a206f | JavaScript | 7787229/aleksey_project | /dlazbaskladem/catalog/view/javascript/xvrproductquantities.js | UTF-8 | 18,059 | 2.90625 | 3 | [] | no_license | // Действия при нажатии кнопки ПЛЮС
var xvrPlus = function (oldValueXVR, newValueXVR, stepValueXVR, minValueXVR, maxValueXVR, quantityInStock, textAlertMinimum, textAlertMaximumOrder, textAlertQuantityInStock, textAlertQuantityInOrder, textAlertOrderNotAvailable, textCheckForNumber, xvrPmVminusStatus) {
console.log(ma... | true |
3679d98814c4f276483406fef26d7cab13dac5c8 | JavaScript | dannyjeng/typing_test | /src/components/convert_seconds_to_time.js | UTF-8 | 446 | 3.015625 | 3 | [] | no_license | const secondsToTime = (s) => {
let divisor_for_minutes = s % (60*60);
let minutes = Math.floor(divisor_for_minutes / 60);
let divisor_for_seconds = divisor_for_minutes % 60;
let seconds = Math.ceil(divisor_for_seconds);
if (seconds < 10) {
seconds = '0' + seconds; // For padding the second... | true |
6f83c0a643f39611813da83022798e60862a7c40 | JavaScript | tmikus/spark-engine | /engine/src/utils/Function.js | UTF-8 | 678 | 3.40625 | 3 | [] | no_license | /**
* Creates a new function which will be executed once after a specified time passes.
*
* @param {Function} callback Callback to call after the time passes.
* @param {number} time Time in milliseconds to wait until method should be called.
* @returns {Function} Debounce function.
*/
Function.debounce = function... | true |
fe12a946b27f7bb21b3a1495aad4b7902e5323f3 | JavaScript | owenhoskins/Meteor-Files | /worker.js | UTF-8 | 1,040 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | "use strict";
self.onmessage = function(e) {
var fileReader;
if (self.FileReader) {
fileReader = new FileReader();
fileReader.onloadend = function(chunk) {
postMessage({bin: (fileReader.result || chunk.srcElement || chunk.target).split(',')[1], chunkId: e.data.currentChunk, start: e.data.start});
... | true |
22cf31d5f742fc0b465f0b1af6ed67a829f3ac9c | JavaScript | cassio12/Filtro-com-hooks | /src/app.js | UTF-8 | 2,765 | 2.953125 | 3 | [] | no_license | import React, {useState} from 'react';
import Highlight from './highlight';
import { lower } from './utils';
const App = () => {
const [word, setWord] = useState('');
const [corseName, setCorseNome] = useState('')
const [corseHours, setCorseHours] = useState('');
function handleChange(func) {
... | true |
423eba505b585ea875bc818748a5ee82296d326b | JavaScript | naoki-sawada/Weather-and-Time-API | /lib/Geo2Weather.js | UTF-8 | 939 | 2.609375 | 3 | [
"MIT"
] | permissive | const request = require('request');
const conf = require('config');
class Geo2Weather {
constructor() {}
get(lat, lng, opt) {
const options = opt || {};
const queryOptions = {
uri: 'http://api.openweathermap.org/data/2.5/forecast/daily',
qs: {
APPID: conf.openWeatherKey,
lat: l... | true |
6af212c4270dec69a370ecc778911554bbf7ed89 | JavaScript | Krokodil45/mongoDB-galutinis | /frontend/new-membership.js | UTF-8 | 668 | 2.796875 | 3 | [] | no_license | document.getElementById("add-membership").addEventListener("submit", (e) => {
e.preventDefault();
const name = document.getElementById("name").value;
const price = document.getElementById("price").value;
const description = document.getElementById("description").value;
const data = { name, price, descriptio... | true |
37366c46b452a3c0b0c83ccc968241feec4a97c6 | JavaScript | samira-estes-garcia/stir_fry_box | /stir_fry_box_frontend/src/index.js | UTF-8 | 3,717 | 2.609375 | 3 | [] | no_license | let api = new ApiAdapter();
document.addEventListener("DOMContentLoaded", function () {
new Order();
api.getIngredients().then((ingredients) => {
console.log(ingredients);
ingredients.forEach((ingredient) => {
const newIngredient = new Ingredient(ingredient);
newIngredient.collectionOfIngredien... | true |
bcb01b251799553144fe01188449acf498cc40f7 | JavaScript | pvvliet/securitytraining | /src/main/resources/public/app/utils/Router.js | UTF-8 | 1,217 | 2.765625 | 3 | [] | no_license |
export default class Router extends HTMLElement
{
static routes = {};
constructor()
{
super();
this.updateHandler = () => this.update();
}
connectedCallback()
{
window.addEventListener('load', this.updateHandler);
window.addEventListener('hashchange', this.upd... | true |
45370a6b6f5a6de7be93cc406dcff37c950e6d6e | JavaScript | chhavi-khandelwal/Js-exercises | /Place-Order/place-order.js | UTF-8 | 11,389 | 3.15625 | 3 | [] | no_license | var ingredients = [ {"ingredientName":"Breads", "type":[{"name":"wheat", "price":10, "id":"bread1", "selectFlag": "false"},
{"name":"Multi-Grain", "price":20, "id":"bread2", "selectFlag": "false"},
{"name":"Brown", "price":12, "id":"bread3", "selectFlag": "false"}]
},
{"ingredientName":"Supplements", "type":[{"name":... | true |
8774d5ec1f2e09313b345e85a5679e4d279a366e | JavaScript | robertkowalski/grenache-browser | /client.js | UTF-8 | 1,758 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | 'use strict'
const retry = require('async/retry')
class PeerRPCClient {
constructor (link, opts) {
const defaults = {
requestTimeout: 2500,
ssl: false
}
this.conf = { ...defaults, ...opts }
this.link = link
}
init () {
// mimic node api
return this
}
_request (key, pay... | true |
c401958422f0b64d566523b91893173c23799a54 | JavaScript | SyedAman/my-reads | /src/components/MyBooksPage.js | UTF-8 | 2,079 | 2.671875 | 3 | [] | no_license | import React from 'react';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import Header from './Header';
import BookShelf from './BookShelf';
/**
* A top-level stateful component that serves as the home page of the app.
* Displays three shelves with categories "Currently Reading", "Wan... | true |
4feca394c368622f6ed6c764283e625119a01c94 | JavaScript | czm2159/home-something | /中高级前端必备手写技能.js | UTF-8 | 12,160 | 3.6875 | 4 | [] | no_license | /*
一、实现一个new操作符
*/
function New(Constructor,...args){
//1:创建一个对象,即new出来的对象
const result = {};
if(Constructor.prototype != null){
//实例的原型和构造函数的prototype属性指向的是同一个地址,如果是null
result.__proto__ = Constructor.prototype;
//也可以使用ES6的setPrototypeOf方法
//Object.setPrototypeOf(result,Constructor.prototype);
}
//2.用创建的对... | true |
aa446cb41d0d834d333f2ef8b572e7404da99de0 | JavaScript | eddjimlab/SOLID | /3_I.js | UTF-8 | 2,232 | 4.5 | 4 | [] | no_license | //Interface segregation principle
//Вариант без соблюдения принципа
// class Animal {
// constructor(name) {
// this.name = name
// }
//
// walk() {
// console.log(`${this.name}: могу ходить`)
// }
//
// swim() {
// console.log(`${this.name}: могу плавать`)
// }
//
// ... | true |
c5bb1a4a6a28e2a594f217b542d17cfb8678f7ab | JavaScript | bdecoate/event-widget | /src/client/app/upcoming-events/resource.js | UTF-8 | 2,129 | 2.71875 | 3 | [] | no_license | import _ from 'lodash';
import $ from 'jquery';
import Q from 'q';
import ko from 'knockout'
import moment from 'moment';
export default class Resource {
constructor(params){
// observable of current date filter
this.cur_filter = params.filter;
// the event field that contains the date we want
this.date_key ... | true |
33e20c6d4214b4221f6b866b8c51133e76b7fc85 | JavaScript | GUNDUPOOJA/findit | /src/public/scripts/game.js | UTF-8 | 2,610 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | /**
* Game code - provides location-based game functions
* @module main
*
* @requires module:device.js
* @requires module:target.js
*
* @author Denise Case
*/
import Target from './target.js';
/**
* Create a game.
*
* @class Game
* @author Denise Case
*/
export default class {
/**
* Game constructor... | true |
59cc9d44f2c745ffc9c545577fabb21f93ffcbcd | JavaScript | dhruwlalan/timeout | /src/js/views/theme.js | UTF-8 | 683 | 2.65625 | 3 | [
"MIT"
] | permissive | import dom from './dom';
export const updateTheme = (theme) => {
dom.body.removeAttribute('class');
dom.body.classList.add(`theme-${theme}`);
if (theme === 'light') {
dom.themeSvg.setAttribute('src', './assets/svg/icon-dark.svg');
} else if (theme === 'dark') {
dom.themeSvg.setAttribute('src', ... | true |
1771c14a97621ca3dd18e485f43bd675e702709d | JavaScript | bindu07/RestApiExpress | /test.js | UTF-8 | 632 | 3.59375 | 4 | [] | no_license | function getPrimes(n) {
var temp = [], primes = [];
for(let i=2; i<=n; ++i) {
if(!temp[i]){
primes.push(i);
for(let j = i; j<= n; j+= i){
temp[j] = true;
}
}
}
return primes;
}
let main = () => {
const ws = fs.createWriteStream(process.e... | true |
10660876dd7afcfb4111d9e4bab9894fd3e49884 | JavaScript | hakimomich/BoutalebHakim_7_20082021 | /controllers/auth.js | UTF-8 | 2,060 | 2.59375 | 3 | [] | no_license | const bcrypt = require('bcrypt');
const MaskData = require('maskdata');
const jwt = require('jsonwebtoken');
const {user} = require('../models/user');
// Fonction qui permet a l'utilisateur de se crée un espace user, l'email est crypter avec MaskData, et le password et crypter avec bcrypt.
exports.signup = (req, res, ... | true |
cc896710091e2ad6d96042c095bf9fd6ef80c9d3 | JavaScript | CarloD39/vue-todolist | /js/script.js | UTF-8 | 564 | 2.53125 | 3 | [] | no_license | Vue.config.devtools = true;
const app = new Vue (
{
el: '#app',
data: {
listTasks : [
'alto',
'basso',
'magro',
'grasso',
],
newElement: '',
},
methods: {
addTask: func... | true |
5f11ec80e385335b22bcdd94017066789ad90d0d | JavaScript | pkoltun/SensorsIO | /lib/Sensor.js | UTF-8 | 1,773 | 2.71875 | 3 | [] | no_license | var util = require("util");
var events = require("events");
var querystring = require("querystring");
function Sensor(startState, logger) {
this._state = startState;
var that = this;
events.EventEmitter.call(this);
this.readOnly = true;
this.stateChangeEventName = "stateChanged";
if (!logger) ... | true |
76d67cb5b65687a22329c4290276737e8e368ab7 | JavaScript | Zomievey/typescript_lab | /dicey.js | UTF-8 | 2,996 | 3.390625 | 3 | [] | no_license | "use strict";
var dice = [];
var btnGenerate = $("#btn-generate");
var btnRoll = $("#btn-roll");
var btnSum = $("#btn-sum");
var removeAllButton = $("#removeAll");
var Die = /** @class */ (function () {
function Die() {
var _this = this;
this.div = $("<img></img>");
this.roll();
$(th... | true |
e5643b1ef83fc81e0ffd4c9b7d604c9e1e8f8175 | JavaScript | Bushmb/indecision-app | /src/playground/es6-let-const.js | UTF-8 | 362 | 3.46875 | 3 | [] | no_license | var nameVar = 'Mike';
var nameVar = 'Andrew';
console.log({nameVar});
let nameLet = 'Jenny';
nameLet = 'Judy';
console.log({nameLet});
const nameConst = 'Frank';
console.log({nameConst});
// Block scoping
const fullName = 'Bob Bush';
let firstName;
if(fullName) {
firstName = fullName.split(' ')[0];
consol... | true |
5b4fbfeb71da3128f441d2853fd8d1b35616bbfb | JavaScript | Bamuel/Pokemon-Journey | /js/music.js | UTF-8 | 886 | 2.84375 | 3 | [] | no_license | var theme = document.getElementById("thethemesong");
function playAudio() {
theme.play();
}
function pauseAudio() {
theme.pause();
}
var playMusic = true;
$(document).keydown(function(e) {
if(e.which == 77 || e.keyCode == 77) {
var audio = document.getElementById("thethemesong");
var audi... | true |
4e5474780c4804ccf799dbb17ccdf47aa4c46427 | JavaScript | ollealm/project-mongo-api | /server.js | UTF-8 | 3,328 | 2.734375 | 3 | [] | no_license | import express from 'express'
import bodyParser from 'body-parser'
import cors from 'cors'
import mongoose from 'mongoose'
import Book from './models/books'
import Author from './models/authors'
import booksData from './data/books.json'
const mongoUrl = process.env.MONGO_URL || "mongodb://localhost/books"
mongoose.co... | true |
ff20f5a21242f0294c439b97c4eb339ce9d67179 | JavaScript | swc-project/swc | /crates/swc_ecma_minifier/tests/terser/compress/harmony/issue_2762/output.terser.js | UTF-8 | 243 | 2.859375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | var bar = 1,
T = true;
(function () {
if (T) {
const o = function () {
var p = bar;
console.log(p, o.prop, r.prop);
};
o.prop = 2;
const r = { prop: 3 };
o();
}
})();
| true |
de3c482cd536d5ce4ff438b90c999ee32dc4eb7c | JavaScript | trevorharm/newsScraper | /controllers/scrapeController.js | UTF-8 | 1,827 | 2.75 | 3 | [] | no_license | // Dependencies Defined
var cheerio = require("cheerio");
var axios = require("axios");
var db = require("../models");
var exports = module.exports = {};
//scrape articles from the New YorK Times
var scrape = function(callback) {
var articlesArr = [];
axios.get("https://www.nytimes.com/")
.then(function(respon... | true |
4fcb752d78bf1d43e2ad7f100c2086399d4778c6 | JavaScript | yoonjonglyu/aicel-front-code | /src/view/todo.js | UTF-8 | 1,199 | 2.65625 | 3 | [
"MIT"
] | permissive | import React from 'react';
import Layout from '../components/layout';
import '../assets/css/todo.css';
const Todo = (props) => {
const {
todoList,
todoValue,
handleToDo,
addToDo,
removeToDo
} = props;
let todoForm;
const todoItem = todoList.map((obj, index) => ... | true |
38eafd63cb2739d8bf592de6d2c8c53d95066f69 | JavaScript | awais-shafiq/express-sample | /controllers/IndexController.js | UTF-8 | 1,796 | 2.765625 | 3 | [] | no_license | const Item = require("./../models/item");
const listItems = async () => {
try {
// "SELECT * FROM item"
const data = await Item.query();
return { result: { status: 200, message: "Listing items", data: data } };
} catch (error) {
return { error: { status: 404, message: error.message, data: null } }
}
}
... | true |
288db89730382e481005e21a9f988543dadc931d | JavaScript | kellybarber/personal-site | /src/components/ContactForm.js | UTF-8 | 1,844 | 2.5625 | 3 | [] | no_license | import React, { Component } from 'react'
import { sendMail } from '../helpers/icons'
import post from '../helpers/post'
class ContactForm extends Component {
state = { name: '', email: '', message: '', response: '' }
handleInput = e => {
const name = e.target.name
const value = e.target.value
this.s... | true |
8edbf0e19136d77691ab8e5d0f065b1069d8bfa1 | JavaScript | Alexander360/pomodoit | /js/doitim.js | UTF-8 | 1,011 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | /**
* @author Joseph
*/
/**
*
* @param task data from doit.im
*/
doitDataKey = 'doit.tasks';
function completeDoit(task){
var url=hostPrefix()+"/api/tasks/complete/"+task.uuid;
var d=new Date();
task.completed= d.getTime();
requestJSON(url,function(data){
console.info(task.title+" complet... | true |
c0c5b6116e622c543b52c462b20f6652b886e559 | JavaScript | pextech/MyRezume | /js/single-blog.js | UTF-8 | 3,001 | 2.75 | 3 | [] | no_license |
const subscribe = () => {
var subscribeForm = document.querySelector('#subForm');
subscribeForm.addEventListener('submit', (e) => {
e.preventDefault();
db.collection('subscribes').add({
email: subscribeForm['email'].value
});
subscribeForm.reset();
docu... | true |
ec0771bcfeb4da739e9949a46b04d5fd88ac06c1 | JavaScript | yamabe/TestRepo1 | /TestRepo1/YamaeSolution/YamaeWeb/js/utils/JQueryUtils.js | SHIFT_JIS | 470 | 3.015625 | 3 | [] | no_license | function JQueryUtils() {
}
JQueryUtils.exists = function(id) {
var ele = $("#" + id);
if (!ele.attr("id")) {
return false;
}
return true;
};
JQueryUtils.bindEvent = function (ele, func) {
for (var i = 0; i < ele.length; ++i) {
// z̖O[i]g
var e = ele[i];
e.bind('keyup', fu... | true |
832e95d504e886b9294d6a19903d19ca96d8a99a | JavaScript | weiguoyu/OpsFile | /Static/js/main.js | UTF-8 | 8,979 | 2.828125 | 3 | [] | no_license | /**
* Copyright (c) Mohammad Naghavi <mohamnag@gmail.com>
*
* Licenced as stated by LICENSE file under root of this code.
*
* * NOTICE:
* If your nginx config varies from the default config
* provided in this code, you probably need to change
* value of filesBaseUrl on top of this module too.
*
... | true |
2297744e12e01cd7860f91a200f0be98c82ed5e5 | JavaScript | tjk43b/Colisee | /test/unit/logger.js | UTF-8 | 3,802 | 2.53125 | 3 | [] | no_license | /* eslint-env node, mocha */
var should = require("should");
var Db = require("../../src/common/Db");
var Logger = require("../../src/common/logger");
describe("Logger",function() {
before("Reset database and initialize test data", function(done){
//Db.DEBUG = true;
this.timeout(5 * 1000);
... | true |
4b0597b364a9176b47efb8526b1ac338a0739c3c | JavaScript | zacwillmington/event-scout | /event-scout/client/src/actions/eventsActions.js | UTF-8 | 5,030 | 2.796875 | 3 | [
"MIT"
] | permissive | function eventsHasErrored(errors) {
return {
type: 'EVENTS_HAS_ERRORS',
errors: errors
};
}
function eventsAreLoading(bool) {
return {
type: 'EVENTS_ARE_LOADING',
isLoading: bool
};
}
function eventsFetchDataSuccess(events) {
return {
type: 'EVENTS_FETCH_DATA_... | true |
0151917d11bcce27f65d38fa26f8869bfeef36d9 | JavaScript | b0uncer52/Capstone | /docs/app/factories/GameFactory.js | UTF-8 | 5,968 | 2.625 | 3 | [] | no_license | 'use strict';
app.factory("GameFactory", function($q, $http, FBCreds, CardFactory) {
let fbGameDb = firebase.database().ref('games');
let profile = {};
let opponent = {};
const editProfile = (editedProfile) => {
let newProfile = JSON.stringify(editedProfile);
$http.patch(`${... | true |
84e305b886a94989fe79a3bb0f14eec17fe494f3 | JavaScript | jonasfj/json-parameterization | /test.js | UTF-8 | 7,654 | 2.8125 | 3 | [
"MIT"
] | permissive | suite('parameterize', function() {
var _ = require('lodash');
var debug = require('debug')('json-parameterization:test');
var assert = require('assert');
var parameterize = require('./');
test("Empty case", function() {
var input = {};
var params = {};
var output = {};... | true |
2ce93140642983b42ed455ef93668dba61832dbb | JavaScript | cassiozen/shoestringPlusPlus | /index.js | UTF-8 | 1,197 | 3.125 | 3 | [] | no_license | // Carousel
let currentImageIndex = 0;
const carouselImages = document.querySelectorAll(".carousel-image");
const updateImg = () => {
let img = carouselImages[currentImageIndex];
img.classList.add("hidden");
currentImageIndex++;
if (currentImageIndex === carouselImages.length) currentImageIndex = 0;
img = c... | true |
a72496ad28327868425c3630b029f622d480c489 | JavaScript | PhilCodesNow/calculatorApp | /app.js | UTF-8 | 956 | 3.125 | 3 | [] | no_license | let currentFunction = [];
let $readout = '';
////// make clear function
const $equals = ()=>{
$equal = $('.equals').on('click', (event)=>{
let $add = '';
for(let i = 0; i < currentFunction.length; i++){
$add = $add + currentFunction[i];
}
console.log(eval($add));
... | true |
8eec2d574cfc4301aa9e5afd5e572ed508c69508 | JavaScript | NagendraSaiN/PratianTraining | /Day10-JavaScript/OO with JS DOM/OO with JS DOM (1)/LAB9/lab9-async-await.js | UTF-8 | 1,005 | 4.28125 | 4 | [] | no_license | //9. [Async/await] Use Async Programming for displaying a Thank You message if customer gives rating more than 3.
//Step1: Get the form whose id is 'ratingForm'.
var form = document.getElementById('ratingForm');
form.addEventListener('submit', rateFunction);
//Step2: Create a async function rateFunction.
async funct... | true |
c421040600e02b78cd3d6094d678be4c9041b90b | JavaScript | etcetera8/game-time | /lib/GameElement.js | UTF-8 | 224 | 2.546875 | 3 | [] | no_license | class GameElement {
constructor(x, y, sx, sy, swidth, sheight) {
this.x = x;
this.y = y;
this.sx = sx;
this.sy = sy;
this.swidth = swidth;
this.sheight = sheight;
}
}
module.exports = GameElement | true |
3f668b83871f6e2ac10c5203cafc3ca99dbd1dc3 | JavaScript | IrwinVillalobos/MandelBruto | /draw.js | UTF-8 | 12,031 | 2.765625 | 3 | [] | no_license | // Código en javascript
console.log("La vida es dura, pero es mas dura la verdura.");
var MandelCanvas = document.getElementById("MandelPicture");
var MandelLienzo = MandelCanvas.getContext("2d");
var Wdth = MandelCanvas.width;
var Hgth = MandelCanvas.height;
document.getElementById("DrawButton").addEventListener("... | true |
56beed78f029fbbf63d9996a6eafe281358c4ec4 | JavaScript | WriterOfWorlds/Dyngeo | /script.js | UTF-8 | 314 | 3.171875 | 3 | [] | no_license | var i = 0;
var content = document.getElementById("content").innerHTML;
var speed = 50;
function typeWriter() {
if (i < txt.length) {
document.getElementById("content").innerHTML += content.charAt(i);
i++;
setTimeout(typeWriter, speed);
}
}
document.getElementById("content").innerHTML = "";
typeWriter(); | true |
3500ee732b5b6d3dc1fbf936eb73c88a97a74f27 | JavaScript | entrehuihui/loraservertest | /test/analysis(旧版).js | UTF-8 | 6,244 | 2.515625 | 3 | [] | no_license | //[255, 2, 5, 29, 1, 4, 92, 0, 161, 166, 2, 2, 1, 70, 3, 1, 60, 4, 1, 52, 5, 3, 0, 255, 168, 255, 0]
function Decode(fPort, bytes) {
str = "A";
code = str.charCodeAt();
str2 = String.fromCharCode(bytes[0]);
return str2
}
// ff02051d01045c00ea070237014a014d0150014e014a01460148014901450146014b0150014f014b... | true |
086e1b754f2dd99846101a480b0f35066d55e0e0 | JavaScript | wgentry22/ExpenseManagementSystem | /client/src/Account/AccountSummaryByDay.js | UTF-8 | 3,752 | 2.65625 | 3 | [] | no_license | import React from 'react';
import { useExpensesInMonthByDay } from '../hooks/useExpenses';
import { CircularProgress, Paper, makeStyles, Container, Card, CardHeader, CardContent, Typography } from '@material-ui/core';
import { getDayOfWeek, chartColors, MONTHS, EXPENSE_TYPES } from '../constants';
import Chart from 're... | true |
31e710291833db7e4add6d9acb886adf11eaeca6 | JavaScript | DavidMendoza5/RestApi-Nodejs | /src/routes/empleadoRoutes.js | UTF-8 | 1,796 | 2.53125 | 3 | [] | no_license | const empleado = require('../models/empleado');
module.exports = function (app){
app.get('/empleados', (req, res) => {
empleado.getEmpleado((err, data) => {
res.status(200).json(data);
});
});
app.post('/empleados', (req, res) => {
const empleadoData = {
id... | true |
031a7a4cdc7fad2c78cf5da7d73257926ccd1fcc | JavaScript | AChung92/zookeeper | /lib/zookeepers.js | UTF-8 | 3,489 | 3.171875 | 3 | [] | no_license | const fs = require("fs");
const path = require("path");
function filterByQuery(query, zookeepers) {
let filteredResults = zookeepers;
if (query.age) {
filteredResults = filteredResults.filter(
// Since our form data will be coming in as strings, and our JSON is storing
// age as a number, we must c... | true |
72aa8823f40f6a5761705facb8611c73bc7e34d7 | JavaScript | Shivani150596/Campgrounds | /middleware/index.js | UTF-8 | 2,094 | 2.875 | 3 | [] | no_license | var Campground=require("../models/campground");
var Comment = require("../models/comment");
// all the middleware goes here
var middlewareObj ={}; // empty object
// defined objects of middleware objects
middlewareObj.checkCampgroundOwnership = function(req,res,next){
if(req.isAuthenticated()){
... | true |
26eabe4466c5e6a110b172bd4daafbdc32eac426 | JavaScript | ardalive/QuizBox | /public/js/register.js | UTF-8 | 468 | 2.96875 | 3 | [] | no_license | let inputs = [ document.getElementById('registration_form_password_first'),
document.getElementById('registration_form_password_second')];
function check(input) {
if (inputs[0].value != inputs[1].value) {
inputs.forEach(inp => {
inp.setCustomValidity('Password Must be Matching.'... | true |
ecfd13d9ecd9fd930760d40db8e80de18f9149cf | JavaScript | TUMxInteractionProgramming/challenges-week-5-MiquelDATW | /js/channels.js | UTF-8 | 954 | 2.515625 | 3 | [
"MIT"
] | permissive | console.log("Channels.js is alive");
/** Constructor for the channels */
function Channel(n,d,c,s,e,m){
this.name = n;
this.createdOn = d;
this.createdBy = c;
this.starred = s;
this.expiresIn = e;
this.messageCount = m;
this.messages = [];
}
/** #7 #chlob #new: the new yummy channel */
var... | true |
d540a08cb996886458eed4dc32a9b59202b8c3d0 | JavaScript | solace-lee/Venus | /components/search/index.js | UTF-8 | 1,328 | 2.578125 | 3 | [] | no_license | // components/search/index.js
import {
ExamModel
} from '../../modules/exam.js'
const examModel = new ExamModel()
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
text: '',
showList: []
},
/**
* 组件的方法列表
*/
methods: {
searchInput(event) {
... | true |
aba8737391e54925c495572e52d321b32cde7531 | JavaScript | jlabarbera11/TouchOfMath | /release/TouchOfMath_0.2.5/displayTables.js | UTF-8 | 909 | 2.78125 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | // Whether or not the operator and its parameters require unique display settings
var specialDisplayOperator =
{
"P": true,
"sum": true,
"cos": true,
"arccos": true,
"!": false,
"^": true,
"rt": true,
"*": false,
"/": true,
"+": false,
"-": false,
"=": false,
"parenth... | true |
f0b7660562550f75d85fdcfe0a89dfa9b456cf51 | JavaScript | edumac/obligatorio-ort-01 | /js/funcionesprueba.js | UTF-8 | 8,278 | 2.953125 | 3 | [] | no_license | window.addEventListener("load", comienzo);
let nuestroSistema = new sistema();
function comienzo(){
document.getElementById("idButton1").addEventListener("click", visualizacion);
document.getElementById("idNombre2").addEventListener("change", compararNombre);
document.getElementById("idNumero").addEventListener("c... | true |
f8bdf398ca9adcc6c8d1e3e699b3257c94c21103 | JavaScript | CalebSherfick/StarWars-API-Integration | /app/models/starship.js | UTF-8 | 607 | 2.546875 | 3 | [] | no_license | export default class Starship {
constructor(data) {
this.name = data.name
this.model = data.model
this.starshipClass = data.starship_class || data.starshipClass
this.costInCredits = data.cost_in_credits || data.costInCredits
this.url = data.url
}
getBasicTemplate() {
return `<li onclick="... | true |
fc99c6109fa93382f823b0de5b23f118b0d3036b | JavaScript | SanderHagen/Computer-Graphics-Project | /lights.js | UTF-8 | 621 | 2.953125 | 3 | [] | no_license | var hemiLight;
var streetLights = [];
function AddLights(scene) {
//Sun
hemiLight = new THREE.HemisphereLight(0xeeeeee, 0xeeeeee, 1);
hemiLight.position.set(0, 800, 0);
scene.add(hemiLight);
for (var i = 0; i < 4; i++) {
var spotlight = new THREE.SpotLight(0xeeeeee);
spotlight.pos... | true |
c597d1cb5871079d0f0d0ccff9e92b41cf1795c0 | JavaScript | komxvl/rfirst | /src/components/FilmList/FilmList.js | UTF-8 | 2,312 | 2.5625 | 3 | [] | no_license | import React, { Component } from 'react';
import FormAddFilm from '../../components/FilmAddForm/FormAddFilm';
import FilmCard from '../../components/FilmCard/FilmCard';
import './MovieList.css';
class FilmList extends Component {
constructor(props){
super(props);
this.state = {
listFilmsData: null,
... | true |
6b81a2b79416ae8bf0d862dc041d5d38c825ee58 | JavaScript | cachaves93/AcoII | /ideias.js | UTF-8 | 10,241 | 2.765625 | 3 | [] | no_license | /*
====================================================================================================================
Dimensionamento de Lajes Mistas
====================================================================================================================
1 - Checar se concreto possui fck dentro da... | true |
ab41aecd5ce0487d50deed75a9f79bcaef4ec9e5 | JavaScript | nherment/coralius | /test/generateFakeData.js | UTF-8 | 863 | 2.671875 | 3 | [] | no_license |
var DBHelper = require('../lib/database/DBHelper.js')
var pages = ['home', 'blog', 'contact', 'article1', 'article2']
setTimeout(function() {
for(var i = 0 ; i < 5 ; i++) {
for(var j = 0 ; j < pages.length ; j++) {
var date = new Date();
date.setDate(date.getDate() - i)
date.setHours(0);
... | true |
fb119e38c218a8644b2132ae554eeea9bff174f3 | JavaScript | Nilno/Read_Amaren_WPF | /Setup GitHub/js/script.js | UTF-8 | 179 | 2.875 | 3 | [] | no_license | /*
Amaren Read
Test JS file
10/29/2014
*/
//alert ("Testing 1, 2, 3 ")
console.log("Testing the console.log");
var userInput = prompt("Type in your name");
console.log(userInput); | true |
9347d541e9932b05759d721f3698c95793a2c680 | JavaScript | smsavaridevan/jsrefresher | /primitivereference.js | UTF-8 | 275 | 3.796875 | 4 | [] | no_license | // primitive variables for numbers, string, boolean
const a = 1;
const b = a;
console.log(b)
// reference variables for object and arrays
const nperson = {
name: 'savari'
}
const newPerson = {
...nperson
};
nperson.name = 'saga'
console.log(nperson) | true |
47aab3554119258759c123c0a3cbaa73e78fa144 | JavaScript | lazpz61/pg_challenge | /src/components/app.js | UTF-8 | 1,818 | 2.890625 | 3 | [
"MIT"
] | permissive | //React imports
import React, { Component } from 'react';
//internal imports
import Search from './search-bar';
export default class App extends Component {
constructor(props){
super(props)
this.state = {
products: [],
inputValue: '',
searchedProducts: '',
filteredProducts: [],
... | true |
f3fb50782fe85948b0c519d82bab51c9b501202d | JavaScript | IwanKarpets/tech-store | /src/utils/helpers.js | UTF-8 | 808 | 2.90625 | 3 | [] | no_license | import url from './URL'
// helper functions
export function flattenProducts(data){
return data.map(item=>{
let image =`${url}${item.image[0].url}`
return {...item, image};
})
}
export function featuredProducts(data) {
return data.filter(item => {
return item.featured === true;
});
}
export fu... | true |
d4377163bf73c9adfe842724f912cff6cee0795e | JavaScript | PPE-BTS-SIO/PPE-Web | /src/components/smallviews/generics/listen_to_scroll_component.jsx | UTF-8 | 3,079 | 2.734375 | 3 | [] | no_license | import React, { Component } from 'react';
/*
The ListenToScrollComponent (called LTSComponent) is a component which should change
based on scroll events.
It is used in the Home component as the NavigationBar, when the user scroll, the
NavigationBar's style change, allowing it's background to fade from transparent to
... | true |
811f2de23981b6f6f5fab9241299e35058dcd2ac | JavaScript | Abhiraj-Tulsyan/InternTask | /javascripts/angularwork.js | UTF-8 | 5,303 | 2.59375 | 3 | [] | no_license | console.log("this is working");
// CREATING ANGULAR APP
project=angular.module('project', ['ngRoute']);
var email=null;
var password=null;
//METHOD FOR CHECKING ERROR CONNECTION LATER
var checkingConnection=function(status)
{
if(status==0)
{
alert("Sorry,couldn't connect.Check your connection");
... | true |
44aa8ade45ccbb5f1b009ca38e189bdc9aca8855 | JavaScript | mlmid1616/app_academy_wrk | /w5d5/asteroids/app/lib/game.js | UTF-8 | 777 | 3.453125 | 3 | [] | no_license | function Game () {
this.DIM_X = document.body.clientWidth;
this.DIM_Y = document.body.clientHeight;
this.NUM_ASTEROIDS = 10;
this.asteroids = [];
this.addAsteroids();
}
Game.prototype.addAsteroids = function() {
// let this.asteroids = [];
while (asteroids.length < this.NUM_ASTEROIDS) {
this.aster... | true |
7b5b9b3ea9be3a01a5e4ef5311ffd6304ff37d85 | JavaScript | Muiasar-Al-Ani/mongo-db-fitness-tracker | /controllers/api/workoutRoutes.js | UTF-8 | 1,439 | 2.90625 | 3 | [
"MIT"
] | permissive | const router = require("express").Router();
const db = require("../../models");
// Gets all the workouts data and sends response as json
router.get("/", async ({ res }) => {
try {
const dbWorkouts = await db.Workout.find({});
console.log(dbWorkouts[dbWorkouts.length - 1].totalDuration)
res.json(dbWorkout... | true |
fa08ed15a213bd3cb5b8706a208cc3e337a4b988 | JavaScript | kealanheena/javascript_practice | /advanced_javascript/10_array_methods/main.js | UTF-8 | 225 | 3.21875 | 3 | [] | no_license | var cars = ["Ford", "Chevey", "Dodge", "Toyota"];
document.getElementById("test1").innerHTML = cars;
function myFunction() {
cars.push("Volvo");
console.log(cars);
document.getElementById("test1").innerHTML = cars;
} | true |
ab096fbe6d0f9b7a552f6acbcb183571ca64bffa | JavaScript | ilariate/flipper | /public/physics/PointLight.js | UTF-8 | 503 | 3.15625 | 3 | [] | no_license | //class for the pointlight that comes out when there is a special collision
class PointLight {
constructor(position, color, hit) {
this.position = position;
this.color = color;
this.hit = hit;
}
makeLight(objPos, color, hit){
this.position = objPos;
this.color = col... | true |
cbaed40a2f6470a9d594860d150c7ab5bf786bb5 | JavaScript | ajpnaveen/datastructures | /RecursionProblems/Problem25.js | UTF-8 | 1,425 | 3.6875 | 4 | [] | no_license | const { Node, BinarySearchTree } = require("../Algorithms/BinarySearchTree");
/*
For this problem I'm using Binary Search Tree as a Brinary Tree.....
Left node being small, right node being larger than the current node
does not apply in this case.
*/
//E.g., 1 input tree...
/*
const headNode = new Node(3);
const bina... | true |
f09d8883d533359b505edbb225fc20fad51df927 | JavaScript | shaharLevkovich/form | /includes/main.js | UTF-8 | 1,484 | 3.15625 | 3 | [] | no_license | (function() { // don't leak
var elm = document.getElementById("love"), // get the select
df = document.createDocumentFragment(); // create a document fragment to hold the options while we create them
for (var i = 0; i <= 10; i++) { // loop, i like 42.
var option = document.createElement("option"... | true |
3410db7a537c59fb11a65e9c9e2dcb7f91437441 | JavaScript | davidjerleke/hammer-slider | /src/js/touch-events.js | UTF-8 | 5,480 | 2.65625 | 3 | [
"MIT"
] | permissive | /*!
* Event Burrito is a touch / mouse / pointer event unifier
* https://github.com/wilddeer/Event-Burrito
* Copyright Oleg Korsunsky | http://wd.dizaina.net/
*
* MIT License
*
* NOTE: Event Burrito has been modified from
* its original form to suit this project.
*/
/* exported TouchEvents */
function TouchEv... | true |
3d51c6dd250b26a808c1b7a726e8880582c716c1 | JavaScript | Jeffy-Abraham/SpotifyClone | /src/redux/songs/song-utility.js | UTF-8 | 454 | 2.859375 | 3 | [] | no_license | export const filterbyName=(text,array)=>
{
var filteredArray= array.filter(songs=>
{ console.log(text)
return (((songs.songName).toLowerCase()).includes(text.toLowerCase())||(songs.artist.toLowerCase()).includes(text.toLowerCase))
})
return filteredArray
}
export const filter... | true |
5cc548c72a40ff2cf79ad59561d7740af03ed2f3 | JavaScript | abhishek2x/Playing-with-Nodejs | /Project2 - Module/mod.js | UTF-8 | 231 | 2.5625 | 3 | [] | no_license | // Making custom module
function avg(arr){
let sum = 0;
arr.forEach(element => {
sum += element;
});
return sum/arr.length;
}
module.exports = {
avg : avg,
name : "Abhishek",
repo : "Github"
} | true |
e882a9e2c7063c154d2b4682720cb12791274399 | JavaScript | Kawalczyk/VPT | /skrypt.js | UTF-8 | 18,198 | 3.203125 | 3 | [] | no_license | //Aromat
// Funkcja Obsługująca Pokazywanie i Chowanie (Aromat)
function showMeAromat() {
var show = document.getElementById('AROMATPHOTO');
if(show.style.display == ''){
show.style.display = 'block';
}
}
function showMeAromatSide() {
var show = document.getElementById('aromat... | true |
978eea7374ba2c6989c3e45a263605bf0635cd3e | JavaScript | lsiv568/Restaurant-Tracker | /app/views/restaurants/new.js | UTF-8 | 1,053 | 2.734375 | 3 | [] | no_license | define(["app/entities/Restaurant", "app/RestaurantHelper"],
function (Restaurant, RestaurantHelper) {
/*** Handles form submission */
$("#new-restaurant-form").submit(function (event) {
event.preventDefault();
var form = $(this);
var details = form.serializeArray();
var argument = {};... | true |
24c3a203c4ba864933d743f1d13a22fb81009542 | JavaScript | tederer/webshop | /test/AbstractContentLoaderTest.js | UTF-8 | 5,070 | 2.640625 | 3 | [] | no_license | /* global global, shop, common, Map, setTimeout */
require(global.PROJECT_SOURCE_ROOT_PATH + '/AbstractContentLoader.js');
var DEFAULT_CONTENT_BASE_URL = 'http://www.edererthomas.at/content';
var DEFAULT_FILE_EXTENSION = 'html';
var ERROR_MESSAGE = 'cannot load resource';
var resources;
var instance;
var capturedCon... | true |
0a80ad09edaa0de702b1187c3577dbdeaf907460 | JavaScript | a-n-d-r-3-w/chess | /src/Type.js | UTF-8 | 388 | 2.765625 | 3 | [] | no_license | const Type = Object.freeze({
ROOK: 'rook',
KNIGHT: 'knight',
BISHOP: 'bishop',
QUEEN: 'queen',
KING: 'king',
PAWN: 'pawn',
});
export default Type;
export const isType = (object) => {
return (object === Type.ROOK) ||
(object === Type.KNIGHT) ||
(object === Type.BISHOP) ||
(object === Type.QU... | true |
c5debf80f4f9578785340866004b883e4060633d | JavaScript | jeremeylee/TrackAll | /controllers/lists.js | UTF-8 | 2,093 | 2.71875 | 3 | [] | no_license | /* eslint-disable no-underscore-dangle */
const listsRouter = require("express").Router();
const List = require("../models/list");
const Category = require("../models/category");
listsRouter.get("/", async (req, res) => {
const allLists = await List.find({});
res.json(allLists.map(list => list.toJSON()));
});
lists... | true |
8500aa8b985531667de4e8d5154fe0159403a87b | JavaScript | vkbinfo/rattle-battle | /client/src/customHooks/useSignupForm.js | UTF-8 | 1,420 | 2.671875 | 3 | [] | no_license | import useFormTextField from './useFormTextField';
export default (done) => {
const initialState = { error: false, errorMsg: '', value: '' };
const [emailState] = useFormTextField(initialState);
const [passwordState] = useFormTextField(initialState);
const [usernameState] = useFormTextField(initialState);
c... | true |
a9c6e49d53c84c284d0f1c06fd4c22d676b45b06 | JavaScript | tuluffy/yotsuha | /lib/components/Dialog/index.js | UTF-8 | 4,043 | 2.515625 | 3 | [
"MIT"
] | permissive | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
export default class Dialog extends React.Component {
}
// toast
class Toast extends React.Component {
constructor(props) {
super(props);
this.timer = null;
this.closeModal = this.closeModal.bind(this);
}
componen... | true |
86f4c0fa18831f1cf03bc797f47419346d1a0fba | JavaScript | soarflat-sandbox/webpack-dynamic-import | /src/index.js | UTF-8 | 1,290 | 2.578125 | 3 | [] | no_license | import 'es6-promise/auto';
function isIE(ua) {
let m;
let _ua = (ua || navigator.userAgent).toLowerCase();
if ((m = _ua.match(/msie (\d+\.\d+);/))) return parseInt(m[1]);
if (_ua.indexOf('edge') > -1) return 'edge';
if (_ua.indexOf('trident') > -1) return 11;
return false;
}
function isChrome() {
if (/G... | true |
103deda9e17a1e7569a2ec02d7d20f163cf98843 | JavaScript | steven85048/CellularAutomataGame | /webpack/src/TileDisplay.js | UTF-8 | 7,714 | 3.15625 | 3 | [] | no_license | // ============================ GLOBALS ==========================
// game config
var gameConfig = require('../configs/config.js');
var GameNumber = require('./GameNumber.js');
// board object for color changing (by click)
var board;
// resources object from file
var resources;
// dom object
var document;
var conta... | true |
058624674b36eb8e4eb9eeadada5b74de97370f8 | JavaScript | xwenliang/mobile_modules | /modules/dialog/dialog.js | UTF-8 | 2,346 | 2.5625 | 3 | [] | no_license |
/* 移动端弹层
* @param options.content(str) 窗体内容
* @param [options.class(str)] 窗体class
* @param [options.affect(str)] 弹层效果
* @param [options.topOffset(num)] 弹层位置,默认居中
* @param [options.time(num)] 窗体自动关闭时间,null为不自动关闭
* @param [options.closeCallback(fn)] 窗体自动关闭后的回调
-------------------------------... | true |
18e30a5f94db6c9398818d70b0a0f75d50fa0b07 | JavaScript | nadeesha/con_api | /routes/rankRouter.js | UTF-8 | 1,507 | 2.59375 | 3 | [] | no_license | /* jshint indent: false */
'use strict';
var rankDao = require('/dao/rankDao.js');
var postRank = function (req, res) {
var rank = JSON.parse(req.getContent());
if (!rank.userName || !rank.points || !rank.eventId) {
res.status = 400;
res.contentType = 'application/json';
res.content ... | true |
c9ba3a4b35841b711ffdfc0586171e9583750fff | JavaScript | ocassio/react-tutorial | /src/components/MouseCoordinates.jsx | UTF-8 | 416 | 2.546875 | 3 | [] | no_license | import React, { useState } from "react";
import { useWindowEvent } from "../hooks/use-window-event.hook";
function MouseCoordinates() {
const [{ x, y }, setCoords] = useState({ x: 0, y: 0 });
useWindowEvent(
'mousemove',
e => setCoords({ x: e.x, y: e.y }),
[setCoords]
);
retur... | true |
d2d9d0cf4d5ec194fcdefd89e4f81cc1d63d0663 | JavaScript | aog9128/GraphViz | /js/main.js | UTF-8 | 4,358 | 3.03125 | 3 | [] | no_license |
// Main code that creates and runs the visualization
// Margin & Dimensions
let margin = { left: 0, right: 0, top: 0, bottom: 0 } // we keep this just in case we want to add margins later
let width = 1000 - margin.left - margin.right;
let height = 700 - margin.top - margin.bottom;
// Set radius of circles (nodes)
co... | true |
b6ef9aa99639495bc29059a6f8fb440e4645b5eb | JavaScript | m-motawea/PyFaaS | /Dashboard/static/ui/js/ajax auth ex2.js | UTF-8 | 5,574 | 2.625 | 3 | [
"MIT"
] | permissive | // document.write("\<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js' type='text/javascript'>\<\/script>");
$(document).ready(function(){
$("#logIn").click(function(){
var Surl="prof.html";
$(location).attr('href',Surl);
... | true |
6a8cef67b7b71cdb2e2879eb71791816b14d32eb | JavaScript | dhobbs/logstream | /public/js/app.js | UTF-8 | 4,653 | 2.609375 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | $(document).ready(init);
var pause = false;
var deltaLimit = 0;
var wikipediaLimit = "all";
var namespaceLimit = "all";
var includeRobots = true;
var includeUsers = true;
var includeAnonymous = true;
function init() {
setupControls();
var socket = io.connect();
socket.on('message', function(data) {
var msg ... | true |
221508dca493e7c68398aed12f2eed3577727757 | JavaScript | automata/dataflow | /src/modules/output.js | UTF-8 | 837 | 2.609375 | 3 | [] | no_license | ( function(Dataflow) {
var Input = Dataflow.module("input");
var Output = Dataflow.module("output");
// Output extends input
Output.Model = Input.Model.extend({
defaults: {
id: "output",
label: "",
type: "all",
description: ""
},
send: function(value){
for (var i=0; ... | true |
e7fbd15f8b245957d928186c1baeefc4e2ce86b5 | JavaScript | DineshChopra/Interview-Questions | /company/saxo_bank_26March2019.js | UTF-8 | 1,476 | 4.09375 | 4 | [] | no_license | console.log('Saxo bnak');
// [https://photos.app.goo.gl/EYWoRnwcjkYTsAt49](https://photos.app.goo.gl/EYWoRnwcjkYTsAt49)
/*
A twin of a word is a word written with the sam letters (case insensitive), but not in the same order
e.g Silent is a twin of Listen
*/
function isTwin(a,b) {
return makeSortAndLowerCas... | true |
aad354e20ea943512e3bce4c5db856eff4be296a | JavaScript | greysongy/UXPortfolio | /assets/js/technologies.js | UTF-8 | 15,422 | 2.71875 | 3 | [] | no_license |
function transform() {
// $("#Tiles").css("-webkit-transition", "all 2s");
// $("#Tiles").css("transform", "rotateX(75deg) rotateY(0deg) rotateZ(45deg)");
$("#Tiles").css("transform", "none");
// setTimeout(2500, function() {
// $("#Tiles").css("-webkit-transition", "all 0.3s");
// })
}
tr... | true |
0e9431074893a1447fdc35bb5a6722ff7e2a76b8 | JavaScript | CelinaRibeiro/Lista | /src/components/SearchBox.js | UTF-8 | 680 | 2.609375 | 3 | [] | no_license | import React, {useState, useEffect} from 'react';
import styled from 'styled-components';
const InputText = styled.input`
border: 1px solid #000000;
border-radius: 5px;
padding: 15px;
font-size: 17px;
width: 300px;
`;
function SearchBox(props) {
const [texto, setTexto] = useState('');
us... | true |
15ef160e626391cf9b95437d5bd218faa5aa7578 | JavaScript | heyitsvic/ics415f15 | /A/A08/myscript.js | UTF-8 | 2,027 | 3.046875 | 3 | [] | no_license | /**
* Created by Victor on 9/24/2015.
*/
$(document).ready(function(){
//hide all answers by default.
$("#a1").hide();
$("#a2").hide();
$("#a3").hide();
$("#a4").hide();
$("#a5").hide();
//hide the '-' signs so only the '+' signs are visible.
$("#q1minus").hide();
$("#q2minus").hide();
$("#q3minu... | true |
ea1cc956adcb6cd7d5590ff5cef854fbb9eb6add | JavaScript | binio/jspalyground | /functionReturnFunction/script.js | UTF-8 | 490 | 3.296875 | 3 | [] | no_license | function interviewQuestion(job) {
if (job ==='designer' ) {
return function ( name ) {
console.log( name + ' ux question?');
}
} else if ( job ==='teacher'){
return function ( name) {
console.log(name + ' what do you teach?');
}
}
}
var teacherQuestio... | true |