content stringlengths 10 4.9M |
|---|
/**
* Called once for each binding that is reachable from an entry point.
*
* <p>Subclasses can override this method to perform whatever logic is required per binding.
* They should call the {@code super} implementation if they want to continue the traversal in
* the standard order.
*
... |
<reponame>TimYagan/stroom<gh_stars>1-10
/*
* Copyright 2016 Crown Copyright
*
* 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
*
* Unl... |
I remember watching my grandmother make us egg coffee when we’d visit her summertime cabin home on the orange-tinged shores of Lake Esquagama, Minnesota. She’d crack an egg into a small bowl and beat it until thoroughly blended, then mix the egg into dry coffee grounds (we were a Hills Bros. family, but Folger’s someti... |
Last year, the iconic men’s magazine Playboy decided to stop publishing photographs of nude women in an effort to remake itself into a more mainstream publication. That change allowed the magazine to be displayed more prominently at newsstands but there weren’t enough sales to overcome their loss of subscribers, so the... |
/**
* Count Ways To Reach The Nth Stair
Problem Statement:
There are n stairs, a person standing at the bottom wants to reach the top. He can climb a certain number of steps at once.
For instance, the person can climb either 1 stair or 2 stairs at a time. Count the number of ways, the person can reach the top.
N... |
# Copyright 2020 Red Hat, Inc.
#
# 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 law or agreed ... |
def _feature_data_reader(self, split, is_training):
input_files = self.model.build_training_file_list(
self.base_feature_path, split)
filename_queue = tf.train.input_producer(input_files, shuffle=True)
capacity = 1000
min_size_after_deque = capacity - self.model.batch_size * ... |
package li
import (
"sort"
"github.com/gdamore/tcell"
"github.com/junegunn/fzf/src/util"
)
type ShowCommandPalette func()
func (_ Provide) ShowCommandPalette(
screen Screen,
commands Commands,
run RunInMainLoop,
pushOverlay PushOverlay,
) ShowCommandPalette {
return func() {
// initial candidates
type ... |
import moment from 'moment';
import {Transformer} from '@digichanges/shared-experience';
import IItemDomain from '../../InterfaceAdapters/IItemDomain';
class ItemTransformer extends Transformer
{
public transform(item: IItemDomain)
{
return {
id: item.getId(),
name: item.name,
... |
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int ans[10], part[10];
bool re = false;
int diff;
void dfs(int target, int num) {
if (num <= target) {
if (target - num < diff) {
re = false;
diff = target - num;
for (int i = 1; i < part[0]; ++ ... |
<reponame>ayaankhan98/STL
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Dev10-722102 "STL: Get nullptr overloads"
// DevDiv-520681 "Faulty implementation of shared_ptr(nullptr_t) constructor"
#include <cassert>
#include <cstddef>
#include <cstdlib>
#in... |
A Tunisian supporter of the Popular Front party reacts after Mohammed Brahmi was shot to death. (Photo11: Amine Landoulsi, AP) Story Highlights Two gunmen shot Mohammed Brahmi
Brahmi was leader of the Popular Current party
Tunisia is credited as cradle of the Arab Spring
TUNIS, Tunisia (AP) — Angry anti-government d... |
// Purge removes all keys with directory/env prefix
func (etcds *EtcdStorage) Purge(prefix string) error {
ctx, cancel := context.WithTimeout(context.Background(), requestTimeout)
defer cancel()
_, err := etcds.kv.Delete(ctx, prefix, clientv3.WithPrefix())
return err
} |
/**
* Adds a property change listener for a specific property.
*/
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener pcl) {
PropertyChangeSupport pcSupport = getPropertyChangeSupport();
for (PropertyChangeListener cur : p... |
/**
* The main set of web services.
*/
@Named
@Singleton
public class Application extends Controller {
static Form<Livro> bookForm = Form.form(Livro.class);
private static final int FIRST_PAGE = 1;
private static final int DEFAULT_RESULTS = 10;
private final AutorRepository autorRepository;
private final LivroRe... |
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { AppService } from 'src/app/service/app.service';
import { Category } from 'src/app/layouts/model/category';
@Component({
selector: 'app-loading',
templateUrl: './loading.component.html',
styleUrl... |
Monolithically Integrated Mach-Zehnder Interferometer All-Optical Switches by Selective Area MOVPE
We achieved first dynamic all-optical signal processing with a bandgap-engineered MZI SOA all-optical switch. The wide-gap Selective Area Growth (SAG) technique was used to provide multi-bandgap materials with a single s... |
<gh_stars>0
import { Action } from '@ngrx/store';
import { ApiRequestStatus } from '../../../framework/client/rpc';
import { Installation, InstallationLog, InstallationsList } from '../../../rogerthat_api/client/interfaces';
import {
AgendaEvent,
Check,
CreateInvestmentAgreementPayload,
CreateNodePayload,
Cre... |
def updateJobInfo(job, server, port, logfile=None, final=False, latereg=False):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(120)
s.connect((server, port))
except Exception, e:
tolog("!!WARNING!!2999!! updateJobInfo caught a socket/connect exception: %s... |
Peripheral ossifying fibroma- A case report with brief review
Peripheral ossifying fibroma (POF) is an inflammatory reactive hyperplasia of gingiva. It occurs frequently in anterior maxilla with a higher predilection for females. It presents as sessile mucosal nodule and more common in second decade of life. It has be... |
December is here, finals week starts Monday, and this project is cruising full steam ahead with no sign of slowing down as we gain more people, and gain more experience. Excitement is in the air as we near the finish line for the transmission. Plans to build proto-types, mock-ups, 3d printing, and the like fill the air... |
def find_low_volume_utilization(self, low_utilization_percentage, csvname):
sg_list = self.get_storage_group_list()
data = list()
data.append(['sg_name', 'volume_id', 'identifier', 'capacity',
'allocated_percent'])
for sg in sg_list:
vol_list = self.get_v... |
package flake
import (
"bytes"
"crypto/sha1"
"net"
)
// macHardwareIDProvider implments HardwareIDProvider and produces a SHA1 of
// all available MAC hardward addresses (concatenated) to create bytes for
// use as a HardwareID
type macHardwareIDProvider struct{}
// NewMacHardwareIDProvider creates a new instance... |
/**
* Source code: <https://bitbucket.org/cbockermann/stream-mining>.
*/
public class EnsembleQuantiles implements IQuantiles<Double> {
private GKQuantiles activeBlock;
private LinkedList<Double> sampleBlock;
private int chunkSize;
private int maxEnsembleSize;
private double sampleRatio;
priva... |
/**
* A filter for domains with known account types.
*/
public static class KnownAccountTypeFilter extends AbstractFilter {
@Override
public String getWhereClause() {
throw new UnsupportedOperationException("Not supported, this is an alternative filter.");
}
... |
import java.io.*;
public class seg
{
public static void main(String a[]) throws IOException
{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int temp,t,key,sides[],res[];
String inp[];
sides = new int[4];
t = Integer.parseInt(in.readL... |
/// Connects to the specified database.
pub async fn connect<T: MakeTlsConnect<Socket>>(
config: &str,
tls: T,
) -> Result<(Ergol, Connection<Socket, T::Stream>), Error> {
let (a, b) = tokio_postgres::connect(config, tls).await?;
Ok((Ergol { client: a }, b))
} |
#include<bits/stdc++.h> //POJ does not support
#define rep(i,a,n) for (int i=a;i<n;i++)//i is the loop variable, a is the initial value, n is the limit value, increasing
#define per(i,a,n) for (int i=a;i>=n;i--)//i is the loop variable, a is the initial value, n is the limit value, decreasing.
#define repll(i,a,n)... |
# # -*- coding: utf-8 -*-
"""Operator plugin that inherits a base class and is made available through `type`."""
from __future__ import unicode_literals
from __future__ import print_function
from typing import Any
import logging
import os
from cookiecutter.operators import BaseOperator
logger = logging.getLogger(__... |
//
// UIImage+wzmcate.h
// Money
//
// Created by fan on 16/7/15.
// Copyright © 2016年 liupeidong. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "WZMEnum.h"
#import "WZMBlock.h"
@interface UIImage (wzmcate)
#pragma mark - 类方法
///根据颜色创建image
+ (UIImage *)wzm_getImageByColor:(UIColor *)color;
///根据颜色创建im... |
// WithNamespaceSeparator sets the separator for namespaces.
func WithNamespaceSeparator(s string) RegistryOption {
return func(r *Registry) {
r.nsSeparator = s
}
} |
def add_vendor_wine(self, item):
logger.info(f"Add vendor wine {item}")
row = load.build_node(item, "url", "VENDORWINES", "vintages#")
result = self.add_item(row, "ALL_OLD")
attrs = result.get("Attributes")
if attrs:
vintage = attrs.get("data")
is_vintage_... |
/**
* Returns the movie format, PF_UYVY if supported, PF_A8R8G8B8 otherwise.
*
* @return texture format used for movie.
*/
EPixelFormat UCodecMovieTheora::GetFormat()
{
check(Initialized);
return GPixelFormats[PF_UYVY].Supported ? PF_UYVY : PF_A8R8G8B8;
} |
Does climate knowledge act as a shield for farm livelihoods? Empirical analysis from the coastal and non-coastal ecosystems of India
Developing countries with agrarian economy have been facing challenges arising from climate change events and its consequences. Climate knowledge influences the adaptation and mitigation... |
#ifndef DPGAnalysis_SiStripTools_APVCyclePhaseCollection_h
#define DPGAnalysis_SiStripTools_APVCyclePhaseCollection_h
#include <string>
#include <map>
#include <vector>
class APVCyclePhaseCollection {
public:
APVCyclePhaseCollection() : _apvmap(){};
~APVCyclePhaseCollection(){};
const std::map<std::string, int... |
def _calibration(self, obj_fun, initial_theta, stat):
target_update = self._parameters[0]
initial_c = self._parameters[1]
delta_obj = 0
logger.debug("Calibration...")
for i in range(stat):
if i % 5 == 0:
logger.debug('calibration step # {} of {}'.forma... |
This is a very old entry — images are small, formatting is off. A New HP: So Close, Yet So Far Away
Established in 1939 by Bill Hewlett and Dave Packard, HP (shorthand for Hewlett Packard, just for the record) is, as it describes itself a “technology company” selling consumer products for printing (shipping more than ... |
<filename>src/modules/transfer/cron/init.go
package cron
func Init() {
go GetStrategy()
go RebuildJudgePool()
go UpdateJudgeQueue()
}
|
def authenticated_connections(self) -> List[Connection]:
return [conn for conn in self._connections if conn.user_id] |
def ansible_kubernetes(inventory_contents, config_contents, tmpdirname):
with _ansible_directory(inventory_contents, tmpdirname) as ansible_dir_name:
os.chdir(ansible_dir_name)
subprocess.check_call(['ansible-playbook', '-i',
'inventory.ini', '-vv',
... |
# Copyright (c) 2023 zfit
import numpy as np
import pytest
import zfit
from zfit import Parameter
from zfit.models.dist_tfp import Poisson
lamb_true = 50
obs = zfit.Space(obs="Nobs", limits=(0, 200))
test_values = np.random.uniform(low=0, high=100, size=100)
def create_poisson():
N = Parameter("N", lamb_true... |
/*
* U-boot - Configuration file for CSP Minotaur board
*
* Thu Oct 25 15:30:44 CEST 2007 <hackfin@section5.ch>
* Minotaur config, brushed up for official uClinux dist.
* Parallel flash support disabled, SPI flash boot command
* added ('run flashboot').
*
* Flash image map:
*
* 0x00000000 u-boot... |
/**
* Uploads an entire list of trials into the experiment
* @param trials
* The array list containing the trials desired to be uploaded
*/
public void addTrials(ArrayList<Trial> trials) {
if (this.open) {
for (int i = 0; i < trials.size(); i++) {
this.trials.ad... |
.
With the reduced number of workers and the rise of morbidity, including occupational one, the urgent of occupational medicine is to keep the health of able-bodied citizens. Abnormal human gene variants leading to the emergence of functionally reduced gene products (enzymes) underlie susceptibility to this or that il... |
// Validate validates the Message.
// Only used for response (type: response || registered) types.
func (m Message) Validate() error {
switch m.Type {
case ErrorMessageType:
var err error
if _, ok := m.Payload["returnValue"]; ok {
err = m.Payload.Validate()
}
if err == nil {
return errors.New(m.Error)
... |
package games
import "time"
type GameType struct {
Data []struct {
ID int64 `json:"id"`
RootPlaceID int64 `json:"rootPlaceId"`
Name string `json:"name"`
Description string `json:"description"`
Creator struct {
ID int64 `json:"id"`
Name string `json:"name"`
... |
import type AWS from 'aws-sdk';
import type {PlainObject} from 'core-helpers';
export function createAWSLambdaExecutionQueueSender({
lambdaClient,
functionName
}: {
lambdaClient: AWS.Lambda;
functionName: string;
}) {
return async (query: PlainObject) => {
await lambdaClient
.invoke({
Funct... |
/** This method returns a list containing all values preceded by the specified key.
* for example:
* <tt>--input foo.txt --input bar.txt --input baz.txt</tt>
* would return the list "foo.txt","bar.txt","baz.txt" if key="input"
*/
public static List<String> parseList(String args[], String key) {
... |
/**
* Creates a random {@link GiftCard} object for use in Tests given a seed
*
* @param seed The RNG seed
* @return The random {@link GiftCard} object
*/
public static GiftCard createRandomGiftCard(final int seed) {
final GiftCard giftCardData = new GiftCard();
final Account acc... |
/**
* Attempts to parse the string as a bracketed expression.
* The next token is known to be a left parenthesis.
* @return the expression in brackets, or {@code null} if the input string does not
* correspond to a bracketed expression
*/
protected X parseBracketed() throws FormatException {
... |
// print prints the summarized stats.
func (s stats) print() {
if s.txBytes == 0 && len(s.responses) == 0 && len(s.requests) == 0 {
return
}
fmt.Println("---------------------------------------")
s.printRequest()
s.printResponse()
s.printTxBytes()
fmt.Println("=======================================")
} |
EVALUATION OF WORKBOOKS AS AN ACTIVE LEARNING TOOL FOR INDUSTRIAL DESIGN ENGINEERING
Industrial design engineering combines technical rationality and reflective practice, to support students’ reflection on their design process a workbook approach has been developed. The workbook approach guides students to reflect on ... |
<filename>inmemstore/inmemstore.go
// package store implements the neteaseapi store interface
package inmemstore
import (
"time"
"github.com/patrickmn/go-cache"
)
type InMemStore struct {
Store *cache.Cache
DefaultExpiration time.Duration
CleanupInterval time.Duration
}
func (s *InMemStore) Add(k string, v ... |
// WithFinalizer provides a way of calling a function upon dispatcher death
func WithFinalizer(c Finalizer) Option {
return func(l *eventDispatcher) {
l.finalizer = c
}
} |
/**
* <code>NamedEntitiesDereferencer</code> provides an extremely fast way
* to map the set of known HTML tags to unique integer values.
* <P>
* <b>Note:</b> the Elements described below comes from the HTML 4.01 DTD
* with IE extensions. Also, notice that tag names are case
* insensitive.
*/
p... |
/**
* or
*
* @param subclasses sub class
* @return FilterBuilder
*/
public FilterBuilder subclassOf(Class<?>... subclasses)
{
this.subclasses = subclasses;
return this;
} |
/// set the pitch position of the kinect base, range of values is [-1, 1]
bool rgbd_kinect::set_pitch(float y)
{
if (camera) {
INuiSensor *pNuiSensor = (INuiSensor*)camera;
HRESULT hr = pNuiSensor->NuiCameraElevationSetAngle((LONG)(y*NUI_CAMERA_ELEVATION_MAXIMUM));
if (FAILED(hr))
return false;
}
el... |
The effect of telenursing training based on family-centered empowerment pattern on compliance with diet regimen in patients with diabetes mellitus type 2: a randomized clinical trial
Background Telenursing facilitates access to efficient care and acceptance and compliance with treatment at home. Given wide complicatio... |
class ListDeque:
def __init__(self):
self._L = []
def add_first(self, item):
self._L.insert(0, item)
def add_last(self, item):
self._L.append(item)
def remove_first(self):
return self._L.pop(0)
def remove_last(self):
return self._L.pop()
|
<gh_stars>1-10
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <pthread.h>
#include "gsl/gsl_rng.h"
#include "base_defines.h"
#include "latools.h"
#include "coding_methods.h"
#include "image_coder... |
<reponame>KamilWilczek/Log_app
from django.db import models
class Truck(models.Model):
car_manufacturer = models.CharField(max_length=100)
semitrailer = models.CharField(max_length=100)
capacity = models.CharField(max_length=100)
registration_number = models.CharField(max_length=100, unique=True)
... |
/****************************************************************************
Send an smb to a fd.
****************************************************************************/
BOOL cli_send_smb(struct cli_state *cli)
{
size_t len;
size_t nwritten=0;
ssize_t ret;
if (cli->fd == -1)
return False;
cli_calculate_s... |
package main
import (
"flag"
"fmt"
"github.com/spf13/viper"
"os"
"os/signal"
"runtime"
"syscall"
"time"
"github.com/Achillesxu/ESTranfer/core"
)
// exitCode wraps a return value for the application
type exitCode struct{ Code int }
func handleExit() {
if e := recover(); e != nil {
if exit, ok := e.(exitC... |
<reponame>eliukehua/domeos-mye
package org.domeos.framework.api.service.global;
import org.domeos.framework.api.model.global.Registry;
import org.domeos.basemodel.HttpResponseTemp;
/**
* Created by feiliu206363 on 2015/8/31.
*/
public interface RegistryService {
/**
* private registry must be set before ot... |
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.LinkedList;
import ... |
from sys import stdin
def group(seq, idx):
if idx>=len(seq):
return []
else:
start=seq[idx]
end=seq[idx]
while idx+1<len(seq) and seq[idx]+1==seq[idx+1]:
end=seq[idx+1]
idx+=1
rest=group(seq,idx+1)
rest.append((start,end))
... |
# Ostap session by adzyuba started at Fri Feb 19 15:57:18 2021
# Command from CWD=/home/adzyuba/energy
# ostap KS-test.py
E[0].min()
E[0].max()
E[1].min()
E[1].max()
for ch in range(16):
E[ch].min()
for ch in range(16):
print( E[ch].min() )
for ch in range(16):
print( E[ch].max() )
hh ... |
Photonic Crystal Film Preparation and Characterization for Chemical Sensing
Functionalized photonic crystal films were prepared for sensing small chemical molecules. First, silica nanospheres were self-assembled to form a colloidal crystal template within a mold. The interstitial space of this template was infiltrated... |
import unittest.mock as mock
import ID2TLib.TestLibrary as Lib
import Test.ID2TAttackTest as Test
sha_basic_ddos = '33dfb7a6f4b32be3409cf088e5a2e179e98456637d192e7541a6f16c286c2bc2'
sha_num_attackers_ddos = '64a76befad280dac48c39ba9e3258a7768c13aeea3203044900fd8ac49e1e6ea'
sha_dest_mac_length_zero_ddos = '75c6aaf84f3... |
If I had Intel’s wireless Vive I might actually use VR. The setup is easier without all the cables, you’re less likely to trip over and smash your PC/die and, of course, you also look super-cool too. It’s kinda what VR needs to be.
You’re going to need a powerful GPU for VR, so check out our pick of the best graphics ... |
/**
* Removes a referenced object from this pool.
*
* @param ref A reference to the object to be removed.
* @return The object that was removed from the pool.
* @throws ObjectUnknownException If the referenced object does not exist.
*/
public TCSObject<?> removeObject(TCSObjectReference<?> ref)
... |
<gh_stars>0
module Main where
import Prelude
import Test.QuickCheck.Instances
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import qualified Data.ByteString as A
import qualified Data.ByteString.Builder as C
import qualified Data.ByteString.Lazy as D
import qualified BinaryParser as B
import B... |
<filename>src/options/components/autorun-form/Form.tsx<gh_stars>1-10
import React, { useRef } from 'react'
import { Form as FinalForm, useFormState, useForm } from 'react-final-form'
import {
constructAutorunInitialValues,
AutorunFormFields,
FormFields,
} from '../form/utils'
import FormContent from './FormContent'
... |
/**
* Convertimos el numero double a String, agregando formato para que sea procesado
* El numero de decimales esta determinado por %.2f
* ej. %10.2f (10 posiciones enteras y 2 decimales)
* si no se pone el primer valor por default toma el valor entero co... |
// GetStats returns statistics about received packets. If reset is true,
// the statistics are reset.
func (cache *Cache) GetStats(reset bool) (uint32, uint32, uint32, uint32) {
cache.mu.Lock()
defer cache.mu.Unlock()
expected := cache.expected
lost := cache.lost
totalLost := cache.totalLost + cache.lost
eseqno ... |
<gh_stars>100-1000
import FWCore.ParameterSet.Config as cms
l1RPCHwConfig = cms.ESProducer("RPCTriggerHwConfig",
disableTowers = cms.vint32(),
disableCrates = cms.vint32(),
disableTowersInCrates = cms.vint32(),
enableTowers = cms.vint32(),
enableCrates = cms.vint32(),
enableTowersInCrates = cms... |
Michelle Carter allegedly urged her boyfriend to take his own life (Picture: AP)
A teenage girl who is accused of convincing her 18-year-old boyfriend to commit suicide will now stand trial.
Michelle Carter, 18, is charged with involuntary manslaughter after she allegedly urged Conrad Roy to kill himself in a series ... |
/**
* Returns whether is same id between other transactions.
* This defines a weaker notion of equality between two transactions.
*/
public boolean isSameId(Transaction otherTransaction) {
if (otherTransaction == this) {
return true;
}
return otherTransaction != null
... |
def _check_es_rev(index, doc_id, couch_revs):
es = get_es_new()
doc_id_query = {
"filter": {
"ids": {"values": [doc_id]}
},
"fields": ["_id", "_rev"]
}
try:
res = es.search(index, body=doc_id_query)
status = False
message = "Not in sync"
... |
Full Rank Tilings of Finite Abelian Groups
A tiling of a finite abelian group $G$ is a pair $(V,A)$ of subsets of $G$ such that $0$ is in both $V$ and $A$ and every $g\in G$ can be uniquely written as $g=v+a$ with $v\in V$ and $a\in A$. Tilings are a special case of normed factorizations, a type of factorization by su... |
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
typedef pair<int, int> pi;
typedef long long ll;
const int MAX=5e5+9;
int n, m, cur[MAX];
vector<int> adj[MAX];
vector<int> t[MAX];
bool add(int x) {
for (int i=0; i<t[x].size(); ++i) {
... |
/**
* Remove keys from the JSON string
*
* @param json the JSON to work on
* @param filter determine whether a key should stay in the JSON or not. If the
* {@link Predicate} returns <code>false</code> the key will be
* removed.
* @return the stripped JSON
*/
public static S... |
// Tracks the progress of a terrain chunk that is being loaded/generated.
class TerrainProgressTracker
{
public:
TerrainProgressTracker() = delete;
TerrainProgressTracker(std::shared_ptr<spdlog::logger> log,
Morton3 cellCoords,
AABB boundingBox,
... |
package com.mingrisoft.mymirror.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.view.View;
import com.mingrisoft.mymirror.R;
/**
* Created by Administrator on 2017/7/14 0014.
*/
public class FunctionView... |
<reponame>NDMCreative/ionic-docs
// import 'ionicons';
// import { Close } from './arrow.svg';
import {
Component,
Element,
Prop,
State
} from '@stencil/core';
@Component({
tag: 'ionic-search',
styleUrl: 'ionic-search.scss',
shadow: false
})
export class IonicSearch {
@State() active = false;
@Stat... |
import { ErrorType, IResponseErrorData } from './types';
const getErrorType = ({ error }: IResponseErrorData) => {
const lowerDesc = error.toLowerCase();
switch (true) {
case error === 'Ошибка авторизации':
return ErrorType.InvalidToken;
case error === 'Ошибка при валидации параметров':
return ... |
<reponame>abraker95/mania_offset_monitor
import pyqtgraph
from pyqtgraph import dockarea
from pyqtgraph.Qt import QtCore, QtGui
from datetime import datetime
from PyQt5.QtGui import *
import numpy as np
from osu_analysis import ManiaScoreData
from osu_performance_recorder import Data
from .plots.miss_plot import Miss... |
<reponame>greed2411/rucio
''' Copyright European Organization for Nuclear Research (CERN)
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
Authors:
-... |
s = input()
index = {}
for l in s :
if l in index:
index[l] += 1
else:
index[l] = 1
if 'a' in index:
index['a'] //= 2
if 'u' in index:
index['u'] //= 2
min = 1000000
for l in ['B','u','l','b','a','s','r']:
if l in index:
new_min = index[l]
if new_mi... |
#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int l[N], cost[N];
int n;
set<int > gcds;
vector<pair<int, int> > v;
map<int, int> M;
int NWD(int a, int b)
{
return b? NWD(b, a % b): a;
}
int main()
{
scanf("%d", &n);
for(int i = 1; i <= n; i++)
{
scanf("%d", &l[i]);
}
for(int i = 1; i <= n; i... |
/**
* Put Events Request Marshaller
*/
public class PutEventsRequestMarshaller implements Marshaller<Request<PutEventsRequest>, PutEventsRequest> {
public Request<PutEventsRequest> marshall(PutEventsRequest putEventsRequest) {
if (putEventsRequest == null) {
throw new AmazonClientException("Invalid a... |
package builds
import (
"bufio"
"bytes"
"github.com/pkg/errors"
"io"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes/typed/core/v1"
)
// GetBuildLogsForPod returns the pod log for a Knative Build style build pod which is based on init containers
func GetBuildLogsForPod(podInterface v1.PodInterface, pod... |
<reponame>Defalt8/axl.media<filename>include/axl.media/font/TTF.hpp
#pragma once
#include <stdint.h>
#include "../lib.hpp"
namespace axl {
namespace media {
namespace font {
class AXLMEDIACXXAPI TTF
{
public:
typedef int16_t shortFrac; // 16-bit signed fraction
typedef int16_t fixed; // 16-bit signed fixed-... |
Is it all hands on deck or every man for himself on Suits?
When the USA drama returns Wednesday with the remaining six episodes of Season 5, Mike (Patrick J. Adams) has to find a way to get out of his very big predicament after being arrested on fraud charges in the midseason finale.
"In general, the back six is, 'Ca... |
/* Don't really discard the provisional lines except when they occur
in a run of discardables, with nonprovisionals at the beginning
and end. */
private void filterDiscards(final byte[] discards) {
final int end = bufferedLines;
for (int i = 0; i < end; i++) {
/* Cancel provisional ... |
import csv
import os
import subprocess
import threading
# Gather the packages to test.
PREFIX = './packages/node_modules/'
# CISCOSPARK = os.path.join(PREFIX, '@ciscospark')
WEBEX = os.path.join(PREFIX, '@webex')
PROD_ENV_VARS = {
'ATLAS_SERVICE_URL': 'https://atlas-a.wbx2.com/admin/api/v1',
'CONVERSATION_SERVIC... |
use crate::utils::{get_trait_def_id, paths, span_lint};
use rustc_hir::*;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
declare_clippy_lint! {
/// **What it does:** Checks for mis-uses of the serde API.
///
/// **Why is this bad?** Serde is very fin... |
<reponame>Onekki/ohmysite
package com.onekki.ohmysite.module.blog.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.onekki.ohmysite.module.blog.entity.Article;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <... |
/**
* Return a new ParseField where all field names are deprecated and replaced with {@code allReplacedWith}.
*/
public ParseField withAllDeprecated(String allReplacedWith) {
ParseField parseField = this.withDeprecation(getAllNamesIncludedDeprecated());
parseField.allReplacedWith = allReplaced... |
def find_gender():
u_name = input().strip()
return "IGNORE HIM!" if len(set(u_name)) % 2 else "CHAT WITH HER!"
print(find_gender())
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.