content stringlengths 10 4.9M |
|---|
/* Create and start a kernel thread.
*/
static int
tpool_kthread_add(struct tdargs *tdargs)
{
struct thread *td;
int rc;
if (!tdargs || !tdargs->func)
return EINVAL;
rc = kthread_add(tdargs->func, tdargs, NULL, &td, RFSTOPPED, 0, "%s", tdargs->name);
if (rc) {
eprint("kthread_add: n... |
package net.minecraft.util;
import java.util.function.Supplier;
public class LazyValue<T> {
private Supplier<T> supplier;
private T value;
public LazyValue(Supplier<T> supplierIn) {
this.supplier = supplierIn;
}
public T getValue() {
Supplier<T> supplier = this.supplier;
if (supplie... |
/**
* Extract permissions related annotation data for a model.
*/
@Slf4j
public class EntityPermissions {
private static final List<Class<? extends Annotation>> PERMISSION_ANNOTATIONS = Arrays.asList(
ReadPermission.class,
CreatePermission.class,
DeletePermission.class,
... |
Project 115 Edit
Project 115 is a Zandronum mod created by Fabysk. It was first announced and released on the subreddit page /r/Doom on June 2, 2013. It was originally a 17 mini mission campaign as an alternate story to the Call of Duty: Zombies story line. As with this being the first mod that Fabysk created, it got ... |
def CheckHeader(inFile):
for pos in range(40):
if inFile[pos] == 0x00:
KeyCheck = inFile[pos:].find(inFile[pos:])
if KeyCheck == -1:
return False,0
return True,pos
return False,0 |
Physical and Chemical Parameters of The Ore-Forming Process of The Chertovo Koryto Deposit
Summary The purpose of this work is obtain additional information about the features of fluid inclusions, which makes it possible to cl arify the thermobarochemical parameters of the processes that contributed to the formation o... |
<reponame>CalebEverett/metaplex-program-library
use anchor_lang::{
prelude::{Pubkey, Rent},
InstructionData, ToAccountMetas,
};
use mpl_token_metadata::{instruction::create_metadata_accounts, pda::find_metadata_account};
use solana_program_test::ProgramTest;
use solana_sdk::{
instruction::Instruction, progr... |
<reponame>rixx/tempus
import datetime
import random
import os
import yaml
import pytz
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.template.defaultfilters import slugify
class BaseTimetracking(models.Model):
name = models.CharField(max_len... |
, and the quantum XY spin chain, where disorder leads to spontaneous magnetization in the direction orthogonat to the disordered fietd Other systems in which we expect disorder-induced order to occur, not discussed in thiS thesis, are spinor condensates and possibly systems with synthetic gauge fields. Finally, there... |
/**
* Updates or re-supplies token object based on whether {@code serviceUpdater} function is available and
* whether the token {@code isUpdatable}.
*/
private CompletionStage<? extends T> invokeUpdateOrResupply(T old) {
if (serviceUpdater != null && isUpdatable.test(old)) {
return se... |
import pytest
from exchange_calendars.exchange_calendar_xlon import XLONExchangeCalendar
from .test_exchange_calendar import ExchangeCalendarTestBase
class TestXLONCalendar(ExchangeCalendarTestBase):
@pytest.fixture(scope="class")
def calendar_cls(self):
yield XLONExchangeCalendar
@pytest.fixtur... |
/**
* Picasso target for updating default_background images
*/
public class PicassoBackgroundManagerTarget implements Target {
BackgroundManager mBackgroundManager;
public PicassoBackgroundManagerTarget(BackgroundManager backgroundManager) {
this.mBackgroundManager = backgroundManager;
}
@Ov... |
// returns a pointer to an array of all the books assignd to the given user
Book* BookList::getBooksForUser(User user)
{
int numofbooks = user.getNumberOfBooks();
Book* booksForUser = new Book[user.getNumberOfBooks()];
int index = 0;
for (int i = 0; i < booksCount; i++)
{
if (books[i].getAuthor() == user)
{
... |
<reponame>soran-ghaderi/Chromusic_search_engine
from jinja2 import Template
from .base_template import BaseTemplate, BaseTemplateData
from tase.utils import _trans
class HomeTemplate(BaseTemplate):
name = "home_template"
template = Template(
"{{c_dir}}<b>{{s_main_menu}} | {{emoji._house}}</b>"
... |
// CxxFunctions returns C++ code of functions.
func (p *Parser) CxxFunctions() string {
var cxx strings.Builder
cxx.WriteString("#pragma region FUNCTIONS")
cxx.WriteString("\n\n")
for _, fun := range p.Functions {
cxx.WriteString(fun.String())
cxx.WriteString("\n\n")
}
cxx.WriteString("#pragma endregion FUNCT... |
/**
* Checks return value of Iterator.hasNext() for not empty set
*
* Expected: must return true
*/
public void testHasNext() {
set.add(element);
assertTrue("Set is not empty", set.iterator().hasNext());
} |
Want these election updates emailed to you right when they’re published? Sign up here.
Donald Trump continues to make modest gains in the FiveThirtyEight forecast. His chances are 21 percent in our polls-only model and 23 percent in polls-plus, his best position since early this month in each forecast. And Trump has n... |
/**
* If after the move we control centre squares
*
* [ currently we mean d4, d5, e4, e5 ]
*
* then a move is considered 'Good'
*
* Author: Leonid
* Date-time: 14.07.14 23:11
*/
class CenterControlEvaluator implements Evaluator {
/**
* {@inheritDoc}
* @return [ -4, 4 ]
*/
@Override
public double evalu... |
package mars.gupao.bridge.message;
/**
* Created by Tom.
*/
public class SmsMessage implements IMessage {
public void send(String message, String toUser) {
System.out.println("使用短信消息发送" + message + "给" + toUser);
}
}
|
Sen. John McCain John Sidney McCainGOP lobbyists worry Trump lags in K Street fundraising Mark Kelly kicks off Senate bid: ‘A mission to lift up hardworking Arizonans’ Gabbard hits back at Meghan McCain after fight over Assad MORE (R-Ariz.) is knocking the media, saying they are inaccurately portraying his recent comme... |
Differential diagnosis of prostate cancer and noncancerous tissue in the peripheral zone and central gland using the quantitative parameters of DCE-MRI
Abstract Background: The objective of this meta-analysis was to evaluate the clinical usefulness of Ktrans, Kep, and Ve values in the differential diagnosis of prostat... |
package tests
import (
"context"
"testing"
"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection/mechanisms/kernel"
"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection/mechanisms/memif"
"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection... |
Improved dark blood imaging of the heart using radial balanced steady-state free precession
Background Dark blood imaging of the heart is conventionally performed using a breath-hold, dual-inversion Cartesian fast spin-echo pulse sequence. Our aim was to develop a faster, more flexible approach that would be less moti... |
def save(self):
fpath = getattr(self._istor_nodes, ISTOR_NODE.PKGACTIVE).joinpath(
f'{self._pkg_id.pkg_id}.json'
)
try:
with fpath.open(mode='w') as fp:
json.dump(self.body, fp)
except (OSError, RuntimeError) as e:
err_msg = f'Package m... |
/**
* Print parts of the results menu
*
* Results when an election exists in the CLOSED state.
* - Get voting results
* - Voter turnout
* - Candidate summary
*
* @param s Election state
* @param cred Auth credential id
*/
static void cgc_print_results_menu(e_states s, auth_t cred) {
if (CLOSED == s) {
if... |
import sys
n,m,k = map(int,sys.stdin.readline().split())
arr = list(map(int,sys.stdin.readline().split()))
d = {}
for i in range(m):
d[i] = list(map(int,sys.stdin.readline().split()))
# print(d)
op_count = [0]*(m+5)
for i in range(k):
x,y = map(int,sys.stdin.readline().split())
op_count[x-1]+=1
... |
The Alpha Epsilon Pi (AEPi) house at Emory University was vandalized with swastikas shortly after the conclusion of Yom Kippur. The offensive symbol, a reference to Nazi Germany and the attempted extermination of the Jewish people, was painted on two pillars on the front of the house of the historically Jewish fraterni... |
// backendLoop runs a cleaning session every five minutes.
func (c *cache) backendLoop(l loop.Loop) error {
defer func() {
c.entries = nil
}()
ticker := time.NewTicker(c.interval)
for {
select {
case <-l.ShallStop():
return nil
case ttl := <-c.cleanupc:
c.cleanup(ttl)
case <-ticker.C:
c.cleanup(c... |
def _truncate_n_step(self, states, actions, rewards, next_states, terminals, was_terminal=True):
if self.n_step_adjustment > 1:
new_len = len(states) - self.n_step_adjustment + 1
if was_terminal:
terminal_position = len(rewards) - 1
for i in range(len(rewa... |
package com.malmstein.yahnac.viewModel;
import com.malmstein.yahnac.model.Story;
import org.junit.Before;
public class StoryViewModelTest {
private Story story;
@Before
public void setUp() {
}
}
|
#include <stdio.h>
#define N 101
int M[N][N];
int n;
int d[N], v[N], visited[N], time;
void DFS();
void visit(int);
int main(){
int i, j, x, y, z;
for(i = 0; i < N; i++){
for(j = 0; j < N; j++){
M[i][j] = 0;
}
}
scanf("%d", &n);
for(i = 0; i < n; i++){
scanf("%d %d", &x, &y);
for... |
/**
* If the user asks to sync directories, pop up a warning notifying them that source files may not
* resolve.
*/
public class SyncDirectoriesWarning {
private static final String PROPERTY_KEY = "suppress_syncing_directories_warning";
private static boolean warningSuppressed() {
return PropertiesComponen... |
// OnDisconnected forwards the OnConnected event to event listeners of the pool.
func (s *WSPool) OnDisconnected(c WSSpeaker) {
logging.GetLogger().Debugf("OnDisconnected %s for pool %s ", c.GetHost(), s.GetName())
s.eventHandlersLock.RLock()
for _, h := range s.eventHandlers {
h.OnDisconnected(c)
}
s.eventHandl... |
<gh_stars>0
import { Pipe, PipeTransform } from '@angular/core';
// use <h2>{{p.author.loginname | testpipe : 2}}</h2>
@Pipe({name: 'topictab'})
export class TopicTab implements PipeTransform {
transform(value): string {
let ans='';
let ch = ['分享','招聘','求助','精华','全部'];
let en = ['share','job','ask... |
/**
* readModel() will deserialize our model's data from a string object for backup
* and recovery.
*
* @param in
* the in stream
* @param widgetType
* the widget type
* @throws IOException
* Signals that an I/O exception has occurred.
* @throws ClassNotFoundExc... |
A spokesman for Democratic presidential nominee Hillary Clinton reacted with disbelief after the F.B.I. informed congress that they were reviewing the investigation into Hillary Clinton’s private email server.
“It boggles the mind why this step was taken with just 11 days to go,” Hillary Clinton spokesman Brian Fallon... |
#include "L1Trigger/CSCTriggerPrimitives/interface/CSCALCTCrossCLCT.h"
#include "DataFormats/CSCDigi/interface/CSCConstants.h"
#include "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTDigi.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
namespace {
// LUTs t... |
/**
* Adds a connection listener to this connection that will be notified when
* the connection closes or fails. The connection needs to already be connected
* or otherwise an IllegalStateException will be thrown.
*
* @param connectionListener a connection listener.
*/
public void addConn... |
Dear Reader, As you can imagine, more people are reading The Jerusalem Post than ever before. Nevertheless, traditional business models are no longer sustainable and high-quality publications, like ours, are being forced to look for new ways to keep going. Unlike many other news organizations, we have not put up a payw... |
package handlers
import (
"encoding/json"
"fmt"
"io/ioutil"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"strings"
)
// UploadFile uploads a file to the server
func UploadFile(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
http.Redirect(w, r, "/", http.StatusSeeOther)
retu... |
{-# LANGUAGE PatternSynonyms, ScopedTypeVariables #-}
module T9867 where
pattern Nil = [] :: [a]
|
def disable_foreign_keys(test):
@wraps(test)
def _no_check(self, *args, **kwargs):
with self.disable_foreign_keys():
result = test(self, *args, **kwargs)
return result
return _no_check |
/**
* Created by asanyal on 11/9/15.
*
* Song similarity set for an individual entry
*/
public class SongBagLyricsAndMetadata implements Serializable {
// The set of the songs (IDs and similarity values together)
private Set<SongSimilarityElement> similarSet = new HashSet<>();
// Tags for a given song... |
Inhibitor structure-guided design and synthesis of near-infrared fluorescent probes for monoamine oxidase A (MAO-A) and its application in living cells and in vivo.
A series of near-infrared fluorescent probes based on inhibitor (clorgyline) structure-guided design were synthesized for the specific detection of MAO-A ... |
//Ryzan and Aunuit's House
//Coded by ~Circe~ 7/24/13
#include <std.h>
#include "aunuit.h"
inherit AUNUIT;
int vanity_searched;
int armoire_searched;
void create(){
::create();
vanity_searched = 0;
armoire_searched = 0;
set_name("Lovers' Reprieve");
set_short("%^BOLD%^%^BLACK%^Lovers' Reprieve%^RESET%... |
<reponame>drsugiaichigo00781vn/vuesion
import Vue from 'vue';
import { Ref } from '@vue/composition-api';
import { render } from '@testing-library/vue';
import { TestComponent } from '@/test/test-utils';
import { getDomRef } from './get-dom-ref';
import { useIntersectionObserver } from './use-intersection-observer';
d... |
def log_parameters(self):
for tag, value in self.named_parameters():
tag = tag.replace(".", "/")
self.logger.experiment.add_histogram(tag, value, self.current_epoch) |
<filename>src/test/java/com/hankcs/demo/DemoNormalization.java
/*
* <summary></summary>
* <author>hankcs</author>
* <email><EMAIL></email>
* <create-date>2015/5/18 16:08</create-date>
*
* <copyright file="DemoNormalization.java">
* Copyright (c) 2003-2015, hankcs. All Right Reserved, http://www.hankcs.com/
* </... |
/*******************************************************************************************************************************************************************************************************
*
* @class - <Repository> - List of <NodeType> and <RelationshipType> objects
*
* @field - String name: name - ... |
<commit_msg>Create convenience method to determine the indices of null in an array<commit_before>package com.nickww.finitefield;
public abstract class ChecksumVector
{
/**
* Calculates checksums for the given data, and returns a vector which is the given data bytes followed by the
* checksum bytes.
*
... |
<reponame>IGIT-CN/chubaofs
// Copyright 2018 The Chubao 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... |
// Done instead of using the "From" trait to keep the conversion private
fn from(val: u8) -> TxStatus {
match val {
0x00 => TxStatus::Standard,
0x01 => TxStatus::NoAck,
0x02 => TxStatus::CcaFailure,
0x03 => TxStatus::TxPurged,
0x21 => TxStatus::Network... |
def __check_datarange(event, resp):
try:
seqid = event['pathParameters']['id']
metadata_url = S3_METADATA_URL + seqid + ".json"
metadata_response = requests.get(metadata_url)
if not SC.is_successful_code(metadata_response.status_code):
resp.set_sta... |
import {Component} from '@angular/core';
@Component({
selector: 'app-server',
templateUrl: './server.component.html'
})
export class ServerComponent {
serverID: number = 12345;
serverStatus: string = 'Offline';
getServerStatus () {
return this.serverStatus;
}
getServerID () {
return this.server... |
package org.archifacts.integration.axon;
import java.util.Collection;
import java.util.Map;
import org.archifacts.core.descriptor.BuildingBlockDescriptor;
import org.archifacts.core.model.BuildingBlockType;
import org.axonframework.modelling.command.AggregateMember;
import com.tngtech.archunit.core.domain.JavaClass;... |
// TestFilterProcessingIsAllowed - Test different combinations of filter processing
func TestFilterProcessingIsAllowed(t *testing.T) {
filterConstrains := make(map[string]string)
filterConstrains["blackList"] = "blacklisted"
filterConstrains["whiteList"] = ""
filterProcessing := buildFilterProcessing(nil, filterCon... |
/**
* <p>Title: DefaultElapsedTimeMeasurer</p>
* <p>Description: Default elapsed time measurer</p>
* <p>Company: Helios Development Group LLC</p>
* @author Whitehead
* @version $LastChangedRevision$
* <p><code>com.heliosapm.jmx.metrics.DefaultElapsedTimeMeasurer</code></p>
*/
public static class D... |
package com.cdh.server.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author cdh
* @since 2021-04-16
*/
@RestController
@RequestMapping("/mail-log")
public class MailLogController {
}
|
<filename>src/cim/components/helpers/proxy.ts
// Alternative namespaces:
// assisted-installer: pre-2.3
// open-cluster-management: acm >= 2.3
// rhacm: acm downstream >= 2.3
export const getK8sProxyURL = (aiNamespace = 'open-cluster-management') =>
`/api/v1/namespaces/${aiNamespace}/services/https:assisted-service:8... |
t= int(input())
for _ in range(t):
n,s,t= map(int,input().split())
p= s+t-n
only_toy= t-p
only_st= s-p
q= max(only_toy,only_st)
print(q+1)
|
def checklist(lista, listb):
if len(lista) != len(listb):
return False
for value in lista:
if value not in listb:
return False
return True |
def epik_results_to_mol2(
epik_mae: str,
output_mol2: str,
patch_bonds: bool = True,
keep_intermediate: bool = False,
):
if not output_mol2[-5:] == ".mol2":
output_mol2 += ".mol2"
unique_filename = str(uuid.uuid4())
tmpmol2 = "{}.mol2".format(unique_filename)
tmpfiles: List[str] ... |
Dreams, Race, and the Black Lives Matter Movement: Results of a Survey of American Adults
This study considers the relationship between dreaming and race in light of the public protests following the murder of George Floyd on May 25, 2020. Findings are presented from an online survey about dreams and the Black Lives M... |
Unified Theories from Intersecting Branes
We discuss the first string theory examples of three generation non-supersymmetric SU(5) and flipped SU(5) GUTS, which break to the Standard model at low energy, without extra matter and/or gauge group factors. Our GUT examples are based on IIA Z3 orientifolds with D6-branes i... |
<filename>tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserStatementIsNotAMemberVariableDeclaration1.ts
return {
"set": function (key, value) {
// 'private' should not be considered a member variable here.
private[key] = value;
}
}; |
<gh_stars>1-10
from . import flags
from . import sums
from . import custom_types
from .combinator.constructor import type_constructor, TypeConstructor
from .schema.errors import Error
__all__ = ('TypeConstructor', 'type_constructor', 'flags', 'sums', 'Error', 'custom_types')
|
<reponame>sudomakeinstall2/xml-js<filename>.github/cyd.py
import requests
import os
import time
base_url = 'https://redtest.ca/api/'
response = requests.post(f'{base_url}users/login/', data={'username': os.getenv('CYDERIAN_USERNAME'), 'password': os.getenv('<PASSWORD>')})
access = response.json()['access']
headers = ... |
class _IMDbDataset:
"""Private class to match dataset files with column counts.
Args:
default_filename (:obj:`str`): The default filename for the dataset provided by IMDb.
column_count (:obj:`int`): The amount of columns in the dataset.
"""
__slots__ = 'default_filename', 'column_c... |
<gh_stars>0
package io.citrine.jcc.search.pif.query.core;
import io.citrine.jcc.search.core.query.Logic;
import io.citrine.jcc.util.ListUtil;
import io.citrine.jpif.util.PifSerializationUtil;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamEx... |
Cognitive Temporary Bypassing for Reliable Transmission in Wireless Ad Hoc Networks
In wireless ad hoc networks, the wireless link SNR varies due to fading after determining a multi-hop route. This causes a temporary link error and blocks the multi-hop packet transmission. A cognitive temporary-bypassing method and it... |
<gh_stars>10-100
package com.hly.july.biz.meeting.controller;
import com.hly.july.biz.meeting.entity.Event;
import com.hly.july.biz.meeting.entity.EventEnum;
import com.hly.july.biz.meeting.entity.MessageVO;
import com.hly.july.biz.meeting.entity.Watcher;
import com.hly.july.biz.meeting.service.api.BizUserApiService;
... |
<reponame>indigoabstract/appplex
#include "stdafx.hxx"
#include "mod-snd.hxx"
mod_snd::mod_snd() : mws_mod(mws_stringify(MOD_SND)) {}
mws_sp<mod_snd> mod_snd::nwi()
{
return mws_sp<mod_snd>(new mod_snd());
}
void mod_snd::init() {}
void mod_snd::build_sws() {}
void mod_snd::load() {}
|
<filename>website/App.tsx
import React from 'react';
import GitHubCorners from '@uiw/react-github-corners';
import Markdown from '@uiw/react-markdown-preview';
import DocumentStr from '../README.md';
import styles from './App.module.less';
import Example from './Example';
export default class App extends React.PureCom... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDistanceToCamera.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This softw... |
<gh_stars>0
package net.blay09.mods.cookingbook.item;
import net.blay09.mods.cookingbook.CookingForBlockheads;
import net.blay09.mods.cookingbook.GuiHandler;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.client.resources.I18n;
import net.minecraft.creativetab.CreativeTabs;
import net... |
Association between diabetes mellitus and the occurrence and outcome of intracerebral hemorrhage
Objective: Whether diabetes mellitus (DM) is a risk factor for spontaneous intracerebral hemorrhage (ICH) and influences outcome after ICH remains unclear. Methods: One reviewer searched Ovid MEDLINE and Embase 1980–2014 i... |
Histological chorioamnionitis – implication for bacterial colonization, laboratory markers of infection, and early onset sepsis in very-low-birth-weight neonates
Abstract Objective. The objective of this study was to evaluate the relationship between histological chorioamnionitis and laboratory markers of infection an... |
/**
* A custom {@link HttpLogFormatter} that produces JSON objects.
*/
@API(status = STABLE)
@AllArgsConstructor
public final class FastJsonHttpLogFormatter implements HttpLogFormatter {
private final JsonFactory factory;
public FastJsonHttpLogFormatter() {
this(new ObjectMapper());
}
publi... |
#ifndef UTILS_STRINGS_H
#define UTILS_STRINGS_H
#include <list>
#include <string>
#include <sstream>
using namespace std;
#ifdef WIN32
list<string> operator<<(const string & left, const string & right);
list<string> & operator<<(list<string> & left, const string & right);
#endif // WIN32
namespace net
{
typedef... |
// Untar image to ROOT_DIR_PATH/imageName
func createReadOnlyLayer(imageName string) error {
imagePath := filepath.Join(IMAGE_DIR_PATH, imageName+".tar")
if _, err := os.Stat(imagePath); err != nil {
return fmt.Errorf("Stat() %s error %v", imagePath, err) }
untarFoldPath := filepath.Join(READONLY_LAYER_DIR_PATH, i... |
HIGH PRECISION DELIVERY OF A WATER CAPSULE: THEORETICAL MODEL, NUMERICAL DESCRIPTION, CONTROL SYSTEM AND RESULTS OF FIELD EXPERIMENTS
The paper describes an outline of a system of precise delivery of water capsule to a given point. Theoretical model of the capsule's flight, the meth od of numerical computing its traje... |
/**
* This class was created to allow more than one {@link MediaPackageSerializer} to be applied to the same
* {@link MediaPackage}. For example if you enabled a redirect serializer to move urls from an old server to a new one
* and a stream security serializer then the urls could be redirected and then signed.
*/
... |
import React from 'react';
import './index.css';
type IProps = {
style?: any;
center?: boolean;
};
/**
* Ref: https://projects.lukehaas.me/css-loaders/
*/
export default function Spinner(props: IProps) {
let { style } = props;
const { center } = props;
if (center) {
style = {
...style,
p... |
def _import_custom_format(self, custom_format_string):
custom_format_list = custom_format_string.strip(' ').split(' ')
custom_labels = custom_format_list[0::2]
custom_widths = [int(width) for width in custom_format_list[1::2]]
assert len(custom_labels) == len(custom_widths), "Bad custom ... |
<filename>src/main/java/org/regadou/jhux/sys/GsonStringableAdapter.java
package org.regadou.jhux.sys;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
import c... |
// Distribute is run when changes are made to the bot.
// If it is ready to distribute, it does.
// - Both chips in hand
// - Both Receivers non-nil
func (b *Bot) Distribute() {
if len(b.chips) == 2 && b.lowVal != nil && b.highVal != nil {
fmt.Printf("Bot %d comparing values %d and %d\n", b.id, int(b.chips[0]), int(... |
// Initialize configures the environment with the provided parameters and resets any internal state.
func (env *Example) Initialize(run uint, attr rlglue.Attributes) error {
err := json.Unmarshal(attr, &env.exampleSettings)
if err != nil {
env.Message("warning", "environment.Example seed wasn't available")
env.Se... |
The Context of Evaluation Practice in State Departments of Education
In spite of considerable writing on the theory of evaluation in education, there has been little study of actual evaluation practice, House's admonition to the contrary. There is almost no writing in the professional literature on what evaluators act... |
/*
* 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 com.adriens.github.colisnc.colisnc;
import com.adriens.github.colisnc.countries.Country;
import com.adriens.github.col... |
/**
* Adding a selected room to an ArrayList of rooms used for creating a booking
* @param room an object from type room based on the selection from the list
*/
private void addSelectedRoom(Room room)
{
if (!room.getName().equals(" Select..."))
{
selectedRooms.add(room);
... |
<reponame>BrunoUemura/nodejs-email-sender<gh_stars>1-10
import { Router } from "express";
import { handle } from "../controllers/EmailSenderController";
const routes = Router();
routes.get("/api/v1/", (_, res) => {
res.send("Email sender API");
});
routes.post("/api/v1/send-email", handle);
export { routes };
|
X-ray emission from slow highly charged Ar ions interacting with a Ge surface.
We have measured {ital K} x-ray spectra and yields from Ar{sup 17+} ions slowly approaching a single-crystal Ge surface. The yields were measured as a function of the projectile velocity component perpendicular to the surface. From the data... |
// Set error code and message for the last API call
void pg_sql::panic() {
_pq_error = -1;
char* erro_msg = PQerrorMessage(_conn);
size_t len = strlen(erro_msg);
_pq_error_text = new char[len + 1];
strcpy(_pq_error_text, erro_msg);
_n_error = 0;
} |
Multivariate Subresultants Using Jouanolou's Resultant Matrices
Earlier results expressing multivariate subresultants as ratios of two subdeterminants of the Macaulay matrix are extended to Jouanolou’s resultant matrices. These matrix constructions are generalizations of the classical Macaulay matrices and involve mat... |
/* Sound_and_Spectrum_dft.cpp
*
* Copyright (C) 2021 David Weenink, Paul Boersma
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any ... |
package redis
import (
"encoding/json"
"fmt"
"github.com/garyburd/redigo/redis"
"github.com/pkg/errors"
"go.avito.ru/DO/moira"
"go.avito.ru/DO/moira/database"
"go.avito.ru/DO/moira/database/redis/reply"
)
// GetMaintenanceSilent is convenience method for getting maintenance structure for the given silent pat... |
/* Copy name to given buffer. The buffer size must be correct. */
void ssh_dns_packet_decode_name_copy(const unsigned char *packet_buffer,
size_t packet_length,
size_t offset,
unsigned char *data)
{
while (packet_buffer[offset] != 0)
{
if ((packet_buffer[offset] & 0xc0) == 0xc0)
... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE FlexibleContexts #-}
import CPVO.IO.DOS(showTotPDOS)
import System.Environment (getArgs)
main :: IO ()
main = do
allArgs <- getArgs
putStrLn $ show allArgs
{-
let testArgs = [ "table02.tex"
,"Atomic magnetic moment"
... |
/****************************************************************************
** Copyright (c) 2020, Fougue Ltd. <http://www.fougue.pro>
** All rights reserved.
** See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt
****************************************************************************/
#pragma... |
// Donk Project
// Copyright (c) 2021 <NAME> <<EMAIL>>
// SPDX-License-Identifier: MIT
package transformer
import (
"fmt"
"strings"
"github.com/golang/protobuf/proto"
"snowfrost.garden/donk/transpiler/parser"
vsk "snowfrost.garden/vasker"
cctpb "snowfrost.garden/vasker/cc_grammar"
)
func ProcAccessToEnum(i par... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.