content stringlengths 10 4.9M |
|---|
/**
* Watcher for the modules deployed to this container under the {@link Paths#JOB_DEPLOYMENTS} location. If the node
* is deleted, this container will undeploy the module.
*/
class JobModuleWatcher implements CuratorWatcher {
/**
* {@inheritDoc}
*/
@Override
public void process(WatchedEvent event) ... |
/**
* 05/29/2013
* PrimeIndex.java
* 10001st prime
*
* @author Scott Wiedemann
*
*/
public class PrimeIndex {
public static void main(String[] args) {
if (args.length != 1) {
System.err.println("Incorrect number of arguments.");
System.err.println("Usage: ./primeindex.jar N");
S... |
#pragma once
class EntryPoint
{
public:
EntryPoint();
~EntryPoint();
};
|
def _get_num_batch_iter(self, model_inputs: Dict[str, Any], batch_size: int) -> int:
num_of_sequences = model_inputs["input_ids"].shape[0]
num_batch_iter = int(np.ceil(num_of_sequences / batch_size))
return num_batch_iter |
The Buildup of Global Debt and the Emergence of a New Global Financial Crisis
Many economic researchers and economic policy-makers are discussing an upcoming global financial crisis that will result in a long-term economic recession due to the accumulation of global debt that has reached record levels. However, the tr... |
//---
// Use the internal j2k tile size if it's not the same as the image(one BIG tile).
//---
ossim_uint32 ossimOpjJp2Reader::getImageTileWidth() const
{
ossim_uint32 result = 0;
if ( (m_sizRecord.m_XTsiz - m_sizRecord.m_XTOsiz) < getNumberOfSamples(0) )
{
result = m_sizRecord.m_XTsiz - m_sizRecord.m_XT... |
<commit_msg>Fix for pypy compatibility: must super's __init__
<commit_before>
class BadRequestError(Exception):
pass
class ConflictError(Exception):
pass
class NotFoundError(Exception):
def __init__(self, status_code=None):
self.status_code = status_code
<commit_after>
class BadRequestError(... |
Social Impacts of Tourism on Central Florida. Ady Milman and Abraham Pizam. Annals of Tourism Research, vol. 15, no. 2, 1988, pp. 191-204. Pergamon Press, Inc., Fairview Park, Elmsford, New York 10523. DM255.00 annual subscription
Day Trips and Their Impacts. AIEST, Case postale 2728, CH-3001 Berne, Switzerland. 1988.... |
/**
* Interpolate.
*
* @param xValues the values
* @param yValues the values
* @param xMatrix the matrix
* @return Values of the underlying cubic spline function at the values of x
*/
public DoubleMatrix interpolate(final double[] xValues, final double[] yValues, final double[][] xMatrix) {
... |
// Check for header file extension.
// If the file extension is .h, .inc, or missing, it's
// assumed to be a header.
// \param FileName The file name. Must not be a directory.
// \returns true if it has a header extension or no extension.
bool ModularizeUtilities::isHeader(StringRef FileName) {
StringRef Extension ... |
/**
* Created by Cantekin on 8.1.2017.
*/
public class ListAdapter extends _baseListAdapter {
private final String TAG = "ListAdapter";
private FragmentTransaction frgmTra;
private baseProperties formProperties;
public ListAdapter(Context context, IMyList view, FragmentTransaction frgmTra, int resour... |
<reponame>chendatony31/web3uikit<gh_stars>0
import React, { useState, useEffect } from 'react';
import color from '../../styles/colors';
import { Icon } from '../Icon';
import { iconTypes } from '../Icon';
import { Illustration } from '../Illustrations';
import SelectStyles from './Select.styles';
import type { SelectP... |
import java.util.Scanner;
public class one
{
public static void main(String[] ars)
{
Scanner scan = new Scanner(System.in);
int i,j=0,k=0;
String a;
k = scan.nextInt();
a = scan.next();
String[] aa = a.split("");
for(i=1;i<aa.length;i++)
{
if(aa[i].equals(aa[i-1]))
j++;
}
System.out.prin... |
BCPP: An Intelligent Prediction System of Breast Cancer Prognosis Using Microarray and Clinical Data
Background: The diagnosis of cancer in most cases depends on a complex combination of clinical and histopathological data. Because of this complexity, there exists a significant amount of interest among clinical profes... |
package com.example.myapplication1.slice;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.colors.RgbColor;
import ohos.agp.components.DependentLayout;
import ohos.agp.components.Text;
import ohos.agp.components.element.ShapeElement;
import ohos.agp.utils.Color;
import ohos.agp... |
A Generalized Approach to Dantzig-Wolfe Decomposition for Concave Programs
The Dantzig-Wolfe decomposition procedure for concave programs can be viewed as inner linearization followed by restriction. This paper presents an approach that allows selective inner linearization of functions and utilizes a generalized prici... |
// Run applies a specific target configuration
func (t *Target) Run(source string, o *Options) (changed bool, err error) {
var pr scm.PullRequest
if len(t.Transformers) > 0 {
source, err = t.Transformers.Apply(source)
if err != nil {
logrus.Error(err)
return false, err
}
}
if len(t.Prefix) > 0 {
logru... |
def __connectable_facing(port1: "DevicePort",port2: "DevicePort",
rad: float = 3):
dx = port2.x0-port1.x0
dy = port2.y0-port1.y0
if(port1.dx()!=0):
if(abs(dy)<2*rad):
dxsign = 1
if(abs(dx)!=0):
dxsign = dx/abs(dx)
if(port1.d... |
def _assign_contract_solcs_range(self) -> Tuple[semver.VersionInfo, semver.VersionInfo]:
with open(self.path, encoding='utf-8') as f:
lines = f.readlines()
min_version = semver.VersionInfo.parse('0.0.0')
max_version = semver.VersionInfo.parse('99.99.99')
for line in lines:
... |
export interface Messages {
/**
* Note: This is a Primary Key.<pk/>
*/
id?: string;
content?: string;
/**
* Note: This is a Foreign Key to `conversation.id`.<fk table='conversation' column='id'/>
*/
conversationId?: string;
from?: string;
to?: string;
}
|
Pre-edited and more complete version of my summary of the Paris Agreement published in Nature’s World View (Dec. 2015): http://www.nature.com/polopoly_fs/1.19074!/menu/main/topColumns/topLeftColumn/pdf/528437a.pdf
A two-sided print format of this post is available at: Paris Summary 2015
The Paris Agreement is a genui... |
<reponame>efeslab/bugbase<gh_stars>1-10
#!/usr/bin/env python3
# coding=utf-8
"""
Integration tests for the complete framework
This file automatically discovers all Compiler subclasses in 'plugins/${package}/tests/*' and runs all programs
against them and their declared plugins concurrently.
"""
from contextlib impo... |
def add_item(self, name, url):
self.insert('', 'end', values=(name, url, ""))
s.updateItem({'item': name, 'url': url, 'status': '', 'pstatus': ''})
self.selection_clear() |
class A{
A(){
System.out.println("Constructor of A");
}
}
class B extends A{
B(){
System.out.println("Constructor of B");
}
}
class C extends B{
C(){
System.out.println("Constructor of C");
}
}
class ConstructorCalling{
public static void main(String [] args)
{
//Constructor are Called super to sub c... |
#ifndef WIBBLE_SYS_BUFFER_H
#define WIBBLE_SYS_BUFFER_H
/*
* Variable-size, reference-counted memory buffer
*
* Copyright (C) 2003--2006 <NAME> <<EMAIL>>
*
* 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 ... |
// Set of configuration blocks describing the custom action definitions that are available for use in the firewall policy's `statelessDefaultActions`. See Stateless Custom Action below for details.
func (o FirewallPolicyFirewallPolicyPtrOutput) StatelessCustomActions() FirewallPolicyFirewallPolicyStatelessCustomActionA... |
package lx.af.widget;
import android.animation.LayoutTransition;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.TypedArray;
import android.support.annotation.NonNull;
import android.support.v7.app.AlertDialog;
import android.util.AttributeSet;
import android.view.Vie... |
/**
* here we initialize all the actors for the scene
*
* @return actors
*/
private void initActor() {
background = new BaseActor();
spaceShip = new BaseActor();
meteor = new BaseActor();
win = new BaseActor();
labels = new LabelTextGround();
} |
/**
* @brief Set difficulty of the game.
*
* @param difficulty (lower is more difficult)
*/
void Save::setDifficulty(uint difficulty) {
get()._saveJs->u("difficulty") = difficulty;
if (get()._saveJs->j("state").u("life") > difficulty)
get()._saveJs->j("state").u("life") = difficulty;
} |
package com.twu.biblioteca.interfaces;
public interface Selectable {
void select();
}
|
/**
\fn bool HdlProgram::isUniformVariableValid(const std::string& varName)
\brief Check if a variable is valid from its name.
\param varName The name of the uniform variable to read from.
\return True if the name is valid (see glGetUniformLocation at http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformLocation... |
Apple has released a new iPhone 7 ad called “Race” made exclusively for Japan. The new 30-second spot features the Jet Black iPhone 7 Plus and a very fast-paced run between two men through a busy part of town. The ad concludes with the iPhone-equipped man winning the so-called race by using Apple Pay to quickly board a... |
Stephen Colbert delivered a scathing monologue directed at President Donald Trump and his meeting with Russian President Vladimir Putin on the Late Show Wednesday.
“People think you colluded with the president of a hostile foreign power, then you go out to meet with him again — and you don’t tell anybody? That’s like ... |
#include<iostream>
#include <string>
#include"ConfigReader.h"
using namespace std;
int main()
{
int i;
std::string s;
//ConfigReader a("ConfigData.txt");
ConfigReader a((std::getline(std::cin,s)));
a.checkData();
cin >> i;
return 0;
} |
/**
* Update HashMap of Nodes connected of cluster this broker is connected
* to
*
* @param response
*/
private void updatePool(CommandResponse response, boolean queue) {
NewHashMap map = null;
if (_logger.getIsDetailedLogsEnabled()) {
... |
// Clone returns a copy of the subtree rooted at n.
func (n *Node) clone() *Node {
if n == nil {
return nil
}
return &Node{
n.value,
n.childL.clone(),
n.childR.clone(),
n.balanceFactor,
}
} |
<filename>src/interviewQuestion/GreenChannel.java
package interviewQuestion;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Scanner;
public class GreenChannel {
static int N=50010;
static int n,t;
static int[] dp=new int[N];
static int[] w=new int[N];
static Deque<Integer> q... |
/* $OpenBSD: uslhcomreg.h,v 1.2 2015/01/22 14:33:01 krw Exp $ */
/*
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all c... |
def deepupdate(obj, val, newval):
thisobj = deepcopy(obj)
if isinstance(thisobj, dict):
for k in thisobj:
thisobj[k] = deepupdate(thisobj[k], val, newval)
elif isinstance(thisobj, list):
for k in range(len(thisobj)):
thisobj[k] = deepupdate(thisobj[k], val, newval)
... |
// NewExposedOffchainAggregator creates a new instance of ExposedOffchainAggregator, bound to a specific deployed contract.
func NewExposedOffchainAggregator(address common.Address, backend bind.ContractBackend) (*ExposedOffchainAggregator, error) {
contract, err := bindExposedOffchainAggregator(address, backend, back... |
// rename the key in a draft while preserving order
export default function renameDraftKey(draftParentValue, key, newKey) {
const keys = Object.keys(draftParentValue)
const keysToAppend = keys.slice(keys.indexOf(key) + 1)
const valuesToAppend = []
// save and remove all key/value pairs after the old key name
... |
class Contact:
def __init__(self, firstname, middlename, lastname, nickname,title, company,address, home, mobile, work, fax,email,email2,email3,homepage,bday,bmonth,byear,aday,amonth,ayear,address2,phone2,notes):
self.firstname= firstname
self.middlename=middlename
self.lastname=lastname
... |
import { Component, Listen, Event, EventEmitter, State, h } from '@stencil/core';
import { uhCharacters } from './uh-characters';
import { utf16 } from './../../utils/utils';
@Component({
tag: 'uh-dash-characters',
styleUrl: 'uh-dash-characters.scss'
})
export class MyName {
@State() characters: any[] = [];
@... |
Nintendo confirms that the upcoming Pokemon fighting game, Pokken Tournament, will support local multiplayer, thanks to the second screen on the Wii U’s GamePad.
Those that have been following Pokken Tournament since its grand unveiling have been on a roller coaster ride of sorts. Originally the title was only confirm... |
YiQiFuMai powder injection ameliorates blood–brain barrier dysfunction and brain edema after focal cerebral ischemia–reperfusion injury in mice
YiQiFuMai powder injection (YQFM) is a modern preparation derived from the traditional Chinese medicine Sheng-Mai-San. YQFM is widely used in clinical practice in the People’s... |
#include "math.h"
#include <iostream>
using namespace std;
const double MAX = 100000000;
int main(){
double i = 0;
double seno = 0;
double coseno = 0;
double tangente = 0;
double logaritmo = 0;
double raizCuadrada = 0;
while(i < MAX){
seno += sin(i);
coseno += cos(i);
... |
/*
* $Name: CheckFiles
* $Function: If the files used in training TM model does not exist, exit!
* $Date: 2015-10-28, in Los Angeles, USA
*/
bool Rescoring::CheckFiles(map<string, string> ¶meters) {
string file_key = "-dev";
CheckFile(parameters, file_key);
file_key = "-devnbest";
CheckFile(parameters, ... |
<filename>esda/tests/test_local_geary.py
import unittest
import libpysal
from libpysal.common import pandas, RTOL, ATOL
from esda.geary_local import Geary_Local
import numpy as np
PANDAS_EXTINCT = pandas is None
class Geary_Local_Tester(unittest.TestCase):
def setUp(self):
np.random.seed(10)
self.... |
<filename>src/pkgsDiff.ts
import most = require('most')
import R = require('ramda')
import {
DeprecationLog,
Log,
} from 'supi'
import * as supi from 'supi'
export interface PackageDiff {
added: boolean,
from?: string,
name: string,
realName?: string,
version?: string,
deprecated?: boolean,
latest?: ... |
import { processResponse } from './process-response';
describe('process-response', () => {
describe('processResponse', () => {
test('processes a complete response', () => {
const response = { type: 'complete', resultCode: 'Authorised' };
expect(processResponse(response)).toHavePrope... |
// registerUserFields creates fields for registered user.
func (v *View) registerUserFields(
tx *sql.Tx, user models.User, form registerUserForm,
) error {
email := models.UserField{
UserID: user.ID,
Kind: models.EmailField,
Data: form.Email,
}
if _, err := v.core.UserFields.CreateTx(tx, email); err != ni... |
def mask_len(mask):
L_min = 0
L_max = 0
for el in mask.split(','):
if el[0].isalpha():
con_s, con_e = el[1:].split('-')
con_s, con_e = int(con_s), int(con_e)
L_con = con_e - con_s + 1
L_min += L_con
L_max += L_con
else:
if '-' in el:
gap_min, gap_max = el.sp... |
Unusual Two‐Step Assembly of a Minimalistic Dipeptide‐Based Functional Hypergelator
Self‐assembled peptide hydrogels represent the realization of peptide nanotechnology into biomedical products. There is a continuous quest to identify the simplest building blocks and optimize their critical gelation concentration (CGC... |
Ever wonder why American cities have hulking, 19th-century fortresses scattered amidst Starbucks and apartment complexes? I did.
Since I work out in a YMCA that’s housed in a mammoth armory and my office is located next to a midtown Manhattan brick behemoth, I figured I’d bone up on how these enormously imposing struc... |
<gh_stars>0
import { atom, useRecoilState } from 'recoil'
const dateState = atom<Date>({
key: 'dateState',
default: new Date(),
})
type CalendarDate = [date: Date, setDate: (date: Date) => void]
export function useCalendarDate(): CalendarDate {
const [date, setDate] = useRecoilState(dateState)
return [date, s... |
# code_marshal
n=input()
for i in xrange(2*n+1):
s=''
if i<=n:
s+=' '*((n-i)*2)
for j in xrange(i+1):s+=str(j)+" "
for j in xrange(i-1,-1,-1):s+=str(j)+" "
print s[:len(s)-1]
else:
s+=' '*((i-n)*2)
for j in xrange((2*n)-i+1):s+=str... |
#include "./al-check.hpp"
#ifdef EXAMPLE_BUILD_DEBUG
#include <fmt/format.h>
void priv::alCheckError(const char* file, uint32_t line, const char* expression) {
ALenum code = alGetError();
if (code != AL_NO_ERROR) {
const char* error = "Unknown AL Error!";
const char* description = "No description possible.";
... |
def lens(self):
assert isinstance(self.baseNode, URIRef) or isinstance(self.baseNode, BNode)
target = self.baseNode
lenses = self.lensCandidates if self.lensCandidates else self.fresnelCache.lenses
lensesmatched = list(filter(lambda x: x[1], ((l,self.matches(l,target)) for l in lenses))... |
n = input()
k = input()
sum = 0
for item in k:
if item == "0" or item == " ":
sum += 0
else:
sum += 1
print("Easy") if sum == 0 else print("Hard") |
/**
* Wait for condition to be true before taking screenshot
*
* @param cond condition
* @param timeout timeout wait for condition
* @return Shutterbug
*/
public static Shutterbug wait(ExpectedCondition<?> cond, int timeout) {
beforeShootCondition = cond;
beforeShootTime... |
/// This sets up the advertising and waits for the connection complete event
async fn advertise_setup<'a>(hi: &'a hci::HostInterface<bo_tie_linux::HCIAdapter>, local_name: &'a str) {
let adv_name = assigned::local_name::LocalName::new(local_name, false);
let mut adv_flags = assigned::flags::Flags::new();
//... |
package rest
import (
"net/http"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/types/rest"
"github.com/gorilla/mux"
"github.com/desmos-labs/desmos/x/magpie/types"
)
func registerTxHandlers(clientCtx client.Context, r *mux.Router) {
r.HandleFunc("... |
<reponame>Love2Java/rep-zyshen
package com.thinkgem.jeesite.common.datatype;
public class DataGrid {
private int page=1;
private Object rows;
private int total;
public Object getRows() {
return rows;
}
public void setRows(Object rows) {
this.rows = rows;
}
public int getPage() {
return page;
}
publ... |
def build_tool(self, doc, entity):
match = self.tool_re.match(entity)
if match and validate_tool_name(match.group(self.TOOL_NAME_GROUP)):
name = match.group(self.TOOL_NAME_GROUP)
return creationinfo.Tool(name)
else:
raise ValueError('Failed to extract tool nam... |
<filename>ni_python_styleguide/_cli.py
import pathlib
import click
import flake8.main.application
import toml
def _qs_or_vs(verbosity):
if verbosity != 0:
return f"-{'v' * verbosity if verbosity > 0 else 'q' * abs(verbosity)}"
return ""
def _read_pyproject_toml(ctx, param, value):
value = val... |
// This cancels any notifications based on the oldest in the local SQL database
static void clearOldestOverLimitFallback(Context context, int notificationsToMakeRoomFor) {
OneSignalDbHelper dbHelper = OneSignalDbHelper.getInstance(context);
Cursor cursor = null;
try {
cursor = dbHelper.query(... |
<filename>neon_metrics_service/metrics_connector.py
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2022 Neongecko.com Inc.
# Contributors: <NAME>, <NAME>, <NAME>, <NAME>,
# <NAME>, <NAME>, <NAME>, <NAME>
# B... |
// AddException adds a tracing exception to the tracer
func (tracer *epsagonTracer) AddException(exception *protocol.Exception) {
defer func() {
recover()
}()
tracer.exceptionsPipe <- exception
} |
<filename>taotao-cloud-python/taotao-cloud-oldboy/day84-PerfectCRM/PerfectCRM-master/crm/admin.py
from django.contrib import admin
from django import forms
# Register your models here.
from crm import models
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashFiel... |
/**
* Checks whether a given String is a palindrome.
*/
public class Palindrome {
/**
* Removes everything except for letters and numbers and makes capital letters lower case.
*
* @param text text to be cleaned
* @return cleaned text
*/
private static String cleanText(String text) {
... |
use aoc_runner_derive::*;
struct Polymer(String);
fn char_reduces_with(c1: char, c2: Option<&char>) -> bool {
match c2 {
Some(&c2) => c1.to_ascii_lowercase() == c2.to_ascii_lowercase() && c1 != c2,
None => false,
}
}
impl Polymer {
fn new(s: impl Into<String>) -> Polymer {
Polymer... |
<reponame>Sadragiel/Vongola<filename>src/client/pages/NewCourseForm/index.tsx
import * as React from 'react';
import FirstStep from './FirstStep';
import SecondStep from './SecondStep';
import './styles/index.scss';
export default function () {
const [isFirstStep, setIsFirstStep] = React.useState(true);
retur... |
<reponame>LePtitDev/gamengin<gh_stars>0
#include "lua.h"
#include "../../include/lua/lua.hpp"
LuaScript::LuaScript() : need_close(true) {
state = (void *)luaL_newstate();
luaL_openlibs((lua_State *)state);
}
LuaScript::LuaScript(void *s) : state(s), need_close(false) {}
LuaScript::~LuaScript() {
if (nee... |
Ben Carson is calling on Democratic presidential nominee Hillary Clinton Hillary Diane Rodham ClintonREAD: Cohen testimony alleges Trump knew Stone talked with WikiLeaks about DNC emails County GOP in Minnesota shares image comparing Sanders to Hitler Holder: 'Time to make the Electoral College a vestige of the past' M... |
<reponame>hanaonnao/livedl
package niconico
import (
"fmt"
"encoding/xml"
"io/ioutil"
"regexp"
"strings"
"net/url"
"sync"
"log"
"time"
"../rtmps"
"../amf"
"../options"
"../files"
"../httpbase"
)
type Content struct {
Id string `xml:"id,attr"`
Text string `xml:",chardata"`
}
type... |
/**
* Create a StorableWeakPointer from thsi Storable to antoher Storable.
* @param <T>
* @param target The targeted Storable.
* @return A StorableWeakPointer.
* @throws StorageException
* @throws PermissionException
*/
protected <T extends Storable> StorableWeakPointer<T> weakPointer(T target) throws St... |
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
import { RequestHandler } from 'express';
import { ConnectionOptions } from 'typeorm';
import { MpcastLogger } from './logger/mpcast-logger';
import { MpcastPlugin } from './mpcast-plugin/mpcast-plugin';
export interface AuthOpti... |
def combo_blocksize_changed(self):
self.blocksize = int(self.comboBlockSize.currentText())
self.aa.set_properties(blocksize=self.blocksize)
self.canvas.set_plot_properties(blocksize=self.blocksize)
self.update_test_data()
self.update_stream()
self.settings["blocksize"] = ... |
def cor_nzagri(isReload=True):
data = ['Rough Rice', 'US Soybean Oil',
'US Soybean Meal', 'US Soybeans',
'US Wheat', 'US Corn', 'Oats', 'London Wheat',
'US Coffee C', 'US Cotton #2',
'US Sugar #11', 'Orange Juice',
'US Cocoa', 'Lumber', 'London Cocoa',
... |
<filename>src/main.rs
extern crate syscall;
use std::env;
use std::fs::{File, read_dir};
use std::io::{BufReader, BufRead, Error, Result};
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
use std::path::Path;
use std::process::Command;
use syscall::flag::{WaitFlags, O_RDONLY, O_WRONLY};
fn switch_stdio(stdio: &str... |
// Returns the next unique choice-identifier
func NextChoiceId() int {
count := <- choiceCount
choiceCount <- count + 1
return count
} |
/**
* Tests the {@link ExifUtils} class to check that the Exif Orientation
* tag is correctly acquired by the
* {@link ExifUtils#getExifOrientation(ImageReader, int)} method.
* <p>
* The Exif Orientation tags has been added to the source images by using
* <a href="http://owl.phy.queensu.ca/~phil/exiftool/index.ht... |
//ParseLogLevel takes a string with the log level names or enum number values
//and parses it into an integer
func ParseLogLevel(logLevel string) (level int) {
var err error
switch strings.ToUpper(logLevel) {
case "INFO":
level = INFO
break
case "WARN":
level = WARN
break
case "WARNING":
level = WARN
b... |
<reponame>Xamaneone/SoftUni-Intro
num = int(input())
if not (100 <= num <= 200) and not num == 0:
print ("invalid") |
/**
* Add one to the total number of moves made by player and extend
* dungeon if needed.
*
* @param dungeon A pointer to the dungeon and game info
* @param player A pointer to the player object
* @param move The last move made by the player
*
* @return None
*/
void addMove(Dungeon *dungeon, Object* player, int move)... |
def create_default_settings(self) -> Dict[str, Any]:
settings = {}
if self._use_options:
settings['_options'] = (None, '')
return settings |
package com.binghamton.jhelp.util;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.PrintWriter;
/**
* A utility class providing static method for logging to file
*/
public class Logger {
private static String logName = "log.txt";
private static PrintWrite... |
def _on_Closing(self):
self._PopUpRoot.withdraw() |
/** Implements COUNT(DISTINCT) over the values in an integer stream */
public class HyperLogLogOperator implements WindowOperator<HyperLogLog, Long, Long> {
private static final OpType opType = OpType.COUNT;
@Override
public OpType getOpType() {
return opType;
}
@Override
public HyperL... |
import { AddressIF } from './addresses-interface'
export interface CompletingPartyIF {
firstName: string
middleName?: string
lastName: string
mailingAddress: AddressIF
email?: string
phone?: string
}
|
<gh_stars>10-100
use crate::ir::codeparts::Keyword;
use crate::lexeme::Lexeme;
use crate::parselet::signature::entrypoint::EntryPointParselet;
use crate::parsing::partial::code_body::parse_code_body;
use crate::parsing::util::cursor::ParseCursor;
use crate::parsing::util::{NoMatch, ParseRes};
pub fn parse_entrypoint(m... |
/**
* A preference that displays "Sign out and turn off sync" button in {@link ManageSyncSettings}.
*/
public class SyncOffPreference extends DialogPreference {
public SyncOffPreference(Context context, AttributeSet attrs) {
super(context, attrs);
setLayoutResource(R.layout.preference_turn_off_sy... |
// IsUpToDate checks whether current state is up-to-date compared to the given
// set of parameters.
func IsUpToDate(in *v1alpha1.CryptoKeyParameters, observed *cloudkms.CryptoKey) (bool, string, error) {
um := make([]string, 0, 6)
generated, err := copystructure.Copy(observed)
if err != nil {
return true, "", er... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "LuaPanda.h"
#include "lua.hpp"
#include "libpdebug.h"
IMPLEMENT_MODULE(FLuaPanda, LuaPanda);
void FLuaPanda::StartupModule()
{
}
void FLuaPanda::ShutdownModule()
{
}
void FLuaPanda::SetupLuaPanda(struct lua_State* L)
{
pde... |
<reponame>LiHu20160316/electrum<filename>ios/CustomCode/Modules/ScanQR/OKQRCodeScanManager.h<gh_stars>0
//
// OKScanView.m
// OneKey
//
// Created by bixin on 2020/9/28.
//
#import <Foundation/Foundation.h>
@class OKQRCodeScanManager;
@protocol OKQRCodeScanManagerDelegate <NSObject>
@optional
/** 二维码扫描获取数据的回调方法 (... |
package com.charon.opengles30studydemo.videofilter.filter;
import com.charon.opengles30studydemo.R;
import com.charon.opengles30studydemo.videofilter.base.BaseFilter;
public class BlackWhiteFilter extends BaseFilter {
public BlackWhiteFilter() {
super(R.raw.video_no_filter_vertex_shader, R.raw.video_blac... |
from collections import defaultdict as dd
n, m = map(int, input().split())
s = input()
t = input()
md = {}
mmd = {}
md[-1] = 0
mmd[m] = n-1
for j in range(m):
i = md[j-1]
if j > 0 and t[j] == t[j-1]:
i += 1
while s[i] != t[j]:
i += 1
md[j] = i
for j in range(m-1, -1, -1)... |
def conduct_curve_fitting(self, DeltaT, Decay, dDecay=None, bReInitialise=False, fp=sys.stdout):
if bReInitialise:
self.initialise_for_fit_advanced(DeltaT, Decay)
bQuality=[True,True,True]
try:
paramOpt, dParamMatrix = curve_fit(curvefit_exponential, DeltaT, Decay, sigma=... |
<filename>software/SSv3_control_panel/loggwindow.h
/**/////////////////////////////////////////////////////////////////////////////
// //
// //
// Copyright(c) 2018, <NA... |
# coding=utf-8
from __future__ import unicode_literals
import os
from mock import patch
from django_app.test import PyW4CTestCase
from utils import gui, path, tmp, patterns
class UtilsTest(PyW4CTestCase):
temp_dir = 'temp'
@staticmethod
@patch('subprocess.check_call')
def test_gui_open_file(subpr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.