text stringlengths 3.22k 29.5k |
|---|
import { defineMessages } from 'react-intl';
import { formati18n } from 'client/common/i18n/helpers';
import globalMessages from 'client/common/root.i18n';
import moduleMessages from '../message.i18n';
const messages = defineMessages({
shipNo: {
id: 'transport.dispatch.ship.no',
defaultMessage: '运输编号',
},
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import axios from 'axios';
import { Button } from 'antd';
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
import { api_url } from '../../../../config/config';
import { error_handler } from '../../../../utils/e... |
function partStartWithZero(num, strlen) {
let zeros = '';
while (zeros.length < strlen) {
zeros += '0';
}
return (zeros + num).slice(-strlen);
}
function genNumber(begin, end, strlen) {
let nums = [];
while (begin <= end) {
nums.push(partStartWithZero(begin, strlen));
begin++;
}
return nums... |
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __extends = (this && this.__extends) || (function () {
var extendStat... |
import React, { useState, useEffect, Suspense, useRef } from "react";
import { Canvas, useFrame } from "@react-three/fiber";
import { OrbitControls, Loader, Stars, useTexture, useGLTF, Plane, Text as TextImpl } from "@react-three/drei";
import { useLazyQuery, gql } from "@apollo/client";
import { DoubleSide, MeshPhongM... |
var KEY_ENTER = 13,
KEY_LEFT = 37,
KEY_UP = 38,
KEY_RIGHT = 39,
KEY_DOWN = 40,
canvas = null,
ctx = null,
lastPress = null,
pause = true,
x = 50,
y = 50,
player = null,
puerta = null,
diana = null,
puntos = 0,
record = 0,
numPuertas = 0,
dir = 1,
puntosNuevos = 0,
xPuntos=0,
yPuntos=0,
g... |
const token = $('meta[name="_csrf"]').attr('content');
const header = $('meta[name="_csrf_header"]').attr('content');
// Film table's search functionality.
function search() {
const filter = document.getElementById('filmSearch').value.toUpperCase();
const trs = document.getElementById('filmTable').getElementsByTag... |
import { withDirectives as _withDirectives, vShow as _vShow, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
import { ref, watch, computed, nextTick, reactive, defineComponent } from 'vue'; // Utils
import { extend, isObject, isMobile, truthProp, createNamespace } from '../utils'; // C... |
// Core
import React, { Component, Fragment, createRef, ErrorMessage } from "react";
import cx from "classnames";
import { getUniqueID } from "../../../instruments";
import {
Icon,
Button,
Radio,
DatePicker,
Upload,
Checkbox,
Select,
Form,
Input,
Steps
} from "antd";
// Core
import { api } from ".... |
const inquirer = require("inquirer");
const mysql2 = require("mysql2");
const cTable = require("console.table");
const Database = require("./async-db");
const connection = new Database({
host: 'localhost',
port: 3306,
user: 'root',
password: '<PASSWORD>',
database: 'employee_trackerDB'
});
// S... |
var SOUTH = 0;
var SOUTH_EAST = 1;
var EAST = 2;
var NORTH_EAST = 3;
var NORTH = 4;
var NORTH_WEST = 5;
var WEST = 6;
var SOUTH_WEST = 7;
var DIRECTIONS = [];
DIRECTIONS[SOUTH] = { walkSpriteFlip: 1, defaultWalkSpriteSuffix: "-s-walk.png" }, // 0: SOUTH
DIRECTIONS[SOUTH_EAST] = { walkSpriteFlip: 1, defa... |
import React, { useEffect, useState } from 'react';
import { func, object } from 'prop-types';
import styled from 'styled-components';
import { Formula } from 'logically';
import { Icon } from '@blueprintjs/core';
import { IconNames } from '@blueprintjs/icons';
import { CITED_LINES_COUNT, DEDUCTION_RULES } from 'logica... |
const fetch = require('node-fetch');
const { URL, URLSearchParams } = require('url');
const { quantileSorted } = require('d3');
const middlewares = {};
const headers = {
'x-rapidapi-key': '<KEY>',
'x-rapidapi-host': 'zillow-com1.p.rapidapi.com',
useQueryString: true,
};
const calcMortgage = (price, int, down =... |
'use strict'
// Instrument the @elastic/elasticsearch module.
//
// This uses to 'request' and 'response' events from the Client (documented at
// https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html)
// to hook into all ES server interactions.
//
// Limitations:
// - In @elas... |
'use strict';
const extra = require('../../extra');
class RTCRtpTransceiver
{
constructor(mid, kind)
{
// MID value.
this._mid = mid;
// Media kind.
this._kind = kind;
// Peer's capabilities.
this._capabilities = null;
// Transport instance.
this._transport = null;
// RtpReceiver instance.
t... |
var URL='';
var btns;
function $(id) {
return document.getElementById(id);
}
function get_cookie_edit(url,cookie_name){
var cookie_r;
chrome.cookies.getAll({name:cookie_name}, function(cookies) {
if (cookies.length == 0)
return;
for (var i = 0; i < cookies.length ; i++) {
... |
let choice1 = document.getElementById("1");
let choice2 = document.getElementById("2");
let choice3 = document.getElementById("3");
let choice4 = document.getElementById("4");
let counter = document.getElementById("count");
let start = document.getElementById("start");
let choices = document.getElementById("choices");
... |
var path = require('path');
var fs = require('fs-extra'); // Node.js: extra methods for the fs object: https://github.com/jprichardson/node-fs-extra
var UPLOAD_FOLDER = path.normalize(__dirname+'/../../.tmp/uploads');
var csv = require('csv');
var extend = require('node.extend');
module.exports = {
/*
* Remove ... |
import {META} from "../Helix";
import {Matrix4x4} from "../math/Matrix4x4";
import {BoundingAABB} from "../scene/BoundingAABB";
import {MaterialPass} from "../material/MaterialPass";
import {CascadeShadowCasterCollector} from "./CascadeShadowCasterCollector";
import {OrthographicOffCenterCamera} from "../camera/Orthogr... |
// JavaScript Document
var myArr4 = new Array(1,2,3,4);
var myArr8 = new Array(1,2,3,4,5,6,7,8);
var myArr1 = new Array();
var myArr2 = new Array();
var recStr = new Array();
var recStrn = 0;
var onPlay = 0;
var onPause = 0;
var valSpeed = parseInt($("input[name='speed'][type='range']").val());
var curren... |
/* eslint-disable react/prop-types */
import React, { useEffect, useState } from 'react';
import { alpha, makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import { Grid, Button } from '@material-ui/core';
import IconButton from... |
var gbitable, StoreTopIssueTable;
var BtnSelected = 'Details', TopIssueLocationNameSelected = 'Store';
var serverTime = new Date();
$(document).ready(function()
{
$('#loading').show();
$('#gbiTable thead tr:eq(0) th').each( function () {
var title = $(this).text();
$(this).html( '<input type="... |
//Define variables
var test = [{
question: "Who hides eggs on a Sunday?",
choices: ["Br'er Rabbit", "Bugs Bunny", "The Easter Bunny", "The White Rabbit"],
answer: "The Easter Bunny",
image: "../TriviaGame/assets/images/easter_bunny.jpg"
},
{
question: "He's late for a very important date",
choic... |
var SPEEDUP = 1.0;
var RECORDING = Config.recording;
var RECORDING_SECONDS = Config.recordingDuration;
// Layout constants, chord table
var CHORD_TABLE_X_START = 1060;
var CHORD_TABLE_WIDTH = 620;
var CHORD_WIDGET_WIDTH = 70;
var CHORD_TABLE_Y_START = 50;
var CHORD_TABLE_Y_SPACING = 74;
var NUMERAL_Y_SPACING = 86;
... |
//The following annoys the user with some stupid cookie warning.
function getCookie(cname) {
var name = cname + '=';
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1);
if (c.indexOf(name) == 0) retu... |
/*!
* JavaScript Cookie v2.1.1
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 <NAME> & <NAME>
* Released under the MIT license
*/
;(function (factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory();... |
function deleteAllTattles_byFilter(appfilter) {
var callback = function(resp) {
hideMainView();
getfilters();
getTattleList(getActiveFilter());
};
var thedata = {
o: "deleteAllTattles_byFilter",
appfilter:appfilter,
};
serverPOSTrequest(thedata, callback);
}
// DONE
function setCurrentFilter(newfilt... |
/**
************ BLUE ROUTER - Roter powered by Bluebird promises. **************
* Basic synatx:
* const br = require('blue-router');
* var context = {uri: '/register/john?x=abc&y=123'};
* var route = '/register/:name';
* br(context).when(route).then().catch();
*/
/*For browser side scripting include <script ... |
/**
* `asg-shop-card-details`
*
* events:
* use this event to fix a blip in the exit ripple on safari
* the underlying element should update its background-color
* with the color passed in event detail
* 'asg-shop-card-details-ios-flicker-fix-on-close', {color}
*
* use this ... |
"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... |
const fs = require("fs");
const path = require("path");
const HierarchyBuilder = require("../index").HierarchyBuilder;
const CodeWriter = require("../index").CodeWriter;
const HtmlParser = require("../index").HtmlParser;
const JavascriptCodeWriter = require("../index").JavascriptCodeWriter;
const CSharpCodeWriter = req... |
import React from 'react';
import BibleVerse from '../utils/BibleVerse';
function WhatWeBelieve(props) {
return (
<div>
<h2>Our Beliefs</h2>
<div id="contentRight">
<h3>The Bible</h3>
<ol type="1">
<li>Both the Old and New Testament Scriptures are verbally inspired by God, i... |
import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
import {
Editor,
EditorState,
ContentState,
RichUtils,
convertToRaw,
convertFromRaw,
getDefaultKeyBinding,
KeyBindingUtil
} from 'draft-js';
import {Overlay} from 'react-overlays';
import Toolbox from './RichTextEditorT... |
import React, { useState, useEffect, useRef } from 'react'
import styled from 'styled-components'
import Link from 'next/link'
import KEY_CODES from '@/helpers/keycodes'
import { useAuth } from '@/helpers/auth'
import useOnClickOutside from '@/hooks/useOnClickOutside'
const StyledMenu = styled.div`
display: none;
... |
if (document.readyState == 'loading') {
document.addEventListener('DOMContentLoaded', ready);
} else {
ready();
}
function ready() {
fetchItems();
updateCartTotal();
UpdateDate();
var cancelButtons = document.getElementsByClassName('btn-cancelDelivery');
for (var i = 0; i < cancelButtons.length; i++) {
var c... |
/*
Render sheet music staves
*/
// Initialize VexFlow for drawing music notation
VF = Vex.Flow;
// Create VexFlow SVG rendering context
function initContext(id, staveWidth) {
var canvas = document.getElementById(id);
var renderer = new VF.Renderer(canvas, 3);
var renderWidth = staveWidth * 2.1;
var renderHeig... |
var vertexShaderText =
[
'precision mediump float;',
' ',
'attribute vec3 vertPosition;',
'attribute vec3 vertColor;',
'varying vec3 fragColor;',
'attribute vec2 vertTextCoord;',
'varying vec2 fragTextCoord;',
'uniform mat4 m_world;',
'uniform mat4 m_view;',
'uniform mat4 m_proj;',
' ',
'void main()',
'{',
' fragTex... |
let db;
const API_URL = 'https://itacate.herokuapp.com/api/v1';
// state for user changing weight and/or volume
let isCustomWeight = false;
let isCustomVolume = false;
window.onload = function () {
this.loadDatabase();
productsWeight.onclick = (() => {
if (!isCustomWeight) {
const optionMo... |
"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... |
//copy to clipboard function
const copyDivToClipboard = () => {
var range = document.createRange();
range.selectNode(document.getElementById("fieldWithResult"));
window.getSelection().removeAllRanges(); // clear current selection
window.getSelection().addRange(range); // to select text
document.execCommand("c... |
import {math} from "../../../math/math.js";
const screenPos = math.vec4();
const viewPos = math.vec4();
const tempVec3a = math.vec3();
const tempVec3b = math.vec3();
const tempVec3c = math.vec3();
const tempVec4a = math.vec4();
const tempVec4b = math.vec4();
const tempVec4c = math.vec4();
/**
* @private
*/
class ... |
import axios from 'axios'
import React from 'react'
import Head from 'next/head'
import Link from 'next/link'
import { Label, Image, Button, Form, Input, TextArea } from 'semantic-ui-react'
class RoseViaGRLC extends React.Component {
state = {
checkedTxid: false,
checkingTxid: false,
buyingRose: false,... |
// **This module contains the request handlers for all the spatial data requests
// (requests for X-Y, i.e., map data).** These request handlers respond to
// requests on the `xy.json` API endpoint.
// Load dependencies
var core = require('../core').core;
var numeric = require('numeric');
var _ = require('underscore')... |
#!/usr/bin/env node
"use strict";
var rJson = require("r-json"),
Logger = require("bug-killer"),
wJson = require("w-json"),
PackageJson = require("package.json"),
Semver = require("semver"),
spawno = require("spawno"),
spawnNpm = require("spawn-npm"),
Tilda = require("tilda"),
pp = re... |
'use babel';
import { CompositeDisposable, Disposable } from 'atom'
const { remote } = require('electron')
const fs = require('fs')
const ViewNavbar = require('./views/Navbar')
const ViewWebview = require('./views/Webview')
import {
CONFIG_AUTO_DEVTOOLS,
CONFIG_AUTO_PREFIX,
CONFIG_EMITTER_ENABLED,
CONFIG_R... |
import React, { useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import { Button, CircularProgress, Collapse, FormControl, IconButton, InputLabel, MenuItem, Paper, Select, Table, TableBody, TableCell, TableHead, TableRow, TextField } from '@material-ui/core'
import { Add, PlusOne, Search, Docum, In... |
var keypress = require('keypress');
const chalk = require('chalk');
var interval;
var inimigos = []
const frameRate = 30
var colunas = 40
var linhas = 30
var lives = 3
var gameOver = false
var points = 0;
var enemySpeed = 1;
var enemyStart = 0;
var enemyGoRight = true;
var time = new Date()
var enemyShots = []
cons... |
const weatherKey= "e62f0a32a5023939f11ced97627f515c";
const locationKey= "<KEY>";
let storageList = [];
let cityInput = document.getElementById('city-name');
let saveBtn = document.getElementById('submit');
let searches = document.getElementById('saved-searches');
let main = document.getElementById('display-weather');... |
/* eslint-disable */
import React, {Component} from 'react';
import {graphql, compose} from 'react-apollo';
import gql from 'graphql-tag';
import {withRouter, Redirect} from 'react-router-dom'
import SuggestStep from './SuggestStep.js'
import goalescrow from '../../abi/GoalEscrow.json'
import tokensystem from '../../ab... |
/*
Copyright 2016 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... |
const fs = require('fs');
const config = require('./config');
const lib = require('./lib');
let APP = {};
/**
* Starts to aggregate the medication data
* @param {Object} app an object containing the fhir server url and the data output file path
* @param {String} fhirVersion the FHIR version of the server
*/
functi... |
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
/* Layout */
import Layout from '@/layout'
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
*
* hidden: true ... |
'use strict';
var gulp = require('gulp'),
debug = require('gulp-debug'),
filter = require('gulp-filter'),
replace = require('gulp-replace'),
ccompiler = require('gulp-closure-compiler'),
gjslint = require('gulp-gjslint'),
bump = require('gulp-bump'),
del = require('del'),
calcdeps = req... |
//Variable definitions
//Variables for defining HTML
//Timer variables
var countdownTimer = document.querySelector(".countdownTimer");
var startGame = document.querySelector(".startGame");
var viewHS = document.querySelector(".viewHS");
//Define global variables
var questionCount = 0;
var count = 75;
var score = 0;
v... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
import React, {useEffect} from "react";
import {NavLink, useNavigate} from "react-router-dom";
import {Helmet} from "react-helmet-async";
import {
Alert as MuiAlert,
Breadcrumbs,
Button,
Checkbox,
Divider as MuiDivider,
FormControl,
FormControlLabel,
FormGroup,
FormHelperText,
Fo... |
//REDUX Giỏ hàng//////
//Khai bao initstate
const initialState = JSON.parse(localStorage.getItem('cart_list')) || []
const countCart = document.querySelector('.action__box.cart .action__box--cart-icon .count--item-cart span')
countCart.textContent = initialState.length
//reducer
const cartReducer = (state = initial... |
if (typeof actor_dot_js === 'undefined') {
throw new Error('actor.js is missing..');
}
if (typeof db_skill === 'undefined') {
throw new Error('db_skill.js is missing..');
}
if (typeof global_dot_js === 'undefined') {
throw new Error('global.js is missing..');
}
if (typeof template_options_dot_js === 'und... |
/**
*@author borey
*@date 2016/1/25
*@QQ 475773037
*/
var sX, sY, sZ, lX, lY, lZ, lUpdate;
sX = sY = sZ = lX = lY = lZ = lUpdate = 0;
var mDir = 1;
var mSwiper;
var isOpen;
var Timer;
var isOver;
var mPer = 0;
var StartTime = 0;
var GamePer;
var GameScore = 0;
var GameCount = 0;
var bagLength = 20;
var bagInfo = {
... |
/**
* @함수명: onLoad
* @작성일: 2014. 09. 29.
* @작성자:
* @설명: 로딩 및 Event
* @param
*/
var displyTrtPg = 1;
$(document).ready(function(){
fnGetDisPlayTrtSearchComboBox();
fnGetDisPlayTrtCstmrGroupList();
fnGetDiaryTrtItemList(displyTrtPg);
$("#diplySearchBtn20105").click(function(){
fnGetDiaryTrtItem... |
// Copyright 2016 <NAME>. 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 applicable la... |
const left = document.querySelector(".left");
const right = document.querySelector(".right");
const player = document.querySelector(".player");
const score = document.querySelector(".score");
const menu = document.querySelector(".menu");
const lastScore = document.querySelector(".last-score");
const highScore = documen... |
'use strict';
const {requiret, fabrics } = require(__dirname + '/../templators/requiret.js');
const {Schema_from_swagger, require_yaml} = requiret('swagger2-schema');
const {from_file} = requiret('from_file');
// console.log( new from_file('./jws/1_public.key') );
//const {all_non_undefined} = require('./error-chec... |
import notify from "toastr";
import {getUserInfo} from "../_user/netlify";
const textPosition = require("dom-anchor-text-position");
const textQuote = require("dom-anchor-text-quote");
const wrapRange = require("wrap-range-text");
//const uuid = require("uuid/v4");
import { v4 as uuid } from 'uuid';
import {getUserI... |
/**
* Copyright 2016 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
//
// Imports
//
var util;
try {
util = require('util')
} catch (e) {
util = require('sys')
}
if (!jasmineNode) {
var jasmineNode = {};
}
//
// Helpers
//
function noop() {
}
jasmineNode.ANSIColors = {
pass: function () {
return '\033[32m';
}, // Green
fail: function () {
retu... |
import React, {
Component,
} from 'react';
import {
View,
Text,
Image,
ScrollView,
TouchableOpacity,
TextInput,
} from 'react-native';
import {splash as styles, palette, icon, composer} from '../styles/styles.js'
import { Form,Separator,InputField } from 'react-native-form-generator';
import Icon fro... |
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" :... |
const connection = new signalR.HubConnectionBuilder()
.withUrl("/visualizerhub")
.build();
connection.start().catch(err => console.error(err.toString()));
var charts = {};
// This pseudo-object is possibly the most important in the file. It contains
// header information, all data points, a function to ret... |
import React,{Component} from "react"
import {
View,
Text,
ImageBackground,
LayoutAnimation,
TouchableHighlight
} from 'react-native';
import CalculateIndex from "./calculateIndex"
import CalculateIndeks from './calculateIndex';
import AsyncStorage from '@react-native-community/async-storage';
export def... |
/////////////////////////////////////////////////////////////////////
// Copyright (c) Autodesk, Inc. All rights reserved
// Written by Forge Partner Development
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided tha... |
import React, { useState, useEffect } from 'react';
import { useHistory, useLocation } from "react-router-dom";
import { Auth, API, graphqlOperation } from 'aws-amplify';
import { makeStyles, withStyles } from '@material-ui/core/styles';
import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@mate... |
let main = {}
main.PATCH_API_URL_ = 'https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}'
main.TOAST_FADE_OUT_DURATION_MS = 3000
main.SHOW_EVENTS_DELAY_MS = 100
main.init = () => {
moment.lang('ja')
main.installButtonClickHandlers()
main.showLoginMessageIfNotAuthenticated()
main.lis... |
import * as config_import from "../config.js";
import init, * as wasm from "../pkg/etopaw.js";
let valid_login = false;
export let online = false;
export function username() {
return localStorage.getItem("username");
}
export function token() {
return localStorage.getItem("token");
}
export function storage... |
/* eslint-disable no-console */
// app to be initialized
let app;
let callsContainer = {
port: 0,
calls: [],
recording: false
};
let dynamics = [];
let smtpEmails = [];
class ExcelServer {
constructor({ files, port }, { apiSpec, validateRequests, validateResponses }) {
this.files = files;
... |
'use strict';
/* background.js handles communication with the server application. */
/* Identifies the Crunchyroll tab and keeps useful information under its tabId (socket, roomId) */
const tabsInfo = {};
loadStyles();
/* Searching through, I don't actually think this regex is used for anything.
* It may be safe to... |
'use strict';
/**
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
/**
* Copyright 2009 Google Inc.
*
* Licensed under the Apache Licens... |
"use strict";
/**
* @license
* Copyright 2018 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... |
/**#ES6 file to be converted into an ES5 file
Our babel build/watch scripts in the package.json
will convert this into ES5 and put it into the hosted folder.
**/
/**TODO
* Add Scores To UI, display on right side of screen
* Add rules/how to play
* fix layout of elements, it's kind of janky right now
* Add ... |
import React, { Component } from 'react';
import { withStyles } from '@material-ui/core/styles';
import Radio from '@material-ui/core/Radio';
import RadioGroup from '@material-ui/core/RadioGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import { Line } from 'react-chartjs-2';
import moment... |
import autoprefixer from 'autoprefixer'
import config from './config'
import loaders from './webpack.loaders'
import plugins from './webpack.plugins'
import glob from 'glob'
import fs from 'fs'
import colors from 'colors'
import _ from 'lodash'
import chokidar from 'chokidar'
import debounce from 'debounce'
colors.set... |
let _url = require("url");
let rssParser = require("rss-parser");
let { promisify } = require("util");
let stream = require("stream");
let path = require("path");
let fs = require("fs");
let got = require("got");
let { logError, logErrorAndExit } = require("./validate");
let pipeline = promisify(stream.pipeline);
let... |
import Transaction from '../models/transaction';
import Setting from '../models/setting';
import User from '../models/user';
import sanitizeHtml from 'sanitize-html';
import * as btc from '../util/btc';
import * as eth from '../util/eth';
import * as usdt from '../util/usdt';
export function getTransacitonFee(req, res... |
var formidable = require('formidable');
var parse = require('csv-parse/lib/sync');
var path = require('path');
var fs = require('fs');
var rimraf = require('rimraf');
var EmailService = require('./email.service');
module.exports = {
sendEmails: function(req, res){
/*{
template: '',
cs... |
/*
* AdminHome
*/
import React, { Component, PropTypes } from 'react';
import { change, reset } from 'redux-form';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import _ from 'lodash';
import StatsBox from '../../components/StatsBox';
import ExpandableSection from '../.... |
import React, { Component } from "react";
import { connect } from "dva";
import {
Modal, Button, Form, message, AutoComplete, Input, TreeSelect, Tree, Select, Row, Col, } from "antd";
import ColFormItem from "components/ColFormItem";
import * as routerRedux from "react-router-redux";
import styles from "../../s... |
const { defaultsDeep } = require('@weave-js/utils');
const TransportBase = require('../adapteBase');
const Swim = require('./discovery/index');
const MessageTypes = require('../../messageTypes');
const TCPReader = require('./tcpReader');
const TCPWriter = require('./tcpWriter');
const { createMessage } = require('../.... |
import {EsriJSON, GeoJSON} from 'ol/format'
// import { WKT } from 'ol/format' // I suppose this is theoretically a way to read PostGIS data?
// import { TopoJSON } from 'ol/format' // Topology JSON supports Microsoft PowerBI
import jsonp from 'jsonp' // jsonp avoids CORS problems
import proj4 from 'proj4'
import {re... |
let lastUrl = location.href;
new MutationObserver(() => {
const url = location.href;
if (url !== lastUrl) {
lastUrl = url;
onUrlChange();
}
}).observe(document, {subtree: true, childList: true});
// Rerun init if url changed
function onUrlChange() {
init();
}
let GLOBAL_SCOPE = "luma";
... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
import styled from 'styled-components';
import { HashLink } from 'react-router-hash-link';
export default function PortfolioImage(props) {
const {
src,
alt,
title,
description,
id,
content,
open,
setOpen,
closed,
setClosed,
index,
selectedItem,
setSelectedItem,
... |
const http = require('http');
const app = http.createServer((req, res)=>{ console.log("[log] Starting http."); });
app.listen(7777);
const readline = require('readline');
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
class slog {
static log(message, uid = "") {
let d... |
/**
*
* Copyright 2016-present reading
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... |
// HTML templating!
// TODO: make sure that we also include iterator return (not yield) values, if they exist.
import {aarray} from './utils.js';
import {document, window} from './deps.js';
ADD_A_DEFAULT_CONTENT_SECURITY_POLICY: {
if (!document) {
break ADD_A_DEFAULT_CONTENT_SECURITY_POLICY;
}
// The HTM... |
// 負責寫資料(師傅,人數,房號,姓名,電話)到global state
import { translate } from 'react-i18next';
import LoadingAnimation from "../LoadingAnimation";
import Button from "./Button";
import SendNumBtn from './SendNumBtn'
const Col = ReactBootstrap.Col,
FormGroup = ReactBootstrap.FormGroup,
FormControl = ReactBootstrap.FormContro... |
/* globals __DEV__ */
import Phaser from 'phaser'
import Chuckles from '../sprites/Chuckles'
import Ball from '../sprites/Ball'
import {dist, getRandomInt} from '../utils'
import plot from '../plot'
const STORY_DELAY = 4000
const EASY_MODE = true
const BALL_DELAY = 3000
export default class extends Phaser.State {
i... |
var destination = "0xadff6699b5eece3f4e6d476ea8e427d386841002";
var balance1 = 0;
var lastDonationCharity = null;
var network = "api";
var apiKey = "<KEY>";
//console.log(balance1);
function getResult(address) {
var result = null;
var scriptUrl = "https://" + network + ".etherscan.io/api?module=account&action=b... |
/* jshint esversion: 6 */
import {
output,
guiUtils,
map
}
from "../libgui/modules.js";
import {
Circle,
circles,
intersections,
basic
} from './modules.js';
// polygons with more corners will be circles
Intersection.maxCorners = 16;
/**
* intersection between circles, making a definite... |
/**
* Main module to deal with contact integrations
* @module js-contact
* @todo Make the keyStore optional
* @todo How to deal with token renewal ?
* @requires module:js-api-client
* @requires module:js-mapper
* @requires module:js-integration
* @example
* // INITIALIZATION
*
* const botmatic_contact = requ... |
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import zipObject from 'lodash.zipobject'
import pickBy from 'lodash.pickby'
import { Link } from './Links'
import { Button, Text } from '@artsy/palette' // TODO
import { colors } from './Layout'
import GeneInput from './... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.