text
stringlengths
3
1.05M
"""yamlfile.py unit tests.""" from unittest.mock import patch import pytest import pypyr.parser.yamlfile def test_yaml_file_open_fails_on_arbitrary_string(): """Non path-y input string should fail.""" with pytest.raises(FileNotFoundError): pypyr.parser.yamlfile.get_parsed_context('value 1,value 2, v...
// @flow import React from "react"; const LendingIcon = ({ size = 16 }: { size: number }) => ( <svg width={size} height={size} viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M2.54545 7.27274V11.0909C2.54545 12.1955 3.44088 13.0909 4.54545 13.0909H9.45455...
import os, zipfile file_count = 2 zip_file = 'newsletter.docx' forty_two = '42.zip' bomb_file = 'newslettergenerated.docx' tmp_dir = '/tmp/zip_bomb' file_name = '0.txt' mb = 10485 # mb = 1 def create_tmp_dir(): if not os.path.exists(tmp_dir): os.makedirs(tmp_dir) def extract_docx(): unzip = 'unzip ...
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { mapToCssModules, tagPropType } from './utils'; var ...
import React from "react" import { useStaticQuery, graphql } from 'gatsby' import styled from 'styled-components' const HomeSimple = () => { const data = useStaticQuery(graphql` query { allWordpressWpHomeSection(filter: {categories: {elemMatch: {wordpress_id: {eq: 6}}}}) { edge...
define(function (require) { return function (seriesModel) { var coordSys = seriesModel.coordinateSystem; if (coordSys && coordSys.type !== 'view') { return; } var rect = coordSys.getBoundingRect(); var nodeData = seriesModel.getData(); var grap...
from math import inf def calcNewPos(direction, value, x, y): incX = 0 incY = 0 if (direction == "R"): incX = 1 if (direction == "U"): incY = 1 if (direction == "L"): incX = -1 if (direction == "D"): incY = -1 return [x + incX, y + incY] def script(): ...
// TC object stub var TC = {state: 'notInitialized'}; // listen to instructions from background page if (window === window.top) { chrome.runtime.onMessage.addListener(function (message, sender, callback) { if (message.type === "browserAction") { switch (TC.state) { case 'notInit...
๏ปฟ/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.lang['af']={"editor":"Woordverwerker","editorPanel":"Woordverwerkerpaneel","common":{"editorHelp":"Druk op ALT 0 vir hulp","browseServer":"Blaai op bediener","url":...
// Tests copied from ember-fetch addon import { module, test } from 'qunit'; import { resolve } from 'rsvp'; import { determineBodyPromise } from '@ember-data/adapter/-private'; class Response { ok = true; constructor(text, options) { this.status = options.status; this._text = text; } text() { ...
import { readFile, writeFile } from "fs/promises"; import { AppError, eventStart, eventStop, isNil, newEventFromEvent, processDirectoryRecursive, } from "@compas/stdlib"; import * as recast from "recast"; import { PARALLEL_COUNT } from "../constants.js"; /** * Convert useQueryFoo({}, {}, { staleTime: 5 })...
import React, {useEffect} from 'react'; import Layout from "../components/Layout"; import Devices from "../components/Devices"; const DevicesPage = () => { return ( <Layout> <h5 className="mb-5">ฮฃฯ…ฯƒฮบฮตฯ…ฮญฯ‚</h5> <Devices className="container-fluid data-table-striped data-table"/> ...
# # Copyright (c), 2018-2021, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
import React from 'react'; import PropTypes from 'prop-types'; import { Svg, Circle as _Circle, Ellipse, G, LinearGradient, RadialGradient, Line, Path, Polygon, Polyline, Rect, Symbol, Text, Use, Defs, Stop, } from 'react-native-svg'; const AlarmCheck = props => { const { color, size,...
(function() { 'use strict'; angular .module('noctemApp') .config(stateConfig); stateConfig.$inject = ['$stateProvider']; function stateConfig($stateProvider) { $stateProvider.state('jhi-configuration', { parent: 'admin', url: '/configuration', ...
var NAVTREEINDEX26 = { "classPHP__Token__BOOLEAN__AND.html#a65b3ac33c6861378ee7aa071ba6539eb":[60,0,25,2], "classPHP__Token__BOOLEAN__AND.html#a7ae1d600ed52531dc679f700a7af5d24":[60,0,25,3], "classPHP__Token__BOOLEAN__AND.html#acaceb755d410d45b3b701ff0d13c6b76":[60,0,25,0], "classPHP__Token__BOOLEAN__OR.html":[60,0,26]...
const { deployMultisigMint } = require('./cli/deployMultisigMint'); const { mintMultisig } = require('./cli/mintMultisig'); const { apply } = require('./cli/apply'); const { proposeOperations } = require('./cli/proposeOperations'); const { proposeOperationsChannel } = require('./cli/proposeOperationsChannel'); const { ...
/* | Manages the server config. | | To be configured via config.js */ 'use strict'; tim.define( module, ( def ) => { if( TIM ) { def.attributes = { // https settings enabled : { type : 'boolean', defaultValue : 'false' }, // cert cert : { type : [ 'null', 'string' ], defaultValue : 'null' }, // key ...
const init = require('../common/init.js'); var shell = require('shelljs') var date = require('date-and-time'); var curr_date = date.format(new Date(), 'YYYY/MM/DD HH:mm:ss') const logz = init.getLogz(); const log4js = init.getLog(); const logger = log4js.getLogger('backend-logs'); const uilogger = log4js.getLogger(...
const {resolve} = require('path') const {isObject, isString} = require('core-util-is') const {error} = require('./error') const createConfigLoader = require('./config/create') const Caviar = require('./caviar') const Sandbox = require('./sandbox') const {IS_CHILD_PROCESS} = require('./constants') module.exports = ra...
import React, { Component } from 'react' import { Text, View } from 'react-native'; export default class BuyCar extends Component { static navigationOptions = { title: 'ไนฐๅฅฝ่ฝฆ' } render() { return ( <View> <Text> ไนฐๅฅฝ่ฝฆ </Text> </View> ) } }
const fs = require('fs'); const path = require('path'); const Benchmark = require('benchmark'); const { smartIndexOf } = require('../../lib/sql-buffer'); const suite = new Benchmark.Suite(); const fileContent = fs.readFileSync(path.resolve(__dirname, '../fixtures', 'fixture.sql')); const fileContentString = fileCont...
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Dev Tools with nodejs.\n'); }).listen(80, '0.0.0.0'); console.log('Server running at http://127.0.0.1:80/');
import KUTE from '../objects/kute.js' import units from '../interpolation/units.js' // const borderRadius = { category : 'borderRadius', properties : [..], defaultValues: {..}, interpolation: {units} } // Component Properties const radiusProps = ['borderRadius', 'borderTopLeftRadius', 'borderTopRightRadius', 'border...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _regenerator = require('babel-runtime/regenerator'); var _regenerator2 = _interopRequireDefault(_regenerator); var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator'); var _asyncToGenerator3 = _interopRequireDefau...
import*as MobileThrottlingModule from'./mobile_throttling.js';self.MobileThrottling=self.MobileThrottling||{};MobileThrottling=MobileThrottling||{};MobileThrottling.MobileThrottlingSelector=MobileThrottlingModule.MobileThrottlingSelector.MobileThrottlingSelector;MobileThrottling.NetworkPanelIndicator=MobileThrottlingMo...
from ..IEEE488 import IEEE488 from ..SCPI import SCPI class HP33120A(IEEE488, SCPI): """.""" # self.amps = [0.01, 5] # self.freqs = [0, 15e6] def state(self): """.""" print(f"Amplitude: {self.amplitude}") print(f"Frequency: {self.frequency}") print(f"Shape: {self.shap...
import React from "react" import { ToastContainer, toast } from "react-toastify" import "react-toastify/dist/ReactToastify.css" import SectionTitle from "../Global/SectionTitle" export default function Contact() { const submitForm = ev => { ev.preventDefault() const form = ev.target const data = new Form...
/* ========================================================================== Table Sortablle Mixin for sorting table organism. ========================================================================== */ const config = require( 'cf-atomic-component/src/utilities/config' ); const closest = require( 'cf-a...
#!/usr/bin/env node /* * Copyright 2014-2015 Guy Bedford (http://guybedford.com) * * 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/LICEN...
# Copyright 2003, 2004, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Status: ported (danielw) # Base revision: 56043 # This module defines the 'alias' rule and associated class. # # Alias is jus...
/* * 2007-2016 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy ...
import * as THREE from "./three.js/three.module.js" const attribs = ["position","uv" ,"in_Color", "in_FaceColor", "in_Modulous" ,"normal", "in_Pow", "in_flat_color", "in_use_texture", "in_decal_texture" ]; const attrib_bytes = [4,4,1,1,1,4,4,1,1,1] const attrib_sizes = [3,2,4,4,2,3,1,1,1,1] const attrib_normal...
import { useState, useEffect } from "react"; import { UserPasswordCredential, AnonymousCredential } from "mongodb-stitch-browser-sdk"; import {app} from "./stitch.js"; // Log in a user with the specified email and password // Note: The user must already be registered with the Stitch app. // See https://docs.mongodb.c...
function SvgRotateRightTwoTone(props) { return ( <svg xmlns='http://www.w3.org/2000/svg' height='1em' viewBox='0 0 24 24' width='1em' className='svg-icon' {...props}> <path d='M0 0h24v24H0V0z' fill='none' /> <path d='M19.93 11a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02...
from pyramid import i18n from pyramid.view import view_config from webob.multidict import MultiDict from h import search from h.feeds import render_atom, render_rss from h.storage import fetch_ordered_annotations _ = i18n.TranslationStringFactory(__package__) def _annotations(request): """Return the annotations...
import { describe, expect, it } from 'vitest'; import { pairSum } from '../pair-sum'; describe('pairSum', () => { it('', () => { expect(pairSum([5, 4, 2, 1])).toEqual(6); }); it('', () => { expect(pairSum([4, 2, 2, 3])).toEqual(7); }); it('', () => { expect(pairSum([1, 100000])).toEqual(100001)...
/* @jsx execute */ const execute = (fun, props, children) => { fun() } const SayHello = () => console.log('Hello!') const getContent = () => { return ( <SayHello /> ); } getContent()
import orm from 'store/models' // this initializes redux-orm describe('getContent', () => { it('fetches the correct model based on polymorphicId', () => { const session = orm.session(orm.getEmptyState()) const id = '2' const title = 'Hey' session.Post.create({ id, title }) session.Pos...
import argparse import time import os import random import collections import numpy as np import torch from model import DAE, VAE, AAE from vocab import Vocab from meter import AverageMeter from utils import set_seed, logging, load_sent from batchify import get_batches parser = argparse.ArgumentParser() # Path argume...
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_query_all_solids 1'] = { 'repositoryOrError': { 'usedSolids': [ { '__typename': 'UsedSolid', ...
export { default as Features } from './Features'; export { default as Folio } from './Folio'; export { default as Gallery } from './Gallery'; export { default as Hero } from './Hero'; export { default as Services } from './Services';
typeof navigator === "object" && (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define('Plyr', factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Plyr =...
/** * Created by luisfvargas on 26/08/16. */ var proyectos = [ { id: "proyecto1", nombre:"Casa Osorio", descripcion:"Descripciรณn1", tipo:"casa", escala:"1000", estado:"terminado", imagenes:[ "https://www.dropbox.com/s/azwhrv264kl8as0/1.jpg?raw=1"...
/** * @file This file contains the CrudLine object. * * @author Clement GUICHARD <clement.guichard0@gmail.com> * @version 1.0.0 * */ /** * ------------------------------------------------------------------------ * Options JSHint * ------------------------------------------------------------------------ */ /...
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"10Zl":function(e,t,a){e.exports={siteHeader:"header-module--siteHeader--oAY2H",siteTitle:"header-module--siteTitle--OLBqf",siteNav:"header-module--siteNav--1VoYC"}},"3dzV":function(e,t,a){e.exports={heroContainer:"hero-module--heroContainer--2hGF6"}},"8ypT":func...
(window.webpackJsonp=window.webpackJsonp||[]).push([[112],{3599:function(t,e,r){"use strict";r.r(e),r.d(e,"icon",(function(){return l}));r(2),r(15),r(16),r(12);var n=r(0);function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnPropert...
import { isEmptyObject, makeMap } from '../../../helper/utils' import MPXProxy from '../../../core/proxy' import builtInKeysMap from '../builtInKeysMap' import mergeOptions from '../../../core/mergeOptions' import { LIFECYCLE } from './lifecycle' function transformProperties (properties) { if (!properties) { r...
Chart.defaults.global.defaultFontFamily='-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',Chart.defaults.global.defaultFontColor="#292b2c"; ctx=document.getElementById("myBarChart"),myLineChart=new Chart(ctx,{type:"bar",data:{labels:["August, 2017", "September, 2017", "Oct...
const { NotImplementedError } = require('../extensions/index.js'); /** * Given an array of domains, return the object with the appearances of the DNS. * * @param {Array} domains * @return {Object} * * @example * domains = [ * 'code.yandex.ru', * 'music.yandex.ru', * 'yandex.ru' * ] * * The result shoul...
/** *<p> *@Description: ้กต้ข็‚นๅ‡ปๅฐ็‰นๆ•ˆ *</p> *@author hiYuzu *@date 2019/03/11 13:56 */ $(function () { var a_idx = 0; $(document).ready(function () { $("body").click(function (e) { var a = new Array("ๅฏŒๅผบ", "ๆฐ‘ไธป", "ๆ–‡ๆ˜Ž", "ๅ’Œ่ฐ", "่‡ช็”ฑ", "ๅนณ็ญ‰", "ๅ…ฌๆญฃ", "ๆณ•ๆฒป", "็ˆฑๅ›ฝ", "ๆ•ฌไธš", "่ฏšไฟก", "ๅ‹ๅ–„"); var i = ...
// @flow import { getWalletCfg, getGlobalCfg } from "../config"; import { isTestNet } from "selectors"; import { equalElements } from "helpers"; import * as wallet from "wallet"; import { closeWalletRequest } from "actions/WalletLoaderActions"; import { closeDaemonRequest, getAvailableWallets } from "actions/DaemonActi...
let instance /** * ็ปŸไธ€็š„้Ÿณๆ•ˆ็ฎก็†ๅ™จ */ export default class Music { constructor() { if ( instance ) return instance instance = this this.bgmAudio = new Audio() this.bgmAudio.loop = false this.bgmAudio.src = 'audio/boom.mp3' this.shootAudio = new Audio() this.shootAudio.src = 'audio...
import ChatMessage from "./components/TheMessageComponent.js" (() => { console.log('fired'); const socket = io(); function setUserId({sID, message}){ vm.socketID = sID; } function appendMessage(message) { vm.messages.push(message); vm.$refs.message_sound.play(...
import React, { Component } from 'react' import styled from 'styled-components' import { Link } from 'gatsby' import { styles } from '../../../utils' export default class NavbarLinks extends Component { state = { links: [ { id: 0, path: '/', name: 'Home' }, { id:...
import discord import asyncio import rolling import voting import pickle from ledger import Ledger import string client = discord.Client() VERSION = '1.1.4' qwk_help = """For more specific help type help [topic]. Topics are : - dice - voting - request - ledger - ledger_management - ledger_commands""" dice_help = """...
var attr; var cards = document.getElementsByClassName("card"); var ids = getCardIDs(); var tempcols = []; displayCards("hidden"); // array helper, moving by index function moveTo(array, old_index, new_index) { if (new_index >= array.length) { var k = new_index - array.length; while ((k--) + 1) { ...
const rsa = require('node-rsa') function make_sign(post_data, APPSECRET) { const keys = [] const post_list = [] for (let i in post_data) { keys.push(i) } keys.sort() for (let key of keys) { post_list.push(`${key}=${encodeURIComponent(post_data[key])}`) // ่ฝฌไน‰ๆ•ฐๅญ—ๅฟ…้กปๅคงๅ†™ } ...
var stats = { type: "GROUP", name: "Global Information", path: "", pathFormatted: "group_missing-name-b06d1", stats: { "name": "Global Information", "numberOfRequests": { "total": "147", "ok": "147", "ko": "0" }, "minResponseTime": { "total": "23", "ok": "23",...
const graphql = require("graphql"); const { GraphQLSchema } = graphql; const query = require("./queries"); const mutation = require("./mutations"); /** * Combines `query` and `mutation` into a `GraphQLSchema` * @returns {GraphQLSchema} */ module.exports = new GraphQLSchema({ query, mutation });
const { pathsToModuleNameMapper } = require('ts-jest/utils'); const { compilerOptions } = require('./tsconfig'); module.exports = { preset: 'ts-jest', testMatch: ['<rootDir>/src/**/*.spec.{ts,tsx}'], testEnvironment: 'jsdom', globals: { 'ts-jest': { tsConfig: './tsconfig.json', }, }, transfor...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
export const Company = "ET"; export const NewMessageRegister = "newMessageRegister"; export const NewMessageKitchen = "newMessageKitchen";
/* * jmpress.presentation-mode plugin * Display a window for the presenter with notes and a control and view of the * presentation */ (function( $, document, window, undefined ) { 'use strict'; var $jmpress = $.jmpress; var PREFIX = "jmpress-presentation-"; /* FUNCTIONS */ function randomString() { return...
(function () { "use strict"; var isWebkit = navigator.userAgent.indexOf("WebKit") >= 0 && navigator.userAgent.indexOf("Chrome") < 0, isWebkitOrBlink = navigator.userAgent.indexOf("WebKit") >= 0, isPhantomJs = navigator.userAgent.indexOf("PhantomJS") >= 0, isLocalRunner = doc...
const getChartConfig = (title, type) => { return { type: type, data: { datasets: [{ data: [-1], label: 'Loading...', }], labels: ['Loading...'], }, options: { cutoutPercentage: type === 'doughnut' ? 40 : ...
const Example = require("../models/example.model"); const responseHandler = require("../helpers/responseHandler"); const sampleData = { name: "John Doe", age: 13, pass: true }; const getExample = (req, res) => { try { return res .status(200) .json( respo...
const { isPlainObject } = require('lodash'); const JWT = require('../../helpers/jwt'); const instance = require('../../helpers/weak_cache'); const { InvalidRequestObject } = require('../../helpers/errors'); /* * Decrypts and validates the content of provided request parameter and replaces the parameters * provided ...
/** * @overview Fozzie Tabs Component JS Wrapper * * @module f-tabs */ // Import vue component import Tabs from '@/components/Tabs.vue'; import Tab from '@/components/Tab.vue'; // Declare install function executed by Vue.use() export function install (Vue) { if (install.installed) return; install.install...
'use strict'; const {error, log} = require('../global/console'); const helperModule = { error: (...args) => { return error(...args); }, fatal, log: (...args) => { return log(...args); }, }; module.exports = helperModule; /** * @function * @name fatal * @description stop the application by logg...
var searchData= [ ['id',['id',['../struct_c_c_sb_sw_version__t.html#a2aab331b9eefaa845b9e91a6274d1336',1,'CCSbSwVersion_t']]], ['imageaddr',['imageAddr',['../struct_verified_image_info__t.html#a41ecf40c51b042310b0b70b17598317a',1,'VerifiedImageInfo_t']]], ['imagememorytype',['imageMemoryType',['../struct_verified...
const db = require("../config/connection"); const { Round, Hazard, User } = require("../models"); const roundData = require("./roundData.json"); const hazardData = require("./hazardData.json"); db.once("open", async () => { await Round.deleteMany({}); await Hazard.deleteMany({}); await User.deleteMany({}); c...
import { Alert } from "./Alert.js"; import { deleteBill } from "./requests.js"; const testBills = [ { billName: "Rent", nextDue: "2022-02-01", amtDue: 635, status: "current", freq: "monthly", type: "home", datePaid: null, }, { billName: "PG&E", nextDue: "2022-02-24", amtDu...
# Copyright 2017-2021 John Snow Labs # # 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...
import { smartFormatter as _format, formatRange } from './smart_formatter'; import { patchFontOptions, getVizRangeObject, getLogExt as getLog, raiseToExt as raiseTo, valueOf, rotateBBox, getCategoriesInfo, adjustVisualRange, getAddFunction, convertVisualRangeObject } from '../cor...
// components/Tabs/Tabs.js Component({ /** * ็ป„ไปถ็š„ๅฑžๆ€งๅˆ—่กจ */ properties: { tabs: { type: Array, value: [] } }, /** * ็ป„ไปถ็š„ๅˆๅง‹ๆ•ฐๆฎ */ data: { }, /** * ็ป„ไปถ็š„ๆ–นๆณ•ๅˆ—่กจ */ methods: { handleItemTap(e) { //่Žทๅ–็‚นๅ‡ป็š„็ดขๅผ• const { index } = e.currentTarget.dataset; //่งฆๅ‘ ็ˆถ็ป„...
from __future__ import absolute_import import unittest import os import shutil from .counter import Counter class CounterTestCase(unittest.TestCase): def test_simple(self): c = Counter('Test') c.register('a') c.register('b') c.inc('a') self.assertEqual(c['a'], ['a', 1]) ...
/* * Process for meetings. Set dates * jrobens@interlated.com.au * 2013003 * */ (function($) { Drupal.behaviors.MeetingProcess = { attach: function(context, settings) { $('#edit-field-meeting-date-und-0-value-datepicker-popup-0', context).change(function() { // 21 Mar 20...
var React = require('react'); var defaultState = { image: undefined, status: 'loading' }; module.exports = function useImage(url, crossOrigin) { var res = React.useState(defaultState); var image = res[0].image; var status = res[0].status; var setState = res[1]; React.useEffect( function() { if (...
with open('input.txt', "r+") as file: contents = file.read() entries = list(filter(lambda x: x != '', contents.split('\n'))) numbers = list(map(lambda x: int(x), entries)) shouldLeave = False for i in numbers: for j in numbers: if (i + j) == 2020: print('Answer is:', i * j) shouldLeave = True ...
export const isEmpty = value => (value === undefined || value === null || value === ''); export const isNotEmpty = value => !isEmpty(value);
import pyxel # Bookerใ‚ฏใƒฉใ‚น๏ผšๅ€คใฎๅค‰ๅŒ–ใ‚’ไบˆ็ด„ใ™ใ‚‹ # ใ‚คใƒ™ใƒณใƒˆ็™ป้Œฒๆ™‚๏ผšupdate()ๅ†…ใงBooker.add()ใ‚’ไฝฟใ† # Booker.add(ๅฏพ่ฑกใ‚คใƒณใ‚นใ‚ฟใƒณใ‚น(obj), ใฎๅค‰ๆ•ฐๅ(str), ๅค‰ๅŒ–ใ•ใ›ใŸใ„้‡(int), # ๅค‰ๅŒ–้–‹ๅง‹ๆ™‚้–“(ๅ˜ไฝใƒ•ใƒฌใƒผใƒ ๅพŒ้–‹ๅง‹)(int), ๅค‰ๅŒ–ใซ่ฆใ™ใ‚‹ๆ™‚้–“(0<int), ใ‚คใƒผใ‚ธใƒณใ‚ฐ(str)) # ใ‚คใƒผใ‚ธใƒณใ‚ฐใฏCubicใชใƒ™ใ‚ธใ‚งๆ›ฒ็ทšใ‚’ไฝฟ็”จ(ใ‚ซใ‚นใ‚ฟใƒžใ‚คใ‚บๅฏ)ใ€ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฏ'linear' # ใ‚คใƒ™ใƒณใƒˆๅ‡บๅŠ›ๆ™‚๏ผšBooker.do()ใ‚’Booker.add()ใ‚ˆใ‚ŠๅพŒใ‚ใซ่จ˜่ฟฐใ—ใ€ๆฏŽใƒ•ใƒฌใƒผใƒ ๅฎŸ่กŒใ™ใ‚‹ # ้…ๅธƒๅ…ƒ๏ผšhttps://github.com/namosuke/pyxe...
from .stop_departure_row import StopDeparture from .stop_departure_list import StopDepartureList
"use strict"; function init() { let sentence = "hello rob nice my name is timothy smith coy zoo".split(' '); let dictionary = new Dictionary(); let factory = new PhonemeFactory(); let renderer = new Renderer(); // renderer.drawSentence(sentence, dictionary, factory); let tc = new Consonant('...
var searchData= [ ['value_676',['value',['../structdaw_1_1json_1_1_json_event_parser_stack_value.html#a3205b5a09330d922073dd668b466d6e6',1,'daw::json::JsonEventParserStackValue::value()'],['../structdaw_1_1json_1_1basic__json__pair.html#ac0b44f3c64e79a3e5a89151748ab5808',1,'daw::json::basic_json_pair::value()']]] ];
# The MIT License (MIT) # Copyright ยฉ 2021 Yuma Rao # 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...
๏ปฟimport ExportPlaylist from 'foreground/model/dialog/exportPlaylist'; import ExportPlaylistView from 'foreground/view/dialog/exportPlaylistView'; import ViewTestUtility from 'test/foreground/view/viewTestUtility'; describe('ExportPlaylistView', function() { beforeEach(function() { this.documentFragment = documen...
#!/usr/bin/env python3 # Copyright 2016-2018 Brian Warner # # 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...
//// [crashInsourcePropertyIsRelatableToTargetProperty.ts] class C { private x = 1; } class D extends C { } function foo(x: "hi", items: string[]): typeof foo; function foo(x: string, items: string[]): typeof foo { return null; } var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetPrope...
const Router = require('koa-router'); const Crew = require('./model'); const { auth, authz, cache } = require('../../../middleware'); const router = new Router({ prefix: '/crew', }); // Get all crew router.get('/', cache(300), async (ctx) => { try { const result = await Crew.find({}); ctx.status = 200; ...
var express = require('express'), http = require('http'), server = http.createServer(app); var app = express(); const redis = require('redis'); const io = require('socket.io'); const client = redis.createClient(); server.listen(3000, 'localhost'); console.log("Listening....."); io.listen(s...
// react-select setup for use with redux-form // pass into redux-forms field // <Field component={ WrappedSelect } /> /* Required props: options: ArrayOf(objects): formatted: [{value: 'some_value', label: 'Field Name'}] name: String: Name of form field placeholder: String label: String: ...
const { appendWebpackPlugin, getPaths, getWebpackPlugin, replace, } = require('@rescripts/utilities'); const { copyAssets, fixAssetManifest, fixOutput, locateContentScripts, generateHtml, generateIcons, paths, } = require('./utils'); const path = require('path'); const fs = require('fs'); // Load...
'use strict'; const uuid = require('uuid'); const dynamoDb = require('./dynamodb'); module.exports.create = (event, context, callback) => { const timestamp = new Date().getTime(); const data = JSON.parse(event.body); if (typeof data.text !== 'string') { console.error('Validation Failed'); callback(null,...
exports.commands = { spop: 'sendpopup', sendpopup: function(target, room, user) { if (!this.can('popup')) return false; target = this.splitTarget(target); var targetUser = this.targetUser; if (!targetUser) return this.sendReply('/sendpopup [user], [message] - Vous avez manquรฉ l utilisateur!'); ...
import Vue from 'vue' import { Dialog } from 'element-ui' import store from '@/store' import router from '@/router' const GlobalDialog = Vue.extend({ name: 'GlobalDialog', data() { return { visible: false, } }, props: { ...Dialog.props, content: [String, Function], footer: Function, ...
'use strict'; // Reload client for Chrome Apps & Extensions. // The reload client has a compatibility with livereload. // WARNING: only supports reload command. /* var LIVERELOAD_HOST = 'localhost:'; var LIVERELOAD_PORT = 35729; var connection = new WebSocket('ws://' + LIVERELOAD_HOST + LIVERELOAD_PORT + '/livereload'...
from .utils import ApiResourceTestCase from perma.models import LinkUser, Folder class FolderResourceTestCase(ApiResourceTestCase): resource_url = '/folders' @classmethod def setUpTestData(cls): cls.org_user = LinkUser.objects.get(pk=3) cls.empty_child_folder = Folder.objects.get(pk=29) ...
""" The tool to check the availability or syntax of domains, IPv4, IPv6 or URL. :: โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ ...
import fs from 'fs'; const grid = []; fs.readFileSync('./src/inputs/9.txt', 'UTF-8') .split(/\r?\n/) .map(line => grid.push(line.split('').map(Number))); const ROWS = grid.length; const COLS = grid[0].length; const nearby = (grid, r, c) => [ [r, c - 1], [r, c + 1], [r - 1, c], [r + 1, c], ]....