text
stringlengths
27
775k
package template // import "github.com/docker/infrakit/pkg/template" import ( "testing" "github.com/stretchr/testify/require" ) func TestGetURL(t *testing.T) { f, err := GetURL("file:///a/b/c/d.tpl", "e.tpl") require.NoError(t, err) require.Equal(t, "file:///a/b/c/e.tpl", f.String()) f, err = GetURL("file://...
module Mod_AdaptiveQuads use Mod_AdaptiveInterpolationList implicit none contains subroutine BilinearQuad_GetElementVariation(elcod,ivariation) use typre implicit none real(rp) :: elcod(:,:) integer(ip) :: ivariation ivariation = 1 end subroutine subrou...
#!/bin/bash # simple kotlin compile and run # for fizzbuzz if [ $# -eq 0 ]; then kotlinc Fizzbuzz.kt -include-runtime -d Fizzbuzz.jar java -jar -ea Fizzbuzz.jar 17 rm Fizzbuzz.jar elif [[ $# -eq 1 ]] ; then kotlinc Fizzbuzz.kt -include-runtime -d Fizzbuzz.jar java -jar -ea Fizzbuzz.jar $1 rm Fizzbuzz.jar else k...
#!/bin/sh ########################################################### # Configure action settings : CROND_PREFIX=${CROND_PREFIX:=/home/cyuser} CYTRONE_SCRIPTS_CONFIG=$CROND_PREFIX/cytrone/scripts/CONFIG if [ -f $CYTRONE_SCRIPTS_CONFIG ]; then . $CYTRONE_SCRIPTS_CONFIG fi # local vars. CRID=$1 if [ x"$CRID"x...
using System.IO; using System.Linq; using Jammo.TextAnalysis.DotNet.CSharp; using Jammo.TextAnalysis.DotNet.CSharp.Inspection; using Jammo.TextAnalysis.DotNet.CSharp.Inspection.Rules; using Jammo.TextAnalysis.DotNet.MsBuild; using NUnit.Framework; namespace JammaNalysis_UnitTests { [TestFixture] public class C...
fbtft-spindle ============= Builds the FBTFT images See [wiki](https://github.com/notro/fbtft-spindle/wiki)
package io.mercury.common.net; public class IpAddressIllegalException extends IllegalArgumentException { /** * */ private static final long serialVersionUID = 3756639631788771826L; public IpAddressIllegalException(String ipAddress) { super("illegal IP address -> " + ipAddress); } }
package io.github.diegoflassa.iconivoid.internal import android.content.Context import android.graphics.Typeface import io.github.diegoflassa.iconivoid.Icon import io.github.diegoflassa.iconivoid.IconFontDescriptor import java.util.* class IconFontDescriptorWrapper(val iconFontDescriptor: IconFontDescriptor) { pr...
class TransformableTableViewCell < UITableViewCell attr_accessor :finishedHeight def self.transformableTableViewCellWithStyle(style, reuseIdentifier: reuseIdentifier) case style when :pullDown PullDownTableViewCell.alloc.initWithStyle(UITableViewCellStyleDefault, reuseIdentifier: reuseIdentifier) ...
package `in`.windrunner.permex.check import `in`.windrunner.permex.PermExRequest import org.junit.Assert import org.junit.Before import org.junit.Test import org.mockito.kotlin.any import org.mockito.kotlin.mock import org.mockito.kotlin.never import org.mockito.kotlin.verify import org.mockito.kotlin.whenever class ...
#!/usr/bin/env python """ Read in the evac data. """ import numpy as np # Read in experimental data from file data = np.genfromtxt('../Experimental_Data/evac_data.csv', delimiter=',', names=True) # Set data variables flow = data['flow'][:-5] exit_distance = data['Exit_Distance'][:-5] occupants ...
<?php /** * Created by PhpStorm. * User: sshirima * Date: 6/2/2018 * Time: 3:08 PM */ namespace App\Http\Controllers\Buses; use App\Models\Bus; use App\Models\Bustype; use App\Models\Merchant; trait BusViewParams { protected $busTypes = 'busTypes'; protected $merchants = 'merchants'; protected $bus...
import { FormModel } from "server/plugins/engine/models"; import { FormSubmissionState } from "server/plugins/engine/types"; import { flatten } from "hoek"; export function NotifyModel( model: FormModel, outputConfiguration, state: FormSubmissionState ) { const flatState = flatten(state); const personalisati...
# `@trz/url` > TODO: description ## Usage ``` const url = require('@trz/url'); // TODO: DEMONSTRATE API ```
#/bin/sh for i in ./ckeditor/skins/moonocolor/*.css; do mv $i $i.erb ### Regular DPI # Icons search="url(icons.png)" replace="url(<%= asset_path('ckeditor\\/skins\\/moonocolor\\/icons.png') %>)" sed -i '' -e "s/${search}/${replace}/g" "${i}.erb" # Arrow.png search="url(images\\/arrow.png)" replace=...
--- title: Adapter中的观察者模式 date: 2017-06-02 09:02:15 tags: - Android - 设计模式 - 观察者模式 categories: [设计模式] --- 当我们调用Adapter.notifyDataSetChanged()时候, 会调用被观察者的()方法, ```java public abstract class BaseAdapter implements ListAdapter, SpinnerAdapter { //数据集被观察者 private final DataSetObservable mDataSetObservable = new...
package ee.cone.c4actor import ee.cone.c4di.c4 // http://www.artima.com/pins1ed/object-equality.html @c4("RichDataCompApp") final class PreHashingImpl extends PreHashing { def wrap[T](value: T): PreHashed[T] = new PreHashedImpl(value.hashCode, value) } final class PreHashedImpl[T](code: Int, val value: T) extends ...
import { notifySuccess } from "../../useCases/notify"; import { Request } from "../../useCases/notify/requestResponseDTO"; import { VideoData } from "../../domain/interfaces/types"; type Event = { Input: { Payload: VideoData; }; }; export const handler = async (event: Event): Promise<void> => { const { id }...
import { createApp, ref, defineComponent, h } from "https://unpkg.com/vue@3.0.0-rc.6/dist/vue.runtime.esm-browser.prod.js"; // html import { default as htm } from "https://unpkg.com/htm?module"; const html = htm.bind(h); import Input from './components/child.js'; const Child = defineComponent({ ...
# frozen_string_literal: true require "rails_helper" describe "Managing HD Stations for a Hospital Unit", type: :system do before do create(:hd_station_location, name: "Side room") end def create_station(name, unit, by) create(:hd_station, name: name, hospital_unit_id: unit.id, by: by) end it "Lis...
# `IReinsurancePool` # Function withdrawBMITo Dev ## Signature withdrawBMITo(address,uint256) ## `withdrawBMITo(address to, uint256 amount)` (external) *Params** **Returns** ----- # Function withdrawSTBLTo Dev ## Signature withdrawSTBLTo(address,uint256) ## `withdrawSTBLTo(address to, uint256 amount)` (externa...
<?php declare (strict_types = 1); /* * This file is part of the php-util package. * * (c) Pavel Semela <semela_pavel@centrum.cz> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SemelaPavel\Http; use SemelaPavel\Http\Exc...
# coding=utf-8 #给你一个正整数列表 L, 如 L=[2,8,3,50], 判断列表内所有数字乘积的最后一个非零数字的奇偶性, #奇数输出1,偶数输出0. 如样例输出应为0 L = [2,8,3,50] res = 1 for item in L: res *= item while not res % 10: res /= 10 print 1 if res % 2 else 0
package io.buoyant.admin import com.twitter.finagle.buoyant.TlsServerConfig import com.twitter.finagle.stats.StatsReceiver import com.twitter.logging.Logger import java.net.{InetAddress, InetSocketAddress} import io.buoyant.config.types.Port case class AdminConfig( ip: Option[InetAddress] = None, port: Option[Por...
# Reverse an Array Function that will take in an array and and reverse the array without using builtin reverse function. ## Challenge Without using any builtin functionality, reverse an array ## Approach & Efficiency Time: o(n) Space: o(n) ## Solution No whiteboard image for this challenge.
#include <bits/stdc++.h> using namespace std; const int maxN = 50; int n; struct Node { int value; Node *left, *right; }; Node *bst; Node* newNode(int value = 0) { Node *temp = (Node*) malloc(sizeof(Node)); temp->value = value; temp->left = temp->right = NULL; return(temp); } void insert(int value, Node *...
namespace GreenDoorProject.Data.Models { using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using static DataConstants.Book; using static DataConstants.Info; public class Book { public string Id { get; init; } = Guid.NewGuid().ToString(); ...
from functools import reduce from typing import NamedTuple, List from math import inf class State(NamedTuple): max_val: float = -inf ordered_list: List[float] = [] def sort_step(acc: State, number: float) -> State: if acc.max_val <= number: ordered_list = acc.ordered_list + [number] retu...
<?php namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Eloquent\Model; class Ticket extends Model { protected $table = 'tickets'; public function customers() { return $this->hasMany(Customer::class,'id','customer_id'); } public function products() ...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Zergatul.Cryptography.Symmetric { public class KeyStream : Stream { public override bool CanRead => true; public override bool CanSeek => false; ...
export function isTimestamp(value: any) { const timestamp = new Date(value).getTime(); return !isNaN(parseFloat(timestamp)) && isFinite(timestamp); }
<?php /* * Copyright 2021 LABOR.digital * * 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 ag...
import React, { useRef, useEffect, useState } from 'react'; import { v4 as uuid } from 'uuid'; import { inHTMLData } from 'utils/xss'; // import Message from 'component/message'; import MessageList from 'application/messageList'; import EmojiPanel from 'component/emojiPanel'; import { queryString } from 'utils/utils';...
# frozen_string_literal: true require_relative "../test_helper" require "stringio" SingleCov.covered! describe Kennel::UnmutedAlerts do capture_all let(:tag) { "team:compute" } let(:monitors) { [monitor] } let(:triggered) { (Time.now - 10).to_i } let(:monitor) do { id: 12345, tags: [tag], ...
SELECT count(*) FROM repair_segment WHERE run_id = :runId SELECT id FROM repair_run WHERE cluster_name = :clusterName UPDATE repair_segment SET repair_unit_id = :repairUnitId, run_id = :runId WHERE id = :id SELECT count(*) FROM repair_segment WHERE run_id = :runId AND state = :state UPDATE repair_schedule SET repair_un...
import { Button, VStack } from '@chakra-ui/react'; import React from 'react'; import { useForm } from 'react-hook-form'; import { Input } from '../../../../components/Form/Input'; import type { Venue, VenueQuery } from '../../../../generated/graphql'; export type VenueFormData = Omit<Venue, 'id' | 'events'>; interfac...
2 10 0 0 0 0 6 4 0 0 0 0 8 2 0 0 0 0 9 2 0 0 0 1 9 6 0 0 0 2 9 6 0 0 0 3 0 3 0 0 0 4 1 1 0 0 0 5 0 3 0 0 0 6 0 3 0 0 1 0 0 8 0 0 2 2 9 3 0 0 2 6 1 1 0 0 3 0 0 0 0 0 3 1 0 9 0 0 3 6 0 1 0 0 3 9 0 0 0 0 4 0 1 2 0 0 4 0 6 2 0 0 6 3 1 1 0 0 8 0 0 5 0 2 0 0 2 2 0 2 0 0 3 2 0 2 6 2 1 1 0 3 1 1 0 9 0 3 3 0 0 9 0 3 9 1 0 1 0 3...
import { pipe } from 'fp-ts/function'; import { vec3 } from '../../algebra/vector3'; import { multiplyWith } from '../../fn/numbers/quaternions/multiply-with'; import { conjugate, fromOmegaVec3, Quaternion, xyz } from '../quaternion'; function rotateByVec3(v: vec3) { const V = fromOmegaVec3(0, v); return (q: Rea...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.github.lxyscls.jvmjava.bytecode.constant; import com.github.lxyscls.jvmjava.bytecode.base.ByteCode; /** * * ...
#!/bin/bash -f input=$1 input_name=${input%.*} smi=$(cat $input) moebatch_exe=/nfs/progs64/ccg/moe64/bin/moebatch $moebatch_exe -exec "\ mol = sm_BuildMOL '$smi'; \ mol_Create mol ; \ issues = StructurePreparation [cmd: 'cli']; \ atoms = Atoms[]; \ pot_Load '/nfs/progs/ccg/moe/lib/mmff94x.ff'; \ Protonate3D [atoms,...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TDI.Interception.Tests { public class Speaker { public void SomeMethod() { } [SimonsSays] public virtual string SayHello(int param1) { Cons...
# lila-bin [中文文档](./README.md) Lila command line tool. ## install global ``` npm install lila-bin -g ``` local ``` npm install lila-bin --save-dev ``` ## use global ``` lila <cmd> [options] ``` local ``` # package.json { "scripts": { "run": "lila <cmd> [options]" } } ``` ## options - `-V, --versio...
package xyz.casperkoning.numberwang object Util { def constructGreeting(greetee: String): String = s"Hello $greetee" }
{-# LANGUAGE OverloadedStrings #-} module RID.Relation where {-- a solution to the problem posted at http://lpaste.net/3230687675795111936 and then fully fleshed-out at http://lpaste.net/2598821222603030528 Okay, so we looked at the RID as a Tree, then as a Data.Graph, then as JSON. Now let's look at the RID as a s...
package field type FieldType int const ( UnknownType FieldType = iota BoolType Int64Type Float64Type StringType ObjectType ) type Field interface { Name() string Type() FieldType Value() interface{} }
using System.Collections; using System.Collections.Generic; using UnityEngine; public class BulletBehavior : MonoBehaviour { public float speed = 0.0f; public Vector2 direction = Vector2.down; public GameBounds bulletBounds; private BulletManager bulletManager; private void Start() { ...
/* * 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. */ #pragma once #include <memory> #include <mutex> #include <ReactCommon/RuntimeExecutor.h> #include <react/componentregistry/Compon...
// Copyright 2004-present Facebook. All Rights Reserved. package com.facebook.cipher; import java.io.DataInputStream; import java.io.FilterInputStream; import java.io.FilterOutputStream; import java.io.InputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Arrays; import com.facebook....
package com.stags.seriesGuide.controllerTests; import com.fasterxml.jackson.databind.ObjectMapper; import com.stags.seriesGuide.controller.RatingController; import com.stags.seriesGuide.entity.Rating; import com.stags.seriesGuide.models.RatingRequest; import com.stags.seriesGuide.models.StatusRequest; import com.stags...
# -*- coding: utf-8 -*-- from model.group import Group def test_add_group_1(app): app.session.login(username="admin", password="secret") app.group.create(Group(name="Group #1", header="Header #1", footer="Footer #1")) app.session.logout() def test_add_group_2(app): app.session.login(username="admin...
/* tslint:disable:no-unused-expression */ import chai from 'chai' import { ScheduleCronModel, } from '../task-creation/cron' import { cronToModel, convertToModel, } from '../task-creation/cron/expression' import { nextCronTime } from '../task-creation/cron/next' import { toTimeStruct, TimeStruct, } from '../...
using System; using System.Diagnostics; using System.Collections.Generic; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Dahl.Extensions.Tests { public class PropertyTestMethods { public bool GetAccessorList_Method() { int i = 0; IPropertyAccessor[] acce...
#!/bin/bash machine_name=autopkg serial_number=`/usr/sbin/ioreg -l | awk '/IOPlatformSerialNumber/ {print $4}' | sed 's/\"//g'` # Set Mac's hostname to computername /usr/sbin/scutil --set ComputerName "$machine_name"-"$serial_number" /usr/sbin/scutil --set LocalHostName "$machine_name"-"$serial_number" /usr/sbin/scu...
package code.vineet.colorpicker import android.app.Activity import android.content.Intent import android.graphics.Bitmap import android.graphics.Color import android.net.Uri import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.provider.MediaStore import android.util.Log import androi...
using System; using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; namespace FunkyGrep.UI.Validation.DataAnnotations; public class PossiblyValidRegexAttribute : ValidationAttribute { public string ValueIsRegexMemberName { get; } public override bool RequiresValidation...
TITLE Tracking the Mouse (mouse.asm) ; This simple mouse demo program is designed to show off some ; of the basic mouse functions available through INT 33h. ; Last update: 8/21/01 ; ; In Standard DOS mode, each character position in the DOS window ; is equal to 8 mouse units (called "mickey...
cask 'unity-package-unpacker' do version :latest sha256 :no_check url 'https://codeload.github.com/GeneralD/Unity-Package-Unpacker/zip/master' name 'Unity Package Unpacker' homepage 'https://github.com/GeneralD/Unity-Package-Unpacker' app 'Unity-Package-Unpacker-master/Unity Package Unpacker.app' end
package seedu.address.logic.commands; import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; import static seedu.address.logic.commands.HelpCommand.SHOWING_HELP_MESSAGE; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import ...
// constsPlugin.js const Settings = { SiteURL: "" } let YourConsts = {}; // As suggested by the comments. YourConsts.install = function (Vue, options) { Vue.prototype.$getConst = (key) => { return Settings[key] } } export default YourConsts
#!/usr/bin/env bash # needs i3lock-color rectangles=" " TMPBG=/tmp/screen.png maim $TMPBG && convert $TMPBG -scale 5% -scale 2000% $TMPBG # TMPBG="$HOME/git/me/img/loop-lock.png" pkill -u $USER -USR1 dunst [ `command -v i3lock-color` ] >/dev/null 2>&1 && I3L="i3lock-color" || I3L="i3lock" $I3L \ -i $TMPBG \ --in...
// Copyright 2016-2017 Authors of Cilium // // 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 ag...
<?php require_once __DIR__ . '/lib/YZGetTokenClient.php'; //工具型应用oauth2.0授权获取token $client_id = "fill your client_id";//请填入有赞云控制台的应用client_id $client_secret = "fill your client_secret";//请填入有赞云控制台的应用client_secret $redirect_url = "fill your redirect_url";//请填入开发者后台所填写的回调地址,本示例中回调地址应指向本文件。 $token = new YZGetTokenClient...
require_relative '../test_config' require_relative '../../domain/values/instruction' class InstructionTest < JustJobTest def test_can_be_initialized_with_a_valid_string assert_silent do Instruction.new "Open the pod bay doors" end end def test_has_same_string_value_as_raw_value instruction = I...
package io.mockk.impl.recording.states import io.mockk.every import io.mockk.impl.recording.CommonCallRecorder import io.mockk.mockk import io.mockk.verify import kotlin.test.BeforeTest import kotlin.test.Ignore import kotlin.test.Test @Ignore class RecordingStateTest { lateinit var recorder: CommonCallRecorder ...
# frozen_string_literal: true json.partial!('spree/api/images/image', image: @image)
## Description A simple example app that combines Nest.js, TypeORM, class-validator, and React
module.exports = function(runFunction) { console.log('RUN', runFunction); this.ANGULAR_MODULE.run(runFunction); return this; };
package Helpers var ( errorNotFound = "Cache data not found: " errorEmptyKey = "Key can not be null" errorAlreadyExistKey = "Key is already exist." ) // Cache interface type Cache interface { // Set cache'e data kaydeder Set(key string, data string) string // Get cache'ten data alır Get(key strin...
PCx80 is our 8080-based machine emulation module. The code is derived from [PCx86]({{ site.github.pages }}/machines/pcx86/). See the list of available [PCx80 Machines](/machines/pcx80/configs/), which includes [Space Invaders (1978)](/machines/arcade/invaders/) and the [DEC VT100 Terminal](/machines/dec/vt100/). PCx...
//=============================================================================== // Microsoft patterns & practices Enterprise Library // Core //=============================================================================== // Copyright © Microsoft Corporation. All rights reserved. // THIS CODE AND INFORMATION IS PR...
--- title: "Web 05. Node.js - Express" excerpt: categories: - etc toc: true toc_sticky: true date: 2021-10-30 --- 1. Node.JS ```js // 모듈 : express, path(html 사용을 위한 경로 설정), nodemon(app 자동 재시작 모듈) // nodemon <js 경로> -e hbs,css,js const path = require('path') const express = require('express') ...
import os import django import random from faker import Faker os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blog_app.settings') django.setup() # FAKE POP SCRIPT fakegen = Faker() topics = ['Search', 'Social', 'Marketplace'] def add_topic(): t = Topic.objects.get_or_create(top_name=random.choice(topics))[0] ...
''' Filename: gTTS.py Module: Softwareprojekt - Kiez:Schnitzel Author: Michael P. Date: 11/17/2019 Python version: 3.6.8 tested with: Ubuntu 18.04 Install: pip3 install gtts Command- line mp3 player: sudo apt install mpg321 ''' from gtts import gTTS import os, sys de...
package org.jaram.jubaky.domain.jenkins data class Job( val name: String, val applicationId: Int, val branch: String, val description: String?, val buildable: Boolean?, val concurrentBuild: Boolean?, val healthScore: Int?, val lastBuildNumber: Int, val lastCompletedBuildNumber: Int,...
! { dg-do run } ! ! PR 40176: Fortran 2003: Procedure pointers with array return value ! ! This example tests for a bug in procedure pointer assignments, ! where the rhs is a dummy. ! ! Original test case by Barron Bichon <barron.bichon@swri.org> ! Modified by Janus Weil <janus@gcc.gnu.org> PROGRAM test_prog PROCE...
const router = require("express").Router(); const Exercise = require("../models/Exercise"); /** * @api {get} /exercises Request a list of exercises * @apiName GetExercises * @apiGroup Exercises * @apiSuccess {Object[]} exercises array of exercise objects */ router.route("/").get((req, res) => { Exercise.find() ...
import Updated from "./boolean/updated"; import Unique from "@dikac/t-array/unique"; import OmitUndefined from "@dikac/t-object/omit-undefined"; import Extract from "@dikac/t-object/extract"; import NotEmpty from "@dikac/t-object/boolean/not-empty"; import NotFound from "../throwable/not-found"; import Name from "@dika...
<?php namespace App; use Illuminate\Database\Eloquent\Model; use App\Tag; class Post extends Model { protected $guarded = [ 'created_at', 'updated_at' ]; // protected $fillable = [ // 'title', 'body' // ]; // protected $hidden = [ // 'created_at', 'updated_at' //...
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "c_smoke_trail.h" #include "smoke_fog_overlay.h" #include "engine/IEngineTrace.h" // memdbgon m...
(ns repl-tooling.nrepl.bencode (:require ["buffer" :refer [Buffer]] [clojure.string :as str])) (defn encode "Encodes a map/vector/string/number into BEncode format" [this] (cond (number? this) (str "i" this "e") (string? this) (str (.byteLength Buffer this) ":" this) (keyword? this) (->...
import { initializeMock, mockContext, mockWindow, mockNavigator, } from '../setupTests'; import { selectThemeMode, updateApp, } from './ui'; import { ThemeMode } from '../api/models' beforeEach(() => { initializeMock(); }); describe('selectThemeMode(context)', () => { it('return the dark theme options ' ...
package com.victorlh.android.framework.core.errores open class ErrorGeneral : Exception { constructor() constructor(message: String) : super(message) constructor(message: String, cause: Throwable) : super(message, cause) constructor(cause: Throwable) : super(cause) var avisos: Array<AvisoError> = emptyArray() ...
package org.geepawhill.contentment.jfx import org.assertj.core.api.Assertions.assertThat import org.assertj.core.data.Percentage import org.junit.jupiter.api.Test class AspectTest { private val aspect = Aspect() @Test fun `defaults are sane`() { assertThat(aspect.height).isCloseTo(900.0, Percent...
package colossus.controller import org.scalatest.{TryValues, OptionValues, MustMatchers, WordSpec} import scala.util.{Failure, Success} class PipeCombinatorSpec extends WordSpec with MustMatchers with OptionValues with TryValues{ "PipeCombinator" must { "combine 2 pipes with a map function" in { val w...
use std::convert::TryFrom; use github_scbot_conf::Config; use github_scbot_types::{common::GhRepository, pulls::GhMergeStrategy}; use super::{IRepositoryDbAdapter, RepositoryCreation, RepositoryModel, RepositoryUpdate}; use crate::Result; #[must_use] #[derive(Default)] pub struct RepositoryModelBuilder<'a> { id:...
# Annotation List Panel - Native Plugin This Annotations List panel is **included** with ThingSPIN.
json.set! :name, directory_listing.name json.set! :description, directory_listing.description json.set! :file_type, directory_listing.file_type json.set! :download_url, api_v1_bulk_download_generate_curl_config_url(accessions: directory_listing.study.accession, d...
using HomeKit.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System; using System.Collections.Immutable; using System.Linq; #nullable enable namespace HomeKit.Model { internal sealed record Characteristic { public Characteristic(ulong iid, ...
package com.github.mbeier1406.scanner.domain; import java.io.FileNotFoundException; import java.sql.SQLException; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import org.apache.logging.log4j.LogManager; import org.apache.loggin...
use crate::chunks::{BytesTotalSize, Color, Node, Transform}; use crate::consts::{KLAC_TAG, KLAE_TAG, KLAI_TAG, KLAS_TAG, KLAV_TAG, KLBC_TAG, KLBI_TAG}; use scroll::{ctx, Endian, Pread, Pwrite}; use std::mem::size_of_val; // TODO(nv): NOT TESTED! WRITE TESTS. #[derive(PartialEq, Debug)] pub struct LightChunk { pub...
# Demo for Interactive Brokers from ib_insync import * import config ib = IB() ib.connect(config.IP, config.PORT, clientId=12) contract = Stock('AAPL', 'SMART', 'USD') bars = ib.reqHistoricalData(contract, endDateTime='', durationStr='30 D', barSizeSetting='1 hour', whatToShow='MIDPOINT',...
import { Module } from '@nestjs/common'; import { StockController } from './stocks.controller'; import { StockService } from './stocks.service'; import { AlphaVantageModule } from '../../services/alphaVantage/alphaVantage.module'; import { DatabaseModule } from '../../services/database/database.module'; @Module({ im...
module AdminAdjustmentRequestHelper def make_adjustment_param_hash(adjustment) at = adjustment.attributes # any one? at.delete 'id' at.delete :id at end end RSpec.configure do |config| config.include AdminAdjustmentRequestHelper, type: :controller end
-- Your SQL goes here CREATE TABLE users ( bankid TEXT NOT NULL, bankid_lower TEXT PRIMARY KEY NOT NULL, username TEXT NOT NULL, password_hash TEXT NOT NULL, balance UNSIGNED BIG INT DEFAULT 0 CHECK(balance >= 0) NOT NULL )
from functools import wraps class Task(object): """ Abstract base class for objects wishing to be picked up as Fabric tasks. Instances of subclasses will be treated as valid tasks when present in fabfiles loaded by the :doc:`fab </usage/fab>` tool. For details on how to implement and use `~fabric...
# Project Lightspeed Ubuntu 20.04 installer Contained in this directory is a bash script to automatically install [GRVYDEV/Project-Lightspeed](https://github.com/GRVYDEV/Project-Lightspeed) on Ubuntu 20.04, compiled directly from source repositories, and install systemd services to run them. This installation method d...
--- layout: layouts/clip.njk tags: clips published: true title: "Bookshop" date: 2020-03-15T18:42:39.948Z link: https://bookshop.org/ ogtype: article --- [ Bookshop](https://bookshop.org/) An online bookstore that donates to local bookstores. As far as I can tell, its 10% of the total! Via by buddy, Jason Head...
module Hangry module Parsers module NonStandard class JamieOliverParser < JsonLDParser def can_parse? nokogiri_doc.css('meta[name="author"]').first['content'] == "JamieOliver.com" rescue NoMethodError false end private def parse_author ...
<?php return [ 'address-line-1' => 'Address line 1', 'address-line-2' => 'Address line 2', 'phone' => 'Phone', 'phone-callable' => 'Callable Phone (0032...)', 'email' => 'Email', 'linked-in' => 'Linked In link', 'facebook' => 'Facebook link', 'instagram' => 'Instagram Link', 'twitte...
package com.ivettevaldez.saturnus.screens.common.viewsmvc import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.annotation.IdRes import androidx.annotation.LayoutRes open class BaseViewMvc( inflater: LayoutInflater, parent: Vie...