content
stringlengths
10
4.9M
<gh_stars>0 use reqwest::StatusCode; use thiserror::Error; #[derive(Debug, Error)] pub enum PhishtankError { #[error("You must supply a URL to use this function.")] InvalidUrl, #[error("The server has exceeded the bandwidth specified by the server administrator.")] BandwidthExceeded, #[error("Unkno...
k = int(input()) p = {i: 0 for i in '123456789.'} for i in range(4): for j in input(): p[j] += 1 p['.'] = 0 print('YNEOS'[max(p.values()) > 2 * k :: 2])
import * as React from "react"; import { getClassName } from "../../helpers/getClassName"; import { classNames } from "../../lib/classNames"; import { usePlatform } from "../../hooks/usePlatform"; import { HasComponent, HasRootRef } from "../../types"; import { hasReactNode } from "../../lib/utils"; import { useAdaptiv...
def process(self, index: int, count: int, item: T) -> Outcome: pass
A new Christian-based consumer organization that ranks companies based on their friendliness toward people of faith released a Christmas “Best in Class” list, hoping to have a major impact on where people spend their money this holiday season. Topping the list are brands like Chick-fil-A, Dillards, Hobby Lobby, JetBlu...
/** * Aggregates results of {@link HiveSchemaCollectorProcessor}. * @since 0.3.1 */ public class HiveSchemaAggregatorProcessor implements BatchProcessor { static final Logger LOG = LoggerFactory.getLogger(HiveSchemaAggregatorProcessor.class); private static final Location PATH_BASE = Location.of("etc/hive-...
// Package aoc2015 contains all of the logic for the Advent of Code 2015 puzzles. The main packages are autogenerated; // if a day is added, add the day number to the build tag in `doc.go` and then run `go generate` to regenerate the main // packages. package aoc2015 //go:generate go run gen.go 1
// NotEmpty asserts that got is not empty. func NotEmpty(t testingT, got interface{}) bool { t.Helper() if isEmpty(got) { t.Error(formatError(getArg(1)(), "was empty")) return false } return true }
18.06.2013 @ 14:50 Posted by Jesper Ralbjerg The Blanco Pro Cycling Team has completed the selection for the Tour de France. Bauke Mollema is the definitive leader of the team while Robert Gesink will be given a free role even though he is expected to support Mollema in the mountains. Mollema will strive for a top spo...
def exclude_subgraph(graph: Graph, sub_vtx) -> GraphView: sub_set = collect_subgraph_vertices(graph, sub_vtx) filter_prop = graph.new_vertex_property("bool") filter_prop.a[int(sub_vtx)] = True for vtx in graph.vertices(): if vtx not in sub_set: filter_prop.a[int(vtx)] = True ou...
# -*- coding: utf-8 -*- x = int(input()) #x = 8 y = input().split() #y = ["3","1","4","1","5","9","2","6"] for i in range(x): y[i] = int(y[i]) Max = max(y) Min = min(y) ans = Max - Min print(ans)
<reponame>potherca-contrib/hyperhyperspace-core export { Store, LoadResults, StoredOpHeader } from './store/Store';
Baptismal font in the new Indianapolis Temple of the Church of Jesus Christ of Latter-day Saints (Photo11: The Church of Jesus Christ of Latter-day Saints) CARMEL, Ind. -- With the opening of Indiana's first regional Mormon temple in Carmel, some out-of-state Christian opponents say they will set up a tent across the ...
/* * (c) Copyright <NAME>, Germany. Contact: <EMAIL>. * * Created on 20.05.2006 */ package net.finmath.montecarlo.interestrate.models.covariance; import java.util.Map; import net.finmath.functions.LinearAlgebra; import net.finmath.stochastic.RandomVariable; import net.finmath.stochastic.Scalar; import net.finmath...
/** * Perform the read on the given region, * a local read is preferred over a network read * * @param region * @throws StorageManagerException * @throws InterruptedException * @throws BBoxDBException */ private void perfomReadOnRegion(final DistributionRegion region) throws InterruptedExceptio...
/** * Mueve archivo * * @param sourceFile * @param destinationFile */ public static void fileMove(String sourceFile, String destinationFile) { try { File inFile = new File(sourceFile); File outFile = new File(destinationFile); FileInputStream in = new FileInputStream(inFile); FileOutputStream o...
Varieties of Capitalism, Growth Regimes, and Structural Change in Eurozone Core and Peripheral Countries: Germany as a Role Model for Portugal? Abstract This article aims at analyzing the structural changes that occurred in the Portuguese economy after the 2010/2013 sovereign debt crisis, compared with what occurred i...
<reponame>pncalbl/coin-exchange<gh_stars>0 package com.pncalbl.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.pncalb...
// Copyright (c) 2019 Chef Software Inc. and/or applicable contributors // // 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 r...
import os os.environ['PYTHONPATH'] = os.getcwd() if 'OMP_NUM_THREADS' not in os.environ: os.environ['OMP_NUM_THREADS'] = '8' import argparse import cv2 import numpy as np def parse_args(): parser = argparse.ArgumentParser(description='Infer from images in a directory') parser.add_argument('image_dir', he...
// get store app instance key func GetStoreAppInstanceKey(namespace string, appInstanceName string) string { if appInstanceName == "" { return fmt.Sprintf("/ns/%s/appinstances", namespace) } else { return fmt.Sprintf("/ns/%s/appinstances/%s", namespace, appInstanceName) } }
RICHMOND, Va. (AP) - Virginia Gov. Terry McAuliffe's budget proposal includes a $6 million pilot program that would provide women with long-term contraception such as intrauterine devices at no cost. The Daily Press reports McAuliffe also pushed unsuccessfully last year for the program, which is modeled after a projec...
input_1st=input() input_2nd=input() N, K = input_1st.split(" ") D = input_2nd.split(" ") for ans in range(int(N), 100000): flg = True for i in range(len(str(ans))): if str(ans)[i] in D: flg = False break if flg: print(ans) break
// UnPack used to unpack the greeting packet. func (g *Greeting) UnPack(payload []byte) error { var err error buf := common.ReadBuffer(payload) if g.protocolVersion, err = buf.ReadU8(); err != nil { return sqldb.NewSQLError(sqldb.ER_MALFORMED_PACKET, "extracting greeting protocol-version failed") } if g.serverVe...
// This file was generated automatically #[repr(u8)] #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum Key { CapsLock, Shift, Control, Alt, Meta, ControlOrMeta, RightShift, RightControl, RightAlt, RightMeta, RightControlOrMeta, Fn, ReturnOrEnter, Escape, ...
def intersect_sites_method(form): if settings.PAGE_USE_SITE_ID: if settings.PAGE_HIDE_SITES: site_ids = [global_settings.SITE_ID] else: site_ids = [int(x) for x in form.data.getlist('sites')] def intersects_sites(sibling): return sibling.sites.filter(id__i...
The Americans United for the Separation of Church and State recently posted an article discussing Christian Reconstructionism that mentions Vision Forum. It turns out that Vision Forum openly associates with and supports those who advocate stoning as the appropriate punishment for disobedient teens. Read for yourselves...
<gh_stars>10-100 /* $NetBSD: db_disasm.c,v 1.16 2003/12/08 08:08:40 jdolecek Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. * All rights reserved. * * Written by <NAME> for Wasabi Systems, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that ...
Journalism in the Digital Age: The Nigerian Press Framing of the Niger Delta Conflict This paper analyzes how four Nigerian newspapers framed the local Niger Delta conflict between January and May 2008. It also analyzes the main sources of news reports on the confl ict, including the extent to which journalists relied...
/** * dijkstra - apply Dijkstra's algorithm starting from the * specified origin vertex to find the shortest path from the * origin to all other vertices that can be reached from the * origin. * * The method prints the vertices in the order in which they are * finalized. For each ver...
/** * Same as normal release but with latitude and longitude. * * @param minutes Amount of minutes the scooter was rented for. * @param latitude Latitude where the scooter was released. * @param longitude Longitude where the scooter was released. * PRE: minutes > 0 && latitude != null && ...
# -*- coding: utf-8 -*- from datetime import datetime from unittest.mock import call from unittest.mock import patch import pytest from pyloniex.constants import OrderType from moneybot.errors import InsufficientBalanceError from moneybot.errors import NoMarketAvailableError from moneybot.errors import OrderTooSmallE...
import React from "react"; import { Card } from "../"; import { render } from "enzyme"; import toJSON from "enzyme-to-json"; describe("Card", () => { it("default", () => { expect(toJSON(render(<Card>Example Content</Card>))).toMatchSnapshot(); }); it("with paddingSize set", () => { expect( toJSON(...
#include "../include/bound_sketch.h" #include "../include/util.h" #include <math.h> #include <omp.h> #include <experimental/filesystem> #include <chrono> #include <mutex> BoundSketch::BoundSketch() { sketch_map_.clear(); offline_skethces_.clear(); } void BoundSketch::PrepareSummaryStructure(DataGraph& g, doub...
// Set up the OpenGL camera for rendering void gl_camera::setup(const math_vector_3f &scene_center, float scene_size) const { glViewport(viewx, viewy, vieww, viewh); math_vector_3f center = m_camera_rm * scene_center; float fardist = -(center[2] - 8*scene_size); float neardist = max( -(center[2] + scene_size), sc...
/** * Creates a new decorator with the specified {@link CircuitBreakerMapping}. */ public static <I extends Request, O extends Response> Function<Client<I, O>, CircuitBreakerClient<I, O>> newDecorator(CircuitBreakerMapping mapping) { return delegate -> new CircuitBreakerClient<>(delegate, mapp...
<reponame>nikita-volkov/rerebase module System.Posix.Internals ( module Rebase.System.Posix.Internals ) where import Rebase.System.Posix.Internals
use super::Service; use crate::{ApiError, Error, ServiceClient}; use maybe_async::maybe_async; mod request; mod response; /// Holidays API request. pub use request::HolidaysRequest; /// Holidays API response. pub use response::HolidaysResponse; struct HolidaysService; impl Service for HolidaysService { const P...
module Snap.Snaplet.Test.Common.Handlers where ------------------------------------------------------------------------------ import Control.Monad.IO.Class (liftIO) import Data.Configurator (lookup) import Data.Maybe (fromJust, fromM...
Norwegian Christmas card A 19th-century American Christmas card A Christmas card is a greeting card sent as part of the traditional celebration of Christmas in order to convey between people a range of sentiments related to Christmastide and the holiday season. Christmas cards are usually exchanged during the weeks p...
Granzyme B Is a Biomarker For Suspicion of Malignant Seromas Around Breast Implants. BACKGROUND Granzyme B (GrB) is a serine protease secreted by cytotoxic lymphocytes along with pore forming perforin to mediate apoptosis in target cells. GrB has been detected in tumor cells associated with systemic and breast implant...
## Here W -- column , n -- row... def knapsack(wt,val,W,n): t = [[-1 for i in range(W+1)] for j in range(n+1)] ## intialization step.. for i in range(n+1): for j in range(W+1): if (i == 0 or j == 0): t[i][j] = 0 ## code conversion from recursion to iterative ...
<gh_stars>0 /** * Basic Generics usage * * Basic example os using generics in TypeString - Thanks about that, Microsoft <3 */ import ArrayList from "./util/ArrayList"; var numberList = new ArrayList<number>(); numberList.add(10); numberList.add(20); numberList.add(30); var stringList = new ArrayList<string>(); ...
def shallow_copy(self): the_copy = GraphBuilder() the_copy.processes = copy.deepcopy(self.processes) return the_copy
/** * Make sure exceptions and bad params are handled appropriately */ public void testBadParams() { try { TermVectorsReader reader = new TermVectorsReader(dir, seg, fieldInfos); assertTrue(reader != null); reader.get(50, testFields[0]); fail(); } catch (IOException e) { ...
import { Injectable } from '@angular/core'; import { Constants } from '../helpers/constants'; import { HttpClient } from '@angular/common/http'; import { catchError } from 'rxjs/operators'; import { environment } from '../../environments/environment'; import { UtilitiesService } from './utilities.service'; import { Obs...
/// Creates a new rigid body that can move. pub fn new_dynamic<G>(shape: G, density: Scalar, restitution: Scalar, friction: Scalar) -> RigidBody where G: Send + Sync + Repr<Point, Matrix> + Volumetric<Scalar, Point, AngularInertia> { let props = shape.mass_properties(density); RigidBody::new( ...
<reponame>Zubieta/CPP # https://app.codesignal.com/arcade/intro/level-7/PTWhv2oWqd6p4AHB9 def stringsRearrangement(input_array): # Given an array of equal-length strings, check if its possible to # rearrange the strings in such a way that after the rearrangement # the strings at consecutive positions would ...
#include <iostream> using namespace std; void display(); const int MAX_CITY = 10; const int INF = 1e9; int main() { int n; int cost[MAX_CITY][MAX_CITY]; int from, to, c; int sum[MAX_CITY]; int num_min, cost_min; int num_max; while (cin >> n, n!=0) { //初期化 fo...
<filename>src/main/java/be/aga/dominionSimulator/cards/Dame_AnnaCard.java package be.aga.dominionSimulator.cards; import be.aga.dominionSimulator.DomCard; import be.aga.dominionSimulator.enums.DomCardName; import java.util.ArrayList; import java.util.Collections; public class Dame_AnnaCard extends KnightCard { ...
package server import ( "testing" "github.com/rs/xid" "golang.zx2c4.com/wireguard/wgctrl/wgtypes" ) func TestAccountManager_GetNetworkMap(t *testing.T) { manager, err := createManager(t) if err != nil { t.Fatal(err) return } expectedId := "test_account" userId := "account_creator" account, err := manag...
Activity screening of environmental metagenomic libraries reveals novel carboxylesterase families Metagenomics has made accessible an enormous reserve of global biochemical diversity. To tap into this vast resource of novel enzymes, we have screened over one million clones from metagenome DNA libraries derived from si...
In support of Danny Brown's upcoming album and Baauer's unlikely #1 hit, the pair have announced a joint US tour, cheekily titled "Worst of Both Worlds." They'll hit the South and the West Coast in April, stopping at both weekends of Coachella along the way. See a full list of scheduled dates below. Revisit our Danny ...
def cell_file(self, filename='cell.inp', triangles=False, maxcols=125): cells = make_gefdc_cells( ~numpy.isnan(self.mg.xn), self.mg.cell_mask, triangles=triangles ) outfile = self.directory / filename write_cellinp(cells, outputfile=o...
A Response to Euclid at the Core: Recentering Literary Education Close Reading: Classroom Notes on Teaching the Odyssey I remember the topic my eleventh grade teacher assigned for The Odyssey: "What makes The Odyssey a classic?" I didn't know what made anything a classic, let alone The Odyssey. Doc Campbell set demand...
/** * A producer/disposer/observer non-static method of a session bean class * should be a business method of the session bean. */ private void checkBusinessMethod( ExecutableElement element, CdiAnalysisResult result ,boolean isProducer, boolean isDisposer, boolean isObserver ) { ...
import sys input = sys.stdin.readline n, m = list(map(int,input().split())) itog = 0 mass = [] for _ in range(n): a = list(map(int,input().split())) new = a.count(1) last = 0 count = 0 mass.append(a) for i in a: if i == 1: new -= 1 last += 1 ...
#include<stdio.h> #include<stdlib.h> extern void adainit(); extern void adafinal(); extern void _ada_cosupsys ( int n, int m, int *mc, int ns, int *s, int nc, double *c ); void test_cosup_poly_system ( void ); /* interactive test on coefficient-support representation of poly systems */ vo...
<gh_stars>100-1000 /**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2012 <NAME> Copyright (c) 2013 <NAME> http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ...
A,B,C,X,Y=map(int,input().split()) if A+B<=2*C: print(A*X+B*Y) elif X==Y or (X>Y and A>=2*C) or (X<Y and B>=2*C): print(2*max([X,Y])*C) elif X>Y and A<2*C: print(2*Y*C+A*(X-Y)) elif X<Y and B<2*C: print(2*X*C+B*(Y-X))
#include<iostream> using namespace std; typedef long long ll; ll n,ans,tmp1,tmp2; int main(){ cin >>n; for(int i=0;i<n;i++){ cin >>tmp1>>tmp2; if(tmp1+2<=tmp2){ ans++; } } cout <<ans<<endl; }
/** * Instances of this class describe operating system fonts. * <p> * For platform-independent behaviour, use the get and set methods * corresponding to the following properties: * <dl> * <dt>height</dt><dd>the height of the font in points</dd> * <dt>name</dt><dd>the face name of the font, which may include the...
<reponame>manips2002/pdq<gh_stars>1-10 // This file is part of PDQ (https://github.com/ProofDrivenQuerying/pdq) which is released under the MIT license. // See accompanying LICENSE for copyright notice and full details. package uk.ac.ox.cs.pdq.test; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.ru...
/** * Get the follower list. * * @param user current user * @return json message */ @RequestMapping("/switch_options") public JSONObject switchOptions(User user) { JSONObject modelInfos = new JSONObject(); modelInfos.put("switchableUsers", getSwitchableUsers(user, "")); return modelInfos; }
Acts 2:17-18 ‘And it shall come to pass in the last days, says God, That I will pour out of My Spirit on all flesh; Your sons and your daughters shall prophesy, Your young men shall see visions, Your old men shall dream dreams. And on My menservants and on My maidservants I will pour out My Spirit in those days; And t...
package edu.ucdavis.watershed; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import org.apache.commons.csv.CSVRecord; public class CsvData { public LinkedList<Record> data = new LinkedList<Record>(); public double[][] columns; public double[] firstColumn; public void add(C...
Ultra-widefield Fundus Image in Oculocutaneous Albinism. A man in his early 20’s with cutaneous albinism was referred to an ophthalmologist for evaluation of nystagmus and photophobia. He denied oscillopsia. His best-corrected visual acuity was 20/80 with each eye. Anterior segment examination revealed iris transillum...
def sendMyAPDU(self, cla, ins, p1, p2, tx_data=None, recv=0, send_le=0): resp = None ab = recv // 256 cd = recv % 256 if send_le != 0: send_le = 1 if recv < 256 else 2 if tx_data: apdu = SL.APDU(cla=cla, ins=ins, p1=p1, p2=p2, lc=len(tx_data), data=tx_dat...
def action(self, observation, exploration_period=0, enable_random=True, sample_next_obs=False): assert len(observation.shape) == 1, 'Single observation only' self.actions_executed_so_far += 1 if self.exploration_mode == 'egreedy': exploration_p = rl_tuner_ops.linear_annealing( s...
<gh_stars>0 import { Component, AfterViewInit, AfterViewChecked } from '@angular/core'; import { Router } from '@angular/router'; import * as PNotify from 'pnotify'; declare var jQuery: any; @Component({ selector: 'app-layout', templateUrl: './layout.component.html', }) export class LayoutComponent implements A...
/** * Sort the given files * * @param files The files * @param youngestFirst Ascending or descending * @return Just return the given array */ public static File[] sortFilesOnAge(File[] files, final boolean youngestFirst) { FileWrapper[] fw = ...
/// Writes the given bytes onto the heap starting from the given chunk address. The bytes can /// span more than one chunk length. pub fn write_bytes(&mut self, address: ChunkAddress, data: Vec<u8>) -> Option<()> { for (i, chunk) in data.chunks(16).enumerate() { let mut buffer = [0_u8; Self::CHUNK_S...
def auto_delete_files_on_instance_change( instance: Any, fieldnames: Iterable[str], model_class) -> None: if not instance.pk: return try: old_instance = model_class.objects.get(pk=instance.pk) except model_class.DoesNotExist: return for fieldname in fi...
/*********************************************************************************************************************** * * @author Fabrizio Giudici * @version $Id$ * **********************************************************************************************************************/ public class CRWColorConve...
/** * Starts a server, runs a test with a no parameter, and then shuts down the server once the test * has finished running. InProcess servers have less overhead than Local servers but still * exercise most of the GRPC plumbing. This assumes the test will know how to connect to the * server on its own witho...
import Axios, { AxiosError, AxiosInstance, AxiosResponse } from 'axios' import https from 'https' import { XMLWrapper } from './XMLWrapper' import { xmlParser } from './lib/xml' import { createSubjects, Subject } from './Subject' import { tradeLinesHandler, TradeLinesHandlerResponse } from './TradeLinesHandler' import ...
#include "KFRand.hpp" namespace KFrame { KFRand::KFRand() { _result_count = 0; Init( static_cast< uint32 >( time( nullptr ) ) ); } KFRand::~KFRand() { } uint32 KFRand::Rand32() { if ( _result_count == 0 ) { SetRand(); _result_c...
<filename>data/propagate_aortic_annotation.py # Copyright 2018, <NAME>. All Rights Reserved. # # 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...
package com.yugabyte.yw.commissioner.tasks.subtasks; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ImmutableMap; import com.google.common.net.HostAndPort; import com.yugabyte.yw.commissioner.AbstractTaskBase; import com.yugabyte.yw.commissioner.BaseTaskDependencies; import com.yugab...
#include<bits/stdc++.h> using namespace std; const int LEN=1<<21; char BUF[LEN],*Pin,*Pin_last,PUF[LEN],*Pout=PUF,*Pout_last=PUF+LEN-1; inline char G(){return Pin==Pin_last&&(Pin_last=(Pin=BUF)+fread(BUF,1,LEN,stdin),Pin==Pin_last)?EOF:*Pin++;} inline void P(char x){if(Pout==Pout_last)fwrite(PUF,1,Pout-PUF,stdout)...
// We are lucky that we need only 4 registers and we can use r8 to r11. These registers // are encoded consecutively using 3 bits. fn reg_to_bits(r: String) -> u8 { assert!(r == "a" || r == "b" || r == "c" || r == "d"); let b = r.bytes().nth(0).unwrap(); b - b'a' + 0xc0 }
package e2e import ( "context" "errors" "fmt" "time" "github.com/onsi/ginkgo" "github.com/onsi/gomega" "github.com/open-cluster-management/multicloud-operators-foundation/pkg/helpers" "github.com/open-cluster-management/multicloud-operators-foundation/test/e2e/util" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.i...
/// Delete a named property from the object. /// /// Returns false if the property cannot be deleted. fn delete_property( &self, activation: &mut Activation<'_, 'gc, '_>, multiname: &Multiname<'gc>, ) -> Result<bool, Error> { let name = self.resolve_multiname(multiname)?; if ...
def main(): args: Dict[str, str] = docopt(__doc__, version=__version__) success = True data_file = "reportData_" + args["ASSESSMENT_ID"] + ".json" manual_data_file = "manualData_" + args["ASSESSMENT_ID"] + ".json" try: f = open(data_file) f.close() f = open(manual_data_file) ...
import { DefaultSeoProps } from "next-seo"; const defaultSEOConfig: DefaultSeoProps = { title: "<NAME>", titleTemplate: "%s | <NAME>", defaultTitle: "<NAME>", description: "Full-stack engineer and digital nomad", canonical: "https://farazpatankar.com", openGraph: { url: "https://farazpatankar.com", ...
<filename>app/common/views_object.py from django.shortcuts import render, redirect from django import template from django.http import HttpResponseRedirect from django.views.generic import TemplateView from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from common.fo...
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer import json import cgi from PySide2.QtCore import QObject, Signal, Slot from urllib.parse import urlparse, parse_qs, unquote class Server(ThreadingHTTPServer, QObject): action = Signal(str, str, dict) def __init__(self, port, api): QO...
package kafkaadmin import ( "context" "math/rand" "strconv" "testing" "time" "github.com/confluentinc/confluent-kafka-go/kafka" "github.com/stretchr/testify/assert" kafkatesting "github.com/tmstff/kafka-testing-go" ) func TestTopicCreation(t *testing.T) { ctx := context.Background() kafkaUrl, terminateKa...
/* SPDX-License-Identifier: MIT * * Copyright (C) 2019 WireGuard LLC. All Rights Reserved. */ package winipcfg const ( wtIpAdapterAddressesLh_Size = 376 wtIpAdapterAddressesLh_IfIndex_Offset = 4 wtIpAdapterAddressesLh_Next_Offset = 8 wtIpAdapterAddressesLh_AdapterName_Offset ...
/** * This is a simple and stupid resolver, that does not check what is * being resolved; and thus it should only be used if only one thing * (a single external entity; a single external subset) is to * be expanded (although that single entity can be repeated multiple * times). */ public class SimpleResolver ...
/** * Base class for tests in the security package. * * @author jgustie */ public abstract class AbstractSecurityTest { public final Path file(String name) { try { return Paths.get(Resources.getResource(getClass(), name).toURI()); } catch (URISyntaxException e) { throw n...
// PanicMessage goes to a standard and unavaoidable log, then emits a signal. func (e *Engine) PanicMessage(message string) { log.Println(fmt.Errorf("[ENGINE] %s", message)) e.Signals <- EnginePanic }
// Municipalities returns a list of municipalities that Eskom supplies to. func (c *Client) Municipalities(ctx context.Context, province Province) (Municipalities, error) { h := getClient(c) requestURL := fmt.Sprintf("/GetMunicipalities/?Id=%d", province) var municipalities Municipalities err := doRequestJSON(ctx, ...
import os import sys sys.path.insert(0, os.path.abspath('..')) import main from imgrename import core as ir from imgrename import EXIF, exifutil, fileutil, slogging
<gh_stars>0 package io.izzel.taboolib.module.effect.pobject; import org.bukkit.Location; /** * 表示一个圆 * * @author Zoyn */ public class Circle extends ParticleObject { private final Arc fullArc; public Circle(Location origin) { this(origin, 1); } public Circle(Location origin, double radi...
Bacteria-Activated Theranostic Nanoprobes against Methicillin-Resistant Staphylococcus aureus Infection. Despite numerous advanced imaging and sterilization techniques available nowadays, the sensitive in vivo diagnosis and complete elimination of drug-resistant bacterial infections remain big challenges. Here we repo...
package object import ( "io" "time" "github.com/gembaadvantage/go-git/v5/plumbing/storer" ) type commitLimitIter struct { sourceIter CommitIter limitOptions LogLimitOptions } type LogLimitOptions struct { Since *time.Time Until *time.Time } func NewCommitLimitIterFromIter(commitIter CommitIter, limitOptio...
<gh_stars>0 import { GasPayload } from '@atlaskit/analytics-gas-types'; import { packageAttributes, fileStateToFileGasPayload, FileGasPayload, PackageAttributes, } from './index'; import { FileState, FileStatus } from '@atlaskit/media-core'; import { MediaViewerError } from '../error'; interface DownloadAttrib...
/** * Check whether the required user permissions are granted * @return boolean */ public boolean isPermissionGranted() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(android.Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { ...
<reponame>ahmadnassri/httpsnippet /** * @description * HTTP code snippet generator for Kotlin using OkHttp. * * @author * @seanghay * * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author. */ import { CodeBuilder } from '../../../helpers/code-builder'; i...