text stringlengths 3.07k 16k |
|---|
var Transition = require('./Transition');
var TransitionRelative = require('./TransitionRelative');
var easingFunctions = require('./easing');
var interpolationFunctions = require('./interpolation');
// Temporisation, used for waiting
function Temporisation(start, duration, toObject, properties) {
this.... |
'use strict';
var expect = require('expect');
var myApp = require('../app/binary-search.js');
Array.prototype.toTwenty = function(){
}
Array.prototype.toForty = function(){
}
Array.prototype.toOneThousand = function(){
}
Array.prototype.search = function(d){
var min_index = 0;
var max_index = this... |
$(document).ready(function () {
$('.btn-mark-valid').click(predefinedRuleAddButtonHandler);
$('#btn-add').click(customRuleAddButtonHandler);
$('input[type=checkbox]').click(selectAllHandler);
$('#added-rules').on('click', 'a.remove-rule', removeRuleHandler);
$('#possible-rules').height($('#alt-list'... |
// Things to be edited while maintaining website such as board member names and images are here:
// Board member names and emails
const board = {
chairman: "<NAME>",
secretary: "<NAME>",
treasurer: "<NAME>",
"chairman-email": "diana.di at esimerkki.fi",
"secretary-email": "iina.inssi at esimerkki.fi",
"trea... |
let stepsList = [{
element: '#generalStep',
intro: `Click "Next" to begin!`,
position: 'right',
scrollTo: 'tooltip',
audioFile: ['']
},
{
element: '#generalStep',
intro: `Let’s practice creating an account on social media.`,
position: "right",
... |
import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { StyleSheet, View } from 'react-native';
import Ionicons from 'react-native-vector-icons/Ionicons';
import {
Container, Content, Separator, ListItem, Text, Left, Body, Right, Thumbnail... |
import React, { useState, useEffect } from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSearch, faFileUpload } from '@fortawesome/free-solid-svg-icons'
import Button from 'react-bootstrap/lib/Button'
import Modal from 'react-bootstrap/lib/Modal'
import CreatableSelect from 'react-... |
var fs = require('fs');
var xml2json = require("simple-xml2json");
var json2xml = require('json2xml');
var busOntoClassifMappingFile = "../data/testData/busOnto_classif_manual_mapping.json";
var classifFreeMind = "../data/testData/classif_tc_18052016.xml";
convertPlmXml2freeMindXml(classifFreeMind);
/**
* [fromBusOn... |
// Variables
let type = ["delta", "Square"];
let mainMath = document.querySelector(".mainMath");
let buttonCal = document.querySelector("#cal");
let inputA = document.querySelector("#inputA");
let inputB = document.querySelector("#inputB");
let inputC = document.querySelector("#inputC");
let deltaRadio = documen... |
import React from 'react';
import { reduxForm } from 'redux-form';
import {reactLocalStorage} from 'reactjs-localstorage';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { register} from '../actions/userActions'
import {bindActionCreators} from 'redux';
class Registration extends R... |
const { LitElement, html, css } = require('lit')
const invsprite = require('./invsprite.json')
class HotBar extends LitElement {
updated (changedProperties) {
if (changedProperties.has('bot')) {
// inventory listener
this.bot.once('spawn', () => {
this.init()
})
}
}
init () {
... |
const sdk = require("dragonchain-sdk");
const uuid = require("uuid/v4");
/**
* One quick note on Logging from within a smart contract.
* Never use STDOUT for logs. Always use STDERR to allow
* dragonchain to split "output" and "logs" to diff streams.
*
* Remember:
* `console.error` = log
* `console.log` = outpu... |
/**
* @file check the tool of hooks
*/
import React, { Component, useEffect, useState } from 'react';
import { useTitle, useStyle, useComputed, useFor, useData, createContext, useMethod } from '../../react-sweet';
const context = createContext();
const context1 = createContext();
export class Tools extends Compone... |
var net = require("net");
var util = require("util");
var crypto = require('crypto');
var zlib = require("pako");
//tree sha1, unixtime, unixtime
var DEFAULT_COMMIT = "tree %s\nauthor %s <%s> %s +0800\ncommitter %s <%s> %s +0800\n\npackaged by git-imposter-0.0.1\n",
//commit sha1
GET_PACK_RESPONSE_1 = "000000b4%s HEA... |
import React, { Component } from 'react';
import { View, Text, Image, TouchableOpacity, ScrollView, Alert, StyleSheet } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import Icon from 'react-native-vector-icons/Ionicons';
import { connect } from 'react-redux';
import CurrencyApi from '.... |
function addLink(){
var i;
var no_of_links = document.getElementsByName('no_of_links')[0].value;
var addLinkBtn = document.getElementById('add_link');
var disable = addLinkBtn.setAttribute("disabled","add_link");
for(i=0;i<no_of_links;i++){
var lname = document.createElement("input");
va... |
// Utility functions for creating some simple UI elements
//var bootbox = require('bootbox');
var self = {};
// Hookup bootbox stuff
//if (bootbox != undefined) {
// self.confirm = bootbox.confirm;
// self.dialog = bootbox.dialog;
// self.prompt = bootbox.prompt;
//}
function createGlyphIconButton(name) {
retu... |
// TODO:
// weather png
// require
const fs = require("fs");
const path = require("path");
const child_process = require('child_process');
const Jimp = require('jimp');
// switch
const dlRaw = process.env.NODE_DLRAW == "false" ? false : true;
const dlImg = process.env.NODE_DLIMG == "false" ? false : true;
// vars
co... |
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Card, Row, Input, Table, DatePicker,Col, Checkbox, Tooltip } from 'antd';
import { Link } from 'dva/router';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import globalStyles from '../../assets/style/global.less';
imp... |
/**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* 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... |
var debug = true;
var fake = true;
var loaded = false;
var openedWindow = false;
var args = arguments[0] || {};
var program = null;
function initialize() {
if (Alloy.Globals.isIos7Plus) {
$.navbarView.getView().top = 20;
}
$.navbarView.setData({
id : 'login.menu.league_game',
title... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProjectRootNamesAndCompilerOptions = void 0;
const ts = require("typescript");
const fs = require("fs");
const path = require("path");
const fg = require("fast-glob");
const normalize = require("normalize-path");
/**
* @public
*/
... |
/* eslint-disable no-unused-vars,block-scoped-var,no-var,vars-on-top,no-plusplus,import/order,new-cap,global-require */
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.downloadCache = downloadCache;
exports.preparePlan = preparePlan;
exports.invokePrepareTask = invokePrepareTask;
exports.checkP... |
import Router from 'koa-router'
import { spMongoDB } from 'sp-mongo'
import { spResponse, RES_SUCCESS, RES_FAIL_OPERATE } from 'sp-response'
import cors from 'sp-cors-middleware'
export default class spApi {
/**
* Creates an instance of ApiFactory.
*
* @param {any} opt {ip: '', port: '', db: '', pr... |
/**
* Created by axetroy on 17-4-6.
*/
import React, { Component } from 'react'
import PropTypes from 'proptypes'
import { Menu, Icon, Tooltip } from 'antd'
import { NavLink, matchPath, withRouter } from 'react-router-dom'
import Octicon from 'react-octicon'
import Rythm from 'rythm.js'
import avator from 'src/assets... |
// JavaScript Document
(function($) {
"use strict";
//calling Brand Crousel
$(".main-banner").owlCarousel({
loop:true,
margin:5,
responsiveClass:true,
slideSpeed : 2000,
smartSpeed:2500,
nav: true,
autoplay: true,
autoplayTimeout:5000,
responsiveRefreshRate : 200,
rewind:true,
responsiv... |
const OAuth2Strategy = require("passport-oauth2");
const passport = require("passport");
const config = require("./config");
const logger = require("./lib/logger");
let baseUrl = config.CANONICAL_URL;
if (!baseUrl.endsWith("/")) baseUrl = `${baseUrl}/`;
const oauthRedirectUrl = `${baseUrl}callback`;
const oauthPostLo... |
/**
* This utility is used to post-process CSS containing CSS variables so that a default (non-themed) version works
* on browsers that don't support CSS variables (IE 11).
*
* This requires a JSON file containing the default values for all possible CSS variables. It will
* find any var(--XXX) values in CSS a... |
/*
* Copyright 2014, <NAME>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
var { isInstanceOfM4X } = require('util');
var { constants } = require('constants');
function Color(m4Inst, vals) {
if (!isInstanceOfM4X(m4Inst)) {
throw new Error('Color: calling new Color() directly is not supported. Use m4x.color()');
}
// in order to make color compatable with mgraphics we need to make Color... |
'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]; } } } r... |
/**
* Based off of
* https://github.com/vuejs/vue-hackernews-2.0/blob/master/server.js
* By <NAME>
* Contains modifications
*/
const fs = require('fs')
const path = require('path')
const LRU = require('lru-cache')
const express = require('express')
const favicon = require('serve-favicon')
const compression = requ... |
import React, { Component } from 'react';
import moment from 'moment';
import R from 'ramda';
import classNames from 'classnames';
const mapIndexed = R.addIndex(R.map);
const is_outside = (day, month) => {
const start_of_month = month.clone().startOf('month');
const end_of_month = month.clone().endOf('month');
... |
import { Link, StaticQuery, graphql } from 'gatsby';
import React, { Component } from 'react';
import styled from 'styled-components';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faAngleDown } from '@fortawesome/free-solid-svg-icons';
const TopHeader = styled.div`
background: linear-gr... |
/* eslint-disable no-unused-vars */
import React, { useState, useEffect } from "react";
import { makeStyles } from "@material-ui/core/styles";
import GridContainer from "components/Grid/GridContainer.js";
import Button from "components/CustomButtons/Button.js";
import api, { API_TYPES } from "../../actions/api";
import... |
import { Material } from 'three';
const $threeGLTF = Symbol('threeGLTF');
const $gltf = Symbol('gltf');
const $gltfElementMap = Symbol('gltfElementMap');
const $threeObjectMap = Symbol('threeObjectMap');
const $parallelTraverseThreeScene = Symbol('parallelTraverseThreeScene');
const $correlateOriginalThreeGLTF = Symbol... |
//
// Texture Picker
//
window.onload = function() {
// Handle Texture Picker
const $picker = document.querySelector('#texture-picker');
const $hidePicker = document.querySelector('#hidePicker');
const $header = document.querySelector('header');
$header.setAttribute('class', `texture-yuhui`);
$picker.onclick =... |
var store = require('./storage');
var utils = require('./utils');
var range = require('lodash-node/modern/arrays/range');
function localstorageprop(key, initialValue) {
return function() {
if (arguments.length) store.set(key, arguments[0]);
var ret = store.get(key);
return (ret !== null) ? ret : initialV... |
/*
Copyright 2020 Shadowv7
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
Modified by lxvongobsthndl (2021)
*/
const { EventEmitter } = require('events');
c... |
/*eslint no-console: ["error", { allow: ["warn", "error"] }] */
/**
* @description FEND Project 8 : Neighborhood
* @description main component
* @author <NAME>
* @version 1.0
*/
/* eslint-disable */
/**
* @description import React and router
*/
import React, { Component } from 'react';
import { BrowserRouter as ... |
import React, { useState } from "react"
import styled from "styled-components"
import Section from "../../styles/section"
import Button from "../../styles/button"
import { FaPhoneAlt, FaMapMarkerAlt, FaRegClock } from "react-icons/fa"
const Contact = () => {
const [status, setStatus] = useState("")
const submitFo... |
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 = Reflect.decorate(d... |
var Material = require('gl-scene-material')
var Shape = require('./lib/shape.js')
var Light = require('./lib/light.js')
var mat4 = require('gl-mat4')
var mat3 = require('gl-mat3')
var eye = require('eye-vector')
var normals = require('normals')
var glslify = require('glslify')
var distance = require('euclidean-distance... |
/// <amd-dependency path="esri/core/tsSupport/declareExtendsHelper" name="__extends" />
/// <amd-dependency path="esri/core/tsSupport/decorateHelper" name="__decorate" />
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Arr... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _express = _interopRequireDefault(require("express"));
var _orderModel = _interopRequireDefault(require("../models/orderModel"));
var _util = require("../util");
function _interopRequireDefault(obj) { re... |
#!/usr/bin/env node
require('@babel/register');
const path = require('path');
const fs = require('fs');
const app = require('express')();
const bodyParser = require('body-parser');
const upload = require('multer')();
const axios = require('axios');
const querystring = require('querystring');
const pathToRegexp = requi... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
import CreatableSelect from 'react-select/creatable';
import {
parametersOptions,
parametersValues,
suggestedTypes
} from "../../data/data";
const initialstate = {
name: '',
description: '',
suggestedType: 'execution',
message: null,
parameters: new Map(),
possibleParameterName: '',
possibleParamet... |
/* eslint-disable no-unused-vars */
const { create, Client } = require('@open-wa/wa-automate')
const { color, options } = require('./tools')
const { ind, eng } = require('./message/text/lang/')
const { loader } = require('./function')
const { version, bugs } = require('./package.json')
const msgHandler = require('./mes... |
/*
firemote.js https://github.com/firepick1/FirePick/wiki
Copyright (C) 2013 <NAME>, <<EMAIL>>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your ... |
import { color } from "d3-jetpack/build/d3v4+jetpack"
//Semi-global variables
let width = null
let height = null
let greatest = null
let keys = null
let $div = null
let columnData = null
const chartTitles = [
{id: "gender", title: "Gender spectrum of designers"},
{id: "ethnicity", title: "Ethnicity of designer... |
var postConnectDelaySeconds = 5;
var CLI = require('./libs/CLI');
var cli = new CLI();
var express = require('express');
var app = express();
var server = require('http').Server(app);
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie... |
import React, { Component } from "react";
import { Spinner } from "react-activity";
import "react-activity/dist/react-activity.css";
import { connect } from "react-redux";
import store from "store";
import { logInUser } from "../../actions/userAction";
import { Link } from "react-router-dom";
import { AppWrapper } from... |
/**
* utils.js
*
* Copyright (c) 2017 AppSite
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of 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
*
* h... |
/**
* Copyright 2015 IBM Corp. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... |
import React, { useState } from "react";
import "./style.css"
import 'reactjs-popup/dist/index.css';
import GridItem from "components/Grid/GridItem.js";
import GridContainer from "components/Grid/GridContainer.js";
import Button from "components/CustomButtons/Button.js";
import Card from "components/Card/Card.js";
impo... |
import React, { Component } from 'react'
import { tail } from 'lodash'
import fastdom from 'fastdom'
import { leading as throttle } from '../../../../../utils/throttle'
import { getBoxType, getReplyValue } from '../../../../../utils/replies-utils'
import { CloseButton } from '../../../components/CloseButton'
import { R... |
'use strict';
var fs = require('fs');
var path = require('path');
var semver = require('semver');
var colors = require('colors');
var wrench = require('wrench');
/**
* Flatten node_modules
*
* Get all package.json, find and delete duplicates
*
* @param {String} dir Directory name
* @param {Object} options Opt... |
'use strict';
var __createBinding =
(this && this.__createBinding) ||
(Object.create
? function (o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, {
enumerable: true,
get: function () {
return m[k];
},
});
}
: fu... |
import React from 'react'
import { Button, Form, Input, Col, Checkbox, Row } from 'antd'
import { error } from 'util'
import prettier from 'prettier/standalone'
import plugins from 'prettier/parser-typescript'
const FormItem = Form.Item
const { TextArea } = Input
const windowCheck = () => typeof window !== 'undefined... |
import Promise from 'bluebird';
import {Bot} from '../bot';
import {overrideProperties} from '../util/bot-helpers';
import {isMessage, normalizeResponse} from '../util/response';
import Queue from '../util/queue';
import {parseMessage} from './util/message-parser';
export class SlackBot extends Bot {
constructor(op... |
'use strict';
var gulp = require('gulp'),
fs = require('fs'),
path = require('path'),
clear = require('clear'),
del = require('del'),
compress = require('compression'),
sass = require('gulp-sass'),
replace = require('gulp-replace'),
fileInclude = require('gulp-file-include'),
rename = require('gulp-rename'),
... |
import React, { useState, useEffect } from 'react';
import styled, { css } from 'styled-components';
import PropTypes from 'prop-types';
import BaseInputText from '../BaseTextInput/BaseTextInput';
import '../../style/variables.css';
import IconCircleCross from '../icons/CircleCross/CircleCross';
const HasError = css`
... |
// -------------------------------------------------------------------------------------------------------
// simple resource center client for N4C
// Author: <EMAIL>
// Copyright (c) 2015.09
//
// Usage:
// var Center = require('./lib/ResourceCenter.js');
// var Distributed = require('./Distributed.js');
// var opt = ... |
const fs = require('fs');
const uuid = require('uuid');
const common = require('./common.js');
const http_help = require('./http_helper.js');
const query = require('./query.js');
// private
function space_payload_to_postgres(payload) {
return [
payload.space,
payload.stack_uuid,
payload.created,
payl... |
/*
* File: HomeMaticVariableAlarmAccessory.js
* Project: hap-homematic
* File Created: Thursday, 21st May 2020 5:18:55 pm
* Author: <NAME> (<EMAIL>)
* -----
* The MIT License (MIT)
*
* Copyright (c) <NAME> <<EMAIL>> (https://github.com/thkl)
*
* Permission is hereby granted, free of charge, to any person obta... |
var fields = document.getElementsByTagName("input");
var calculate_button = document.getElementById("calculate-button");
var reset_button = document.getElementById("reset-button");
var buttons = document.getElementsByTagName("button");
var display_box = document.getElementById("display-box");
var calculated = false;
f... |
var synth = window.speechSynthesis;
function speak(gentext){
var msg = new SpeechSynthesisUtterance(gentext);
synth.speak(msg);
}
function stop() {
console.log("should be stopping");
synth.cancel();
}
function submit_ajax_post (parsed_input) {
console.log("Submitted data is")
console.log... |
/*校验所有属性*/
function checkPropertyByType(elements, $scope) {
elements = typeof (elements) === 'string' ? JSON.parse(elements) : elements;
elements = elements.childShapes;
var msg = {}, result = null;
msg.result = true;
var check = function (obj, res) {
if (typeof res === 'object') {
... |
async function getUser(location) {
const url = location || '/user';
const headers = new Headers();
headers.set('accept', 'application/json');
try {
const res = await fetch(url, { credentials: 'include', headers });
return await res.json();
} catch (e) {
console.error('Response failed to decode to... |
var
os = require('os'),
fs = require('fs'),
stream = require('stream'),
Redis = require('redis-stream'),
uuid = require('uuid'),
lorem = require('lorem-ipsum'),
type = {
'string': 'SET',
'list': 'LPUSH',
'set': 'SADD',
'sorted': 'ZADD',
'hash': 'HMSET',
'lpush': 'LPUSH',
'sadd'... |
const request = require('request-promise-native')
const iconv = require('iconv-lite')
const cheerio = require('cheerio')
const fs = require('fs')
function grabDepartmentsByBody (body) {
const $ = cheerio.load(body)
let departments = {}
// get departments
for (let dept of $('select[name=new_dept] option').toAr... |
const express = require('express');
var fs = require('fs');
const app = require('express')();
const server = require('http').Server(app);
const cors = require('cors');
const bodyParser = require('body-parser');
const path = require('path');
const fetchToken = require('./routes/fetchToken');
const createABook = require(... |
import React, { Component } from 'react';
import {
Animated,
Dimensions,
FlatList,
StyleSheet,
Text,
TouchableWithoutFeedback,
ScrollView,
View,
} from 'react-native';
import { Actions } from 'react-native-router-flux';
import { OutlineButton } from '../common'
// import { connect } from 'react-redux';
... |
$(document).ready(function () {
if (location.host !== 'echarts.apache.org') {
var banner = document.getElementById('apache-banner');
if (banner) {
banner.style.display = 'block';
}
}
// close apache banner when found in cookie
var isClosedStr = Cookies.get('apache-banner-closed');
if (isCl... |
let root = document.getElementById('root')
function buildSkeleton(){
root.innerHTML=
`<div class="text-light" align="center">
<form onsubmit="return false">
<div class="form-group row col-md-6">
<label for="staticEmail" class="col-sm-2 col-form-label">Name</label>
... |
const inquirer = require("inquirer");
const mysql = require("mysql");
const figlet = require("figlet");
require("console.table");
let connection = mysql.createConnection({
host: "localhost",
// Your port; if not 3306
port: 3306,
// Your username
user: "root",
// Be sure to update with... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const chai_1 = tslib_1.__importDefault(require("chai"));
const chai_as_promised_1 = tslib_1.__importDefault(require("chai-as-promised"));
const stream_1 = require("stream");
const S3_1 = require("./S3");
chai_... |
// pages/loadEmail/loadEmail.js
var common = require("../../utils/comm.js");
var app = getApp();
Page({
data: {
ageArr: ['22'],
indexAge: 7,
indexSex: 0,
indexHeight: 79,
bodyHeight: [''],
sexPicker: ['男', '女'],
current:0,
musicPlay:app.globalData.musicPlay,
region:['北京市','北京市','东城... |
import root from 'window-or-global';
import _ from 'lodash';
import { DEFAULT_OPTIONS } from '../constants/index';
import get from 'lodash/get';
import _some from 'lodash/some';
export const CommonUtils = {
getScaleNumber(num, inMin, inMax, outMin, outMax) {
return ((num - inMin) * (outMax - outMin)) / (in... |
const response = {
"game": {
"id": "game-00fe20da-94ad-11ea-bb37",
"timeout": 500
},
"turn": 14,
"board": {
"height": 11,
"width": 11,
"food": [
{ "x": 5, "y": 5 },
{ "x": 9, "y": 0 },
{ "x": 2, "y": 6 }
],
"snakes": [
{
"id": "snake-508e96ac-94ad-11ea... |
import {LitElement, html, css} from 'lit-element';
import {repeat} from 'lit-html/directives/repeat';
import './finance-chart'
import './finance-list'
import '@vaadin/vaadin-text-field/vaadin-text-field';
import '@vaadin/vaadin-text-field/vaadin-number-field';
import '@vaadin/vaadin-radio-button/vaadin-radio-group';
im... |
var margin = {
top: 10,
left: 10,
bottom: 10,
right: 10
},
width = parseInt(d3.select('#villages').style('width')),
width = width - margin.left - margin.right,
mapRatio = 0.6,
height = width * mapRatio,
mapRatioAdjuster = 15; // adjust map ratio here without chang... |
//=require Markers/newmarker_map
//need to check adaptzoom
/*======variable global======*/
markers=[];
var mission_id=null;
$(document).ready(function(){
initializeMap();
initialScroll();
loadMission()
});
function getMissionId(){
return mission_id
}
function loadMission(){
$("#marker_missions_dropdown").e... |
//see (the name there are obsolete, but the flow is quite the same):
//https://docs.google.com/a/lightstreamer.com/drawings/d/1AUup89gqDhESi5j94gLsk7rS0T_FUSZ6hsbs1SCy_rM/edit?hl=en
import ServerConnection from "./ServerConnection";
import Inheritance from "../../src-tool/Inheritance";
import AjaxFrameHandler from "./... |
import React, { Component } from 'react'
import { Layout, Table, Space } from 'antd';
import { Breadcrumb, Row, Col, Button, Popconfirm, Spin, Badge, Tag } from 'antd';
import { getJobs, putJobStatus, deleteJob } from "../../../services/api.service";
import { Link } from "react-router-dom";
import Moment from 'moment';... |
import React from 'react'
import styled, { css } from 'styled-components'
import colors from '../Core/colors'
import { darken } from 'polished'
const LoadingWrapper = styled.div`
transition: all .4s;
${
props => props.active
? css`
opacity: 1;
visibility: visible;
`
: css`
opacity... |
'use strict';
const crypto = require('crypto');
const pug = require('pug');
const Cookies = require('cookies');
const moment = require('moment-timezone');
const util = require('./handler-util');
const Post = require('./post');
const trackingIdKey = 'tracking_id';
const oneTimeTokenMap = new Map(); // キーをユーザー名、値をトークンと... |
class CodingProject extends HyperHTMLElement {}
CodingProject.define('coding-project')
class CodingBox extends HyperHTMLElement {
static get observerdAtributes() {
return ['name']
}
created() {
this.classList = "dn fixed top-0 left-0 vh-100 w-100 near-white bg-dark-gray overflow-scroll"
... |
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { LightningElement, api, wire } from 'lwc';
import { getRecord, getFieldValue, updat... |
const consensus_need = 2
const consensus_total = 3
const consensus_threshold = consensus_need/consensus_total
// all p2p.sockets referenced here are verified nodes with a node_status
var consensus = {
validating: [],
finalizing: false,
possBlocks: [],
buffer: [],
onlineLeaders: () => {
// ... |
'use strict';
exports.__esModule = true;
var path = require('path');
var fs = require('fs');
var fileUtil = require('../util/file-util');
var j5require = fileUtil.json5Require;
var config_1 = require("./config");
var Print = require('../util/print');
var extend = require('node.extend');
config_1["default"].serverConfig... |
var x = 0, y = 1; // Constants
var socket = io({ path: window.location.pathname + 'socket.io' });
var buffer = []; // Buffer of drawing commands to send to server
// Object to hold mouse state
var mouse = {
down: false,
position: [],
downPosition: []
};
var colour, tool, size; // selected drawing colour,... |
import React from "react";
import { Link } from "react-router-dom";
import "./Sidebar.css";
import {
Drawer,
withStyles,
Toolbar,
List,
ListItem,
ListItemText,
ListItemIcon,
} from "@material-ui/core";
import SettingsIcon from "@material-ui/icons/Settings";
import HomeIcon from "@material-ui/icons/Home";
... |
import { ensureTextNode, isInputOrTextarea } from "./element";
import { handleComponentError } from "./error";
import { Latte } from "./latte";
const {
DOCUMENT_POSITION_FOLLOWING,
DOCUMENT_POSITION_PRECEDING
} = window.Node;
export let lastSelectionRange;
export function atEdge(elm, atEnd = false, only... |
// Include gulp
var gulp = require('gulp');
// Include plugins
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var useref = require('gulp-useref');
var gulpIf = require('gulp-if');
var imagemin = require('gulp-imagemin');
var cleanCSS = require('gulp-clean-css');
var rename = require('gulp-re... |
/** @jsx React.DOM */
$(document).ready(function() {
});
var Bs = window.ReactBootstrap;
var Nav = React.createClass({
render: function() {
return (
<Bs.Navbar inverse fixedTop>
<Bs.Navbar.Header>
<Bs.Navbar.Toggle />
<Bs.Navbar.Brand>
<a href="/">Produce 101 Stats... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Header = undefined;
var _isEmpty2 = require('lodash/isEmpty');
var _isEmpty3 = _interopRequireDefault(_isEmpty2);
var _pickBy2 = require('lodash/pickBy');
var _pickBy3 = _interopRequireDefault(_pickBy2);
var _createClass = func... |
function sketch(p) {
const populationSize = 300;
const lifespan = 5000;
let population,
target,
lifeP,
count = 0;
const mutationRate = 1;
const rx = 130;
const ry = 350;
const rw = 800;
const rh = 30;
function Random2D() {
const angle = Math.random() * p.TWO_PI;
const x = Math.sin... |
const express = require('express');
const router = express.Router();
const userModel = require('../models/user_model');
const commonMessage = require('../configs/common_messages.json');
const validator = require('../utilities/string_validator');
const md5 = require('md5');
const cors = require('cors');
router.post('/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.