text stringlengths 5 1.04M |
|---|
/**
* Copyright (C) 2021 FISCO BCOS.
* SPDX-License-Identifier: Apache-2.0
* 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
*
* Un... |
#include <iostream>
using namespace std;
int main () {
int a = 1;
do {
cout << "valor de a: " << a << endl;
a = a + 1;
} while( a <= 20 );
return 0;
}
|
#include "ReadAlign.h"
#include "SuffixArrayFuns.h"
#include "ErrorWarning.h"
uint ReadAlign::maxMappableLength2strands(uint pieceStartIn, uint pieceLengthIn, uint iDir, uint iSA1, uint iSA2, uint& maxLbest, uint iFrag) {
//returns number of mappings, maxMappedLength=mapped length
uint Nrep=0, indStartEnd[2], ... |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
/*******************************************************************************
* Copyright 2019 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
*
* http://www.apache.o... |
/*
* Copyright (C) 2019 by AutoSense Organization. All rights reserved.
* Gary Chan <chenshj35@mail2.sysu.edu.cn>
*
* Help functions for loading parameters from ROS Parameters Server
*/
#ifndef COMMON_INCLUDE_COMMON_PARAMETER_HPP_
#define COMMON_INCLUDE_COMMON_PARAMETER_HPP_
#include <string>
#include <vector>
#... |
#include "StdAfx.h"
#include "Plugin.h"
#include "IPublicInterface.h"
#pragma comment(lib, "ThirdPartyLib.lib")
// Included only once per DLL module.
#include <CryCore/Platform/platform_impl.inl>
IEntityRegistrator *IEntityRegistrator::g_pFirst = nullptr;
IEntityRegistrator *IEntityRegistrator::g_pLast = nullptr;
C... |
/*
* Copyright (c) 2008-2019, Hazelcast, Inc. 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 ... |
/*
* Copyright (c) 2018 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, ... |
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include "test.h"
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <semaphore.h>
// Test that signals can be delivered to blocked pthread_cond_wait.
// https://code.google.com/p/thread-sanitizer/issues/detail?id=91
int g_thread_run = 1... |
#include <cstdint>
#include <cstdio>
int main() {
int64_t a, b;
while (scanf("%lld %lld", &a, &b) != EOF) {
if (a > b) {
printf("%lld\n", a - b);
} else {
printf("%lld\n", b - a);
}
}
return 0;
}
|
//===----------------------------------------------------------------------===//
// DuckDB
//
// common/types/value.hpp
//
//
//===----------------------------------------------------------------------===//
#pragma once
#include "common/common.hpp"
#include "common/exception.hpp"
#include <io... |
#if !defined(NO_CUSTOM_LEVELS)
#include "editor.h"
#include "Graphics.h"
#include "Entity.h"
#include "Music.h"
#include "KeyPoll.h"
#include "Map.h"
#include "Script.h"
#include "time.h"
#include "tinyxml.h"
#include "Enums.h"
#include "FileSystemUtils.h"
#include <string>
#include <utf8/unchecked.h>
#include <p... |
// BleWinrtDll.cpp : Definiert die exportierten Funktionen für die DLL-Anwendung.
//
#include "stdafx.h"
#include "BleWinrtDll.h"
#pragma comment(lib, "windowsapp")
// macro for file, see also https://stackoverflow.com/a/14421702
#define __WFILE__ L"BleWinrtDll.cpp"
using namespace std;
using namespace winrt;
usi... |
//
// App.xaml.cpp
// Implementation of the App class.
//
#include "pch.h"
#include "MainPage.xaml.h"
using namespace CPPWindowsStoreAppAccessSQLServer;
using namespace Platform;
using namespace Windows::ApplicationModel;
using namespace Windows::ApplicationModel::Activation;
using namespace Windows::Foundation;
us... |
// Copyright (c) 2012 The Chromium 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 "chrome/browser/google/google_util.h"
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/string16.h"
#includ... |
// This tells mocha to provide a main function. Only do this in one source/cpp file
#define MOCHA_MAIN
#include "mocha.hpp"
using namespace mocha;
MOCHA_RUN_TESTS([] {
describe("Foo", [&]() {
describe("with bar", [&]() {
it("should baz", [&]() {
return expect(true).to->equal(true)->result();
});... |
//=================================================================================================
/*!
// \file src/gmm/SMatDVecMult.cpp
// \brief Source file for the GMM++ sparse matrix/dense vector multiplication kernel
//
// Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved
//
// This file is part o... |
/*----- Local Includes -----*/
#include "helpers.h"
/*----- Helpers -----*/
namespace {
// XXX: Thank microsoft for this whole mess.
// MSVC can't do generic lambdas inside of extern C functions.
// It ends up improperly propagating the function linkage to the lambda,
// and it explodes since a template can... |
#include <iostream>
using namespace std;
int main() {
int x = 1;
cout << -x << endl;
return 0;
}
|
// File and Version Information:
// $Header: /nfs/slac/g/glast/ground/cvs/LdfConverter/src/McEventCnv.cxx,v 1.2 2011/12/12 20:53:01 heather Exp $
//
// Description:
// Concrete converter for the McEvent header on the TDS /Event/MC
#define CNV_MCEVENTCNV_CPP
#include "GaudiKernel/Converter.h"
#include "GaudiKernel/Cn... |
/*===========================================================================*\
* *
* OpenMesh *
* Copyright (C) 2001-2012 by Computer Graphics Group, RWTH Aachen *
* ... |
//===-- lib/MC/Disassembler.cpp - Disassembler Public C Interface ---------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: CTF Flag Capture Zone.
//
//=============================================================================//
#include "cbase.h"
#include "func_capture_zone.h"
#include "tf_player.h"
#include "tf_item.h"
#include "tf_team.h"
#inc... |
#include<iostream>
#include<conio.h>
using namespace std;
template<class x1=int,int times=3,class x2=char, int t2=5>
class sample
{
public:
void print( x1 y,x2 z);
};
template<class x1,int times,class x2, int t2>
void print<x1,times, x2, t2>::print(x1 y, x2 z)
{
for(int ... |
/**
* \file example/cpp_example/cpp_example/example.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed... |
#include "Game/Paddle/Paddlemovement2.h"
#include <GameEngine/EntitySystem/Components/SpriteRenderComponent.h>
#include <Game/Paddle/PaddleEntity2.h>
#include "GameEngine/EntitySystem/Components/CollidableComponent.h"
#include "GameEngine/EntitySystem/Components/CollidablePhysicsComponent.h"
using namespace Game;
... |
/*
* The MIT License
*
* Copyright (c) 1997-2020 The University of Utah
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* right... |
/*
* Created by Robin Raymond.
* Copyright 2009-2011. Robin Raymond. All rights reserved.
*
* This file is part of zsLib.
*
* zsLib is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License (LGPL) as published by the
* Free Software Foundation; eithe... |
#include "plugin.hpp"
struct Multiple : Module {
enum ParamIds {
A1_PARAM,
A2_PARAM,
A3_PARAM,
L1_PARAM,
L2_PARAM,
L3_PARAM,
L4_PARAM,
NUM_PARAMS
};
enum InputIds {
I1_INPUT,
I2_INPUT,
I3_INPUT,
M1_INPUT,
M2_INPUT,
M3_INPUT,
M4_INPUT,
A_INPUT,
A1_INPUT,
B_INPUT,
B1_INPUT,
N... |
// Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Madcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "clientmodel.h"
#include "bantablemodel.h"
#include "guicons... |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "ngraph/runtime/reference/convolution.hpp"
#include "ngraph/util.hpp"
namespace
{
constexpr size_t filter_group_axis = 0;
constexpr size_t filter_in_ch_axis = 2;
constexpr size_t in_batch_axis = 0... |
// Copyright 2020 TierIV, 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 to in... |
#include <Godunov.H>
#include <PPM.H>
using namespace amrex;
void
trace_ppm(const Box& bx,
const int idir,
Array4<Real const> const& q_arr,
Array4<Real const> const& srcQ,
Array4<Real> const& qm,
Array4<Real> const& qp,
const Box& vbx,
const Real d... |
// 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 Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it ... |
/*
* Copyright 2017 MapD Technologies, 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 o... |
// RUN: %clang_cc1 -emit-llvm -o - %s -std=c++0x
void *f1(unsigned long l) {
return reinterpret_cast<void *>(l);
}
unsigned long f2() {
return reinterpret_cast<unsigned long>(nullptr);
}
unsigned long f3(void *p) {
return reinterpret_cast<unsigned long>(p);
}
void f4(int*&);
void f5(void*& u) {
f4(reinterpre... |
/**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Red... |
/*
The MIT License (MIT)
Copyright (c) 2016 British Broadcasting Corporation.
This software is provided by Lancaster University by arrangement with the BBC.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to dea... |
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source ... |
/* ===============================================================================
* CherryBuilder - The Productivity Extension for C++Builder®
* ===============================================================================
* MIT License
*
* Copyright (c) 2017 Florian Koch <flko@mail.de>
*
* Permission... |
#include "BTService_FindClosest.h"
UBTService_FindClosest::UBTService_FindClosest() {
this->TargetValidator = NULL;
this->MustBeAlive = false;
this->OwnerIsMultiTargeter = false;
this->ClearTargetIfNotValid = false;
this->TargetingRange = 3500.00f;
}
|
/**
* Copyright (c) 2015 by Contributors
*/
#include "./sgd_learner.h"
#include <stdlib.h>
#include <memory>
#include <thread>
#include <vector>
#include <utility>
#include "dmlc/timer.h"
#include "reader/batch_reader.h"
#include "tracker/async_local_tracker.h"
#include "data/shared_row_block_container.h"
#include "... |
// Copyright (c) 2012-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "key.h"
#include "base58.h"
#include "script/script.h"
#include "uint256.h"
#include "util.h"
#include "utilstrenco... |
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2021, LAAS-CNRS, University of Edinburgh
// Copyright note valid unless otherwise stated in individual files.
// All rights reserved.
//////////////////////////////////////////////////////////////... |
// MIT License
// Copyright (c) 2019 Danny Angelo Carminati Grein
#define CHECKSUM_IMPLEMENTATION
#include <common/checksum.h>
#define FS_IMPLEMENTATION
#include <common/fs.h>
#define MINIZ_IMPLEMENTATION
#include <external/miniz.h>
#define LOOKUP3_IMPLEMENTATION
#include <external/lookup3.h>
bool valid_url(const ... |
/**
* (C) 2000-2003 MRoc
*/
#include "MOscSine.h"
MRtti MOscSine::gvRtti = MRtti( "MOscSine", MOscSine::createInstance );
MOscSine::MOscSine() :
MOsc(),
ivX( 1.0f ),
ivY( 0.0f ),
ivCos( 0.0f ),
ivSin( 0.0f )
{
}
MOscSine::~MOscSine()
{
}
void MOscSine::goNext( MSoundBuffer *buffer, unsi... |
// Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/paymentserver.h>
#include <qt/bitcoinunits.h>
#include <qt/guiutil.h>
#include <qt/optionsmodel.h>
#include <b... |
/* -------------------------------------------------------------------------- *
* Simbody(tm) *
* -------------------------------------------------------------------------- *
* This is part of the SimTK biosimulation toolkit originating from *
... |
#include "gtest/gtest.h"
#include "identities/address.h"
#include "identities/privatekey.h"
#include "identities/publickey.h"
using namespace Ark::Crypto::Identities;
namespace {
const auto passphrase = "bullet parade snow bacon mutual deposit brass floor staff list concert ask";
const uint8_t networkVersion... |
//
// Advent of Code 2017, day 18, part one
//
#include <algorithm>
#include <array>
#include <cctype>
#include <iostream>
#include <string>
#include <string_view>
#include <unordered_map>
#include <variant>
#include <vector>
// Helper type for visitors
template<typename... Ts>
struct Visitor : Ts... {
using Ts::ope... |
/**
* @file regression_distribution.cpp
* @author Michael Fox
*
* Implementation of conditional Gaussian distribution for HMM regression (HMMR)
*/
#include "regression_distribution.hpp"
using namespace mlpack;
using namespace mlpack::distribution;
/**
* Estimate parameters using provided observation weights
*... |
// Copyright (c) 2019-2020 The PIVX developers
// Copyright (c) 2021-2022 The DECENOMY Core Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "zpiv/zpivmodule.h"
#include "zpivchain.h"
#include "libzerocoin/Com... |
#include "Labclass.h"
#include "MakeAndPlay.h"
std::vector<std::string> labclass::loadlevel(int rx, int ry , Game& game, entityclass& obj)
{
int t;
rx=rx-100;
ry=ry-100;
if(ry<5)
{
rx+=50-2;
ry+=54; //lab
}
else
{
rx+=50-2;
ry+=50-16; //lab
}
t = rx + (ry * 100);
std::vector<std::string> tmap;
c... |
/*================================================================================
code generated by: java2cpp
author: Zoran Angelov, mailto://baldzar@gmail.com
class: java.util.Formatter
================================================================================*/
#ifndef J2CPP_INCLUDE_IMPLEMENTATI... |
/*
* This file is part of the swblocks-baselib library.
*
* 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 appl... |
//*****************************************************************
// Copyright (c) 2013 Massachusetts Institute of Technology
//
// Developed exclusively at US Government expense under US Air Force contract
// FA8721-05-C-002. The rights of the United States Government to use, modify,
// reproduce, release, perform, ... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Wine Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
#include "clie... |
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2022 Marco Antognini (antognini.marco@gmail.com),
// Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied wa... |
#include "rssClass.h"
#include <string.h>
rssClass::rssClass() {
}
int rssClass::getArticles(const char *url, const char *targetTag, const int maxItemDataSize, const int maxItemNum, const char *rootCA) {
int c;
int port = 0;
char protocol[8], server[32];
clearItemData();
resetStatus();
itemData = new cha... |
// ____ ______ __
// / __ \ / ____// /
// / /_/ // / / /
// / ____// /___ / /___ PixInsight Class Library
// /_/ \____//_____/ PCL 02.01.11.0938
// ----------------------------------------------------------------------------
// pcl/GnomonicProjection.cpp - Released 2019-01-21T12:06:21Z
// -------... |
#ifndef BITS_64
// Don't emit a message: some environments will consider this as a "warning",
// and we generally build with warnings-as-errors enabled.
// #pragma message "The Halide Direct3D 12 back-end is not yet supported on 32bit targets..."
#else // BITS_64
// Debugging utilities for back-end developers:
#defin... |
// SPDX-License-Identifier: Apache-2.0
/**
* Copyright (C) 2020 Jihoon Lee <jhoon.it.lee@samsung.com>
*
* @file unittest_nntrainer_modelfile.cpp
* @date 16 July 2020
* @brief NNTrainer datafile parmeterized tester.
* @see https://github.com/nnstreamer/nntrainer
* @author Jihoon Lee <jhoon.it.lee@samsung.com>
* ... |
// Copyright (C) 2012-2019 The VPaint Developers.
// See the COPYRIGHT file at the top-level directory of this distribution
// and at https://github.com/dalboris/vpaint/blob/master/COPYRIGHT
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the ... |
//make simple url navigation with a stack and some commands like /back
#include <iostream>
#include <cstdlib>
#include <stack>
#include <string>
using namespace std;
void readCommand(stack<string>& history) {
string comm;
getline(cin >> ws, comm);
if (!history.empty()) {
if (comm == "/back") {
... |
/*
*
* Copyright 2015 gRPC 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 agree... |
#include "Globals.h"
#include "Application.h"
#include "ModuleAudio.h"
#pragma comment( lib, "SDL_mixer/libx86/SDL2_mixer.lib" )
ModuleAudio::ModuleAudio(Application* app, const char* name, bool start_enabled) : Module(app, name, start_enabled), music(NULL)
{}
// Destructor
ModuleAudio::~ModuleAudio()
{}
// Called ... |
// Copyright(C) 2019 Intel Corporation
// Licensed under the MIT License
#include <map>
#include <string>
#include <memory>
#include <sstream>
#include <fstream>
#include <inference_engine.hpp>
#include <ngraph/frontend/onnx_import/onnx.hpp>
#include <ngraph/pass/convert_fp32_to_fp16.hpp>
#include <ngraph/pass/const... |
/*
* 配置文件公共基类
*
* Created on: 2018年1月1日
* Author: Lzy
*/
#include "config.h"
Cfg::Cfg(QObject *parent) : CfgSerial(parent)
{
item = new sCfgItem();
item->coms.sp = nullptr;
initCnt();
initCfgDev();
}
Cfg *Cfg::bulid(QObject *parent)
{
static Cfg* sington = nullptr;
if(!sington) sin... |
// Copyright 2020 The Fuchsia 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 <zircon/assert.h>
#include <zircon/errors.h>
#include <cstdint>
#include <cstring>
#include <memory>
#include <vector>
#include <fuzzer/FuzzedDa... |
/*
Q Light Controller
rgbmatrixeditor.cpp
Copyright (c) Heikki Junnila
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.txt
Unless re... |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-li... |
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "thrift/compiler/test/fixtures/fatal-compat/gen-cpp/module_types.h"
#include "thrift/compiler/test/fixtures/fatal-compat/gen-cpp/module_data.h"
#include "thrift/compiler/test/fixtures/fatal... |
// This file is licensed under the Elastic License 2.0. Copyright 2022-present, StarRocks Limited.
#include "common/tracer.h"
#include <opentelemetry/exporters/jaeger/jaeger_exporter.h>
#include <opentelemetry/sdk/trace/simple_processor.h>
#include <opentelemetry/sdk/trace/tracer_provider.h>
#include <opentelemetry/t... |
/*
* This RPC server stub was autogenerated by idlc (version 8a02fc5d). DO NOT EDIT!
* Generated from Filesystem.idl for interface Filesystem at 2021-06-26T17:21:48-0500
*
* You should subclass this implementation and define the required abstract methods to complete
* implementing the interface. Note that there ar... |
// $Id: mkfiles.cpp 82739 2008-09-16 12:20:46Z johnnyw $
#include "ace/OS.h"
#include "ace/Get_Opt.h"
//FUZZ: disable check_for_math_include/
#include <math.h>
static float gammln (float xx);
static float poidev (float xm);
int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
ACE_Get_Opt options (argc, argv, ... |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... |
// Copyright (c) 2014 Baidu, 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... |
//
// all_together.cpp
// 8ssedt
//
// Created by Pujun Lun on 4/23/18.
// Copyright © 2018 Pujun Lun. All rights reserved.
//
#include <math.h>
#include <iostream>
#include <chrono>
#include "stb_image.h"
#include "stb_image_write.h"
#include "all_together.hpp"
inline AllTogether::Point AllTogether::get(Grid &g,... |
/**
* Copyright 2020 The Magma Authors.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
... |
// Copyright (c) 2019-2020 The PIVX developers
// Copyright (c) 2020 The BTCU developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qt/btcu/navmenuwidget.h"
#include "qt/btcu/forms/ui_navmenuwidget.h"
#include "qt... |
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrVkVaryingHandler.h"
/** Returns the number of locations take up by a given GrSLType. We assume that all
scalar values are 32 bits. */
static inline int grslty... |
#include <bits/stdc++.h>
#define ll long long
#define dl double
#define pi acos(-1)
using namespace std;
int main()
{
dl r,h;
cin>>r>>h;
if(h*2<r) cout<<"1"<<endl;
else
{
dl av=dl(h/r);
ll lt=(av+.5)*2;
ll mt=(av+1-sqrt(3)/2)*2+1;
//cout<<pi<<' '<<lt<<' '<<mt<<' '<<a... |
/******************************************************************************
* $Id$
*
* Project: IDA Raster Driver
* Purpose: Implemenents IDA driver/dataset/rasterband.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
******************************************************************************
* Copyr... |
#include "Geant/magneticfield/FieldPropagationHandler.hpp"
#include "Geant/track/TrackState.hpp"
#include <sstream>
#include <ostream>
#include <iomanip>
#include "Geant/core/VectorTypes.hpp" // Defines geant::Double_v etc
#include "Geant/core/SystemOfUnits.hpp"
//#include "Geant/WorkspaceForFieldPropagation.h"
#i... |
//
// SharedLibrary_WIN32U.cpp
//
// Library: Foundation
// Package: SharedLibrary
// Module: SharedLibrary
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SharedLibrary_WIN32U.h"
#include "Poco/UnicodeConvert... |
/*
Q-URL: https://leetcode-cn.com/problems/missing-number/description/
# BEATS 96.94%
*/
class Solution {
public:
int missingNumber(vector<int>& nums) {
int n = nums.size(), sum = 0;
for (int &num : nums) sum += num;
return n * (n + 1) / 2 - sum;
}
};
|
/*
* Copyright (C) 2010-2019 Hendrik Leppkes
* http://www.1f0.de
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kms/model/ListResourceTagsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::KMS::Model;
using namespace Aws::Utils::Json;
using namespa... |
//
// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
//
// The contents of this file are covered under the licence agreement in the
// file "LICENCE" distributed with Cforall.
//
// Decl.cpp --
//
// Author : Aaron B. Moss
// Created On : Thu May 9 10:00:00 2019
// Last Modified By : Pe... |
#ifndef __ANOLE_COMPILER_AST_HPP__
#define __ANOLE_COMPILER_AST_HPP__
#include "token.hpp"
#include <map>
#include <list>
#include <vector>
#include <utility>
#include <optional>
namespace anole
{
class Code;
using ExprList
= std::list<Ptr<struct Expr>>
;
using ArgumentList
= std::list<std::pair<Ptr<struct... |
#include "quick-sort.h"
void QuickSort::sort (int *arr, int st, int sp) {
if (st >= sp) return;
int pivot_idx = 0;
pivot_idx = partition(arr, st, sp);
sort(arr, st, pivot_idx-1);
sort(arr, pivot_idx, sp);
}
void QuickSort::swap (int *arr, int i, int j) {
int tmp = arr[j];
arr[j] = arr[i... |
//===--- CodeGenAction.cpp - LLVM Code Generation Frontend Action ---------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
/*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
/* $Id: VBoxInternalManage.cpp $ */
/** @file
* VBoxManage - The 'internalcommands' command.
*
* VBoxInternalManage used to be a second CLI for doing special tricks,
* not intended for general usage, only for assisting VBox developers.
* It is now integrated into VBoxManage.
*/
/*
* Copyright (C) 2006-2015 Orac... |
/*
-- MAGMA (version 2.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date
@author Mark Gates
*/
#include "thread_queue.hpp"
// If err, prints error and throws exception.
static void check( int err )
{
if ( err != 0 ) {
... |
#include <Functions/IFunction.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionHelpers.h>
#include <Columns/ColumnAggregateFunction.h>
#include <DataTypes/DataTypeAggregateFunction.h>
#include <Common/AlignedBuffer.h>
#include <Common/Arena.h>
#include <ext/scope_guard.h>
namespace DB
{
namespac... |
// Copyright (c) 2012-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <random.h>
#include <scheduler.h>
#include <test/test_stakework.h>
#include <boost/bind.hpp>
#include <boost/rando... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.