content
stringlengths
10
4.9M
import { Clipboard } from '@angular/cdk/clipboard'; import { Component, EventEmitter, Input, OnInit, Output, OnDestroy, TemplateRef } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { NbGlobalPhysicalPosition, NbToastrService, NbDialogRef, NbDialogService } from '@nebular/theme'; import {...
#ifndef WORK_QUEUE_HPP_ #define WORK_QUEUE_HPP_ #include "spmc.hpp" #include <thread> #include <vector> //Uses a single queue per thread //but upon failure to get work //a thread goes and looks for other threads //while possible to have a single wait free queue //will pay the costs of contention. Or at least we will ...
import { CanActivate, ExecutionContext, InternalServerErrorException, } from '@nestjs/common'; import { StrategyRegistry } from './strategy.registry'; export const AuthGuard = (name: string) => { return class AuthGuard implements CanActivate { public async canActivate(context: ExecutionContext): Promise<bo...
<filename>src/module.ts export * from "./BigMap"; export * from "./BigSet"; export * from "./BigWeakMap"; export * from "./BigWeakSet";
def updateConfigPanel(self): self.configPanel.delete('1.0', END) self.writeToLog("Writing Install Configuration to info panel...\n") if self.install_config is not None: self.writeToConfigPanel("Currently Loaded Install Configuration:\n\n") self.writeToConfigPanel("Install...
<filename>src/acme/mod.rs /// Certificate Authority functionality pub mod ca; /// Challenge management, including supervisory handlers. pub mod challenge; /// Types for managing DNS records pub mod dns; /// ACME HTTP handlers pub mod handlers; /// ACME JOSE implementation pub mod jose; use std::{collections::HashSet, ...
// compares two slices of strings and returns true if they are same, returns false otherwise. // The elements in the slices don't have to be in the same order for them to be equal. func cmpSlices(s1, s2 []string) bool { equal := (len(s1) == len(s2)) for i := 0; equal && i < len(s1); i++ { found := false for j := ...
This product defies corporate ideas about what a RPG should be, and in doing so, became very important, not just to the users who love this setting , but it pushed RPG design into a new direction. Dark Sun breaks many of the traditional rules and ideas that governed RPG design at the time : it ignored the formula for a...
The UK will spend £180 million of taxpayers’ money over five years in Africa in an effort to convince migrants to stay where they are, reintegrate, or “return home”. The International Development Secretary Penny Mordaunt made the announcement on what has been called International Migrants Day, claiming the “UK aid wil...
/** * Helper for testing with an operation processor * * @author bratseth */ public class OperationProcessorTester { private final Endpoint endpoint; private final int clusterId = 0; private final ManualClock clock; private final TestResultCallback resultCallback; private final OperationProcess...
// Main lexer. Lexes a string from a given point. int lex(struct Token *reading, char string[], size_t *c) { while (1) { if (string[*c] == '`') { (*c)++; while (string[*c] != '`') { putchar(string[*c]); (*c)++; } putchar('\n'); (*c)++; } else if (string[*c] == '/' && string[*c + 1] == '/') {...
<reponame>PlutoDAO/simple-stellar-signer import { xBullWalletConnect } from '@creit-tech/xbull-wallet-connect'; import type { Transaction } from 'stellar-sdk'; import { xBull } from '../../../assets'; import { CURRENT_STELLAR_NETWORK, StellarNetwork } from '../../stellar/StellarNetwork'; import type IStorage from '../...
def observable_product(*observables): res_obs = {} for obs in observables: for k in obs: if k in res_obs: if obs[k] != res_obs[k]: return None else: res_obs[k] = obs[k] return res_obs
EU Referendum: the myth of preventing war 09/05/2016 Follow @eureferendum With Mr Cameron claiming on this of all days, "Europe Day", that leaving the EU would bring us closer to war, all he is actually doing is repeating the most insidious myth of them all in relation to the European Union - that this monstrous cons...
<reponame>oleg-nazarov/cpp-yandex-praktikum<filename>transport_catalogue/svg/__tests__/svg__tests.cpp #define _USE_MATH_DEFINES #include <cmath> #include <iterator> #include <sstream> #include <string> #include "../../../helpers/run_test.h" #include "../svg.h" using namespace std::literals; using namespace svg; Poly...
<filename>src/qbl_xml.rs use aes::cipher::{BlockDecryptMut, BlockEncryptMut, KeyIvInit}; use hex_literal::hex; pub fn qbl_to_xml(qbl: &[u8]) -> Vec<u8> { let crypt = qbl_to_crypt(qbl); let lenxml = crypt_to_lenxml(&crypt); lenxml_to_xml(&lenxml) } pub fn xml_to_qbl(xml: &[u8]) -> Vec<u8> { let lenxml ...
/* Copyright © 2021 Compose Generator Contributors All rights reserved. */ package test
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not u...
// LossFunctions.h // Here we define the different loss functions that can be used // with the BDT system. #ifndef L1Trigger_L1TMuonEndCap_emtf_LossFunctions #define L1Trigger_L1TMuonEndCap_emtf_LossFunctions #include "Event.h" #include <string> #include <algorithm> #include <cmath> // ==============================...
def compute(self, **kwargs): districts = [] if 'list' in kwargs: arg_list = kwargs['list'] filtered = filter(lambda x: not x is None, arg_list) if len(filtered) == 0: return reduced = reduce(lambda x, y: x + y, filtered) self.re...
Insulin sensitivity and obstructive sleep apnea in adolescents with polycystic ovary syndrome. BACKGROUND Polycystic ovary syndrome (PCOS) in adults is linked with insulin resistance (IR) and obstructive sleep apnea (OSA). However, less is known about these associations in adolescents. METHODS We studied 3 groups of...
Antibody and cytotoxic T lymphocyte responses of humans to live and inactivated influenza vaccines. The antibody and HLA-restricted virus-specific cytotoxic T lymphocyte (CTL) responses to influenza vaccine of 36 volunteers were analysed. Three vaccines were used: a live attenuated, and two types of inactivated, a who...
ASL2 Ro8 Preview Pt1- Bisu to BeSt Sea and hero? Text by BigFan Graphics by v1 All of TBLS have made it safely into the Ro8 with most taking their respective groups in 2-0 fashion even when facing tough opponents such as hero, last and Movie. Now that we are at the Ro8, this is where the real fun begins. We have a pre...
/* $NetBSD: t_nanosleep.c,v 1.3 2013/03/31 16:47:16 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME>. * * Redistribution and use in source and binary forms, with or without * mod...
def _get_fetch_all_method(cls): return cls.fetch_all_api_method or f"{cls._get_name_plural()}.list"
Inside of every critic there is a regretful fan struggling against the permanence of publicly stated professional opinions. For all the differences that supposedly exist between critics and “regular people,” the only one that really matters is that critics are required by paycheck to take a snapshot of their feelings a...
Brachioradial pruritus in a patient with metastatic breast cancer to her cervical spine BRP: brachioradial pruritus MRI: magnetic resonance imaging UV: ultraviolet INTRODUCTION Brachioradial pruritus (BRP) is a localized neuropathic condition of aberrant sensation that occurs on the dorsolateral upper extremities. BRP...
// Copyright 2018 by <NAME> // // https://github.com/martinmoene/kalman-estimator // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef DSP_FILTER_HPP_INCLUDED #define DSP_FILTER_HPP_INCLUDED #include "dsp/biquad...
<gh_stars>0 export interface SavePlayerResponse { id: string; error: string; }
A Charge Domain P-8T SRAM Compute-In-Memory with Low-Cost DAC/ADC Operation for 4-bit Input Processing This paper presents a low cost PMOS-based 8T (P-8T) SRAM Compute-In-Memory (CIM) architecture that efficiently per-forms the multiply-accumulate (MAC) operations between 4-bit input activations and 8-bit weights. Fir...
<reponame>inawrath/walmart-frontend import React from "react" import { render } from "@testing-library/react" import Layout from "../layout" test("Layout with text", () => { const { getByText } = render(<Layout>Testing</Layout>) expect(getByText("Testing")).toContainHTML("<main>Testing</main>") })
//View Holder Class public class BusListAdapterViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { public final TextView mBusListTextView; public final TextView mBusDirTextView; CircularProgressButton follow_cbp; public BusListAdapterViewHolder(View view) { ...
/** * close tensors to release memory used by them (to be used when try catch statement can't be used) */ private static void closeTensors(final Collection<Tensor<?>> ts) { for (final Tensor<?> t : ts) { try { t.close(); } catch (final Exception e) { System.err...
<filename>JZ_Offer/ms_60/m50_test.go package ms_60 import ( "github.com/stretchr/testify/assert" "testing" ) // 面试题50. 第一个只出现一次的字符 func firstUniqChar(s string) byte { temp := make(map[byte]int) for i := range s { temp[s[i]]++ } // map 无序,所以又遍历一遍字符串 for i := range s { if temp[s[i]] == 1 { return s[i]...
def checklinkfunc(link): key = Settings().SECRETS['GOOGLE_SAFE_BROWSING_API_KEY'] checker = SafeBrowsing(f"{key}") regex = r"{regex}".format(regex=Settings().SECRETS['VALID_LINK_REGEX']) url = findall(regex, link) try: link = url[0][0] response = checker.lookup_urls([link]) i...
/** * @brief Token credential. */ class TokenCredential { public: virtual AccessToken GetToken(Context const& context, std::vector<std::string> const& scopes) const = 0; virtual ~TokenCredential() = default; protected: TokenCredential() {} private: TokenCredential(TokenCredential con...
<reponame>friendlyanon/jluna // // This file contains the code of the section on manual implementation of usertypes in docs/manual.md // #include <jluna.hpp> /// cpp-side implementation of frogs and tadpoles class Frog { public: struct Tadpole { std::string _name; Tadpole...
/** * create a time point with a clock or a string */ TEST(datetime, time_point_with_clock_string){ ptime pt{second_clock::universal_time()}; cout << pt.date() << endl; cout<< pt.time_of_day() << endl; pt = from_iso_string("20220103T213440"); cout << pt.date() << endl; cout << pt.time_of_day()...
package org.motechproject.openmrs.ws; import java.net.URI; import java.net.URISyntaxException; import org.motechproject.MotechException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org...
/** * Inform about a JSP execution where the execution time is known * * @param dTime */ public static void addJSPMeasurement(final double dTime) { synchronized (oStatsLock) { if (iRequests + jspMeasurements == 0) { dMinTime = dMaxTime = dTime; } else { dMinTime = Math.min(dMinTime, dTime); ...
/* * Copyright (c) 2019 - 2021 Geode-solutions * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, mer...
/* Copyright 2018 The TensorFlow Authors. 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 Unless required by applicable ...
// newTemplateConfig returns a base template for running a container. // // It uses a network strategy of just setting a loopback interface // and the default setup for devices. // // If p is nil, a default container is created. func newTemplateConfig(t *testing.T, p *tParam) *configs.Config { var allowedDevices []*de...
North Korea has tried warnings of nuclear attack and racist diatribes to criticize U.S. President Barack Obama. Now it's turning to Abraham Lincoln. North Korea's state media have constructed an imaginary letter from the 16th U.S. president that attacks Obama's "deception" over Pyongyang's pursuit of nuclear weapons. ...
def _propagate(self, dest, path, stamp, dirname=os.path.dirname): while path != "": oldval = dest.get(path, -1) if stamp < oldval: return dest[path] = stamp path = dirname(path)
<reponame>wuyuanqing527/FireHelper package com.wyq.firehelper.ui.layout.pullextviewlayout; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.Scroller; imp...
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 修改查询口碑零售供应商和商户的仓库信息 * * @author <NAME> * @since 1.0, 2018-09-17 09:53:53 */ public class KoubeiRetailWmsWarehouseModifyModel extends AlipayObject { private static final long se...
from litex.soc.cores.cpu.neorv32.core import NEORV32
The total apprehensions of migrants along the U.S/Mexico border increased 33 percent over the previous year’s numbers, a new report from U.S. Customs and Border Protection revealed. While the apprehension numbers reported in January decreased slightly from December 2016, the comparison to the prior year’s numbers show...
<filename>app/src/main/java/com/google/firebase/udacity/friendlychat/messages/ActivityMessages.java package com.google.firebase.udacity.friendlychat.messages; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; import android.support.v4.app.FragmentTransaction; imp...
<filename>warn.go<gh_stars>100-1000 package main import ( "fmt" "log" "sync" ) type warningCollector struct { mu sync.Mutex warnings []string } func (w *warningCollector) warn(s string) { w.mu.Lock() w.warnings = append(w.warnings, s) w.mu.Unlock() log.Printf("WARNING: %s", s) } func (w *warningColle...
Decidability of finding the fastest Turing machine to compute a function with a finite domain Input Output 1 1 2 4 3 9 4 16 Let's say we have some (total) function \(f\), defined on some finite domain \(A\): $$ f : A \mapsto B $$ For example, f might be a square function defined on \( \{1, 2, 3, 4\} \):The question n...
antenna = [] antenna.append(int(input())) antenna.append(int(input())) antenna.append(int(input())) antenna.append(int(input())) antenna.append(int(input())) k = int(input()) flg = 'Yay!' for i in range(0, len(antenna)): for j in range(i+1, len(antenna)): if (antenna[j]-antenna[i])>k: flg = ':(' brea...
<reponame>astrophysicist87/PHripser<gh_stars>0 /* Ripser: a lean C++ code for computation of Vietoris-Rips persistence barcodes MIT License Copyright (c) 2015–2021 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softw...
<reponame>RollingArray/newsent-client-app import { PageInfoTitleModule } from '../page-info-title/page-info-title.component.module'; import { NgModule } from "@angular/core"; import { CommonModule } from "@angular/common"; import { SharedModule } from "src/app/shared/module/shared.module"; import { IonicModule } from "...
<reponame>WanglinLi595/OpenCV_Image_Process_Study<gh_stars>0 #!/usr/bin/env python # coding=utf-8 ''' @描述: @版本: V1_0 @作者: LiWanglin @创建时间: Do not edit @最后编辑人: LiWanglin @最后编辑时间: Do not Edit ''' #!/usr/bin/env python # coding=utf-8 ''' @描述: 中值滤波 @版本: V1_0 @作者: LiWanglin @创建时间: 2020.02.12 @最后编辑人: LiWanglin @最后编辑时间: 2020...
We’re outnumbered. Plain as day. And they’re not going away. The estimated ratio of insects to humans is 200 million to one, say Iowa State University entomologists Larry Pedigo and Marlin Rice in their newly published (sixth edition) textbook, Entomology and Pest Management. Rice is the 2009 president of the Entomol...
/** * A dialog which uses fingerprint APIs to authenticate the user, and falls back to password * authentication if fingerprint is not available. */ @SuppressWarnings("ResourceType") public class FingerprintDialog extends DialogFragment implements TextView.OnEditorActionListener, DigitusCallback { publi...
// Library object that contains external method definitions. If the list of external calls // contains any null handles during execution, the library will attempt to load a // dynamic library file at specified path. // Symbols are loaded lazily at runtime unless specified otherwise. class library : public handle<class ...
Attack-induced changes in response to decapitation of plasma catecholamines of victim mice. Male mice of 3 different strains (NIH, C57BR/cdJ and A/HeJ) were exposed individuality (victims) to attack by trained fighter Swiss Webster mice for 10 minutes daily for various numbers of days. Immediately after the last attac...
/* ****************************************************** */ /* Main Entrypoint - Draw contents of Outliner editor */ void draw_outliner(const bContext *C) { Main *mainvar = CTX_data_main(C); Scene *scene = CTX_data_scene(C); ARegion *ar = CTX_wm_region(C); View2D *v2d = &ar->v2d; SpaceOops *soops = CTX_wm_space_...
#ifndef SYSTHREAD_H #define SYSTHREAD_H #include <QThread> #include <QApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include <QWindow> #include <QObject> #include <QDebug> #include <QX11Info> #include <QQuickImageProvider> #include <QList> #include <QVariant> #include <QMetaObject> #include <QHa...
// Make copy of frontend keys to prevent itterator invalidation. // Requires lock on c.mu. func (c *Cache) keys(frontend int) []Key { m := c.frontends[frontend] keys := make([]Key, 0, len(m)) for k := range m { keys = append(keys, k) } return keys }
n = int(input()) for _ in range(n): s = input() lens = len(s) mat = set(map(ord,(i for i in s))) if len(mat)==lens and max(mat)-min(mat)==lens-1: print("Yes") else: print("No")
// appendString appends to slice all strings from v and returns it. func appendString(slice []string, v reflect.Value) []string { k := v.Kind() if k == reflect.String { return append(slice, v.String()) } if (k == reflect.Slice || k == reflect.Array) && v.Type().Elem().Kind() == reflect.String { for i := 0; i < ...
def __checkCoords(self, ri_coord, coord): diff = ri_coord.reshape(-1, 2) - coord.reshape(2) if (np.abs(np.min(diff)) < self.tile_scope) & (np.abs(np.max(diff)) < self.tile_scope): coord_ls1 = ri_coord.reshape(-1, 2).tolist() coord_ls2 = coord.reshape(2).tolist() if co...
def _CleanupModules(self): dirty = set() for full_name, module in sys.modules.iteritems(): if full_name in self._saved_sys_modules: sys.modules[full_name] = self._saved_sys_modules[full_name] continue if (hasattr(module, '__file__') and module.__file__.startswith(_PYTHON_LI...
package com.prowidesoftware.swift.model.mx.dic; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for AgreementFramework1Code. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType ...
#include <bits/stdc++.h> using namespace std; #define sz(x) ((int) (x).size()) #define forn(i,n) for (int i = 0; i < int(n); ++i) typedef long long ll; typedef long long i64; typedef long double ld; const int inf = int(1e9) + int(1e5); const ll infl = ll(2e18) + ll(1e10); const int maxn = 1030; int cnt[maxn]; int cnt2...
<reponame>vnherdeiro/electron-hearbeat-monitor import { Component, ViewChild, ElementRef } from '@angular/core'; import { Subscription, fromEvent, Observable } from 'rxjs'; import { filter, map, pairwise, scan, bufferCount, share } from 'rxjs/operators'; import * as _ from 'lodash'; @Component({ selector: 'app-root...
#include<bits/stdc++.h> using namespace std; int main() { string sub[300],s; int n,sn=-1; cin>>n>>s; for(int i=0;i<300;i++)sub[i] = ""; for(int i=0,j=0;i<n;i++){ if(s[i]>='A' && s[i]<='Z' && i!=0){ if(s[i-1]>='A' && s[i-1]<='Z'){ continue; } j++; sn = j+1; continue; } if(s...
<reponame>sgsellan/gpytoolbox import numpy as np from scipy.sparse import csr_matrix from . subdivide_quad import subdivide_quad def initialize_quadtree(P,max_depth=8,min_depth=1,graded=False,vmin=None,vmax=None): # Builds an adaptatively refined (optionally graded) quadtree for # prototyping on adaptative ...
class ReversiView: ''' Creates window with the reversi board and controls the game using gui. ''' def __init__(self, boardSize=8, w=850, h=410): ''' :param w: width of the window :param h: height of the window ''' self.root = Tk() self.boardSiz...
With Prime Minister Narendra Modi declaring war against black money, several ways are being devised by the corrupt to desperately save their illegal wealth. Many are choosing bank accounts of unsuspecting poor families to stash away their illegal wealth before the December deadline. But, a poor family in Kolkata has s...
/*! * @author electricessence / https://github.com/electricessence/ * Licensing: MIT */ import {Func} from "./FunctionTypes"; import Lazy from "./Lazy"; export default class ResettableLazy<T> extends Lazy<T> { constructor(valueFactory:Func<T>, trapExceptions:boolean = false) { super(valueFactory, trapException...
// FileSize returns the size of a file func FileSize(filename string) (int, error) { f, err := os.Open(filename) if err != nil { return -1, err } defer f.Close() fi, err := f.Stat() if err != nil { return -1, err } size := int(fi.Size()) return size, nil }
// GetPersistent returns a single instance for the specific store func GetPersistent(dbPath string, refreshDb bool) *Persistent { boltMapMx.RLock() if b, ok := boltMap[dbPath]; ok { boltMapMx.RUnlock() return b } boltMapMx.RUnlock() boltMapMx.Lock() defer boltMapMx.Unlock() if b, ok := boltMap[dbPath]; ok { ...
<filename>modules/hub/src/vendor/connext/lib/getExchangeRates.ts import { ExchangeRates } from '../state/ConnextState/ExchangeRates' import { ConnextState } from '../state/store' export const GET_EXCHANGE_RATES_ERROR = 'No exchange rates are set' export default function getExchangeRates(state: ConnextState): Exchang...
package metrics import ( "github.com/rcrowley/go-metrics" ) const ( sdDropped = "statsd.calls.dropped" sdFlushTime = "statsd.time.emit" sdQueueSize = "statsd.size.queue" ) // metricsCache keeps metrics.Meter and metrics.Timer to aggregate delayed calls before flushing them type metricsCache struct { data ...
Characterization of the Infectious Unit for Man of Two Respiratory Viruses 1 We have previously reported 50% human infectious doses (HID50) of adenovirus, type 4 (adeno 4), and Coxsackie virus A, type 21 (A21) (1, 2). The HID50) were determined in normal volunteers and expressed as 50% tissue culture infectious doses ...
The hospital-physician relationship: past, present, and future. The traditional hospital-physician relationship in the United States was an implicit symbiotic collaboration sheltered by financial success. The health care economic challenges of the 1980s and 1990s unmasked the weaknesses of this relationship as hospita...
All available police cars rushed to the carnival in Jersey City's Pershing Field when fights broke out among juveniles Sunday evening, officials said today. At about 7:20 p.m,. an officer patrolling the carnival responded to a street fight at the corner of Manhattan and Central avenues but as he attempted to break up ...
/** * @file lliohttpserver.h * @brief Declaration of function for creating an HTTP wire server * @see LLIOServerSocket, LLPumpIO * * $LicenseInfo:firstyear=2005&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * * This library is free software; you can redistri...
def makeShape(turt, side_amount): side_counter = side_amount while side_counter > 0: turt.forward(100) turt.left(360/side_amount) side_counter -= 1
/* rescoff.c -- read and write resources in Windows COFF files. Copyright (C) 1997-2017 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Rewritten by Kai Tietz, Onevision. This file is part of GNU Binutils. This program is free software; you can redistribute it and/or modify ...
def extract_event_names_descriptions_updater(results): events = results.find_all('h3') descriptions = results.find_all('p') event_names = list(map(lambda event: event.text.split('. ')[-1], events)) descriptions = list(map(lambda description: description.text, description...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define oset tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> int main(){ int n, m, sm = 0; cin >> n >> m; vec...
When instructions don't help: Knowing the optimal strategy facilitates rule-based but not information-integration category learning. Providing verbal or written instructions on how to perform optimally in a task is one of the most common ways to teach beginners. This practice is so widely accepted that scholarship pri...
Towards 100 GbE FPGA-Based Flow Monitoring This paper explores the problem of flow metering in 100 GbE links, presenting a flow exporter architecture based on a FPGA acceleration card using only on-chip memory. Peak performance without packet sampling even at the maximum packet rate is assured and means to avoid data ...
// $Id$ /************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contr...
<filename>robot-gitee-framework/handlers.go package framework import ( "github.com/opensourceways/go-gitee/gitee" "github.com/sirupsen/logrus" "github.com/opensourceways/community-robot-lib/config" ) // IssueHandler defines the function contract for a gitee.IssueEvent handler. type IssueHandler func(e *gitee.Issu...
// Constructor /** * @param id ID of the new body */ Body::Body(bodyindex id) : mID(id), mIsAlreadyInIsland(false), mIsAllowedToSleep(true), mIsActive(true), mIsSleeping(false), mSleepTime(0), mUserData(nullptr) { #ifdef IS_LOGGING_ACTIVE mLogger = nullptr; #endif }
import { connect } from 'preact-redux'; import App from './app.component'; import { createChangePage, createChangeScreenSize } from './data/page-config/actions'; import { IState } from './data/'; import { filterAccounts } from '../utils/blockchain/utils'; const mapStateToProps = (state: IState, ownProps) => { cons...
/** * @param pessoa Objeto da classe Pessoa a ser convertido para ContentValues * @return Retorna um objeto do tipo ContentValues, com os dados da Pessoa */ private ContentValues preencherContentValues(Pessoa pessoa) { ContentValues values = new ContentValues(); values.put(Pessoa.NOME, pe...
pub mod address; pub use address::{AddressHeader, AddressMessage, AddressMessageBuffer, ADDRESS_HEADER_LEN}; pub mod link; pub use link::{LinkHeader, LinkMessage, LinkMessageBuffer, LINK_HEADER_LEN}; pub mod neighbour; pub use neighbour::{ NeighbourHeader, NeighbourMessage, NeighbourMessageBuffer, NEIGHBOUR_HEADE...
/** * An elasticsearch implementation of a service mapping storage. * * @author eric.wittmann@redhat.com */ public class ESServiceMappingStorage implements ServiceMappingStorage { private Map<String, String> config; private JestClient esClient; /** * Constructor. * @param esConfig */ ...
Luke Sharrett/Bloomberg via Getty Images Vietnam War-era M16 rifles displayed at a vendor's booth during the Knob Creek Machine Gun Shoot in West Point, Kentucky, on Oct. 9, 2015. A Texas man who sued the federal government because it wouldn’t approve his application to manufacture a machine gun doesn’t have a constit...
/* Copyright (c) Microsoft Corporation 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 THIS CODE IS PROVIDED *AS IS* BASIS, W...
//////////////////////////////////////// // CalcCircleIndex /*! Calculate the circle of player indexes // \param int* paPlayerDeck : result circle */ void cPlayersOnTable::CalcCircleIndex(int* paPlayerDeck) { ASSERT(paPlayerDeck); paPlayerDeck[0] = m_lCurrent; int k = 1; while(k < m_lNumPlayers) ...
import { makeCommand, Parsers } from "../../dist"; const cmd = makeCommand("hello", { description: "Send a hello message to either a user (in DM) or in a channel.", args: { where: { parser: Parsers.union(Parsers.user.discriminate("user"), Parsers.channel("text").discriminate("channel")), ...