content
stringlengths
10
4.9M
Substrate Binding in Protein-tyrosine Phosphatase-like Inositol Polyphosphatases* Background: PTP-like inositol polyphosphatases hydrolyze myo-inositol hexakisphosphate via an ordered pathway. Results: X-ray structures in complex with substrates and fluorescence binding reveal novel features of the kinetic mechanism. ...
<filename>src/html.cpp #include "engine/iplugin.h" #include "imgui/imgui.h" #include "litehtml.h" namespace Lumix { LUMIX_PLUGIN_ENTRY(lumixengine_html) { return nullptr; } }
Corn Starch-Based Sandstone Sustainable Materials: Sand Type and Water Content Effect on Their Structure and Mechanical Properties : A new biodegradable, sustainable and environmentally friendly building material is introduced and studied in this work, which can be applied to lightweight architectural structures, aimi...
The 1960 American Football League season was the inaugural regular season of the American Football League (AFL). It consisted of 8 franchises split into two divisions: the East Division (Buffalo Bills, Houston Oilers, Titans of New York, Boston Patriots) and the West Division (Los Angeles Chargers, Denver Broncos, Dall...
Editor's note: President Barack Obama addressed the U.N. General Assembly on Tuesday. You can read a live blog of his remarks below or see his remarks in full here. [Updated at 10:51 a.m. ET] President Obama pointed to all of the Libyans who supported America and showed their love of Ambassador Chris Stevens as furthe...
<reponame>fossabot/wasedatime-web const termKeysMap = { 0: "Spring", 1: "Summer", 2: "Fall", 3: "Winter", s: "Semester", q: "Quarter", i: "Intensive", f: "Full-Year", t: "Term", "/": "/", "&": "&", }; export const termKeysDecoder = (key) => { var str = ""; if (typeof key === "string") { k...
President-elect Donald Trump will name Exxon CEO Rex Tillerson as secretary of state Tuesday morning, sources tell CBS News. Mr. Trump said on Twitter Monday evening he would make the secretary of state announcement Tuesday morning. I will be making my announcement on the next Secretary of State tomorrow morning. — D...
<filename>plugins/parsers/nagios/parser.go package nagios import ( "bufio" "bytes" "errors" "fmt" "log" "os/exec" "regexp" "strconv" "strings" "syscall" "time" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/metric" ) // getExitCode get the exit code from an error value which is the res...
WASHINGTON (Reuters) - A federal judge in California on Wednesday allowed some claims to proceed by investors who sued Volkswagen AG over its diesel emissions scandal, but agreed to the German automaker’s request to dismiss parts of the lawsuit. Volkswagen's logo is seen at its dealer shop in Beijing, China, October 1...
import React from 'react'; import Main from './src/Main'; export default function App() { return <Main />; }
<reponame>JBlaschke/lcls2 #------------------------------ """ :py:class:`QWDateTimeSec` - time(sec) <-> time-stamp converter ============================================================================================ Usage:: # Import from psana.graphqt.QWDateTimeSec import QWDateTimeSec # Methods - see ...
/* * To economize on slots space in functions, the compiler records arguments and * local variables as shared (JSPROP_SHARED) properties with well-known getters * and setters: js_{Get,Set}Argument, js_{Get,Set}LocalVariable. Now, we could * record args and vars in lists or hash tables in function-private data,...
import { beEqualTo, given } from "./test.framework"; import { hasChanged, StoreField } from './store'; given({}) .it(hasChanged) .should(beEqualTo, false); given({description: "Not a StoreField", items: ["Not a StoreField", "Not a StoreField"]}) .it(hasChanged) .should(beEqualTo, false); given({descriptio...
<filename>programmers/찾아라 프로그래밍 마에스터/게임 맵 최단거리.cpp /** * problem : https://programmers.co.kr/learn/courses/30/lessons/1844 * algorithm : BFS * time complexity : O(NM) */ #include <vector> #include <queue> using namespace std; int solution(vector<vector<int> > maps) { int answer = -1; int n = maps.size(); int...
At a Ted Cruz rally in Orlando, Florida, March 11, 2016 (Gerardo Mora/Getty) ‘In the House and the Senate, we own the budget.” It was August 2014, the stretch run before the midterm elections, and Senate minority leader Mitch McConnell was making promises to voters about how he and his party would face down Barack Oba...
-- |Helper to unregister all ROS-related packages known by @ghc-pkg@. module Unregister (unregisterInteractive) where import Control.Applicative import Data.Char import Data.List import Data.Maybe import PkgBuilder (myReadProcess, toolPaths, ToolPaths(..)) import System.Exit (ExitCode(..)) import System.IO (hFlush, std...
#include<stdio.h> f #include<math.h> int data[1000000]; int main(void){ long n,hei,cnt=0; long i,j; while(scanf("%ld",&n)==1){ for(i=2;i<=n;i++) data[i]=1; hei=(long)sqrt(n); for(i=2;i<=hei;i++){ if(data[i]!=0){ for(j=i*2;j<=n;j+=i) //j=i*2EEE‚±‚Ìi‚Æj‚̊Ԃɂ͑f”‚ª‘¶Ý‚µ‚È‚¢‚½‚ß...
/** * A resource that uses path parameters to expose properties for a stack build. This will be * used when starting runners to have them pick up properties needed to hit stack clusters. * * https://${endpoint}:${port}/properties/${user}/${groupId}/${artifactId}/${version}/${commitId} */ @Singleton @Produces( M...
//returns the surface volume to be transfered in a gather (1st neighbor) int lqcd_get_transfer_size(int dimension, int *squaresize ){ int sitestrans = 1; int dim = dimension; if (dimension >= TDOWN){ dim = OPP_DIR(dim); } for (int d = XUP; d <= TUP; d++){ if (d != dim){ s...
import { CreateTestClient as CreateNextjsTestClient, testApiHandler, GlobalTeardown } from '@graphql-ez/nextjs-testing'; import { ezSchema, gql } from '@graphql-ez/plugin-schema'; import { CommonSchema, createDeferredPromise, EZContext, startExpressServer, startFastifyServer, startHapiServer, startHTTPSer...
/** * Apply the Select's set of formatters to the given text * @param text the text to format. * @return the formatted text */ public String formatText(Object text) throws JspException { int cnt = _formatters.size(); for (int i = 0; i < cnt; i++) { FormatT...
Integrated methodology for transmission and reactive power planning This paper presents the comprehensive methodology for solving the transmission reinforcement and reactive power planning problems. The static approach is applied to both problems and they are separated into corresponding investment and operation subpr...
Burch colposuspension versus fascial sling to reduce urinary stress incontinence. BACKGROUND Many surgical procedures are available for women with urinary stress incontinence, yet few randomized clinical trials have been conducted to provide a basis for treatment recommendations. METHODS We performed a multicenter, ...
/** * Gets the result from the file picker activity * thats the only intent im actually calling (and expecting results from) right now */ protected void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == PICK_REQUEST_CODE) { fileBrowsing = false; if (resultCode == RES...
/** * This is a helper function that will check credentials of user who wants to log in * and throws an error if username or password does not match any user * @param userToCheck will be checked for correct credentials */ private User checkCredentials(User userToCheck) { String providedUsern...
<reponame>gorpher/winspool-go package printer import ( "fmt" "strings" ) // DEVMODE constants. const ( CCHDEVICENAME = 32 CCHFORMNAME = 32 DM_SPECVERSION uint16 = 0x0401 DM_COPY uint32 = 2 DM_MODIFY uint32 = 8 DM_ORIENTATION = 0x00000001 DM_PAPERSIZE = 0x00000002 DM_PAPERLENG...
<reponame>luckydevil13/angular-class<gh_stars>0 import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, ViewEncapsulation} from '@angular/core'; import {LoginService} from './login.service'; import {LoaderBlockService} from '../common/loader/loader.service'; import {Subscription} from 'rxjs'; import {...
/** * A mouse driven text window that displays the sun */ public class RisingSun3 extends FrameWindowController { private FilledOval sun; private Text instructions; public void begin () { sun = new FilledOval(canvas.getWidth()/4, canvas.getHeight() - canvas.getWidth()/4, ...
import { GraphQLResolveInfo, GraphQLSchema } from "graphql"; import { InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose"; /** * @internal */ export type AttributeType = "String" | "Float" | "Int" | "Boolean" | "ID"; /** * @internal */ export type GraphqlResolver = ( parent:...
Capcom just announced Dead Rising 3 for our beloved platform PC. Want to know whether or not your PC will be able to run the game? here are the minimum and recommended PC specs for Dead Rising 3. The game is releasing in Summer 2014, exact release date not yet revealed. PC gamers will be able to experience the hordes ...
/** * Gives you the dictionary the server will let you use. Some server may * have dictionary available only to * logged in users. * * @return map providing the db name in the key, and its description as the * value. * @throws IOException */ public Map<String, String> showDatabas...
#ifndef REGIONS_H_ #define REGIONS_H_ #include "math/rect.h" #include "action.h" typedef struct Regions Regions; typedef struct Player Player; typedef struct Level Level; typedef struct RectLayer RectLayer; typedef struct Labels Labels; typedef struct Goals Goals; Regions *create_regions_from_rect_layer(const RectLa...
n,m = map(int,input().split()) x = list(map(int,input().split())) if n >= m: print(0) exit() x.sort() y = [0 for _ in range(len(x)-1)] for i in range(len(x)-1): y[i] = x[i+1]-x[i] y.sort(reverse=True) answer = 0 for i in range(n-1): answer += y[i] print( max(x)-min(x)-answer )
def perform_logo_detection_service_request(file_bytes, proxies, max_results=10): image_content = base64.b64encode(file_bytes) service_request = get_service(proxies).images().annotate(body={ 'requests': [{ 'image': { 'content': image_content.decode('UTF-8') }, ...
// KillHost kills the given host within the cluster func (c *TestRingpopCluster) KillHost(uuid string) { for i := 0; i < len(c.hostUUIDs); i++ { if c.hostUUIDs[i] == uuid { c.rings[i].Stop() c.channels[i].Close() c.rings[i] = nil c.channels[i] = nil } } }
/** Construct element list from current source. */ protected void updateSourceCodeElementList() { resetElementList(); if ( source != null ) { Matcher matcher = delimitersPattern.matcher(source); Stack<Integer> typeStack = new Stack<Integer>(); typeStack.push(getDefaultStyle()); int previous = 0; whil...
/** * In case an actor processing thread terminates, provide some info. */ public final class UncaughtExceptions implements UncaughtExceptionHandler { private final VM vm; public UncaughtExceptions(final VM vm) { this.vm = vm; } @Override public void uncaughtException(final Thread t, final Throwable ...
<gh_stars>10-100 import re import pytest import numpy as np from astropy.table import Table, vstack from astropy.wcs import WCS from astropy.nddata import CCDData from astropy.coordinates import SkyCoord from ..core import ImageWidget, RESERVED_MARKER_SET_NAMES def _make_fake_ccd(with_wcs=True): """ Generat...
/* * DOES e OR ONE OF ITS COMPONENTS CONTAIN A BITFIELD? * * Should really detect this once and for all at an earlier stage and * record in props ( e ). */ static int has_bitfield ( exp e ) { if ( e == NULL ) { return 0; } switch ( e->tag ) { case compound_tag : { for ( e = next ( child ( e ) ) ; ; e = nex...
mod test_data; use edit_distance::hamming; use frequency::{ENGLISH_LETTERS, ENGLISH_FREQS, lower_english_only, letter_frequencies}; use std::cmp; use std::f64; pub fn crack_vigenere(s: &[u8]) -> Option<Vec<u8>> { let max_try = cmp::min(s.len() / 2, 40); let mut length_scores: Vec<_> = (2..(max_try + 1)).map(...
/** * Implementation of {@link IEnvironment} for use in tests. */ public class TestEnvironment extends DefaultEnvironment { private static final long serialVersionUID = 1L; private final InputMock input; private final AtomicInteger clearCachesCount = new AtomicInteger(); public TestEnvironment(Inpu...
/** * Joins two collections where the left collection must only contain unique elements. If two elements represent the same type * erasure but are not equal, an exception is thrown- * * @param left The left collection. * @param right The right collection. * @param <T> The element type. ...
n,k = map(int,input().split()) a_list = list(map(int,input().split())) a_list_2 = a_list + a_list first_count = 0 p = 10**9 + 7 for i in range(n-1): for j in range(i+1,n): if a_list[j] < a_list[i]: first_count += 1 second_count = 0 for a in a_list: for i in range(n): if a > a_list[i]: seco...
package executor import ( "errors" "sync" ) var ( _ = Future(new(future)) // ErrorCancelled error to use when cancel task ErrorCancelled = errors.New("Task is already cancelled") ) type futureState uint16 // Future state const ( futurePadding futureState = iota futureBlocked futureCancelled futureComplete...
/******************************************************************************* * (C) Copyright IBM Corporation 2011, 2017 * All Rights Reserved *******************************************************************************/ public class SessionCreations { public static final String copyrightNotice = "(C) Copyri...
<reponame>upupcom/umi import { lodash } from '@umijs/utils'; import { existsSync, readFileSync } from 'fs'; import mime from 'mime'; import { join, parse } from 'path'; import { IApi } from 'umi'; import url from 'url'; import webpack from 'webpack'; import { runtimePath } from '../../generateFiles/constants'; import A...
import chainer from chainer import functions, cuda # NOQA from chainer_chemistry.config import MAX_ATOMIC_NUM from chainer_chemistry.links import EmbedAtomID from chainer_chemistry.links.readout.ggnn_readout import GGNNReadout from chainer_chemistry.links.update.ggnn_update import GGNNUpdate from chainer_chemistry.ut...
<reponame>JanKrAppel/worknoteBook<filename>worknoteBookClient.py # -*- coding: utf-8 -*- """ Created on Fri Aug 28 23:19:40 2015 @author: appel """ from io import FileIO class FileLenIO(FileIO): def __init__(self, name, mode = 'r', closefd = True): super(FileLenIO, self).__init__(name, mode, closefd) from...
<reponame>machinezone/kubespec # Code is generated: DO NOT EDIT # Copyright 2019 Machine Zone, Inc. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from kubespec import context from kubespec import types from kubespec.k8s import base from kub...
n,m = [int(i) for i in input().split()] lr = input() ud = input() class inter: def __init__(self): self.outs = [] city = [inter() for i in range(len(lr)*len(ud))] inv_city = [inter() for i in range(len(lr)*len(ud))] for i in range(len(lr)): for j in range(len(ud)): if lr[i] == ...
/** * Created by honchar */ public class PasswordPropertyPanel extends PrismPropertyPanel<ProtectedStringType>{ private static final long serialVersionUID = 1L; private static final String ID_PASSWORD_PANEL= "passwordPanel"; public PasswordPropertyPanel(String id, IModel<PrismPropertyWrapper<ProtectedS...
import { Inject, Injectable } from '@nestjs/common'; import { ClientProxy } from '@nestjs/microservices'; @Injectable() export class CarService { constructor(@Inject('CAR_SUBSCRIBER') private readonly car: ClientProxy) {} async publish(topic: string, data: Record<string, unknown>) { const response = await thi...
/** * A {@link GradleBuild} writer for {@code build.gradle}. * * @author Jean-Baptiste Nizet */ public class GroovyDslGradleBuildWriter extends GradleBuildWriter { @Override protected void writeBuildscript(IndentingWriter writer, GradleBuild build) { List<String> dependencies = build.getBuildscript().getDepend...
def main(): s = raw_input() digit = [] for i in xrange(10): digit.append(raw_input()) ans = [] for i in xrange(0, 80, 10): ans.append(digit.index(s[i:i + 10])) print "".join(map(str, ans)) if __name__ == "__main__": main()
def _iteratively_apply( self, model: SimulationComponent, *, add_vis: bool = True, ret_vis: bool = False, seed: Optional[Union[str, int]] = None, vis_filter: Optional[Sequence] = None, antpairpol_cache: Optional[Sequence[AntPairPol]] = None, **kwar...
<reponame>MattSkala/bang-game #ifndef BANG_DRAWCARD_H #define BANG_DRAWCARD_H #include "InstantCard.h" /// An instant card. A player draws a predefined number of cards. class DrawCard : public InstantCard { private: int draw_count_; public: DrawCard(string original_name, string name, int count, int draw_cou...
def send(self, msg): if isinstance(msg, Command): msg = msg.toMessage() msg.streamId = self.id if self.client is not None: self.client.writeMessage(msg)
def tweet2url(tweets=None, user='', days=0, months=0, years=0, monthly=False, yearly=False, since='',until=''): urls = [] summary = Summary() if tweets == None: tweets = scrape_tweets(user=user, days=days, months=months, years=years, monthly=monthly, ...
<reponame>bitum-project/politeia // Copyright (c) 2017-2019 The Bitum developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package cockroachdb import ( "fmt" "strconv" "strings" "time" "github.com/bitum-project/politeia/bitumplugin" pd "github.com/bitum-...
<filename>test/basic/basic.test.ts import talc from "./../../src/talc"; test("talc to correctly parse and output a basic script", () => { expect(talc(["talc", "say", "now"], "./test/basic")); });
<gh_stars>0 import { FilePath } from "../internal_urls"; export const DATA_URI = "data:image/svg+xml;utf8,"; export interface OFCropAttrs { svg_icon?: string | undefined; spread?: number | undefined; slug: string; } export interface OFCropResponse { id?: undefined; // Attributes available, possibly not dec...
<gh_stars>0 /* * Copyright 2020 Red Hat, Inc. and/or 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 r...
export interface Response<BodyStream = any> { readonly ok: boolean readonly status: number readonly statusText: string readonly body: BodyStream text(): Promise<string> json<T = any>(): Promise<T> arrayBuffer(): Promise<ArrayBuffer> } export type RequestInit = Record<string, any> export type Fetch<R ext...
def plot(maps, titles, save_fig=False): fig, axes = plt.subplots(3, 2, figsize=(4, 6)) for i in range(3): for j in range(2): k = i * 2 + j add_one_subplot(axes[i][j], maps[k], titles[k]) fig.tight_layout() if save_fig: figname = 'figures/simu_2D.png' plt.s...
<reponame>RomanBase/qr package com.ankhrom.base.animators; import android.annotation.TargetApi; import android.os.Build; import android.support.annotation.Nullable; import android.view.View; import android.view.ViewGroup; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.Alp...
n = input() mod = 1000000007 sz = 100001 tenMod = [0]*sz tenMod[0] = 1 for _ in range(1, sz): tenMod[_] = (tenMod[_-1]*10)%mod prec = [0]*sz prec[0] = 0 for _ in range(1, sz): prec[_] = (prec[_-1]+_*tenMod[_-1])%mod ans = 0 for _ in range(len(n)): ans += ((int(n[_])*prec[len(n)-1-_])%mod+ (int(n[_]...
<filename>x/government/keeper/querier.go<gh_stars>10-100 package keeper import ( "fmt" sdkErr "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/codec" "github.com/commercionetwork/commercionetwork/x/government/types" sdk "github.com/cosmos/cosmos-sdk/types" abci "github.com/tendermint...
def show(obj): def rep(obj): if hasattr(obj, 'get_id'): return f"{type(obj).__name__}({obj.get_id()})" return f"{type(obj).__name__}" if type(obj).__name__ == 'ElementList': return ('ElementList(' + ', '.join([rep(child) for child in ob...
package org.trdc.announcement; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.trdc.announc...
//////////////////////////////////////////////////////////////////////// // Copyright(c) libgreen contributors. See LICENSE file for details. // //////////////////////////////////////////////////////////////////////// #include <green.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #inc...
Apple quietly bought Dryft, a startup that develops keyboard apps — an acquisition that appears to have occurred last year — TechCrunch has learned. The acquisition seemed to be confirmed by Randy Marsden’s LinkedIn profile, which lists him as joining Apple last September. Marsden, the chief technology officer of Dryf...
def plotlyGyroPhasePlot(gyroPhases): gyroTicks = [0, 45, 90, 135, 180, 225, 270, 315] fig = go.Figure() for i in range(len(gyroPhases)): fig.add_trace(go.Scatterpolar( r = np.array([0.0,1.0]), theta = np.array([gyroPhases[i],gyroPhases[i]]), mode = 'li...
/** * Checks if the spinning thread for the specified queue {@code logicalQueueName} is * still running (polling for new messages) or not. * @param logicalQueueName the name as defined on the listener method * @return {@code true} if the spinning thread for the specified queue is running * otherwise {@code fa...
n=int(input()) a,b=map(int,input().split()) p=list(map(int,input().split())) s=[] c=0 d=0 e=0 for i in p: if i<=a: c+=1 elif a+1<=i<=b: d+=1 elif b+1<=i: e+=1 s.append(c) s.append(d) s.append(e) print(min(s))
// SetCoefPtr sets the coefficient of the monomial with degree deg in f to val // as a pointer. It returns f itself. func (f *Polynomial) SetCoefPtr(deg int, val ff.Element) *Polynomial { if deg <= f.Ld() { f.coefs[deg] = val if val.IsZero() { f.reslice() } return f } if val.IsZero() { return f } f.co...
<reponame>yiminghe/single-spa-mf import { getMFAppEntry, getMFAppVar, mainModule } from './utils'; export const getMFAppConfig = ({ app }: { app: string }) => ({ name: getMFAppVar(app), filename: `${getMFAppEntry(app)}`, }); export const getMFExposes = (mod: string) => ({ [mainModule]: mod, });
export { InitializationProvider } from "./Initialization.context" export { InitializationStore } from "./Initialization.store" export { useBlockInitialization } from "./useBlockInitialization" export { useIsInitializing } from "./useIsInitializing" export { useOnReset } from "./useOnReset"
/// Create a new cache with a fixed size capacity. The cache is sharded /// to 2^num_shard_bits shards, by hash of the key. The total capacity /// is divided and evenly assigned to each shard. If strict_capacity_limit /// is set, insert to the cache will fail when cache is full. User can also /// set percentage of the ...
VANDENBERG AFB, Calif., March 30 (UPI) -- Intercontinental Ballistic Missiles have been launched by the U.S. Air Force Global Strike Command to verify the accuracy and reliability of the weapon system. Both Minuteman IIIs were unarmed, and their test re-entry vehicles impacted within 40 minutes of each other in a pre-...
def guess_feed_type(self, href): href = self.fix_href(href) for mimetype, endings in GUESSES.items(): if href.lower().endswith(endings): return mimetype return None
/** * This will test the list box PDModel. * * @throws IOException If there is an error creating the field. */ public void testListboxPDModel() throws IOException { /* * Set up two data lists which will be used for the tests */ List<String> exportValues = new Ar...
/** * Add the connection to the pool, but does NOT add it as available * connection. Use method * {@link #returnAvailableConnectionToPool(HttpClient)} to also add the * connection to the available connections. * * @param httpClient * connection that is to be added to the pool * @retu...
<reponame>mohamedashrafamin/Training_one import unittest from colorama import Fore from main import DNAtoRNA class TestSum(unittest.TestCase): def test_sum(self): self.assertEqual(DNAtoRNA("TTTT"), "UUUU") print(Fore.GREEN + 'Test Passed') self.assertEqual(DNAtoRNA("GCAT"), "GCAU") ...
package ui import ( "fmt" "github.com/veandco/go-sdl2/sdl" ) // Component describes which functions a UI component must implement type Component interface { InBoundary(sdl.Point) bool Render() Destroy() OnEnter() OnLeave() OnMotion(*sdl.MouseMotionEvent) bool OnScroll(*sdl.MouseWheelEvent) bool OnClick(*sd...
def copied(mctx, x): getargs(x, 0, 0, _("copied takes no arguments")) s = [] for f in mctx.subset: p = mctx.ctx[f].parents() if p and p[0].path() != f: s.append(f) return s
#include <iostream> #include <vector> #include <algorithm> #define max(a,b) (a > b ? a : b) typedef long long ll; using namespace std; int R, G, B; ll res = 0; vector<vector<vector<ll>>> dp; int main() { cin >> R >> G >> B; vector<int> rs(R+1, 0); vector<int> gs(G+1, 0); vector<...
<filename>vendor/github.com/hashicorp/terraform/helper/structure/expand_json.go package structure import "encoding/json" func ExpandJsonFromString(jsonString string) (map[string]interface{}, error) { var result map[string]interface{} err := json.Unmarshal([]byte(jsonString), &result) return result, err }
<reponame>OurFires/Embers import * as React from "react"; import * as Common from "../../common/common"; declare module "@embers/components/TextArea"; export interface Props extends Common.UIComponentProps { /** * Title of the button */ title?: string; /** * Variant of the button */ variant?: "pr...
From the bedroom to the budget deficit: mate competition changes men's attitudes toward economic redistribution. How do economic recessions influence attitudes toward redistribution of wealth? From a traditional economic self-interest perspective, attitudes toward redistribution should be affected by one's financial s...
__all__ = ['plot_colorful'] __whatami__ = 'Utility for plotting colorful grade histograms.' __author__ = '<NAME> <<EMAIL>>' def plot_colorful(grade_array, grade_boundaries, title='Student Grades', x_tight=False, **plot_kwargs): """Plot a histogram of student grades, color-coded by letter grade....
//Returns a string which will be written to the config file std::string element_group::make_string( std::uint32_t indent ) { std::string config_string( indent, '\t' ); config_string += "<element_group name=\""; config_string += m_group_name; config_string += "\">\n"; for ( auto& element_group : m_element_grou...
"""Package teneva, module act_many: operations with a set of TT-tensors. This module contains the basic operations with a set of multiple TT-tensors (Y1, Y2, ...), including "add_many" and "outer_many". """ import teneva def add_many(Y_many, e=1.E-10, r=1.E+12, trunc_freq=15): """Compute Y1 + Y2 + ... + Ym in t...
/* * Copyright 2021 Dynatrace LLC * * <p>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 * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed...
/** * Helper class to provide operations for node encryption and decrpytion. * * @author Patrick Lang, University of Konstanz * */ public class NodeEncryption { /** * Encryption algorithm. */ protected static final String ENCRYPTION_TYPE = "AES"; /** * Encryption algorithm padding type. */ ...
Classification of creep crack and cavitation sites in tempered martensite ferritic steel microstructures using MTEX toolbox for EBSD Abstract Tempered martensite ferritic steels exhibit a complex, hierarchical microstructure. Previous work has demonstrated the utility of electron backscatter diffraction (EBSD) analysi...
<reponame>eLeontev/translator<filename>src/components/text-with-hints.tsx import React from 'react'; import { minWordLengthToTranslate } from '../constants/constants'; import { WordPair, TextWithHintsProps, WordWithHintProps, } from '../models/models'; export const WordWithHint = React.memo<WordWithHintP...
n,k=map(int,input().split()) a=(n//k)-1 b=(n//k) c=(n//k)+1 x=abs(n-a*k) y=abs(n-b*k) z=abs(n-c*k) print(min(x,y,z))
<gh_stars>0 /* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2022 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Li...
/** * Represents an envelope. * * @author ebahtijaragic */ public class Envelope { public String action; public String transactionId; public String typeId; public ByteBuffer payload; public List<Header> headers; public Envelope(String action, String typeId, String transactionId, ByteBuffer payload) { ...
def PopEvent(self): try: (macb_group_identifier, content_identifier, event, event_data, event_data_stream) = heapq.heappop(self._heap) if macb_group_identifier == '': macb_group_identifier = None return (macb_group_identifier, content_identifier, event, event_data, eve...