content stringlengths 10 4.9M |
|---|
/**
* Argument handler for processing flags that take a string as their parameter.
*/
public abstract class ArgHandlerString extends ArgHandler {
@Override
public int handle(String[] args, int startIndex) {
if (startIndex + 1 < args.length) {
if (!setString(args[startIndex + 1])) {
return -1;
... |
<reponame>sophiebits/ent
// Generated by github.com/lolopinto/ent/ent, DO NOT EDIT.
import {
GraphQLEnumType,
GraphQLFieldConfig,
GraphQLFieldConfigMap,
GraphQLID,
GraphQLInputFieldConfigMap,
GraphQLInputObjectType,
GraphQLNonNull,
GraphQLObjectType,
GraphQLResolveInfo,
} from "graphql";
import { Req... |
use super::*;
/// An object that can be notified after the state is updated.
pub trait Subscriber: Send + Sync {
fn notify(&self, state: &State, handler: &dyn EventHandler);
}
|
<gh_stars>1-10
package spark.examples;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.function.Function;
import org.apache.spark.api.java.function.PairFunction;
import org.apache.spark.streaming.api.java.JavaStreamingContext;
import org.apache.s... |
<filename>jobotz/jb2_201811/src/test/Test17Octree2.java
/*
*
* Vear 2017-2018 *
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... |
""" Pascal VOC dataset parser
Copyright 2020 Ross Wightman
"""
import os
import xml.etree.ElementTree as ET
from collections import defaultdict
import numpy as np
from .parser import Parser
from .parser_config import VocParserCfg
class VocParser(Parser):
DEFAULT_CLASSES = (
'aeroplane', 'bicycle', 'bir... |
#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
int main()
{ ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
while(t--)
{ long long int n,s;
int k;
cin>>n>>s>>k;
set<int> floor;
for(int i=1;i<=k;i++)
{ int c;
cin>>c;
floor.insert(c);
}... |
Throughout my travels I’m constantly getting asked about Personal Trainer certifications: Which one is best? – Which do I recommend?, etc:
In today’s post I’m going to share with you my answers to these questions along with my general outlook on Personal Training certifications.
I have no affiliation with any fitness... |
Progressing from Recurring Tissue Injury to Genomic Instability: A New Mechanism of Neutrophil Pathogenesis.
Aberrant neutrophil (PMN) infiltration of the intestinal mucosa is a hallmark of inflammatory bowel diseases, including Crohn's disease and ulcerative colitis. While the genotoxic function of PMNs and its impli... |
/**
* Configures the speed edit text preference.
*
* @param keyId the key id
*/
private void configureSpeedEditTextPreference(final int keyId) {
final EditTextPreference editTextPreference = keyId == R.string.track_color_mode_slow_key ? slowEditTextPreference
: mediumEditTextPreference;
edi... |
Today marks the one-year anniversary of death by flower arrangement’s release on itch.io, and I felt that it was super necessary to do a postmortem - mostly as a way to chronicle the ups and downs of making the game.
It’s also the first time I’ve sat down to do this, so pardon the rambling and wordiness which might en... |
Proponents of the old-school taxi business insist that the Uber ride-sharing service can’t be trusted. But trust issues also extend to taxi drivers, if a shakedown that happened to two women who tried to use a Beck Taxi chit to get from downtown Toronto to Brampton is any indication.
Which of these cabs is not like th... |
Lasing properties of Ce:LiCaAlF6 single crystal on effects of the distribution of Ce Ion
We found that heterogeneity of Ce:LiCaAlF6 single crystal grown by Czochralski (Cz) method. It was showed by measurement of multi-photon luminescence and it is due to Ce3+ ion by using LA-ICPMS. And we investigated the lasing prop... |
<reponame>928799934/wingedsnake
// +build dragonfly freebsd linux netbsd openbsd solaris
package wingedsnake
import (
"os/user"
"strconv"
"syscall"
)
// getConfigUser 修改进程uid gid
func getConfigUser(conf *config) (int, int, error) {
// 获取 user 的 uid
ui, err := user.Lookup(conf.Base.User)
if err != nil {
logf(... |
<filename>Kunii-1991/ut_Kunnii1991_a.py<gh_stars>1-10
# Calculate terminal velocity, ut, from ut* and dp* for different particle sphericities
# from Kunii1991 book, pg 80-83, Eqs 31-33
# applicable for sphericity from 0.5 to 1.0
# use Python 3 print function and division
from __future__ import print_function
from __fu... |
<reponame>novorender/novoweb
import { grey } from "@mui/material/colors";
import { alpha, createTheme } from "@mui/material/styles";
declare module "@mui/material/Button" {
interface ButtonPropsColorOverrides {
grey: true;
}
}
declare module "@mui/material" {
interface Color {
main: string... |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
// Implementation, v2.3.0
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.08.06 ... |
import * as t from 'io-ts'
import { FhirCode } from './FhirCode'
import { FhirDecimal } from './FhirDecimal'
import { FhirElement } from './FhirElement'
import { FhirExtension } from './FhirExtension'
import { FhirString } from './FhirString'
/** An amount of economic utility in some recognized currency. */
export con... |
def gradient_phrase(self,interp):
interpolated = self.get_interpolated_phrase_probs(interp)
grad_list = []
for i, sample in enumerate(interpolated):
f_A = np.sum(np.log(sample[0]), axis=0)
f_B = np.sum(np.log(sample[1]), axis=0)
grad_list.append(f_A - f_B)
return np.vstack(grad_list) |
/**
* AbstractOsiamService provides all basic methods necessary to manipulate the Entities registered in the given OSIAM
* installation.
*/
abstract class AbstractOsiamService<T extends Resource> {
static final String CONNECTION_SETUP_ERROR_STRING = "Cannot connect to OSIAM";
private static final String AUT... |
// String implements Stringer for Spacecraft displaying its panels.
func (ship Spacecraft) String() string {
min, max := PointOfOrigin(), PointOfOrigin()
for p := range ship.panels {
if p.x < min.x {
min.x = p.x
} else if p.x > max.x {
max.x = p.x
}
if p.y < min.y {
min.y = p.y
} else if p.y > max.... |
#include <iostream>
#include "libg3logger/g3logger.h"
#include "SerdpRecorder.h"
namespace serdp_recorder {
using namespace std;
using namespace libblackmagic;
using std::placeholders::_1;
SerdpRecorder::SerdpRecorder( libg3logger::G3Logger &logger )
: _logger(logger),
_keepGoing( true ),
... |
package jsonrpc
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestValidateRequest(t *testing.T) {
assert := assert.New(t)
params := make(map[string]interface{})
params["id"] = 1
assert.Nil(validateRequest(&Request{
Version: "2.0",
Method: "/resource/get",
Params: params,
ID: "... |
/**
* Grant authorization on location if a subject doesnt have authorization on location.
*
* @param location The location on which to check / grant
* @param subjectType The type of the subjects to grant
* @param subjects The subjects to process
*/
public void grantAuthorizationOnLocationI... |
/**
*
* When monitoring is disabled, you will not hear
* the audio that is coming through the input,
* but you will still be able to access the samples
* in the left, right, and mix buffers. This is
* default state of an AudioInput and is what
* you will want if your input is microphone
* ... |
/**
* A polygon which is as rectangle which may be rotated.
*
* @author H. Irtel
* @version 0.1.0
*/
public class RotatedRectangle extends Polygon {
/**
* Create a polygon which contains a rotated rectangle.
*
* @param x
* horizontal center position.
* @param y
* ve... |
package ftn.ktsnvt.culturalofferings.e2e.tests;
import ftn.ktsnvt.culturalofferings.e2e.pages.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.sele... |
Small-Scale Spatial Variability of Plant Nutrients and Soil Organic Matter: An Arable Cropping Case Study
ABSTRACT Soil properties can vary spatially due to differences in topography, parent material, and land management practices. For site-specific management within the field, information on spatial variation of soil... |
<filename>nicos_mlz/kws3/setups/mobile.py
# -*- coding: utf-8 -*-
description = 'Mobile Sample devices'
group = 'optional'
display_order = 40
excludes = ['virtual_sample']
tango_base = 'tango://phys.kws3.frm2:10000/kws3/'
s7_motor = tango_base + 's7_motor/'
devices = dict(
sam_rot = device('nicos.devices.tango.... |
Holonomy orbits of the snake charmer algorithm
The snake charmer algorithm permits us to deform a piecewise smooth curve starting from the origin in R^d, so that its end follows a given path. When this path is a loop, a holonomy phenomenon occurs. We prove that the holonomy orbits are closed manifolds diffeomorphic to... |
/**
* @author Daniela Perez danielaperez@kogimobile.com on 4/17/18.
*/
public class FrgEmailValidation extends BaseFragment implements EventsEmailValidation {
private FrgEmailvalidationBinding binding;
private ViewModelEmailValidation viewModel;
public static FrgEmailValidation newInstance() {
... |
// for processing incoming update from Telegram
func processUpdate(b *bot.Bot, update bot.Update) bool {
var userId string
if update.Message.From.Username == nil {
log.Printf("*** Not allowed (no user name): %s", update.Message.From.FirstName)
return false
}
userId = *update.Message.From.Username
if !isAvailab... |
/* Reads the FW info structure for the specified Storm from the chip,
* and writes it to the specified fw_info pointer.
*/
static void ecore_read_fw_info(struct ecore_hwfn *p_hwfn,
struct ecore_ptt *p_ptt,
u8 storm_id,
struct fw_info *fw_info)
{
struct storm_defs *storm = &s_storm_defs[... |
<gh_stars>10-100
package common
import (
"errors"
"net/http"
"net/url"
"strings"
"github.com/cloudfoundry-incubator/notifications/uaa"
)
type UAAUserNotFoundError struct {
Err error
}
func (e UAAUserNotFoundError) Error() string {
return e.Err.Error()
}
type UAADownError struct {
Err error
}
func (e UAADo... |
<reponame>yunbaoi/swoole-src
#include "swoole_server.h"
#include <assert.h>
using swoole::network::Address;
using swoole::network::Socket;
namespace swoole {
PacketPtr MessageBus::get_packet() {
PacketPtr pkt;
if (buffer_->info.flags & SW_EVENT_DATA_PTR) {
memcpy(&pkt, buffer_->data, sizeof(pkt));
... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright 1991- The GROMACS Authors
* and the project initiators Erik Lindahl, Berk Hess and David van der Spoel.
* Consult the AUTHORS/COPYING files and https://www.gromacs.org for details.
*
* GROMACS is free software; you can redistribute... |
<reponame>wivlaro/newton-dynamics
/////////////////////////////////////////////////////////////////////////////
// Name: src/cocoa/data.cpp
// Purpose: Various data
// Author: AUTHOR
// Modified by:
// Created: ??/??/98
// RCS-ID: $Id$
// Copyright: (c) AUTHOR
// Licence: wxWindows licenc... |
/**
* Provider information including identifiers, name, and contact information.
* @author Ioana
* @version 1.0
* @updated 23-Nov-2015 6:29:30 PM
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class Provider implements Serializable {
/**
* Name of individual provider to delivered the services, formatted... |
A very bizarre New Zealand cat named Brigit is stealing men's underwear from god knows where and bringing them back to her owner's house, New Zealand Herald reports.
Brigit's owner Sarah Nathan posted a photo of "Brigit's haul from the last two months" on Facebook Friday, saying, "Now it's getting silly" and that "eve... |
import scipy.integrate as spint
import numpy as np
from astropy.cosmology import FlatLambdaCDM
import astropy.units as u
astropy_cosmo = FlatLambdaCDM(H0=70 * u.km / u.s / u.Mpc,
Tcmb0=2.725 * u.K, Om0=0.3)
# -------- Define cosmology -------- #
# Flat Lambda CDM
H0 = 70.0 # km/s/Mpc
om... |
<gh_stars>1-10
/*
This program is distributed under the terms of the 'MIT license'. The text
of this licence follows...
Copyright (c) 2004 J.D.Medhurst (a.k.a. Tixy)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to de... |
/*
* post
* = procedure 1
*/
public static class PostParams extends RECORD {
public final AuthPair authPair = mkRECORD(AuthPair::make);
public final NameList recipients = mkMember(NameList::make);
//public final Name returnToName = mkRECORD(Name::make);
public final BOOLEAN postIfInvalidNames = mkBOOLEAN... |
async def async_get_snapshot_uri(self, profile: Profile) -> str:
if not self.capabilities.snapshot:
return None
media_service = self.device.create_media_service()
req = media_service.create_type("GetSnapshotUri")
req.ProfileToken = profile.token
result = await media_s... |
// List shows the list of pages. A parameter of path or user is required.
func (s *PagesService) List(ctx context.Context, path, user string, opt *PagesListOptions) (*Pages, error) {
var pages Pages
params := url.Values{}
params.Set("access_token", s.client.config.Token)
params.Set("path", path)
params.Set("user",... |
extern crate stdweb;
use stdweb::traits::*;
use stdweb::unstable::TryInto;
use stdweb::web::{document, CanvasRenderingContext2d};
use stdweb::web::html_element::CanvasElement;
fn main() {
stdweb::initialize();
let canvas: CanvasElement = document()
.create_element("canvas")
.unwrap()
... |
<reponame>randomman552/Abacws-Data-Vis
export { ModelView } from "./ModelView" |
// Scan scans ports from 1 to numPorts (included)
// using numWorkers in parallel.
// It returns the sorted list of open ports.
func Scan(host string, numPorts, numWorkers int) []int {
dial := func(host string, port int) bool {
address := host + fmt.Sprintf(":%d", port)
conn, err := net.Dial("tcp", address)
if e... |
/**
* Does the auto completion for categories, matching with any category already present in the knowledge base.
*
* @param value the input value.
* @return the AutoCompletionCandidates.
*/
public AutoCompletionCandidates doAutoCompleteCategories(@QueryParameter String value... |
Systemic sclerosis complicated by ovarian cancer
Dear Editor, Systemic sclerosis (SSc) is a chronic, multisystem, autoimmune disease causing significant morbidity and mortality. There are many reports describing the risk of malignancy with SSc. While a previous study indicated a higher incidence of cancer, especially ... |
/**************************************************************************
Copyright 2019 Vietnamese-German-University
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/lic... |
import { productImageGalleryTheme } from '@vtex/store-ui'
export default productImageGalleryTheme
|
def gost(lis,ky,r,l):
lens=l-r+1
if lens <= 5:
if ky in lis[r:l+1]:
return True
else:
return False
if ky <= lis[r+(lens//2)-1]:
return gost(lis,ky,r,r+(lens//2)-1)
else:
return gost(lis,ky,r+(lens//2),l)
n = int(input())
a = in... |
<gh_stars>0
/* Copyright (c) 2012, 2020, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain softwar... |
// Fetch attempts to fetch arbitrary bytes from a given URL
func Fetch(ctx context.Context, fetchURL *url.URL, jsonErrors bool) (io.Reader, error) {
if jsonErrors {
q := fetchURL.Query()
q.Add("json_errors", "true")
fetchURL.RawQuery = q.Encode()
}
fetchPath := fetchURL.String()
log.Trace("[network] Beginning... |
/**
* Create a daily date range for a given date for the month to which
* the date belongs. So if the date is "2010-05-28 16:14:08" then the
* returned range would be (2010-05-28 00:00:00 -> 2010-05-28 23:59:59).
*/
static DateRange createDaily(Date date) {
Calendar start = new GregorianCale... |
/**
* Copyright (c) 2018 <NAME>
* This file is licensed under the terms of the MIT license.
*/
#pragma once
#include <reg/ClassRegistrar.h>
#include <gamebase/impl/engine/RelativeValue.h>
namespace gamebase { namespace editor {
struct SimpleRelType {
enum Enum {
Pixels,
Percents
};
};
cl... |
export * from './button';
export * from './circle';
export * from './image';
export * from './line';
export * from './mouse';
export * from './point';
export * from './rect';
export * from './rounded-rect';
export * from './text';
|
// DFS perform a depth-first-traversal on the given attribute and invokes callback
func (attr *Attribute) DFS(callback func(attr *Attribute)) {
callback(attr)
for _, each := range attr.subAttributes {
each.DFS(callback)
}
} |
// %%Function: QuerySublinePointPcpCore
// %%Contact: victork
//
/*
* Returns dim-info of the cp in the line, that a) contains given point or
* b) is closest to it from the left or
* c) is just closest to it
*/
LSERR QuerySublinePointPcpCore(
PLSSUBL plssubl,
... |
def factorial(n):
if n==0:
return 0
elif n==1:
return 1
else:
return n+factorial(n-1)
friend1=int(input())
friend2=int(input())
if friend1>friend2:
friend1,friend2=friend2,friend1
mid=(friend2-friend1)/2
if not mid.is_integer():
tiredness=(factorial((friend2-friend1)//2))+(factoria... |
def gait(strikes, data, duration, distance=None):
import numpy as np
step_durations = []
for i in range(1, np.size(strikes)):
step_durations.append(strikes[i] - strikes[i-1])
avg_step_duration = np.mean(step_durations)
sd_step_durations = np.std(step_durations)
number_of_steps = np.size(... |
package util
import (
"fmt"
"log"
"os"
"strconv"
"strings"
"time"
gops "github.com/mitchellh/go-ps"
"github.com/shirou/gopsutil/v3/process"
)
// ProcEntry a process entry of a process list
type ProcEntry struct {
Name string `json:"name"`
Cmdline string `json:"cmdline"`
Token string `json:"token"`
P... |
def single_dir_expand(matches):
if len(matches) == 1 and os.path.isdir(matches[0]):
d = matches[0]
if d[-1] in ['/','\\']:
d = d[:-1]
subdirs = [p for p in os.listdir(d) if os.path.isdir( d + '/' + p) and not p.startswith('.')]
if subdirs:
... |
<reponame>michaelbonadio/jesterj<gh_stars>0
/*
* Copyright 2016 Needham Software 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/LICENSE-2.0
... |
<filename>aoj/5/AOJ0555.cpp
//
// AOJ0555.cpp
//
//
// Created by knuu on 2014/06/11.
//
//
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
int N,ans=0;
char s[11],ring[11];
cin>>s>>N;
for (int i=0; i<N; i++) {
cin>>ring;
for (int j=0; j<strlen(ring); j++) {
int k;
for (k=0... |
<reponame>gabrieldtc/CursoEmVideoPython<filename>PyCharm/Desafios/Mundo1/desafio29.py
# escreva um programa que leia a velocidade de um carro se ultrapassar de 80Km/h mostar uma mensagem dizendo
# que ele foi multado a multa vai custar R$ 7,00 a cada quilimetro ultrapassado
velo = int(input('Qual a velocidade que você... |
<gh_stars>1-10
package org.usfirst.frc.team5104.robot;
public class LogFile {
}
|
/**
* Within a search window around the subimages detect most likely match and
* thus motion.
*
* @author Sina Samangooei (ss@ecs.soton.ac.uk)
*
*/
public static class TEMPLATE_MATCH extends MotionEstimatorAlgorithm {
private float searchProp;
private Mode mode;
/**
* Defaults to allowing a maximu... |
import {Injectable, Logger, UnauthorizedException} from '@nestjs/common';
import {InjectModel} from "@nestjs/sequelize";
import {User} from "./user.model";
import {CreateUserDto} from "./dto/create-user.dto";
import * as bcrypt from 'bcryptjs'
import {JwtService} from "@nestjs/jwt";
@Injectable()
export class UserServ... |
// Parses the prefix descriptions file at path, clears and fills the output
// prefixes phone number prefix to description mapping.
// Returns true on success.
bool ParsePrefixes(const string& path,
absl::btree_map<int32, string>* prefixes) {
prefixes->clear();
FILE* input = fopen(path.c_str(), "... |
Trajectory estimation for a hybrid rocket
This paper presents a research work to develop a navigation technique for a class of nano-micro space rocket. Onboard MEMS inertial sensors are used in view of post-flight trajectory estimation. Combined with synchronized measurements of the combustion engine which is of hybri... |
<filename>string/z.hpp
#pragma region str_z
#ifndef STR_Z_HPP
#define STR_Z_HPP
namespace str {
vector<int> z(const string &s) {
int n = (int)s.size();
vector<int> _z(n);
for (int i = 1, l = 0, r = 0; i < n; i++) {
if (i <= r)
_z[i] = min(_z[i - l], r - i + 1);
while (i + _z[i] < n && s[_z[i]] == s[i... |
package rtmprelay
import (
"errors"
"fmt"
"github.com/livego/av"
log "github.com/livego/logging"
"github.com/livego/protocol/httpflvclient"
"github.com/livego/protocol/rtmp/core"
)
type FlvPull struct {
FlvUrl string
RtmpUrl string
flvclient *httpflvclient.HttpFlvClient
rtmpclient *core.... |
Paul Pogba 196 mins per goal 2749 mins played 14 Goals scored 10 Assists Shots on target Total 70% 52 74
Anthony Martial 156 mins per goal 1716 mins played 11 Goals scored 2 Assists Shots on target Total 72% 21 29
Marcus Rashford 209 mins per goal 2089 mins played 10 Goals scored 6 Assists Shots on target Total 59% 3... |
/**
* Extracts all columns from the given expressions.
*/
public static Set<String> extractColumnsFromExpressions(Set<TransformExpressionTree> expressions) {
Set<String> expressionColumns = new HashSet<>();
for (TransformExpressionTree expression : expressions) {
expression.getColumns(expressionColu... |
import { Component, Output, EventEmitter } from '@angular/core';
import { stringify } from 'querystring';
@Component({
selector: 'app-new-task',
templateUrl: './new-task.component.html',
styleUrls: ['./new-task.component.css'],
})
export class NewTaskComponent {
private static unique_id: number = 0;
title: s... |
<reponame>DoubleRound/iDreambox-java
package org.idreambox.pageModel;
import java.sql.Timestamp;
public class Pfile {
private String id;
private User user;
private String fname;
private String url;
private Integer isdelete;
private String type;
private Timestamp createdatetime;
private Timestamp modifydateti... |
/*
* Copyright 2017 WebAssembly Community Group participants
*
* 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... |
package cn.ittiger.player.demo;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import cn.ittiger.player.FullScreenVideoPlayerView;
import cn.ittiger.player.PlayerManager;
/**
* @author: ylhu
* @time: 2017/12/5
*/
public class F... |
Share. Hopefully without the Rampancy. Hopefully without the Rampancy.
Microsoft is reportedly prepping voice command software called Cortana to compete with Apple’s Siri and Android’s Google Now. According to ZDNet, Cortana “will be able to learn and adapt, relying on machine-learning technology and the "Satori" know... |
package vproxy.component.proxy;
import vproxy.connection.Connection;
import vproxy.connection.Connector;
import java.util.function.Consumer;
public interface ConnectorProvider {
void provide(Connection accepted, String address, int port, Consumer<Connector> providedCallback);
}
|
def check_response(func):
def new_f(self, *args, **kwargs) -> dict:
r = func(self, *args, **kwargs)
if r.status_code not in range(200, 299):
if r.status_code == 401:
raise AuthenticationError(r)
raise RegularError(r)
content = r.content.decode()
... |
def tile_coords_to_latlong(zoom, tile_col, tile_row):
n = 2 ** zoom
longitude = tile_col / n * 360.0 - 180.0
latitude = math.degrees(math.atan(math.sinh(math.pi * (1 - 2 * tile_row / n))))
return latitude, longitude |
/**
* Adds an (intersecting) {@link QueryCriteria} that limits the results to results that the user is allowed to see
*
* @param queryWhere The {@link QueryWhere} instance that defines the query criteria
* @param userId The user id
* @param groupIds The user's group ids
*/
private void add... |
<gh_stars>0
package server
import (
"context"
"io"
"net/url"
"github.com/golang/protobuf/jsonpb"
"github.com/gorilla/websocket"
"github.com/mattn/go-colorable"
"github.com/pkg/errors"
"github.com/tilt-dev/tilt/internal/hud"
"github.com/tilt-dev/tilt/internal/hud/webview"
"github.com/tilt-dev/tilt/pkg/logge... |
/**
* Created by Mohammed Aouf ZOUAG on 13/05/2016.
*/
public class OrderDetail {
private int productID;
private int quantity;
private double priceTTC;
private String productName;
private String productImage;
public OrderDetail(JSONObject object) {
try {
productID = object... |
<filename>src/sequenceEqual.ts<gh_stars>0
import { reporter, ReporterClass, toStateHolder, Reporter, ISArray, IStateHolder } from "soboku";
import { ISObservable } from "../index.d";
import { SObservable } from "./observable";
function isEqual(x: any, y: any): boolean {
return x === y;
}
class SequenceEqualClass... |
def auto_mounter(shares):
mountstocrawl = []
if len(shares['nfsshares']) > 0 or len(shares['smbshares']) > 0:
mounts = mounter(shares, mountdir=args.mountpoint, nfsmntopt=args.nfsmntopt,
smbmntopt=args.smbmntopt, smbtype=args.smbtype,
... |
<gh_stars>1-10
#include <stdlib.h>
#include <time.h>
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
#include "progress.h"
// Sleep for n milliseconds, OS independant
void cross_sleep(unsigned int delay) {
#ifdef _WIN32
Sleep(delay);
#else
usleep(delay * 1000);
#endif
}
void p... |
/**
* OSGi (single) service importer. This implementation creates a managed OSGi service proxy that handles the OSGi
* service dynamics. The returned proxy will select only the best matching OSGi service for the configuration criteria.
* If the select service goes away (at any point in time), the proxy will autom... |
/**
* @author Shalena Omapersad <shalenao@hotmail.com>
*
* Tests the circle overview page user interface of the WebApp.
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class CircleOverviewUITest {
private WebDriver driver;
@BeforeEach
void setUp() {
WebDr... |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
from collections import namedtuple
from textwrap import dedent
from pants.base.exception... |
/**
* Adds all the headers as reference parameters.
*/
public EPRRecipe addReferenceParameters(Iterable<? extends Header> headers) {
for (Header h : headers)
addReferenceParameter(h);
return this;
} |
<reponame>toddheslin/create-fastify
import { FastifyRequest } from 'fastify';
/**
* The generic payload from a Hasura action webhook.
*/
interface HasuraRequestBody<Input> {
/**
* Name of the action
*/
action: string;
/**
* Input parameters to the GraphQL mutation request (the action)
*/
input: I... |
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: transactions/transactions.proto
package transactions
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
gossip "github.com/quorumcontrol/messages/v2/build/go/gossip"
signatures "github.com/quorumcontrol/messages/v2/build/go/signatures"
io "io"
... |
SOPA/PIPA, the controversial anti-piracy bill that would have allowed the U.S. government to monitor and remove "rogue" websites, was shelved in January after millions of Americans protested what essentially boiled down to online censorship.
But while this was taking place, SOPA author Rep. Lamar Smith (R-TX, pictured... |
<reponame>ecoqba/cayenne-particle
// no used
|
Frontline Science: Tumor necrosis factor‐α stimulation and priming of human neutrophil granule exocytosis
Neutrophil granule exocytosis plays an important role in innate and adaptive immune responses. The present study examined TNF‐α stimulation or priming of exocytosis of the 4 neutrophil granule subsets. TNF‐α stimu... |
By Mary Brown,
I was sipping a soy latte after doing yoga on my recent eco-vacation and I started pondering a question: With the world turning “green”, wouldn’t it make sense to invest in green energy and divest from those evil, sinful companies? I gave it some serious thought and when I got home and, after I paid for... |
<gh_stars>0
package pmel.sdig.las.shared.autobean;
public class SuggestQuery {
String name;
String query;
public String getQuery() {
return query;
}
public void setQuery(String query) {
this.query = query;
}
public String getName() {
return name;
}
public... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.