content stringlengths 10 4.9M |
|---|
v. Aston Villa
608 – Attempted Arsenal passes in the entire match
307 – Attempted Arsenal passes in the second half
226 – Attempted Aston Villa passes in the entire match
152 – Completed passes by Aston Villa full time
187 – Completed passes by Song, Sagna, and Arteta
7 – Arsenal players who completed more than 9... |
/**
* Base class for Aggregate Root entities as they are described in DDD. It exposes a {@link #register(ApplicationEvent)}
* method allowing subclasses to register events to be published as soon as the aggregate using calls to
* {@link org.springframework.data.repository.CrudRepository#save(Object)}.
*
* @author ... |
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"strings"
)
type Token int
const (
// Special tokens
ILLEGAL Token = iota
EOF
WS
// Literals
IDENT // fields, table name
// Misc characters
ASTERISK // *
COMMA // ,
// Keywords
SELECT
FROM
)
func isWhitespace(ch rune) bool {
return ch == ' ' |... |
<reponame>meszaroz/rpi-multimedia-server
#include "./interface/abstractexecuter.h"
AbstractExecuter::AbstractExecuter(QObject *parent) : QObject(parent)
{
}
AbstractExecuter::~AbstractExecuter()
{
}
|
/**
* This implements getTime() for the national types. It lives
* here so it can be shared between all the national types.
*
* @exception StandardException thrown on failure to convert
*/
protected Time nationalGetTime( Calendar cal) throws StandardException
{
if (isNull())
return null;
... |
// Update changes the resource snapshot held by the management server, which
// updates connected clients as required.
func (s *ManagementServer) Update(opts UpdateOptions) error {
s.version++
var listeners []types.Resource
for _, l := range opts.Listeners {
listeners = append(listeners, l)
}
snapshot := v3cache... |
/**
* {@inheritDoc}
*
* @throws CTKException if it was not able to export molecule into the desired output format
*
*/
@Override
public String convertMolecule(AbstractMolecule container, StType type) throws CTKException {
String result = null;
Molecule molecule = (Molecule) container.get... |
/// Diff0 compression, which is a diff0_compress_i64 firstly, and then a diff0_compress_u32 if it
/// indeed furtherly decrease the final size.
pub fn diff0_compress(diffs: Vec<i64>) -> Result<Vec<u8>, Error> {
let data = diff0_compress_i64(diffs)?;
let first_compressed_out_size = data.len();
let data_2nd_compressed... |
#
#
# 0=================================0
# | Kernel Point Convolutions |
# 0=================================0
#
#
# ----------------------------------------------------------------------------------------------------------------------
#
# Callable script to start a training on ModelNet40 dat... |
package handler
import (
"context"
"fmt"
"github.com/golang/protobuf/ptypes"
proto "github.com/ops-cn/go-devops/proto/admin"
"github.com/ops-cn/go-devops/proto/unified"
"sort"
"github.com/google/wire"
"github.com/ops-cn/go-devops/admin/app/model"
"github.com/ops-cn/go-devops/common/auth"
"github.com/ops-cn/... |
/**
* It represents a version and allows getting access to its information parts. The Representer can be created from text representation of a version or through providing version fields directly.
* Format of version is : {prefix-}?{ddd.ddd.ddd...ddd}?{-postfix}?
*
* @since 1.0.0
*/
public final class Version impl... |
/// Drops every node in the tree, essentially invalidating it
pub fn destroy_tree(&mut self) {
let root_ix = self.tree.root_ix();
let mut nodes = self.tree.all_descendants_of(root_ix);
nodes.sort_by(|a, b| b.cmp(a));
for node in nodes {
self.tree.remove(node);
}
... |
<gh_stars>10-100
#
# Using the standard diet problem to demonstrate the ticdat principles of Tidy, Tested, Safe.
# Please refer to the following for an introduction.
# https://github.com/ticdat/ticdat/wiki/1-Beginner-ticdat-intro
#
# This file is training material meant to guide you towards a well organized GitHub repo... |
#ifndef FWCore_Framework_PreallocationConfiguration_h
#define FWCore_Framework_PreallocationConfiguration_h
// -*- C++ -*-
//
// Package: FWCore/Framework
// Class : PreallocationConfiguration
//
/**\class edm::PreallocationConfiguration PreallocationConfiguration.h "PreallocationConfiguration.h"
Description... |
<gh_stars>0
import * as React from "react";
import {appStateService, getStageById} from "../../state/AppStateService";
import {StageComponent} from "./StageComponent";
import {appStateStore} from "../../state/AppStateStore";
import {LoadingComponent} from "../common/LoadingComponent";
import {StageLocked} from "./Stage... |
<filename>src/components/Sections/RefillSettings.tsx
import React, { useEffect } from "react"
import { iRefillFuelTypes, iSectionsProps } from "../../constants/interfaces"
import { CLASSES } from "../../css/classes"
import { refillFuelTypes, refillFuelTypesHuman } from "../../constants/constants"
import TOOLTIPS from "... |
link ../../../IQKeyboardManager/IQKeyBoardManager/IQToolbar/IQToolbar.h |
<filename>web/socket.cpp
#include <web/web.hpp>
#include <netdb.h>
#include <mbedtls/net_sockets.h>
#include <mbedtls/debug.h>
#include <mbedtls/ssl.h>
#include <mbedtls/entropy.h>
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/error.h>
#if !defined(_WIN32)
#define closesocket close
typedef int SOCKET;
#endif
struc... |
/**
* Handler method for standard messages used by simplebot
*/
void SimpleMsgHandler::handleMessage(BasicNetworkMsg *msg) {
if (node->isActive()) {
if (msg->getType() == NL_REQ) {
handleNLReq(msg);
} else if (msg->getType() == NL_RESP) {
handleNLResp(msg);
} else i... |
import numpy as np
import torch
from torch.distributions import OneHotCategorical
from offpolicy.algorithms.r_maddpg.algorithm.r_actor_critic import R_MADDPG_Actor, R_MADDPG_Critic
from offpolicy.algorithms.r_matd3.algorithm.r_actor_critic import R_MATD3_Actor, R_MATD3_Critic
from offpolicy.utils.util import is_discret... |
Alaska Gov. Bill Walker and Lt. Gov. Byron Mallott will return bearded sealskin vests they were given by an organization affiliated with the North Slope Borough following the disclosure that the borough bought them from a daughter of the mayor.
The office of Mayor Charlotte Brower in February paid $7,000 to Mary Jo Ol... |
package CronScheduler
import (
. "gopkg.in/check.v1"
"log"
"testing"
"time"
)
const (
layout string = "2006-01-02 15:04:05"
)
func TestCronSchedulerScript(t *testing.T) {
TestingT(t)
}
type CronSchedulerScriptTestsSuite struct{}
var _ = Suite(&CronSchedulerScriptTestsSuite{})
func (s *CronSchedulerScriptTes... |
/**
* Navigate into the next or previous window.
*
* <p>Called when the user performs window navigation with keyboard shortcuts.
*
* <p><strong>Note:</strong> Caller is responsible to recycle the pivot.
*
* @return {@code true} if any accessibility action is successfully performed.
*/
private bo... |
import statistics
from statistics import mode
def most_common(List):
return(mode(List))
def countX(lst, x):
return lst.count(x)
def ans(lst,count):
if(count<=len(lst)/2):
if(len(lst)%2==0):
return 0
else:
return 1
else:
return len(lst)-2*(len(lst)-count)
T=i... |
import { RoutableFunction } from "../interface/common-interfaces";
import { ControllerInterface } from '../interface/controller-interface';
import { InjectorInterface } from '../interface/injector-interface';
import { deepCopy, prevVer } from '../util';
import { RouteOptions } from "../decorator/route";
interface Rout... |
<gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.ai.formrecognizer.implementation.util;
import com.azure.ai.formrecognizer.models.DocumentFieldType;
import com.azure.ai.formrecognizer.administration.models.DocumentFieldSchema;
import ja... |
/* This function takes a LevelMap which is stored in a JSON file and loads it
* --- A JSON file is basically a file that's used to store a ton of different
* types of information */
private JSONObject loadToJson(String filename) {
BufferedReader ... |
/**
* Simple FilterInputStream that can replace occurrances of bytes with something else.
*/
public class ReplacingInputStream extends FilterInputStream {
// while matching, this is where the bytes go.
int[] buf=null;
int matchedIndex=0;
int unbufferIndex=0;
int replacedIndex=0;
private fina... |
<filename>api_test.go
package v8
import (
"github.com/stretchr/testify/assert"
"github.com/v8platform/designer"
"github.com/v8platform/runner"
"reflect"
"testing"
)
func TestCreateInfobase(t *testing.T) {
if testing.Short() {
t.Skip("skipped for integrated tests")
}
type args struct {
create runner.Comm... |
// Unmarshal deserailize config into object
func (configMgr *ConfigurationManager) Unmarshal(obj interface{}) error {
rv := reflect.ValueOf(obj)
if rv.Kind() != reflect.Ptr || rv.IsNil() {
err := errors.New("invalid object supplied")
lager.Logger.Error("invalid object supplied ", err)
return err
}
return conf... |
/**
* Copyright (C) 2010-2016 eBusiness Information, Excilys Group
* Copyright (C) 2016-2019 the AndroidAnnotations project
*
* 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://... |
/* information about observing circumstances including time and location from GPS or manually entered.
* use Serial1 hardware RX1/TX1 for Adafruit GPS shield on Mega.
*/
#include "Circum.h"
// serial configuration for GPS
#define GPS_TX_PIN 13 // not needed
#define GPS_RX_PIN 12
#define GPS_INVERT false
#define G... |
// onViewStateRestored isn't called for dialogs if a view isn't returned on onCreateView
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mDelegate.onViewStateRestored(savedInstanceState);
} |
Nutritional status of the elderly. II. Anthropometry, dietary and biochemical data of old pensioners in Perugia at the fifth year follow-up.
206 aged pensioners of the city of Perugia have been examined in a longitudinal study, with emphasis on body composition, diet, life habits and clinical-biochemical data. From th... |
/* returns this as a string representation */
string BlockHeader::to_s() {
BlockHeader *header = clone();
string str;
mpz_t mpz_hash;
mpz_init(mpz_hash);
get_hash(mpz_hash);
stringstream ss;
ss << "BlockHeader: " << mpz_to_hex(mpz_hash) << "\n";
ss << " version: " << version << "\n";
ss << " h... |
/*
* oxCore is available under the MIT License (2014). See http://opensource.org/licenses/MIT for full text.
*
* Copyright (c) 2014, Gluu
*/
package org.gluu.persist.cloud.spanner.operation.impl;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arr... |
import fs from 'fs';
import hogan from 'hogan.js';
export function renderVerifyIdentityItemPage(vars: {
account: object;
chainName: string;
confirmationAddress: string;
}) {
const template = fs.readFileSync(`${__dirname}/templates/verifyIdentityItemTemplate.mustache`, 'utf8');
const compiled = hoga... |
<filename>cmd/add-task/main.go
package main
import (
"context"
"encoding/json"
"github.com/aws/aws-lambda-go/lambda"
"github.com/smalleats/serverless-todo-example/errors"
"github.com/smalleats/serverless-todo-example/todo"
)
type request struct {
Note string `json:"note"`
}
type adder interface {
Add(strin... |
const { registerSuite } = intern.getInterface('object');
const { assert } = intern.getPlugin('chai');
import * as timing from '../../../src/async/timing';
import { throwImmediatly } from '../../support/util';
import { isEventuallyRejected } from '../../support/util';
import Promise from '@dojo/shim/Promise';
registerS... |
Concurrent ATM connection setup reducing need for VP provisioning
A common approach used for decreasing end-to-end connection setup delay in ATM networks is to provision partial segments a priori using virtual path connections (VPCs). In this paper, we present an analysis to study the effect of such provisioning. The ... |
<gh_stars>10-100
#ifndef __CONFIG_H__
#define __CONFIG_H__
#define WIFI_SSID ""
#define WIFI_PASS ""
// PIN
#define SD_MISO 2
#define SD_MOSI 15
#define SD_SCLK 14
#define SD_CS 13
/*
* ETH_CLOCK_GPIO0_IN - default: external clock from crystal oscillator
* ETH_CLOCK_GPIO0_OUT - 50MHz clock from internal APLL ... |
// Run starts the primary application. It handles starting background services,
// populating package globals & structures, and clean up tasks.
func Run(c config.Config) error {
var err error
cfg = c
log = logrus.New()
if cfg.Debug {
log.Level = logrus.DebugLevel
log.Debug("Enabling Debug Logging")
}
if cfg.D... |
Dragon Profile Joined March 2011 Korea (South) 36 Posts Last Edited: 2014-06-29 06:52:47 #1 Dragon Invitational Tournament #3!
With help from my sponsor
Players:
Terran (T) Taeja , Marineking , MMA , Ryung , Keen
Zerg (Z) Hyun , Sleep , DRG , Leenock , Ragnarok , Life , Impact
Protoss (P) First , Seed , Ruin , Dai... |
// Bytes is deprecated. Use Find instead
func (b *Box) Bytes(name string) []byte {
bb, _ := b.Find(name)
oncer.Deprecate(0, "github.com/gobuffalo/packr/v2#Box.Bytes", "Use github.com/gobuffalo/packr/v2#Box.Find instead.")
return bb
} |
def add_compatible_plugins(cls, cluster):
for plugin in cls.get_compatible_plugins(cluster):
plugin_attributes = dict(plugin.attributes_metadata)
plugin_attributes.pop('metadata', None)
cls.create({
'cluster_id': cluster.id,
'plugin_id': plugin... |
/*
* Copyright (c) 2015 DataTorrent, Inc.
*
* 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 ag... |
//Format -- Formats a string of text to a specified width
func Format(text string, width int) (result string) {
if len(text) < width {
return text
}
index := width
previousIndex := 0
for index < len(text) {
spaceExist := false
for i := index; i > index-width; i-- {
if unicode.IsSpace(rune(text[i])) {
... |
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.bian.dto.CRConsumerLoanFulfillmentArrangementInitiateInputModelConsumerLoanFulfillmentArran... |
<filename>eventuate-tram-sagas-spring-reactive-common/src/test/java/io/eventuate/tram/sagas/spring/reactive/common/ReactiveSagaLockManagerIntegrationTestConfiguration.java
package io.eventuate.tram.sagas.spring.reactive.common;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springfra... |
// fetchQueryExecutionsInternal fetches query executions and sends them to ch.
func (a *Athenai) fetchQueryExecutionsInternal(ctx context.Context, maxPages float64, resultCh chan *Either, wg *sync.WaitGroup) error {
pageNum := 1.0
callback := func(page *athena.ListQueryExecutionsOutput, lastPage bool) bool {
wg.Add... |
<filename>chapter_designPatterns/src/main/java/ru/job4j/basepatterns/structural/decorator/SeniorJavaDeveloper.java
package ru.job4j.basepatterns.structural.decorator;
public class SeniorJavaDeveloper extends DeveloperDecorator{
public SeniorJavaDeveloper(Developer developer) {
super(developer);
}
... |
Taming Tris(bipyridine)ruthenium(II) and Its Reactions in Water by Capture/Release with Shape-Switchable Symmetry-Matched Cyclophanes
Electron/proton transfers in water proceeding from ground/excited states are the elementary reactions of chemistry. These reactions of an iconic class of molecules—polypyridineRu(II)—ar... |
The evolution of an area centralis and visual streak in the marsupial Setonix brachyurus.
The distribution, morphology, size, and number of cells in the retinal ganglion layer of the marsupial Setonix brachyurus, "quokka," was studied from 25 days postnatal to adulthood using Nissl-stained wholemounts. The total cell ... |
<filename>zend/sapi.cpp<gh_stars>1000+
/**
* Sapi.cpp
*
* This file holds the implementation for the Php::sapi_name() function
*
* @author <NAME> <<EMAIL>>
*/
/**
* Dependencies
*/
#include "includes.h"
/**
* Open PHP namespace
*/
namespace Php {
/**
* Retrieve the sapi name we're running on
* @re... |
<reponame>ChinX/huawei-apm
package api
import (
"bufio"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/go-chassis/huawei-apm/pkg/fifo"
"github.com/go-chassis/huawei-apm/thrift/gen-go/apm"
"github.com/go-mesh/openlogging"
"github.com/openzipkin-contrib/zipkin-go-opentracing/thrift/gen-go/zipkincore"
... |
<reponame>JTarball/pwa-experiment
import { html, css } from "lit";
import { customElement, state } from "lit/decorators.js";
import "@vaadin/button";
import { utility } from "@vaadin/vaadin-lumo-styles/utility";
import { badge } from "@vaadin/vaadin-lumo-styles/badge.js";
import { spacing } from "@vaadin/vaadin-lumo-s... |
/**
* Tests that the <i>CheckIfInLane</i> method checks
* that the boat is within the left lane boundary.
*/
@Test
public void testCheckIfInLaneLeftBoundaryLimit(){
lane = new Lane(0,100);
boat = new Boat(game, 10, lane, "testBoat");
boat.setXPosition(-4);
Assertions.assertTrue(boat.CheckIfInLane());
} |
<reponame>michaelhollman/csce451-osp<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <signal.h>
#include "scheduler.h"
#include "worker.h"
/*
* define the extern global variables here.
*/
sem_t queue_sem; /* semaphore for sched... |
<reponame>Ray-Keiyaku/medum
package path
import (
"fmt"
"medum/text"
"os"
"path/filepath"
"github.com/mitchellh/go-homedir"
)
//GetPath return the location of ".medum" folder
func GetPath() string {
path, err := homedir.Dir()
if err != nil {
fmt.Printf(text.HomedirError, err)
os.Exit(1)
}
return filepat... |
x=input()
m=int(input())
a1=[int(i)-1 for i in input().split()]
ll=len(x)
ll+=ll%2
u=(ll//2)*[0]
for i in range(m):
u[a1[i]]+=1
for i in range(1,ll//2):
u[i]=u[i]+u[i-1]
p1=''
p2=''
#print(u)
for i in range(len(x)//2):
if u[i]%2==0:
p1+=x[i]
p2=x[-i-1]+p2
else:... |
def rapidtide_workflow(
in_file: str,
prefix: str,
venousrefine: bool = False,
nirs: bool = False,
realtr: str = "auto",
antialias: bool = True,
invertregressor: bool = False,
interptype: str = "univariate",
offsettime: Optional[float] = None,
butterorder: Optional[int] = None,
... |
package Assignments;
import dbUtil.dbConnection;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
public class AssignmentPageModel {
/**
* Responsible for direct interaction with database for Assignment page
*/
Connection connection;
public AssignmentPageMod... |
/**
* Unit test for alliances.
*
* @author MKL.
*/
@RunWith(BlockJUnit4ClassRunner.class)
public class AllianceTest {
@Test
public void testFusionAlliances() {
List<Alliance> alliances = new ArrayList<>();
Alliance.fusion(alliances);
Assert.assertEquals(0, alliances.size());
... |
<gh_stars>0
/* eslint-disable prettier/prettier */
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { User } from './entities';
@Injectable()
export class UserService {
constructor(... |
Teaching and Learning of E-Commerce at the Hong Kong Polytechnic University: From a Business Education Prospective
This paper gives an overview of the work done at the Hong Kong Polytechnic University’s (PolyU’s) E-Commerce Laboratory on teaching and learning platforms for electronic commerce (EC), ranging from an... |
After allegedly getting into a brief exchange about the inherent misogyny in the term "friend zone," Tony Daniel appears to have deleted his Twitter account.
Source: Tumblr via Outhouse Editor GLX
Hi there! Stoneman, head of Outhouse S&P here. Earlier today, Action Comics artist Tony Daniel, according to some screens... |
Guest post by Ruth Bonnett
In late 2010, I wrote about how bad science can give rise to bad policy. My Christmas message to farmers in Australia and around the world:
I am an urban dweller who just happens to think that the ‘unsettled science’ and restriction of technology has brought about bad policy by way of the K... |
Towards cognitive BCI: Neural correlates of sustained attention in a continuous performance task
Development of brain-computer interfaces interacting with cognitive functions is a hot topic in neural engineering since it may lead to innovative and powerful diagnosis, rehabilitation, and training methods. This paper ad... |
def manage_schedulable(self, freerun_entry: FreerunProcessEntry, flow_request=None):
uow = None
if freerun_entry.related_unit_of_work:
uow = self.uow_dao.get_one(freerun_entry.related_unit_of_work)
try:
if uow is None:
self._process_state_embryo(freerun_en... |
<reponame>tiankafei/java<gh_stars>1-10
package org.tiankafei.ui.chart.line;
import java.awt.Color;
import java.util.List;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.xy.XYSplineRenderer;
import org.jfree.data.xy.XYSe... |
<reponame>noecl1/multihammer
package Model;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class Pro... |
// RegisterAlias registers a new alias.
// See also Alias.
//
// If an alias already exists, RegisterAlias calls panic().
func (p *Program[E, P, F, R]) RegisterAlias(alias Alias) {
if p.aliases == nil {
p.aliases = make(map[string]Alias)
}
name := alias.Name
if _, ok := p.aliases[name]; ok {
panic("RegisterAlia... |
Characterization of Subpopulations of Chicken Mononuclear Phagocytes That Express TIM4 and CSF1R
The phosphatidylserine receptor TIM4, encoded by TIMD4, mediates the phagocytic uptake of apoptotic cells. We applied anti-chicken TIM4 mAbs in combination with CSF1R reporter transgenes to dissect the function of TIM4 in ... |
//find largest binary search tree given binary tree using BFS traversal
class Solution {
public:
bool isBST(TreeNode* root, int &res, int &lower, int &upper){
if(!root)return true;
int left_size=0,right_size=0;
int left_lower,left_upper,right_lower,right_upper;
bool left=isBST(root->left,left_size,left_lower,l... |
<gh_stars>1-10
//React
import { useContext } from 'react';
//Externals
import SettingsContext from '../contexts/SettingsContext';
import type { SettingsContextValue } from '../contexts/SettingsContext';
const useSettings = (): SettingsContextValue => useContext(SettingsContext);
export default useSettings;
|
Comment on Alkanani et al. Alterations in Intestinal Microbiota Correlate With Susceptibility to Type 1 Diabetes. Diabetes 2015;64:3510–3520
The search for potential microorganisms associated with autoimmunity and their metabolic role is crucial to understand the origin and evolution of type 1 diabetes (T1D) and other... |
<filename>cmd/unregister.go<gh_stars>1-10
package cmd
import (
"strings"
"github.com/bwmarrin/discordgo"
)
// Unregister allows a queue user to remove themselves from the queue
func Unregister(cmdInfo CommandInfo) {
// cmdInfo.CmdOps[1:] starts after ;unregister
if len(cmdInfo.CmdOps) != 3 {
// Error - not eno... |
/**
* This function will copy memory content from source address to destination
* address.
*
* @param dst the address of destination memory
* @param src the address of source memory
* @param count the copied length
*
* @return the address of destination memory
*/
void *elog_memcpy(void *dst, const void *src, ... |
<filename>app/test/fixtures/chat/fakeChatId.ts
export const fakeChatId = '3ece1b67-8e42-442c-8d38-cc150ad328af';
|
<filename>modules/kafka_scanner.py<gh_stars>0
import json
from confluent_kafka import Consumer, KafkaError
from modules import settings, User
class KafkaScanner:
"""
Class representing a kafka scanner.
This polls for new messages on the kafka bus and
upon receiving them handles the user.
"""
a... |
def delete(self, t):
node = self.find(t)
deleted = self.root.delete()
self.reroot()
return deleted |
<reponame>laws-africa/constitution-app-react<gh_stars>0
import * as Constitution from '../assets/data/constitution.json';
import { TableOfContents } from './toc';
export const constitutionData: any = (Constitution as any).default;
// wrap the entire content in a div so the body has a single child
export const constitu... |
//
// CImapAccount::GetAutoExpungeSetting()
//
// Returns the auto expunge setting for this personality and, if the setting is for a percent,
// returns the percent in iPercent.
//
int CImapAccount::GetAutoExpungeSetting(int *piPercent)
{
CString key;
TCHAR szValue[32];
key = g_Personalities.GetIniKeyName(IDS_IN... |
import { Controller, UseGuards, Request, Post, Get, Req, Body } from '@nestjs/common';
import { ApiTags, ApiResponse, ApiParam } from '@nestjs/swagger';
import { AuthService } from './auth.service';
import { LocalAuthGuard } from './guards/local.guard';
import { AuthRegisterDto } from './dto/auth.register.dto';
import ... |
def ajax_message(request, payload, flavor='message'):
ajax_continue(request, AjaxMessage(payload, flavor, None)) |
Dynamic Photoelectrochemical Device with Open-Circuit Potential Insensitive to Thermodynamic Voltage Loss.
The open-circuit potential ( Voc) represents the maximum thermodynamic potential in a device, and achieving a high Voc is crucial for self-biased photoelectrochemical (PEC) devices that use only solar energy to p... |
def force_models_consistency(self):
for d in self._datasets:
for m in self._models:
if (
m.datasets_names is None or d.name in m.datasets_names
) and m not in d.models:
d.models.append(m) |
If you’ve been to my blog before, you’ve probably heard me mention the name Yoshinori Kanada. I’m not going to write another biography on the guy, but I will say he died in 2009 as a legend to the anime industry and its fans. His charismatic approach to his work as animator broke down many barriers and showed that anim... |
import math
def func():
n=int(input())
a=list(map(int,list(input())))
x=a[:n]
y=a[n:]
x.sort()
y.sort()
a=x+y
if sum(x)>sum(y):
i=0
j=n
elif sum(x)==sum(y):
return("NO")
else:
i = n
j = 0
while(i<2*n and j<2*n):
... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
import * as React from 'react'
export const MagnifyingGlassIcon = React.memo(() => (
<svg width="55" height="55" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M21.5 24.644L25.517 27l-1.066-4.44L28 19.573l-4.674-.392L21.5 15l-1.826 4.181-4.674.392 3.543 2.987-1.06 4.44 4.017-2.356z"
... |
FROM THE EDITOR ” AS A WAY FOR STRATEGIC COMMUNICATION : A STUDY OF THE IMAGE OF A JOURNAL
Journals provide an open area for transferring and creating knowledge which can be treated as social activities mediated by text. Where researchers submit their studies, however, it depends upon their perception of a journal’s i... |
/**
* Extension of lazy result slot that adds player access when possible
*/
public class PlayerSensitiveLazyResultSlot extends LazyResultSlot {
private final PlayerEntity player;
public PlayerSensitiveLazyResultSlot(PlayerEntity player, LazyResultInventory inventory, int xPosition, int yPosition) {
super(inv... |
<filename>V4 - HybridTTS/Sentence_Encoder/query_encoder.py
import tensorflow_text
import tensorflow_hub as hub
import tensorflow as tf
import sys
sys.path.append("../") # nopep8
import numpy as np
import math
import pickle
import os
from Classifier.model.dialogue_acts import Encoder
import Utils.functions as utils
fro... |
/**
* LogicalPredicate is a compound predicate in which
* predicates are combined by "AND" and "OR".
*/
public class LogicalPredicate extends Predicate implements Serializable {
private static final long serialVersionUID = 1L;
private Predicate left, right;
private Op op;
public LogicalPredicate(Pre... |
<reponame>shiqitao/AutoGraph<filename>model_compare.py<gh_stars>0
import pandas as pd
from sklearn.metrics import accuracy_score
from ModelAPPNP import main_model_appnp
from ModelAPPNP2 import main_model_appnp as main_model_appnp_2
from ModelAPPNP3 import main_model_appnp as main_model_appnp_3
from ModelAPPNP4 import ... |
// WithContentType is a configuration Option which sets the content-type of the file being saved
func WithContentType(contentType string) ConfigOption {
return func(c *Config) {
c.ContentType = contentType
}
} |
#
# Copyright 2009-2015 <NAME>
#
# 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,... |
//=======================================================================================
// Method: CreateChassis
// Description: Create a chassis from the inputs
// Returns: Void
//=======================================================================================
IChassis* ChassisFactory::Create... |
#!/usr/bin/env node
import * as fs from "fs-extra";
import { spawn } from "child_process";
import * as paths from "./paths";
// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = "production";
process.env.NODE_ENV = "production";
// Makes the script crash on unhandled... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.