content stringlengths 10 4.9M |
|---|
<gh_stars>1-10
#include "Modules/UI/Macro Elements/PauseMenu.h"
#include "Engine.h"
PauseMenu::PauseMenu(Engine& engine) :
Menu(engine)
{
// Title
m_title->setText("PAUSE MENU");
// Add 'Start Game' button
addButton(engine, "RESUME", [&] { resume(); });
// Add 'Options' button
m_optionsMenu = std::make_share... |
package com.quewelcy.omnios.view.mono;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.util.AttributeSet;
import com.quewelcy.omnios.view.CircledIcon;
public class BookIcon extends Circled... |
<filename>pkg/config/config.go
package config
import (
"github.com/oschwald/geoip2-golang"
"gopkg.in/yaml.v2"
"io/ioutil"
)
var (
ConfigMap map[string]interface{}
ConfigLocation *string
GeoLiteDBLocation *string
Port *int
Debug *bool
ListenAddress *string
GeoDB ... |
// Copyright (c) <NAME>. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifndef _BLE_LIMITS_H_
#define _BLE_LIMITS_H_
#include <stdlib.h>
#ifndef __AVR__
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min... |
def generate_unit_vectors(n, sigma= 2*np.pi):
phi = np.random.uniform(0, sigma, (n, n))
v = np.stack((np.cos(phi), np.sin(phi)), axis=-1)
return v |
<reponame>nicolasff/river
#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
#include <string.h>
#include "server.h"
#include "socket.h"
#include "channel.h"
#include "conf.h"
#include "mem.h"
int
main(int argc, char *argv[]) {
struct conf *cfg;
if(argc == 2) {
cfg = conf_read(argv[1]);
} else {
cfg ... |
def guess_num_nodes_from(edgelist):
return np.max(edgelist) + 1 |
n = int(input())
*a,=map(int, input().split())
from collections import defaultdict
da=defaultdict(int)
for i in a:
da[i]+=1
q = int(input())
suma=sum(a)
for i in range(q):
b,c=map(int, input().split())
numb=da[b]
suma+=(c-b)*numb
da[c]+=numb
da[b]=0
print(suma)
|
def collect_reducer(method):
method = replace_default_method(method)
try:
return globals()['collect_reducer_{}'.format(method)]
except KeyError:
raise ValueError(
"Unknown collection method {}".format(method)) |
Pulsed Radiofrequency Applied to the Sciatic Nerve Improves Neuropathic Pain by Down-regulating The Expression of Calcitonin Gene-related Peptide in the Dorsal Root Ganglion
Background: Clinical studies have shown that applying pulsed radiofrequency (PRF) to the neural stem could relieve neuropathic pain (NP), albeit ... |
/**
* TODO
*
* @author smartloli.
*
* Created by Jan 1, 2019
*/
public class TestIM {
public static void main(String[] args) {
testAlarmClusterByDingDingMarkDown();
//testAlarmClusterByWeChatMarkDown();
//testConsumerHeathyByWeChat();
}
/** New alarm im api. */
private static void testAlar... |
Analysis of monitoring and multipath support on top of OpenFlow specification
In general, traffic is pushed through a single path despite the existence of alternative paths in networks. For example, routing solutions based on spanning tree prune the topology to prevent loops, consequently preventing also the use of al... |
class CounterfactualSurvivalModel:
"""Universal interface to train multiple different counterfactual
survival models."""
def __init__(self, treated_model, control_model):
assert isinstance(treated_model, SurvivalModel)
assert isinstance(control_model, SurvivalModel)
assert treated_model.fitted
... |
Patient reports of the frequency and severity of adverse reactions associated with biological agents prescribed for psoriasis in Brazil
Background: The safety of biological agents used to treat psoriasis remains uncertain. Objective: The authors determined the frequency and severity of adverse effects associated with ... |
/**
* Adds a new rule to the IDB database.
* This is part of the fluent API.
* @param newRule the rule to add.
* @return {@code this} so that methods can be chained.
* @throws DatalogException if the rule is invalid.
*/
public Jatalog rule(Rule newRule) throws DatalogException {
ne... |
package com.github.lindenb.knime5bio;
import org.knime.core.node.NodeFactory;
import org.knime.core.node.NodeModel;
public abstract class AbstractNodeFactory<T extends NodeModel> extends NodeFactory<T> {
}
|
An armed man gunned down a new village police chief on an Ohio street on Friday and then killed two employees in a nearby nursing home, where he later was found dead, a sheriff said. No nursing home residents were injured, nor were two hostages briefly held by the alleged gunman.
The slain police chief, Steven Eric Di... |
/**
* CosmosAsyncContainer with encryption capabilities.
*/
public class CosmosEncryptionAsyncContainer {
private final Scheduler encryptionScheduler;
private final CosmosResponseFactory responseFactory = new CosmosResponseFactory();
private final CosmosAsyncContainer container;
private final Encrypti... |
/* Prints out the contents of the given OpInfo. Should only be called
* inside a DEBUG macro (i.e. for debugging only).
*/
static void PrintOpInfo(const struct OpInfo* info) {
DEBUG_OR_ERASE(printf("opinfo(%s, hasmrm=%u, immtype=%s, opinmrm=%d)\n",
NaClInstTypeString(info->insttype),
... |
<reponame>asoffer/icarus
#include "base/untyped_buffer_view.h"
#include "base/untyped_buffer.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
namespace base {
namespace {
TEST(UntypedBufferView, Get) {
untyped_buffer buf;
buf.append(1);
buf.append(2);
untyped_buffer_view view(buf);
EXPECT_EQ(view.get<... |
#ifndef IMAGEWIDGET_HPP
#define IMAGEWIDGET_HPP
#include "Widget.hpp"
#include "Events.hpp"
#include "../Image/Image.hpp"
#include <chrono>
#include <functional>
/**
* \brief Gère une Image sélectionnable
*/
class ImageWidget : public Widget
{
public:
ImageWidget(Image& image, const dim_t size, const s... |
import {
createMaskerPipe,
ITransmittable,
panMaskerPipe,
} from '../../../main/ts'
const noop = () => {
/* noop */
}
describe('maskerPipe', () => {
it('factory returns IPipe', () => {
const maskerPipe = createMaskerPipe((el) => el)
expect(maskerPipe.type).toBe('masker')
expect(maskerPipe.execu... |
<reponame>mehrdad-shokri/element
#!/usr/bin/env node
import findRoot from 'find-root'
const root = findRoot(__dirname)
import { main } from './src/element'
main(root)
|
def exists(self, *, parent: bool=None) -> AppCategoriesEndpoint:
if parent == None:
return
self._set_exists('parent', 'true' if parent else 'false')
return self |
/**
* Copyright (c) 2005,2010 <NAME> <<EMAIL>>
* See the file COPYING for copying permission.
*
* $Id$
*/
#ifndef YAPS_CALC_H
#define YAPS_CALC_H
/**********************************************************/
/* Equation of state to calculate pressures */
extern char EOSType[20];
/* Kernel to use... |
package com.blocklang.develop.dao;
import java.util.List;
import com.blocklang.develop.model.PageDataItem;
public interface PageDataJdbcDao {
void delete(Integer pageId);
void batchSave(Integer pageId, List<PageDataItem> allData);
}
|
from _Node import Node
class File(Node):
"""
A file in a treebank
"""
def __init__(self, **kwargs):
self._IDDict = {}
Node.__init__(self, **kwargs)
def attachChild(self, newChild):
"""
Append a sentence
"""
# Security isn't really an issue for Files,... |
import ICreateCoursesDTO from '@modules/courses/dtos/ICreateCoursesDTO';
import Courses from '@modules/courses/infra/typeorm/entities/Courses';
export default interface IUsersRepository {
findById(id: string): Promise<Courses | undefined>;
findOneByName(name: string): Promise<Courses | undefined>;
findAll(... |
{-# LANGUAGE TupleSections #-}
module Day11.Day11 where
import Lib
import IntCode
import Control.Concurrent.Async
import Control.Concurrent.Chan
import qualified Data.Map.Strict as M
import Text.Printf
import Data.Maybe
import Data.Li... |
package de.htwg_konstanz.ebus.wholesaler.main;
import java.util.List;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import de.htwg_konstanz.ebus.framewor... |
import { PlatformLocation } from '@angular/common';
import { Injectable } from '@angular/core';
import { Http, Headers } from '@angular/http';
import { Observable } from 'rxjs';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import 'rxjs/add/ope... |
// CreateRedisClusterBackup creates a RedisClusterBackup in test namespace
func (f *Framework) CreateRedisClusterBackup(instance *redisv1alpha1.RedisClusterBackup) error {
f.Logf("Creating RedisClusterBackup %s", instance.Name)
result := &redisv1alpha1.RedisClusterBackup{}
err := f.Client.Get(context.TODO(), types.N... |
<reponame>rabelais88/fokus<filename>src/lib/useRouter.ts
import { useHistory } from 'react-router-dom';
const useRouter = () => {
const history = useHistory();
const redirect = (target: string) => history.push(target);
return { redirect };
};
export default useRouter;
|
import { Injectable } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { ImportDialogComponent } from 'shared/dialogs/import/import-dialog.component';
im... |
package com.linepro.modellbahn.util.exceptions;
@FunctionalInterface
public interface CheckedSupplier<V, E extends Throwable> {
V get() throws E;
} |
// Copyright Amazon.com, Inc. or its affiliates. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file acc... |
package cn.lee.leetcode.weekly.w218;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
import org.junit.Test;
/**
* @Title: Q5619
* @Description: https://leetcode-cn.com/contest/weekly-contest-218/problems/minimum-incompatibility/
* @author: libo
* @date: 2020/12/6 11:04
* @Version: 1.0
*/
@Slf4j
publi... |
package com.rudecrab.rbac.security;
/**
* 用户上下文对象,方便在系统中任何地方都能获取用户信息
*
* @author RudeCrab
*/
public final class UserContext {
private UserContext(){}
private static final ThreadLocal<Long> USER = new ThreadLocal<>();
public static void add(Long id) {
USER.set(id);
}
public static voi... |
mod serde;
mod ty;
use std::{path::Path, str::FromStr, sync::Arc};
use anyhow::Result;
use druid::{ArcStr, Data};
use http::uri::PathAndQuery;
use prost::bytes::Buf;
use prost_types::{
FileDescriptorProto, FileDescriptorSet, MethodDescriptorProto, ServiceDescriptorProto,
};
#[derive(Debug, Clone, Data)]
pub stru... |
<gh_stars>0
package conf
var (
LenStackBuf = 4096
LogLevel string
LogPath string
LogFlag int
)
|
<reponame>farmerconnect/farmerconnect-ui
import WizardSteps from './components/WizardSteps';
import Button from './components/Button';
import ActionInfotip from './components/ActionInfotip';
import IconCheck from './components/Icons/Check';
import IconClose from './components/Icons/Close';
import IconWarning from './co... |
//
// Copyright 2019 AT&T Intellectual Property
// Copyright 2019 Nokia
//
// 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 ... |
//Invoke call the registered function
func (f *Fun) Invoke(que *val.ByteQue) *val.ByteQue {
v, e := que.Pop("string")
if e != nil {
return except(e.Error())
}
name := v.(string)
fun, ok := f.funs[name]
if !ok {
return except(name + " function not found")
}
typ := strings.ReplaceAll(fun.Type().String(), " ",... |
import heapq,math
from collections import defaultdict,deque
import sys, os.path
#sys.setrecursionlimit(10000000)
if(os.path.exists('C:/Users/Dhanush/Desktop/cp/input.txt')):
sys.stdout = open('C:/Users/Dhanush/Desktop/cp/output.txt', 'w')
sys.stdin = open('C:/Users/Dhanush/Desktop/cp/input.txt', 'r')
... |
<gh_stars>1-10
import os
from conans import ConanFile
required_conan_version = ">=1.33.0"
class RenderContextConan(ConanFile):
python_requires = "base_conanfile/v0.2.0@jgsogo/stable"
python_requires_extend = "base_conanfile.BaseCMakeConanfile"
name = "render_context"
homepage = "https://github.com/jg... |
From A Life Term To Life On The Outside: When Aging Felons Are Freed
Enlarge this image toggle caption Brandon Chew/NPR Brandon Chew/NPR
When Karriem Saleem El-Amin went to prison in 1971 for the murder of Baltimore grocer David Lermer during a robbery, he was an 18-year-old killer named William Collins.
In 2013, El... |
package ru.job4j.servlet;
import org.apache.commons.dbcp.DriverManagerConnectionFactory;
import org.apache.commons.dbcp.PoolableConnectionFactory;
import org.apache.commons.dbcp.PoolingDataSource;
import org.apache.commons.pool.impl.GenericObjectPool;
import java.sql.*;
import java.util.LinkedList;
import java.util.Li... |
// UpdAppServ - update app service
func (db *AppServDB) UpdAppServ(ctx context.Context, cfg *chatbotbase.AppServConfig) (
*chatbotpb.AppServInfo, error) {
casi, err := db.GetAppServ(ctx, cfg.Token)
if err != nil {
return nil, err
}
t, err := chatbotbase.GetAppServType(cfg.Type)
if err != nil {
return nil, err... |
<reponame>longjiazuo/j2se-project
package org.light4j.net.tcp.bio.basic;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.Socket;
public class Client {
// 端口
static final int PORT = 30000;
public static void main(String[] args) throws Exception {
Socket socket = new So... |
// BodyParam gets a variable that has been stored in the bodyparams object.
func (self *Parameters) BodyParam(k string) interface{} {
self.RLock()
defer self.RUnlock()
return self.bodyParams[k]
} |
<filename>chapter/_02two/IntQuest7.java
/*
MIT License
Copyright (c) 2019 <NAME>
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 limitation the rights
to us... |
Couriers of asthma: antigenic proteins in natural rubber latex.
Natural rubber latex (NRL) is a milky, white liquid containing the polymer cis-1,4-polyisoprene, derived from the laticifer cells of the rubber tree, Hevea brasiliensis. Reports of allergic reactions to NRL, ranging in severity from skin rashes to anaphyl... |
<filename>src/main/java/io/github/oliviercailloux/j_voting/profiles/gui/MainGUI.java
package io.github.oliviercailloux.j_voting.profiles.gui;
import java.io.IOException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.gra... |
Thursday, 19 July 2018 [link to this day]
Alterbeast, Inferi, Reaping Asmodela, Condemn the Infected, and Emerge a Tyrant - Sidebar Tavern (Baltimore)
Buddy Guy and Quinn Sullivan - State Theatre
Chuck Prophet & the Mission Express - the Hamilton
the Faceless, Lorna Shore, Dyscarnate, Dead Eyes Always Dream... |
/*
* Copyright Debezium Authors.
*
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package io.debezium.connector.mysql;
import org.apache.kafka.connect.data.Schema;
import org.apache.kafka.connect.data.SchemaBuilder;
import org.apache.kafka.conne... |
If it seems that your inbox has been overloaded with Evites of late, you're not imagining things. Houston has been declared party capital of the country by Evite in a data review that analyzed the habits of its users in 39 cities.
Houston ranks No. 1 in both categories studied in the first annual list of the Top 10 U.... |
/*********************************************************************
*
* Filename: toim3232-sir.c
* Version: 1.0
* Description: Implementation of dongles based on the Vishay/Temic
* TOIM3232 SIR Endec chipset. Currently only the
* IRWave IR320ST-2 is tested, although it should work
* w... |
/**
* Removes a GLWindow from by this renderer.
*
* @param win window object
*/
public void removeWindow(GLWindow win) {
if (windowsList != null) {
windowsList.remove(win);
}
} |
/* The evolutionary model.
*
* Contents:
* 1. The TKF_MODEL object: allocation, initialization, destruction.
* 2. Convenience routines for setting fields in an TKF.
* 3. Renormalization and rescaling counts in TKF.
* 4. Debugging and development code.
* 5. Other routines in the API.
* 6. Unit tests... |
from .user_me import UserMe
from .user_change_password import UserChangePassword
|
Walter Thurmond sits as one of the top remaining free agents. The defensive back could have a home already if he wanted.
Thurmond, 28, has turned down offers of $4 million-plus per year as he ponders retirement, a source told NFL Media Insider Ian Rapoport on Wednesday.
That Thurmond has garnered offers of more than ... |
Declarations and Reliability The previous discussion about auto left me with a nagging doubt, which I would like to discuss here.
When I wrote about auto a while ago, some readers said that they thought auto was a bad idea because it allowed programmers to get by without knowing what types they were using. I explained... |
The phenomenology of death, embodiment and organ transplantation.
Organ transplantation is an innovative 21st century medical therapy that offers the potential to enhance and save life. In order to do so it depends on a supply of organs, usually from cadaveric donors who have suffered brain stem death. Regardless of w... |
Controversies in the Principles for Management of Orbital Fractures in the Pediatric Population.
is preferred over a primary T-point to correct eventual residual skin redundancy. However, the technique described by Webster might represent a valuable and interesting alternative to our approach, which we will consider i... |
<gh_stars>1-10
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cluster.proto
package cloud
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "github.com/microsoft/moc/rpc/common"
grpc "google.golang.org/grpc"
c... |
/* Lightweight function to convert a frequency (in Mhz) to a channel number. */
static inline
u8 bcm43xx_freq_to_channel_a(int freq)
{
return ((freq - 5000) / 5);
} |
/**
* Get the address of a worker.
*
* @param random If true, select a random worker
* @param hostname If <code>random</code> is false, select a worker on this host
* @return the address of the selected worker, or null if no address could be found
* @throws NoWorkerException if there is no available w... |
Space News space history and artifacts articles Messages space history discussion forums Sightings worldwide astronaut appearances Resources selected space history documents Websites related space history websites
advertisements
Challenger debris auction repeats history
According to eBay seller 'hook4hand,' this is ... |
import pygame
import sys
from pygame.locals import *
from random import randint
import copy
import math
# Определяем размер экрана и другие свойства
FPS = 5
WINDOWWIDTH = 640
WINDOWHEIGHT = 700
boxsize = min(WINDOWWIDTH, WINDOWHEIGHT) // 4
margin = 5
thickness = 0
# Цвета, которые будем использовать
WHITE = (255, 255... |
export declare type UseTimeoutReturn = [() => boolean | null, () => void, () => void];
export default function useTimeout(ms?: number): UseTimeoutReturn;
|
/**
* Add new method and start editing parameters of new method
* @return instance of {@link MethodInfo}
*/
public MethodInfo addMethod() {
MethodInfo method = new MethodInfo(this);
this.methods.add(method);
return method;
} |
Main Street Gyros in Seattle was closed Tuesday after three people who ate there were reported to have symptoms of norovirus, health officials said.
Main Street Gyros in Seattle has been closed after symptoms of norovirus were linked to the Mediterranean restaurant, health officials said Wednesday.
The site at 301 Se... |
#include <bits/stdc++.h>
using namespace std;
#define MAX_N 200005
int n, q;
int a[MAX_N];
long long bit[MAX_N];
void Update(int p, int val) {
for (int i = p; i <= n; i += i & -i)
bit[i] += val;
}
long long getSum(int p) {
long long ret = 0;
for (int i = p; i; i -= i & -i)
ret += bit[i... |
Share. You're bacon me crazy. You're bacon me crazy.
Little Caesars is working overtime to help sate the bacon cravings of America.
In a new creation called the Bacon Wrapped Crust Deep! Deep! Dish Pizza, the chain restaurant has wrapped 3 1/2 feet of bacon around the sides of a deep-dish pizza with pepperoni and bac... |
// this should upconvert the deprecated VolumeMounts struct
func (h *TaskHandler) DesireTask_r1(logger lager.Logger, w http.ResponseWriter, req *http.Request) {
var err error
logger = logger.Session("desire-task")
request := &models.DesireTaskRequest{}
response := &models.TaskLifecycleResponse{}
defer func() { exi... |
/**
* Base class for test cases.
*/
public abstract class BaseFilterTest {
/**
* Creates a file select info object for the given file.
*
* @param file
* File to create an info for.
*
* @return File selct info.
*/
protected static FileSelectInfo crea... |
<reponame>leegeunhyeok/clow
import Context from 'src/core/context';
import Module from 'src/core/common/module';
import Connector from 'src/core/common/connector';
import { G } from '@svgdotjs/svg.js';
export enum DataTypes {
NULL = 0,
STRING,
OBJECT,
ANY,
PAGE,
ELEMENT,
}
export interface Renderable {
... |
May Day / After Prague
The first series is called Kryry May Day . Kryry is a provincial town about 55 miles west of Prague, population about 2,500. As you will see, May Day is still celebrated here in the Czech Republic but it has turned into (or perhaps re-turned to) a carnival. I was specifically interested in the r... |
/** Berechnung Taupunkttemperatur TD(r, T)
* \param me Taupunkt data
*/
static void Calc_TD(struct Tp* me)
{
float DD = me->r / 100.0 * me->SDD;
float v = log10(DD / 6.1078);
me->TD = me->b * v / (me->a - v);
} |
def bazin_fit(self, minpbobs=6, recompute=False):
bazin_params = getattr(self, 'bazin_params', None)
if bazin_params is not None:
if not recompute:
return bazin_params
bazin_params = {}
trigger_time = self.trigger_time
filters = self.filters
ou... |
def input_mask(self, binstate):
return ''.join(compress(binstate, self.mask)) |
<reponame>jfbloom22/capacitor-site<gh_stars>0
import {
State,
Component,
ComponentInterface,
Element,
Prop,
Host,
h,
Listen,
} from '@stencil/core';
import { importResource } from '../../utils/common';
declare global {
interface Window {
docsearch: (opts?: {}) => any;
}
}
@Component({
tag: '... |
The information management with ontology together with N-Gram technology for the deployment in the stakeholders communication using real-time application, a case study of Research and Development Office, Prince of Songkla University
Communication is the main factor in acknowledging information for correct implementati... |
class Variable:
def __init__(self, value:str):
self.value=value
def evaluation(self):
try:
a = float(self.value)
except Exception as e:
print(e)
return None
else:
return a
def multiply(self,item):
a = Express... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
PrintWrite... |
#include "stdafx.h"
#include "DecodeHints.h"
#include "GenericLuminanceSource.h"
#include "HybridBinarizer.h"
#include "MultiFormatReader.h"
#include "Result.h"
#include "holojs/private/error-handling.h"
#include "include/holojs/windows/qr-scanner.h"
#include <collection.h>
#include <functional>
#include <ppltasks.h>
#... |
/**
* Compare the two compound curves for equality
*
* @param expected
* @param actual
* @parma delta
*/
private static void compareCompoundCurve(CompoundCurve expected,
CompoundCurve actual, double delta) {
compareBaseGeometryAttributes... |
package seedu.address.logic.commands;
import static java.util.Objects.requireNonNull;
import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK_INDEX;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
impor... |
/**
* @module object
*/
/**
* 获取嵌套对象某一属性值
* @param {Object} obj 需要获取属性的对象
* @param {String[]} keys 键名数组
* @return {Any} 属性值
*/
export function optionalGet(obj: any, [...keys]: Array<string | number>): any {
let result = obj;
for (let i = 0; i < keys.length && result !== undefined; i++) {
const key = ke... |
# 写経AC
N,M = map(int, input().split())
edge = [[] for _ in range(N)]
for _ in range(M):
a,b = map(int, input().split())
edge[a-1].append(b-1)
edge[b-1].append(a-1)
Q = int(input())
VDC = [[int(i) for i in input().split()] for _ in range(Q)]
for i in range(Q):
VDC[i][0] -= 1
color = [0] * N
# visited[v... |
/**
* fast_idct - Figure A.3.3 IDCT (informative) on A-5 of the ISO DIS
* 10918-1. Requires and Guidelines. This is a fast IDCT, it much more
* effecient and only inaccurate at about 1/1000th of a percent of values
* analyzed. Cannot be static because initMatrix must run before any
* fast_idct values can... |
import sys
input = sys.stdin.readline
'''
'''
from math import ceil
a1,a2,a3 = map(int, input().split())
b1,b2,b3 = map(int, input().split())
n = int(input())
shelves_cup = ceil((a1+a2+a3) / 5)
shelves_medal = ceil((b1+b2+b3) / 10)
print("YES" if shelves_cup+shelves_medal <= n else "NO") |
#Calculate maximum no of dominos(2*1) that can be put to cover the rectangular box of given dimension
m, n = map(int, raw_input().split(" "))
area = m*n
if (area % 2 == 0):
print area/2
else:
print (area-1)/2
|
/**
* Handles reminder timers.
* @author Alex811
*/
public class ReminderTimer {
private static final Map<UUID, ReminderTimer> active = Collections.synchronizedMap(new HashMap<>());
private final UUID id;
private final Timer timer;
private final int seconds;
private final String name;
private... |
<filename>react-app/src/Redux/index.ts<gh_stars>0
import { createSlice, PayloadAction, createStore, combineReducers } from '@reduxjs/toolkit'
interface CounterState {
value: number
}
const initialState = { value: 0 } as CounterState
const counter = createSlice({
name: 'counter',
initialState,
reducers: {
... |
<gh_stars>1-10
from airflow.plugins_manager import AirflowPlugin
from gotowebinar_plugin.hooks.gotowebinar_hook import GoToWebinarHook
from gotowebinar_plugin.operators.gotowebinar_to_redshift_operator import GoToWebinarToRedshiftOperator
class GoToWebinarPlugin(AirflowPlugin):
name = "gotowebinar_plugin"
ope... |
/**
* Details of a signed certificate timestamp (SCT).
*/
public static class SignedCertificateTimestamp {
/**
* Validation status.
*/
public String status;
/**
* Origin.
*/
public String origin;
/**
* Log name / description.
*/
public String logDescription;... |
/**
* Get sub-account details
*
* This endpoint will provide the details of specified sub-account organization
*
* @throws Exception
* if the Api call fails
*/
@Test
public void corporateSubAccountIdGetTest() throws Exception {
Long id = null;
SubAccountDe... |
package com.google.common.primitives;
import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import java.util.Comparator;
@GwtCompatible
@Beta
public final class UnsignedInts {
static final long INT_MASK = 4294967295L;
enum ... |
Plane Symmetric Domain Wall in Lyra Geometry
In this paper general solutions are found for domain walls in Lyra geometry in the plane symmetric spacetime metric given by Taub. Expressions for the energy density and pressure of domain walls are derived in both cases of uniform and time varying displacement field $\beta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.