text stringlengths 3.07k 16k |
|---|
var generateConditionSequence = function (structureList, conditions = ['mental', 'physical'], miniblock_size = 4) {
var numStims = structureList.length;
var miniBlockTemplate = repeatArray(conditions, miniblock_size/(conditions.length));
var num_miniblocks = numStims/miniblock_size;
var nAttem... |
// Libs
import React from 'react';
import { formatter as culoriFormatter, round as culoriRound, hsv as culoriHsv } from 'culori';
import PropTypes from 'prop-types';
import { noop } from '../util/functions';
import NumericInput from '../Input/NumericInput';
import Swatch from '../Swatch/Swatch';
import ColorVariation... |
let app = require('express')();
let http = require('http').Server(app);
let io = require('socket.io')(http);
let socketClients = [];
let onlineCliens = [];
let desks = [];
// 是否在游戏中
function existsDesk(socketId) {
// for (let item of desks) {
// console.log('能执行');
// if (item.White === socketId || ite... |
import React from 'react';
import Layout from '../components/Layout/Layout';
import Container from '../components/Container/Container';
import TextBox from '../components/TextBox/TextBox';
import ActionPanel from '../components/ActionPanel/ActionPanel';
import Alert from '../components/Alert/Alert';
import getCharacter... |
import React, { useEffect, useState } from "react";
import "./PortfolioSummary.css";
import { ServerMock } from "utils/ServerMock";
import { numToReadableDollar, percentToReadable } from "utils/utils";
import { RefreshSpinner, Spinner } from "components/loader/spinner";
// This feels really messy. I'm not entirely sur... |
import PropTypes from 'prop-types';
import React from 'react';
import Dropdown from 'react-bootstrap/Dropdown';
import jsonToFCPX from '@bbc/fcpx-xml-composer';
import downloadjs from 'downloadjs';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
faShare,
faInfoCircle,
faFileExport,
} fr... |
let chart = document.getElementById('chart');
let chartContainer = document.querySelector('.card__chart--container');
let chartPropertiesOrignal = {
type : `pie`,
data: {
labels: [],
datasets: [{
data: [],
backgroundColor: [
'rgba(255, 99, 132, 0.7)',
... |
var page = 1;
var current_page = 1;
var total_page = 0;
var is_ajax_fire = 0;
manageDataEgr();
$(document).ready(function () {
(function ($) {
$('#filtrar').keyup(function () {
var rex = new RegExp($(this).val(), 'i');
$('.buscar tr').hide();
... |
/* eslint no-process-env: "off" */
/* eslint no-sync: "off" */
/* eslint global-require: "off" */
// allow imports/requires to use non-relative paths to load other modules.
// e.g. instead of require('../../services/health') we can use require('services/health')
process.env.NODE_PATH = __dirname;
require('module').Mod... |
setTimeout(() => {
// add translations
api.addTranslations('agollabel', ['Import from ArcGIS Online', 'Importer de ArcGIS Online']);
api.addTranslations('agoltooltip', ['Import from ArcGIS Online', 'Importer de ArcGIS Online']);
api.addTranslations('agol.id', ['Enter id' , 'Entrez l\'identifiant']);
... |
import React from 'react'
import PropTypes from 'prop-types'
import en from 'locales/en'
import { ErrorBoundary } from 'ErrorBoundary'
// context is only created when <MultiMapManager> is implemented (see constructor)
export let MultiMapContext = null
/**
* A higher order component that manages MultiMapContext for c... |
//Load Config File
var robotConfig = null;
var client = new XMLHttpRequest();
client.open('GET', './robotConfigs/defaultConfig.robot');
client.onload = function () {
var robotConfigTxt = client.responseText;
if (robotConfigTxt !== '' && robotConfig == null) {
robotConfig = JSON.parse(robotConfigTxt);
setTi... |
#!/usr/bin/env node
const { ArgumentParser } = require('argparse')
const { spawn } = require('child_process')
require('fresh-console')
const { readFile, writeFile } = require('fs').promises
const { prompt } = require('inquirer')
const path = require('path')
const slugify = require('slugify')
const packageInfo = require... |
/*#region CLASS LEVEL ITEMS*/
//current dimensions of the page
var curr_spot;
var spot_height;
var spot_width;
//booleans dealing with current state of the js
var bMobile = new Boolean(false);
var bPastMain = new Boolean(true);
var bHiddenNavOpen = new Boolean(false);
//booleans dealing with current state of the page
v... |
var width = 900;
var height = 600;
var tooltip = d3.select("body")//.select("#svgpic")
.append("div")
.attr("class","tooltip")
.style("opacity",0.0);
var svg = d3.select("body").select("#svgpic")
.append("svg")
.attr("width",width)
.attr("height"... |
const _ = require('lodash');
const consola = require('consola');
const { getHostname, getDomain } = require('tldts');
const utils = require('./utils');
/**
* Enumeration of the negative results
*/
const reasons = {
WebsiteDown: 'WebsiteDown',
NotFound: 'NotFound',
};
/**
* Builds blocking rule for the spec... |
import React, { Component } from 'react'
import {
View,
StyleSheet,
SafeAreaView,
FlatList,
TouchableOpacity,
Platform,
Alert,
} from 'react-native'
import Icon from 'react-native-vector-icons/FontAwesome'
import AsyncStorage from '@react-native-async-storage/async-storage'
import axios from... |
import React, { useState, useEffect } from "react";
import { useDispatch } from "react-redux";
import { _createComm, _editComm, _deleteComm } from "../store";
import Button from "@mui/material/Button";
import TextField from "@mui/material/TextField";
import Dialog from "@mui/material/Dialog";
import DialogActions from... |
/** @jsx React.DOM */
var React = require('react/addons');
var PropTypes = React.PropTypes;
var cx = React.addons.classSet;
var cloneWithProps = React.addons.cloneWithProps;
var ComponentHeader = require('./ComponentHeader');
var ComponentContextMenu = require('./ComponentCon... |
/**
* @name littleDiffer.js
* @author <NAME>
* @description Compares all elements of two JSON files and outputs the
* diffed document after
*/
/*
* compareJSON is a diffing function that was written by the developers that
* had a consistent, specific output. The outputs will be a document that contains
* key value ... |
class Cell {
constructor(index, richness, neighbors) {
this.index = index
this.richness = richness
this.neighbors = neighbors
}
isEmpty(trees) {
return !trees.some(tree => tree.cellIndex === this.index)
}
}
class Tree {
constructor(cellIndex, size, isMine, isDormant)... |
/*
CHALLENGE 1:
define some irrational constants.
*/
// Golden Ratio
const PHI = (1 + Math.pow(5, (1 / 2))) / 2;
// Silver Ratio
const PSI = PHI - 1;
// Perimetros Number
const PI = Math.PI;
// Euler's Number
const E = Math.E;
/*
CHALLENGE 2:
make aliases to referenced math functions.
*/
... |
/*
* Copyright 2017-2022 EPAM Systems, Inc. (https://www.epam.com/)
*
* 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 req... |
window.onload = function () {
function loadContextMenuItems() {
// loading msg as get() is asynchronous
$('#context-menu-items').append('<div class="loading">Loading...</div>');
// loading context menu items from chrome storage
chrome.storage.sync.get(null, function (jsonObj) {
... |
import React, { useState, useEffect } from 'react';
import { BreadCrum, ListTheme, checkInclude, rate } from '../mixin/mixin'
import { DropdownList } from 'react-widgets'
import List from './List'
import Grid from './Grid'
import { useDispatch, useSelector } from 'react-redux';
import { list_item, list_money } from '..... |
/**
* A set of formatter functions used to present study data in a user-friendly form.
* Can be used to transform study object to a simplified data representation, which is
* ready to render.
*
* @module utils/study-formatters
* @author <NAME>
* @copyright (C) 2020 ACK CYFRONET AGH
* @license This software is r... |
export const isNil = (value) => value == null
export const isBoolean = (value) => value === true || value === false
export const isNumber = (value) => typeof value == 'number'
export const isString = (value) => typeof value == 'string'
export const isArray = (value) => value instanceof Array
export const isObject = (va... |
// Draw the stars on screen on each frame of animation
// The code is based on examples from https://webglfundamentals.org.
import m4 from './m4.js';
/**
* Draw trajectories of the two galaxy cores.
*
* @param {object} drawData Drawing data
* @param {object} initialParams Initial parameters of the animati... |
function changeAge(m)
{
var size = 0;
if(m==0)
{
size = $("#p_age_from").val();
$("#l_age_from").text(size);
//$("#age_from").val(size);
if(parseInt(size) > parseInt($("#p_age_to").val()) )
{
$("#p_age_to").val(size);
$("... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
UI = {
Load: function(){
UI.Common();
// UI.Rolling();
//UI.Flicking();
UI.Accordion();
UI.Accordion2();
UI.Tabmenu();
UI.Popup();
UI.LayerPopup();
},
Common: function(){
var category_area = $('.main_category_area'),
select_btn = category_area.children('a'),
select_list_area = category_are... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-address-space
*/
const async = require("async");
const _ = require("underscore");
const node_opcua_assert_1 = require("node-opcua-assert");
const node_opcua_data_value_1 = require("node-opcua-data-value");
const node... |
import React, { lazy, useState, useEffect } from "react";
import {
CButton,
CCard,
CCardBody,
CCardFooter,
CCol,
CContainer,
CForm,
CInput,
CInputGroup,
CInputGroupPrepend,
CInputGroupText,
CRow,
CHeader,
CCardHeader,
} from "@coreui/react";
import CIcon from "@coreui/icons-react";
import Co... |
/**
* Copyright 2017 Google Inc. All rights reserved.
* Modifications copyright (c) Microsoft 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.or... |
/**
* <NAME>
* July 2018
* A simple web server using express
*/
/**
* CREATE READ UPDATE DELETE (CRUD)
* POST GET PUT DELETE (PGPD)
* Standard HTTP METHODS
*
* POST = CREATE
* GET = READ
* PUT = UPDATE
* DELETE = DELETE
*/
require("pythonicjs")()
const express = require('express')
const... |
var parseSource = require("./lib/parseSource"),
ReplaceMany = require("./lib/ReplaceMany"),
queue = require('tiny-queue'),
Url = require('./lib/url');
var col = require('tiny-col');
function createParser (options) {
if (!options)
options = {};
var url_part = options.url_part || '__IMPORT_URL__',
... |
async function init() {
LoginRequired();
// 初始化Table
let oTable = new TableInit();
oTable.Init();
// 初始化Button的点击事件
let oButtonInit = new ButtonInit();
oButtonInit.Init();
}
var TableInit = function () {
var oTableInit = new Object();
// 初始化Table
oTableInit.Init... |
import React, { useEffect } from 'react';
import styled, { css, keyframes } from 'styled-components';
import { PrevButton, NextButton } from './SlideButton';
// size(str) or responsive(bool) 필수: superLarge, large, medium, small
const Carousel = ({
size,
theme,
homeId,
blockLink,
responsive,
homeWidth,
is... |
// Creates a js file with all standards
import warfighting_2525b from "./2525B warfighting.json";
import tacticalgraphics_2525b from "./2525B tactical-graphics.json";
import signalsintelligence_2525b from "./2525B signals-intelligence.json";
import otherthanwar_2525b from "./2525B other-than-war.json";
import warfight... |
import React from 'react'
import RavenComponent from './RavenComponent';
import {connect} from 'react-redux'
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
UncontrolledDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem,
Container,
Row... |
import React from "react";
import { Modal, Button } from "antd";
import Axios from "axios";
import swal from "sweetalert";
import jsPDF from 'jspdf'
class CheckOut extends React.Component {
state = {
loading: false,
visible: false,
myData: [],
form: [],
id: new Date().valueOf()
};
formatNumbe... |
const fs = require('fs');
const cjson = require('compressed-json');
const reload = require('./scripts/reload');
const Discord = require('discord.js');
const config = require('./config.json');
const GistClient = require("gist-client");
const gists = new GistClient().setToken(config.gistToken);
let prefix;
let questions... |
$(document).ready(function () {
get_data();
$('#btnTambah').click(function (e) {
e.preventDefault();
$('#validation').html('');
$.ajax({
type: "get",
url: get_id,
dataType: "json",
success: function (response) {
$('#id_oper... |
const winningMessage = () => `Player ${currentPlayer} has won!`;
const drawMessage = () => `Game ended in a draw!`;
const currentPlayerTurn = () => `It's ${currentPlayer}'s turn`;
let gameState = ["", "", "", "", "", "", "", "", ""];
let currentPlayer = "X";
let minute = 0;
let second = 0;
let millisecond = 0;
let cron... |
import React, { memo } from 'react';
import Helmet from 'react-helmet';
import PropTypes from 'prop-types';
import { Switch, Route, withRouter, Redirect } from 'react-router-dom';
import { compose } from 'redux';
import { Row, Column, themeColor, themeSpacing } from '@datapunt/asc-ui';
import styled from '@datapunt/asc... |
var map;
var markersArray = [];
var directionsDisplay;
var directionsService;
var startData;
var endData = {};
var lastInfoWindow = null;
var directionResults = null;
var df = '../static/img/';
var DICT = {"medical facility": df + "mf.jpg",
"medical service": df + "mh.png",
"mental healt... |
import React from 'react';
import PropTypes from 'prop-types';
import TextInput from '../../app/components/TextInput';
const AddressForm = (props) => {
const {
errorFields,
handleAddressChange,
addressDetails,
type,
serviceSame,
setServiceSame,
} = props;
const handleCheckboxClick = (eve... |
// Generated by CoffeeScript 2.5.1
var test;
import {
createElement,
useState,
useEffect,
useRef,
useReducer
} from 'react';
import {
Layout,
In,
Box,
Row,
Menu,
Section,
SectionLabel,
Style,
Separator,
Anchor
} from '../components';
import ExampleRecursiveMenu from './ExampleRecursiveM... |
var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"]
var weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
var today = new Date()
var months = []
function generateCalendar (eventData) {
var eventData = eventData.sort(functio... |
// Create function for Data plotting (Bar, gauge, bubble)
function getdata(tm) {
d3.json("Resources/basketball_table.json").then(function (nbaData) {
// console.log(nbaData);
// var trying = Object.values(nbaData);
// // console.log(trying);
// var code = nbaData.value();
// console.log(code);
... |
'use strict';
/* ------------------------------------------------------------------------------------------------
CHALLENGE 1
Write a function named validatePin that uses a regular expression pattern to validate a PIN.
If the PIN is four numerical digits long, return true. Otherwise, return false.
------------------... |
import React, { useState } from "react";
import { connect } from "react-redux";
//Apollo useMutation Hook for API call
import { useQuery, useMutation } from "@apollo/react-hooks";
//Importing GraphQL Query for useMutation API call
import { addSkillMutation as ADD_SKILL_MUTATION } from "../../queries/skills";
//Import ... |
import React from 'react'
import PropTypes from 'prop-types'
import * as d3 from 'd3'
class D3SimpleForceChart extends React.Component {
componentDidMount() {
console.log(this.chartRef.parentNode)
const containerWidth = this.chartRef.parentElement.offsetWidth
const data = this.props.data
const margin... |
import React from 'react';
import SEO from '../components/seo';
import Panel from '../components/panel';
import LinkOut from '../components/LinkOut';
import Layout from '../components/layout';
import TopPanel from '../components/topPanel';
import ButtonLink from '../components/buttonLink';
import HorizontalTitle from... |
// Copyright 2017 FOCUS Inc.All Rights Reserved.
/**
* @fileOverview UED-FE-Task
* @author <EMAIL>
*/
const logger = require('../../logger');
const util = require('./util');
const RESOLUTION_STATUS = {
'-1': 'Unresolved',
'1': 'Fixed',
'2': 'Won\'t Fix',
'3': 'Duplicate',
'4': 'Incomplete',
... |
var http = require("http");
require("dotenv").config();
var droidapikey = process.env.DROID_API_KEY;
function modread(input) {
var res = '';
if (input.includes('n')) res += 'NF'
if (input.includes('h')) res += 'HD'
if (input.includes('r')) res += 'HR'
if (input.includes('e')) res += 'EZ'
if (input.incl... |
'use strict';
const _ = require('lodash');
const logger = require('../utils/logger').getLogger('/Configuration');
const path = require('path');
const safeRegex = require('safe-regex');
const VError = require('verror').VError;
const xsenv = require('@sap/xsenv');
const configurationUtils = require('../utils/configurati... |
const fs = require("fs");
const dataFolder = require('./config.json').BOT_DATA_DIR;
//timers are stored in here
const file = `${dataFolder}/timers.json`;
//help text is in here
const helpFile = require('./help.json');
function arrayUpdate(){
return JSON.parse(fs.readFileSync(file));
};
// helpText(args[0]); Out... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*------------------------------------------------------------... |
import { createSlice } from '@reduxjs/toolkit'
import { getTodosAsync, addTodoAsync, toggleTodoAsync, removeTodoAsync } from './services'
//MiddlewareThunk ile api call yapıyoruz. Todoları artık apimizden alacağız. Bunu tanımladıktan sonra state'e extraReducers tanımladık.
export const todosSlice = createSlice({
... |
/*
* Copyright (c) AXA Group Operations Spain S.A.
*
* 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,... |
const async = require.main.require('async');
const db = require.main.require('./src/database');
const user = require.main.require('./src/user');
const topics = require.main.require('./src/topics');
var Controllers = {};
Controllers.renderAdminPage = function (req, res, next) {
/*
Make sure the route matches your p... |
import React, { useState } from 'react';
import {FauxEvent} from '../../Event/FauxEvent';
import './Knob.css';
/**
* Knob
*
* A circular slider input. Uses css property shape-outside and svg half-circle(s)
* along with a parent element padding-top to push a knob slider 'around' the
* half-circle shape(s).
*
... |
import React, { Component } from 'react'
import Client from '@helium/http'
import { Table, Card, Button, Tooltip, Checkbox, Typography } from 'antd'
import { FilterOutlined } from '@ant-design/icons'
import Timestamp from 'react-timestamp'
import TxnTag from './TxnTag'
import LoadMoreButton from './LoadMoreButton'
impo... |
// Copyright (c) 2016, <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 condition... |
var base_url = "https://readerapi.codepolitan.com/";
// Blok kode yang akan di panggil jika fetch berhasil
function status(response) {
if (response.status !== 200) {
console.log("Error : " + response.status);
// Method reject() akan membuat blok catch terpanggil
return Promise.reject(new Error(response.st... |
/**
* Component dependencies.
* @private
*/
import React from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
/**
* The NewWindow class object.
* @public
*/
class NewWindow extends React.PureComponent {
/**
* NewWindow default props.
*/
static defaultProps = {
url: '',... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const jovo_core_1 = require("jovo-core");
const _get = require("lodash.get");
const _merge = require("lodash.merge");
const _set = require("lodash.set");
const path = require("path");
class FileDb {
const... |
// required use strict
'use strict';
// question point counter
let points = 0;
// Ask the user their name through a prompt
//
let userName = prompt('What is your name?');
alert('Hello ' + userName + '!');
console.log('The users name is ' + userName);
function questionOne() {
// question #1
let answ... |
const inquirer = require("inquirer");
const axios = require("axios")
generateContribrute = function (data) {
if(!data){
return ""
}
else{
return (
"# Contributor Covenant Code of Conduct"
+"\n ## Our Pledge "
+"\n We as members, contributors, and leaders p... |
"use strict";
var linkObj = require("../internal/linkObj");
var matchUrl = require("../internal/matchUrl");
var parseHtml = require("../internal/parseHtml");
var parseOptions = require("../internal/parseOptions");
var scrapeHtml = require("../internal/scrapeHtml");
var UrlChecker = require("./UrlChecker"... |
// Copyright (c) <NAME>.
// Licensed under the MIT license.
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import { Auth, AuthDev } from '@cosmotech/core';
import { AuthMSAL } ... |
import {chaynsCall} from '../../chaynsCall';
import {getCallbackName} from '../../callback';
import {propTypes} from '../../propTypes';
import {isArray, isDate, isNumber, isObject} from '../../../utils/is';
import {environment} from '../../environment';
import {isDialogPermitted} from '../../../utils/isPermitted';
impo... |
/**
* # Angular 1 types
*
* UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.
* The customizations to the core types for Angular UI-Router are documented here.
*
* The optional [[$resolve]] service is also documented here.
*
* @module ng... |
const { encode, decode } = require("isomorphic-textencoder");
const debounce = require("just-debounce-it");
const CacheFS = require("./CacheFS.js");
const { ENOENT, ENOTEMPTY, ETIMEDOUT } = require("./errors.js");
const IdbBackend = require("./IdbBackend.js");
const HttpBackend = require("./HttpBackend.js")
const Mute... |
const fse = require("fs-extra");
const globAsync = require("fast-glob");
const rimraf = require("rimraf");
const Mustache = require("mustache");
const path = require("path");
const yargs = require("yargs");
const packagePath = process.cwd();
const outDirs = {
svgIcons: path.resolve(packagePath, "src"),
svgPaths: ... |
'use strict';
/////////////////////////////////////////////////////////////////////////
// PLUGINS & MODULES //
/////////////////////////////////////////////////////////////////////////
let gulp = require('gulp'),
autoprefixer = require('gulp-autopr... |
var util = require('util');
var color = require('color');
function sleep(milliseconds) {
return new Promise(resolve => setTimeout(resolve, milliseconds));
}
var method = GradientSvg.prototype;
function GradientSvg(svgElement, document, dom) {
this.svgElement = svgElement;
this.document = document;
t... |
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
/*
* Licensed to Ela... |
import { Animated, View, Text, Button, TouchableHighlight, Image } from 'react-native';
import { useState, useEffect, createElement } from 'react';
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'un... |
// LICENSE@@@
//
// Copyright (c) 2009-2013 LG Electronics, Inc.
//
// 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 require... |
"use strict";
var dial = require("../libs/dialClient.js"),
utils = require("../libs/utils.js"),
Q = require("q"),
winston = require("winston");
const argv = require("yargs")
.usage("\nUsage: node " + __filename.slice(__dirname.length + 1) + "[options]")
.option("host", {
describe: "IP add... |
function NewsViewModel() {
var self = this;
self.color = ko.observable('unassigned');
self.ourEnergy = ko.observable(1);
self.theirEnergy = ko.observable(1);
self.movesRemaining = ko.observable(0);
self.update = function (moveRequest) {
... |
// # type.js
"use strict";
const Stream = require('./stream');
const { typeDecorator, hex } = require('./util');
// # Type
// A base class that we use to represent the different items in a savegame.
// Note that we use subclassing now, but it would actually be more useful to
// be able to use decorators for setting ... |
import React, { useEffect, useState } from "react";
import { StyleSheet, Dimensions, ScrollView } from "react-native";
import { Button, Block, Text, Input, theme } from "galio-framework";
import GraficoAvance from "../components/GraficoAvance";
import GraficoGastosAcumulados from "../components/GraficoGastosAcumulados"... |
"use strict";
/**
* @file AccountsCreate.ts
* @author <NAME> <https://github.com/mosaicnetworks>
* @date 2018
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(... |
const locale = require("../lib/locale");
const { AbstractSetup } = require("./abstract-setup");
const { ColorUtil } = require("../lib/color/color-util");
const { ObjectNamespace } = require("../lib/object-namespace");
const { Spawn } = require("./spawn/spawn");
const { TableLayout } = require("../table/table-layout");
... |
'use strict';
/*
# Javascript Prototyping Best Practices
* To create a class, create a constructor function with a `Name` and assign
it to a variable of the same `Name`.
* In this constructor only define properties using `this.prop` notation
or, even better, using `Object.defineProperty` method.
* NEVER d... |
const { accounts, contract } = require('@openzeppelin/test-environment');
const { BN, ether, expectRevert, time } = require('@openzeppelin/test-helpers');
const { expect } = require('chai');
const IncreasingPriceCrowdsaleImpl = contract.fromArtifact('IncreasingPriceCrowdsaleImpl');
const SimpleToken = contract.fromA... |
var sax = require('sax'),
saxpath = require('saxpath'),
xml2js = require('xml2js'),
// libxmljs = require('libxmljs'), // for validation only TODO: think about using SAX instead
stream = require('stream'),
util = require('util'),
fs = require('fs');
module.exports = SaxmlpList;
module.exports.Sa... |
'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 ("va... |
// Use Validator (https://www.npmjs.com/package/validator)
var validator = Meteor.npmRequire('validator');
Meteor.methods({
search: function (srcType, entType, entName, mappingType, searchFilter) {
var searchCombo = "SourceType=" + srcType + "; EntityType=" + entType + "; EntityName=" + entName + "; MappingTyp... |
const Discord = require("discord.js");
const events = { events: { "2x2": {}, "3x3": {}, "4x4": {}, "5x5": {}, "6x6": {}, "7x7": {}, "oh": {}, "clock": {}, "pyra": {}, "mega": {}, "skewb": {}, "squareone": {}, "redi": {}, "2x2x3": {}, "ivy": {} } };
const key = { "2x2": "twox", "3x3": "threex", "4x4": "fourx", "5x5": "f... |
import get from 'lodash.get';
/**
* Calculates the distance between two provided dates (e.g.: "Five days ago")
*
* @param {Function} t The function to translate the description
* @param {Date} previousDate Previous date
* @param {Date} currentDate Current date
* @returns {string} The description
*/
export const... |
import _isFunction from "lodash/isFunction";
import _assign from "lodash/assign"; /*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 135, 180, 225, 315] }]*/
import * as d3Shape from "d3-shape";
import { Helpers, Data, Style } from "victory-core";
var degreesToRadians = function (degrees) {
return ... |
import path from 'path';
import { createReadStream } from 'fs';
import readline from 'readline';
import fs from 'fs/promises';
import { BrowserWindow, dialog, ipcMain } from 'electron';
import aps from 'e/modules/AppSettings';
import { IPC_READ_CONTENT, IPC_READ_PARENT_CONTENT, IPC_READ_TRANSLATE_CONTENT } from 'e/cons... |
/*
lib for node packing algorithm
*/
import {
SMALL,
containedInCircles,
distance
}
from "../venn.js/src/circleintersection.js";
import {
binder,
applier
}
from "./getSet.js";
import d3 from "d3";
//return true when the point is out of all circles
function outOfCircles(point, circles) {
for (var i = 0; i ... |
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _assertThisInitialize... |
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*-------------------------------------------------... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
* @format
*/
'use strict';
exports.__esModule = true;
exports.default = void 0;
var _AnimatedEvent = require("../AnimatedEvent");
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.