text
stringlengths
3
1.05M
/*! * JavaScript Cookie v2.1.2 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */ ;(function (factory) { if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'object') { modul...
#!/usr/local/bin/python3 class Cat(): species = 'mamal' def __init__(self, name, age): self.name = name self.age = age # Instantiate the Cat object with 3 cats cat1 = Cat('Tigger', 1) cat2 = Cat('Smokey', 4) cat3 = Cat('Patch', 10) def oldest_cat(*args): ''' INFO: Create a functio...
//>>built define( "dijit/form/nls/tr/ComboBox", //begin v1.x content ({ previousMessage: "Önceki seçenekler", nextMessage: "Diğer seçenekler" }) //end v1.x content );
import numpy as np import matplotlib.pyplot as plt from numpy import vstack, array from pylab import plot, show, savefig import csv import random from scipy.cluster.vq import kmeans2, vq import numpy_indexed as npi import time if __name__ == "__main__": # read data as 2D array of data type 'np.float' result =...
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _createClass2 = _inte...
import { dew as _toStringDewDew } from "./toString.dew.js"; var exports = {}, _dewExec = false; export function dew() { if (_dewExec) return exports; _dewExec = true; var toString = _toStringDewDew(); /** * Replaces matches for `pattern` in `string` with `replacement`. * * **Note:** This method is...
import discord from discord.ext import commands import asyncio from googletrans import Translator class Translation(commands.Cog): def __init__(self,client): self.client = client @commands.cooldown(1,5,commands.BucketType.user) @commands.command() async def trans(self, ctx): """trans...
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib 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 a...
# coding=utf-8 # Copyright 2018 The TF-Agents 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...
// 12.4.2017 mko // Berechnung des Konfigurierten Sortiertermes $(document).ready(function () { $("#btnSave").click(function () { let AppFolder = $("#AppFolder").attr("value"); let rpnFName = $("#rpnFName").attr("value"); let ControllerName = $("#ControllerName").attr("value"); l...
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
import React from 'react'; import SortColumn, { SortByDirection } from '../../SortColumn'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/patternfly/components/Table/table.css'; import buttonStyles from '@patternfly/patternfly/components/Button/button.css'; export default (label, { col...
// // Tests autosplit locations with force : true, for small collections // (function() { 'use strict'; var st = new ShardingTest( {shards: 1, mongos: 1, other: {chunkSize: 1, mongosOptions: {noAutoSplit: ""}}}); var mongos = st.s0; var admin = mongos.getDB("admin"); var config = mongos.ge...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import nodemailer from 'nodemailer'; import { Action, ActionResult }...
var path = require('path'); module.exports = { mode: 'production', context: path.join(__dirname, '/dist'), entry: './client.js', output: { path: path.join(__dirname, '/browser'), filename: 'client.js', library: 'SubscriptionsTransportWs' } };
""" Print out Py-ART version information. This file can also be run as a script to report on dependencies before a build: python pyart/_debug_info.py """ from __future__ import print_function import os import sys def _debug_info(stream=None): """ Print out version and status information for debugging. ...
/** * @category saltcorn-data * @module models/user * @subcategory models */ const db = require("../db"); const bcrypt = require("bcryptjs"); const { contract, is } = require("contractis"); const { v4: uuidv4 } = require("uuid"); const dumbPasswords = require("dumb-passwords"); const validator = require("email-vali...
let hist = Array() let hist_id = 0 let prev_command = "" ///// Firebase parameters ///// const database = firebase.database(); const provider = new firebase.auth.GoogleAuthProvider(); //provider.addScope('https://www.googleapis.com/auth/plus.login'); const userLogin = { name: "hackntu" } const emailregex = /^(([^<>...
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2019 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * Calculate the distance between two sets of coordinates (points). * * @function Phaser.Math.Distance.Between ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Riccardo Malpica Galassi, Sapienza University, Roma, Italy """ import numpy as np from .ThermoKinetics import CanteraThermoKinetics class CanteraCSP(CanteraThermoKinetics): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tf = require("@tensorflow/tfjs-core"); var common_1 = require("../common"); function boxPredictionLayer(x, params) { return tf.tidy(function () { var batchSize = x.shape[0]; var boxPredictionEncoding = tf.reshape...
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.nipplejs=e()}}(function(){function e(){}function t(e,i)...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _stringWithLength = require('./string-with-length.generator'); Object.keys(_stringWithLength).forEach(function (key) { if (key === "default" || key === "__esModule") return; Object.defineProperty(exports, key, { enumerable: tr...
/** * Welcome to your Workbox-powered service worker! * * You'll need to register this file in your web app and you should * disable HTTP caching for this file too. * See https://goo.gl/nhQhGp * * The rest of the code is auto-generated. Please don't update this file * directly; instead, make changes to your Wor...
import React, { Component } from 'react'; import {Icon } from 'antd'; import './style/style.less'; export default class Card extends Component { constructor(props) { super(props); this.state={ flag:false, }; } render() { const {title,icon,more,className} = this.props; let flag = th...
// For a detailed explanation regarding each configuration property, visit: // https://jestjs.io/docs/en/configuration.html module.exports = { // Automatically clear mock calls and instances between every test clearMocks: true, // Indicates whether the coverage information should be collected while executing th...
module.exports = { env: { browser: true, es6: true, }, extends: [ 'airbnb', 'airbnb/hooks', 'plugin:prettier/recommended', 'prettier/react', ], globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly', }, parserOptions: { ecmaFeatures: { jsx: true, }, ...
var destinos = [], categorias = [], perfiles = []; var exp = undefined; function addElement (array, element){ if (!$.isArray(array)){ return false; } array.push(element); } function deleteElement (array, element){ if (!$.isArray(array)){ return false; }else { if (array.len...
(async () => { const gameID = prompt('Please enter the game set ID you are playing: '); const GetAnswers = await fetch(`https://api.blooket.com/api/games?gameId=${gameID}`, { headers: { "accept": "application/json, text/plain, */*", "accept-language": "en-US,en;q=0.9", ...
/* Copyright (c) Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ // @flow import * as React from 'react'; import { Block } from '../../block/index.js'; import { Button } from '../../button/index.js'; import { ProgressS...
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{"+QRC":function(e,t,n){"use strict";var r=n("E9nw"),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,c,l,s,u=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),c=document.createRange(),l=document.getSelection(),(s=document.createEl...
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="delete_macros_online_request.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a...
import React, {Component} from 'react'; import {Avatar, Chip, withStyles} from "@material-ui/core"; import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; import withRoot from "../withRoot"; import {blue, blueGrey, grey, red} from "@material-ui/core/colors"; import postgres from '../assets/images/psql.svg'; im...
// @flow import type { Course } from 'lib/types'; export const actionTypes = { SET_COURSES: 'dgclr/SET_COURSES', }; /** * Set courses action * @param {Array} courses * @return {Object} action of SET_COURSES */ export const setCourses = (courses: Array<Course> = []) => ({ type: actionTypes.SET_COURSES, cours...
'use strict'; /** * DESIGN NOTES * * The design decisions behind the scope are heavily favored for speed and memory consumption. * * The typical use of scope is to watch the expressions, which most of the time return the same * value as last time so we optimize the operation. * * Closures construction is expen...
export default (num, nth) => (nth > 0 ? +[...`${num}`].reverse()[nth - 1] || 0 : -1);
import Animation from './Animation.js'; import './App.css'; function App() { return ( <div className="App"> <header className="App-header"> <Animation asset="https://cdn.rive.app/animations/off_road_car_blog_0_6.riv" /> <p> Edit the <code>src/Animation.js</code> Rive React compone...
import { Icons } from './assets'; document.querySelectorAll('icon').forEach(toSvg); /** * Convert element to svg image * @example * ```html * <!-- USAGE --> * * <icon id="logo" width="150" height="150"></icon> * * <!-- RESULT --> * * <svg id="logo" width="150" height="150" ...>...</svg> * ``` */ functi...
from utils import CanadianScraper, CanadianPerson as Person import csv from io import StringIO COUNCIL_PAGE = 'https://www.assembly.ab.ca/txt/mla_home/contacts.csv' MEMBER_INDEX_URL = ( 'https://www.assembly.ab.ca/members/members-of-the-legislative-assembly' ) PARTIES = { 'AL': 'Alberta Liberal Party', '...
import React from 'react'; const VideoDetail = ({video}) => { if(!video){ return <div>Loading...</div> } const videoId = video.id.videoId; const url = `https://www.youtube.com/embed/${videoId}`; return ( <div className="video-detail col-md-8"> <div className="embed-responsive embed-responsive...
import * as Sentry from '@sentry/react-native'; import {version, revAppId, revSentryDsn} from '../package.json'; function shouldEnableSentry() { return !__DEV__ && revSentryDsn; } if (shouldEnableSentry()) { Sentry.init({ dsn: revSentryDsn, release: `${revAppId}@${version}`, dist: version, }); } fu...
from typing import Dict from frozendict import frozendict from consts import consts, resources from triggers.env_trigger import Trigger from triggers.olm_operators_trigger import OlmOperatorsTrigger _default_triggers = frozendict( { "production": Trigger( condition=("remote_service_url", cons...
export const URL = 'http://5e6753ea1937020016fed960.mockapi.io'; export const AUTH_USER = 'AUTH_USER'; export const SIGN_OUT = 'SIGN_OUT'; export const SIGN_UP = 'SIGN_UP'; export const FETCH_USERS = 'FETCH_USERS'; export const FETCH_ITEMS = 'FETCH_ITEMS'; export const FETCH_ITEMS_ERROR = 'FETCH_ITEMS_ERROR'; export...
'use strict'; module.exports = app => { app.resources('users', '/users', app.controller.user); app.resources('posts', '/posts', app.controller.post); };
# -*- coding: utf-8 -*- """ pyvisa-py.gpib ~~~~~~~~~~~~~~ GPIB Session implementation using linux-gpib or gpib-ctypes. :copyright: 2015-2020 by PyVISA-py Authors, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ import ctypes # Used for missing bindings not ideal fr...
/* artifact generator: C:\My\wizzi\stfnbssl\wizzi-examples\packages\wizzi-starter-mern\node_modules\wizzi-js\lib\artifacts\js\module\gen\main.js package: wizzi-js@0.7.7 primary source IttfDocument: C:\My\wizzi\stfnbssl\wizzi-examples\packages\wizzi-starter-mern\.wizzi\server\src\site\controllers\auth.js.itt...
// Putting in ECMA to provide behavior to Help Page // This is a self-call function to show the person the soul they traded for power (function() { 'use strict'; function Helping(){ this.name = document.querySelector('#name').value; this.email = document.querySelector('#email').value; this.tel = docum...
import injectpromise from 'injectpromise'; import Validator from 'paramValidator'; export default class SideChain { constructor(sideOptions, TronWeb = false, mainchain = false, privateKey = false) { this.mainchain = mainchain; const { fullHost, fullNode, solidityNode, eventServer, mainGatewayAddres...
import { observable, computed, transaction, autorun, extendObservable, action, isObservableObject, observe, isObservable, isObservableProp, isComputedProp, spy, isAction, configure } from "../../../src/v5/mobx.ts" import * as mobx from "../../../src/v5/mobx.ts" t...
""" .. module: lemur.authorities.service :platform: Unix :synopsis: This module contains all of the services level functions used to administer authorities in Lemur :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glis...
const express = require("express"); const bodyParser = require("body-parser"); const cors = require("cors"); const chai = require("chai"); const chaiHttp = require("chai-http"); const should = chai.should(); const config = require("../config"); const SERVER_URL = process.env.APP_URL || "http://localhost:8000"; const ...
_base_ = [ '../_base_/models/ssd300.py', '../_base_/datasets/ShipRSImageNet_Level1_detection.py', '../_base_/schedules/schedule_100e.py', '../_base_/default_runtime.py' ] input_size = 512 model = dict( backbone=dict(input_size=input_size), bbox_head=dict( num_classes=4, in_channels=(512...
/** * scripts/pages/store/index.js * Does logic for picking product variants and adding to cart */ /* global ga */ import jQuery from '~/lib/jquery' import modal from '~/lib/modal' Promise.all([jQuery, modal]).then(([$]) => { ga('send', 'event', 'Store', 'Store Visit') $('document').ready(function () { ...
let aid = getQueryString('id'); document.getElementById('praise').addEventListener('click', praise); //点赞 function praise(){ let heartImg = document.getElementsByClassName('heart-img')[0]; if(heartImg.className === 'heart-img') { ajax({ url: '/article/details/addpraisenum', type: 'POST', dataType: 'JSON', ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import torch import torch.nn as nn from datasets import load_dataset from noise2noise import Noise2Noise from argparse import ArgumentParser def parse_args(): """Command-line argument parser for training.""" # New parser parser = ArgumentParser(description...
Clazz.declarePackage ("J.adapter.writers"); Clazz.load (["JU.SB", "JU.JSONWriter", "java.util.Hashtable"], "J.adapter.writers.QCJSONWriter", ["java.lang.Boolean", "java.util.Date", "JU.DF", "$.P3", "$.PT", "J.quantum.SlaterData", "org.qcschema.QCSchemaUnits"], function () { c$ = Clazz.decorateAsClass (function () { thi...
from datetime import datetime from dagster import Out, job, op from dagster.utils import script_relative_path from dagster_pandas import create_dagster_pandas_dataframe_type from pandas import DataFrame, read_csv # start_summary def compute_trip_dataframe_summary_statistics(dataframe): return { "min_star...
import store from "store" let { id , nm} = store.get("currentCity") || {id:1,nm:"北京"} const state = { cityId:id, nm } const mutations = { setCity(state,{id , nm}){ state.cityId = id state.nm = nm } } const actions = { saveCity({commit},payload ){ commit('setCity',payload) } } export defaul...
import React from 'react'; import ShallowRenderer from 'react-test-renderer/shallow'; import FormData from '../components/FormData'; import puppeteer from 'puppeteer'; let page = null; let browser = null; beforeAll(async () => { browser = await puppeteer.launch(); page = await browser.newPage(); }); describe...
(window.webpackJsonp=window.webpackJsonp||[]).push([["locale-display-names.sah"],{"./node_modules/@formatjs/intl-displaynames/locale-data/sah.js":function(a,M){Intl.DisplayNames&&"function"==typeof Intl.DisplayNames.__addLocaleData&&Intl.DisplayNames.__addLocaleData({data:{types:{language:{long:{ab:"Абхаастыы",af:"Аппы...
from modules.layers.encoders import * from modules.layers.decoders import * from modules.layers.embedders import * import abc import sys from .released_models import released_models class NerModel(nn.Module, metaclass=abc.ABCMeta): """Base class for all Models""" def __init__(self, encoder, decoder, use_cuda...
const ageUpSound = new Audio ("/client/sound/ageUp.mp3") const shipSelectSound = new Audio ("/client/sound/frigateSelect.mp3") const townSelectSound = new Audio ("/client/sound/townSelect.mp3") const nationSelectMusic = new Audio ("/client/sound/music/nationSelectMusic.mp3") const buttonClickAudio2 = new Audio ( "https...
import FWCore.ParameterSet.Config as cms # This config was generated automatically using generate2026Geometry.py # If you notice a mistake, please update the generating script, not just this config XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", geomXMLFiles = cms.vstring( 'Geometry/CM...
var cheerio = require('cheerio'), request = require('request'); exports = module.exports = function (code) { return new Promise(function(resolve, reject) { request .post('http://seguimientoweb.correos.cl/ConEnvCorreos.aspx', function(error, response, body) { if (error) { ...
define(["sprd/data/IImageUploadService", "js/core/Bus", "xaml!sprd/data/SprdApiDataSource", "flow", "sprd/model/DesignUpload", "sprd/type/UploadDesign", "underscore", "sprd/entity/Image", "sprd/error/DesignUploadError"], function(Component, Bus, SprdApiDataSource, flow, DesignUpload, UploadDesign, _...
/** * Fastly API * Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The...
import React, { useEffect, useState } from "react"; import http from "../../common-http"; // reactstrap components import { Card, Container, Row, Col, Carousel, CarouselItem, CarouselIndicators, CarouselCaption, } from "reactstrap"; // core components const items = []; function LocationCarousel() { ...
const test = require('tap').test; const Sensing = require('../../src/blocks/scratch3_sensing'); const Runtime = require('../../src/engine/runtime'); const Sprite = require('../../src/sprites/sprite'); const RenderedTarget = require('../../src/sprites/rendered-target'); test('getPrimitives', t => { const rt = new R...
import '../styles/global.css' const App = ({ Component, pageProps }) => { return <Component {...pageProps} /> } export default App;
$(document).ready(function () { //添加提示框 $('#add-user-modal').modal({ backdrop: 'static', show: false }); //编辑提示框 $('#edit-user-modal').modal({ backdrop: 'static', show: false }); var ajax_source = "/member/user_list_page"; //列表datatable var oTab...
import React from "react" import Why from "./form.module.scss" export default class MyForm extends React.Component { constructor(props) { super(props) this.submitForm = this.submitForm.bind(this) this.state = { status: "", } } render() { const { status } = this.state return ( ...
""" Ask the user for a number. Depending on whether the number is even or odd, print out an appropriate message to the user. Extras: 1. If the number is a multiple of 4, print out a different message. 2. Ask the user for two numbers: one number to check (call it num) and one number to divide by (che...
import React from 'react'; import { Link } from 'react-router-dom'; import Button from '../components/Button'; import "../CSS/notfound.css" function NotFound() { return ( <div className="error_center"> <div className="error_logo"> <span className="first">4</span><span cla...
function my_function938(){ //81605874657214615739444056389509xFhjynFCDzdndaELNqDlLzzScpTcfYLh } function my_function062(){ //36487385372675356599896186248085uEDCiLVaSKLHrJZBcWVfJNMgnpHDbzOA } function my_function600(){ //45266049248194593629839375960325NiBJSMqbygrBrBAMJTIFKnVysaycSpHq } function my_function749(){ /...
import React from "react"; function Report({ personData, controlData }) { // personData = controlled score, controlData = original score. const red = "#ad3e2f"; const orange = "#db5400"; const lightOrange = "#f0a171"; const green = "#377d4f"; const blue = "#284e78"; const darkred = "#ab2615"; const bol...
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=...
import React, { Component } from "react"; import PropTypes from "prop-types"; import classes from "./Motion.scss"; import classNames from "classnames"; import { BoxItemWrapper, BoxItem } from "../../internals/Box"; export default class Motion extends Component { static propTypes = { render: PropTypes.oneOf(["tra...
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'sourcedialog', 'af', { toolbar: 'Bron', title: 'Bron' } );
# Copyright (c) 2013, Neil Lasrado and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.desk.form.linked_with import get_linked_docs def execute(filters=None): columns, data = [], [] if not filters: return colu...
const {Usuarios} = require('../../models/index') const ListarUsuarios = (req,res) => { Usuarios.findAll() .then(usuarios => res.json(usuarios)) .catch( err => res.json({msn: err})) } module.exports = ListarUsuarios;
const monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ]; export default function getTimeFromLong(long) { const date = new Date(long); return ( monthNames[date.getMonth()] + " " + date.getDay...
#pragma strict private var menu : GameObject; function Start() { // Get a reference to the game menu menu = GameObject.Find('Menu'); } function OnCollisionEnter() { // Set the current score to 0 if the ball hits the pitch menu.GetComponent(Menu).CurrentScore = 0; }
const express = require('express'); const { check, validationResult } = require('express-validator'); const auth = require('../middleware/auth'); const Contact = require('../models/Contact'); const User = require('../models/User'); const router = express.Router(); /** * @route GET api/contacts * @desc Get all users ...
# Copyright (c) 2018 Serguei Kalentchouk et al. All rights reserved. # Use of this source code is governed by an MIT license that can be found in the LICENSE file. from node_test_case import NodeTestCase class TestVectorOps(NodeTestCase): def test_dot_product(self): self.create_node('DotProduct', {'input1...
function arrayMax(array) { return Math.max.apply(Math, array.filter(function (n) { return !isNaN(n); })); } exports.arrayMax = arrayMax; function arrayMin(array) { return Math.min.apply(Math, array.filter(function (n) { return !isNaN(n); })); } exports.arrayMin = arrayMin; function upsca...
/* Copyright (c) 2003-01, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang("devtools","lt",{title:"Elemento informacija",dialogName:"Dialogo lango pavadinimas",tabName:"Auselės pavadinimas",elementId:"Eleme...
const expect = require('chai').expect; require('./test-mock.js').setup(); var VelibCardWindow = require('./velib-card-window.js'); describe('the velib card window', function () { this.timeout(10000); it('can be constructed', function (done) { var card = new VelibCardWindow(); expect(card).not.to.be.empt...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import os import torch import nump...
"use strict"; const parse5 = require("parse5"); const treeAdapter = require("./parse5-adapter-serialization"); const NODE_TYPE = require("../living/node-type"); exports.domToHtml = iterable => { let ret = ""; for (const node of iterable) { if (node.nodeType === NODE_TYPE.DOCUMENT_NODE) { ret += parse5.se...
import GBP from './GBP'; import BaseModel from './BaseModel'; class Transaction extends BaseModel { get defaults() { return { date: null, description: null, amount: new GBP(), balance: new GBP() }; } fromJSON(props) { this.props = { date: props.date, description: ...
/** @flow */ import React from 'react'; import {Button} from '../../../src/index.js'; /** * @description A light button demo. * @returns {Object<string,*>} React component. */ function LightButton() { return <Button title={'Light Button'} />; } const meta = { title: 'Button' }; export {LightButton}; expo...
import urllib.request, urllib.parse, urllib.error import json # Note that Google is increasingly requiring keys # for this API serviceurl = 'http://maps.googleapis.com/maps/api/geocode/json?' while True: address = input('Enter location: ') if len(address) < 1: break url = serviceurl + urllib.parse.urlenc...
const { fighter } = require('../models/fighter'); const createFighterValid = (req, res, next) => { // TODO: Implement validatior for fighter entity during creation next(); } const updateFighterValid = (req, res, next) => { // TODO: Implement validatior for fighter entity during update next(); } expor...
import React from "react"; // reactstrap components import { Badge, Button, Card, CardBody, CardTitle, Container, Row, Col, } from "reactstrap"; // Core Components function FreeDemo() { return ( <> <section className="section-free-demo bg-secondary skew-separator"> <Container> ...
var colors = { "1": "#7570b3", "2": "#1b9e77", "3": "#d95f02", "4": "#e7298a", "5": "#66a61e", "6": "#e6ab02", "7": "#a6761d", "8": "#666666", "9": "#1b9e77", "10": "#d95f02", "11": "#7570b3", "12": "#e7298a", "13": "#66a61e", "14": "#e6ab02", "15": "#a6761d"...
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests NODE_NETWORK_LIMITED. Tests that a node configured with -prune=550 signals NODE_NETWORK_LIMITED ...
const path = require('path'); const fs = require('fs'); const del = require('del'); const sync = require('child_process').execSync; const paths = { app: (...p) => path.join(process.cwd(), ...p), bin: (...p) => path.join(process.cwd(), 'node_modules', '.bin', ...p), cli: (...p) => path.join(__dirname, ...p), }; ...
""" Copyright 2018 Banco Bilbao Vizcaya Argentaria, S.A. 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 ...
import test from 'ava' import cookie from 'parse/cookie' import format from 'format' import moment from 'moment' function makeSpec () { return new Map() } test('expires', t => { const time = moment.utc() const spec = makeSpec() cookie({ name: 'theme', expires: format.date.iso8601(time) }, spec) t.deepEqual(...