text
stringlengths
27
775k
package teff import ( "fmt" "reflect" "testing" ) func TestMarshal(t *testing.T) { for i, testcase := range []struct { value interface{} text string }{ {nil, "nil"}, {1, "1"}, {-1, "-1"}, {"a", `a`}, {ns("a"), `a`}, {[]int{}, ""}, {[]int{1, 2, 3}, "1\n2\n3"}, {[]string{"a", "b", "c"}, "a\...
$(document).ready( function(){ var isShow = false; if($("#TerraFunga")[0].checked) { $("#mindesttempNacht").hide(); $("#hoechsttempNacht").hide(); isShow = true; } else{ $("#mindesttempNacht").show(); $("#hoechsttempNacht").show(); isShow = false; } $("#TerraFunga").click(func...
module System.FSQuery.Data where data SQL = Select [String] | From [SourceSpec] | Where Guard | OrderBy [OrderSpec] | Limit Integer | Con SQL SQL | Nil deriving (Show) data Guard = GAtom CompareOperator FieldName FieldValue | GAnd Guard Guard | GOr Guard Guard | GGrou...
package scala2e.chapter23 object ReversedTranslationDemo { def main(args: Array[String]): Unit = { val xs = List(1, 2, 3, 4) def f1 = (x: Int) => x + 1 def f2 = (x: Int) => (x. to (x + 1)).toList def f3 = (x: Int) => x % 2 == 0 val mapped = map(xs, f1) val flatmapped = flatMap(xs, f2) ...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Model.DataAccess; using Model.Models; using System.IO; using StocktakerWebApi.Models; namespace StocktakerWebApi.Controllers { public class GrouppingController : Controller { DataRepository...
var dir_ab38967e79bf55d1e09e57a1a7ecba7b = [ [ "dhcp6.c", "d3/d46/dhcp6_8c.html", null ], [ "ethip6.c", "d1/d37/ethip6_8c.html", null ], [ "icmp6.c", "df/da5/icmp6_8c.html", null ], [ "inet6.c", "d8/daf/inet6_8c.html", null ], [ "ip6.c", "d8/d46/ip6_8c.html", null ], [ "ip6_addr.c", "db/d77/ip6_...
#!/bin/sh if [ "$#" -ne 0 ] then sh -c "msgfmt $*" else find "${WORKDIR:-.}" -name \*.po -print -execdir sh -c 'msgfmt -f -o "$(basename "$0" .po).mo" "$0"' '{}' \; fi
<?php declare(strict_types=1); namespace Platine\Test\Fixture; class EventListenerTestClass implements \Platine\Event\ListenerInterface { public function handle(\Platine\Event\EventInterface $event) { echo $event->getName(); } } class EventListenerTestClassEmpty implements \Platine\Event\Listen...
package com.fibelatti.pinboard.features.appstate import com.fibelatti.pinboard.MockDataProvider.createPost import com.fibelatti.pinboard.features.posts.domain.model.Post import com.google.common.truth.Truth.assertThat import io.mockk.mockk import org.junit.jupiter.api.Test internal class PostListContentTest { pr...
module TravelWebsite class ApplicationController < ActionController::Base before_filter :set_locale helper_method :title helper_method 'title=' helper 'travel_website/application' # can be used in views as well as controllers. # e.g. <% title = 'This is a custom title for this view' %> attr_writer :title a...
using FakerDotNet.Data; using System; using System.Collections.Generic; namespace FakerDotNet.Fakers { public interface ISuperheroFaker { string Name(); string Power(); string Prefix(); string Suffix(); string Descriptor(); } internal class SuperheroFaker : ISu...
// Cache the generated error records, but let them be garbage collected. const errorRecords = new WeakMap(); const { error: logError } = console; /** * This function builds an {error, id, loc} tuple from errors. It aids in * production-mode debugging by providing a unique ID to each error, plus a * hint as to the e...
mod api; mod serve; pub mod server; #[cfg(test)] pub mod test;
package com.example.blank.di import androidx.lifecycle.ViewModel import co.zsmb.rainbowcake.dagger.ViewModelKey import com.example.blank.ui.barcoderecognition.BarcodeRecognitionViewModel import com.example.blank.ui.blank.BlankViewModel import com.example.blank.ui.foodrecognition.FoodRecognitionFragment import com.exam...
# frozen_string_literal: true require 'rails_helper' RSpec.shared_examples :cors_origin_tests do |origins| origins.each do |origin| it "returns the response CORS headers for #{origin}" do get '/v1/ping', headers: { 'HTTP_ORIGIN' => origin } expect(response.headers['Access-Control-Allow-Origin']).to...
# frozen_string_literal: true require 'neo/transaction/input' require 'neo/transaction/output' module Neo # Represent a transaction on the Neo blockchain class Transaction attr_reader :type, :version, :attributes, :inputs, :outputs, ...
--- layout: post title: "Python Environments with Conda" description: "How to manage Python environments with Conda." keywords: "python, conda, producitivity" --- In this article, I would like to discuss how to create Python environments with [Conda](https://conda.io/en/latest/).
export { usage } from './usage'; export { multipleMonths } from './multipleMonths'; //# sourceMappingURL=index.d.ts.map
package api import ( "context" "database/sql" "fmt" "net/http" "time" "github.com/Bnei-Baruch/gxydb-api/common" "github.com/Bnei-Baruch/gxydb-api/pkg/httputil" ) func (a *App) V2GetConfig(w http.ResponseWriter, r *http.Request) { cfg := V2Config{ Gateways: make(map[string]map[string]*V2Gateway), Ice...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.ai.formrecognizer.administration.models; import com.azure.ai.formrecognizer.implementation.util.ModelOperationHelper; import java.time.OffsetDateTime; import java.util.Map; /** * The ModelOperation mo...
from perform.rom.rom_variable_mapping.rom_variable_mapping import RomVariableMapping class LiftedXiCVariableMapping(RomVariableMapping): """Mapping to lifted primitive state with specific volume and molar concentrations. RomDomains with this mapping are assumed to map to a lifted state given by [pressure...
/******************************************************************************* * Copyright SemanticBits, Northwestern University and Akaza Research * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/caaers/LICENSE.txt for details. *************************************...
<?php namespace php\jsoup; use Iterator; /** * Class Elements * @package php\jsoup */ abstract class Elements implements Iterator { const __PACKAGE__ = 'jsoup'; /** * @return string */ function text() { return ''; } /** * @return bool */ function hasText() ...
//3. 无重复字符的最长子串 //给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。 //示例 1: //输入: s = "abcabcbb" //输出: 3 //解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。 //示例 2: //输入: s = "bbbbb" //输出: 1 //解释: 因为无重复字符的最长子串是 "b",所以其长度为 1。 //示例 3: //输入: s = "pwwkew" //输出: 3 //解释: 因为无重复字符的最长子串是 "wke",所以其长度为 3。 //  请注意,你的答案必须是 子串 的长度,"pwke" 是一个子序列,不是子串。 //示例...
#!/usr/local/gnu/bin/perl5 # 1; # Retrieve HTTP GET or POST form based query sub HTTPgetquery { local $querydata; local %formlist; local $variable; local($name, $value); %formlist = (); @formlist_order = (); if ($ENV{'REQUEST_METHOD'} eq 'GET') { $querydata = $ENV{'QUERY_STR...
""" pgmerge - a PostgreSQL data import and merge utility Copyright 2018-2021 Simon Muller (samullers@gmail.com) """ import os import unittest from contextlib import contextmanager from sqlalchemy import create_engine, text import psycopg2.extensions as psyext @contextmanager def create_table(engine, table): tab...
package factory import ( "fmt" "time" Recipe "github.com/l-ross/ficsit-toolkit/resource/recipe" "github.com/l-ross/ficsit-toolkit/save" "github.com/l-ross/ficsit-toolkit/save/property" ) // Production is implemented by all Satisfactory production buildings. // e.g. Constructor and Assembler type Production inte...
/****************************************************************************** * Copyright (C) 2019 by the ARA Contributors * * * * Licensed under the Apache License, Version 2.0 (the "License"); * ...
// This file is part of BenchExec, a framework for reliable benchmarking: // https://github.com/sosy-lab/benchexec // // SPDX-FileCopyrightText: 2019-2020 Dirk Beyer <https://www.sosy-lab.org> // // SPDX-License-Identifier: Apache-2.0 // Content of ./scripts/stats.worker.js transformed into a data url to // deal with ...
import { RangService } from './../../providers/rang/rang'; import { AuthenticationService } from './../../providers/auth/authenticate'; import { TrashcanService } from './../../providers/trashcan/trashcan'; import { Component, ChangeDetectorRef, Output, Input, EventEmitter, SimpleChanges } from '@angular/core'; import ...
<?php foreach($data as $key=>$value):?> <li class="treeview treeview-login"> <a href="#" level="0"> <i class="fa fa-<?= lang($key.'_icon')?>"></i> <?= lang($key)==''?$key:lang($key)?> <i class="fa fa-angle-left pull-right"></i> </a> <ul class="treeview-menu" style="display: none; padding-left: 15px;"> ...
<?php namespace App\Dao; use App\Contracts\Dao\FirebaseTokenDaoInterface; use App\Models\FirebaseToken; class FirebaseTokenDao implements FirebaseTokenDaoInterface { /** * search data form database * * @param $loginID * @return void */ public function searchData($loginID) { ...
 namespace CarSalesman { public class Engine { private string engineModel; private int power; private int displacment; private string efficency; public Engine(string engineModel, int power, int displacment, string efficency) { Eng...
/* * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.fir.java import org.jetbrains.kotlin.descriptors.Visibilities import org.jetbrai...
<?php include("retwis.php"); # Form sanity checks if (!gt("username") || !gt("password")) goback("You need to enter both username and password to login."); # The form is ok, check if the username is available $username = gt("username"); $password = gt("password"); $r = redisLink(); $userid = $r->hget("...
import PropertyView from './property-view'; import 'multiselect-combo-box/multiselect-combo-box.js'; import { html } from 'lit-element'; class NumberArrayPropertyView extends PropertyView { constructor() { super(); this.inputValue = []; this.id = 0; } isInputModified() { const value = this.ge...
require 'rest-client' require 'json' require 'pry' require_relative "./cli_dinosaur/version" require_relative "./cli_dinosaur/api" require_relative "./cli_dinosaur/dinosaur" require_relative "./cli_dinosaur/cli"
# Theme Toggler Simple plugin for [Powercord](https://powercord.dev) that allows toggling themes. ## Installation 1. Go to your powercord plugins folder. Run `git clone https://github.com/redstonekasi/theme-toggler` 2. Restart discord or fetch missing plugins.
import { createContext } from 'react' import { giftCardInitialState, GiftCardState, GiftCardRecipientI, GiftCardI, } from '../reducers/GiftCardReducer' import { BaseError } from '../typings/errors' export interface GCContext extends GiftCardState { addGiftCardRecipient: (values: GiftCardRecipientI & object) ...
// Copyright (c) 2020 Google LLC All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package com.google.idea.gn.config import com.intellij.openapi.Disposable import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory import com.intellij...
import * as chai from 'chai' import * as sinonChai from 'sinon-chai' import { userPass, servicePass } from './integration.data' import { JSONWebToken } from '../../ts/interactionTokens/JSONWebToken' import { keyIdToDid } from '../../ts/utils/helper' import { jsonAuthentication } from '../data/interactionTokens/authenti...
<?php /** * This file is part of BinStream package. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Serafim\BinStream\Type; use Serafim\BinStream\Type; class Repository implements RepositoryInt...
package io.github.lbandc.cv19api; import java.io.IOException; import java.util.Optional; import java.util.function.Function; interface DataMatchingStrategy { Optional<RowIndex> getSignificantRowIndex(Function<Sheet, Optional<RowIndex>> func) throws IOException; Cell getFirstDateCell() throws IOException; }
import 'styled-components'; declare module 'styled-components' { export interface DefaultTheme { colors: { text_primary: string; background_intro: string; background_main: string; background_footer: string; background_testimonials: string; ...
package com.lwb.service.mq.consumer; import com.lwb.constant.QueueList; import com.lwb.constant.TopicList; import org.apache.activemq.Message; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jms.annotation.JmsListener; i...
import styled from 'styled-components'; export const ProfilePhotoWrapper = styled.div` width: 50px; height: 50px; border-radius: 100px; background-image: linear-gradient( to top, #c53d3d, #cb477f, #b167b8, #7b87da, #35a0e0, #00b2e0, #00c1d5, #0acec1, #45deaf, #7cec95, #b5f678, #f2fb5f );...
#!/bin/bash #This script is for the Computer Language Benchmarks Game site. #http://shootout.alioth.debian.org/gp4/index.php # #It will take a CAL file (which is all lower case, as required by the site's makefiles), #copy it to an appropriately named file (first letter uppercase), #create a workspace declarat...
# Larevel 5.6 - ACL [ https://github.com/kodeine/laravel-acl ] <br/> I have changed little bcouse some function deprecated. # Includes 1. Tables [ tables-for-ACL.sql ] 2. Design with bootstrap 4.1 3. Functionality of ACL # Functions Implemented 1. Login Module [ Auth Module] 2. Remove Register [ Auth Module] 3. Per...
use POSIX; open CONFIG,'welcome.ini'; dup2(fileno(CONFIG), 17); exec './uwsgi','--ini','fd://17';
import type { ReadTimeResults } from 'reading-time'; import type { CollectionNode } from '../core/coreModel'; /** Enum of available GraphQL types that implement Post interface */ export enum PostType { BLOG = 'BlogPost', PROJECT = 'ProjectPost', } /** Enum of available GraphQL types that implement PostResource i...
package susuru.core trait Pool[RSC, RSP] { def leaseAny(family: String): RSC def leaseSome(family: String, id: Long): RSC def release(family: String, id: Long, resource: RSC, response: RSP): Unit def invalidate(resource: RSC): Unit }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/settings/owner_key_util.h" #include <limits> #include "base/file_util.h" #include "base/logging.h" #include "base/...
require 'httparty' require 'pry' FHIR_SERVER = 'http://localhost:8080/reference-server/r4' TOKEN = 'SAMPLE_TOKEN' def upload_us_core_resources file_path = File.join(__dir__, 'us-core-r4-resources', '*.json') filenames = Dir.glob(file_path) .select { |filename| filename.end_with? '.json' } puts "...
#!../script/rails runner MATCHES_DIR = Rails.root.join('matches') MIN_COUNTS = [1, 3, 10] THRESHOLDS = [0.6, 0.7, 0.8, 0.9, 1.0] CUTOFFS = [100, 300, 1000, 3000] TYPES = %w(hashes res merged) CROSS_DEVS = [true, false] DEFAULT = { :type => 'merged', :cutoff => 300, :threshold => 0.8, :min_cou...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using PAST003.Algorithms; using PAST003.Collections; using PAST003.Extensions; using PAST003.Numerics; using PAST003.Questions; namespace PAST003.Questions { public class QuestionB : AtCoderQuestionBase { ...
# NOTE: requires installing gems: # # * `parser` - https://github.com/whitequark/parser # * `unparser` - https://github.com/mbj/unparser require 'securerandom' require 'parser/current' require 'unparser' # Codegen a big Ruby program of the form: # # def x1 # if byte == 'a' # x2 # else # x3 # end # end # ...
virt-install --name u1 \ --memory 1024 \ --vcpus=1 \ --graphics vnc,listen=0.0.0.0 --noautoconsole \ --disk path=/var/lib/libvirt/images/u1.qcow2,size=16,device=disk,format=qcow2 \ --os-type linux \ --os-variant generic \ --import guestmount -a /var/lib/libvirt/images/u1.qcow2 -m /dev/sda1 ...
package com.github.aniaan.spring.profile import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.language.jvm.tasks.ProcessResources class GradleSpringProfilePlugin : Plugin<Project> { override fun apply(project: Project) { project.tasks.withType(ProcessResources::class.java) { proces...
import 'package:json_annotation/json_annotation.dart'; import 'package:partido_client/model/split.dart'; part 'entry.g.dart'; @JsonSerializable() class Entry { int id; String description; String category; double totalAmount; String billingDate; String creationDate; double parts; int creator; List<Sp...
module IRC.Types where import qualified Data.Map as Map import System.IO type RawIRCMessage = String type ChannelName = String type Username = String type IRCHandle = Handle type LogHandle = Handle type CommandName = String type PrivmsgCommandName = String type ChannelList = Map.Map ChannelName ChannelWatch type Serv...
// // Created by jiahong on 22/01/17. // #ifndef TRIE_TRIE_H #define TRIE_TRIE_H #include <memory> #include "Node.h" namespace ds { template<class T> class Trie { public: static constexpr int ASCII = 128; typedef size_t size_type; Trie(size_type type) : char_set(type), root(nullptr, ASCII) {} Tri...
package armstrong // IsNumber is used to to determine whether a number is an Armstrong number. // An Armstrong number is a number that is the sum of its own digits each raised to the power of the number of digits. func IsNumber(n int) bool { var sum int nums := digits(n) exp := len(nums) for _, digit := range nums...
import { AppNavbar } from '.'; const appName: string = 'radix-api'; const envs: Array<string> = ['dev', 'qa', 'prod', 'yoto', 'poco']; export default ( <div style={{ margin: 'auto', marginTop: 50, display: 'grid', gridAutoColumns: 'max-content', justifyContent: 'center', }} >...
<HTML LANG="es"> <HEAD> <TITLE>Inserci�n de usuario</TITLE> </HEAD> <BODY> <?PHP // Escribir aqu� el nombre y la clave del usuario que se desea crear $usuario="academicos"; $clave="4c4demicos"; $conexion = mysql_connect ("localhost", "referenciaspagos", "referenciaspagos") or die ("...
require 'test_helper' class GetOrderTicketTest < Minitest::Test def get_order_ticket Gillbus::GetOrderTicket::Response.parse_string(File.read('test/responses/getOrderTicket.xml')) end def test_ticket assert_equal('base64 string', get_order_ticket.ticket) end end
wesabe.provide('lang.math'); wesabe.lang.math = { // return the max number in an array of numbers max: function(array) { if (array.length == 0) return; var max = array[0]; for (var i=1; i<array.length; i++) { if (array[i] > max) max = array[i]; } return max; }, // return the sum of a...
--- layout: page permalink: false title: Names and culture summary: I talked at the Design System Meetup v4.0.0 about how naming affects how we communicate. featured: true date: 2018-09-11 youtube: -xAKir02gto ---
--- title: useContextObservable prev: false next: false --- ## useContextObservable Returns an observable of the current value for the given context. ```ts function useContextObservable<T>(context: Context<T>): Observable<T>; ``` This hook is essentially an observable version of Reacts' `useContext` hook. :::tip S...
'use strict'; import path from 'path'; export const ROOT = path.join(__dirname, '..'); export const DIR_SRC = 'src'; export const DIR_DEST = 'public'; export const DIR_TEMPLATE = 'templates'; export const DIR_STYLE = 'styles'; export const DIR_SCRIPT = 'scripts'; const joint = (...paths) => path.join(...paths); con...
import Component from 'consul-ui/components/dom-buffer-flush'; import { inject as service } from '@ember/service'; import { get } from '@ember/object'; export default Component.extend({ dom: service('dom'), actions: { change: function(e) { [...get(this, 'dom').elements('[name="modal"]')] .filter(...
var model = null; (function constructor(args) { model = args.model; var data = model.get("data") || {}; data = _.extend(data, { title: model.get("name"), name: model.get("name"), description: model.get("name"), timestamp : model.get("referenceTime") }); model.set("data", data); $.titleTextFieldWidget....
# **抓包工具Wireshark和tshark** 这节将简单的提及强大的 Wireshark 和 tshark 工具。**Wireshark** 是一个图形应用,是分析任何类型的网络流量的主流工具。尽管 Wireshark 非常强大,但有时您可能需要一个非图形界面的,可远程执行的轻量级应用。这种情况下,您可以使用 **tshark**,它是 Wireshark 的命令行版本。 很遗憾,Wireshark 和 tshark 的讨论超出了本章的范畴。
import { c, colors } from './color'; // 红 export const red = (text, value) => { return c(colors(text, 'red'), value); }; // 蓝 export const blue = (text, value) => { return c(colors(text, 'blue'), value); }; // 绿 export const green = (text, value) => { return c(colors(text, 'green'), value); }; // 黄 export c...
using Dfc.CourseDirectory.FindAnApprenticeshipApi.Interfaces.Settings; namespace Dfc.CourseDirectory.FindAnApprenticeshipApi.Settings { public class CosmosDbSettings : ICosmosDbSettings { public string EndpointUri { get; set; } public string PrimaryKey { get; set; } public string Datab...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\App; class TravelPreCheckoutRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { ...
<?php if ($_GET) { global $wpdb; $table_name = $wpdb->prefix . 'teste_ab'; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); $sql = "DROP TABLE " . $table_name . ";"; $wpdb->query($sql); $sql = "CREATE TABLE if not exists " . $table_name . " ( id INT NOT NULL AUTO_I...
using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif namespace CreateThis.Example { public class ExampleSkyboxManager : MonoBehaviour { public Material blueSky; public Material sunset; public delegate void SkyboxChanged(); public static event SkyboxChanged OnSkyboxChanged...
package cuj.ecsv; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.annotation.JSONField; /** * @author cujamin * @date 2020/3/21 */ public class Test { @JSONField private String id; @org.junit.Test public void test(){ System.out.println(JSON.toJSONString(new Test())); } }...
'use strict'; var fs = require('fs'); var path = require('path'); var test = require('tape'); var concat = require('concat-stream'); var merge = require('../'); test('basic test', function (t) { t.plan(1); var packed = [ './fixtures/x-packed.js', './fixtures/y-packed.js' ]; merge(packed.map(toAbsolu...
const { logger } = require('./domain/logger'); const config = require('config'); const redditDomain = require('./domain/reddit'); const historianDomain = require('./domain/historian'); (async () => { logger.info('Historian - Reddit Agent'); logger.debug('Running with config - ', config.util.toObject()); l...
// Libraries import {Dispatch} from 'redux' import {replace} from 'react-router-redux' // APIs import { getDashboard as getDashboardAJAX, getDashboards as getDashboardsAJAX, createDashboard as createDashboardAJAX, deleteDashboard as deleteDashboardAJAX, updateDashboard as updateDashboardAJAX, updateCells a...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Yggdrasil.Attributes { [AttributeUsage(AttributeTargets.Property)] public abstract class Boolean : Attribute { public bool Value; public Boolean(bool value) { Value = value; } } }
#ifndef S3_HANDLERS_HPP #define S3_HANDLERS_HPP #include <Poco/Net/HTTPRequestHandler.h> #include <Poco/Net/HTTPServerRequest.h> #include <Poco/Net/HTTPServerResponse.h> class ListObjectsV2 : public Poco::Net::HTTPRequestHandler { public: virtual void handleRequest(Poco::Net::HTTPServerRequest &req, Poco::Net::H...
// src/main/scala/progscala3/appdesign/dbc/BankAccount.scala package progscala3.appdesign.dbc import scala.annotation.targetName case class Money(val amount: Double): // <1> require(amount >= 0.0, s"Negative amount $amount not allowed") @targetName("plus") def + (m: Money): Money...
#!/usr/bin/env bash set -e rm -rf BUILD.zip zip BUILD.zip *
<?php namespace MockDoctrineBundle\Proxy; use MockDoctrineBundle\Document\Tune; class TuneProxy extends Tune { protected $__initialized__; function __construct() { $this->__initialized__ = false; } public function getArtist() { if (!$this->__initialized__) { $this->initialize($this); } return p...
class RSpecCompatibility < Spinach::FeatureSteps feature "RSpec compatibility" include Integration::SpinachRunner include Integration::ErrorReporting Given 'I have a feature that should completely pass' do write_file('features/feature_without_failures.feature', """ Feature: Feature without failures Sc...
/* * Copyright 2017-2020 Aljoscha Grebe * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
package com.github.myon.util; import java.util.Objects; public class Tuple<F, S> extends Anything { public final F first; public final S target; public Tuple(final F source, final S target) { this.first = source; this.target = target; } @Override public String toString() { return "<" + this.first + ","...
#!/bin/bash set -e source $(dirname $0)/loxone-settings.txt ( cd $(dirname $0)/../stats rm -f index.html *.xml wget http://$LOXUSER:$LOXPASS@$LOXHOST/stats/index.html wget -Fi index.html -B http://$LOXUSER:$LOXPASS@$LOXHOST/stats/ rm -f styles.css )
package com.kkbox.openapideveloper.auth import android.content.Context import com.google.gson.JsonObject import com.kkbox.openapideveloper.Endpoint import com.koushikdutta.ion.Ion import com.koushikdutta.ion.future.ResponseFuture /** * The instance of this class fetches open api token. * * @property clientID the c...
package org.aiotrade.lib.collection /** * * @author Caoyuan Deng */ import scala.reflect.ClassTag object ArrayListTest { // --- simple test def main(args: Array[String]) { val test = new Test[Double] test.insertAll(1.0) test.insertOne(0.0) //test.insertOk(1.0, 2.0) //test.insertOk(1.0) ...
package gomodulepath import ( "errors" "fmt" "testing" "github.com/stretchr/testify/require" "golang.org/x/mod/module" ) func TestParse(t *testing.T) { cases := []struct { name string rawpath string path Path err error }{ { name: "standard", rawpath: "github.com/a/b", path: ...
#include "../inc/other.h" #include "../inc/common.h" INT changeDirectory(wstring path) { if(SetCurrentDirectoryW(path.c_str()) == 0) { //if error if(_wchdir(path.c_str()) == -1) { //if error ; // TO change return 1; } e...
#include "ABMS.h" void showLinkMan(const AddressBook *addressBook){ // 判断通讯录中人数是否为0,如果为0,提示记录为空,如果不为0,显示通讯录中联系人的信息 if (addressBook->linkManNumber == 0){ cout << "当前记录为空\n请按任意键继续..." << endl; system("read"); return ; } for (int i = 0; i < addressBook->linkManNumber; ++i) { ...
create table `t_warehouse` ( `id` bigint(20) NOT NULL COMMENT '仓库id', `store_id` bigint(20) NOT NULL COMMENT '库房编号', `store_type` tinyint(2) NOT NULL COMMENT '库房类型 1、线下仓库,2、虚拟仓库,3、配送中心,4、线下自提点', `state` tinyint(2) NOT NULL DEFAULT '0' COMMENT '仓库状态 0:关闭 1:开启', `create_user` bigin...
import React, { useState } from 'react'; import { INCOMPLETED } from 'constants/filter'; // Components import { TrackingListWrapper } from './TrackingList.styled'; import { Filter } from './Filter'; import { Table } from './Table'; export const TrackingList = () => { const [filtering, setFiltering] = useState(INCO...
import { createContext, useContext } from "react"; const ColorContext = createContext('black'); const Component = () => { const color = useContext(ColorContext); return <div style={{ color }}>Hello {color}</div>; }; const App = () => ( <> <Component /> <ColorContext.Provider value="red"> <Compone...
--- title: Time Series Decomposition description: Course Work --- Couse work on time series decomposition completed in my CTBA course at William & Mary. - [TimeSeries (html)](TimeSeries.html) - [TimeSeries (ipynb)](TimeSeries.ipynb) Jupyter Generated Time Series graph from another CTBA assignment. - [Construction ...
#!/usr/bin/python3 # countdown.py: A simple countdown script. import time, subprocess time_left = 5 while time_left > 0: print(time_left, end=" ", flush=True) time.sleep(1) time_left -= 1 # At the end of the countdown, play a sound file. subprocess.Popen(["see", "alarm.wav"])