text stringlengths 3.22k 29.5k |
|---|
var fs = require('fs')
var path = require('path')
module.exports = {
returnPoem: function (callback) {
return generatePoem(function(data) {
return callback(data)
})
},
returnLine: function (placement, callback) {
return generateOneLine(placement, function(data) {
return callback(data)
... |
const GOOGLE_APPLICATION_CREDENTIALS = "[PATH to key downloaded]";
const projectId = "YOUR_PROJECT_ID";
const { Translate } = require("@google-cloud/translate").v2;
const translate = new Translate({ projectId });
const path = require("path");
const fs = require("fs");
var args = process.argv.slice(2);
// prettier-i... |
const wsRCO = require("./wsRCO");
const { RcoFormation } = require("../../../common/model/index");
const { diff } = require("deep-object-diff");
const { asyncForEach, chunkedAsyncForEach } = require("../../../common/utils/asyncUtils");
const report = require("../../../logic/reporter/report");
const config = require("co... |
/* Copyright (c) 2020 AutomaCoin*/
import { Terminal } from "xterm";
import { Spinner } from "spin.js";
import { SPINNEROPTS, MESSAGE } from "../config/config";
import { toast } from 'bulma-toast';
import PubSub from 'pubsub-js';
export function ultimateQuestion() {
return 43;
}
/* Components */
export function... |
/*********************************************************************************************************************
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. *
* ... |
import UIElement, { EVENT } from "el/base/UIElement";
import { CLICK, LOAD, DOMDIFF, DEBOUNCE, POINTERSTART, MOVE, IF, END, DOUBLECLICK, KEYUP, KEY, SUBSCRIBE, } from "el/base/Event";
import { Length } from "el/editor/unit/Length";
import { OBJECT_TO_CLASS, isUndefined } from "el/base/functions/func";
import { timecode... |
import React from 'react';
import "./Perceptron.css";
import {adjustWeights, guess} from "./methods/help-methods/help-methods-perceptron";
import {reDrawCanvas, drawPointOnClick, resetCanvas, reDrawPoints} from "./methods/canvas/drawmethods2dplane";
import {drawPerceptronFigure,updateWeightDisplay} from "./methods/canv... |
const {ANColorPicker} = (function(){
/**
class ANColorPicker
- ancp.getContainer()
- ancp.onChange(callback)
-- callback({rgb, hsv, isTrusted})
- isTrusted : Boolean -- setColor/setColorHsv から呼び出された際に false となる
- ancp.setColor(r,g,b)
- ancp.setColorHs... |
/* Get Browser & Device Information
Some code originally found at, and adapted from
examples found here:
https://code-boxx.com/detect-browser-with-javascript/
Extensively Modified By: https://github.com/jxmot
Changes:
* refactored into functions
* added mobile/desktop/tablet ... |
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { useState, useEffect, useContext, useRef } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Map } from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { usePopper ... |
import React from "react";
import ReactDOM from "react-dom";
var xhr = new XMLHttpRequest();
function Map(props) {
const cy = 38.975;
const cx = 77.159;
const fire = 'https://i7.pngguru.com/preview/751/826/536/black-triangle-computer-icons-symbol-arrow-triangle.jpg';
const pol = 'data:image/png;base64,iVBORw0... |
let globalPlaylist = [];
let playListIsLoaded = false;
let playAllBtnIsClicked = false;
let playBtnState = 'pause';
let indexOfErrorTrack = [];
let currentIndex;
function loadPlaylist(soundObj) {
//console.log("Da chay vao loadPlaylist");
var playlist = [];
var sound = soundObj.sound;
for (let i = 0; i... |
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
const $ = require('jquery');
const Handlebars = require("handlebars");
... |
import React, { useState, forwardRef, useEffect } from 'react'
import PropTypes from 'prop-types'
import { useMutation } from '@apollo/react-hooks'
import { makeStyles, useTheme } from '@material-ui/core/styles'
import { useUser } from '../../context/user.context'
import IconButton from '@material-ui/core/IconButton'
i... |
/* global ethers hre */
/* eslint-disable prefer-const */
const { LedgerSigner } = require('@ethersproject/hardware-wallets')
const { itemTypes } = require('./raffle4ItemTypes.js')
const { wearablesSvgs, sleevesSvgs } = require('../svgs/raffe4Wearables.js')
let signer
const diamondAddress = '0x86935F11C86623deC8a256... |
'use strict';
const MAX_UART_LOG_LINES = 20;
const MENU_CONNECTION = 0;
const MENU_PROGRAMMING = 1;
let firmware_image;
let log_stdin_running = false;
let programming_active = false;
let is_connected = false;
let has_webserial = false;
let last_programming_failed = false;
let programmer;
const el = {};
el.menu_but... |
import {app, BrowserWindow, Menu} from 'electron'
/**
* Set `__static` path to static files in production
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
*/
if (process.env.NODE_ENV !== 'development') {
global.__static = require('path').join(__dirname, '/static').replace(/\\... |
const deviceMeta = {
allowed: new Set(["$homie", "$name", "$state", "$nodes", "$extensions"]),
deprecated: new Set(["$mac", "$localip", "$fw/name", "$fw/version", "$stats", "$implementation"]),
required: new Set(["$homie", "$name", "$state", "$nodes"])
}
const nodeMeta = {
allowed: new Set(["$name", "$... |
#!/usr/bin/env node
// initialize leap & arduino vars
const leap = require('leapjs');
const five = require('johnny-five');
const controller = new leap.Controller({frameEventName:'deviceFrame'});
const ports = [
{ id: "A", port: "/dev/cu.usbmodem14231" }, // pos1 on anker USB hub @ right laptop USB port
{ id: ... |
// JavaScript Document
//回车事件绑定调取收货单位
//出入库单据js
function enter_up(obj,ocj)
{
var theEvent = window.event || arguments.callee.caller.arguments[0];
var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
if (code == 13) {
if('goods' == ocj)
{
... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
require('./slicedToArray-0711941d.js');
require('./unsupportedIterableToArray-68db1d3b.js');
var React = require('react');
va... |
import DomUtil from '../DomUtil';
let domUtil = new DomUtil();
import globalScopes from './global-scopes.js';
import HttpUtil from '../HttpUtil.js';
let helper = new HttpUtil();
class WordList {
constructor(user, config) {
this.user = user;
this.config = config;
}
pageHandler(pageEl) ... |
import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
// import DescriptionList from 'components/DescriptionList';
import {
Row,
Col,
Card,
Form,
Input,
Select,
Icon,
Button,
// Dropdown,
// Menu,
InputNumber,
DatePicker,... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const babel = tslib_1.__importStar(require("@babel/core"));
const babelTypes = tslib_1.__importStar(require("@babel/types"));
const generator_1 = require("./generator");
const uuid_1 = require("uuid");
/**
* ... |
'use strict';
var _ = require('lodash');
var util = require('util');
var request = require('request');
var moment = require('moment');
var EventEmitter = require('events').EventEmitter;
var ripple = require('ripple-lib');
var sjcl = ripple.sjcl;
var check = require('check-types');
var Promise = require('bluebird');
/*... |
"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];
... |
/*
FILE ARCHIVED ON 1:38:31 May 11, 2013 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 21:40:10 Jun 24, 2015.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
function Maze(canvas){
... |
{
"translatorID": "938ccabb-e297-4092-aa15-22b6511bbd0f",
"label": "Dialnet",
"creator": "<NAME>",
"target": "^https?://dialnet\\.unirioja\\.es/",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2016-08-29 18:16:26... |
var Lab = require('lab');
var lab = exports.lab = Lab.script();
var describe = lab.describe;
var it = lab.it;
//var before = lab.before;
//var after = lab.after;
var Code = require('code'); // assertion library
var expect = Code.expect;
//var debug = require('debug')('mdns-packet:test:dns');
var path = require('pat... |
// ==UserScript==
// @name Spacom.Addons.Design.Extensions
// @version 0.1.1
// @namespace http://dimio.org/
// @description Extends the functions of a ships constructor
// @author dimio (<EMAIL>)
// @license MIT
// @homepage https://github.com/dimio/userscripts-spacom.ru-addons
// @supp... |
// import { listen } from '@/services/mqtt';
// import moment from 'moment';
import { formatMessage } from 'umi/locale';
import { ERROR_OK } from '@/constants/errorCode';
import { getLocationParam } from '@/utils/utils';
import { getRange } from '../../services/photoLibrary';
const OPCODE = {
FACE_ID_STATUS: '0x4202'... |
import * as visOne from "/modules/visOne.js";
import * as visTwo from "/modules/visTwo.js";
import * as visThree from "/modules/visThree.js";
import * as visAOI from "/modules/visAOI.js";
import * as visFour from "/modules/visFour.js";
import * as visFive from "/modules/visFive.js";
const datasetsMenu = $("#datasets-m... |
import * as PIXI from 'pixi.js'
import Controls from './controls'
import {contain, randomInt, hitTestRectangle} from './utils'
let App = PIXI.Application,
Container = PIXI.Container,
loader = new PIXI.Loader,
resources = loader.resources,
Graphics = PIXI.Graphics,
TextureCache = PIXI.utils.TextureC... |
import EventEmitter from 'events';
// ensure requestAnimationFrame exists
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = window.webkitRequestAniationFrame
|| window.mozRequestAnimationFrame
|| (f => setTimeout(f, 16));
}
/// An animator manages an animation loop and dispatches... |
import React from "react";
import { StyleSheet, Dimensions, ScrollView, ToastAndroid, AsyncStorage, NetInfo
,ActivityIndicator, RefreshControl} from "react-native";
import { Block, Text, Button as GaButton, theme, Icon } from 'galio-framework';
import ActionButton from 'react-native-action-button';
import { Card2 as... |
"use strict";
const {assertIconClasses, open, resetOptions, setTheme, wait} = require("./utils");
const ArchiveView = require("./utils/archive-view.js");
const Options = require("../lib/options.js");
describe("Archive-view", () => {
const base = "file icon ";
before(() => resetOptions());
when("a zip-file... |
import wasm from '../crate/Cargo.toml'
import * as utils from "./utils";
import SVG from 'svg.js'
import * as Honeycomb from "honeycomb-grid";
import * as _ from "lodash";
// console.log('main thread ->', module.three());
const gameWorker = new Worker('./index.worker.js')
let workerReady = new Promise((resolve, reje... |
// snake.class.js
function Snake(genome, config){
this.state = {};
this.config = config;
this.brain = genome;
this.brain.score = 0;
this.currentScore = 0;
this.firstAttemptScore = 0;
this.bestScore = 0;
this.deaths = 0;
this.maxDeaths = 2;
this.highScore = 0;
this.gamesPlayed = -1;
this.rest... |
import React, { Component } from 'react';
import { StyleSheet, Text } from 'react-native';
import MapboxGL from '@mapbox/react-native-mapbox-gl';
import List from './List';
import CustomizeBtn from './CustomizeBtn';
import round from 'lodash.round';
import config from './config';
import distance from '@turf/distance';
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.stopIfEx = exports.Health = void 0;
const PM2 = require("pm2");
const Pmx = require("pmx");
const Fs = require("fs");
const path_1 = require("path");
const Snapshot_1 = require("./Snapshot");
const planck_http_fetch_1 = require("planck... |
import { Balance, CopyToClipboard } from "shared";
import { StandaloneHeader, StandalonePage } from "layout";
import { shell } from "electron";
import { transactionDetails } from "connectors";
import { SlateGrayButton } from "buttons";
import { addSpacingAroundText, reverseHash } from "helpers";
import { FormattedMessa... |
import constants from '../internals/constants';
import parseAshNodeId from './parseAshNodeId';
import createNodeTree from './createNodeTree';
import setNodeProperties from './setNodeProperties';
import removeNodeProperties from './removeNodeProperties';
import findNode from './findNode';
import isElement from '..... |
import {
Box,
Center,
Flex,
Modal,
ModalBody,
ModalContent,
ModalOverlay,
chakra,
useDisclosure,
useEventListener,
useUpdateEffect,
IconButton,
} from "@chakra-ui/react";
import { findAll } from "highlight-words-core";
import Link from "next/link";
import { useRouter } from "next/router";
import... |
const sqlSelect = require('./select.js');
/*
All basic insert codes will come here. Inserts are minimal means only mandatory (not null) fields will insert.
each function will inserts one new row into only one table. No log here.
for tables with relation if FOREIGN_KEY is not an Integer, function trys to find an ... |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import MaterialTable, { MTableToolbar } from 'material-table';
import {
Chip,
Button,
Grid,
FormControlLabel,
Checkbox,
withStyles,
Typography,
TextField,
InputLabel,
Select,
MenuItem,
} from '@material-ui/core';
// import... |
import {
attachListener,
detachListener,
removeAttr,
addClass,
removeClass,
detectTouch,
getTranslate
} from './lib.js'
const formEls = [
'INPUT',
'SELECT',
'OPTION',
'TEXTAREA',
'BUTTON',
'VIDEO'
]
// eslint-disable-next-line
const hooks = [
'before-init',
... |
// Add console.log to check to see if our code is working.
console.log("working");
// Create the map object with center at the San Francisco airport.
// Create the map object with center and zoom level.
//let map = L.map('mapid').setView([30, 30], 2);
// Create the map object with a center and zoom level.
// let map ... |
/*Copyright 2019 Bang & <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublice... |
import React,{ Component } from 'react';
import PropTypes from 'prop-types';
import { Card, Steps, Icon, Spin, Form, Input, Radio, Checkbox, Select, DatePicker, Row, Col } from 'antd';
import { connect } from 'dva';
import moment from 'moment';
import router from 'umi/router';
import PageHeaderWrapper from '@/component... |
import React, { useState, useEffect } from 'react'
import {
NavLink,
} from 'react-router-dom'
import styled from '@emotion/styled'
import Badge from '@material-ui/core/Badge'
const StyledMenu = styled.div`
padding: 0;
margin: 0;
width: 100%;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-s... |
/**
* A Bot for Slack!
*/
/**
* Define a function for initiating a conversation on installation
* With custom integrations, we don't have a way to find out who installed us, so we can't message them :(
*/
process.env.GOOGLE_URL = 'https://docs.google.com/<KEY>';
function onInstallation(bot, installer) {
if... |
// @ts-check
const { h, render, Component, Color } = require("ink");
const { List, ListItem } = require("./components/checkbox-list");
const TextInput = require("ink-text-input");
const Spinner = require("ink-spinner");
const readline = require("readline");
const fs = require("fs");
const path = require("path");
const... |
"use strict";
const url = require("url");
const path = require("path");
const crypto = require("crypto");
const builder = require("botbuilder");
const passport = require("passport");
const dialogs_1 = require("./dialogs");
exports.AuthDialog = dialogs_1.AuthDialog;
const resumption_1 = require("./resumption");
exports.... |
// global variable;
var id = 0;
var tableCount = 0
var buttonAction = false;
//Trigger setFilter function with correct parameters
function updateFilter() {
let filter = $("#example-table .filter .type_filter").val();
table.setFilter(filter, "like", $("#example-table .filter .search").val());
}
function getI... |
/*
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 ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... |
/**
* @file 任务管理
* @author jinzhan
*/
const execa = require('execa');
const chalk = require('chalk');
const {error, getDebugLogger} = require('san-cli-utils/ttyLogger');
const notify = require('../utils/notify');
const {isSanProject, readPackage} = require('../utils/fileHelper');
const terminate = require('../utils... |
var AudioStreamer = require('controls/audiostreamer.adapter');
var snooze;
function LOG() {
console.log('ABMENU ………………………: ' + arguments[0]);
}
/* constants for menuItems */
const RECENTS = 1,
MYFAVS = 2,
MYPODS = 3,
HIFI = 4,
MYPLAYLIST = 5,
PLAY = 6;
/* Reference to Play icon to control it out... |
import React, { useState, useEffect } from "react";
import { TheContent, TheSidebar, TheFooter, TheHeader } from "./index";
import clientService from "../services/clientService";
import { asyncLocalStorage, TOKEN, USER } from "../utility/global";
import {
Menu,
Dropdown,
Header,
Button,
Icon,
Image,
Table... |
// countdown
function getTimeRemaining(endtime) {
var t = Date.parse(endtime) - Date.parse(new Date());
var seconds = Math.floor((t / 1000) % 60);
var minutes = Math.floor((t / 1000 / 60) % 60);
var hours = Math.floor((t / (1000 * 60 * 60)) % 24);
var days = Math.floor(t / (1000 * 60 * 60 * 24... |
//define the grid objects
class GridSquare {
constructor(position, height, occupant, adjacencies) {
this.position = position;
this.height = height;
this.occupant = occupant;
this.adjacencies = adjacencies;
}
increaseHeight() {
this.height++;
};
occupiedByPlayer1() {
... |
let querystring = require('querystring')
let util = require('../util/Converter')
let _ = require('isa.js')
let Httphelper = require('../util/HttpHelper')
let httphelper = new Httphelper()
let ReadableStream = require('stream').Readable
function isBuffer (obj) {
return Buffer.isBuffer(obj)
}
function isReadableStrea... |
import React from 'react';
import Checkbox from './Checkbox';
import { useTable, useFilters, useGlobalFilter, useAsyncDebounce, useSortBy, usePagination, useRowSelect } from 'react-table' // new
import { ChevronDoubleLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronDoubleRightIcon } from '@heroicons/react/solid'
e... |
'use-strict';
var date = new Date();
var nextDay = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
// prettier-ignore
var nextMonth = date.getMonth() === 11 ? new Date(date.getFullYear() + 1, 0, 1) : new Date(date.getFullYear(), date.getMonth() + 1, 1);
// prettier-ignore
var prevMonth = date.getMonth() === 11 ? ... |
var Searchbar = (function () {
function Searchbar() {
this._isCancelVisible = false;
this._shouldBlur = true;
this._shouldAlignLeft = true;
this.activated = false;
this.focused = false;
/**
* @input {boolean} If true, enable searchbar animation. Default `fals... |
/**
* datatables优化
*/
$.extend($.fn.dataTable.defaults, {
dom: 't<"dataTables_info"il>p',
language: {
"url": "/admin/static/thirdparty/js/dataTable/datatables_language.json"
},
processing: true, //当datatable获取数据时候是否显示正在处理提示信息。
serverSide: true, //服务器处理分页
responsive: {
details: false
},
initComplete: funct... |
// rota-importar-ctrl.js
// Este arquivo contém o script de controle da tela rota-importar-view. O mesmo
// possibilita importar a rota de um arquivo GPX
// Variáveis de Mapas
var listaDeRotas = new Map();
var mapa = novoMapaOpenLayers("mapRota", cidadeLatitude, cidadeLongitude);
var malha = mapa["addLayer"]("Malha");... |
$(function () {
// Initialize dialog boxes
$(".dialog_box").dialog({autoOpen: false, resizable: false});
// Initialize CoGe web services
coge.services.init({
baseUrl: API_BASE_URL,
userName: USER_NAME
});
// Initiate search
search_stuff(SEARCH_TEXT);
// Define views in the Content... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _Image = _interopRequireDefault(require("../polyfill/Image"));
var _settings = _interopRequireDefault(require("../settings"));
var _bitTwiddle = _interopRequireDefault(require("bit-twiddle"));
var _eventemi... |
'use strict';
const { expect } = require('@hapi/code');
const {
experiment,
test,
beforeEach,
afterEach
} = exports.lab = require('@hapi/lab').script();
const sinon = require('sinon');
const moment = require('moment');
const uuid = require('uuid/v4');
const sandbox = sinon.createSandbox();
const controller = ... |
const Category = require('./category.model');
const Product = require('../product/product.model');
const Model = require('../model/model.model');
const createTranslations = require('../../utils/createTranslations');
const {
addTranslations,
updateTranslations,
deleteTranslations,
} = require('../translations/tran... |
let video;
let poseNet;
let pose;
let options = {
imageScaleFactor: 1,
minConfidence: 0.3,
maxPoseDetections: 1,
detectionType: 'single',
}
let smoothValue = {};
let dt = 0.8;
let k = new Kinematic(dt);
let jointList = {
"leftWrist": 0.5,
"leftElbow": 0.5,
"leftShoulder": 0.5,
"righ... |
// 制作帧动画辅助函数..真的麻烦
// 支持两种方式,传递图片数组和雪碧图
// 雪碧图有部分帧动画([1,2,5])和全部帧动画(支持顺序)(),以及支持start end对象表示法(1, 8)
// 数组表示个别帧,对象表示连续帧
// 在动画过程中新增加订阅者可以通过一个缓存订阅数组来缓存之, 到下一帧 才实实在在的将缓存的加入订阅者
import * as PIXI from 'pixi.js';
import _ from 'lodash';
import noop from './noop'
import item from '@/item'
import FramesLoader from './Frame... |
/*This file should not included any script except p/function*/
/**
This function save the area block what you input
*/
function saveAreaDataToTheFile(e, inputName, inputX, inputY, inputZ) {
var io = new IONPC();
e.npc.say("开始写入文件...");
io.set("ArchTestingTargetBuildingData" + inputName, {
name: i... |
/*
* Copyright 2012 Intel Corporation.
*
* 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... |
const ObjectUtils = require('wootils/shared/objectUtils');
const fs = require('fs-extra');
const { provider } = require('jimple');
const CLISubCommand = require('../../../abstracts/cliSubCommand');
/**
* This is a CLI generator that allows the user to create a configuration file with all the
* default settings and al... |
const cuid = require('cuid')
const AABBDD = require('aabbdd')
class BVNode {
constructor({box, id, parent = null, sibling = null, left = null, right = null, expandNode = true}) {
if (typeof id === 'undefined') {
throw new TypeError('Entity ID is required.')
}
if (typeof box === ... |
import React from "react"
import PropTypes from "prop-types"
import { Link } from "gatsby"
import ReactHtmlParser from "react-html-parser"
import { AuthorCards } from "../components/author"
import ProtectedContent from "../components/content"
const getDateFormat = (dateObj) => {
const monthNames = ["January", "Febru... |
var application = angular.module('ngPagination', [])
.filter('startFrom', function() {
return function(input, inicio) {
if (input!==undefined) {
inicio = +inicio;
return input.slice(inicio);
}else{
console.error("Modulo ng-pagination Filter startFrom Error");
throw "Filter st... |
// sideMenu.js JavaScript
// Common SideMenu script
// This sideMenu.js file creates a Side Menu template which is then used by the majority of pages on the website.
// All HTML for the side menu is controlled from within this file, whilst the CSS is dealt with in an external stylesheet.
// The functionality of the s... |
var locations = [
{title: "Drexel University", subtitle:"Philadelphia, PA", location: {latLng: L.latLng(39.9541716, -75.186816), zoom: 15, headingDegrees: 100}},
{title: "Drexel University (Main Building)", subtitle:"Philadelphia, PA", location: {latLng: L.latLng(39.9541718, -75.186816), zoom: 18, headingDegree... |
import React, { Fragment } from "react";
import { Card } from "antd";
import Helmet from "react-helmet";
import { FaBalanceScale } from "react-icons/fa";
import Line from "components/Body/Line";
import InfoText from "components/Body/InfoText";
import Title from "components/Body/Title";
import Link from "components/Navi... |
var glcan, gl, maskcan, maskctx, modelViewMatrix, projectionMatrix, camera, shaderProgram, programInfo, filtercan, filterctx;
var app = new Vue({
el: '#vue',
data: {
mask: null,
leftEye: null,
rightEye: null,
midbrow: { x: 0, y: 0, a: 0 },
scene: [],
tracker: new tracking.ObjectTracker(['ey... |
//Aliases
"use strict";
var Container = PIXI.Container,
autoDetectRenderer = PIXI.autoDetectRenderer,
Graphics = PIXI.Graphics,
Sprite = PIXI.Sprite,
MovieClip = PIXI.extras.MovieClip,
TilingSprite = PIXI.extras.TilingSprite,
loader = PIXI.loader,
resources = PIXI.loader.resources,
Text... |
var animLoopHandle;
var screenWidth = window.innerWidth;
var screenHeight = window.innerHeight;
var gameStart = false;
var died = false;
var gameWidth = 0;
var gameHeight = 0;
var xoffset = -gameWidth;
var yoffset = -gameHeight;
var KEY_ENTER = 13;
var KEY_LEFT = 37;
var KEY_RIGHT = 39;
var fps = 60;
function startGam... |
/* eslint no-console: 0 */
const convertXML = require('../helpers/convert-xml');
const getDBRefs = require('./get-dbrefs');
const xmlEntry = require('../files/example/xml-entry');
let exampleEntry;
beforeAll(async () => {
({ entry: exampleEntry } = await convertXML(xmlEntry));
});
describe('DB refs', () => {
des... |
var fs = require("fs");
var path = require("path");
var upath = require("upath");
var mkdirp = require("mkdirp");
var fswalk = require('fs-walk');
var _ = require('lodash');
var isIgnored = require('./is-ignored');
var output = require("./output");
var FtpWrapper = require("./ftp-wrapper");
var SftpWrapper = require(".... |
'use strict'
var test = require('ava')
var DateFormatter = require('..')
test('Z', (t) => {
offsetZ(t, -720, '+1200')
offsetZ(t, -690, '+1130')
offsetZ(t, -660, '+1100')
offsetZ(t, -630, '+1030')
offsetZ(t, -600, '+1000')
offsetZ(t, -570, '+0930')
offsetZ(t, -540, '+0900')
offsetZ(t, -525, '+0845')
... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Function = void 0;
const option_1 = __importDefault(require("../util/functions/option"));
const ... |
const SearchbarModel = Backbone.Model.extend(/** @lends SearchbarModel.prototype */{
defaults: {
placeholder: "Suche",
recommendedList: "",
recommendedListLength: 5,
quickHelp: false,
searchString: "",
hitList: [],
minChars: "",
isInitialSearch: true,
... |
require('dotenv/config')
const express = require('express')
const bodyParser = require('body-parser')
const session = require('express-session')
const app = express()
var server = require('http').createServer(app)
const { version } = require('./package.json')
var app_url
var app_host
var api_url
var base
var ws_ker... |
import {getEventCategories, makeAnchor, appendIsraelAndTracking,
makeTorahMemoText, getCalendarTitle} from './common';
import {Locale, HebrewCalendar, Zmanim, flags} from '@hebcal/core';
import holidayDescription from './holidays.json';
/**
* @private
* @param {Event} ev
* @param {boolean} il
* @param {string} t... |
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
f... |
// v2 ready
// node modules
const moment = require('moment-timezone');
// helper functions
const fh = require("../helper/functions.js")
const dh = require("../helper/db.js")
const mh = require("../helper/messages.js")
vendorTexts = {
"golden": {
"name": "<NAME>",
"pastT": "With fair and low price... |
var window = document.querySelector('.main-window');
var item = document.querySelector('.main-window p');
var tree = document.querySelector(".main-window .tree");
var p = item.innerHTML;
var my_arr = [56,56,90,89];
var txt=0;
my_arr["Name"] = "hunter";
my_arr["Age"] = 20;
my_arr["fullName"] = my_arr["Name"]+" "+my_a... |
'use strict';
var $ = require('jquery');
var _ = require('underscore');
// require('../../node_modules/sidr/dist/jquery.sidr.min.js');
var Backbone = require('backbone');
var Marionette = require('backbone.marionette');
Backbone.$ = $;
var Handlebars = require('handlebars');
var Templates = require('../templates/compi... |
/*
Gestion d'une balance Gram XFOC S2
Pour lui demander le poids courant envoyer: STX(2) $ ETX(3)
On reçoit (pour 176g) : STX(2) ! space space space 0 . 1 7 6 CR(13) ETX(3)
Si poids 0, on a ) au lieu de !
Une instance de classe Balance par balance (bien qu'on n'en ait qu'une).
La réception des changements de poids ne... |
import React, { Component } from 'react';
import withStyles from '@material-ui/core/styles/withStyles';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import AddCircleIcon from '@material-ui/icons/AddCircle';
import A... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interop... |
//Add the contains function to String
String.prototype.contains = function(it) { return this.indexOf(it) != -1; };
var linearExpression;
/**
* Checks if the input variable is a LP equation
*
* Here's a valid input example :
* Maximize p = 0.5x + 3y + z + 4w subject to
* x + y + z + w <= 40
* 2x + y - z - w <= ... |
import React, { useState, useEffect } from 'react'
import { Row, Col, Input, Select, Divider, List, Button, message, Skeleton, Avatar, Tag } from 'antd'
import { IconText } from '@components'
import Less from './index.module.less'
const Search = Input.Search
const Option = Select.Option
const Concern = props => {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.