text stringlengths 7 961k |
|---|
/*===================================================================
BlueBerry Platform
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 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 <rpc/client.h>
#include <rpc/protocol.h>
#include <util/system.h>
#include <... |
// Copyright Sigurdur Gunnarsson. All Rights Reserved.
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// Example Sierpinski pyramid using cylinder lines
#include "ProceduralMeshesPrivatePCH.h"
#include "SierpinskiLineActor.h"
ASierpinskiLineActor::ASierpinskiLi... |
/*
* FogLAMP storage service.
*
* Copyright (c) 2017 OSisoft, LLC
*
* Released under the Apache 2.0 Licence
*
* Author: Mark Riddoch
*/
#include <connection_manager.h>
#include <connection.h>
ConnectionManager *ConnectionManager::instance = 0;
/**
* Default constructor for the connection manager.
*/
Connec... |
/// Source : https://leetcode.com/problems/design-search-autocomplete-system/
/// Author : liuyubobobo
/// Time : 2019-07-30
#include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
/// Two level HashMap
/// Time Complexity: init: O(n)
/// input: O(n * l + nlogn) where ... |
// Copyright (c) 2007, 2008 libmv authors.
//
// 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, p... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/nuphar/common/analysis/use_count_analysis.h"
#include "core/codegen/common/common.h"
#include "core/graph/function.h"
namespace onnxruntime {
namespace nuphar {
constexpr int PRESET_USE_COUNT_FOR... |
// Copyright © 2017-2020 Trust Wallet.
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
#include "PrivateKey.h"
#include "PublicKey.h"
#include "He... |
/* Generated by re2c 2.0.3 */
// Copyright 2011 Google 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
//
//... |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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.or... |
// This file is part of comma, a generic and flexible library
// Copyright (c) 2016 The University of Sydney
// 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 cod... |
// created by Jean-Marc Zingg to be the GxIO_STM32F103C8T6_P16_TIKY io class for the GxTFT library
//
// License: GNU GENERAL PUBLIC LICENSE V3, see LICENSE
//
// this is a special wiring for
// https://www.aliexpress.com/item/5-0-inch-HD-IPS-TFT-LCD-module-resistance-touch-with-PCB-adapter-board-854-480/32666829945.ht... |
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The Dividendcash developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-... |
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
#ifndef color_rgb_get_cyan
#define color_rgb_get_cyan
// ::color::get::cyan( c )
#include "../category.hpp"
#include "../place/place.hpp"
namespace color
{
namespace constant
{
namespace cyan
{
enum algorithm_enum
{
hsl_star_number
};
namespace _inter... |
// Copyright (c) 2000-2011, Heiko Bauke
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list o... |
#include <iostream>
#include <vector>
#include <string>
#include <regex>
#include <tuple>
#include "utils/input.hpp"
struct Planet
{
std::array<int, 3> pos;
std::array<int, 3> vel;
};
std::vector<Planet> get_planets(const std::vector<std::string> &input)
{
std::vector<Planet> planets;
std::regex pat{... |
/**
* @file
*
* @copyright
* Copyright 2022 Intel Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* @test @b eigen_svd_fvectors
* @endparblock
* This piece of code aims to stress test the FMA execution units of
* the CPU, among others, by repetitively solving the singular value
* decomposition problem o... |
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_... |
#ifndef _GEOMATH_HPP_
#define _GEOMATH_HPP_
#include <stdexcept>
#include <math.h>
namespace GeoMath {
template<typename T> class Vector;
template<typename T> inline Vector<T> normalize(const Vector<T> &v);
template<typename T>
class Vector {
private:
//メンバ変数
T m_v[3]; //x=m_v[0],y=m_v[1],z=m_v[2]
pu... |
/*
Copyright (c) 2011, The Mineserver Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of condition... |
#include "ShorSimulator.hpp"
#include "dd/ComplexNumbers.hpp"
#include <chrono>
#include <cmath>
#include <iostream>
#include <limits>
#include <random>
std::map<std::string, std::size_t> ShorSimulator::Simulate([[maybe_unused]] unsigned int shots) {
if (verbose) {
std::clog << "Simulate Shor's algorithm... |
// Copyright 2018-2021 David Morasz All Rights Reserved.
// This source code is under MIT License https://github.com/microdee/UE4-SpaceMouse/blob/master/LICENSE
#include "SmRuntimeManager.h"
FUserSettings FSmRuntimeManager::GetUserSettings()
{
static FUserSettings BaseSettings {};
return BaseSettings;
} |
//=================================================================================================
/*!
// \file src/mathtest/operations/dmatdmatmin/MDbM16x8b.cpp
// \brief Source file for the MDbM16x8b dense matrix/dense matrix minimum math test
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
//... |
/*******************************************************************************
* This file is part of Tiny3D (Tiny 3D Graphic Rendering Engine)
* Copyright (C) 2015-2020 Answer Wong
* For latest info, see https://github.com/answerear/Tiny3D
*
* This program is free software: you can redistribute it and/or modi... |
#ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_LPMF_HPP
#define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_LPMF_HPP
#include <stan/math/prim/scal/meta/is_constant_struct.hpp>
#include <stan/math/prim/scal/meta/partials_return_type.hpp>
#include <stan/math/prim/scal/meta/operands_and_partials.hpp>
#include <stan/math/prim/scal/err/c... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDeflectNormals.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This softwar... |
#include <ComponentsCore/MeshRenderer.hh>
#include "Core/Engine.hh"
#include <Core/AScene.hh>
#include <AssetManagement/Instance/MeshInstance.hh>
#include <AssetManagement/Instance/MaterialInstance.hh>
#include <AssetManagement/AssetManager.hh>
#include <assert.h>
#include <Threads/ThreadManager.hpp>
#include <Threads/... |
/*
* Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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 ... |
////////////////////////////////////////////////////////////////////////////
// Module : state_free_no_alife.cpp
// Created : 13.01.2004
// Modified : 13.01.2004
// Author : Dmitriy Iassenev
// Description : Free state when no simulation started (for test purposes only!)
//////////////////////////////////////////... |
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <ctime>
#include <cstdlib>
#include <queue>
using namespace std;
int n, m;
namespace MinCostFlow {
typedef long long ll;
const int oo = 2147483647;
const int mxN = 1e5;
const int mxM = 1e5;
int S, T;
int flow... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Activities that are available to all NPCs.
//
//=============================================================================//
#include "cbase.h"
#include "ai_activity.h"
#include "ai_basenpc.h"
#include "stringregistry.h"
//... |
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <BoxLayout.hpp>
namespace gui::header
{
class AddElementAction : public HBox
{
public:
explicit AddElementAction(Item *parent = nullptr);
... |
// 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 "net/url_request/url_request.h"
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
#include "base/callback_helpers.h"
#in... |
#include "Lucia\Graphics\Image.h"
#include <iostream>
#include <map>
#include <string>
using namespace Lucia;
template <typename T>
bool POT(T number)
{
int x = (int)number;
return (x != 0) && ((x & (x - 1)) == 0);
}
using namespace Graphics;
Image::Image(std::string path)
{
if (!ilutInitialized)
{
... |
#include "RocketEngine/Core/OpenGLRenderer/Renderer.h"
#include <glad/glad.h>
#include "RocketEngine/Core/OpenGLRenderer/GLCall.h"
namespace RocketEngine
{
Renderer::Renderer()
{}
Renderer::~Renderer()
{}
void Renderer::Prepare()
{
GLCall(glEnable(GL_DEPTH_TEST));
GLCall(glE... |
/*++
Copyright (c) 2007 Microsoft Corporation
Module Name:
arith_simplifier_plugin.cpp
Abstract:
Simplifier for the arithmetic family.
Author:
Leonardo (leonardo) 2008-01-08
--*/
#include"arith_simplifier_plugin.h"
#include"ast_pp.h"
#include"ast_ll_pp.h"
#include"ast_smt2_pp.h"
arith_simplifier... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet.h"
#include "base58.h"
#include "coincontrol.h"
#include "kernel... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
#include "file.hpp"
#include <fstream>
#include <iostream>
#include <cassert>
#include "../error/error.hpp"
namespace vcl
{
void assert_file_exist(const std::string& filename)
{
// Open file
std::ifstream stream(filename);
// Abort program if the file cannot be opened
if( !stream.is_open() ) {
... |
/* Copyright 2020 The TensorFlow 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 applicable law or a... |
#include "FWCore/Framework/interface/MakerMacros.h"
#include "RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTestBase.h"
#include "RecoParticleFlow/PFClusterProducer/interface/PFRecHitQTests.h"
EDM_REGISTER_PLUGINFACTORY(PFRecHitQTestFactory, "PFRecHitQTestFactory");
DEFINE_EDM_PLUGIN(PFRecHitQTestFactory, PFR... |
#pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/REDhash.hpp>
#include <RED4ext/Types/generated/red/Event.hpp>
namespace RED4ext
{
namespace ent {
struct RagdollPutToSleepEvent : red::Event
{
static constexpr const char* NA... |
//////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Ken Esler... |
// Copyright (c) 2015, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#ifndef NIX_TESTENTITYHDF5_HPP
#define NIX_... |
#include "qgponresultfilter.h"
using namespace QRserver;
QGponResultFilter::QGponResultFilter(QObject *parent)
: QEtherResultFilter(parent)
{
setMeasureMode("GPON");
}
QGponResultFilter::~QGponResultFilter()
{
} |
/**********
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. (See <http://www.gnu.org/copyleft/lesser.html>.)
This libr... |
// Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_BSP_LOADER_
#include "CBSPMeshFileLoader.h"
#include "CQ3LevelMesh.h"
namespace irr
{
namesp... |
#include <iostream>
#include <nlohmann/json-schema.hpp>
using nlohmann::json;
using nlohmann::json_schema::json_validator;
static const json person_schema = R"(
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A person",
"properties": {
"name": {
"description": "Name",... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
#include <string>
#include "format.h"
using std::string;
// TODO: Complete this helper function
// INPUT: Long int measuring seconds
// OUTPUT: HH:MM:SS
// REMOVE: [[maybe_unused]] once you define the function
string Format::ElapsedTime(long seconds)
{
int HH, MM, SS;
MM = seconds / 60;
SS = seconds % 6... |
//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
//Distributed under the Boost Software License, Version 1.0. (See accompanying
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef UUID_90273D9C0E5911E281B7981F6288709B
#define UUID_90273D9C0E5911E281B7981F6288709B
... |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef KAGOME_CORE_RUNTIME_BINARYEN_CORE_API_FACTORY_IMPL_HPP
#define KAGOME_CORE_RUNTIME_BINARYEN_CORE_API_FACTORY_IMPL_HPP
#include "runtime/core_api_factory.hpp"
#include "runtime/runtime_api/core.hpp"
namespace ... |
#include<fstream>
using namespace std;
int main()
{
ifstream f("nrpomi.in");
ofstream g("nrpomi.out");
int nr,n,t,i;
f>>n>>t;
int a[100];
nr=1;
a[n+1]=a[n-1];
for(i=2;i<=n;i+=2)
if(a[i-1]==a[i+1])
nr=nr*(t-1)%1234;
else
nr=nr*(t-2)%1234;
g<<nr;
return 0;
} |
/*
; Project: Open Vehicle Monitor System
; Date: 14th March 2017
;
; Changes:
; 1.0 Initial release
;
; (C) 2011 Michael Stegen / Stegen Electronics
; (C) 2011-2017 Mark Webb-Johnson
; (C) 2011 Sonny Chen @ EPRO/DX
;
; Permission is hereby granted, free of charge, to a... |
/**********************************************************************
* Copyright (c) 2008-2014, Alliance for Sustainable Energy.
* All rights reserved.
*
* 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 t... |
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
#include <asiolink/asio_wrapp... |
#include "execution/compiler/operator/seq_scan_translator.h"
#include "catalog/catalog_accessor.h"
#include "common/error/exception.h"
#include "execution/compiler/codegen.h"
#include "execution/compiler/compilation_context.h"
#include "execution/compiler/function_builder.h"
#include "execution/compiler/if.h"
#include... |
/*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* 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... |
// -----------------------------------------------------------------------------------------------------
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
// This file may be used, modified and/or redistributed under the terms of th... |
// KRATOS ___ ___ _ ___ __ ___ ___ ___ ___
// / __/ _ \| \| \ \ / /__| \_ _| __| __|
// | (_| (_) | .` |\ V /___| |) | || _|| _|
// \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo... |
// Copyright (c) 2011-2016 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 "addresstablemodel.h"
#include "guiutil.h"
#include "walletmodel.h"
#include "base58.h"
#include "wallet/wallet.h"... |
// Copyright (c) 2016 Google 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... |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution
{
private:
void dfs(vector<int> &nums, vector< vector<int> > &result, vector<int> &per, vector<bool> &visited)
{
if ( per.size() == nums.size() )
{
result.push_back(per);
retur... |
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#define DEV 1
using std::cin;
using std::cout;
using std::endl;
using std::terminate;
using std::string;
using std::vector;
using std::map;
using std::make_pair;
void solve() {
int x; cin >> x;
cout <... |
#include <iostream>
#include <string>
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <fstream>
#include "Cloth.h"
#include "MatrixStack.h"
#include "Program.h"
#include "GLSL.h"
#include "Box.h"
#include "boxTriCollision.h"
#include "MatlabDebug.h"
#include "ChronoTimer.h"
... |
#pragma once
#include "storage/TypedDataModel.hpp"
#include "storage/DataTypes.hpp"
namespace storage {
class PressureDataModel : public TypedDataModel<PressureData> {
public:
[[nodiscard]] bool
parse(const std::string& input) override;
[[nodiscard]] std::string
stringify() const override;
private:... |
/*
Copyright (c) 2016-2017 Maximus5
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 conditions and the followin... |
#ifdef PEGASUS_OS_VMS
#ifndef __UNIX_OSPFSERVICECAPABILITIES_PRIVATE_H
#define __UNIX_OSPFSERVICECAPABILITIES_PRIVATE_H
#endif
#endif |
// 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/ui/login/login_handler.h"
#include <memory>
#include <string>
#include "base/logging.h"
#include "base/strings/utf_string_c... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/iottwinmaker/model/DeleteSceneRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::IoTTwinMaker::Model;
using namespace Aws::Utils::Json;
... |
/************************************************************************************
This source file is part of the Theora Video Playback Library
For latest info, see http://libtheoraplayer.googlecode.com
*************************************************************************************
Copyright (c) 2008-2014 Kre... |
#include <murk/flows/seq.hpp>
#include <murk/crypto/awful.hpp>
#include <murk/crypto/analysis.hpp>
#include <murk/common.hpp>
int main() {
auto in = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"_hex;
auto k = murk::crypto::xor_single::crack(in, murk::crypto::dist_conv(murk::crypto::twist... |
/**************************************************************************/
/*!
@file debug.cpp
@author hathach
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2017, Adafruit Industries (adafruit.com)
All rights reserved.
Redistribution and use in source an... |
#include "stdafx.h"
#include <OdbcConnection.h>
#include <CollectOperation.h>
namespace mssql
{
CollectOperation::CollectOperation(const shared_ptr<OdbcConnection> &connection)
: OdbcOperation(connection, Local<Object>())
{
}
bool CollectOperation::TryInvokeOdbc()
{
return _connection->TryClose();
}
Local... |
// -*- C++ -*-
//
// ----------------------------------------------------------------------
//
// Brad T. Aagaard, U.S. Geological Survey
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://geodynamics.org).
//
// Copyright (c) 2010-2017 University of California, Davis
/... |
// Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef SGE_IMAGE_COLOR_BGR8_HPP_INCLUDED
#define SGE_IMAGE_COLOR_BGR8_HPP_INCLUDED
#include <sge/... |
/** @file
A brief file description
@section license License
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you und... |
#ifndef DLCC_PARSER_HPP
#define DLCC_PARSER_HPP
#include "dlcc/syntax.hpp"
#include "dlcc/grammar.hpp"
#include <fstream>
#include <vector>
namespace dlcc {
class Parser {
private:
grammar::ProductionLUT plut;
// Our production (non-terminal) stack during parsing. The
// argument to parse() acts as the terminal s... |
/*
The MIT License (MIT)
Copyright (c) 2015 thewknd
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, publ... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 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 <script/sigcache.h>
#include <cuckoocache.h>
#include <memusage.h>
#inc... |
// Copyright (c) 2019-2020 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qt/pivx/receivewidget.h"
#include "qt/pivx/forms/ui_receivewidget.h"
#include "qt/pivx/requestdialog.h"
#include "qt/pivx/a... |
// 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 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-licens... |
/*
* Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
#include<bits/stdc++.h>
#define int long long
using namespace std;
int s(int a){
if(a==0) return 0;
return a%10+s(a/10);
}
main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin>>n;
for(int i=sqrt(n)+10;i>=sqrt(n)-1000;i--){
if(i*i+s(i)*i-n==0){
cout<<i<<endl;
return 0;
}
}
cout<<-1<<endl;
} |
#include "gtest/gtest.h"
#include "zserio/BitStreamWriter.h"
#include "zserio/BitStreamReader.h"
#include "alignment/auto_optional_member_alignment/AutoOptionalMemberAlignment.h"
namespace alignment
{
namespace auto_optional_member_alignment
{
class AutoOptionalMemberAlignmentTest : public ::testing::Test
{
protect... |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.o... |
#include <stdio.h>
#include <time.h>
#include <stc/crandom.h>
#ifdef __cplusplus
#include <vector>
#include <algorithm>
#endif
enum {INSERT, ERASE, FIND, ITER, DESTRUCT, N_TESTS};
const char* operations[] = {"insert", "erase", "find", "iter", "destruct"};
typedef struct { time_t t1, t2; uint64_t sum; float fac; } Ran... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
#include "extern/beatsaber-hook/shared/utils/byref.hpp"
// Including type: PacketEncryptionLayer... |
#include "calc_score_cache.h"
#include "learn_context.h"
#include "error_functions.h"
#include "online_ctr.h"
#include <catboost/libs/distributed/master.h>
#include <catboost/libs/helpers/progress_helper.h>
#include <catboost/libs/helpers/vector_helpers.h>
#include <catboost/libs/options/defaults_helper.h>
#include <... |
#include "ErrorIndicator.h"
ErrorIndicator::ErrorIndicator()
: HIGH_TEMPERATURE_PIPE(1,0,0),
FAILED_START(1,2,0),
HIGH_SURROUNDING_TEMPERATURE(1,3,0),
FAN_FAILURE(1,4,0),
OVERPRESSURE_BURNING_CHAMBER(1,5,0),
STARTELEMENT_DISFUNCTION(0,8,0)
{
currentState = LIGHT_INACTIVE;
previousState = LIGHT_INACTIVE;
... |
/***************************************************************************************************************************
* test_planning_static.cpp
*
* Author: Tao JIANG
*
* Update Time: 2020.01.20
*
* Introduction: Planner
* 1. 与控制借口
* 2. 实现部分显示功能
************************************************... |
/* ========================================
* Focus - Focus.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __Focus_H
#include "Focus.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Focus(audioMaster);}
Focus::... |
/***********************************************************************//**
@file
***************************************************************************/
#include "fk/framework/Updatable.hpp"
namespace fk {
namespace framework {
/***********************************************************************//**
@brie... |
#include "FEDataStructures.h"
#include <mpi.h>
#include <vector>
#include <vtkCPDataDescription.h>
#include <vtkCPInputDataDescription.h>
#include <vtkCPProcessor.h>
#include <vtkCPPythonPipeline.h>
#include <vtkLogger.h>
#include <vtkNew.h>
// Sample C++ simulation code that provides different levels of ghost cells
... |
// _ _
// _ _|_ _ _|o_|__|_
// (_||_||_(_)(_|| | |
//
// automatic differentiation made easier in C++
// https://github.com/autodiff/autodiff
//
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
//
// Copyright (c) 2018-2020 Allan Leal
//
// Permission is hereby granted, fre... |
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
int main()
{
int countOfCorrectPasswords = 0;
std::string passwordPattern = "";
std::ifstream inputFile("./input.txt");
while (std::getline(inputFile, passwordPattern))
{
std::stringstream passwordPatternStream(passwordPattern);
... |
/**
* @file mainwindow.cpp
* @brief Файл реализации класса MainWindow.
***************************
* @author Кирилл Пушкарёв
* @date 2017
***************************
* @author Кашапов Ярослав
* @date 2020
*/
#include "mainwindow.hpp"
// Заголовочный файл UI-класса, сгенерированного на основе mainwindow.ui
#inc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.