content stringlengths 10 4.9M |
|---|
/**
* A wrapped/encapsulation of outbound REST requests to the map service.
* <p>
* The URL for the map service and the API key are injected via CDI: {@code
* <jndiEntry />} elements defined in server.xml maps the environment variables
* to JNDI values.
* </p>
* <p>
* CDI will create this (the {@code MapClient}... |
import { SetupServer } from '@src/server'
let server: SetupServer
beforeAll(async () => {
server = new SetupServer()
server.init()
await server.startConnection()
})
afterAll(async () => await server.closeConnection())
|
<reponame>ArtiomTr/morfix
export interface CodeProps {
meta: Record<string, boolean | string>;
language?: string;
code: string;
metastring: string;
}
|
/*
Run a GraphQL request from the server with the proper context
*/
import { graphql, GraphQLError } from 'graphql';
import { localeSetting } from '../../lib/publicSettings';
import { getExecutableSchema } from './apollo-server/initGraphQL';
import { getCollectionsByName, generateDataLoaders } from './apollo-server/c... |
use std::error::Error;
use std::fs::File;
use std::io::prelude::*;
mod vm;
use vm::RustVM;
use vm::defs::Register;
use vm::instruction::Instruction;
pub struct Config {
program_filename: String,
}
impl Config {
pub fn new(args: &[String]) -> Result<Config, &'static str> {
if args.len() != 2 {
... |
// Parse returns values from an HTML element.
func (si *SelectorInfo) Parse(e *colly.HTMLElement) []string {
text := e.Text
if si.Attribute != "" {
text = e.Attr(si.Attribute)
}
matches := si.runRegexIfExists(text)
if matches == nil {
return []string{text}
}
return matches[1:]
} |
from django.http import JsonResponse
from django.views.decorators.http import require_POST
from SevenLema.utils import require_login, require_post_param, require_image
from cmdb.models.dish import Dish
from cmdb.models.shop import Shop
@require_POST
@require_login
@require_post_param('shop_id', int)
@require_post_pa... |
<filename>DeviceCode/GHI/Drivers/SoftwareI2C/SoftwareI2C.cpp
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) GHI Electronics, LLC.
//
////////... |
<filename>PSME/application/src/rest/model/handlers/file_database.cpp
/*!
* @brief General database interface
*
* @header{License}
* @copyright Copyright (c) 2016-2017 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the Li... |
/*
* Copyright (c) 2020. Self learning and applying project advanced concepts through out.
*/
package com.dhiren.springboot.mongodb.repository;
import com.dhiren.springboot.mongodb.constants.FlightType;
import com.dhiren.springboot.mongodb.entity.FlightDetails;
import com.dhiren.springboot.mongodb.entity.FlightInfo... |
def atomicscatterer_fromSite(self, site):
position = site.xyz_cartn
print("cartesian coordinates of atom:", position)
atom = site
import periodictable
elem = getattr(periodictable, atom.element)
mass = elem.mass
coh_xs = elem.neutron.coherent
inc_xs = elem... |
// Create a new Oid from a Sha1 string of length 40.
func NewOidFromString(sha1 string) (*Oid, error) {
b, err := hex.DecodeString(sha1)
if err != nil {
return nil, err
}
o := new(Oid)
for i := 0; i < 20; i++ {
o.Bytes[i] = b[i]
}
return o, nil
} |
package vaccinations
const bioNTechPfizerVaccination = "Corona-Erstimpfung (BioNTech/Pfizer)"
const astraZenecaVaccination = "Corona-Erstimpfung (AstraZeneca)"
const johnsonAndJohnsonVaccination = "Corona-Impfung (Johnson & Johnson)"
const errorMessageTemplate = "ERROR for doctor '%d' and service '%s'" |
/**
* Adds the event into the queue for subsequent batch processing.
*
* @param record a record from the MongoDB oplog
* @throws InterruptedException if the thread is interrupted while waiting to enqueue the record
*/
public void enqueue(SourceRecord record) throws Interrup... |
import numpy as np
import torch
import gym
from mujoco_py import GlfwContext
from transformers import DecisionTransformerModel
GlfwContext(offscreen=True) # Create a window to init GLFW.
def get_action(model, states, actions, rewards, returns_to_go, timesteps):
# we don't care about the past rewards in this m... |
def cluster_keyslot(self, key):
return self.execute_command("CLUSTER KEYSLOT", key) |
/**
* Basic KBase driver for narrative interaction.
*/
public class App {
private static GUIForm gui;
/**
* @param args [-t <jobType = FBA (default) | FUTURE_TYPE>, -f <path to config file for job inputs>]
*/
public static void main(String[] args) throws ClassNotFoundException,
Unsu... |
/// System console operations.
pub mod console {
/// Console write functions.
///
/// `core::fmt::Write` is exactly what we need for now. Re-export it here because
/// implementing `console::Write` gives a better hint to the reader about the
/// intention.
pub use core::fmt::Write;
/// Cons... |
def pql_get_db_type():
require_access(AccessLevels.EVALUATE)
return pyvalue_inst(get_db().target, T.string) |
from lxml import etree
from ocd_backend.extractors import BaseExtractor, HttpRequestMixin
from ocd_backend.extractors import log
class WikimediaCommonsExtractor(BaseExtractor, HttpRequestMixin):
"""This extractor fetches metadata of 'File' pages in a particular
Wikimedia Commons category.
The Wikipedia ... |
// integrate with respect to the (k - 1)st variable and divide by k
mpq_t *integrate_and_divide(mpq_t *B, int n, int k, cycle_types cs, cycle_types new_cs) {
mpq_t *result = malloc(new_cs.count * sizeof(mpq_t));
int index = 0;
mpq_t divisor;
mpq_init(divisor);
for (int new_index = 0; new_index < new_cs.count; new_... |
// TestFrontendHostDeleteDestination tests that a destination can be deleted
func (s *FrontendHostSuite) TestFrontendHostDeleteDestination() {
testPath := s.generateKey("/foo/bar")
frontendHost, ctx := s.utilGetContextAndFrontend()
s.mockController.On("DeleteDestination", mock.Anything, mock.Anything).Return(nil)
r... |
The future of computer vision and machine learning can be seen trundling at about 1 mile per hour at a lettuce field in the Salinas Valley of California. In certain fields, a tractor is pulling a highly specialized robot called the “lettuce bot.” The robot, made by Blue River Technology, contains enough smarts to diffe... |
#include "list_view.h"
#include <QDebug>
ListView::ListView(QWidget *parent, CBHash settingsSet, QJsonObject *hash)
: View(dynamic_cast<Model *>(new ListModel(hash)), parent, settingsSet) {
}
ListView::~ListView() {
}
|
An IDS scheme against Black hole Attack to Secure AOMDV Routing in MANET
In Mobile Ad hoc Network (MANET) all the nodes are freely moves in the absence of without ant centralized coordination system. Due to that the attackers or malicious nodes are easily affected that kind of network and responsible for the routing m... |
Ruptured rudimentary horn at 22 weeks
Rudimentary horn is a developmental anomaly of the uterus. Pregnancy in a non-communicating rudimentary horn is very difficult to diagnose before it ruptures. A case of undiagnosed rudimentary horn pregnancy at 22 weeks presented to Nizwa regional referral hospital in shock with f... |
// Write implements io.Writer.
func (c *Conn) Write(p []byte) (int, error) {
c.writeLock.Lock()
defer c.writeLock.Unlock()
total := len(p)
for {
n, err := c.Encode(c.OutMsg, p)
if err != nil {
return 0, err
}
if c.WriteLock != nil {
c.WriteLock.Lock()
}
err = c.Stream.WriteMessage(websocket.Binary... |
President Obama’s recent moves to address the United States’ singular problem with mass incarceration culminated Thursday when he became the first sitting president to visit one of his government’s many federal prisons. The visit follows the president’s announcement on Monday that he’d granted thecommutation of 46 Amer... |
How can we take into account student conceptions of the facial angle in a palaeontology laboratory work?
This study investigates student conceptions of the facial angle as a way to attain understanding elements of the theory of human evolution. The chosen laboratory work involved determining the species of a human cra... |
<gh_stars>1000+
/* Print matched file sets
* This file is part of jdupes; see jdupes.c for license information */
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include "jdupes.h"
#include "jody_win_unicode.h"
#include "act_printmatches.h"
extern void printmatches(file_t * restrict files)
{
file_t *... |
def datautility(self) -> DataUtility:
return self._datautility |
Even though Kurt Rambis counts eight NBA championship rings to his collection from the Lakers, the Knicks’ interim coach realizes the albatross of his two-season, 32-132 stint with Minnesota is how he often is judged.
According to a former Wolves staffer familiar with his tenure, Rambis’ 15-67 record in 2009-10 and 17... |
export declare var Vue: any;
export declare var WjPivotGrid: any;
export declare var WjPivotChart: any;
export declare var WjPivotPanel: any;
|
def detectOne(
self, image: VLImage, detectArea: Optional[Rect] = None, detectLandmarks: bool = True
) -> Union[None, HumanDetection]:
assertImageForDetection(image)
if detectArea is None:
forDetection = ImageForDetection(image=image, detectArea=image.rect)
else:
... |
/**
* Validates the the getForecastWeatherMetrics method for scenario when the underlying service is down
*/
@Test
public void testGetForecastWeatherMetricsWithError() throws Exception {
City city = new City();
city.setId(3647637L);
when(restTemplate.getForObject(anyString(), any()... |
import { Heading } from '@chakra-ui/react';
import { Box, BoxProps, HStack, Stack } from '@chakra-ui/react';
import React from 'react';
export interface SectionHeadingProps extends BoxProps {
title: string;
description?: string;
isCentered?: boolean;
colorMode?: 'dark' | 'white';
}
export const SectionHeading ... |
class Solution {
public:
string XXX(vector<string>& strs) {
int n=strs.size();
int j=0;
int flag=1;
if(n==0)
return "";
if(n==1)
return strs[0];
while(1){
for(int i=1;i<n;i++){
if(strs[0][j]!=strs[i][j]){
flag=0... |
WASHINGTON (Reuters) - The U.S. economy grew faster than initially estimated in the third quarter as businesses aggressively accumulated stock, but underlying domestic demand remained sluggish.
A tug boat passes in front of a freighter at the Port of Oakland in Oakland, California November 12, 2013. REUTERS/Robert Gal... |
/**
* Created by IntelliJ IDEA.
* User: mortenkjetland
* Date: 3/2/11
* Time: 9:02 PM
* To change this template use File | Settings | File Templates.
*/
public class ConfigurablePluginDisablingPluginTest {
@Before
public void before(){
//each test must begin with empty memory..
Configurab... |
Suburban office space : an exploration of continuity and difference
Anonymous boxes whose primary architectural features are stacked floor plates and horizontal bands of reflective glass predominate the suburban office landscape. These objects, scattered across fields and along freeways, are outdated images of the ind... |
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
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... |
def decode_covariance_roll_pitch_yaw(radii, rotations, invert=False):
d = 1.0 / (radii + DIV_EPSILON) if invert else radii
diag = torch.diag_embed(d)
rotation = roll_pitch_yaw_to_rotation_matrices(rotations)
return torch.matmul(torch.matmul(rotation, diag), torch.transpose(rotation, -2, -1)) |
interface State {};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
enum InstructionType
{
CpyValue,
CpyRegister,
Inc,
Dec,
JnzValue,
JnzRegister
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
interface Instruction {
type: InstructionType,
arg1: any,
arg2: any
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
interface Instruction {
... |
/**
* Try the same get at a few border points and see if anything blows up
*/
@Test
public void checkSafeGetAlongBorder() {
T img = createImage(width, height);
GImageMiscOps.fillUniform(img, rand, 0, 100);
InterpolatePixel<T> interp = wrap(img, 0, 100);
interp.get(0,0);
interp.get(width/2,0);
interp.ge... |
<gh_stars>0
import {
FilterIcon,
GlobeIcon,
GraphIcon,
MoonIcon,
SunIcon,
TerminalIcon,
} from "@primer/octicons-react";
import { StyledOcticon } from "@primer/react";
import { FunctionComponent } from "react";
import { Navbar, NavbarLink, NavbarLinks } from "../components/Navbar";
interface Props {
sele... |
/*--------------------------------------------------------------*
Copyright (C) 2006-2015 OpenSim Ltd.
This file is distributed WITHOUT ANY WARRANTY. See the file
'License' for details on this and other legal matters.
*--------------------------------------------------------------*/
package org.omnetpp.ned.edit... |
<reponame>likun123456/RAN<filename>src/main/java/com/thinkgem/jeesite/modules/cheat/entity/CheatFreeBusiness.java
package com.thinkgem.jeesite.modules.cheat.entity;
import com.thinkgem.jeesite.common.persistence.DataEntity;
/**
* 免费业务欺诈流量评估
* @author yanghai
*
*/
public class CheatFreeBusiness extends Data... |
use futures::executor::block_on;
use futures::prelude::*;
use libp2p::ping::{Ping, PingConfig};
use libp2p::swarm::{Swarm, SwarmEvent};
use libp2p::{identity, PeerId};
use std::error::Error;
use std::task::Poll;
fn main() -> Result<(), Box<dyn Error>> {
let local_key = identity::Keypair::generate_ed25519();
le... |
<reponame>EdwardZX/hoomd-blue
# Copyright (c) 2009-2021 The Regents of the University of Michigan
# This file is part of the HOOMD-blue project, released under the BSD 3-Clause
# License.
"""Test hoomd.update.RemoveDrift."""
import hoomd
from hoomd.conftest import operation_pickling_check
import pytest
import numpy a... |
Recently, when I was sitting in Carter Notch Hut in – well, Carter Notch – I noticed a sign bearing the ubiquitous logos of trip advisor and yelp, and I realized that people actually must ‘yelp’ about these iconic landmarks in the White Mountains. I started to wonder what else people yelp about – what other natural, un... |
// Build returns an instance of KeycloakService ready to be used.
// If a custom realm is configured (WithRealmConfig called), then always Keycloak provider is used
// irrespective of the `builder.config.SelectSSOProvider` value
func (builder *keycloakServiceBuilder) Build() KeycloakService {
notNilPredicate := func(x... |
/**
* Common list utilities
*/
public class ListUtils {
/**
* Merges the 2 lists and returns a new list without repetitions
* @param list1 First list to merge
* @param list2 Second list to merge
* @return a new list which contains all elements in both lists without repetitions
*/
pub... |
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <xok/sys_ucall.h>
#include <xok/pctr.h>
#include "test-server.h"
arg_t *s_state; // the shared state
unsigned int initialized;
arg_t private_area; // the private state
arg_t *p... |
/// Attempts to generate a `UserId` for the given origin server with a localpart consisting of
/// 12 random ASCII characters.
///
/// Fails if the given homeserver cannot be parsed as a valid host.
pub fn new(homeserver_host: &str) -> Result<Self, Error> {
let user_id = format!(
"@{}:{}",
... |
/*
* This function is meant explicitly to grab the definition string from an already generated query
*/
static inline int
extract_defstring(const char * restrict sql, char * restrict defstr) {
register char *i, *j, *defstart;
register int_fast8_t retc;
i = NULL; j = NULL; defstart = NULL;
retc = 0;
if (dbg) {
... |
Practitioner review: schizophrenia spectrum disorders and the at-risk mental state for psychosis in children and adolescents--evidence-based management approaches.
BACKGROUND
Schizophrenia spectrum disorders are severe mental illnesses which often result in significant distress and disability. Attempts have been made ... |
It would be important to evaluate whether this variable remain significantly associated with adenoma in multivariate analyze. Based on the results showed in Table 1, 367 patients had chronic active gastritis, of those 305 were H.pylori positive and 62 were H.pylori negative. It will be interesting to analyze specifica... |
/**
* Called into by the commands infrastructure.
*/
void execCommandClient(OperationContext* opCtx,
Command* c,
int queryOptions,
StringData dbname,
BSONObj& cmdObj,
BSONObjBuilder& result) {
ON_BLO... |
/**
* The type TL abs input photo.
*/
public abstract class TLAbsInputPhoto extends TLObject {
/**
* Instantiates a new TL abs input photo.
*/
protected TLAbsInputPhoto() {
super();
}
} |
import math
def solve(a,b,c,d):
x = math.ceil(c / b)
y = math.ceil(a / d)
return "Yes" if x <= y else "No"
a,b,c,d = map(int, input().split())
ans = solve(a,b,c,d)
print(ans) |
package org.doremus.diaboloConverter.musResource;
import org.apache.jena.vocabulary.RDF;
import org.doremus.diaboloConverter.files.DiaboloRecord;
import org.doremus.ontology.CIDOC;
import org.doremus.ontology.FRBROO;
public class F24_PublicationExpression extends DoremusResource {
public F24_PublicationExpression(D... |
// Deleted return the dxfile status of whether it is deleted
func (df *DxFile) Deleted() bool {
df.lock.RLock()
defer df.lock.RUnlock()
return df.deleted
} |
<reponame>Commercionetwork/Commercio.network
package cli_test
import (
"testing"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/stretchr/testify/require"
"github.com/commercionetwork/commercionetwork/x/documents/client/cli"
"github.com/commercionetwork/commercionetwork/x/documents/types"
)
... |
#include<bits/stdc++.h>
using namespace std;
int fr;
string st;
int hh, mm;
int main(){
cin>>fr;
cin>>st;
hh = 10*(st[0]-'0')+(st[1]-'0');
mm = 10*(st[3]-'0')+(st[4]-'0');
if(mm>59){
st[3]='0';
}
if(fr==24){
if(hh>23){
st[0]='0';
}
}
else{
if(hh==0){
st[0]='1';
}
... |
<reponame>pietelite/SpongeAPI<filename>src/main/java/org/spongepowered/api/state/StateMatcher.java
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charg... |
On August 22, Sixpoint Brewery announced that it hired Eric Bachli as the chief product officer. Bachli was previously the head brewer at Trillium Brewing Company, where he scaled production and helped turn Trillium into a destination brewery known for big, hazy IPAs and special releases.
In the press release announci... |
/** Condition that applies if the field is true */
public class FieldIsTrueCondition extends AbstractBooleanFieldCondition {
FieldIsTrueCondition(String field) {
super(field);
}
@Override
protected boolean applies(@Nullable Boolean bool) {
return Boolean.TRUE.equals(bool);
}
@Override
public St... |
import java.util.*;
public class temp {
public static void main(String sdf[]){
Scanner s = new Scanner(System.in);
int t;
t = s.nextInt();
int a[] = new int[t];
int arr[];
String ans[] = new String[t];
for(int i=0;i<t;i++){
a[i] = s.nextInt();
arr = new int[a[i]];
for(int k=0;k<a[... |
/* --------------------------------------------------------------------
dont_learn
Hack for learning. Allow user to denote states in which learning
shouldn't occur when "learning" is set to "except".
-------------------------------------------------------------------- */
Symbol *dont_lea... |
/*!
* brief Initializes the LCDIF v2.
*
* This function ungates the LCDIF v2 clock and release the peripheral reset.
*
* param base LCDIF v2 peripheral base address.
*/
void LCDIFV2_Init(LCDIFV2_Type *base)
{
#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
uint32_t... |
<gh_stars>0
import React from 'react';
import { inject, observer } from 'mobx-react';
import { withStyles, CircularProgress } from '@material-ui/core';
import styles from 'assets/jss/Users';
import Users from 'components/Users';
import { User, UsersContainerProps, UsersContainerState } from 'models/Users';
@inject('u... |
/**
* <code>checkBeforeSend</code> è un metodo che verifica gli eventi avversi inseriti dall'utente.
* <br>È dichiarato <strong>private</strong> in quanto metodo utilizzato solo all'interno della classe
*/
private void checkBeforeSend() {
clearLists();
for (EventoAvversoPerL... |
// This test exists because looping over pointers as done when cleaning up expired/deposed
// resources (and deposed secrets) can lead to surprising behaviors. The test below ensures
// that things are working as intended.
func TestProcessCleanup(t *testing.T) {
tests := []struct {
description string
conf... |
<filename>api/src/main/java/de/adesso/objectfieldcoverage/api/filter/AssignmentsRightHandSideTypeFilter.java
package de.adesso.objectfieldcoverage.api.filter;
import spoon.reflect.code.CtAssignment;
import spoon.reflect.code.CtExpression;
import spoon.reflect.visitor.filter.TypeFilter;
/**
* A {@link TypeFilter} whi... |
<filename>cli/commands/run/run.block.ts<gh_stars>0
import { assertExists } from '../../utils';
import { RunHandlersOnBlock } from '../../utils/run.handlers.on.block';
// runs agent handlers against specified block number/hash
export type RunBlock = (blockNumberOrHash: string) => Promise<void>
export function provideR... |
<filename>streamlit_webrtc/frontend/src/ThemeProvider.tsx
import React from "react";
import { Theme } from "streamlit-component-lib";
import {
createTheme,
ThemeProvider as MuiThemeProvider,
} from "@material-ui/core/styles";
import chroma from "chroma-js";
interface StreamlitThemeProviderProps {
theme: Theme | ... |
def evaluate(self,
x: np.ndarray,
y: np.ndarray,
batch_size: int = None,
verbose: int = 1,
prefix: str = "") -> dict:
x, y = self.__check_data(x, y)
batch_size = batch_size or len(x)
self.__update_io_shapes(batc... |
/**
* Factory to build an AndroidPlatformTarget that corresponds to a given Google API level.
*/
private static class AndroidWithGoogleApisFactory implements Factory {
@Override
public AndroidPlatformTarget newInstance(File androidSdkDir, int apiLevel) {
String addonPath = String.format("/add-ons/a... |
// "by cc" in order to support sort
bool LiveConfigsWnd::SelectByCCValue(int _configId, int _cc, bool _selectOnly)
{
if (_configId == g_configId)
{
SWS_ListView* lv = GetListView();
HWND hList = lv ? lv->GetHWND() : NULL;
if (lv && hList)
{
for (int i=0; i < lv->GetListItemCount(); i++)
{
LiveConfi... |
def _sibling_path(self, label):
return '//td[contains(., "%s:")]/following-sibling::td[1]' % (label,) |
#ifndef MKCREFLECT_TEST_H_
#define MKCREFLECT_TEST_H_
#include <string.h>
#include <stdio.h>
#ifdef __linux__
# define PRINT_COLOR
#endif
#ifdef PRINT_COLOR
# define COLOR_RED "\x1B[31m"
# define COLOR_GREEN "\x1B[32m"
# define COLOR_RESET "\033[0m"
#else
# define COLOR_RED
# define COLOR_GREEN
# define COL... |
<filename>Week 08/id_090/LeetCode_387_090.go
package main
import "fmt"
func main() {
s := "abcaaaa"
fmt.Println(firstUniqChar(s))
}
func firstUniqChar(s string) int {
lens := len(s)
if lens <= 0 {
return -1
}
m := make(map[uint8]int, lens)
for i := range s {
m[s[i]]++
}
for i := range s {
if m[s[i]... |
/**
* <p>Clase Java para SetAccountFeatureOptInResult complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
*
* <pre>
* <complexType name="SetAccountFeatureOptInResult">
* <complexContent>
* <restriction base="{http://www.w3.o... |
US seeks to reassure Turkey that Kurdish troops will not be in a position to take over Sunni Arab city in Syria
Arab forces will lead the fight to recapture Raqqa from Islamic State, the US has said, as it seeks to soothe Turkish concerns that Kurdish troops could take over the predominantly Sunni Arab city in Syria.
... |
/// Upload a file to Azure Blob Store using a fully qualified SAS token
pub fn upload_sas(filename: &str, sas: &str, block_size: usize) -> Result<(), Box<dyn Error>> {
let block_size = cmp::min(block_size, MAX_BLOCK_SIZE);
let (account, container, path) = parse(sas)?;
let client = Client::azure_sas(&account... |
#pragma once
#include "calotypes/DatasetFunctions.hpp"
#include <boost/foreach.hpp>
#include <memory>
namespace calotypes
{
// TODO Constify
/*! \brief Interface class for selecting a subset of data. */
template <class Data>
class DataSelector
{
public:
typedef std::shared_ptr<DataSelector> Ptr;
typedef std::ve... |
def recurseMayaScriptPath(roots=[], verbose=False, excludeRegex=None, errors='warn', prepend=False):
pass |
Authorities in the eastern Chinese province of Zhejiang are pressing ahead with a demolition campaign targeting “illegal” Christian crosses amid growing resistance from local believers.
Government-backed demolition gangs have taken down crosses from the tops of churches in provincial capital Wenzhou, Taizhou, Huzhou a... |
Convert Microsoft Word to Plain Text
This is a repost of an entry from 2004. This Word-cleaning functionality is showing up in more and more web editors, but people might still find this useful.
Most of the time when I’m writing content for the web (for this blog, or a forum comment, or whatever), I’ll write in Micro... |
/// Render help text for a windows
fn render_help(&self, console: &mut dyn ConsoleOut, timeout: usize, update: bool) {
self.set_help_region(console);
// render the helper text for the selected component
match self.entries.get(self.selected) {
Some(entry) => entry.help(console),
... |
/**
* A basic implementation of LogListener. This implementation saves each log
* entry over the debug threshold into a file. The file location is determined
* by config parameters passed to BasicLog.
*
* BasicLog starts with three LogListeners; FileLogListener (this one),
* GraphicLogListener, and ConsoleL... |
import type { NextApiRequest, NextApiResponse } from "next";
import fetchPR from "lib/fetchPR";
import { PRData } from "lib/types";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse<PRData>
) {
const { prNumber, repoName, repoOwner } = req.query;
res
.status(200)
.json(
... |
<reponame>guapi233/Tifa-web
/**
* Setting 二级路由 下的三级路由
*/
const Setting = () =>
import(/* webpackChunkName: "Setting" */ "@/views/Setting.vue");
const SettingBase = () =>
import(/* webpackChunkName: "SettingBase" */ "@/views/Setting/Base.vue");
const SettingAccount = () =>
import(
/* webpackChunkName: "Sett... |
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(clippy::upper_case_acronyms)]
/// Length of config word sector in words
pub const CONFIG_SECTOR_LENGTH: usize = 4;
type USERID = u16;
/// Alternate I/O Select for I2C1
pub enum AI2C1 {
/// I2C1 uses the ASDA1/ASCL1 pins
ON = 0x1,
/// I2C1... |
/* Enqueue multiple data into the ring tail. Num is smaller than ring size. */
static inline uint32_t ring_mpmc_enq_multi(ring_mpmc_t *ring,
uint32_t *ring_data,
uint32_t ring_mask,
const uint32_t data[],
uint32_t num)
{
uint32_t old_head, new_head, r_tail, num_free, i;
uint32_t size =... |
Cointelegraph speaks to Devon Watson, Diebolds VP of Global Software R&D, on a mobile driven ATM, conditions for using Bitcoin in mobile banking and implementation of Blockchain into the Diebold platform.
Diebold Inc are a financial self-service, security and services corporation, incorporated in the United States sin... |
#include "helpers.hpp"
std::string HELPERS::resolvePath(std::string path) {
wxFileName relativeToExecutable(wxStandardPaths::Get().GetExecutablePath());
relativeToExecutable.RemoveDir(relativeToExecutable.GetDirCount() - 1);
#ifdef __WXMSW__
wxFileName fullPath(relativeToExecutable.GetPathWithSep() + path, wxPATH_... |
/**
*
* @author Gaurav Gupta
*/
public class HierarchyWindowController extends WindowController {
public HierarchyWindowController(DocumentWindowController documentWindowController) {
super(HierarchyWindowController.class.getResource("resource/HierarchyWindow.fxml"), documentWindowController);
... |
<filename>src/pages/home/home.page.ts
import { Component } from '@angular/core';
import { Nav } from 'ionic-angular';
import { AuthService } from '../../providers/auth-service';
import { CalendarPage } from '../calendar/calendar.page';
import { ThemeableBrowserPage } from '../themeable-browser/themeable-browser.page';
... |
import { ReactComponent } from "./round-shuffle-24px.svg";
export const ShuffleIcon = ReactComponent;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.