text stringlengths 3.22k 29.5k |
|---|
const fetch = require("node-fetch");
const crypto = require(`crypto`);
const fs = require("fs");
const getXFields = obj => {
let xfields = {}
// copy x-* extension properties
for (key in obj) {
if (key.startsWith('x-')) {
// convert snake-case to snake_case
snake_case = key.replace... |
// dogescript powder.djs > powder.js
var ctx = undefined;
var XRES = 576;
var YRES = 384;
var NPARTS = XRES * YRES ;
var pmap = [];
var parts = [];
var empty = [];
var types = {};
var mouse = {};
mouse.x = 0
mouse.y = 0
mouse.down = false
var SOLID = 0;
var LIQUID = 1;
var GAS = 2;
var POWDER = 3;
function Ty... |
/*
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docum... |
/* eslint-disable global-require */
const path = require('path');
const defaultOptions = require('./utils/default-options');
const isProd = process.env.NODE_ENV === 'production';
// Proxy env variables needed for `gatsby-browser.js` and `gatsby-ssr.js`.
// https://www.gatsbyjs.org/docs/environment-variables/#client-... |
/* Copyright (c) 2018 <NAME>, Pur3 Ltd. See the file LICENSE for copying permission. */
const C = {
/** The value of the WHO_AM_I register: 0x81 */
WHIV: 0x81,
// STATUS_ERROR: 0x01,
/** STATUS_DATA_READY */
SDRD: 0x08,
// STATUS_APP_VALID: 0x10,
/** STATUS_FW_MODE */
SFM: 0x80,
// MEAS_MODE_INT_TH... |
function getWeights() {
passedData = [];
var url = 'http://'+apiURL+':'+apiPort+'/api/v1/observations/?person_id='+sessionStorage.patientID+'&concept_id=5089';
var req = new XMLHttpRequest();
req.onreadystatechange = function(){
if (this.readyState == 4) {
if (this... |
$(document).ready(function () {
/*/ === 產出圖表 === /*/
generateScoreChart()
generateSemesterScoreChart()
/*/ === 匯出資料 === /*/
if ($("table")) {
let downloadDiv = $(`<div class="mdui-list"></div>`)
let date = new Date().toLocaleString('zh-TW', {
hour12: false
}).rep... |
import React from 'react'
import AppBar from '@material-ui/core/AppBar'
import Toolbar from '@material-ui/core/Toolbar'
import Typography from '@material-ui/core/Typography'
import getWeb3 from './utils/getWeb3'
import HuanCasino from './contracts/HuanCasino.json'
const contract = require('truffle-contract')
export ... |
// main.js
// stores the current and previous column to be sorted by
var currentCol = -1;
var prevCol = -1;
var sortDown = -1;
var theForm = '';
var useForm = false;
function CompareAlpha(a, b) {
// this one works with ASCII values
if (a[currentCol] < b[currentCol]) { return -1; }
if (a[currentCol] > b... |
module.exports = {
start,
checkPaymentsBalance,
getlastPaymentConfirmation,
checkForTransactions,
}
const Converter = require('@iota/converter')
const {
updatePayment,
storeIndexForPayouts,
getPayment,
getPayoutIndex,
getOpenPayments,
deletePayment,
deleteKeyFromPayment,
} = require('./Database'... |
import React, { useState, useEffect } from "react";
import {
View,
Text,
StyleSheet,
TouchableOpacity,
ScrollView,
} from "react-native";
import { secondary, filler_alt, primary } from "../../styles/colors";
import { Overlay, Card, Input, Button, Icon } from "react-native-elements";
import { Ionicons } from "... |
function thousands_separators(num) {
var num_parts = num.toString().split(".");
num_parts[0] = num_parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return num_parts.join(".");
}
function removeComma(number) {
var number_part = parseInt(number.split(',').join(""));
return number_part;
}
function get... |
/**
* @author <NAME>
*/
'use strict';
const jwt = require('jsonwebtoken');
const { promisify } = require('util');
const crypto = require('crypto');
const BotAppSender = require('./BotAppSender');
const Processor = require('./Processor');
const ReturnSender = require('./ReturnSender');
const headersToAuditMeta = requ... |
'use strict';
const mysql = require('mysql');
const err = require('./err.js');
const KeepTime = require('keeptime');
var TrPromisedMySQL = function(config) {
if (! (config && (typeof(config) === 'object'))) {
throw err('Bad database configuration object');
}
this.logging = config.logging ? true : false;
t... |
import { action, makeAutoObservable } from 'mobx'
import { create, persist } from 'mobx-persist'
import localForage from 'localforage'
import PagedList from './service/PagedList'
import FilterStore from './FilterStore'
import TrackStore from './TrackStore'
import AlbumStore from './AlbumStore'
import RecommendationStor... |
/* Copyright (c) 2013 <NAME>. See LICENSE for more information */
var events = require('events')
, fs = require('fs')
, tls = require('tls')
, util = require('util')
, Device = require('./apns/device')
, Notification = require('./apns/notification')
, Errors = require('./apns/errors');
/* Node.js v0.8.x c... |
/** @babel */
export const toDegrees = (radian) => {
return (180 / Math.PI) * radian;
};
export const toRadians = (degree) => {
return (Math.PI / 180) * degree;
};
export const angle = (x1, y1, x2, y2) => {
return toDegrees(Math.atan2(x1, y1) - Math.atan2(x2, y2)) % 360;
};
export const IEEEremainder = ... |
var _ = require("underscore")._;
/**
* A multi-class single-label Bayes classifier.
*
* @author <NAME> based on code by <NAME> (https://github.com/harthur/classifier)
*
* @param options
*/
var Bayesian = function(options) {
options = options || {}
this.thresholds = options.thresholds || {};
this.globalThresho... |
/*
* This script will import data from files in the worldFiles directory.
* All files are sourced from GeoNames.org. They are a list of places separated
* by TAB.
* The field indexes on each line are as follows:
*
* 0 geonameid : integer id of record in geonames database
* 1 name : name of... |
/*global AtlasMakerWidget BrainBox infoProxy mriInfo params*/
import '../style/style.css';
import '../style/textAnnotations.css';
import '../style/ui.css';
import '../style/mri-style.css';
import '../style/access-style.css';
import '../style/dropdown-style.css';
import 'jquery-ui/themes/base/core.css';
import 'jquery-... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _regenerator = require('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
var _asyncToGenerator3 = _interopRequireDefau... |
import { useEffect, useState } from 'react';
import styled, { css, keyframes } from 'styled-components';
import numbers from '../images';
import blackImg from '../images/black.png';
import intersectionImg from '../images/intersection.png';
import stretchImg from '../images/stretch.png';
import CropperCont from './Cropp... |
var editor;
var upeditor;
$(document).ready(
function() {
var spaceId = $("#pageFormSpaceId").val();
if(spaceId != undefined){
$("#query-space-checkbox").prop("checked",true);
$("#space").val(spaceId).show();
}
var global = $("#pageFormGlobal").val();
if(global && global == "true"){
$("#query-global... |
// Se definen variables para almacenar temporalmente los datos
var buffer =[];
var buffrecibido= [];
var RETRY_CONNECT_MS = 1000;
var cid =0;
var connectionId;
var serialOk= 0;
// Se definen variables necesarias para la conexion del puerto serial
var Connection = Backbone.Model.extend({
defaults: {
conne... |
/*
* JavaFile.js - plugin to extract resources from a Java source code file
*
* Copyright © 2019, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.... |
// NoService/services/youservice/entry.js
// Description:
// "youservice/entry.js" description.
// Copyright 2018 NOOXY. All Rights Reserved.
'use strict';
let NoUser = require('./NoUser');
let fs = require('fs');
const MAX_USERNAME = 10;
function Service(Me, NoService) {
// Your service entry point
// Get the se... |
var express = require('express');
var crypto = require('crypto');
var http = require('http');
var app = express();
var port = 8000;
var host = "127.0.0.1";
var umldata = [];
app.use(express.static(__dirname + '/public'));
app.all('*', function(request, response, next) {
//console.log("middleware hit", req);
nex... |
const CommandBase = require('./Command.js');
const { Collection, Permissions } = require('discord.js');
const { CommandHandlerEvents } = require('../../util/Constants.js');
const EventEmitter = require('events');
const rread = require('readdir-recursive');
const path = require('path');
class CommandHandler extends Eve... |
import React, { createRef } from 'react';
import styled from 'styled-components';
import SampleImg from '../../images/sample.png';
import _ from 'lodash';
const Canvas = styled.canvas`
border: 1px solid blue;
/* width: 100%;
height: 100%; */
`;
class RainbowCanvas extends React.Component {
constructor(props) ... |
var conn = require('./../inc/db'); //importar a connexão do mysql2 /*conectado a app.js linha 7 */
var express = require('express');
var menus = require('./../inc/menus');//faz orequire demenus ,,sobe uma pasta, desce para inc
var reservations = require('./../inc/reservations');//faz require de reservations inclue
v... |
toastr.options = {
positionClass: "toast-bottom-right",
timeOut: 3000
};
$.fn.datagridview.defaults.getFooterPlugins = function () {
return [
$.fn.datagridview.footerPlugins.prevNext,
$.fn.datagridview.footerPlugins.displayFull,
$.fn.datagridview.footerPlugins.displayBasic
];
}
func... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Immutable from 'immutable';
import shallowCompare from 'react-addons-shallow-compare';
import { range, merge } from 'lodash';
import {
getFieldConfig, getValueLabel, getOperatorConfig, getValu... |
import { useState, useEffect } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import PropTypes from 'prop-types';
// Material UI
import {
Box,
Button,
Typography,
Stack,
Grid,
IconButton,
Menu,
MenuItem,
ListItemIcon,
ListItemText
} from '@material-ui/core';
import { styled }... |
const UPLOAD_IMAGES_CHUNK_SIZE = 16; // How many images are going together in one request
const UPLOAD_IMAGES_MAX_SIZE = 8 * 1024 * 1024; // 8mb
const COLUMN_MOVE_SPEED_PX = 2.5;
const encodePayload = (payload) => JSON.stringify(payload);
const decodePayload = (payload) => JSON.parse(payload);
const queuedImages = [];... |
"use strict";
window.onload = init;
// GLOBALS
var canvas,ctx,dragging=false,lineWidth,strokeStyle;
var currentTool, fillStyle, origin, topCavas, topCtx;
var rectX,rectY,rectW,rectH,circX,circY,circRad;
// CONSTANTS
var DEFAULT_LINE_WIDTH = 3;
var DEFAULT_STROKE_STYLE = "red";
var TOOL_RECTANGLE = "toolRectangle";
va... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const express = require('express');
const Web3 = require('web3');
const web3 = new Web3(new Web3.providers.WebsocketProvider('ws://localhost:8545'));
const Tx = require('ethereumjs-tx');
const request = require('request');
const NETWORK_ID = 5777;
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getInteractiveCommitEditorConfig = exports.hgAsyncExecute = undefined;
var _asyncToGenerator = _interopRequireDefault(require('async-to-generator'));
/**
* Calls out to checkOutput using the 'hg' command.
* @param options as spe... |
var Pokemon = require('./pokemon.js').Pokemon;
var Trainer = require('./trainer.js').Trainer;
var Inventory = require('./inventory.js').Inventory;
var PokemonStorage = require('./pokemonstorage.js').PokemonStorage;
var CENUMS = require('./enums.js').Enums; //init client enums
var Character = function(){
var tra... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
function retornarIndexArray(array, property, value) {
var index = -1;
for (var i = 0; i < array.length; i++) {
//ale... |
import React, { useState, useContext, useEffect, useCallback, useMemo, useRef } from 'react';
import { AppContainer } from './GoalTracker.styles';
import { useSelector } from 'react-redux';
import { useForm } from 'react-hook-form';
import { AddTaskContainer } from './GoalTracker.styles';
import axios from 'axios';
fun... |
const express = require('express');
const httpProxy = require('http-proxy');
const url = require('url');
const morgan = require('morgan');
const Promise = require('bluebird');
const fs = Promise.promisifyAll(require('fs'));
const path = require('path');
const _ = require('lodash');
const debug = require('debug');
const... |
import React, { useState, useEffect } from 'react';
import { Input, FormGroup, Label } from 'reactstrap';
import { useSpecialTranslation } from '../../i18n';
import './Filter.scss';
import { Simple, Classes, LinePoint, Phase, Dynamic, Static } from './Symbols';
import { useMapLayers } from './utils';
const SYMBOLS = ... |
import createReducers from '../utils/createReducers'
import { MemberInfo } from '../utils/constants'
import _ from 'lodash';
import moment from 'moment';
import numeral from 'numeral';
const initialState = {
loading: false,//列表加载loading
pageSize: 10,//分页大小
total: 0, //总记录大小
currentPage: 1,//当前页
mem... |
$(document).ready(() => {
let clickable = true;
let allData, allKeys;
fetch('/getMaterialList', {
credentials: 'include'
})
.then(response => response.json())
.then(res => {
$(".loader").addClass("hideComponent")
allData = res.dados;
allKeys... |
'use strict';
const Cartesian3 = require('cesium/Source/Core/Cartesian3');
const Color = require('cesium/Source/Core/Color');
const Globe = require('./Globe');
const Genetic = require('./Genetic');
const graphs = require('./graphs');
var config = null;
var nodeMap = new Map();
var state = 'initial'; // 'initial', 'r... |
const BIN_TYPES = ['application/octet-stream', 'application/macbinary'];
const IMG_TYPES = ['image/jpeg', 'image/jpg', 'image/png', 'image/svg'];
const TYPES = [].concat(IMG_TYPES);
function halt(ev){
ev.stopPropagation();
ev.preventDefault();
return false;
}
function reset(){
Array.from(document.que... |
var gulp = require('gulp'),
gutil = require('gulp-util'),
gsass = require('gulp-sass'),
inject = require('gulp-inject'),
watch = require('gulp-watch'),
ngHtml2Js = require('gulp-ng-html2js'),
minifyHtml = require('gulp-minify-html'),
concat = require('gu... |
var _ = require('lodash');
var fs = require('fs-extra');
var path = require('path');
var denodeify = require("pdenodeify");
var eachGraph = require("../graph/each_dependencies");
var transformImport = require("../build/transform");
var helpers = require('./helpers/helpers');
var winston = require('winston');
var loggin... |
import FilterListIcon from '@mui/icons-material/FilterList';
import './utils.css';
import FileDownloadOutlinedIcon from '@mui/icons-material/FileDownloadOutlined';
import CsvDownloader from 'react-csv-downloader';
import { useDispatch, useSelector } from 'react-redux';
import React, { useEffect, useState } from 'react'... |
'use strict'
var now = require('right-now')
var ndarray = require('ndarray')
var mazegen_ = require('maze-generator')
var morphology = require('ball-morphology')
var mouseChange = require('mouse-change')
var shuffle = require('shuffle-array')
var imshow = require('ndarray-imshow')
var createPlanner = require('../lib/p... |
let superCategory = true,idCategory;
let links = document.getElementsByClassName('subCat');
for(let i=0;i<links.length;i++){
links[i].addEventListener('click',function (ev) {
ev.preventDefault();
var str = (ev.target.getAttribute('id'))+"";
var index = str.search('-');
let id =st... |
import React, { useState, useEffect } from 'react';
import {
Text,
View,
StyleSheet,
TouchableOpacity,
SafeAreaView,
FlatList,
TextInput
} from 'react-native';
import { Controller, useForm } from 'react-hook-form';
// import { Picker } from 'react-native-picker';
import {Picker} from '@react-native-commu... |
/****************************************************
* Logger. *
* Enable Advanced Logging for your Application. *
****************************************************/
'use strict';
import { fs } from 'fs';
import { chalk } from 'chalk';
import { path } from 'path';
impor... |
/*
* Copyright (c) 2017 Cornell University
*
* 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 o... |
import { List, OrderedMap, Map } from 'immutable';
import macro from './macro';
const formCell = ({ region, size, angle }) => {
// 首先将paintToolCursorRegion变成matrix, 然后得出每一行每一列的比例,将整数的先铁甲,剩余的最高的几个比例,分配,如果
// 生成一个tuple List, 对应于行数与比例,取前几个
// 如果最后几个比例相同的话,则选择靠中间的增加行数
// 多边形和旋转
// 如果有数据和center的话
/... |
"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 debounce from 'lodash/debounce';
import virtualCntlr from './virtual-cntlr';
class NESCntlr {
constructor(settings) {
this.dom = {};
this.settings = {
keys: {
start: 'Enter',
select: 'Space',
left: 'ArrowLeft',
up: 'ArrowUp',
right: 'ArrowRight',
... |
import React, { Component } from 'react';
import {
Loader,
Checkbox,
Segment,
Header,
Button,
Pagination,
Table,
Popup,
} from 'semantic-ui-react';
import update from 'immutability-helper';
import SideBar from './SideBar';
import Hotkeys from 'react-hot-keys';
class InspectionPage extends Component {... |
import * as Dat from 'dat.gui';
import { Scene, Color } from 'three';
import { Flower, Land, Kid, FloatingKid } from 'objects';
import { BasicLights } from 'lights';
import * as THREE from "three";
import POSX from "./textures/Earth/posx.jpg";
import NEGX from "./textures/Earth/negx.jpg";
import POSY from "./textures/E... |
import electron from 'electron';
import fs from 'fs';
import React, { createContext, useEffect, useState } from 'react';
import path from 'path';
import sizeOf from 'image-size';
import defaultState from './defaultState';
import encodePath from '../modules/encodePath';
import File from '../modules/File';
import turnPa... |
#!/usr/bin/env node
import { spawn } from 'child_process';
import { inspect } from 'util';
import yargs from 'yargs';
import Server from '../server';
import Installer from '../server/installer';
import ConfigStore from '../lib/config-store';
import logger from '../lib/logger';
import pick from '../lib/helpers/pick';... |
// TTSClient JS
// JavaScript client for Aharon's SAPI based TTS server
// author: <NAME> <EMAIL>
//
// ver 1.09
// - Default language added
// ver 1.08
// - Timeout check added
// - IE bug resolved (onload event not being called)
// ver 1.07
// - logging added
// ver: 1.06
// - '=' handled.
// ver: 1.05... |
#! /usr/bin/env node
var bBower = false,
bCustomBower = false,
param = process.argv[2],
scssCwd = process.argv[3],
scssDest = process.argv[4],
sys = require('sys'),
path = require('path'),
fs = require('fs'),
sCurrentProject = '',
bDebug = false,
multiThreaded = true,
colo... |
var me = editor,
doc = me.document,
bodyStyle,
cp = $G( "colorPicker" ),
bkbodyStyle = "",
bkcolor = "";
var popup = new UE.ui.Popup( {
content:new UE.ui.ColorPicker( {
noColorText:me.getLang( "clearColor" ),
editor:me,
onpickcolor:function (... |
"use strict";
const EventEmitter = require("events");
const Discord = require( "discord.js");
const jsonfile = require('jsonfile');
const colors = require('colors');
const FS = require('fs');
class Disnode extends EventEmitter{
constructor(configPath){
super();
this.configPath = configPath;
this.config ... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import {Modal, Input, Button... |
const initialInnerWidth = innerWidth;
const refreshOnResize = () => {
if(innerWidth !== initialInnerWidth) {
window.history.go(0)
}
};
window.addEventListener("resize", refreshOnResize);
const svgSection1 = d3.select("#section0")
.attr("width", innerWidth)
.attr("height",... |
// Copyright 2018 Google LLC
//
// 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 ... |
const utils = AFRAME.utils
const {Util} = require('./util.js')
const {THREED_MODES} = require('./layer-modes.js')
updateMatcapMap = function (shader, data) {
var longType = 'matcap';
var shortType = longType;
var el = shader.el;
var material = shader.material;
var rendererSystem = el.sceneEl.systems.renderer... |
var _ = require('lodash');
var IsNameUsedVisitor = require('./visitors/IsNameUsedVisitor.js');
var LHSVisitor = require('./visitors/LeftHandSideVisitor.js');
var lhsVisitor = new LHSVisitor();
/**
* FlowAnalyzer -
* @param scope
* @constructor
*/
var FlowAnalyzer = function(scope){
this._scope = scope;
this._... |
const express = require('express');
const { createServer } = require('http');
const { Server } = require('socket.io');
const { addPlayer, getPlayer, getPlayers, removePlayer, getRoom, createRoom } = require('./state');
const { defaultConfig: config } = require('../config/default');
const port = config['port'];
const h... |
const fs = require('fs');
const dc = require('discord.js');
createFiles();
const cfg = require('./storage/config.json');
const guilds = require('./storage/guilds.json');
/* module.exports */
module.exports = {
CommandCategory: Object.freeze({
'NEKOS_LIFE': {
__KEY: 'NEKOS_LIFE',
c... |
/**
* 秒杀商品模块-中间件层
* 封装跟业务逻辑相关的处理
*/
import backend from '../api/backend/index.js'
class SeckillMiddleware {
constructor() {
this.seckillGoodsInfo = null //秒杀商品详情列表
this.seckillDayNum = 0 //获取哪天的秒杀商品 0 今天 1 明天 -1 昨天
this.seckillRoundNum = 0 //当前活动是当天第几轮
this.seckillTimer... |
// Initialize all modules by requiring them. Also makes sure they get bundled (see gulpfile.js).
var $ = require('jquery-detached').getJQuery();
var getItems = function() {
var d = $.Deferred();
$.get('itemCategories?depth=3&iconStyle=icon-xlg').done(
function(data){
d.resolve(data);
}
);
return ... |
import React, { useState, useContext, useEffect } from "react";
import Button from "@material-ui/core/Button";
import TextField from "@material-ui/core/TextField";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/cor... |
/*******************************************************************************/
/********************************* MW LIBRARY ********************************/
/* Fonctions communes aux projets zen (hall-inn & like-inn) */
//Evite les erreurs liés au console.log
function log(msg) {
try {
cons... |
import { arr_zoom } from '../algorithms/arr_zoom'
import { adjacent } from '../algorithms/adjacent'
import { isMouse } from './event'
/**
* 渲染转折点
* @param {*} param0
*/
const RD_spot = ({ zrender, SL, SHL, _DIFF, ROW_CONFIG, get_color,index }) => {
let dpr = ROW_CONFIG.dpr,
_box_ = ROW_CONFIG._box_... |
/*jshint eqnull: true, laxcomma: true, smarttabs: true, node:true */
/**
* Module working with dates and complex date math
* @author <NAME>
* @module cage/date
* @requires cage/lang
* @requires mout/date
*/
var DateMethods
,DateFormats
,DateUnits
,pad
,dateSetter
,dateGetter
,rfcDayAbbr
,rfcDay
,rfcMonth
... |
/*
Copyright 2012-2019 MarkLogic Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed t... |
var dbFileElm = document.getElementById('dbfile');
var csvFileElm = document.getElementById('csvfile');
var vsvFileElm = document.getElementById('vsvfile');
var vsvButton = document.getElementById('vsvbutton');
var dbButton = document.getElementById('dbbutton');
var sidebarElm = document.getElementById('sidebar');
var ... |
import * as integration from "./integration.js";
import * as misc from "./misc.js";
import DOMBuilder from "./dombuilder.js";
var projects = [];
var lastScrollPos = 0;
async function requestImage(name, obj) {
let image = await integration.requestGitHubImageFile({
origin: config.origin,
owner: conf... |
/**
* Load i18n data
*/
$.i18n.properties({
name: 'messages',
path: '/js/i18n/',
mode: 'both'
});
/**
* Holds metadata from the server
*/
var metadata;
/**
* Holds the list of hashtags (names only), for use in autocomplete
*/
var htData;
/**
* Holds the list of hashtag objects
*/
var htObjects;
... |
import React from 'react';
import Scroll from '../Scroll/Scroll';
import Cardlist from '../Card/Cardlist';
import Mcardlist from '../MsgCard/Mcardlist';
import Pusher from 'pusher-js';
import ScrollToBottom from 'react-scroll-to-bottom';
import { css } from 'glamor';
import { zoomIn } from 'react-animations';
import { ... |
import serverPromise from "../test-server";
import { TestClient, clearDatabase } from "../test-helpers";
let server;
let mockAdminUser;
let mockNonAdminUser;
let postMockStream;
let mockWebhook;
// jest.setTimeout(70000)
beforeAll(async () => {
server = await serverPromise;
postMockStream = require("./wowza-hydra... |
var app = new Vue({
el: "#app",
data: {
data: "",
inter_url: inter_url,
inter_img: inter_img,
id: 0,
iflogin: true,
wenname:"",
gold:"",count:"",collect:"",
nic:"",
pageindex :1,
shareList:[],
pagenow:"",
pagesum:"",
tabindex:0,
keyword:"",
nikname:"",
avatar:"",
shareLists:[],... |
var map, province, district, vLMIS, prov, selectfeature, ext, year, month, product_name;
var classesArray = [];
var province_style_label = new OpenLayers.StyleMap();
var lookup = {
"0": {fillColor: "#E6E7E9", strokeColor: "red", strokeWidth: 0.8, label: "${province_name}", fontSize: "11px", cursor: "pointer", font... |
/**
* File containing all interfaces and classes related to data parsing and structuring
*
* @author <NAME> <<EMAIL>>
* @copyright 2016
* @license https://opensource.org/licenses/mit-license.php MIT License
* @version 0.1.2
*/
"use strict";
/**
* Format for the path of the JPEG files with raw data. Th... |
import * as React from 'react';
import Draggable from 'react-draggable';
import GeoJSON from 'ol/format/GeoJSON';
import { fromLonLat } from 'ol/proj';
import { createEmpty, extend, isEmpty, getCenter } from 'ol/extent';
import {
ResizableBox,
} from 'react-resizable';
import {
addClass,
removeClass,
} from '... |
var form = document.forms['register'];
var inputClass = {
inpFocus: 'inp-focus',
inpBlur: 'inp-blur',
inpText: '.prompt-text',
inpError: '.prompt-error',
inpCorrect: '.prompt-correct'
};
var promptClass = function (obj, tipText, flag) {
if (flag) {
obj.removeClass(inputClass.inpBlur).rem... |
/*
Copyright 2016 First People's Cultural Council
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... |
function videomplay() {
var $videoArea = $('.videom'),
$videoItem = $('.videom .content_list .item_block'),
videoLinks = [],
videoInfor = [];
function getSingle(fn) {
var result;
return function () {
return result ? result : (result = fn.apply(this, a... |
// get the curve and crypto functions
var bootstrap = require('./util/nodejs.bootstrap.js');
var crypto = bootstrap.crypto;
var curve25519 = bootstrap.curve25519;
var converters = bootstrap.converters;
var output = require('./util/output');
function extractPhraseFromLine(line) {
return line.split(' ')[1];
}
func... |
'use strict';
var indentation = ' ';
function serialize(data, builder) {
for (var i = 0; i < builder.transforms.length; i += 1) {
var serialization = builder.transforms[i].serialize(data, builder);
if (serialization) return serialization.value;
}
throw new Error('No transform found for... |
/**
* @typedef {import("discord.js").GuildMember} GuildMember
* @typedef {import("discord.js").User} User
* @typedef {import("../users/model").Location} Location
*
* @typedef {[Location, GuildMember]} Entry
*
* @typedef {{hasGroup: [string, GuildMember][], maxQuantity: number[], noRole: GuildMember[], wrongLocat... |
/**
* 工具模块
*/
import crypto from 'crypto';
// 从数据中获取需要的参数,默认获取_id
export const selection = (data, params) => {
const result = [];
if (params && params.length > 0) {
data.forEach((item) => {
params.forEach((param) => {
result.push({
id: item.id,
param: item[par... |
/* This example requires Tailwind CSS v2.0+ */
import { Fragment, useEffect, useState } from 'react'
import { Disclosure, Menu, Transition } from '@headlessui/react'
import { BellIcon, LoginIcon, MenuIcon, XIcon } from '@heroicons/react/outline'
import { useAuth } from '../contexts/auth'
import Link from 'next/link'
im... |
//selecionando as tabelas do DOM
var playersSala1 = document.querySelectorAll('.sala1');
var playersSala2 = document.querySelectorAll('.sala2');
var playersSala3 = document.querySelectorAll('.sala3');
var playersSala4 = document.querySelectorAll('.sala4');
var playersSala5 = document.querySelectorAll('.sala5');
//arra... |
import React, { useEffect } from "react";
import classNames from "classnames";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
import MenuItem from "@material-ui/core/MenuItem";
import MenuList from "@material-ui/core/MenuList";
import Grow from "@material-ui/core/Grow";
import Pa... |
$(document).ready(function () {
});
function initializeLaunchSourceEditorModal() {
attachLaunchSourceEditorModalButtonHandler();
attachUsagesSelectionCheckboxesHandler();
attachUsagesSelectionTextClickHandler();
attachSourcesSelectionCheckboxesHandler();
attachSourcesSelectionTextClickHandler();
... |
const bcrypt = require('bcryptjs');
const {
GraphQLObjectType,
GraphQLInt,
GraphQLString,
GraphQLList,
GraphQLInputObjectType,
} = require('graphql');
const uuid = require('uuid/v4');
const Pessoa = require('../model/Pessoa');
const Estado = require('../model/Estado');
const Cidade = require('../mo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.