content stringlengths 10 4.9M |
|---|
Hermitian formulation of multiple scattering induced topological phases in metamaterial crystals
In this article we develop an analog to the SSH model in tight-binding chains of resonators and an innovative Hermitian matrix formulation to describe the topological phases induced by multiple scattering at subwavelength ... |
// Creates Conditions and Roles in the database and returns their ent reference.
func (pm *sqlPolicyMgr) createConditionsRoles(roles []*redtape.Role, conditions redtape.Conditions,
ctx context.Context) ([]*ent.Roles, []*ent.Conditions, error) {
entRoles := []*ent.Roles{}
entConds := []*ent.Conditions{}
for _, role ... |
/**
* Register a GBean instance.
*
* @param gbeanInstance the GBean to register
* @throws GBeanAlreadyExistsException if there is already a GBean registered with the instance's name
*/
public synchronized void register(GBeanInstance gbeanInstance) throws GBeanAlreadyExistsException {
Ob... |
def sentence_to_vec(data):
for i in range(len(data)):
word_vectors = []
for j in range(len(data[i]["text"])):
if len(c_dictionary.doc2bow([data[i]["text"][j]])) > 0 and len(tfidfmodel[[c_dictionary.doc2bow([data[i]["text"][j]])[0]]][0]) > 1:
word_vectors.append(
... |
#include "ConsolePrinter.h"
#include <iostream>
int main() {
std::cout << "main() called" << std::endl;
auto allComponents = ConsolePrintersRegistry::constructAll();
for (auto& component : allComponents) {
component->print();
}
return 0;
}
|
/**
* Provides the means to set or reset the model to a default state.
*/
public void initDefault() {
setName("Sample Document");
setWidth(500);
setHeight(500);
} |
GOVERNMENTS often expel foreigners who enrage them. North Korea offers a worse fate: not being allowed to leave. On March 7th authorities in Pyongyang, the capital, said that 11 Malaysian citizens living in North Korea would be prevented from flying home until the two countries had resolved their differences over the m... |
def moment(self, x):
V1 = self.V1
M1 = self.M1
w1 = self.w1
w2 = self.w2
L = self.Length()
return M1 + V1*x + w1*x**2/2 + x**3*(-w1 + w2)/(6*L) |
<gh_stars>1-10
import React, { SVGProps } from 'react';
import generateIcon from '../../generateIcon';
const BrandsDribbbleSquare = (props: SVGProps<SVGSVGElement>) => {
return (
<svg viewBox="0 0 448 512" width="1em" height="1em" {...props}>
<path d="M90.2 228.2c8.9-42.4 37.4-77.7 75.7-95.7 3.6 4.9 28 38.... |
package wxm
// GetUnlimitedParam https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html
type GetUnlimitedParam struct {
Scene string `json:"scene"`
Page string `json:"page"`
Width int `json:"width,omitempty"`
AutoColor bool `json:"a... |
<gh_stars>1-10
/*
Licensed Materials - Property of IBM
License: BSD 3-Clause
5747-C31, 5747-C32
© Copyright IBM Corp. 2016, 2017 All Rights Reserved
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
#ifndef RDB2_UTILS_H
#define... |
def destroy(self):
c_destroy_session = self.get_libgmt_func(
"GMT_Destroy_Session", argtypes=[ctp.c_void_p], restype=ctp.c_int
)
status = c_destroy_session(self.session_pointer)
if status:
raise GMTCLibError(
f"Failed to destroy GMT API session:\n{... |
//tcaswell@uchicago.edu
//http://jfi.uchicago.edu/~tcaswell
//
//This program 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 3 of the License, or (at
//your option) any later version.
//
//This... |
def detect(self, image):
confidence = 0
if self.__detect_flag > 0:
self.__points, self.__detect_flag, confidence = \
self.__detector.ffp_detect(image)
else:
self.__points, self.__detect_flag, confidence = \
self.__detector.ffp_track(image, self.__points)
return confidence |
/*
* tuplestore_begin_xxx
*
* Initialize for a tuple store operation.
*/
static Tuplestorestate *
tuplestore_begin_common(int eflags, bool interXact, int maxKBytes)
{
Tuplestorestate *state;
state = (Tuplestorestate *) palloc0(sizeof(Tuplestorestate));
state->status = TSS_INMEM;
state->eflags = eflags;
state-... |
Pair-Testing Method to Complement User's Behavior Records
In an evacuation behavior analysis, record of behavior such as straying are dependent on participants' memory. Therefore, there is a loss of same of behavior records. In this research, we propose a pair-testing method that simultaneously performs subjective eva... |
import json
from dispatch.enums import DispatchEnum
from dispatch.incident.models import Incident
from dispatch.feedback.enums import FeedbackRating
class RatingFeedbackBlockId(DispatchEnum):
anonymous = "anonymous_field"
feedback = "feedback_field"
rating = "rating_field"
class RatingFeedbackCallbackI... |
/**
* Created by seckcoder on 14-11-26.
*/
|
VATICAN CITY (AP) -- The Vatican has registered one of its worst budget deficits in years, plunging back into the red with a €15 million ($19 million) deficit in 2011 after a brief respite of profit.
The Vatican on Thursday blamed the poor outcome on high personnel and communications costs and adverse market condition... |
<reponame>murasaki718/tutorials<filename>lessons/082/app/main.go
package main
import (
"flag"
"fmt"
"html"
"log"
"net/http"
"strconv"
)
func main() {
name := flag.String("name", "", "service name")
port := flag.Int("port", 0, "port number")
flag.Parse()
http.HandleFunc("/", func(w http.ResponseWriter, r *h... |
8 June 2012
State Department on Brett McGurk-Gina Chon Emails: http://cryptome.org/2012/06/state-mcgurk-chon.htm
7 June 2012
Gina Chon and Brett McGurk at Senate Foreign Relations Committee, June 6, 2012. C-Span
5 June 2012
Ambassadorial Nominee Brett McGurk and WSJ Gina Chon Emails
A sends:
I rec'd this and tho... |
def repo_create(request, repo_base):
username = request.user.get_username()
if username != repo_base:
message = (
'Error: Permission Denied. '
'%s cannot create new repositories in %s.'
% (username, repo_base))
return HttpResponseForbidden(message)
if requ... |
/// <reference types="Cypress" />
import {Login} from '../../page-objects/auth/auth-login.po';
import {ConfirmModal} from '../../page-objects/modal/confirm-modal.po';
import {UserOptionsMailToExpert} from '../../page-objects/user-options/user-options-mail-to-expert.po';
before(() => {
cy.fixture('users/zkMember.jso... |
/*
* Called by dumper via archiver from within a data dump routine
* We substitute this for _WriteData while emitting a BLOB
*/
static size_t _WriteBlobData(ArchiveHandle* AH, const void* data, size_t dLen)
{
if (dLen > 0) {
PQExpBuffer buf = createPQExpBuffer();
appendByteaLiteralAHX(buf, (const... |
<reponame>praveenkuttappan/azure-sdk-for-python<filename>sdk/storage/azure-storage-queue/tests/test_queue_encryption_async.py
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the p... |
Accelerating Select where and Select Join Queries on a GPU
This paper presents implementations of a few selected SQL operations using theCUDA programming framework on the GPU platform. Nowadays, the GPU’sparallel architectures give a high speed-up on certain problems. Therefore, thenumber of non-graphical problems tha... |
/**
* Adds the given parameter to the list of parameters, iff the value is not null or empty.
*
* @param name The name of the parameter to add.
* @param value The value of the parameter to add.
* @param params The list of parameters to add the parameter to.
*/
protected void addParamete... |
#include "../../../include/Core/ExtLibs.h"
#include "../../../include/Core/Component.h"
#include "../../../include/Core/AbstractFrame.h"
using namespace A2D;
Component::Component() :
m_forcedBounds(false),
m_parent(NULL),
m_pipeline(NULL),
m_id(rand()),
m_componentManager(NULL),
m_focused(false)... |
// NewHTTPPoolOpts initializes an HTTP pool of peers with the given options.
// Unlike NewHTTPPool, this function does not register the created pool as an HTTP handler.
// The returned *HTTPPool implements http.Handler and must be registered using http.Handle.
func NewHTTPPoolOpts(self string, o *HTTPPoolOptions) *HTTP... |
import sys
def subset(a):
for n in range(2**len(a)):
yield [a[i] for i in xrange(len(a)) if (n >> i) & 1 == 1]
weights = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
for line in sys.stdin:
w = int(line)
for s in subset(weights):
if sum(s) == w:
print ' '.join(map(str, s)) |
import { QuestionBase } from "./QuestionBase";
import { ChildEntity, Column } from "typeorm";
@ChildEntity()
export class TextQuestion extends QuestionBase {
@Column({ type: "integer", comment: "the max length of text", default: 255 })
maxLength: number;
} |
// Returns the oauth2.Token corresponding to this request.
func (a *Authenticator) GetToken(r *http.Request) (*oauth2.Token, error) {
session := a.getSession(r)
if session.Token == nil {
return nil, ErrNotAuthenticated
}
return session.Token, nil
} |
import pytest
def run_Lorenz(efficient, skip_residual_computation, num_procs=1):
from pySDC.implementations.problem_classes.Lorenz import LorenzAttractor
from pySDC.implementations.hooks.log_errors import LogGlobalErrorPostRun
from pySDC.implementations.hooks.log_solution import LogSolution
from pySDC... |
class FilterCollection:
"""
Collection of filters to test messages against.
"""
def __init__(self):
self._filters = []
def test_message(self, message, default=False):
"""
Test if the message matches any filter.
:param message: message to be tested against the filte... |
/*
* Try to initialise xendev. Depends on the frontend being ready
* for it (shared ring and evtchn info in xenstore, state being
* Initialised or Connected).
*
* Goes to Connected on success.
*/
static int xen_be_try_initialise(struct XenDevice *xendev)
{
int rc = 0;
if (xendev->fe_state != XenbusStateI... |
def calculateAngle(p1, p2, inDegrees=True):
xDiff = p2[0] - p1[0]
yDiff = p2[1] - p1[1]
angle = math.atan2(yDiff, xDiff)
if inDegrees:
angle = math.degrees(angle)
return angle |
<filename>src/components/BackTop/index.tsx<gh_stars>10-100
import React, { FC, useEffect, useState } from 'react';
import { getScrollPosition } from '@utils/tools';
import './index.scss';
export interface BackTopProps {
// visible height
minHeight?: number;
}
const BackTop: FC<BackTopProps> = ({ minHeight }) =>... |
/**
* Write a portion of an array of characters.
*
* @param ca The array from which to write
* @param off Starting offset
* @param len Number of characters to write
*/
public void write(char ca[], int off, int len) {
super.write(ca, off, len);
super.flush();
} |
<reponame>danu30/evm-lite-cli
import * as fs from 'fs';
import utils from 'evm-lite-utils';
import Inquirer from 'inquirer';
import Vorpal from 'vorpal';
import Session from '../core/Session';
import Command, { IArgs, IOptions } from '../core/Command';
interface Opts extends IOptions {
interactive?: boolean;
debu... |
<reponame>evanphx/relay<filename>pq/pq.go
package pq
import (
"fmt"
"reflect"
"sync"
"time"
"github.com/armon/relay/broker"
)
// The pq package provides a simple priority queue. All that is required is a
// a known number of available priorities. Queues labeled from 0..N will be
// automatically created, where ... |
Paulie Malignaggi explains his sparring session with Conor McGregor and adjusting to the styles of a MMA fighter. (1:40)
LAS VEGAS -- UFC star Conor McGregor shared a boxing ring with former two-weight world champion Paulie Malignaggi on Thursday. McGregor is preparing for an Aug. 26 bout with Floyd Mayweather.
McGre... |
<reponame>opensingular/singular-core<gh_stars>1-10
/*
* Copyright (C) 2016 Singular Studios (a.k.a Atom Tecnologia) - www.opensingular.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at... |
import {
window,
CancellationToken,
CustomTextEditorProvider,
Disposable,
ExtensionContext,
TextDocument,
WebviewPanel
} from 'vscode';
import { TableView } from './tableView';
import { ViewTypes } from './viewTypes';
/**
* Defines custom tabular data text editor provider.
*
* @see https://code.visualstudi... |
def representable(val: int, bits: int, signed: bool = True, shift: int = 0) -> bool:
if val % (1 << shift) != 0:
return False
val >>= shift
if signed:
return -2**(bits-1) <= val < 2**(bits-1)
else:
return 0 <= val < 2**bits |
<reponame>nashaofu/learn-java
import java.util.List;
public class RegExDemo {
public static void main(String[] args) {
String re = "\\d{3,4}-\\d{7,8}";
for (String s : List.of("010-12345678", "020-9999999", "0755-7654321")) {
if (!s.matches(re)) {
System.out.println("测试失败: " + s);
retur... |
Not to be confused with the 1962 comic series Sabrina the Teenage Witch
Teen Witch Home video cover, also used for a theatrical release poster Directed by Dorian Walker Produced by Moshe Diamant
Rafael Eisenman
Alana H. Lambros
Bob Manning
Eduard Sarlai Written by Robin Menken
Vernon Zimmerman Starring Robyn Live... |
/**
* Add a {@link CommandSender} to the repeating schedule.
* A {@link CommandSender} will not be added twice.
* @param commandSender
*/
public void subscribe(CommandSender commandSender)
throws NotYetConnectedException, IllegalArgumentException {
if (!isConnected()) {
throw... |
def UpdateInternetScsiName(self, iScsiHbaDevice, iScsiName):
return self.delegate("UpdateInternetScsiName")(iScsiHbaDevice, iScsiName) |
def planetary_positions(self):
temp_pos_list, temp_vel_list = [], []
for i, o in enumerate(self.planets_list):
temp_pos_x, temp_v_x = tools.verlet_algorithm(o.pos_x_real, o.v_x, self.planetary_interaction()[i][0])
temp_pos_y, temp_v_y = tools.verlet_algorithm(o.pos_y_real, o.v_y,... |
module Potato.Trader.Tests (
tests
) where
import Potato.Trader.Helpers
import Potato.Trader.Types
import Test.Hspec
-- bids are people trying to buy TT
testBids :: [(AmountRatio USDT TT, Amount TT)]
testBids =
[ (AmountRatio 100, Amount 100)
, (AmountRatio 90, Amount 200)
, (Am... |
Place of death in Parkinson’s disease: trends in the USA
Background Parkinson’s disease (PD) is a significant cause of mortality but little is known about the place of death for patients with PD in the USA, a key metric of end-of-life care. Methodology A trend analysis was conducted for years 2003–2017 using aggregate... |
<filename>infraestrutura-de-software/p4-sleeping-teaching-assistant/sta_jfcd.c<gh_stars>1-10
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <semaphore.h>
#include <unistd.h>
pthread_mutex_t mutex_chairs; /* Controls access to number of chairs taken.*/
int used_chairs = 0;
int c = 0; /* Ch... |
/**
* This is a patient object. Contains the patient details and its history.
* The history contains its possible events, prescriptions and measurements.
* @author MG
*
*/
public class Patient implements Comparable<Patient>,Cloneable{
//the mandatory column indexes
public static final short COLUMN_PAT... |
Application of low frequency SQUID NMR to the ultra-low temperature study of atomically layered 3He films adsorbed on graphite
Low frequency pulsed NMR is a powerful technique for the investigation of the nuclear susceptibility and spin-dynamics of strongly correlated systems down to ultra-low temperatures. We describ... |
__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = "sonhuytran@gmail.com"
__doc__ = ''
__version__ = '1.0'
from math import log, pow
def main() -> int:
k = int(input())
l = int(input())
if (l < k):
print('NO')
else:
temp = int(log(l, k))
temp_pow = in... |
/*
* terminal_read
* DESCRIPTION: Reads the data from one line which wil be indicated by an ending with ENTER or
* the buffer gets full.
* INPUTS: Pointer to the buffer and bytes to read
* OUTPUTS: none
* RETURN VALUE: the number of bytes read in the buffer.
* SIDE EFFECTS: fills the buf... |
// isTicketCommitP2SH returns whether or not the passed ticket output commitment
// script commits to a hash which represents a pay-to-script-hash output. When
// false, it commits to a hash which represents a pay-to-pubkey-hash output.
//
// NOTE: The caller MUST have already determined that the provided script is
//... |
DAVAO CITY – Incoming President Rodrigo Duterte on Monday said he would release all political prisoners once peace talks with the rebels start.
“This is part of confidence-building,” he told reporters in a press briefing here.
ADVERTISEMENT
“I will welcome them back to society,” he added.
The presumptive President-... |
def download_device_database(aUrl, aPath):
headers = { "User-Agent": "ZaberDeviceControlToolbox/1.2.0 (Python)" }
request = urllib.request.Request(aUrl, None, headers)
with tempfile.TemporaryFile() as tmpFile:
with urllib.request.urlopen(request) as response:
data = response.read()
... |
<reponame>republicprotocol/store<gh_stars>10-100
package leveldb
import (
"bytes"
"fmt"
"github.com/renproject/kv/db"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/syndtr/goleveldb/leveldb/util"
)
// levelDB is a leveldb implementation of the `db.Iterable`.
ty... |
/**
* That a move is possible,
* all of the moved coordinates of a block have to be in range of the board after the move
*
* @param forward
* @return
*/
boolean isMoveWithinRange(@Nonnull Direction dir) {
Collection<Coordinate> allCoordinates = getCoveredCoordinates().getUniqueCoordinates();
for... |
<reponame>lamhungypl/nest-api<filename>src/core/address/address.entity.ts<gh_stars>0
import { BaseModel } from '@modules/common/base.model';
import { format } from 'date-fns';
import {
BeforeInsert,
BeforeUpdate,
Column,
Entity,
PrimaryGeneratedColumn,
} from 'typeorm';
@Entity('address')
export class Addre... |
/**
* Check to see if the two locations have any overlapping component
* locations
*
* @param location1
* first location to test
* @param location2
* second location to test
* @return true if one or more sub-location of location1 overlaps one or
* more sub-location of loc... |
class Simulation:
"""
Sets up and runs a simulation of trading activity using the given strategy over the
loaded data, with the ability to tune or optimize arbitrary strategy
hyperparamaters.
"""
def __init__(
self,
strategy_class: Type[Strategy],
rates: Dict[str, pandas... |
/*
* linux/include/asm-i386/timex.h
*
* i386 architecture timex specifications
*/
#ifndef _ASMi386_TIMEX_H
#define _ASMi386_TIMEX_H
#include <linux/config.h>
#include <asm/processor.h>
#ifdef CONFIG_X86_ELAN
# define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */
#else
# define CLOCK_TICK_RATE ... |
// EditNote accept one argument to execute a
// fuzzy search for the note to be edited
// and open the EDITOR with the found result
func EditNote(context *cli.Context) {
notePath := viper.GetString("notePath")
noteTitle := context.String("title")
_, err := os.Stat(notePath)
if err != nil {
fmt.Println(err)
os.E... |
def extract(self, index):
if index < 0 or index >= len(self.annotation_data):
raise Exception("out of range")
manifest_data = self.annotation_data[index]
return self.extract_annotation_with_data(manifest_data) |
def forward(self, input):
return F.log(1 + self.beta * F.relu(x)) |
package binary
import (
"encoding/binary"
"errors"
"io"
)
type OPCUAType string
// OPC UA Message types
// Described in OPC Unified Architecture 1.04, Part 6, 7.1.2.2
const (
OPCUAHello OPCUAType = "HEL"
OPCUAAcknowledge OPCUAType = "ACK"
OPCUAError OPCUAType = "ERR"
OPCUAReverseHello OPCUAType... |
<reponame>evacs/astr-119-hw-2
#dealing with unexpected results
#great for writing complex programs
try:
print (a) #throw an exception
except:
print("a is not defined")
#a is not defined, instead of crashing program,
#we can ask it to tell us what the problem is
try:
print(a)
except NameError: #if ... |
/**
* @author Jan Gabler
* @author Malte Schwering
* @version 0.3
*/
@Stateless
public class UserGroupEntityFacade extends AbstractFacade<UserGroupEntity> implements de.th.wildau.webapp.buchladen.facades.UserGroupEntityFacadeRemote {
/**
* Der Entitäten-Manager.
*/
@PersistenceContext(unitName = ... |
import math
import os
import numpy as np
import pytorch_lightning as pl
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision.utils import save_image
from models.rdff_base_net import Encoder_MDCBlock1, Decoder_MDCBlock1
class make_dense(nn.Module):
def __init__(self, nChannels, gro... |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;
const int M=3e5+44;
struct Node
{
int cnt1,cnt2;
ll val;
} ;
Node dp[M];
int mono[4][M],num[4];
ll sum3[M];
int n,m;
bool cmp(int x,int y)
{
return ... |
package secrets
import (
"fmt"
"io"
"io/ioutil"
"os"
"github.com/mlab-lattice/lattice/pkg/api/client"
"github.com/mlab-lattice/lattice/pkg/api/v1"
"github.com/mlab-lattice/lattice/pkg/definition/tree"
"github.com/mlab-lattice/lattice/pkg/util/cli"
"github.com/mlab-lattice/lattice/pkg/util/cli/color"
"github... |
Watchung Celebrates Opening With $1 Burritos For All on December 6th
Watchung, NJ (RestaurantNews.com) Pancheros Mexican Grill (www.pancheros.com), the Iowa-based burrito connoisseurs, opened its first location today in Watchung, NJ. In honor of their opening, Pancheros will be hosting a special day for residents to e... |
package net.dgardiner.markdown.core.base;
public interface Type {
String getGroup();
String getKey();
String getId();
}
|
After confirming plans back in June to rebrand, the brewery located at 909 W. Fifth Avenue in Grandview (previously operating as Zauber Brewing, though no longer affiliated with the owner of that brand name) shared today that the operation will be relaunching under the name Endeavor Brewing Company.
“Our brewery is in... |
/**
* @brief Enqueue from the queue.
* @param element element is stored into the queue.
*/
void s_queue_enqueue(size_t element)
{
if (queue_tail_index == MAX_QUEUE_SIZE) {
return;
}
queue[queue_tail_index++] = element;
} |
<reponame>VladimirZubavlenko/kaf42.mephi.ru-rebuild-backend
import { Employee } from '@app/employee/entities/employee.entity';
export interface IEmployeeWithType {
main: Employee[];
list: Employee[];
}
|
import seal.*
class JavaSealedTest {
public void testNesting() {
new SubSealed.Nested();
Supplier<SubSealed.Nested> nestedSupplier = SubSealed.Nested::new;
SubSealed.INSTANCE.internalFunction();
Runnable noArgFunction = SubSealed.INSTANCE::internalFunction;
}
} |
/*
* Copyright 2019 Carnegie Technologies
*
* 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 l... |
/**
* The List View for an <code>RTextFileChooser</code>. This is similar to the
* List View found in Microsoft Windows file choosers.
*
* @author Robert Futrell
* @version 0.1
*/
class ListView extends JList<File> implements RTextFileChooserView {
private RTextFileChooser chooser; // The chooser that ... |
A contextual account of the psychosocial impacts of social identity in a sample of digital gamers.
Drawing on social identity theory (SIT), the current research explored the psychosocial impacts of digital gaming, through two studies. In Study 1, Football Manager players (N= 349) completed an online questionnaire meas... |
// Copyright 2021 The Matrix.org Foundation C.I.C.
//
// 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... |
/*
* si7051.c
*
* Created on: Jul 26, 2021
* Author: alema
*/
#include "si7051.h"
#define SI7051_I2C_ADDR 0x40
#define SI7051_TEMPERATUR_OFFSET 0xF3
HAL_StatusTypeDef si7051Temp(I2C_HandleTypeDef *hi2c1, float* siValue)
{
uint8_t readSensorADDR = SI7051_TEMPERATUR_OFFSET;
// Poll I2C dev... |
#pragma once
namespace fast_io
{
/*
https://www.youtube.com/watch?v=c1gO9aB9nbs&t=3166s
CppCon 2014: <NAME> "Lock-Free Programming (or, Juggling Razor Blades), Part I"
*/
template<std::movable acceptor_type,std::size_t size=900,typename server_type,typename Func>
inline void thread_pool_accept(server_type& server,Fun... |
/*
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Resea... |
#include<stdio.h>
char fast_char_var;
#define fast_unsigned_dtype unsigned long
fast_unsigned_dtype fast_unsigned_var;
fast_unsigned_dtype fast_unsigned()
{
fast_char_var=getchar();
while(fast_char_var<48||fast_char_var>57)
fast_char_var=getchar();
fast_unsigned_var=0;
while(fast_char_var>47&&fast_char_var<58)
{... |
<reponame>ludc/rlstructures
#
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
from rlstructures import logging
from rlstructures import DictTensor,TemporalDictTensor
import torch
class A... |
<reponame>demo-verse/sdk-js
/**
* Copyright 2018-2021 BOTLabs GmbH.
*
* This source code is licensed under the BSD 4-Clause "Original" license
* found in the LICENSE file in the root directory of this source tree.
*/
/**
* @packageDocumentation
* @module IQuote
*/
import type { ICType } from './CType'
import ... |
// DefaultReqResConfig is configuration for logging one entry when request is received and one when response is written.
func DefaultReqResConfig() Config {
return Config{
RequestFields: DefaultRequestFields,
ResponseFields: DefaultResponseFields,
}
} |
Eitan Jankelewitz is a technology lawyer at the law firm Sheridans. He provides commercial legal advice to all kinds of technology businesses, including some operating in the bitcoin economy.
In this article, Jankelewitz explains how UK regulation applies to bitcoin and other digital currencies. He also describes the ... |
// Author(s): <NAME> and <NAME>
// Copyright: see the accompanying file COPYING or copy at
// https://svn.win.tue.nl/trac/MCRL2/browser/trunk/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#includ... |
<gh_stars>10-100
export const LANGUAGE_DB_KEY = 'language-1.8'
|
Factors that Determine the Adoption of Scientific Indicators in Community-Based Monitoring of Mangrove Ecosystems in Tanzania
Abstract This article reveals factors that need to be considered by facilitating institutions and organisations prior to adoption of scientific indicators in community-based monitoring of mangr... |
<reponame>getong/quilkin<filename>build.rs<gh_stars>100-1000
/*
* Copyright 2020 Google LLC
*
* 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/LICEN... |
/**
* Row information to be displayed in the Editor.<br/>
* Row data to be displayed in the search results editing screen.<br/>
*/
public class JbmEditorMigrationRow implements MigrationEditorRow {
/**
* Font name of the first layer
*/
private static final Font CHARACTOR = PluginUtil.getJbmEditorFo... |
/**
* Remote proxy to a RecoveryStore
*/
public class RecoveryStoreProxy extends TxLogProxy implements RecoveryStore {
private RecoveryStoreBeanMBean rsProxy; // proxy for the recovery store
public RecoveryStoreProxy(RecoveryStoreBeanMBean rsProxy) {
super(rsProxy);
this.rsProxy = rsProxy;
}
... |
/**
* Parses the input string into commands. Boolean flags are set and executed in the main loop.
*
* @param input the input string to parse
*
* @return 0 if passed, -1 if failed
*
*/
int parseArgs(char* input){
char* arg;
arg = strtok(input, " \n");
if(arg==NULL){
printf("\nPlease enter a command\n");
return -1... |
/**
* Fast Number Theoretic Transform that uses a "two-pass"
* algorithm to calculate a very long transform on data that
* resides on a mass storage device. The storage medium should
* preferably be a solid state disk for good performance;
* on normal hard disks performance is usually inadequate.<p>
*
* T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.