content stringlengths 10 4.9M |
|---|
<commit_msg>Exit when backButton pressed in menu
<commit_before>package com.robitdroid;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
public class RobitDroid extends Activity {
private Image... |
/**
* Tests if a linestring is completely contained in the boundary of the target rectangle.
* @param line the linestring to test
* @return true if the linestring is contained in the boundary
*/
private boolean isLineStringContainedInBoundary(LineString line)
{
CoordinateSequence seq = line.getCoordin... |
/** Generates ide-build information for Android Studio. */
public class AndroidStudioInfoAspect extends NativeAspectClass implements ConfiguredAspectFactory {
public static final String NAME = "AndroidStudioInfoAspect";
@Override
public String getName() {
return NAME;
}
@Override
public AspectDefiniti... |
package com.clusus.payroll.employee.domain.entity;
import com.clusus.payroll.employee.domain.valueobject.RoleId;
import com.clusus.payroll.employee.domain.valueobject.RoleName;
import com.clusus.payroll.shared.domain.core.Entity;
import java.time.LocalDate;
public class Role extends Entity<RoleId> {
private Role... |
/**
* Test of cleanupRedis method, of class SitesRedisExtractor.
*/
@Test
public void testABCleanupRedis() throws InterruptedException {
System.out.println("cleanupRedis");
boolean isSuccess = false;
SitesRedisExtractor instance = new SitesRedisExtractor(filePath);
instance... |
<reponame>bakjos/protoreflect
package builder
import (
"fmt"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/bakjos/protoreflect/desc"
)
// FieldType represents the type of a field or extension. It can represent a
// message or enum type or any of the scalar types supported by protobufs.
//... |
Facebook chief Mark Zuckerberg set a new record for corporate compensation in 2012 with a package worth more than $2.278 billion, according to a survey by a corporate governance firm.
The report by GMI Ratings showed Zuckerberg’s salary of $503,000 and bonus of $266,000 were eclipsed by stock options worth some $2.27 ... |
Sen. Joe Manchin (D-WV) urged President Donald Trump to pick a different nominee for the so-called “Drug Czar” position after a Washington Post and “60 Minutes” investigation revealed that the current nominee, Rep. Tom Marino (R-PA), was behind legislation that significantly constrained the DEA’s ability to freeze ship... |
def s3_fetch_module(s3_path, file_name, use_creds = True):
s3, bucket = get_s3_client(use_creds = use_creds)
print('Fetching ' + s3_path + file_name)
s3.download_file(Bucket=bucket, Key=s3_path + file_name, Filename=file_name)
dir_name = sub('.tar.gz$', '', file_name)
contains_hyphen = False
if ... |
From Stomatoscopy to BEA: The History of Hungarian Experimental Phonetics
Hungarian phoneticians were often among the first to do high quality research of certain types or to adopt the most advanced methods of their time. The first objective method in the investigation of the articulation of speech sounds, called „sto... |
/**
* PaymentMethod.java
* @author Vagisha Sharma
* May 5, 2011
*
*/
public class PaymentMethod {
private int id;
private String uwbudgetNumber;
private String ponumber;
public String paymentMethodName;
private String contactFirstName;
private String contactLastName;
private String contactEmail;
private ... |
/**
* @author starchmd
* @version $Revision$
*
* A monitor to monitor the multiple monitors.
*/
public class QueueMuxMonitor implements Monitor {
private static final Logger LOG = Logger.getLogger(QueueMuxMonitor.class.getName());
private BackendManager backend;
private QueueManager qManager;
/**
... |
/**
* Ensures the truth of an condition involving the a parameter to the
* calling method, but not involving the state of the calling instance.
*
* @param condition a boolean expression
* @param errorMessage error message
* @throws IllegalArgumentException if {@code condition} is false
*/
public st... |
<reponame>TomoyukiAota/photo-data-viewer
interface Stringable {
toString(): string;
}
export function formatArray(array?: Array<Stringable>): string {
if (!array) return '';
const content = array.map(element => element.toString?.() ?? '').join(', ');
return `[${content}]`;
}
|
<filename>inicu-client/src/app/nutrition/oralfeedDetail.ts
export class OralfeedDetail {
oralfeedid : any;
babyfeedid : any;
creationtime : any;
feedvolume : any;
totalFeedVolume : any;
feedtypeId : any;
modificationtime : any;
uhid : any;
} |
import tkinter as tk
from pathlib import Path
import random
from numpy import array_equal, copy, zeros, any
_GRID_SIZE = 4
class Application(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.wm_iconbitmap('2048.ico')
self.title("2048")
self.minsize(272, 350)
... |
The price is (almost always) right. (Brent Lewin/Bloomberg News)
Two years ago, the Washington state began an unprecedented policy experiment by allowing large-scale production and sale of recreational marijuana to the public. The effects on public health and safety and on the relationship of law enforcement to minori... |
/**
* Test with query against an empty file. Select clause has regular column reference, and an expression.
*
* regular column "key" is assigned with nullable-int
* expression "key + 100" is materialized with nullable-int as output type.
*/
@Test
public void testQueryEmptyJson() throws Exception {
... |
def print_task(selected_id):
print("Below is the Entry selected to edit or delete\n" +
'-'*30)
selected_query = Task.select().where(Task.id == selected_id)
for task in selected_query:
print("Name: " + task.first_name,
"\nDate : " + datetime.datetime.strftime(task.date, '%m/%d... |
Integrative Genomic and Proteomic Analysis of the Response of Lactobacillus casei Zhang to Glucose Restriction.
Nutrient starvation is an important survival challenge for bacteria during industrial production of functional foods. As next-generation sequencing technology has greatly advanced, we performed proteomic and... |
/**
* Creates ids for a collection of currencies.
*
* @param securityType
* The security type string
* @param region
* The region string
* @param currencies
* The currencies
* @return The ids
*/
private static List<ExternalId> createIds(final ... |
<reponame>ibwei/kcc-homepage
import {networks, NetworkType} from '../constants/networks'
import {ChainId, getNetWorkConnect} from '../connectors/index'
import {Currency, PairInfo} from '../state/bridge/reducer'
import store from '../state'
import BN from 'bignumber.js'
import web3 from 'web3'
import {getBridgeContract,... |
GAS-TO-PARTICLE HEAT TRANSFER IN THE DRAFT TUBE OF A SPOUTED BED
The gas-to-particle heat transfer coefficients in the spout region of draft tube spouting beds of 2.6 mm glass beads were determined during continuous operation with particle fed through the base. For this purpose, detailed profiles of the gas temperatur... |
/**
* @param groupCreationRequest - contains Group Name and Description of new group.
* @param owner - Currently logged in user gets set as owner.
*/
public GroupResponse createGroup(GroupCreationRequest groupCreationRequest, User owner) {
if (!notNullOrEmpty.test(groupCreationRequest.getName()))... |
// Command handling thread
class CommandHandler extends BlockingCommandHandlingThread {
public CommandHandler(int queueCapacity) {
super(queueCapacity);
}
// @Override
public String getClassName() {
return "MainService$CommandHandler";
}
// @Ove... |
The Pentagon is floating a controversial plan to close all U.S.-based commissaries in 2015 as part of a massive cost-saving effort after more than a decade of war.
The commissaries are grocery stores that offer food and other necessities at a discount to members of the military, their families and veterans. But as Con... |
/**
* convenience method to initialize a row - handles setting the date info,
* color of the date field, and whether the header and divider are visible
* or not.
* @param holder a subclass of QamarViewHolder, the ViewHolder
* @param date the date for the row
* @param position the position of the... |
package com.javapatterns.abstractfactory;
public class ProductB1 implements ProductB
{
public ProductB1()
{
}
}
|
package object_test
import (
"fmt"
"os"
"path/filepath"
"testing"
"github.com/Nivl/git-go"
"github.com/Nivl/git-go/ginternals"
"github.com/Nivl/git-go/ginternals/object"
"github.com/Nivl/git-go/internal/testhelper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestTree(t... |
// Estrutura de dados 2
public class AppHuff {
public static void main (String[] args) {
try
{
Huff.compactar("teste.txt", "novo.huf");
//Huff.descompactar("novo.huf", "descompactado.txt");
}
catch (Exception e)
{
System.out.println (e.getMessage());
}
}
} |
<filename>internal/webdavmount/webdavmount.go<gh_stars>1000+
// Package webdavmount implements webdav filesystem for serving snapshots.
package webdavmount
import (
"os"
"strings"
"sync"
"sync/atomic"
"github.com/pkg/errors"
"golang.org/x/net/context"
"golang.org/x/net/webdav"
"github.com/kopia/kopia/fs"
"g... |
def lookup_generic(self, obj, as_of_date, country_code):
matches = []
missing = []
if isinstance(obj, (AssetConvertible, ContinuousFuture)):
self._lookup_generic_scalar(
obj=obj,
as_of_date=as_of_date,
country_code=country_code,
... |
import { Component, OnInit } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router';
@Component({
selector: 'app-your-rides',
templateUrl: './your-rides.page.html',
styleUrls: ['./your-rides.page.scss'],
})
export class YourRidesPage implements OnInit {
seg_id = 1;
constructor(priv... |
Shooting children and the elderly: is it even a good idea on paper? An American law enforcement supply company thinks so and is letting police departments purchase some rather unusual products for target practice.
For only 99 cents per sheet, Law Enforcement Targets Inc. lets customers order life-like posters that sho... |
Corporeality and Emotion in Goethe's Die Wahlverwandtschaften
Abstract This article explores the connection between corporeality and emotion in Goethe's Die Wahlverwandtschaften, with special emphasis on tableaux vivants. It focuses on the dilemma of a newly emerging concept of love based on physical attraction, which... |
/// \par parameters: a type
/// \return Boolean telling whether the type is that of java string builder
bool refined_string_typet::is_java_string_builder_type(const typet &type)
{
if(type.id()==ID_pointer)
{
const pointer_typet &pt=to_pointer_type(type);
const typet &subtype=pt.subtype();
if(subtype.id(... |
The Optimal Time Typing to Identifying Users at the Keyboard Handwriting
This article deals with the problem of ensuring protection against unauthorized access to data by identifying users according to biometric characteristics. The article deals with the issue of choosing the optimal time of typing. This question is ... |
<reponame>luite/jsaddle-dom<gh_stars>10-100
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.XPathResult
(iterateNext, iterateNext_, snapshotItem, snapshotItem_,
... |
def board_to_state_array(board, cur_team_id):
size = board.configuration["size"]
state = np.zeros((size, size, 9), dtype=np.float32)
opp_team_id = (cur_team_id + 1) % 2
for cell in board.cells.values():
j, i = point_to_ji(cell.position, size)
state[j, i, 0] = cell.halite
if cell... |
// GetAll returns a paginated list of resources.
// An empty list of resources will be represented as `null` in the JSON response if `nil` is assigned to the
// Page.Resources. Otherwise, is an empty slice is assigned, an empty list will be represented as `[]`.
func (h *groupHandler) GetAll(r *http.Request, params scim... |
<reponame>ricardozanini/jackson-jq<filename>jackson-jq/src/main/java/net/thisptr/jackson/jq/internal/functions/AbstractMaxByFunction.java
package net.thisptr.jackson.jq.internal.functions;
import java.util.List;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
impo... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
def transposeBelowTarget(
self: _T,
target,
*,
minimize=False,
inPlace=False
) -> _T:
if inPlace:
src = self
else:
src = copy.deepcopy(self)
while True:
if src.ps - target.ps <= 0:
break
s... |
The Effect of Naloxone on the Hemodynamics of the Newborn Piglet with Septic Shock
ABSTRACT. Naloxone has been shown to reverse the hemodynamic sequelae of experimental septic shock in adult animal models. Its effectiveness in the newborn has not been studied. To further investigate the efficacy of naloxone, we instru... |
class REG_Data:
"""Data Container for regression problem
Parameters
----------
tstart : float
Start of the TRF in seconds.
tstop : float
Stop of the TRF in seconds.
nlevel : int
Decides the density of Gabor atoms. Bigger nlevel -> less dense basis.
By default it ... |
/* Generate the predefined rules into the corresponding session */
int predef_rules_generate(struct session_t *sess, char *predef_name)
{
predefined_pdr_entry *pdr_entry;
uint8_t cnt;
session_emd_response resp;
pdr_entry = predef_rules_search(predef_name);
if (NULL == pdr_entry) {
LOG(SESSIO... |
import sys, itertools
input = sys.stdin.readline
def main():
# d[i][j]は2頂点間i, j間の移動コストを格納, Vは頂点数
def warshall_floyd(d, V):
for k in range(V):
for i in range(V):
for j in range(V):
d[i][j] = min(d[i][j], d[i][k] + d[k][j])
return d # d[i][j]に頂点i,... |
<filename>src/jmh/java/com/thekirschners/emplacements/column/EnvObsevationsProcessor.java
package com.thekirschners.emplacements.column;
import java.util.Calendar;
import java.util.Iterator;
import java.util.OptionalDouble;
import java.util.stream.Collectors;
public class EnvObsevationsProcessor {
public static O... |
<gh_stars>0
public class Solution {
public int numIslands(char[][] grid) {
int row = grid.length;
if (row == 0) {
return 0;
}
int col = grid[0].length;
boolean[][] visited = new boolean[row][col];
int count = 0;
for (int i = 0; i < row; i++) {
... |
<gh_stars>1-10
import { DBDriver } from '../driver/abstract'
import { cachedObj, delProperty, dispatch, Keys, options, reactCache, setProperty } from '../shared'
export function set(
cache: reactCache,
driver: DBDriver,
recordData: Record<string, cachedObj['data']>,
recordMeta?: Record<string, cachedOb... |
// Copyright 2018 The Oppia 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 required by ap... |
/**
* Executes {@link Job} instances from the {@link JobQueue}.
*/
private class JobQueueExecutor {
/**
* {@link JobQueue}.
*/
private final JobQueue jobQueue = new JobQueue(this);
/**
* Registered {@link ProcessState} identifier instances. Typically should only
* invoke the single {@link Proces... |
<filename>aoc-rust/src/bin/aoc-2017-10.rs
fn part1(l: &str, len: usize) -> usize {
let mut r = aoc::Rope::new(len);
for pos in aoc::uints::<usize>(l) {
r.twist(pos);
}
r.product()
}
#[test]
fn part1_works() {
assert_eq!(part1("3,4,1,5", 5), 12);
}
fn part2(l: &str) -> String {
let r = ... |
module BABYLON {
export interface PhysicsImpostorParameters {
mass: number;
friction?: number;
restitution?: number;
nativeOptions?: any;
}
export interface IPhysicsEnabledObject {
position: Vector3;
rotationQuaternion: Quaternion;
scalin... |
/**
* @author Artem Pronchakov <artem.pronchakov@calisto.email>
*/
@ClientEndpoint
public class HelloClientEndpoint {
private static final Logger log = LoggerFactory.getLogger(HelloClientEndpoint.class);
public HelloClientEndpoint() {
log.debug("new HelloClientEndpoint()");
}
@OnOpen
pu... |
def gauge(self, metric, value, delta=False, rate=1.0, tags=None):
if self.enabled:
self._statsd.gauge(self.get_metric_name(metric, tags),
value,
rate=rate,
delta=delta) |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package applicationdiscoveryserviceiface provides an interface to enable mocking the AWS Application Discovery Service service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when th... |
Identification and characterization of the minimal androgen-regulated kidney-specific kidney androgen-regulated protein gene promoter.
The kidney androgen-regulated protein (Kap) gene is tissue specific and regulated by androgen in mouse kidney proximal tubule cells (PTCs). In the present study, we aimed to identify t... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2020 Edgewall Software
# Copyright (C) 2006 <NAME> <<EMAIL>>
# Copyright (C) 2006 <NAME> <<EMAIL>>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are... |
/**
* Send the specified shared secret to a running cloud foundry application.
*
* @param client client
* @param secret the secret to send
* @param application the application to send the secret to
*/
public void sendTo(CloudFoundryClient client, SharedSecret secret, CloudApplication appl... |
<filename>headers/PlaySeriesController.h
//
// PlayerController.h
// Tournament
//
// Created by <NAME> on Wed Dec 26 2001.
// Copyright (c) 2001 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PlaySeries.h"
@interface PlaySeriesController : NSObject<NSTableViewDataSource> {
id table;... |
package codec
import (
"errors"
"fmt"
"strings"
"github.com/bitmovin/bitmovin-api-sdk-go/model"
"github.com/cbsinteractive/transcode-orchestrator/client/transcoding/job"
)
var ErrUnsupportedValue = errors.New("unsupported value")
var ErrEmptyList = errors.New("empty list")
var AudioSampleRate = 48000.
type en... |
def create_pvc_clone_resource(self, clone, source):
pvc_data = self.api.read_namespaced_persistent_volume_claim(name=source, namespace=self.namespace)
pvc_size = pvc_data.spec.resources.requests['storage']
storage_class = pvc_data.spec.storage_class_name
pvc_status = self.create_pvc_clon... |
#include <hxcpp.h>
#ifndef INCLUDED_EReg
#include <EReg.h>
#endif
#ifndef INCLUDED_Std
#include <Std.h>
#endif
#ifndef INCLUDED_haxe_Timer
#include <haxe/Timer.h>
#endif
#ifndef INCLUDED_haxe_io_Path
#include <haxe/io/Path.h>
#endif
#ifndef INCLUDED_hxMath
#include <hxMath.h>
#endif
#ifndef INCLUDED_l... |
<reponame>qiuwenhuifx/PolarDB-for-PostgreSQL
/*--------------------------------------------------------------------------
*
* px_hash.h
* Definitions and API functions for pxhash.c
*
* Portions Copyright (c) 2005-2008, Greenplum inc
* Portions Copyright (c) 2012-Present Pivotal Software, Inc.
* Portions Copyri... |
<reponame>JorgeLNJunior/animes-review-api<filename>src/http/modules/review/query/review.query.builer.ts
import { FindConditions, FindManyOptions } from 'typeorm'
import { Review } from '../entities/review.entity'
import { ReviewQuery } from './review.query.interface'
export class ReviewQueryBuilder {
private query:... |
Owner, Jeff Poppen, widely known from dozens of appearances on public television, is concerned over possible contamination from a neighboring corporate chicken farm.
One of Tennessee's oldest and largest organic farms is shutting down after a dispute with a subsidiary of Tyson Foods. The farm, operated by the "Barefoo... |
Google showed off screen casting from Android at Google I/O, and we've been seeing hints of it in KitKat for months, and now it's suddenly real. Google has thrown the switch and enabled casting on a number of Android devices, and it works with sound too.
Screen casting will require Android 4.4.2 or higher (MR1) and is... |
Research onHigh Robust Multimedia Image Encryption Based on Gyrator Transform Domain Model
(e encryption and privacy protection of multimedia image resources are of great value in the information age. (e utilization of the gyrator transform domain model in multimedia image encryption can select parameters more accurat... |
<reponame>sarvex/tensorflow-runtime
/*
* Copyright 2020 The TensorFlow Runtime Authors
*
* 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... |
/**
* Check if all DailyServices are after than current date.
* @param date
* @param days
* @return true if all dailyService are after than SystemDate
*/
public static boolean isValidDailyServices(List<DailyServices> days){
for(DailyServices d : days){
final LocalDate TODAY = new LocalDate();
if(!d.ge... |
def rotation_axes(
arr,
labels=None,
index=None,
sort_by_shape=False):
inertia = tensor_of_inertia(arr, labels, index, None).astype(np.double)
eigenvalues, eigenvectors = np.linalg.eigh(inertia)
if sort_by_shape:
tmp = [
(size, eigenvalue, eigenvector)
... |
Induced by Inhibitory Ethanol Concentration
a* b a ABSTRACT. In oxygen-aerated non-growing cells a subinhibitory ethanol concentration (1 G/L) causes an H /K exchange. An inhibitory ethanol concentration (30 G/L) slows down acidification but + + has no effect on its extent. The transmembrane pH depends directly on the... |
def initOptiTruck(self,**kwargs):
self.checkFeasibility()
self.M=pyomo.ConcreteModel()
self.M.isLP=True
self.M.weight=kwargs.get('weight', 'weightedDistance')
self.M.edgeIndex=self.edges()
self.M.edgeIndexForw=[(node1,node2) for (node1,node2) in self.... |
def save(self, filename=None):
if filename is None:
filename = self._filename
if filename is None:
raise ValueError("No filename specified.")
data = {}
description = {}
for name in self.get_field_names():
data[name] = self._reduce(self._data[na... |
import { Resources } from '../common'
import { Artifact } from '../enums/Artifact'
import { Disposition } from '../enums/Disposition'
import { FlaggedProp, Omit } from '../../../../helpers/types'
export interface Treasure {
resources: Resources
artifact: Artifact
}
export interface MessageAndTreasure {
message:... |
<gh_stars>0
# Print the head of airquality
print(airquality.head())
# Melt airquality: airquality_melt
airquality_melt = pd.melt(airquality, id_vars=["Month", "Day"], value_vars=["Ozone","Solar.R", "Wind", "Temp"])
# Print the head of airquality_melt
print(airquality_melt.head())
# Print the head of airquality
prin... |
<filename>bcs/ledger/xledger/state/context/context_test.go
package context
import (
"io/ioutil"
"os"
"testing"
"github.com/superconsensus-chain/xupercore/bcs/ledger/xledger/ledger"
"github.com/superconsensus-chain/xupercore/kernel/mock"
"github.com/superconsensus-chain/xupercore/lib/crypto/client"
_ "github.co... |
a,b=list(map(int,input().split()))
c,d=list(map(int,input().split()))
print('YES' if (b-c<=1 and (c-2)/b<=2) or (a-d<=1 and (d-2)/a<=2) else 'NO') |
/*******************************************************************************
* MASH 3D simulator
*
* Copyright (c) 2014 Idiap Research Institute, http://www.idiap.ch/
* Written by Philip Abbet <philip.abbet@idiap.ch>
*
* This file is part of mash-simulator.
*
* mash-simulator is free software: you can redistribu... |
Posted by James in Constitution, Holyrood, Parties, Westminster |
There’s been a lot of Holyrood-bubble drama around LabourForIndy recently. Who’s that in their photos? When did you join Labour? Is it even real? It might seem like the phoniest of wars, but it’s happening for a reason.
Fear. Specifically Labour fear.
... |
#include<bits/stdc++.h>
using namespace std;
int32_t main(){
ios::sync_with_stdio(0);
int t;
cin >> t;
while(t--){
int n, d;
cin >> n >> d;
vector<int> vs(n);
for(auto &x:vs) cin >> x;
int ans = vs[0];
int k=1;
while(d>0 and k<n){
int w = min(d, k*vs[k]);
w/=k;
d-=w*k;
ans += w;
++k;
... |
"""
The Cluster module generates descriptive statistics for clusters
obtained from libraries such as sklearn.
Usage:
km = KMeans()
km.fit(df)
cluster = Cluster(df, km.labels_)
cluster.stats()
"""
from dataclasses import dataclass, field
from typing import List, Union
import pandas as pd
import numpy as... |
The way I feel about the above promo photo announcing Babymetal's 2015 touring plans, and also showcasing some new outfits, can be thoroughly summed up by this clip from The Simpsons:
Subscribe to Metal Injection on
Are Babymetal ready to unveil the next chapter of their story? It would seem so. The band has announce... |
/** Main activity that displays three choices to user */
public class MainActivity extends Activity implements View.OnClickListener{
private static final String TAG = "MainActivity";
private AtomicBoolean isRegistrationInProgress = new AtomicBoolean(false);
private Button btnUI;
private Switch swchLangu... |
<reponame>yueya/pms<filename>pms-sysm/src/main/java/com/yueya/system/dao/dto/ViewDto.java
package com.yueya.system.dao.dto;
public class ViewDto {
public String name;
public int count;
}
|
// TRENTO: Reduced Thickness Event-by-event Nuclear Topology
// Copyright 2015 <NAME>, <NAME>
// MIT License
#ifndef FAST_EXP_H
#define FAST_EXP_H
#include <cmath>
#include <stdexcept>
#include <vector>
namespace trento {
/// \rst
/// Fast exponential approximation, to be used as a drop-in replacement for
/// ``std... |
/**
* Sorts the Documentos from the Expediente by Required first and Optional
* second.
*
* @param expediente
*/
private void sortDocumentos(ExpedienteFamiliaSolicitudDTO expediente) {
Collections.sort(expediente.getDocumentosList(), new Comparator<DocumentoDTO>() {
@Override
public int compare(Docum... |
#include <Arduino.h>
#include <Servo.h>
// Set up the torso commands
#define TORSO_MOTOR_PIN 0
#define TORSO_POS_CMD 10
Servo myservo1; // create servo object to control a servo
Servo myservo2; // create servo object to control a servo
Servo myservo3; // create servo object to control a servo
void setup() {
Se... |
/* retreive current device category forced for a given usage */
static audio_policy_forced_cfg_t ap_get_force_use(
const struct audio_policy *pol,
audio_policy_force_use_t usage)
{
const struct legacy_audio_policy *lap = t... |
/**
* The rotation an object should take in the immediate future.
*
* @see RotationComponent
* @author madgaksha
*
*/
public class ShouldScaleComponent extends ScaleComponent implements Component, Poolable {
private final static IGrantStrategy DEFAULT_GRANT_STRATEGY = new ExponentialGrantStrategy();
public IGr... |
def publish_table_notification(table_key, message, message_types, subject=None):
topic = get_table_option(table_key, 'sns_topic_arn')
if not topic:
return
for message_type in message_types:
if message_type in get_table_option(table_key, 'sns_message_types'):
__publish(topic, mess... |
import java.util.Scanner;
public class SoldierAndBananas {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
//Given
int bananaUnitPrice = scanner.nextInt();
int soldierDollars = scanner.nextInt();
int requiredBananas = scanner.nextInt();
... |
<filename>src/role/helpers/role.halpers.ts
import { Role } from "src/role/role.entity";
import { RoleName } from "../enums/role.enum";
export function createDefaultOwnerRole():Role {
let owner = new Role();
owner = {...owner,
...{
isBannedUsers: true,
name: Rol... |
def _call_batch(self, requests):
ids = []
for request in requests:
if request.has_key('id'):
ids.append(request['id'])
self._request = requests
message = json.dumps(requests)
notify = False
if len(ids) == 0:
notify = True
re... |
import { registerLocalizationBundle } from '@opensumi/ide-core-common';
import { createBrowserInjector } from '@opensumi/ide-dev-tool/src/injector-helper';
import { MockInjector } from '@opensumi/ide-dev-tool/src/mock-injector';
import { createBrowserApi } from '../../../src/browser/sumi-browser';
import { mockExtensio... |
from collections import defaultdict
from itertools import combinations
read_many = lambda type_: list(map(type_, input().split()))
def main():
n, m = read_many(int)
relations = defaultdict(lambda: {})
d={}
for i in range(m):
w1, w2 = read_many(int)
relations[w1][w2] = 0
relation... |
export const storybookAvatarUrl = 'https://cdn.tree.ly/storybook/v1/avatar.jpeg';
export const storybookCoverUrl = 'https://cdn.tree.ly/storybook/v1/cover.jpeg';
|
<reponame>cloudfoundry/packit
package sbom
import (
"bytes"
"fmt"
"io"
"sync"
"github.com/anchore/syft/syft"
"github.com/anchore/syft/syft/sbom"
)
// FormattedReader outputs the SBoM in a specified format.
type FormattedReader struct {
m sync.Mutex
sbom SBOM
rawFormatID string
format ... |
<filename>Data Structures and Algorithms/Binary Tree/BinaryTreeSearchUse.cpp
#include<iostream>
#include"BinarySearchTree.h"
using namespace std;
int main()
{
BST<int> t;
t.insert(20);
t.insert(10);
t.insert(12);
t.insert(14);
t.insert(13);
t.print();
cout<<t.hasData(12)<<endl;
cout... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.