text stringlengths 3.22k 29.5k |
|---|
/* eslint-disable ts-immutable/no-reject */
//This file extracts all packages used in webpack (plus hardcoded ones) into a file to be used on the third-party
//attribution page!+
//Note: This file logs to stderr, as the stdin output is piped into a file.
console.error('generateLicenseAttributionsList started');
con... |
/**
* 地址搜索组件
*/
import React, { Component } from 'react';
import { Select, message, Icon } from 'antd';
import PropTypes from 'prop-types';
import { DrawPointMapTool } from '../Map/common/maptool/DrawPointMapTool';
import { baiDuAddrSearch, transData, translateMtoB } from '../../services/api';
import { v2 } from '..... |
var misc = {
"ANALISA KEPUTUSAN UJIAN & PEPERIKSAAN BAGI TAHUN":"ANALYSIS OF TEST & EXAMINATION RESULTS FOR THE YEAR",
"PEPERIKSAAN PERCUBAAN SPM":"SPM TRIALS",
"No. KP": "IC No.",
"Jantina": "Gender",
"LELAKI": "MALE",
"PEREMPUAN": "FEMALE",
"Bil": "No.",
"SLIP KEPUTUSAN": "RESU... |
import React, { Component } from 'react';
import ToolTip from './ToolTip';
import { PieChart } from 'react-easy-chart';
import { Scrollspy } from 'react-scrollspy';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Actions from '../../DataStore/Actions';
import NavbarWithOutUp... |
// RK9
//made by michengs
let notice_guide = true;
let player, entity, library, effect;
let power = false;
let Level = 0;
let notice = true;
let powerMsg = null;
let steptwo = false ;
function guid_voice(handlers) {
if(notice_guide) {
handlers['text']({
"sub_type": "message",
"delay": 2000,
"message_RU": "Слой', ... |
'use strict';
const { exec } = require('child_process');
const fs = require('fs');
const os = require('os');
const yaml = require('js-yaml');
const config = require('../config/');
const dirToJson = require('dir-to-json');
const _ = require('lodash');
// create`base.yaml` - static file that is always needed by docke... |
const sqlite3 = require('sqlite3').verbose();
const db = new sqlite3.Database('./data/servers.sqlite');
const fs = require('fs');
const unirest = require('unirest');
const quotes = require('./data/quotes.json');
const Discord = require('discord.js');
if (process.argv[2] && process.argv[2] === '--travis') var config = r... |
import axios from 'axios'
// import { Message, MessageBox } from 'element-ui'
// import store from '../store'
// import { getToken } from '@/utils/auth'
// cookies
import NProgress from 'nprogress'
import Cookie from 'js-cookie'
import router from '@/router'
import store from '../store'
import { Message } from 'element... |
//listen.js; a pure javascript event system with set, listen, fire, send, release, etc.
//I will pair a method to an attribute on a given object such that if the set function
//is called to change that attribute the method will be called with the object changed and the attr's new value
//the boundobject parameter can... |
//
// User
// (づ。◕‿‿◕。)づ
//
// Related to the user layer.
const SECRET_KEY_LOCATION = "AUTH_SECRET_KEY"
// Crypto
// ======
app.ports.fabricateSecretKey.subscribe(event => {
keyFromPassphrase(event.data)
.then(data => toCache(SECRET_KEY_LOCATION, data))
.then(_ => {
app.ports.fromAlien.send({
... |
import React, { Component } from 'react';
import {
View,
Text,
Image,
StyleSheet,
ScrollView,
Dimensions,
TouchableOpacity,
FlatList,
Button,
SectionList
} from 'react-native';
import {SearchBar } from 'antd-mobile-rn'
import ParkHeader from '../common/header/header';
import List... |
/* eslint-disable camelcase */
/*
* NOTE: Running this module will cause side-effects to happen!
*
* This module is meant specifically for browser environments! If you are using
* another environment (Node JS, React Native, etc...), please use the newer
* version of this API.
*/
if (typeof window === 'undefined... |
import { intitGame } from './utils/DuckEngine.js';
import { collisionRect } from './utils/collision.js';
import { randomBetween } from './utils/functions.js';
import { spriteSheets } from './utils/gameInfo.js';
import { Cell } from './classes/Cell.js';
import { Mouse } from './classes/Mouse.js';
import { Defender } fr... |
#!/usr/bin/env node
/*
* nct (namecointool)
* Copyright © 2015-2016 <NAME>
*
* Usage of the works is permitted provided that this instrument is
* retained with the works, so that any entity that uses the works is
* notified of this instrument.
*
* DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
*/
var fs = requir... |
var APP = APP || {};
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
APP... |
'use strict';
const api = require ('./auth/api');
const ui = require ('./auth/ui');
const winner = function () {
for (let i = 1; i <= 3; i++) {
//horizontally X
if($("#R" + i + "C1").text() === "X" && $("#R" + i + "C1").text() === $("#R" + i + "C2").text() &&
... |
// import React from 'react';
import React, { Component } from 'react';
import axios from "axios";
import './comiteesetup.css';
import { AiFillSave } from "react-icons/ai";
import { BiReset } from "react-icons/bi";
import { IconContext } from 'react-icons';
import Branchdrop from './Branchdrop';
import Somiteedrop from... |
"use strict";
const serviceConfig = require('../../../app/lib/serviceConfig.js');
const { ServiceBroker } = require("moleculer");
const { ValidationError } = require("moleculer").Errors;
const { MoleculerClientError } = require("moleculer").Errors;
describe("Test 'Stats' service", () => {
let broker;
beforeEach(asy... |
// /**
// *
// * You can write your JS code here, DO NOT touch the default style file
// * because it will make it harder for you to update.
// *
// */
// //"use strict";
// $.fn.serializeObject = function() {
// var o = {};
// var a = this.serializeArray();
// $.each(a, function() {
// if (o... |
/*
Copyright Netfoundry, 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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distri... |
'use strict';
/** @namespace LuckyStar */
var LuckyStar;
(function (LuckyStar) {
'use strict';
LuckyStar.devkit_WebApiApi = function (e) {
var EMPTY_STRING = '';
var f = '@OData.Community.Display.V1.FormattedValue';
function webApiField(entity, logicalName, schemaName, entityLogicalCollectionName, entity... |
'use strict';
var yeoman = require('yeoman-generator');
var yosay = require('yosay');
var path = require('path');
var chalk = require('chalk');
var banner = require('./banner');
var request = require('request-promise');
var filterComponents = require('./lib/filter-components');
var updateNotifier = require('./lib/noti... |
/** booru.js - Image boards n' boorus n' stuff. */
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
const CommandBlock = require("../../modules/CommandBlock");
const { sleep, gitinfo, unescapeHTML } = require("../../modules/miscellaneous");
const log = require("../../modules/log");
... |
"use strict";
var routes = require('../routes.js');
var WebSocket = require('ws');
var Player = require('../model/Player.js');
var Game = require('../model/Game.js');
var LobbyController = require('./LobbyController.js');
var AccountController = require('./AccountController.js');
var aiInterface = require('../aiInter... |
/* Builds a Consentacles project */
const fs = require('fs');
const pkg = require('../../package.json');
const gulp = require('gulp');
// require('./gulpfile.js');
/* Local packages */
const log = require(__dirname + '/../logging');
const util = require(__dirname + '/../utility');
const CError = require(__di... |
'use strict';
import DDSnmpExporter from '../ddsnmp/index.js'
import http from 'http'
import { env, stdout } from 'process'
import { InfluxDB, flux, Point } from '@influxdata/influxdb-client'
import { HealthAPI } from '@influxdata/influxdb-client-apis'
import * as fs from 'fs'
const stringConstructor = "".constructor;... |
import React from "react"
import { Link, graphql } from "gatsby"
import Layout from "../components/layout"
import styled from "styled-components"
import IdeaUpElectronicsIcon from "../components/icons/idea-up-electronics-icon"
import IdeaUpAstronomyIcon from "../components/icons/idea-up-astronomy-icon"
import IdeaUpPho... |
import React from 'react';
import { View, Text, TextInput, Alert, Image, StyleSheet } from 'react-native';
import { Button, CheckBox } from 'react-native-elements';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
import { Formik } from 'formik';
import * as yup from 'yup';
import { co... |
/*jshint esversion: 6 */
/**
* show an image when a preview is clicked
*
* @param imagePath
*/
function showImage(imagePath) {
/*
* Create and position overlay frame
*/
// -- create the frame
var frame = $("<div/>").attr('id', 'imgFrame');
// -- get and set top position of the frame
var t... |
const config = require( '../../../config' );
const backend = require( '../../../lib/backend-service' );
const Form = require( '../../../lib/Form' );
const FormProcessor = require( '../../../lib/FormProcessor' );
const urls = require( '../../../lib/urls' );
const validators = require( '../../../lib/validators' );
const ... |
/*
* YamlResourceFileType.js - manages a collection of yaml resource files
*
* 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.o... |
import React from 'react'
import Paper from '@material-ui/core/Paper'
import TextField from '@material-ui/core/TextField'
import MenuItem from '@material-ui/core/MenuItem'
import Chip from '@material-ui/core/Chip'
import axios from '../../../../api'
import Snackbar from '@material-ui/core/Snackbar'
import MuiAlert from... |
/* eslint-env mocha */
'use strict'
const chai = require('chai')
const dirtyChai = require('dirty-chai')
const expect = chai.expect
chai.use(dirtyChai)
const parallel = require('async/parallel')
const Peer = require('peer-info')
const TCP = require('libp2p-tcp')
const WebSockets = require('libp2p-websockets')
const p... |
'use strict';
var imports = require('soop').imports();
var bitcore = require('bitcore');
var util = bitcore.util;
var Transaction = bitcore.Transaction;
var Builder = bitcore.TransactionBuilder;
var Script = bitcore.Script;
var buffertools = bitcore.buffertools;
function TxProposal(opts) {
... |
import React, { Component } from 'react';
import { View, StyleSheet, FlatList, ActivityIndicator, Image } from 'react-native';
import { connect } from 'react-redux';
import { Button } from 'react-native-elements';
import { MainText, Popup, ProfilePost, ProfileHeader, GreenButton } from 'components';
import { Colors, M... |
const path = require('path')
const util = require('util')
const async = require('async')
const fs = require('fs')
var first_line_is_for_labels = true
const ES_CREDENTIALS = process.env.ES_CREDENTIALS
const INDEX = process.env.INDEX
const SOURCE = process.env.SOURCE
// const BULK_SIZE = 507
const BULK_SIZE = 2000
cons... |
const Path = require('path')
const { Readable, Writable, Duplex } = require('stream')
const uuid = require('uuid')
const debug = require('debug')('impress:peer')
const IncomingMessage = require('./incoming-message')
const ServerResponse = require('./server-response')
const Initiator = require('./initiator')
const E... |
var { getFirstMatche, getAllMatches, doesMatch, urlSlice} = require("./util");
var httpMethods = ["GET", "HEAD", "PUT", "POST", "DELETE", "OPTIONS", "PATCH", "TRACE", "CONNECT", "COPY", "LINK", "UNLINK", "PURGE", "LOCK", "UNLOCK", "PROPFIND", "VIEW"];
/**
* Adds routes against the given method and URL
* @param {st... |
//Setup
var readyAudio = new Audio('Ready.wav');
var hitAudio = new Audio('hit.mp3');
var healAudio = new Audio('blessing.ogg');
var gameoverAudio = new Audio('gameover.mp3');
var consoleIndex=1;
var units = new Array();
var score = 0;
var round = 1;
var dead = 0;
//Defining a unit ... |
AFRAME.registerComponent('festival', {
init: function () {
initFestival()
}
});
const initFestival = () => {
this.exposure = 0
this.MAX_EXPOSURE = 3
this.HEAL = 'heal'
this.ENEMY = 'enemy'
this.MALE = 'male'
this.FEMALE = 'female'
document.getElementsByClassName('maleEnemyT... |
// url
var listData = BASE_URL+"products/jsonDatatable";
var json_update = BASE_URL+"products/json_update/";
var ajax_delete = BASE_URL+"products/delete_pr/";
var ajax_create = BASE_URL+"products/create/";
var ajax_update = BASE_URL+"products/update/";
var image_link = '';
$(document).ready(function() {
var table =... |
"use strict";
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
require('./vlib.site.min');
import Vue from 'vue';
import ... |
///////////////
// Constants //
///////////////
// https://vis4.net/labs/multihue/#colors=white, yellow, deeppink, darkred|steps=25|bez=1|coL=1
var POSSIBLE_COLORS = ['#ffffff', '#fff8c6', '#ffedac', '#ffe29b', '#ffd88f', '#ffcb86', '#ffbf7f', '#ffb379', '#fda873', '#fa9c6f', '#f6916a', '#f28666', '#ed7b62', '#e86f5e'... |
String.prototype.startWith=function(str){
if(!str) {return false;}
return this.substring(0,str.length) == str;
}
String.prototype.endWith=function(str){
if(!str) {return false;}
return this.substring(this.length - str.length) == str;
}
function initTree() {
var _$tree = $('#tree').ztree_toc({
... |
var APP_VERSION = "0.5 α";
var app = null;
var idleSince = Date.now();
//********8//
class MicertifyApp {
constructor( api ) {
this.version = APP_VERSION;
this.api=api;
this.api.app=this;
this.codes = this.GetUICodes();
this.focused = null;
this.focusEvent = null;
this.blurred = null;
this... |
const { MessageEmbed, Collection } = require("discord.js");
const fetch = require("node-fetch");
const { Octokit } = require("@octokit/rest");
const github = new Octokit();
const moment = require("moment");;
const flags = [
"--user",
"--org",
"--repo",
"--topic"
]
module.exports = {
name: "github"... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.defaultMenu = exports.defaultSettings = exports.defaultCategories = void 0;
var chrome = require('../../../static/logos/chrome.svg');
var bookmark = require('../../../static/logos/bookmark.svg');
var history = require('../../../s... |
const path = require("path");
const fs = require("fs");
const request = require("request");
const UserAgent = require("user-agents");
const snek = require("node-superfetch");
const cheerio = require("cheerio");
const fetch = require("node-fetch");
const IS_PROD = process.env.ENV === "production";
const ERROR_MESSAGE =... |
const solanaWeb3 = require('@solana/web3.js');
//import { BigNumber } from "bignumber.js";
const BigNumber = require('bignumber.js');
const fs = require('fs');
const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
let pubkey = new solanaWeb3.PublicKey(process.argv[2]);
let con = new solanaWeb3.Con... |
/* eslint-disable */
var __decorate =
(this && this.__decorate) ||
function (decorators, target, key, desc) {
var c = arguments.length,
r =
c < 3
? target
: desc === null
? (desc = Object.getOwnPropertyDescriptor(target, key))
: desc,
d;
if (typeo... |
// -*- js-var: set_line_item, base_path, li_titles, li_values, tax_weight; -*-
// $Id: uc_taxes.js,v 1.9.2.10 2009/01/16 22:12:40 rszrama Exp $
/**
* Calculate the number of bytes of a Unicode string.
*
* Gratefully stolen from http://dt.in.th/2008-09-16.string-length-in-bytes.html.
* Javascript String.length retu... |
/* keys API const variables */
const GOOGLE_KEY = "<KEY>";
const FOURSQUARE_CLIENT_ID = "DZLST0K0VKC4EAVMB3QOPM0DEDXBH0ILLAMKG0NRO5LPCPHR";
const FOURSQUARE_CLIENT_SECRET = "<KEY>";
var locationInfowindow;
var map;
/* Map initialization */
function initMap() {
// Constructor creates a new map
map = new google.ma... |
/* LICENSE
_This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._
BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License");
- you may not use this software except in complianc... |
var preguntas,
usuarioId,
partidaId,
categoriaId,
puntos,
vidas,
objRuleta,
winningSegment,
distnaciaXm,
distnaciaY,
ctx,
correcta,
tiempo;
function inicioPag() {
preguntas = JSON.parse(document.getElementById("datosJuego").dataset.preguntas);
usuarioId ... |
/*-
*
* Hedera Mirror Node
*
* Copyright (C) 2019 - 2022 Hedera Hashgraph, 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-... |
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");
const { exec } = require("child_process");
/** @see [promisify]{@link https://nodejs.org/dist/latest-v8.x/docs/api/util.html#util_util_promisify_original} */
const { promisify } = require("util");
/** @see [enquirer]{@link https://www.npmjs.com... |
// Programmer: <NAME>
// Mac App Store
// purchased.js
// Original HTML content
var head_og = "<div id='head'> <div class='head_txt' id='head_one' draggable='false'> <img draggable='false' style='margin-right: 8px;' src='Images/logo.png' alt='logo' height='30px'> Mac App Store </div> <a href='home.html' draggab... |
/*
* Copyright 2020 The caver-js-ext-kas Authors
*
* 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 ... |
import { withRouter } from "react-router-dom";
import React from "react";
import { connect } from "react-redux";
import ReactDOM from "react-dom";
import { Link } from 'react-router-dom';
import { Button, FormGroup, Label, Input } from "reactstrap";
import CsvParse from "@vtex/react-csv-parse";
import { addClass, ad... |
import React, {Component, Fragment} from 'react';
import styled from 'styled-components';
import {BaseContainer} from '../../helpers/layout';
import {LogoutButton} from '../../views/design/Button';
import {ChooseWord,ActiveCardContainer,Number,Word} from "../../views/design/InGame/CardsUI";
import {Phase,PhaseCircle,Ph... |
///http://msdn.microsoft.com/en-us/library/bb643323.aspx 10.2 for asf guids the super non intuitive guid to hex is below
'use strict';
var inherits = require('util').inherits
, binary = require('./binaryHelpers')
, Tokenizr = require('stream-tokenizr')
, _ = require('lodash');
var enc = 'utf16'
, magicWord = ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertParameterInline = exports.convertParameter = exports.convertFunctionCall = exports.convertTrigger = void 0;
const eca_1 = require("../../../parsers/w3x/wtg/eca");
const parameter_1 = require("../../../parsers/w3x/wtg/paramet... |
/*
reference: https://en.wikipedia.org/wiki/Tree_traversal
*/
import is from "./validators";
import Node from "./node";
import BSTCore from "./core";
import { permanent, constant } from "./object-attributes";
// save private attributes outside of the class
const g = new WeakMap();
// options are saved as priva... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from "react";
import AtomicImage from "../../../../src/containers/AtomicImage.js";
import { WarningMessage } from "./Warn... |
// Flashcards will be added as objects collected into an array:
flashcardCollection = [];
flashcard = {
numberInSet: 0,
front: "",
back: ""
}
flashcardCount = 0;
// The function each of the flashcard types will use to create cards
// Types of cards created depends on what user clicks:
function createFlashcard(f... |
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
var __awaiter = (this && th... |
/*
Patient Reviews Page
================================================================================
Route: `/patient/your-reviews`
*/
/*
Imports
------------------------------------------------------------
*/
// lib
import React from 'react';
import CSSModules from 'react-css-modules';
import { connect } from 're... |
import { h, Component, createRef } from "preact";
import OrderedList from "./OrderedList.js";
import EditMarkdown from "../markdown/EditMarkdownContent.js";
import Modal from "../editor/Modal.js";
import normalizeURL from "./normalizeURL.js";
function handleChange(onChange, e) {
const { target } = e;
con... |
import React, { Component } from 'react'
import { View, StyleSheet, AsyncStorage, TouchableHighlight, Text, Alert, Linking } from 'react-native'
import moment from 'moment'
import PopupDialog from 'react-native-popup-dialog'
import UserInfoService from './../../services/userInfoService'
import Transactions from './tran... |
var WebSocketServer = require("ws").Server;
var http = require("http");
var express = require("express");
var app = express();
var port = process.env.PORT || 5000;
app.use(express.static(__dirname + "/"));
var server = http.createServer(app);
server.listen(port);
console.log("http server listening on %d", port);
va... |
"use strict";
const rpio = require('rpio');
const buffers = require('./buffers.js')
function wlbin(number){
console.log(number.toString(2).padStart(8, '0'));
}
//commands
const OLEDCommands = { //Empty values kept for clearity in code when setting values, rather than omitting the values on set. Not us... |
$(document).ready(function(){
var indexColumn = 0;
var tableProject = $('#list-project')
.on('preXhr.dt', function ( e, settings, data ) {
$.LoadingOverlay("show");
indexColumn = 0;
})
.DataTable( {
"processing": true,
"serverSide": true,
ajax: {
url: base_url + 'admin/projects/get_proj... |
/**********
* Defines various functions to parse LaTeX.
**********/
/**********
* Global variables
**********/
let latex = {};
let replies = {};
let connect = require("./connect.js");
let bot = require("./SlackLaTeX_bot.js");
let replace_mappings = {
'<': '<',
'>': '>',
'&': '&'
}
/**********
*... |
var methods = require('..');
var chai = require('chai');
chai.should();
describe('Validation Methods', function(){
it('should validate required', function(){
methods.required('').should.be.false;
methods.required(null).should.be.false;
methods.required(undefined).should.be.false;
methods.required(0)... |
const Eris = require('eris');
const SSE = require('express-sse');
const config = require('./config');
const bot = require('./bot');
const Queue = require('./queue');
const utils = require('./utils');
const blocked = require('./data/blocked');
const threads = require('./data/threads');
const reply = require(... |
const express = require('express');
const { createServer } = require('http');
const session = require('cookie-session');
const flash = require('connect-flash');
const bodyParser = require('body-parser');
const DashboardAPI = require('./DashboardAPI');
const PluginHTTPAPI = require('./PluginHTTPAPI');
// const minify ... |
import EventEmitter from "@xaro/event-emitter";
import _, { nextTick } from "@xaro/micro-dom";
import { merge, isObject } from "@xaro/helpers";
import CSSClassAnimations from "@xaro/css-class-animations";
const Plugin = class {
tabs;
constructor(tabs) {
this.tabs = tabs;
}
};
function animate(animInst, c... |
//API Keys
var mapBoxApiKey="<KEY>";
var openWeatherAPIKey="<KEY>";
var baseURL="api";
var id = null;
var user = {};
var map = null;
//Document Ready
try {
$(function(){init()})
} catch (e){
alert("jQuery not loaded");
}
//Initialise
function init() {
//ID Modal
$("#idModal").modal('show');
//... |
const Sequelize = require('sequelize');
const connection = require('../database');
const Hist_faturamento = require('../models/Hist_faturamento');
const { update } = require('../models/Hist_faturamento');
module.exports = {
async index(req, res) {
const hist_faturamento = await Hist_faturamento.findAll();... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Card, CardHeader, CardTitle, CardText } from 'material-ui/Card';
import { Grid, Row, Col, Table } from 'react-bootstrap';
import pdfMake from 'pdfmake/build/pdfmake';
import pdfFonts from 'pdfmake/build/vfs_fonts';
import Api from... |
'use strict'
/* eslint no-unused-expressions: "off" */ // for chai expect assertions
var expect = require('chai').expect
var fs = require('fs')
var https = require('https')
var os = require('os')
var path = require('path')
var querystring = require('querystring')
var rimraf = require('rimraf')
var sinon = require('sin... |
/**
* hw #5 -jQuery - trivia - game.js
**/
// VARIABLES
// ==========================================================================
//
//will be loaded with value from onclick of an answer
var answer;
//index of currentQuestion in Obj
var currentQuestion = 0;
//variables for timer
var timeIsUp = ... |
import { useState, useEffect } from "react";
import { useSelector, useDispatch } from "react-redux";
import { useTranslations } from "next-intl";
import { v4 as uuidv4 } from "uuid";
import { setGoal, setOffer } from "../../../redux/user";
import BaseContentLayout from "../../../components/BaseContentLayout/BaseContent... |
var requireUserCountWithinTime = function(userCount, timeLimit) {
return {
description: "Transport <span class='emphasis-color'>" + userCount + "</span> people in <span class='emphasis-color'>" + timeLimit.toFixed(0) + "</span> seconds or less",
evaluate: function(world) {
if(world.elap... |
'use strict';
const LIB_SERVICE_PROVIDER = require( '../../ServiceProvider' );
var LIB_STOMPIT = null;
try
{
LIB_STOMPIT = require( 'stompit' );
}
catch ( error )
{
console.error( 'LIB-MRPC: An npm library required for this service provider [StompitServiceProvider] was not found.' );
console.error( 'LIB-MRPC: Th... |
/*!
* contentstack-cli
* copyright (c) Contentstack
* MIT Licensed
*/
'use strict';
/**
* Module Dependencies.
*/
var util = require('util');
var _ = require('lodash');
var prompt = require('prompt');
var debug = require('debug')('sync');
var async = require('async');
var chalk = require('chalk');
var EventEmit... |
var base_url = $("#base_url").val();
var restaurant_slug = $("#restaurant_slug").val();
var productList = JSON.parse(localStorage.getItem('orderList')) || [];
new Vue({
el: "#app",
data: {
formData: {
food_name: '',
food_id: '',
food_price_id: '',
order_description: '',
f... |
/**
* 角度转弧度
* Math.PI = 180 度
* @param angle
* @returns {number}
*/
function angleToRadian(angle) {
return angle * Math.PI / 180
}
/**
* 计算根据圆心旋转后的点的坐标
* @param {Object} point 旋转前的点坐标
* @param {Object} center 旋转中心
* @param {Number} rotate 旋转的角度
* @return {Object} 旋转后的坐标
* https://www.zh... |
import YrvDomUtil from "./yrvDomUtil"
import YrvUtil from "./yrvUtil"
import YhmParse from "./yrvParse"
import YrvMap from "./yrvMap"
import YrvPatch from "./yrvPatch"
import YrvDiff from "./yrvDiff"
import YrvElement from "./yrvElement"
import YrvRoute from "./yrvRoute"
/**
* @author yhongm
* the 'YrvCom... |
'use strict';
var nanoModul = require('nano');
var path = require('path');
var assert = require('assert');
var walk = require('walk');
var fs = require('fs');
var mime = require('mime');
var urljoin = require('url-join');
var Promise = require('promise');
var chalk = require('chalk');
chalk.enabled = true;
var glob = r... |
const express = require('express');
const router = express.Router();
//const querystring = require('querystring'); //convinient way to do a get query, !not needed with fecth
const fetch = require('node-fetch'); //fetch api for node
const {
Comparison,
Person
} = require('../../db/models/models.js'); //to look... |
const menu = require('console-menu');
const process = require('process');
async function next() {
let item = await menu([
{ hotkey: 'i', title: 'Idle (pass 1 HOUR)', cb: idle1h, selected: true },
{ hotkey: 'I', title: 'Idle (pass 1 day)', cb: idle1d, selected: true },
{ hotkey: 's', title: ... |
const Promise = require('bluebird')
const errors = require('./errors')
const logger = require('./logger')
const api = require('./api')
const loadUser = (req) => {
if (req.user) {
return Promise.resolve()
}
if(req.userId) {
return loader('user', req.userId).then((user) => {
req.... |
'use strict';
// Author: <NAME>
// Handles map veto system, to choose maps between teams
const bot = require('./bot');
const player_js = require('./player');
const f = require('./f');
var captain1; // Captain for team 1
var captain2; // Captain for team 2
var mapMessages; // Keeps track of the discord messages ... |
import React, { Component } from "react";
const BigNumber = require('bignumber.js');
export default class HomeStaking extends Component {
constructor(props) {
super(props);
this.state = {
myInventario: [],
itemsYoutube: [],
cardImage: "images/default2.png",
card: "default",
ret... |
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import moment from 'moment';
const name = 'scaleFactory';
function scaleFactory (){
'ngInject';
let scaleFactory = {};
scaleFactory.dropScale = ()=>{
scaleFactory.scaleParams={};
scaleFactory.scale=[];
scaleFactory.scaleIndex=[];
s... |
"use strict";
/*
* eslint-plugin-sonarjs
* Copyright (C) 2018-2021 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* v... |
"use strict";
// *********************************
// Libraries
// *********************************
var U = require('util');
var Net = require('net');
var Dgram = require('dgram');
var FS = require('fs');
var Base = require('./base');
var C = ... |
var bap = require('../index');
function effects () {
var baseSample = bap.sample({
src: 'sounds/plong1.wav',
duration: 96,
volume: 80,
release: 0.05
});
// reverb
var reverbKit = bap.kit();
var smallReverb = bap.reverb({ time: 0.5 });
reverbKit.slot('Q').layer(baseSample.with()).connect(... |
import Origo from 'Origo';
import CastorApi from './castorApi';
import {extend} from 'ol/extent';
const Castor = function Castor(options = {}) {
const {
oauth2,
exportLayerGroup,
castorImportGroupOptions,
castorImportLayerOptions,
realestatePropertyName,
filterPropertyName,
mainIcon = '#f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.