content stringlengths 10 4.9M |
|---|
// Computes the cross product of two vectors
// out has to different from v1 and v2 (no in-place)!
void Vector_Cross_Product(float out[3], const float v1[3], const float v2[3])
{
out[0] = (v1[1] * v2[2]) - (v1[2] * v2[1]);
out[1] = (v1[2] * v2[0]) - (v1[0] * v2[2]);
out[2] = (v1[0] * v2[1]) - (v1[1] * v2[0]);
} |
<filename>tests/test_rtcrtptransceiver.py
from unittest import TestCase
from aiortc.rtcrtpparameters import RTCRtpCodecCapability
from aiortc.rtcrtptransceiver import RTCRtpTransceiver
class RTCRtpTransceiverTest(TestCase):
def test_codec_preferences(self):
transceiver = RTCRtpTransceiver("audio", None, ... |
package zmqchan
// TODO: Ensure Close() properly drains the TX channel
import (
"errors"
"fmt"
zmq "github.com/pebbe/zmq4"
"log"
"sync"
"sync/atomic"
)
var uniqueIndex uint64
type ZmqChanSocket struct {
Context *zmq.Context
zSock *zmq.Socket
zTxIn *zmq.Socket
zTxOut *zmq.Socket
zCont... |
Image caption Matthew Tvrdon has been detained indefinitely
A van driver who killed a mother-of-three and injured 17 other people in a series of hit-and-runs around Cardiff has been detained indefinitely under the Mental Health Act.
Matthew Tvrdon, 32, drove on an eight-mile "journey of mayhem" in 30 minutes last Oct... |
/**
* Perform initial read of repository. However, if data is already available, read is not be performed.
*/
public void initialRead(InitialReadListener listener) {
if (!isDownloadError) {
repository.initialRead(
() -> {
isDownloadError = false;
... |
/**
* Stores the known hosts file to use.
* Note that the known hosts file is ignored if a {@link HostKeyRepository} is set with a non-{@code null} value.
*
* @param knownHosts The known hosts file to use.
* @return This object.
* @throws NullPointerException If the given file is {@code nu... |
<reponame>pegasystems/somaria
import { BlockInput } from "./BlockInput";
import { BlockInputValue } from "./inputs/BlockInputValue";
import { BlockInputIndexedReference } from "./inputs/BlockInputIndexedReference";
import { BlockInputPublishedReference } from "./inputs/BlockInputPublishedReference";
import { BlockInput... |
import qualified Data.ByteString.Lazy.Char8 as B
import Data.List
main = do
inp <- fmap B.lines $ B.getContents
let [n,w] = map readI $ B.words $ inp!!0
let as = map readI $ B.words $ inp!!1
print (solve w as)
readI :: B.ByteString -> Int
readI s = case B.readInt s of Just (n,_) -> n
solve :: Int... |
/**
* Send Device Attributes (Primary DA).
*/
private void sendDeviceAttributes( int arg ) throws IOException
{
if ( arg != 0 )
{
log( "Unknown DA: " + arg );
}
else
{
if ( isVT52mode() )
{
writeResponse( ResponseType.ESC, "/Z" );
}
else
{
... |
/**
* Helper method that calls scanQsonvalue() and scanProperties()
*
* @return
*/
public ClassMapping scan() {
scanQsonValue();
if (!isValue) scanProperties();
return this;
} |
// Returns true if this Genome already includes provided node
func (g *Genome) hasNode(node *network.NNode) bool {
if node == nil {
return false
}
if id, _ := g.getLastNodeId(); node.Id > id {
return false
}
for _, n := range g.Nodes {
if n.Id == node.Id {
return true
}
}
return false
} |
#include <bits/stdc++.h>
#define MedoZ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define dd double
using namespace std;
int main()
{
MedoZ
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
dd r=(dd)n*n-4.0*n;
if(r<0)
... |
template <typename T>
class fenwick_tree {
public:
int n;
vector<T> fenw;
inline fenwick_tree(const int _n) : n(_n), fenw(_n) {}
template <typename A>
inline fenwick_tree(const vector<A> a) : fenwick_tree((int) a.size()) {
for (int i = 0; i < n; i++) {
add(i, a[i]);
}... |
import React, { useState } from "react";
import "./AddExam.css";
import { backend } from "./ConfigAssessor";
interface Props {
authorization: string;
}
const AddExam: React.FC<Props> = (props) => {
const [examId, setExamId] = useState(0);
// TO REMOVE
const handler = () => {
setExamId(-1);
};
return... |
def send_event_data_batch(producer: EventHubProducerClient, data: str):
event_data_batch = producer.create_batch(partition_id="0")
event_data_batch.add(EventData(data))
producer.send_batch(event_data_batch) |
<reponame>ContextMapper/context-mapper-archunit-extension
/*
* Copyright 2021 The Context Mapper Project 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.o... |
/** <!-- writeExample(ExceptionlessOutputStream,int[],double[],int[],double[],int) -->
* Writes an example vector to the specified stream, with all features
* being written in the order they appear in the vector.
*
* @param out The output stream.
* @param featureIndexes The lexicon indexe... |
Efficient multitasking will soon come to mobile devices as a new solution was introduced by XDA-recognized developer astoncheah. The developer made an app as a solution for Android without the need of a custom ROM.
Multitasking on desktop is becoming quicker and more efficient these days but it’s only now the mobile v... |
export const WEBHOOK = process.env.WEBHOOK ?? ''
export const SECRET = process.env.SECRET ?? ''
export const DB_URI = process.env.DB_URI ?? ''
export const V2RAY_URL = process.env.V2RAY_URL ?? ''
export const SSR_URL = process.env.SSR_URL ?? ''
|
<reponame>sitronlabs/SitronLabs_GDEH0213B72_Arduino_Library
/* Self header */
#include "gdeh0213b72.h"
/* Arduino libraries */
#include <Arduino.h>
#include <Wire.h>
/* Config */
#ifndef CONFIG_GDEH0213B72_TIMEOUT
#define CONFIG_GDEH0213B72_TIMEOUT 5000
#endif
#if CONFIG_GDEH0213B72_DEBUG_ENABLED
#define CONFIG_GDEH0... |
<reponame>xiang12835/GoF23
/* 工厂方法模式
苹果工厂
*/
public class AppleFactory {
public Fruit create(){
return new Apple();
}
} |
<gh_stars>0
package com.wix.reactnativenotifications.core.notification;
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import static com.wix.reactnativenotifications.Defs.LOGTAG;
public class PushNotifi... |
package model
type TeamMembershipsResponse struct {
}
|
<reponame>miksumin/ESP-OT<filename>ESP-OT-Lite/OT-core.h
/*
OpenTherm core
Version: 1.0
Author: <NAME>
Date: March 30, 2021
*/
#include <OpenTherm.h> // https://github.com/ihormelnyk/opentherm_library
OpenTherm ot(OT_INPIN, OT_OUTPIN);
char ot_status[32]; // OpenTherm status
bool dhw_present = fal... |
<filename>src/connectivity/network/tun/network-tun/buffer.h
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_CONNECTIVITY_NETWORK_TUN_NETWORK_TUN_BUFFER_H_
#define SRC_CONNECTIVITY_NETWORK_TUN... |
To quote George Will: Well.
Someone in the White House counsel’s office leaked this to Mike Cernovich, then to Eli Lake. Given Rice’s Benghazi track record, I’m trying to think of anyone in the previous White House whose fingerprints on “unmasking” members of Team Trump would be more likely to inflame the politics aro... |
Anti-Trust Policy and National Growth: Some Evidence from Italy
Antitrust problems affecting markets for intermediate goods or services raise the input costs of firms operating in the downstream sectors, which often face tough international competition. Such firms lose market shares, thus worsening the economic perfor... |
<reponame>PhilippeDeSousa/EpitechBundle<filename>Tek3/MAT/304pacman/pacman.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from enum import Enum
class CaseType(Enum):
Empty = -1
Pacman = -2
Wall = -3
Ghost = -4
class PacClass:
def __init__(self, _map, _wall, _space):
... |
#include<iostream>
#include<vector>
using namespace std;
class Graph
{
public:
vector<int> *adj;
int vertex;
vector<bool> visited;
Graph(int noOfV)
{
vertex = noOfV;
adj = new vector<int>[noOfV];
}
void addEdge(int u,int v)
{
adj[u].push_back(v);
a... |
/**
* Utility function to read from a 8-bit register
*/
uint8_t read_8(char address) {
uint8_t buffer[3];
buffer[0] = address;
twi_master_transfer(BMP180_ADDRESS, buffer, 1, false);
twi_master_transfer(BMP180_ADDRESS | 1, buffer, 1, true);
return buffer[0];
} |
<reponame>trungdung22/solana-dice
/**
* Transactions sent to the tic-tac-toe program contain commands that are
* defined in this file:
* - keys will vary by the specified Command
* - userdata is a Command enum (as a 32 bit value) followed by a CommandData union.
*/
#pragma once
#include "program_types.h"
typedef... |
import minifyCSS from "minifycss";
import config from "../project.config";
export default function transformCSS(code: string): string {
const replaced = replaceIcons(replaceColors(code));
return config.prod ? minifyCSS(replaced) : replaced;
}
function replaceColors(code: string): string {
const { colors } = co... |
package gql
import (
"context"
"fmt"
"sync"
"github.com/grailbio/base/log"
"github.com/grailbio/gql/hash"
"github.com/grailbio/gql/marshal"
"github.com/grailbio/gql/symbol"
)
// JoinMaxTables is the max # of tables that can appear in a single join
// expression.
const joinMaxTables = 4
// joinSubTable is an ... |
<filename>clients/java/dkv-client/src/main/java/org/dkv/client/ShardedDKVClient.java
package org.dkv.client;
import com.github.benmanes.caffeine.cache.*;
import com.google.common.collect.Iterables;
import dkv.serverpb.Api;
import java.io.Closeable;
import java.util.*;
import static java.util.Collections.addAll;
impo... |
// Unregister unregisters and shuts down the specified device.
//
// If the device is not currently registered, Unregister will do nothing.
func (reg *Registry) Unregister(d device.D) {
reg.mu.Lock()
defer reg.mu.Unlock()
e := reg.devices[d.ID()]
if e != nil {
This follows the same path done in manageEntryLifecy... |
from config import load_vars
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
env_vars = load_vars()
connection_url = 'mysql+pymysql://{}:{}@{}'.format(
env_vars['AWS_RDS_USER'], env_vars['AWS_RDS_PASSWORD'], env_vars['AWS_RDS_URL... |
/**
* Created by jeppe on 1/10/17.
*/
class MistLog {
static void err(String op, int code, String msg) {
Log.e("RPC error", msg + " code: " + code + " op: " + op);
}
} |
<reponame>EmrysMyrddin/saga<gh_stars>1-10
import { type Operation, type WrapperOperation, fork, terminal } from './operation'
import type { Effect } from './effect'
import type { Plugin } from './plugin'
const namespace = '@cuillere/time'
/**
* @hidden
*/
export type SleepOperations = {
sleep: SleepOperation
af... |
/**
* JUnit test rule to create a mock {@link WindowManagerService} instance for tests.
*/
public class SystemServicesTestRule implements TestRule {
private static final String TAG = SystemServicesTestRule.class.getSimpleName();
private final AtomicBoolean mCurrentMessagesProcessed = new AtomicBoolean(false... |
/**
* Copyright 2010 - 2020 JetBrains s.r.o.
*
* 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... |
Malate–aspartate shuttle promotes l‐lactate oxidation in mitochondria
Metabolism in cancer cells is rewired to generate sufficient energy equivalents and anabolic precursors to support high proliferative activity. Within the context of these competing drives aerobic glycolysis is inefficient for the cancer cellular en... |
#pragma once
#ifndef $fileinputname$_H_Included
#define $fileinputname$_H_Included
//TODO fill header
#endif // !$fileinputname$_H_Included |
package com.cnpc.framework.utils;
import org.apache.log4j.Logger;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import java.util.Set;
/**
* Created by billJiang on 2017/4/10.
* e-mail:<EMAIL> qq:475572229
*/
public class RedisUtil {
pr... |
package com.gc.system.mapper;
import com.gc.starter.crud.mapper.CrudBaseMapper;
import com.gc.system.model.SysRolePO;
/**
* @author jackson
* 2020/1/24 2:20 下午
*/
public interface SysRoleMapper extends CrudBaseMapper<SysRolePO> {
}
|
<filename>ternary_test.go
package ternary
import (
"fmt"
"math"
"reflect"
"strconv"
)
func ExampleGiveOnSuccess() {
fmt.Println(
GiveOnSuccess(strconv.ParseFloat("-9.0", 64)).
Else(math.NaN()),
)
// Output: -9
}
func ExampleGiveOnSuccess_second() {
fmt.Println(
GiveOnSuccess(strconv.ParseFloat("-9.0.0... |
<gh_stars>1-10
/*
* 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, software
... |
// check if node size has been changed after this library is built
void gm_graph_check_if_size_is_correct(int node_size, int edge_size)
{
if (node_size != sizeof(node_t)) {
printf("Current nodesize in the applicaiton is %d, while the library expects %d. Please rebuild the library\n",
node_s... |
<gh_stars>1-10
package top.yuan.test.aopAll;
import org.junit.jupiter.api.Test;
import top.yuan.context.support.ClassPathXmlApplicationContext;
/**
* \* Create by Yuan
* \* @author: Yuan
* \
*/
public class ApiTest {
@Test
public void test_aop_all() {
ClassPathXmlApplicationContext applicationCon... |
/******************************************************************************
* Copyright 2009-2018 Exactpro (Exactpro Systems 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
... |
<reponame>melix99/gtk4-rs<gh_stars>1-10
// Take a look at the license at the top of the repository in the LICENSE file.
use crate::{Event, EventType};
use glib::translate::*;
use glib::StaticType;
use std::fmt;
use std::mem;
impl Event {
pub fn downcast<T: EventKind>(self) -> Result<T, Event> {
unsafe {
... |
Intestinal TLR9 deficiency exacerbates hepatic IR injury via altered intestinal inflammation and short‐chain fatty acid synthesis
Mice deficient in intestinal epithelial TLR9 develop small intestinal Paneth cell hyperplasia and higher Paneth cell IL‐17A levels. Since small intestinal Paneth cells and IL‐17A play criti... |
Intramedullary Chondrosarcoma of Proximal Humerus
Primary chondrosarcoma is the third most frequent primary malignancy of bone after myeloma and osteosarcoma. It is ranging from slow growing nonmetastasising lesions to highly aggressive lesions. We report a case of primary intramedullary chondrosarcoma of proximal hum... |
<gh_stars>10-100
package cmd
import (
"fmt"
"os"
"sort"
"github.com/go-qamel/qamel/internal/config"
"github.com/spf13/cobra"
)
func profileListCmd() *cobra.Command {
return &cobra.Command{
Use: "list",
Short: "List all existing profile",
Args: cobra.NoArgs,
Aliases: []string{"ls"},
Run: ... |
Book Review: The Economic Basis of Ethnic Solidarity: Small Business in the Japanese American Community
The second part of the volume may give it a continuing usefulness long after the historiographical discussion has become updated. This contains accounts of the resources and research possibilities of various German ... |
<reponame>hugograf/grafioschtrader
package grafioschtrader.reports;
import java.time.LocalDate;
import java.time.Month;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.u... |
/** provides noise algorithms
* @author dermetfan */
public abstract class Noise {
/** the seed used by {@link #random} */
private static long seed = -1;
/** if {@link #seed} should be used (false by default) */
private static boolean seedEnabled;
/** the {@link Random} used to generate pseudo-random values *... |
/**
* Tests the deactivate() method, after setting some option.
*
* @param setOption function that sets an option
* @throws Throwable if an error occurs during setup
*/
private void testDeactivate(RunnableWithEx setOption) throws Throwable {
setUp();
setOption.run();
mgr... |
// ParseCoordinates parses string to coordinates.
func ParseCoordinates(str string) (Coordinates, error) {
var coordinates Coordinates
splits := strings.Split(str, api.Semicolon)
for _, s := range splits {
c, err := ParseCoordinate(s)
if err != nil {
return nil, err
}
coordinates = append(coordinates, c)
... |
GRADE system: new paradigm
Purpose of reviewAn exposition of the Grading of Recommendations Assessment, Development and Evaluation (GRADE) approach to recommendations. Recent findingsIn this review, we outline the process whereby the strength of evidence from the literature undergoes a systematic reappraisal. The GRAD... |
Imperfect drug penetration leads to spatial monotherapy and rapid evolution of multidrug resistance
Significance The evolution of drug resistance is a major health threat. In chronic infections with rapidly mutating pathogens—including HIV, tuberculosis, and hepatitis B and C viruses—multidrug resistance can cause eve... |
/**
* = AdditionalDetails
TODO Auto-generated class documentation
*
*/
@RooJavaBean
@RooToString
@RooJpaEntity
@RooEquals(isJpaEntity = true)
@Entity
@EntityFormat
public class AdditionalDetails {
/**
* TODO Auto-generated attribute documentation
*
*/
@Id
@GeneratedValue(strategy = Gener... |
<reponame>StarWarsDev/legion-discord-bot
package output
import (
"github.com/bwmarrin/discordgo"
)
const (
colorError = 0xE84A4A
colorInfo = 0xF2E82B
)
// Error returns an Embedder with a level of Success
func Error(title, description string) discordgo.MessageEmbed {
return newEmbedder(colorError, title, descri... |
<filename>actix-rt/src/runtime.rs
use std::{future::Future, io};
use tokio::task::{JoinHandle, LocalSet};
/// A Tokio-based runtime proxy.
///
/// All spawned futures will be executed on the current thread. Therefore, there is no `Send` bound
/// on submitted futures.
#[derive(Debug)]
pub struct Runtime {
local: ... |
<filename>app/components/home/home.e2e.ts
describe('Home', function() {
beforeEach(function() {
browser.get('/dist/dev');
});
});
|
<reponame>wuqingsen/-FFmpegDemo<gh_stars>1-10
package com.wuqingsen.opengllearn;
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
/**
* wuqingsen on 2021/4/7
* Mailbox:<EMAIL>
* annotation:
*/
public class FGLView extends GLSurfaceView {
public FGLView(Con... |
Neonatal screening for cystic fibrosis in São Paulo State, Brazil: a pilot study.
Cystic fibrosis is one of the most common autosomal recessive hereditary diseases in the Caucasian population, with an incidence of 1:2000 to 1:3500 liveborns. More than 1000 mutations have been described with the most common being F508d... |
/**
* Displays the population of a specified region
* @param region the region to show
*/
public void showBasicPopulationReportForRegion(String region){
var population = _populationService.getPopulationOfRegion(region);
System.out.println("The population of " + region + " is: " + populat... |
#include <bits/stdc++.h>
#include <string>
using namespace std;
int main(){
int t;
vector <string> vt;
cin>>t;
unordered_map<string , int> map;
while(t--){
string str;
cin>>str;
if(map.count(str)==0){
map[str] ++;
vt.push_back("OK");
... |
<filename>NewShare/app/src/main/java/com/melvin/share/modelview/item/ProductDetailItemViewModel.java
package com.melvin.share.modelview.item;
import android.content.Context;
import android.databinding.BaseObservable;
import android.view.View;
import com.melvin.share.model.serverReturn.ImgUrlBean;
import com.melvin.sh... |
def teacher_count(self):
return self.teachers.count() |
CONTRA-LATERAL PARADOXICAL PLEURAL EFFUSION DURING ANTITUBERCULOUS CHEMOTHERAPY Case
: abStraCt A 24-year old male developed left sided pleural effusion 10 days after the start of anti tubercular chemotherapy for right-sided pleural effusion and parenchymal lesion. This effusion seemed to be a paradoxical response as ... |
// ListElements lists all elements of an architecture
func (architecture *Architecture) ListElements() ([]string, error) {
elementConfigurations := []string{}
architecture.ElementsX.RLock()
for elementConfiguration := range architecture.Elements {
elementConfigurations = append(elementConfigurations, elementConfi... |
def findenumfiles(dir, prefix='.*?', suffix='', ngroups=1):
from os.path import join
from re import compile as recomp
if ngroups < 1:
raise ValueError('At least one number group must be specified')
numstr = '-([0-9]+)' * ngroups
grpidx = tuple(range(ngroups + 1))
regexp = recomp(r'^%s%s%s$' % (prefix, numstr, s... |
/*
* SimpleForamt (FBigDec) will be used to update the data. Then new data
* will be read also by SimpleForamt (FBigDec).
*/
@Test
public void testWriteReadSortedBigDecimal()
throws IOException {
/* Copy log file resource to log file zero. */
TestUtils.loadLog(getClass(), "j... |
<commit_msg>Update attribute to follow pre-established testing patterns
<commit_before>import { Box } from "@artsy/palette"
import { findCurrentRoute } from "Artsy/Router/Utils/findCurrentRoute"
import { NavBar } from "Components/NavBar"
import { isFunction } from "lodash"
import React, { useEffect } from "react"
impor... |
Sawant beat the establishment at its own game. Now comes the hard part.
A united corporate front couldn’t save Sawant's opponent.
The race between Seattle City Council member Kshama Sawant of the Socialist Alternative party and her challenger, Seattle Urban League President and CEO Pamela Banks that attracted nationa... |
#t = int(input())
#for i in range(t):
n,q = list(map(int,input().split(' ')))
s = input()
c = 0
li = [0]
for k in s:
c += (ord(k) - 96)
li.append(c)
for i in range(q):
l,r = list(map(int,input().split(' ')))
print(li[r] - li[l - 1]) |
#include <gtest/gtest.h>
#include <functional>
#include <sigc++/connection.h>
#include <sigc++/signal.h>
using namespace std;
TEST (SignalTests, nothingConnected)
{
sigc::signal<void> sig;
sig();
}
TEST (SignalTests, singleConnected)
{
sigc::signal<void> sig;
bool wasCalled = false;
sig.connect([&] { ... |
#include "stdafx.h"
#include "Snap.h"
#include<iostream>
using namespace std;
const std::string currentDateTime() {
time_t now = time(0);
struct tm tstruct;
char buf[80];
tstruct = *localtime(&now);
// Visit http://en.cppreference.com/w/cpp/chrono/c/strftime
// for more information about date/ti... |
Slow Burn
Though American and European leaders have yet to make good on threats to isolate Russia, the Ukraine crisis could still punish Russia’s already struggling economy.
Russian President Vladimir Putin laughed off the United States’ move to sanction a bank and several businessmen from his inner circle, promising... |
<filename>src/characters-challenges/dto/create-characters-challenge.dto.ts<gh_stars>0
import { Achievement } from 'src/achievements/entities/achievement.entity';
import { Challenge } from 'src/challenges/entities/challenge.entity';
import { Character } from 'src/characters/entities/character.entity';
export class Crea... |
def priority_task(self):
if self.is_queue is False:
for f, s in history.items():
if s["state"] == "pending":
heapq.heappush(self.pending_queue, (s["creating_ts"], f))
elif s["state"] == "finished":
heapq.heappush(self.finished_q... |
Application of High-band UWB Body Area Network to Medical Vital Sensing in Hospital
We evaluated a prototype high-band UWB-BAN using several vital information sensors in a hospital. We confirmed by experiments that setting one coordinator near the ceiling or back or forward of the bed and another coordinator under the... |
def __rebuild_crashed_jobs(self, crashed_jobs):
bucket_to_jobs = defaultdict(list)
buckets = [int(x) for x in self.cesar_buckets.split(",") if x != ""]
if len(buckets) == 0:
buckets.append(self.cesar_mem_limit)
for elem in crashed_jobs:
elem_args = elem.split()
... |
/**
* Implementation of UserDetailsService interface for authentication handling.
*
* @author anaelcarvalho
* @see org.springframework.security.core.userdetails.UserDetailsService
*/
@Service
public class UserDetailsServiceImpl implements UserDetailsService {
@Autowired
private UserService userService;
@Ov... |
<reponame>CeliaRozalenM/poopy<filename>APP/src/app/services/bins.service.ts
import { Injectable } from '@angular/core';
import { Bin } from '../bin';
import { Observable, of } from 'rxjs';
import { HttpClient, HttpHeaders } from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class BinsService {
... |
/**
* Draw a line between nodes
* Lines could be drawn as straight line or as a cubic curve
* Lines aren't considered design nodes (dnodes) as such
* It doesn't inherit from dnode
* Should be move to a new package
*/
public class Line extends Path
{
double startX;
double startY;
double endX;
doub... |
def domains_unique(self,x):
return np.unique([self.alias(name) for name in self[x].index.names]).tolist() |
Computationally Tractable Riemannian Manifolds for Graph Embeddings
Representing graphs as sets of node embeddings in certain curved Riemannian manifolds has recently gained momentum in machine learning due to their desirable geometric inductive biases, e.g., hierarchical structures benefit from hyperbolic geometry. H... |
package binary
import "github.com/recursivecurry/gobox/typeclass/ord"
type Interface interface {
ord.Interface
Left() Interface
SetLeft(node Interface)
Right() Interface
SetRight(node Interface)
}
func Add(root *Interface, node Interface) {
var parent Interface
current := *root
for {
if current.Eq(node) {... |
/** Rule definitions for Python rules. */
public class PyRuleClasses {
public static final FileType PYTHON_SOURCE = FileType.of(".py", ".py3");
/**
* Input for {@link RuleClass.Builder#cfg(RuleTransitionFactory)}: if {@link
* PythonOptions#forcePython} is unset, sets the Python version according to the rule... |
/* m/ file for Paragon i860 machine. */
#include "i860.h"
#define COFF
#define SYSTEM_MALLOC
#define TEXT_START 0x10000
#define LIB_STANDARD -lc -lic -lmach
#define KEEP_OLD_TEXT_SCNPTR
#define KEEP_OLD_PADDR
#define drem fmod
|
<gh_stars>1-10
/*
* GDevelop IDE
* Copyright 2008-2016 <NAME> (<EMAIL>). All rights reserved.
* This project is released under the GNU General Public License version 3.
*/
#include "SigneTest.h"
//(*InternalHeaders(SigneTest)
#include <wx/bitmap.h>
#include <wx/intl.h>
#include <wx/image.h>
#include <wx... |
/**
* Test for max with two args.
*/
@Test
public void whenInput5And10ThenReturns10() {
final int first = 5;
final int second = 10;
final int expect = 10;
final Max maximum = new Max();
int res = maximum.max(first, second);
assertThat(res, is(expect));
} |
r"""
``cotk._utils`` often is used by internal lib. The users should
not find api here.
"""
from .file_utils import get_resource_file_path, import_local_resources
from .resource_processor import ResourceProcessor, DefaultResourceProcessor
from ._utils import trim_before_target
from .hooks import start_recorder, close_... |
def handle_dataset_view():
email = get_auth().auth()['email']
database_api = get_database()
if request.method == 'GET':
view_id = request.args.get('id', '')
dataset_id = request.args.get('ds_id', '')
if view_id == '' or dataset_id == '':
return 'Please provide an id', 400... |
#[cfg(not(target_os = "linux"))]
pub use std::fs::rename;
#[cfg(target_os = "linux")]
mod rename_linux;
#[cfg(target_os = "linux")]
pub use rename_linux::*;
|
We at Word of Mouth were intrigued recently by a regular's mention of smoked drinks: BeckyDavidson wondered if I could come up with a cheap DIY version of smoked vodka. Smoky flavours in drinks are hardly unknown; whiskies, especially those such as the wonderful Islay malts, can be gloriously smoky thanks to the malt d... |
President Trump yesterday signed a presidential memorandum re-instating the Global Gag Rule. For most of the day yesterday the actual text of the memorandum was not released so much of the media coverage — including our own — was based on the understanding that Donald Trump simply re-instated the same policy that exist... |
import { Align, HorizontalAlign, VerticalAlign } from '../../shared/Types';
import IBaseElement from './IBaseElement';
export default interface IPositionElement extends IBaseElement {
align: Align;
alignHorizontal: HorizontalAlign;
alignVertical: VerticalAlign;
top: number;
right: number;
botto... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.