text
stringlengths
27
775k
//! Miscellaneous utilities. use std::sync::atomic::{AtomicUsize, Ordering}; use futures::Stream; /// Boxes a stream, since `.boxed()` is apparently deprecated. (It makes sense to deprecate the /// futures version, since `Either` exists, but since there's no Stream `Either`...) This is mainly /// a way to give a hin...
package org.jks.docker.test; import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.InfoCmd; import com.github.dockerjava.api.command.InspectImageResponse; import com.github.dockerjava.api.exception.NotFoundException; import com.github.dockerjava.api.model.Container; import com.github....
import { Button, Divider, Flex, SimpleGrid, Text, useBreakpointValue, useDisclosure, useToast, VStack, } from '@chakra-ui/react'; import HeaderBG from 'assets/header.jpg'; import { AmountDisplay } from 'components/AmountDisplay'; import { FundGrantModal } from 'components/FundGrantModal'; import { Lin...
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} module Network.VJClient.ToJSON where import Data.ByteString.Char8 (ByteString, pack, unpack, intercalate, putStrLn) import Control.Monad.Writer (Writer, execWriter, tell) class ToJSON a where encodeJSON :: a -> ByteString instance ToJSON Bool whe...
#!/bin/bash # Created on Mon Sep 28 15:09:01 2020 # @author: dmattox cd /Users/dmattox/cbk/lec_gly_binding/data/structures/holo/seqs/nrSeqs/ outDir="/Users/dmattox/cbk/lec_gly_binding/analysis/seqClustering/" /Users/dmattox/cdhit/cd-hit -i allSeqs.fst -o ${outDir}id50/out -c 0.5 -G 1 -g 1 -b 20 -l 10 -n 3 /Users/d...
#!/usr/bin/bash if [ $# -ne 1 ]; then echo "Usage: $0 file_path" exit 1 fi odir="/tmp/unshake/" mkdir -p "$odir" iname="$(realpath "$1")" oname="$(basename "$1")" cd "$odir" && ffmpeg -i "$iname" -vf vidstabdetect=shakiness=10:accuracy=15 -f null - && ffmpeg -i "$iname" -vf vidstabtransform=smoothing=30:inp...
<?php /** * Zettacast\Injector\BinderInterface interface file. * @package Zettacast * @author Rodrigo Siqueira <rodriados@gmail.com> * @license MIT License * @copyright 2015-2018 Rodrigo Siqueira */ namespace Zettacast\Injector; interface BinderInterface { /** * Resolves a binding, or alias to its concrete im...
package parser import ( "strconv" "github.com/outcaste-io/gqlparser/v2/ast" "github.com/outcaste-io/gqlparser/v2/gqlerror" "github.com/outcaste-io/gqlparser/v2/lexer" ) type parser struct { lexer lexer.Lexer err *gqlerror.Error peeked bool peekToken lexer.Token peekError *gqlerror.Error prev lexer.T...
# 使用 xunit 编写测试代码 ## Intro xunit 是 .NET 里使用非常广泛的一个测试框架,有很多测试项目都是在使用 xunit 作为测试框架,不仅仅有很多开源项目在使用,很多微软的项目也在使用 xunit 来作为测试框架。 ## Get Started 在 xunit 中不需要标记测试类,所有 `public` 的类似都可以作为测试类,测试方法需要使用 `Fact` 或者 `Theory` 注解来标注方法,来看一个基本的使用示例: 首先准备了几个要测试的方法: ``` c# internal class Helper { public static int Add(int x, int y)...
import 'package:taste_cloud_functions/taste_functions.dart'; import 'package:taste_protos/taste_protos.dart' as $pb; part 'report.g.dart'; @RegisterType() mixin Report on FirestoreProto<$pb.Report>, UserOwned, ParentHolder { static final triggers = trigger<Report>( create: (r) => sendSlack('User Report: ${ref...
package rustyice.editor.annotations /** * @author gabek */ @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.PROPERTY) annotation class ComponentProperty()
# weapp-custom-tabbar 小程序 - 自定义tabBar组件,可动态设置、更新,无闪烁 <img src="https://gitee.com/iotjh/Picture/raw/master/weapp/tabbar.gif" width="208" height="404"> <br> ### custom-tab-bar 实现步骤 1、custom-tab-bar导入项目根目录 <br> 2、app.json中设置"custom": true <br> 3、在tabPage的onShow方法中调用更新方法 <br>
require 'bugzilla' require 'base64' class BugzillaHelper DEFAULT_RETRIES = 5 DEFAULT_RETRY_SLEEP = 2 DEFAULT_RETRY_INC = 1 # Bugzilla Config attr_accessor :username, :password, :products attr_accessor :bz def initialize(opts) opts.each do |k, v| send("#{k}=", v) end xmlrpc = Bugzill...
from django.db import DEFAULT_DB_ALIAS, connections from django.db.migrations.executor import MigrationExecutor from django.db.migrations.writer import MigrationWriter from .config import get_setting # Safety check to ensure we actually can patch MigrationWriter correctly if "as_string" not in dir(MigrationWriter): ...
#!/bin/bash E_NOARGS=75 E_INVARGS=76 bold_text=$(tput bold) normal_text=$(tput sgr0) DEBUG=1 INFO=1 #set -x docker_sec_dir=$(dirname "$0") source "${docker_sec_dir}/docker-sec_parser.sh" docker-sec-help(){ echo "docker-sec usage:" echo " ${bold_text}docker-sec COMMAND [ARGUMENTS]${normal_text}"; echo; #support...
import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; public class HaveFun extends JFrame{ JButton button; JTextField text; public HaveFun(String title) { super(title); button = new JButton("Have Fun"); text = new JTextField("Enter text here...
module LibyuiTestFramework module Pages module ExpertPartitioner class AvailableStoragePage attr_reader :app AVAILABLE_STORAGE_TABLE = { id: '"Y2Partitioner::Widgets::ConfigurableBlkDevicesTable"' } def initialize(app) @app = app app.table(AVAILABLE_STO...
import React from 'react'; import Highcharts from 'highcharts' import HighchartsReact from 'highcharts-react-official' import { makeStyles, Theme, createStyles } from '@material-ui/core/styles'; import { Paper } from '@material-ui/core'; import { isMobile } from '../../services/viewport-service'; const useStyles = ma...
<?php namespace Kolpikov\AnnualPremium\Models\Views; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Kolpikov\AnnualPremium\Models\Gender; /** * Class AnnualPremium * @package Kolpikov\AnnualPremium\Models\Views */ class A...
[SciPipe 0.8.0](https://github.com/scipipe/scipipe/releases/tag/v0.8.0) introduced experimental support for converting audit logs (those `.audit.json` files produced to accompany all output files from SciPipe) into other formats, such as HTML, TeX (for further conversion to PDF) or even executable Bash-scripts. Here's ...
#include "LymphCentral.h" #include "Tumor.h" #include "../../core/GlobalUtilities.h" #include <fstream> // shorthands // get raw value (original units) #define GET_PARAM_RAW(x) _QSP_model.getSystem()->getParameterVal(x, true) #define SET_PARAM_RAW(x, y) _QSP_model.getSystem()->setParameterVal(x, y, true) #define GET_...
--- name: "Lagarto TechDay" website: https://lagartotechday.es twitter: https://twitter.com/lagartotechday location: Jaén, Spain cancelled: true date_start: 2020-04-25 date_end: 2020-04-25 ---
package io.cgisca.godotadmoblibrary.adformat import android.app.Activity import android.util.Log import androidx.annotation.NonNull import com.google.android.gms.ads.AdRequest import com.google.android.gms.ads.rewarded.RewardItem import com.google.android.gms.ads.rewarded.RewardedAd import com.google.android.gms.ads.r...
class Complex { constructor(re, im) { this.re = re; this.im = im; } mul(other) { const re = this.re * other.re - this.im * other.im; const im = this.re * other.im + this.im * other.re; return new Complex(re, im); } add(other) { const re = this.re + other.re; const im = this.im + other.im; retur...
package skyd // Condenses the even bits of a 64-bit integer into 32 bits. func CondenseUint64Even(value uint64) uint32 { return condenseUint64(value, 0) } // Condenses the odd bits of a 64-bit integer into 32 bits. func CondenseUint64Odd(value uint64) uint32 { return condenseUint64(value, 1) } // Condenses the bit...
using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Avatar/Enemy", fileName = "enemy_")] public class EnemyData : AvatarData { public int maxShieldTokens = 0; public int xp; public int money; public Item commonItemDrop; public Item rareItemDro...
/** * @author Daniel Karl, IBM Research * * Literature: * Brandes, Ulrik, and Christian Pich. "Eigensolver methods for progressive multidimensional scaling of large data." * International Symposium on Graph Drawing. Springer, Berlin, Heidelberg, 2006. */ import {PowerMethod, Decomposition} from "./PowerMethod"; i...
package com.fisk.twig import com.fisk.twig.util.TwigTestUtils import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase abstract class TwigFixtureTestBase : LightPlatformCodeInsightFixtureTestCase() { protected val fileName: String get() = getTestName(true) + ".twig" override...
!> \file mo_template.f90 !> \brief Template for future module development. !> \details This module serves as a template for future model developments. !> It shows the module structure, coding style, and documentation. !> \authors Matthias Cuntz, Juliane Mai, Christoph Schneider !> \date Nov 2011 MODULE mo_template ...
{-# LANGUAGE OverloadedStrings #-} {- Limits for memory, cpu time, etc. under a "sandbox" -} module Codex.Tester.Limits ( Limits(..), lookupLimits, ) where import Data.Configurator.Types(Config) import qualified Data.Configurator as Configurator import Control.Monad (mplus) -- | SafeEx...
use lambda_runtime::error::LambdaErrorExt; use std::{error::Error, fmt}; /// This module implements a custom error currently over the AWS Lambda runtime, /// which can be extended later to support more service providers. #[derive(Debug)] pub struct VercelError { msg: String, } impl VercelError { pub fn new(message: ...
# Download 1000G files (https://www.cog-genomics.org/plink/2.0/resources#1kg_phase3) wget https://www.dropbox.com/s/asn2ehkkwh4vjhr/all_phase3_ns.pgen.zst?dl=1 wget https://www.dropbox.com/s/7ok88895fwnvpuf/all_phase3_ns.pvar.zst?dl=1 wget https://www.dropbox.com/s/yozrzsdrwqej63q/phase3_corrected.psam?dl=1 ## manually...
#include "ee0/WxLibraryPanel.h" #include "ee0/WxLibraryPage.h" namespace ee0 { WxLibraryPanel::WxLibraryPanel(wxWindow* parent) : wxPanel(parent, wxID_ANY) , m_notebook(nullptr) , m_selected(nullptr) { InitLayout(); } void WxLibraryPanel::AddPage(WxLibraryPage* page, const char* name) { if (m_notebook->GetPageC...
package ru.terrakok.gitlabclient.ui.about import android.os.Bundle import kotlinx.android.synthetic.main.fragment_about.* import moxy.presenter.InjectPresenter import moxy.presenter.ProvidePresenter import ru.terrakok.gitlabclient.R import ru.terrakok.gitlabclient.presentation.about.AboutPresenter import ru.terrakok.g...
import fs from "fs"; import axios, { AxiosRequestConfig } from "axios"; const exampleFn = async () => { const config: AxiosRequestConfig = { headers: { Authorization: `Key ${process.env.STEDI_API_KEY}`, }, }; const input = fs.readFileSync("tst/sample.xml", "utf8"); try { const response = aw...
// This file has been generated by the reflectable package. // https://github.com/dart-lang/reflectable. import "dart:core"; import 'package:demo/src/AbstractAnimal.dart' as prefix2; import 'package:demo/src/Animal.dart' as prefix1; import 'package:proxiable/src/annotation/proxiable.dart' as prefix3; import 'package:r...
using System.Collections; using UnityEngine; using UnityEngine.UI; public class GameStart : MonoBehaviour { [Header("模式")] public GameMode GameMode; [Header("Loading")] public Text txtVersion; public Text txtRes; public Text txtSize; public Text txtSize2; public Text txtSpeed; publ...
export 'src/wings_driver.dart'; export 'src/wings_request.dart'; export 'src/wings_response.dart'; export 'src/wings_socket.dart';
var path = require( "path" ), fs = require( "fs" ), modules = {}; module.exports.load = function( location ){ var root = path.join( Core.config.globals.root, location ), stats = fs.lstatSync( root ); if( !stats.isDirectory() ) return; fs.readdirSync( root ).forEach( function ( file ){ var currentL...
package me.lukeforit.spaceofaday.ui.archive.items import android.os.Build import android.text.Layout import android.view.View import me.lukeforit.spaceofaday.databinding.ListItemApodBinding import me.lukeforit.spaceofaday.ui.base.DataBindingViewHolder class ApodViewHolder(binding: ListItemApodBinding) : DataBindingV...
# space-invaders-JS Space invaders avec quelque images libre de droit, optimisé, disponible en ligne et quelque fonctions fort sympathiques (feux d'artifices de victoire...) Disponible ici : https://godeta.github.io/space-invaders-JS/
// ----------------------------------------------------------------------- // <copyright file="UsersModel.cs" company="Microsoft"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> // ----------------------------------------------------------------------- namespace Microsoft.Store.Partn...
#!/bin/sh if which direnv >/dev/null 2>&1; then eval "$(direnv hook zsh)" fi
import { withInstall } from '../helpers/with-install' import Notify from './Notify.vue' import { createAlertHook, createShowPopup, createHidePopup } from '../popup/api' import type { PopupSuccessAlertArgs } from '../popup/types' import type { StateType } from '../helpers/types' const showNotify = createShowPopup< | ...
-module(file_reader). -behaviour(playdar_reader). -include("playdar.hrl"). -include_lib("kernel/include/file.hrl"). -export([start_link/3, reader_protocols/0]). start_link(A, Pid, Ref) -> spawn_link(fun()->run(A,Pid,Ref)end). reader_protocols() -> [ {"file", {?MODULE, start_link}} ]. % starts sending file ...
# 参数 $opt = $args[0]; $arg1 = $args[1]; # 要更新的路径 $paths = [System.Collections.ArrayList]@( "path1" # ,"path2 ); function cleanPaths { <# .SYNOPSIS remove illegal path in list #> $wrongPath = New-Object -TypeName System.Collections.ArrayList; foreach ($path in $paths) { if (!...
#!/usr/bin/perl # checkout-raw.t -- test raw-file-related functions of the Checkout class use warnings; use strict; use Test::More tests => 9; use Test::Differences; use Test::Exception; use ChiselTest::Engine; use Log::Log4perl; my $engine = ChiselTest::Engine->new; my $checkout = $engine->new_checkout; # extract ...
/* * Copyright 2020, av1dec authors * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditio...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. const { ComponentDialog } = require('botbuilder-dialogs'); const { NumberInput, AttachmentInput, ConfirmInput, IfCondition, ActivityTemplate, AdaptiveDialog, TextInput, SendActivity, TemplateEngineLanguageGenerator, OnBegin...
use itertools::Itertools; use std::cmp; use std::env; use std::fs::File; use std::io; use std::io::BufRead; extern crate time; fn main() { let args = env::args().collect::<Vec<String>>(); if args.len() < 3 { panic!("Not enough arguments") } let input_filename = &args[2]; let input_lines = ...
using System; using System.Collections.Generic; using System.Linq; namespace System.Windows { public interface IResourceContainer { event EventHandler<ResourcesChangedEventArgs> ResourcesChanged; bool IsEmpty { get; } bool TryGetResource(object resourceKey, out object value); } ...
// // AMGHomePresenter.h // AMGViperText // // Created by amglfk on 2017/12/4. // Copyright © 2017年 amglfk. All rights reserved. // #import <Foundation/Foundation.h> #import "AMGHomeViewControllerOutput.h" #import "AMGHomeInteractorOutput.h" #import "AMGHomePresenterInput.h" @protocol AMGHomeViewControllerInput; ...
{-# language ExplicitForAll #-} {-# language InstanceSigs #-} module Codec where import Control.Applicative (Alternative (..)) import Control.Category import Data.Functor.Invariant (Invariant2 (invmap2)) import Data.Profunctor (Star (Star, runStar), dimap) import Prelude hiding (id, (...
import 'dart:ui'; import 'package:flexible/flexible.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { testWidgets('默认宽度测试', (WidgetTester tester) async { double? value; await tester.pumpWidget(ScreenFlexibleWidget( child: Builder( bu...
<div class="mdl-cell mdl-cell--12-col"> <h2>This page doesn't exist</h2> </div>
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper') require File.join(File.dirname(__FILE__), '..', '..', 'blueprints', 'blueprints') require File.join(File.dirname(__FILE__), '..', '..', 'blueprints', 'helper') require 'shoulda' require 'base64' class Api::AssignmentsControllerTest < ActionController...
import 'dart:convert'; class WingsResponseFormat { static String? key; /// This function will check if the response is valid /// according to the json structure that has been agreed on between /// the backend and the flutter developer /// /// The default wings validated response is according to JSON-API: ...
import { isArray, forEach, map, matchPattern, find, findIndex, sortBy, reduce } from 'min-dash'; import { getBBox } from '../../util/Elements'; import { center, delta as posDelta } from '../../util/PositionUtil'; import { getTopLevel } from '../../util/CopyPasteUtil'; import { eachElement } ...
# GBA-Mouse-Select I made a way to select objects on screen like a mouse by using pixel color. Here is a video I made to explain how it works. https://www.youtube.com/watch?v=Jw3G2XvTE00 A or B buttons = mouse click. Direction buttons = move mouse. I'm providing the C source code and my batch file. Check out my ...
import withAuthServer from '../lib/firebaseAuth/withAuthServer'; import Login from './login'; const Index = Login; export const getServerSideProps = withAuthServer(null, { allowAll: true }); export default Index;
using System; using TechTalk.SpecFlow; namespace Specs.StepTransformation.Transformations { [Binding] public class DateConverter { [StepArgumentTransformation("date (.*)")] public DateTime Transform(string dateString) { return DateTime.Parse(dateString); ...
// tag::set-property[] ant.setProperty("buildDir", buildDir) ant.properties.set("buildDir", buildDir) ant.properties["buildDir"] = buildDir ant.withGroovyBuilder { "property"("name" to "buildDir", "location" to "buildDir") } // end::set-property[] ant.importBuild("build.xml") // tag::get-property[] println(ant.ge...
public class EnhancedSwitch2{ public static void main(String[] a){ String day = "SUNDAY"; int j = switch (day) { case "MONDAY" -> 0; case "TUESDAY" -> 1; default -> { int result = day.toString().length(); yield result; } }; System.out.println("Result - " + j); //-------------------------...
package io.github.maiconandsilva.quanda.controllers import org.springframework.web.bind.annotation.RestController import org.springframework.web.bind.annotation.RequestMapping import io.github.maiconandsilva.quanda.entities.User import io.github.maiconandsilva.quanda.repositories.UserRepository import io.github.maicon...
package weco.pipeline.reindex_worker.dynamo import grizzled.slf4j.Logging import org.scanamo.syntax._ import org.scanamo.{DynamoFormat, Scanamo, Table} import software.amazon.awssdk.services.dynamodb.DynamoDbClient import scala.concurrent.{ExecutionContext, Future} /** Fetches multiple IDs from DynamoDB. * * Thi...
def FuzzNN(budget, n_rounds): """The main fuzzing framework. Args: budget: Sampling budget for seed selection n_rounds: Termination criteria for the fuzzer """ inputs = init_inputs() for round in range(n_rounds): # ----- Input Selection ----- "Select inputs with importance sampling" input_...
module Ruqqus ## # Represents a post on Ruqqus. class Post < Submission ## # @!attribute [r] thumb_url # @return [String?] the URL of the post's thumbnail image, or `nil` if none exists. ## # @!attribute [r] url # @return [String?] the URL the post links to, or `nil` if none is spe...
var module = angular.module('octopus-library'); module.directive('clickToCopy', function(){ return { restrict: 'A', scope: { clickToCopy: '=', onCopied: '&' }, link: function(scope, el) { el.attr('data-clipboard-text', (scope.clickToCopy || '').toString()); var clip = new Zer...
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM import Control.Concurrent.QSem import Control.Lens hiding (elements) import Control.Monad import qu...
<?php /** * In this example is where the things start to get a bit tricky, as PHP allow * alias to imported classes the extension should be aware of them. * * The following example demonstrates the same class being imported twice * but one using an alias. * * The extension should highlight all the classes, as a...
import {Component, OnInit} from '@angular/core'; import {MachineService} from '../../../services/conf/machine/machine-service/machine.service'; import {AppRouting} from '../../../app-routing'; import {ToastService, ToastType} from '../../../services/misc/toast/toast.service'; import {Breachscan} from '../../../model/br...
//! Support for serializing and deserializing the ICMPv4 layer. use super::{Layer, LayerKind, LayerKinds}; use pnet::packet::icmp::destination_unreachable; use pnet::packet::icmp::echo_reply; use pnet::packet::icmp::echo_request; use pnet::packet::icmp::{self, Icmp, IcmpPacket, IcmpTypes, MutableIcmpPacket}; use pnet:...
package env import ( "os" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) type EnvTestSuite struct { suite.Suite } func (s *EnvTestSuite) TestProcess() { assert.Nil(s.T(), Process()) assert.NotNil(s.T(), Variables()) assert.Equal(s.T(), "info", Variables().LogLev...
<?php namespace Ornicar\GravatarBundle\Tests\Twig; use Ornicar\GravatarBundle\Twig\GravatarExtension; class GravatarExtensionTest extends \PHPUnit_Framework_TestCase { public function setUp() { if (!class_exists('Twig_Extension')) { $this->markTestSkipped('Twig_Extension cannot be found')...
const commandLineParser = require('commander'); const { join } = require('path'); const { globalSettings } = require('../settings'); const { scripts } = require('../../package.json'); let mode = null; const collectArguments = (argument, argumentCollection) => { argumentCollection.push(argument); return argumen...
package io.ampersand8.model; import java.util.ArrayList; import java.util.List; import java.util.UUID; public class Broker { private String id; private String owner; private String name; private String url; private String username; private String password; private List<Service> services; ...
use core::fmt; #[derive(Clone, Copy)] pub struct BenchmarkId<'a> { pub(crate) function_name: Option<&'a dyn fmt::Display>, pub(crate) parameter: Option<&'a dyn fmt::Display>, } impl<'a> BenchmarkId<'a> { /// Construct a new benchmark ID from a string function name and a parameter value. #[inline] ...
/// The default android configuration for an at_app application const int targetSdkVersion = 30; const int minSdkVersion = 24; const int compileSdkVersion = 31; const String flutterConfigGradle = 'apply from: project(\':flutter_config\').projectDir.getPath() + "/dotenv.gradle"'; const String androidR8 = '...
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. part of dart._js_helper; @notNull int stringIndexOfStringUnchecked(receiver, other, startIndex) { re...
package dmitriykhalturin.data.database.dao import android.arch.persistence.room.Dao import android.arch.persistence.room.Insert import android.arch.persistence.room.OnConflictStrategy.REPLACE import android.arch.persistence.room.Query import dmitriykhalturin.data.database.entity.ArticleEntity import io.reactivex.Flowa...
part of 'dish_list_bloc.dart'; enum DishListStatus { initial, success, failure } class DishListState extends Equatable { const DishListState({ required this.restaurantId, this.status = DishListStatus.initial, this.dishes = const <Dish>[], this.categories = const <DishCategory>[], }); final Dish...
#include "GPIOOverlay.hpp" GPIOOverlay* GPIOOverlay::_me; bool GPIOOverlay::SetMode(gpio_num_t pin, gpio_mode_t mode){ return gpio_set_direction(pin, mode) == ESP_OK; } bool GPIOOverlay::DigitalRead(gpio_num_t pin){ return gpio_get_level(pin) > 0; } bool GPIOOverlay::DigitalWrite(gpio_num_t pin, bool value)...
module RealWorld.Api.Authentication where import RealWorld.Api.Prelude type Api = Get '[JSON] () server :: ServerT Api RealWorld server = pure ()
use std::sync::Arc; use ::futures::lock::Mutex; use crate::protocol::cac::connection::Cstp; use super::*; pub async fn run<IO>( io: IO, session_token: &str, context: Context, ) -> Result<(IO, Cstp<Context>), AnyError> where IO: HttpIo, { let context = Arc::new(Mutex::new(context)); let (cstp...
use std::io::BufRead; use super::{ IsoBoxInfo, BoxParsingError, BoxReader, BoxValue, Flags, IsoBoxEntry, IsoBoxParser, }; pub struct TrunSample { duration: Option<u32>, size: Option<u32>, flags: Option<u32>, // To make place both for an u32 and a i32 // Alternatives (e....
/* @(#)dtkGraph.h --- * * Author: Nicolas Niclausse * Copyright (C) 2013 - Nicolas Niclausse, Inria. * Created: 2013/08/29 14:24:15 */ /* Commentary: * */ /* Change log: * */ #pragma once #include "dtkMathSupportExport.h" #include <QtCore> class dtkGraphEdge; class dtkGraphPrivate; class DTKMATHSUPPORT_...
<?php namespace app\api\job; use app\api\model\MachineT; use app\api\model\NoticeUserT; use app\api\model\OrderT; use app\api\service\DepartmentService; use app\api\service\GatewayService; use app\api\service\LogService; use app\lib\enum\CommonEnum; use think\Db; use think\Exception; use think\queue\Job; use zml\tp...
package org.stepic.droid.configuration import org.stepik.android.remote.auth.model.TokenType interface EndpointResolver { fun getOAuthClientId(type: TokenType): String fun getBaseUrl(): String fun getOAuthClientSecret(type: TokenType): String }
Set-StrictMode -Version 'Latest' . "$PSScriptRoot\..\..\..\ContextDSC.Core\BinaryWard.ContextDSC.Core.ps1" function Get-Public_Security_ConnectionProfile_ConfigurationtState() { [cmdletbinding()]Param( [Parameter(Mandatory = $true, ValueFromPipeline = $true)] [string]$InterfaceAlias ) re...
<?php /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | This file is where you may define all of the routes that are handled | by your application. Just tell Laravel the URIs it should respond | to...
package org.spincast.plugins.timezoneresolver; import java.util.HashSet; import java.util.Set; import java.util.TimeZone; import org.spincast.core.config.SpincastConfig; import org.spincast.core.exchange.RequestContext; import org.spincast.core.timezone.TimeZoneResolver; import com.google.inject.Inject; import com.g...
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class MY_Model extends CI_Model { protected $_table_name; protected $_primary_key; protected $_order_by; protected $_order_by_type; protected $_primary_filter = 'intval'; public $rules; public function __construct(){ parent:...
<?php declare(strict_types=1); namespace Jaddek\Fireblocks\Http\Response\Vault; use Jaddek\Fireblocks\Http\Response\ItemInterface; final class MaximumSpendableAmount implements ItemInterface { public function __construct(private string $maxSpendableAmount) { } /** * @return string */ ...
<?php namespace QiQiuYun\SDK\Helper; use QiQiuYun\SDK\Exceptions\ClientException; class ConfigHelper { public static function filter($config, array $defaults = []) { $config = array_merge(['debug' => false], $defaults, $config); if (empty($config['accessKey']) || empty($config['secretKey'])...
import * as React from "react"; import { useToast } from "@chakra-ui/react"; import { ScreenTitle } from "./BlockScreenTitle"; import { CreateForm, CreateFormData } from "./ScreenCreate.Form"; import { Display } from "./ScreenCreate.Display"; import * as qrutils from "../services/qrutils"; import * as crypto from ".....
package io.github.mivek.enums; import io.github.mivek.internationalization.Messages; /** * Enumeration for cloud quantity. * The first attribute is the code used in the metar. * The second attribute is the meaning of the code. * * @author mivek */ public enum CloudQuantity { /** Sky clear. */ SKC, /...
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 package aws.proserve.bcs.ce.service; import aws.proserve.bcs.ce.dto.CreateCloudEndureProjectRequest; import aws.proserve.bcs.ce.dto.GetAwsVpcRequest; import aws.proserve.bcs.ce.dto.ImmutableCreateCloudEndureProject...
from functools import partial def feats_from_matrix_generator(candidate, candidate_index, X, prefix): """Dump a precomputed feature matrix directly into Snorkel candidate: @Candidate to extract features for candidate_index: map from @Candidate to row index in @X X: matrix of features prefix: @stri...
// Copyright Finbuckle LLC, Andrew White, and Contributors. // Refer to the solution LICENSE file for more inforation. using System; using System.Linq; using Finbuckle.MultiTenant.Stores; using Finbuckle.MultiTenant.Test.Stores; using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFr...
import doUntil from "../lib/doUntil"; import timeout from "./helpers/timeout"; const LIST = [15, 1, 8]; describe("promizr.doUntil()", () => { test("should call provided method while given test pass", async () => { const spy = jest.fn(num => num); let i = 0; const test = jest.fn(res => r...