content stringlengths 10 4.9M |
|---|
///////////////////////////////////////////////////////////////////////////
// MemoryPool //
///////////////////////////////////////////////////////////////////////////
// Pool is an encapsulation of a memory pool. It is a custom written
// memory manager for I... |
<filename>src/exporter.rs
struct Exporter {
dummy: bool,
}
impl Exporter {
fn new() -> Exporter {
Exporter {
dummy: false,
}
}
}
// vim: et tw=78 sw=4:
|
def descr_fromstring(self, space, w_s):
if self is w_s:
raise oefmt(space.w_ValueError,
"array.fromstring(x): x cannot be self")
s = space.getarg_w('s#', w_s)
msg = "fromstring() is deprecated. Use frombytes() instead."
space.warn(space.newtext(msg), s... |
export const CARS = [
{
id: 1,
brand: 'BMW',
color: 'Gold',
model: 'BMW X5',
},
];
|
<filename>usr/libexec/budd/BYDaemonProximityTargetProtocol-Protocol.h
//
// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).
//
// Copyright (C) 1997-2019 <NAME>.
//
#import "NSObject-Protocol.h"
@class SASProximityHandshake, SASProximityInformatio... |
<gh_stars>0
package ru.nkotkin;
import org.junit.Test;
import static org.junit.Assert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.number.IsCloseTo.closeTo;
/**
* Tests for Triangle.java.
*/
public class TriangleTest {
/**
* Delta for CloseTo.
*/
public static fina... |
GOP lawmakers face criticism for opposing Sept. 11 responders bill
The measure would provide medical care to rescue workers and survivors of the terrorist attacks at the World Trade Center. Republicans recently blocked a Senate vote, but another may be called this week.
Further eroding the GOP's political position ha... |
// Copyright (c) 2016 Graphcore Ltd. All rights reserved.
// Simple test case for IPU nonLinearity
//
#define BOOST_TEST_MODULE NonLinearityTest
#include "../popnn/NonLinearityInternal.hpp"
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <limits>
#include <poplar/Engine.hpp>
#include <poplibs_support/T... |
An adaptive receiver of joint data and channel estimation for meteor burst communications
In view of the characteristics of the meteor burst channel, the variable rate data transmission should be adopted to improve the system average throughput, which results in channel tracing and equalization problems at the receive... |
/**
* Retrieve evals matching with parameters if there is no parameter retrieve all evals.
* @param field name of the elasticsearch field.
* @param data value of the field in elasticsearch.
* @return evals matching with parameters as List of EvalDTO.
*/
@GetMapping("/")
public List<Eva... |
Apple CEO Tim Cook says his company will pay $848 million over 25 years to buy electricity from a large solar power plant to be built in Monterey County, California, by First Solar. The deal not only lets Apple tout its environmental conscience; it also probably makes sound business sense.
Even a few years ago, solar ... |
// Method to create a directory based on the path
private void mkdir(Path path) throws LauncherException {
try {
validatePath(path, true);
FileSystem fs = FileSystem.get(path.toUri(), new Configuration());
if (!fs.exists(path)) {
if (!fs.mkdirs(path)) {
... |
<filename>apps/specaccel.552.pep/print_results.c
#include <stdio.h>
#include <math.h>
#include "type.h"
void print_results(char *name, char xclass, int n1, int n2, int n3, int niter,
double t, double mops, char *optype, int verified, char *npbversion,
char *compiletime, char *cs1, char *cs2, char *cs3, char *... |
/**
* Unit tests for the default json serializer for Morpheus DataFrames
*
* @author Xavier Witdouck
*/
public class JsonDefaultTests {
@SuppressWarnings("unchecked")
private static <R,C> DataFrame<R,C> random(Array<R> rowKeys, Array<C> colKeys) {
return DataFrame.of(rowKeys, (Class<C>)colKeys.get... |
Share. Kick the baby no more... Kick the baby no more...
Warning: Full spoilers from the episode to follow.
In recent South Park episodes, there seems to be a pattern forming where the storylines are generally strong out of the gate, but quickly lose steam by the first commercial break. Such was the case for this wee... |
/**
* Synchronise time using a reference value.
*/
void Airtight_Time_SetSynchronisationPoint(Airtight_Time *time, at_time_t sync_time)
{
at_time_t current = Airtight_Time_ClockMS() + time->offset - time->base_local;
time->offset += sync_time - current;
} |
//********SPIB1_OutString*****************
// Print a string of characters to the SPI channel.
// Inputs: ptr pointer to NULL-terminated ASCII string
// Outputs: none
void SPIB1_OutString(char *ptr){
while(*ptr) {
SPIB1_OutChar(*ptr);
ptr++;
}
} |
/**
* A Canary Tool to perform synthetic tests for Query Server
*/
public class PhoenixCanaryTool extends Configured implements Tool {
private static String TEST_SCHEMA_NAME = "TEST";
private static String TEST_TABLE_NAME = "PQSTEST";
private static String FQ_TABLE_NAME = "TEST.PQSTEST";
private bool... |
Alright everyone let’s calm right down, there is no need to panic.
Pump the brakes on the emotional knee jerk reactions. The Springboks are still a world class team, second only to the All Blacks and everything is still looking very much on track for them to make a deep run in the Rugby World Cup 2015, regardless of l... |
While millions of Americans spent Thursday glued to television coverage of former FBI director James Comey’s testimony, Donald Trump took time to bask in the adulation of Religious Right activists who gathered in D.C. for Road to Majority, the annual conference hosted by Ralph Reed’s Faith and Freedom Coalition.
Amid ... |
import sys
max_value = 1e10
min_value = -max_value
input()
for v in map(int, sys.stdin):
if min_value < v - max_value:
min_value = v - max_value
if v < max_value:
max_value = v
print(min_value)
|
<reponame>niziox/TSP_algorithms<filename>algorithms/greedy_tsp.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
from typing import List, Tuple
import numpy as np
def greedy_tsp(adj_matrix: List[List[int]], start=1) -> Tuple[List[int], int]:
pass
|
/**
* Created by montselozanod on 4/4/15.
*/
public class RecyclerAdapter extends RecyclerView.Adapter<RecyclerAdapter.AnnouncementViewHolder> {
List<Announcement> announces;
RecyclerAdapter(){}
RecyclerAdapter(List<Announcement> list_announces){
this.announces = list_announces;
Log.d(... |
/// convenience function that calculates a += b * c
pub fn add_mul(a: &mut Vec<isize>, b: &[isize], c: isize, threshold: isize) {
while a.len() < b.len() { a.push(0); }
for i in 0..b.len() {
a[i] += b[i] * c;
if a[i] > threshold {
if i == a.len() - 1 { a.push(a[i] / threshold) } else... |
// Fill the all the vector entries with provided value
public void fill(HiveDecimal value) {
noNulls = true;
isRepeating = true;
if (vector[0] == null) {
vector[0] = new HiveDecimalWritable(value);
} else {
vector[0].set(value);
}
} |
<reponame>zuwome/kongxia
//
// ZZTiXianDetailNumberCell.h
// zuwome
//
// Created by 潘杨 on 2018/6/12.
// Copyright © 2018年 TimoreYu. All rights reserved.
//
#import "ZZTiXianBaseCell.h"
/**
提现的详细金额
*/
@interface ZZTiXianDetailNumberCell : ZZTiXianBaseCell
@property (nonatomic,strong)UITextField *tiXianTextFiel... |
<gh_stars>0
#include "ModelMesh.h"
#include "Camera.h"
ModelMesh::ModelMesh(vector<Vertex> vertices, vector<GLuint> indices, vector<MeshTexture> textures)
{
this->vertices = vertices;
this->indices = indices;
this->textures = textures;
// Now that we have all the required data, set the vertex buffers and its attri... |
/*
* Copyright (c) Nordic Semiconductor ASA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of... |
// Copyright 2019 Kube Capacity 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.0
//
// Unless required by applicable law or agr... |
/**
* psh's default EA behaviour uses every solution during breeding
* by stepping through the population and mutating (etc.) each one;
* tournaments are only used to select a mating partner.
* This version also implements a more standard EA in which
* tournament selection is used to determine all parents, or... |
def contains(element):
def predicate(argument):
try:
return element in argument
except:
return False
return predicate |
<reponame>Dru-Daniels/soko-wars2<gh_stars>0
const level = [
[ 0, 0, 99, 99, 99, 0, 0, 0, 0, 0],
[ 0, 0, 99, 64, 99, 0, 0, 0, 0, 0],
[ 0, 0, 99, 0, 99, 99, 99, 99, 0, 0],
[99, 99, 99, 9, 0, 10, 77, 99, 0, 0],
[99, 51, 0, 8, 52, 99, 99, 99, 0, 0],
[99, 99, 99, 99, 7, 99, 0, 0, 0, ... |
<gh_stars>1-10
from django.conf.urls import url
from shop import views
app_name = 'shop'
urlpatterns = [
url(r'^(?P<pk>\d+)/buy$', views.ShopPurchaseView.as_view(), name='buy'),
url(r'^(?P<pk>\d+)$', views.ShopProdView.as_view(), name='prod'),
url(r'^$', views.ShopProdView.as_view(), name='prod'),
ur... |
N, X = [int(nx) for nx in input().split()]
x = [abs(int(xx) - X) for xx in input().split()]
while len(x) > 1:
x2 = []
mn_x = min(x)
for n in range(len(x)):
mod = x[n] % mn_x
if mod != 0:
x2.append(mod)
x2.append(mn_x)
x = x2
ans = x[0]
print(ans) |
Deafness and Psychiatric Illness
Summary Review of the literature concerning the relationship between deafness and psychiatric disorder reveals differences in the pattern of illness depending on the severity of deafness and the age of onset. In particular, the prevalence of schizophrenia in the prelingually deaf is si... |
/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2017 Intel 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
//
// htt... |
def geodesic_system(self, c: torch.Tensor, dc: torch.Tensor) -> torch.Tensor:
N, d = c.shape
requires_grad = c.requires_grad or dc.requires_grad
z = c.clone().requires_grad_()
dz = dc.clone().requires_grad_()
L, M = self.inner(z, dz, dz, return_metric=True)
if requi... |
Story highlights Sen. Al Franken said he plans to give speeches before he leaves Congress
The Minnesota Democrat has been accused of touching women inappropriately
Washington (CNN) Minnesota Democratic Sen. Al Franken, who announced plans earlier this month to resign his seat, will leave the Senate on January 2, his ... |
package com.example.model.users;
public abstract class BaseEntity {
private Integer id;
public Integer getId() {
return id;
}
}
|
'''
Created on Aug 14, 2015
@author: hari
'''
from builtins import object
class Queue(object):
"""
Implementation of queue in Python using list.
"""
def __init__(self):
self._list = []
def enqueue(self, item):
self._list.append(item)
def dequeue(self):
if len(se... |
The Twin Cities Lisp Users Group meeting for April was last Monday. The main topic was Web Frameworks, but there were also two shorter talks.
Weblocks Presentation
Patrick Stein gave this presentation at the TC Lispers meeting in April 2010.
Weblocks on Vimeo.
Allegro Serve and Web Actions Presentation
Robert Gold... |
// method to draw the bird to the screen
public void drawBird()
{
if(mouseX < width && mouseY < 500)
{
bird.render(this, mouseX, mouseY, sky.getTime());
}
else if(mouseY > 500)
{
bird.render(this, mouseX, sky.getTime());
}
} |
Media playback is unsupported on your device Media caption Large crowds had gathered at the store
Police have been called to Tesco Extra supermarkets in Scotland after scuffles broke out among shoppers queuing for Black Friday bargains.
Large crowds gathered at the Silverburn store, near Pollok in Glasgow, and Kingsw... |
<reponame>lucasfloriani/go-boilerplate
package daos
import (
dbpkg "go-boilerplate/db"
"go-boilerplate/models"
"github.com/gin-gonic/gin"
)
// ArtistDAO persists artist data in database using gorm
// functions, contains methods for each CRUD actions.
type ArtistDAO struct{}
// NewArtistDAO creates a new ArtistDA... |
def authenticate(self,
kf_endpoint: str,
runtime_config_name: str) -> Optional[str]:
get_response = requests.get(kf_endpoint, allow_redirects=True)
if len(get_response.history) > 0:
raise AuthenticationError(f'Authentication is required for Kubeflow ... |
/*
* Copyright 2012-2018 Chronicle Map Contributors
*
* 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 applicab... |
Effects of genetic knock-down of organic anion transporter genes on secretion of fluorescent organic ions by Malpighian tubules of Drosophila melanogaster.
An earlier study has shown that RNAi knock-down of a single organic anion transporter (OAT) gene in the principal cells of Drosophila Malpighian tubules is associa... |
import { useKusama, KusamaContextProvider } from './KusamaContext'
export { useKusama, KusamaContextProvider }
|
<gh_stars>0
package alien4cloud.orchestrators.services;
import alien4cloud.component.repository.exception.CSARVersionAlreadyExistsException;
import alien4cloud.dao.IGenericSearchDAO;
import alien4cloud.dao.model.GetMultipleDataResult;
import alien4cloud.deployment.DeploymentService;
import alien4cloud.exception.Alread... |
def auto_delete(self, state : int, epoch : int):
for i in range(1, epoch):
if i % 5 == 0:
continue
if os.path.isfile(self.get_ckp_path(state, i)):
os.remove(self.get_ckp_path(state, i)) |
Communicating in organizations, Part IV: E-mails and one-on-one meetings.
E-mail messages and face-to-face meetings both are important methods of communication, and each has its own advantages and disadvantages. Conducting informal one-on-one meetings well is important to the success of a leader or manager. However, t... |
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package b4a.example.galleryfinalres;
public final class R {
public static final class anim {
public static final i... |
def assert_same_strategy(s1, s2):
__tracebackhide__ = True
if s1.__class__ != s2.__class__:
pytest.fail(
"The two strategies have different class\n"
"First one is: {}\n Second one is: {}\n".format(s1.__class__, s2.__class__)
)
assert s1.__dict__ == s2.__dict__, "The a... |
<filename>controllers/base_controller.go
package controllers
import (
"fmt"
"net/http"
"github.com/jinzhu/gorm"
"github.com/vonji/vonji-api/api"
"github.com/vonji/vonji-api/utils"
)
type APIBaseController struct {
ResponseWriter http.ResponseWriter
}
func (ctrl APIBaseController) CheckID(id uint) *utils.HttpE... |
<gh_stars>10-100
# -*- coding: utf-8 -*-
# Author: <NAME> <<EMAIL>>
# Copyright: Stateoftheart AI PBC 2020.
'''
Keras https://keras.io/ wrapper module
'''
from sotaai.cv import utils
import tensorflow.keras as keras
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Dense, GlobalAvera... |
<reponame>datalliance88/tencentcloud-sdk-cpp
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
*
* ... |
<reponame>skyfackr/luogu_personal_cppcode
#include<bits/stdc++.h>
using namespace std;
int i1,i2,i3,i4,i5,i6,i7,i8,i9;
int jj1,jj2,jj3;
ofstream f;
int main()
{
f.open("ans.txt",ios::out);
for (i1=1;i1<=9;i1++)
for (i2=1;i2<=9;i2++)
for (i3=1;i3<=9;i3++)
for (i4=1;i4<=9;i4++)
for (i5=1;i5<=9;i5++)
... |
def step_sentry(self,runstop):
if runstop is not self.runstop_last:
if runstop:
for mk in self.motors.keys():
self.motors[mk].disable_torque()
else:
for mk in self.motors.keys():
self.motors[mk].enable_torque()
... |
/*
* Drop a reference to a cookie.
*/
void fscache_cookie_put(struct fscache_cookie *cookie,
enum fscache_cookie_trace where)
{
struct fscache_cookie *parent;
int ref;
_enter("%x", cookie->debug_id);
do {
unsigned int cookie_debug_id = cookie->debug_id;
bool zero = __refcount_dec_and_test(&cookie->ref, &re... |
package cmd
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/structured-merge-diff/v4/fieldpath"
"sigs.k8s.io/structured-merge-diff/v4/value"
)
type M = map[string]interf... |
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class RealmAdapter extends AbstractAdapter implements RealmModel {
private static final Logger logger = Logger.getLogger(RealmAdapter.class);
private final RealmEntity realm;
protected volatile transient PublicKey publicKey;... |
Unfortunately, the two answers below are simply wrong for a very, very simple reason: shot traps are completely irrelevant in modern armored warfare.
I know it sounds illogical and counter-intuitive but it’s true. It doesn’t matter if the Leopard 2A5 has this gigantic reverse slope on its frontal turret, it will never... |
from .weight_smooth_l1_loss import WeightSmoothL1Loss
from .weight_softmax_loss import WeightSoftmaxLoss
from .multibox_loss import MultiBoxLoss
from .refine_multibox_loss import RefineMultiBoxLoss
from .focal_loss_sigmoid import FocalLossSigmoid
from .focal_loss_softmax import FocalLossSoftmax
__all__ = ['MultiBox... |
def can_player_attack(self, player: entities.PlayerEntity) -> bool:
if player.super_fireballs > 0:
return True
for entity in self.entities:
if isinstance(entity, entities.Fireball) and entity.sender == player.color:
return False
return True |
The following interview appears in Music & Literature No. 7, which is devoted to Paul Griffiths, Ann Quin, and Lera Auerbach. Paul Griffiths was born in Wales in 1947. A music critic for thirty years, he has published several books on music, as well as librettos and novels.
Scott Esposito: Your book let me tell you is... |
def search_iterator(lines, start=0):
save_lines = list()
iterator_ops = ["--", "++", "+=", "-="]
for iterator_op in iterator_ops:
for index in range(start, len(lines)):
if iterator_op in lines[index]:
save_lines.append((index, iterator_op))
return save_lines |
Schizophrenia and Violence: Systematic Review and Meta-Analysis
Seena Fazel and colleagues investigate the association between schizophrenia and other psychoses and violence and violent offending, and show that the increased risk appears to be partly mediated by substance abuse comorbidity.
Introduction
In the 1980s... |
/**
* Internal method to create the initial set of properties. There are two
* layers of properties: the default layer and the base layer. The latter
* contains properties defined in the stylesheet or by the user using this
* API.
*/
private Map<String, String> createStylesheetProperties(Properties outpu... |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = in.next();
List<Integer> a = new ArrayList<>();
List<Integer> b = new ArrayList<>();
int i=0;
while(i<str.length()){
int t... |
<gh_stars>1-10
import os
import sys
import greentest
import gevent
from gevent.fileobject import FileObject, FileObjectThread
PYPY = hasattr(sys, 'pypy_version_info')
class Test(greentest.TestCase):
def _test_del(self, **kwargs):
r, w = os.pipe()
s = FileObject(w, 'wb')
s.write('x')
... |
<gh_stars>0
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 30 14:46:44 2020
@author: <NAME>
Run this script to train your model
This script will detect faces via your webcam using multithread
There should be no delay as a result of getting the faces from the model.
Tested with OpenCV
"""
import torch
import joblib
#... |
def make_saw_exception(ae: ArgoException) -> SAWException:
specific_exception_class = error_code_table.get(ae.code)
if specific_exception_class is not None:
return specific_exception_class(ae)
else:
raise ae |
/**
*
* A wrapper class that provides an iterator over the RocksDb map entries. It is compatible with Java's {@link Iterator}.
*
* Created by Maithem on 1/21/20.
*/
@NotThreadSafe
public class RocksDbEntryIterator<K, V> implements Iterator<Map.Entry<K, V>>, AutoCloseable {
/**
* A reference to the underl... |
/**
* Create an {@link A_Lexer} from the given filter and body primitives, and
* install it in specified atom's bundle. Add the lexer to the root {@link
* A_BundleTree} that is used for parsing module headers.
*
* @param filterPrimitive
* A primitive for filtering the lexer by its first character.
... |
/**
* @author katkav
* @author semancik
*/
public class ResourceContentTabPanel extends Panel {
private static final long serialVersionUID = 1L;
private static final Trace LOGGER = TraceManager.getTrace(ResourceContentTabPanel.class);
enum Operation {
REMOVE, MODIFY;
}
private static final String DOT_CLASS... |
def emitLoadBytes(self, reg: int, data: bytes = None,
typ: VMType = VMType.BYTES) -> None:
if data is None:
data = []
if len(data) > 0xffff:
raise Exception("tried to load too much data")
self.emit(Opcode.LOAD)
self.appendByte(reg)
se... |
Here’s what a pact with Satan looks like:
I deny God, Father, Son, and Holy Ghost, Mary and all the Saints, particularly Saint John the Baptist, the Church both Triumphant and Militant, all the sacraments, all the prayers prayed therein. I promise never to do good, to do all the evil I can, and would wish not at all t... |
n=int(input())
l1=list(map(int,input().split()))
i1=l1.index(max(l1))
x=min(l1)
i2=0
for i in range(n-1,-1,-1):
if l1[i]==x:
i2=i
break
ans=i1
if i1>i2:
ans-=1
ans+=(n-1)-i2
print(ans) |
/**
* Created by Administrator on 16-4-1.
*/
public class NetDataSource implements MyDataSource {
@Override
public String getStringData(String str_input) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return str_in... |
<gh_stars>100-1000
import "jest-styled-components";
import { mount, shallow } from "enzyme";
import React from "react";
import { ProductTile } from ".";
import { PRODUCT } from "./fixtures";
describe("<ProductTile />", () => {
it("exists", () => {
const wrapper = shallow(<ProductTile product={PRODUCT} />);
... |
<reponame>alanwei43/node-io-lib<gh_stars>0
import crypto from "crypto";
import { HashCalculateOptions } from "./hashStream";
/**
* 计算hash
* @param text 明文
* @param opts 默认使用 sha256 算法
* @date 2022-01-16
*/
export function hashText(text: string, opts: HashCalculateOptions = {}): string {
return crypto.createHash... |
import { RouterModule, Routes } from '@angular/router';
import { ForumComponent } from './forum/forum.component';
import { LocaleEnComponent } from './locale/locale-en.component';
import { LocaleSvComponent } from './locale/locale-sv.component';
import { LocaleFiComponent } from './locale/locale-fi.component';
import {... |
import NavHeader from './nav-header'
import NavMenu from './nav-menu'
export { NavHeader, NavMenu }
|
/**
* The second Fragment of the OrganizerActivity.
* It hosts the current events of the organizer in a RecyclerView.
*/
public class OrganizerEventsFragment extends Fragment {
private String organizerId;
private RecyclerView mRecyclerView;
private EventsAdapter adapter;
public OrganizerEventsFragm... |
main = getLine >>= putStrLn . solve . map read . words
solve [0,1] = "Yes"
solve [y,x]
| x > 1 && (y - x + 1) >= 0 && even (y - x + 1) = "Yes"
| otherwise = "No"
|
<gh_stars>1-10
//
// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.11
// Visite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar ... |
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <utility>
using namespace std;
typedef pair<int,int> pii;
int t;
int n;
pii array[1002];
bool cmp ( pii p1, pii p2) {
if (p1.first == p2.first) {
return p1.second < p2.second;
}
return p1.first < p2.first;
}
int main() {
cin >> t;
while(t--) {
... |
// +build linux
/*
* Copyright (c) 2020 wellwell.work, LLC by Zoe
*
* Licensed under the Apache License 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... |
/**
* This method overrides the method in the ChatIF interface. It
* displays a message onto the screen. It also deals with the disconnect
* command from the server.
*
* @param message The string to be displayed.
*/
public void display(String message) {
if (message.equals("#quit")... |
def trace(t, u):
n = t.size
z = np.ones(n, dtype=np.complex128)
for i in range(n - 1, 0, -1):
dt = t[i] - t[i - 1]
du = u[i] - u[i - 1]
z[i:] = vslit_zip(z[i:], dt, du)
return z |
x,_,w=input().split()
if 'w'in w:print(52+(x in "56"))
else:print(7 if x=="31" else 11 if x=="30" else 12) |
def cmd_remove_path(value: List[str]) -> str:
return "\n".join(f"set PATH=%PATH:{Path(entry)};=%" for entry in value) |
— The future of a California soul-food chain remains to be seen after its parent company is officially filing for bankruptcy.
The legendary Roscoe’s House of Chicken ‘n Waffles is known for being frequented by celebrities, including Snoop Dogg and Larry King.
But new court documents show that of all the money Roscoe’... |
/**
* Sends forward a message defined in the DSL.
*
* @author Marcin Grzejszczak
*/
class StubRunnerKafkaTransformer {
private final StubRunnerKafkaMessageSelector selector;
StubRunnerKafkaTransformer(List<Contract> groovyDsls) {
this.selector = new StubRunnerKafkaMessageSelector(groovyDsls);
}
public Mess... |
/**
* @author Tomas Johansson
*/
public class PathGenericsImplTest {
private Edge edgeAB3;
private Edge edgeBC5;
private Edge edgeCD7;
private String firstVertex, secondVertex, thirdVertex, fourthVertex;
private double weightFirstEdge, weightSecondEdge, weightThirdEdge, totalWeight;
private Path path;
@B... |
<reponame>martinpoljak/microstores<gh_stars>0
export type Subscriber<T> = (newer: T, older?: T) => void;
export type Notifier = (dirtify: boolean) => void;
export type ID = string | number;
|
<reponame>advancedwebdeveloper/flow9
#ifndef GLWEBCLIP_H
#define GLWEBCLIP_H
#include "GLClip.h"
#include "GLRenderer.h"
class GLWebClip : public GLClip
{
protected:
ivec2 size;
unicode_string url;
bool useCache;
StackSlot callback, ondone;
void computeBBoxSelf(GLBoundingBox &bbox, const GLTransf... |
/**
* This screen shows the status of the empire. You can see all your colonies, all your fleets, etc.
*/
public class EmpireScreen extends Screen {
private static final Log log = new Log("EmpireScreen");
private EmpireLayout layout;
@Override
public void onCreate(ScreenContext context, ViewGroup container)... |
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#ifndef COMMON_REF_H
#define COMMON_REF_H
#include <boost/intrusive_ptr.hpp>
namespace ceph {
template<typename T> using ref_t = boost::intrusive_ptr<T>;
template<typename T> using cref_t = boost::intrusive_ptr<const T>... |
<filename>ocr/daemon.cc
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ocr/daemon.h"
#include <memory>
#include <string>
#include <sysexits.h>
#include <utility>
#include <base/bind.h>
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.