text stringlengths 3.22k 29.5k |
|---|
/*
* Copyright 2012, Mozilla Foundation and contributors
*
* 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 applica... |
const config = require('./config.json');
//const request = require('request');
const binance = require('./node-binance-api');
const path = require('path');
const winston = require('winston');
const moment = require('moment');
const stock = require('./stock.js');
const ticker = require('./ticker.js');
const request = re... |
const isProduction = process.env.NODE_ENV === 'production'
const webpack = require('webpack')
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
// DLLPlugin
const CleanWebpackPlugin = require('clean-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
cons... |
/* eslint-disable no-nested-ternary */
import { useState } from "react";
import {
arrayOf,
bool,
func,
node,
number,
oneOfType,
shape,
string
} from "prop-types";
/** @jsx jsx */
import { jsx, css } from "@emotion/core";
import shortid from "shortid";
import LineChart from "../LineChart/LineChart";
// i... |
const express = require('express');
const router = express.Router();
const slug = require('slug');
const dateFormat = require('dateformat');
const mongo = require('mongodb');
const ObjectID = mongo.ObjectID;
// Use database connection from server.js
const dbCallback = require('../server.js').db;
let db;
dbCallback(data... |
// css
import "../css/animate.css";
import "../css/base.css";
import "../css/form.css";
import "../css/main.css";
// modules
const {
valDeviceType,
dropDownView,
eventPropagator,
navBarEffect,
redirectFunc,
} = require("./mods");
// scripts
const SET = require("./set");
// val device type
valDeviceType();... |
import jetpack from 'fs-jetpack';
export const haveALook = () => {
console.log('having a look')
var posts = jetpack.read('app/data/forumText.json','json');
var c = document.getElementById('container'); //root container
console.log('before manipulation, have '+posts.length+' records something like this', po... |
import { API, getCurrentHub } from '@sentry/core/esm';
import { Severity } from '@sentry/types/esm';
import { isFunction, isString } from '@sentry/utils/esm/is';
import { logger } from '@sentry/utils/esm/logger';
import { getEventDescription, getGlobalObject, parseUrl } from '@sentry/utils/esm/misc';
import { deseriali... |
/**
* fixim: default javascript
* @license MIT
*/
/**************************************
* TweetCool Settings
***************************************/
$(document).ready(function() { "use strict";
$('#tweecool').tweecool({
//settings
username : 'collis',
limit : 3
})... |
'use strict';
var combiner = require('stream-combiner2');
var del = require('del');
var fs = require('fs');
var gulp = require('gulp');
var handlebars = require('handlebars');
var path = require('path');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var se... |
// on importe les modèles de données
const db = require("../models");
// package Sequelize
const Sequelize = require("sequelize");
// système de fichiers
const fs = require('fs');
// on initialise la base de données des utilisateurs
const User = db.User;
// on initialise la base de données des posts
const Post = db... |
import PostNodeBuilder from 'soul-editor-kit/models/post-node-builder';
/*
* usage:
* Helpers.postAbstract.build(({post, section, marker, markup}) =>
* post([
* section('P', [
* marker('some text', [markup('B')])
* ])
* })
* )
*/
function build(treeFn) {
let builder = new PostNodeBu... |
var config = require('./config.js');
var EndReason = { serverClose: 0, opponentDisconnect: 1, youWin: 2, opponentWins: 3, youOutOfTime: 4, opponentOutOfTime: 5, youGiveUp: 6, opponentGiveUp: 7 };
var Chessman = { common: 0, key: 1, addCol: 2, delCol: 3, flip: 4 };
var left = 0, right = 1;
function Room(leftPlayer, ri... |
const inquirer = require('inquirer');
const R = require('ramda');
const ora = require('ora');
const { limit } = require('stringz');
const { center, left } = require('wide-align');
const pMap = require('p-map');
const dayjs = require('dayjs');
const cheerio = require('cheerio');
const iconv = require('iconv-lite');
cons... |
'use strict';
const async = require('async');
const http = require('http');
var numberOfConfigNodes = 0; // Holds the total number of configured nodes (usually 1)
//const debug = require('debug')('cmi-config');
module.exports = function (RED) {
const nodeName = 'NODE-RED-CONTRIB-TA-CMI (config): ';
const debug = ... |
const FLOORS = 10;
const ELEVATORS = 2;
const direction = {
UP: "up",
DOWN: "down",
NONE: "none"
}
const doorState = {
CLOSED: "closed",
OPENING: "opening",
OPEN: "open",
CLOSING: "closing"
}
const DEFAULT_ALGORITHM = "First In Line";
const CAPACITY = 12;
class Elevator {
constructor(f... |
import {LitElement, html, css} from "https://unpkg.com/lit-element@2.0.1/lit-element.js?module";
// Array of valid notification types
var types = [
// Make sure icon paths are in top level directory so that icons
// can be seen throughout the library
{type: "success", svg: "./../../../icons/notif-ico... |
var websocket;
function puppeteerInit()
{
generatedInputHandlerFn();
generatedGridFn();
generatedDialFn();
generatedGraphFn();
$(".dropwdowns").selectmenu();
$('.icheck').each(function(){
var self = $(this),
label = self.next(),
label_text = label.text();
... |
var propuestas = null
function CargarPropuestas()
{
$.ajax({
method: "GET",
async:false,
url: location.origin + location.pathname + "/PHP/GetPropuestas.php",
data: { partido: -1, candidato: -1, categoria: -1 }
})
.done(function( msg ) {
propuestas = $.parseJSON(msg);
});
}
function Mo... |
const TableConstructor = require('./tableConstructor').TableConstructor;
const handleBlockFontSize = require('../functions/handleBlockFontSize.js');
const CSS = {
input: 'tc-table__inp',
table: 'tc-table',
inputField: 'tc-table__inp',
cell: 'tc-table__cell',
wrapper: 'tc-table__wrap',
area: 't... |
/*
* Constants
*/
var FPS = 60;
var BALL_SIZE = 10;
var BALL_SPEED = 3;
var PADDLE_HEIGHT = 10;
var PADDLE_WIDTH = 50;
var PADDLE_SPEED = 5;
var ROW = 4;
var COL = 5;
var PADDING = 10;
var BRICK_HEIGHT = 15;
var TOP_OFFSET = 30;
// keeping track of brick locations to detect collision
// if hit = 0, then not hit ye... |
var tape = require('tape'),
weblas = require('../index'),
loader = require('floader'); // browserify aware file loader (xhr in browser)
weblas.test = require('../lib/test');
/* run in a browser with testling
browserify test/*.js | testling -x google-chrome
on Ubuntu, requires
sudo apt-get install xvfb
*/
... |
import { mapActions } from 'vuex';
function getUid(prefix) {
prefix = prefix || '';
return (
prefix +
'xxyxxyxx'.replace(/[xy]/g, c => {
let r = (Math.random() * 16) | 0;
let v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
})
);
}
fu... |
/*
* Copyright IBM Corp. 2016
*
* 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 wr... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy,... |
import React, { Component } from "react";
import { startNFC, stopNFC, isNFCSupported } from "../../helpers/NFCHelper";
import moment from "moment";
import { StyleSheet, ActivityIndicator, View } from "react-native";
import Icon from "react-native-vector-icons/FontAwesome";
import {
Form,
Item,
Input,
Label,
... |
import { mouseMode } from "./controlButtons.js";
import { getFlags, excludeSidebar, blackenSidebar } from "./blocks.js";
import * as VIEWBOX from "./viewbox.js";
export var viewboxStorage;
export var viewbox = [];
/*
* Viewbox class that draws the viewbox
*/
export class Viewbox extends CanvasLayer {
constructor... |
// Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: AGPL-3.0
/* Assumes existence of:
window.jobGraphData = [];
window.jobGraphSeries = [];
window.jobGraphSortedSeries = [];
window.jobGraphMaxima = {};
*/
function processLogLineForChart( logLine ) {
try {
var ... |
let express = require("express");
let router = express.Router();
let ObjectId = require("mongodb").ObjectID;
let Preferences = require("./preferencesModel");
let MemberPreferences = require("../memberpreferences/memberpreferencesModel");
let preferenceController = require('./preferenceController');
var cron = require('... |
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var os = require("os");
var networkInterfaces = os.networkInterfaces( );
var players = [];
var rooms = [];
//var Datastore = require('nedb');
//var db = new Datastore({filename : 'users'});
//db.loadDatab... |
/**
* The whole network
* @param {object} data, including course and relation lists
*/
function Network(data) {
//Initiate course and relation data
this.courses = data.courses;
this.relations = data.relations;
//Initiate the network
this.initiate();
}
Network.prototype.initiate = func... |
"use strict";
const EventEmitter = require("events");
const Promise = require("bluebird");
const udpws = require("udpws").Server;
const Redis = require("ioredis");
const uuid = require("uuid");
const {reflect} = require("./../tools/index.js");
const WSS_MESSAGES_TOPIC_OUT = "udpws:messages:topic:out";
const WSS_ME... |
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {
Animated,
Dimensions,
InteractionManager,
PanResponder,
Platform,
ScrollView,
StatusBar,
... |
'use strict';
import request from 'request-promise';
import schedule from 'node-schedule';
import csv2array from '../components/csv2array';
import { Generation, Installation, Quickbase, sequelize } from '../sqldb';
import config from '../config/environment';
module.exports = {
scheduleJobs: scheduleJobs
};
const L... |
// Template for webpack.config.js in Fable projects
// Find latest version in https://github.com/fable-compiler/webpack-config-template
// In most cases, you'll only need to edit the CONFIG object (after dependencies)
// See below if you need better fine-tuning of Webpack options
// Dependencies. Also required: core... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import compose from 'recompose/compose';
import Grid from '@material-ui/core/Grid';
import { withStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import ButtonBase from '@material-ui/core/But... |
import {
all,
put,
select,
takeEvery,
race,
call,
take,
takeLatest,
} from 'redux-saga/effects';
import { DELETE_RANGE } from '../constants/range';
import { loadProjectState, parseMarkers } from '../utils/iiifLoader';
import { actions as undoActions } from 'redux-undo-redo';
import {
PROJECT,
IMPORT... |
class Dof6robotarm{
//linkLength:[l0,l1,l1_2,l2,l3,l4,l5,l6]
//linkLimit:[[s1_min,s1_max],[s2_min,s2_max], ....[s6_min,s6_max]]
constructor(linkLength,homeAngel=0,linkLimit=0,advanse = false){
//todo 配列でない値が入った場合の例外処理
if(advanse == true){
if(linkLength.length < 8 ){
... |
import {weightedRandom} from '../randomizer/weightedRandom';
export class ItemList {
constructor(
id,
name,
{
active = true,
weight = 1,
numToPick = 10,
numToPickRecursive = false,
pickUnique = true,
pickUniqueRecursive... |
import { setSimulationConfig } from 'Actions/actions'
import { extractCategories } from 'Components/publicodesUtils'
import { buildEndURL } from 'Components/SessionBar'
import Simulation from 'Components/Simulation'
import SimulationResults from 'Components/SimulationResults'
import TopBar from 'Components/TopBar'
impo... |
// JavaScript Document
$(document).ready(function(){
//首页 我的小美
$(".sea_w").hover(function(){
$(".sea_xl").show();
},function(){
$(".sea_xl").hide();
});
$(".msg_nav_right ul li").hover(function(){
$(this).css({"width":"auto"},300);
},function(){
$(".msg_nav_right ul li").css({"width":"28px"},300)... |
import { async } from "regenerator-runtime";
const errorMessage = document.querySelector("#errorMessage");
const explainLabel = document.querySelector("#newPosterExp");
const chooseTopicLabel = document.querySelector("#chooseTopic");
const posterTitleInput = document.querySelector("#posterTitle");
const posterDescrip... |
var settings = {
'status': false,
'step': 0,
'time': 2 * 1000,
'modes' : [],
'players' : [],
'playlist' : {
'modes' : [],
'players' : []
},
'audioPlayer' : null,
'timeout' : null
};
var availableModes = [
{name: "Comandante", action: 'commander'},
{name: "Guarda Costa", action: 'bodyguard'}
];
var avai... |
import Ajv from 'ajv';
import {isDevelopment} from './flags.js';
import schema from './schema.json';
import SubscriptionManager from './SubscriptionManager';
const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
const validator = ajv.compile(schema);
const trackedValues = {};
function getValueOrMak... |
function shuffle(array) {
var m = array.length, t, i;
// While there remain elements to shuffle…
while (m) {
// Pick a remaining element…
i = Math.floor(Math.random() * m--);
// And swap it with the current element.
t = array[m];
array[m] = array[i];
array[i] = t;
}
return array;
}... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, StatusBar } from 'react-native';
import { connect } from 'react-redux';
import Modal from 'react-native-modal';
import FastImage from 'react-native-fast-image';
import StarRating from 'react-native-star-rating';
import {
Text... |
'use strict'
// Put some instructions here about how to generate credentials and enable google API
/** TODO
* Delete files after upload
* Only upload if folderId not in parents
*
* Overture User Token: <KEY>
* Google Auth Code: 4/qQHO8KFOqRTRCTI8PKc0E_YGHjJZNb578XOkfXaI7L4zU2r6h_uf8iY
* Driver Folder ... |
var chara1 = AssetData.chara1;
var mapAssetName = AssetData.mapAssetName;
var walkSpeed = 4;
var isAndroid = navigator.userAgent.toLowerCase().indexOf('android') != -1;
var Player = function(game) {
var bear = new Sprite(32, 32);
bear.image = game.assets[chara1];
bear.frame = [1,1,2,2,1,1,0,0]; // select spr... |
import { Accordion, Button, Container, Content, Text, ListItem, CheckBox, Body } from 'native-base';
import React from 'react';
import { StyleSheet, TouchableOpacity, View, TextInput, KeyboardAvoidingView, Picker } from 'react-native';
import GlobalHeader from '../../components/GlobalHeader';
import colors from '../../... |
import {
Dropdown,
Form,
post,
valueMissing,
typeMismatch,
badInput,
stepMismatch,
rangeUnderflow,
rangeOverflow,
tooLong,
findParentWithClass,
FilteredPaginator,
Viewer,
setupFormDialogEditor, FormDialog, setupEditorDialog, get,
} from "./formv2.js";
export function embedVideo(video) {
i... |
/**
*
* @param {object} canvas the canvas object (dom element)
* @param {string} chartType the type of chart to be rendered
* @param {object} data the data to be rendered
*/
const renderChart = (canvas, chartType, data) => {
const chart = new Chart(canvas, {
type: chartType,
data,
options: {}
});
}... |
const path = require('path');
module.exports.LAYOUT_FILES_DEFAULT = [
'footer.md',
'head.md',
'header.md',
'navigation.md',
'styles.css',
];
module.exports.LAYOUT_SCRIPTS_DEFAULT = '// eslint-disable-next-line no-undef\n'
+ 'MarkBind.afterSetup(() => {\n'
+ ' // Include code to be called after MarkBind... |
import React from 'react';
import ReactDOM from 'react-dom';
import * as THREE from 'three';
import {WebGL2Renderer} from 'three/src/renderers/WebGL2Renderer';
THREE.WebGL2Renderer = WebGL2Renderer;
import Stats from 'stats.js';
import {EffectComposer} from './libs/EffectComposer';
import RenderPass from './libs/Render... |
/* Copyright IBM Corp. 2014
*
* 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 wr... |
(function () {
'use strict';
window.addEventListener(
'load',
function () {
document.getElementById('formulario1')?.addEventListener(
'submit',
(e) => {
let cedula2 = document.getElementById('cedula2')?.value;
// Validacion de cedula2
if (cedula2 != undefined) {
if (cedula2.length... |
"use strict";
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
_ = require('lodash'),
timestamps = require('mongoose-timestamp'),
versioner = require('mongoose-versioner'),
// mongoosastic = require('mongoosastic'),
Schema = mongoose.Schema;
var DataTable = require(... |
import React from "react";
import PropTypes from "prop-types";
import { useCubeQuery } from "@cubejs-client/react";
import CircularProgress from "@material-ui/core/CircularProgress";
import * as d3 from "d3";
import Typography from "@material-ui/core/Typography";
import Table from "@material-ui/core/Table";
import Tabl... |
active_pollid = null;
poll_info = null;
poll_results = [];
poll_queue = [];
poll_queue_wait = [];
want_fast_poll_update = false;
function update_poll_info() {
$("#bin-num").html("Poll " + active_pollid.toString());
$.ajax({
url: key + "poll/" + active_pollid.toString(),
success: function(data) {
$.ajax({
... |
const path = require('path');
const fs = require('fs-extra');
const glob = require('glob');
const { CLIEngine } = require('eslint');
const stylelint = require('stylelint');
const markdownlint = require('markdownlint');
const { execSync, spawnSync } = require('child_process');
const log = require('../utils/log');
const... |
import React from 'react'
import PropTypes from 'prop-types'
import debug from './debugHelpers'
import getDiff from './diff'
import { getHash } from './hash'
import getInitialState from './getInitialState'
import {
flattenSections,
formOnChangeDepMap,
formVisibilityDepMap,
getStateOfDependants
} from './reducer... |
import CONFIG from "./config.js";
import Player from "./Player.js";
import LV3 from "./Level3.js";
const width = 16;
const height = 16;
let player = null;
let playerX = 1;
let playerY = 13;
let playerType = "bead";
let ground = null;
let unlocked = false;
let loop_id = null;
let played = false;
let platform = nul... |
/*
* Copyright (c) 2016, tCell.io, Inc.
* 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
* list of conditi... |
/**
* @license
* Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U
*
* 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
*
* Unles... |
//Configure the API endpoints that you want to check here...
//Please make sure that those endpoints allow crossdomain calls, or be sure
//to host this site in the same domain as your API (and set `document.domain` correspondingly)
var apis = {
github : {
title: 'Github Public API (not our own but we couldn... |
import config from './config'
import request from './request'
import lodash from 'lodash'
import validators from './validators'
import { Toast } from 'antd-mobile';
var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
var DEFAULT_PATTERN = 'yyyy-MM-dd';
function padding(s, len) {
var len = len - (s + '').length;
for (var i = 0; ... |
/* choona.js 1.3
(c) 2011-2013 <NAME>, <EMAIL>
choona.js is distributed under the MIT license.
For all details and documentation:
https://github.com/nsisodiya/choona.js
For demos using Choona.js
http://nsisodiya.github.com/Demo-Scalable-App/
Change Log
1.3 Remo... |
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
import Paper... |
const {cleantext, rndrsp} = require('./shared.js');
const rules = require('./rules.js');
const fs = require('fs-extra');
const path = require('path');
const API = require('./database/database.js').default;
import {rate_card} from './database/rate';
import {full_art, find_card, display_card, read_card} from './database/... |
'use strict';
var calcs = require("./utils/tieredLeakageCalcs");
var dateUtils = require("./utils/dateUtils");
module.exports = function(T2comppgtrendperf) {
T2comppgtrendperf.processChild = function(req, filter, cb) {
this.process(req, filter, function(err, message){
if (err) {
return cb(... |
import { OshuQueueCommon, OshuQueueStatus, OshuSubscriberStatus, OshuQueueBasicAuth, OshuQueueAuthEnvelope, SEA } from './queue_common.js';
import { OshuQueueMessage } from './queue_message.js';
import { OshuJobMessage } from './job_message.js'
import { v4 as uuidv4 } from 'uuid';
export class OshuQueueOrchestrator ex... |
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const webpack = require('webpack');
const ManifestPlugin = require('webpack-manifest-plugin');
const WorkboxPlugin = require('workbox-webpack-plugin');
const ReactLoadableSSRAddon = require('react-loadable-ssr-addon');
const ... |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var DocumentNatives = requireNative('document_natives');
var ExtensionOptionsEvents =
require('extensionOptionsEvents').ExtensionOptionsEvents;
var Gu... |
export { default as debounce } from 'debounce';
export { default as fetch } from './fetch';
import * as load from './load';
import { render, install } from './render';
import * as equivs from './equivs';
import VHE from './VirtualHTMLElement';
window.VirtualHTMLElement ||= VHE;
const baseElements = window.Pageboard?.... |
var budgetController = (function() {
var Income = function(id, description, value) {
this.id = id;
this.description = description;
this.value = value;
};
var Expense = function(id, description, value, percentage) {
this.id = id;
this.description = description;
this.value = value;
this... |
var colors = {
BUILDING: 0xE8E8E8,
GROUND: 0x81A377,
TREE: 0x216E41,
WHITE: 0xffffff,
BLACK: 0x000000,
DARK_BROWN: 0x545247,
LIGHT_BROWN: 0x736B5C,
GREY: 0x999999,
WATER: 0x4B95DE,
TRAIN: 0x444444,
CARS:[
0xCC4E4E
]
};
var nb_urls = 10000;
//basic city options
city = {
//height of bedrock layer
base... |
const chalk = require('chalk');
const Generator = require('yeoman-generator');
const mkdirp = require('mkdirp');
const packagejs = require('../../package.json');
module.exports = class extends Generator {
get initializing() {
return {
init(args) {
if (args === 'default') {
... |
import React, { Component } from 'react'
import {connect} from 'react-redux';
import {Field, FieldArray, reduxForm, formValueSelector} from 'redux-form/immutable';
import {RadioButton} from 'material-ui/RadioButton';
import MenuItem from 'material-ui/MenuItem';
import { push } from 'react-router-redux';
import { create... |
(function ($) {
$(document).ready(function () {
referencewidget_lookups();
$(".reference_multi_item .deletebtn").live('click', function () {
var fieldName = $(this).attr("fieldName");
var uid = $(this).attr("uid");
var existing_value = $("input[name^='" + fieldName + "_uid']").val()
// It's true: the... |
$(document).ready(function(){
$('.utils2 span').css({'right': fix.utils2span_right});
});
var oldusername;
var oldwebsite;
var oldlocation;
var oldbirth;
var oldrealname;
var oldaboutme;
var genderChecked = null;
var genderChanged = false;
$(document).on("click", "span.editusername,span.editp... |
/*
Copyright (c) 2013 Mirantis 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.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
import axios from 'axios';
import {cacheAdapterEnhancer, Cache} from 'axios-extensions';
import stripZeros from 'pretty-num/src/strip-zeros.js';
import {COIN_NAME, EXPLORER_API_URL} from "~/assets/variables";
import addToCamelInterceptor from '~/assets/to-camel.js';
import {addTimeInterceptor} from '~/assets/time-offse... |
jQuery.noConflict();
// 获取订单列表
function getOrderList(){
$('#Load').show();
loading = true;
var param = {};
param.type = $('#type').val();
param.pagesize = 10;
param.page = Number( $('#currPage').val() ) + 1;
// console.log(param)
$.post(WST.U('mobile/orders/getOrderList'), param,... |
const db = require('../db/db-connection')
const query = require('../queries/queries')
const fs = require('fs')
// Get all products
function getUserProducts(req, res) {
let { getProducts } = query.product
db.query(getProducts, (err, products) => {
return err ? res.status(500).send({ message: `Error getting the p... |
// 依赖
// -----------------------------------
/*@require task:toolbar.less*/
/*@require task:task.less*/
// Backbone
var Backbone = require('backbone');
// jQuery
var $ = Backbone.$;
// Underscore
var _ = require('underscore');
// 日志
var log = require('log');
// CEF API
var cefAPI = require('common:libs/cefAPI');
// 超... |
var PIXI = require('pixi.js/bin/pixi.dev.js');
var animate = require('app/util/animate');
var events = require('app/util/events');
var retinaInlineSprite = require('app/util/retinaInlineSprite');
var recordImage = require('url?limit=10000!app/images/record-button.png');
var checkmarkImage = require('url?limit=10000!app... |
/*
Copyright (c) 2021, <NAME>, <NAME>,
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
*/
// Provides a unique id to the buttons created in askUserFeedback()
var binCount = {... |
const GAME_ITEM_NAME = "itemGame";
const GAME_STRIP_NAME = "gamestrip";
const GAME_NAME = {
45: "rqznn"
}
glGame.baseclass.extend({
properties: {
//游戏分类
nodeRoomList: cc.Node,
nodeGameRecord: cc.Node,
nodeRoundRecord: cc.Node,
//游戏选择
gameitem: cc.Node,
ga... |
var keepClassOpen = false;
$('#intelligentModal').on('shown.bs.modal', function() {
$('body').addClass('modal-open');
});
// Slider init values
var set1SlidersInitValue = 50;
var set2SlidersInitValue1 = 40;
var set2SlidersInitValue2 = 70;
var set3SlidersInitValue = 50;
var make_intelligent_slider_bar = function(... |
import { QinoqMorph } from '../qinoq-morph.js';
import { animatedPropertiesAndTypes, getColorForProperty, notAnimatableOnLabelMorphWithIcon, notAnimatableOnTextMorph } from '../properties.js';
import { VerticalLayout, Icon, ShadowObject, Label } from 'lively.morphic';
import { pt } from 'lively.graphics';
import { CONS... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.watcherIgnoreRegExp = void 0;
var _path = require("path");
var _fs = require("fs");
var _mkdirp = _interopRequireDefault(require("mkdirp"));
var _chokidar = _interopRequireDefault(require("chokidar"));
var _as... |
const Discord = require("discord.js")
const client = new Discord.Client()
const config = require("./config.js")
const a = require("./config.js")
const fs = require("fs")
const db = require("quick.db")
const moment = require("moment")
require("moment-duration-format")
require('./util/Loader.js')(client)
cl... |
/* eslint-disable no-console */
'use strict';
const groupBy = require('lodash/groupBy');
const aws = require('@cumulus/aws-client/services');
const { getS3Object, parseS3Uri } = require('@cumulus/aws-client/S3');
const DynamoDbSearchQueue = require('@cumulus/aws-client/DynamoDbSearchQueue');
const DEFAULT_DEPLOYMENT... |
/* String Prototype additions */
String.prototype.lTrim = function (char) {
if(char != null)
return this.replace(new RegExp('^'+char+'*'), "");
else
return this.replace(/^\s*/, "");
};
String.prototype.rTrim = function (char) {
if(char != null)
return this.replace(new RegExp(char+'*$'), "");
else
return this.r... |
var wpbs = jQuery.noConflict();
function showLoader($this){
$this.find('.wpbs-loading').fadeTo(0,0).css('display','block').fadeTo(200,1);
$this.find('.wpbs-calendar ul').animate({
'opacity' : '0.7'
},200);
}
function hideLoader(){
wpbs('.wpbs-loading').css('display','none');
}
function... |
import { useRef, useEffect } from "react";
import MainContent from "@/components/main_content";
import Sidebar from "@/components/sidebar/sidebar";
import NavBar from "@/components/navbar";
import { getTree, getPaths } from "@/lib/tree";
import { getPostData } from "@/lib/lecture";
import Head from "next/head";
import ... |
import React, {Component} from "react";
import PanelContainer from "./panel-container";
import Panel from "./panel";
import ContactItem from "./panel-items/contact";
import GroupItem from "./panel-items/group";
import {uid} from "./util";
import MessageWindow from "./message-window";
import constants from "./constants"... |
/* -------------------------------------------- Cambio de imagen para resaltar en evento hover áreas temáticas --------------------------*/
function imgResaltaAreasTema(nombreImg){
var idImagen = "img" + nombreImg;
var rutaImagen = "imagenes/red/areasTematicas/" + nombreImg + "Over.png";
document... |
function safeCustomElement(tag, constructor, prototype){
prototype = prototype || constructor.prototype;
var Element = function(){
var result;
if(typeof Reflect !== "undefined") {
result = Reflect.construct(HTMLElement, [], new.target);
} else {
result = HTMLElement.apply(this, arguments);
}
construct... |
'use strict';
import { Rasterizer } from './pixel';
import { FieldModifier } from './modifier';
import { Eroder } from './erosion';
import { CityPlacer } from './cities';
import { TerrainGenerator } from './terrain';
import { LanguageGenerator } from '../../language/language';
import { N... |
const mysql = require('mysql');
const inquirer = require('inquirer');
const consoleTable = require('console.table');
const colors = require('colors');
// create the connection information for the sql database
const connection = mysql.createConnection({
host: 'localhost',
// Your port; if not 3306
port: 3306,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.