text stringlengths 3.07k 16k |
|---|
const handleIregularLayer = require('./handleIregularLayer');
/**
* 计算导出图层
*/
const calculateExportLayer = (data, exportLayerList) => {
for (let i = 0; i < data.layers.length; i++) {
let layer = data.layers[i];
handleIregularLayer(layer, data, exportLayerList);
if ((layer._class == 'symb... |
"use strict";
import utils from "../../helpers/utils";
import Chart from "../Chart";
import Tween from "../../helpers/tween";
import { defaultConfig, contextConfig, mergeConfig } from "../config/index";
/**
* @desc Text,文本图形
*/
class Text extends Chart {
/**
* @desc Text 构造函数
* @param {ChartCollector} chart... |
/**
* Runs 10k samples against a Redis server to collect some stats.
* License: Apache 2.0
*/
const redis = require("redis");
let host = '127.0.0.1';
let port = 6379;
//parse optional arguments
if (process.argv.length > 2) {
let redisURL = process.argv[2].split(":");
host = redisURL[0];
if (redis[1] !=... |
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
import moment from 'moment';
import { Modal, Button } from 'react-bootstrap';
import {
Box,
Button as MuiButton,
Avatar,
Card,
CardCont... |
import { login, logout, getInfo, refreshToken } from '@/api/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
import router, { resetRouter } from '@/router'
const state = {
token: window.localStorage.Token,
name: '',
avatar: '',
introduction: '',
roles: [],
tokenExpire: window.localStora... |
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Swipe from 'react-easy-swipe';
import clsx from 'clsx';
const IDLE = 'idle';
const VERTICAL = 'vertical';
const HORIZONTAL = 'horizontal';
const SlideOutMenu = ({
isOpen,
closeCallback,
cl... |
//data structure to store the info about the questions
var quiz = [
{question:"Which is the deepest lake in US?",
options:["Lake Michigan","Crater Lake","Lake Tahoe","Lake Clark"],
answer:"Crater Lake"},
{question:"Which is the largest state in US?",
options:["Alaska","California","New Mexico","Ariz... |
//global vars
var admin_url = '';
var current_url = '';
$(function() {
$(document).ready(function(){
// To open url in the same tab
$('body').on('click', '.dashboard_urls', function(){
var href = $(this).attr("href");
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
var ... |
import React from 'react';
import { uuid } from '@vuu-ui/utils';
import { getProp, getProps, nextStep, resetPath, typeOf } from '../utils';
import { ComponentRegistry } from '../registry/ComponentRegistry';
import {
createFlexbox,
createPlaceHolder,
getFlexStyle,
getIntrinsicSize,
wrapIntrinsicSizeComponentWi... |
class GraphInfo {
constructor(graph, setting) {
this._nodeByIds = {};
this.setting = setting ? setting : {};
this.setting.useDirection = (this.setting.useDirection) ? this.setting.useDirection : false;
this.init(graph);
}
init(graph) {
for (let node of graph.nodes) {
this._nodeByIds[nod... |
"use strict";
var config = {};
try {
config = require("../config.json");
} catch (error) {
console.log("missing config file, applying defaults");
}
const cache = require("./cache");
const techniqueGetter = require("./technique-getter");
const utils = require("./utils");
exports.FreeFormTechniques = class {
/*... |
var this_js_script = $('script[src*=appescuela]');
var my_var_1 = this_js_script.attr('data-my_var_1');
if (typeof my_var_1 === "undefined") {
var my_var_1 = 'some_default_value';
}
Vue.config.devtools = true
Vue.component('modal',{ //modal
template:`
<transition name="modal">
<div class="modal-ma... |
// JS for game
var myGamePiece; //Εδω εχουμε την δημιουργια μεταβλητης για το πιονι μας
var myObstacles = []; //Εδω εχουμε την δημιουργια μεταβλητης για τα εμποδια
var myScore; //Εδω εχουμε την δημιουργια μεταβλητης για το score
function startGame() {
myGamePiece = new component(45, 45, "black", 50, 250);
... |
import React, { useState } from 'react';
import { GoogleMap, useLoadScript, Marker, InfoWindow, BicyclingLayer } from '@react-google-maps/api';
import useFetch from "../helpers/useFetch";
import mapStyles from '../fixtures/mapStyles';
import iconGreen from '../fixtures/icon-location-green.png';
import iconRed from '../... |
// Requirements
const mqtt = require('mqtt')
const logging = require('homeautomation-js-lib/logging.js')
const _ = require('lodash')
const health = require('homeautomation-js-lib/health.js')
const Lifx = require('node-lifx-lan')
const mqtt_helpers = require('homeautomation-js-lib/mqtt_helpers.js')
const interval = requ... |
var rocky = require('rocky');
var switch1 = true ;
function fractionToRadian(fraction) {
return fraction * 2 * Math.PI;
}
function drawHand(ctx, cx, cy, angle, length, width) {
// Find the end points
var x2 = cx + Math.sin(angle) * length;
var y2 = cy - Math.cos(angle) * length;
// Configure how we want t... |
function hapus(id) {
$.ajax({
url: base_url + "Dashboard/hapus_penyakit",
type: "POST",
data: {
id: id,
},
dataType: "json",
success: function (data) {
swal("Berhasil", "Data Penyakit Berhasil Di hapus", "success");
reload_table(datatabel);
},
});
}
function editdata(id_penyakit) {
$.ajax({
... |
/**
* Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author <NAME> <<EMAIL>>
* @author <NAME> <<EMAIL>>
*/
import { Vec3 } from '../../linear-algebra';
import { OrderedSet } from '../../../mol-data/int';
import { Sphere3D } from './sphere3d';
function B... |
$(function() {
$("#dataGrid")
.dataGrid(
{
url : baseUrl
+ 'qc/wmsqcinspectionitem/listHasInspected',
datatype : "json",
colNames : [ 'id', '批次', '料号', '物料描述',
'库位', '仓库号', '可改判数量', '质检改判', '单位', '供应商代码',
'供应商名称', '工厂', '收货时间' ,'紧急物料','收货单号', '行项目'],
searchForm :... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {createTimer, editTimer, saveTimer} from '../../actions/timerActions';
import {View, Text, StyleSheet, TouchableWithoutFeedback, TouchableOpacity, FlatList, TextInput, Alert} from 'react-native';
imp... |
'use strict';
// Globals go here
const clock = document.getElementById('dateAndTime');
const form = document.querySelector('form');
const displayTrip = document.getElementById('displayCountdown');
const navBar = document.getElementById('mainNav');
const destinationHeader = document.getElementById('destinationHeader');... |
function parseExpression(program) {
program = skipSpace(program);
let match, expr;
if (match = /^"([^"]*)"/.exec(program)) {
expr = {type: "value", value: match[1]};
} else if (match = /^\d+\b/.exec(program)) {
expr = {type: "value", value: Number(match[0])};
} else if (match = /^[^\s(),#"]+/.exec(pro... |
import React, { useCallback, useMemo } from 'react';
import VirtualList from 'react-tiny-virtual-list';
import classNames from 'classnames';
import { emptyFn, getMonthsForYear, isRange, chunk } from '../utils';
import {
startOfMonth,
endOfMonth,
format,
isAfter,
isBefore,
isWithinRange,
isSameMonth,
par... |
/*
* Repository to communicate with an attachment server. The server should be implemented according to ArcGis server attachment services specifications.
* In addition to the ArcGis specification the server may support optional features if configured with format='origo'
*/
import getAttributes from '../getattribute... |
const { commandList, Constants, TokenImageList } = require('./resources.js');
const { MessageEmbed } = require('discord.js');
const { getTokenList, getAVAXValue } = require('./graph.js');
const https = require('https');
const loki = require("lokijs");
const lodash = require('lodash');
var database = new loki('database... |
import React, { Component } from 'react';
import { Button, Card, CardBody, CardFooter, Col, Container,Alert, Form, Input, InputGroup, InputGroupAddon, InputGroupText, Row } from 'reactstrap';
class Register extends Component {
constructor(props){
super(props);
this.state = {
Username:'',
user_emai... |
import React, { Component } from 'react';
import { Auth, API, graphqlOperation } from 'aws-amplify';
import { Link } from 'react-router-dom';
import {
Container, Row, Col, Image, ListGroup, ListGroupItem, Table,
} from 'react-bootstrap';
import PropTypes from 'prop-types';
import * as customMutations from '../customG... |
import React, {useState, useContext} from 'react'
import styled from 'styled-components'
import Img from 'gatsby-image'
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'
import {faExternalLinkAlt, faInfoCircle } from '@fortawesome/free-solid-svg-icons'
import {faGithub} from '@fortawesome/free-brands-svg-i... |
/**
* Author: feixy
* Date: 2019-06-25
* Time: 10:23
*/
import React, { Fragment } from 'react';
import { connect } from 'dva';
import {
Card,
Form,
Spin,
Divider,
Row,
Col,
Input,
Button,
Icon,
Tag,
Modal,
message,
} from 'antd';
import moment from 'moment';
import PageHeaderWrapper from '@... |
function get_range_multiplier(gun, atts){
if (get_gun_option(gun, 'range_percent_enabled')){
return get_gun_option(gun, 'range_percent') / 100.0;
}
var range_multiplier = 1;
for (var i=0;i < atts.length;i++){
range_multiplier *= atts[i].modifiers.range_mod;
}
return range_multiplier;
}
func... |
/**
* Copyright 2000-2021 Nokia
*
* Licensed under the Apache License 2.0
* SPDX-License-Identifier: Apache-2.0
*
*/
import React, { Component } from "react";
import DataGrid from "@nokia-csf-uxr/csfWidgets/DataGrid";
import deleteicon from "@nokia-csf-uxr/csfWidgets/images/ic_delete.svg";
import StatefulSearchw... |
import React from 'react';
import { Table, Button, Select, Divider, Modal, message } from 'antd';
import * as api from '../../api';
import './substation.scss';
import utils from '../../utils';
const kPageSize = 8;
const areaList = utils.getAreaList();
const { Option } = Select;
class Substation extends React.Compone... |
import Ajv from 'ajv';
import schema from './schema.json';
export const PROV_NS = 'http://www.w3.org/ns/prov#';
// export only to test.
export function _makeCwlInput(name, steps, extras, isReference) {
const id = name;
const source = [{
name,
for_file: id,
}];
if (steps) {
if (steps.length > 1) {... |
import {
store,
component,
componentVoid,
elementOpen,
elementClose,
elementVoid,
text
} from "wabi"
import Assets from "../../actions/Assets"
import ContextMenu from "../../actions/ContextMenu"
import Word from "../Word"
const Directory = component({
state: {
value: null,
open: false,
selected: false,
... |
import * as TYPE from 'consts/actionTypes';
import store, { observeStore } from 'store';
import rpc from 'lib/rpc';
import { apiPost } from 'lib/tritiumApi';
import { isCoreConnected, isLoggedIn } from 'selectors';
import { loadAccounts } from 'lib/user';
import { showNotification, openModal } from 'lib/ui';
import { u... |
import React from "react"
import { Link } from "gatsby"
import { makeStyles } from "@material-ui/core/styles"
import CssBaseline from "@material-ui/core/CssBaseline"
import Paper from "@material-ui/core/Paper"
import Typography from "@material-ui/core/Typography"
import Grid from "@material-ui/core/Grid"
import Card fr... |
let marked = require('marked')
let idx = 0;
function escape(text) {
return text.replace(/&/g,'&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
}
function card(title, text, link) {
let shortened = text.split('#');
let md = marked('###' + shortened[1]);
return `<card${idx}
... |
import React from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import logo from '../images/skillcamp_logo.svg'
import MenuIcon from './MenuIcon'
const HeaderWrapper = styled.div`
width: 100vw;
position: fixed;
top: 0;
background: ${props =>
props.atTop && props.isHome
... |
// 모듈을 추출합니다.
var http = require('http');
var express = require('express');
var _ = require('underscore');
// 변수를 선언합니다.
var books = [{
id: 1,
name: '모던 웹 디자인을 위한 HTML5 + CSS3 입문',
author: '윤인성',
publisher: '한빛미디어',
isbn: '9788979149555',
page: '600'
}, {
id: 2,
name: '모던 웹을 위한... |
var bsicons = ['glyphicon glyphicon-asterisk',
'glyphicon glyphicon-plus',
'glyphicon glyphicon-minus',
'glyphicon glyphicon-euro',
'glyphicon glyphicon-cloud',
'glyphicon glyphicon-envelope',
'glyphicon glyphicon-pencil',
'glyphicon glyphicon-glass',
'glyphicon glyphicon-music',
'g... |
const BaseCommand = require('../../utils/structures/BaseCommand');
const { play } = require('../../utils/functions/music');
const playlist = require('../../utils/functions/playlist');
const emojiFinder = require('../../utils/functions/emoji');
const ytdl = require("ytdl-core");
const ytsearch = require('yt-search');
... |
var startgame = document.getElementById("startgame");
var restartgame = document.getElementById("restartgame");
var allcards = document.getElementById("allcards");
var cardplay = document.getElementsByClassName("cardplay");
var timerstart = document.getElementById("timerstart");
var textbuttonstart = document.getElemen... |
'use strict'
const ServerRequest = require('../server-request')
const {ExponentialMovingAverage: ExpMovAverage} = require('../ema');
// seconds to ms
const secondsToMs = m => m * 1000;
//
// keep basic accounting for server requests.
//
class Accounting extends ServerRequest {
constructor (opts = {}) {
super(... |
import React, { useEffect, useState } from "react";
import styles from "./property-filter.module.scss";
import RoofSVG from "../RoofSVG";
import TiltableContainer from "../TiltableContainer";
const PropertyFilter = ({ data, filters, setFilters }) => {
const [filterungArray, setFilterungArray] = useState([]);
cons... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Config_1 = require("./Config");
var RequestError_1 = require("./RequestError");
var Cell_1 = require("./Cell");
/**
* The board is represented as an array of rows, from top to bottom, left to
* right.
*/
var Board = /** @class */ (funct... |
'use strict';
const { assert, expect } = require('chai');
const { stub } = require('sinon');
const { PACKAGE_JSON, RESOURCES_PATH } = require('../../../src/utils/constants-backend');
const proxyquire = require('proxyquire');
describe('scenario-provider', () => {
describe('#scenarioGenerator', () => {
let write... |
import * as Msal from 'msal'
// TODO: CHANGE THIS TO REFLECT YOUR APP REGISTRATION AND AAD B2C TENANT:
let clientId = 'd03fc97e-cc4e-4758-944a-43fe4cf3eecc'
let authorityForSignin = 'https://xstofb2c.b2clogin.com/xstofb2c.onmicrosoft.com/b2c_1_susi'
console.log('setting msal redirect uri to:')
console.log(`${window.l... |
var DEFAULT_DELAY = 100;
function getPaletteSize(palette) {
return 3 * Math.pow(2, 1 + bitToInt(palette.slice(5, 8)));
}
function getBitArray(num) {
var bits = [];
for (var i = 7; i >= 0; i--) {
bits.push(num & (1 << i) ? 1 : 0);
}
return bits;
}
function getDuration(duration) {
return (duration / ... |
import {
Container,
Text,
Box,
Heading,
Icon,
Flex,
HStack,
} from '@chakra-ui/react';
import { motion } from 'framer-motion';
import Navbar from '../components/navbar';
import { navHeight } from '../globalVars';
import Timeline from './timeline';
import { ChevronDownIcon } from '@chakra-ui/icons';
import... |
// {
// [years, months, weeks, days, hours, minutes, seconds, milliseconds]
// [year, month, week, day, hour, minute, second, millisecond]
// [y, mo, w, d, h, m, s, ms]
// }
// milliseconds|seconds|minutes|hours|days|weeks|months|years|millisecond|second|minute|hour|day|week|month|year|ms|mo|m|s|h|d|y|w... |
/**
* Resolver methods for resolving local dependencies.
*/
var co = require('co');
var path = require('path');
var fs = require('graceful-fs');
var remotes = require('component-remotes');
var validate = require('component-validator');
var debug = require('debug')('component-resolver:locals');
var Resolver = requi... |
/**
* Created by <NAME> on 2015/1/6.
*/
var handlerMgr = require("./../handlerMgr");
var consts = require("../../../util/consts");
var pomelo = require('pomelo');
var util = require('../../../util/util');
var rival_vs_title_json = require('../../../../config/rival_vs_title');
var log4js = require('log4js');... |
//////////////////////////////////////////////////
// WATS1020 Dom Manipulation
// Custom script goes here.
//////////////////////////////////////////////////
// toDo:
// make storages longterm - local storage
// PASSWORD VALIDATION IN HTML
// GET SUBMIT TO WORK TO SHOW TOOLTIP ERROR
// GET HAMBURGER BUTTON TO FUNCTI... |
/*
* by <NAME>
*/
/*
next things to do:
1. default moderation commands
2.
*/
const Discord = require('discord.js');
const fs = require('fs');
const path = require('path');
class CommandCategory {
commands = [];
constructor(name, description, dir) {
this.name = name;
this.description = description;
th... |
'use strict';
var fs = require('fs');
var angular = require('camunda-bpm-sdk-js/vendor/angular');
var Viewer = require('dmn-js/lib/NavigatedViewer');
var Modeler = require('dmn-js/lib/Modeler');
var changeDmnNamespace = require('../../util/change-dmn-namespace');
var template = fs.readFileSync(__dirname + '/cam-widget... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
import store from '~/store'
import axios from 'axios'
import BackendService from "~/services/backend-service"
const backendService = new BackendService()
const appSettings = require('tns-core-modules/application-settings')
var log = true
// if (TNS_ENV === 'production') log = false
const state = {
moquiToken: '',
... |
/** @jsxImportSource @emotion/react */
import { css } from "@emotion/react";
import { observable, action } from "mobx";
import { observer } from "mobx-react";
import { get, or, pipe } from "rubico";
import { isEmpty } from "rubico/x";
import validate from "validate.js";
import modal from "mdlean/lib/modal";
import Asyn... |
/* Start register-modal.blade.php */
$(".toggle-password").on('click', function() {
$(".password_img").toggleClass("d-none");
$(".password_img1").toggleClass("d-block");
$(this).toggleClass("fa-eye fa-eye-slash");
var input = $("#password");
if (input.attr("type") === "password") {
input.att... |
export let midiOutput;
export * from "./fire_raw/controlbank_led.js";
export { TransportControls } from "./fire_controls/transport.js";
export { ButtonCode } from "./fire_controls/buttons.js";
import { PadControls } from "./fire_controls/pads.js";
import { clearAll } from "./fire_controls/device.js";
import { OledScree... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
const tslib = require('tslib');
const utils = require('@graphql-tools/utils/es5');
const path = require('path');
const fs = r... |
'use strict';
import React, {Component} from 'react';
import {StyleSheet, Text, View, PixelRatio, Dimensions, TouchableOpacity, ListView} from 'react-native';
import moment from 'moment';
class CalendarHeader extends Component {
render() {
const week = ['日', '一', '二', '三', '四', '五', '六']
return (... |
const assert = require('chai').assert;
const pegjs = require('pegjs');
const smartlexer = require('../../smartlexer.js');
const fs = require("fs");
const path = require("path")
describe('PEG.js Grammer Python', function () {
it('Should parse Python', function () {
var dName = __dirname;
dName = dName.... |
/* <NAME>ain Portfolio site's JavaScript - 2018*/
/* Author: <NAME>, https://ajmalhussain.in */
function whichAnimationEvent(){
var t, el = document.createElement("fakeelement");
var animations = {
"animation" : "animationend",
"OAnimation" : "oAnimationEnd",
"MozAnimation" : "animationend"... |
const canvas = document.querySelector('canvas');
const ctx = canvas.getContext('2d');
canvas.width = 900;
canvas.height = 500;
const cw = canvas.width;
const ch = canvas.height;
const tableColor = "#222222";
// linia środkowa
const lineWidth = 4;
const lineHeight = 10;
const lineSpace = 5;
const lineColor = "#444444... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
"use strict";
var commandExecutor_1 = require("./commandExecutor");
var errorHelper_1 = require("./error/errorHelper");
var log_1 = require("./log/log");
var logHelper_1 = re... |
/**
*
* WalletConnector
*
*/
import React from 'react';
import { Button, Input, Modal, ModalBody, Alert, ModalHeader, Label, Spinner } from 'reactstrap';
import mtmsk from 'assets/img/pay/logo_metamask.png';
import ldger from 'assets/img/pay/ledger-logo.png';
import trzr from 'assets/img/pay/trezor-logo.png';
impo... |
//ToDo: Comment everything
const consoleOn = false;
const startParagraphTag = "<p>";
const endParagraphTag = "</p>";
let startSpanTag = "";
const endSpanTag = "</span>";
let commonWordsCounter = 0;
let cenitexWordsCounter = 0;
let notCommonWordsCounter = 0;
let isCommon = true;
let isCenitex = true;
let whereIs = "";
... |
import angular from "/ui/web_modules/angular.js";
import uiBootstrap from "/ui/web_modules/angular-ui-bootstrap.js";
import {format} from "/ui/web_modules/d3-format.js";
import _ from "/ui/web_modules/lodash.js";
import mnPromiseHelper from "/ui/app/components/mn_promise_helper.js";
import mnHelper from "/ui/app/compo... |
"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 React from 'react';
import PropTypes from 'prop-types';
import { Row, Col } from 'react-flexbox-grid';
import Layout from '../../Layout';
import BreadCrumb from '../../../../components/AdminLayout/components/BreadCrumb';
import Box from '../../../../components/AdminLayout/components/Box';
import styles from './s... |
'use strict';
/**
* @file Unit tests for the multipart streamer
*
* @author <NAME> <<EMAIL>>
* @copyright Copyright (C) 2017 <NAME>
* @license Apache-2.0
*
* 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 cop... |
import React, {useState, useEffect} from "react";
import { useTranslation } from 'react-i18next';
import { useAuth } from '../../context/AuthContext';
import { makeStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableContainer from '@material-ui/core/TableContainer';
impor... |
/**
* ATTheme.
*
* This file adds gulp tasks to the Wordpress custom theme.
*
* @author <NAME>
*/
// Variables
var themename = '',
root = '../' + themename + '/';
// Dependencies
var args = require('yargs').argv,
autoprefixer= require('autoprefixer'),
babel = require("gulp-bab... |
'use strict';
class Cell {
constructor(num, x, y, a, b) {
this.num = num;
this.cheker = 'null';
this.x = x;
this.y = y;
this.a = a;
this.b = b;
}
}
class ChekArr {
constructor(arr, drawMeth, listener) {
this.arr = arr;
this.zone = [];
this.drawing = drawMeth;
this.cell = ... |
/**
* Created by VitorMaGo on 15/12/2016.
*/
import React, { Component, PropTypes } from 'react';
import { browserHistory } from 'react-router';
import {connect} from 'react-redux';
import ImgStripe from '../components/ImgStripe';
import IdStripe from '../components/IdStripe';
import PlayStripe from '../components/P... |
import classnames from 'classnames/bind';
import path from 'path';
import _ from 'lodash';
import { Link } from 'dva/router';
import { connect } from 'dva';
import { getSetting } from '../../utils/getSetting';
import { Avatar, Chart, Progress, Lang } from '../';
import { options } from '../../data';
import style from '... |
/* eslint no-var: "off", vars-on-top: "off", curly: "off", no-extend-native: "off" */
// String.startsWith() polyfill
if (!String.prototype.startsWith) {
String.prototype.startsWith = function (searchString, position) {
position = position || 0;
return this.substr(position, searchString.length) === searchStr... |
/* Expose global ShiftKeyDown */
var ShiftKeyDown = false;
var EscKeyUp = false;
function watchingSpecialKeys(){
$(document).on('keyup keydown', function(e){
ShiftKeyDown = e.shiftKey
if (Block.current){
if (ShiftKeyDown) $(Block.current.div).find('.block-signals').addClass('shiftKey')
... |
var
fs = require('fs'),
path = require('path'),
extend = require('extend'),
Promise = require('bluebird'),
SystemJSBuilder = require('systemjs-builder'),
JSPMBuilder = require('jspm').Builder,
BUILDERS = {
systemjs: SystemJSBuilder,
jspm: JSPMBuilder
},
DEFAULTS = {
builder: 'systemjs',
config: nul... |
import React from 'react'
import {
getLang,
getPrefixLang,
splitLang
} from '../../selectors/lang'
import {
ButtonBase,
IconButton,
Tooltip,
Typography,
withStyles
} from '@material-ui/core'
import { useActiveOptions, useUiStore } from '../../hooks'
import {
getGapDemographics,
isGapDemographic
} fr... |
const fs = require('fs')
const path = require('path')
const globby = require('globby')
const portfinder = require('portfinder-sync')
const queryString = require('query-string')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackHard... |
import { useState, useRef, useEffect, useCallback } from 'react';
import classNames from 'classnames';
import styles from './index.module.css';
import VideoScreen from './components/VideoScreen';
import VideoControls from './components/VideoControls';
import SubtitleScreen from './components/SubtitleScreen';
functio... |
import { WIN_COMBINATIONS, checkOccupied, checkDraw, findWinner } from "./utils.js";
import { computeHardComputerMove } from "./hard.js";
import { computeEasyComputerMove, visited } from "./easy.js";
// Elements containing the game board, difficulty, player token options
const gameBoard = document.querySelector(".x_o_... |
'use strict';
const R = require('ramda');
const url = require('url');
const request = require('./utils/request');
const { BASE_URL } = require('./constants');
const { processFullDetailApps, checkFinished } = require('./utils/processPages');
const scriptData = require('./utils/scriptData');
/*
* Make the first search... |
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 ... |
import * as fs from 'fs';
import { promisify } from 'util';
const copy = promisify( fs.copyFile )
const mkdir = promisify( fs.mkdir )
const readdir = promisify( fs.readdir )
const rmdir = promisify( fs.rmdir )
const stat = promisify( fs.stat )
const unlink = promisify( fs.unlink )
const utimes =... |
'use strict';
var userObjArray = [];
var userQuery = document.getElementById('userQuestion');
var eightBall = document.getElementById('eightball'); //added for animation for eight ball
let responseContent = document.getElementById('hateballResponse');
var questionCounter = 9;
var thisRoundMagicWord;
var responseArray... |
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
//-----------------------------------------------------------------------------
//
// Abstract:
//
// Expected Values for List View test... |
// Creates the HTML for the hero image slider. Code is from https://www.codeseek.co/suez/cities-slider-react-OjGQza
let _createClass = (function () {
function defineProperties(target, props) {
for (let i = 0; i < props.length; i++) {
let descriptor = props[i];
descriptor.enumerable = descriptor.enume... |
function genTest(win){
var listView = Ti.UI.createListView({height:'90%', top:0});
var sections = [];
var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});
var fruitDataSet = [
{properties: { title: 'Apple'}},
{properties: { title: 'Banana'}},
{properties: { title: 'Cantaloupe'}},
... |
var _state = {};
var post;
var postOffice = Flux.createStore({
setPosts(str,postObj) {
_state[str] = {};
_state[str][str] = postObj;
postOffice.emitChange();
},
appendPosts(str,postObj){
/*
Generally we appending in the same store, this is not the case with profileposts
str in t... |
/*
* Document : base_comp_charts.js
* Author : pixelcave
* Description: Custom JS code used in Charts Page
*/
$(window).ready(function() {
BaseCompCharts.init();
});
var url = "http://13.124.207.144/";
var week1 = [];
var week6 = [];
var week12 = [];
var BaseCompCharts = {
init... |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import classNames from "classnames";
const ResultItem = ({
label,
onCloseClick = () => {
console.log("on result close click");
},
onKeyDown = () => {
console.log("on result result click");
},
onResultClick ... |
import React, { Suspense } from 'react';
import { Grid as MuiGrid, Box, Hidden } from '@material-ui/core';
import PropTypes from 'prop-types';
import Storyblok from 'lib/utils/Storyblok';
import { muiStringProp, dimensionProp } from 'lib/utils/customProps';
import { renderComponentsWithBridge } from 'lib/utils/customCo... |
const config = require("./config.json");
const app = require("electron").app;
const electron = require("electron");
const Menu = electron.Menu;
const BrowserWindow = require("electron").BrowserWindow;
const path = require("path");
const isDev = require("electron-is-dev");
const io = require("socket.io");
const server ... |
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import {
forceStopWirelessScreenshare,
getInMeetingStatus,
hangUp,
hideModal,
isVolumeControlSupported,
startWirelessScreensharing
} from 'common/app-state';
import { isWirelessScreenshareSuppo... |
var fs = require('fs'),
path = require('path'),
_ = require('underscore'),
Step = require('step');
var env = process.env.NODE_ENV || 'development';
// Recursive rm.
function rm(filepath, callback) {
var killswitch = false;
fs.stat(filepath, function(err, stat) {
if (err) return callback(er... |
function merge_options(obj1, obj2) {
var obj3 = {};
for (var attrname in obj1) {
obj3[attrname] = obj1[attrname];
}
for (var attrname in obj2) {
obj3[attrname] = obj2[attrname];
}
return obj3;
}
// adapted from http://stackoverflow.com/questions/901115/
function getUrlParams(a) ... |
module.exports = MQTTClient;
const mqttClient = require("mqtt");
const EventEmitter = require("events").EventEmitter;
const util = require("util");
const utils = require("../utils");
util.inherits(MQTTClient, EventEmitter);
function MQTTClient(service, options, log, debug) {
this.service = service;
this.mqtt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.