text stringlengths 3.07k 16k |
|---|
// Libraries & utils
import React from "react";
import { debounce } from "lodash";
import { sprintf } from "sprintf-js";
// Redux
import { connect } from "react-redux";
import {
leaveRoom,
loadVideo,
removeVideo,
updateVideo,
addNotification,
} from "store/actions";
// Components
import Room from ... |
'use strict';
/* global window */
var chai = require('chai');
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
var expect = chai.expect;
chai.use(sinonChai);
var $ = require('jquery');
var URI = require('urijs');
var _ = require('underscore');
require('../setup')();
_.extend(window, {
context... |
import prismTheme from '@theme-ui/prism/presets/night-owl.json'
import { system } from '@theme-ui/presets'
import prism from '@theme-ui/prism/presets/theme-ui'
// Breakpoints
const breakpoints = ['40em', '52em', '64em', '80em']
breakpoints.sm = breakpoints[0]
breakpoints.md = breakpoints[1]
breakpoints.lg = breakpoint... |
import { currency } from '@components/Common/Ticker';
import BigNumber from 'bignumber.js';
import cashaddr from 'ecashaddrjs';
export const fromLegacyDecimals = (
amount,
cashDecimals = currency.cashDecimals,
) => {
// Input 0.00000546 BCH
// Output 5.46 XEC or 0.00000546 BCH, depending on currency.ca... |
// Purpose: Handles adding rows and actions to build order display
function add_action(image_container_element){
// Adds action to individual bo_unit's action section
// Works via copying the image of image_container_element and appending it to the bo_unit
var active_unit = document.querySelector('.ac... |
import React from 'react';
import { View, Text } from 'react-native';
import { Field, change } from 'redux-form';
import styles from './styles';
import {
InputField,
CtDivider,
SelectField,
SelectPickerField,
CurrencyFormat
} from '@/components';
import { ROUTES } from '@/navigation';
import { color... |
import _ from 'lodash'
import className from 'classnames'
import React from 'react'
import ReactDOM from 'react-dom'
import { DragSource, DropTarget } from 'react-dnd'
import { getEmptyImage } from 'react-dnd-html5-backend'
import { getFieldFunctionDisplayName, getFieldFunctionSelectDisplayName } from '../helpers/field... |
let container, camera, scene, renderer, orbitControls;
const BACKGROUND_COLOR = "#004466";
const initThree = () => {
/**
* Set up scene and camera
* @type {THREE}
*/
THREE.Object3D.DefaultUp = new THREE.Vector3(0, 0, 1);
container = document.getElementById('three-container');
camera = new THREE.PerspectiveCa... |
//Cuadrados
console.group("Cuadrado")
// Medidas en cm del cuadrado
const ladoCuadrado = 5;
function infoCuadrado(ladoCuadrado){
console.log("Lados del cuadrado miden: "+ ladoCuadrado+"cm");
}
infoCuadrado(ladoCuadrado)
function calculoPerimetroCuadrado(ladoCuadrado){
const perimetroCuadrado = ladoCuadrado *... |
import { h, ref, reactive } from 'vue';
import {
NAvatar,
NButton,
NDivider,
NForm,
NInput,
NFormItem,
NSpace,
} from 'naive-ui';
import { formatTime } from '@/assets/utils/dateFormatUtils.js';
import axios from '@/axios';
import { changeLoadingStatus } from '@/assets/utils/loading';
import { editGroupUs... |
// Import Dependencies
import React from 'react';
import { Link } from 'react-router-dom';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import styled from 'styled-components';
import StarRatings from 'react-star-ratings';
// styled-components
const ProjectTileWrapper = style... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash');
var async = require('async');
/**
* Utils.
*/
// var doubleQuote = exports.doubleQuote = function(value, outValues) {
// if (nil(value)) {
// return 'NULL';
// } else if (_(value).isNumber()) {
// return value;
// } else if (_(... |
const express = require('express');
const api = require('../../api');
const buildReportFilters = require('../buildReportFilters');
const { getRAGstatus } = require('../expiryStatusUtils');
const {
getApiData,
requestParams,
} = require('../../helpers');
const primaryNav = 'reports';
const router = express.Router(... |
import React, { Component } from 'react';
import moment from 'moment';
import classes from './HomeMap.css';
import Map from '../Component/Map/Map';
import SmartGaragePage from './SmartGaragePage/SmartGaragePage';
import Header from '../Component/Header/Header';
import Footer from '../Component/Footer/Footer';
/**
*... |
'use strict'
import axios from 'axios'
import { ipcRenderer } from 'electron'
import {PostDB} from '../renderer/store/db'
import {yml, hello} from '../data/static'
const Shell = require('shelljs')
const Path = require('path')
Shell.env.PATH += Path.delimiter + '/usr/local/bin' // 添加环境变量
const fs = require('fs')
// cons... |
import {derived, writable, get} from "svelte/store"
import {UserManager, WebStorageStateStore} from "oidc-client"
import {AppUrl} from "../constants/urls"
export const AzureProvider = "AzureProvider"
export const ZuubrProvider = "ZuubrProvider"
const LocalStorageProviderKey = "AuthenticationProvider"
const azureConf... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
/*
* Copyright © 2016-2019 The Thingsboard 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 applicabl... |
const router = require("express").Router();
const isAuthentificated = require("../middlewares/isAuthentificated");
const Game = require("../models/Game");
const User = require("../models/User");
const Action = require("../models/Action");
//add
router.post("/newgame", isAuthentificated, async (req, res) => {
const i... |
var myQuestions = [
// question 1
{
question: "1. Where can JavaScript be inserted in an HTML document?",
answers: {
a: "The '< head >' tag.",
b: "The '< body >' tag.",
c: "An external script sheet.",
d: "All of the above."
},
corr... |
'use strict'
var contractHelper = require('../helpers/contracts')
var init = require('../helpers/init')
var sauce = require('./sauce')
var assetsTestContract = `import "./contract.sol";
contract Assets {
uint[] proposals;
function add(uint8 _numProposals) public {
proposals.length = _numProposals;
... |
"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];
})... |
import propTypes from '@dhis2/prop-types'
import React from 'react'
import { Tab } from '../tab/index.js'
import { TabBar } from './index.js'
function AttachFile({ className }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 48 48"
className={className}
... |
function page (path) {
return () => import(/* webpackChunkName: '' */ `~/pages/${path}`).then(m => m.default || m)
}
export default [
{ path: '/', name: 'welcome', component: page('welcome.vue') },
{ path: '/login', name: 'login', component: page('auth/login.vue') },
{ path: '/register', name: 'register', comp... |
/**
* CTFClub Project
* <NAME> <<EMAIL>>
* Licensed under AGPLv3 Or Later (2020)
*/
/**
* Fetch Challenge Function
*
* Will fetch a challenge for you based upon it's id.
*
* @param {int} challenge_id
*/
function fetch_chal(challenge_id){
get(`/challenge/${challenge_id}`,resp=>{
console.log(resp);
const ... |
const { dest, src, series, watch } = require('gulp');
const gulpLoadPlugins = require('gulp-load-plugins');
const browserSync = require('browser-sync');
const merge2 = require('merge2');
const theo = require('theo');
const transforms = {
...require('./transforms/unit'),
...require('./transforms/easing'),
};
const e... |
const utils = require('./utils');
const FORMATS = require('./formats');
// Use these to help sort formats, higher index is better.
const audioEncodingRanks = ['mp4a', 'mp3', 'vorbis', 'aac', 'opus', 'flac'];
const videoEncodingRanks = [
'mp4v',
'avc1',
'<NAME>',
'MPEG-4 Visual',
'VP8',
'VP9',
'H.264',
];... |
import React from 'react';
import { useTranslation } from 'react-i18next';
import PropTypes from 'prop-types';
import Link from '../../components/Link';
const propTypes = {
properties: PropTypes.object.isRequired,
propertyName: PropTypes.string.isRequired,
label: PropTypes.string,
};
const defaultProps = {
la... |
let _ = require('lodash');
let fivebeans = require('fivebeans');
let request = require('request-promise-native');
let yaml = require('js-yaml');
let uuid = require('uuid');
let loremIpsum = require('lorem-ipsum');
let randomWords = require('random-words');
let beanstalk = new fivebeans.client(process.env.BEANSTALK_SER... |
const { Command } = require('discord-akairo');
const chanList = require('../../functions/findGyms.js');
const sanitize = require('../../functions/sanitize.js');
class AddCommand extends Command {
constructor() {
super('add', {
aliases: ['add', 'a', 'want'],
category: 'general',
description: {
content: ... |
var cash_analiz_purs_lbl = {
id: "cash_analiz_purs_lbl",
xtype: 'label',
cls: "cash_analiz_lbl",
text: lang(129)
};
var cash_analiz_purs_from_date =
{
xtype: 'datefield',
//startDay:1,
fieldLabel: lang(43),
name: 'cash_analiz_purs_from_date',
id: 'cash_analiz_purs_from_date',
l... |
/**
* Copyright 2016 The AMP HTML Authors. 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 require... |
var floor = Math.floor;
var videoPrefix = "official_";
var vidDir = "/Volumes/External Intel SSD/Aardvark/aptima-video/screenVideo/";
var logDir = "/Volumes/External Intel SSD/Aardvark/aptima-video/example_logs/vcode_outputs/";
var actionMappingFile = "/Volumes/External Intel SSD/Aardvark/aptima-video/action_mapping_3.... |
var utils = require('../utils'),
packages = require('../packages'),
logger = require('../logger'),
couchdb = require('../couchdb'),
kansorc = require('../kansorc'),
argParse = require('../args').parse,
path = require('path');
exports.summary = 'Builds a project and reports a list of its export... |
import {
Scene,
WebGLRenderer,
PerspectiveCamera,
BoxGeometry,
ShaderMaterial,
Color,
Vector2,
Vector3,
Raycaster,
Object3D,
MathUtils,
LoadingManager
} from 'three'
// Remove this if you don't need to load any 3D model
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
import... |
// Initializing app to be the function handler
var app = require('express')();
// Initializing http server(app)
var http = require('http').Server(app);
// import socket.io
var io = require('socket.io')(http);
// For unique id generation
var uuid = require('node-uuid');
// We define a route handler / that gets ca... |
/*
* @Author: <NAME>
* @Date: 2019-12-12 10:32:02
* @LastEditTime : 2019-12-18 10:25:27
* @LastEditors : Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \shopify-demo-app-node-react\server.js
*/
require('isomorphic-fetch');
const dotenv = require('dotenv');
dotenv.config();
const Koa =... |
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import { List, WindowScroller,AutoSizer } from 'react-virtualized';
import 'react-virtualized/styles.css'; // only needs to be imported once
import { connect } from "react-redux";
import { fetchDateAlbumsPhotoHashList,fetchAlbumsDateGalleries} f... |
const pkg = require('../package.json');
const fs = require('fs');
const path = require('path');
const pug = require('pug');
const util = require('util');
const endsWith = require('lodash.endswith');
const assign = require('lodash.assign');
const merge = require('lodash.merge');
const isPlainObject = require('lodash.isp... |
// Initialize Calendar
const LIBRARY = 0,
FULLER = 1,
roomNames = ["library", "fuller room"];
let roomSelected = LIBRARY,
events = [],
currentSelection,
calendar,
allSelections = [],
requestFinished = false;
function handleSelection(selectionInfo){
currentSelection = selectionInfo... |
import path from 'path';
import fs from 'fs';
import getLinks from './get-link.js';
import { cleanOutputPath } from './filters.js';
import Constants from './constants.js';
import downloader from '../lib/downloader.js';
import { writeId, findId } from '../lib/cache.js';
import mergeMetadata from '../lib/metadata.js';
im... |
import React, { Component, useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import { Table } from 'rimble-ui';
import Accordion from '@material-ui/core/Accordion';
import AccordionSummary from '@material-ui/core/AccordionSummary';
import AccordionDetails from '@material-ui/core/AccordionDetails';
i... |
import React, { useState, useEffect } from "react";
// import { useHistory, useLocation } from 'react-router-dom';
import {
// CBadge,
CCard,
CCardBody,
CCardHeader,
CCol,
// CDataTable,
CRow,
// CPagination,
CLink,
CFormGroup,
CLabel,
CInputGroup,
CInput,
} from "@coreui/react";
import axios ... |
import React, { useEffect, useState } from 'react';
import {
// CButton,
CCard,
CCardBody,
CCardHeader,
CCol,
CForm,
CFormGroup,
CFormText,
CInput,
CLink,
CInputFile,
CInputGroup,
CLabel,
CRow,
CTextarea
} from '@coreui/react';
// import CIcon from '@coreui/icons-react'
// import { DocsLink } from 'src/r... |
function update_interacting_residues(n){
if(imported_flag || !top.binding_residues) return;
var bs = add_binding_residues(n);
if(!bs)return;
$j.map(feature_viewer.data, function(n,i){
if(n[0]==bs[0])feature_viewer.data[i]=bs;
});
var category = $j.grep(feature_viewer.categories, function(n,i){if(n.name=... |
import React from "react"
import Validator from 'validatorjs'
import update from 'immutability-helper'
import getValue from './utils/get-value'
import getFieldRules from './utils/get-field-rules'
import getFieldMessages from './utils/get-field-messages'
import parseCallbackRules from './utils/parse-callback-rules'
imp... |
// Copyright (c) 2017, <NAME> and contributors
// For license information, please see license.txt
frappe.ui.form.on('Paciente', {
refresh: function(frm) {
//El usuario solo puede agregar la ARS al crear el paciente, luego solo las ARS pueden modificar estos campos
if (!frm.doc.__islocal){
frm.set_df_property(... |
var light = new THREE.Color( 0xffffff )
var shadow = new THREE.Color( 0x303050 )
var fogVar = new THREE.Fog(0xd0e0f0,1,500);
var scene = new THREE.Scene();
scene.fog = fogVar;
scene.background = new THREE.Color(0xd0e0f0);
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 1000 );... |
import React from 'react'
import {Circle} from '../Shapes/Circle'
import {Square} from '../Shapes/Square'
import {Line} from '../Shapes/Line'
import {withStyle} from '../Shapes/styleShapeDecorator';
import managedShape from '../Shapes/ManagedShape';
import {connect} from 'react-redux'
import { DragDropContext } from 'r... |
// Copyright 2009 the V8 project authors. All rights reserved.
// 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 ... |
'use strict';
var React = require('react-native');
var {
StyleSheet,
Text,
TextInput,
View,
TouchableHighlight,
ActivityIndicatorIOS,
Image,
Component,
Slider,
ScrollView
} = React;
class Calculator extends Component {
constructor(props) {
super(props);
this.state = {
carPrice: '',
... |
// Modules to control application life and create native browser window
const { app, dialog, shell, webContents, Menu, BrowserWindow, ipcMain } = require('electron')
const path = require('path')
const { load_istar2, save_istar2, merge_istar2 } = require('./istar2/index')
const fs = require('fs');
const { exit } = requi... |
/* -*- mode: javascript; c-basic-offset: 4; indent-tabs-mode: nil -*- */
//
// Dalliance Genome Explorer
// (c) <NAME> 2006-2014
//
// memstore.js
//
"use strict";
if (typeof(require) !== 'undefined') {
var sa = require('./sourceadapters');
var dalliance_registerSourceAdapterFactory = sa.registerSourceAdapt... |
import { func } from "prop-types";
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
// Use this in an `afterEach` function to cause all remaining tests of a suite to be skipped when
// the test that just finished running failed.
//
// CAUTION: This MUST NOT be ca... |
'use strict';
let logger = require('./logger');
let db = require('./database');
let config = require('./config');
let api = require('./twitchapi');
let pubsub = require('./pubsub');
module.exports.initialize = async function () {
await module.exports.resyncRewards();
}
module.exports.resyncRewards = async functio... |
import React from 'react';
import { TouchableOpacity, Linking, ScrollView } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import RNPrint from 'react-native-print';
import Icon from 'react-native-vector-ic... |
/** TemplateForm.js
* front-end
*
* admin only layout for adding / editing (validating) a survey
*
* called by:
* 1. AddTemplate.js
* 2. EditTemplate.js (empty, code scrap)
* 3. TemplateInfo.js
*/
import React from 'react';
import {Col, Button, ButtonToolbar, Row, Container} from 'reactstrap';
imp... |
'use strict'
const genres = ['', 'Action', 'Animation', 'Comedy', 'Documentary', 'Family', 'Film-noir', 'Horror',
'Musical', 'Romance', 'Sport', 'War', 'Adventure', 'Biography', 'Crime', 'Drama',
'Fantasy', 'History', 'Music', 'Mystery', 'Sci-Fi', 'Thriller', 'Western']
const languages... |
//-------------------
// GLOBAL variables
//-------------------
let model;
var canvasWidth = 150;
var canvasHeight = 150;
var canvasStrokeStyle = "white";
var canvasLineJoin = "round";
var canvasLineWidth = 10;
var canvasBackgroundColor = "black";
var canvasId = "canvas";
var cl... |
import { __makeTemplateObject, __rest } from "tslib";
import styled, { css, keyframes } from 'styled-components';
import { themed } from '@atlaskit/theme/components';
import { N500, N0 } from '@atlaskit/theme/colors';
import { SIZES_MAP } from './constants';
var getStrokeWidth = function (size) { return Math.round(size... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetupGroups = void 0;
const klf_200_api_1 = require("klf-200-api");
const converter_1 = require("./util/converter");
const propertyLink_1 = require("./util/propertyLink");
const stateHelper_1 = require("./util/stateHelper");
const util... |
import React, {useEffect} from "react";
import {Select, MenuItem, FormControl, InputLabel} from "@material-ui/core";
import httpClient, {httpClient as axios} from "../../../core/http-client";
import Button from "../../../assets/shared/Button";
import Grid from "@material-ui/core/Grid";
import Typography from "@material... |
import _ from '_';
import { Focused, Capa, ClientSideKeyName, Magics } from 'Common/Enums';
import { $html, leftPanelDisabled, leftPanelType, moveAction, bMobileDevice } from 'Common/Globals';
import { pString, pInt, decodeURI, windowResizeCallback } from 'Common/Utils';
import { getFolderFromCacheList, getFolderFullN... |
'ust strict'
const { config } = require('dotenv')
const { dirname, join } = require('path')
const os = require('os')
const electron = require('electron')
const shortcut = require('electron-localshortcut')
const { autoUpdater } = require('electron-updater')
const { ReplaySubject } = require('rxjs')
const { bufferWhen, ... |
import React from 'react';
import { Carousel } from 'react-responsive-carousel';
import classes from './ProjectDev.module.css';
import "react-responsive-carousel/lib/styles/carousel.min.css";
//Bolivar images
import BLogo from '@internal/assets/images/projectdev/bolivar_logo.jpg';
import Bimg1 from '@internal/asset... |
const express = require('express');
const bodyParser = require('body-parser');
const path = require('path');
const compression = require('compression');
const hsts = require('hsts');
const logos = require('logojs-react');
const ReactDOMServer = require('react-dom/server');
const React = require('react');
let alphabet... |
import React, { useState } from 'react';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { makeStyles } from '@material-ui/styles';
import { Divider, Drawer } from '@material-ui/core';
import DashboardIcon from '@material-ui/icons/Dashboard';
import PeopleIcon from '@material-ui/icons/People';
impor... |
/**
* BuildGraph
* ==========
*
* Граф сборки. Строит граф зависимостей во время сборки.
*/
var inherit = require('inherit');
var colors = require('./colorize');
var path = require('path');
/**
* @name BuildGraph
*/
module.exports = inherit({
/**
* Конструктор.
* @param {String} caption заголовок... |
var mongoose =require('mongoose');
var Product =require('../models/products');
mongoose.connect('mongodb://heroku_1v8kc0h2:<EMAIL>:33113/heroku_1v8kc0h2');
var products = [
new Product({
imagePath:"/images/1.jpeg",
title:"Charlie's Angels",
genre:'Action',
description:"Charlie's Angels is an American c... |
const Follow = require("./cc.follow.js").default;
const Profile = require("./cc.profile.js").default;
const Onboarding = (function() {
let eventsBound = false;
const steps = {
loggedIn: {
subjects: {
url: "/user/onboarding/follow-subjects",
title: "Follow Subjects",
... |
let examples = new Map();
examples["helloWorld"] = `// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract MyContract {
function helloWorld() public pure returns (string memory) {
return "Hello, World!";
}
}`;
examples["erc20"] = `// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contr... |
var io = require('socket.io');
var _ = require('underscore');
var jsondiffpatch = require('jsondiffpatch');
var Arrangement = require('./models/arrangement');
// configure the synchronization module
module.exports = function(server){
io = io.listen(server);
io.set('log level', 1);
// handle new socket connect... |
'use babel';
import { property_dynamic, property_static } from "../alloy/alloy-property";
export {
extract_meshes,
extract_properties
}
function extract_meshes (instance) {
let mesh_sig_ids = ['mesh/Mesh', 'this/Mesh'],
elem_sig_ids = ['.*/Element', 'mesh/Triangle', 'this/Triangle'],
nod... |
const fs = require('fs');
const sysPath = require('path');
const globby = require('globby');
const YAML = require('yaml');
const { Client } = require('@elastic/elasticsearch');
const UTILS = require('../utils');
jest.mock('fs');
jest.mock('path');
jest.mock('globby');
jest.mock('yaml');
jest.mock('process');
describ... |
import React, { PropTypes, Component } from 'react';
import ReactDOM from 'react-dom';
import withStyles from '../../decorators/withStyles';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
import {
Toolbar, ToolbarGroup, ToolbarTitle,
Dialog, DropDownMenu, RaisedButton, FlatButton
} from 'material-ui';
i... |
function saveLinkToStorage(title, link) {
chrome.storage.local.get(["FleetMarks_LinksData"], function(result) {
console.log('Value got from storage is: ' + result.FleetMarks_LinksData);
var rawData = result.FleetMarks_LinksData
dataInJson = {}
if (rawData) {
try {
... |
function check_mobile(){
var mobile = $("#mobile").val();
var mobile_hint = $("#mobile_hint");
if(mobile.length != 11){
mobile_hint.html("请输入正确位数手机号");
mobile_hint.show();
return false;
} else {
//var j = 1;
for (var i = 0; i < mobile.length; i++) {
if(mobile.charAt(i)<"0" || mobile.charAt(i)>"9"){
... |
let totalQuotation = 0;
const options1 = { style: 'currency', currency: 'COP' };
const numberFormat1 = new Intl.NumberFormat('es-ES', options1);
function addProductToQuotation(productId, name, img) {
const obj = {
productId,
name,
img
};
if (localStorage.getItem('carrito')) {
... |
const Discord = require("discord.js");
const snekfetch = require("snekfetch");
module.exports.run = async (client, message, args) => {
client.awaitReply = async (message, question, limit = 30000) => {
const filter = m => m.author.id === message.author.id;
await message.channel.send(question);
try {
... |
import React from 'react'
import Link from 'next/link'
import {
Box,
Container,
Button,
Card,
CardContent,
Grid,
TextField,
InputAdornment,
SvgIcon,
Typography
} from '@mui/material';
import { Search as SearchIcon } from '../../icons/search';
import AccountCircle from '@mui/icons-material/AccountCir... |
import nock from 'nock';
import { ClientFunction, Selector } from 'testcafe';
import { extractInnerText } from 'buying-catalogue-library';
import content from '../manifest.json';
import { solutionsApiUrl, orderApiUrl, organisationApiUrl } from '../../../../../../../../config';
import { nockAndErrorCheck, setState, auth... |
import React, { createContext } from 'react';
import uuid from 'uuid/v1';
import * as helpers from './helpers';
import * as cache from './cache';
export const {
calculateTotals,
getSupportedOptionsFromProps,
getVariantVATprops
} = helpers;
export const BasketContext = createContext();
export const useBasket =... |
/*
Simple OpenID Plugin
http://code.google.com/p/openid-selector/
This code is licenced under the New BSD License.
*/
var providers;
var openid = {
version: '1.2', // version constant
demo: false,
demo_text: null,
cookie_expires: 6*30, // 6 months.
cookie_name: 'openid_provider',
cookie_path: '/',
img_path:... |
import React, { useState, useEffect } from "react";
// react plugin for creating charts
import ChartistGraph from "react-chartist";
// @material-ui/core
import { makeStyles } from "@material-ui/core/styles";
import Icon from "@material-ui/core/Icon";
// @material-ui/icons
import Store from "@material-ui/icons/Store";
i... |
/**
* Exposes HAPI integration for the mock server
*/
var Hapi = require('hapi');
var Nes = require('nes');
var _ = require('lodash');
var util = require('./util');
var _inputs = {
boolean: require('./admin/api/input-plugins/checkbox'),
text: require('./admin/api/input-plugins/text'),
select: require('./admin/a... |
const R = require('ramda')
const assert = require('assert')
const Factory = require('./support/factory')
const Navigation = require('../src/navigation')
const state = {
components: {
'button': Factory.component('button', { title: 'Awesome Button' }),
'link': Factory.component('link', { title: 'Link' })
},... |
/**
* Tests: src/utils/build-utils.js
*/
/* eslint-disable max-len */
// const fs = require('fs');
const path = require('path');
const {
getProgramInfo,
buildTemplateMap,
buildContentMap,
getContentMeta,
getSourceNodeFromPluginNode,
getAbellConfig,
renderMarkdown
} = require('../src/utils/build-utils.... |
const glob = require('glob')
const fs = require('fs')
const path = require('path')
const spawn = require('child_process').spawn
const exec = require('child_process').exec
const rmdir = require('rimraf')
const logger = require('winston').loggers.get('vagrant')
let SshConnection = require('../ssh').Connection
... |
import React, { useState } from 'react';
import { Redirect } from 'react-router-dom';
import Autocomplete from '@material-ui/lab/Autocomplete';
import Avatar from '@material-ui/core/Avatar';
import Button from '@material-ui/core/Button';
import Chip from '@material-ui/core/Chip';
import Grid from '@material-ui/core/Gr... |
import React from 'react';
import { Typography, Tooltip, IconButton, Button, Divider } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import HomeIcon from '@material-ui/icons/Home';
import socket from '../socket/';
import playerColours from '../Match/playerColours.json';
import showDia... |
import React, {useEffect, useState} from 'react';
import {Form, Col, Row, Button, Divider, Spin} from 'antd';
import moment from 'moment';
import {
allotmentFormFields,
allotmentProductFormFields,
} from 'common/formFields/allotment.formFields';
import {useAPI} from 'common/hooks/api';
import {useHandleForm} from '... |
var can, bctx, emitter, emitters = []
var PE = {
clicked: false,
imageData: '',
emitterData: {},
emitterDataJson: '',
init: function () {
// form changes
document.forms.particleeditor.addEventListener('change', function (evt) {
PE.process()
})
// change ... |
/*
* Copyright 2019-2020 Fujitsu Laboratories Ltd.
* SPDX-License-Identifier: Apache-2.0
*
* validatrorDriver_sendRawTransaction.js
*/
////////
// Usage
// 1) Set parameter to parameter variable
// [parameter variables of sendRawTransaction] fromAddress,fromAddressPkey,toAddress,amount,amount
// 2) execute
... |
function array(len, fn) {
var ret = [ ]
for (var i = 0; i < len; i ++)
ret.push(fn())
return ret
}
Buffer.TYPES = {
Char: ['UInt8', 1],
UShort: ['UInt16LE', 2],
UInt: ['UInt32LE', 4],
Short: ['Int16LE', 2],
Int: ['Int32LE', 4],
}
Buffer.prototype.step = function(... |
//Netflix script
var time = "";
var dur = "";
var search = "";
var eps_code = "";
var init_time = "";
var netflixurl = window.location.href;
if(netflixurl.includes("/watch")){
var episodeWatched = ReadEpisode ();
eps_code = episodeWatched[0];
time = episodeWatched[1];
dur = episodeWatched[2];
init_time = episod... |
// Copyright (c) 2012 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 newTabUrls = [
'chrome://newtab/',
// The tab URL for to the Local New Tab Page.
'chrome-search://local-ntp/local-ntp.html',
];
var secondW... |
import {isPlainObject} from "@/plugins/object";
import {formatServerDate} from "@plugins/datetime";
export function encodeURIObject(query) {
return Object.keys(query).filter(x => query[x] !== undefined).map(x => encodeURIComponent(x) + "=" + encodeURIComponent(query[x])).join("&");
}
function getApiUrl(uri, query) {... |
/*Copyright 2019 Bang & <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, modify, merge, publish, distribute, sublice... |
import React, { createContext, Component } from 'react';
export const UserContext = createContext();
class UserContextProvider extends Component {
constructor(props){
super(props);
var logged_in = false;
var light_mode = false;
var clock_mode = false;
var ticket = [];
... |
var git = require("./helpers/git");
var npm = require("./helpers/npm");
var lang = require("./helpers/lang");
var fs = require("fs-extra");
var q = require("promised-io/promise");
var chalk = require("chalk");
var ask = require("./helpers/promiseHelper").ask;
var generateJsdoc = require("./generateJsdoc");
var replace ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.