content stringlengths 10 4.9M |
|---|
def execute(self, operation, parameters=None):
sql = _bind_parameters(operation,
parameters) if parameters else operation
self.job_id = self.run_query(sql) |
ITHACA, N.Y. — An estimated 0.5 to 1 million gallons of sewage spilled into the Cayuga Lake inlet over the last five weeks as a result of a malfunctioning underwater pipe that went unfixed for weeks.
A crew of recreational boaters discovered the overflow at the inlet earlier this week, triggering renewed inspection ef... |
/**
* Teardown the test by deleting the test data.
*
* @throws Exception
*/
@After
public void after() throws Exception {
jdbcTemplate.execute(DELETE_TABLE_SQL);
jdbcTemplate.execute(SHUTDOWN_HSQLDB);
} |
U.S. Homeland Security Secretary John Kelly came to Ottawa last week to talk national security. The issue on everyone's mind: border security. Canada has seen an influx of asylum-seekers illegally coming in from the U.S. over recent months, and it seems no one knows quite what to do. CBC commenters, however, have a few... |
/*
* @(#)BrowseFileDirectoryAction.java
* Copyright © 2021 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.app.action.file;
import javafx.event.ActionEvent;
import org.jhotdraw8.annotation.NonNull;
import org.jhotdraw8.annotation.Nullable;
import org.jhotdraw8.app.FileBasedActivity;
... |
import {MongoClient} from "mongodb";
import {TsMongodbOrmError} from "./errors/TsMongodbOrmError";
import {LockManager} from "./locks/LockManager";
import {RankManager} from "./ranks/RankManager";
import {Repository} from "./Repository";
import {TransactionManager} from "./transactions/TransactionManager";
import {tsMo... |
The Irish question is back in British politics. Next month the European Union must decide whether sufficient progress has been made in the Brexit negotiations to move on to the next phase of talks. Should Ireland veto an unsatisfactory UK offer on Northern Ireland’s future relations with the EU or would that prejudice ... |
def coordinates_distance(t1: tuple, t2: tuple, /, type: NeighboursType = NeighboursType.CROSS) -> int | float:
if type == Map.NeighboursType.CROSS:
return sum(abs(x1 - x2) for x1, x2 in zip(t1, t2))
elif type == Map.NeighboursType.ALL:
return sum((x1 - x2)**2 for x1, x2 in zip(t1... |
def _find_params_value_of_url(self, services, url):
values_of_query = list()
i = 0
url_split = url.split('/')
values = [item for item in url_split if item not in services and item != '']
for v in values:
if v != None:
values_of_query.append(v)
... |
<filename>frontend/packages/ceph-storage-plugin/src/components/create-storage-system/create-storage-system-steps/security-and-network-step/security-and-network-step.tsx
import * as React from 'react';
import { Form } from '@patternfly/react-core';
import { useFlag, getNamespace, getName } from '@console/shared';
import... |
k = int(input())
n=[]
x=[]
t=[]
for i in range(k):
inp = input().split(' ')
n.append(int(inp[0]))
x.append(int(inp[1]))
t.append(int(inp[2]))
for i in range(k):
temp = t[i]//x[i]
c1 = (temp*n[i]) - ((temp*(temp+1))//2)
c2 = (n[i]*(n[i]-1))//2
if n[i]*x[i]>t[i]:
print(int(c1))
el... |
K, N = map(int, input().split())
A = list(map(int, input().split()))
A.insert(0, 0)
A.append(K)
# print(A)
start = A[1] - A[0]
goal = A[-1] - A[-2]
mixi = 0
sum_len = 0
# SorG = max(start, goal)
SorG = start + goal
for i in range(len(A) - 1):
if A[i+1] - A[i] > mixi:
mixi = A[i+1] - A[i]
sum_len ... |
Star Wars: The Force Awakens products are set to be unveiled in the world’s first ever global live toy unboxing event. Unfolding over 18 hours in 15 cities and 12 countries, the event will see highlights from the range of epic merchandise revealed in a rolling New Year’s Eve style celebration featuring top digital star... |
<filename>dist/pip-suite-split.d.ts<gh_stars>0
declare module pip.split {
export interface ISplitService {
forwardTransition(toState: any, fromState: any): boolean;
goToDesktopState(fromState: string): string;
}
export interface ISplitProvider {
addTransitionSequence(sequence: string[], mobileStates?: Mob... |
package boj_match_april;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
/**
* @author <EMAIL>
* @time 2020. 4. 10. 오후 4:13:30
* @category
* @problem_description 소지금을 최소로 잃으면서 [... |
Iterative Demodulation and Decoding of Uplink Multiuser M-ary FSK Using OFDMA Mapping
In this paper, we study iterative demodulation and decoding (IDD) for a multiuser system where users employ M-ary frequency shift keying to transmit their signals to a base station (BS). Since joint multiuser detection requires a pro... |
/*
Creates an instance of the AnimationManager class
pwmPin : the pwm pin to which the fairy light led string is connected (through a mosfet)
*/
AnimationManager::AnimationManager( uint8_t pwmPin ) {
this->offBlinkAnimation = new OffBlinkAnimation( pwmPin, 3, 300 );
this->smoothTransistionAnimation = new Smooth... |
<filename>cloud/cloud/doctype/cloud_company_requisition/cloud_company_requisition.py
# -*- coding: utf-8 -*-
# Copyright (c) 2019, <NAME> and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import throw
from frappe.model.document import D... |
/*This method initiates the variables needed for step b.
*It is run inside synchronization_1, before counting.*/
private void initiate_step_B(){
bit_index = 0;
sum = 0;
count_length = (1 << bit[bit_index]);
allCount = new int[k][count_length];
sumCount = new int[count_length];
} |
<gh_stars>0
export interface Reaction {
reaction: ReactionType;
count?: number;
postId: number;
}
export type ReactionType = 'LIKE' | 'SMILE' | 'LOVE'; |
use crate::transport::{JetFuture, JetSinkImpl, JetSinkType, JetStreamImpl, JetStreamType, Transport};
use crate::utils::{danger_transport, resolve_url_to_socket_arr};
use futures::{ready, Sink, Stream};
use hyper::upgrade::Upgraded;
use spsc_bip_buffer::{BipBufferReader, BipBufferWriter};
use std::io::Cursor;
use std::... |
A JPMorgan Chase office in New York City. (Photo: 2012 photo by Spencer Platt, Getty Images)
NEW YORK – A former JPMorgan Chase investment adviser was arrested Thursday on charges he stole $20 million from customers and spent the funds on unprofitable trading and other personal expenses.
Michael Oppenheim, 48, took m... |
def compute_transition_matrix(self, *args, **kwargs) -> "SimpleNaryExpression":
if isinstance(self, KernelSimpleAdd):
self._maybe_recalculate_constants(Constant)
elif isinstance(self, KernelAdaptiveAdd):
self._maybe_recalculate_constants(ConstantMatrix)
for kexpr in self:... |
package com.fei.table;
import org.apache.kudu.client.KuduClient;
import org.apache.kudu.client.KuduException;
import org.junit.After;
import org.junit.Before;
/**
* @description:测试对kudu表的创建删除
*/
public class KuduTable {
private KuduClient kuduClient = null;
@Before
public void init() {
//构建Kud... |
// Run the Delegator, performing all necessary internal operations. Return err
// on failure and nil on success.
func (d *Delegator) Run(m MetaContext) (err error) {
var jw *jsonw.Wrapper
defer m.Trace("Delegator#Run", func() error { return err })()
if err = d.CheckArgs(m); err != nil {
return
}
d.MerkleRoot = ... |
package model
import (
"fmt"
sup "ml_console/support_functions"
)
var (
// String for cmd_handler to know to pass to this module
Module_init_command = "model"
// This is passed to cmd_handler to generate the Main Menu
Module_about = "Manage Models and DDP"
// evenly space command descriptions in menus
ta... |
package com.dotcms.rest.exception;
import com.dotcms.repackage.javax.ws.rs.core.Response;
public class InvalidRuleParameterException extends HttpStatusCodeException {
private static final long serialVersionUID = 1L;
private static final String ERROR_KEY = "dotcms.api.error.invalid_parameter";
public Inv... |
package events
import (
"errors"
"io/ioutil"
"net/http"
)
var (
// TriggerTypeMQTT - Event trigger of type MQTT - pub/sub
TriggerTypeMQTT TriggerType = "mqtt"
// TriggerTypeHTTP - Event trigger of type HTTP
TriggerTypeHTTP TriggerType = "http"
// ValidTriggerTypes - List of supported trigger types
ValidTrigg... |
package imgui
// #cgo linux LDFLAGS: -L./cimgui -l:cimgui.a -lstdc++ -lm
// #include "native.h"
import "C"
import (
"fmt"
"unsafe"
"github.com/FooSoft/lazarus/graphics"
"github.com/FooSoft/lazarus/math"
)
func Begin(label string) bool {
labelC := C.CString(label)
defer C.free(unsafe.Pointer(labelC))
return bo... |
/**
* TODO: Move Interestial to their own executor and move all tests!
*/
@ExtendWith(MockitoExtension.class)
public class AdMobTest {
@Mock
Context mockedContext;
@Mock
AppCompatActivity mockedActivity;
@Mock
PluginCall pluginCallMock;
@Mock
MockedConstruction<BannerExecutor> bann... |
/**
* internal: parent image read wrapper for compacting.
*/
static int vdParentRead(void *pvUser, uint64_t uOffset, void *pvBuf,
size_t cbRead)
{
PVDPARENTSTATEDESC pParentState = (PVDPARENTSTATEDESC)pvUser;
bool fLocked = ASMAtomicXchgBool(&pParentState->pDisk->fLocked, true);
As... |
def test_can_import_pandapower_and_pandas():
import pandas
import pandapower.timeseries
print(f'Pandapower version: {pandapower.__version__}')
print(f'Pandas version: {pandas.__version__}')
|
Getty Images
It wasn't supposed to be this way for Arkansas head coach Bret Bielema.
Bielema made the jump from Wisconsin of the Big Ten to the SEC's Arkansas Razorbacks prior to the 2013 season, with three straight Big Ten titles and three straight Rose Bowl appearances under his belt.
The "three" theme continued e... |
Mixed noise reduction method based on fuzzy morphological filtering
To remove mixed noises from the image, we studied the noise reduction performance of fuzzy morphological filter and introduce a new method to reduce noise. Firstly, the method uses S-function to fuzz an image, and then do fuzzy morphological opening-c... |
<filename>cpp/tests/interop/dlpack_test.cpp<gh_stars>0
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
*
* 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/l... |
/**
* Look for a reference to a package, class, field, method or markup document,
* in the context of a markup document path
*
* @param name reference name.
* @param sourcePosition current position in the source containing the reference.
* @param markupDocContainer markup... |
// ID returns the ID of the node
func (dp Dispatcher) ID() string {
if !reflect.ValueOf(dp.p2pnet).IsNil() {
return dp.p2pnet.ID()
}
if !reflect.ValueOf(dp.p2plnet).IsNil() {
return dp.p2plnet.ID()
}
return ""
} |
// NewField returns a Field struct with information distilled from an
// *ast.Field. If the provided *ast.Field does not match the conventions of
// code generated by protoc-gen-go, an error will be returned.
func NewField(f *ast.Field) (*Field, error) {
| Type Genres | Repeated | Naked |
... |
Lingling Ou,1,2 Shaoqiang Lin,2 Bin Song,1 Jia Liu,1 Renfa Lai,2 Longquan Shao1
1Department of Stomatology, Nanfang Hospital, Southern Medical University, Guangzhou, People’s Republic of China; 2Department of Stomatology, the First Affiliated Hospital of Jinan University, Guangzhou, People’s Republic of China
Abstrac... |
Ayurvedic management in cervical spondylotic myelopathy
The age related spondylotic changes may result in direct compressive and ischemic dysfunction of the spinal cord known as cervical spondylotic myelopathy (CSM). Symptoms often develop insidiously and are characterized by neck stiffness, unilateral or bilateral de... |
/**
* Retrieve a summary of today's activations at a set of locations.
*
* @param locationIds
* @return a map of maps: locationId -> activation status -> count
*/
public Map<String,Map<Activation.Status, Integer>> summarizeByLocation(Set<Integer> locationIds) {
if (CollectionUtils.isEmp... |
/*
* Solution 2: Pre-compute increase.
*/
class Solution {
double GetIncrease(int dividend, int divisor) {
double original_value = dividend * 1.0 / divisor;
double new_value = (dividend + 1) * 1.0 / (divisor + 1);
return new_value - original_value;
}
public:
double maxAverageRatio(... |
A postdoctoral researcher in the immunology division at the Walter and Eliza Hall Institute, and a practising gastroenterologist, Dr Tye-Din believes he and former colleague Dr Bob Anderson may have found a means of eliminating coeliac disease. If clinical trials of the treatment are successful, the approach could also... |
/**
* This function is called by NodeJoinedCallback
*
* @param notifId
* @param value
*/
private void NodeJoined(Object clusterAddress, Object serverAddress, boolean reconnect, EventContext eventContext) {
synchronized (ConnectionManager.getCallbackQueue()) {
if (_client == ... |
Hey New York, just in case you forgot that CMJ is next week, um, well, CMJ is next week. This means it's time to start preparing yourself for staying up till 5AM in order to catch the last set of that one band you wanted to see but missed earlier and who cares that tomorrow is a workday because this is totally worth it... |
"""Generated message classes for ml version v1beta1.
An API to enable creating and using machine learning models.
"""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.protorpclite import messages as _messages
from apitools.base.py import encoding
from apitools.base.py import ext... |
# Copyright (c) 2019 Cognizant Digital Business.
# Issued under this Academic Public License: github.com/leaf-ai/muir/pytorch/muir/LICENSE.
#
# Pytorch dataset for crispr genomic data
#
import pickle
import os
import time
import numpy as np
import random
import torch
from torch.utils.data import Dataset, DataLoader
d... |
<filename>mmseg/datasets/pipelines/loading_hsi.py
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import torch
import numpy as np
import cv2
from ..builder import PIPELINES
def load_ENVI_hyperspectral_image_from_file(filename):
ENVI_data_type = [None,
np.uint8, # 1... |
<gh_stars>0
package main
import "gopkg.in/go-playground/validator.v8"
var (
users Users
validate *validator.Validate
)
func init() {
u := Users{}
u.Users = map[string]User{
"1": User{
ID: "1",
Name: "<NAME>",
},
}
users = u
}
func main() {
config := &validator.Config{TagName: "validate"}
vali... |
<reponame>ruig2/WIFIProbe
package com.codingfairy.data.repo;
import com.codingfairy.data.entity.ActivenessEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import java.sql.Timestamp;
/**
* Created by cuihao on 2017-05-16.
* Activeness repository
*/
public interface ActivenessRepository extends... |
// LastInsertId implements the Result interface
func (m MockResult) LastInsertId() (int64, error) {
if m.LastInsertIdFn == nil {
panic(fmt.Errorf("ksql.MockResult.LastInsertId() called but ksql.MockResult.LastInsertIdFn is not set"))
}
return m.LastInsertIdFn()
} |
import type { TenantFeaturesDto } from "@/application/contracts/core/tenants/TenantFeaturesDto";
import type { AppUsageSummaryDto } from "@/application/dtos/app/usage/AppUsageSummaryDto";
import { AppUsageType } from "@/application/enums/app/usages/AppUsageType";
import { ApplicationLayout } from "@/application/enums/s... |
/**
* Returns the value of one or more static fields of the
* reference type. Each field must be member of the reference type
* or one of its superclasses, superinterfaces, or implemented interfaces.
* Access control is not enforced; for example, the values of private
* ... |
def add_error(error_code,
url,
traceback,
status="open",
credentials_file=settings.DEFAULT_CREDENTIALS_FILE):
connect_db(credentials_file)
err = Error(error_code=error_code,
url=url,
traceback=traceback,
stat... |
<reponame>Fingolfin7/Time-Tracker
from matplotlib import pyplot as plt
def showBarGraphs(subj_names=[], subj_totals=[]):
plt.bar(subj_names, subj_totals, label="Total hours")
plt.title("Time Subject Tracker")
plt.xlabel("Subjects")
plt.ylabel("Time (in hours)")
plt.legend()
plt.... |
#include "KCurrentLoopIntegrator.hh"
#include "KEMConstants.hh"
#include "KEllipticIntegrals.hh"
#include <iomanip>
namespace KEMField
{
KFieldVector KCurrentLoopIntegrator::VectorPotential(const KCurrentLoop& currentLoop, const KPosition& P) const
{
static KCompleteEllipticIntegral1stKind K_elliptic;
static... |
1 SHARES Facebook Twitter Google Whatsapp Pinterest Print Mail Flipboard
Trump’s Deputy Press Secretary Sarah Huckabee Sanders refused to keep the President’s promise that people won’t lose their health care with the Republican Obamacare replacement during an interview on ABC’s This Week.
Video:
ABC Breaking News | ... |
#ifndef _ASM_POWERPC_FTRACE
#define _ASM_POWERPC_FTRACE
#include <asm/types.h>
#ifdef CONFIG_FUNCTION_TRACER
#define MCOUNT_ADDR ((unsigned long)(_mcount))
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
#ifdef __ASSEMBLY__
/* Based off of objdump optput from glibc */
#define MCOUNT_SAVE_FRAME \
stwu r1,-4... |
<reponame>Hgwxxdd/ladder-ui
export * from './anchor'
export * from './button'
export * from './divider'
export * from './grid'
export * from './input'
export * from './layout'
// export * from './menu'
export * from './space'
export * from './tooltip'
|
/* Test d'insertion commun a tout les items */
@Test
void testInsert() {
Item[] items = new Item[] {new Item(dex, 10, 20)};
GildedRose app = new GildedRose(items);
assertThat(app.items[0].name, is(dex));
assertThat(app.items[0].sellIn, is(10));
assertThat(app.items[0].quality, is(2... |
James O'Brien: Why The Irish Border Is One Of The Biggest Brexit Issues
Why bother trying to understand complicated issues when you could spit bile instead? James O'Brien asked.
John McDonnell has warned a hard border between Ireland and Northern Ireland after Brexit would undermine the peace process and "be a nightm... |
/**
* @author Thorben Lindhauer
*
*/
public class CreateMigrationPlanCmd implements Command<MigrationPlan> {
public static final MigrationLogger LOG = EngineUtilLogger.MIGRATION_LOGGER;
protected MigrationPlanBuilderImpl migrationBuilder;
public CreateMigrationPlanCmd(MigrationPlanBuilderImpl migrationPlanB... |
def EquipmentModels(self):
return self._session.query(EquipmentModels).all() |
# -*- coding: utf-8 -*-
# @Time : 20-6-4 下午2:13
# @Author : zhuying
# @Company : Minivision
# @File : utility.py
# @Software : PyCharm
import pdb
from datetime import datetime
import os
import torch
import torch.nn as nn
from torch.optim.lr_scheduler import MultiStepLR
from collections import Counter
def get_time():
... |
#pragma once
#include <torch/nn.h>
#include "../macros.h"
namespace vision {
namespace models {
// Densenet-BC model class, based on
// "Densely Connected Convolutional Networks"
// <https://arxiv.org/pdf/1608.06993.pdf>
// Args:
// num_classes (int) - number of classification classes
// growth_rate (int) - ... |
package fractal.visaapp;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import andro... |
Copyright by KRON - All rights reserved
(KRON) -- A plan to put $750 million in public funds toward an NFL stadium that could house the Raiders in Las Vegas has cleared a second major vote in the Nevada Legislature, despite opposition to a project partly funded by billionaire Sheldon Adelson and a last-minute revelati... |
import asyncLoader from '@app/util/asyncLoader';
import Docker from 'dockerode';
import colors from 'colors';
export abstract class BaseDockerAction {
abstract cmd: string;
// abstract handle(): Promise<any>;
docker!: Docker;
asyncLoader = asyncLoader;
colors = colors;
constructor() {}
init(docker: Doc... |
// NewListFindingsByIssuePayload builds a issues service List findings by issue
// endpoint payload.
func NewListFindingsByIssuePayload(id string, status *string, sortBy *string, page *int, size *int, identifiers *string, labels *string) *issues.ListFindingsByIssuePayload {
v := &issues.ListFindingsByIssuePayload{}
v... |
import * as React from 'react';
import FxInput from '../../FxInput';
export class FxInputPlayground extends React.Component<{}, { value: string; auto: boolean }> {
constructor(props: {}) {
super(props);
this.state = {
auto: true,
value: 'auto',
};
}
public render(): JSX.Element {
re... |
Fear & anxiety in the time of COVID-19: How they influence behavior
The emotional factors that influence adherence to public health guidelines for containing the spread of COVID-19 are poorly understood and are limiting policymakers’ ability to elicit compliance. In this article, we report the results of a nationwide ... |
/**
Get a range of auto increment values.
Can only be used if the auto increment field is the first field in an index.
This method is called by update_auto_increment which in turn is called
by the individual handlers as part of write_row. We use the
part_share->next_auto_inc_val, or search all
partitions ... |
Last Thursday there was a rally outside the U.S. Capitol to protest pending health care legislation, featuring the kinds of things we’ve grown accustomed to, including large signs showing piles of bodies at Dachau with the caption “National Socialist Healthcare.” It was grotesque — and it was also ominous. For what we ... |
/// This function replaces all the matches in the provided text.
fn replace_match(&self, text: &mut String, matching_mode: &MatchingMode) {
match matching_mode {
MatchingMode::Regex(regex) => {
if regex.is_match(text) {
*text = regex.replace_all(text, &*self.repla... |
/**
* An example POJO that represents cloud event data
*
* @author Oleg Zhurakousky
*
*/
public class SpringReleaseEvent {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy")
private Date releaseDate;
private String releaseName;
private String version;
public Date getReleaseDate() {
ret... |
/** This is a utility class to fetch error messages encountered while parsing COBOL file. */
public class ErrorMessageHelper {
private final MessageService messageService;
static final String PERFORM_MISSING_END = "ErrorStrategy.performMissingEnd";
static final String REPORT_UNWANTED_TOKEN = "ErrorStrategy.report... |
/**
* Ensures the reconnect dialog does not popup some time from now.
*/
private void stopDialogTimer() {
if (dialogShowTimer.isRunning()) {
dialogShowTimer.cancel();
}
} |
/* Given an IRQ name, return its index in the irq table */
int dsp56k_get_irq_index_by_tag(const char* tag)
{
int i;
for (i = 0; i < 32; i++)
{
if (strcmp(tag, dsp56k_interrupt_sources[i].irq_source) == 0)
{
return i;
}
}
fatalerror("DSP56K ERROR : IRQ TAG specified incorrectly (get_vector_by_tag) : %s.\n... |
all workers on campus be paid at least $15/hour. Wednesday was a momentous day for Seattle’s workers as the first phase of the minimum wage increase was enacted. While workers city-wide celebrated the increase and Seattle again took the national spotlight , UAW 4121 continued our efforts to ensure that every worker cit... |
<reponame>volsocccal/Jerry<filename>volcalenums/formazione.py
from enum import Enum
class FormazioneType(str, Enum):
AUTISTA_ANPAS = 'AUTISTA ANPAS'
ELI = 'ELI 10 ECG'
SEDIA_C = 'SEDIA CINGOLATA'
SEDIA_M = 'SEDIA MOTORIZZATA'
TRASPORTO_SICUREZZA_PAZIENTE = 'TRASPORTO E SICUREZZA PAZIENTE'
TRUCC... |
use super::linked_list::*;
fn get_new_linked_list_with_values<T: Copy>(vec: &Vec<T>) -> LinkedList<T> {
let mut linked_list = LinkedList::<T>::new();
for element in vec.iter() {
linked_list.append(*element);
}
return linked_list;
}
#[test]
fn iter_mut_test() {
let test_vector = vec![1, 2... |
/**
* A sum of two real numbers.
*
* <p />Instances of <code>Sum</code> must be obtained by using one of the
* <code>createInstance()</code> factory methods.
*
* @version $Revision: 1.7 $ $Date: 2002/08/16 21:54:40 $
* @author Ernst de Haan (<a href="mailto:znerd@FreeBSD.org">znerd@FreeBSD.org</a>)
*/
public cl... |
/**
* El programa cliente que puede invocar de manera remota los servicios de los
* servidores desde el Broker.
*
*/
public class ClientC {
private static String brokerHostName;
public static void main(String[] args) {
System.setProperty("java.security.policy", "java.policy");
if (System.... |
/**
* Reads in a JSON object and try to create a LatLng in one of the following formats.
*
* <pre>{
* "lat" : -33.8353684,
* "lng" : 140.8527069
* }
*
* {
* "latitude": -33.865257570508334,
* "longitude": 151.19287000481452
* }</pre>
*/
@Override
public LatLng read(JsonRead... |
#include<iostream>
using namespace std;
int gcd( int a, int b ){
if( b == 0 ) return a;
return gcd(b, a%b);
}
int main(){
int a, b,c,d;
cin >> a >> b >> c >> d;
int aux = gcd(a*d,c*b);
if((c*b - a*d) >= 0) {
cout << (c*b - a*d)/aux << "/" << (c*b)/aux;
... |
<filename>pubg/PrivateHeaders/QQApiNewsObject.h
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "QQApiURLObject.h"
@interface QQApiNewsObject : QQApiURLObject
{
}
+ (id)objectWithURL:(id)arg1 title:(id)arg2 description:(id)ar... |
/**
* Sprite sheet for rpg maker charsets for various versions.
* Because rpg maker puts usually 8 character in one character sprite set
* we cut the animations in the following way: <pre>[charIndex]_[down/left/right/up]</pre>.
* @author Markus Schröder
*/
public class RpgMakerCharSpriteSheet extends SpriteSh... |
///
/// Conversion of raw data to digits.
///
void AliEMCALRawUtils::Raw2Digits(AliRawReader* reader,TClonesArray *digitsArr, const AliCaloCalibPedestal* pedbadmap,
TClonesArray *digitsTRG, TClonesArray *trgData)
{
if ( digitsArr) digitsArr->Clear("C");
if (!digitsArr) { Error("Raw... |
/**
*
* @author Fzwael , Dorra
*/
public class RLE {
public static void compress(File file) {
// System.out.println("I will compress " + file.getName());
try{
File compressedFile = new File(file.getName() + "-RLE");
PrintWriter writer = new PrintWriter(compressedFile, "UTF-8");
... |
from flask import Blueprint, render_template
import app
mod_viewer = Blueprint('viewer', __name__)
@mod_viewer.route('/', methods=['GET'])
def home():
return render_template('home.html', **app.app.config)
@mod_viewer.route('/nocanvas', methods=['GET'])
def home_nocanvas():
return render_template('home_nocan... |
// Copyright (C) 2000, International Business Machines
// Corporation and others. All Rights Reserved.
#include <cstdio>
#include "CoinTime.hpp"
#include "BCP_lp_functions.hpp"
#include "BCP_enum.hpp"
#include "BCP_lp_result.hpp"
#include "BCP_lp_pool.hpp"
#include "BCP_lp_user.hpp"
#include "BCP_lp.hpp"
#include "BCP... |
/**
* Delete recursively all files in a directory and the directory
*
* @param dir - the dir to delete
* @return if we successfully deleted all files in that directory and the passed directory
*/
static boolean deleteAllInDir(File dir) {
boolean deleted = true;
if (dir.exists())... |
/**
* Reads next recognized token from the scanner. If scanner fails to recognize a token and
* throws an exception it will be reported via Parser.scannerError().
* <p>It is expected that scanner is capable of returning at least an EOF token after the
* exception.</p>
*
* @param src scanner
* @ret... |
/**
*
* Definition of the class "Footstep" defined in Footstep_.idl.
*
* This file was automatically generated from Footstep_.idl by us.ihmc.idl.generator.IDLGenerator.
* Do not update this file directly, edit Footstep_.idl instead.
*
*/
public class Footstep
{
private long unique_id_;
private byte robot_s... |
/**
* Gets the current node.
*
* <a href="https://jmespath.org/specification.html#current-node">current-node</a>
*/
public final class CurrentExpression extends JmespathExpression {
public CurrentExpression() {
this(1, 1);
}
public CurrentExpression(int line, int column) {
super(line, ... |
/**
* Builds a QueryBatcher based on an array of document URIs.
*/
public class DocumentUrisQueryBatcherBuilder implements QueryBatcherBuilder {
private String[] documentUris;
public DocumentUrisQueryBatcherBuilder(String... documentUris) {
this.documentUris = documentUris;
}
@Override
public QueryBatcher b... |
// Tests that if a scroll-begin gesture is not handled, then subsequent scroll
// events are not dispatched to any view.
TEST_F(WidgetTest, GestureScrollEventDispatching) {
EventCountView* noscroll_view = new EventCountView;
EventCountView* scroll_view = new ScrollableEventCountView;
noscroll_view->SetBounds(0, 0... |
/**
* Funcion con la cual evaluo si la remision o la factura a realizar se le
* debe hacer retencion en la fuente
*/
public String evaluaRetefuente() {
String rta = "S";
try {
} catch (Exception e) {
}
return rta;
} |
/**
* Obtain min-max normalizers from training data.
*
* @param data Training data from which the normalizers are obtained
* @param numFeatures Number of features
* @return
*/
public static MinMaxNormalizer[] minmaxNormalizeTrainingData(
SparseVector[] data, int numFeatures) {
... |
/**
* A series of tests accessing Blobs in various ways.
* <p>
* These tests are intended to detect Blob performance regressions. Before
* committing a patch that might change the Blob performance characteristics,
* first run these tests on a clean build and then with the patch applied. The
* results can only be ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.