content
stringlengths
10
4.9M
for i in range(int(input())): r, c = map(int, input().split()) r, c = abs(int(r)), abs(int(c)) ans = 2*min(r,c) + abs(r-c) + max(0, abs(r-c)-1) print(ans)
Re-using Auxiliary Variables for MaxSAT Preprocessing Solvers for the maximum satisfiability (MaxSAT) problem -- a well-known optimization variant of Boolean satisfiability (SAT) -- are finding an increasing number of applications. Preprocessing has proven an integral part of the SAT-based approach to efficiently solv...
/* * Wipes all data from the current object */ public void clear() { if (content == null) return; PIVSecurityProvider.zeroise(content, (short) 0, (short) content.length); bytesAllocated = 0; if (JCSystem.isObjectDeletionSupported()) { content = null; JCSystem.requestObjectDeletion(); ...
<gh_stars>1-10 /************************************************************************* * Copyright 2021 Gravwell, Inc. All rights reserved. * Contact: <<EMAIL>> * * This software may be modified and distributed under the terms of the * BSD 2-clause license. See the LICENSE file for details. *******************...
Plasma and Erythrocyte Vitamin Ε Levels in Children with Insulin Dependent Diabetes Mellitus Vitamin E is considered to be one of the most important antioxidants. There is a trend today to supply diabetic children with vitamin E in order to prevent microvascular complications. In this study, our objective was to demon...
<reponame>TecArt/servicecatalog-development /* * Copyright 2005 <NAME>. * * 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 * * Unl...
<reponame>wirrareka/react-fonticonpicker // Copyright (c) 2018 <NAME> <<EMAIL>> // // This software is released under the MIT License. // https://opensource.org/licenses/MIT import React from "react"; import FipCategory from "./FipCategory"; import FipSearch from "./FipSearch"; import FipIconContainer from "./FipIconCo...
def dsn(self): if self._dsn_env_var: return etl.db.parse_connection_string(etl.config.env.get(self._dsn_env_var))
n,m,k = [int(i) for i in input().split()] a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] d = {} for i in range(n): d[a[i]] = i import math total = 0 for i in range(m): x = d[b[i]] total += math.ceil((x+1)/k) if x > 0: d[a[x-1]],d[a[x]] = d[a[x]],d[a[x...
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2016, Andrew Dornbush // 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. Redistribut...
def runFastqScreen(infiles, outfile): tempdir = P.getTempDir(".") outdir = os.path.join(PARAMS["exportdir"], "fastq_screen") job_threads = re.findall(r'--threads \d+', PARAMS['fastq_screen_options']) if len(job_threads) != 1: raise ValueError("Wrong number of threads for fastq_screen") job_t...
Early warning monitoring and management of disasters Everyone would admit that disaster early warning is more important than later treatment and damage repair. If an effective tsunami early warning system had been in place in the Indian Ocean region on 26 December 2004, thousands of lives would have been saved. The sa...
Matrix pencil method for estimating radar cross‐section of moving targets with near‐field measurements In this article, an algorithm is introduced for estimating the radar cross‐section of moving targets with near‐field measurements. This algorithm uses the matrix pencil method that facilitates an efficient compensati...
import { Injectable } from '@angular/core'; import { CurrentUser } from '../shared/models/user'; import { Observable, of, ReplaySubject } from 'rxjs'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { map } from 'rxjs/operators'; import { Router } from '@angular/router'; import { MessengerService...
/* Restore previous windows status and raster timings */ static void tegra_dc_sor_restore_win_and_raster(struct display_controller *disp_ctrl, int *dc_reg_ctx) { int selected_windows, i; selected_windows = READL(&disp_ctrl->cmd.disp_win_header); for (i = 0; i < DC_N_WINDOWS; ++i) { WRITEL(WINDOW_A_SELECT << i...
/** * * @author Chris Baker <ignatz@gmail.com> */ public class ItemTest { static final Logger LOG = LoggerFactory.getLogger(ItemTest.class); @BeforeClass public static void setUpBeforeClass() throws Exception {} @Before public void setUp() throws Exception {} @Test public void determineCumulativeDi...
void func(char* a, char* b, int i, int j, int n); int main() { char *a, *b; int i = 0, j, n; scanf_s("%d", &n); rewind(stdin); a = (char*)malloc(1); while ((a[i++] = getchar()) != '\n') + 1); != '\n') + 1); i, int j,int n) (char*)realloc(b, i (i1 = 0; i1 < i; i1++) j1 = j+1+...
/* * Copyright 2017-2021 Micro Focus or one of its affiliates. * * 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...
<filename>packages/watchmen-web-client/src/console/connected-space/report-view/editor/filter-tab/filters/expression-filter/index.tsx<gh_stars>100-1000 import {ParameterKind} from '@/services/data/tuples/factor-calculator-types'; import {Report, ReportFilterExpression, ReportFilterJoint} from '@/services/data/tuples/rep...
/** * React to slays which hurt a monster * * \param obj_flags is the set of flags we're testing for slays * \param mon_flags is the set of flags we're adjusting as a result */ void react_to_slay(bitflag *obj_flags, bitflag *mon_flags) { int i; for (i = 0; i < SL_MAX; i++) { const struct slay *s_ptr = &slay_t...
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // /// /// \file This file wraps cl2.hpp and introduces wrapper classes for Intel sharing extensions. /// #pragma once #include <CL/opencl.hpp> #define NOMINMAX #ifdef _WIN32 #include <CL/cl_d3d11.h> typedef cl_d3d11_device_source_khr...
def docs_setup(): import logging import warnings import matplotlib.pyplot as plt warnings.filterwarnings("ignore", category=DeprecationWarning) warnings.filterwarnings("ignore", category=FutureWarning) warnings.filterwarnings("ignore", category=UserWarning) logger = logging.getLogger("theano...
/** * [@enum] MACaptionAppearanceDomain * * MACaptionAppearanceDomain is used to specify which domain of preferences to access. * * [@constant] kMACaptionAppearanceDomainUser * The user-defined preferences. This domain should be passed to retrieve settings that should be used to render captions. * [@constan...
/** * Get all edges owned by the given network. * * @param owner The network to query for edges. * @return A set of all the owners edges known to the graph. */ public ArrayList<Action> GetDependents(Network owner) { HashMap<Edge, HashSet<Action>> d = dependents.get(owner); if (d != null) { ...
Violent clashes broke out near a rally for Donald Trump’s presidential campaign in St Louis on Friday. Thirty-two people were arrested and at least one bloodied person was carried into an ambulance amid demonstrations by supporters and opponents of the Republican frontrunner. Trump campaign dogged by violent incidents...
<gh_stars>1-10 package com.rdc.rdcwelcome.utils; import android.app.Activity; import android.util.DisplayMetrics; import android.view.WindowManager; /** * <pre> * author : 残渊 * time : 2018/12/12 * desc : 屏幕相关工具类 * </pre> */ public class ScreenUtils { /** * * 获取屏幕宽度 * @return 屏幕宽度...
/** Tests execution and failure reporting of a plain AludraTest test class triggered by a JUnit suite. */ @Test public void testFailingClass() { System.setProperty(AludraTestJUnitSuite.SUITE_SYSPROP, FailingTestClass.class.getName()); Result result = JUnitCore.runClasses(TriggerSuite.class); ...
feature_count = 5 features = 0 def feature_enabled(bitmap, feature_bit): return bool(bitmap & (1 << feature_bit)) for feature_bit in range(feature_count): print("feature %s: %s" % (feature_bit, feature_enabled(features, feature_bit)))
<reponame>shedaniel/nbt-crafting package de.siphalor.nbtcrafting.mixin; import net.minecraft.item.ItemStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo...
Media playback is unsupported on your device Media caption Matthew Price on the Jordanian-Syrian border says he has heard "there is a growing humanitarian problem" in Deraa At least 62 people have been killed across Syria as thousands of anti-government demonstrators rallied in several cities, activists say. Witnesse...
/** * Insert/Update/Delete record in the database. * This method should be used when one of the columns in the database is a spatial column * @param sql String * @return int * @throws SQLException */ public int insertUpdateOrDeleteData(String sql, ArrayList<JGeometry> geometryList) throws java.sql.SQLExcept...
/** * Helper method to generate an instance of a subclass of * {@link LoadInstruction} based on the specified {@link Type} that will * load the specified local variable * @param index the JVM stack frame index of the variable that is to be * loaded * @param type the {@link Type} of the var...
// input() won't deal with GPU code, so it can be synchronous fn input(&mut self, window: &mut glfw::Window, event: &glfw::WindowEvent) -> bool { if self.imgui.should_render { self.imgui.platform.handle_event(self.imgui.context.io_mut(), &window, &event); } match event { ...
/** * Parse one or more variable references. Returns null if an error occurred. */ private Variables parseVariables() throws CodeSyntaxException { if (!matcher.variable()) { return null; } StringView token = matcher.consume(); Variables vars = new Variables(token.repr()); while (matcher....
/* * Copyright (c) 2017 <NAME> * Copyright (c) 2017 <NAME> * Copyright (c) 2017 <NAME> * Copyright (c) 2017 <NAME> * Copyright (c) 2017 <NAME> * Copyright (c) 2017 <NAME> * Copyright (c) 2017 <NAME> * Copyright (c) 2017 <NAME> * * This software may be modified and distributed under the terms of the MIT licens...
/** * Allows Display to process events, so UI can make progress. Tests running * in the UI thread may need to call this to avoid UI deadlocks. * <p> * For convenience, it is allowed to call this method from a non UI thread, * but such calls have no effect. */ public static void waitForDisplay() { if (inUI...
/** * Will get all documents with missing ancestry information, and correct them * excluding documents in the republished state */ private void processAssignAncestry() { CoreInstance .doPrivileged(Framework.getService(RepositoryManager.class).getDefaultRepositoryName(), session -> { ...
package token import ( "context" "database/sql" "fmt" "github.com/google/uuid" "github.com/vardius/go-api-boilerplate/pkg/commandbus" "github.com/vardius/go-api-boilerplate/pkg/errors" "github.com/vardius/go-api-boilerplate/pkg/executioncontext" oauth2 "gopkg.in/oauth2.v3" ) // Remove command type Remove str...
. A variant of a diurnal-nocturnal inpatient complex on the basis of a psychoneurological dispensary involving a short period of round-the-clock hospitalization of patients is described. This proved advisable in the treatment of three groups of patients (n = 260): (1) those with acute manifestations of the disease (to...
// StartupForwardListener is called when a forward tunnel is to // be listened for. func (cfg *SshegoConfig) StartupForwardListener(ctx context.Context, sshClientConn *ssh.Client) error { p("sshego: StartupForwardListener: about to listen on %s\n", cfg.LocalToRemote.Listen.Addr) ln, err := net.ListenTCP("tcp", &net.T...
<reponame>jingetiema2100/MicroCommunity<gh_stars>100-1000 package com.java110.goods.bmo.groupBuy; import com.java110.po.groupBuy.GroupBuyPo; import org.springframework.http.ResponseEntity; public interface ISaveGroupBuyBMO { /** * 添加拼团购买 * add by wuxw * * @param groupBuyPo * @return ...
#include <bits/stdc++.h> const int maxn = 200; using namespace std; int main(){ #if LOCAL freopen("1.txt","r",stdin); #endif // LOCAL int n , k; scanf("%d %d", &n , &k); int a[maxn], b[maxn]; for(int i = 0; i < n ; i++){ scanf("%d", &a[i]); } for(int i = ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
def n_step_return(self, time, n_step): if time + n_step < self.length: returns = self.reward_list[time + n_step] + self.weight[self.trajectory_list[time + n_step]] else: returns = self.reward_list[-1] return returns
<reponame>UGEL4/FakeReal #pragma once namespace FakeReal { class RenderAPI; class VertexArray; class RenderCommand { public: static void Init(); static void Release(); static void SetClearColor(float r, float g, float b, float a); static void Clear(); static void SetViewPort(int x, int y, int width, int...
<filename>eventx/event.go package eventx import "reflect" //监听事件的回调 type EventCall func(evd *EventData) func (c EventCall) Equal(c1 EventCall) bool { return &c == &c1 || reflect.ValueOf(c).Pointer() == reflect.ValueOf(c1).Pointer() } // 事件数据 // @author xuzhuoxi // Created on 2019/01/08. type EventData struct { /...
The Neurophysiology of Acupuncture: A Viewpoint Acupuncture is a specialised sensory stimulation that is analysed through sensory neural pathways. Therefore to understand its action we have to analyse the anatomy, physiology and pharmacology of the nervous system, aided with a knowledge of neuroendocrinology and the c...
/* Gets the running processId of Minecraft */ DWORD MinecraftAppLauncher::GetProcessId(const std::wstring& processName) { PROCESSENTRY32 processInfo; processInfo.dwSize = sizeof(processInfo); HANDLE processesSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); if (processesSnapshot == INVALID_HANDLE_VALUE...
def go_to_posture(self, posture: str, speed: int = 100) -> None: self.__send('action_posture', posture + ';' + str(speed) if 1 <= speed <= 100 else posture + ';100')
The effect of substitutents on the strain energies of small ring compounds. The effect of substitutents on the strain energy (SE) of cyclic molecules is examined at the CBS, G2, and G2(MP2) levels of theory. Alkyl substitutents have a meaningful effect upon the SE of small ring compounds. gem-Dimethyl substitution low...
/** * validates nested peakStructure. must have a parent peak with an atomRefs * attribute of the same size as the number of children of this. * * @return true if has children of same size as parent atomRefs */ public boolean hasValidNestedPeakStructure() { boolean has = false; ...
n=int(input()) a=[] b=[] for i in range(n): x,y=input().split() if int(x)>0: a.append((int(x),int(y))) else: b.append((int(x),int(y))) a.sort() b.sort() n=min(len(a),len(b)) ans=0 for i in range(n): ans=ans+a[i][1] ans=ans+b[-i-1][1] if len(a)>n: ans=ans+a[n][1] elif len(...
#include <bits/stdc++.h> using namespace std; char str[20]; int main(int argc, char const *argv[]) { scanf("%s", str+1); int len = strlen(str+1); int l = 1, r = len; int ans = 0; while (l <= r) ans += str[l++] != str[r--]; puts(ans == 1 || ans == 0 && (len&1) ? "YES" : "NO"); return 0; }
// // Listen for messages on the usart channel and send them over the socket to // be shown in the terminal // func uartTxComms(theChannel chan uint, conn net.Conn) { var buf = []byte{0} for { v := <-theChannel buf[0] = byte(v) _, _ = conn.Write([]byte(buf)) } }
#include<iostream> #include<map> using namespace std; map<int, int >a; int main(){ int n, z; pair<int, int> max = { 0, 0 }; cin >> n; while (n--){ cin >> z; a[z]++; if (a[z] > max.second) max.second = a[z], max.first = z; } cout << max.first; }
import java.util.Scanner; public class x25A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int odd=0; int even=0; int evena=0; int odda=0; int[] array = new int[n]; for (int a=0;a<n;a++){ array[a]=sc.nextInt(); if(array[a]%2==1){odd...
Image caption The prime minister is keen to make London an international centre of Islamic finance Prime Minister David Cameron has announced that the UK will become the first non-Muslim country to issue an Islamic bond. At the World Islamic Economic Forum (WIEF) in London, he also announced plans for a new Islamic i...
def root(self): if self.iframe: try: Page.get_driver().switch_to.default_content() Page.get_driver().switch_to.frame(self.iframe) except NoSuchFrameException: log.error( "unable to switch to iframe %s" % self.iframe ...
// NewEnvironment initializes the test Environment. func NewEnvironment(t *testing.T, wd string, run RunFunc) *Environment { return &Environment{ t: t, wd: wd, env: os.Environ(), run: run, } }
def create_ransomware_incident(alert) -> Dict[str, Any]: property_dict = _get_property_dict(alert['propertyList']) incidence_usecs = alert.get("latestTimestampUsecs", 0) occurance_time = get_date_time_from_usecs( incidence_usecs).strftime(DATE_FORMAT) return { "name": alert['alertDocumen...
/** * Writes a data source Item to a design. Hierarchical select components * should override this method to recursively write any child items as well. * * @param design * the element into which to insert the item * @param item * the item to write * @param c...
<filename>demo/run_inference.py import argparse import json import os import statistics import time import cv2 import numpy as np from utils import SimpleObjectSegmentation, FashionClassifier, extract_roi parser = argparse.ArgumentParser() parser.add_argument("--model",type=str,required=True, choices=["cnn", "re...
package ai.verta.modeldb.common.config; import ai.verta.modeldb.common.CommonMessages; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Data @NoArgsConstr...
import {action} from "janet-ts"; import { Annotation, BodyAnnotation, FieldAnnotation, NamedAnnotation, PathParamAnnotation, QueryAnnotation, RequestHeaderAnnotation, ResponseHeaderAnnotation, } from "./HTTPAnnotation"; export * from "./HTTPAnnotation"; export type Method = "GET" | "POST" | "PUT" | "...
def label_from_attrs(da, extra=""): if da.attrs.get("long_name"): name = da.attrs["long_name"] elif da.attrs.get("standard_name"): name = da.attrs["standard_name"] elif da.name is not None: name = da.name else: name = "" def _get_units_from_attrs(da): if da.at...
module Machine.Semantics where import Prelude hiding (Read, Monad, div, mod, abs) import qualified Prelude (Read, Monad, div, mod, abs) import Data.Functor (void) import Data.Either (partitionEithers) import Control.Selective import Control.Arrow (second) import Machine.Decode (decode) import qualified Data.Set as Set...
/** * Filters out all late commits of submissions from the checked out repository of a participation * * @param submissionDate The submission date (inclusive), after which all submissions should get filtered out * @param participation The participation related to the repository * @param repo Th...
<reponame>dubiety/azure-sdk-for-python # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- from .sweep import Sweep from .command import Command from .parallel import Parallel from .base_node ...
#![allow(non_snake_case)] #![allow(unused_variables)] #![allow(dead_code)] fn main() { let N: i64 = { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().parse().unwrap() }; fn f(x: i64, m: usize, N: i64) -> i64 { let K = N.to_s...
<filename>src/app/estadisticas/estadisticas.module.spec.ts import { EstadisticasModule } from './estadisticas.module'; describe('EstadisticasModule', () => { let estadisticasModule: EstadisticasModule; beforeEach(() => { estadisticasModule = new EstadisticasModule(); }); it('should create an instance', (...
rsync Usage rsync [OPTIO­N]... SRC [SRC]... DEST rsync [OPTIO­N]... SRC [SRC]... [USER@­]HO­ST:DEST rsync [OPTIO­N]... SRC [SRC]... [USER@­]HO­ST:­:DEST rsync [OPTIO­N]... SRC [SRC]... rsync:­//[­USE­R@]­HOS­T[:­POR­T]/DEST rsync [OPTIO­N]... [USER@­]HO­ST:SRC [DEST] rsync [OPTIO­N]... [USER@­]HO­ST::SRC [DEST] rsync [...
A sample of frozen Siberian soil has revealed that a giant virus, visible through a light microscope, retained its potency despite being frozen for thousands of years. The virus, pithovirus sibericum, attacked single-cell organisms despite having not done any infecting for a few hundred centuries. Jean-Michel Claveri...
5 Ingredient Homemade KIND Nut Bars (V, GF, DF): an easy, one bowl recipe for irresistibly salty and sweet homemade KIND bars. Protein-Packed, Low Carb, Vegan, Gluten-Free, Dairy-Free, Refined Sugar-Free. Recipe video included! Just 106 calories per bar, with only 5 grams of sugar, 8 grams of carbs and 4 grams of prote...
<gh_stars>0 // Copyright 2019 PayPal Inc. // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License...
class ComputeReadParameters: """A class that computes read parameters for slides in a tensorflow dataset. An instance of class histomics_stream.dsm.wsi.ComputeReadParameters can be supplied as an argument to tensorflow.dataset.map. histomics_stream.dsm.wsi.ComputeReadParameters computes level, factor, ...
/** * Sets the upper 3x3 of this matrix by multiplying m1 with m2: this = m1 x m2 * @throws NullPointerException if m1 or m2 are null */ private final void _mult3(Mat4d m1, Mat4d m2) { double _d00, _d01, _d02; _d00 = m1.d00 * m2.d00 + m1.d01 * m2.d10 + m1.d02 * m2.d20; _d01 = m1.d00 * m2.d01 + m1.d01 * m2.d11 + m...
<reponame>jreidmke/floss // import Link from 'next/link'; // import { Button } from '../button/Button'; // import { CTABanner } from '../cta/CTABanner'; import { Carousel } from 'react-responsive-carousel'; import { Section } from '../layout/Section'; // import ReactDOM from 'react-dom'; import 'react-responsive-car...
Industrial corn flour enrichment with whole amaranth flour and milling fractions in corn-based products. Whole flour and milling fractions of raw amaranth seeds were used in 90:10, 80:20 and 50:50 mixtures with industrialized corn flour (MINSA) to prepare tortillas and arepas, basic nutritional foods in several Latin ...
Fixed‐parameter decidability: Extending parameterized complexity analysis We extend the reach of fixed‐parameter analysis by introducing classes of parameterized sets defined based on decidability instead of complexity. Known results in computability theory can be expressed in the language of fixed‐parameter analysis,...
# -*- coding: utf-8 -*- """ Skyperious main program entrance: launches GUI application or executes command line interface, handles logging and status calls. ------------------------------------------------------------------------------ This file is part of Skyperious - a Skype database viewer and merger. Releas...
<filename>b2_base/src/b2_logic/nodes/ir_sensors.py from __future__ import print_function import rospy from b2_base.msg import Proximity class IRSensors: def __init__(self, pub_rate, num_adc_channels, vref, min_adc_val, max_adc_val, proximity_dist, center_pub, mcp_obj): self._pub_rate = ...
<reponame>scloudic/rabbit-framework package com.scloudic.rabbitframework.web.test; import com.scloudic.rabbitframework.web.DataJsonResponse; public class DataJsonResponseTest { public static void main(String[] args) { DataJsonResponse dataJsonResponse = new DataJsonResponse(); dataJsonResponse.set...
import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { setCharacter, setCharacters } from 'store/actions'; import Character from 'types/Character'; import { Form } from './styles'; interface CharacterFormProps { character: Charact...
<reponame>tcoenraad/functioneel-programmeren-uitwerkingen module Exercise where -- recursive jollyJumper :: [Int] -> Bool jollyJumper n = jollyJumper' ((length n) - 1) n jollyJumper' :: Int -> [Int] -> Bool jollyJumper' _ [_] = True jollyJumper' size (x:y:xs) | abs (x - y) == size = jollyJumper' (size - 1) (y:xs) ...
import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; import java.util.TreeSet; public class D { private static HashMap<Character, Integer> fac; private static HashMap<Character, Integer> mst; private static TreeSet<Integer> cardsLeft; ...
// tries to reset the internal status of the LP solver in order to ignore an // instability of the last solving call SCIP_RETCODE SCIPlpiIgnoreInstability(SCIP_LPI* lpi, SCIP_Bool* success ) { SCOPED_TIME_STAT(lpi->stats); LOG(FATAL) <<...
def logout_all_flow(db: Session, token: "Token") -> None: _consume_refresh_token(db=db, token=token) db.query(RefreshToken).filter(RefreshToken.user_id == token.payload.sub).delete(synchronize_session=False) db.commit()
First we got Martian Manhunter, then we got to see a legionnaire ring, then the Flash crossover, and this week we may have just gotten our first clue for the arrival of a very beloved character in the DC mythos. Superboy. Project Cadmus, created by the brilliant Jack Kirby, has a rich history in the DC universe and o...
SAN DIEGO — Two San Diego congressmen want to know why federal agents raided an Oceanside gun parts store last weekend and what the government plans to do with the computers and customer lists it confiscated. Rep. Duncan Hunter (R-Alpine) sent a letter to the director of the Bureau of Alcohol, Tobacco, Firearms and Ex...
/// Returns true if the rectangle is contained within the outline of this path. This function is /// an approximation, and can return false even if the rectangle is contained within this path's /// outline. However, it will never return true when the rectangle is _not_ contained within this /// path's outline. pub fn c...
// AddToSlackDemand adds resources to the slack demand // for the resource pool func (n *resPool) AddToSlackDemand(res *scalar.Resources) error { n.Lock() defer n.Unlock() n.slackDemand = n.slackDemand.Add(res) log.WithFields(log.Fields{ "respool_id": n.ID(), "demand": n.slackDemand, }).Debug("Current Dema...
package me.bymartrixx.ragnarok.server.mixin.item; import me.bymartrixx.ragnarok.server.RagnarokMod; import me.bymartrixx.ragnarok.server.RagnarokOptions; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.LivingEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.TridentI...
<filename>library/hwlib-doxygen.hpp // ========================================================================== // // File : hwlib-doxygen.hpp // Part of : C++ hwlib library for close-to-the-hardware OO programming // Copyright : <EMAIL> 2017 // // Distributed under the Boost Software License, Version 1.0. // ...
// // Created by <NAME> on 2018/11/12. // #ifndef HURRICANE_HURRICANEARMSYSTEM_H #define HURRICANE_HURRICANEARMSYSTEM_H #include "CAHRR/src/PIDAccumulator.h" #include "CAHRR/src/RampAccumulator.h" #include "CAHRR/src/RotateAccumulator.h" #include "CAHRR/src/DeltaAccumulator.h" #include "CAHRR/src/AvgAccumulator.h" #...
Antitachycardia pacing for termination of ventricular tachyarrhythmias: should we use it? This editorial refers to ‘Clinical course and prognostic relevance of antitachycardia pacing-terminated ventricular tachyarrhythmias in implantable cardioverter-defibrillator patients’ by T. Kleemann et al ., doi:10.1093/europace...
package orm type EventType uint8 const ( TICK EventType = 1 + iota // Tick of counter ABS_CORR // Absolute correction of reading ABS_READ // Absolute reading LAST // Automatically appendend event with current time ) type CounterEvent struct { ID uint `gorm:"primary_key"` // primary ke...
/** * Created by pgarcia on 29/6/17. */ public class CarouselUpIntroAdapter extends FragmentPagerAdapter implements ViewPager.PageTransformer { private final static float BIG_SCALE = 1.0f; private final static float SMALL_SCALE = 0.7f; private final static float DIFF_SCALE = BIG_SCALE - SMALL_SCALE; p...
import Data.Char main = do l <- getLine putStrLn $ solve $concat $words l solve s = if toUpper (last (init s)) `elem` "AEIOUY" then "YES" else "NO"
Asymmetric Cell Division and Notch Signaling Specify Dopaminergic Neurons in Drosophila In Drosophila, dopaminergic (DA) neurons can be found from mid embryonic stages of development till adulthood. Despite their functional involvement in learning and memory, not much is known about the developmental as well as molecu...
def install_nvm(host: Driver) -> None: stdout = host.exec("test -f ~/.nvm/nvm.sh > /dev/null; echo $?").stdout if stdout.decode().strip() == "0": return if host.platform == "ubuntu": apt_install(host, ["curl"]) elif host.platform == "arch": pacman_install(host, ["curl"]) else...