content stringlengths 10 4.9M |
|---|
Neuropeptidomics of the Rat Habenular Nuclei.
Conserved across vertebrates, the habenular nuclei are a pair of small symmetrical structures in the epithalamus. The nuclei functionally link the forebrain and midbrain by receiving input from and projecting to several brain regions. Each habenular nucleus comprises two m... |
package registry
import (
"encoding/binary"
"fmt"
agent "github.com/mix-labs/IC-Go"
"github.com/mix-labs/IC-Go/utils/principal"
"testing"
)
func TestGetRoutingTable(t *testing.T) {
a := agent.New(true, "")
routingTable, err := GetRoutingTable(a)
if err != nil {
t.Log("error:", err)
}
for i, entry := range... |
/**
* This {@link Handler} polls {@link #sRefs}, looking for cleanup tasks that
* are ready to run.
* This is lazily initialized as ThreadUtils.getUiThreadLooper() may not be
* set yet early in startup.
*/
@SuppressLint("HandlerLeak")
private static class LazyHolder {
static final H... |
<gh_stars>0
from collections import Mapping
from graphql.error import GraphQLError
class GraphQLParams(object):
'''The parameters that usually came from the side of the client'''
__slots__ = ('query', 'query_id', 'operation_name', 'variables')
def __init__(self,
query=None,
... |
def compare_forecasts(
old_forecast_file_path: Union[str, os.PathLike],
new_forecast_file_path: Union[str, os.PathLike]
) -> RetractionCheckResult:
old_df: pd.DataFrame = pd.read_csv(
old_forecast_file_path,
index_col=["forecast_date", "target", "target_end_date", "location",
... |
Story Highlights 29% of Americans say the U.S. is headed in the right direction
Satisfaction level is virtually unchanged from February
Republicans remain much more satisfied than Democrats
WASHINGTON, D.C. -- Less than a third (29%) of Americans are satisfied with the way things are going in the U.S. in March, esse... |
/**
* Method used for triggering the proper HTTP call for adding a subscriber to an organization ,
* towards the BSS endpoint designed for managing subscribers
*/
@Override
protected Boolean doCall() throws Exception{
String email = this.subscriberJson.getAsObject("Subscriber").getAsObject("Person").getA... |
package riemannSum;
import polyfun.Polynomial;
public class RSRecursionTest {
public double rs(Polynomial p, double left, double right, double subintervals) {
double delta = (right - left)/subintervals;
double area = 0;
double x = right;
if(x == left + delta) {
area = slice(p, x-delta, x);
}
else {... |
/**
* Configuration for Cassandra database.
*
* @author Nikola Presecki
*/
@Configuration
public class CassandraConfiguration extends AbstractCassandraConfiguration {
@Value("${spring.data.cassandra.keyspace-name}")
private String keySpace;
@Value("${spring.data.cassandra.contact-points}")
private... |
A Data-Driven Stochastic Optimization Approach to the Seasonal Storage Energy Management
Several studies in the literature have shown the potential energy savings emerging from the cooperative management of the aggregated building energy demands. Sophisticated predictive control schemes have recently been developed th... |
#include<iostream>
using namespace std;
typedef long long ll;
const int maxn = 110 * 1000;
int a[maxn], n, m;
int A[maxn];
int f(ll x){
if (x<0) return 0;
for (int i=0 ; i<n ; i++)
a[i] = A[i];
int r = n-1;
for (int i=0 ; i<m ; i++){
while(r>=0 && !a[r]) r--;
if (r<0) return 1;
ll t = ... |
<reponame>rajib1346/NuCseHome
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package semester;
/**
*
* @author Acer
*/
import java.io.InputStream;
import java.sql.C... |
/** A value class for storing {@link Param} metadata to avoid using Java proxies. */
final class ParamDescriptor {
private final String name;
private final String defaultValue;
private final Class<?> type;
private final ImmutableList<ParamTypeDescriptor> allowedTypes;
private final Class<?> generic1;
priva... |
Current public sector practices involve discounting a liability according to the assumed investment returns of plan assets, typically around 8 percent. Yet with discount rates tied to expected investment performance, plan sponsors can easily take on greater risk in order to make liabilities appear smaller. This reduces... |
//
// Include file for the XP_GIS_ESRI_Shape_c class, which provides utilities
// to read an ESRI shape file.
//
/*
Public Constructors
XP_GIS_ESRI_Shape_c(const char *FileName=NULL);
The constructor.
virtual ~XP_GIS_ESRI_Shape_c();
the destructor.
XP_GIS_ESRI_Shape_c(const ... |
import {Component, Input, OnInit} from "@angular/core"
import {SvgHelper, SvgIcon} from "./SvgHelper"
import {Observable} from "rxjs"
@Component({
selector: "app-accordian",
templateUrl: "./accordian.component.html"
})
export class AccordianComponent implements OnInit {
@Input() isExpanded = false
@Input() cl... |
def hidden_layer_kwargs(self):
return self._hidden_layers_kwargs |
/*
* Regenerate fPathName for the specified file.
*
* Has no effect on the magic volume dir entry.
*
* This could be implemented more efficiently, but it's only used when
* renaming files, so there's not much point.
*/
DIError DiskFSProDOS::RegeneratePathName(A2FileProDOS* pFile)
{
A2FileProDOS* pPare... |
// ReadBytes reads a variable length of bytes from the reader.
// Errors are discarded so this should only be used when a byte is known to be present.
func (r Reader) ReadBytes(number int) []byte {
b := make([]byte, number)
_, _ = r.Read(b)
return b
} |
<filename>eCry.java
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.util.Random;
import java.util.Scanner;
/**
* @author t4zzlerdeveloper
*
* !!!File Encryption is not done, some files are being damaged
*/
public class eCry {
public static void enc... |
Overnight moisture and freezing
temps this morning.
(Photo © J. Maus/BikePortland)
Lots of people went down while biking into work today due to icy roads that made this morning’s riding conditions extremely tricky. Unlike my past experiences with ice, there weren’t just a few patches in obvious spots. In several sec... |
package org.adbcj.connectionpool;
import org.adbcj.*;
import java.util.Map;
/**
* @author <EMAIL>
*/
public class MockConnectionFactory implements ConnectionManagerFactory {
private static ThreadLocal<MockConnectionManager> lastInstance = new ThreadLocal<MockConnectionManager>();
@Override
... |
import { AppSpec } from '../../app-base/App'
async function run({ action, env, params: { path } }) {
return { type: 'embed', path: `/tests/${path}` }
}
export default async function app(): Promise<AppSpec> {
return {
name: 'test',
title: 'Test',
description: 'Run tests',
resourceTypes: {
tes... |
A teary-eyed Jitendra Singh begged the referee to reverse his decision. The 16-year-old threw a tantrum and pleaded with folded hands. On a memorable night, in front of 46,000 fans, he did not want to be remembered as a villain. But Bolivian referee Gery Vargas was strict as a headmaster.
Advertising
Jitendra was con... |
/*
* Create a BPF frame from a given Ethernet frame
*
* @param [out] totalLengthPtr The total frame length including the BPF header
*/
static uint8_t *
createBpfFrameFromEthernet(uint32_t length, const uint8_t etherframe[length], size_t *totalLengthPtr)
{
uint16_t hdrlen = BPF_WORDALIGN(sizeof(struct bpf_hdr));... |
/*
* Copyright 2012-2023 the original author or authors.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
The prevalence of prolonged jaundice due to breast milk jaundice in hospitalized newborn; a study among Iranian neonates
Introduction: Breast milk jaundice is considered as the most common cause for neonatal jaundice; however, its epidemiological aspects in some population remain unclear. Objectives: The present stu... |
The Use Of River Basin Modeling As A Tool To Assess Conflict And Potential Cooperation
AbstractAfter reading this chapter, you should have a general understanding of how river basin models are developed and how they are used within the field of international water resources. You should also have gained a basic underst... |
<filename>src/app/pages/report/marketingsummary/marketingsummary.component.ts<gh_stars>0
import { Component, Input, OnInit } from '@angular/core';
import { NbSortDirection, NbSortRequest, NbTreeGridDataSource, NbTreeGridDataSourceBuilder } from '@nebular/theme';
import { MarketingSummaryService } from '../../../@core/S... |
NOx-, IL-1β-, TNF-α-, and IL-6-Inhibiting Effects and Trypanocidal Activity of Banana (Musa acuminata) Bracts and Flowers: UPLC-HRESI-MS Detection of Phenylpropanoid Sucrose Esters
Banana inflorescences are a byproduct of banana cultivation consumed in various regions of Brazil as a non-conventional food. This byprodu... |
// ShallowCopyV shallow copy a struct value
func ShallowCopyV(src reflect.Value) reflect.Value {
typ := src.Type()
dst := reflect.New(typ).Elem()
for i := 0; i < typ.NumField(); i++ {
if name := typ.Field(i).Name; name[0] >= 'A' && name[0] <= 'Z' {
dst.Field(i).Set(src.Field(i))
}
}
return dst
} |
/*
* given the block number 'blk' of the first page of a set of linked
* siblings (i.e., the start of an entire level of the btree),
* construct the corresponding next level of the btree. we do this by
* placing minimum keys from each page into this page. the format of
* the internal pages is otherwise the same ... |
<reponame>looker-open-source/lens
/*
MIT License
Copyright (c) 2022 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitat... |
/**
* Return the compressed Int value + stored size of the length + 1
* <p>
* Given offset in array to beginning of compressed int, return the
* value of the compressed int + the number of bytes used to store the
* length.
* <p>
* So 1 byte lengths will return: length + 1 + 1
* ... |
def validate_nic_types(self, type_list):
for type_string in type_list:
self.validate_nic_type(type_string) |
RIYADH (Reuters) - Saudi Arabia’s air force participated in U.S.-led bombing strikes against Islamic State insurgents in Syria, its official news agency said on Wednesday, a rare foreign sortie for the kingdom’s military.
Saudi Arabia, a U.S. ally, the world’s top oil exporter and birthplace of Islam, has funneled cas... |
Ian Cole was taken in the first round of the 2007 NHL Entry Draft, but his climb up the ranks has been gradual.
He spent three years in college and then another three seasons bouncing between the AHL and NHL before he stuck with the Blues in 2013-14. However, he still only ended up playing in 46 games and averaged jus... |
by Volkan Sevilgen, Ross S. Stein, and David Jacobson, Temblor
Click here for an update on this earthquake
Greek version
Turkce versiyon
The large earthquake struck at 1:40 am local time near the tourist meccas of Kos, Greece, and Bodrum, Turkey. It was preceded by a M=2.5 shock approximately 20 minutes before the ... |
Image copyright Nuno Sá Image caption Individual devil rays, which can be 4m across, were tracked for up to five months using satellite tags
A new study shows that devil rays plunge nearly 2km below the ocean surface, making some of the deepest and fastest dives ever observed in the sea.
Scientists tracked 15 of the ... |
<gh_stars>1-10
use std::fs;
use std::io;
use std::path::Path;
use google_cloud::authorize::ApplicationCredentials;
use snafu::{ResultExt, Snafu};
/// Possible auth errors.
#[derive(Debug, Snafu)]
#[allow(missing_docs)] // Otherwise, cargo will ask to document each field of each error, which is a bit overkill.
pub en... |
#ifndef _IOTEX_EMB_RULE_H_
#define _IOTEX_EMB_RULE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "parse.h"
int rule_validator_bind(json_parse_rule *rule_chain, void *element);
int rule_action_info_bind(json_parse_rule *rule_chain, void *element);
json_parse_rule *find_rule_by_key(json_parse_rule *rule, const c... |
Camel pilot: the author in December 1917
Published by
Grub Street
4 Rainham Close
London SW11 6SS
First published 1968 by Jarrolds Publishers (London) Ltd
© Arthur Gould Lee 1968 with the kind permission of David Reed-
Felstead
This edition first published 2013
© Grub Street 2013
A CIP data record fo... |
def undeclare_parameter(self, name: str):
if self.has_parameter(name):
if self._descriptors[name].read_only:
raise ParameterImmutableException(name)
else:
del self._parameters[name]
del self._descriptors[name]
else:
rais... |
At the global climate change conference in Copenhagen in December, President Obama pledged to cut United States emissions from 2005 levels by 17 percent by 2020 — if he could get Congress to pass climate and energy legislation.
The task proved impossible even with Democratic majorities in both houses of Congress. But ... |
/**
* Builds and returns the propagation to be attached to the specified solver. If preprocessing and search stages are
* disabled, null is returned.
*
* @param solver
* the solver to which the propagation object is attached
* @return the propagation to be attached to the specified solver (possi... |
/**
* This task compiles CSharp source into executables or modules. The task will
* only work on win2K until other platforms support csc.exe or an equivalent.
* CSC.exe must be on the execute path too. <p>
*
* All parameters are optional: <csc/> should suffice to produce a debug
* build of all *.cs fil... |
import { StyleSheet, css } from 'aphrodite';
import { Link } from 'react-router-dom';
import Particles from 'react-tsparticles';
const StylesNotFound = StyleSheet.create({
container: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
height: '100%',
wi... |
/* When each Eidx is written in. */
uint8_t twicUtUdpWrittenIn(twicConnIface_t * const iface, uint8_t eidx,
const twicAttValue_t *const arg)
{
twicEntry_t *entry = TWIC_IF_TO_ENTRY(eidx);
uint8_t code = 0;
uint16_t perm_a = TWIC_PERMISSION_A0 + TWIC_PERMISSION_A1;
uint16_t perm_e = TW... |
<reponame>S0orax/SCEngine<gh_stars>1-10
package com.yanndub.scengine.graphics;
public class BitmapFont {
private Texture texture;
private int gridSize;
public BitmapFont(Texture texture, int gridSize) {
this.texture = texture;
this.gridSize = gridSize;
}
public BitmapFont(String path, int gridSize) {
... |
<reponame>GouFuJun/tuling-music
package io.longtu.cloud_music.service;
import io.longtu.cloud_music.model.dto.UserCreateDto;
import io.longtu.cloud_music.model.dto.UserDto;
import io.longtu.cloud_music.model.dto.UserUpdateDto;
import io.longtu.cloud_music.model.entity.User;
import org.springframework.data.domain.Page;... |
#include <bits/stdc++.h>
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define sz(x) (int)x.size()
using namespace std;
typedef long long ll;
typedef long double ld;
const int N = (int) 2e5 + 123;
const int mod = (int) 1e9;
inline void boost () {
ios_base::sync_with_s... |
Beijing: The death toll from a warehouse blast in north China's major port city of Tianjin has risen to 123 while 50 people were still listed in the country's worst industrial tragedy, authorities said today.
The dead included 70 firefighters and seven policemen.
All the victims have been identified, state-run Xinhua... |
, −∞ < a j < b j < ∞} is the set of rectangles in R d . The recent seminal work of Chernozhukov, Chetverikov and Kato has shown that, under mild regularity assumptions, one can get a non-trivial bound for ρ(W, Z) even when the dimension d is much larger than the sample size n. When we allow Σ to be degenerate, the cu... |
Effect of dispersed silica particles on the smectic-A-smectic-C* phase transition.
We study the influence of the dispersed aerosil particle concentration on the soft and Goldstone mode dynamics across the smectic-A-smectic-C* phase transition using dielectric spectroscopy. We use CE8 liquid crystal filled with aerosil... |
/**
* Base class for xCal writers.
* @author Michael Angstadt
*/
abstract class XCalWriterBase extends StreamWriter {
protected final ICalVersion targetVersion = ICalVersion.V2_0; //xCal only supports 2.0
/**
* Defines the names of the XML elements that are used to hold each
* parameter's value.
*/... |
/*
Copyright 2004-2005 (c) by <NAME>,
University of Alcala,
Computer Engineering Department.
For further information, please visit http://atc1.aut.uah.es
This software is provided under the terms of the GNU General Public v2
Licence. A full copy of the GNU GPL is provided in the file COPYING
... |
// Unlock derives an AES key from passphrase and key store's KDF
// parameters and unlocks the root key of the key store. If
// the unlock was successful, the key store's secret key is saved,
// allowing the decryption of any encrypted private key. Any
// addresses created while the key store was locked without priva... |
<gh_stars>10-100
import { HostBinding } from '@angular/core';
export function HostBindingClass(className: string) {
function HostBindingClassDecorator(target: any, propName: string) {
if (!className) {
return;
}
HostBinding(`class.${className}`)(target, propName);
}
return HostBindingClassDec... |
It's probably not news to you that BushCo essentially outsourced the government, getting in return much higher costs - and much lower quality. But then, government outsourcing was never meant to be efficient, except as a way of funneling money to friends and contributors:
The U.S. Special Operations Command, which has... |
<gh_stars>1-10
from ast import *
from interp_Lfun import Function
from interp_Llambda import InterpLlambda, ClosureTuple
from interp_Ldyn import Tagged
from utils import *
class InterpLany(InterpLlambda):
def type_to_tag(self, typ):
match typ:
case FunctionType(params, rt):
return 'funct... |
/**
* Moves the search iterator to the previous match, wrapping as needed.
*/
public void retreat() {
if( mMatches.hasPrevious() ) {
setCurrent( mMatches.previous() );
}
} |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try(Scanner input = new Scanner(System.in)){
int n = input.nextInt();
input.nextLine();
long mod = 1000000007;
System.out.println(calculate(n,mod));
}
}
private static long calculate(long n, long mod) {
long... |
A study of the levels of fosfomycin in the cerebrospinal fluid in adult meningitis.
In order to determine the liquor concentration of fosfomycin, we chose 27 patients who were suffering from meningitis with different etiology. According to route, type of administration and doses employed, we classified the patients in... |
def make_selectivity_maps(self):
diff_maps = self.make_difference_maps()
probes_list = ['donor', 'acceptor', 'apolar', 'positive', 'negative']
polar_probes = ['donor', 'acceptor', 'positive', 'negative']
apolar_probes = ['apolar']
for probe in probes_list:
try:
... |
def on_groupchat_subject(self, message):
nick_from = message['mucnick']
room_from = message.get_mucroom()
tab = self.get_tab_by_name(room_from, tabs.MucTab)
subject = message['subject']
if subject is None or not tab:
return
if subject != tab.topic:
if nick_from:
tab.a... |
// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
b := make([]int, n)
for i := 0; i < n; i++ {
b[i] = ReadInt()
}
return b
} |
package leetcode.weekly_contests.weekly_142;
public class P_1093 {
public double[] sampleStats(int[] count) {
double min = Double.MAX_VALUE, max = Double.MIN_VALUE, sum = 0, mostFreq = 0, mode = 0;
int totalC = 0, curr = 0, mid1 = -1, mid2 = -1;
for (int i = 0; i < count.length; i++) {
... |
Contact Architecture Controls Conductance in Monolayer Devices.
The architecture of electrically contacting the self-assembled monolayer (SAM) of an organophosphonate has a profound effect on a device where the SAM serves as an intermolecular conductive channel in the plane of the substrate. Nanotransfer printing (nTP... |
package edu.pse.beast.celectiondescriptioneditor.CElectionCodeArea.Antlr;
// Generated from C.g4 by ANTLR 4.6
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.Vocabulary;
import org.antlr.v4.runtime.VocabularyImpl;
import org.antlr.v4.runtime.atn.ATN;
import org.an... |
use sqlx::mssql::Mssql;
use sqlx::{describe::Column, Executor};
use sqlx_test::new;
fn type_names(columns: &[Column<Mssql>]) -> Vec<String> {
columns
.iter()
.filter_map(|col| Some(col.type_info.as_ref()?.to_string()))
.collect()
}
#[sqlx_macros::test]
async fn it_describes_simple() -> any... |
<reponame>tiswierad/experience-ng-sdk
/*
* Copyright 2019 <NAME>. (http://www.onehippo.com)
*
* 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... |
Anna Wise is a name that any devoted Kendrick Lamar fan recognizes. Wise's gorgeous singing voice has been a staple of Kendrick's music since 2012's Good Kid, M.A.A.D. City, and the pair even won a Grammy for Best Rap/Sung Collaboration in 2016 for "These Walls."
On Damn, Wise appears in a new role—as a credited songw... |
She's the first transgender person elected to a major city's governing body and the first trans person of color elected to any office in the U.S.
Andrea Jenkins has won election to the Minneapolis City Council, making her the first trans person elected to a major city’s governing body and one of the first out trans pe... |
// DefaultMutualServerConfig returns the default configuration.
func DefaultMutualServerConfig() *MutualServerConfig {
return &MutualServerConfig{
ServerConfig: *DefaultServerConfig(),
ClientCA: CAConfig{
CACert: "client-ca.pem",
},
}
} |
Marc Crawford knew Kyle Turris, the prodigy, long before he knew Kyle Turris, the man, and even though the young Turris looked like he could use a good meal, Crawford could see Turris had something special.
So could every scout in Western Canada.
“He had that elite skill level,” says Crawford, then the Vancouver Canu... |
Reliable screening for neuropsychological impairment in multiple sclerosis
In an earlier study, we developed the Multiple Sclerosis Neuropsychological Screening Questionnaire (MSNQ) to assist in the screening for neuropsychological (NP) impairments. Self-report MSNQ scores correlated significantly with measures of dep... |
/**
* Gives the slot index of all cards to autofill. Does not move any cards.
* @return the slot indices the cards are in (0 to 7, 8 to 10 for sideboard slots)
*/
public Set<Integer> autoFill() {
final Set<Integer> ret = new HashSet<>();
for (int i = 0; i < board.size(); i++) {
if (cardsIn(i) <= 0) continu... |
Javascript DDNext Character Generator
Under Construction!
For we do not wrestle against flesh and blood, but against principalities, against powers, against the rulers of the darkness of this age, against spiritual hosts of wickedness in the heavenly places.
Thanks to everyone who has written me during the past few ... |
// Called to draw the control points in Red over the NURB
void DrawPoints(void)
{
int i,j;
glPointSize(5.0f);
glColor3ub(255,0,0);
glBegin(GL_POINTS);
for(i = 0; i < 4; i++)
for(j = 0; j < 4; j++)
glVertex3fv(ctrlPoints[i][j]);
glEnd();
} |
/**
* Clear Fields Action Proxy class.
*/
public static class ClearFieldsAction extends ActionProxy {
/**
* Constructor.
*/
public ClearFieldsAction() {
this.setDescriptor(new ProxyDescriptor("GrQN1LQqTEmuYTnIujiEwA",
"io.testproject.examples.sdk.actions.ClearFieldsAction"))... |
.
51 patients with chronic hepatitis were examined clinicopsychopathologically for depression, anxiety, self-estimation, cognitive defects. Non-psychotic mental disorders were found in all the examinees: 15 had asthenia, 36 had asthenia and affective disturbances (astheno-depressive, anxious-depressive, anxious-hypoch... |
<reponame>ayende/ravendb-nodejs-client
export interface ICounterIncludeBuilder<TBuilder> {
includeCounter(name: string): TBuilder;
includeCounters(names: string[]): TBuilder;
includeAllCounters(): TBuilder;
} |
<gh_stars>0
import { SearchQuery } from 'shared/types/SearchQueryType';
import { RequestBody } from '@elastic/elasticsearch/lib/Transport';
import { cleanUp, searchStringMethod } from './queryHelpers';
import { permissionsFilters } from './permissionsFilters';
export const buildQuery = async (query: SearchQuery, lang... |
<gh_stars>0
/*
Copyright 2019 Cirque Corporation
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... |
<filename>go/tasks/pluginmachinery/core/resource_manager.go
package core
import (
"context"
)
type AllocationStatus string
const (
// This is the enum returned when there's an error
AllocationUndefined AllocationStatus = "ResourceGranted"
// Go for it
AllocationStatusGranted AllocationStatus = "ResourceGranted... |
// adds a renderable creator into this document. Returns
// true if it was able to fit, false otherwise.
func (d *SVGDocument) Add(p *RenderedPart, ctx RenderContext) (bool, error) {
w := p.Width
h := p.Height
if h <= 0.0 || w <= 0.0 {
return false, fmt.Errorf("Error, height or width is 0 or less")
}
if math.Is... |
/**
* This is used to define contact transitions for quadrupeds. This essentially converts {@link TimeInterval} to step transition events, including
* touchdowns and lift offs. This is used then to convert to contact sequences.
*/
class QuadrupedStepTransition
{
public static final double sameTimeEpsilon = 1e-3;
... |
#include<bits/stdc++.h>
#include <math.h>
using namespace std;
struct query{
int l;
int r;
int i;
};
int block = 1000;
int freq[1000001], arr[200001];
long long int power = 0, ans[200001];
query Q[200001];
bool cmp(query a, query b){
if(a.l/block != b.l/block){
return a.l... |
/**
* Описывает интерфейс объекта содержащий
* токен доступа и его время действия
*/
export interface AccessTokenObject {
access_token: string;
expire_in: number;
}
|
def update_session(self,
session_id,
api_client_id,
userID=None,
username=None,
usertype=None,
hassubscription=None,
authenticated: int=None,
... |
import {
Callback,
Context,
DynamoDBRecord,
DynamoDBStreamEvent,
Handler,
} from "aws-lambda";
import { AWSError, SQS } from "aws-sdk";
import { SQService } from "../services/SQService";
import { PromiseResult } from "aws-sdk/lib/request";
import { SendMessageResult } from "aws-sdk/clients/sqs";
import { debu... |
/*
* speed_display_info:
* Print current speed and normalized controller output to the LCD.
*/
void speed_display_info(void) {
char strbuf[17];
uint8 status = CyEnterCriticalSection();
sprintf(strbuf, "Speed: %.6f", speed);
LCD_Position(0,0);
LCD_PrintString(strbuf);
if (speed_pid_enabled... |
MANILA (Reuters) - More than a thousand people attended a funeral procession on Saturday for a Philippine teenager slain by police last week, turning the march into one of the biggest protests yet against President Rodrigo Duterte’s deadly war on drugs.
Mourners display a streamer during a funeral march for Kian delos... |
Stimulating Music: The Pleasures and Dangers of "Electric Music," 1750-1900.
Far from being a purely modern idea, the notion of "electric music" was already common in the eighteenth and nineteenth centuries. The shift in thinking about music from cosmic harmony to nervous stimulation made metaphors and speculative the... |
def generic_http_handler(http_exc: Exception) -> Tuple[Response, int]:
return Responder().fail(msg=http_exc.description, http_code=http_exc.code) |
<filename>liu-spring-demo/src/main/java/com/jay/spring/core/io/Resource.java
package com.jay.spring.core.io;
import java.io.IOException;
import java.io.InputStream;
/**
* Created by xiang.wei on 2018/6/18
*
* @author xiang.wei
*/
public interface Resource {
/**
* @return
*/
InputStream getInputS... |
/**
* @author Geoff Bourne
*/
@Component
@ConfigurationProperties("stomp-redis-relay")
@Data
public class StompRedisRelayProperties {
int port = 61613;
int maxContentLength = 1024 * 64;
String channelPrefix = "/channel/";
String redisChannelPrefix = "stomp:";
/**
* All message bodies publ... |
import sys
if sys.platform =='ios':
sys.stdin=open('input_file.txt')
x,a,b=[int(input()) for i in range(3)]
print((x-a)-((x-a)//b)*b) |
#include<stdio.h>
int main(void)
{
int testCase;
scanf("%d", &testCase);
for (int i = 0; i < testCase; i++)
{
int digitNumber;
int number[50];
int notDigitOne = 0;
int notDigitTwo = 0;
scanf("%d", &digitNumber);
for (int i = 0; i < digitNumber;i++)
{
scanf("%1d", &number[i]);
... |
/** image display dummy client */
class SeeknowFrame extends JFrame implements KeyListener {
private static final long serialVersionUID = 7468239430795306535L;
SeeknowFrame(byte[] imageData, int x, int y) {
addKeyListener(this);
setContentPane(new JLabel(new ImageIcon(imageData)));
setDefaultCloseOperation(DI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.