content
stringlengths
10
4.9M
Between 2008 and 2009, 35 employees at France Telecom took their own lives. On Wednesday the operator’s former CEO Didier Lombard (pictured) was placed under formal investigation for psychological harassment. ADVERTISING Read more The former head of France Telecom, the world’s second-largest telecommunications firm, ...
<reponame>landonvg/gedcomx-java<filename>extensions/familysearch/familysearch-api-model/src/test/java/org/familysearch/platform/ct/ChangeInfoTest.java package org.familysearch.platform.ct; import org.gedcomx.common.ResourceReference; import org.gedcomx.common.URI; import org.junit.Test; import static org.junit.Asser...
package awesome.socks.common.util; import java.io.FileInputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.Properties; import lombok.extern.slf4j.Slf4j; /** * * @author awesome */ @Slf4j public final class Config { ...
<filename>app/s3/fake_client.go // +build !prod package s3 import ( "encoding/json" "fmt" ) type FakeClient struct { configuredUploads map[string]struct{} configuredDownloads map[string][]byte } var _ S3 = (*FakeClient)(nil) func NewFakeClient() *FakeClient { return &FakeClient{ configuredUploads: make(...
/** * The lemmas of the sentence. * @param props The properties to use for the {@link edu.stanford.nlp.pipeline.MorphaAnnotator}. * @return A list of lemmatized words, one for each token in the sentence. */ public List<String> lemmas(Properties props) { document.runLemma(props); synchronized (impl) ...
/** * Fully recalculates the given path from the user's position up to its waypoint * NOTE: This process tries to retrieve an online route first * @param path The path to be rerouted * @param userPosition The user's position detected on this GPS cycle */ private void calculatePathFromScratch(@N...
//Vector2uToVector : Converts a Vector2u to a Vector func Vector2uToVector(vec sf.Vector2u) Vector { return Vector{ X: float32(vec.X) / scale, Y: float32(vec.Y) / scale, } }
<filename>d/player_houses/stefano/kitchen.c //kitchen.c - Stefano's cottage kitchen. Coded by Circe 9/20/03 #include <std.h> #include "stefano.h" #include <daemons.h> inherit VAULT; int uses; void create() { ::create(); set_property("indoors",1); set_property("light",2); set_terrain(S...
import Day from './Day'; export default interface DayOccurrence { day: Day weight: number } export const sortDayOccurrencesChronologically = (a: DayOccurrence, b: DayOccurrence): number => ( a.day.date.getTime() !== b.day.date.getTime() ? a.day.date.getTime() - b.day.date.getTime() : b.weight - a.weight...
/** * Example: when key is NAME and value is GALA the list of JSONArray will * be only elements that have have the above. * * @param key use key to reference * @param value value of all the element that you retain * @return list of elements where key is equal to value */ public String...
def top_words(model, labels, vectorizer): vocab = vectorizer.vocabulary_ weights = {} return weights
<reponame>mafei6827/nettyWsServer package com.betmatrix.theonex.netty.util; import java.io.IOException; import java.util.Properties; /** * Created by junior on 10:39 2018/6/22. */ public class PropertiesUtil { public static Properties loadPropertiesFromFile(String fileName){ Properties props = new Prop...
/** * Kick off the widget picker dialog * @param act The Activity to use as the context for these actions * @param widgetType The type of widget (e.g. 'default', 'media', 'notification' etc.) */ public void register_widget(Activity act, String widgetType) { Log.d("HMAWM.register_widget","Regis...
/***************************************************************************/ /** * Initializes track properties and returns false if track bad or out of range. ******************************************************************************/ Bool_t AliMultDepSpecAnalysisTask::InitTrack(AliVTrack* track) { if(!track)...
<gh_stars>1-10 /* ------------------------------------------------- Author : zlyuan date: 2019/9/7 Description : ------------------------------------------------- */ package zobserver type ActionFunc func(notifyName string, msg IMessage) type IObserver interface { // 触发事件 OnNotify(noti...
def load_web_conf(self): self.config = self._load_config() self.cb = self._load_convert(self.db_name)
Control strategy of electric charging station with V2G function based on DC micro-grid The number and variety of electric vehicles connected to grid continue to grow rapidly, which results in a heavy burden on grid. To solve this problem, the concept of V2G (Vehicle to Grid) that electric vehicles could act as a new p...
/* Send an HTTP POST request to the server. This assumes the http url is set.*/ int gsm_http_post(GsmState *s, char* data) { int ld = strlen(data); if (ld > GSM_MAX_HTTP_LEN) return -1; sprintf(post_content, http_header, ld); strcat(post_content, data); char msg[1...
// GetTopAlbums fetches a list of top albums listened to by the user // from LastFM for the specified period. // func (u *User) GetTopAlbums(period string, page int) (ta *topAlbums, err error) { params := map[string]string{ "user": u.Username, "limit": u.api.GetLimit(), "page": strconv.Itoa(page), "period...
<filename>form-binding-jaxrs/src/test/java/com/github/exabrial/formbinding/jaxrs/testmodel/TestObject.java package com.github.exabrial.formbinding.jaxrs.testmodel; public class TestObject { private String key; private int anInt; public String getKey() { return key; } public void setKey(String key) { this.ke...
// Copyright 2015-2019 Parity Technologies (UK) Ltd. // This file is part of Parity Ethereum. // Parity Ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at yo...
Demand Side Management : Augmenting Tool in Energy Security And Climate Change Demand-side management (DSM) proved to be a convent ional concept emanates from the need seen as a mean s of reducing peak electricity demand and in which a power utility, such as an ver tically integrated utility or State Electricity Boa r...
/** * Checks if {@code host} is contains by any of the provided {@code bases} * <p/> * For example "www.youtube.com" contains "youtube.com" but not "notyoutube.com" or * "youtube.co.uk" * * @param host A hostname from e.g. {@link URI#getHost()} * @param bases Any number of hostnames ...
P53 PROTEIN AND ITS FUNDAMENTAL ROLE IN THE CELL CYCLE, APOPTOSIS AND CANCER P53 is activated in response to DNA damage, hypoxia, oncogenesis expression to promote the cell cycle checkpoints, DNA repair, cell senescence and apoptosis. These activities are important for the suppression of tumor formation and mediate ce...
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=111; int n; int a[maxn]; bool check(int d){ map<int,int> t; for(int i=0;i<n;i++){ t[a[i]+1000]++; t[a[i]-d+1000]++; t[a[i]+d+1000]++; } for(auto p : t) if(p.second == n )return 1; return 0; } int mai...
/** * Unlike many of the other EventReceivers, THIS one needs to be able to be torn down. */ ManuvrOIC::~ManuvrOIC() { platform.kernel()->removeSchedule(&_discovery_ping); platform.kernel()->removeSchedule(&_discovery_timeout); #if defined(__BUILD_HAS_THREADS) #if defined(__MACH__) && defined(__APPLE__) ...
/** * Draws the outline of this Triangle. The Triangle is drawn using the * GraphicsContext's current color. * * @param gc - GraphicsContext object to use for drawing. */ @Override public void draw(GraphicsContext gc) { if (this.angle == 0.0) { gc.strokeLine(p1.getX(), p1.getY(), p2.getX(), p2.getY());...
Revision of Reliability Concepts for Quasibrittle Structures and Size Effect on Probability Distribution of Structural Strength The paper demonstrates the need for a fundamental revision of reliability concepts and design codes for quasibrittle heterogeneous structures, such as concrete structures failing due to concr...
/** * */ package edu.berkeley.nlp.classify; import edu.berkeley.nlp.math.DifferentiableFunction; import edu.berkeley.nlp.util.Pair; /** * @author petrov * */ public interface ObjectiveFunction extends DifferentiableFunction { <F,L> double[] getLogProbabilities(EncodedDatum datum, double[] weights, Encoding<F, ...
/** * Sets all locks as specified in the original UserScript. Note that the * code may have changed since then, so an error may be thrown. */ public void resetLocks() { clearLocks(); IntegerSet set = new IntegerSet(); for (IntegerSet.Interval i : _Script.locks) { set.add(i.start, i.end); } f...
On Sunday, one of the many women who have accused former President Bill Clinton of sexual misconduct, Juanita Broaddrick, crushed former comedian Chelsea Handler for seemingly attempting to score partisan political points off of sexual misconduct allegations against Senate candidate Roy Moore (AL-R) while ignoring alle...
<reponame>swirzt/compiladores2021<filename>src/Bytecompile.hs {-# LANGUAGE PatternSynonyms #-} -- | -- Module : Byecompile -- Description : Compila a bytecode. Ejecuta bytecode. -- Copyright : (c) <NAME>, <NAME>, 2020. -- License : GPL-3 -- Maintainer : <EMAIL> -- Stability : experimental -- -- Este módu...
import { createGlobalStyle } from 'styled-components'; import WorkSans from '../assets/fonts/WorkSans-VariableFont_wght.ttf'; import Sora from '../assets/fonts/Sora-VariableFont_wght.ttf'; import { theme } from './theme'; export const GlobalStyle = createGlobalStyle` body { -webkit-font-smoothing: antialiase...
def _expression_list_to_conjunction(expression_list): if not isinstance(expression_list, list): raise AssertionError(u'Expected list. Received {}: ' u'{}'.format(type(expression_list).__name__, expression_list)) if len(expression_list) == 0: raise AssertionError(u'Re...
def recipe(self, backbone=True): buf = self.vol/10 enzyme = self.vol/100 plasmid = 4/25*self.vol m2 = """ After gel purification, add 1µL CIP to backbone directly, place at 37 for 30min """ if backbone is True: message1 = 'plasmid {0}'.format(self.plasmid) ...
Browsing Models for Hypermedia Databases Hypertext can be simply defined as the creation and representation of links between discrete pieces of data. When this data can be graphics, or sound, as well as text or numbers, the resulting structure is referred to as hypermedia. The strengths of hypermedia arise from its fl...
MOSCOW (Reuters) - Russia and the world’s top energy user China may jointly develop six floating nuclear power plants (NPPs), Russia’s nuclear export body said on Tuesday, a further joint energy project since the signing of a $400 billion gas supply deal. Rusatom Overseas, the export branch of state nuclear reactor mo...
/* * Invalidate the D-caches, but no write back please */ static void sh2a__flush_invalidate_region(void *start, int size) { unsigned long v; unsigned long begin, end; unsigned long flags; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BY...
/* * Set frequency of internal CW generator common to both DAC channels * * clk_8m_div: 0b000 - 0b111 * frequency: range 0x0001 - 0xFFFF * */ void DAC_Module::dac_frequency_set(int clk_8m_div, int frequency) { REG_SET_FIELD(RTC_CNTL_CLK_CONF_REG, RTC_CNTL_CK8M_DIV_SEL, clk_8m_div); SET_PERI_REG_BITS(SENS_...
// ////////////////////////////////////////////////////////////////////////////// // // RMG - Reaction Mechanism Generator // // Copyright (c) 2002-2011 Prof. <NAME> (<EMAIL>) and the // RMG Team (<EMAIL>) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associa...
package rest import ( "github.com/eyebluecn/tank/code/core" ) //@Service type BridgeService struct { BaseBean bridgeDao *BridgeDao userDao *UserDao } func (this *BridgeService) Init() { this.BaseBean.Init() b := core.CONTEXT.GetBean(this.bridgeDao) if b, ok := b.(*BridgeDao); ok { this.bridgeDao = b } ...
/** * Derived-class handler when the fragment is canceled */ @Override protected final void doCancelFragment(boolean userCancel) { if (itsNewTask != null) { NewTask task = itsNewTask; itsNewTask = null; task.cancel(false); } GuiUtils.setKeyb...
package toolbelt import ( "net/http" "net/http/httptest" "testing" ) func TestDefaultHeaderTransport(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ua := r.UserAgent() if ua != "test-agent" { t.Fatalf("expected user-agent to be test-agent but was %...
/** * Class provides a weighted collection and a method * to select random element according to their weight * @param <T> Weighted result */ public class WeightedCollection<T> { private final NavigableMap<Integer, T> map = new TreeMap<>(); private final Random random; private int total = 0; public ...
// +build linux,!gccgo package main /* #cgo CFLAGS: -Wall extern void joinmnt(); void __attribute__((constructor)) initmnt(void) { joinmnt(); } */ import "C"
The nature versus nurture battle is scientifically over. Due to the cornucopia of research pouring out, it has become patently obvious that traits of all sorts are heritable (551 traits analyzed in this study). The study doesn’t just examine the heritability of intelligence, but a myriad of behaviors that constitute h...
/** * Demonstration of Stack Class. */ public class Stacks { public static void main(String[] args){ Stack stack = new Stack(); for(int i=0; i< Month.month.length; i++){ stack.push(Month.month[i]); } System.out.println("stack = " + stack); // Treating a stack as...
[bitcoin-dev] Weak block thoughts... I've been thinking about 'weak blocks' and SPV mining, and it seems to me weak blocks will make things better, not worse, if we improve the mining code a little bit. First: the idea of 'weak blocks' (hat tip to Rusty for the term) is for miners to pre-announce blocks that they're w...
def _read_parquet_dispatch(df: DataFrameType): if isinstance(df, pd.DataFrame): return pd.read_parquet else: return cudf.io.read_parquet
// Config returns `*rest.Config` instance of Kubernetes client-go package. This // config can be used to create a new client that will work against k3s cluster // running in the provided container. func Config(c *gnomock.Container) (*rest.Config, error) { configBytes, err := ConfigBytes(c) if err != nil { return ni...
Electroless, Electrolytic and Galvanic Copper Deposition with the Scanning Electrochemical Microscope (SECM) Summary The Scanning Electrochemical Microscope (SECM) can be used with different techniques of microstructured copper deposition. A first approach involves the electrolytic copper deposition on noble metals, w...
<filename>src/geojson_transformer/__init__.py<gh_stars>0 from .transformer import GeoJsonTransformer
a = [int(i) for i in input().split()] n = a[0] m = a[1] x = min(n,m) print(x+1) if(n == x): for i in range(x+1): print(i,x-i) else: for i in range(x+1): print(x-i,i)
def isContinuationLine(self, line, priorStatus): if(line.strip() == ""): return priorStatus if(re.search(PythonExplicitContinuationRegex, line) != None): return languageSwitcher.CONTINUATION_EXPLICIT else: BracketStack = [] for char in line: ...
import { Directive, Input, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core'; import { NG_VALIDATORS, Validator, ValidatorFn, AbstractControl } from '@angular/forms'; import { notMatching } from './not-matching.validator'; const NOT_MATCHING_VALIDATOR: any = { provide: NG_VALIDATORS, useExisting: ...
// // Created by Admin on 21.09.2019. // #ifndef PD_CHAIN_H #define PD_CHAIN_H #include <AMGEngine.h> #include <GUI/Canvas.h> #include <GUI/styles.h> #include <GUI/IECanvas.h> class AMGChain : public AMGObject { private: std::vector<GUI::IECanvas *> IEObjects; const float spacing = 0.01; std::vector<GU...
Not to be confused with Hepatology Herpetology (from Greek ἑρπετόν herpetón, meaning "reptile" or "creeping animal") is the branch of zoology concerned with the study of amphibians (including frogs, toads, salamanders, newts, and caecilians (gymnophiona)) and reptiles (including snakes, lizards, amphisbaenids, turtles...
package dcr import ( "context" "io/ioutil" "sync" "time" "github.com/Shopify/sarama" "github.com/decred/dcrd/rpc/jsonrpc/types" "github.com/decred/dcrd/rpcclient/v4" "github.com/golang/glog" ) func rpcGetWork(wg *sync.WaitGroup, client *rpcclient.Client, workCh chan *types.GetWorkResult, errCh chan error) { ...
Imprints of security challenges on vernacular architecture of northern Nigeria: a study on Borno State Security challenges are known to have diverse negative impacts on all facets of human endeavours across the world. However, in a country like Nigeria that is faced with myriads of security challenges ranging from arm...
def paths(self): if self.__paths is None: directory = os.path.join(self.root_dir, self.dir_name) my_paths = [] for filename in sorted(os.listdir(directory)): match = re.match(self.ordering_pattern, filename) if not match: co...
// Verify compares the expected values and the observed outcome, returning // an error if the verification failed. func (c Check) Verify() error { defer func() { if c.observed != nil { if c.observed.Body != nil { c.observed.Body.Close() } } }() switch true { case c.observed == nil: return fmt.Errorf...
class ArtNetConfigurator: """Used for building an ArtNet Server with Nodes""" pat_universe = re.compile('^universe_[0-9]+$') pat_universe_lines = re.compile('^universe_[0-9]+_lines$') @staticmethod def get_artnet_server(config_artnet=None, config_led_mapping=None): if config_artnet: ...
<filename>src/main/java/com/project/bookmyshow/db/mappers/SeatsBookingDynamicSqlSupport.java package com.project.bookmyshow.db.mappers; import java.sql.JDBCType; import java.util.Date; import javax.annotation.Generated; import org.mybatis.dynamic.sql.SqlColumn; import org.mybatis.dynamic.sql.SqlTable; public final cl...
package cmd import ( "fmt" "go/build" "os" "os/exec" "os/user" fp "path/filepath" "runtime" "strings" "github.com/spf13/cobra" ) func dockerCmd() *cobra.Command { cmd := &cobra.Command{ Use: "docker [target]", Run: dockerHandler, Args: cobra.ExactArgs(1), Short: "Build QML app using Docker ima...
def compute_work_item_times(df: pd.DataFrame) -> pd.DataFrame: df.from_phase.fillna('Start', inplace=True) df.to_phase.fillna('End', inplace=True) relevant_columns = ['work_item', 'timestamp'] start_times = df[df.from_phase == 'Start'][relevant_columns] end_times = df[df.to_phase == 'End'][relevant_...
// Copyright 2021 Google 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 of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
#include<sstream> #include <iostream> #include <string> #include <algorithm> #include <cmath> #include <math.h> #include <cstdlib> #include <iomanip> #include<numeric> #include<set> #include<bitset> #include<cstring> #include<stack> #include<queue> #include<list> #include<map> #include<vector> #include<ctype.h> #incl...
Lebanese gunmen greeted an edict from the leader of Hezbollah banning the firing of celebratory shots in the air - with a volley of gunfire. In a televised speech whose opening remarks were greeted with a customary staccato round of shots in central Beirut, Sayyed Hassan Nasrallah criticised the phenomenon which he sa...
Even the most creative business card design cannot guarantee your business success, however it is one of those very first things that make a very long lasting impression. So, you shouldn’t miss an opportunity to show your best qualities here, because your business card is much more than just your contact information. I...
/** * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes * Mineshafts at the end, it adds Fences... */ public boolean addComponentParts(World p_74875_1_, Random p_74875_2_, StructureBoundingBox p_74875_3_) { if (this.isLiquidInStructureBoundingBox(p_74875_1_, ...
from __future__ import absolute_import from datetime import timedelta from django.core.urlresolvers import reverse from sentry.testutils import APITestCase, SnubaTestCase from sentry.testutils.helpers.datetime import iso_format, before_now class OrganizationEventsStatsEndpointTest(APITestCase, SnubaTestCase): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2021 by <NAME>. All rights reserved. This file is part # of the Robot Operating System project, released under the MIT License. Please # see the LICENSE file included as part of this package. # # author: <NAME> # created: 2020-11-13 # modified: 2020-1...
// Custom Viewholder class for the list items public class ItemViewHolder extends ViewHolder { @BindView(R.id.expand_view) ExpandableTextView expandableTextView; @BindView(R.id.expandable_text) TextView textViewReview; @BindView(R.id.tv_review_author) TextView textView...
/// Removes the least recently seen node from a particular routing bucket in the routing table. pub fn remove_lrs(&mut self, key: &Key) -> Option<NodeData> { let index = cmp::min( self.node_data.id.xor(key).leading_zeros(), self.buckets.len() - 1, ); self.buckets[index].r...
def unblock_contact(source, target): if source.has_blocked(target): source.update(pull__blocked=target) clear_get_user_cache(source) clear_get_contacts_cache(source, target) clear_get_followers_cache(target)
{-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Hs.Main.Build.Render ( RenderEffect , renderBuildingComponent , renderBuildingDependency , renderCompilingModule , renderCompletedDependency , renderConfiguringComponent , renderDownloadingDependency , renderPreprocessin...
Techniques for magnetic field monitor of the low frequency trapezoidal pulse magnet with the NMR Measurement of magnetic field of the lattice bending magnet is important to control the beam orbit, tune control and the timing of the fixed magnetic field. Hole probe and search coil are used conventionally and NMR has be...
package email import "github.com/flowdev/example-mono/x/logging" func Send(address, title, text string) { logging.Log("Sending email to: " + address) }
/** * This class is responsible for sanitising the apply url to ensure it is formatted correctly. */ @Slf4j public class ApplyURLSanitiser { public static Vacancy sanitise(Vacancy vacancy) { String originalURL = vacancy.getApplyURL(); String url = vacancy.getApplyURL(); if (url != null &...
<reponame>DeepInThought/swim // Copyright 2015-2020 SWIM.AI inc. // // 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...
#include "storage_manager.hh" #include <drogon/HttpAppFramework.h> #include <thread> #include <filesystem> #include "concurrent_cache.hh" namespace detail { static hanaru::storage_manager* instance_ = nullptr; // Hard drive information std::atomic_int64_t current_free_space_ = 0; // RAM informati...
package de.shiirroo.manhunt.command.subcommands.vote; import de.shiirroo.manhunt.utilis.vote.BossBarCreator; import de.shiirroo.manhunt.utilis.vote.VoteCreator; import org.bukkit.entity.Player; public abstract class Vote { private final VoteCreator voteCreator = voteCreator(); public VoteCreator getVoteCrea...
Linux 4.5 Offloads Copying, Improves IPv6 Networking March 15, 2016 By Sean Michael Kerner The Linux 4.5 kernel was officially released by Linus Torvalds late on Sunday March 13, providing the second major kernel milestone update so far in 2016, following Linux 4.4 which debutedon January 10. Among the big addition...
Attention! This news was published on the old version of the website. There may be some problems with news display in specific browser versions. Tactical Tournament 7x7 in a new format! Prize fund: 95000 Golden Eagles + “Gladiator” and “Steel Legion” decals Participate Combined battles 7х7 tournament in Realistic B...
Just when you thought the 'Russian collusion' narrative couldn't get any more surreal, 3 House democrats decide to write a letter to the FCC which can only be described as 'criminally stupid' and even that seems generous. According to the letter, signed by Representatives Anna Eshoo (D-CA), Mike Doyle (D-PA) and Frank...
<gh_stars>1-10 module Data.JSONTool.AstTransforms where import Data.Aeson import qualified Data.Vector as Vector import Data.Vector ((!?)) import qualified Data.HashMap.Strict as HashMap import Data.List (concatMap, sortOn) import Data.Monoid.Endo import qualified Data.Text as Text flatten :: Endo Value flatten = End...
/** * This class parses the CSV file that is created by calling the CDC API for COVID-19 vaccination * information. The API can be found at: * <p> * https://data.cdc.gov/resource/km4m-vcsb * </p> * <p> * The number of doses given in a day is used to select a date for when an individual in the * simulation will ...
def change_next_charge_date(self, charge_id, to_date): return self.http_put( f'{self.url}/{charge_id}/change_next_charge_date', {'next_charge_date': to_date} )
/** * PmPowerUpFpd() - Power up FPD domain * * @return Status of the pmu-rom operations */ static int PmPowerUpFpd(void) { if (0 != (XPfw_Read32(PMU_GLOBAL_PWR_STATE) & PMU_GLOBAL_PWR_STATE_FP_MASK)) { PmDbg(DEBUG_DETAILED,"Skiping FPD power up as FPD is on\r\n"); return XST_SUCCESS; } int status = ...
#include <iostream> #include <string> #include <vector> using namespace std; vector<int> z_function(const string& str) { int n = str.size(); vector<int> z(n); for (int i = 1, l = 0, r = 0; i < n; ++i) { if (i <= r) z[i] = min(r - i + 1, z[i - l]); while (i + z[i] < n && str[z[i]] == str[i + z[i]]) +...
import YamlFilesCreator from './yaml-files.creator'; describe('YamlFilesCreator', () => { let fileRepository = null; let yamlFilesCreator = null; beforeEach(() => { fileRepository = { hasAccess: (path, permission) => false, loadData: (filename, extension) => 'loadData', saveData: jest.fn()...
Terahertz laser based standoff imaging system Definition and design of a terahertz standoff imaging system has been theoretically investigated. Utilizing terahertz quantum cascade lasers for transmitter and local oscillator, a detailed analysis of the expected performance of an active standoff imaging system based on ...
package main import ( "github.com/ligato/cn-infra/agent" "github.com/ligato/cn-infra/datasync" "github.com/ligato/cn-infra/datasync/kvdbsync" "github.com/ligato/cn-infra/datasync/kvdbsync/local" "github.com/ligato/cn-infra/datasync/resync" "github.com/ligato/cn-infra/db/keyval/etcd" "github.com/ligato/cn-infra/...
import pandas as pd import numpy as np import matplotlib.pyplot as plt ds=pd.read_csv("Salary_Data.csv") x=ds.iloc[:,:-1].values y=ds.iloc[:,1].values from sklearn.model_selection import train_test_split x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=1/3) from sklearn.linear_model import LinearReg...
def capture_snapshots(self, path_globs_and_roots): return self._scheduler.capture_snapshots(path_globs_and_roots)
/// Create a memref allocation with the given type and dynamic extents. static FailureOr<Value> createAlloc(OpBuilder &b, Location loc, MemRefType type, ValueRange dynShape, const BufferizationOptions &options) { if (options.allocationFn) ret...
import * as React from "react" import { css } from "theme-ui" const Footer = () => ( <footer css={css({ mt: 4, pt: 3, })} > </footer> ) export default Footer
/** Utility method: * Formulate an HTTP POST request to upload the batch query file * @param queryBody * @return * @throws UnsupportedEncodingException */ private HttpPost makePost(String queryBody) throws UnsupportedEncodingException { HttpPost post = new HttpPost(ClueWebSearcher.BATCH...
def random_page(language: str) -> Page: url = create_url(language) try: with requests.get(url) as response: response.raise_for_status() return Page(**response.json()) except (requests.exceptions.RequestException, TypeError) as error: message = str(error) raise...
n,l = [int(x) for x in input().split()] a = [int(x) for x in input().split()] a.sort() b = [] if(n>1): for i in range (n-1): b.append((a[i+1]-a[i])/2) b.sort(reverse = True) hsl = max(a[0], (l-a[n-1]), b[0]) print (hsl) else: print (max(a[0], l-a[0]))