text stringlengths 3.07k 16k |
|---|
var objectUtil = require('.//object-util.js')
var _ = require('underscore')
var pick = objectUtil.pick
var mpath = require('mpath')
var setFieldValue = objectUtil.setFieldValue
var deepForEach = require('deep-for-each')
/**
* Mongoose encryption plugin
* @module mongoose-encryption
*
*
* @param {Object} ... |
// <NAME> 2017 (<EMAIL>)
// Maybe in future support to TypeScript inhertance?
'use strict';
const ObjectID = require('mongodb').ObjectID;
const MongoClient = require('mongodb').MongoClient;
const deasync = require('deasync');
const ASQ = require('asynquence');
class Schema {
constructor(findOne, callback) {
th... |
var drawGeneralRevenueChart = function(container_id){
var $chartContainer = $('#' + container_id);
$chartContainer.css('height', parseInt($chartContainer.attr('data-height'))).html('');
var chart = createRevenueChart();
chart.interactivity().selectionMode("none");
chart.container(container_id);
... |
var loseTime = 0;
/**
* @author: Alex
*/
function initAdventure() {
stage = new createjs.Stage("game");
stage.enableDOMEvents(true);
stage.enableMouseOver();
initBackground("img/adventure/background.png");
inBattle = true;
var title = new createjs.Text("ADVENTURE TIME", "Bold 28px Calisto MT", "#FFFFFF");
... |
import React from "react"
import PropTypes from "prop-types"
import {useStaticQuery, graphql, Link} from "gatsby"
import Menu from "./menu";
import Footer from "./footer";
import "../assets/styles/style.css";
import {Sticky, StickyContainer} from "react-sticky";
import profileImage from "../images/Image-blue.jpg";
impo... |
import React from 'react';
import { connect, } from 'react-redux';
import { Layout,Row,Col,Button } from 'antd';
import Flippy, { FrontSide, BackSide } from 'react-flippy';
import _ from "lodash"
import PropTypes from 'prop-types'
import TimerMachine from 'react-timer-machine'
import moment from "moment";
import moment... |
/**
Hough Transform in JavaScript
Copyright 2012 <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 agre... |
/*
concat arrays
- arr = arr1.concat(arr2)
return new array with all elements of the
given array but not including a given index
for this example given index is the first (0)
- array.slice(n+1)
return new array from start aka first index (0)
of the array but not including the end of array
- array.slice(0, n)
retur... |
'use strict';
const RuleExecutor = require('./rule_executor');
const RetryExecutor = require('./retry_executor');
const Rule = require('./rule');
const P = require('bluebird');
const stringify = require('fast-json-stable-stringify');
class BasicSubscription {
constructor(options, kafkaFactory, hyper, ruleName, ru... |
const { AwsCdkConstructLibrary, NpmAccess, DependenciesUpgradeMechanism, Stability, DevEnvironmentDockerImage, Gitpod } = require('projen');
const project = new AwsCdkConstructLibrary({
author: '<NAME>',
authorAddress: '<EMAIL>',
description: 'AWS CDK Constructs that can be used to create datalakes/meshes and mo... |
var router = require('express').Router()
var db = require('./DataBase');
var driver = require('./Driver');
var cookie = require('./Cookie');
var Constants = require('./Constants');
var admin = require('./Admin');
var positionData = require('./PositionData');
var contact = require('./Contact');
var dbConnect = function... |
import SearchIcon from '/modules/@heroicons/vue/outline/SearchIcon.js'
import BadgeCheckIcon from '/modules/@heroicons/vue/solid/BadgeCheckIcon.js'
import ChevronDownIcon from '/modules/@heroicons/vue/solid/ChevronDownIcon.js'
import { ref, watch } from '/modules/vue.js'
import api from '/src/api/api.js'
import Friends... |
"strict mode";
var r = new XMLHttpRequest();
r.open("GET", "/count", true);
r.onreadystatechange = function () {
if (r.readyState !== 4) return;
var documentsCount = document.getElementById("documents-count");
if (r.status !== 200) {
doumentsCount = "Unable to connect to the server";
r... |
var fileOperations = require('./fileOperations');
var packageGenerator = require('./packageGenerator');
var request = require('request')
var tempDataCnt;
var popKey;
module.exports.HPCCInvocation = {
invokeHPCC: function (layoutName, logicalPath, packageInfo, dataDefCnt, panel, layoutsCnt) {
//Invoke Log... |
'use strict';
var guest, coding, games, fiction, hiking, collecting;
// Intro Question - Name
guest = prompt('What is your name?');
alert('Hi ' + guest +', it is lovely to meet you. My name is Jess.');
console.log('Asked for a guest name, result : ' + guest);
//Asked for a guest name, returned name in alert, ... |
'use strict';
/**
* Search in a MoleculeDB
* Inside the database all the same molecules are group together
* @memberof DB
* @instance
* @param {string|OCL.Molecule} [query] smiles, molfile, oclCode or instance of Molecule to look for
* @param {object} [options={}]
* @param {string} [options.format='oclid'] - qu... |
import React, { PureComponent } from 'react';
import moment from 'moment';
import { connect } from 'dva';
import { Form, Modal, Table, message } from 'antd';
import Ellipsis from 'ant-design-pro/lib/Ellipsis';
import Link from 'umi/link';
import { getName } from '@/utils/utils';
@connect(({ global }) => ({
global,
}... |
import { GameObjects, Input, Math as pMath } from "phaser";
const { Container } = GameObjects;
class Player extends Container {
constructor(scene, x, y) {
super(scene, x, y, []);
// Create a reference to our Player instance's parent scene, and enable physics
this.scene = scene;
this.scene.add.exist... |
// ==UserScript==
// @name rumble.com video
// @namespace https://github.com/cssyphus/TamperMonkeyUserscripts/
// @version 0.3
// @match https://rumble.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
// @grant none
// ==/UserScript==
(function () {
... |
// Drop-in replacement for doxygen's search.js with improved fulltext search
// Based on Doxygen 1.8.11 search.js
// Modified for AutowareAuto
var searchResultsText=["Sorry, no documents matching your query.","Found <b>1</b> document matching your query.","Found <b>$num</b> documents matching your query. Showing best m... |
import BankSlipForm from './bank-slip-form'
import BankSlipProcessingForm from './bank-slip-processing-form'
import FormState from '../jquery/form-state'
import InputAmountPartial from '../partials/input-amount-partial'
import InstallmentOptionsPartial from '../partials/installment-options-partial'
import PayMethodIcon... |
const html = document.querySelector("html")
const checkbox = document.getElementById("switch")
const imgI = document.getElementById("imgFly")
const imgFb = document.getElementById("imgFb")
const imgGit = document.getElementById("imgGit")
const imgIg = document.getElementById("imgIg")
const imgCrist = document.getE... |
import { __rest } from "tslib";
import { typeOfShape } from './helper/typeguards';
const Pen = {
draw: (shape, svgParams, context) => {
const shapeType = typeOfShape(shape);
switch (shapeType) {
case 'Ellipse':
Pen.drawEllipse(shape, context, svgParams);
b... |
module.exports = {
run: run
}
var http = require("http")
var path = require("path")
var queryString = require("querystring")
var url = require("url")
var _ = require("underscore")
var _pumlhorse = require("pumlhorse")
var fs = require("./promiseFs")
var _sitePath;
var _server;
var _staticRoutes = {}
var _dynamicR... |
import React, { useEffect, useState } from 'react'
import { styled } from 'linaria/react'
import { css } from 'linaria'
import Card from '../../components/Card'
import Button from '../../components/Button'
import dayjs from 'dayjs'
import { useQuery, useMutation } from 'graphql-hooks'
const Wrap = styled.div`
width... |
'use strict';
var Module = require('../build/libjpegasm');
var Runtime = Module['Runtime'];
module.exports.encode = encodeJpeg;
module.exports.decode = decodeJpeg;
module.exports.resize = resize;
/* see 'api.h' for declarations */
var encode_jpeg = Module.cwrap('encode_jpeg', 'number', ['number', 'number', 'number',... |
// pages/matches/matchlist.js
const app = getApp()
var http = require('../../utils/http.js')
var util = require('../../utils/util.js')
var pinyin = require('../../utils/pinyinUtil.js')
const {
$Toast
} = require('../../dist/base/index');
Page({
/**
* 页面的初始数据
*/
data: {
holderScore:0,
challengerScor... |
const fs = require("fs");
const path = require("path");
const isGlob = require("is-glob");
const copy = require("recursive-copy");
const fastglob = require("fast-glob");
const { TemplatePath } = require("@11ty/eleventy-utils");
const EleventyBaseError = require("./EleventyBaseError");
const checkPassthroughCopyBehavio... |
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actions from '@/store/actions';
import './index.css';
import { Link } from 'react-router-dom'
import Iconpath from '@/utils/iconpath'
import { http } from '@/api/http'
import { ColorExtractor } from... |
const express = require("express");
const mongoose = require("mongoose");
const cors = require("cors");
const app = express();
app.use(express.json()); // added body key to req
//app.set('trust proxy',1);
app.use(cors({
credentials: true,
origin: ["http://localhost:3000","https://localhost:3000"]
}));
... |
import Component from '../component'
import data from 'data'
const raw = data
// 格式化
const format = (data) => {
let result = []
for(let i=0; i < data.length; i++) {
let d = data[i]
if(/^请选择|市辖区/.test(d.name)) continue
result.push(d)
}
if(result.length) return result
return []
}
// 获取子级
const sub = (data) ... |
async function modifyBody(pageContentTextPromise, originalResponse) {
// If you're wondering, yeah, this is incredibly brittle. I'm expecting
// that troopmaster basically never changes. We're looking for the first
// instance of "go get this content", which occurs during a document ready
// only if we are on t... |
/**
* @file stateLife
* @author <NAME>
* @date 2018/2/4
* @description
*/
import {
action,
autorun,
observable,
isObservableArray,
toJS
} from 'mobx'
import logger from '../../utils/logger'
export const assignState = action(
function (self, property, val) {
const setVal = (value = val) => {
... |
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 <NAME> <<EMAIL>>
<NAME> <<EMAIL>>
<NAME> <<EMAIL>>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License... |
/* eslint-disable no-case-declarations */
//import * as tf from '@tensorflow/tfjs';
import * as msgpack from 'msgpack-lite';
//import * as Peer from 'peerjs'
var Peer = require('peerjs');
var Hashes = require('jshashes');
import * as tf from '@tensorflow/tfjs';
import {
storeModel,
getSerializedModel,
storeSerial... |
"use strict";
require("dotenv").config();
const REQUIRED_OPTIONS = {
line: ["line_channel_secret", "line_access_token"],
facebook: ["facebook_app_secret", "facebook_page_access_token"],
google: ["google_project_id"]
}
// Import NPM Packages
Promise = require("bluebird");
const Memory = require("./memory... |
/* eslint-disable no-unused-vars, no-use-before-define */
import {
GraphQLBoolean,
GraphQLFloat,
GraphQLID,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLSchema,
GraphQLString
} from 'graphql';
import {
connectionArgs,
connectionDefinitions,
connectionFromArray,
fromGloba... |
/**
*
* @author <NAME>
*
* @description a view for the order information including ...
* - name
* - number
* - status
* - address
*
*/
import React, {Component} from 'react';
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
import Swipeout from "../../rn-swipe-out";
import Driver from "... |
import React, { useEffect } from 'react'
import { withStyles } from '@material-ui/core/styles'
import Dialog from '@material-ui/core/Dialog'
import MuiDialogTitle from '@material-ui/core/DialogTitle'
import MuiDialogContent from '@material-ui/core/DialogContent'
import IconButton from '@material-ui/core/IconButton'
imp... |
function usernameCheck(name) {
if (name.length > 18 || name.length < 6) return false;
let pat = /^[a-zA-Z][0-9a-zA-Z]\w{4,16}/;
return pat.test(name);
}
function numberCheck(num) {
if (num.length !== 8) return false;
let pat = /^[1-9]\d{7}/;
return pat.test(num);
}
function passwor... |
"use strict";
// https://github.com/k2wanko/firestore-full-text-search/blob/main/src/utils/firestore.ts
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return n... |
function getToken() {
let token = getOAuthService().getAccessToken();
console.log(token)
}
function randomNumber(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1) + min); //The maximum is inclusive and the minimum is inclusive
}
function memberType() ... |
/* eslint-disable react/prefer-stateless-function,no-console,no-restricted-globals,class-methods-use-this */
import React from 'react';
import axios from 'axios/index';
import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField';
import Typography from "@material-ui/core/Typograph... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
//const Web3 = require('web3');
//const web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
const expectEvent = require('./helpers/expectEvent');
const shouldFail = require('./helpers/shouldFail');
const { balanceDifference } = require('./helpers/balanceDifference');
const { ether } = require('./... |
import React, { Component } from 'react'
import _ from 'underscore'
import moment from 'moment-timezone'
import 'moment/locale/ja'
import fa_alis from '../assets/images/fa-alis.png'
moment.locale('ja')
class Social_Links extends Component {
constructor(props) {
super(props)
}
link_discord() {
this.props... |
'use strict';
const p = require('path');
const os = require('os');
const fs = require('fs');
const _ = require('lodash');
const writeFileAtomic = require('write-file-atomic');
const uuid = require('uuid');
const log = require('./log');
let baseFilename = 'serverless';
if (process.env.SERVERLESS_PLATFORM_STAGE && pro... |
/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
* additional grant of patent rights can be found in the PATENTS file in
* the same directory.
*/
var as... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototy... |
import React, { useState, useEffect, useRef } from 'react';
import classnames from 'classnames';
import { useObserver } from 'mobx-react-lite';
import jsonFormat from '../../../../common/json-format';
import SagaStore from '../store/SagaImgStore';
import './style/index.less';
const prefixCls = 'c7n-saga';
const Saga... |
import randomFloat from "random-float";
import db from "#utils/database";
function randomInt(Min, Max) {
const range = Max - Min + 1;
return Min + Math.floor(Math.random() * range);
}
function getArtifactID(id) {
return -1 === id
? randomInt(0, Object.values(global.artifacts.domains.id).length - 1)
: gl... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Alert, Row, Col, Button, ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem, Card, CardHeader, CardFooter, CardBody, Collapse, Form, FormGroup, FormText, Label, Input, InputGroup, InputGroupAddon, InputGroupText} from 'reacts... |
import React from 'react';
import styled from 'styled-components';
// eslint-disable-next-line import/no-extraneous-dependencies
import PropTypes from 'prop-types';
import {Link, Redirect} from 'react-router-dom';
const handleRegister = (event, registerUser) => {
event.preventDefault();
let username = '';
let pa... |
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
import { html, htmlLiteral } from '@polymer/polymer/lib/utils/html-tag.js';
import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
import { InputPickerPattern } from '@fooloomanzoo/input-picker-pattern/input-picker-pattern.js';
import {... |
const { dialog } = require('electron').remote
const { getCurrentWindow } = require('electron').remote;
const fs = require('fs');
const moment = require('moment');
const db = require('./helpers/Db');
const CsvParser = require('./helpers/CsvParser');
const CsvCreator = require('./helpers/CsvCreator');
const uploadB... |
import { Module, Reco, LogEntry } from 'data/models';
import Sequelize, { Op } from 'sequelize';
export const schema = [
`
# A grow module object
type Module {
id: String
name: String
size: Int
rowsRight: Int
rowsLeft: Int
recos: [Reco]
}
`,
];
export const queries = [
`
# Retrieve... |
/* jshint node:true */
'use strict';
var _ = require('underscore');
var mongo = require('mongoskin');
var diffPatch = require('jsondiffpatch');
var shortid = require('shortid');
/****************************************************
* HELPER FUNCTIONS
****************************************************/
... |
const { encodeAddVerifier, encodeAddVerifiedClient, verifreg, decode, encodePropose, rootkey, multisig, encodeApprove } = require('./methods').testnet
const methods = require('./methods').testnet
const precommitData = [
'Ag==',
[
[
[
'Aw==',
[
[
0,
3,
... |
const API_URL = window.location.origin;
const SITE_URL = 'https://studentsreview.me';
let TOKEN;
String.prototype.capitalize = function () {
let str = this;
str = str.charAt(0).toUpperCase().concat(str.slice(1));
return str;
};
String.prototype.slugify = function () {
let str = this;
str = str.spl... |
import React from "react"
import useIntegrations from "./hooks"
import Slider from "../../components/slider"
import Ticker from "react-ticker"
import classname from "classname"
import Logo from "./component/logo"
import PageVisibility from "react-page-visibility"
import * as styles from "./integrations.module.scss"
imp... |
import React, { Component} from "react";
import {hot} from "react-hot-loader";
import "../static/css/Game.css";
function Square(props) {
if (props.winner) {
return (
<button className="square winner has-text-centered" onClick={props.onClick}>
<b>{props.value}</b>
</button>
)
} el... |
function CBoxHacker($cbox_prev, $cbox_next){
this.$current = null;
// Key navigation simulation
this.bindKeys = function(){
$(document).on('keydown.cboxhacks', function (e) {
if (e.keyCode === 37) $cbox_prev.click();
if (e.keyCode === 39) $cbox_next.click();
if (e.keyCode === 37 || e.keyCode === 39) {
... |
var utilModule = require("./util"),
arraify = utilModule.arraify,
deepCopy = utilModule.deepCopy,
chain = utilModule.chain,
log = require("./logging").getLog("Transaction"),
ops = require("./protocols/memops"),
buffer = require("./buffer"),
scheduler = require("./... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
const assert = require("assert");
const testSuite = require("../../../../../../+test_common/webdriverSuite.js");
//to=test objects
let driver, to={};
suite("Multi dragging");
async function scrollTo(x, y) {
return driver.executeScript("window.scroll("+x+","+y+");");
}
before(async function() {
this.timeout(150... |
import React, { Component } from 'react'
import ReactDom from 'react-dom'
import { css } from 'glamor'
import ReactTooltip from 'react-tooltip'
import Icon from '../components/Icon'
import {
TABLET_MEDIA_QUERY,
MIN_TABLET_MEDIA_QUERY,
} from 'typography-breakpoint-constants'
// Prism
require('prismjs/themes/prism-t... |
import _ from 'lodash'
import indent from 'indent-string'
import c from 'chalk'
export function printBins(projects) {
printSortedByContainingDir(formatProjectBins, projects, 'repoContainingDir')
//console.log(projects.map(formatProjectBins).join(''))
}
export function printSortedByContainingDir(formatProject, pro... |
// Price Range
// function PriceRange() {
// if(document.querySelector('input[name="setup"]:checked')) {
// var range_price = null;
// var range_price_float = null;
// var selected_range = document.querySelector('input[name="setup"]:checked').value
// /... |
import Plotly from "plotly.js-dist";
import { Layout } from "../layouts/layouts.js";
import { LineTrace } from "../charts/scatters.js";
import { CardTrace } from "../charts/indicators.js";
import { HistogramTrace } from "../charts/histograms.js";
const keyUp = "temperature";
const keyDown = "voc";
// ===============... |
import util from '~/plugins/lib/util';
/**
* Get auth services
* @param envServices
* @return {Array}
*/
const authServices = (envServices) => {
return util.stripSpecific(envServices, ';').split(';').map(service => {
const all = ['find', 'get', 'create', 'update', 'patch', 'remove'];
const items = servic... |
/**
* Created by <NAME>, Data Science Lab (Ghent University - iMinds) on 2/18/16.
*/
var path = require('path');
var pkg = require(path.join(__dirname, 'package.json'));
var memwatch = require('memwatch-next');
var program = require('commander');
var fs = require('fs');
const util = require('util');
var DataAnalysis... |
import { rebasePathname, stripBasenameFromPathname } from './PathUtils'
import PropTypes from 'prop-types'
import React from 'react'
import { createStore } from 'redux'
import { render } from 'react-dom'
import resolvePage from './resolvePage'
// # createRenderer(pages, options) {#createRenderer}
//
// Creates a rend... |
var druidReq
var fromTime, toTime
function rm_real_periodic() {
var tmpDate = new Date(0)
tmpDate.setUTCMilliseconds(fromTime)
var tmpDate2 = new Date(0)
tmpDate2.setUTCMilliseconds(Date.now())
druidReq.intervals = [tmpDate.toISOString()+'/'+tmpDate2.toISOString()]
druidReq.rcvr = 'ctrlR... |
import React from "react"
import styled from "styled-components"
import { ChevronDown } from "react-feather"
import Layout from "../components/layout"
import SEO from "../components/seo"
import Wrapper from "../components/wrapper"
import Input from "../components/input"
const StyledForm = styled.form`
width: 50%;
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const events_1 = require("events");
const builder_1 = require("./builder");
const errors_1 = require("./errors");
const RPC = require("./rpc");
function throwIfError(value) {
if (value instanceof Error) {
throw value;
... |
var app = angular.module('app', []);
app.controller('AppController', function($scope, $timeout, $compile){
var available = [];
function Ptype() {
return $scope.game.player.type === true ? "X" : "O";
}
function Ctype() {
return $scope.game.computer.type === true ? "X" : "O";
}
// Draw game ... |
$ = django.jQuery
phone_template = '<div>Служба: <input class="info" value="Телефон" type=text size="22" /> Номер телефона: <input class="country" type="text" value=" +7" size="2" /> - <input class="code" type="text" value="8652" size="5" /> - <input class="phone" type="text" size="8" /> <span onclick="delete_phone_inf... |
import {watch} from "../../utils/vuefy"
import {getRandomInt} from "../../utils/util"
const SONG_SERVER = "https://guitartools-1257167903.cos.ap-chengdu.myqcloud.com"
const SONG_LIST_FILE = `${SONG_SERVER}/songlist.json`
Component({
/**
* 组件的属性列表
*/
properties: {
songId: {
type: Number,
valu... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports._addToInstallQueue = _addToInstallQueue;
exports.installPackage = installPackage;
var _assert = _interopRequireDefault(require("assert"));
var _path = _interopRequireDefault(require("path"));
var _nullthrows = _interopRequireDefa... |
const CustomError = require('./customerror.js')
const rotateBuffer = require('./transform.js').rotateBuffer
const fs = require('fs')
const piexif = require('piexifjs')
const promisify = require('util').promisify
const m = {}
m.errors = {
read_file: 'read_file',
read_exif: 'read_exif',
no_orientation: 'no_orient... |
import React, { useState, useEffect, useCallback } from "react";
import styled from "styled-components";
import {
PLAYER_X,
PLAYER_O,
SQUARE_DIMS,
DRAW,
GAME_STATES,
DIMS,
GAME_MODES
} from "./constants";
import Board from "./Board";
import { getRandomInt, switchPlayer } from "./utils";
import { minimax }... |
/*****************************************
* GENERAR EL MAPA
*****************************************/
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
var osm = L.tileLayer(osmUrl, { maxZoom:... |
import _ from 'lodash'
import Loading from '@/plugin/loading'
import { API } from '@/plugin/api'
import { isLaunchFromPWA } from '@/plugin/pwa'
import { reportEvent } from '@/plugin/metric'
import localFeeds from '@/plugin/localFeeds'
import localConfig from '@/plugin/localConfig'
import shopantClient from '@/plugin/sh... |
var controls = {
setPage: function (page) {
$('#id_page').val(page);
},
submit: function (page) {
controls.setPage(page);
$("#id_report").submit();
},
setSize: function (size) {
$('#id_size').val(size);
controls.submit(1);
},
setSort: function (sort) {
$('#id_so... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var application_1 = require("@nativescript/core/application");
var color_1 = require("@nativescript/core/color");
var platform_1 = require("@nativescript/core/platform");
var viewModule = require("@nativescript/core/ui/core/view");
var viewCom... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 <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... |
$(document).ready(function() {
$('div.category table tbody tr').bind({
'mouseover': function() {
var tr = this;
if ($(this).hasClass('language-pack')) {
tr = '.' + $(this).attr('class').split(' ')[1];
}
$(tr).addClass('hover');
},
'mouseout': function() {
var tr = this;
if ($(this).hasClass... |
import React, { Component } from 'react';
import { Button, FlatList, Image, StyleSheet, Text, View } from 'react-native';
import {
Adivery,
AdiveryNativeAd,
AdiveryBanner,
Banner,
LargeBanner,
MediumRectangle,
NativeAd,
} from 'adivery';
const appOpenPlacement = '9e9dd375-a1fe-4c2b-8432-b5bf8a5095f6';
c... |
'use strict';
var allStores = [];
var storeHours = [];
var storeCookieSum = 0;
var tbdy;
var trElement;
var totalCookieSum = 0;
var newStoreForm = document.getElementById('new-store');
var hourlySums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
// create location object - constructor
function Store(locationName,... |
//import liraries
import React, { Component } from 'react';
import { Icon } from 'react-native-elements';
import { View, Text, StyleSheet, ScrollView, StatusBar, Image } from 'react-native';
import { firebaseRef } from '../service/Firebase';
import Header from '../ProfileService/Header';
import Profiles from '../Profi... |
import { endent } from '@dword-design/functions'
import showDialog from './show-dialog'
const accessTokenUrl = '/settings/tokens/new?scopes=repo'
const getTokenMessage = error => {
switch (error.response?.status) {
case 401:
return 'The access token is not valid.'
case 403:
if (error.response.h... |
"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];
... |
/* global dhtmlXCalendarObject */
// add once, make sure dhtmlxcalendar.js is loaded
dhtmlXCalendarObject.prototype.langData["fr"] = {
// format
dateformat: "%d/%m/%Y",
// full names of months
monthesFNames: [
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet",
"Août", "Sept... |
window.addEventListener('load', initSlider)
function updateTextInput(val) {
document.getElementById('textInput').value=val;
}
//height and width are imported at index.html, which is calculated in app.py, and can still be accessed here
var org_height = dim.height;
var org_width = dim.width;
var x_im... |
export const createMask = (phoneMask, updateState, sendNotify, customSubscribe) => {
const telephoneMask = phoneMask || '+X(XXX)-XXX-XX-XX';
const maskObj = telephoneMask.split('').reduce((acc, it, index) => {
acc[++index] = it === 'X' ? -2 : -1;
return acc;
}, {});
const defaultValue = telephoneMask.re... |
import React, { useEffect, useState } from "react"
import styled, { keyframes } from "styled-components"
import { animateString, showAnimatedString } from "../util/animated-string"
const HomeHero = () => {
const animatedString = "eightgran"
const [nameLetters, setNameLetters] = useState("")
useEffect(() => {
... |
import React, { useContext, useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom';
import TocFlowInfo from '../components/forms/TocFlowInfo';
import TocFlowTeamComposition from '../components/forms/TocFlowTeamComposition';
import TocLevels from '../components/forms/TocLevels';
import { getAc... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _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]; } } }... |
"use strict";
var generators = require('yeoman-generator');
var path = require('path');
var fs = require('fs-extra');
//var Git = require("nodegit");
module.exports = generators.Base.extend({
// The name `constructor` is important here
constructor: function () {
// Calling the super constructor is imp... |
import erte, { c } from 'erte'
import { equal } from 'assert'
import mismatch from 'mismatch'
import { readFileSync, writeFileSync } from 'fs'
import { askSingle, confirm } from 'reloquent'
import { splitWithPositions } from './lib'
import { EOL } from 'os'
/**
* A function to construct tests from a mask file.
* @pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.