content stringlengths 10 4.9M |
|---|
A statistical analysis by Peking University Library shows that when its student body isn't reading course-assigned books about economics and politics, they are showing a preference for Japan's top thriller and mystery writer, Keigo Higashino.
According to a 21-page report, Higashino's thriller Mysterious Night is the ... |
/** Contains tests for the {@link LocalConverter} class. */
@ExtendWith(LocalOfficeManagerExtension.class)
public class LocalConverterITest {
private static final File SOURCE_FILE = documentFile("/test.doc");
@Test
public void convert_FromFileToFile_ShouldSucceeded(
final @TempDir File testFolder, final D... |
use log::info;
/// Camera struct
pub struct Camera {
camera: rscam::Camera,
width: u32,
height: u32,
}
impl Camera {
/// Web camera interface
/// # Arguments
/// - device_: The device name. For example, "/dev/video0"
/// - width_: The width of camera device
/// - height_: The height of... |
from path import Path
from random import random
import argparse
import pandas as pd
import random
def relpath_split(relpath):
relpath = relpath.split('/')
traj_name=relpath[0]
shader = relpath[1]
frame = relpath[2]
frame=frame.replace('.png','')
return traj_name, shader, frame
def writelines... |
str1 = input()
n, k = str1.strip().split()
n = int(n)
k = int(k)
str2 = input()
arr = [ int(i) for i in str2.strip().split()]
#var
maxSeg = 1
front = 0
back = 0
i = 0
# loop
while i < n:
back = i
front = i
while i < n-1 and arr[i+1]!=arr[i]:
i+=1
front = i
seg = front - back + 1
if seg > maxSeg:
maxSeg = s... |
def _update_widget_view(self):
for str_option in self._dict_but_by_option:
but_wid = self._dict_but_by_option[str_option]
if str_option in self.value:
but_wid.value = True
but_wid.button_style = "success"
else:
but_wid.value = F... |
import React from 'react'
function Remaining() {
return (
<div className="alert alert-success">
<span>Remaining: 1000$</span>
</div>
)
}
export default Remaining
|
import { px } from "style-value-types"
import { ResolvedValues } from "../../types"
const dashKeys = {
offset: "stroke-dashoffset",
array: "stroke-dasharray",
}
const camelKeys = {
offset: "strokeDashoffset",
array: "strokeDasharray",
}
/**
* Build SVG path properties. Uses the path's measured lengt... |
# coding=utf-8
# Copyright 2021 The OneFlow Authors. All rights reserved.
#
# 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 require... |
<filename>src/dtos/create-cancel-ticket.dtos.ts
export class CancellationTicketDto {
oldTicketId: string;
lostPercentage: number;
}
|
def viewbox_mouse_event(self, event):
if not self._key_events_bound:
self._key_events_bound = True
event.canvas.events.key_press.connect(self.viewbox_key_event)
event.canvas.events.key_release.connect(self.viewbox_key_event) |
Optimal interpolation schemes for particle tracking in turbulence.
An important aspect in numerical simulations of particle-laden turbulent flows is the interpolation of the flow field needed for the computation of the Lagrangian trajectories. The accuracy of the interpolation method has direct consequences for the ac... |
U.S. Secretary of State John Kerry said Thursday that Jews in the Ukrainian city of Donetsk were recently given notices instructing them to officially identify themselves as Jews.
“In the year 2014, after all of the miles traveled and all of the journey of history, this is not just intolerable, it’s grotesque. It is b... |
This President of the United States is the first president we've ever had who thinks he can choose which laws to enforce and which laws to ignore. He announces just about every day one change after another after another in Obamacare. It's utterly lawless. It is inconsistent with our Constitution, and it ought to troubl... |
00:39 Lightning Strike Fire at South Carolina State Park Fire that was probably caused by a lightning strike kills a variety of animals at a nature center in a South Carolina state park. Park workers and campers are shocked and saddened.
At a Glance Fish, turtles, alligators and snakes were killed in a fire at the nat... |
from collections import defaultdict
def _get_node_successors(edges, from_id_col, to_id_col):
edge_cnt = len(edges)
node_successors = defaultdict(list)
from_ids = edges[from_id_col].to_list()
to_ids = edges[to_id_col].to_list()
for i in range(0, edge_cnt):
node_successors[from_ids[i]].appe... |
<gh_stars>1-10
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, q;
cin>>n>>q;
vector<int> v(n, 0);
while(q--){
int l, r;
cin>>l>>r;
v[l]++;
if(r+1 < n){
v[r+1]--;
}
}
for(int i=1; i<n; i++){
v[i] = v[i] + v[i-1];
}
for(auto el : v){
cout<<el<<" ";
}
return 0;
} |
<filename>maven/java-ee-spring-boot-2.2.2-study/ee-spring-boot-2.2.2-ztree-3.5/src/main/java/com/litongjava/module/spring/boot/ztree/service/impl/TreeMenuServiceImpl.java
package com.litongjava.module.spring.boot.ztree.service.impl;
import com.litongjava.module.spring.boot.ztree.model.TreeMenu;
import com.litongjava.m... |
#include "NNLayer.h"
#include <iostream>
#include <math.h>
float NNLayer::sigmoid(const float x) const {
return 1.f / (1 + exp(-x));
}
NNLayer::NNLayer(int numNodes, int numTargetNodes) {
values.resize(numNodes, 0);
for (int i = 0; i < numNodes; i++) {
for (int j = 0; j < numTargetNodes; j++) {
... |
<filename>pkg/ruler/mapper.go
package ruler
import (
"crypto/md5"
"net/url"
"path/filepath"
"sort"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/prometheus/prometheus/pkg/rulefmt"
"github.com/spf13/afero"
"gopkg.in/yaml.v3"
)
// mapper is designed to enusre the provided rule sets... |
#pragma once
#include "searchengine.hpp"
#include <annoy/annoylib.h>
#include <annoy/kissrandom.h>
class SEAnnoy : public SearchEngine
{
public:
typedef std::shared_ptr<SEAnnoy> SEAnnoyPtr;
public:
SEAnnoy(const TorchManager::TorchManagerPtr &torch_manager,
const DatabaseManager::DatabaseManage... |
<gh_stars>0
use core::ops::Index;
use necsim_core_bond::{NonNegativeF64, PositiveF64};
use super::{Habitat, LineageReference, OriginSampler};
use crate::{
landscape::{IndexedLocation, Location},
lineage::{GlobalLineageReference, Lineage},
};
#[allow(clippy::inline_always, clippy::inline_fn_without_body)]
#[c... |
def _access_checks(self, c_type: str) -> int:
return self._checks.index(next(
item for item in self._checks if item['c_type'] == c_type)) |
//NewRoom creates a room with name.
func NewRoom(name string) *Room {
newRoom := new(Room)
newRoom.name = name
newRoom.clients = NewClientList()
newRoom.messages = message.NewMessageList()
return newRoom
} |
def harmonic_amplitudes_to_signal(f0_t: Tensor, harmonic_amplitudes_t: Tensor,
sampling_rate: int, min_f0: float) -> Tensor:
_, n_harmonic, _ = harmonic_amplitudes_t.shape
f0_map = freq_multiplier(n_harmonic, f0_t.device) * f0_t
weight_map = (
freq_antialias_mask(sa... |
// processSuccess processes case after successful code processing via setting a corresponding status and output to cache
func processSuccess(ctx context.Context, output []byte, pipelineId uuid.UUID, cacheService cache.Cache, status pb.Status) {
switch status {
case pb.Status_STATUS_COMPILING:
logger.Infof("%s: Vali... |
def remove(self, assets: dict):
def _remove_assets(assets_df, exclude_asset, exclude_dates, granularity=self._granularity):
dates = [str_to_ts(dt) for dt in exclude_dates]
assert len(dates) % 2 == 0, f'Unsupported datetime sequence for {exclude_asset}: odd amount of dates.'
f... |
<filename>source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/ParticipantInfo.java
//package com.jd.blockchain.ledger;
//
//import com.jd.blockchain.base.data.TypeCodes;
//import com.jd.blockchain.binaryproto.DataContract;
//import com.jd.blockchain.binaryproto.DataField;
//import com.jd.blockchain.crypto... |
/**
* Die initiale Position auch darstellen.
* Der init() wird auch bei neuen Entities/Components aufgerufen.
*
* @param group
*/
@Override
public void init(EcsGroup group) {
if (group != null) {
GraphMovingComponent gmc = (GraphMovingComponent) group.cl.get(0);
... |
// Add an exception frame for a PLT. This is called from target code.
void
Layout::add_eh_frame_for_plt(Output_data* plt, const unsigned char* cie_data,
size_t cie_length, const unsigned char* fde_data,
size_t fde_length)
{
if (parameters->incremental())
{
return;
}
Output_section* os... |
/**
* @brief Internal helper function to validate model files.
*/
static int
__ml_validate_model_file (const char *const *model,
const unsigned int num_models, gboolean * is_dir)
{
guint i;
if (!model || num_models < 1) {
_ml_loge ("The required param, model is not provided (null).");
return ML_ERROR_... |
def create_thriftpy_context(server_side=False, ciphers=None):
if MODERN_SSL:
if server_side:
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
else:
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
if ciphers:
context.set_ciphers(c... |
FROM THE OP -"I was inside my apartment when I heard the first explosion and witnessed smoke raising into the sky. I turned my camera on placing it on to the balcony of my apartment and continued getting myself ready for work. Several minutes later, there was a much larger explosion. This explosion blew my camera backw... |
/**
* A Filter that provides response caching, for HTTP {@code GET} requests.
* <p>
* Originally based on ideas and code found in the ONJava article
* <a href="http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html">Two
* Servlet Filters Every Web Application Should Have</a>
* by Jayson Falkner.
* </p>
*
*... |
//! diameter filter test case for binned class with periodic boundary conditions
UP_TEST(NeighborListStencil_diameter_shift_periodic)
{
neighborlist_diameter_shift_periodic_tests<NeighborListStencil>(
std::shared_ptr<ExecutionConfiguration>(
new ExecutionConfiguration(ExecutionConfiguration:... |
def flush(self, indexes=['_all'], refresh=None):
path = self._make_path([','.join(indexes), '_flush'])
args = {}
if refresh is not None:
args['refresh'] = refresh
response = self._send_request('POST', path, querystring_args=args)
return response |
DESLOCAMENTO = (
(-1, 0), # pra cima
( 1, 0), # pra baixo
( 0, -1), # pra esquerda
( 0, 1) # par direita
)
def possivel(i, j, n, m):
return 0 <= i < n and 0 <= j < m
def site_vazio(maze, n, m):
for i in range(n):
for j in range(m):
if maze[i][j] == ".":
... |
def define_input_fields(params):
pixelsX = params['pixelsX']
pixelsY = params['pixelsY']
dx = params['Lx']
dy = params['Ly']
xa = np.linspace(0, pixelsX - 1, pixelsX) * dx
xa = xa - np.mean(xa)
ya = np.linspace(0, pixelsY - 1, pixelsY) * dy
ya = ya - np.mean(ya)
[y_mesh, x_mesh] = np.meshgrid(ya... |
def _generate_task_from_yield(tasks, func_name, task_dict, gen_doc):
if not isinstance(task_dict, dict):
raise InvalidTask("Task '%s' must yield dictionaries" %
func_name)
msg_dup = "Task generation '%s' has duplicated definition of '%s'"
basename = task_dict.pop('basename'... |
// open opens and initializes the view.
func (v *view) open() error {
if strings.HasPrefix(v.name, viewBSIGroupPrefix) {
v.cacheType = CacheTypeNone
}
if err := func() error {
v.logger.Debugf("ensure view path exists: %s", v.path)
if err := os.MkdirAll(v.path, 0777); err != nil {
return errors.Wrap(err, "cr... |
Anti-windup in mid-ranging control
The implementation of anti-windup methods in mid-ranging control needs further attention. It is demonstrated how use of standard anti-windup schemes may give unnecessary performance degradation during saturation. The problem is illustrated for two separate systems, control of oxygen ... |
/**
* Default implementation of {@link ThreeDDocument}.
*
* @since 8.4
*/
public class ThreeDDocumentAdapter implements ThreeDDocument {
final DocumentModel docModel;
public ThreeDDocumentAdapter(DocumentModel threed) {
docModel = threed;
}
@Override
public ThreeD getThreeD() {
... |
This article is part 1 of an upcoming article series, Storm vs. Heron. Follow me on Twitter to make sure you don’t miss the next part!
When upgrading your existing Apache Storm topologies to be compatible with Twitter’s newest distributed stream processing engine, Heron, you can just follow the instructions over at He... |
// Send sends message to given client ID
func (nb *NodeBag) Send(message NodeMessage) {
if node, ok := nb.nodes[message.nodeID]; ok {
node.outgoing <- message.Message
}
} |
package mil.nga.giat.geowave.adapter.vector.render;
import org.geoserver.wms.WMS;
import org.geoserver.wms.WMSInfo;
import org.geoserver.wms.WMSInfo.WMSInterpolation;
import org.geoserver.wms.WMSInfoImpl;
public class DistributedRenderWMSFacade extends
WMS
{
private final DistributedRenderOptions options;
public... |
/**
* OpenCV UI part, handling mouse actions
*/
static void mouse_callback(int event, int x, int y, int flags, void *userdata)
{
auto coordinate = (int*) userdata;
int rows = coordinate[0];
int cols = coordinate[1];
bool clicked = false;
bool mouse_moved = false;
switch (event) {
cas... |
<filename>app/src/main/java/com/moviebomber/adapter/MenuAdapter.java
package com.moviebomber.adapter;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import androi... |
/**
* Send a POST request to update the error information about the device identifier, as an object
* {@link DeviceState}.
*
* @param deviceId the device identifier.
* @param state device state information containing the error.
*/
public void postError(final String deviceId, final DeviceState state... |
#include<bits/stdc++.h>
#include<unistd.h>
using namespace std;
#define FZ(n) memset((n),0,sizeof(n))
#define FMO(n) memset((n),-1,sizeof(n))
#define F first
#define S second
#define PB push_back
#define ALL(x) begin(x),end(x)
#define SZ(x) ((int)(x).size())
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define ... |
// "Pull method 'foo' up and make it abstract" "true"
public class Test{
void main(){
new Int(){
@Override
void foo(){
}
};
}
} |
Your Brain on Facebook: Neuropsychological Associations with Social Versus other Media
We measured individuals’ mental associations between four types of media (books, television, social/Facebook, and general informational web pages) and relevant concepts (Addictive, Story, Interesting, Frivolous, Personal, and Us... |
import random
'''
ДЗ
Это игра Дурак на которую я буду писать pytest & unitTest
'''
class Card:
'''Класс стандартной игральной колоды'''
def __init__(self, suit, rank):
'''Инициализация карты'''
self.suit = suit # атрибут экз-ра класса Масть
self.rank = rank # атрибут экз-ра класса... |
<reponame>dyna-mis/Hilabeling<filename>src/customwidgets/qgsrasterbandcomboboxplugin.h
/***************************************************************************
qgsrasterbandcomboboxplugin.h
--------------------------------------
Date : 09.05.2017
Copyright : (C) 2017 <NAME>
... |
Cars on Metra tracks View Full Caption
BUCKTOWN — Two cars driven by a husband and wife were stuck on an outbound Metra railroad line between North and Armitage Avenues in Bucktown near the Kennedy Expy., police and Metra workers said.
A Union Pacific Northwest Metra train that was headed toward the North/Clybourn st... |
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define P pair<int, int>
#define ll long long
#define x 100010
using namespace std;
int main(){
cin.tie(0);
int n,m;cin >> n >> m;
int h[x],c[x];
for(int i=1;i<=n;i++){
cin >> h[i... |
package main
// import (
// "errors"
// "fmt"
// "log"
// "strconv"
// "time"
//
// "github.com/cagnosolutions/adb"
// "github.com/cagnosolutions/mg"
// )
//
// type ScheduledEmail struct {
// Id string `json:"id"`
// Time int64 `json:"time"`
// Data ... |
def OnCopy(self, event):
if self.currentCtrl == JetDefs.MAIN_SEGLIST:
if self.currentSegmentName is None:
return ""
segment = self.jet_file.GetSegment(self.currentSegmentName)
if segment == None:
return ""
self.clipBoard = JetCutCop... |
#include<functional>
#include<algorithm>
#include<iostream>
#include<numeric>
#include<cassert>
#include<cstring>
#include<vector>
#include<queue>
//#include<cmath>
#include<set>
#include<map>
using namespace std;
typedef unsigned long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<LL>... |
#ifndef CPPUNIT_PORTABILITY_H
#define CPPUNIT_PORTABILITY_H
#if defined(_WIN32) && !defined(WIN32)
# define WIN32 1
#endif
/* include platform specific config */
#if defined(__BORLANDC__)
# include <cppunit/config/config-bcb5.h>
#elif defined (_MSC_VER)
# if _MSC_VER == 1200 && defined(_WIN32_WCE) //evc4
# inclu... |
<filename>hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/matcher/subscriber/SubscriptionActivatingSubscriberTest.java
package ca.uhn.fhir.jpa.subscription.match.matcher.subscriber;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir... |
/**
* Produce a list of results from the list of values associated to the given key. The algorithm tries to match every value
* found to a mapper stored, and adds the result created if it succeeds to do so.
* @param key the full path to the key corresponding to a list of string values
* @param c... |
/// Processes one bit of input, returning a valid message, an error, or pending. May be called
/// repeatedly to continuously process incoming messages.
///
/// # Example
///
/// ```no_run
/// # use nexus_revo_io::{SymReaderFsm, SymReaderFsmPoll};
/// # use libftd2xx::{Ft232h, Ftdi};
/// # use libftd2xx_cc1101::CC1101;... |
import Control.Monad
import Data.List
import qualified Data.ByteString.Char8 as B
import qualified Data.Vector.Unboxed as UV
r2 [a,b]=(a,b)
main = do
[n,w]<-map read.words<$>getLine::IO [Int]
wvs<-replicateM n $ r2.unfoldr (B.readInt.B.dropWhile(<'!'))<$>B.getLine
print $ f n w wvs
f n w = (UV.! w).foldl'... |
On Tuesday, Kristian Dyer of Metro US dropped the news that Atlanta United was exploring starting a reserve team in USL as early as 2018. The report relies on information from an anonymous source within the league, who states that efforts for the Five Stripes to expand into USL for 2018 are moving “in a positive direct... |
<reponame>ericniebler/time_series
// Copyright <NAME> 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_SEQUENCE_BEGIN_DWA200655_HPP
# define BOOST_SEQUENCE_BEGIN_DWA200655_HPP
# include <bo... |
package chapter4.demo493;
public class Demo {
public static void main(String[] args) {
Boolean flag=true;
if (flag) {
System.out.println("Hello");
}
}
}
|
/**
* Generates a String representation of the Chess board
* with the n queens placed in it.
* @return
*/
public String drawBoard(){
int[][] board = new int[gridSize][gridSize];
placedQueens.forEach(queen -> board[queen.getCol()][queen.getRow()] = 1);
final StringBuilder sb =... |
def _parseIperf( iperfOutput ):
r = r'([\d\.]+ \w+/sec)'
m = re.findall( r, iperfOutput )
if m:
return m[-1]
else:
error( 'could not parse iperf output: ' + iperfOutput )
return '' |
//flag definitions as per accordance to the help document
func init() {
rootCmd.AddCommand(wcCmd)
wcCmd.Flags().BoolVarP(&char, "chars_count", "m", false, "Display the number of characters")
wcCmd.Flags().BoolVarP(&line, "lines_count", "l", false, "Display number of lines")
wcCmd.Flags().BoolVarP(&max_line, "max_le... |
<gh_stars>0
package com.jiyun.qcloud.pop;
import android.app.Activity;
import android.util.Log;
import java.util.Stack;
/**
* 设计一个全局的Activity栈,使用这个栈来管理Activity
*/
public class ActivityMgr {
private static Stack<Activity> activityStack;
private static ActivityMgr instance;
/**
* 构造方法
*/
p... |
/**
* Created by emil.ivanov on 2/18/18.
* <p>
* Infinite scroll solution is based on this stack post
* https://stackoverflow.com/questions/35673854/how-to-implement-infinite-scroll-in-gridlayout-recylcerview
*/
public class AdapterMovieCollection extends RecyclerView.Adapter<AdapterMovieCollection.ViewHolder> {
... |
package br.com.angrybits.angrybitsCore.entity;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.... |
/**
* DistributionReport gives total consumption and production for the timeslot,
* summed across all brokers.
*/
public void handleMessage(DistributionReport dr) {
PrintService.getInstance().addDistributionReport(dr.getTimeslot(), dr.getTotalProduction(),
dr.getTotalConsumption());
} |
George O’Donnell died at his home in McKinleyville, California on May 12, 2016 at the age of 86. He left behind gallons of bourbon, vodka and gin that we have no idea what to do with as we are all sober. He was self-indulgent, kind and curious, fond of jokes and unexplainable phenomenon. He believed in UFOs and liked t... |
The narrow road that leads to Alakhpura, in Haryana's Bhiwani district, is mostly empty on this sultry August afternoon. The clouds above portend heavy showers. The farmers are returning from the fields, leading cows back into their shelters. And just as the village's day is drawing to a close, you can see some two doz... |
#ifndef SPACE_COMPONENTS_AI_FOLLOW_HPP
#define SPACE_COMPONENTS_AI_FOLLOW_HPP
namespace space::components {
struct AIFollow {};
} // namespace space::components
#endif
|
Disc galaxy resolved in HI absorption against the radio lobe of 3C 433: Case study for future surveys
The neutral atomic gas content of galaxies is usually studied in the HI 21cm emission line of hydrogen. However, at higher redshifts, we need very deep integrations to detect HI emission. The HI absorption does not su... |
List1 = []
List2 = []
Number = input()
for i in range(int(Number)):
Word = input()
List1.append(Word)
for W in List1:
if len(str(W)) > 10:
Abbreviation = W[0] + str(len(W)-2) + W[-1]
List2.append(Abbreviation)
else:
List2.append(W)
for i in List2:
print(i... |
<gh_stars>1-10
package io.fno.grel;
public class ControlsFunctions {
/**
* Expression o is evaluated to a value. If that value is true, then expression eTrue is evaluated and the result is the value of the whole if expression.
* @param b
* @param eTrue
* @param eFalse
* @return Object
... |
def step(self, action):
time_between_steps = time.time() - self._last_step_time
if time_between_steps < self._desired_time_between_steps:
time.sleep(self._desired_time_between_steps - time_between_steps)
self._last_step_time = time.time()
self._step_counter += 1
return self._gym_env.step(actio... |
Disability Rights and Compulsory Psychiatric Treatment: The Case for a Balanced Approach under the Mental Health (Compulsory Assessment and Treatment) Act 1992
This article argues the New Zealand Government's current approach to compulsory psychiatric treatment is unjustifiable in a human rights context. Under s 59 of... |
/**
* Provides logical grouping for actors, agents and dataflow tasks and operators. Each group has an underlying thread pool, which will perform actions
* on behalf of the users belonging to the group. Actors created through the DefaultPGroup.actor() method
* will automatically belong to the group through which the... |
/*
* Wine Message Compiler output generation
*
* Copyright 2000 <NAME> (BS)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your opti... |
// +build behaviour
package fundi
import (
"os"
"testing"
"github.com/cucumber/godog"
"github.com/kasulani/go-fundi/internal/behaviour"
)
func TestBehaviour(t *testing.T) {
specs := behaviour.NewTestSpecifications()
suite := godog.TestSuite{
Name: "fundi",
TestSuiteInitializer: initializeS... |
//
// Function: OBOUserAddRefSpecialCase
//
// Purpose: Handle a special case where when upgrading from NT351 or NT 4
// with MS's "File and Print" and GSNW. In this case we need to
// AddRef OBOUser F&P, so removal of GSNW does not remove F&P.
//
// Parameters: pWizard [IN] - ... |
/**
* A builder that creates proxies based on provided target concrete class and
* {@link MethodHandler} instance.
*
* @author Pavel Sorocun (psorocun@tacitknowledge.com)
*/
public class ProxyBuilder
{
private Class aClass;
private MethodHandler handler;
public <T> ProxyBuilder aClass(final Class<T> a... |
def vector_space_search(self, words=[], **kwargs):
top = kwargs.pop("top", 10)
if not isinstance(words, (list, tuple)):
words = [words]
if not isinstance(words, Document):
kwargs.setdefault("threshold", 0)
words = Document(" ".join(words), **kwargs)
i... |
<gh_stars>1-10
import {AliasTagCallBackData, Common, InitOption} from './jiguang-push.common';
export declare class JiguangPush extends Common {
// define your typings manually
// or..
// take the ios or android .d.ts files and copy/paste them here
/**
* get the sdk version
*/
public sta... |
/**
* Resolves the endpoint of the partition for the given request
*
* @param request Request for which the partition endpoint resolution is to be performed
* @param forceRefreshPartitionAddresses Force refresh the partition's endpoint
* @return ResolutionResult
*/
p... |
package tw.com.sample.chyiiiiiiiiiiii.fusedlocationprovider;
import android.annotation.SuppressLint;
import android.location.Location;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.lo... |
<reponame>best08618/asylo<gh_stars>1-10
/* Copyright (C) 2012-2017 Free Software Foundation, Inc.
Contributed by <NAME> <<EMAIL>>.
This file is part of the GNU Atomic Library (libatomic).
Libatomic is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License... |
/**
* Resolves a path to its target node while also visiting all nodes along the way.
* @param document the document to resolve the path relative to
* @param visitor an optional visitor to invoke for each node in the path (can be null)
*/
public Node resolveWithVisitor(Document document, IVisitor vi... |
N, M = map(int, input().split())
A = [list(map(int, input().split())) for i in range(N)]
def calc(hold):
participants = {i: 0 for i in range(1, M + 1)}
for person in A:
for sport in person:
if sport not in hold:
continue
participants[sport] += 1
brea... |
Twisted Fourier(-Stieltjes) spaces and amenability
The Fourier(-Stieltjes) algebras on locally compact groups are important commutative Banach algebras in abstract harmonic analysis. In this paper we introduce a generalization of the above two algebras via twisting with respect to 2-cocycles on the group. We also defi... |
/**
*
* @see <a href=
* "../../doc-files/api-spec.html#_types.aggregations.BucketCorrelationFunctionCountCorrelationIndicator">API
* specification</a>
*/
@JsonpDeserializable
public class BucketCorrelationFunctionCountCorrelationIndicator implements JsonpSerializable {
private final int docCount;
priv... |
import Data.Char
solve :: [Char] -> [Char]
solve (x:xs) = if length (filter (`elem` ['A'..'Z']) xs) == (length xs) then [if x >= 'a' then toUpper x else toLower x] ++ map toLower xs else [x]++xs
main :: IO()
main = do
s <- getLine
putStr(solve s)
|
#include <stdio.h>
int main()
{
int n,flg =0,ko,gyo,cnt=0,kaz;
scanf("%d",&n);
char U[101][101];
for(int i=0;i<n;i++){
for(int j=0;j<n;j++) U[i][j]='0';
}
for(int i=0;i<n;i++){
kaz =0;flg =0;cnt=0;
scanf("%d %d",&gyo,&ko);
for(int j=0;j<ko;j++){
scanf... |
/**
* A {@link org.terasology.engine.persistence.StorageManager} that performs reading only.
*/
public final class ReadOnlyStorageManager extends AbstractStorageManager {
public ReadOnlyStorageManager(Path savePath, ModuleEnvironment environment, EngineEntityManager entityManager,
... |
<gh_stars>0
package zaplog
import (
"go.uber.org/zap"
"net"
"net/http"
)
var zapLoggerHttpServer string
func runZapLoggerHttpServer(config *zapLoggerConf, level zap.AtomicLevel) {
mux := http.NewServeMux()
mux.Handle(config.logApiPath, level)
listener, err := net.Listen("tcp", config.listenAddr)
if err != nil... |
def _getSynVers(self):
version = self.sharinfo.get('syn:version')
return version |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.