content stringlengths 10 4.9M |
|---|
<gh_stars>0
import 'reflect-metadata';
/**
* Serialize decorator
* It apply to properties
* @param replaceWithId
* @returns {(target:Object, propertyKey:string)=>undefined}
* @constructor
*/
export declare function Serialize(replaceWithId?: boolean): (target: Object, propertyKey: string) => void;
/**
* Decorator... |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
// This file is run by the x509 tests to ensure that a program with minimal
// imports can sign certificates without errors resulting from mis... |
Laboratory comparison of new high flow rate respirable size-selective sampler
Abstract A newly developed high flow rate respirable size-selective cyclone sampler (GK4.162—also known as the Respirable Air Sampling Cyclone Aluminum Large (RASCAL)) was calibrated to determine its optimum operating flow rate. The Health a... |
import { HttpHeaders, HttpParams } from '@angular/common/http';
import { InjectionToken } from '@angular/core';
import { Title } from '@angular/platform-browser';
export const APP_TITLE = new InjectionToken<string>('appTitle');
export const appTitleFactory = (titleService: Title) => {
return titleService.getTitle()... |
Exhaustive searches had failed to find any trace of Mr Fossett Items possibly belonging to Steve Fossett, the US adventurer who vanished a year ago, have been found by a hiker in California. ID cards, cash and a sweatshirt were among the items found in woods near the town of Mammoth Lakes, in a rugged eastern area of t... |
#include <bits/stdc++.h>
#define REP(a,b) for(int a=0; a<(b); ++a)
#define FWD(a,b,c) for(int a=(b); a<(c); ++a)
#define FWDS(a,b,c,d) for(int a=(b); a<(c); a+=d)
#define BCK(a,b,c) for(int a=(b); a>(c); --a)
#define ALL(a) (a).begin(), (a).end()
#define SIZE(a) ((int)(a).size())
#define VAR(x) #x ": " << x << "... |
Unravelling the ‘Velcro Effect’: Is Deterring Assaults against the Police Indicative of a More Aggressive Style of Policing?
The ‘Velcro Effect’ was proposed to explain how the mere threat of using incapacitant sprays deterred assaults against the police (Kaminski, Edwards, & Johnson, 1998). The deterrent capabilities... |
/**
*
* @author Luiz Felipe De Amorim
*/
public class MovieDetails extends JFrame{
private JPanel panel;
private JLabel filmImg;
private JLabel title;
private JPanel info;
private JProgressBar stars;
private JLabel year;
private JLabel classification;
private JLabel duration... |
Fancy wrapping your lips around "arguably the fanciest premixed drink ever made"? Well, consider this your invitation to the Lemmy Party.
This Friday The Catfish will be launching the new Lemmy Party Berliner Weisse from Mash Brewing. Although to call it simply a "Berliner Weisse" is underselling somewhat, which is wh... |
use crate::data::*;
use crate::view::View;
use clipboard::{ClipboardContext, ClipboardProvider};
use std::cmp;
use termion::event::{Event, Key, MouseButton, MouseEvent};
#[derive(Debug, Clone)]
pub enum State {
Insert,
Message,
Prompt(String, String, PromptAction),
Select(usize),
Selected,
Open... |
Sweden—Recent Changes in Welfare State Arrangements
The Swedish welfare state, once developed to create a new society based on social equality and universal rights, has taken on a partly new direction. Extensive choice reforms have been implemented in social services and an increasing proportion of tax-funded social s... |
<gh_stars>1-10
import {Animated} from 'react-native';
import {systemWeights} from 'react-native-typography';
import styled from 'styled-components/native';
import {COLOR_WHITE, COLOR_YELLOW} from '../../globals/constants';
interface BackdropProps {
height: number;
width: number;
}
export const Backdrop = styled... |
/**
* Represent a section of a SQL Statement. Sections are: <br/>
* SELECT, WHERE, ORDER BY
*
* @author The eFaps Team
* @version $Id$
*/
public abstract class AbstractQSection
{
/**
* Append to the SQLSelect.
* @param _select SQLSelect to be appended to
* @return this
* @throws EFapsExcep... |
/*
** trackEvent
**
** An allocation event has dropped in on us.
** We need to do the right thing and track it.
*/
void
trackEvent(uint32_t aTimeval, char aType, uint32_t aHeapRuntimeCost,
tmcallsite * aCallsite, uint32_t aHeapID, uint32_t aSize,
tmcallsite * aOldCallsite, uint32_t aOldHeapID, uin... |
/**
* See {@link #combine_float}, but for a group method with a void result.
* These need to be combined as well, both for synchronization purposes,
* and for the exceptions.
*/
protected final synchronized void combine_void(BinomialCombiner combiner,
boolean to_all, int lroot, Exception... |
import argparse
import code
import io
import json
import os
import re
import sys
import traceback
import typing
from abc import ABC, abstractmethod
from argparse import ArgumentParser
from fnmatch import fnmatch
from typing import Any, Callable, Dict, Iterable, List, Optional, TextIO, Tuple, Union
from hpc.autoscale i... |
class ElfDynamic:
"""
An object to represent an Elf dynamic entry.
(linker/loader directives)
"""
has_string = [DT_NEEDED, DT_SONAME]
def __init__(self, bytes=None):
self.name = ""
def __repr__(self):
name = self.getName()
if not name:
name = hex(self.d_... |
// ---------------------------------------------------------------------
//
// Copyright (c) 2014 - 2020 by the IBAMR developers
// All rights reserved.
//
// This file is part of IBAMR.
//
// IBAMR is free software and is distributed under the 3-clause BSD
// license. The full text of the license can be found in the f... |
/**
* Serialize the tree to the file
* @param randomAccessFile
* @throws StorageManagerException
*/
public void writeToStream(final RandomAccessFile randomAccessFile) throws StorageManagerException {
nodesQueue.clear();
try {
randomAccessFile.write(SSTableConst.MAGIC_BYTES_SPATIAL_RTREE_INDEX);
final ... |
<reponame>AlexeySushkov/Exonum-Demo
// Copyright 2018 The Exonum Team
//
// 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... |
“Everything is Either Sent by God or Used by God”: An Exploratory Study on the Impact of COVID-19 Upon the Religious Lives of Black Families Living with Dementia
The purpose of this research study was to explore the impact of COVID-19 on church engagement for Black families affected by dementia in the USA. Semi-struct... |
<reponame>priya-pp/Priya
# Copyright 2016 Brocade Communications System, 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/li... |
//Parse makes some checks based on a torrent file.
//Maybe further checks should be made beyond these.
func (m *MetaInfo) Parse() error {
err := m.Info.Parse()
if err != nil {
return fmt.Errorf("metainfo parse: %w", err)
}
return nil
} |
def chuck_with(word, prefix) -> str:
word = remove_chucks(word)
word = prefix + word
word = word[:-1] + '״' + word[-1]
return word |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package membership
import (
"crypto"
"crypto/x509"
)
// KeyInfo represents a (secret) key that is either already stored
// in the bccsp/keystore or key material to be imported to the
// bccsp key-store. In later versions it may con... |
/**
* A parser for <a href="http://tools.ietf.org/html/rfc2616#section-3.3">RFC2616
* Date format</a>.
*
* @author slandelle
*/
public class RFC2616DateParser {
private final String string;
private final int offset;
private final int length;
/**
* @param string a string that will be fully p... |
def state_size(self):
return (tf.TensorShape([self._num_units]),
tf.TensorShape([self._num_read_heads, self._embedding_size]),
tf.TensorShape([self._memory_size, self._embedding_size]),
tf.TensorShape([1, self._memory_size, 1]),
tf.TensorShape([self._num_write_heads, ... |
//ToDo - Implement all methods
@Service
public class StatServiceImpl implements StatService {
@Override
public boolean areImported() {
return false;
}
@Override
public String readStatsFileContent() {
return null;
}
@Override
public String importStats() {
retu... |
Since he’s become the presumptive Republican presidential nominee, pro-life voters are starting to move in Donald Trump’s direction — especially knowing the alternative is abortion activists Hillary Clinton. But many pro-life voters and some pro-life leaders remain skeptical about supporting Trump given some of his mis... |
Oxford graduate launches erotic website as alternative to hardcore porn to prevent men becoming 'inconsiderate lovers'
Cindy Gallop, 52, believes site is sex education aid of the future
Aims to 'reform porn' and 'rehabilitate' younger generation
An Oxford graduate has set up an erotic website aiming to promote a tas... |
<filename>pkg/agent/agent_test.go
package agent_test
import (
"testing"
"k8s.io/client-go/kubernetes/fake"
"github.com/flatcar-linux/flatcar-linux-update-operator/pkg/agent"
"github.com/flatcar-linux/flatcar-linux-update-operator/pkg/updateengine"
)
//nolint:funlen // Just many subtests.
func Test_Creating_new_... |
“There really has been an exponential increase of media interest in what’s happening. I think that’s the result of new research, (and) the result of some major international conferences that are really establishing the field of psychedelic science and medicine.” Brad Burge of MAPS.
It seems we’re finally at a turning ... |
Urban explorers from Ukraine say they have discovered logging operations inside the Chornobyl exclusion zone and warn that irradiated wood is being sold to unsuspecting consumers.
"The first time we saw forests and the second time it wasn't there." -Artur Kalmykov
"I wouldn't want to live in such a house," Artur Kalm... |
Fear of novelty in infant rats predicts adult corticosterone dynamics and an early death
Individuals who are fearful of novelty have a larger hypothalamic-pituitary-adrenal axis response than do nonfearful individuals. We hypothesized that a fearful behavioral style emerging early in life would be associated with life... |
{-
Author : <NAME>.
Date : 6/10/2018
Problem : Modified run-length encoding.Modify the result of problem 10 in such
a way that if an element has no duplicates it is simply copied into the
result list. Only elements with duplicates are transferred as (N E) lists.
-}
mo... |
<filename>flink-table-store-core/src/test/java/org/apache/flink/table/store/file/data/DataFileTest.java<gh_stars>10-100
/*
* 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 c... |
<filename>fbpmp/pcf/call_process.py<gh_stars>0
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import asyncio
import logging
import pathlib
import sys
from typing impo... |
use itertools::Itertools;
use std::fmt;
use std::str;
use crate::bitboard::Factory as BBFactory;
use crate::{Bitboard, Color, Hand, Move, MoveError, Piece, PieceType, SfenError, Square};
/// MoveRecord stores information necessary to undo the move.
#[derive(Debug)]
pub enum MoveRecord {
Normal {
from: Squ... |
<reponame>NDNLink/NDN-Chord
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005 INRIA
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
*... |
def is_64bit():
is64 = True if architecture()[0] == "64bit" else False
return is64 |
/// Returns whether all elements of `xs` represent valid spins.
static auto is_valid_spin(__m256 const xs) noexcept -> bool
{
return _mm256_movemask_ps(_mm256_or_ps(
_mm256_cmp_ps(xs, _mm256_set1_ps(1.0f), _CMP_EQ_OQ),
_mm256_cmp_ps(xs, _mm256_set1_ps(-1.0f), _CMP_EQ_OQ... |
package fast3d.complex.light;
import fast3d.graphics.Color;
import fast3d.graphics.Texture;
/**
* combines all data used to render under light
*
* @author <NAME>
*/
public class Material extends java.lang.Object {
/**
* the color used to illuminate with ambient light (background-light)
*/
public final Col... |
<filename>src/app/ai/ultimate-tic-tac-toe.ts
import { GameMove, GameWinner, SearchableGame } from './searchable-game';
import { TicTacToe, TicTacToeMark, TicTacToeMove } from './tic-tac-toe';
export class UltimateTicTacToeMove implements GameMove {
constructor(public row: number, public col: number, public submov... |
// NewHTTPReqDatum creates a datum from a HttpReq
func NewHTTPReqDatum(httpreq *HTTPReqDatum) *Datum {
return &Datum{
Val: &Datum_HttpReq{
HttpReq: httpreq,
},
}
} |
Synthesis of some acrylophenones with N-methylpiperazine and evaluation of their cytotoxicities
Abstract In this study, the compounds having acrylophenone structure, 1-aryl-2-(N-methylpiperazinomethyl)-2-propen-1-one dihydrochlorides, were synthesized and their chemical structures were identified with 1H NMR, 13C NMR ... |
import { action, computed, observable } from "mobx";
import { Cell, ICellSnapshot } from "./cell";
import { getDefaultConfig, ISimulationConfig, getUrlConfig } from "../config";
import { cellAtGrid, getCellNeighbors4, getCellNeighbors8 } from "./utils/grid-utils";
import { FloodingEngine } from "./engine/flooding-engin... |
/**
* A change has occured in the selection, update the action bar
*/
@Override
public void sync() {
final Set<Editable> edits = data.getEditables();
vbox.getChildren().clear();
vbox.getChildren().add(selector.createLinkedControlBox());
Editable current = selector.current()... |
input1 = raw_input()
input2 = raw_input()
l = len(input1)
if l == len(input2):
match = True
for i in range(0,l):
if input1[i] != input2[l-i-1]:
match = False
break
if match:
print 'YES'
else:
print 'NO'
else:
print 'NO' |
//%2005////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Cor... |
<reponame>ohno418/rust
// Test that a `limit` of 0 is valid
#![recursion_limit = "0"]
macro_rules! test {
() => {};
($tt:tt) => { test!(); };
}
test!(test); //~ ERROR recursion limit reached while expanding `test!`
fn main() {}
|
/**
*
* Keeps track of monitoring modules; it's an old class somehow related with error handling from the initial Thread pool executor
* Somehow outdated ...
*
* @since the beginning
* @author Iosif Legrand, ramiro
*/
public class TaskManager implements ResultNotification {
/** The Logger */
private s... |
<reponame>AnthonyM/service-fabric<gh_stars>1-10
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// --------------------------------------------... |
Brain xenografts: the effect of cyclosporin A on graft survival.
Animal models of Parkinson's disease and Alzheimer's disease have shown dramatic functional improvement after transplantation of embryonic neurons into denervated regions of the adult brain. Because of the ethical and logistic problems associated with th... |
def load_gallery_features(path_in, gal):
mid_set = list(set([el[2] for el in gal]))
mid_set.sort()
return {
mid: pd.read_pickle(path_in.joinpath(mid).joinpath("encodings.pkl"))
for mid in tqdm(mid_set)
} |
<reponame>chonmb/SpringCloud<gh_stars>1-10
package com.springboot.cloud.gateway.admin.models.entities;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
/**
* @author chonmb Email:<EMAIL>
* @date 2021/4/21 9:50
*/
@Entity
@Table(name = "gateway_route")
@Getter
@Setter
public class GatewayRou... |
// ListenAndServe starts a new dogstatsd server, listening for UDP datagrams on
// addr and forwarding the metrics to handler.
func ListenAndServe(addr string, handler Handler) (err error) {
var conn net.PacketConn
if conn, err = net.ListenPacket("udp", addr); err != nil {
return
}
err = Serve(conn, handler)
ret... |
{-# OPTIONS -Wall -Werror #-}
import Data.List (group)
{-
(**) Determine the prime factors of a given positive integer.
Construct a list containing the prime factors and their multiplicity.
Example in Haskell:
λ> prime_factors_mult 315
[(3,2),(5,1),(7,1)]
-}
-- OK! Q35 とほぼ同じで、タプルの計算だけ付け加えている。
prime_factors_mult ::... |
// Checks if mouse is hovering on a region
bool region_hit(int x, int y, int w, int h)
{
if (
gui.mouse.x < x || gui.mouse.y < y
||
gui.mouse.x >= x + w || gui.mouse.y >= y + h
)
return false;
else
return true;
} |
/**
* Sends a given token to the player's start position.
* @param tIndex int number [0-3] representing the index of the token in the tokens array
* @see #tokens
*/
public void start(int tIndex) {
this.tokens[tIndex].setPosition(this.pIndex * START_DISTANCE);
this.tokens[tIndex].setO... |
import { TeacherEntity } from './../teacher.entity';
import { RoleType } from './../../../common/constants/role-type';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { AbstractDto } from './../../../common/dto/AbstractDto';
export class TeacherDto extends AbstractDto {
@ApiProperty()
... |
def log_multiline(log_function, log_text, title=None, prefix=''):
logger.debug('log_multiline(%s, %s, %s, %s) called', log_function, repr(log_text), repr(title), repr(prefix))
if isinstance(log_text, str):
logger.debug('log_text is type str')
log_list = log_text.splitlines()
elif isinstance(... |
In his final New Rule of the night, Bill Maher disputed the idea thrown out by some that atheism is a religion. It’s a refrain you hear from people who can’t stand both groups and believe that dogma is dogma, plain and simple, but Maher argued that treating atheism like a religion would be like saying “abstinence is a ... |
/**
* Implementation of the Iterator.
*
*/
private static class IntRangeIterator extends RangeIterator {
int end;
Operator operator;
int start;
int step;
int value;
IntRangeIterator(IntRange r) {
this.value = this.start = r.start;
this.end = r.end;
this.operator ... |
<reponame>doric-pub/DoricSQLite<gh_stars>0
export * from "./src/SQLite";
export * from "./src/SQLiteORM";
|
package no.dusken.momus.service;
import no.dusken.momus.dto.PageOrder;
import no.dusken.momus.exceptions.RestException;
import no.dusken.momus.model.LayoutStatus;
import no.dusken.momus.model.Page;
import no.dusken.momus.dto.PageContent;
import no.dusken.momus.dto.PageId;
import no.dusken.momus.model.Publication;
impo... |
def resolve_one(self, name):
if name in self.resolved:
return
for dep in self.deps.get(name, ()):
self.resolve_one(dep)
self.compute(name)
self.resolved.add(name) |
High-fat diets are detrimental of the lipid profile, glucose metabolism and body composition of Wistar rats: the role of fatty acid type and consumption duration
Purpose The purpose of this study is to evaluate the nutritional effects in Wistar rats of supplementation with stand-alone saturated fatty acid (SFA) or mon... |
package snowball
import (
"testing"
)
var (
username = "username"
password = "password"
)
func TestClient_GetDetail(t *testing.T) {
client := New(username, password)
client.Login()
list := client.GetDetail("AMD,RGSE")
if len(list) != 2 {
t.Error("failed")
}
}
|
// Acquire will get one of the idle resources, or create a new one.
func (rp *ResourcePool) Acquire(ctx context.Context) (resource Resource, err error) {
if rp.IsClosed() {
return nil, ErrPoolClosed
}
select {
case <-ctx.Done():
return nil, ctx.Err()
default:
}
acq := acquireMessage{
ctx: ctx,
rch: make(... |
Here’s a quick heads up for those who pre-purchased Dragon Quest 8: Journey of the Cursed King through the Nintendo eShop.
If you live in North America, you can now pre-download the game. You already noticed that by reading the headline, but I have to fill this space with something.
According to Nintendo Everything, ... |
“Yes … everyone seems to be asleep,” Trent Reznor whispers at the opening of the ostentatiously-titled “Dear World,” the second song on the new Nine Inch Nails EP, his voice digitally teased like the anodyne textbot in Radiohead’s “Fitter Happier.” The line returns at the end of the song as a kind of provocation: Even ... |
Mere days before video footage of Democratic presidential nominee Hillary Clinton seizing and apparently fainting before having her limp body shoved onto a black van hit the media, comedian and left-wing activist Sarah Silverman told TMZ that only "f*cking a**holes" worry about the former secretary of state's health.
... |
<reponame>autopi-io/autopi-core
import logging
import salt.exceptions
# Define the module's virtual name
__virtualname__ = "clock"
log = logging.getLogger(__name__)
def __virtual__():
return __virtualname__
def help():
"""
Shows this help information.
"""
return __salt__["sys.doc"](__virtual... |
def domino_rotation(asolns, brd):
nsoln = domino_correction(np.rot90(brd, 1))
if True not in [np.array_equal(nsoln, soln) for soln in asolns]:
asolns.append(nsoln)
nsoln = np.rot90(brd, 2)
if True not in [np.array_equal(nsoln, soln) for soln in asolns]:
asolns.append(nsoln)
nsoln = d... |
// Cleanup cleans up the emulator state.
func Cleanup(state *EmulatorState) {
state.process.Kill()
err := os.RemoveAll(state.dataDir)
if err != nil {
log.Panicf("Failed to remove emulator data dir: %v", err)
}
} |
/**
*
* Holds a 3x3 matrix.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
* $Id$
*/
public class Matrix3f extends Matrix implements Serializable {
private static final long serialVersionUID = 1L;
public float m00,
m01,
m02,
m10,
m11,
m12,
m20,
m21,
m22;
/**
* C... |
/**
* Copyright 2023 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
#pragma GCC target("avx")
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#include<bits/stdc++.h>
#define rep(i,x,y) for (int i=(x);i<=(y);i++)
#define ll long long
#define inf 1000000001
using namespace std;
int read(... |
/**
* For command line interface utilities that are SOAP clients and need to authenticate with
* the admin service using credentials from local configuration.
* <p>
* This class takes -h,--help for displaying usage, and -s,--server for target server hostname.
* Subclass can provide additional options. The expected... |
import api from '@/api';
const fetchProducts = async (query: any): Promise <any> => {
return api({
url: "searchProducts",
method: "post",
data: query,
cache: true
});
}
export const ProductService = {
fetchProducts
} |
def names(self):
return [self.VALUE_ESTIMATOR, self.VALUE_DATASET] |
A New Password-and Position-Based Authenticated Key Exchange
Password-based authenticated key exchange is a popular method for secure authentication and key exchange. With the wide application of unmanned aerial vehicles, position information has also become an important factor in authentication. In this paper, we pre... |
def create_age_weights(self, place, params):
param_ind = place.place_type.value - 1
min_age = [params["age_group1_min_age"][param_ind],
params["age_group2_min_age"][param_ind],
params["age_group3_min_age"][param_ind]]
max_age = [params["age_group1_max_age"][... |
In a down month for video games, Microsoft’s Xbox 360 continued to buck the trend in May, according to new data out this afternoon.
Microsoft sold 270,000 Xbox 360s in the U.S. in May, up 39 percent over the same month last year, according to data compiled by the NPD Group market research firm. The Microsoft console h... |
use pin_project::pin_project;
#[pin_project]
struct Struct1 {} //~ ERROR may not be used on structs with zero fields
#[pin_project]
struct Struct2(); //~ ERROR may not be used on structs with zero fields
#[pin_project]
struct Struct3; //~ ERROR may not be used on structs with units
#[pin_project]
enum Enum1 {} //~ ... |
Nonintrusive Energy Meter for Nontechnical Losses Identification
We present in this paper a method and apparatus for nonintrusive measurement of active energy in low-voltage ac installations. In the proposed method, the active power is calculated from the voltage and current waveforms, and the phase shift between them... |
def iter_volume_data(self) -> dict:
for mod in self.iter_modalities():
if mod.volumes_data:
yield mod.volumes_data |
/**
* Generates all of the sub-objects and fields for a given class.
*
* @param rootNode the JSON class node in the JSON syntax tree.
* @param rootName the name of the root class to generate.
* @param codeModelPackage the code model package to generate the class in.
* @throws Exception... |
// GetTi50TestBoard gets a DevBoard for testing in either lab or workstation modes.
// TODO(b/197998755): Move into a precondition.
func GetTi50TestBoard(ctx context.Context, dut *dut.DUT, rpcHint *testing.RPCHint, mode, spiflash string, bufLen int, readTimeout time.Duration) (ti50.DevBoard, *rpc.Client, error) {
mode... |
package dealer
import (
"bytes"
"crypto/sha256"
"encoding/hex"
"fmt"
v1 "k8s.io/api/core/v1"
"github.com/nano-gpu/nano-gpu-scheduler/pkg/utils"
)
const (
NotNeedGPU = -1
)
// GPUResource ─┬─> GPUs
// └─> Demand ─> Plan
type Plan struct {
Demand Demand
GPUIndexes []int
Score int
}
... |
<gh_stars>1-10
package com.youlai.common.core.base;
public class BaseController<T> {
}
|
<filename>fxtract/main.cpp<gh_stars>0
//
// main.cpp
// fxtract
//
// Created by <NAME> on 30/07/13.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
#include <fstream>
#include <iostream>
#include <set>
#include <vector>
#include <string>
#include <unistd.h>
#include <seqan/seq_io.h>
#include <seqan/sequenc... |
Ukrainian civic activist Oleksandr Kolchenko is turning 27 on Nov 26, his third birthday in Russian captivity. The need for letters of support and also public attention is now even more urgent with Russia having just prevented real human rights activists from visiting him. Kolchenko, renowned filmmaker Oleg Sentsov and... |
def rbac_configmap_delete(p_client, ns):
value = "valueall"
keyvaluepair = {"testall": value}
configmap = create_configmap(keyvaluepair, p_client, ns)
delete_configmap(p_client, configmap, ns, keyvaluepair) |
As Twitchy reported early Thursday, a 32-year-old Australian citizen of Afghan descent was arrested after targeting Christmas shoppers with his car. Both the driver and a second man, who was photographing the aftermath of the attack and who also reportedly had three knives on him, were arrested.
Police initially said ... |
<filename>pkg/apis/compute/secgroup.go
// Copyright 2019 Yunion
//
// 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 ... |
/**
* Take a turn using another strategy.
*
* @param board the current state of the game
*
* @return the selected column of the board
*/
public int strategy1(Board board) {
int row = 2;
return -1;
} |
Posted by Raine Hutchens on Jul 13, 2012
Privateer Press is best known for their work on the Warmachine and Hordes miniature games. They’ve found a way to monetize the miniature market in a way that allows players to enjoy the game without the necessity to spend outrageous amounts on minis and sets. As an aspiring min... |
/**
* bi_shift_left
* Shift the given integer to the left as if multiplied by the given
* power of two.
* @params:
* * dest : pointer to big integer -- container for the shifted
* version
* * source : big integer -- the integer to copy and shift
* * shamt : int -- amount to shift by
*/
int bi_shift_left(... |
package read_test
import (
"os"
"path"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/felamaslen/gmus-backend/pkg/database"
"github.com/felamaslen/gmus-backend/pkg/read"
setup "github.com/felamaslen/gmus-backend/pkg/testing"
"github.com/felamaslen/gmus-backend/pkg/types"
)
var _ = Describ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.