content stringlengths 10 4.9M |
|---|
import type { CircuitData } from 'src/store';
export const data: CircuitData = {
simulation: {
end: '10m',
step: '10u',
},
oscilloscopes: [
['I_in'],
['V_R1'],
],
electronics: [
{
kind: 'Resistance',
id: 'R_1',
position: [1100, 160],
rotate: [[0, 1]... |
/**
* Manages the callbacks from Wi-Fi Aware HIDL (HAL).
*/
public class WifiAwareNativeCallback extends IWifiNanIfaceEventCallback.Stub {
private static final String TAG = "WifiAwareNativeCallback";
private static final boolean DBG = false;
private static final boolean VDBG = false;
private final Wi... |
A homeless man was found dead Wednesday morning in a driveway near the intersection of 25th and Shotwell streets. Police have not yet confirmed his cause of death.
The man was identified by the San Francisco Medical Examiner as 79-year-old Jose Campos, who neighbors say was homeless and could often be seen near the in... |
/**
* Tracks the files and other information related to a block on the disk
* Missing file is indicated by setting the corresponding member
* to null.
*/
final static class DiskScanInfo implements Comparable<DiskScanInfo> {
static final int INLINE_CHECKSUM_LAYOUT = 1;
static final int SEPARATE_... |
def _get_u_gate_and_initial_amplitude(
self, p: float, sign: int
) -> Tuple[float, cirq.Gate]:
u = sign * scipy.linalg.expm(1j * p * cirq.unitary(cirq.CX))
a = u[self.basis_a][self.basis_b]
new_a = a * sign * np.conj(a) / np.abs(a)
return new_a, cirq.MatrixGate(
n... |
/**
* library.hpp - Header file of decentralized
* network TGN. Here is published functions of
* library.
*
* @mrrva - 2019
*/
#ifndef TGN_LIBRARY
#define TGN_LIBRARY
/**
* Included header files.
*/
#include "encryption.hpp"
#include "database.hpp"
#include "packages.hpp"
#include "network.hpp"
#include "nodes.hpp"
#in... |
def check_day(schedule):
today = dt.datetime.today().weekday()
if schedule == 'weekday':
if today < 5:
return True
else:
return False
elif schedule == 'daily':
return True
else:
todayDate = dt.datetime.today()
for eachDay in schedule:
... |
<gh_stars>0
package main
import (
"fmt"
"regexp"
"github.com/concourse/concourse/atc"
)
var (
secretsResourceValidator = resourceValidator{
Name: "secrets",
ValidateFn: secretsCheckResource,
}
secretsTaskValidator = taskValidator{
Name: "secrets",
ValidateFn: secretsCheckTask,
}
contain... |
John Boehner, the retired speaker of the House, is monetizing his decades of political relationships and cashing out to serve some of the most powerful special interests in the world.
Boehner is joining Squire Patton Boggs, a lobbying firm that peddles its considerable influence on behalf of a number of foreign nation... |
def open(self, path, wait=True):
prefix = "http://%s:%d/" % (self.host, self.port)
url = prefix + path.lstrip('/')
ret = self.s.open(url)
if wait:
self.s.wait_for_page_load()
return ret |
<reponame>SimonK91/search-algorithms<filename>MazeBuilder.py
from typing import Tuple
import random
def build_walls(start: Tuple[int, int], width: int, height: int):
non_walls = set()
non_walls.add(start)
open_set = _get_neighbours(start, width, height)
while open_set:
index = random.randrange... |
def rotateRight(self):
if self.rotation == 0:
self.rotation = len(self.figures[self.type]) - 1
else:
self.rotation = (self.rotation - 1) % len(self.figures[self.type]) |
from urllib import request
import ssl
import json
import atexit
import time
import datetime
import pytz
# ProblemId : [str] 문제 번호
# ProblemName : [str] 문제 이름
# ProblemTier : [int] 문제 난이도 (SolvedAC)
# lastupdate : [float] 업데이트 로그 (ex 1618947707.736831 [minute])
def changeLevel(level):
ALPHA = [ '... |
import sys
import time
from pyspark import SparkConf, SparkContext
def main(file_name: str) -> None:
spark_conf = SparkConf().setMaster("local[2]")
spark_context = SparkContext(conf=spark_conf)
logger = spark_context._jvm.org.apache.log4j
logger.LogManager.getLogger("org").setLevel(logger.Level.WARN... |
/* Using buffer buf, run strptime. Compare results against expect,
the expected result. Report failures and verbose results to stdout.
Update the result counts. Return 1 if test failed, 0 if passed. */
static int
compare (const char *buf, long int expect, unsigned int *nresult)
{
struct tm tm;
char *p;
bo... |
/**
* Copyright 2014 <NAME>
* Copyright 2013 <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 ... |
//
// HZManager.h
// DynamicDelegate
//
// Created by ZenonHuang on 2019/1/18.
// Copyright © 2019年 ZenonHuang. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol HZManagerDelegate <NSObject>
- (void)HZManagerNowNum:(NSInteger)num;
@end
@interface HZManager : NSObject
@property (nonatomic,weak... |
Standing on a bookshelf in our living room among favorites like The Phantom Tollbooth, Harriet the Spy, To Build A Fire—and of course the complete works of Judy Blume—the book was like a crack in the sidewalk. Something to avoid. It rebuked me for not being interested, for not trying hard enough, for disappointing my g... |
/**
* @module botbuilder-dialogs-adaptive
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { ArrayProperty, StringProperty } from '../properties';
import { SendActivity, SendActivityConfiguration } from '../actions/sendActivity';
import {
ArrayExpr... |
/**
* Applies {@link #testTag} to the given audio file, and allows to specify at which location the
* content description and extended content description are to be added.<br>
* @param testFile The file to work with.
* @param hcd <code>true</code> if the content description should be placed into the... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.venky.swf.views.controls.page.layout;
import java.util.ArrayList;
import java.util.List;
import com.venky.swf.views.controls.Control;
import com.venky.swf.views.controls._IControl;
/**
*
* @author venky
... |
.
This review summarizes the possible options for the prevention of preeclampsia based on important factors of patomechanism. The effects of antioxidants have been described in numerous clinical researches based on the oxidative hypothesis. Another important factor is the change of nitric oxide activity. Nitric oxide ... |
<reponame>metrodao/quests<gh_stars>0
import { TokenAmount } from './token-amount';
export type Filter = {
search: string;
expire: { start?: Date; end?: Date };
tags: string[];
bounty: TokenAmount;
showFull: boolean;
foundedQuests: boolean;
playedQuests: boolean;
createdQuests: boolean;
};
|
Protests have erupted in the US city of Anaheim after a video circulating on social media captured the moment an off-duty police officer fired a shot after pulling a gun on a 13-year-old boy and other teenagers.
The footage, recorded on Wednesday, shows the officer in civilian clothes dragging the boy, who demands the... |
package restapi
import (
"net/http"
"fmt"
"log"
"time"
"sync"
"github.com/gorilla/mux"
)
type Route struct {
Name string
Method string
Pattern string
HandlerFunc http.HandlerFunc
}
type Routes []Route
var writeMutex sync.Mutex
func Middleware(inner http.Handl... |
def insert_rows(idx_datapoint, _idx_pairs):
rows = []
if isinstance(_idx_pairs, list) is False:
_idx_pairs = [_idx_pairs]
for idx_pair in _idx_pairs:
pair_exists = glue_exists(idx_datapoint, idx_pair)
if bool(pair_exists) is False:
row = Glue(idx_pair=idx_pair, idx_datapo... |
<gh_stars>0
from insomnia.numeric_models import ddpg |
/**
* Initialisation of the parameters.
* @param variables The set of constrained variables
*/
protected void init(SetOf<Integer> variables, HashMap<Integer, HashSet<Expression>> expressions, ArrayOfInt min, ArrayOfInt max){
super.setVariables(variables);
this.expressions = expressions;
... |
#include <bits/stdc++.h>
#define testCase int T; cin>>T; while(T--)
#define int long long
#define Endl endl
using namespace std;
/* x = ha ha , y = aha, z = haha aha aha
*/
const int N = 2e5+5, LMAX = 3e18+13, IMAX = 1e9+13, mod = 1e9 + 7; //998244353;
map<string, int> val;
map<string, string> d;
int countHAHA(... |
package eu.rtakacs.stream.parallel;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class ForEachOrderedExample {
public static void main(String[] args) {
List<Integer> source = new ArrayList<Integer>();
source.addAll(Arrays.asList(0, 1, 2, 3, ... |
/**
* Class for Users operations.
* @author shaplov
* @version $Id$
* @since 0.1
*/
public class UserConvert {
/**
* Processing List of Users Into HashMap
* where Key - User's id and Value - User.
* @param list Users
* @return HashMap key-id, value-User
*/
public HashMap<Integer, U... |
#include<iostream>
using namespace std;
int main(){
long long int a,b,c=b*2,d=0;
cin>>a>>b;
for(int i=0;i<a;i++){
int t;
cin>>t;
if(t>b){
while(t>0){
d++;
t=t-b;
}
}
else d++;
}
if(d%2==0)cout<<d/2;
else cout<<(d+1)/2;
} |
def _convert_model(self, opt: Opt) -> Opt:
args = self._get_conversion_args(opt)
ConversionScript.main(**args)
opt['init_model'] = args['output']
return opt |
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { Application } from '../../../../shared/models/application/application';
import { ApplicantService } from '../../../../core/services/appl... |
Research on the application of UEP using turbo codes to image transmission
We present a new type of hierarchical channel coding and transmission scheme for image transmission, which makes use of the iteration process of the powerful turbo codes and the (2,1,3) convolutional code. This new type of scheme exploits the c... |
// iterative method (shift one end or pinch/expand both ends)
static void findColorPaletteIterativeDXT1RGB(rgb565_t *in_out_bestC0, rgb565_t *in_out_bestC1, uint32_t *in_out_bestError, const rgb8_t in_BLOCK_RGB[4][4], const uint32_t in_MAX_RANGE,
const bool in_MORE_AGGRESSIV... |
<reponame>redo-qa/redo
import { UngeneratableError } from "../internal.js"
import { defineKeywords } from "./internal.js"
import { numberHandlers } from "./number.js"
import { stringHandlers } from "./string.js"
/**
* These types can be used to specify a type definition but
* will never be used to represent a valueT... |
China started re-opening roads and airports in Beijing and surrounding areas that have been shut by record high levels of smog. An estimated 430 million people were expected to travel during the holiday that ends today and with the air quality index "improving" from its highest possible level to below 200 (the line bet... |
Natural ecosystems provide the many essential services people depend on, such as clean drinking water, protection from floods and droughts, and habitat for fisheries. Wednesday’s blog post focused on the importance of ecosystem services in Africa, while a recent post from Landscape Initiative Co-organizer World Resourc... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
private static final int NA = -1;
private static final int TBD = -9;
private int[] weather;
private Cloth[] clothes;
public static void main(String[] args) {
... |
<reponame>dahlia-os/fuchsia-pine64-pinephone<gh_stars>10-100
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use anyhow::{Context, Error};
fn parse_images(buf: impl AsRef<str>) -> Vec<String> {
buf.... |
package common.events.game_board_events;
import common.dto_model.GameBoardDTO;
import common.events.ModelEvent;
public abstract class GameBoardEvent implements ModelEvent {
GameBoardDTO gameBoard;
GameBoardEvent(GameBoardDTO gameBoard){
this.gameBoard = gameBoard;
}
@Override
public G... |
#include<stdio.h>
int main()
{
int i=0,x,n,j=0,k=0,l=0,m=0;
scanf("%d",&n);
for(i=1;i*5<=n;i++);
for(j=1;j*4<=n-(i-1)*5;j++);
for(k=1;k*3<=n-(i-1)*5-(j-1)*4;k++);
for(l=1;l*2<=n-(i-1)*5-(j-1)*4-(k-1)*3;l++);
for(m=1;m*1<=n-(i-1)*5-(j-1)*4-(k-1)*3-(l-1)*2;m++);
p... |
#include"stdio.h"
#include"string.h"
int main()
{
int n;
while(~scanf("%d",&n))
{
char a[50][50]={
"+------------------------+",
"|#.#.#.#.#.#.#.#.#.#.#.|D|)",
"|#.#.#.#.#.#.#.#.#.#.#.|.|",
"|#.......................|",
"|#.#.#.#.#.#.#.#.#.#.#.|.|)",
"+------------------------+"};
for(int i = 1; n; i += 2)
... |
<filename>chapter_002/src/test/java/ru/job4j/singleton/TrackerStaticFinalLazyTest.java
package ru.job4j.singleton;
import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
public class TrackerStaticFinalLazyTest {
@Test
public void whenCreateItemThenReturnSameIt... |
Sustainable use of glyphosate in North American cropping systems.
Roundup Ready (glyphosate-resistant) cropping systems enable the use of glyphosate, a non-selective herbicide that offers growers several benefits, including superior weed control, flexibility in weed control timing and economic advantages. The rapid ad... |
/**
* <b>EXPERIMENTAL</b>
* This is the entry point for the Infinispan index-less query API. It provides the {@link QueryFactory} which is your
* starting point for building Ickle queries or DSL-based queries, continuous queries and event filters for unindexed
* caches.
*
* @author anistor@redhat.com
* @since 10... |
#include<stdio.h>
#include<stdlib.h>
int main()
{
int x1,x2,x3,m,s,i;
scanf("%d%d%d",&x1,&x2,&x3);
if((x1>=x2&&x1<=x3)||(x1<=x2&&x1>=x3))
m=x1;
if((x2>=x1&&x2<=x3)||(x2<=x1&&x2>=x3))
m=x2;
if((x3>=x2&&x3<=x1)||(x3>=x1&&x3<=x2))
m=x3;
s=abs(m-x1)+abs(m-x2)+abs(m-x3);
printf("%d",s);
return 0;
}
... |
<reponame>liquidity-network/nocust-hub
from rest_framework import serializers
from ledger.models import Transfer
class SwapMatchedAmountSerializer(serializers.Serializer):
matched_in = serializers.DecimalField(
read_only=True, min_value=0, max_digits=80, decimal_places=0)
matched_out = serializers.Dec... |
def read(self, input_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
super(SignatureVerifyResponsePayload, self).read(
input_stream,
kmip_version=kmip_version
)
local_stream = utils.BytearrayStream(input_stream.read(self.length))
if self.is_tag_next(enums.Tags.U... |
<reponame>rabidaudio/synthesizer<filename>midi/lib/MAX5134/src/MAX5134.h
#pragma once
#if ARDUINO
#include <Arduino.h>
#else
#include <inttypes.h>
#endif
#include <SPI.h>
#define MAX_CMD_NOP 0x00
#define MAX_CMD_LDAC 0x01
#define MAX_CMD_CLR 0x02
#define MAX_CMD_PWR 0x03
#define MAX_CMD_LIN 0x05
#define MAX_CMD_... |
<reponame>Mekanism/Mekanism
package mekanism.client.gui.element.scroll;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.ObjIntConsumer;
import java.util.function.... |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
int a[200005];
int mx=0,mn=INT_MAX;
for(int i=0;i<n;i++){
cin>>a[i];
if(a[i]>mx)mx=a[i];
if(a[i]<mn)mn=a[i];
}
int cnt1=0,cnt2=0;
for(int i=0;i<n;i++){
if(a[i]==mx){cnt1++;}
if(a[i]==mn){cnt2++;}
}
//cout<<c... |
import { Dockerfile } from "dockerfile-ast";
import { DockerFileLayers, DockerFilePackages } from "./types";
export { getDockerfileBaseImageName, getDockerfileLayers, getPackagesFromRunInstructions, instructionDigest, };
declare function getPackagesFromRunInstructions(dockerfile: Dockerfile): DockerFilePackages;
/**
*... |
// Static function.
// Calback for property setting pop-up, perform name or layer binding
// change on the currently selected terminal.
//
void
PtState::te_cb(TermEditInfo *tinfo, CDsterm *term)
{
if (tinfo) {
if (!term)
return;
CDcbin cbin(DSP()->CurCellName());
if (!cbin.elec()... |
def _cloudstack_validate_token(self, token_claim):
identity = None
user_list = self.cs_api.request(dict({'command':'listUsers'}))
if user_list:
for user in user_list['user']:
if user['state'] == 'enabled' and 'secretkey' in user and hashlib.sha224('%s%s' % (user['secr... |
/*
* Copyright (c) 2006, 2007, 2008, 2009, 2010 QLogic Corporation.
* All rights reserved.
* Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public Lice... |
// NewOptions returns an intialized Options.
func NewOptions() *Options {
opts := &Options{
Global: Global{
FastRender: true,
MaxRecursion: 2,
SoftShadowDetail: 0,
},
Resolution: Resolution{600, 600},
Camera: Camera{
Position: Vector{0, 5, 10},
LookAt: Vector{0, 0, 0},
UpDir: V... |
import React from 'react';
import { storiesOf } from '@storybook/react-native';
import {
GradientView,
ResponsiveScrollView,
ResponsiveView,
} from 'app/components/atoms';
import {
MainTemperature,
WeatherDate,
WeatherIcon,
WeatherLocation,
} from 'weather/components/atoms';
import * as appConstants from ... |
// GsPlayer3.cpp -*- C++ -*-
// $Id: GsPlayer3.cpp,v 1.12 1998/06/18 00:53:13 jason Exp $
// Copyright 1996-1997 Lyra LLC, All rights reserved.
//
// methods dealing with house ranks
#include <stdio.h>
#include <stdlib.h>
#include "GsPlayer.h"
#include "PThMutex.h"
#include "GsMain.h"
#include "LmPlayerDB.h"
#includ... |
#include "type_combo_box.h"
TypeComboBox::TypeComboBox(QWidget* parent) : QComboBox(parent) {
std::vector<const VillagerType*> types = VillagerType::vector();
for (unsigned int i = 0; i < types.size(); ++i) {
addItem(QString::fromStdString(types[i]->name()));
}
}
const VillagerType* TypeComboBox::... |
/**
* Stores a new or updates an application model if it differs from existing ones, possibly
* ignoring specific change types. The application model is retrieved from a workload model.
*
* @param aid
* The app-id of the application model.
* @param workloadModelLink
* The link to the... |
<filename>C/c4Key.h<gh_stars>0
//
// c4Key.h
// CBForest
//
// Created by <NAME> on 11/6/15.
// Copyright © 2015 Couchbase. All rights reserved.
//
#ifndef c4Key_h
#define c4Key_h
#include "c4Base.h"
#ifdef __cplusplus
extern "C" {
#endif
// Language code denoting "the default language"
#define kC4Langua... |
import Header from '../components/Header';
import Navbar from '../components/Navbar';
import Footer from '../components/Footer';
export default function Contact() {
return (
<>
<Header title="Contact" description="My contact information."/>
<Navbar active="contact"/>
<div className="container" style={{ max... |
/**
* The type File size filter.
*
* @author xiaoyu(Myth)
*/
public class FileSizeFilter implements WebFilter {
private static final int BYTES_PER_MB = 1024 * 1024;
@Value("${file.size:10}")
private int maxSize;
private final List<HttpMessageReader<?>> messageReaders;
public FileSizeFilter()... |
Employee Performance Appraisals: A New Technique
In the last decade, public managers have become increasingly interested in the use of formal methods of appraising employee performance. This interest is the result of "public and governmental emphases upon accountability, cost containment, and enhanced productivity in ... |
The Federal Emergency Management Agency (FEMA) is sounding an alarm over Puerto Rico’s $300 million contract with a small Montana company to restore power infrastructure, amid concerns over the firm's tiny staff and lack of competitive bidding.
FEMA will be responsible for paying for the work by Whitefish Energy Holdi... |
/**
*
* Factory for instantiating entities derived from {@link AbstractEntity} with APO/IoC support.
*
* This factory is thread-safe -- the only state it has is final {@link Injector}, which is thread-safe because it uses new anonymous instances of {@link Provider} interface in its
* {@link Injector#getInstance(Cl... |
Stability of triangular points in the relativistic R3BP when the bigger primary is an oblate spheroid
Abstract In this paper, we study the effect of oblateness of the more massive primary in the relativistic R3BP. We observe that the locations of the triangular points and their stability are affected by the relativist... |
package genesyscloud
import (
"errors"
"fmt"
"log"
"os"
"strconv"
"strings"
"testing"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/mypurecloud/platform-client-sdk-go/v48/platformclientv2"
)
var ... |
/**
* SNS credentials (API key and API secret).
*
* @author Takahiko Kawasaki
*
* @since 1.3
*/
public class SnsCredentials implements Serializable
{
private static final long serialVersionUID = 1L;
private Sns sns;
private String apiKey;
private String apiSecret;
/**
* Get the SNS.
... |
Some key factors in speaker recognition using neural networks approach
Some key factors influencing the performance of a speaker recognition system using a neural network approach are addressed. The selection of the input pattern affects the complexity and performance of the neural network. In the experiment, seven ki... |
<reponame>VladasZ/test_engine
use gl_image::Image;
use crate::{View, ViewBase};
#[derive(Default)]
pub struct ImageView {
pub image: Image,
base: ViewBase,
}
impl View for ImageView {
fn image(&self) -> Option<Image> {
self.image.clone().into()
}
fn view(&self) -> &ViewBase {
... |
Glutathione Protects Lactococcus lactis against Oxidative Stress
ABSTRACT Glutathione was found in several dairy Lactococcus lactis strains grown in M17 medium. None of these strains was able to synthesize glutathione. In chemically defined medium, L. lactis subsp. cremoris strain SK11 was able to accumulate up to ∼60... |
// Multiplies a fixpoint number with an integer, result is a 32 bit (!) integer in
// contrast to using the standard member-functions which can provide only (32-FIXPOINT_PREC)
// valid bits.
static inline int intmult(int x, int y)
{
register unsigned int i,j;
register bool sign;
sign = (x ^ y) < 0;
if (x < 0) ... |
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { MessageService } from 'primeng/api';
import { Auth } from 'src/app/interfaces/auth';
import { Item } from 'src/app/interfaces/item';
import { environment } from 'src/environm... |
/* Update state information from system events. This function must be *\
* called from the main event handler to keep this module updated about *
\* the current system state. */
void cgiWifiEventCb(system_event_t *event)
{
ESP_LOGD(TAG, "[%s] Received %s.",
... |
They say there have been eight worlds before ours. Eight times the people of this Earth, over vast millennia, built their civilizations, reaching heights we cannot even fully imagine now. They spoke to the stars, reshaped the creatures of the world, and mastered form and essence. They built cities and machines that hav... |
package queue
import (
"fmt"
"strings"
"unicode/utf8"
)
const (
Arrow = "→"
BoxVer = "│"
BoxHor = "─"
BoxDownLeft = "┐"
BoxDownRight = "┌"
BoxUpLeft = "┘"
BoxUpRight = "└"
BoxVerLeft = "┤"
BoxVerRight = "├"
)
// Queue represents a queue of elements.
type Queue interface {
// ... |
//This function pushes an EVTX message to the head of an EVTX queue.
void evtx_mq_push(evtx_mq_t *p_q, void *p_msg)
{
hal_int_state_t int_state;
HAL_CRITICAL_ENTER(int_state);
EVTX_MSG_NEXT(p_msg) = *p_q;
*p_q = p_msg;
HAL_CRITICAL_EXIT(int_state);
} |
Houston may get its first protected on-street bike route as early as October, as city officials prepare to convert a lane of Lamar Street downtown into a two-way cycling path connecting the popular Buffalo Bayou trails west of downtown to Discovery Green and points east.
The nearly three-quarter-mile connector, from t... |
import React from 'react';
import Classnames from 'classnames';
import styles from './_styles.module.css';
import ChevronIcon from '../icon/solid/chevron';
import _ from 'lodash';
import { useInterval } from '../../hooks';
type Dot = {
sharp?: 'circle' | 'bar',
playtimeEffect?: boolean,
placement?: 't' | 'b',
... |
/**
* @return true if configuration should be created lazy, that means a proxy must be created.
*/
public boolean isLazy()
{
return !getExtensionPointId().equals("hivemind.ServiceModels") &&
getConfigurationType().isInterface() &&
getConfigurationPointDefinition().isLazy();
... |
import { filter } from 'fuzzaldrin';
import { generateNamespacedComponentsHashMap } from '../../../src/builtin-addons/core/template-completion-provider';
describe('filter util', function () {
it('able to return some results if search term is empty', function () {
expect(
filter([{ label: '1' }, { label: '2... |
<reponame>projeto-de-algoritmos/lista4ArielEliseu<filename>vocational_test/cloud/body/datapoint/point.go
package point
import (
"../body/data"
"../body/knowledge"
)
type datapoint struct {
points data.data
idealmasscenter knowledge.knowledge
realmasscenter knowledge.knowledge
distclassic knowledge.knowledge
... |
/** Finds a salt value such that scrypt(nameHash|destination, salt) ends with 10 zero bits */
public static Fingerprint generate(Contact contact) throws GeneralSecurityException {
EmailDestination destination = contact.getDestination();
Hash nameHash = EmailIdentity.calculateHash(contact.getName());
... |
# node.py
# Defines the Node class, a data structure that represents a node
import socket
from models.chain import Chain
import logging
from uuid import uuid4
from networking.socks import ClientSock
import threading
import time
class Node:
"""
Defines node objects.
"""
def __init__(self, config):
... |
<reponame>jacobpatterson1549/nate-mlb
package db
import (
"database/sql"
"fmt"
"time"
)
type (
// Stat is a wrapper for EtlJSON
// It is for a particular year and SportType. It has an etl timestamp.
Stat struct {
SportType SportType
Year int
EtlTimestamp *time.Time
EtlJSON *[]byte
}
)
... |
/**
* Perform levelOrderTraversal and print the data
*
* @param root
*/
private static void levelOrderTraversal(New_Node root) {
if (root == null) {
System.out.println("Empty Tree");
return;
}
int height = findHeight(root);
for (int i = 1; i <= height; i++)
printLevelData(root, i);
} |
Equivalent Single-Layer and Layerwise Shell Theories and Rigid-Body Motions—Part I: Foundations
Abstract The exact representation of rigid-body motions in the displacement patterns of the first-order equivalent single-layer (ESL) and layerwise (LW) shell elements is considered. This consideration requires the developm... |
/**
* {@link DataSaverProcessor} enables definition of classes which objects need to be saved to the
* storage.
*
* @author Ivan Senic
*
*/
public class DataSaverProcessor extends AbstractDataProcessor {
/**
* Generated UID.
*/
private static final long serialVersionUID = -5795459378970312428L;
/**
* L... |
Palmer Luckey’s new defense startup Anduril has aspirations well beyond a high-tech border wall. According to new information on the company’s website and its hires, Anduril intends to apply its virtual reality pedigree to “real-time battlefield awareness for soldiers,” among other defense-centric specialties.
As Cali... |
<reponame>aalmiray/relax-authentic<filename>relax-auth-core/src/main/java/com/infilos/auth/profile/context/ThreadLocalProfileContext.java
package com.infilos.auth.profile.context;
import com.infilos.auth.profile.ProfileContext;
import com.infilos.auth.core.TokenProfile;
import org.springframework.util.Assert;
public ... |
package storage
import (
"encoding/json"
"io/ioutil"
"math"
"os"
"github.com/jedib0t/go-pretty/table"
"gonum.org/v1/gonum/stat/distuv"
)
type SPECStorage map[string]SPECProject
type SPECProject map[string]*SPECTask
type SPECTask struct {
Name string `json:"name"`
Estimation float64 `json:"estimation... |
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <string>
#include <iomanip>
#include <iostream>
#include <algorithm>
using namespace std;
//702C
//dichotomy
int main()
{
int n,m;
scanf("%d%d",&n,&m);
int i;
int* vi = (int*)malloc(n*sizeof(int));
int* li = (int*)mall... |
/**
* JAX-RS API endpoints with {@code /api/fights} as the base URI for all endpoints
*/
@Path("/api/fights")
@Produces(APPLICATION_JSON)
@Tag(name = "fights")
public class FightResource {
private final FightService service;
public FightResource(FightService service) {
this.service = service;
}
@GET
@Operati... |
<gh_stars>0
export default class Emp {
constructor(public name: string = '・') {}
update() {
return new Emp();
}
}
|
<filename>src/vkwrapper/clear_values.rs
use ash::vk;
enum ClearType {
Colour(f32, f32, f32, f32),
Depth(f32, u32),
}
impl ClearType {
pub fn into(&self) -> vk::ClearValue {
match self {
ClearType::Colour(r, g, b, a) => vk::ClearValue {
color: vk::ClearColorValue {
float32: [*r, *g, *... |
DEFENCE is investigating claims up to 50 US prisoners died in underground bunkers in secret chemical warfare tests on a coral atoll on the Great Barrier Reef off north Queensland.
The latest probe comes after the discovery of a tunnel under Castle Hill in Townsville this week unearthed an Aladdin's cave of other milit... |
#include "bits/stdc++.h"
#define ll long long int
using namespace std;
ll atmost(vector<ll>& arr,ll n,ll sum){
ll count=0;
for(ll i=0;i<n;i++){
if(sum-arr[i] < arr[i]) continue;
auto itr=upper_bound(arr.begin()+i,arr.end(),sum-arr[i]);
if(itr == arr.end()) itr--;
if(*itr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.