content
stringlengths
10
4.9M
/** * @param fragment {@link Fragment} invoking the integration. * {@link #startActivityForResult(Intent, int)} will be called on the {@link Fragment} instead * of an {@link Activity} */ public static IntentIntegrator forSupportFragment(android.support.v4.app.Fragment...
Low-cost solar water heater This paper presents an overview of the use of solar energy for domestic water heating purposes. In addition, the results of a preliminary research to develop a low cost system for heating water using solar energy, a green energy source is also included. For the system presented herewith, th...
/** * Metodo para crear la password de forma aleatoria. */ public void crearPassword() { password = ""; char[] minusculas = "abcdefghijklmnopqrstuvwxyz".toCharArray(); char[] mayusculas = "abcdefghijklmnopqrstuvwxyz".toUpperCase().toCharArray(); char[] numeros = "0123456789".toCharArray(); char[] simbolos...
/** * Flatten categories as expected by Hub * * @param {any} categoriesAggs categories aggs array as [{ key, docCount }] * @returns {any} * * Input example: * [{ key: '/categories/economy', docCount: 4 }, { key: 'categories/economy/business', docCount: 5 }] * Output: [{ key: 'economy', docCount: 9 }, { key: 'bu...
def parse_readout(self, readout_string): syn_len = (self.d ** 2 - 1) // 2 chunks = readout_string.split(" ") int_syndromes = [int(x, base=2) for x in chunks[-1:0:-1]] xor_syndromes = [a ^ b for (a, b) in zip(int_syndromes, int_syndromes[1:])] mask_Z = "1" * syn_len mask_X...
<gh_stars>1-10 package logrotate import ( "bytes" "fmt" "io" "os" "sync" "time" ) var _ io.WriteCloser = (*Logrotate)(nil) // Logrotate struct type Logrotate struct { sync.Mutex Age time.Duration Num int Size int Timestamp bool file *os.File sTime time.Time size int64 } ...
Facetoplasty Using Radiofrequency Thermocoagulation for Facet Joint Hypertrophy. UNLABELLED Lumbar spinal stenosis is one of most common pathologic conditions affecting the lumbar spine. Pain and/or disability in the low back and lower extremities with or without neurogenic claudication may occur as a result of compre...
/** * MigrateRepoForm form for migrating repository */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class MigrateRepoForm { @JSONField(name = "auth_password") private String authPassword; @JSONField(name = "auth_username") private String authUsername; @JSONField(name = "clone_add...
Constitutional promises of indigenous recognition: Canada, Vanuatu and the challenges of pluralism The Constitutions of Canada and Vanuatu commit to recognition of ‘Aboriginal rights’ and ‘customary laws’, respectively. The translation of these aspirations has led the courts deep into the challenges of pluralism, magn...
/** * An AudioFiller implementation for feeding data from a PCMFLOAT wavetable. * We do simple, linear interpolation for inter-table values. */ public class WaveTableSource extends AudioSource { @SuppressWarnings("unused") private static String TAG = WaveTableSource.class.getSimpleName(); /** The samples de...
/** * This method will retry a given function if the resource is still in the "Terminating" phase. We need to catch this exception * because the parsing of JSON responses is buggy: https://github.com/kubernetes-client/java/issues/86 * * @param obj The object that will be passed to the function ...
/** * @file AnimalSilvestre.cpp * @brief Implementação da classe AnimalSilvestre. * @author * <NAME>, * <NAME>, * <NAME>. */ #include "AnimalSilvestre.h" /** * @brief Construtor padrão da classe AnimalSilvestre. */ AnimalSilvestre::AnimalSilvestre(){} /** * @brief construtor parametrizado da classe AnimalSilvestre....
/** * To represent a newline value. */ protected static class NewlineValue { protected final String value; protected NewlineValue(String val) { value = val; } public String getValue() { return value; } }
// TextToDialogParagraphs multi-line text to DialogParagraph instance. func TextToDialogParagraphs(lines []string) []*DialogParagraph { var msgs []*DialogParagraph for _, line := range lines { msgs = append(msgs, NewDialogParagraph(line)) } return msgs }
<reponame>acumos/python-model-runner<filename>examples/chain_models.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- # ===============LICENSE_START======================================================= # Acumos Apache-2.0 # =================================================================================== # Copyrigh...
<reponame>BrandonTang89/CP4_Code /* Kttis - errands A seemingly easy shortest Hamiltonian path question is made a lot longer due to the need to map string locations to their 2d grid locations and also the need to print the optimal route rather than just its length. This requires a conversion from location names to a ...
<filename>src/main/java/calculator/validation/SourceRule.java /* * 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 unde...
package de.discord.manage.managers; import java.sql.ResultSet; import java.sql.SQLException; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import de.discord.core.Error; import de.discord.core.RadioBot; import de.discord.manage.other.Utils; import de.discord.m...
package com.turboconsulting.Service; import com.turboconsulting.DAO.*; import com.turboconsulting.Entity.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.s...
Selective internalization of granule membrane after secretion in mast cells. Galactose, covalently bound to cell surface glycoconjugates of rat peritoneal mast cells, was used to study internalization of labeled plasma membrane and granule membrane constituents before or after secretion stimulated by compound 48/80. ...
module ReaderMonad where import Control.Monad import Control.Monad.Reader import Data.Map.Strict import qualified Data.Map.Strict as M type Env = Map SymName Value type SymName = String type Value = String -- | Find a value related to a symbol if present in the -- env in Reader Monadic Context findVal :: SymName ...
<reponame>GaiheiluKamei/Algorithms<filename>offer/06_PrintListInReverse/reverse_test.go package offer import ( "reflect" "testing" ) var ( n1 = &Node{5, n2} n2 = &Node{4, n3} n3 = &Node{3, n4} n4 = &Node{2, n5} n5 = &Node{1, nil} ) func TestDoubleRangeVersion(t *testing.T) { // 多个节点的链表 if !reflect.DeepEqual...
#include <stdio.h> #include <stdlib.h> #include <string.h> int finding(char str[]) { int i,flag,len; len=strlen(str); flag=1; for(i=0;i<len;i++) { if(str[i]!='4'&&str[i]!='7') { flag=0; break; } } if(flag==1) return 1; else...
/** * Attempts to use given method as an adapter. * * @param executableElement the method to process * @return adapter mapping data or empty if errors occurred */ private Optional<AdapterMethodDeclaration> createAdapterMethod(ExecutableElement executableElement) { var returnType = execu...
<filename>article/usecase/usecase.go package usecase import ( "context" "regexp" "strconv" "strings" "time" "github.com/google/uuid" "github.com/pkg/errors" "github.com/situmorangbastian/ambarita/models" "github.com/situmorangbastian/eclipse" ) type usecase struct { repository models.ArticleRepository } ...
// Creates a new Block from Sparkey files. On success, takes ownership of the // log file and index file. func newBlockFromSparkey(storePath string, logPath string, partition int) (*Block, error) { success := false name, id := newBlockName(partition) dstLog := filepath.Join(storePath, name) dstIdx := sparkey.HashFi...
def _inject_request_id(request: Request) -> Request: if request.id is not None: return request request_dict = request.to_dict() request_dict["id"] = f"{request.method}_{randrange(_REQ_ID_MAX)}" resp = Request.from_dict(request_dict) assert resp.id is not None return resp
def _incomplete_str_support(self, param:'str', metadata_dict:'dict') -> str: try: assert isinstance(param, str), 'parameter must be of type str' multi_keys = {} for text in metadata_dict.keys(): if param.upper() in text: multi_keys[text] = ...
/** * Test of get method, of class MySet. */ @Test public void testGet() { int index = 2; MySet set = new MySet(); set.add(1); set.add(2); set.add(3); set.add(4); Object expResult = 3; Object result = set.get(index); assertEquals(expR...
#include <stdio.h> char *b[2]={"C.",".C"}; int res,n,k; int main(){ scanf("%i", &n), res=n; k=n%2?n/2:n/2-1; res+= 2*k*(n-k-1); printf("%i\n", res); for(int i=0 ; i<n ; i++, puts("")) for(int j=0 ; j<n ; j++) putc(b[i%2][j%2], stdout); }
////// Copyright 2021 by <NAME> ////// Licensed under the Apache 2.0 License #include "nbw/NonBlockingWire.cpp" #include "nbw/nb_twi.c"
#include <dgl/array.h> #include <dgl/immutable_graph.h> #include <dgl/zerocopy_serializer.h> #include <dmlc/memory_io.h> #include <gtest/gtest.h> #include <algorithm> #include <iostream> #include <vector> #include "../../src/graph/heterograph.h" #include "../../src/graph/unit_graph.h" #include "./common.h" #ifndef _...
package keybaser import ( "strings" ) // helpCommand shows commands list and usage func (k *Keybaser) helpCommand() *CommandDefinition { return &CommandDefinition{ Description: "show commands list and usage", Handler: func(request Request, response ResponseWriter) { var msg strings.Builder msg.Grow(len(k....
def ExtractOneFile(aar, name, abs_output_dir): if os.name == "nt": fullpath = os.path.normpath(os.path.join(abs_output_dir, name)) if name[-1] == "/": with junction.TempJunction(fullpath.rstrip("/")) as juncpath: pass else: with junction.TempJunction(os.path.dirname(fullpath)) as juncp...
def findChildNodeOfTypeWithParms(parentnode, nodetype, parmlist, dorecurse=False, basetypematch=False): return hou.Node()
package br.com.economize.dao; /** * @author <NAME> * */ import org.junit.Test; import br.com.economize.domain.Categoria; public class CategoriaDAOTest { @Test public void salvarCategoria() { CategoriaDAO categoriaDAO = new CategoriaDAO(); Categoria categoria = new Categoria(); categoria...
def load(config_string, default_name=None): split = windows_friendly_colon_split(config_string) if len(split) > 1: module_name, object_name = ":".join(split[:-1]), split[-1] else: module_name, object_name = config_string, default_name module = get_module(module_name) if object_name: ...
<filename>packages/sun-react-ui/src/Spin/Spin.tsx import React, { HTMLAttributes } from 'react'; import classnames from 'classnames'; import { Loader as LoadingIcon } from 'sun-react-icons'; import './style.less'; type Size = 'default' | 'small' | 'large'; interface BaseSpinProps { size?: Size; tip?: React.ReactNo...
I have been creating several adventure maps in Minecraft. This page logs my efforts. Willow’s Challenge was the first Adventure Map I made. Can you get past the challenges to reach the cake? Can you find all nine Gold Bricks? (Made in Minecraft 1.7.2). The Glass Maze will challenge your wits! The Paintball Arena wil...
module Web.WitAI.Types ( module Web.WitAI.Types.Requests , module Web.WitAI.Types.Responses , module Web.WitAI.Types.Static , WitAIConverseSettings (..) , WitAIConverseHandlers (..) , WitAIException (..) ) where import Data.Text import Control.Exception import ...
a, b, c = map(int, input().split()) def iroha(a,b,c): if (a==5 or a==7) and (b==5 or b==7) and (c==5 or c==7) and a+b+c==17: return "YES" else: return "NO" print(iroha(a,b,c))
<reponame>KenzieMac130/-ABANDONED-old-engine #include "asEntry.h" #include "../common/asCommon.h" #include "asOsEvents.h" #include "../renderer/asRendererCore.h" #include "../resource/asUserFiles.h" #include "../input/asInput.h" #include "../common/preferences/asPreferences.h" #if ASTRENGINE_NUKLEAR #include "../nuklea...
// CombineLines reads lines of characters (usually the output from // SplitToLines) and combines them into a stream of characters (minus // the new line characters). The stream of characters can be read from // the returned PipeReader. func CombineLines(r io.Reader) *io.PipeReader { rRdr, rWtr := io.Pipe() go func()...
Stress and Prolactin Effects on Bone Marrow Myeloid Cells, Serum Chemokine and Serum Glucocorticoid Levels in Mice Objective: Current evidence supports the conclusion that prolactin (PRL) is not an obligate immunoregulatory hormone and influences the immune system predominantly during stress conditions. In this study,...
/** * Tests {@link XmlProvisioningTargetsProvider#findTarget(Class)} when run * against a targets XML document that has properties that weren't set, and * thus weren't filtered. */ @Test public void findTargetWithUnfilteredProperties() { @SuppressWarnings("unchecked") DataSourceProvisionersManager provisio...
def cleanForDemo(filename): data = pd.read_csv(filename) data=cleanObject(data) data=cleanNumeric(data) data=data.dropna() not_payed_indexes = [1,2,3,5] payed = [0] def adapt_loan_status(label): if label in not_payed_indexes: return(0) elif label in payed: ...
/** * Reads file content from ADLS Gen 1 asynchronously. */ public class AdlsAsyncFileReader extends ReusableAsyncByteReader implements ExponentialBackoff { static class RemoteException { private String exception; private String message; private String javaClassName; public String getException() { ...
package org.smart.orm.operations.type; import org.smart.orm.Model; import org.smart.orm.OperationContext; import org.smart.orm.data.JoinType; import org.smart.orm.data.LogicalType; import org.smart.orm.data.NodeType; import org.smart.orm.data.StatementType; import org.smart.orm.execution.Executor; import org.smart.orm...
/** * Parse HTTP request query - generate request parameters. This filter is needed * since WebSphere throws away parameters which lack values (e.g. * ...?create&resource-uri=abc - create parameter gets discarded). */ public class WebSphereParametersFilter implements Filter { public static final String CONTENT...
""" A Nash equilibrium is a two-player strategic game – similar to the Prisoner's dilemma – that represents a "steady state" in which every player sees the "best possible" outcome. However, this doesn't mean that the outcome linked to a Nash equilibrium is the best overall. Nash equilibria are more subtle than this. An...
Farmers and food executives appealed fruitlessly to federal officials yesterday for regulatory steps to limit speculative buying that is helping to drive food prices higher. Meanwhile, some Americans are stocking up on staples such as rice, flour and oil in anticipation of high prices and shortages spreading from overs...
/** * Lives, divides to reproduce. * * User: mbs207 */ public class Amoeboid extends Beast implements Runnable,Serializable { final Ellipse2D shape; transient NaturalSelection model; transient NaturalTerrain nt; //traits Point2D good_terrain; TerrainTypes affinity_terrain; ...
<filename>src/MaybeConverter.ts import {Composable} from './Composable' import {MaybeSelector} from './MaybeSelector' import {Selector} from './Selector' import {Converter} from './Converter' import {Get, GetSignature} from './Get' import {Set} from './Set' import { Extension } from './Extension'; import { Memoize } fr...
def html(self): html = markdown.markdown('\n'.join(self.body)) if self.style: return premailer.transform('<style>\n' + self.style + '\n</style>\n' + html) return html
// evalCompositeStructLit evaluates a composite struct literal. func (sc *scope) evalCompositeStructLit(cl *ast.CompositeLit) reflect.Value { val := reflect.New(sc.typeOf(cl.Type)) for idx, elt := range cl.Elts { switch expr := elt.(type) { case *ast.KeyValueExpr: switch kexpr := expr.Key.(type) { case *ast...
def template_staging_directory(staging_directory, problem): dont_template = copy(problem.dont_template) + [ "app/templates", "problem.json", "challenge.py", "templates", "__pre_templated", ] dont_template_files = list(filter(isfile, dont_template)) dont_template_d...
inp=input() lst=list() for i in inp.split(' '): lst.append(int(i)) lst.sort(reverse=True) sum=lst[0] a=lst[0]-lst[1] b=lst[0]-lst[2] c=lst[0]-lst[3] print(a,b,c)
def all_true(results): return filter(lambda r: r.value, results)
/** * Helper base class for comparison functions like max and min. */ public abstract class CompareFunction extends ArrayMathFunction { public CompareFunction() { super(ArgumentConstraints.typeOf(JmesPathType.NUMBER, JmesPathType.STRING)); } /** * Subclasses override this method to decide whether the gr...
The design of a rotating associative array memory for a relational data base management application There are significant advantages to tailoring hardware storage devices to support high level data models in very large data bases. A storage device that can assume some of the data selection functions traditionally perf...
File photo of United Launch Alliance launching an Atlas V rocket with an United States Air Force OTV-4 onboard from Cape Canaveral Air Force Station, Florida, May 20, 2015. REUTERS/Michael Brown WASHINGTON (Reuters) - The Pentagon said on Friday its inspector general will investigate comments made by a former executiv...
/** * generate a random string with the characters defined by the salt string * @param length the length of the string to be generated * @return random generated string */ public String generateRandomString(final int length) { if (length < 1) { throw new IllegalArgumentException(...
package graphql.language; import java.util.List; public class AstComparator { public boolean isEqual(Node node1, Node node2) { if (!node1.isEqualTo(node2)) return false; List<Node> childs1 = node1.getChildren(); List<Node> childs2 = node2.getChildren(); if (childs1.size() != chi...
<reponame>joshhunt/bungie-api-golang package bungieapigo // This component returns references to all of the Vendors in the response, grouped by // categorizations that Bungie has deemed to be interesting, in the order in which both the groups // and the vendors within that group should be rendered. type DestinyVendorG...
package s3inventory import ( "fmt" "time" "github.com/cznic/mathutil" "github.com/go-openapi/swag" "github.com/spf13/cast" "github.com/xitongsys/parquet-go/parquet" "github.com/xitongsys/parquet-go/reader" "github.com/xitongsys/parquet-go/schema" ) type ParquetInventoryFileReader struct { *reader.ParquetRea...
Just a Dare or Unaware? Outcomes and Motives of Drugging (“Drink Spiking”) Among Students at Three College Campuses Objective: Drugging (administering a drug to someone without their knowledge or consent) is acknowledged as a problem in “watch your drink” campaigns. However, research on this phenomenon is nascent. Pri...
/** * Tests event processor is active after HMS restarts. */ @Test public void testEventProcessorFetchAfterHMSRestart() throws ImpalaException { CatalogServiceCatalog catalog = CatalogServiceTestCatalog.create(); CatalogOpExecutor catalogOpExecutor = new CatalogOpExecutor(catalog, new NoopAuthor...
/* ***************************************************************************** * Copyright 2011 See AUTHORS file. * * 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.a...
def finish_render(): global _window _window.flip()
<gh_stars>1-10 package com.bfsi.mfi.service.impl; import java.util.ArrayList; import java.util.List; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; import org.springframework.stereotype.Service; import com...
from fractions import * f=[] from math import * # d2={} # if 1==1: # a=int(pow(2,25)-1) # # s=0 # lst=[] # for b in range(1,a): # lst.append(gcd(a^b,a&b)) # lst.sort() # # print a,lst[-1] # d2[a]=lst[-1] #print d2 tlst=[3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 40...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/common/logging/logging.h" #include "core/framework/utils.h" #include "core/session/inference_session.h" #include "test/framework/test_utils.h" #include "test/test_environment.h" #include "test/providers/inte...
/* Copyright 2011 <NAME> 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,...
// A calculator that converts a Matrix M to a vector containing all the // entries of M in column-major order. // // Example config: // node { // calculator: "MatrixToVectorCalculator" // input_stream: "input_matrix" // output_stream: "column_major_vector" // } class MatrixToVectorCalculator : public Node { publ...
/** * Contains tests that test DDL scripts. */ public class DDLScriptsTest { /** * Tests that DB schema is created properly using DDL scripts. * @throws IOException */ @Test public void testCreateSchema() throws IOException, SQLException { // Clear schema. TestsUtil.clearSc...
<filename>main.h #pragma once #include "snoutlib/glfwapp.h" #include "snoutlib/settings.h" #include "snoutlib/loadingscreen.h" #include "snoutlib/timer.h" #include "snoutlib/misc.h" #include "snoutlib/mfont.h" #include "snoutlib/menu.h" #include "snoutlib/staticmesh.h" #include "snoutlib/gldefs.h" #include "snoutlib/p...
import { randomBytes } from "crypto"; import { createReadStream, createWriteStream, statSync } from "fs"; import { rm, mkdir, stat as statAsync } from "fs/promises"; import { tmpdir } from "os"; import { basename, dirname, extname, resolve as resolvePath } from "path"; import type { Readable } from "stream"; import { f...
/** * Implementation of a GOTermSimilarity measure to compare GO codes for texts * against GO codes for genes, comparable to Schlicker et al. This class uses a * GOAccess to access a database that contains shortest distances and Lowest Common * Ancestors (LCA) for GO terms. * <br> * <br> * Similarity/distance is...
<reponame>anqqa/klubitus-pwa import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common'; import { FastifyRequest } from 'fastify'; import { Observable } from 'rxjs'; import { User } from '../users/user.entity'; const DEFAULT_KEY = 'user_id'; @Injectable() export class InjectUserInter...
/* * 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 ...
Drilling in Alaska will not solve oil problems Running across Enron Field during the Owls' baseball game on Friday seemed like a ha rmless prank to Jose De La Pena. But it laiided the Baker College senior in jail for the night, and he may face fines of up to $2,500. At the game, a group of about 25 Baker students, inc...
// Copyright (c) 2021, Oracle and/or its affiliates. // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. // Package report handles reporting package report import ( "bufio" "errors" "fmt" "go.uber.org/zap" "os" "sync" ) // NOTE: This is part of the contract...
// CreateStorage creates a storage access class. func (inst DataModel) CreateStorage() (Storage, error) { var storage ref ret := C.CCall_libmcdata_datamodel_createstorage(inst.wrapperRef.LibraryHandle, inst.Ref, &storage) if ret != 0 { return Storage{}, makeError(uint32(ret)) } return inst.wrapperRef.NewStorage(...
def _check_allocation(weights, asset_class_name): s = sum(weights.values()) if not math.isclose(s, 1, rel_tol=1e-09, abs_tol=0.0): raise Exception('Error: {} allocation of \'{}\' is not 100%!!!' .format(asset_class_name, s))
/* * These functions are used early on before PCI scanning is done * and all of the pci_dev and pci_bus structures have been created. */ static struct pci_dev *fake_pci_dev(struct pci_channel *hose, int top_bus, int busnr, int devfn) { static struct pci_dev dev; static struct pci_bus bus; dev.bus = &bus; dev.sy...
/** * <p>Shared Diffie-Hellman instance to minimize key exchange overhead. New key * request data should be generated after every successful key exchange.</p> * * <p>This class is thread-safe.</p> * * @author Wesley Miaw <wmiaw@netflix.com> */ public class DiffieHellmanManager { /** * @param params Di...
"""Entry-point for Galaxy specific functionality in Planemo.""" from __future__ import absolute_import from .config import galaxy_config from .run import ( run_galaxy_command, setup_venv, ) from .serve import serve as galaxy_serve from .serve import shed_serve __all__ = ( "galaxy_config", "setup_venv...
<gh_stars>0 import matplotlib.pyplot as plt # Diagramm und Achsen definieren fig, ax = plt.subplots() # Werte für Tabelle erstellen table_data=[ ["1", 30, 34], ["2", 20, 223], ["3", 33, 2354], ["4", 25, 234], ["5", 12, 929] ] #Tabelle erstellen table = ax.table(cellText=table_data, loc='center',...
<gh_stars>1-10 import type { MultiSelectStylesNames } from '@mantine/core'; import { Input } from './Input.styles-api'; import { InputWrapper } from './InputWrapper.styles-api'; const InputStyles = { ...Input }; delete InputStyles.rightSection; export const MultiSelect: Record<MultiSelectStylesNames, string> = { w...
Simulation of self-erase discharge waveforms in plasma display panels We use a two-dimensional self-consistent fluid model to simulate the operation of a plasma display panel cell when different sustaining voltage waveforms are applied to its electrodes. The discharge path is much longer when a self-erase discharge wa...
<gh_stars>0 import { Component, OnInit, ChangeDetectorRef } from '@angular/core'; import { CompanyService } from '../services/company.service'; import { Observable } from 'rxjs'; import { Company } from '../models'; import { tap } from 'rxjs/operators'; import { Store } from '@ngrx/store'; import { CompanySelectors, Co...
#include <algorithm> #include <iostream> #include <vector> using namespace std; class Solution { public: string largestTimeFromDigits(vector<int>& arr) { string s = "HH:MM"; sort(arr.rbegin(), arr.rend()); for (int i = 0; i < 4; ++i) { if (arr[i] > 2) continue; s[0] = arr[i] + '0'; fo...
from copy import deepcopy n, x = map(int, input().split()) a = list(map(int, input().split())) ans = sum(a) a1 = deepcopy(a) for i in range(1, n): cur = x * i a2 = deepcopy(a1) for j in range(n): a1[n - j - 1] = min(a2[n - j - 1], a[n - i - j - 1]) cur += a1[n - j - 1] ans = min(ans, cur...
// Popd changes out of the current directory to the previous directory. func (s *Script) popd(_ string) error { if len(s.dirs) > 1 { s.dirs = s.dirs[1:] } return nil }
# !/usr/bin/python # -*- coding: utf-8 -*- # Created on 2020-03-22 # Class: Courses Spider # Comment: Initiate requests, specify fields to be scraped and stored to item model import scrapy import re import sys from ..items import CourseGetterItem class CoursesSpider(scrapy.Spider): ''' Initiate requests ...
/* Return true if the current function should treat register REGNO as call-saved. */ static bool mips_cfun_call_saved_reg_p (unsigned int regno) { if (global_regs[regno]) return false; if (cfun->machine->interrupt_handler_p && mips_interrupt_extra_call_saved_reg_p (regno)) return true; return (r...
TRANSFER TRACKER STATUS: Rumor A Nigerian striker with a Bundesliga pedigree has drawn MLS interest, according to a story from online outlet Score Nigeria. Anthony Ujah has cancelled his contract with Chinese side Liaoning Whowin and returned to Germany with his family. But clubs "Like LA Galaxy or Seattle Sounders" ...
def safe_var(entity, **kwargs): warnings.warn("As of >=pytorch0.4.0 this is no longer necessary", DeprecationWarning) if isinstance(entity, Variable): return entity elif isinstance(entity, torch._C._TensorBase): return Variable(entity, **kwargs) else: raise Exce...
<gh_stars>1-10 #! /usr/bin/env python2 """ mbed SDK Copyright (c) 2011-2013 ARM Limited 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 requir...
package exercise27; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.Objects; public class SortedMatrixFinder { private static final Logger logger = LoggerFactory.getLogger(SortedMatrixFinder.class); public Result find (double target, double[][] nums) { ...