content
stringlengths
10
4.9M
/** * @file * Bind exo links. */ (function ($, Drupal) { /** * Attaches the Ajax behavior to each Ajax form element. * * @type {Drupal~behavior} * * @prop {Drupal~behaviorAttach} attach * Initialize all {@link Drupal.Ajax} objects declared in * `drupalSettings.ajax` or initialize {@link D...
n = int(input()) d = [] for i in range(n): t = input().split(" ") t = [float(j) for j in t] d.append(t) dsum = 0 for i in range(n): for j in list(range(i+1, n)): dtmp = ((d[i][0] - d[j][0]) ** 2) + ((d[i][1] - d[j][1]) ** 2) dsum = dsum + dtmp ** 0.5 res = dsum / (n / 2) print(res)
Design and Test of Portable Potentiostat Detecting for Pesticide Residue in the Atmosphere of Greenhouse In order to rapidly measure the residue of pesticide reside in the atmosphere of greenhouse, this paper proposes a scheme about the portable Potentiostat based on C8051F020 chip. It could magnify weak current signa...
class VcfVariant: """A variant in a VCF file (not to be confused with core.Variant)""" __slots__ = ('position', 'reference_allele', 'alternative_allele') def __init__(self, position, reference_allele, alternative_allele): """ position -- 0-based start coordinate reference_allele -- string alternative_allel...
import numpy as np from PuzzleLib.Backend import gpuarray from PuzzleLib.Backend.Kernels import Pool from PuzzleLib.Modules.Module import ModuleError, Module from PuzzleLib.Modules.MaxPool2D import MaxPool2D class MaxUnpool2D(Module): def __init__(self, maxpool2d, name=None): super().__init__(name) self.regist...
/// Run the build-spec command pub fn run<G, E>(self, config: Configuration<G, E>) -> error::Result<()> where G: RuntimeGenesis, E: ChainSpecExtension, { info!("Building chain spec"); let mut spec = config.expect_chain_spec().clone(); let raw_output = self.raw; if spec.boot_nodes().is_empty() && !self.dis...
def update_state(seleted_event, lattice_state): if seleted_event == "attach": pos = numpy.nonzero(lattice_state == 0)[0] index = numpy.random.choice(pos) lattice_state[index] += 1 elif seleted_event == "detach": pos = numpy.nonzero(lattice_state[:-1] == 1)[0] index = ...
/** * The Shiro framework's default concrete implementation of the {@link SecurityManager} interface, * based around a collection of {@link org.apache.shiro.realm.Realm}s. This implementation delegates its * authentication, authorization, and session operations to wrapped {@link Authenticator}, {@link Authorizer}, ...
Marilyn Mosby, the Maryland state attorney for Baltimore who on Friday announced charges against six city police officers for the death of Freddie Gray, said last year that a St. Louis County grand jury’s decision not to indict Darren Wilson in the shooting death of Michael Brown “breaks [her] heart” and that a special...
/// Check if the given text would be a valid referent name; pub fn validate(name: impl AsRef<str>) -> Result<(), NotReferentName> { let name = name.as_ref(); let first_char = name.chars().next(); match first_char { Some(c) if c.is_uppercase() => Ok(()), _ => Err(NotRefere...
<filename>clients/benchmarks/perf_script/plotPerformance.py # ######################################################################## # Copyright 2016-2020 Advanced Micro Devices, Inc. # # ######################################################################## # to use this script, you will need to download and inst...
def remote_backends(compact=True): warnings.warn( "remote_backends() will be deprecated in upcoming versions (>0.5). " "using filters instead is recommended (i.e. available_backends({'local': False}).", DeprecationWarning) return available_backends({'local': False}, compact=compact)
// Decompiled by Jad v1.5.8e. Copyright 2001 <NAME>. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: packimports(3) // Source File Name: FldSKDQueryWhereClause.java package com.ibm.tivoli.maximo.skd.app; import java.rmi.RemoteException; import psdi.mbo.*; import psdi.security.UserI...
<reponame>celiafish/VisTrails<filename>contrib/vtksnl/__init__.py<gh_stars>10-100 ########################################################################### ## ## Copyright (C) 2006-2010 University of Utah. All rights reserved. ## ## This file is part of VisTrails. ## ## This file may be used under the terms of ...
def _connectionFrameCb_connected(self,connector): self.connector = connector self.tableFrame.after(GUIUPDATEPERIOD,self._updateTable) self.notifThread = NotifThread( self.connector, self._connectionFrameCb_disconnected ) self.snapshotThread = Snapshot...
/** * Stub object for {@code ActivatedJob}. It contains setters for all getters defined in the * interface. * * <p>Plus it contains additional getters that are only available once a job has been worked on. * * <p>{@code getStatus()} * * <ul> * <li>{@code ACTIVATED} - initial state. Either the job has not bee...
/** * Utilities for storing more complex collection types in * {@link org.apache.hadoop.conf.Configuration} instances. */ @InterfaceAudience.Public public final class ConfigurationUtil { // TODO: hopefully this is a good delimiter; it's not in the base64 alphabet, // nor is it valid for paths public static fin...
/* Copyright 2017 The TensorFlow 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 applicable law or a...
// Copyright (c) 2016 The btcsuite developers // Copyright (c) 2016 The commanderu developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package chaincfg import "testing" // TestMustRegisterPanic ensures the mustRegister function panics when used to // register...
PROVISION OF ENGLISH-MEDIUM INSTRUCTION: TRENDS AND ISSUES The article addresses the current trends of teaching subjects through the medium of English which has been boosting in the world and in Ukraine. Introduced due to globalization processes, teaching in English as a Medium of Instruction (EMI) has become an essen...
import numpy as np from collections import defaultdict from functools import reduce from itertools import product # s = input() # n, m = int(input()) # A = list(map(int, input().split())) n, m = map(int, input().split()) light = defaultdict(list) for i in range(m): A = list(map(int, input().split())) for s i...
THE mother of a tragic teenager who streamed her own suicide on Facebook Live has been accused of mocking her daughter online as she took her own life. Gina Caze is said to have watched and written messages on her estranged 14-year old daughter's social media post accusing her of seeking attention and crying wolf. Fa...
Molecular Cytogenetics in Childhood Acute Lymphoblastic Leukemia: A Hospital-Based Observational Study OBJECTIVE This study was conducted to determine the frequency of chromosomal aberrations in children aged <19 years with newly diagnosed acute lymphoblastic leukemia (ALL), attending/admitted in the Department of Ped...
/** * A TimeMark has a name and a time value. * It can be compared to other TimeMarks. */ public class TimeMark implements Comparable<TimeMark> { private String name; private Float time; private TimeMark () { this.setName(null); this.setTime((Float) null); } public TimeMark (String time) { t...
package net.aegistudio.brdfviewer; import java.awt.Dimension; import java.awt.GridLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; import javax.swing.event.ChangeListener; public class JDegreeField extends JPanel { private static final...
<filename>elza/elza-core/src/main/java/cz/tacr/elza/service/importnodes/vo/ImportSource.java package cz.tacr.elza.service.importnodes.vo; import java.util.List; import cz.tacr.elza.domain.ApScope; import cz.tacr.elza.domain.ArrFile; import cz.tacr.elza.domain.ArrStructuredObject; /** * Rozhraní zdroje pro import. ...
// PFAdd adds the specified elements to the specified HyperLogLog func (p *Pipeline) PFAdd(key string, elements ...string) { p.Command("PFADD", 1+len(elements)) p.Arg(resp.Key(key)) for _, el := range elements { p.Arg(resp.String(el)) } }
Strategy of achieving high beam quality on spatial intensity and wavefront simultaneously in high power lasers High-power laser plays an important role in many fields, such as directed energy weapon, optoelectronic contermeasures, inertial confinement fusion, industrial processing and scientific research. The uniform ...
// Fast removes packet loss and delays. func (IPTables) Fast(ctx context.Context, node string) error { output, err := ssh.CombinedOutput(ctx, node, "/sbin/tc", "qdisc", "del", "dev", "eth0", "root") if err != nil && strings.Contains(string(output), "RTNETLINK answers: No such file or directory") { err = nil } ret...
<reponame>calvin-ally/healenium-web package com.epam.healenium.service.impl; import com.epam.healenium.PageAwareBy; import com.epam.healenium.SelfHealingEngine; import com.epam.healenium.model.LastHealingDataDto; import com.epam.healenium.service.HealingElementsService; import com.epam.healenium.treecomparing.Node; im...
// Generates the SELECT sql for this dataset and uses Exec#ScanValsContext to scan the results into a slice of primitive // values // // i: A pointer to a slice of primitive values func (sd *SelectDataset) ScanValsContext(ctx context.Context, i interface{}) error { if sd.queryFactory == nil { return errQueryFactoryN...
<filename>frameworks/components/ui_box_progress.cpp /* * Copyright (c) 2020-2021 Huawei Device 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/lice...
/// Create owned surface from vector and sizes. pub fn from_vec(height: usize, width: usize, data: Vec<T>) -> Self { assert_eq!(height * width, data.len()); let shape = Shape { row_stride: width, col_stride: 1, height, width, start: 0, ...
import numpy as np import pytest from pandas import ( NA, Series, ) import pandas._testing as tm @pytest.mark.parametrize("dtype", ["int64", "float64"]) def test_to_numpy_na_value(dtype): # GH#48951 ser = Series([1, 2, NA, 4]) result = ser.to_numpy(dtype=dtype, na_value=0) expected = np.array...
/** * Evaluates CSS properties of DOM tree * * @param doc Document tree * @param media Media * @param inherit Use inheritance * @return Map where each element contains its CSS properties */ public StyleMap evaluateDOM(XmlDocument doc, MediaSpec media, final boolean inherit) { ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-11 05:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('securedpi_locks', '0004_auto_20161010_2142'), ] operations = [ migrations.R...
n = int(input()) a = int(input()) b = int(input()) c = int(input()) d = int(input()) e = int(input()) if n%a == 0: train = n // a else: train = 1 + (n // a) if n%b == 0: bus = (n // b) else: bus = 1 + (n // b) if n%c == 0: taxi = (n // c) else: taxi = 1 + (n // c) if n%d == 0: ...
<reponame>jobmission/ratelimiter-spring-boot-starter<filename>src/main/java/com/revengemission/commons/ratelimiter/RateLimiterAutoConfiguration.java package com.revengemission.commons.ratelimiter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.AutoConfigure...
It was a tense, emotional afternoon at the Michigan Board of Education. In the two months since the board put out a draft proposal for how schools could choose to support LGBT kids, it’s become a major controversy. That’s mostly because the suggestions include letting transgender students use the bathrooms that fit t...
Changes in cyclic AMP level of rat thyroid by acute and chronic stimulation of thyrotropin in vivo. To assess a possible postmortem change in the level of cyclic AMP, the thyroids were snap-frozen at various time intervals after removal. Rats were fed a low-iodine diet (LID) with PTU for 2 weeks and a week after PTU d...
def isoverlap(self, point): for ship in self.content: if (point in ship.ext) or (point in ship.buffer): return True return False
import { Injectable } from '@angular/core'; import { Cliente } from './cliente.model'; import { Subject } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { map } from 'rxjs/operators'; import { stringify } from '@angular/compiler/src/util'; import { Router } from '@angular/router'; @Injectable({...
<reponame>lucuma/moar # coding=utf-8 from hashlib import sha1 import os from moar import Storage from .utils import RES_PATH, get_impath, get_raw_data BASE_URL = 'http://example.com' def get_random_key(): return sha1(os.urandom(12)).hexdigest() def test_get_thumbsdir(): name = 'qwertyuiop' s = Stor...
Classification of Bicycle Traffic Patterns in Five North American Cities This study used a unique database of long-term bicycle counts from 38 locations in five North American cities and along the Route Verte in Quebec, Canada, to analyze bicycle ridership patterns. The cities in the study were Montreal, Quebec; Ottaw...
package com.suntiago.dblibDemo; import android.content.Context; import com.suntiago.lockpattern.PatternManager; import com.suntiago.sloth.SlothApplication; import com.suntiago.sloth.account.AccountManager; import com.suntiago.sloth.utils.FileUtils; import com.suntiago.sloth.utils.file.StorageManagerHelper; import com...
/** * Parses an address from JSON format into a Location object * @param json JSON representation of the address * @return A Location object representing the given address */ public static Location parseLocationFromJson(JSONObject json) { Location address = new Builder() .inC...
A computer chip designed to mimic the performance of the human brain has hit a major new milestone. The chip, developed by IBM, and Cornell Tech and iniLabs, is a significant step up from its performance just over two years ago when the project was first announced. The SyNAPSE chip, which stands for Systems of Neurom...
Addressing the looming identity crisis in single cell RNA-seq Single cell RNA-sequencing technology (scRNA-seq) provides a new avenue to discover and characterize cell types, but the experiment-specific technical biases and analytic variability inherent to current pipelines may undermine the replicability of these stu...
/* Calculates the distance between the center points to determine overlap */ bool Arena::IsColliding( ArenaMobileEntity * const mobile_e, ArenaEntity * const other_e) { double delta_x = other_e->get_pose().x - mobile_e->get_pose().x; double delta_y = other_e->get_pose().y - mobile_e->get_pose().y; doubl...
from sys import stdin,stdout def main(): n=int(stdin.readline()) a=sorted(map(int,stdin.readline().split( ))) b=sorted(map(int,stdin.readline().split( ))) x,y=0,0 turn = 1 while a or b: if turn: if a: if b: if a[-1]>=b[-1]: x+=a.pop() else: b.pop() else: x...
Have you ever thought it would be fun to be a bull in a china shop? If so, you might be interested in a new business that is scheduled to open this spring in St. Paul’s Hamline-Midway neighborhood. Customers at the Break Room will be handed a baseball bat or a sledge hammer or a frying pan and then shown into a windo...
def remove(dtype,name,raw): cloud = m80.CloudData() cloud.remove( dtype, name, raw )
import { Injectable } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; @Injectable() export class MailService { constructor( private configService: ConfigService, ) { } async sendMail(email_address: string, body: string, subject: string) { var AWS = require('aws-sdk')...
//////////////////////////////////////////////////////////////////////////////// // // File: ProcessInterpPtsToPts.cpp // // For more information, please see: http://www.nektar.info/ // // The MIT License // // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA), // Department of Aeronautics...
<reponame>vasumahesh1/azura #pragma once #include "D3D12Core.h" namespace Azura { namespace D3D12 { class D3D12ScopedSampler { public: void Create(const SamplerDesc& desc, const Log& log_D3D12RenderSystem); const D3D12_SAMPLER_DESC& GetDesc() const; private: D3D12_SAMPLER_DESC m_desc{}; }; }...
<reponame>JiayiPang/GKLDA<gh_stars>10-100 package knowledge; import java.util.ArrayList; import java.util.Iterator; import nlp.Vocabulary; import nlp.WordSet; /** * This class implements the must-set used in GK-LDA. */ public class MustSet implements Iterable<String> { public WordSet wordset = null;...
/** * crypto_akcipher_sign() - Invoke public key sign operation * * Function invokes the specific public key sign operation for a given * public key algorithm * * @req: asymmetric key request * * Return: zero on success; error code in case of error */ static inline int crypto_akcipher_sign(struct akcipher_requ...
<gh_stars>0 // package: services // file: file/fileinfo.proto import * as jspb from "google-protobuf"; import * as common_common_entity_pb from "../common/common_entity_pb"; export class FileInfo extends jspb.Message { getIdentity(): string; setIdentity(value: string): void; getHash(): string; setHash(value:...
Precoder Design for MIMO Broadcast Channels This paper considers precoder designs in downlink MIMO broadcast channels. We present a MMSE feedback precoding scheme, which is analogue to the MMSE generalized decision feedback equalizer (GDFE) in the uplink MIMO multiple access channel. The proposed scheme obtains the sa...
{-# LANGUAGE ForeignFunctionInterface, CPP #-} module System.Win32.DDE ( initializeDde, destroyDde, DdeState, DdeCallback, ddeResultAck, ddeResultTrue, ddeResultFalse, ddeXtypConnect, ddeXtypPoke, ddeCpWinAnsi, queryString, accessData, unaccessData, withDdeData ) where #if defined(i386_HOS...
<gh_stars>0 import { connect, MapDispatchToProps, MapStateToProps } from 'react-redux'; import { withRouter } from 'react-router'; import { bindActionCreators, Dispatch } from 'redux'; import { OverallState } from '../../../commons/application/ApplicationTypes'; import { Chapter } from '../../../commons/application/ty...
<reponame>Marinabsanz/Angularprojects import { Producto, calculateIsv } from './06-desec-Argumentos'; const carritoCompras: Producto[]= [ { descripción: 'prod1', pvp:100 }, { descripción: 'prod2', pvp:200 } ]; const [total, isv] = calculateIsv( carritoCompras ); console....
/* * Copyright (C) 2011 The Android Open Source 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-2.0 * * Unless required by app...
package app // Version denotes the version of the program const Version = "0.1"
import Data.Char import Data.List (...) = (.).(.) count = length ... filter solve x | count isUpper x > count isLower x = map toUpper x | otherwise = map toLower x main = interact solve
import { Component } from "@angular/core"; import { FormControl } from "@angular/forms"; interface IExampleItem { id: string; name: string; icon: string; } @Component({ selector: "nui-combobox-v2-customize-options-example", templateUrl: "combobox-v2-customize-options.example.component.html", ho...
def resume(self, **kwargs): if 'upload_id' in kwargs: self.manifest["uploadId"] = kwargs['upload_id'] kwargs.pop('upload_id') if self.manifest["uploadId"] is None: raise ValueError("Cannot resume without an upload id.") upload_kwargs = {} if 'progress_...
/** * Preferences property listener bound to this table with a weak reference to avoid * strong link between user preferences and this table. */ private static class UserPreferencesChangeListener implements PropertyChangeListener { private WeakReference<FurnitureTable> furnitureTable; public UserPref...
<gh_stars>1-10 use osm_is_area; #[test] fn way_circular_refs_no_way_tag() { let end = 1252234; let refs = vec![end, 23452234, 28373423, end]; let tags = vec![(r"waterway", r"custom")]; assert_eq!(false, osm_is_area::way(&tags, &refs)); } #[test] fn way_area_no_tag() { let end = 1252234; let re...
/* 0x6C-0x6E SHRX Shift the 16-bit Accumulator right from Imm/Abs/Ind */ void cosproc::SHRX(uint16_t src){ uint16_t shift = (Read(src) << 8) | Read(src+1); uint16_t temp = ((r[0] << 8) | r[1]) >> shift; r[0] = (temp & 0xFF00) >> 8; r[1] = temp & 0x00FF; st[0] = temp == 0; }
Man riding a motorcycle (Shutterstock) In a parking lot in Salem, Oregon, a 59-year-old man pulled a pistol on two 17-year-old boys on Sunday and told them to “get ready to die.” According to the Oregonian, however, a motorcyclist whizzed by at just the right time and knocked the weapon from the gunman’s hands withou...
/* Fibonacci search is an efficient search algorithm based on: --> divide and conquer principle that can find an element in the given sorted array. Algorithm ---> Let the length of given array be n [0...n-1] and the element to be searched be x. Then we use the following steps to find the element with minimum ...
n = int(input()) i1 = 1 i2 = 1 i3 = n - 2 if i3 % 3 == 0: i2 = 2 i3 = i3 - 1 print("{} {} {}".format(i1, i2, i3))
/// Fetch children for volum and group entities. void pqCMBContextMenuHelper::accumulateChildGeometricEntities( QSet<vtkIdType>& blockIds, const smtk::model::EntityRef& toplevel) { vtkIdType bidx = -1; if (toplevel.isVolume() && !toplevel.hasIntegerProperty("block_index")) { smtk::model::Faces faces = topl...
The effect of casual teaching on student satisfaction: evidence from the UK ABSTRACT A large and increasing proportion of teaching in UK universities is being fulfilled by staff on casual, rather than permanent, contracts. This paper examines how the proportion of teaching by casual staff affected student satisfaction...
Optimal measurement area determination algorithm of articulated arm measuring machine based on improved FOA The determination of the optimal measurement area of the articulated arm measuring machine belongs to the multi-dimensional function optimization problem under complex constraints. To realize high-precision meas...
def testDomainFromDictWrongSubset(self): domainDict = self.domain.to_dict() someslice = self.domain.datamap.subset(0, 0, 20, 20) with self.assertRaises(Exception) as e: DomainMap.from_dict(domainDict, someslice) self.assertEqual(str(e.exception), "Dat...
Evaluating in-home water purification methods for communities in Texas on the border with Mexico. This study evaluated user preferences among three alternative in-home water treatment technologies suitable for households relying on trucked water in El Paso County, Texas, which is on the border with Mexico. The three t...
<reponame>kozakusek/ipp-2020-testy<filename>z2/part1/jm/random/560382901.c #include <stdint.h> #include <stdlib.h> #include <assert.h> #include <stdio.h> #include "gamma.h" #include <stdbool.h> #include <string.h> int main() { /* scenario: test_random_actions uuid: 560382901 */ /* random actions, total chaos */ gamm...
/** * This class provides an easy-to-use wrapper for the HttpCommandServerService. * * @author chaitanyag@google.com (Chaitanya Gharpure) * */ public class HttpCommandServerServiceManager { public static final String EXTERNAL_STORAGE = Environment.getExternalStorageDirectory() + ""; public static fi...
Evaluating the safety effectiveness of downgrade warning signs on vehicle crashes on Wyoming mountain passes Abstract Highway safety on mountain passes is a major concern to most highway agencies in the Western United States. Large trucks are known to be disproportionately affected on downgrades which characterize mou...
import { DialogElement } from './vaadin-dialog.js'; export type DialogRenderer = (root: HTMLElement, dialog?: DialogElement) => void; export type DialogResizableDirection = 'n' | 'e' | 's' | 'w' | 'nw' | 'ne' | 'se' | 'sw'; export type DialogResizeDimensions = { width: string; height: string; contentWidth: str...
/* * Set the clipping rectangle in an output PostScript file. * Note that an unpaired grestore * is used to restore the initial clipping path before setting up the * clip; this means that no other unpaired gsaves may be used. */ int PSsetClip(Metafile *mf, int num, Glimit *rect) { int imf; mf_cgmo **cgmo...
def generate_light(self, parent_tag, light): if not isinstance(light, Light): raise TypeError("Expecting the given 'light' to be an instance of `Light`, but got instead: " "{}".format(type(light))) attrib = {} for name in ['name', 'castshadow', 'active']: ...
Letter to the Editor Dear Editor, Based on a latent class analysis of 12 ‘non-core symptoms’ in a sample of 1,210 patients with Myalgic Encephalomyelitis (ME) and/or chronic fatigue syndrome (CFS) Huber and colleagues found 6 subtypes (classes) of ‘ME/CFS’: one class likely to endorse all noncore symptoms, one class...
// GenerateMethodResponse returns the current state in the form of *svcapitypes.MethodResponse. func GenerateMethodResponse(resp *svcsdk.MethodResponse) *svcapitypes.MethodResponse { cr := &svcapitypes.MethodResponse{} if resp.ResponseModels != nil { f0 := map[string]*string{} for f0key, f0valiter := range resp.R...
Method Statement for Reconstruction / Strengthening of Existing Nullah Structures for Tsui Ping River Revitalization of Tsui Ping River project needs demolition part of nullah structures and reconstruction of it. According to the particular specification and Drainage Service Department requirement, fully closure of Ts...
/** * This function will be used to register authenticator plugin to SDK. * @param authenticatorName * @param className * @return * @throws NullPointerException * @throws OMAuthenticationManagerException */ public boolean registerAuthenticator(String authenticatorName, String classNam...
// // Handles DirectShow graph events. // // Returns true if the player should be stopped. // bool CMediaPlayer::HandleGraphEvent() { bool stopped = false; if (_MediaEvent== NULL) { return stopped; } long evCode; LONG_PTR param1, param2; while (SUCCEEDED(_MediaEvent->GetEvent(...
/* SENTRY-1471 - fixing the validation logic. * a) When the number of retries exceeds the limit, propagate the Assert exception to the caller. * b) Throw an exception instead of returning false, to pass valuable debugging info up the stack * - expected vs. found permissions. */ private void verifyOnAllSu...
After being knocked out of the US Open Cup on Tuesday, LA needed a strong showing against the San Jose Earthquakes to kick off their summer campaign. To the Galaxy’s credit, they delivered: aided by a clever combination that built to a great finish from Gyasi Zardes, LA came away with a well-earned road win. “We talke...
""" Requires: llvmdev-7.0.1 with all targets enabled """ import re import inspect from llvmlite import ir import llvmlite.binding as llvm import numba.cuda import numba as nb from .utils import get_version if get_version('numba') >= (0, 49): from numba.core import sigutils, registry else: from numba import ...
def temp_workspace(): home = os.getcwd() with tempfile.TemporaryDirectory() as temp: try: os.chdir(temp) yield finally: os.chdir(home)
/** * Formats the given expected string to a format matching the current locale setting. * The given string shall use tabulation before each line of the message. */ private static String localize(final Level level, final String expected) { final String levelToReplace = level.getName(); fi...
def performance(self, data, labels): return self.evaluate(data, labels)[0]
const __safari = require('../safari'); require('./safari')(__safari);
AUBURN, N.Y. -- Cassie Mattes was inside the Auburn Domino's Saturday night when she noticed a man "smash his body into the door." The 26-year-old assistant manager watched as the man picked himself up and moved away from the restaurant. "It caught my attention," she said. Mattes said the man appeared to be highly i...
def writeContigSizes(genome, outfile): outf = IOTools.openFile(outfile, "w") fasta = IndexedFasta.IndexedFasta( os.path.join(PARAMS["genome_dir"], genome)) for contig, size in fasta.getContigSizes(with_synonyms=False).items(): outf.write("%s\t%i\n" % (contig, size)) outf.close()
/** * frees up memory for a building * * See also: olc_delete_building * * @param bld_data *building The building to free. */ void free_building(bld_data *bdg) { bld_data *proto = building_proto(GET_BLD_VNUM(bdg)); struct interaction_item *interact; if (GET_BLD_NAME(bdg) && (!proto || GET_BLD_NAME(bdg) != GET_BLD_NA...
def adjust_table_speed(kwargs=None): speed = int( float(self.variables.devices_dict["Table_control"]["default_joy_speed"]) / 100.0 * float(self.table_move_ui.Table_speed.value()) ) self.variables.table.set_joystick_speed(float(speed))