content stringlengths 10 4.9M |
|---|
<gh_stars>0
// Copyright 2022 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or a... |
import React, { FC, useState, useEffect } from 'react';
import './App.css';
import {getAxiosCall} from './utils/apiCalls';
import * as cheerio from 'cheerio';
import CountyCard from './components/countyCard';
import RegionCard from './components/regionCard';
import {REGIONS} from './constants/regions';
import Airtable ... |
<gh_stars>1-10
-- | This module exports the types used to create submits.
module Data.Factual.Write.Submit
(
-- * Submit type
Submit(..)
-- * Required modules
, module Data.Factual.Shared.Table
) where
import Data.Factual.Write
import Data.Factual.Shared.Table
import Data.Maybe (fromJust)
import qual... |
/* Return true iff ARR contains CORE, in either of the two elements. */
static bool
contains_core_p (unsigned *arr, unsigned core)
{
if (arr[0] != INVALID_CORE)
{
if (arr[0] == core)
return true;
if (arr[1] != INVALID_CORE)
return arr[1] == core;
}
return false;
} |
/* eslint-disable max-len,quotes,quote-props */
const intlStrings = {
'inputSchema.validation.generic':
'Field {rootName}.{fieldKey} {message}',
'inputSchema.validation.required':
'Field {rootName}.{fieldKey} is required',
'inputSchema.validation.proxyRequired':
'Field {rootName}.{fi... |
/**
* See description on SeleniumDslMatchers
* @author Lucas Cavalcanti
*/
public class DivExistsMatcher<T extends ContentTag> extends TypeSafeMatcher<T> {
@Override
public boolean matchesSafely(ContentTag item) {
return item.exists();
}
public void describeTo(Description description) {
description.appendTe... |
export * from "./api.js";
export * from "./point.js";
export * from "./circle-circle.js";
export * from "./line-line.js";
export * from "./line-poly.js";
export * from "./plane-plane.js";
export * from "./ray-circle.js";
export * from "./ray-line.js";
export * from "./ray-plane.js";
export * from "./ray-poly.js";
expo... |
N,X,M=map(int, input().split())
m=[0]*M
t={}
def f(x,y):
return x*x % y
a = X
s=0
for i in range(N):
if a in t:
x = t[a]
nn = N - x
q,r = divmod(nn,i-x)
s = m[x-1] + (m[i-1] - m[x-1])*q + m[x-1+r] - m[x-1]
break
t[a]=i
s += a
m[i] = s
a = f(a,M)
print(s) |
/**
* A helper class for running given SQL script.
*/
public class SqlScriptRunner {
private final Connection connection;
private final Dialect dialect;
private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
/**
* Constructs this runner.
*
* @param connection the... |
// determineHttpMethod determines which method (GET, POST or PUT) is going to be used for the
// HTTP request
func determineHttpMethod(action string) (method string) {
switch action {
case
"songinfo",
"queueinfo",
"playlists":
method = "GET"
case "next",
"previous",
"pause",
"resume",
"add":
method... |
<reponame>secure-foundations/verus
use crate::attributes::get_verifier_attrs;
use crate::context::BodyCtxt;
use crate::util::{err_span_str, unsupported_err_span};
use crate::{unsupported, unsupported_err, unsupported_err_unless};
use rustc_ast::{IntTy, Mutability, UintTy};
use rustc_hir::def::{DefKind, Res};
use rustc_... |
/**
* Created by sunny on 6/9/16.
*/
public class Weather implements Serializable {
private String temperature;
private String humidity;
private String pressure;
private ArrayList<String> descriptions;
private ArrayList<String> icons;
public void setTemperature(String t) {
temperatur... |
def nexus_users_list_items_by_username(self, page, limit):
if (self.genesis_id == None): return(self.__error("Not logged in"))
parms = "?username={}&page={}&limit={}".format(self.username, page,
limit)
url = users_url.format(sdk_url, "list/items") + parms
json_data = self.__g... |
class StubBWProject:
"""Stub equivalent of BWProject, which can return enough canned responses to create an instance of BWQueries
Also contains a canned response to allow BWQueries' get() method to be called and get info about a specific query"""
def __init__(
self, project="MyProject", username="u... |
def f(n):
l = [map(int, raw_input().split()) for _ in xrange(n)]
s = [0] * 100005
for i, j in l:
s[i] += 1
for i in xrange(n):
home = n - 1 + s[l[i][1]]
away = 2*(n - 1) - home
print home, away
n = int(raw_input())
f(n) |
//returns 1 if the given bounds overlap another room/hallway space
int is_overlapping(int x_start, int y_start, int x_end, int y_end) {
if (x_start < 0 || y_start < 0 || x_end >= MAP_SIZE || y_end >= MAP_SIZE) {
return 1;
}
for (int x = x_start; x <= x_end; x++) {
for (int y = y_start; y <= y_end; y++) {
if (... |
#include<bits/stdc++.h>
using namespace std;
const int N = 3e5 + 9, LG = 19;
template <class T>
struct BIT { //1-indexed
int n; vector<T> t;
BIT() {}
BIT(int _n) {
n = _n; t.assign(n + 1, 0);
}
T query(int i) {
T ans = 0;
for (; i >= 1; i -= (i & -i)) ans += t[i];
return ans;
}
void upd(... |
A Tailored SMS Text Message–Based Intervention to Facilitate Patient Access to Referred Community-Based Social Needs Resources: Protocol for a Pilot Feasibility and Acceptability Study
Background Health care providers are increasingly screening patients for unmet social needs (eg, food, housing, transportation, and so... |
<reponame>martinusso/money<gh_stars>0
package money
import (
"testing"
)
func TestAbsolute(t *testing.T) {
values := map[float64]float64{
1.99: 1.99,
42.987: 42.99,
-12345.9: 12345.90,
-1234567890.934: 1234567890.93,
-1: 1.00,
}
for k, v := range values {
got :=... |
package com.spryrocks.android.modules.ui.routing.endpoints;
import com.spryrocks.android.modules.ui.routing.context.IDialogTarget;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
class DialogFragmentEndpointBase<TDialogFragment extends DialogFragm... |
use error::Err;
use std::f64::NAN;
/// Relative Strenght Index
pub fn rsi(data: &[f64], period: usize) -> Result<Vec<f64>, Err> {
if period > data.len() {
return Err(Err::NotEnoughtData);
}
let mut changes = Vec::new();
for i in 0..data.len() - 1 {
let change = data[i + 1] - data[i];
... |
/*************************************************************************
* Runs a dialog for an exception.
*
* @param message The error message text.
* @param what A string to be appended to the message text.
* @param ex The exception to be described by the dialog.
* @param fatal Whether execution sh... |
#ifndef CONSTANT_H
#define CONSTANT_H
#define WINDOWLEN 1280
#define WINDOWHEIGHT 720
#define WINDOWTITLE "QLink"
#define SCOREMSG "Your Score: "
#define TIMEMSG "Your Time: "
#define PLAYER1MSG "Player One"
#define PLAYER2MSG "Player Two"
#define INFOMSG "INFO AREA"
#define INITINFOMSG "Enjoy your game!"
#define ELI... |
import {EditorState} from "@codemirror/next/state"
import {CompletionContext, CompletionResult, CompletionSource} from "@codemirror/next/autocomplete"
import {html} from "@codemirror/next/lang-html"
import ist from "ist"
function get(doc: string, conf: {explicit?: boolean} = {}) {
let cur = doc.indexOf("|")
doc = ... |
package schema
import "github.com/vaniila/hyper/gql"
type schema struct {
query, mut, sub gql.Object
conf gql.SchemaConfig
}
func (v *schema) Query(o gql.Object) gql.Schema {
v.query = o
return v
}
func (v *schema) Mutation(o gql.Object) gql.Schema {
v.mut = o
return v
}
func (v *schema) Subscript... |
The Delay of the Parousia and the Changed Function of Eschatological Language
Abstract Although the New Testament texts show an awareness of the problems involved with the delay of the parousia, they still defend the legitimacy of the belief in its imminence. A similar pattern can also be found in other early Christia... |
/**
* Created by eugene on 16/5/28.
*/
public class Main2 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// String s = sc.next();
// String m = sc.next();
// numbers(String.valueOf(36452411l), BigInteger.valueOf(10l));
numbers(String.valueOf(42... |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Functor.Cx
-- Copyright : (C) 2017 <NAME>
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : <NAME> <<EMAIL>>
-- Stability : experimental
-- Portability : portable
--
-------------------... |
/**
* Create the diff annotation vectors.
*/
private void createDiffVectors()
{
int i;
long sum = 0;
/* Fill diff matrix */
this.diffOnTerms = new int[this.allItemList.size()][];
this.diffOffTerms = new int[this.allItemList.size()][];
this.diffOnTerms[0] = t... |
use std::sync::Arc;
use twilight_http::Client as HttpClient;
use twilight_model::gateway::payload::incoming::MessageCreate;
/// The Ping command of our Rust Discord bot.
///
/// Use:
/// ```rs
/// use commands::ping;
///
/// fn main() {
/// ping::ping().await;
/// }
/// ```
pub async fn ping(http: Ar... |
//When the function is called, sends user to "ItemDrop3" screen.
public void sendBack4(View view)
{
Intent intent = new Intent (this, ItemDrop3.class);
startActivity(intent);
} |
By 2019, there could be two Donald Trumps in public office.
That, according to the New York Post, could be a true statement after the president's son, Donald Trump Jr., told a posh Long Island gun club he is thinking about challenging Gov. Andrew Cuomo (D-N.Y.).
Trump Jr. did not say he would definitely seek to unsea... |
/**
*
* @author Matthew Stevenson <www.mechio.org>
*/
public class WavPlayerConfigLoader implements ConfigurationLoader<WavPlayerConfig, File> {
/**
* Config format version name.
*/
public final static String VERSION_NAME = "AvroWavPlayerConfig";
/**
* Config format version number.
*/... |
/**
* vos_mem_print_stack_trace() - Print saved stack trace
* @mem_struct: Pointer to the memory structure which has the saved stack trace
* to be printed
*
* Return: None
*/
static inline void vos_mem_print_stack_trace(struct s_vos_mem_struct* mem_struct)
{
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_L... |
<filename>shop-seller/src/main/java/quick/pager/shop/seller/response/package-info.java
package quick.pager.shop.seller.response; |
/**
* Prueba para desasociar un Modificaciones existente de un CasoDeUso existente.
*
* @throws BusinessLogicException
*/
@Test
public void removeModificacionesTest() throws BusinessLogicException {
modificacionCasoDeUsoLogic.removeCasoDeUso(modificacionesData.get(0).getId());
... |
#pragma once
#include "../common/protocol.h"
class CFileLoader
{
protected:
PATCH_START m_Info;
DWORD m_dwReceivedSize;
BYTE *m_pData;
bool m_bPatched;
public:
CFileLoader( );
~CFileLoader( );
bool StartDownload( SOCKET s, PATCH_START *info );
void ProcessData( SOCKET s, PATCH_DATA_ANSWER *info );
DWORD... |
Palmer made it into Q3 for only the second time this season on Saturday, but stopped on track before he even started a flying lap with a reported loss of gearbox oil pressure.
He had set two times in the second part of qualifying that would have been good enough for seventh on the grid ahead of teammate Nico Hulkenber... |
/**
* Add model in cash.
* @param model the model for adding.
*/
public void add(Model model) {
if(model != null) {
map.putIfAbsent(model.getId(), model);
}
} |
<reponame>amit2014/libphenom
/*
* Copyright 2012-present Facebook, 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 re... |
/*
Change the item in the list at index. Return the old item.
*/
void *mprSetItem(MprList *lp, int index, cvoid *item)
{
void *old;
int length;
mprAssert(lp);
mprAssert(lp->size >= 0);
mprAssert(lp->length >= 0);
mprAssert(index >= 0);
length = lp->length;
if (index >= length... |
<reponame>andieritter/groSUREy
import * as React from 'react';
import { useState } from 'react';
import { TextField } from '@material-ui/core';
const NewItem: React.FC = (): JSX.Element => {
return (
<div>
<form>
<h2>New Item</h2>
<TextField id="itemInput" label="item" variant="outlined"><... |
// InRange returns true if the given value is within the range.
func (e *AnalysisExpected) InRange(value float64) bool {
if e.Min != nil && *e.Min > value {
return false
}
if e.Max != nil && *e.Max < value {
return false
}
return true
} |
// ParseServiceNode is the inverse of service node function
func ParseServiceNode(s string) (Node, error) {
parts := strings.Split(s, serviceNodeSeparator)
out := Node{}
if len(parts) != 4 {
return out, errors.New("missing parts in the service node")
}
out.Type = NodeType(parts[0])
out.IPAddress = parts[1]
out... |
def load_data_from_finegan_dollak_csv_file(self, in_csv):
with open(in_csv, encoding='utf-8-sig') as f:
reader = csv.DictReader(f)
current_table = None
for row in reader:
if row['Table Name'] == '-':
continue
table_name = ro... |
/**
* Task 04: Graph querying
* @author elozano
*
*/
public class Consultas
{
private static String ns = "http://exmple.com/biblioteca/";
private static String filename;
private static Model model;
private static InputStream in;
private static final int CONSULTA_FECHA = 2;
private static final int CONSULT... |
<gh_stars>0
package cn.ting.er.datamapping.utils;
/**
* @author wenting.Li
* @version 0.0.1
* @since JDK 8
*/
public interface Wrapper<T> {
T getOriginal();
}
|
def lambda_handler(event, context):
logger.info('event: %s' % event)
request_payload = event
if request_payload.get('headers'):
response_data = sign_headers(request_payload['headers'])
else:
credential = list([c for c in request_payload['conditions'] if 'x-amz-credential' in c][0].values())[0]
logge... |
/**
* Enforces that no alarm is currently ringing,<br/>
* If one is, AlarmActivity is immediately started<br/>
* and the passed activity is finished.
*
* @param activity the activity to finish if needed.
*/
public static void startIfRinging( Activity activity ) {
SFApplication app = SFApplication.get();
... |
// TODO: Update when redbeams service is ready
@Test(dataProvider = TEST_CONTEXT_WITH_MOCK, enabled = false)
@Description(
given = "there is a prepared database",
when = "when a database create request is sent with the same database name",
then = "the create should return a BadRe... |
//CHECKSTYLE:Indentation:OFF
/*
* 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... |
Every share makes Black Voice louder! Share To Share To
"I wish I could have saved more, to be honest," said a brave ex-marine who had saved 70 people during Orlando nightclub shooting.
Many witnesses of Orlando shooting said that they mistook the gunfire for the part of the show. Luckily, Imran Yousuf, a 24-year-old... |
/*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
import { Rectangle, Transform } from "pixi.js";
import { DBasePoint } from "./d-base-point";
import { DViewTarget } from "./d-view-to-target";
import { EShapeContainer } from "./shape/e-shape-container";
export class DChartPlotAre... |
<filename>CCUE4/Source/CCUE4/core/ChessConstants.cpp
#include "ChessConstants.h"
namespace cc {
static FIntPoint IndexToPositionMap[100] = {
{-8, -9}, {-6, -9}, {-4, -9}, {-2, -9}, { 0, -9}, { 2, -9}, { 4, -9}, { 6, -9}, { 8, -9}, { 0, 0},
{-8, -7}, {-6, -7}, {-4, -7}, {-2, -7}, { 0, -7}, { 2, -7}, { 4, -7}, { ... |
def image_to_plasma_png(fname: str, img: np.array) -> None:
plt.imsave(fname + '.png', img, cmap='plasma') |
def testFrozenParameters(self):
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.fc1 = nn.Linear(30, 50)
self.fc2 = nn.Linear(50, 1)
for param in self.fc1.parameters():
param.requires_grad =... |
In one of the most "interesting" moves I've seen in the mobile market, MSI has equipped their GX60 gaming notebook with an HD 7970M...paired with an AMD A10-4600M APU. Curious to see how the combination would stack up against the Intel i7-3720QM + HD 7970M combination used in AVADirect's Clevo P170EM, I ran some quick ... |
// CreateInterconnectRequest returns a request value for making API operation for
// AWS Direct Connect.
//
// Creates an interconnect between an AWS Direct Connect Partner's network and
// a specific AWS Direct Connect location.
//
// An interconnect is a connection that is capable of hosting other connections.
// The... |
<filename>android-31/src/com/android/server/hdmi/HdmiCecConfig.java
/*
* Copyright 2020 The Android Open Source 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://... |
//add gate if none or last gate has Y>=220
public static void addRandomGate()
{
if (totalGates == 0 || gates.get(lastGate).gateY >= 220)
{
GateSpawner gs = new GateSpawner();
gs.gateX = r.nextInt(randomX);
gates.add(gs);
totalGates++;
}
} |
<filename>hack/garden-feat/garden-feat.go
package main
import (
"fmt"
"github.com/geofffranks/simpleyaml"
"github.com/geofffranks/spruce"
flag "github.com/spf13/pflag"
"gopkg.in/alediaferia/stackgo.v1"
"gopkg.in/yaml.v2"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strconv"
)
func usage() {
_, _ = fmt.Fprintf... |
/**
* Process the specified HTTP request, and create the corresponding HTTP
* response (or forward to another web component that will create it).
*
* @param request The HTTP request we are processing
* @param response The HTTP response we are creating
*
* @exception IOException... |
<gh_stars>1-10
import mongoose from 'mongoose';
export default interface ILog extends mongoose.Document {
_id: mongoose.Schema.Types.ObjectId;
message: string;
created_at: string;
}
|
// from 3GPP TS 27.005 3.3.4 Select Cell Broadcast Message Types
bool SmsMiscManager::CloseCBRange(uint32_t fromMsgId, uint32_t toMsgId)
{
bool isChange = false;
auto iter = rangeList_.begin();
while (iter != rangeList_.end()) {
auto oldIter = iter++;
auto &info = *oldIter;
if (fromM... |
// InitializeDatabase opens database connection and initializes schema if it does not exist
func InitializeDatabase(connectionURL string) (*dbr.Connection, error) {
connection, err := WaitForDatabaseAccess(connectionURL, connectionRetries)
if err != nil {
return nil, err
}
initialized, err := checkIfDatabaseIniti... |
import { Navbar } from '../../components';
import { LayoutContainer } from './styles';
type Props = {
children: unknown;
};
const MainLayout = ({ children }: Props): JSX.Element => (
<>
<Navbar />
<LayoutContainer>{children}</LayoutContainer>
</>
);
export default MainLayout;
|
// NewCASFileStoreWithLRUMap initializes and returns a new Content-Addressable
// FileStore. It uses the first few bytes of file digest (which is also used as
// file name) as shard ID.
// For every byte, one more level of directories will be created. It also stores
// objects in a LRU FileStore.
// When size exceeds l... |
def backward_elimaination_approach(self):
logger.add_info_log(
"Enter class LinearRegressionWithFeatureSelection : backward_elimaination_approach function")
try:
cols = list(self.x_train.columns)
pmax = 1
while len(cols) > 0:
p = []
... |
// buildCommand builds the `gcloud run deploy` command. We can pass all fields in here, the command
// builder will only set flags for valid inputs and return an error or ignore
// on invalid inputs.
func (cc *Controller) buildCommand(dd cloudrunner.DeploymentDescription,
credentials cloudrunner.Credentials) (gcloud.C... |
/**
* Adds every entry necessary in the closure table where the given space is the root
*
* @param jobSpaceId
* @return
*/
private static boolean updateJobSpaceClosureTable(int jobSpaceId, Connection con) {
try {
Timestamp time = new Timestamp(System.currentTimeMillis());
JobSpace root = new JobS... |
<reponame>uninth/UNItools
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:cindent:textwidth=0:
*
* Copyright (C) 2005 Dell Inc.
* by <NAME> <<EMAIL>>
* Licensed under the Open Software License version 2.1
*
* Alternatively, ... |
//Process input and update the position
void FlyCamera::Update(platform::Game* game, float ellapsed_time)
{
if (game->IsFocus())
{
float forward_input = game->GetInputSlotValue(platform::InputSlotValue::ControllerThumbLeftY);
if (game->GetInputSlotState(platform::InputSlotState::Up) || game->GetInputSlotStat... |
#include<bits/stdc++.h>
using namespace std;
// long long int GCD(long long int a,long long int b)
// {
// if(b==0)
// return a;
// return GCD(b,a%b);
// }
long long int number(long long int n)
{ long long int t=n;
long long int sum=0;
while(n!=0)
{
sum=sum+(n%10);
n/=10;
}
return... |
package com.dburyak.sandbox.sandboxspringboot;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.AfterEach;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo;
import org.springframework.boot.test.context.Spri... |
/**
* readObject is called to restore the state of the URL from the
* stream. It reads the components of the URL and finds the local
* stream handler.
*/
private synchronized void readObject(java.io.ObjectInputStream s)
throws IOException, ClassNotFoundException
{
s.defaultRead... |
package stats
import (
"fmt"
"net/http"
"time"
"github.com/mholt/caddy/middleware"
"github.com/rcrowley/go-metrics"
)
func (m *metricsModule) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
next := m.next
path := ""
if m.uiPath != "" && middleware.Path(r.URL.Path).Matches(m.uiPath) {
next ... |
/**
* High-performance stream JSON parser. Provides the decoding algorithm to interpret the Errai Wire Protcol,
* including serializable types. This parser always assumes the outer payload is a Map. So it probably shouldn't
* be used as a general parser.
*
* @author Mike Brock
* @since 1.1
*/
public class JSONS... |
def partial_velocity(vel_list, u_list, frame):
if not hasattr(vel_list, '__iter__'):
raise TypeError('Provide velocities in an iterable')
if not hasattr(u_list, '__iter__'):
raise TypeError('Provide speeds in an iterable')
list_of_pvlists = []
for i in vel_list:
pvlist = []
... |
<filename>src/shop/order/order.controller.ts
import {
Controller,
Body,
Post,
Query,
Get,
NotFoundException,
Param,
Delete,
UseGuards,
Patch,
HttpException,
} from '@nestjs/common';
import {InjectModel} from '@nestjs/mongoose';
import {Product} from '@app/schema/product.schema';
import {Model, Typ... |
The Saudi TV channel Al Arabiya has come under fire for publishing a fake photo online. On Monday, it posted the following photo to its official Twitter account. The description, in Arabic, reads: “Al Arabiya exclusive: Saudi Arabia’s Operation Decisive Storm destroys a Houthi military convoy in Saada [Yemen].”There’s ... |
// Measure performance impact of enabling accounts.
static void bufferAccountUse(benchmark::State& state) {
const std::string data(state.range(0), 'a');
uint64_t iters = state.range(1);
const bool enable_accounts = (state.range(2) != 0);
auto config = envoy::config::overload::v3::BufferFactoryConfig();
config... |
/** \brief DatasetFactory provides a way to inspect/discover a Dataset's
* expected schema before materializing the Dataset and underlying Sources. */
@Namespace("arrow::dataset") @NoOffset @Properties(inherit = org.bytedeco.arrow.presets.arrow_dataset.class)
public class DatasetFactory extends Pointer {
static {... |
/**
* Implementation for the "objc_proto_library" rule.
*/
public class ObjcProtoLibrary implements RuleConfiguredTargetFactory {
@Override
public ConfiguredTarget create(final RuleContext ruleContext)
throws InterruptedException, RuleErrorException, ActionConflictException {
new ProtoAttributes(ruleCon... |
#include "mandel.hpp"
extern "C" {
int mandel(float r, float i);
}
|
package cieloecommerce.sdk.ecommerce.request;
import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import com.google.gson.GsonBuilder;
import cieloecommerce.sdk.Environment;
import cieloecommerce.sdk.Merchant;
im... |
from helpers.time_utils import days
import json
import brownie
import pytest
from brownie import *
from helpers.constants import *
from helpers.registry import registry
from helpers.registry.artifacts import artifacts
from collections import namedtuple
from config.badger_config import badger_config, digg_config, sett_c... |
Some observations on reality testing as a clinical concept.
This paper asserts that reality testing is a complex ego activity which cannot be characterized globally as either intact or defective. In normals, neurotics, and "borderlines" it is actually a highly variable function. Some problems of nomenclature are addre... |
"""Module grouping tests for the pydov.util.owsutil module."""
import copy
import re
import pytest
from numpy.compat import unicode
from owslib.etree import etree
from owslib.fes import (
PropertyIsEqualTo,
FilterRequest,
)
from owslib.iso import MD_Metadata
from owslib.util import nspath_eval
from pydov.util... |
/** @format */
import { GlobalConfig } from "../../config";
import { buildApiUrl, IQueryParams, NetworkClient } from "../../network";
import { IPagedEntity } from "../../models";
import { IAlert, IAlertSummary, ICreateAlertPayload, IUpdateAlertPayload } from "./models";
import { wrapWithErrorHandler } from "../../netw... |
<filename>project/src/main/java/project/parsing/knx/steps/DeleteTempFolderParsingStep.java
package project.parsing.knx.steps;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import project.parsing.knx.KNXP... |
Multi-functional metasurface architecture for amplitude, polarization and wavefront control
Metasurfaces (MSs) have been utilized to manipulate different properties of electromagnetic waves. By combining local control over the wave amplitude, phase, and polarization into a single tunable structure, a multi-functional ... |
/**
* Created by jvettraino on 5/15/2015.
*/
public class AppUtils {
private static SimpleDateFormat auditFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
private static SimpleDateFormat dateOnlyFormatter = new SimpleDateFormat("yyyy-MM-dd");
static{
auditFormatter.setTimeZone(TimeZo... |
// GetAnchor is a free data retrieval call binding the contract method 0x4c7df18f.
//
// Solidity: function getAnchor(blockNumber uint256) constant returns(uint256)
func (_FactomAnchor *FactomAnchorCaller) GetAnchor(opts *bind.CallOpts, blockNumber *big.Int) (*big.Int, error) {
var (
ret0 = new(*big.Int)
)
out := ... |
/**
* Strictly for testing.
* have to be in org.apache.bookkeeper.bookie to not introduce changes to InterleavedLedgerStorage
*/
public class SlowInterleavedLedgerStorage extends InterleavedLedgerStorage {
public static final String PROP_SLOW_STORAGE_FLUSH_DELAY = "test.slowStorage.flushDelay";
public stati... |
<reponame>Andrei94/WritingAwesomeJavaCodeWorkshop
package de.stevenschwenke.java.writingawesomejavacodeworkshop.part1JavaLanguageAndMethods.c09_lombok.builder;
import lombok.Builder;
import lombok.NonNull;
import lombok.Singular;
import java.util.Set;
@Builder
public class BuilderExample {
@NonNull private Strin... |
/* Check if chr is contained in the string */
static int chk_chr (const char* str, int chr)
{
while (*str && *str != chr) str++;
return *str;
} |
/**
* @param rawMessage the raw message entered by the user
* @throws CommandParseException thrown if no command was found
* @throws CommandArgumentException thrown if the command was run and its onCommand method returned false
*/
public void parseCommand(@NotNull String rawMessage, @NotNull User... |
<gh_stars>1-10
package net.tarilabs.joind_ex042015;
import static java.util.stream.Collectors.*;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.time.LocalDateTime;
import java.time... |
def post_save(cls, sender, document, **kwargs):
refel=ElementReferenceDB.objects.filter(element=document).first()
if not refel:
ElementReferenceAO(element=document.to_obj()).save() |
/**
* Non-metric Space Library
*
* Main developers: Bilegsaikhan Naidan, Leonid Boytsov, Yury Malkov, Ben Frederickson, David Novak
*
* For the complete list of contributors and further details see:
* https://github.com/nmslib/nmslib
*
* Copyright (c) 2013-2018
*
* This code is released under the
* Apache Li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.