content
stringlengths
10
4.9M
package de.heidelberg.pvs.container_bench.benchmarks.singleoperations.maps; import java.io.IOException; import org.openjdk.jmh.annotations.Param; import de.heidelberg.pvs.container_bench.benchmarks.singleoperations.AbstractSingleOperationsBench; import de.heidelberg.pvs.container_bench.generators.ElementGenerator; i...
Libraries and public archives have played a central role in the life and art of internationally celebrated novelist and poet Jane Urquhart. Her mother founded the first library in Little Longlac, Ont., the mining town where she was born. “It was the centre of my mother’s universe—and mine,” Urquhart tells Maclean’s. Sh...
<filename>apps/sepp_tm/include/sepp_tm.h /* ========================================================================= sepp_tm - An app to inject basic SEPP telemetry into the OBSW datapool The MIT License (MIT) ========================================================================= */ #ifndef SEPP_TM_H...
/* eslint-disable no-var */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-explicit-any */ import React, {Component, MouseEventHandler} from 'react'; import GithubIcon from '../../resources/svgs/g...
/** * check barcode payment result is success. * * @param resultMap resultMap */ @Override public boolean successOfBarCode(Map<String, Object> resultMap) { Object returnCode = resultMap.get("return_code"); Object resultCode = resultMap.get("result_code"); return "SUCCESS"...
def process_argument(self, args, options: dict): options["log"] = args.log return True
package eapli.base.servicomanagement.domain.servico; import eapli.base.atividademanagement.domain.Atividade; import eapli.base.atividademanagement.domain.AtividadeAutomatica; import eapli.base.atividademanagement.domain.AtividadeManual; import eapli.base.teammanagement.domain.EquipaType; import javax.persistence.*; ...
/** * * The Prolog class represents a tuProlog engine. * */ public class Prolog implements java.io.Serializable { // 2P version private static final String VERSION = "2.1"; /* manager of current theory */ private TheoryManager theoryManager; /* component managing primitive */ private Pr...
Do Valuation (P/E, ROE and P/BV) Ratios Drive Stock Values? A Case of GCC Countries Do valuation ratios predict the future stock prices? Over the decades, researchers have explored data across various global financial markets and across different timelines to seek its unique answer. The results though were not univers...
package cli import ( "context" "github.com/pkg/errors" "github.com/skratchdot/open-golang/open" "github.com/kopia/kopia/fs" "github.com/kopia/kopia/fs/cachefs" "github.com/kopia/kopia/fs/loggingfs" "github.com/kopia/kopia/internal/mount" "github.com/kopia/kopia/repo" "github.com/kopia/kopia/snapshot/snapsho...
/** *** Copyright 2020 ProximaX Limited. All rights reserved. *** Use of this source code is governed by the Apache 2.0 *** license that can be found in the LICENSE file. **/ import {Cell, DetailedCell, NewVariableCell} from "../Cell"; import {CellFactory} from "../CellFactory"; import * as defines from "../Identif...
"""TODO: docstring """ import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from torchvision import transforms from torch.utils.data import DataLoader import collections from collections import Counter import util from torchvision.transforms import transforms from torch.utils.data import Dataset, Dat...
/* * omap3isp_preview_init - Previewer initialization. * @isp : Pointer to ISP device * return -ENOMEM or zero on success */ int omap3isp_preview_init(struct isp_device *isp) { struct isp_prev_device *prev = &isp->isp_prev; init_waitqueue_head(&prev->wait); preview_init_params(prev); return preview_init_entitie...
import React, { useState, useRef } from "react"; // Styles import style from "./style.module.css"; // Props types interface Props { onSubmit: Function; value: string; placeholder?: string; } export default function InputEdit(props: Props) { const input = useRef<HTMLInputElement>(null); const [value, setVa...
/** * DataSource that routes to one of various target DataSources based on the * current transaction isolation level. The target DataSources need to be * configured with the isolation level name as key, as defined on the * {@link org.springframework.transaction.TransactionDefinition TransactionDefinition interface}...
How has the Chinese economy capitalised on the demographic dividend during the reform period? China’s unprecedented economic growth during the period of reform that began in the late 1970s has been accompanied by a dramatic demographic transition— namely, a rapid decline in the fertility rate. In the period 1978–2015,...
''' foi aplicado o gerenc. de layout pack - fill - o qual faz com que o componente estenda ao tamanho da janela/disponivel, podendo ser no sentido vertical ou horizontal ''' from tkinter import* root = Tk() lb1 = Label(root, text="escrito 1", bg="purple") lb1.pack(side=TOP, fill=X) lb2 = Label(root, text="escrito...
Get the biggest Aston Villa FC stories by email Subscribe Thank you for subscribing We have more newsletters Show me See our privacy notice Could not subscribe, try again later Invalid Email Steve Hollis insists he is ‘not Randy Lerner’s poodle’ after telling the Aston Villa owner that major changes are needed to end ...
/** * The MatchActionOperations class holds a list of MatchActionOperationEntry * objects to be executed together as one set. */ public class MatchActionOperations extends BatchOperation<MatchActionOperationEntry> { private final MatchActionOperationsId id; private MatchActionOperationsState state; ...
// #[cfg(test)] pub mod test; pub mod boolean; pub mod multieq; pub mod uint32; pub mod blake2s; pub mod num; pub mod lookup; pub mod baby_ecc; pub mod ecc; pub mod pedersen_hash; pub mod baby_pedersen_hash; pub mod multipack; pub mod sha256; pub mod baby_eddsa; pub mod float_point; pub mod polynomial_lookup; pub mod ...
/* Helper function to compare if oldpath is the prefix path of newpath */ int32_t _check_path_prefix(const char *oldpath, const char *newpath) { char *temppath; if (strlen(oldpath) < strlen(newpath)) { temppath = malloc(strlen(oldpath)+10); if (temppath == NULL) return -ENOMEM; snprintf(temppath, strlen(oldp...
/** * Responsible for moving the web heads around and for locking/unlocking the web head to * remove view. * * @param event the touch event */ private void handleMove(@NonNull MotionEvent event) { movementTracker.addMovement(event); float offsetX = event.getRawX() - posX; float offsetY = even...
def _delete_nxos_db(self, vlan_id, device_id, host_id, vni, is_provider_vlan): try: rows = nxos_db.get_nexusvm_bindings(vlan_id, device_id) for row in rows: nxos_db.remove_nexusport_binding(row.port_id, row.vlan_id, ...
Adorable Boy Donates His Allowance to Help Adorable Kittens This application requires JavaScript. An adorable boy from Philadelphia took his love of kittens to another level. Evan, a 10-year-old boy and unabashed kitten lover, wrote this heartwarming letter to an animal shelter when he was 7 years old. City Kitties i...
/** * Calculates the purchase price of a product */ public static Map<String, Object> calculatePurchasePrice(DispatchContext dctx, Map<String, ? extends Object> context) { Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Map<String, Object> ...
// Copyright 2020 <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 // // Unless required by applicable law or agreed to in writ...
// expects, splitworld, name of var, constructor function for the reducer, any constructor params boost::python::object raw_addVariable(boost::python::tuple t, boost::python::dict kwargs) { int l=len(t); if (l<3) { throw SplitWorldException("Insufficient parameters to addVariable."); } extract<Spli...
package uk.gov.digital.ho.hocs.casework.api.dto; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import java.util.Set; @NoArgsConstructor @AllArgsConstructor @Getter public class GetCorrespondent...
/** * Generic text sign with Base64 String output * * @param data * @param flat * @return * @throws IOException * @throws SignatureException * @throws NoSuchAlgorithmException * @throws InvalidKeyException * @throws Exception */ static String signBase64Challenge(final String data, ...
// Create will ensure that a namespace for the provided handle exists. func (t *Transaction) Create(handle Handle) error { t.mutex.Lock() defer t.mutex.Unlock() err := handle.Validate(true) if err != nil { return err } if handle[0] == Local { return fmt.Errorf("namespace local.* is read only") } if t.catalo...
<gh_stars>1-10 /****************************************************************************\ * * * IFC (Iris Foundation Classes) Project * * http://github.com/haoxingeng/ifc ...
/** * Tile for the {@link BlockPurifier}.. * @author rubensworks * */ public class TilePurifier extends TankInventoryTileEntity implements CyclopsTileEntity.ITickingTile { /** * The amount of slots. */ public static final int SLOTS = 2; /** * The purify item slot. */ public ...
// NewResourceHandler creates a new resource handler. func NewResourceHandler(server *Server, router *mux.Router) *ResourceHandler { resourceHandler := &ResourceHandler{ router: router, Server: server, } router.HandleFunc("/{protocol}/{host}/{port}/", resourceHandler.getResource) router.HandleFunc("/{protocol}/...
package com.intellij.struts.dom.tiles; import com.intellij.struts.StrutsTest; import com.intellij.testFramework.TestDataPath; /** * @author <NAME> */ @TestDataPath("$CONTENT_ROOT/../testData/tiles/highlighting") public class TilesHighlightingTest extends StrutsTest { @Override protected String getBasePath() { ...
Rep. Jerrold Nadler, New York Democrat, said FBI Director James B. Comey’s 11th-hour announcements about Hillary Clinton’s emails may have cost her the election, and he called on President Obama to fire Mr. Comey immediately. “What Jim Comey did was so highly improper and wrong, from the very beginning in July,” Mr. N...
class ResponseHandler: """ Class to listen for json responses on the queue and then call registered handlers based on search patterns. This class is used by :class:`~aioharmony.client.HarmonyClient`, there is no need to use this class. The :class:`~aioharmony.client.HarmonyClient` class expos...
<filename>src/inference/src/remote_tensor.cpp<gh_stars>1-10 // Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "openvino/runtime/remote_tensor.hpp" #include "ie_ngraph_utils.hpp" #include "ie_remote_blob.hpp" namespace ov { namespace runtime { void RemoteTensor::type_che...
Three fourths of the nation’s voters don’t care. No really. They don’t. New Gallup research reveals that 75 percent of all registered voters say Mitt Romney’s personal worth of some $250 million makes “no difference” to them; this includes 89 percent of Republicans, 76 percent of independents and 62 percent of Democrat...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class JavaApplication32 { public static int n; public static String word; public static int len; public static char[] ch; public static void main(String[] args) throws IOException { Buffer...
Instance Selection for Online Automatic Post-Editing in a Multi-domain Scenario In recent years, several end-to-end online translation systems have been proposed to successfully incorporate human post-editing feedback in the translation workflow. The performance of these systems in a multi-domain translation environme...
<gh_stars>1-10 package vader import "net/http" // Middleware is a type used to chain handlers together. // // A middleware takes a handler as input and returns another handler that can wrap functionality // around the original handler type Middleware func(http.Handler) http.Handler // Chain is a convenient method to...
The Use of Botulinum Toxin in the Management of Headache Disorders. Headache disorders can be further classified as episodic (< 15 headache days per month) or chronic (≥ 15 headache days per month for more than 3 months). Chronic migraine (CM) requires that headaches occur on 15 or more days a month for more than 3 mo...
package rtpaac import ( "encoding/binary" "fmt" "math/rand" "time" "github.com/pion/rtp" ) const ( rtpVersion = 0x02 rtpPayloadMaxSize = 1460 // 1500 (mtu) - 20 (ip header) - 8 (udp header) - 12 (rtp header) ) // Encoder is a RPT/AAC encoder. type Encoder struct { payloadType uint8 clockRate ...
/** * change to the new userId for the current AccountID. Mainly use of userId change in account settings * Need to change the userID, userBareJid, accountUID; and mAccountProperties.USER_ID if Account ID changed * * @param userId new userId */ public void updateJabberAccountID(String userId) ...
<filename>denorm/cli/main.py<gh_stars>10-100 import argparse from ..version import __version__ def main(): parser = _create_parser() args = parser.parse_args() if args.command == "create-agg": from .create_agg import cli cli(args) if args.command == "create-join": from .crea...
/** * Signals to the remote side that blocks are available on this machine to fetch. */ public void signalBlocksAvailable( String[] blockIds, int[] blockSizes, long taskAttemptId, int attemptNumber, String executorId, String host, int port) { BlocksAvailable message =...
//TODO: add support for IPv6 public class TcpServerConfiguration { private final Properties properties; private TcpServerConfiguration(final Properties properties) { this.properties = properties; } public static TcpServerConfiguration configuration(final int port, final LifeCycle lifeCycle) { ...
//InitSuite performs common logic for Ginkgo's BeforeSuite func InitSuite(suiteCtx *types.SuiteContext) { logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) By("bootstrapping test environment") useCluster := true suiteCtx.TestEnv = &envtest.Environment{ UseExistingCluster: &useCluster,...
def match_one_end(sequence, reference_dict, end, hairpin_reference,max_add=3): for node in LevelOrderIter(reference_dict['{}_prime_tree'.format(end)], maxlevel=1): node.sequence = sequence for node in PreOrderIter(reference_dict['{}_prime_tree'.format(end)], maxlevel=max_add+1): if(not node.is_r...
/** * Count all changes in a method version. * * @param version Method version containing changes to be counted * @return Array containing total counts of all types of changes */ public int[] countChanges(StructureEntityVersion version) { for (SourceCodeChange change: version.getSourceCodeChanges()) { t...
Seattle is right to explore options to bring the NBA back to KeyArena. But it shouldn’t lease the venue to developers with no team in sight. First let Chris Hansen’s arena deal in Sodo expire, then wholeheartedly pursue the NBA at a better location such as KeyArena. THE plot around Seattle’s arena proposals is thicken...
Daily rainfall forecasts through a quantitative precipitation forecasting (QPF) model over Thiruvananthapuram and Madras areas for the monsoons of 1992 Quantitative precipitation forecasting (QPF) of daily rainfall of Thiruvananthapuram and Madras  for June-September and October-December respectively for the year 1992...
import string, re, sys, datetime from .core import TomlError from .utils import rfc3339_re, parse_rfc3339_re if sys.version_info[0] == 2: _chr = unichr else: _chr = chr def load(fin, translate=lambda t, x, v: v, object_pairs_hook=dict): return loads(fin.read(), translate=translate, object_pairs_hook=objec...
//Get the area code of IP func (i *IpStore) GetGeocodeByIp(ipSearch string) (uint64, error) { row, err := i.searchIpRow(ipSearch) if err != nil { return 0, err } areacode := i.getGeocodeByRow(row) codeUint64, err := strconv.ParseUint(areacode, 10, 64) if err != nil { return 0, err } return codeUint64, nil }
The effect of angiotensin receptor type 2 inhibition and estrogen on experimental traumatic brain injury Background: Estrogen interferes with renin-angiotensin system (RAS). Increasing evidence suggests that estrogen interferes with the RAS such as decreasing angiotensin receptor in the brain. Objectives: This study a...
package config import ( "testing" "github.com/stretchr/testify/require" ) func Test_ReadJSON_Success(t *testing.T) { config_object := NewEmptyConfig() config_object.ReadFromJSON("config_success.json") require.Equal(t, config_object.GetIP(), "127.0.0.1") require.Equal(t, config_object.GetTcpPort(), 100) requi...
<reponame>Jrgriss2/chi-tech #ifndef SPATIAL_DISCRETIZATION_FE_H #define SPATIAL_DISCRETIZATION_FE_H #include "ChiMath/SpatialDiscretization/spatial_discretization.h" #include "ChiMath/UnknownManager/unknown_manager.h" #include "ChiMath/SpatialDiscretization/FiniteElement/finite_element.h" //##########################...
<reponame>bunop/libplinkio<gh_stars>10-100 #include <Python.h> #include <plinkio/plinkio.h> #include "snparray.h" /** * Wrapper object for a plink file. In python it will * act as a handle to the file. */ typedef struct { PyObject_HEAD /** * The plink file. */ struct pio_file_t file; /...
/** * Combined finite element and blade momentum theory for the calculation of a blade: * - thrust * - power * - torque * * Source: Keys, Pgs 96-98; Proudy, Pg 96 * * @param/return {struct} blade parameters **/ void F_ROTOR_CALCULATION(struct blade_element_def *pBe) { double _dR, _r2R, ...
Martin O'Neill was last out of the Irish dressing-room on Tuesday night. Defeats still wound him deeply despite all his decades in the game or, more accurately, because of them. Martin O'Neill was last out of the Irish dressing-room on Tuesday night. Defeats still wound him deeply despite all his decades in the game o...
<filename>1.7.2/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHealing.java<gh_stars>0 package WayofTime.alchemicalWizardry.common.rituals; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player....
// Code generated by go-swagger; DO NOT EDIT. package inventory_in_store_pickup_api_get_pickup_locations_v1 // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "g...
/* * USB PhidgetServo driver 1.0 * * Copyright (C) 2004, 2006 Sean Young <sean@mess.org> * * This program 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 2 of the License, or * (at your ...
// Private is an xmlstream.Transformer that excludes all top level <message/> elements from // being forwarded to other Carbons-enabled resources, by adding a <private/> element // and a <no-copy/> hint. func Private(r xml.TokenReader) xml.TokenReader { return xmlstream.InsertFunc( func(start xml.StartElement, level...
/** * Utilities class containing methods for restricting {@link VariantContext} and {@link GenotypesContext} objects to a * reduced set of alleles, as well as for choosing the best set of alleles to keep and for cleaning up annotations and * genotypes after subsetting. * * @author David Benjamin &lt;davidben@broad...
Kreisel Electric, a small Austria-based startup known for their impressive electric vehicle conversions, inaugurated their new research and development center this week and with it, they unveiled a new all-electric Hummer prototype. Who best than Arnold Schwarzenegger to unveil the vehicle. The movie star and former ...
Instead, most of the news and commentary written about Amherst Uprising has focused on the group’s 11 demands. They’re what students chose to declare to the world. And they were extraordinary ill-conceived. (Most have already been rejected.) There are exceptions. The students pushed for the school to distance itself ...
<filename>service-container/src/main/java/io/zeebe/servicecontainer/ServiceGroupReference.java /* * Copyright © 2017 camunda services GmbH (<EMAIL>) * * 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 ...
export = Dtype; declare function Dtype(dtype: string): Function | void;
<gh_stars>0 /* * BayesClassifier.cpp * * Created on: Mar 25, 2016 * Author: derek */ #include "BayesClassifier.h" #include <cmath> BayesClassifier::BayesClassifier( const std::vector<CovarianceMatrix>& cmInverses, const std::vector<Decimal>& cmDeterminants, const std::vector<RowVector>& meanVectors) ...
<reponame>FullscreenSauna/Haskell<filename>generateMathEquation.hs generateMathEquation :: [Integer] -> String generateMathEquation [] = "" generateMathEquation array = foldr(\x y -> concat["(",x," + ",y,")"]) (show(last array)) (map show (init array)) generateMathEquationReversed :: [Integer] -> String generateMathEq...
/** * Created by Sylvain in 2022/01. */ @Service @Slf4j public class FetchBookService { @Autowired @Qualifier("restTemplate") private RestTemplate restTemplate; /** * set image's and text's URL for a book object * download the text to files in /books/id.txt * @param book a book object ...
package com.devy.droidipc; import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import com.devy.droidipc.LogControler.Level; @SuppressLint("NewApi") public class RemoteClientCommandLis...
import { Component, ViewChild } from '@angular/core'; import { FilePondComponent } from './modules/filepond/filepond.component'; import { FilePondOptions } from 'filepond'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { ...
package test import ( "encoding/json" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestSchemaArrayFloat(t *testing.T) { h := GetPetsIDsHandlerFunc(func(_ GetPetsIDsRequester) GetPetsIDsResponder { return GetPetsIDsResponse200JSON([]float64{0....
// GetVolumeStatus retrieves an array of replica statuses. func GetVolumeStatus(cStorVolume *apis.CStorVolume) (*apis.CVStatus, error) { statuses, err := UnixSockVar.SendCommand(util.IstgtReplicaCmd) if err != nil { glog.Errorf("Failed to list replicas.") return nil, err } stringResp := fmt.Sprintf("%s", status...
// Only prepared statements needed for the reader private static void createReaderPreparedStatements() throws SQLException { sqlIdentifierNameQuery = connection.prepareStatement(IDENTIFIER_NAME_QUERY_STATEMENT); sqlIdentifierNameInsert = connection.prepareStatement( ...
//sends message so main server knows we joined a room public boolean sendGSPJoinedRoom(int userId, int roomId) { ByteBuffer block = ByteBuffer.allocate(9); block.order(ByteOrder.LITTLE_ENDIAN); block.put((byte) 0x52); block.putInt(userId); block.putInt(roomId); byte[] array = block.array(); ByteBuffer ...
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE 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 app...
/** * called from onCreate method of Application * @param application */ public void onAppCreate(Application application){ this.application = application; for(IApplicationListener lis : applicationListeners){ lis.onProxyCreate(); } }
import numpy as np A,B,H,M = list(map(int,input().split())) alpha = 2 * np.pi * (H/12 + M/(60*12)) beta = 2 * np.pi * M/60 print(((A * np.cos(alpha) - B * np.cos(beta))**2 + (A * np.sin(alpha) - B * np.sin(beta))**2)**0.5)
// ds.h // // Generic data structures. // // Author: <NAME> <<EMAIL>> #ifndef _DS_H_ #define _DS_H_ #include <stddef.h> #include <stdint.h> typedef struct list_node_s { void *value; struct list_node_s *next; struct list_node_s *prev; } list_node_t; typedef struct list_s { list_node_t *head; list_node_t *...
/** * Truncate the data of entry to the given size * @param e Pointer to an entry * @param size new size in bytes */ static void ent_trunc(lv_mem_ent_t * e, size_t size) { #ifdef LV_ARCH_64 if(size & 0x7) { size = size & (~0x7); size += 8; } #else if(size & 0x3) { size = size & (...
/** * @author Marcelo Guimaraes */ public class ElementCopyTest { private TestObject testObject; private Function<Properties, String> property(String name) { return props -> props.getProperty(name); } @Before public void init() { testObject = new TestObject("Marcelo", "Guimaraes"); testObject...
/** * Copyright © 2019 IBM Corporation * * 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 or agr...
# -*- coding: utf-8 -*- # Copyright 2015 <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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" f...
#include<stdio.h> int main(){ long long int q,w,e,r,k; scanf("%lld %lld %lld %lld",&q,&w,&e,&r); k=q; if(k<w)k=w; if(k<e)k=e; if(k<r)k=r; if(k-q!=0)printf("%lld ",k-q); if(k-w!=0)printf("%lld ",k-w); if(k-e!=0)printf("%lld ",k-e); if(k-r!=0)printf("%lld ",k-r); }
<filename>BFS/743. Network Delay Time.cpp /* 743. Network Delay Time Time Space Difficulty O(|E| + |V|log|V|) O(|E| + |V|) Medium There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the...
def find_idx_match(simple_vertices, complex_vertices): ''' Thanks to juhuntenburg. Functions taken from https://github.com/juhuntenburg/brainsurfacescripts Finds those points on the complex mesh that correspoind best to the simple mesh while forcing a one-to-one mapping ''' # make array f...
def turn_end_all(skills: Iterable[Skill], unit: ActiveUnit, arena: ActiveArena) -> List[Dict]: return list(filter(_exists, (turn_end[s.turn_end_effect](arena, unit) for s in skills)))
{-# LANGUAGE OverloadedStrings #-} module Client where import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy.Char8 as L8 import Network.HTTP.Simple import Solver import Entities import System.Console.ANSI attack :: String -> String -> IO () attack gameName playerName = do putStrLn "~~~~...
CLIMATE POLICIES: CHALLENGES, OBSTACLES AND TOOLS A four-pronged approach to climate policy is presented consisting of carbon pricing, subsidies for renewable energies, transformative green investments and climate finance and engendering flywheel effects. Then, a variety of societal and political challenges and obstac...
<reponame>mcxiaoke/python-labs #!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: mcxiaoke # @Date: 2015-08-09 16:04:45 #from tkinter.filedialog import askopenfilename #from tkinter.colorchooser import askcolor #from tkinter.messagebox import askquestion, showerror #from tkinter.simpledialog import askfloat fr...
import { Column, Entity, OneToMany } from 'typeorm'; import { CascadeDeleteEntity } from '../base.entity'; import { SubsectionEntity } from '../sub-sections/sub-section.entity'; @Entity('section') export class SectionEntity extends CascadeDeleteEntity { @Column() public name: string; @Column({ nullable: true })...
<gh_stars>0 package org.continuity.api.entities.links; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonIgnore; public abstract class AbstractLinks<T extends AbstractLinks<T>> { @JsonBackReference private final LinkExchangeModel parent; public AbstractLinks(L...
// NewMessageValue create a new object func NewMessageValue(protocol SubProtocol, msgID, originalID MsgID, timestamp int64, payload []byte) *MessageValue { msg := NewLiteMessageValue(protocol, msgID, originalID, timestamp) msg.SetPayload(payload) return msg }
#include<bits/stdc++.h> #ifdef LOCAL FILE* FP = freopen("text.in", "r", stdin); #endif using namespace std; /* 使用了比较串与前缀一样的特点, 通过若比较串优更新维护前缀范围,劣则退出,这个平则比下一个的完美衔接, 实现非常简单 */ int n, k,p=1;//p:维护的前缀有效范围[0,p) char s[500005]; signed main() { scanf("%d%d%s", &n, &k,s); for (int i = 0; i < n; i++) { if (s[...
Most comprehensive stretching manual I haven’t encountered any source on this subject as broad, accessible, and easily applied as Bob Anderson’s classic Stretching, a patient and friendly stand-in for my eight-grade P.E. teacher. The 30th anniversary edition of this guidebook came out recently, with even more stretch...
#ifndef _INCLUDED_ASW_WEAPON_AMMO_SATCHEL_H #define _INCLUDED_ASW_WEAPON_AMMO_SATCHEL_H #pragma once #ifdef CLIENT_DLL #include "c_asw_weapon.h" #define CASW_Weapon_Ammo_Satchel C_ASW_Weapon_Ammo_Satchel #define CASW_Weapon C_ASW_Weapon #define CASW_Marine C_ASW_Marine #else #include "asw_weapon.h" #include "npc_combi...
<reponame>jantap/rsmixer mod actor_type; mod instance; mod item; mod message_queue; mod registered_actors; mod status; use std::{pin::Pin, sync::Arc}; pub use actor_type::ActorType; use async_trait::async_trait; use futures::Future; pub use instance::ActorInstance; pub use item::ActorItem; pub use message_queue::Mess...