content
stringlengths
10
4.9M
// automaticModeButtonImage creates the image of the "automatic mode" button. func (gui *GUI) automaticModeButtonImage() *ebiten.Image { buttonSize := gui.visualization.buttonSize borderedImage, _ := ebiten.NewImage(buttonSize, buttonSize, ebiten.FilterDefault) _ = borderedImage.Fill(gui.visualization.borderColor) ...
Potential application of compliance constants in predicting the mass spectral fragmentation of metabolites. RATIONALE Metabolomics is a qualitative and quantitative measurement of the metabolite content of any biological system under a given physiological status. Due to the chemically diverse nature of these samples, ...
<filename>src/app/store/rtl.reducers.ts<gh_stars>100-1000 import { createReducer, on } from '@ngrx/store'; import { initRootState } from './rtl.state'; import { resetRootStore, setNodeData, setRTLConfig, setSelectedNode, updateRootAPICallStatus, updateRootNodeSettings } from './rtl.actions'; import { ServicesEnum } fr...
def _de_core( adata, model_fn, groupby, group1, group2, idx1, idx2, all_stats, all_stats_fn, col_names, mode, batchid1, batchid2, delta, batch_correction, fdr, **kwargs ): if group1 is None and idx1 is None: group1 = adata.obs[groupby].cat....
/// Forces the config to read the underlying file. /// /// Note that this is normally called by the framework and should not be invoked manually. pub async fn load(&self) -> anyhow::Result<()> { log::info!("Loading config file {}...", &self.filename); if let Ok(metadata) = tokio::fs::metadata(&self.file...
<filename>packages/authentication/src/services/token.service.ts import {UserProfile} from '../types'; export interface TokenService { verifyToken(token: string): Promise<UserProfile>; generateToken(userProfile: UserProfile): Promise<string>; }
<reponame>HieuLsw/blobjob.editor<filename>libs/kytten/override.py<gh_stars>0 # kytten/override.py # Copyrighted (C) 2009 by Conrad "Lynx" Wong import pyglet KYTTEN_LAYOUT_GROUPS = {} KYTTEN_LAYOUT_GROUP_REFCOUNTS = {} def GetKyttenLayoutGroups(group): if not KYTTEN_LAYOUT_GROUPS.has_key(group): ...
# coding=gbk import cv2 import Character from tqdm import tqdm import Dict # ݻҶȱȽͼƬhash def dHash(img1, img2, no): # noֵΪͣ0ͱȽϣҲ½ṹֺȫΧṹ1ҽṹ2½ṹ3ҽṹ img1 = cv2.resize(img1, (12, 12), interpolation=cv2.INTER_CUBIC) img2 = cv2.resize(img2, (12, 12), interpolation=cv2.INTER_CUBIC) gray1 = cv2.cvtColor(img1, c...
/// Class representing a convex hull. class ConvexHull { public: ConvexHull(); ConvexHull(const ConvexHull &other); @param vertices [in] A pointer to the buffer containing the vertex data. @param vertexCount [in] The number of vertices. @param indices [in] A poi...
// SPDX-License-Identifier: GPL-2.0 /* * fs/proc/kcore.c kernel ELF core dumper * * Modelled on fs/exec.c:aout_core_dump() * Jeremy Fitzhardinge <jeremy@sw.oz.au> * ELF version written by David Howells <David.Howells@nexor.co.uk> * Modified and incorporated into 2.3.x by Tigran Aivazian <tigran@veritas.com> * Su...
// Init init rabbitmq broker with config func Init(config *Config) { if config != nil { defaultConfig = config } }
import { h, createFragment } from "@virtualstate/fringe"; import { extendedIterable as i } from "iterable"; function *source(): Iterable<number> { yield 1; yield 2; yield 3; yield 4; yield 5; } function Iterable() { return ( <> { i(source()) .skip(1) .take(3) ...
/** * Contains information about searched entities and searched page {@link QueryKey} */ public class SearchResult implements Serializable { private static final long serialVersionUID = -7860852850200335906L; protected String searchTerm; protected QueryKey queryKey; protected Map<EntityInfo, SearchRe...
def eval_Ws(self, b): self.solve(b) t = time.time() Ws = np.einsum('ij,ji', self.T, (self.dm[0]+self.dm[1])) if self.Smnt is None: Ws += np.einsum('ij,ji', self.V, (self.dm[0]+self.dm[1]-self.dm_tar[0]-self.dm_tar[1])) Ws += np.einsum('ij,ji', self.V0[0], (self.dm...
/** * Class description. * * @author <a href="mailto:vmfo@xpand-it.com">vmfo</a> * @version $Revision: 666 $ * */ public class SplashScreen extends Activity { /** The time splash screen. */ public static int TIME_SPLASH_SCREEN = 2000; private static PushManager pushManager; @Override ...
/** Read Private key into EVP_PKEY structure @param [in] input_string Content of private key file. @returns Handle to EVP_PKEY structure. Assumption : Caller will free EVP_PKEY object */ static EVP_PKEY *x509_key_read(const Sql_string_t &input_string) { EVP_PKEY *pkey = nullptr; RSA *rsa = nullptr; if ...
# -*- coding: utf-8 -*- #================================================================================ # Copyright (c) 2014-2015 <NAME>, <NAME> # Distributed under the MIT License. # (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) #=======================================================...
There has been an immense amount of buzz around Summit Entertainment’s latest release, La La Land. The film was highly anticipated and after watching it this past weekend, I can see why. Here’s what you need to know, with no spoilers. The film cleaned out at the 74th Annual Golden Globes winning all seven of the categ...
// Copyright 2019 Istio Authors // // 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 i...
<filename>runtime/libupc/smp/upc_sysdep.h /*===-- upc_sysdep.h - UPC Runtime Support Library -----------------------=== |* |* The LLVM Compiler Infrastructure |* |* Copyright 2012-2014, Intrepid Technology, Inc. All rights reserved. |* This file is distributed under a BSD-style Open Source License....
// Enable SPI hardware and set up protocol details: void LPD8806::startSPI(void) { this->spi = new SPI(this->datapin, MICROBIT_PIN_P14, this->clkpin); this->spi->format(8,0); this->spi->frequency(10000); for(uint16_t i=((this->numLEDs+31)/32); i>0; i--) this->spi_out(0); }
Density distribution of a dust cloud in three-dimensional complex plasmas. We propose a method of determination of the dust particle spatial distribution in dust clouds that form in three-dimensional (3D) complex plasmas under microgravity conditions. The method utilizes the data obtained during the 3D scanning of a c...
/* no-alloc / no-fill path, meant to be safe outside of kernel lock */ boolean pagecache_map_page_if_filled(pagecache_node pn, u64 node_offset, u64 vaddr, pageflags flags) { boolean mapped = false; pagecache_lock_node(pn); pagecache_page pp = page_lookup_nodelocked(pn, node_offset >> pn->pv->pc->page_order)...
/** * 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 not...
<reponame>fiiztax/fiiz-tax-ui export default class FiiTax { name: string; transactionId: string; totalTransactionIn: number; totalTransactionOut: number; emolumentosFee: number; fixedTax: number; irrffee: number; liquidacaoFee: number; totalProfitPercentage: number; totalProfitVa...
OX40 Agonists and Combination Immunotherapy: Putting the Pedal to the Metal Recent studies have highlighted the therapeutic efficacy of immunotherapy, a class of cancer treatments that utilize the patient’s own immune system to destroy cancerous cells. Within a tumor the presence of a family of negative regulatory mol...
def make_public(self, trans, library): trans.app.security_agent.make_library_public(library) return self.is_public(trans, library)
Rodney Gedda Rodney Gedda is the former deputy editor of CIO and former editor of Techworld. I couldn't help think that question this morning when the news came through from the US that Microsoft will increase its R&D spend by $US1 billion bringing its total to $US9.1 billion every year. What would the open source com...
// poll_next will extract response from Loki service and perform following actions: // 1. Get last log epoch timestamp // 2. Extract logs from response async fn poll_next(&mut self) -> Result<Option<Vec<String>>, LokiError> { let mut start_time = self.since; if self.next_start_epoch_timestamp != 0 { ...
/** * An Event Manager Provider Interface. * * @author Petri Virkkula * @version $Id: 90f5b84e25c69c2155d34c80bd969ce761e33683 $ */ public class EventStatsSpi implements EventStats { /** * File RCS Id. * * $Id: 90f5b84e25c69c2155d34c80bd969ce761e33683 $ */ public static final String RCSID = "$Id: 90f...
/** * <p>An extension of {@link AbstractLink} that handles HTTP (aka, ILP over HTTP) connections, both incoming and * outgoing.</p> * * <p>To handle incoming HTTP requests, use {@link #registerLinkHandler(LinkHandler)}.</p> * * @see "https://github.com/interledger/rfcs/blob/master/0035-ilp-over-http/0035-ilp-over...
/** * This method called from generated action. * It update outcome status. * If outcome status is FAILED this method add outcome to failed set. * @param outcome */ public void storeOutcome(Outcome outcome) { logger.debug("storeOutcome: {}", outcome); Group group = groups.get(outcome.getGroup()); ...
The demonetisation move by the Centre is turning out to be a nightmare for over 1 lakh construction workers in the city. Labour department sources said that 10,000-12,000 daily wage workers have already left Gurgaon. In the absence of work and cash, a majority of the seasonal workers are struggling to make ends meet. ...
Measurement of complement receptor 1 on neutrophils in bacterial and viral pneumonia Background A reliable prediction of the causative agent of community-acquired pneumonia (CAP) is not possible based on clinical features. Our aim was to test, whether the measurement of the expression of complement receptors or Fcγ re...
import torch import torch.nn as nn from tqdm import tqdm import torch.optim as opt from dataset import seganDataset from torch.utils.data import DataLoader from segan_module import d_module, g_module from asteroid.losses import singlesrc_neg_sisdr, singlesrc_neg_snr class segan(): def __init__(self, device='cuda')...
// RegisterManagers registers the provided managers, func (b *KCIdentifierBackend) RegisterManagers(mgrs *managers.Managers) error { b.identityManager = mgrs.Must("identity").(identity.Manager) if oidc, ok := mgrs.Get("oidc"); ok { b.oidcProvider = oidc.(konnect.AccessTokenProvider) } return nil }
In Cornish, Salinger, who was now 34, devoted some of his social life to entertaining teenagers who attended the local high school. In particular, he often escorted teenage girls to school dances and sporting events. Then, in 1954, at a party in Cambridge, he met Claire Douglas, the daughter of the respected British ar...
import { Accounts, CompanyProfile, ConfirmationStatement, RegisteredOfficeAddress } from '@companieshouse/api-sdk-node/dist/services/company-profile/types' import Resource from '@companieshouse/api-sdk-node/dist/services/resource' import { StatusCodes } from 'http-status-codes' import CompanyDetails from 'app/models/c...
// MPark.Patterns // // Copyright <NAME>, 2017 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #ifndef MPARK_PATTERNS_DETAIL_QUALIFY_AS_HPP #define MPARK_PATTERNS_DETAIL_QUALIFY_AS_HPP namespace mpark::patterns::detail ...
/// gets the next message corresponding to a channel and queue, in response to a basic.get /// /// if the channel id and queue have no link, the method /// will return None. If there is no message, the method will return None pub fn next_get_message(&mut self, channel_id: u16, queue_name: &str) -> Option<Message> { ...
<reponame>murphy-li/spring-framework-chinese<filename>spring-context/src/main/java/org/springframework/context/annotation/ImportBeanDefinitionRegistrar.java /** Generated by english-annotation-buster, Powered by Google Translate.**/ /* * Copyright 2002-2019 the original author or authors. * * Licensed under the Apac...
def fill_off(self, start=0, end=0): self.fill_rgb(0, 0, 0, start, end)
Single-Particle Distributions in Multi-Chain Model with successive collision for High-Energy Nucleus-Nucleus collisions High-energy nucleus-nucleus collisions are studied in multi-chain model with successive collision. Analytic forms for single-particle distribution are derived. Introduction Recently, nucleus-nucleu...
You may have noticed that bus and rail lines across San Francisco are carrying a few extra passengers. Nidorans and Magikarps of the Pokemon world are among some of your fellow riders commuting across the city. Bay Area trainers are flooding the streets and hustling to the nearest Pokestops and gyms for the sole sake o...
n = int(input()) t = [int(i) for i in input().split()] one_count = 0 one_indices = [] two_count = 0 two_indices = [] three_count = 0 three_indices = [] for i in range(n): if t[i] == 1: one_count += 1 one_indices.append(i + 1) elif t[i] == 2: two_count += 1 two_indices.append(i + ...
<gh_stars>0 #!/usr/bin/env python3 """ Name: jranderson Date: 04.05.19 Purpose: Regex-Passwords """ import argparse import os import re import sys #--------------------------------------------------------- def get_args(): """get command-line arguments""" parser = argparse.ArgumentParser( description='R...
Little more than two years ago, Chicago became the largest city to ditch its traditional electricity supplier, Commonwealth Edison, and venture into the marketplace in search of better deals for its residents. The city's contract with Integrys Energy Services, which was later bought by Exelon-subsidiary Constellation,...
<reponame>MrBattary/ncstore-front<gh_stars>0 import { UserRole } from './UserRole'; export type CompanySignUpDetails = { email: string; password: string; companyName: string; foundationDate: Date | null; roles: Array<UserRole>; }; export type PersonSignUpDetails = { email: string; password...
// Request that the driver stop the ring buffer engine, including quieting position notifications. // This method assumes that the ring buffer engine has previously been successfully started. void AudioDriverTest::RequestStop() { if (error_occurred_) { return; } ASSERT_TRUE(received_start_); MessageTranscei...
use super::is_bit_set; pub struct ApuRegisters { // Square (with sweep) pub square1_sweep_time: u8, pub square1_sweep_increase: bool, // If true, sweep frequency increases. False == decreases. pub square1_sweep_shift: u8, pub square1_wave_duty: u8, pub square1_length: u8, pub square1_freque...
ans=0 input() for i,j in zip(map(int,list(input())),map(int,list(input()))):ans+=min(abs(i-j),10-abs(i-j)) print(ans)
n=int(input()) s=input() ans1="SS" ans2="SW" ans3="WS" ans4="WW" def check(ans): for i in range(1,n-1): if s[i]=="o" and ans[i]=="S": ans+=ans[i-1] elif s[i]=="o" and ans[i]=="W": if ans[i-1]=="W": ans+="S" else: ans+="W" ...
<filename>webinos/core/api/contacts/src/thunderbird_AB_parser/MorkAddressBook.cpp /******************************************************************************* * Code contributed to the webinos project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complia...
<reponame>FateRevoked/mage package mage.abilities.keyword; import java.io.ObjectStreamException; import mage.abilities.MageSingleton; import mage.abilities.OpeningHandAction; import mage.abilities.StaticAbility; import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; ...
/** * This subclause describes the organism which the substance is derived from. For vaccines, the parent organism shall be * specified based on these subclause elements. As an example, full taxonomy will be described for the Substance Name: ., * Leaf. */ public static class Organism extends Backb...
Authorities called off the search for two missing crab fishermen off the coast of Port Renfrew, B.C., today at noon local time. The case is now a missing persons file with the RCMP. The men were last seen Friday afternoon heading out to go crab fishing on a three-metre-long boat and reported missing Sunday morning. T...
def load_awg_program_from_file(self, filename) -> None: print(filename) with open(filename, 'r') as awg_file: self._awg_program[0] = awg_file.read() self._awg_needs_configuration[0] = True
As a semi-active member of the Lojbanic community, I have tried to extend our concept of cultural neutrality beyond the merely grammatical by raising awareness of Lojban across Reddit. I have mostly focused on subreddits for G.S.D. (gender and sexual diverse) people and the occasional subreddit for nerdy people of colo...
/** Servlet that returns some example content. */ @WebServlet("/data") public class DataServlet extends HttpServlet { /** Class to wrap around comments array and total number of comments, used to produce json. */ private class CommentsWrapper { private int total = 0; private ArrayList<Comment> comments; ...
<reponame>kaylangan/azure-devops-intellij // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See License.txt in the project root. package com.microsoft.alm.plugin.idea.git.ui.pullrequest; import com.intellij.ide.BrowserUtil; import com.intellij.notification.NotificationListener; impor...
/** * Paints the close button. Subclasses should override * this method if they wish to change the appearance of the close * button. * @param g the Graphics instance */ protected void paintCloseButton(Graphics g) { int w = getWidth(); int h = getHeight(); g.setColor(getBackground()); g.fillRect...
An assessment of the dynamic effects of monetary policy in Macedonia ABSTRACT Macedonia, as a small emerging economy, is exposed to foreign risks such as: exchange rate volatility, trade distortions, and highly volatile capital flows. To ‘protect’ its economy, since 1995, the Macedonian Central Bank has applied the mo...
<reponame>wavesplatform/waves-c #include "b64.h" #include <string.h> ssize_t base64_decode(unsigned char *dst, const char *src) { static const unsigned char b64[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,...
/* Command proxy is a small TCP proxy used by flitter. Usage: -c=false: output ansi colors -h=false: output hex -l=":9999": local address -match="": match regex (in the form 'regex') -n=false: disable nagles algorithm -r="localhost:80": remote address -replace="": replace regex (in the form 'rege...
Power Consumption Optimization Strategy of Cloud Workflow Scheduling Based on SLA -Cloud computing, as a new model of service provision in distributed computing environment, faces the great challenge of energy consumption because of its large demand for computing resources. Choosing improper scheduling method to execu...
<filename>Source/RendererCore/Vulkan/VulkanPipelineHelper.cpp #include "RendererCore/Vulkan/VulkanPipelineHelper.h" #if BUILD_VULKAN_BACKEND #include <RendererCore/Vulkan/VulkanRenderer.h> #include <RendererCore/Vulkan/VulkanEnums.h> VulkanPipelineHelper::VulkanPipelineHelper (VulkanRenderer *parentVulkanRender...
<gh_stars>10-100 """Test suite for TIMIT.""" import os import pytest from audlib.data.timit import TIMIT_ASR, TIMIT_SID @pytest.mark.skipif('TIMIT_ROOT' not in os.environ, reason='ENV $TIMIT_ROOT unspecified.') def test_timit_asr(): dataset = TIMIT_ASR(os.environ['TIMIT_ROOT'], 'train') as...
/******************************************************************************* * File Name: FRAM_I2C_I2C_SCB_IRQ.h * Version 1.70 * * Description: * Provides the function definitions for the Interrupt Controller. * * ******************************************************************************** * Copyright 2008-...
<filename>src/duda_body_buffer.c /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Duda I/O * -------- * Copyright (C) 2012-2014, <NAME>. <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lice...
/** * On Demand Holder idiom * <p> * + Lazy initialization * + Fast performance * - Only for static fields */ private static class Singleton1 { private static class SingletonHolder { private static final Singleton1 INSTANCE = new Singleton1(); } private...
// UnsubscribeCmd unsubscribes project's user from channel and sends // unsubscribe control message to other nodes. func UnsubscribeCmd(n *node.Node, cmd proto.UnsubscribeAPICommand) (proto.Response, error) { resp := proto.NewAPIUnsubscribeResponse() user := cmd.User channel := cmd.Channel err := n.Unsubscribe(user...
// SetTaskName sets the name of the task. // This is optional. // If task name is not set, the task name is then defaulted to "Task-<task-id>" func SetTaskName(name string) TaskOption { return func(t Task) TaskOption { previous := t.GetName() t.SetName(name) return SetTaskName(previous) } }
Ensemble modelling or selecting the best model: Many could be better than one In the course of data modelling, many models could be created. Much work has been done on formulating guidelines for model selection. However, by and large, these guidelines are conservative or too specific. Instead of using general guidelin...
def normalize_whitespace(str): if str: str = str.replace("&nbsp;", " ") str = str.replace(u'\xa0', u' ') str = str.strip() str = re.sub(r'\s+', ' ', str) return str
def stochastic_chisquare(expected_distribution, distribution): assert(sum(expected_distribution.values()) == sum(distribution.values())), f"The distributions have {sum(expected_distribution.values())} and {sum(distribution.values())} samples, respectively, but must be equal." values, expected_values = _normaliz...
/* Frame.c */ /* and some general X code from xrn.c for the main screen */ #ifdef MOTIF # include <Xm/Xm.h> # include <Xm/PanedW.h> #else # include <X11/Xos.h> # include <X11/Intrinsic.h> # include <X11/Xutil.h> # include <X11/StringDefs.h> # include <X11/Shell.h> # include <X11/Xaw/Paned.h> #endif #include "compose....
Even as President Obama and War Secretary Leon Panetta announce the supposed “end” of the Iraq War, a US “covert war” against Iran, as the National Journal put it in a December 4 article, has already begun. This secret war–at least secret from the American people–is being conducted in part directly by the US, as evide...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package testsetter; import java.io.Serializable; import javax.persistence.Basic; import javax.persistence.Column; import jav...
Berkowitz looks for undervalued companies with strong management. When he finds one he likes, he makes a big bet: The portfolio holds only 15 to 25 stocks. He also has 20% of the fund in cash so he has the flexibility to jump on opportunities."Right now everyone is concerned about how the Obama administration will chan...
<filename>ui/src/components/WebAuthnButton.tsx import Button, { ButtonProps } from "@mui/material/Button"; import React, { FC, useRef, useState } from "react"; import AlertDialog from "./AlertDialog"; export type WebAuthnButtonProps = Omit<ButtonProps, "action"> & { action: string; csrfToken: string; enable: bo...
// Copyright (C) 2019 <NAME> - All Rights Reserved #include "UINavInputBox.h" #include "UINavInputComponent.h" #include "UINavInputContainer.h" #include "UINavMacros.h" #include "UINavSettings.h" #include "UINavPCComponent.h" #include "UINavWidget.h" #include "Components/TextBlock.h" #include "Components/Image.h" #in...
Psychiatrists and Their Role in an Integrative Approach to Sexual Problems Sexuality is a unit part of humans that has been evaluated as several fragmented particles for years. Although many biomedical and psychosocial approaches have been developed in the field of sex, these approaches usually have not been led to th...
/* * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 * (the "License"). You may not use this work except in compliance with the License, which is * available at www.apache.org/licenses/LICENSE-2.0 * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDI...
/** Writes the given chunk, starting at the given address. * @param chunk the chunk to store. * @param address the address to start with. */ static void writeChunk(uint8_t* chunk, uint16_t address) { for (uint8_t i = 0; i <= chunk[0]; i++) { UPDATE(address + i, chunk[i]); } }
<reponame>ztqakita/search-ranker import os import util import json import re import speech from SpellingCorrect import spell from InvertedIndex import constructIndex, getIndex from AnalyzeRank import analyzeInput, calculateRank from PreprocessText import stemming from search_ranker_pictures import output_fig_in_1_windo...
#pragma once #include <memory> #include <functional> #include <string_view> #include <wincodec.h> #include <wrl.h> #include <dxgi.h> #include "cflw数学_图形.h" namespace cflw::图形::dx纹理 { //格式 namespace 格式 { //常量 const GUID c通用rgba = GUID_WICPixelFormat32bppRGBA; const GUID c通用bgra = GUID_WICPixelFormat32bppBGRA; const GUI...
import java.io.*; import java.math.BigInteger; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.*; public class main2 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int a=sc.next...
Unnamed senior White House officials told the Washington Post’s Greg Sargent in a story published Thursday that President Obama has no intention to offer congressional Republicans any policy concessions in exchange for raising the debt limit later this month. From Sargent’s report: In exchange for the debt limit hike...
<gh_stars>0 import { useEffect, useRef } from 'react' type OnChange = (pressed: boolean) => void export const useKeyPressed = (keyCode: number, onChange: OnChange) => { const onChangeRef = useRef(onChange) useEffect(() => { onChangeRef.current = onChange }, [onChange]) useEffect(() => { const keydown...
// CreatePipelineRunSCMRefNameIndexer creates field indexer which could speed up listing PipelineRun by SCM reference name. func CreatePipelineRunSCMRefNameIndexer(runtimeCache cache.Cache) error { return runtimeCache.IndexField(context.Background(), &v1alpha3.PipelineRun{}, v1alpha3.PipelineRunSCMRefNameField, ...
/// If set to false, an ingested file keys could appear in existing snapshots /// that where created before the file was ingested. pub fn snapshot_consistency(self, val: bool) -> Self { unsafe { ll::rocks_ingestexternalfile_options_set_snapshot_consistency(self.raw, val as u8); } sel...
<filename>algorithms/1518. Water Bottles.py class Solution: def numWaterBottles(self, numBottles: int, numExchange: int) -> int: cnt = numBottles while numBottles >= numExchange: cnt += 1 numBottles = numBottles - numExchange + 1 return cnt
<gh_stars>10-100 use crate::{ basic::{Address, Code, Nonce, H256}, digest::{blake2, blake2b_hash_to_h160, blake2b_hash_to_h256, default_blake2, Digestible}, ed25519::{Keypair, PubSigPair, PublicKey}, error::Result, }; use alloc::vec::Vec; use serde::{Deserialize, Serialize}; pub fn caller_address_from_...
<reponame>john-tipper/schema-compatibility-checker<filename>src/main/java/org/johntipper/DefaultSchemaChecker.java<gh_stars>0 package org.johntipper; import io.confluent.kafka.schemaregistry.ParsedSchema; import io.confluent.kafka.schemaregistry.avro.AvroSchema; import io.confluent.kafka.schemaregistry.json.JsonSchema...
/** * @param allDnId is a set of all dn's storage instance id * @param executionContext is used for privilege check * @param result is updated in this method */ private void generateDeadlockLogs(Set<String> allDnId, ExecutionContext executionContext, ...
/** * *@return 1 on sucess 0 on failiure */ int deactivate_spoof(const char *if_name, struct interface *iface, int version) { FILE *proc_spoof; char procfile[FILENAME_MAX]; if (version == AF_INET6) return -1; sprintf(procfile, SPOOF_PROC, if_name); if ((proc_spoof = fopen(procfile, "r")) == NULL) { ...
Yamaha MotoGP rider Jorge Lorenzo has one goal in mind: winning his third MotoGP title and writing his name in the MotoGP history book as the man who beat the three strongest riders of the last 20 years—Valentino Rossi, Casey Stoner, and Marc Marquez. Halfway through the 2015 season, the hunt for the MotoGP title is be...
/// Inserts an item into this table, returning the index that it was /// inserted at. pub fn insert(&mut self, item: T) -> u32 { if self.next == self.elems.len() { let next_empty = self.next + 1; self.elems.push(Slot::Empty { next_empty }); } let index = self.next; ...
/** * @author Olivier Lamy * @since 1.4-M4 */ @Service( "ldapConnectionFactory#archiva" ) public class ArchivaLdapConnectionFactory extends ConfigurableLdapConnectionFactory { private final Logger log = LoggerFactory.getLogger(ArchivaLdapConnectionFactory.class); private boolean valid = false; @In...
def download_search_object_hashes( current_user: User = Depends(current_user_investigator), search_string: str = '', search_filter: dependency.SearchFilter = None ): if search_string == '' and not search_filter: return JSONResponse( status_code=400, content={ ...