content stringlengths 10 4.9M |
|---|
<filename>editor-server/src/resolvers/types/color.ts<gh_stars>1-10
import { Field, ObjectType, ID, Float } from "type-graphql";
@ObjectType()
export class Color {
@Field((type) => String)
color: string;
@Field((type) => String)
colorCode: string;
}
|
#include "Partial.h"
#include "Partial.make.h"
#include "Partial.trait.h"
#include <meta17/Const.ops.h> // index == index
#include <gtest/gtest.h>
using namespace partial17;
using meta17::type;
TEST(Partial, basic) {
auto x = Partial<char, int, float>{}; //
auto y = x; // copy constructor
... |
Dynamical Electroweak Breaking and Latticized Extra Dimensions
Using gauge invariant effective Lagrangians in 1+3 dimensions describing the Standard Model in 1+4 dimensions, we explore dynamical electroweak symmetry breaking. The Top Quark Seesaw model arises naturally, as well as the full CKM structure. We include a ... |
<reponame>homer54/OpenSlides
import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { CollectionStringMapperService } from 'app/core/core-services/collection-string-mapper.service';
import { DataSendService } from 'app/core/core-services/data-send.service';
import {... |
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
<gh_stars>1-10
#include <iostream>
#include <cstdio>
#include <cstring>
#define N 500010
using namespace std;
int rest[N*3],lson[N*3],rson[N*3],lend[N*3],rend[N*3],mid[N*3],root,ntop=1;
void build(int &x,int l,int r){
x=ntop++;
lend[x]=l,rend[x]=r,mid[x]=l+r>>1;
rest[x]=r-l+1;
if(l!=r){
build(lson[x],l,mid[x]);
... |
// Maps the required operations to the functions defined below.
// The map of strings to Schema pointers defines the properties of a resource.
func playerVirtualMachine() *schema.Resource {
return &schema.Resource{
Create: playerVirtualMachineCreate,
Read: playerVirtualMachineRead,
Update: playerVirtualMachine... |
// NkSubimageHandle function as declared in nk/nuklear.h:2271
func NkSubimageHandle(arg0 Handle, w uint16, h uint16, subRegion Rect) Image {
carg0, _ := *(*C.nk_handle)(unsafe.Pointer(&arg0)), cgoAllocsUnknown
cw, _ := (C.ushort)(w), cgoAllocsUnknown
ch, _ := (C.ushort)(h), cgoAllocsUnknown
csubRegion, _ := *(*C.st... |
<gh_stars>0
import pygame
import copy
import random
from settings import FOOD_COL, CELL_SIZE
class Food:
def __init__(self, app):
self.app = app
self.app_window = self.app.app_window
self.origin = copy.deepcopy(self.app_window.pos)
self.pos = [
random.randint(0, self.ap... |
/**
* Created by StReaM on 9/3/2017.
*/
public class SelfDelegate extends BottomPageDelegate {
public static final String ORDER_TYPE = "order_type";
private Bundle mBundle = new Bundle();
@BindView(R2.id.rv_profile_setting)
RecyclerView mRecyclerView = null;
private void startOrderListByType() ... |
/**
* Configures a {@link UserSessionRegistry} that maps a {@link Principal}s name to a
* WebSocket session id. Additionally a {@link UserEventMessenger} is configured as a bean
* that allows sending {@link EventMessage}s to user names in addition to WebSocket
* session ids.
*
* <p>
* Example:
* </p>
*
* <pre... |
package handler
import (
"errors"
"fmt"
"net/http"
"testing"
"github.com/golang/mock/gomock"
"github.com/gorilla/mux"
"github.com/rknruben56/feedback-api/entity"
"github.com/rknruben56/feedback-api/usecase/template/mock"
"github.com/steinfletcher/apitest"
)
func Test_ListTemplates(t *testing.T) {
controlle... |
/**
* Checks if the passed in values could be of a transformed method
* @param returnValue The current return value
* @param parameters The current parameters
* @return -1 if they are incompatible, 0 if they are compatible, 1 if they should be transformed
*/
public int checkValidity(TransformTr... |
Distributed collaborative space-time block codes for two-way relaying network
Utilizing the recently-developed unique factorization of signals and distributed Alamouti coding scheme, a distributed collaborative Alamouti space-time block code design is presented for a two-way amplify-and-forward (AF) relaying network, ... |
// Set the number of transfers (number of triggers until complete)
void transferCount(unsigned int len) {
uint32_t s, d, n = 0;
uint32_t dcr = CFG->DCR;
s = (dcr >> 20) & 3;
d = (dcr >> 17) & 3;
if (s == 0 || d == 0) n = 2;
else if (s == 2 || d == 2) n = 1;
CFG->DSR_BCR = len << n;
} |
<reponame>LivelyVideo/webrtc-stats
export interface WebRTCStatsConstructorOptions {
getStatsInterval: number
rawStats: boolean
statsObject: boolean
filteredStats: boolean
wrapGetUserMedia: boolean
debug: boolean
remote: boolean
logLevel: LogLevel
}
/**
* none: Show nothing at all.
* ... |
//Function to calculate the line numbers for each word in the list.
public void defineWordIndexes(ArrayList<Word> wordList, ArrayList<Line> lineList) {
for(Word w : wordList) {
ArrayList<Integer> indexList = new ArrayList<Integer>();
for(int i=0; i<lineList.size(); i++) {
if(lineList.get(i).getSentence... |
// send a push notification to a certain user
public void sendPushNotification(String token, String uid, String title, String text) {
if (server_key == null) return;
Log.d(Globals.TAG, "Sending push notification to " + token);
HandlerThread thread = new HandlerThread("pushNotification");
... |
<filename>src/final/final/wood.h
#ifndef WOOD_H
#define WOOD_H
#include "object.h"
class Wood : public Object
{
public:
Wood(glm::vec3 pos, glm::vec3 size, glm::vec3 color) : Object(pos, size, color) {
this->InitRenderData();
};
~Wood() {};
unsigned int VAO;
void Draw(Shader *shader) {
shader->use();
sha... |
def MakeInt(array):
for i in range(len(array)):
array[i] = int(array[i])
return array
def Qprocess(array1, variablenamehere):
if array1[0] == '+':
return int(array1[1])
else:
if variablenamehere >= int(array1[1]):
return -1*(int(array1[1]))
else:... |
/**
* Method to split input to SNR groups
*
* @param input the input
* @return array of SNR groups
*/
public static SNRGroup[] splitInputToGroups(String input) {
LangHelper.notNull(input);
input = input.trim();
SNRHelper.validateInput(input);
final List<SNRGroup> groups = new LinkedList<SNRGroup>();
... |
#include<cstdio>
#include<cstring>
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int read()
{
int x=0,w=1;
char c=getchar();
while(c<'0'||c>'9'){if(c=='-')w=-1;c=getchar();}
while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
return w*x;
}
int h,t;
int a[10010];
int n,i;
int s,d;
int main()... |
// Purge the AutoreleasePool on the stack top synchronously
func AutoreleasePoolPurge() {
AutoreleasePoolLock()
autoreleasePoolTop().Purge()
AutoreleasePoolUnLock()
} |
// DiscoverClusters returns a list of DiscoveredClusters found in both the accounts_mgmt and
// accounts_mgmt apis with the given filters
func DiscoverClusters(token string, baseURL string, baseAuthURL string, filters discovery.Filter) ([]discovery.DiscoveredCluster, error) {
authRequest := auth.AuthRequest{
Token: ... |
//HandleGenerate handles admission-requests for policies with generate rules
func (ws *WebhookServer) HandleGenerate(request *v1beta1.AdmissionRequest, policies []kyverno.ClusterPolicy, patchedResource []byte, roles, clusterRoles []string) (bool, string) {
var engineResponses []response.EngineResponse
resource, err :... |
//Summary:
// Print basic information to the terminal using various variable
// creation techniques. The information may be printed using any
// formatting you like.
//
//Requirements:
//* Store your favorite color in a variable using the `var` keyword
//* Store your birth year and age (in years) in two variables us... |
export * from './filters/size';
export * from './filters/number';
export * from './filters/html';
export * from './filters/date';
export function getFixedRatio(uploaded = 0, downloaded = 0): string | '∞' {
const ratio = uploaded / downloaded;
if (ratio === Infinity || ratio > 10000) {
return '∞'; // Ra... |
Association of dipeptidyl peptidase IV polymorphism with clinicopathological characters of oral cancer.
OBJECTIVE
To evaluate the associations between dipeptidyl peptidase IV (DPP4) single nucleotide polymorphism (SNP) and clinicopathological characters of oral cancer.
METHODS
Four loci of DPP4 SNPs (rs7608798 A/G, ... |
package lol_test
import (
"go-riot/lol"
"testing"
"github.com/stretchr/testify/assert"
)
func TestClashBySummonerID(t *testing.T) {
assert := assert.New(t)
client := lol.NewClient(lol.KR, "RGAPI-6df8ce4c-c548-44cc-b35f-f06c59f95627", nil)
res, err := client.Clash.BySummonerID("aPWJgSeY9bV4Jq6DJ7lOBo3YVr9VvB_f... |
#if defined(XMLRPC_THREADS)
#include "XmlRpcThread.h"
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <process.h>
#else
# include <pthread.h>
#endif
using namespace XmlRpc;
//! Destructor. Does not perform a join() (ie, the thread may continue to run).
XmlRpcThread::~Xml... |
<filename>frontend-angular/src/app/modules/admin/modules/users/modules/statistics/components/statistics-info-dialog/statistics-info-dialog.component.spec.ts
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translat... |
/**
* A subclass of {@link TrackIconAsyncTask} that loads the generated track icon bitmap into
* the provided {@link ImageView}. This class also handles concurrency in the case the
* ImageView is recycled (eg. in a ListView adapter) so that the incorrect image will not show
* in a recycled view.
... |
The necessity of historical inquiry in educational research: the case of religious education
This article explores the mixed fortunes of historical inquiry as a method in educational studies and exposes evidence for the neglect of this method in religious education research in particular. It argues that historical inq... |
//called after the default drawItem method
@Override
public void afterDrawItem(RectF rect, Canvas canvas, Paint paintByLevel, int level) {
CanvasUtil.drawPolygon(rect,canvas,paintByLevel, level + 3 );
} |
def configure_sequencer_triggering(
self, channel_index, aux_trigger, play_pulse_delay=0
):
self._daq.setString(
f"/{self._device_id}/qachannels/{channel_index}/generator/auxtriggers/0/channel",
aux_trigger,
)
self._daq.setDouble(
f"/{self._device_... |
class AzureSBToMLRun:
"""
Listen in the background for messages on a Azure Service Bus Queue
(like Nuclio). If a message is received, parse the message and
use it to start a Kubeflow Pipeline.
The current design expects to receive a message that was sent to the
Queue from Azure Event Grid.
... |
//NewScanner creates a new scanner
func NewScanner(exps Expressions) (*Scanner, []error) {
fileMatchers, errs1 := buildFileMatchers(exps.FileMatchExps)
contentMatchers, errs2 := buildContentMatchers(exps.ContentMatchExps)
errs := make([]error, 0, len(errs1)+len(errs2))
errs = append(errs, errs1...)
errs = append(e... |
<reponame>abhi-13-07/DSA101
# author : mani-barathi
def merge(arr,l,m,r):
i = l # starting index of left sub array
j = m+1 # starting index of right sub array
k = 0 # starting index of temp arr
temp = ['' for i in range(l,r+1)]
while i<=m and j<=r:
if arr[i]<arr[j]:
temp[k] = arr[i]
i+=1
else:
te... |
<reponame>bharathraja23/mlops-on-gcp
import numpy as np
import pandas as pd
from os import system
import fire
from sklearn.linear_model import SGDClassifier
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
from joblib import dump, load #... |
// CAdvisorCmd install and configures the cAdvisor on docker host
func CAdvisorCmd(cmd *cobra.Command, args []string) {
machine, _ := cmd.Flags().GetString("machine")
file, _ := cmd.Flags().GetString("file")
log.Debug("Machine: ", machine)
log.Debug("File: ", file)
client := libmachine.NewClient(machinePath, machi... |
Samuel Pufendorf: majority rule (logic, justification and limits) and forms of government
The article analyses one of the first and more important doctrines of majority rule and its relationship with forms of government, the one presented by Samuel Pufendorf in his De jure naturae et gentium, the most popular work of ... |
<reponame>zhangyuchen0411/leetcode<filename>impl-rust/src/no_0024_swap_nodes_in_pairs.rs
use crate::common::head_list_node;
use crate::common::ListNode;
struct Solution;
impl Solution {
// 参考别人的
pub fn swap_pairs(mut head: Option<Box<ListNode>>) -> Option<Box<ListNode>> {
let mut dummy = ListNode::new(... |
def fixChainIds(self):
lastResNum = -10000
lastChain = '-'
chainsUsed = []
replacingChains = False
newChain = False
for atomIndex, residueNumber in enumerate(self.resNums):
if residueNumber < lastResNum:
replacingChains = True
newChain = chr(max(ord(self.chains[atomIndex]),... |
def normalize_homogeneous_torch(points):
uv = points[..., :-1]
w = torch.unsqueeze(points[..., -1], -1)
return divide_safe_torch(uv, w) |
<filename>twinkle-asm/src/main/java/com/twinkle/framework/asm/designer/InstanceBuilderDesigner.java
package com.twinkle.framework.asm.designer;
import com.twinkle.framework.asm.builder.InstanceBuilder;
import com.twinkle.framework.asm.utils.TypeUtil;
import lombok.Getter;
import org.objectweb.asm.*;
import java.util.... |
package picocli.codegen.aot.graalvm.processor;
import picocli.codegen.aot.graalvm.DynamicProxyConfigGenerator;
import picocli.codegen.aot.graalvm.ReflectionConfigGenerator;
import picocli.codegen.aot.graalvm.ResourceConfigGenerator;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.pro... |
// NewModelSlotBuilder returns an initialized modelSlotBuilder.
func NewModelSlotBuilder(intent, name, typeName string) *modelSlotBuilder {
return &modelSlotBuilder{
registry: l10n.NewRegistry(),
intent: intent,
name: name,
typeName: typeName,
samplesName: intent + "_" + name + l10n.KeyPos... |
def load_namespace_schemas(cls, schema_dir: Optional[str] = None) -> dict:
metadata_testing_enabled = bool(os.getenv("METADATA_TESTING", 0))
namespace_schemas = {}
if schema_dir is None:
schema_dir = os.path.join(os.path.dirname(__file__), 'schemas')
if not os.path.exists(sch... |
The man who came into the Cologne citizen registry office in early summer 2009 was in a hurry. He introduced himself as Michael Bodenheimer and requested a national identity card and a German passport.
He was an Israeli citizen, he explained -- he had moved to Germany in mid-June. He offered proof in form of an Israel... |
<filename>src/api/api.controller.ts
import {
Body,
ClassSerializerInterceptor,
Controller,
Delete,
Get,
HttpCode,
Param,
Patch,
Post,
Req,
Session,
SetMetadata,
UseGuards,
UseInterceptors,
} from '@nestjs/common';
import { HttpInterceptor } from './interceptors/http.interceptor';
import {
... |
import { createAction, props } from '@ngrx/store';
import { IOwner, IPet } from 'src/app/shared/interfaces';
const ownerDetailNamespace = `[OWNER DETAIL]`;
export const ownerDetailSetOwner = createAction(`${ownerDetailNamespace} Set Owner`, props<{ owner: IOwner }>());
export const ownerDetailSetIsLoading = createAct... |
<filename>src/shadowbox/model/access_key.ts<gh_stars>1-10
// Copyright 2018 The Outline 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
//
// http://www.apache.org/licenses/L... |
<reponame>ethansaxenian/RosettaDecode
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public enum ImageProcessing {
;
public static void main(String[] args) throws IOException {
BufferedImage img = ImageIO.read(new File("example.png")... |
A survey for the future
The Cytopathology Readership Survey, conducted in the spring of 1998, had a response rate that was 25% above the anticipated level. The results of the questionnaire can therefore be taken as a good indication of what matters most to readers and contributors and will help to shape the content an... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(clippy::manual_flatten)]
use std::collections::{HashMap, HashSet};
use std::ffi::OsStr;
use std::io;
use std::path::Path;
use std::process::Command;
use lazy_static::lazy_static;
use regex::Regex;
pub fn find_missing(mut cmd: Command... |
Antonio Conte will make a late check on N'Golo Kanté before deciding whether or not to start the Chelsea midfielder against Roma.
Chelsea can clinch qualification into the Champions League knockout stages by beating Roma at the Olympic Stadium on Tuesday night and Kanté is close to making a comeback.
Kanté returned t... |
<filename>src/main/java/org/reasm/m68k/messages/DuplicateRegistersInRegisterListWarningMessage.java
package org.reasm.m68k.messages;
import org.reasm.AssemblyWarningMessage;
/**
* A warning message that is generated during an assembly when a register list in a <code>MOVEM</code> instruction or a
* <code>REG</code> ... |
import os
import shutil
import settings
import utils
MODULE_DIR_PATH = os.path.dirname(os.path.abspath(__file__))
DEFAULT_ROOT_DIR_PATH = os.path.join(MODULE_DIR_PATH, '../..')
DEFAULT_TEMPLATES_DIR_PATH = os.path.join(MODULE_DIR_PATH, 'templates')
# if possible use PROJECTS_ROOT var from settings, otherwise use the... |
{-# LANGUAGE RankNTypes #-}
-- | Generation of places from place kinds.
module Game.LambdaHack.Server.DungeonGen.Place
( Place(..), TileMapEM, buildPlace, isChancePos, buildFenceRnd
#ifdef EXPOSE_INTERNAL
-- * Internal operations
, placeCheck, interiorArea, pover, buildFence, buildFenceMap
, tilePlace
#endif
... |
<gh_stars>0
package usecases_test
import (
"testing"
"github.com/janithl/paataka/database"
"github.com/janithl/paataka/entities"
"github.com/janithl/paataka/usecases"
)
/** MockFeedReader */
type MockFeedReader struct {
Posts []entities.Post
}
func (m MockFeedReader) Read(url string) ([]entities.Post, error) {... |
<reponame>oljapriya/Team_Profile_Generator<filename>node_modules/webdriverio/build/commands/browser/keys.d.ts
/**
*
* Send a sequence of key strokes to the active element. You can also use characters like
* "Left arrow" or "Back space". WebdriverIO will take care of translating them into unicode
* characters. You’l... |
""""
One user repeatedly logs in, logs out.
Suppress interleaving with ReadInt, UpdateInt actions
"""
from WebModel import Login, Logout, UpdateInt, ReadInt
actions = (Login, Logout, UpdateInt, ReadInt) # interleave Initialize only
initial = 0
accepting = (0,)
graph = ((0, (Login, ( 'VinniPuhh', 'Correct' ), 'Succ... |
/**
* Functional tests for <code>DentistryLicenseService</code>.
*
* @author j3_guile
* @version 1.0
*/
@RunWith(BlockJUnit4ClassRunner.class)
public class DentistryLicenseServiceTest extends SOAPInvocationTestCase {
/**
* Service end point.
*/
private String serviceURL;
/**
* Default ... |
// Static function.
// Return val in inches and true if ok, return false otherwise. str
// is a floating point number possibly followed by "cm".
//
bool
plot_bag::get_dim(const char *str, double *val)
{
char buf[128];
int i = sscanf(str, "%lf%s", val, buf);
if (i == 2 && buf[0] == 'c' && buf[1] == 'm')
... |
/**
* Comparison of variable to chosen value/variable
*
* @date 25-02-2013
* @author Michal Wronski
*
*/
public final class Relation implements Expression {
public enum RelationType {
EQ, NEQ, EL, EG, GT, LT, REGEX
}
private final Variable var;
private final RelationType relation;
... |
/**
* virGetStream:
* @conn: the hypervisor connection
*
* Allocates a new stream object. When the object is no longer needed,
* virObjectUnref() must be called in order to not leak data.
*
* Returns a pointer to the stream object, or NULL on error.
*/
virStreamPtr
virGetStream(virConnectPtr conn)
{
virStre... |
<gh_stars>0
/*
Copyright 2021 The Silkworm 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
<filename>menus/org.lorainelab.igb.menu.api/src/main/java/org/lorainelab/igb/menu/api/model/ParentMenu.java
/*
* 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 org.lorainelab.igb.... |
def FixEndings(file, crlf, cr, lf):
most = max(crlf, cr, lf)
if most == crlf:
result = subprocess.call('unix2dos.exe %s' % file, shell=True)
if result:
raise Error('Error running unix2dos.exe %s' % file)
else:
result = subprocess.call('dos2unix.exe %s' % file, shell=True)
if result:
ra... |
/**------------------------------------------------------
* Processes the given command.
* @command the command to execute
*------------------------------------------------------*/
public void processCommand(String cmd)
{
MiUtility.pushMouseAppearance(
(MiPart )getTargetOfCommand(), MiiTy... |
/**
* reading source file and fill ask & bid sets.
*/
public void readFile() {
try {
XMLStreamReader xmlr = XMLInputFactory.newInstance().createXMLStreamReader(name, new FileInputStream(name));
while (xmlr.hasNext()) {
xmlr.next();
if (xmlr.hasNa... |
<gh_stars>1-10
module String where
import Data.Range.Range as R
listToRanges :: [(Int,Int)] -> [Range Int]
listToRanges [] = []
listToRanges ((lb, le):xs) = R.SpanRange lb le : listToRanges xs
rangesToList :: [Range Int] -> [(Int,Int)]
rangesToList [] = []
rangesToList ((R.SpanRange n m):xs) = (n, m) : rangesToList ... |
X = int(input())
p5 = [i**5 for i in range(3000)]
p5s = set(p5)
M = 299**5
A = 0
while True:
B5 = abs(A**5 - X)
if B5 in p5s:
B = p5.index(B5) if A**5 >= X else -p5.index(B5)
print(A, B)
exit()
A += 1
|
// Just dump a file out over the socket
void sendRawFile(SockWrapper const & wrapper, std::string const & filesend)
{
struct stat fileInfo;
if (stat(filesend.c_str(), &fileInfo) == -1)
{
throw SendError{"Invalid File to Send"};
}
std::ifstream file{filesend, std::ios::binary};
std::vector<char> sendvec;
sendve... |
# Don't forget to properly setup:
# /home/simulators/.spynnaker.cfg and /usr/local/lib/python2.7/dist-packages/spynnaker/spynnaker.cfg
import spynnaker.pyNN as sim
import spynnaker_external_devices_plugin.pyNN as ExternalDevices
import spinnman.messages.eieio.eieio_type as eieio_type
# Base code from:
# http://spinna... |
Daniel Craig will star in at least five James Bond films, taking his tenure through the 25th entry in the series...
5 Bonds For Craig
6th September 2012
Daniel Craig will play James Bond in at least five films in the EON Productions series, MI6 can confirm. He has already completed shooting on his third outing, "Sky... |
/* Do the first essential initializations that must precede all else. */
static inline void
first_init (void)
{
__mach_init ();
RUN_HOOK (_hurd_preinit_hook, ());
} |
// MustConnect will panic if cannot connect to sql server
func MustConnect(ctx context.Context, driver string, opt *options.ConnectOptions) *Client {
conn, err := Connect(ctx, driver, opt)
if err != nil {
panic(err)
}
return conn
} |
import { FC } from 'react'
import { MdCancel } from 'react-icons/md'
import { setClipIndex, setCurrentClip } from 'src/state/reducer'
import { useStateValue } from 'src/state/state'
interface Props {
filterSeen: boolean
playlistVisible: boolean
hidePlaylist: () => void
}
const Playlist: FC<Props> = ({ filterSeen, ... |
<filename>gcc-cross/lib/gcc/i686-elf/4.9.1/plugin/include/cgraph.h<gh_stars>1-10
/* Callgraph handling code.
Copyright (C) 2003-2014 Free Software Foundation, Inc.
Contributed by <NAME>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Pu... |
// -----------------------------------------------------------------------------
// The index manager tracks the current tips of each index by using a parent
// bucket that contains an entry for index.
//
// The serialized format for an index tip is:
//
// [<number tips><block hash1><block hash2>],...
//
// Field ... |
def _ops_from_givens_rotations_circuit_description(
qubits: Sequence[cirq.Qid], circuit_description: Iterable[Iterable[
Union[str, Tuple[int, int, float, float]]]]) -> cirq.OP_TREE:
for parallel_ops in circuit_description:
for op in parallel_ops:
if op == 'pht':
... |
def sendServerPlayerStatsEvent(self, player):
logging.info("sendServerStatsEvent: %s %f %d %s" %
(player.name, player.playtime, player.killcount,
player.killedcount))
self.callRemote(ServerPlayerStatsEvent,
playername=player.name,
playtime=player.pl... |
from pyethereum import utils
import random
def sha3(x):
return utils.decode_int(utils.zunpad(utils.sha3(x)))
class SeedObj():
def __init__(self, seed):
self.seed = seed
self.a = 3**160
self.c = 7**80
self.n = 2**256 - 4294968273 # secp256k1n, why not
def rand(self, r):
... |
I own the “Band of Brothers” series on Blu-ray and it is truly outstanding! Here is some insight into the interviews given to me by the man who conducted the interviews with the men of Easy Company, Mark Cowen…
In 2012, I took a filmmaking class with Mark Cowen, who directed the Emmy nominated, “We Stand Alone Togethe... |
/**
* Frees the resources used by this helper class. This method can be called by a {@code tearDown()} method of a unit
* test class.
*
* @throws Exception if an error occurs
*/
public void tearDown() throws Exception {
if (datasource != null) {
datasource.getConnection().cl... |
/**
* Returns a {@code ModelManager} with the data from {@code storage}'s tea pet and {@code userPrefs}. <br>
* The data from the sample tea pet will be used instead if {@code storage}'s tea pet is not found,
* or an empty tea pet will be used instead if errors occur when reading {@code storage}'s tea pe... |
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
/**
* Merge the two candidate clusters Ci and Cj, update model and distances...
*
* @throws DiarizationException the diarization exception
* @throws IOException Signals that an I/O exception has occurred.
*/
public void mergeCandidates() throws DiarizationException, IOException {
updateOrderOfCandidates();... |
#include <stdio.h>
//int is_war(int vedtor)
int main(void){
// Your code here!
int n,m,i,a,b;
scanf("%d %d ",&n,&m);
int x[n+1],y[m+1];
scanf("%d %d\n",&x[n],&y[m]);
a=x[n],b=y[m];
for(i=0; i<n; i++){
scanf("%d ",&x[i]);
a>x[i]? (a=a):(a=x[i]);
}
for(i=0; i... |
The Grammy-winning singer revealed her condition to AARP Friday.
Linda Ronstadt accepts the Trailblazer award at the National Council of La Raza ALMA Awards in Pasadena, Calif. Ronstadt broke barriers for women as one of the top-selling artists of her generation. She has revealed she has Parkinson's Disease. (Photo: M... |
def call_async(self, msg, clb=None):
urlpath = self._make_url(msg.svcname)
_future = self.__controllerAsync.run_job(msg, urlpath, clb=clb)
return AsyncHandler(_future) |
On the improvement of the metrological properties of manganin sensors
The paper presents the recent progress made in the accuracy improvement of the manganin pressure sensors at the Warsaw University of Technology (WUT) and at the Institute of Nuclear Energy. The efforts of the authors were concentrated on three probl... |
By Radio Rahim
New York - On Saturday night at the Nassau Coliseum, middleweight contender Daniel Jacobs (33-2, 29 KOs) made his return to the ring and won a dominating twelve round unanimous decision over previously undefeated Luis Arias.
Jacobs controlled the fight from start to finish and it was hard to give Arias... |
// A binary search based function that returns index of a peak element
int findPeakUtil(int arr[], int low, int high, int n) {
// Find index of middle element
int mid = low + (high - low)/2; /* (low + high)/2 */
// Compare middle element with its neighbours (if neighbours exist)
if ((mid == 0 || arr[... |
/**
*
* @param index - index to check
* @return true if the index is a custom order sort
*/
public static boolean isCustomOrder(int index) {
return fromInt(index) == CUSTOM_ORDER;
} |
.
OBJECTIVE
To test the general hypothesis about executive deficits in language production in schizophrenia as well as more specific hypothesis that this deficit would be more pronounced in the case of higher demand on executive functions.
MATERIAL AND METHODS
Twenty-five patients with schizophrenia and twenty-seven... |
def work_dir_file(relfile, release_dir, working_dir):
path = os.path.relpath(relfile, release_dir)
dest_file = os.path.join(working_dir, path)
return dest_file |
The Labour party may have avoided a divisive vote on Trident this week, but that doesn’t mean that it can always avoid working out whether it should have a new position. Last night Maria Eagle, the Shadow Defence Secretary, told a fringe that though she had made her mind in 2007 that she was in favour of the renewal of... |
/**
* Removes the enclosing brackets form the specified text.
* The bracket pairs which can be removed are specified by the second argument.
* If the specified text is not enclosed by brackets, this method return it simply.
* The result text is trimmed automatically.
*
* @param text the target text
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.