content
stringlengths
10
4.9M
export { default as MDBoxShadow, IMDBoxShadowProps, } from './box-shadow'; export { default as MDBorderShadow, IMDBorderShadowProps, } from './border-shadow';
/** * The Make repository test. */ @RunWith(SpringRunner.class) @DataJpaTest public class MakeRepositoryTest { @Autowired private TestEntityManager entityManager; @Autowired private MakeRepository repository; /** * Create test. */ @Test public void createTest() { Make ...
package en_decryption import ( "encoding/base64" "fmt" "testing" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/proto" "github.com/Chandler-WQ/experiment/common/pb" ) func TestAesEncrypt(t *testing.T) { //key的长度必须是16、24或者32字节,分别用于选择AES-128, AES-192, or AES-...
Correlation between growth curves and killing curves of Escherichia coli in the presence of fleroxacin and ampicillin. Fleroxacin, a new long-acting quinolone, induces rapid killing and bacterial filamentation as do other quinolones. Ten strains of Escherichia coli were exposed comparatively to fleroxacin and ampicill...
/* * samkumar: I removed locking, statistics, inpcb management, and debug probes. * I also remove codepaths that check for IPv6, since the address is assumed to * be IPv6. The signature used to be * * static int * tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) */ int tcp6_usr_connec...
package seedu.address.storage; import static java.util.Objects.requireNonNull; import java.io.IOException; import java.nio.file.Path; import java.time.Instant; import java.time.format.DateTimeParseException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; import jav...
/* * 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 ...
// Copyright 2011 Google Inc. All Rights Reserved. // Copyright 2017 The Ninja-rs Project Developers. 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:/...
/* * mdblindmarkdirty() -- Mark the specified block "dirty" (ie, needs fsync). * * We have to be able to do this using only the name and OID of * the database and relation in which the block belongs. Otherwise * this is much like mdmarkdirty(). However, we do the fsync immediately * rather than building md/...
def examine_and_propagate_probability(maze, probability_of_containing_target, false_negative_rates, current_pos, target_pos, current_estimated_goal, node): if current_pos == current_estimated_goal: return check_and_propagate_probability(probability_of_containing_target,...
/** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Connection</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link sbsml.impl.ConnectionImpl#getPortB <em>Port B</em>}</li> * <li>{@link sbsml.impl.ConnectionImpl#getPortA <em...
/** * Activity to illustrate how to retrieve and read file contents. */ public class RetrieveContentsActivity extends BaseDemoActivity { private static final String TAG = "RetrieveContents"; /** * Text view for file contents */ private TextView mFileContents; @Override protected void o...
If I had one takeaway from the recent TCAF Librarians and Educators Day, it was that comics as educational tools are here to stay, at least for the way educational goals are set out these days. Visual thinking is a must do, and comics blend verbal and visual thinking to impress information. There’s a reason why we tape...
def add_dense_block(self, in_layer, nb_layers, k, drop, init_weights, name=None): if K.image_dim_ordering() == 'th': axis = 1 elif K.image_dim_ordering() == 'tf': axis = -1 else: raise ValueError('Invalid dim_ordering:', K.image_dim_ordering) list_outp...
/** * Report the use of an induced Salient Descriptor rule. */ public static final SubLObject uiat_salient_descriptor_report_induced_rule(SubLObject interaction, SubLObject sentence) { { SubLObject v_agenda = user_interaction_agenda.ui_agenda(interaction); SubLObject rule_spec ...
# Copyright 2017, <NAME>, All rights reserved. from unittest.mock import patch from threading import Timer from tests.integration.test_web.test_web_app import BaseTestWebApp class TestStatusStreamHandler(BaseTestWebApp): @patch("web.handler.stream_status.SerializeStatus") def test_stream_status_serializes_i...
<reponame>heerzhang/customize-easy-ui-component<filename>ui_book/src/Hooks/pan-responder.ts export * from "react-gesture-responder";
Mandatory public reporting of hospital-acquired infection rates: a report from California. One way to motivate hospitals to improve patient safety is to publicly report their rates of hospital-acquired infections, as California is starting to do this year. We conducted a baseline study of California's acute care hospi...
#include <iostream> using namespace std; char c[200005]; char var[3][3]= {'R','G','B', 'G','B','R', 'B','R','G' }; int dif[3]= {0,0,0}; int difs[3]= {9999999,9999999,999999}; void restart() { for(int i=0; i<3; i++) { dif[i]=0; dif...
import java.util.Scanner; public class CodeFo { public static void main(String[] args) { Scanner scan=new Scanner (System.in); int y=scan.nextInt(); int b=scan.nextInt(); int r=scan.nextInt(); if(y<=r&&y<=b) { if(y==r&&y==b) { y=y-2;b=b-1;r=...
<reponame>htdevelopers/1uphealth-modules import { HttpClientOptions, HttpClientMethod, HttpClientResponse } from './types/main'; // import request from 'request'; import axios, { AxiosResponse } from 'axios'; /** * HttpClient is helper abstraction over the request library. * * @export * @class HttpClient */ expor...
<gh_stars>1-10 import * as ts from "typescript"; import { RouteOptions } from "../types"; export declare function getRouteMetadata(node: ts.Node, sourceFile: ts.SourceFile): RouteOptions[];
def avg_binning(inputArray, resolution): if len(inputArray) <= resolution: return inputArray avg_mag = np.empty(resolution) for i, value in enumerate(np.array_split(inputArray, resolution)): avg_mag[i] = np.mean(value) return avg_mag
/** * Provides tests for the ElementField class * * @author james.evans */ public class ElementFieldTests { /** * An ElementField object should be able to be created */ @Test public void testElementFieldCreation() { FieldInfo info = new FieldInfo("fakeElementName"); ElementField field = ...
<filename>hazelcast/src/main/java/com/hazelcast/internal/monitors/PerformanceMonitor.java /* * Copyright (c) 2008-2015, Hazelcast, Inc. 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...
/** * Include Header */ #include "First.h" namespace ING { namespace Rendering { namespace StandardRP { /** * Constructors And Destructor */ FirstPass::FirstPass(std::string name) : Pass<FirstPassInput, FirstPassOutput>(name) { } FirstPass::~FirstPass() { } /** * Rele...
// There are 3 ways to get the value of an item. We are ensuring // they all match. If this slows down tests we can make it optional func helper_Get(t *testing.T, db DB, key []byte) ([]byte, error) { var actualValueFn []byte err := db.View( func(tx Txn) error { item, err2 := tx.Get(key) if err2 != nil { ...
<filename>Lib/Source/Windows/AbstractTextureShader.cpp #include "../../../Include/Windows/ExtLibs.h" #include "../../../Include/Windows/AbstractTextureShader.h" using namespace A2D; //******************* STATIC _ VARIABLES *****************// // These are the variables held as static for every effect file. // Filena...
def gillespie_algorithm_fixed_times(self, start_time, end_time): times = np.arange(start_time, end_time+0.5, 1, dtype=np.int) interval = end_time - start_time + 1 i_WT, i_A, i_B = self.init_cond large_solution = [] time_solution = [] solution = np.empty((interval, 3), dty...
def find_y( img: np.ndarray, thres: float, tol: float = 10, gthres: float = 0.1 ) -> tuple: y1, y2 = 0, 0 for row in range(img.shape[0]): if img[row].max() > thres: gtruth = np.array(np.unique((img[row] > thres), return_counts=True)).T if gtruth[-1][-1] > gthres * img.shape[1...
Dutch lawmakers say they are set to ban centuries-old Jewish and Muslim traditions of slaughtering animals, but have agreed to a last-minute compromise offering religious groups exemptions if they can prove their method of killing livestock does not cause additional suffering. Centrist lawmakers from several parties —...
/** * @param bean the bean to test * @return whether this aggregate contains and manages the bean */ @Override public boolean isManaged(Object bean) { for (Bean b : _beans) { if (b._bean == bean) return b.isManaged(); } return false; ...
// manageReplicas manages replicas for GameServerSet: 1. scale up/down. 2. inplace updating. // scale up and inpalce updating can operate at the same time. scale down and inpalce updating is as follow: // if inplace updating, then scaling down. scale down the older version(for Running GameServer), // do not scale down ...
#if 0 /// Copyright (c) Titan Robotics Club. All rights reserved. /// /// <module name="sm.h" /> /// /// <summary> /// This module contains the library functions to handle state machines. /// </summary> /// /// <remarks> /// Environment: RobotC for Lego Mindstorms NXT. /// </remarks> #endif #ifndef _SM_H #defi...
/** * Method called to configure the generator as necessary and then * call write functionality */ protected final void _configAndWriteValue(JsonGenerator jgen, Object value) throws IOException, JsonGenerationException, JsonMappingException { if (_prettyPrinter != null) { ...
This article is over 2 years old Cambridgeshire station was used only 12 times in 2015-16, figures show, while nearly 100m journeys were made through London Waterloo The quietest train station in Britain is used by the equivalent of just one passenger per month, latest figures show. Shippea Hill station in Cambridge...
use glob::glob; use polars::prelude::*; use std::env; use std::fs::{canonicalize, File}; use std::io::Write; use std::process::exit; use std::time::Instant; fn read_df(f: File) -> DataFrame { let mut df = CsvReader::new(f) .infer_schema(Some(100)) .has_header(true) .finish() .expect...
def encode_state_v2(self, state): encoded_state = np.zeros(len(self.state_space)) encoded_state[self.state_space.index(state)] = 1 if self.debug: print('encode_state_v2: ', state, ' -> ', encoded_state) return encoded_state
/** * Test of getType method, of class Scooter. */ @Test public void testGetType() { int obtido = scooter.getType(); int esperado = Scooter.SCOOTER_CITY_ID; assertEquals(esperado, obtido); }
<filename>2021/day12/day12_test.go package main import ( "github.com/stretchr/testify/assert" "testing" ) func TestDay12(t *testing.T) { input := []string{ "start-A", "start-b", "A-c", "A-b", "b-d", "A-end", "b-end", } output := Day12(input) assert.Equal(t, 10, output, "they should be equal") } f...
def _authenticate(self, *payloads, **options): if self._is_revoked(*payloads, **options): raise UserCredentialsRevokedError(_('User credentials are revoked.')) self._pre_authenticate(*payloads, **options) user_payload = self._get_user_related_payload(*payloads, **options) use...
Tenuigenin exhibits anti-inflammatory activity via inhibiting MAPK and NF-κB and inducing Nrf2/HO-1 signaling in macrophages. Tenuigenin (TNG), isolated from the root of the Chinese herb Polygala tenuifolia, possesses various biological and pharmacological activities, including anti-oxidation and anti-inflammation act...
// peek returns the log number at the head of the recycling queue, or zero if // the queue is empty. func (r *logRecycler) peek() FileNum { r.mu.Lock() defer r.mu.Unlock() if len(r.mu.logNums) == 0 { return 0 } return r.mu.logNums[0] }
<filename>il/container/2d/SparseMatrixCSR.h //============================================================================== // // Copyright 2018 The InsideLoop 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 ...
package com.tiagozenicola.levenshtein.helper; public class MathHelper { public static int min(Integer... integers) { int min = Integer.MAX_VALUE; for (Integer integer : integers) { min = Math.min(integer, min); } return min; } }
Time, the weekly news magazine founded by CIA operative Henry Luce, is pushing the transgender agenda as the next civil rights movement. A photo of Laverne Cox, the star of Orange Is the New Black, a comedy-drama television show produced by Netflix, is featured on the cover of the June 9 edition of the magazine. Evan...
<gh_stars>10-100 /* Algorithm for Influence Estimation and Maximization Copyright (c) Microsoft Corporation All rights reserved. MIT License 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 So...
/** * Controllers expose the REST Api. They do not implement business logic but call the service * layer to perform the required operations and return JSON responses. */ @Api(tags = "users") @RestController @RequestMapping(value = "/users") public class UserController { private UserService userService; @Autowir...
<reponame>floripabit/nativescript-ip-protocol import { Observable } from 'rxjs'; export declare class UdpProtocol extends NSObject implements GCDAsyncUdpSocketDelegate { static ObjCProtocols: { prototype: GCDAsyncUdpSocketDelegate; }[]; private udpServerSubject; private udpClientSubject; pri...
<gh_stars>1-10 /******************************************************************************* Copyright (C) 2015 Annapurna Labs Ltd. This file may be licensed under the terms of the Annapurna Labs Commercial License Agreement. Alternatively, this file can be distributed under the terms of the GNU General Public Lic...
/** * Rpc reports the information to lookout. * * @author <a href="mailto:lw111072@antfin.com">LiWei.Liangen</a> */ public class RpcLookout { /** * slf4j Logger for this class */ private final static Logger LOGGER = LoggerFactory.getLogger(RpcLookout.class); private final RpcLookoutId ...
// NewFileDataStore creates a new file-based store for blob contents. // All data is stored in a single file, where all blobs are concatenated // directly. As the file pointer wraps around at a configured size, old // data is automatically overwritten by new data. func NewFileDataStore(file ReadWriterAt, size uint64) D...
<reponame>kcm5756/nest-exam1 import { ApiTags, ApiBearerAuth, ApiResponse } from '@nestjs/swagger'; import { Controller, Get, HttpCode, HttpStatus, ValidationPipe, Query, UseGuards, UseInterceptors, } from '@nestjs/common'; import { AuthUser, Roles } from 'decorators'; import { UserEntity } from 'module...
Unrestrained nociceptive response and disregulation of hearing ability in mice lacking the nociceptin/orphaninFQ receptor In the G‐protein‐coupled receptor superfamily, the opioid receptor subfamily is constituted of the three distinct opioid receptors (namely δ‐, μ‐ and κ‐subtypes) and the receptor for nociceptin (al...
<reponame>dragarth-7/knotx-server-http<gh_stars>0 /* * Copyright (C) 2019 Knot.x Project * * 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-...
t = int(input()) from math import sqrt def solve(n): moves = 0 x = sqrt(n) if not x.is_integer(): x = int(x) + 1 moves += int(x) - 1 rest = (n-x) / x moves += int(rest) if not rest.is_integer(): moves += 1 return moves for i in range(t): ...
<filename>resources/src/classes/variable/Variable.ts import Return from "../../utilities/Return" export default class Variable { name: string value: any constructor(name: string, value: number | string) { this.name = name this.value = value } validateName(): Return { if(t...
def add_converted(self, converted_file): self._converted.append(converted_file) return self._converted
<reponame>badboyd/ultimate-go<filename>awesome-go/go-flags/main.go package main import ( "fmt" "github.com/jessevdk/go-flags" "os" ) type Options struct { Version bool `short:"v" long:"version" description:"Print version"` Debug bool `short:"d" long:"debug" description:"Enable debugging mode"` URL str...
//Funcao para escrever numeros na tela sem recursividade void contador(int num){ for(int i=0; i <= num; i++){ cout << i <<"\n"; } }
/** * Closes this popup. This method is extended to remove the control * listener. * * @return <code>true</code> if the window is (or was already) closed, * and <code>false</code> if it is still open */ @Override public boolean close() { ...
import React from 'react'; interface Props {} const Container: React.FC<Props> = props => { return <div data-component="Container">{props.children}</div>; }; export default Container;
#ifndef MOONSTONE_H #define MOONSTONE_H #include <iostream> #include <vector> #include <map> #include <string> #include "System.h" #include "Entity.h" #include "Component.h" #include "RenderSystem.h" #include "RenderComponent.h" class Moonstone { public: void Update(float elapsedTime); void AddSystem(System ...
Photo: Ben Leuner/AMC Walt and Jesse haven’t been cooking meth for as long as you might think. Photo: Ben Leuner/AMC Fans of Breaking Bad, which returns for its fourth season this Sunday, know that nothing — not even meth — is more valuable to Walter White than time. He doesn’t have much of it left, what with the can...
// Recv implements part of the channel.Channel interface. It delegates to the // wrapped channel and calls the trigger when the delegate returns io.EOF. func (c triggered) Recv() ([]byte, error) { msg, err := c.ch.Recv() if err == io.EOF { c.trigger() } return msg, err }
package app import ( "fmt" "strconv" "github.com/dcos/dcos-cli/api" "github.com/dcos/dcos-core-cli/pkg/marathon" goMarathon "github.com/gambol99/go-marathon" "github.com/spf13/cobra" ) func newCmdMarathonAppStart(ctx api.Context) *cobra.Command { var force bool var instances int cmd := &cobra.Command{ Us...
<reponame>dqmis/neuralTPPs-1 from tpp.models.base.enc_dec import EncDecProcess from tpp.models.encoders.stub import StubEncoder from tpp.models.decoders.poisson import PoissonDecoder from typing import Optional class PoissonProcess(EncDecProcess): def __init__( self, multi_labels: Optiona...
// Takes in the maximum amount of passes to complete private void optimize(int maxPasses) { if (maxPasses < 1) { System.out.println("Max Passes must be >= 1, using 1"); maxPasses = 1; } int lastResult = -1; int secondLastResult = -1; for (int i = 0; i < ma...
Themed Colony Deeds by themrpiggy22 1.x Compatible - Also available on Steam Workshop Building a colony, but don't want that hi-tech colony deed standing out like a sore thumb in the corner of your medieval Glitch village? Well you're in luck! This mod adds a variety of different colony deeds to suit in with your ...
def save_session_minutes_revision(session, file, ext, request, encoding=None, apply_to_all=False): minutes_sp = session.sessionpresentation_set.filter(document__type='minutes').first() if minutes_sp: doc = minutes_sp.document doc.rev = '%02d' % (int(doc.rev)+1) minutes_sp.rev = doc.rev ...
m1 = 1 # digits = int(input("How many digits of pi would you like to compute?")) m2 = 10**3 print(m2) # Mass of object initially at rest : m1 # Mass of object moving initially : m2 initvector = [0 ,1] # [Velocity of m1, Velocity of m2) currentvector = initvector[:] def mulA(vec): msum = (m1 + m2) a11...
<reponame>bytesfield/typescript-node-auth<filename>src/app/responses/index.ts import success from './success'; import created from './created'; import badRequest from './badRequest'; import forbidden from './forbidden'; import notFound from './notFound'; import validationFailed from './validationFailed'; import serverE...
package edu.harvard.dbmi.avillach.service; import java.util.HashMap; import java.util.UUID; import edu.harvard.dbmi.avillach.data.entity.Resource; import edu.harvard.dbmi.avillach.data.repository.ResourceRepository; import edu.harvard.dbmi.avillach.domain.QueryRequest; import edu.harvard.dbmi.avillach.domain.SearchRe...
ABA-glucose ester hydrolyzing enzyme ATBG1 and PHYB antagonistically regulate stomatal development The integration of conflicting signals in response to environmental constraints is essential to efficient plant growth and development. The light-dependent and the stress hormone abscisic acid (ABA)-dependent signaling p...
/** * 6.3 Test Pending Fault A */ public class Part03Controller extends PartController { public Part03Controller(DataRepository dataRepository) { this(Executors.newSingleThreadScheduledExecutor(), new BannerModule(), DateTimeModule.getInstance(), dataRepository, ...
<filename>docs/sidebar.tsx import { css, cx } from "@emotion/css"; import colors from "./foundations/colors"; import Link from "next/link"; import { useRouter } from "next/router"; import routes, { samples, foundation } from "./routes"; const rootCss = css` grid-area: sidebar; border-right: 1px solid ${colors...
from app import create_app server = create_app()
<reponame>leiferikb/bitpop-private // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_service_unittest.h" #include <algorithm> #include <set> #include <ve...
package xena import ( "crypto/ecdsa" "crypto/rand" "crypto/sha256" "crypto/x509" "encoding/hex" "fmt" "math/big" "time" ) func sing(apiSecret string) (nonce int64, payload, sigHex string, err error) { var privKeyData []byte var privKey *ecdsa.PrivateKey var r, s *big.Int nonce = time.Now().UnixNano() pa...
<gh_stars>0 import { User } from '../user/user.entity'; import { UserInfo } from '../user-info/user-info.entity'; import { Client } from '../client/client.entity'; import { Case } from '../case/case.entity'; import { Notification } from '../notification/notification.entity'; import { Lawsuit } from '../lawsuit/lawsuit....
/*- * #%L * Bobcat * %% * Copyright (C) 2016 Cognifide 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 requi...
<filename>formatter/map.go<gh_stars>0 /** * Copyright 2021 The gutenfmt 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 * * https://www.apache.org/licenses/LICENSE-2.0 * ...
/** * Immutable client configuration. */ public final class IgniteClientConfigurationImpl implements IgniteClientConfiguration { /** Address finder. */ private final IgniteClientAddressFinder addressFinder; /** Addresses. */ private final String[] addresses; /** Retry limit. */ private final...
Immunocytochemical evidence for the maintenance of cytochrome P-450 isozymes, NADPH cytochrome C reductase, and epoxide hydrolase in pure and mixed primary cultures of adult human hepatocytes. Specific polyclonal antibodies were used to investigate the distribution of two cytochrome P-450 isozymes (5 and 8), NADPH cyt...
// LICENSE NOTICE ================================================================================== /** * netzhaut - Web Browser Engine * Copyright (C) 2020 The netzhaut Authors * Published under MIT */ // INCLUDE ========================================================================================= #include...
def load(cls, directory=None, use_default=True) -> "Config": if directory is None: directory = getcwd() path.insert(0, str(directory)) try: from config import config except ModuleNotFoundError as err: msg = f'Did not find a "config.py" file in {directo...
def _estimate_pauli_traces_clifford(n_qubits: int, clifford_state: cirq.CliffordState, n_clifford_trials: int): d = 2**n_qubits stabilizer_basis = clifford_state.stabilizers() pauli_traces = [] for _ in range(n_clifford_trials): ...
/// Save the paper as a pdf from the information stored by the structure. pub async fn fetch_pdf(&self, out_path: &str) -> Result<()> { let body = reqwest::get(&self.pdf_url).await?.bytes().await?; let out_path = if out_path.ends_with(".pdf") { out_path.to_string() } else { ...
package tech.geocodeapp.geocode.geocode; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.Mockito.lenient; import org.mockito.Mock; import org.junit.jupiter.api.*; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mockito; import org.mockito.junit.jupiter...
PLANTATION'*** E-text prepared by Juliet Sutherland, Leonard Johnson, and the Project Gutenberg Online Distributed Proofreading Team (http://www.pgdp.net) Note: Project Gutenberg also has an HTML version of this file which includes the original illustrations. See 24950-h.htm or 24950-h.zip: (http...
<gh_stars>100-1000 #ifndef CondFormats_DataRecord_ESWeightStripGroupsRcd_H #define CondFormats_DataRecord_ESWeightStripGroupsRcd_H #include "FWCore/Framework/interface/EventSetupRecordImplementation.h" class ESWeightStripGroupsRcd : public edm::eventsetup::EventSetupRecordImplementation<ESWeightStripGroupsRcd> {}; #en...
// ExtFileNames returns all the file names with given extension(s) in directory // in sorted order (if exts is empty then all files are returned) func ExtFileNames(path string, exts []string) []string { f, err := os.Open(path) if err != nil { return nil } files, err := f.Readdirnames(-1) f.Close() if err != nil...
n, k = map(int, input().split()) r, s, p = map(int, input().split()) t = input() dp = [0] * (len(t) + 1) dp[0] = 0 def pon(d): if d == 'r': return p elif d == 's': return r else: return s m = [] for i,j in enumerate(t): m.append(j) if i >= k: if m[i-k] == j: dp[i+1] = dp[i]...
<filename>src/books/books.service.ts import { BooksDto } from './../dto/books.dto'; import { Injectable, NotFoundException, HttpException } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; import { BooksInterface } from 'src/books/books.model'; @Injectable() expo...
<reponame>w1nds/dota-voidhack #pragma once #include "vh.h" #include "GameEventListener.h" class C_DOTAPlayer; class C_DOTAAbility; // you can't run from heaven class CZeusManager : public CGameEventListener, public IFrameManager { public: CZeusManager(); public: void Init(); void Shutdown(); private: v...
def _EnsureJunction(cache_dir, options, repo): target_dir = _GetCasedFilename(os.path.normpath( os.path.join(cache_dir, repo.remote_dir))) if not options.dry_run and not os.path.isdir(target_dir): raise Exception('Checkout does not contain the desired remote folder.') create_link = True if os.path.exi...
import moment from 'moment'; import he from 'he'; import split, { Options } from 'split-string'; import ical from 'ical'; import { SMILMediaSingle } from '../../../models/mediaModels'; import { PlaylistElement } from '../../../models/playlistModels'; import { SMILScheduleEnum } from '../../../enums/scheduleEnums'; imp...
. Despite epidemiological evidence in favour of cardiovascular prevention, many surveys show that only a minority of patients with coronary heart disease are receiving hypolipidemic therapy. The compliance is the neglected issue in preventive cardiology, for many reasons. The patients are reluctant to change their lon...
a=[] b=[] while True: try: a.append(input()) except: break n=int(a[0]) b=a[1].split(' ') min=int(b[0]) max=int(b[0]) m=0 x=0 for i in range(len(b)): if int(b[i])>max: m+=1 max=int(b[i]) if int(b[i])<min: x+=1 min=int(b[i]) print(m+x)
<filename>pomodoro.py from app import server