content
stringlengths
10
4.9M
// Consume returns an array of tasks. func (q *Queue) Consume() ([]Task, *ekaerr.Error) { const s = "Bokchoy: Failed to consume tasks from queue." if !q.isValid() { return nil, ekaerr.IllegalArgument.New(s). WithString("description", "Queue is invalid. Has it been initialized correctly?"). WithString("bokchoy...
/** * @author Andrea Boriero */ @TestForIssue(jiraKey = "HHH-9302") public class JoinedSubclassTest extends BaseCoreFunctionalTestCase { private Long subSubEntityId; @Override protected Class<?>[] getAnnotatedClasses() { return new Class[] {RootEntity.class, SubEntity.class, SubSubEntity.class, SubSubSubEntity...
def update_clusters_information(cluster_dict, samples, stats, config_dict): genome = config_dict["genome"] for entry in stats: F = entry.split(".") if len(F) == 1: if F[0] not in cluster_dict: cluster_dict[ F[0] ] = {} cluster_dict[ F[0] ][genome] = st...
def process(num): bi = bin(num) one = bi.count('1') temp = num -1 while bin(temp).count('1') != one: temp -=1 smallest = temp temp = num +1 while bin(temp).count('1') != one: temp +=1 largest = temp return smallest,largest if __name__=='__main__': num = int(input("Enter any number :")) pr...
<filename>pkg/pomo/typed/v1/v1_types.go package v1 // Pomo ... type Pomo struct { UUID string `json:"uuid,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAd string `json:"updated_at,omitempty"` Description string `json:"description,omitempty"` StartedAt string `json:"...
<gh_stars>1-10 package tklid import ( "strings" "testing" ) const seed = 42 func TestValidate(t *testing.T) { id := New(seed) if got, want := Validate(id), true; got != want { t.Errorf("invalid id: %s", id) } } func TestValidate_wrongSize(t *testing.T) { in := "foo" if got, want := Validate(in), false; got...
<filename>auction-chaincode/src/goauction/main.go<gh_stars>0 package main import ( "cycoreutils" "encoding/json" "fmt" "github.com/hyperledger/fabric-chaincode-go/pkg/cid" "github.com/hyperledger/fabric-chaincode-go/shim" pb "github.com/hyperledger/fabric-protos-go/peer" "github.com/pkg/errors" logger "github...
// changePhase is used to countdown the mapJobCount and change the phase // to reduce phase. func (m *Master) changePhase(mapJobCount int) { for { _ = <-m.phaseCh mapJobCount-- if mapJobCount == 0 { m.phaseMux.Lock() m.jobsMux.Lock() m.initiateReducePhase() m.jobsMux.Unlock() m.phaseMux.Unlock() ...
def resultant_lenght_vis_invis(position_data, beacon_data,seconds_back,name): beacon_d = beacon_data.to_numpy() pos_data = position_data.to_numpy() beacon_d[:, 0] -= pos_data[0][0] pos_data[:, 0] -= pos_data[0][0] idxs = get_index_at_pos(beacon_d, pos_data) beacon_travel = get_positions_before(s...
<reponame>BerlinUnited/nncg<gh_stars>0 from nncg.nncg import NNCG from applications.daimler.loader import random_imdb, load_images, finish_db import tensorflow as tf from tensorflow.keras.applications.vgg16 import VGG16 from tensorflow.keras.applications.vgg19 import VGG19 from tensorflow.keras.layers import Flatten, M...
/** * @author Tomasz Kozlowski (created on 24.02.2021) */ @UseCase @RequiredArgsConstructor @SystemFunction(FhAdmSystemFunction.ADM_PERMISSIONS_EDIT) public class FunctionsSelectUC extends FhdpBaseUC implements IUseCaseNoInput<IUseCaseSaveCancelCallback<Set<AuthorizationManager.Function>>> { private FunctionsSel...
<filename>test/com/java/model/player/RandomModeTest.java<gh_stars>0 package com.java.model.player; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Random; import org.junit.BeforeClass; import org.junit.Test; import com.java...
Ecovative As a student at Rensselaer Polytechnic Institute, Eben Bayer, a co-founder of the company Ecovative Design and a Vermont native with some experience harvesting mushrooms, realized that perlite, a type of volcanic glass frequently used as a component of insulation, was also used in growing mushrooms. He thou...
import * as DMP from 'diff-match-patch' import { AutomergeTextNode } from '../components/Editor' import RichContent from '../content/RichContent' import { AutomergeProxy } from 'automerge' const dmp = new DMP() interface CharOp { contentId: string oldValue: string target: Node targetId: string newValue: str...
class GolombCodeParams: """Parameters for Golomb codes Set up Golomb code parameters (both for encoding and decoding). The parameters are described in the module level documentation. """ def __init__(self, M: int): """Golomb code parameter initialization Args: M (int):...
'Counselling and management for anticipated extremely preterm birth': Informing CPS statements through national consultation. Opinions abound regarding how to best approach anticipated extremely preterm birth. No unified approach presently exists in Canada. In the process of updating the Canadian Paediatric Society st...
// This file is part of rust-web/twig // // For the copyright and license information, please view the LICENSE // file that was distributed with this source code. //! Typisation of lexer and syntax errors. use std::fmt::{self, Display}; use std::error::Error; use std::num::{ParseFloatError, ParseIntError}; use engine...
<filename>microservices/user/src/core/usecases/user/get-user.ts import { UserDb } from "./user-db-interface"; export default function makeGetUser(userDb: UserDb) { return async function getUser(conditions: Array<string>): Promise<Array<any>> { let users = await userDb.get(conditions); let get_users...
#include <iostream> using namespace std; long long gcd(long long x, long long y) { if ((x>y)&&((x%y)==0)) return y; else gcd (y, (x%y)); } void count(long long &x, int &cnt) { if (x%2 == 0) { cnt++; x/=2; count(x, cnt); } else if (x%3 == 0) { cnt++; x/=3; count(x, cnt); } e...
<gh_stars>0 module DataStructures.Answer05 where import Prelude hiding (dropWhile) import DataStructures.Answer01 (List(..)) dropWhile :: List a -> (a -> Bool) -> List a dropWhile (Cons h t) f | f h = dropWhile t f dropWhile list _ = list
/** * Update the template reference on table "template_spool_ref" (VMTemplateStoragePoolVO). */ protected void updateTemplateReferenceIfSuccessfulCopy(VolumeInfo srcVolumeInfo, StoragePool srcStoragePool, TemplateInfo destTemplateInfo, DataStore destDataStore) { VMTemplateStoragePoolVO srcVolumeTempl...
<gh_stars>1-10 use alloc::vec::Vec; use alloc::boxed::Box; use alloc::string::String; use core::slice; #[no_mangle] pub extern "C" fn __av_read_obj(ptr: u32, size: u32) -> String { // The host system will call malloc and write to this memory location // Then inject in a call to read from it. // Problem - how do we...
[Please welcome Sen. Byron Dorgan to FDL to discuss contractor corruption, fraud and waste. As with all guest chats, please stay on topic and be polite — please take off-topic discussions to the prior thread. Thanks! — CHS] Since December 2003, the Democratic Policy Committee (DPC), which I chair, has held seventeen o...
<reponame>tpawelski/trailblazer<filename>lib/StanfordCPPLib/deque.h /* * File: deque.h * ------------- * This file exports the <code>Deque</code> class, a collection * in which values can be added and removed from the front or back. * It combines much of the functionality of a stack and a queue. * * @version 20...
<reponame>cosysoft/device<filename>device-api/src/main/java/com/github/cosysoft/device/model/ClientDataInfo.java package com.github.cosysoft.device.model; import com.android.ddmlib.Client; import com.android.ddmlib.ClientData; import java.util.Locale; /** * @author 兰天 */ @Deprecated public class ClientDataInfo { ...
/** * Compute the split value given the range of the dimension. Uses a simple strategy of the mean of * the minimum and maximum. * * <p>The split value will be finite and will not be equal to the max limit. This allows using * {@code value > splitValue} to partition the data. * * @param minLimit th...
def stage_auto_assess_sh_safely(self, core_process_command): self.logger.log_debug("Staging auto assessment shell script with latest config.") try: cmd_core_py_path = core_process_command.split(' ')[1] exec_dir = os.path.dirname(os.path.abspath(cmd_core_py_path)) if os.path.isabs...
/************************************************************************* > FileName: gio-samba.c > Author : DingJing > Mail : <EMAIL> > Created Time: 2021年03月08日 星期一 16时06分29秒 ************************************************************************/ #include <stdio.h> #include <gio/gio.h> void mount_enclosing_v...
export class Team { id: string; name: string; role: string; image: string; facebook: string; instagram: string; twitter: string; linkedin: string; }
<filename>src/cli/record-prompts/ScaleRecordPrompt.ts<gh_stars>0 import { getRepository } from "typeorm"; import { Choice } from "../../entity/Choice"; import { ScaleRecord } from "../../entity/records/ScaleRecord"; import { AbstractRecordPrompt } from './AbstractRecordPrompt'; import { PromptOptions } from "./PromptOp...
<reponame>chjs/libnvmmio #ifndef LIBNVMMIO_DEBUG_H #define LIBNVMMIO_DEBUG_H #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define GiB (1UL << 30) #define MiB (1UL << 20) #define KiB (1UL << 10) #define SIZE_FORMAT "%g%s" #ifdef DEBUG #define PRINT(fmt, ...) ...
/* * Need to call this method in case there is a special need to override the config in file with * env vars. Though a config item can be overridden in file iteslf using ${?EVN_VAR} as value in * the file, this method eliminates the need to mark config item to be overridden by env variable * in file...
// Return the median value from the nonce distances array uint32_t median(denonce d) { int middle = (int) d.num_distances / 2; qsort(d.distances, d.num_distances, sizeof(uint32_t), compar_int); if (d.num_distances % 2 == 1) { return d.distances[middle]; } else { return (uint32_t)(d.distances[middle - 1]...
<filename>dist/components/common/number.property.d.ts export declare function toNumber(value: number | string): number;
<reponame>centrifuge/fudge // Copyright 2021 Centrifuge Foundation (centrifuge.io). // // This file is part of the FUDGE project. // FUDGE is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of ...
#pragma once template <typename T> class Singleton { public: static T &GetSingleton(void) { static T instance; return instance; } };
<gh_stars>0 // Fill out your copyright notice in the Description page of Project Settings. #include "OP_NoiseCube.h" #include "Engine/Texture2D.h" #include "ImageUtils.h" #include "UnrealFastNoisePlugin/Public/UFNBlueprintFunctionLibrary.h" void UOP_NoiseCube::Init(int resolution, EFractalNoiseType noiseType, int3...
Apple’s been on a bit of a buying spree lately. Embark! Cue! Burstly! If you had to guess the next thing Apple would take under its wing, what would it be? If you guessed “a hydroelectric power project in Central Oregon”, you’d be right! You’d also be a weirdly specific guesser. OregonLive reports that Apple has tak...
Everton are reportedly set to complete a triple deal in the transfer market as the proceeds from the sale of John Stones begins to be spent in earnest. Swansea captain Ashley Williams is already on the brink of a £12million move to Goodison Park as replacement for Stones, whose £47.5m move to the Etihad Stadium was an...
/** * Ensure obtain appropriate authentication, access control and credentials. */ public void testAuthenticationAccessControlAndCredentials() { this.record_basicMetaData(); HttpSecurityType<?, ?, ?, ?, ?> securityType = this.loadHttpSecurityType(true, null); assertEquals("Incorrect authentication type", Http...
def clean_(self): self.source['rcode'] = re.sub('([\\*;=()]|\\\\")', ' ', self.source['code']) self.source['rcode'] = re.sub('\\[[0-9]*\\]', ' ', self.source['rcode']) self.source['rcode'] = re.sub(',', ' , ', self.source['rcode']) self.source['rcode'] = re.sub('"', ' " ', self.source['r...
def redshift_distribution(table, use_matched=False, plot=False): min_z = np.min(table['Z (CO)']) max_z = np.max(table['Z (CO)']) width_bin = 0.5 bins = np.arange(0, max_z+0.6, width_bin) if use_matched: only_matched = (table['Roberto ID'] > 0) else: only_matched = (table['Roberto...
// InjectDBMigrationTool creates DBMigrationTool with configured dependencies. func InjectDBMigrationTool() fw.DBMigrationTool { wire.Build( wire.Bind(new(fw.DBMigrationTool), new(mddb.PostgresMigrationTool)), mddb.NewPostgresMigrationTool, ) return mddb.PostgresMigrationTool{} }
import type { TestingModule } from '@nestjs/testing'; import { Test } from '@nestjs/testing'; import type { INestApplication } from '@nestjs/common'; import { HttpStatus } from '@nestjs/common'; import request from 'supertest'; import { getRepositoryToken } from '@nestjs/typeorm'; import { JwtAuthGuard } from '@/auth/j...
New development fiber material : use DoE approach to determine the best formula for blended fiber silk (Samiya Cynthia Riccini and Semi-Natural Fiber) Many research studied the silk with the filament fiber, which mean if the cocoon broke due to the larva become butterfly earlier, the cocoon will become waste. This pap...
<gh_stars>10-100 {-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.EventSource (newEventSource, close, pattern CONNECTING, pattern OPEN, pattern CLOSED, ge...
import math from abc import ABC from pathlib import Path from typing import List from model.transaction import Transaction from model.wallet import WALLET_EXODUS from model.wallet import WALLETS_PRECISION from parser.parser import Parser from datetime import datetime DATE_FORMAT = "%a %b %d %Y %H:%M:%S %Z%z" class...
/** * This method can be used to initialize the BCI agent when using it as a stand alone library. * * @param configuration * the configuration options, as XML. The stream will be fully read, but not closed. * An empty configuration will be used if this argument is <code>null</code>. * ...
You can be 100% certain, and yet 100% wrong February 26, 2012 Posted by shaunphilly in Religion Tags: belief Apparently, Ginny was writing about this issue while I was also writing this post, but beat me to publishing. I have not read hers yet, but here it is. Also, see the A-Unicornist’s thoughts on the issue. — ...
/** * Platform implementation for Mac OS X platforms. */ public class MacOSXPlatform extends PosixPlatform { public static final String APPLICATION_DATA = "Library/Application Support/RDF4J"; @Override public String getName() { return "Mac OS X"; } @Override public File getOSApplicationDataDir() { return...
package com.xr.api.gateway.config.interceptor; import org.springframework.stereotype.Component; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * @Time: 2019-03-27 16:19 * @Author: <EMAIL> * ...
/** * Writes an info log entry if it is enabled * * @author OnCore Consulting LLC * * @param log a handle to the log * @param message the text to log */ public static void info(final Log log, final String message) { if (log != null && message != null) { if (...
/** * Installs Ratpack / MiniProfiler support code. */ @Override protected void configure() { if (bindDefaultProvider()) { bind(ProfilerProvider.class).toProvider(ProviderProvider.class).in(Singleton.class); } requestStaticInjection(MiniProfilerModule.class); bi...
// NewSrvPool returns a connection pool, which evicts the idle connections in every minute. // The pool holds at most size idle Srv. // If size is zero, DefaultPoolSize will be used. func (env *Env) NewSrvPool(srvCfg SrvCfg, size int) *SrvPool { p := &SrvPool{ env: env, srv: newIdlePool(size), srvCfg: srvC...
use crate::memtable::error::Error; use std::collections::BTreeMap; use std::fs::File; use std::fs::OpenOptions; use std::io; use std::io::prelude::*; use std::path::Path; use std::rc::Rc; pub mod error; #[derive(Debug)] struct Entry { offset: usize, size: usize, } #[derive(Debug)] pub struct Memtable { of...
<reponame>honux77/algorithm<filename>baekjoon/easy-sort/1427-sort.py s=input() ndict = {} for c in s: if c in ndict: ndict[c] += 1 else: ndict[c] = 1 ret = [] nkey = sorted(ndict.keys(), reverse=True); for k in nkey: for _ in range(ndict[k]): ret.append(k) print("".join([str(i) ...
import { Component, OnInit, EventEmitter,Output,SimpleChanges,OnChanges } from '@angular/core'; import { ApiService, Post, Comment } from './api.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit, On...
In a remarkable development, the state of Virginia has fired the law firm of King & Spalding, which has been widely condemned for its abandonment of the House of Representatives in the Defense of Marriage Act case. The entire termination letter can be read here. Virginia Attorney General Ken Cuccinelli says the firm’s...
class TSPasswordCreds: """CredSSP TSPasswordCreds structure. The TSPasswordCreds structure contains the user's password credentials that are delegated to the server. The ASN.1 definition for the TSPasswordCreds structure is defined in `MS-CSSP 2.2.1.2.1 TSPasswordCreds`_:: TSPasswordCreds ::= SEQ...
package org.firstinspires.ftc.teamcode.team10515.states; import org.firstinspires.ftc.teamcode.lib.util.Namable; import org.firstinspires.ftc.teamcode.lib.util.Time; import org.firstinspires.ftc.teamcode.lib.util.TimeUnits; public class FeederStoneGripperStateMachine extends TimedState<FeederStoneGripperStateMachine....
/** * Created by kevin on 6/5/15. */ public class PICCOperatingParameterParams extends Params { private byte byteValue; public byte getByteValue() { return (byte) 0x01; } }
Politicians in the Philippines have been filing their candidacies for next year's elections - and there are some familiar names. Very familiar. In fact, it's hard to avoid the impression that politics here is a form of family business. Imelda Marcos and Joseph Estrada are two of the best-known names in the Philippines...
// Copyright 2017 The WPT Dashboard Project. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package shared import ( "errors" "fmt" "net/http" "net/url" "regexp" "sort" "strconv" "strings" "time" mapset "github.com/deckarep/golang...
//GetUserID will get the user's ID from the database func GetUserID(username string) (int, error) { db := openDb() user := types.User{} err = db.Select(&user).Where("user_name = ?", username).Do() return user.ID, err }
/** * GUI data structure for input of an individual document payment of a payment for CFDI of Payments. * Represents the XML element pago10:DoctoRelacionado, child of the element pago10:Pago. * @author Sergio Flores */ public final class SCfdPaymentEntryDoc extends erp.lib.table.STableRow { public static f...
<gh_stars>0 """Chapter 5: Problem 2. Convert a real number 0 <= n <=1 to binary in 32 bits. Return 'Error' if 32-bit length is not enough. """ def fraction_to_binary_digits(n): if n <= 0 or n >= 1: return 'Error' binary_digits = [] k = 0 while n > 0 and k < 32: n *= 2 if n >=...
<reponame>NanoDataCenter/NanoDataCenter-embedded_kubernets-docker_images<gh_stars>0 package mqtt_publish_server_lib import "lacima.com/redis_support/redis_handlers" import "lacima.com/redis_support/generate_handlers" import b64 "encoding/base64" type MQTT_Publish_Client_Type struct{ driver redis_handlers.Red...
<reponame>ArthurHlt/cloudfoundry-cli package shared_test import ( "net/http" "runtime" "time" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/command/commandfakes" "code.cloudfoundry.org/cli/command/translatableerror" . "code.cloudfoundry.org/cli/command/v7/shared" "code.clo...
//B #include <bits/stdc++.h> #define int long long using namespace std; const int MOD=998244353; string s="@"; signed main() { // freopen("","r",stdin); // freopen("","w",stdout); ios::sync_with_stdio(0);cin.tie(0);/*syn加速*/ int n; cin>>n; string tmp; cin>>tmp; //int n=tmp.length(); s+=tmp; if(...
/* a portable fseek() function return 0 on success, non-zero on failure (with errno set) */ static int _portable_fseek(FILE* fp, Py_off_t offset, int whence) { #if !defined(HAVE_LARGEFILE_SUPPORT) return fseek(fp, offset, whence); #elif defined(HAVE_FSEEKO) && SIZEOF_OFF_T >= 8 return fseeko(fp, offset, when...
def _FindBuildFlags(cls, filename): variables = {} files_to_parse = [] common_variables = _FindNearestFiles(filename, COMMON_VARIABLES) if common_variables: files_to_parse.append(common_variables) while files_to_parse: f = files_to_parse.pop(0) if not os.path.isfile(f): con...
def restore_in_place( self, paths, overwrite=True, journal_report=False, restore_as_stub=None, recovery_point_id=None): restore_option = {} if paths == []: raise SDKException('Subclient', '104') restore_option['j...
def image_scaler(x, scalar, biases, name=''): from cntk.cntk_py import image_scaler x = sanitize_input(x) return image_scaler(x, scalar, biases, name)
/** * Calculate the target of an indirect jmp instruction. * * @since 1.0 */ protected char jmpIndirect (byte incomingLSB, byte incomingMSB) { char addr = direct (incomingLSB, incomingMSB); byte lsb = readMemory (addr); addr++; byte msb = readMemory (addr); re...
Narrative strategies in educational research: reflections on a critical autoethnography This article consists of critical reflections on an inclusion story I wrote about my own practice as a local education authority educational psychologist in the United Kingdom. The aim is to shed light on the process of producing s...
<reponame>npocmaka/Windows-Server-2003 /****************************************************************************** * * (C) COPYRIGHT MICROSOFT CORP., 1999 * * TITLE: LockMgr.h * * VERSION: 1.0 * * AUTHOR: ByronC * * DATE: 15 November, 1999 * * DESCRIPTION: * Definition of ...
/** * Checks that the result at one level of precision is consistent with the result at the next * higher level of Returns the minimum precision that yielded a non-zero result. */ int consistency(S2Point a0, S2Point a1, S2Point b0, S2Point b1) { int triageSign = CompareEdgeDirections.triage(a0, a1,...
<filename>utils/utils.h<gh_stars>0 #pragma once #include <mpi.h> #include <sys/stat.h> #include <sys/types.h> #include <chrono> // chrono::system_clock #include <ctime> // localtime #include <iomanip> // put_time #include <locale> #include <sstream> // stringstream #include <string> // string #include <tuple> #inc...
<filename>chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/library/piet/ViewUtilsTest.java<gh_stars>0 // Copyright 2019 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. package org.chromium.chrome.b...
<gh_stars>0 package cn.yuchen.com.takeout.presenter.net.bean; /** * 作者:Created by Luquick on 2018/6/30. * 邮箱: <EMAIL> * QQ号:930982728 * 微信:p11225630 * 作用:xxxxxxx */ public class ActivityInfo { }
def mc_switch(logls, betas): N = logls.size logls_cpy = np.copy(logls) order = np.arange(N) for n in range(N - 1): idx_hT = N - n - 1 idx_lT = N - n - 2 delta_logl = logls_cpy[idx_hT] - logls_cpy[idx_lT] delta_beta = betas[idx_hT] - betas[idx_lT] boltz_fact = - de...
package main import ( "bytes" "encoding/base64" "encoding/json" "errors" "fmt" "image" "io/ioutil" "math" "net/http" "os" "regexp" "strings" "time" "github.com/disintegration/imaging" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-plugin" "github.com/turt2live/matrix-media-repo/plugins/plug...
/** * Loads the content of the file attachment into the specified file. * Calling this method results in a call to EWS. * * @param fileName the file name * @throws Exception the exception */ public void load(String fileName) throws Exception { File fileStream = new File(fileName); try { ...
/** * A table in a {@link MultiTableModel} * * @author MBorne * */ public class EmbeddedTableModel implements TableModel { /** * Nom of the table. */ private String name; /** * FeatureType reference. */ private FeatureTypeRef featureTypeRef; /** * Table model *...
Differences in Fosfomycin Resistance Mechanisms between Pseudomonas aeruginosa and Enterobacterales Multidrug-resistant (MDR) Pseudomonas aeruginosa presents a serious threat to public health due to its widespread resistance to numerous antibiotics. P. aeruginosa commonly causes nosocomial infections including urinary...
# Algorithms > Search > Sherlock and Array # Check whether there exists an element in the array such that sum of elements on its left is equal to the sum of elements on its right. # # https://www.hackerrank.com/challenges/sherlock-and-array/problem # https://www.hackerrank.com/contests/101may14/challenges/sherlock-and-...
N = int(input()) ans = 0 def primer(x): res = [] y = 2 while y*y <= x: while x % y == 0: res.append(y) x //= y y += 1 if x > 1: res.append(x) return res res_all = [] for i in range(N+1): res_all.extend(primer(i)) from collections import Counter D...
def create_f2_f3_cache(total_rule_set: MIDSRuleSet, overlap_checker, quant_dataframe, f2_f3_target_attr_to_upper_bound_map: Dict[TargetAttr, int], nb_of_target_attributes: int ): cache = {} for i, rule_i in enumerate(total_rule_set.ruleset):...
/** * Implements an equivalence test by applying the Wp-method test on the given hypothesis automaton, * as described in "Test Selection Based on Finite State Models" by S. Fujiwara et al. * * @author Malte Isberner * * @param <A> automaton type * @param <I> input symbol type * @param <D> output domain type *...
I say this because it turns out that people are ALREADY working on T-Rex's invention! In fact, they're such great people that they started working on it even before he invented it, and that's really something. Thank you everyone who sent me links to this Science Daily article and this NPR story. I even got some emails ...
/** * Builder for Exasol error messages. */ public class ErrorMessageBuilder { private final String errorCode; private final StringBuilder messageBuilder = new StringBuilder(); private final List<String> mitigations = new ArrayList<>(); private final Map<String, Object> parameterMapping = new HashMap<...
package platform import "context" type bridge interface { Start(ctx context.Context) error Stop(ctx context.Context) error IP(ctx context.Context) (string, error) } var ( _ bridge = (*minikubeBridge)(nil) _ bridge = (*unstartableBridge)(nil) _ bridge = (*unsupportedBridge)(nil) ) func dispatch(vm string) brid...
def _el(obj) -> dict: name = obj.names[0] return { 'oid' : obj.oid, 'name' : name[:1].lower() + name[1:], 'names' : obj.names, 'desc' : obj.desc, 'obsolete' : bool(obj.obsolete), 'sup' : sorted(obj.sup), }
// // AFBIsNotAViewModelTableViewCell.h // NSMeetup-MVVM-Talk // // Created by <NAME> on 5/7/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> #import "AFBBook.h" @interface AFBIsNotAViewModelTableViewCell : UITableViewCell - (void)configureWithTitle:(NSString *)title author:(NSSt...
/** * Tests that we can re-throw VM-generated exceptions and re-catch them. */ @Test public void testRecatchCoreException() { byte[] txData = ABIUtil.encodeMethodArguments("outerCatch"); Object result = avmRule.call(from, dappAddr, BigInteger.ZERO, txData).getDecodedReturnData(); A...
/** * Copyright 2021 Huawei Technologies Co., Ltd * * 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...
export interface IProdsCategoryCollection { title: string; catLink?: string; prods: any; loadState: string; showPagination?: boolean; }
On March 5, 1946, almost 69 years ago to the day, former British Prime Minister Winston Churchill gave his famous "Iron Curtain" speech before an audience of thousands in Fulton, Missouri. Churchill was in Fulton at the invitation of Westminster College, where he spoke. He traveled there aboard a train, accompanied by ...
<commit_msg>Fix WidgetWithScript to accept renderer kwarg <commit_before>from django.forms.widgets import Widget from django.utils.safestring import mark_safe class WidgetWithScript(Widget): def render_html(self, name, value, attrs): """Render the HTML (non-JS) portion of the field markup""" retur...
package main import "testing" func TestPrintBoardToString(t *testing.T) { b := make(map[Position]Piece) mid, err := ParsePosition("H8") if err != nil { t.Fatal(err) } b[mid] = Black p, err := mid.Move(1, 1) if err != nil { t.Fatal(err) } b[p] = White p, err = mid.Move(-1, 1) if err != nil { t.Fatal(e...