text
stringlengths
27
775k
# TODO: should this work in v5? return Set-StrictMode -Version Latest function f () {} Mock f {} Describe 'Mock at script scope' { It 't' { 1 | Should -Be 1 } }
#!/bin/bash cd ~ git clone -b monolith https://github.com/express42/reddit.git cd reddit bundle install # systemctl-ed #puma -d echo "[Unit] Description=puma [Service] ExecStart=/usr/local/bin/puma -d KillMode=process User=appuser WorkingDirectory=/home/appuser/reddit [Install] WantedBy=multi-user.target" > puma.s...
package com.dropbox.componentbox.samples.discovery.drawable import com.dropbox.componentbox.foundation.Image import com.dropbox.componentbox.foundation.Images import com.dropbox.componentbox.foundation.RealImage import com.dropbox.componentbox.foundation.RealMultiplatformRes actual class DiscoveryImages : Images { ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace numl.AI.Collections { /// <summary> /// A sorted data table. /// </summary> /// <typeparam name="TKey1">Parent key type.</typeparam> /// <typeparam name="TKey2"...
--- layout: article title: "「Python」 multiprocessing:像线程一样管理进程" date: 2019-01-16 10:07:40 +0800 key: py-multiprocessing-20190116 aside: toc: true category: [software, python, pystl] --- <span id='head'></span> ## 什么是 Multiprocessing ## 添加进程 Process ## 存储进程输出 Queue ## 效率对比 threading & multiprocessing ## 进程池 Pool...
import { ParseMonth } from '../src'; describe('Month utilities tests', () => { it('ParseMonth(1, "en") should returns January while ParseMonth(24, "en") returns 24', () => { expect(ParseMonth(1, 'en')).toEqual('January'); expect(ParseMonth(24, 'en')).toEqual(24); }); });
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import hypothesis.strategies as st from hypothesis import given import numpy as np from caffe2.proto import caffe2_pb2 from caffe2.python import ( bre...
import React from 'react'; import { Box } from 'grommet'; import { MarkdownTemplate } from '../../components/MarkdownTemplate'; import Page from '../../components/Page'; const children = ` ### deepMerge A function that recieves two theme objects and returns a theme object that includes both theme values. ...
# java-tetris-game Classic Tetris with: DAS(using KeyListener delay), Hard Drop, Ghost Piece, Hold Piece
<?php /** * Function to validate usernames from pr0gramm.com * @see https://github.com/RundesBalli/regex-functions/blob/master/pr0gramm/validUsername.php * * @param string The username to be checked. * * @return string/boolean On success the validated username will be returned, if not FALSE. */ function validU...
# 44. Helm 模板使用 上节课和大家一起学习了`Helm`的一些常用操作方法,这节课来和大家一起定义一个`chart`包,了解 Helm 中模板的使用方法。 ## 定义 chart Helm 的 github 上面有一个比较[完整的文档](https://github.com/kubernetes/helm/blob/master/docs/charts.md),建议大家好好阅读下该文档,这里我们来一起创建一个`chart`包。 一个 chart 包就是一个文件夹的集合,文件夹名称就是 chart 包的名称,比如创建一个 hello-world 的 chart 包: ```shell $ mkdir ./hello-w...
extern crate iron; extern crate staticfile; extern crate mount; use std::io::net::ip::Ipv4Addr; use iron::{Iron, ServerT, Chain}; use staticfile::Static; use mount::Mount; fn main() { let mut server: ServerT = Iron::new(); // Serve core documentation server.chain.link(Mount::new("/core", Static::new(Path:...
import os from pathlib import Path import sys import supervisely_lib as sly import pickle from dotenv import load_dotenv # pip install python-dotenv\ load_dotenv("../debug.env") load_dotenv("../secret_debug.env", override=True) my_app = sly.AppService() api = my_app.public_api task_id = my_app.task_id team_id = in...
import { useState, useEffect } from "react"; function useInterval(cb, intervalDuration, startImmediate = false) { const [intervalId, setIntervalId] = useState(null); const [isRunning, setIsRunning] = useState(startImmediate); function start() { setIsRunning(true); } function stop() { if (isRunning) ...
package Environment; use strict; use warnings; use Module::Path qw/module_path/; use Path::Class; use Moose; use namespace::autoclean; sub distribution_base_path { my $that = shift; my $this_path = module_path(__PACKAGE__); my $file = file( $this_path ); my $file_dir = $file->parent; my $distr...
import { ReactElement } from "react"; import { Box } from "@chakra-ui/core"; import { styles } from "@/src/constants"; function Wrapper( props: React.PropsWithChildren<React.ReactNode> ): ReactElement { return ( <> <Box paddingX={styles.paddingX} maxWidth="1640px" margin="0 auto"> {props.children...
--- name: 🖊ODP Vote about: To track ODP votes --- ## Vote I am requesting a vote to ... Do you approve ... ? ## Reactions - 👍 Approve - 👎 Deny (please add comment explaining why) - 👀 Abstain (please add comment explaining why) ## Due to I'd ask you to cast your vote with 72h (3 days). ## Binding votes - @maoo ...
class RestaurantDetail { RestaurantDetail({ this.error, this.message, this.restaurant, }); bool error; String message; Restaurant restaurant; factory RestaurantDetail.fromJson(Map<String, dynamic> json) => RestaurantDetail( error: json["error"], message: json["message"], ...
# State access ## Readonly ### brightness Returns color brightness from 0 to 255. (It based RGB) > [Color contrast](https://www.w3.org/TR/AERT/#color-contrast) Syntax ``` ts mooColor.brightness: number; ``` - @returns `number` - 0-255 ### isLight Returns whether color is light or not. Syntax ``` ts mooColor....
import { Entity, Column, PrimaryColumn, OneToMany } from 'typeorm' import { Comment } from 'src/comments/entities/comment.entity' import { Favorite } from 'src/favorites/entities/favorite.entity' @Entity('users') export class User { @PrimaryColumn() id: string @Column() displayName: string @Column() emai...
import numpy import scipy import scipy.stats MEASURES = [ # Measures from trace files (.exp) 'ClientGlobalRank', 'ClientDataAccessTimeAccumulated', 'ClientLockingTimeAccumulated', 'ClientLocksNL', 'ClientLocksIS', 'ClientLocksIX', 'ClientLocksS', ...
import React from 'react'; import './Cases.scss'; const CaseTable = ({ caseHeaders, data, toggleModal }) => { // let date = new Date(dateTime).toDateString(); const convertDate = (date) => new Date(date).toDateString(); return ( <div className="table-container"> <table> <tbody> <tr className="table-h...
using System.Linq; using System.Threading.Tasks; using SteveTheTradeBot.Core.Framework.BaseManagers; using SteveTheTradeBot.Core.Framework.MessageUtil.Models; using SteveTheTradeBot.Core.Tests.Helpers; using SteveTheTradeBot.Dal.Models.Base; using SteveTheTradeBot.Dal.Persistence; using SteveTheTradeBot.Dal.Test...
program test logical :: flag1, flag2, flag3, flag4, flag5, flag6 integer :: a = 5 integer :: b = 5 flag1 = a == b flag2 = a /= b flag3 = a < b flag4 = a <= b flag5 = a > b flag6 = a >= b print *,(a + b) end program test
package models import scalikejdbc.specs2.mutable.AutoRollback import org.specs2.mutable._ import scalikejdbc._ class ProgramSpec extends Specification { "Program" should { val p = Program.syntax("p") "find by primary keys" in new AutoRollback { val maybeFound = Program.find(123) maybeFound.i...
@extends('layout') @section('styling') <link rel="stylesheet" type="text/css" href="css/styles.css"> <link rel="stylesheet" type="text/css" href="css/blog.css"> @endsection @section('content') <div class="fullHeight"> <main class="textStyling post"> <h3>Persoonlijke SWOT analyse</h3> ...
package autocomplete.service; import autocomplete.implementation.Dictionary; import autocomplete.implementation.Trie; import java.util.Arrays; import java.util.List; public class Service implements TrieService { private Trie trie; private Dictionary dictionary = new Dictionary(); private int sizeOfWords...
package net.dankito.banking.fints.transactions.mt940.model import net.dankito.banking.fints.model.Amount import net.dankito.utils.multiplatform.Date open class StatementLine( /** * Soll/Haben-Kennung * * “C” = Credit (Habensaldo) * ”D” = Debit (Sollsaldo) * „RC“ = Storno Haben * „R...
module PacketFu # TcpOption is the base class for all TCP options. Note that TcpOption#len # returns the size of the entire option, while TcpOption#optlen is the struct # for the TCP Option Length field. # # Subclassed options should set the correct TcpOption#kind by redefining # initialize. They should also d...
#!/usr/bin/env ruby # require 'rubygems' require 'json' require 'bundler' Bundler.require require 'sinatra' require 'sinatra/partial' #require 'nokogiri' require_relative 'app/logic/app' run App
require 'git' module Projects class Clone < Services::Base FilesExistsError = Class.new(Error) def call(project) if File.exist?(project.local_path) && Dir[File.join(project.local_path, '*')].present? raise FilesExistsError, "Files for project #{project.name} already exist." end dir...
#include <iostream> #include <vector> using namespace std; void applay(const vector<int>& vec, void(*func)(int)){ for (int val : vec){ func(val); } } int main (){ vector<int> vec {1,2,3,4}; auto lambda = [](int val){ cout << val << endl; }; applay(vec, lambda); ...
//! The LocalCache provides a local KV cache for contracts to do some offchain computation. //! When we say local, it means that the data stored in the cache is different in different //! machines of the same contract. And the data might loss when the pruntime restart or caused //! by some kind of cache expiring machan...
void main() { dynamic sampleDynamicType = "Hello"; sampleDynamicType = 16; dynamic sampleSecond = true; sampleSecond = "TRUE"; }
--- title: Sky can wait date: 2019-02-01 19:00:00 image: "images/masonary-post/post-2.jpg" topics: - devotion - prayer ---   Why do doctors today believe faith heals? With this title, the magazine Seleções, from August 2001, published a based on clinical evidence that faith is efficient ally in the recovery of and i...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::cmp::Order...
package model /** * Возможные действия хоккеиста. * <p/> * Хоккеист может совершить действие, если он не сбит с ног ([[model.HockeyistState.KnockedDown]]), * не отдыхает ([[model.HockeyistState.Resting]]) и уже восстановился после своего предыдущего действия * (значение [[model.Hockeyist#getRemainingCooldownTicks...
import React from 'react' import ListItem from '../order/ListItem' const ListItemListContainer = ({ listItems }) => { const renderListItems = () => { return listItems.map((listItem, i) => { return (<ListItem listItem={listItem} key={i} />) }) } return ( <div className="active-order-list-item...
interface Symbols { frames: string[] tick: string cross: string } export const isTTY: boolean export const symbols: Symbols
use std::env; use std::error; use std::fs; /// Reads every record from the file specified in the first command line /// argument. See `examples/demo.mot` for an example SREC file. fn main() -> Result<(), Box<dyn error::Error>> { let args: Vec<String> = env::args().collect(); let path = args .get(1) ...
#!/bin/sh rm -rf TMP9 #export GANACHE_OPTIMIZATION_WORKAROUNDS_ENV_VAR=--ganacheOptimizationWorkarounds doit() { ./generate-contract-set.sh 5 1 10 10 10 30 TMP9 --random ##--assignmentSequence echo ======= With optimization ======= ./truffle-optimization-setting.sh on ./run-all-tests.sh TMP9 0 --generated echo...
import React , {Component} from 'react'; import ItemTemplate from './item_template'; export default function(props) { let filteredData = { "sports" : [], "entertainment" : [], "news" :[] }; props.items.map((item) => { switch (item.category) { case "Sports": filteredData.sport.push(it...
using System; using System.Reactive.Linq; using System.Threading.Tasks; using Akka.Actor; using JetBrains.Annotations; namespace Tauron.Application.Workshop.Mutation { [PublicAPI] public sealed class EventSource<TRespond, TData> : EventSourceBase<TRespond> { public EventSource( Workspa...
require 'Bacon_Colored' require 'escape_escape_escape' require 'pry' require "multi_json" require "escape_escape_escape" require 'sanitize' BRACKETS = <<-EOF.split.join(' ') < %3C &lt &lt; &LT &LT; &#60 &#060 &#0060 &#00060 &#000060 &#0000060 &#60; &#060; &#0060; &#00060; &#000060; &#0000060; &#x3c &#x03c &#x003c &#...
# coding=utf-8 from typing import List import Expr import Token class Stmt(object): def accept(self, visitor): raise NotImplementedError def __setattr__(self, attr, value): if hasattr(self, attr): raise Exception("Attempting to alter read-only value") self.__dict__[attr] = value clas...
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Typ...
import styled from 'styled-components'; export const Container = styled.div` /* margin-bottom: 20px; */ position: relative; p { color: #120325; font-size: 22px; line-height: 30px; font-weight: 700; position: relative; height: 400px; width: 500px; margin: auto; align-self: cen...
#ifndef _DRV_MBOX_H_ #define _DRV_MBOX_H_ #define HW_ID_OFFSET 7 #include "attrs.h" /* Hardware Offload Engine ID */ #define M_ENG_CPU 0x00 #define M_ENG_HWHCI 0x01 //#define M_ENG_FRAG 0x02 #define M_ENG_EMPTY ...
namespace ArdalisRating { public abstract class Rater { //public readonly RatingEngine _engine; //public readonly ConsoleLogger _logger; //public Rater(RatingEngine engine, ConsoleLogger logger) //{ // _engine = engine; // _logger = logger; //} ...
--- title: '1979 Dux Litterarum ' date: 1979-11-30T22:02:47.520Z award: Dux Litterarum person1_name: Vivienne Wallace person2_name: Peter Speck ---
<?php namespace Glhd\Gretel\Support; use Glhd\Gretel\Registry; use Glhd\Gretel\Resolvers\Resolver; use Glhd\Gretel\Routing\RouteBreadcrumb; use Illuminate\Filesystem\Filesystem; class Cache { protected Filesystem $filesystem; protected string $path; public function __construct(Filesystem $filesystem, string $...
# here is a list of my favorite things - long walks on the beach - disco dancing - OpenSource - learning Git and GitHub
// This file is part of MicropolisJ. // Copyright (C) 2013 Jason Long // Portions Copyright (C) 1989-2007 Electronic Arts Inc. // // MicropolisJ is free software; you can redistribute it and/or modify // it under the terms of the GNU GPLv3, with additional terms. // See the README file, included in this distribution, f...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TRMDataManager.Library.Internal.DataAccess; using TRMDataManager.Library.Models; namespace TRMDataManager.Library.DataAccess { public class SaleData { public void SaveSale(SaleMode...
package reactivecircus.flowbinding.android.widget import android.view.MenuItem import android.widget.PopupMenu import androidx.test.filters.LargeTest import com.google.common.truth.Truth.assertThat import org.junit.Test import reactivecircus.flowbinding.android.fixtures.widget.AndroidWidgetFragment import reactivecirc...
# Improved Fibonacci # Time Complexity - O(n) # Space Complexity - O(n) # Hint, you may want a recursive helper method def fibonacci(n) return 1 if n == 1 || n == 2 return 0 if n == 0 raise ArgumentError if n < 0 fibonacci(n - 1) + fibonacci(n - 2) end
export * from './createRequestAndResponseTypes' export * from './decorateWithHttpMethod' export * from './HttpMethod'
/** * */ package com.github.biticcf.mountain.domain; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import com.github.biticcf.mountain.core.common.result.WdCallbackResult; import com.github.biticcf.mountain.domain.support.ConstantContext; import com.github.bitic...
# This is intentionally busted describe "uninitialized constant error" do it "should error" do expect(NonExistingClass.true).to be(true) end end
# Colt Colt is a proxy generator in python it's the best it works very well (open sources) I also give you proxies that were generated with colt ![colt](https://user-images.githubusercontent.com/87500459/147711103-114765d6-66f5-409f-824f-8e7c69424995.PNG)
#!/bin/bash # login { ./scripts/vpn-login } || { exit 1 } # $3 is tag which is short name for vpn locations { windscribe connect $3 } || { exit 1 }
InvoiceType = GraphQL::ObjectType.define do name 'Invoice' description 'An Invoice' field :id, !types.Int field :fee_in_cents, types.Int end
# Frontend Introduction This project is used as an internal project for teaching purposes. ### Installation This project requires [Node.js](https://nodejs.org/) v4+ and [NPM](https://npmjs.or) to run. First, clone the project. ```sh $ git clone git@github.com:chrlvclaudiu/frontend-introduction.git $ cd frontend-i...
require "rails_helper" RSpec.describe "Submit notifications", :with_stubbed_antivirus, type: :feature do let(:responsible_person) { create(:responsible_person_with_user, :with_a_contact_person) } let(:user) { responsible_person.responsible_person_users.first.user } before do sign_in_as_member_of_responsible...
using System; using System.Threading.Tasks; using Amazon.Lambda.APIGatewayEvents; using Amazon.Lambda.Core; using Newtonsoft.Json; namespace GitHubHook { public sealed class LambdaHandler { internal const string XGitHubDeliveryHeaderKey = "X-GitHub-Delivery"; internal const string XGitHubEven...
use crate::utils::error; /// bm delete NAME /// Print help text and exit with non-zero code. pub fn print_help() { let help = r#" NAME bm - Bookmark Manager SYNOPSIS bm [command] [options] DESCRIPTION This utility provides shell bookmarks that allows you to save paths and use them. ...
push!(LOAD_PATH, "../src") using CASIM render_option = Not_Render() sim_horizon = 5000 num_run = 10 init_num_ac = 100 # spawn_rates = [1000., 2000., 4000., 6000.] ./ 3600 spawn_rates = [250., 500., 1000., 1500., 2000., 4000.] ./ 3600 # spawn_rates = 4000. / 3600 """ VICAS + Multi spawn_rates """ exp = "SpawnRate...
package sequence_test import ( "testing" "github.com/kode4food/ale/data" "github.com/kode4food/ale/internal/assert" . "github.com/kode4food/ale/internal/assert/helpers" "github.com/kode4food/ale/internal/sequence" ) func TestFilter(t *testing.T) { as := assert.New(t) filterTest := data.Applicative(func(args ...
//! Functions for creating and sending HTTP requests and receiving responses. //! #![no_std] #![feature(slice_concat_ext)] #[macro_use] extern crate log; extern crate alloc; extern crate smoltcp; extern crate network_manager; extern crate hpet; extern crate httparse; #[macro_use] extern crate smoltcp_helper; use co...
#include <cpp_edmi.h> #include "edm_wrapper_native_interface.h" #include "EdmDatabase.h" #include "ifc_model_internals.h" namespace ifc_interface { model::model(const char * path) : d_(new internals) { try { IfcInterface::EdmDatabase ^ db = IfcInterface::EdmDatabase::Instance(); d_->m = db->LoadModel(gcnew St...
namespace TestingSupport.ErrorHandling { public class AttemptTracker { public int LastAttempt; } }
# Consolidating the business of round-having. module HasRound extend ActiveSupport::Concern included do scope :without_round, -> { where('round_id IS NULL OR round_id = ""') } end def round Round.find(round_id) if round_id? end def round? round_id? && !!round end def round_type ...
#!/bin/bash -e touch /vol/logs/${HOSTNAME}-php-error.log && chown heap:www-data /vol/logs/${HOSTNAME}-php-error.log touch /vol/logs/${HOSTNAME}-php-slow.log && chown heap:www-data /vol/logs/${HOSTNAME}-php-slow.log touch /vol/logs/${HOSTNAME}-php-fpm.log && chown heap:www-data /vol/logs/${HOSTNAME}-php-fpm.log /systp...
package Zing::Types; use 5.014; use strict; use warnings; use Data::Object::Types::Keywords; use base 'Data::Object::Types::Library'; extends 'Types::Standard'; # VERSION register { name => 'App', parent => 'Object', validation => is_instance_of('Zing::App'), }; register { name => 'Cartridge', parent ...
-- |A structure-recovering parser for malformed documents. -- -- Copyright 2007-2008 Arjun Guha. -- Based on HtmlPrag 0.16 Copyright (C) 2003 - 2005 Neil W. Van Dyke. -- -- This program is Free Software; you can redistribute it and/or modify it under -- the terms of the GNU Lesser General Public License as published ...
# Portal Chess Trabalho desenvolvido em Introdução à Computação, PUC-Rio, Novembro e Dezembro de 2018. // a inserir slides
// Copyright (C) 2014, Panagiotis Christopoulos Charitos. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #include "anki/math/Functions.h" #include "anki/Config.h" namespace anki { //============================================================================== templa...
<?php namespace Boarrd; use Boarrd\Framework\Tiles\AbstractTile; use Facades\Boarrd\Twitter\Helpers\TweetHistory; class Twitter extends AbstractTile { public function __construct(string $position) { parent::__construct($position); $this->requireAttributes('initial-tweets'); } protec...
import 'dart:async'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:todolist/bloc/home/home_event.dart'; import 'package:todolist/bloc/home/home_state.dart'; import 'package:todolist/bloc/schedule/bloc.dart'; import 'package:todolist/model/task.dart'; import 'package:todolist/repository/home_reposito...
<?php namespace app\models; use Yii; use yii\behaviors\BlameableBehavior; use yii\behaviors\TimestampBehavior; use yii\web\UploadedFile; use app\custom\FileStorage; /** * This is the model class for table "materials". * * @property int $id ИД * @property int $ref Номер САП * @property string $name Наименование ...
<?php namespace App\Exports; use App\Models\icom; use App\Models\inc11s; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; class icomExport implements FromCollection,WithHeadings,WithMapping { public function headings(): array ...
'use strict' import React, {useEffect, useState, useRef} from 'react'; import Compose from '../Compose'; import Toolbar from '../Toolbar'; import ToolbarButton from '../ToolbarButton'; import Message from '../Message'; import moment from 'moment'; import { gql, useQuery, useSubscription } from '@apollo/client'; impor...
using System.Collections.Concurrent; using System.Collections.Generic; using System.Net; namespace Cassandra { internal class Hosts { private readonly ConcurrentDictionary<IPAddress, Host> _hosts = new ConcurrentDictionary<IPAddress, Host>(); private readonly IReconnectionPolicy _rp; p...
import { TLPerformanceMode, Utils } from '@tldraw/core' import { Vec } from '@tldraw/vec' import { SessionType, TldrawCommand, TldrawPatch, TDShape, TDStatus } from '~types' import { TLDR } from '~state/TLDR' import { BaseSession } from '../BaseSession' import type { TldrawApp } from '../../internal' export class Rota...
// Copyright (c) 2018 Joseph R. Quinn <quinn.josephr@protonmail.com> // SPDX-License-Identifier: ISC // 3rd party crates extern crate clap; #[macro_use] extern crate slog; extern crate slog_term; fn main() {}
export function setup(Models, app){ let { Position, Person } = Models; app.get('/api/positions', (req, res) => { Position.findAll({ order: [ [ "type", "ASC" ], [ "order", "ASC" ], ] }).then(data => { res.send(data); }).error(error => { res.status(500).send("Error...
import {$} from '../dom' import {ActiveRoute} from './ActiveRoute' import {Loader} from '../../components/Loader' export class Router { constructor(selector, routes) { if (!selector) { throw new Error('Selector is not provided in Router') } this.$placeholder = $(selector) ...
set :required_gems, [] set :deb_dependency, [] set :git_submodules, false set :control_scripts, ['postinst', 'postrm', 'preinst', 'prerm'] # package building tool set :builder, 'fpm' set :sct, 'git' set :owner, 'www-data' set :group, 'www-data' set :log_dir, '/var/log' set :restart_service, true set :keep_releas...
using System.Collections.Generic; using System.Text; namespace CSPDC { public partial class ByteManager { public string ReadBytescstring(Encoding Encoder = null, int MaxLength = 65535) { if (Encoder == null) Encoder = Encoding.UTF8; int length = 0; byte rea...
--- layout: post title: "Waiting for Network Calls with Watir" subtitle: "a gist for setting an explicit wait against a network call" date: 2015-08-22 author: "carldmitch" keywords: Ruby, Watir, Webdriver, Automation, Selenium, Links, Ajax, Javascript, Performance categories: gist header-img: "img/04.jpg" --- ...
package org.jesperancinha.smtd.furniture.repository import org.jesperancinha.smtd.furniture.model.Chair import org.springframework.data.jpa.repository.JpaRepository interface ChairRepository : JpaRepository<Chair, Long>
require 'integration_test_helper' class PageIntegrationTest < ActionDispatch::CapybaraIntegrationTest test "should get home page if not logged in" do visit root_path() assert !has_css?("p.flash.error") assert_equal root_path, current_path end site_editors.each do |cu| test "should create new page with #{...
<?php /* * This file is part of the Silverstripe Bugsnag Logger. * * (c) Evolution 7 <http://www.evolution7.com.au> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Interface for ReleaseStage objects for use with the Bugsnag...
package com.puddlealley.splash import com.puddlealley.splash.Dispatcher import com.puddlealley.splash.Payload import com.puddlealley.splash.PayloadCallback import io.kotlintest.TestCase import io.kotlintest.shouldThrow import io.kotlintest.specs.DescribeSpec import io.mockk.mockk import io.mockk.spyk import io.mockk.v...
import React from 'react'; import PropTypes from 'prop-types'; import AWS from 'aws-sdk'; import { Avatar, Card, CardContent, CardHeader, Divider, } from '@material-ui/core'; import ChatBubbleRoundedIcon from '@material-ui/icons/ChatBubbleRounded'; import KeyboardArrowDownIcon from '@material-ui/icons/Keyboar...
package com.bakdata.conquery.io.xodus; import java.io.File; import javax.validation.Validator; import com.bakdata.conquery.models.concepts.StructureNode; import com.bakdata.conquery.models.config.StorageConfig; import com.bakdata.conquery.models.exceptions.JSONException; import com.bakdata.conquery.models.identifiab...
import zxcvbnOptions from '../../Options' import { MatchEstimated } from '../../types' export default (match: MatchEstimated) => { if (match.regexName === 'recentYear') { return { warning: zxcvbnOptions.translations.warnings.recentYears, suggestions: [ zxcvbnOptions.translations.suggestions.r...
/********************* */ /*! \file floatingpoint.h.in ** \verbatim ** Top contributors (to current version): ** Martin Brain, Tim King, Andres Noetzli ** Copyright (c) 2013 University of Oxford ** This file is part of the CVC4 project. ** Copyright (c) 20...
$myDir = [IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition) $rootDir = [IO.Path]::GetDirectoryName($myDir) $scriptsDir = Resolve-Path "$rootDir\auto\lib" . "$scriptsDir\bench.lib.ps1" $benchEnv = New-Object Mastersign.Bench.BenchEnvironment ($global:BenchConfig) $benchEnv.Load() $appLibsDevDir = ...
using System; class AppearanceCount { static int GetAppearanceCountOfNumInArr(int num, int[] arr) { int count = 0; for (int i = 0; i < arr.Length; i++) { if (num == arr[i]) { count++; } } return count; } sta...