text stringlengths 3.07k 16k |
|---|
// GENERAL
const SIZE_RANGE = ['l', 'm', 's', 'xs'];
const DEFAULT_SIZE = 'm';
// CALENDAR
const PREV_TRANSITION = 'prev';
const NEXT_TRANSITION = 'next';
const SELECTOR_YEAR_SET_NUMBER = 5;
const POINTER_ROTATE = 0;
const WEEK_NUMBER = 7;
const getDaysArray = (year, month) => {
let prevMonth;
let nextMonth;
... |
import React from 'react';
import PropTypes from 'prop-types';
import { TextField, Button } from '@material-ui/core';
import ConfirmDialog from '../../core/ConfirmDialog'
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/... |
"use strict";
const $Z = require("@zlanguage/zstdlib")
const matcher = require("@zlanguage/zstdlib/src/js/matcher");
const $eq = $Z.$eq;
const isObject = $Z.isObject;
const typeOf = $Z.typeOf;
const stone = $Z.stone;
const log = $Z.log;
const copy = $Z.copy;
const assertBool = $Z.assertBool;
const $plus = $Z.$plus;
c... |
import React, { useState } from "react";
import { makeStyles } from "@material-ui/core/styles";
import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
import Button from "@material-ui/core/Button";
import CssBaseline from "@material-ui/core/CssBaseline";
import useScrollTrigger ... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
'use strict';
const isBuffer = require('is-binary-buffer');
const utils = require('./utils');
/**
* Returns a formatted diff for binary or text files
*/
function diffFile(existing, proposed, options) {
let { ensureContents, exists, readChunk } = utils;
let opts = options || {};
let contentsA = existing.cont... |
const firebaseConfig = {
apiKey: "<KEY>",
authDomain: "capacity-tracker-80518.firebaseapp.com",
databaseURL: "https://capacity-tracker-80518-default-rtdb.firebaseio.com",
projectId: "capacity-tracker-80518",
storageBucket: "capacity-tracker-80518.appspot.com",
messagingSenderId: "189565903605",
appId: "1:... |
function forgetPwd(){
var params = {};
var step = $('#step').val();
params.modes = modes;
params.step = step;
params.loginName = $.trim($('#loginName').val());
params.Checkcode = $('#checkCode').val();
if(params.loginName==''){
WST.msg('请输入用户名','info');
WST.getVerify("#ver... |
"use strict"
const qr = require("ndarray-householder-qr")
const pool = require("ndarray-scratch")
const ops = require("ndarray-ops")
const mvp = require("ndarray-matrix-vector-product")
const inv = require("ndarray-inv")
const distributions = require("distributions")
const newModel = (coefficents,
f... |
var express = require('express');
var faker = require('faker');
var router = express.Router();
var Generic = require('../genericService');
var app, io;
// create a new Generic called generic
var generic = new Generic();
var schemaGeneric = generic.createInstance('Schema', {
name: { type: String, required: true, u... |
/**
* @adobe/react-spectrum-workflow (c) by Adobe
*
* @adobe/react-spectrum-workflow is licensed under a
* Creative Commons Attribution-NoDerivatives 4.0 International License.
*
* You should have received a copy of the license along with this
* work. If not, see <http://creativecommons.org/licenses/by-nd/4.0/>.
**/
... |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const help_app = {
handler: new helpAppUi.mojom.PageHandlerRemote()
};
// Set up a page handler to talk to the browser process.
helpAppUi.mojom.PageHan... |
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
const REF = firebase.database().ref('usuario')
const REF_GUITARRAS = firebase.database().ref('guitarras')
const STORAGE = firebase.storage()
// STORAGE.child('invie-acustica.png').getDownloadURL().then(function(url){
// console.log(url)
// })
let btnLogin = document.getElementById('btnLogin')
let btnLoginGoogle = do... |
import { ListView, List, Flex, Drawer } from "antd-mobile";
import NavBar from "../../components/NavBar";
import DasAuto from "../../img/das_auto.jpg";
import fute from "../../img/fute.jpg";
import { withRouter } from "react-router-dom";
import getParameterByName from "../../utils/getParam.js";
const { Item } = List;
... |
/**
* ------------------------------------------------------------------------------------------
* [COMPONENT]
* @function SideBar - Dropdown for region selection
*
*
* #HOW TO CALL:
* <SideBar onRegionChange
* onYearChange
* ... |
/**
* Push out alerts via Google Cloud Messaging
*/
var gcm = require('node-gcm');
var RSVP = require('rsvp');
var deviceDao = require('./deviceDao');
/**
* This sends a GCM message to the listed devices.
*
* @param devices - an array of registration IDs.
* @param message - correctly formatted GCM message to ... |
const provider = window.ethereum;
const BinanceSmartChainId = '0x38';
const tokenAddress = '0xcd619a8ec557adb00a7c818a5ac5dfbd9007d3ac';
const tokenSymbol = 'BEET';
const tokenDecimals = 8;
const tokenImage = 'https://i.imgur.com/tkuPlkt.png';
const tokenAddress1 = '0x23f07a1c03e7c6d0c88e0e05e79b6e3511073fd5';
const ... |
/*!
* (℠)
* # gulpfile for Bibi
*
*/
'use strict';
const gulp = require('gulp'), del = require('del'), fs = require('fs'), rename = require('gulp-rename'), zip = require('gulp-zip');
co... |
let fs = require("fs");
var options = {
key: fs.readFileSync('/home/ec2-user/yourdomain.key').toString(),
cert: fs.readFileSync('/home/ec2-user/ssl/4ea6dec34db20db8.crt').toString()
};
require('events').EventEmitter.defaultMaxListeners = Infinity;
let app = require('express')(),
express = require('express'),
serv... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { PostsDataShape, FiltersShape, AuthShape } from '../../data/propTypes'
import { Link } from 'react-router-dom'
import { Navbar as BsNavbar, Button, Container } from 'react-bootstrap'
import SearchForm from './SearchForm'
import SignInFo... |
var orientation;
window.addEventListener("orientationchange", function() { setOrientation(); }, false);
function setOrientation() { orientation = (window.innerHeight > window.innerWidth) ? 'portrait' : 'landscape'; }
function zeroPad(number) { return number.toString()[1] ? number : "0" + number; }
setOrientation();
... |
/*
* Marketplace specific configuration.
*
* Every filter needs to have following keys:
* - id: Unique id of the filter.
* - label: The default label of the filter.
* - type: String that represents one of the existing filter components:
* BookingDateRangeFilter, KeywordFilter, PriceFilter,
* ... |
import { positionString, randomNumber } from './utils';
import * as events from './events';
import * as actions from './actions';
import * as rules from './rules';
import Agent from './Agent.js';
import Leaf from './Leaf.js';
import Hole from './Hole.js';
const makePositionsIndex = (width, height) => {
const index... |
/* exported PlatformController, Player */
class PlatformController extends Component {
constructor(params, engine) {
super(params, engine);
this.maxVelocityY = 10;
this.gravity = 0.5;
}
params() {
return ["tilemap"];
}
getCoorners(x1, y1, width, height) {
return this.tilemap.getCoorners(x1, y1, width,... |
import React from "react";
import styled from "styled-components";
import Hotkeys from "react-hot-keys";
class Button extends React.Component {
state = {
animate: false,
hotkey: null
};
toggleAnimation = () => {
this.setState({ animate: true });
setTimeout(() => {
this.setState({ animate: ... |
import api from '../utils/api';
export const fetchInventories = () =>
api.query(
'SELECT Id, (select Id from OCE__SampleInventoryDetails__r) OCE__AssignedToUser__c, OCE__Auditor__c, OCE__Comments__c, CreatedById, CreatedDate, OCE__IntegrationID__c, format(OCE__InventoryDateTime__c), Name, RecordTypeId, RecordTyp... |
// bplate.js
/*-------------------------------------------------------------------------
Purpose: Finds the next token, delimited by chDelim. Returns index or -1.
*/
function _NextToken(sz, ichStart, chDelim)
{
var ich = ichStart;
var cch = sz.length;
while (ich < cch && sz.charAt(ich) ==... |
//specialized page for marking up the "Threaded" view of
//a SharePoint 2013 disucssion board, necessary
//this script is mated to the specialized Xsl
//and does not use the same rendering controls
//as the other list views
var remarQListName_LISTID_ = "_LISTGUID_";
var remarQFieldGuid_LISTID_ = "_FIELDGUID_";
var rem... |
$.post("https://www.googleapis.com/geolocation/v1/geolocate?key=<KEY>", {}, function (data) {
var lat, lng;
lat = parseFloat(JSON.stringify(data.location.lat));
lng = parseFloat(JSON.stringify(data.location.lng));
$("p.location").replaceWith('');
getWeather(lat, lng);
$.get("https://maps.googlea... |
import React, { Component } from 'react';
import { AppRegistry,StyleSheet, Text, TextInput,
TouchableOpacity, TouchableWithoutFeedback,
View, Image } from 'react-native';
import AccountMaintenance from './AccountMaintenance.js';
import { FormattedCurrency, FormattedNumber } from 'react-native-globalize';
import {... |
const csvLoad = require("../csv-load")
const checkDirectory = require("../check-directory")
require("dotenv").config()
const WebSocket = require("ws")
const enigma = require("enigma.js")
const schema = require("enigma.js/schemas/12.170.2.json")
const uuidv4 = require("uuid/v4")
const fs = require("fs")
const {
readD... |
//This package is used for blockchain event assertions.
const truffleAssert = require('truffle-assertions');
// Declare a variable and assign the compiled smart contract artifact
const FlightSuretyApp = artifacts.require("FlightSuretyApp");
const FlightSuretyData = artifacts.require("FlightSuretyData");
//instances o... |
/* Tangelo Framework Configuration, Tab Controls */
function getConfig() {
$.get("community/current")
.done( function(cfg) {
if (cfg && cfg.table) {
d3.select("#track-table").property("value", cfg.table);
$("#track-table").select2("val", cfg.table);
var userInitiated = false;
updateConfig(userInitia... |
var HTTP = require('http');
var URL = require('url');
var HTS = require('./lib/http-transaction-state.js');
var Q = require('./lib/asynch-queue.js');
var RULES = require('./lib/rules.js');
var RDB = require('./lib/rules-db.js');
module.exports = function(projectName, opts){
var proxyPort = opts.port ||... |
const http = require("http");
const http2 = require("http2");
const url = require("url");
const fs = require("fs");
const minify = require("html-minifier").minify;
const zlib = require("zlib");
let config = require("./Config.js");
const cache = [{
path: "",
content: fs.readFileSync(config.Site.FilePath, "utf8"),
c... |
/**
* External dependencies.
*/
import produce from 'immer';
import { withEffects } from 'refract-callbag';
import { map, pipe } from 'callbag-basics';
import { Component, createRef } from '@wordpress/element';
import { withState, compose } from '@wordpress/compose';
/**
* Internal dependencies.
*/
import './style... |
//
//Name: <NAME>, <EMAIL>
//Computer Science Department, UMass Lowell Comp.4610, GUI Programming I
//File: /usr/cs/2018/rdelosh/public_html/461f2017/hw5 Created: 12-Nov-2017
//Last updated by RD: 18-Nov-2017
//Built using ReactJS Library version 16.0.0
//
//I decided to use ReactJS for this assignment because I wanted... |
/*
En la tercera parte se trabaja con cadenas string, tendremos las propiedades(lenght) y los métodos.
Para mostrar los datos se usará un html, ya que no solo se usará la consola del navegador, que se usará también,
llamamos este script en el 3-tercero-js.html
*/
//-----------------------------------------... |
/* 2.1 Basic Data Types
Integer: basic numbers; 1 ,13, 10000;
Float: numbers with decimal point; 1.523, 0.232;
String: texts within quotation marks(""); "hello world"
*/
const a = 5;
const b = 2;
console.log(`${a} is ${b}`);
/* 2.2 Variables
console.log(argument) is the basic print function for console;
JS reads you... |
//posizione iniziale del blocco
var x = 0;
var y = 0;
//array posizioni
var array_x = [];
var array_y = [];
//aggiunge il primo blocco nella posizione selezionata
array_x.push(x);
array_y.push(y);
//posizione della mela
var mela_x;
var mela_y;
//canvas è l'oggetto canvas che viene preso dall'html e cont è il contesto ... |
import {
useState,
useEffect,
} from '@wordpress/element';
import {
useSelect,
} from '@wordpress/data';
import {
Button,
PanelBody
} from '@wordpress/components'
import apiFetch from '@wordpress/api-fetch';
import {
MediaUpload,
MediaUploadCheck,
InspectorControls,
} from '@wordpress/block-editor';
import I... |
import React, { useEffect, useMemo, useRef, useState } from 'react';
import T from 'prop-types';
import styled, { useTheme } from 'styled-components';
import { visuallyHidden, glsp, themeVal } from '@devseed-ui/theme-provider';
import { Button } from '@devseed-ui/button';
import {
Panel,
PanelHeader,
PanelTitle... |
import { Entity } from './entity';
import { toIso } from './utils';
import { WoodPile } from './wood-pile';
const WALK_SPEED = 2;
const GATHER_TIME = 200;
export class Man extends Entity {
set angle(angle) {
this._angle = angle;
if (!this.sprite) { return; }
this.sprite.setFrame(getFrameFromAngle(this.angle))... |
"use strict";
var crypto = require("crypto"),
stream = require("stream"),
url = require("url"),
util = require("util");
var clone = require("clone"),
enableStreaming = require("tilelive-streaming"),
lockingCache = require("locking-cache");
var CacheCollector = function(locker, makeKey) {
stream... |
/**
* This is the mapping from the NRRD datatype as written in the NRRD header
* to the JS typed array equivalent.
*/
const NRRD_TYPES_TO_TYPEDARRAY = {
"signed char": Int8Array,
"int8": Int8Array,
"int8_t": Int8Array,
"uchar": Uint8Array,
"unsigned char": Uint8Array,
"uint8": Uint8Array,
"uint8_t": Ui... |
// Node
const crypto = require('crypto')
// 3rd
const bcrypt = require('bcryptjs')
const assert = require('better-assert')
const debug = require('debug')('app:belt')
const Autolinker = require('autolinker')
const staticVars = require('./static')
// A dumping ground of common functions used around the app.
// As it get... |
const { Client } = require("discord.js");
const { DisTube } = require("distube");
const { SpotifyPlugin } = require("@distube/spotify");
const { SoundCloudPlugin } = require("@distube/soundcloud");
const { YtDlpPlugin } = require("@distube/yt-dlp")
const { initializeApp } = require("firebase/app");
const { readdirSync,... |
function tick() {
// on WASD or Arrows hold
if(game.keys[87] || game.keys[38]) { // north
game.facing = 'north'
movePlayer('north')
}
if(game.keys[68] || game.keys[39]) { // east
game.facing = 'east'
movePlayer('east')
}
if(game.keys[83] || game.keys[40]) { // sou... |
console.log('scripts are ready');
//code to change canvas background
var backgrounds = $('.mission_scenes');
var canvas = $('.scenes')[0];
for(i = 0; i < backgrounds.length; i++) {
backgrounds[i].addEventListener("click", function(event){
event.preventDefault();
src = this.src;
canvas.style.backgr... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
let _ = require('lodash');
let async = require('async');
let mustache = require('mustache');
const pip_services3_commons_node_1 = require("pip-services3-commons-node");
const pip_services3_components_node_1 = require("pip-services3-components-... |
import React from 'react';
import ReactMarkdown from 'react-markdown';
import renderers from '../resources/renderers';
import FormattingBar from './FormattingBar';
import axios from 'axios';
import querystring from 'querystring';
class Editor extends React.Component {
constructor(props) {
super(props);
this.state... |
/* eslint-disable indent */
/* eslint-disable no-nested-ternary */
import React, { useState, memo } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import Select from "react-select";
import chroma from "chroma-js";
// Taken from here:
// https://react-select.com/styles#provide... |
const fs = require('fs-extra')
const path = require('path')
const walk = require('walk')
const JSZIP = require('jszip')
const debug = require('@ff0000-ad-tech/debug')
let log = debug('cs-plugin-vendor-c20:packager')
/*
MONET:
- container_source >
- 1-build
- size, package.json, package-lock.json, common/
- packag... |
var Promise = require('bluebird')
var through = require('through')
var mongodb = require('mongodb')
var resourceError = require('resource-error')
var invoke = require('ninvoke')
var MongoDb = module.exports = function MongoDb (db) {
var self = this
this.db = Promise.resolve(db)
this.ready = this.db.then(function... |
var sampleList = [{start: 30, end: 150}, {start: 540, end: 600}, {start: 560, end: 620}, {start: 610, end: 670}];
//{9:30 am - 11:30 am}, {6:00 pm - 7:00 pm}, {6:20 pm - 7:20 pm}, {7:10 pm - 8:10 pm}
//var sampleList2 = [{start: 5, end: 20}, {start: 10, end: 50}, {start: 15, end: 20}, {start: 30, end: 4... |
import React, { Component } from "react";
import "antd-mobile/dist/antd-mobile.css";
import { Card } from "antd-mobile";
import RankCard from "../../components/rankcard";
import "./index.css";
import axios from "axios";
import { domain, formatNumber } from "../../config";
import CardFooter from "antd-mobile/lib/card/Ca... |
import React, { useEffect } from 'react';
import { ScrollView, StyleSheet, View } from 'react-native';
import { IconButton, Colors, ProgressBar, Modal, Portal, Title, Divider, Switch, TextInput, Button, Text, ActivityIndicator, Card } from 'react-native-paper';
import InputSpinner from "react-native-input-spinner";
imp... |
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, useIntl } from 'react-intl';
import { useQuery } from '@apollo/client';
import omit from 'lodash/omit';
import values from 'lodash/values';
import { stringify } from 'qs';
import { useApplicationContext } ... |
/**
* 保障房项目初始化
*/
var queryImport = {
id: "queryImportTable", //表格id
seItem: null, //选中的条目
table: null,
layerIndex: -1,
url:"",
secondLayerIndex:-1
};
/**
* 初始化表格的列
*/
queryImport.initColumn = function () {
return [
{field: 'selectItem', radio: false},
{title: 'ID', fie... |
/**
* class TodoView
*
* This class provide different way to view a TodoTxt object
* through the filter and sort functions.
*
* - You usually get the first TodoView object using todoTxt.getTodoView()
* - You can use filter and sort function to get todos of concern
* - The sort and filter functions return a n... |
//NPM Install
const fse = require('fs-extra');
//Importando arquivo site-model.js que possui a classe com as funções de consulta
const DB = require('./../listas/selects');
const mysql = require('mysql2');
const config = require('./../../database/config');
const conn = mysql.createConnection(config);
//Importando o mó... |
const Emotes = require("../../emotes.json");
const Remind = require("../../models/remind");
const Discord = require("discord.js");
const Logger = require("../../utils/other/winston");
const mongoose = require("mongoose");
const Validate = require("../../utils/helper/validate");
const parse = require("parse-duration");
... |
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var ButtonPanel = (function (_super) {
__extends(ButtonPanel, _super);
function ButtonPanel() ... |
var searchParams = new URLSearchParams(window.location.search);
var game = searchParams.get('game');
function join() { // Used to join a game
const ajax = new XMLHttpRequest();
ajax.onload = function() {
if (this.status == 200) {
window.location.reload()
} else {
JQerror(... |
/***************************************************************************************************************************************************************
*
* HELPER
*
* A helper file performing below tasks:
* - generating components/_all.yml file
* - checking integrity
*
*********************************... |
const express = require('express')
const router = express.Router()
const superagent = require('superagent')
require('superagent-charset')(superagent)
const _ = require('lodash')
const { encode_steamid, decode_steamid } = require('../../utils/dota')
const model = require('../../config/model')
const Dmatch = model.Dmat... |
var express = require('express');
var router = express.Router();
const knex = require('../../knex')
const boom = require('@hapi/boom')
const env = process.env.NODE_ENV || 'development'
const devId = Number(process.env.USER_ID)
router.get('/', function(req, res, next) {
let userId = ( env === 'development' ) ? req.co... |
/*!
* Copyright 2014 Apereo Foundation (AF) Licensed under the
* Educational Community 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://opensource.org/licenses/ECL-2.0
*
* Unless required by applicab... |
import React, { useState } from 'react';
import { useTheme } from '@mui/material/styles';
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import ToggleButton from '@mui/material/ToggleButton';
import Card from '@mui... |
const fs = require("fs");
const requestLib = require("request");
const _ = require("lodash");
const checkType = (typeSpec, arg) => {
if (_.isString(typeSpec)) {
// Special case: arrays
if (typeSpec === "array" && _.isArray(arg)) {
return null;
}
if (typeof arg !== typeSpec) {
return `Typ... |
let template = document.getElementById("code-question-template");
let template_container = document.getElementsByClassName("template-container")[0];
let test_cases = [];
let test_cases_solved = [];
let codeMirrors = [];
for (let idx = 0; idx < problems.length; idx++) {
let problem = problems[idx];
let clone =... |
/* eslint react/no-did-mount-set-state: 0 */
/* eslint react/prop-types: 0 */
/* eslint consistent-return: 0 */
import React from 'react';
import { connect } from 'react-redux';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import * as turnosActions from '../../../actions/turnosActions';
import s fr... |
import BaseElement from '../../BaseElement';
import { prepareBitrateOption, selectBitrate, doesBitrateIndexExist } from './bitrate';
import { expandQualityMapping, prepareResolutionMapping, prepareResolutionOption, selectResolution } from './resolution';
import { STORAGE_BITRATE_INDEX_NAME } from '../../Constants';
c... |
var urlStack = [
"https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?valcode=USD&date=",
"https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?valcode=EUR&date=",
"https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?valcode=CHF&date="
],
ratesEurDol = [],
ratesChfEur = [],
date,... |
const promisify = require('util').promisify
require('autolink-js')
const logger = require('lib/logger')('youtube:info')
const utils = require('lib/utils')
const ytapi = require('lib/model/youtube/youtube.api')
module.exports = {
handle: "youtube::info",
needs: ["database"],
init: stumble => {
const player = stum... |
// OpenShift sample Node application
var express = require('express'),
app = express(),
morgan = require('morgan'),
bodyParser = require('body-parser')
User = require('./model/User'),
FDHandler = require('./handler/AuthHandler'),
JWTUTils = require ("./lib/JWTUtils.js");
var ... |
import React, { useState, useEffect } from "react";
import MaterialTable from "material-table";
import ReactHtmlParser from "react-html-parser";
import firebase from "firebase/app";
import "firebase/firestore";
import RenderBadge from "../../components/RenderBadge";
import ButtonToFormEmail from "../../components/B... |
const join = require('path').join
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const MiniCssExtractPlugin = require("mini-css-ex... |
const $ = require('jquery-browserify');
const resl = require('resl');
const regl = require('regl')({
extensions: ['OES_texture_float'],
// TODO: FIXME: dunno why we need this here, we do not read non-uint8 data from screen,
// but it fails without this on gh-pages for some reason.
attributes: {preserveDrawingB... |
var fontawesomePath = "/resources/fontawesome/css/all.css";
var movement = {"dir":"down", "y":0, "type":""};
window.addEventListener("load", function(){
var elements = document.querySelectorAll(".item-list .moveable .bars");
elements.forEach(function(elem){
elem.addEventListener("dragstart", function(){start... |
import React, { PropTypes, Component } from 'react';
import { findDOMNode } from 'react-dom';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { browserHistory, withRouter } from 'react-router';
import _ from 'underscore';
import { HotKeys } from 'react-hotkeys';
import Document... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
var color_1 = require("../common/color");
var page_scroll_1 = require("../mixins/page-scroll");
var indexList = function () {
var indexList = [];
var charCodeOfA = 'A'.charCodeAt(0);
... |
/**
* Copyright 2021 The AMP HTML Authors. 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 ... |
import { combineReducers } from 'redux';
import d3 from 'd3';
import shortid from 'shortid';
import charts, { chart } from '../chart/chartReducer';
import * as actions from './actions';
import { getParam } from '../modules/utils';
import { alterInArr, removeFromArr } from '../reduxUtils';
import { applyDefaultFormData... |
"use strict";
/// <reference path="../../typings/main.d.ts" />
var ts = require("typescript");
// https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
function escapeTypescriptPropertyName(str) {
return isValidTypescriptIdentifier(str) ? str : JSON.stringify(str);
}
exports.escapeTypescriptPro... |
// Copied from components/places/tests/unit/head_bookmarks.js
const NS_APP_USER_PROFILE_50_DIR = "ProfD";
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
// Various functions common to the tests.
const LoginTest = {
/*
* initStorage
*
*/
initStorage : func... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import RepeatPicker from "../../components/exercises/RepeatPicker";
import { updateMoments } from "../../store/actions/firebaseActions";
import { Header, Container } from "../../components/common";
impor... |
/*
Copyright 2010-2012 OCAD University
Copyright 2010-2012 <NAME>
Licensed under the Educational Community License (ECL), Version 2.0 or the New
BSD license. You may not use this file except in compliance with one these
Licenses.
You may obtain a copy of the ECL 2.0 License and BSD License at
https://github.com/fluid... |
/**
* Hangout chatイベント受信。
* https://developers.google.com/hangouts/chat/reference/message-formats/events#event_fields
* @param {Object} event
*/
function onMessage(event) {
if (!event.message.argumentText)
return;
//TODO: 将来的に、Dialogflowで連続した会話を成立させるセッションID。
var sessionId = (event.message.thread ? even... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import _get from 'lodash/get'
import _map from 'lodash/map'
import _merge from 'lodash/merge'
import _cloneDeep from 'lodash/cloneDeep'
import { FormattedMessage } from 'react-intl'
import { TaskReviewStatus ... |
import {MetricsPanelCtrl} from 'grafana/app/plugins/sdk';
import _ from 'grafana/lodash';
import * as d3 from 'grafana/d3';
import {flamegraph as d3_flameGraph} from "d3-flame-graph";
import './css/d3-flamegraph.css';
import './css/flame-graph-panel.css';
const panelDefaults = {
mapping: {
signatureFieldName: ... |
/*
* Copyright 2019, GeoSolutions Sas.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
import {Observable} from 'rxjs';
import uuid from 'uuid';
import {findKey} from 'lodash';
import {
loadMedia,
... |
/* eslint-disable prefer-template */
'use strict';
const Funnel = require('broccoli-funnel');
const MergeTrees = require('broccoli-merge-trees');
const path = require('path');
const chalk = require('chalk');
const Handlebars = require('handlebars');
const stripIndent = require('strip-indent');
const writeFile = requi... |
import React, { useState } from 'react';
import { useTransition, animated } from 'react-spring';
import useTranslation from 'next-translate/useTranslation';
import rankTop10 from '../../public/images/ranks/rank_top10.png';
import rankDiamond from '../../public/images/ranks/rank_diamond.png';
import rankPlatinium from ... |
import { Apis } from 'idacjs-ws';
import fs from 'fs';
import os from 'os';
import cron from 'cron';
import _ from 'lodash';
import path from 'path';
let all_lock = 0;
let date_lock_str = '';
let base_path = process.cwd() + '/.tmp/holdrank'; // 存放路径
let date_path = base_path + '/txt_date.txt'; // 记录的日期以及冻结总量
let info_... |
const fetch = require('node-fetch')
const querystring = require('querystring')
const ECODE = {
AURH: 1,
API: 2,
NETWOEK: 3,
RUNTIME: 4
}
const API_HOST = 'https://mediacps.meituan.com'
const actUrl =
'https://market.waimai.meituan.com/gd/single.html?el_biz=waimai&el_page=gundam.loader&gundam_id=2KAWnD&cpsMe... |
import * as CommonUtils from './lambda-common-utils-ES5.js';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import * as AWS from 'aws-sdk';
var CONFIG = null;
var LOGGER = null;
var LAMBDA_CLIENT = null;
exports.renderer = function(event, context) {
try {
handle(event, context);
}
... |
"use strict";
import { DateTime } from "luxon";
// keyfunc is applied to each object before comparing.
export function arrmin(arr, keyfunc) {
if (keyfunc == undefined) {
keyfunc = d=>d;
}
return arr.reduce((a, b)=>{
// return the smaller object
return keyfunc(a) > keyfunc(b) ? b : a;
})
}
// keyfunc is appl... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.