text
stringlengths
2
1.04M
exports.index = async (ctx) => { const title = '首页'; await ctx.render('index', { title }); }; exports.main = async (ctx) => { const title = '栗子在线'; const userinfo = ctx.session.userinfo || {}; await ctx.render('main', { title, userinfo }); };
function verificar() { var data = new Date() var ano = data.getUTCFullYear() var fano = document.getElementById('txtano') var res = document.getElementById('res') if (fano.value.length == 0 || fano.value > ano) { window.alert('[ERRO] Verifique os dados e tente novamente!') } else { ...
1?.toString(); BigInt('9007199254740991');
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var prefix = 'tb'; var iconName = 'brand-ycombinator'; var width = 512; var height = 512; var ligatures = []; var unicode = null; var svgPathData = 'M 127.98047 63.990234 C 92.898958 63.990234 63.990234 92.898958 63.990234 127.98047 L 63.99023...
"use strict";var _interopRequireWildcard=require("@babel/runtime-corejs2/helpers/interopRequireWildcard");var next=_interopRequireWildcard(require("./"));window.next=next;(0,next.default)().catch(err=>{console.error(err.message+"\n"+err.stack);});
const SupervisorTaskSubscription = require('../models/supervisor-task-subscription') const logger = require('../utils/logger') const { InternalError, SupervisorTaskSubscriptionAlreadyExistsError, SupervisorTaskSubscriptionNotFoundError } = require('../utils/errors') const { POSTGRES_UNIQUE_CONSTRAINT_VIOLATION } = requ...
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // A...
angular.module('KanboardCtrl') .controller('ProjectListController', function($scope, navigation, dataFactory) { $scope.$navigation = navigation; var projectList = this; $scope.endpoints = dataFactory.getEndpoints(); for (var i = 0; i < $scope.endpoints.length; i++) { $scope.endpoints[i].id = i; var id...
module.exports = { env: { browser: true, }, }
// Copyright 2018-2021 Polyaxon, 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 agre...
(function($){ $(function(){ $('body').on('grav-editor-ready', function() { var Instance = Grav.default.Forms.Fields.EditorField.Instance; Instance.addButton({ 'shortcodes-h5p': { identifier: 'shortcodes-h5p', title: 'H5P Content', ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const cls = require("cls-hooked"); const debugFactory = require("debug"); /** * Creates a wrapper around a debug instance. * All calls to the wrapper logs the specified id that has the name <idName> before the other values passed * * @modu...
'use strict'; const path = require('path'); const filter = require('lodash/filter'); const map = require('lodash/map'); const reduce = require('lodash/reduce'); const loaderUtils = require('loader-utils'); const generate = require('escodegen').generate; const toAst = require('to-ast'); const b = require('ast-types').b...
/* eslint-disable import/no-extraneous-dependencies */ import React from 'react'; import { storiesOf } from '@storybook/react'; import { boolean } from '@storybook/addon-knobs'; import centered from '@storybook/addon-centered/react'; import Line from './Line'; storiesOf('Line', module) .addDecorator(centered) .ad...
import React from 'react'; import { Link } from 'react-router-dom'; export default class OutOfStock extends React.Component { constructor(props) { super(props); this.state = { } } render() { return ( <div className="mb-2"> <h3 className="bg-info p-2 te...
/* * utils.js * Helper functions for global use in Logbook front-end apps * * Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> * Created: Sun Aug 23 10:09:11 2015 -0500 * * Dependencies: * - jquery * - underscore */ (function() { String.prototype.formalize = function () { return this.repl...
'use strict'; import _ from 'lodash'; import Application from './Application.js'; var instancesCount = 0; /** * Store base class for the flux architecture * * @class */ export default class Store { /** * Class constructor * * @param {Application} app * @param {Object} handlers */ ...
module.exports = { getMember: function(message, toFind = '') { toFind = toFind.toLowerCase(); let target = message.guild.members.cache.get(toFind); if (!target && message.mentions.members) target = message.mentions.members.first(); if (!target &...
/**************************************************************************** Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of t...
// exported // = export async function loadProfile () { try { var addressBook = await beaker.hyperdrive.readFile('hyper://system/address-book.json').then(JSON.parse) return beaker.hyperdrive.drive(addressBook.profiles[0].key).getInfo() } catch (e) { console.log('Failed to load profile', e) } return...
const getEnv = require('../services/environment'); function getFeatureFlags() { const env = getEnv(); return Object.keys(env) .filter(key => key.startsWith('FEATURE_')) .reduce((flags, key) => ({ ...flags, [key]: env[key], }), {}); } module.exports = getFeatureFlags;
const postcss = require('postcss') const syntax = require('postcss-less') const path = require('path') const fs = require('fs') const less = require('../../work_preject/一号掌柜商家(web)-project/build/less') const shell = require('shelljs') const distPath = path.resolve(__dirname, `../dist/styles/`) shell.rm('-rf', distPath...
let Promise = require("bluebird") const mongo = Promise.promisifyAll(require('mongodb').MongoClient) let lexr = require('./token/tokenizer.js') let _ = require("lodash-node") const config = require("../../config") const url = config.connection.url /** * Токенайзер текстів на українській мові. * Перетворює вхідний р...
var getMapData=require("./_getMapData");function mapCacheHas(a){return getMapData(this,a).has(a)}module.exports=mapCacheHas;
/** * Array of L.Marker source images * * @property {String} title * @property {String} description * @property {String} url * @property {String} iconSize */ const MarkerSourceImages = [ { title: "start_location", description: "Start location", url: "start_location.svg", iconS...
var reporter = require('cucumber-html-reporter'); var path = require('path'); module.exports.config = { host: 'localhost', sessionName: '', // // ================== // Specify Test Files // ================== // Define which test specs should run. The pattern is relative to the directory ...
/*! layer-v2.4 弹层组件 License LGPL http://layer.layui.com/ By 贤心 */
'use strict' import { app, protocol, BrowserWindow } from 'electron' import { createProtocol } from 'vue-cli-plugin-electron-builder/lib' // import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer' const isDevelopment = process.env.NODE_ENV !== 'production' // Keep a global reference of the wind...
define([ 'jquery', './base', '../utils', '../keys' ], function ($, BaseSelection, Utils, KEYS) { function SingleSelection () { SingleSelection.__super__.constructor.apply(this, arguments); } Utils.Extend(SingleSelection, BaseSelection); SingleSelection.prototype.render = function () { ...
import React from 'react'; const style = { flexContainer: { position: 'sticky', top: 0, width: '95%', display: 'flex', flexDirection: 'row', justifyContent: 'center', alignItems: 'center', backgroundImage: 'linear-gradient(rgba(0,0,0,1) 60%, rgba(0,0,0,0))', marginTop: 50, mar...
const BaseWorker = require('./base.worker'); const RecurrenceRules = require('./recurrenceRule'); const cron = require('node-cron'); class ReportWorker extends BaseWorker { constructor() { super(); this.recurrenceRules = new RecurrenceRules(); } start = () => { // this.recurrenceRu...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap-vue/dist/bootstrap-vue.css'; import 'vue2-toast/lib/toast.css'; import Vue from 'vue'; import Toast from 'vue2-toast'; ...
/** * Copyright © 2017 Rubic. All rights reserved. * See LICENSE.txt for license details. */ define([], function () { 'use strict'; /** * Allow cart items to always be shown through configuration. */ return function (target) { return target.extend({ isItemsBlockExpanded: fu...
macDetailCallback("001d63000000/24",[{"d":"2007-08-18","t":"add","a":"Carl-Miele-Str. 29\nGütersloh 33332\n\n","c":"GERMANY","o":"Miele & Cie. KG"},{"d":"2009-11-07","t":"change","a":"Carl-Miele-Str. 29\nGütersloh 33332\n\n","c":"GERMANY","o":"Miele & Cie. KG"},{"d":"2010-02-06","t":"change","a":"Carl-Miele-Str. 29\...
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import on from './events/on'; import cancelAnimationFramePolyfill from './animation/cancelAnimationFramePolyf...
/*global require,describe,it,before,beforeEach,after,afterEach*/ "use strict"; const should = require("should"); const sinon = require("sinon"); const subscription_service = require("node-opcua-service-subscription"); const StatusCodes = require("node-opcua-status-code").StatusCodes; const TimestampsToReturn = req...
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
/** * @author alteredq / http://alteredqualia.com/ */ THREE.BinaryLoader = function ( showStatus ) { THREE.Loader.call( this, showStatus ); }; THREE.BinaryLoader.prototype = Object.create( THREE.Loader.prototype ); // Load models generated by slim OBJ converter with BINARY option (converter_obj_three_slim.py -t...
import debug from 'debug'; import UserService from '../../services/user.service'; import { ApplicationError, NotFoundError } from '../../helpers/errors.helper'; const DEBUG = debug('dev'); export default { /** * Find all user accounts * @param req * @param res * @return {Promise<void>} */ findAllUs...
const { cindy } = require("../database"); let database = require("../database"); const fetch = require("node-fetch"); let remindersController = { list: (req, res) => {; res.render('reminder/index', { reminder: database.cindy.reminders, friend: database.cindy.friendlist,database: database}) }, new: (req, re...
const flowApi = require("/data-hub/public/flow/flow-api.sjs"); const hubTest = require("/test/data-hub-test-helper.sjs"); const test = require("/test/test-helper.xqy"); const flowName = "simpleMappingFlow"; const options = {}; const contentArray = [ { "uri": "/customer1.json", "value": { "customerId": "1" }} ]; co...
import '@storybook/addon-options/register' import '@storybook/addon-viewport/register' import 'storybook-addon-jsx/register'
/** * Dependencies */ var NOOT = require('../../../')('object'); /*********************************************************************************************************************** * @class Measure * @namespace NOOT.Time * @constructor ************************************************************************...
import React, { Component } from 'react'; import _ from 'lodash'; // extracting value for form element: argument passed to this function can either be event or // real value. In first case, we want to extract the value, in second case, just forward it out const getValue = event => { const value = _.get(event, 'targe...
import {parseAndGetStatement} from '../../../utils'; import {expect} from 'chai'; describe('IfStatement', () => { it('should return correct type', () => { expect(parseAndGetStatement('if(true);').type).to.equal('IfStatement'); }); it('should accept single statement', () => { let statement ...
var keyboardSlider; $( function (){ $('.options > a.option').bind('click', function(){ if ( $('.option.active').length == 0 ) { var time = $('.time > span').attr('data-time'); var pontos = 10; var html = '<span class="text-ponto-3" style="margin-top: 76px;"><span style="font-weight: 900;">YES!!!<...
module.exports.function = function goToDetail () { var layout = {}; layout['layoutType'] = "DETAIL"; return layout; }
var $jq = jQuery.noConflict(); var myAngularModule = angular.module("TickerService", ['ngResource']); myAngularModule.controller("TickerController", ['$scope', '$http', function ($scope, $http) { $scope.Code = "SVTK"; $scope.Description = "SV Ticker"; $scope.Index = undefined; $scope.num = 4; $http.defaults.hea...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); tslib_1.__exportStar(require("@styled-icons/boxicons-regular/Heading"), exports);
'use strict'; const userRepository = require('../repositories/user_repository'); module.exports = { up: async (queryInterface, Sequelize) => { }, down: async (queryInterface, Sequelize) => { } };
dojo.provide("multiplefileuploader.widget.UploadResultPane"); dojo.require('dijit.Tooltip'); dojo.require("dijit._Templated"); multiplefileuploader.widget.REMOVE_UNIT_DURATION = 5000; multiplefileuploader.widget.FADE_OUT_DURATION = 500; dojo.declare("multiplefileuploader.widget.UploadResultPane", [dijit._Widget,diji...
import React, {useState} from 'react'; import ReactDOM from 'react-dom'; import {ThemeProvider} from 'styled-components'; import theme from 'theme'; import Routes from './routes'; import HideProvider from 'Context/hide/HideProvider'; import 'style.scss'; import 'slick-carousel/slick/slick.css'; import 'slick-carousel/s...
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assertArrayExpression = assertArrayExpression; exports.assertAssignmentExpression = assertAssignmentExpression; exports.assertBinaryExpression = assertBinaryExpression; exports.assertDirective = assertDirective; exports.assertDirect...
import { useSelector } from '@xstate/react'; import React, { useCallback } from 'react'; import { useSegment } from '../../../ProjectContext'; import ToolButton from './ToolButton'; function ThresholdButton(props) { const segment = useSegment(); const tool = useSelector(segment, (state) => state.context.tool); c...
require('dotenv').config({ path: 'test/.env.test' }); const nearAPI = require('near-api-js'); const { parseSeedPhrase } = require('near-seed-phrase'); const constants = require('../constants'); const AccountService = require('../services/account'); const RecoveryMethodService = require('../services/recovery_method');...
import React from "react"; import ReactDOM from "react-dom"; import App from "./App"; import "./css/index.css"; import "github-fork-ribbon-css/gh-fork-ribbon.css"; ReactDOM.render(<App />, document.getElementById("root"));
import { combineReducers, applyMiddleware, createStore } from 'redux' import common from './reducers/common' import auth from './reducers/auth' import articleList from './reducers/articleList' import articleEditor from './reducers/articleEditor' import companyList from './reducers/companyList' import companyEditor fro...
const logo = document.getElementsByTagName('path'); console.log(logo) for(let i = 0; i < logo.length; i++) { console.log(`Letter ${i} is ${logo[i].getTotalLength()}`); }
//*****Physics constants and variables************* var K_BOLT = 1.6021e-16; // Boltzmann's constant var MU_0 = 4.0e-7 * Math.PI; // Permittivity var E_ALPHA_0 = 3.5e3; // Alpha energy (keV) var elon= 2.0; var zEff = 1.65; // Z-effective var zImp = 6.0; // Z of dominant impurity var rnDnDT = 0.5;...
import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; const Maximize = forwardRef(({ color = 'currentColor', size = '1em', ...rest }, ref) => { return ( <svg ref={ref} xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24" fi...
'use strict'; var program = require('commander'); var path = require('path'); var bitcorenode = require('..'); var utils = require('../utils'); function main(servicesPath, additionalServices) { console.log('===== bitcore-node/lib/cli/main main start...'); /* jshint maxstatements: 100 */ var version = bitcoren...
var animal = 'dog' function myAnimal() { return animal } function yourAnimal() { // How can we make sure that this function var animal = 'cat'; // and the above function both pass? // P.S.: You can't just hard-code 'cat' below return animal } function add2(n) { const two = 2 return n + two // Feel ...
'use strict'; const { DiagConsoleLogger, DiagLogLevel, diag } = require('@opentelemetry/api'); const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector'); // const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-grpc'); // const { CollectorMetricExporter } = require('@ope...
var searchData= [ ['highimpedance',['highImpedance',['../struct_s_a_p_h__config_p_p_g_count_param.html#a00330daef83f72e3a0e20b3d2d29ec77',1,'SAPH_configPPGCountParam::highImpedance()'],['../struct_s_a_p_h___a__config_p_p_g_count_param.html#ac982bd011645d0392629736120a370c7',1,'SAPH_A_configPPGCountParam::highImpedanc...
const router = require('express').Router(); const userRoutes = require('./userRoutes'); const postRoutes = require('./postRoutes'); const commentRoutes = require('./commentRoutes'); const s3Routes = require('./s3Routes'); router.use('/users', userRoutes); router.use('/posts', postRoutes); router.use('/comments', comme...
'use strict'; module.exports = { //db: 'mongodb://localhost/mean-prod', db:'mongodb://cuongcua:12345678@kahana.mongohq.com:10069/piolist', app: { name: 'Pinterest for learning' }, facebook: { clientID: 'APP_ID', clientSecret: 'APP_SECRET', callbackURL: 'http://localh...
'use strict'; import * as utils from '../src/utils'; import {registerBidder} from '../src/adapters/bidderFactory'; import { BANNER, VIDEO } from '../src/mediaTypes'; function RhythmOneBidAdapter() { this.code = 'rhythmone'; this.supportedMediaTypes = [VIDEO, BANNER]; let SUPPORTED_VIDEO_PROTOCOLS = [2, 3, 5, 6...
import { shallowMount } from '@vue/test-utils' import App from '@/App' describe('App.vue', () => { const wrapper = shallowMount(App) test('passImageToArray로 imgList에 전달된 이미지를 추가한다', () => { wrapper.vm.passImageToArray('some_url') expect(wrapper.vm.imgList[0]).toBe('some_url') }) test('removeImageFr...
import styled from 'styled-components' export const Section = styled.section` display: ${(props) => props.grid ? "grid" : "flex"}; flex-direction: ${(props) => props.row ? "row" : "column"}; padding: ${(props) => props.nopadding ? "0" : "32px 48px 0"} ; margin: 0 auto; max-width: 1040px; box-sizing: conten...
const got = require('@/utils/got'); const queryString = require('query-string'); module.exports = async (ctx) => { const response = await got({ method: 'get', prefixUrl: 'https://cn.bing.com', url: 'HPImageArchive.aspx', searchParams: queryString.stringify({ format: 'js'...
/// <reference types="cypress" /> // *********************************************************** // This example plugins/index.js can be used to load plugins // // You can change the location of this file or turn off loading // the plugins file with the 'pluginsFile' configuration option. // // You can read more here: ...
import React from "react" import PropTypes from "prop-types" import { Router, Route, Redirect, IndexRedirect, browserHistory } from "react-router" import Loadable from "react-loadable" import App from "./components/app" const MyLoadingComponent = props => { if (props.isLoading) { // While our other component is ...
function calcularAnuidade (mes, anuidade) { let valorAnuidade = anuidade while (mes > 1) { console.log((anuidade * (1 + (5/100)) ** mes).toFixed(2)) mes-- } } calcularAnuidade(24, 4.00)
/** * 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. * * @flow */ import type {EventPriority} from 'shared/ReactTypes'; import type { TopLevelType, DOMTopLevelEventType, } from 'le...
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var eo = { name: "eo", el: { colorpicker: { confirm: "Bone", clear: "Malplenigi" }, datepicker: { now: "Nun", today: "Hodia\u016D", cancel: "Nuligi", clear: "Malplenigi", confirm: "Bo...
const { Pool } = require('pg'); export default async function handler(request, response) { const pool = new Pool({ host: request.body.db.host, database: request.body.db.database, port: request.body.db.port, user: request.body.db.username, password: request.body.db.password,...
/** * Copyright 2013 Facebook, 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 ...
/**@preserve GeneXus Java 10_3_12-110051 on February 8, 2021 22:6:15.8 *
import Vue from 'vue'; import { isString, isObject } from './types'; const hasOwnProperty = Object.prototype.hasOwnProperty; export function noop() {} export function hasOwn(obj, key) { return hasOwnProperty.call(obj, key); } function extend(to, _from) { for (let key in _from) { to[key] = _from[key]...
import ActionCreator from "./ActionCreator.js"; import Reducer from "./Reducer.js"; import Selector from "./Selector.js"; import TicTacToe from "./TicTacToe.js"; QUnit.module("TicTacToe"); const createPlayers = () => { const player1 = { id: 1, name: "Alfred", // Pennyworth }; const player2 = { id: 2...
(function () { 'use strict'; // Initialize app and store it to myApp variable for futher access to its methods var myApp = new Framework7(); // We need to use custom DOM library, let's save it to $$ variable: var $$ = Dom7; // Add view var mainView = myApp.addView('.view-main', { ...
/* eslint-disable prefer-const, prettier/prettier */ /* * @Date: 2018-12-12 11:07:55 * @Last Modified time: 2021-01-06 16:08:01 */ import React, { Component } from 'react'; import { Form, Row, Col, Button, Tooltip, Icon } from 'antd'; import classNames from 'classnames'; // import cleanDeep from 'clean-deep'; impo...
// function doHomework(subject) { // alert(`Starting my ${subject} homework.`); // } // doHomework('math'); // // Alerts: Starting my math homework. // function doHomework(subject, callback) { // alert(`Starting my ${subject} homework.`); // callback(); // } // doHomework('math', function() { ...
var rtc_update_my_nickname = function(){ if(_rtc_update_my_nickname != null){ _rtc_update_my_nickname(); } } var _rtc_update_my_nickname = null; var _debug_rtc_change_nick = null; $(function(){ class Peer{ cid=null; dc=null; pc=null; nick = null; volumn=0;...
import React, {useState} from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { Platform, Alert, SafeAreaView, TouchableOpacity, TouchableWithoutFeedback, StyleSheet, Keyboard, View, FlatList, ActivityIndicator} from 'react-native'; import {Ionicons} from '@expo/vector-icons'; import { zapisatEl...
const {anything, assert, constant, property} = require('fast-check') const {func: chunker} = require('./sample') test('passes on data as one big chunk, ignoring lines completely', () => { const argv = anything().chain(verbose => constant({verbose})) const data = anything() const prevLines = anything() ...
// Copyright 2021, University of Colorado Boulder // Auto-generated by modulifyFontAwesomeIcons.js, please do not modify directly. import Shape from '../../../kite/js/Shape.js'; import surpriseRegularString from './surpriseRegularString.js'; export default new Shape( surpriseRegularString );
var myName = "Hank"; var red = [0, 100, 63]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; var purple = [280, 50, 60]; var letterColors = [red, orange, green, purple]; drawName(myName, letterColors); bubbleShape = 'circle'; bounceName(); //bounceBubbles();
import update from '../../src/update'; import defaultSchema from '../../src/utils/default-schema'; import { warning } from '../../src/utils/warning'; describe('update - when your update does not change the state', function() { beforeEach(() => { this.schemas = { books: defaultSchema, authors: default...
import React from "react"; const VideoDetail = ({ video }) => { if (!video) { return ( <div className="col-md-8">Loading...</div> ); } const url = `https://www.youtube.com/embed/${video.id.videoId}`; return ( <div className="video-detail col-md-8"> <div ...
import { handleActions } from 'redux-actions'; import { UiState } from '../../constants/models'; const uiReducers = handleActions({ SHOW_SPINNER: state => ( state.set( 'spinnerVisible', true ) ), HIDE_SPINNER: state => ( state.set( 'spinnerVisible', false ) ) }, UiState)...
import redis from 'redis' import config from '../config' // 如果使用rediss连接的话,作为协议将启用TLS套接字连接,还需要在选项中传递其他TLS选项。 // 即tls字段不能为空 const redisClient = redis.createClient(`redis://${config.redishost}`, { port: config.redisport, password: config.redisauth, connect_timeout: 30000, tls: null, }) redisClient.on('ready', funct...
exports.config = { environment: 'testing', isTesting: true, common: { database: { name: process.env.NODE_API_DB_NAME_TEST }, session: { secret: 'some-super-secret', expiryTime: 3 } } };
import React, {Component} from 'react' import { View, Text, TextInput, TouchableOpacity, StyleSheet, KeyboardAvoidingView, Dimensions} from 'react-native' import { addNewCard } from '../actions' import { addCardToDeck } from '../utils/api' import { connect } from 'react-redux' import { gray, light, dark } from '../util...
/*! TRCSVJS v1.0.0 https://github.com/drobledom/trcsvjs License: MIT */ //papa if (typeof Papa === "undefined") { var Papa = require("papaparse"); } (function (root, Papa, factory) { if (typeof define === "function" && define.amd) { // AMD. Register as an anonymous module. define([], factory); } els...
'use strict'; const common = require('./webpack.config.common'); console.log('[Webpack] Use dev configuration\n'); module.exports = Object.assign({}, { mode: 'development', devtool: '#source-map', }, common);
/*================================================== * Timeline API * * This file will load all the Javascript files * necessary to make the standard timeline work. * It also detects the default locale. * * To run from the MIT copy of Timeline: * Include this file in your HTML file as follows: * * <s...