text stringlengths 3.22k 29.5k |
|---|
var app = require('./www.js').app;
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
var appRoot = require("app-root-path").path
var config = require("config")
var path = require("path")
var log = require("ucipass-logger")("auth")
var File = require("ucipass-file")
var ... |
import React, { Component } from "react"
import axios from "axios"
import InputRange from 'react-input-range';
// Using an ES6 transpiler like Babel
import Slider from 'react-rangeslider'
// To include the default styles
import 'react-rangeslider/lib/index.css'
import Layout from "../components/layout"
import {
Cont... |
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed u... |
import React, { Component } from 'react';
import {connect} from "react-redux";
import { loadeventselect } from '../actions/event';
import { newbooking } from '../actions/booking';
import FullService from './fullservice'
import $ from 'jquery';
class Booking extends Component {
constructor(props) {
super(props... |
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import ContentLoader from "react-content-loader";
import Moment from 'moment';
import OrderDetailsModal from "./OrderDetailsModal";
import ConfirmModal from "../ConfirmModal";
import {toast} from "react-toastify";
impor... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
jQuery( function ( $ )
{
var $body = $( 'body' );
// Tabs
$( '.fitsc-tabs' ).each( function ()
{
var $this = $( this ),
$ul = $this.children( 'ul' ),
$lis = $ul.children(),
$content = $this.children( 'div' ),
$divs = $content.children();
$lis.filter( ':first' ).addClass( 'fitsc-active' );
$divs... |
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Backup = Green (to backup)
// Restore = Blue (from backup)
const child_process_1 = require("child_process");
const projectRoot = process.cwd();
const SecureConfigurations_1 = require("../SecureConfigurations");
const scC... |
import React, { useLayoutEffect, useRef, useState } from 'react'
import T from 'prop-types'
import styled, { css } from 'styled-components'
import Icon from './Icon'
function getDefaultContainer() {
const root = document.getElementById('root')
if (root) return root.firstChild
return document.body.firstChild
}
... |
// converts spoken numbers into integers "fifty seven point eight" -> 57.8
//
// Spoken numbers take the following format
// [sixty five] (thousand) [sixty five] (hundred) [sixty five]
// aka: [one/teen/ten] (multiple) [one/teen/ten] (multiple) ...
// combile the [one/teen/ten]s as 'current_sum', then multiply it by i... |
import React from 'react';
import {connect} from 'react-redux';
import update from 'immutability-helper';
import {Button} from 'react-bootstrap';
import classnames from 'classnames';
import {DragSource, DropTarget} from 'react-dnd';
import {Python} from '../ui';
import {getQualifierClass, getFrequencies} from '../util... |
/**
# functions
This module provides convenient access to the `AsyncFunction` constructor.
const f = new b8r.AsyncFunction(...args, code)
> ### A note for test failures
>
> Many of the tests in this library are highly sensitive to background processing
> (since they're async tests based on delays in a non-pre-em... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import mathjs from 'mathjs';
import { ClockCircleOutlined } from '@ant-design/icons';
import { Button as AntBtn } from 'antd';
import {
connectWallet,
loadBlockchainData,
getCurrentBlock,
gen... |
/*
* 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 n... |
/* -*- Mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. ... |
/*jshint globalstrict:false, strict:false */
/*global assertEqual, assertNotEqual, assertTrue, fail, NORMALIZE_STRING */
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2018 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Col... |
import React, {useEffect, useState} from "react";
import {Helmet} from "react-helmet";
import Map from "components/fragments/game/Map";
import {ThemeProvider} from "@emotion/react";
import {defaultTheme} from "styles/themes/defaulTheme";
import {LinearProgress} from "@mui/material";
import CustomPopUp from "components/... |
/*
* File Name / balloon.js
* Created Date / Sep 14, (My Birthday) 2020
* Aurhor / <NAME>
* Twitter / https://twitter.com/toshiyamarukubo
* Inspired / Twitter's birthday balloon.
*/
/*
Common Tool.
*/
class Tool {
// random number.
static randomNumber(min, max) {
return Math.floor(Math.random() * (max - min... |
var $table = $('#table');
var instList = pathUrl+'instList.do?pageSize=99999';
var instDelete = pathUrl+'instDelete.do';
var instSave = pathUrl+'instSave.do';
var getInst = pathUrl+'getInst.do';
var allInstList = pathUrl+'allInstList.do';
var enumList = pathUrl+'enumList.do';
var addInstCode = $('#addInstCode');
var a... |
const fs = require('fs');
const NEED_CHAR = Number.MAX_VALUE;
const SKIP_LF = Number.MAX_VALUE - 1;
const CT_WHITESPACE = 1;
const CT_DIGIT = 2;
const CT_ALPHA = 4;
const CT_QUOTE = 8;
const CT_COMMENT = 16;
export default class Tokenizer {
constructor(fileName) {
this.input = fs.readFileSync(fileName);
thi... |
const opencvjs = require("../lib/opencv.js");
class OpenCVJsWrapper {
constructor(){
if (!opencvjs) {
throw 'opencvjs is not ready yet';
}
}
estimateAffinePartial2D(keypoints1, keypoints2) {
if (keypoints1.length < 3 || keypoints2.length < 3 || keypoints1.length != keyp... |
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle';
// @material-ui/core comp... |
const express = require('express')
const router = express.Router()
const mySQL = require('../config/database')
const printers = require('../helpers/debug/DebugAlerts')
const routeprotectors = require('../middleware/route_protectors')
const SearchError = require('../helpers/errors/SearchError')
/**
* Search functiona... |
import React from 'react';
import cn from 'classnames';
import PropTypes from 'prop-types';
import capitalize from 'lodash/capitalize';
import styles from './UserDetail.css';
import AccountHistory from './AccountHistory';
import { Slot } from 'coral-framework/components';
import UserDetailCommentList from '../component... |
// Get reference to Download button image
var download_black = chrome.extension.getURL("download_black.png");
var download_white = chrome.extension.getURL("download_white.png");
var batchDownloading = false;
function addDownloadBtn() {
$('._hmd6j._8oo9w:not(:has(>.btnDownload))').append('<a class="btnDownload" role... |
// components/postMaker/index.js
const app = getApp();
import drawQrcode from '../../libs/weapp.qrcode.esm.js'
import util from '../../utils/util.js';
const UserManager = require("../../services/userService");
Component({
/**
* 组件的属性列表
*/
properties: {
canvasWidth: {
type: Number,
value: 1125
... |
import _ from "lodash";
import moment from "moment";
import Mustache from "mustache";
import { dateEnLettres, tarif } from "./Helpers";
const readPraticien = (client, onSuccess, onError) => {
client.MonCompte.read(
result => {
let praticien = {};
praticien.nom = _.get(result, "account.nom", "");
... |
// Mogranton Meal Map by <NAME>
// 1st submission: October 14, 2018
// Resources used:
// Elharony's 3rd party library-free start to this project: https://www.youtube.com/playlist?list=PLgOB68PvvmWCGNn8UMTpcfQEiITzxEEA1
// <NAME> Walktrhough https://www.youtube.com/watch?v=LvQe7xrUh7I&t=2013s
// w3 on how to implement... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = parse;
var _readWindowsAllCodes = _interopRequireDefault(require("../../util/readWindowsAllCodes"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* @file 解析cm... |
import Vue from "vue";
import Router from "vue-router";
// 大厅
import Home from "../components/page/index/index";
// 测试
import Ceshi from "../components/page/index/text";
//刮刮乐
import Scratchmusic from "../components/page/guagua/Scratchmusic";
import Fivepieces from "../components/page/guagua/Fivepieces";
import Twent... |
isExe=false;
var confirmMsg='';
var fieldsCache='';
function lingxSubmit(){
if(isExe){
alert("正在后台处理,请稍后!可以关闭当前对话框。");
return ;
}
if(confirmMsg){
if(confirm(confirmMsg)){
lingxSubmitFn();
}
/*Ext.MessageBox.confirm("系统消息",confirmMsg,function(val){
if(val=='yes')lingxSubmitFn();
});*/
... |
var React = require('react');
var clsx = require('clsx');
var _ = require('lodash');
var $ = require('jquery');
require('jquery-ui');
require('jquery.fancytree');
require('jquery.fancytree/dist/modules/jquery.fancytree.filter');
require('jquery.fancytree/dist/modules/jquery.fancytree.glyph');
var constate = require('co... |
import { get, mapValues } from 'lodash/object';
import { keyBy } from 'lodash/collection';
export const pnxRecordServiceName = 'PnxRecord';
export const pnxRecordService = /* @ngInject */ function(
gettext,
gettextCatalog,
Institutions
) {
function Subject(data) {
this.id = get(data, 'id');
... |
import React from 'react';
import { compose } from 'redux';
import { withRouter } from 'react-router-dom';
import { intlShape, injectIntl, FormattedMessage } from '../../util/reactIntl';
import { arrayOf, array, bool, func, object, node, oneOfType, shape, string } from 'prop-types';
import classNames from 'classnames';... |
const Product = require('../models/product');
const Order = require('../models/order');
const Cetagory = require('../models/cetagory');
const path = require('path')
const fs = require('fs')
require("dotenv").config({
path: "./config/config.env",
});
const PDFDoc = require('pdfkit');
const session = require('express-s... |
$(document).ready(function() {
cargaCursosWeb(0,1).then(function (result) {
buildCursosCaroucelHtml(result);
});
consultaAsyncHistorialAsign(3,1).then(function (datos) {
let lista = datos.filter(x=>parseInt(x.visible_publico)==1);
lista = lista.filter(x=>parseInt(x.statusAsignacion)... |
import { setCACHE } from "./modules/cache.js";
import { createNewList, buildSavedList, returnSavedList, manageGroceryList } from "./modules/localStorage.js";
import { toggleTaxes } from "./modules/taxes.js";
import { convertCurrency } from "./modules/currencyConversion.js";
const CACHE = setCACHE();
initialize();
/**... |
const PATH_STATIONS = "http://dmas.uvic.ca/api/stations";
const PATH_ARCHIVE = "http://dmas.uvic.ca/api/archivefiles";
const TOKEN_1 = "d<PASSWORD>"; //found in documentation
var OPTIONS = null;
class Table
{
_this = this;
constructor(wrapper)
{
this.wrapper = wrapper;
this.count = 0;
this.crea... |
import React, { useState, useEffect } from 'react';
import { makeStyles } from '@material-ui/styles';
import { Grid } from '@material-ui/core';
import {searchglobalfollowers, getearningstocks, gettopstocks, getshortlong, gettopstocksforshortlong, getglobalfollowerslist, getstockpriceintervaltime} from '../../services/a... |
import ChartJSImage from "chart.js-image"
import Game from "../models/game.js"
import { getUserMatchHistory } from "./user.js"
import { ordinal } from "openskill"
/**
* @description Creates a graph of mmr variation for users in a role
* @param {String} role Name of the role
* @param {[String]} userList List of g... |
import { sdsArrow } from "./sdsArrow";
import { sdsBars } from "./sdsBars";
import { sdsBell } from "./sdsBell";
import { sdsBook } from "./sdsBook";
import { sdsCalendar } from "./sdsCalendar";
import { sdsCalendarAdd } from "./sdsCalendarAdd";
import { sdsCalendarCheck } from "./sdsCalendarCheck";
import { sdsDownloa... |
const data = {
class_20: [
"ALS_IceBucket_Challenge",
"CPR",
"abseiling",
"add_new_car_tire",
"adjusting_glasses",
"air_drumming",
"air_guitar",
"air_hocky",
"alligator_wrestling",
"applauding",
"applying_cream",
"archery",
"arm_wave",
"arm_wrestling",
"atla... |
'use strict';
// jshint node: true
var _ = require('underscore'),
$ = require('gulp-load-plugins')(),
merge = require('merge-stream'),
path = require('path'),
gulp = require('gulp'),
open = require('gulp-open'),
gutil = require('gulp-util'),
sourcemaps = require('gulp-sourcemaps'),
cris... |
const {ipcRenderer} = require('electron')
const os = require('os')
const fs = require('fs');
const child = require('child_process').exec;
const windowsExecutablePath = "bin\\OpenSpace.exe";
const macExecutablePath = "bin/OpenSpace.app/Contents/MacOS/OpenSpace";
const linuxExecutablePath = "bin/OpenSpace";
var sgctMap... |
console.log("Content script loaded")
// We set these colors manually instead of using the Bootstrap classes
// because OpenVPB overrides the default Bootstrap colors
const SUCCESS_COLOR = '#28a745'
const WARNING_COLOR = '#ffc107'
const ERROR_COLOR = '#dc3545'
let modal
let isConnected = false
let modalOpenedTime
let ... |
class Title extends React.Component {
render() {
return (
React.createElement("div", { id: "title" }, "Pomodoro Clock"));
}}
class Buttons extends React.Component {
render() {
return (
React.createElement("div", { className: "adjustment" },
React.createElement("div", { id: "b-label" ... |
import fs from 'fs';
import path from 'path';
import objectHash from 'object-hash';
import parseJSON from 'json-parse-better-errors';
import stringifyJSON from 'json-stable-stringify';
import { ensureDir, move } from 'fs-extra';
import tempWrite from 'temp-write';
import createLogger from 'debug';
import { decodeRespon... |
'use strict';
import { Platform } from '@unimodules/core';
import Constants from 'expo-constants';
import * as Notifications from 'expo-notifications';
import * as FileSystem from 'expo-file-system';
import * as TestUtils from '../TestUtils';
import { waitFor } from './helpers';
export const name = 'expo-notificatio... |
//How big the grid is in pixels
var gridWidthPx = 800, gridHeightPx = 448;
var gridPx = 32;
//Grid size in actual units
var gridWidth = gridWidthPx / gridPx;
var gridHeight = gridHeightPx / gridPx;
//Storage for the current agents and obstacles
var agents = new Array();
var obstacles = new Array();
//The physics wor... |
btnAddSubject.addEventListener("click", (e) => {
writeSubjectToDB();
});
btnAddTask.addEventListener("click", (e) => {
writeTasktoDB();
});
// Writing subjects to Database
function writeSubjectToDB() {
let subject = txtSubejct.value;
if (txtSubejct.value.length == 0) {
//Is the field empty?
console.lo... |
/**
* prime.ts
*
* @author <NAME>
*/
const version = '0.0.0';
const _BI = typeof BigInt === 'function' ? BigInt : Number;
//
const halve = typeof BigInt === 'function'
? n => n.constructor(_BI(n) >> _BI(1))
: n => n.constructor(Math.floor(n / 2));
/**
*
*/
export const mulmod = typeof BigInt === 'function... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("... |
"use strict";
/*
* Created with @iobroker/create-adapter v1.34.1
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) ... |
import Ember from 'ember';
const { bind } = Ember.run;
const pathToAlabama = [[35.0041, -88.1955], [34.9918, -85.6068], [32.8404, -85.1756], [32.2593, -84.8927], [32.1535, -85.0342], [31.7947, -85.1358], [31.52, -85.0438], [31.3384, -85.0836], [31.2093, -85.107], [31.0023, -84.9944], [30.9953, -87.6009], [30.9423, -... |
//window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
try {
window.Popper = require('popper.js').default;
... |
function h(str, props = {}, children = []) {
const elName = str.split('.')[0];
const className = str.split('.').slice(1).join(' ') + (props.className || '')
const el = document.createElement(elName);
for (const [attr, val] of Object.entries(props.attrs || {})) {
el.setAttribute(attr, val);
}... |
import React from 'react';
import * as d3 from 'd3';
import Gradient from "./Gradient";
const decadeDuration = 10;
const thisYear = 2018;
const maxOrder = 50;
const decadeTransitionDuration = 700;
const animationDuration = 500;
class FrequencyRatioChart extends React.PureComponent {
state = {
isLoading: true,
... |
import { deepClone, getArrayIntersection, getArrayTail, buildParamsFromQueryString, buildQueryStringFromParams } from "./utils.js";
const ORIGIN = window.location.origin + window.location.pathname;
const ABSOLUTE_ORIGIN_NAMES = [ORIGIN, window.location.hostname, window.location.hostname + '/', window.location.origin];... |
import React, {useEffect, useState, useCallback, useContext, useRef} from 'react';
import {View, Text, FlatList, TouchableOpacity, SafeAreaView, ActivityIndicator, StyleSheet} from 'react-native';
import {Menu, MenuOption, MenuOptions, MenuTrigger} from 'react-native-popup-menu';
import Icon from 'react-native-vector-i... |
//
// GuestHistoryModule
// <NAME>
// 4/29/18
// Renders a timeline that contains all history (ie
// completedActionItems & Interactions) related to the given guest.
// props: interactions - list of all interactions
// completedActionItems - list of all completedActionItems
// guestId - guest's id (for wh... |
import Phaser from 'phaser'
import Unit, { FlyingUnit, NuclearMissile } from './island/unit'
import ValueControl from './components/valuecontrol'
import { Teams, UserEvents } from './defines'
import GroundUnit from './island/unit'
// Render no more then this amount of sprites
const ARMY_SPRITE_LIMIT = 250
class Army ... |
const { toTitleCase } = require('@ruffpuff/utilities');
const { Permissions: { FLAGS } } = require(`discord.js`);
const { Pokemon, PaginatedMessage } = require('#util');
const { colors } = require('#utils/Constants');
const { FoxxieCommand } = require('#structures');
const { sendLoading } = require('#messages');
const ... |
import React from 'react'
import ReactDOM from 'react-dom'
import theme from '@instructure/ui-themes/lib/canvas'
import Heading from '@instructure/ui-elements/lib/components/Heading'
import Text from '@instructure/ui-elements/lib/components/Text'
import Link from '@instructure/ui-elements/lib/components/Link'
import G... |
import {pageSize, pageSizeType, description, searchConfig} from '../../../gloablConfig';
const person = '/api/signature/account_management/enterprise_account_management/dropPerson';
const oneControls = [
{key:'dgyhzh',title:'对公银行账号',type:'text',required:true, btn:{title:"获取验证码",key:'code'}},
{key:'dgyhmc',title... |
import PropTypes from 'prop-types';
export const person = {
basics: {
name: '<NAME>',
label: 'Software Engineer (Scala | Akka | Cassandra | Mesos | Kafka | C# |Spark )',
picture: './tao.jpg',
// email: '<EMAIL>',
phone: '86 139 1750 ****',
website: 'https://wherby.github.io/',
summary: '"... |
const Discord = require("discord.js");
const { ipcRenderer } = require("electron");
const client = new Discord.Client();
window.addEventListener("DOMContentLoaded", () => {
function notice(title, description) {
const container = document.getElementById("notice");
container.style.visibility = "visible";
documen... |
var ipcRenderer = require('electron').ipcRenderer
var lineArrayPressure = []
lineArrayPressure.push({color:'#ffffff',lineWidth:2,value:0})
lineArrayPressure.push({color:'#880000',lineWidth:2,value:1000})
lineArrayPressure.push({color:'#880000',lineWidth:2,value:2000})
lineArrayPressure.push({color:'#880000',lineWidth:... |
/**
@module ember-flexberry-gis
*/
import Ember from 'ember';
import FlexberryTreenodeComponent from 'ember-flexberry/components/flexberry-treenode';
import SlotsMixin from 'ember-block-slots';
import RequiredActionsMixin from 'ember-flexberry/mixins/required-actions';
import DomActionsMixin from 'ember-flexberry/m... |
/*
* Copyright 2018 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
// Global imports -
import * as THREE from 'three';
import anime from 'animejs';
// Local imports -
// Components
import Renderer from './components/renderer';
import Camera from './components/camera';
import Light from './components/light';
import Controls from './components/controls';
//Other
import Events from './... |
import {render, html} from 'https://unpkg.com/lit-html@1.1.1/lit-html?module';
// store urls for grabbing data from atla5/resume
const url_base_data = "https://raw.githubusercontent.com/atla5/resume/master/data/";
// generic helper function used to grab the data
function getDataFromJSONFileAndCallRenderFunction(data... |
/*
* 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 ... |
var gulp = require('gulp'),
util = require('gulp-util'),
rename = require('gulp-rename'),
file = require('gulp-file'),
concat = require('gulp-concat'),
clean = require('gulp-clean'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
uglify = require('gulp-uglify'),
... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import isEmpty from "lodash.isempty";
import debounce from "lodash.debounce";
import Router from "next/router";
import { connect } from "react-redux";
import { Card, Tabs } from "antd";
import {
FaUserCircle,
FaChartBar,
FaReply,
FaClock,... |
"use strict"
const test = require("tape")
const join = require("path").join
const stat = require("fs").statSync
const co = require("bluebird").coroutine
const isMode = require("./helpers").isMode
const del = require("./helpers").del
const $ = require("../lib/utils")
const fixtures = join(__dirname, "fixtures", "util... |
/*
Copyright (c) 2014, Intel Corporation
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaime... |
import Theme from "../model";
const MietenspiegelTheme = Theme.extend({
initialize: function () {
this.listenTo(this, {
"change:isReady": this.setDefaults
});
},
setDefaults: function () {
if (_.isUndefined(this.get("gfiContent")) === false) {
this.set("ready... |
/*
Provides access to Game functions.
Game:
Redis Key:
game:{id}
Redis Schema: (hash)
players (list)
tile_bag
turns (list)
active
Turns:
Redis Key:
game:{game_id}:turns
Redis Schema: (hash)
playerId
word
score
*/
'use strict';
module.exports = {
newGame: n... |
const test = require('ava')
const compile = require('../../helpers/compile')
const { escape } = require('../../..')
test('div[padding]: works with values', async assert => {
var { template } = await compile(`<div padding="15px"></div>`)
assert.deepEqual(template({}, escape), '<div style="padding: 15px;"></div>')
... |
$("#jiedan label input").on("click",function () {
var index=$(this);
var url=index.attr('gurl');
var curtype=$('.dingdannav').attr('curtype');
if (index.is(':checked')) {
curstatus=0;
}else{
curstatus=1;
}
$.post(url, { "curstatus": curstatus,"curtype":curtype },function(result){
if(result.code==1)
{... |
import React from 'react'
import { DS_CONFIG, ALERT_CONFIG } from 'services/consts'
import { Row, Col, Select, Input, Radio, Button, Spin, Modal, Form, AutoComplete, Icon, message } from 'antd'
import { connect } from 'dva'
import get from 'lodash/get'
import uniqBy from 'lodash/uniqBy'
import getMappings from 'utils/f... |
var Hydrogenic = function()
{
this.initialized = false;
this.terminated = false;
this.rendering = false;
hydrogenic = this;
let container = document.getElementById("container");
this.container = container;
var render_canvas = document.getElementById('render-canvas');
this.render_canva... |
import React from "react";
// const Toaster = React.lazy(() => import('./views/notifications/toaster/Toaster'));
// const Tables = React.lazy(() => import('./views/base/tables/Tables'));
//Projects
const CreateProject = React.lazy(() => import("./views/base/events/Create"));
const ManageProject = React.lazy(() => imp... |
/* Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
... |
/** SERVER_RESPONSE.js
This file holds the scripts and functions for the server that need
to receive something from the server. The functions and scripts in
this file only affect the client-side on command of the server.
*/
import * as server from "./server_requests.js";
import * as ui from "./ui.js";
import * as ge... |
/* History */
class History{
constructor(url){
this.current_index = 0;
this.history = [url];
}
removeHistoryFrom(index){
return this. history.splice(index, this.history.length - index);
}
addHistory(url){
if (this.current_index < this.history.length -1){
... |
import React, { useState } from 'react'
//###########Material-UI IMPORT ################//
import Page from 'src/components/Page'
import {
Box,
Button,
Card,
TextField,
MenuItem,
FormControl,
Select,
InputLabel,
Grid,
Container,
makeStyles,
} from '@material-ui/core'
//##########################... |
import { StatusCodes } from "./statuscodes.js";
import { getRandomInt, getRandomEntry, goodGreetings, badGreetings } from "./utils.js";
const correctColor = "#26de81";
const incorrectColor = "#eb3b5a";
const quizHolder = document.querySelector("[data-quiz]");
const startButton = document.querySelector("[data-start]")... |
function GetBehaviorSettings()
{
return {
"name": "Platform",
"id": "Platform",
"version": "1.0",
"description": "Jump and run between platforms (solid objects).",
"author": "Scirra",
"help url": "http://www.scirra.com/manual/100/platform",
"category": "Movements",
"flags": 0
};
};
////////... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const RequestException_1 = require("../exceptions/RequestException");
if (Jumbo.config.jumboDebugMode) {
console.log("[DEBUG] REQUIRE: Locator");
}
const $qs = require("querystring");
const $url = require("url");
const $object = require("j... |
/**
* Created by <NAME> on 15/12/15.
*/
if(typeof(TDG) === 'undefined') {
TDG ={};
}
var render_options = {
suppressMarkers: true,
polylineOptions: {
strokeColor: "#f37254",
strokeWeight: 3
}
};
var directionsDisplay;
var route_directions = function (map, places, el_distance) {
var directionsSe... |
/*!
* blake2s.js - BLAKE2s implementation for bcrypto
* Copyright (c) 2017-2019, <NAME> (MIT License).
* https://github.com/bcoin-org/bcrypto
*
* Parts of this software are based on dcposch/blakejs:
* <NAME> (CC0)
* https://github.com/dcposch/blakejs/blob/master/blake2s.js
*
* Resources:
* https://en.wi... |
/**
* These function will generate the paymentsFiles.
* The output can be transfered to the node for payment of the lessors and the assetHolders if they are involved
*
*/
/** Define constants **/
const request = require('sync-request');
const fs = require('fs');
const wavesFunctions = require('./wavesFunctions');
... |
var default_font = "Times New Roman";
var EditorMenu = function(){
this.tab = "file";
this.editor = "";
this.highlight = false;
this.zooms = [50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 400, 500];
this.current_zoom = -1;
this.bindEv = ()=>{
$(document).on("before_pages_render", this.beforePagesRender... |
var createRaid = function (name, type, isHL) {
return {
name: name,
type: type,
isHL: isHL
};
}
var createDistinction = function (name, type) {
return {
name: name,
type: type
};
}
var raidInfo = {
'300011': createRaid('Griffin (N)', '0', false),
'300021': createRaid('Griffin (H)', '1',... |
let postcss = require('postcss')
let env = require('postcss-preset-env')
// const mergeAdjacentRules = require('postcss-merge-rules')
let removeComments = require('postcss-discard-comments')
let perfectionist = require('perfectionist')
let CleanCss = require('clean-css')
let nesting = require('postcss-nesting')
let pr... |
import React, { useState, useContext, useEffect } from 'react';
import { Link } from 'react-router-dom';
import styled from 'styled-components';
import * as IoIcons from 'react-icons/io';
import { Input, Button } from 'antd'
import Item from './Item';
import { colors, colorsV2 } from '../../styles/variables'
import { r... |
var xlsx = require ( 'xlsx' );
var Excel = require ( 'exceljs' );
var workbook1 = new Excel.Workbook ( );
if ( typeof require !== 'undefined' ) XLSX = require ( 'xlsx' );
var workbook = XLSX.readFile ( 'videoplayer.xlsx', {
cellStyles: true
} );
var worksheet = workbook.Sheets [ 'Playpause' ];
var url = [ ];
module.... |
#!/usr/bin/env node
const minimist = require('minimist');
const LwM2MServer = require('./LwM2MServer');
const UDPSocket = require('./UDPSocket');
const WebSocketServer = require('./WebSocketServer');
const ClientRegistry = require('./ClientRegistry');
const FirmwareUploader = require('./FirmwareUploader');
const Messa... |
class CoinData {
constructor(data) {
this.imgUrl = data.image.small;
this.coins = {
"usd": data.market_data.current_price.usd + " $",
"eur": data.market_data.current_price.eur + " €",
"ils": data.market_data.current_price.ils + " ₪"
};
}
}
function han... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.