content
stringlengths
10
4.9M
/** * * @author Priyansh Rastogi */ public class AlbumDetails extends javax.swing.JFrame { /** * Creates new form AlbumDetails */ public static Album currentAlbum = new Album(); MediaPlayer mPlayer; public AlbumDetails() { initComponents(); albumName.setText(currentAlb...
def _make_meta(self, img: MulImage, channel_num: int) -> bytes: meta_name = bytes(f'/{channel_num}/meta\0o', 'utf-8') meta_name += b'GwyContainer\0' meta_data = b''.join([ bytes(f'ID\0s{img.img_id}\0', 'utf-8'), bytes(f'Bias\0s{img.bias * 1e-3:.5f} V\0', 'utf-8'), ...
Num = int(input()) Num_Array = [] count = 0 result = 0 for i in range(Num): Num_Array.append(int(input())) Num_Array.sort() while count < Num: if Num_Array.count(Num_Array[count]) == 1: result += 1 else: Num_Array.pop(count) count -= 1 Num -= 1 count += 1 print(result...
<gh_stars>10-100 pub mod Opcode { pub const LoadI: u8 = 0x1; pub const LoadF: u8 = 0x2; pub const LoadL: u8 = 0x3; pub const LoadD: u8 = 0x4; pub const LoadG: u8 = 0xa1; pub const LoadAt: u8 = 0xa2; pub const StoreAt: u8 = 0xa3; pub const Ret: u8 = 0xa4; pub const Ret0: u8 = 0xa5...
Paulus Le Son, a blogger detained in Vietnam since August 2011 Arrests of Dissident Bloggers Continue in Vietnam As we have previously covered, the Vietnamese government continues to crack down on bloggers and writers who have spoken out against the Communist regime. Alternative news site, Vietnam Redemptorist News, ...
#include<bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define debug cout << "\there\t"; #define deci(n) cout << std::fixed << std::setprecision(n); #define all(a) a.begin(), a.end() #define sz(a) (int)a.size() #define len(a) (int)a.length() #...
<reponame>togglebyte/netlib<gh_stars>1-10 use crossbeam::deque::{Steal, Stealer as CBStealer, Worker as CBWorker}; use crate::{Evented, Interest, Reaction, Reactor, Result, System}; // ----------------------------------------------------------------------------- // - Worker - // ----------------------------------...
def _logout(): if 'SID' in session: sid = session['SID'] if sid != "" and sid is not None: flag, ret = core.Disconnect(session['SID']) session.clear()
def restore_state(self): try: self._cr50_reset.cleanup() finally: self.cleanup_rescue_thread()
/** * Start an event to find the fourth click object action. */ public static void clickObjectType4Event(final Player player) { if (player.doingClickObjectType4Event) { return; } player.doingClickObjectType4Event = true; CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() { @Override ...
def construct_optimizer(self, parameters: Sequence[torch.Tensor]): self.optimizer = self._opt_type(parameters, **self._opt_kwargs)
Prevalence and predictors of underweight and stunting among children under 2 years of age in Eastern Kenya Abstract Objective: To investigate key risk factors associated with undernutrition in the first few years of life. Design: A cross-sectional household survey was conducted in January 2018 collecting anthropometri...
<filename>src/data_conversion.py<gh_stars>1-10 #!/usr/local/bin/python3 import sys import random import argparse from pathlib import Path import numpy as np from skimage import io import SimpleITK as sitk from cinemri.utils import get_patients def convert_2d_image_file_to_pseudo_3d(input_file_path, spacing=[999, 1, 1...
Coronary artery bypass grafting in acute myocardial infarction: analysis of predictors of in-hospital mortality. OBJECTIVE Coronary artery bypass grafting (CABG) during the acute phase of infarction (AMI) is associated with increased operative risk. The aim of this study was to determine predictors of in-hospital mort...
#ifndef __ICM20948_H__ #define __ICM20948_H__ #include "i2cw.h" // ICM20948MCM (multi-chip-module) // ICM20948Module/Die // Interface I2C // Interface SPI // Accelerometer // Gyroscope // Digital Motion Processor/DMP // Temperature Sensor // FIFO // F...
Ascending from the Ashes: Images of Plato in Bradbury’s Fahrenheit 451 The pleasure of burning books consumed Montag, consumed him until the day the books burned back, their possibilities enflaming his curiosity to the point of existential immolation. Yet from these ashes, he rises. Fahrenheit 451 is a novel of ascent...
<reponame>pletzer/nemoflux<filename>nemoflux/datagen.py import netCDF4 import numpy from numpy import pi, cos, sin, arctan2, arctan import math import defopt import geo # precision with which data will be saved in the netCDF file REAL = 'float64' class DataGen(object): def __init__(self, prefix=''): self...
/** * @file DecodeBase64Stream.cpp * * @brief File for class DecodeBase64Stream * @date 05.08.2016 * @author duke */ #include "DecodeBase64Stream.h" #include "DecodeBase64StreamBuf.h" DecodeBase64Stream::DecodeBase64Stream(ostream &a_out) : Base64Stream(new DecodeBase64StreamBuf(a_out)) { exceptions...
// Transition from search to non-search and make sure instant isn't displayable. // See bug http://crbug.com/100368 for details. IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE(SearchToNonSearch)) { ASSERT_TRUE(test_server()->Start()); EnableInstant(); SetupInstantProvider("instant.html"); content::WindowedNotificati...
Q: Which dinosaur is the largest? A: The biggest dinosaur is probably ultrasauros. We only have a few bones of this late Jurassic (140 million years ago) plant-eater from Colorado, but the bones show an animal who was six-stories high and may have weighed more than 50 tons. A four-legged plant-eating dinosaur found re...
<reponame>omarcherni007/holbertonschool-higher_level_programming<filename>0x07-python-test_driven_development/5-text_indentation.py<gh_stars>1-10 #!/usr/bin/python3 """ This module prints a text with a 2 new lines after each of these characters: `.`, `?`, `:` Example: Lorem ipsum dolor sit amet, consectetur adip...
#include<cstdio> using namespace std; int p1,p2; double f1,f2,t1,t2; double maxx(double x,double y) { if (x>y) return x; else return y; } int main() { scanf("%d%d%lf%lf",&p1,&p2,&t1,&t2); f1=maxx(3*p1/10.0,p1-p1/250.0*t1); f2=maxx(3*p2/10.0,p2-p2/250.0*t2); if(f1>f2) printf("Misha"); else if(f1<f2) prin...
// Make sure that interjecting logs updates the "current" log correctly. TEST_F(MetricsLogManagerTest, InterjectedLog) { MetricsLogManager log_manager; MetricsLog* ongoing_log = CreateLog(MetricsLog::ONGOING_LOG); MetricsLog* temp_log = CreateLog(MetricsLog::INITIAL_STABILITY_LOG); log_manager.BeginLoggingWithL...
package org.vaadin.addons.tatu.longpressextension.client; public class LongPressExtensionState extends com.vaadin.shared.AbstractComponentState { public int timeOut = 2000; }
/* * Copyright (C) 2018 Red Hat, Inc. and others. * * 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 */ /*-----------------------------------------...
package ast type Node interface { }
//----------------------------------------------------------------------------- // Description: // Insert a point, assuming the point is unique and does not require a // locator. Tt does not mean it does not use a locator. It just mean that // some implementation may skip the use of a locator. void vtkHyperOctreeC...
package cmd import ( "bytes" "errors" "testing" "github.com/ytakahashi/gecco/aws" "github.com/ytakahashi/gecco/config" "github.com/ytakahashi/gecco/ext" ) type mockedListCommand1 struct{} func (c mockedListCommand1) runCommand() error { return nil } func (c mockedListCommand1) initListCommand(o config.Filte...
package test.expression; import java.io.Serializable; public class Conditional { public void m() { a((true ? new Double(0) : new String())); b((true ? new Double(0) : new String())); c((true ? new Double(0) : new String())); } public void a(Object x) { } public void b(Comparable<?> y) { } public vo...
export const environment = { production: true, globalSpinner : true, modificationFlag : false, serverAPIURL: 'https://cartella.provincia.tn.it/cartella-asl/api', defaultPosition: { 'latitude': 46.1025748, 'longitude': 10.927261 }, aacClientId: "7175611b-cb56-4d76-b516-ee2df4461711", redirectUrl: "https://...
/* * edac_device.c * (C) 2007 www.douglaskthompson.com * * This file may be distributed under the terms of the * GNU General Public License. * * Written by Doug Thompson <norsk5@xmission.com> * * edac_device API implementation * 19 Jan 2007 */ #include <asm/page.h> #include <linux/uaccess.h> #include <linu...
import React, { useEffect, useState } from 'react'; import { Helmet } from 'react-helmet-async'; import { useTranslation } from 'react-i18next'; import { translations } from 'locales/i18n'; import { useInjectReducer, useInjectSaga } from 'utils/redux-injectors'; import CurrencyContainer from './components/CurrencyCon...
<filename>tests/unit/PeopleAndRoles.spec.ts // Libraries import Vue from 'vue' import Vuelidate from 'vuelidate' import Vuetify from 'vuetify' import VueRouter from 'vue-router' import mockRouter from './MockRouter' // Store import { getVuexStore } from '@/store' // Utils import { createLocalVue, mount } from '@vue/t...
package com.idividends.data.dto; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) public class TaskResultTest { @Test public void valuesTest() { TaskResult result = null...
Retina-Based Pipe-Like Object Tracking Implemented Through Spiking Neural Network on a Snake Robot Vision based-target tracking ability is crucial to bio-inspired snake robots for exploring unknown environments. However, it is difficult for the traditional vision modules of snake robots to overcome the image blur resu...
<filename>packages/dm_base/blueprints/base/routes.py from flask import render_template, redirect, request, url_for from jumpscale import j from blueprints.base import blueprint # from blueprints import login_manager login_manager = j.servers.web.latest.loader.login_manager # from blueprints import db # from blueprint...
/** * Content deserializer will try and use the map built up in the ContentMapper class to determine what subtype of * content needs to be created. * * Currently this is dependent on the register map key being the exact same text as the json type property value stored * in the database. * */ public class TrimW...
class PyModelState: """Represents the state of a model.""" Running = 0 Paused = 1 Resetting = 2 Idle = 3 Stopped = 4 Restoring = 5 Stopping = 6
package main import ( "fmt" "os" "regexp" "github.com/wspace/corpus/tools" "golang.org/x/sys/execabs" ) func main() { projects, err := tools.ReadAllProjects() try(err) tools.SortProjectsByID(projects) var badURLs []*tools.Project for _, p := range projects { if p.ID == "" || len(p.Source) == 0 { cont...
/** * Builds a UIDMeta from the current row in the passed result set * @param rset The result set to read from * @param type THe UIDMeta type to build * @return the built UIDMeta */ private UIDMeta buildUIDMeta(final ResultSet rset, final UniqueIdType type) { try { UIDMeta meta = new UIDMeta(type, Unique...
def _thunkByte(c, mask=0xff, shift=0): val = c & mask if shift < 0: val = val >> abs(shift) elif shift > 0: val = val << shift return val
// String returns the textual representation of the game phase, or "Unknown" if // it is not a valid phase. func (p Phase) String() string { switch p { case SetupPhase: return "Setup" case MainPhase: return "Main" case EndPhase: return "End" default: return "Unknown" } }
<filename>NeuralNet.cpp<gh_stars>0 #include "NeuralNet.h"
from os.path import dirname, abspath ROOT = dirname(dirname(abspath(__file__)))
/** * A class to handle arbitrary ad exchange info and write it to file * @author Ben M. Faul * */ public class Inspector extends BidRequest { static String fileName = null; static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH:mm"); public Inspector() { super(); ...
Barrett's Esophagus on Repeat Endoscopy: Should We Look More Than Once? BACKGROUND:Barrett's esophagus (BE) is the precursor lesion for esophageal adenocarcinoma. The major risk factor for BE is chronic gastroesophageal reflux disease (GERD). Screening patients with longstanding GERD for BE with upper esophagogastrodu...
#include <stdio.h> #include <ctype.h> #include <string.h> int main() { char word[101]; int i,j,k,flag=0; scanf("%s",word); if(!isupper(word[0])) //first letter small and rest caps {for(i=1;word[i]!='\0';i++) if(!isupper(word[i])) flag++; if(flag==0) {word[0]=toupper(word[0]); for(j=1;word[j]!='\0';j++) word[j]=tolo...
/** * Creates two lists, one containing the booked tours, * another containing the dates of the bookings. * * Fetch all tourIDs from the table 'booking' in the datebase. * If text input is exactly the same as the tourID, * create a now booking object with the information store in the da...
// As a special case, the JVMS passed to this CallGenerator is // for the method execution already in progress, not just the JVMS // of the caller. Thus, this CallGenerator cannot be mixed with others! CallGenerator* CallGenerator::for_osr(ciMethod* m, int osr_bci) { if (!ParseGenerator::can_parse(m, true)) return ...
Remember Matt Miazga? He's the New York Red Bulls' homegrown center back, one of just two players in that position to survive the off-season cull of the 2014 squad. (The other is Damien Perrinelle. Armando is, we must assume, still a Red Bull merely by technicality - he has a contract, but that largely seems to be in t...
def index(self, word): if word in self._vocabulary: return self._vocabulary.index(word) return self._vocabulary.index(self._unk)
I really love PC games. I’ve been playing them since childhood and I hope I’ll keep up till I’m old and grumpy ☺ One of the games I’m currently playing is Starcraft 2. It is a Real Time Strategy where you play one of 3 different races, manage your economy and command wast armies. Some people call it a modern day chess ...
<reponame>diable201/WEB-development export const categories = [ { id: 1, name: 'Processors' }, { id: 2, name: 'Videocards' }, { id: 3, name: 'HDD, SSD' }, { id: 4, name: 'RAM' }, { id: 5, name: 'Other' } ];
/** * Performs the second pass of the assembly procedure, which actually assembles * the instructions and operands in the program. * @param in Pointer to the file containing the code. It should already * have been opened in "r" mode and should point to the begin- * ning ...
<filename>src/Euler131.hs {-- https://projecteuler.net/problem=131 I referred to SMQ's comments. There is no way to solve this problem solving method. 1) n ^ 3 + n ^ 2 * p = n * n * (n + p) (p is prime) In order for n * n * (n + p) is cubic number, n and (n + p) must be themselves cubic number. Since...
def IPv4ToID(x): if six.PY2: id = int(ipaddress.IPv4Address(x.decode('utf-8'))) else: id = int(ipaddress.IPv4Address(x)) return id
# cook your dish here from math import ceil for _ in range(int(input())): n,k=[int(x) for x in input().split()] a=[int(x) for x in input().split()] s=a[0] res=0 for i in range(1,n): eff=(a[i]/s) if eff>(k/100): change=((100*a[i])-(s*k))/k change=cei...
// Copyright 2015 The Bazel 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 appl...
"""add dem schema Revision ID: c82f8499050e Revises: <KEY> Create Date: 2021-03-16 12:34:20.205965 """ import os from alembic import op import sqlalchemy as sa from api.config import ENV_DEV, WALLY_ENV # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '<KEY>' branch_labels = None depends_o...
/** * The JavaMail authenticator object. Needed for cases where we need to perform * authenticated logins to be able to send mails. */ private class SMTPAuthenticator extends javax.mail.Authenticator { @Override public PasswordAuthentication getPasswordAuthentication() { return new PasswordAut...
import cryptoRandomString from 'crypto-random-string'; import express from 'express'; import { GraphQLBoolean, GraphQLFloat, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLString } from 'graphql'; import { GraphQLJSON } from 'graphql-type-json'; import { cloneDeep, set } from 'lodash'; import plans from '../.....
// implementing validation strategy public class StrategyPattern { public static void main(String[] args) { String stringToValidate = "SSSSSGGFGFGG"; // old school validators List<ValidatorStrategy> oldSchoolValidators = Arrays.asList(new isNotEmptyCheck(), new isUpperCase(), new containsS...
A Novel Carriers Selection Scheme for OFDM with Index Modulation In this paper, we investigate the subcarriers combination selection for OFDM-IM system, which fully utilize transfer rate and diversity gain characteristics of OFDM-IM system based on the lexicographic ordering principle. Aiming at the two optimization p...
/** * The type When. * * @param <I> the type parameter * @param <O> the type parameter */ public static class When<I, O> implements SerializableFunction<I, O> { private final SerializablePredicate<? super I> predicate; private final SerializableFunction<? super I, ? extends O> trueAction...
By on Library DVD borrowing has fallen sharply during the past year, and library users are rapidly migrating toward streaming services for both music and movies, according to the July 2012 edition of LJ‘s Patron Profiles, which examines trends in Media Consumption and Library Use. DVDs are the top format for films lo...
import { ActionOrchestrator } from './action-orchestrator'; import { EntityRequestAction } from '../../../../../store/src/types/request.types'; import { PaginatedAction } from '../../../../../store/src/types/pagination.types'; const BASE_ACTIONS = [ 'get', 'delete', 'update', 'create', 'getMultiple' ]; const...
<reponame>ewok-janitor-external/nova import { ChangeDetectorRef, Component, OnInit } from "@angular/core"; import { ComponentRegistryService, EmbeddedContentComponent, EmbeddedContentConfigurationComponent, EmbeddedContentMode, IDashboard, IWidget, IWidgets, PizzagnaLayer, WidgetType...
package apple.avfoundation; import apple.NSObject; import apple.avfoundation.protocol.AVContentKeyRecipient; import apple.avfoundation.protocol.AVContentKeySessionDelegate; import apple.foundation.NSArray; import apple.foundation.NSData; import apple.foundation.NSDictionary; import apple.foundation.NSError; import app...
/* * 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 writing, software * dis...
def merge(cls, *args): for i, arg in enumerate(args): assert arg.__class__.__name__ == 'ThreeInputsRunner', \ " <ThreeInputsRunner> : {}th arg is not ThreeInputsRunner.".format(i) _input_names_ = args[0]._input_names_ _output_names_ = args[0]._output_names_ __...
/*[ Class --------------------------------------------------------------------- Name: ivWndArray - Utility class to manage a list of windows. Description: Utility class for managing a list of windows. This class is used by ivtWin32Wnd to map Windows window messages back to a class that has created the window. ...
def TDataXtd_Constraint_GetID(*args): return _TDataXtd.TDataXtd_Constraint_GetID(*args)
<reponame>AutumnalDream/tartiflette-plugin-scalars import pytest from tartiflette import Resolver, create_engine @pytest.mark.asyncio async def test_us_currency_ok(): @Resolver("Query.usCurrency", schema_name="test_us_currency_ok") async def us_currency_resolver(*_args, **_kwargs): return 10050 ...
From Al-Itihaad to Al-Shabaab: how the Ethiopian intervention and the ‘War on Terror’ exacerbated the conflict in Somalia Abstract External intervention has frustrated and continues to frustrate peace and stability in the Horn of Africa and Somalia, adding various adverse layers to an already complicated and complex c...
/** * Permet de vider la "memoire" de ce qui a ete insere */ private void viderPaiementEnCours() { for (Piece piece : Piece.values()) { StockPiecePaiement.put(piece, 0); } for (BilletMonnaie billet : BilletMonnaie.values()) { StockBilletPaiement.put(billet, 0); } }
#include <stdio.h> int main() { int i,t,n,d; char ch; long long s; scanf("%d %lld",&n,&s); t = 0; for(i = 1;i <= n;i++){ scanf(" %c",&ch); scanf("%d",&d); if(ch == '+'){ s = s + d; } else if(ch == '-' && d > s){ t++; } ...
<gh_stars>1-10 ############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # ...
<reponame>kylekanos/project-euler-1<filename>python/86.py #!/usr/bin/env python def issquare(n): return (int(round(n**.5)))**2 == n total=m=0 while total < 10**6: m += 1 for ipj in xrange(2*m+1): if not issquare(ipj**2+m**2): continue if ipj > m+1: total += (2*m+2-ipj)/2 else: tota...
use crate::prelude::*; use num::Float; use polars_arrow::kernels::float::*; use polars_arrow::kernels::set::set_at_nulls; impl<T> ChunkedArray<T> where T: PolarsFloatType, T::Native: Float, { pub fn is_nan(&self) -> BooleanChunked { self.apply_kernel_cast(is_nan::<T::Native>) } pub fn is_no...
import { IValidationErrorText } from ".."; export declare class StringTools { static specialCharReplaceSpecific(originalErrorText: IValidationErrorText, character: string, replaceBy: string): IValidationErrorText; static specialCharReplace(originalErrorText: IValidationErrorText, replaceBy: string): IValidation...
// Get the URL of the member selector bool SiGetMemberSelectorUrl(char *url, UINT url_size) { BUF *b; bool ret = false; if (url == NULL) { return false; } b = ReadDump(MEMBER_SELECTOR_TXT_FILENAME); if (b == NULL) { return false; } while (true) { char *line = CfgReadNextLine(b); if (line == NULL) ...
// Test: GeometricArrayGenerator, test the data send is in valid format func TestGeometricArrayGenerator(t *testing.T) { tests := []struct { name string dt string want bool }{ {"validate_build_path_array", "path[]", true}, {"validate_build_polygon_array", "polygon[]", true}, {"validate_build_line_array"...
package android.support.v4.widget; import android.annotation.TargetApi; import android.widget.TextView; @TargetApi(16) /* renamed from: android.support.v4.widget.z */ class C0599z { static int m2546a(TextView textView) { return textView.getMaxLines(); } }
import sys import types from restrain_jit.abs_compiler import instrnames as InstrNames from bytecode import Bytecode, Instr from importlib import _bootstrap from importlib._bootstrap import ModuleSpec from importlib.abc import Loader from contextlib import contextmanager from importlib._bootstrap_external import PathFi...
Bret Peter Tarrant McKenzie, ONZM (born 29 June 1976) is a New Zealand comedian, actor, musician and producer. He is one half of musical comedy duo Flight of the Conchords along with Jemaine Clement. The duo's comedy and music became the basis of a BBC radio series and then an oft-lauded American television series, whi...
/// Returns the global variables used by the given expression or its /// subexpressions. pub fn global_vars(&self) -> BTreeSet<Symbol> { match *self { Expr::AExpr(ref e) => e.global_vars(), Expr::CExpr(ref e) => e.global_vars(), Expr::Let(ref a, ref b) => a.global_vars().into...
The next generation 2018 Porsche 911 test mule has been spotted for the very first time while public road trials in Germany. The prototype features the same body panels like existing 911 with noticeable wider rear wheel arches and protruding fuel cap. Porsche has recently unveiled face-lifted version of 991 and is pla...
/** * Deserializes the version and datum from a stream. * * <p>This method deserializes data serialized via * {@link #writeVersionAndSerialize(SimpleVersionedSerializer, Object, DataOutputView)}. * * <p>The first four bytes will be interpreted as the version. The next four bytes will be * interpreted as t...
package com.app.ecommerce.v1.props; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; public class Preferences { private static final String PREFERENCIA_CLAVE_API = "preferencia.claveApi"; private static SharedPreferences getDefaultSharedPr...
Invited Review: Development of a one-dimensional computational fluid dynamics modeling approach to predict cycle-to-cycle variability in spark-ignition engines based on physical understanding acquired from large-eddy simulation In order to satisfy emission standards and CO2 targets, spark-ignition engines are designed...
<reponame>timc1/timcchang.com import React from 'react' import SectionIndexLayout from '../components/shared/section-index-layout' import styled from '@emotion/styled' import { graphql, Link } from 'gatsby' import { mq } from '../components/shared/global-styles' import SEO from '../components/shared/seo' export defaul...
n,h=map(int,input().split()) c=[] #print(c) # amax=0 temp=-1 for i in range(n): a,b=map(int,input().split()) if a>amax:amax=a;temp=i c.append(b) #k=c[temp] import math c.sort(reverse = True) rt=[num for num in c if num>amax] if h<=sum(rt): sum1=0 i=0 while sum1<h: sum1+=rt[i] i+=...
// generateparenthesesgo // description: Generate Parentheses // details: // Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. // author(s) [red_byte](https://github.com/i-redbyte) // see generateparentheses_test.go package generateparentheses import "strings" fu...
/** * Copyright 2020-2021 Huawei Technologies Co., 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 applicabl...
// GetDataVolume fetches the specified volume by the passed name and namespace and return DataVolumeNotFoundError error in case of // not found object error. func (d *defaultDataVolumeManager) GetDataVolume(ctx context.Context, kubeconfig []byte, name string) (*cdicorev1alpha1.DataVolume, error) { c, namespace, err :=...
<filename>file_op_func.cpp<gh_stars>0 #include <stdlib.h> #include <iostream> #include <stdio.h> #include <fstream> #include <sstream> #include <string> #include <vector> #include <algorithm> #include <string.h> // the below two is linux-related #include <unistd.h> #include <dirent.h> #include <sys/stat.h> // #incl...
def weighted_choice(self, board: Union[chess.Board, int], *, exclude_moves: Container[chess.Move] = [], random: Optional[random.Random] = None) -> Entry: total_weights = sum(entry.weight for entry in self.find_all(board, exclude_moves=exclude_moves)) if not total_weights: raise IndexError() ...
<reponame>langstonhowley/NCH-Wifi-Controller-Android<filename>app/src/main/java/com/nextek/nchcontrol/Bluetooth_Service.java /******************************************************************************* * Copyright 2019 Nextek Power Systems * * Licensed under the Apache License, Version 2.0 (the "License"); * yo...
<filename>src/entities/ErrorEntity.ts export type Errors = | "auth/invalid-email" | "auth/user-not-found" | "auth/invalid-password" | "auth/user-exist" | "auth/password-validation-failed" | "auth/wrong-password" | "auth/weak-password" | "auth/email-already-in-use" | "auth/auth-domain-config-required" ...
def main(args): log_level = logging.DEBUG if args.verbose else logging.WARNING logging.basicConfig(level=log_level, filename=args.logfile) word_counts = Counter() logging.info('Processing files...') for file_name in args.infiles: try: process_file(file_name, word_counts) ...