text
stringlengths
5
1.04M
/******************************************************************************* * Copyright 2020-2021 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.apa...
#include <bits/stdc++.h> int main() { bool flag_finish = false; int N_MAX = 3; int N, M; std::cin >> N >> M; std::vector<int> s(M); std::vector<int> c(M); std::vector<int> sc(N_MAX+1, -1); for (int i = 0; i < M; i++) { std::cin >> s[i] >> c[i]; // 2桁以上で先頭が0のときは終了...
// Copyright (c) 2014-2017 The Machinecoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "crypto/aes.h" #include "crypto/ripemd160.h" #include "crypto/sha1.h" #include "crypto/sha256.h" #include "crypt...
/** * \file dnn/src/cuda/convolution/forward/algos.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 ...
/* -------------------------------------------------------------------------- * * OpenSim Moco: MocoCasOCSolver.cpp * * -------------------------------------------------------------------------- * * Copyright (c) 2018 Stanford University and the Authors * ...
/** * Copyright (C) 2008-2014 MongoDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful...
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2018 The Securus developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-l...
#include <iostream> #include <ctime> #include <random> #include "ClassicMatrix.h" #include "SparseMatrix.h" #include "SparseMatrixOptimized.h" #include "Generator.h" #include "Helper.h" #define PRINT_MAX_HEIGHT 20 #define PRINT_MAX_WIDTH 20 /** * @brief Reads element matrix from std::cin until the OES * @param mat...
/* * 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 ...
/************************************************************************* * * SCSC CONFIDENTIAL * __________________ * * Copyright (c) [2009] - [2012] * SubCarrier System Corp. (SCSC) * All Rights Reserved. * * NOTICE: All information contained herein is, and remains, * the property of SubCarrier Syste...
#include "DQMServices/Core/interface/Standalone.h" #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "classlib/utils/DebugAids.h" #include "classlib/utils/Signal.h" #include "TROOT.h" #include <iostream> #include <cstdlib> #include <cerrno> #ifndef _NSIG #...
#ifndef LOX_APPLICATION_HPP #define LOX_APPLICATION_HPP #pragma once #include <Screen/Interface/ISreen.hpp> class Application { private: bool running = true; IScreen *screen = nullptr; Application( ) = default; public: // Constructs Application( Application const & ) = delete; // Copy cons...
#include "sys.h" #include <time.h> #include <assert.h> #ifdef _WIN32 #include <windows.h> #else #include <sys/types.h> #include <unistd.h> #include <sys/wait.h> #include <execinfo.h> #include <signal.h> #include <sys/resource.h> #endif namespace sing { //////////////////////// // // WIN32 VERSIONS // /////////...
// 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/http/http_stream_factory_impl_request.h" #include "base/callback.h" #include "base/logging.h" #include "base/stl_util.h" #include "net/...
#include <iostream> #include <CGAL/basic.h> #ifdef CGAL_USE_LEDA #include <CGAL/leda_bigfloat.h> #include <CGAL/Test/_test_algebraic_structure.h> #include <CGAL/Test/_test_real_embeddable.h> int main() { typedef leda_bigfloat NT; typedef CGAL::Field_with_kth_root_tag Tag; typedef CGAL::Tag_false Is_exact; ...
// // kern_patcher.hpp // Lilu // // Copyright © 2016-2017 vit9696. All rights reserved. // #ifndef kern_patcher_hpp #define kern_patcher_hpp #include <Headers/kern_config.hpp> #include <Headers/kern_compat.hpp> #include <Headers/kern_util.hpp> #include <Headers/kern_mach.hpp> #include <Headers/kern_disasm.hpp> #...
/**************************************************************************** ** Meta object code from reading C++ file 'coincontroltreewidget.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.0.2) ** ** WARNING! All changes made in this file will be lost! ***********************************************...
// Copyright (c) 2012-2018, The CryptoNote developers, The Bytecoin developers, [ ] developers. // Licensed under the GNU Lesser General Public License. See LICENSE for details. #include "Varint.hpp" #include <stdexcept> namespace common { template<class T> T uint_be_from_bytes(const unsigned char *buf, siz...
#include <cmath> #include <stack> #include <algorithm> #include <unordered_set> #include "emptyeisner3rd_depparser.h" namespace emptyeisner3rd { WordPOSTag DepParser::empty_taggedword = WordPOSTag(); WordPOSTag DepParser::start_taggedword = WordPOSTag(); WordPOSTag DepParser::end_taggedword = WordPOSTag(); DepP...
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/iotwireless/model/SidewalkEventNotificationConfigurations.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::U...
// Copyright 2014 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 "config.h" #include "core/animation/TimingInput.h" #include "bindings/core/v8/Dictionary.h" #include "core/animation/AnimationNodeTiming.h" #inc...
// 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...
/* * Copyright (c) 2015, The Linux Foundation. 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 c...
// (C) Copyright 2013-2015 Steven R. Brandt // // SPDX-License-Identifier: BSL-1.0 // 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) #include <hpx/local/init.hpp> #include <hpx/modules/lcos_local.hpp> #include <a...
// Time: O(n) // Space: O(1) class Solution { public: vector<int> decode(vector<int>& encoded) { int curr = 0; for (int i = 0; i <= size(encoded) + 1; ++i) { curr ^= i; if (i <= size(encoded) && i % 2 == 1) { curr ^= encoded[i]; } } ...
// Copyright 2018 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 "src/developer/debug/zxdb/symbols/array_type.h" #include "src/developer/debug/zxdb/symbols/arch.h" #include "src/lib/fxl/strings/string_printf.h"...
#pragma once #include "Drawer.hpp" #include "Listener.hpp" class App; class Camera : public Drawer, public Listener { public: Camera(App* app); ~Camera(); virtual void draw(); virtual bool mousePress(const int button); virtual void mouseRelease(const int button); virtual bool mouseMove(const int x, const i...
/** * Copyright Soramitsu Co., Ltd. 2017 All Rights Reserved. * http://soramitsu.co.jp * * 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/LICENS...
#ifndef PYTHONIC_NUMPY_ASCONTIGUOUSARRAY_HPP #define PYTHONIC_NUMPY_ASCONTIGUOUSARRAY_HPP #include "pythonic/include/numpy/ascontiguousarray.hpp" #include "pythonic/numpy/asarray.hpp" namespace pythonic { namespace numpy { FPROXY_IMPL(pythonic::numpy, ascontiguousarray, asarray); } } #endif
//================================================================================================== /** KIWAKU - Containers Well Made Copyright 2020 Joel FALCOU Licensed under the MIT License <http://opensource.org/licenses/MIT>. SPDX-License-Identifier: MIT **/ //=============================================...
#pragma once #include <vector> #include <algorithm> #include "Individual.hpp" namespace GA { /** * Популяция. */ template< typename GeneType> class Population { public: // Тип особи using individual_type = Individual<GeneType>; // Тип функции приспособленности using fitness_function = typenam...
//===----------------------------------------------------------------------===// // // Peloton // // database_metrics_catalog.cpp // // Identification: src/catalog/query_metrics_catalog.cpp // // Copyright (c) 2015-17, Carnegie Mellon University Database Group // //===---------------------------...
#ifndef BOOST_CORE_REF_HPP #define BOOST_CORE_REF_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include <boost/config.hpp> #include <boost/config/workaround.hpp> #include <boost/core/addressof.hpp> #include <boost/core/enable_if.hpp> // // ref...
#include "pch.h" #include "RenderBuffer.h" #include <glad/glad.h> Xeno::RenderBuffer::RenderBuffer() { glGenRenderbuffers(1, &mObjectID); } Xeno::RenderBuffer::RenderBuffer(const uint32_t width, const uint32_t height, const FrameBuffer::DepthStencilFormat format) { glGenRende...
/// #ifndef BAULK_CDN_HPP #define BAULK_CDN_HPP #include <string_view> namespace baulk { // https://baulk.io/cdn/hash/filename?url=u constexpr std::wstring_view BaulkMirrorURL = L"X-Baulk-Mirror-URL"; constexpr std::wstring_view BaulkChecksumKey = L"X-Baulk-Mirror-Hash"; struct cdn {}; } // namespace baulk #endif
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../../include/fpdfapi/fpdf_page.h" #include "../../../include/fp...
/* * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/sksl/dsl/DSLVar.h" #include "src/sksl/SkSLUtil.h" #include "src/sksl/dsl/DSLModifiers.h" #include "src/sksl/dsl/DSLType.h" #include "src/sksl/dsl/priv/DSLWriter....
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Copyright (c) 2017-19, Lawrence Livermore National Security, LLC // and RAJA Performance Suite project contributors. // See the RAJAPerf/COPYRIGHT file for details. // // SPDX-License-Identifier: (BSD-3-Clause) //~~~~~~~~~~~~~~~~~~~~~~~~...
//===--- Attr.cpp - Swift Language Attr ASTs ------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
// Copyright 2017 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 "ash/public/cpp/ash_typography.h" namespace ash { void ApplyAshFontStyles(int context, int style, ...
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
/* * Copyright 2012 Open Source Robotics Foundation * * 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...
/// Copyright (C) 2019 DG.C, DGCHOW, deguangchow /// deguangchow@qq.com /// /// \brief protobuf_demo : 定义控制台应用程序的入口点。 /// /// \author deguangchow /// \version 1.0 /// \2019/10/28 #include "stdafx.h" #include "addressbook_read.h" #include "addressbook_write.h" #include "item_read.h" #include...
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) | +---------...
#include "CVertexBuffer.h" #include <glad/glad.h> namespace ion { namespace Graphics { namespace GL { CVertexBuffer::~CVertexBuffer() { CheckedGLCall(glDeleteBuffers(1, &Handle)); } void CVertexBuffer::UploadData(void const * const Data, size_t const DataSize, size_t con...
// YellowLISP (c) 2020 Stuart Riffle (MIT license) #include "Yellow.h" #include "Runtime.h" Runtime::Runtime(Console* console) : _console(console) { // Cell 0 is unused and invalid. Attempting to access it will assert. // Cell 1 is nil, the empty list. Its _next field is 0, to prevent walking through it. ...
#pragma once #include "base/macros.hpp" #include "base/assert.hpp" #include <cstring> #include <string> namespace strings { class UniString; } namespace feature { static int const g_arrWorldScales[] = { 3, 5, 7, 9 }; // 9 = scales::GetUpperWorldScale() static int const g_arrCountryScales[] = { 10, 12, 14, 17...
#include <algorithm> #include <iostream> using namespace std; //背包容量 #define CAPACITY 10 // 物品数量 #define NUM 5 // 长度多除一个好处理 int optimal[NUM][CAPACITY] = { 0 }; int weight[NUM] = { 4, 5, 6, 2, 2 }; int value[NUM] = { 6, 4, 5, 3, 6 }; void echo() { for (int i = 0; i <= NUM; i++) { for (int j = 0; j <= CAPA...
/* 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...
/* Copyright 2016 Esri 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 writing, ...
// Copyright 2009 The Android Open Source Project #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <time.h> #include <dirent.h> #include <errno.h> #include <assert.h> #include <ctype.h> #include <utime.h> #include <sys/stat.h> #include <sys/...
// Copyright (c) 2018, The TurtleCoin Developers // Copyright (c) 2018-2019, The Urbancash Developers // // Please see the included LICENSE file for more information. ///////////////////////////////////////////// #include <GreenWallet/CommandImplementations.h> ///////////////////////////////////////////// #include <...
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2019 Ryo Suzuki // Copyright (c) 2016-2019 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # pragma once # include "Array.hpp" # include ...
/**************************************************************************** * Copyright 2014-2015 Trefilov Dmitrij * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you ma...
//================================================================================================= /*! // \file src/mathtest/simd/ComplexShort.cpp // \brief Source file for the SIMD operation test for 'complex<short>' // // Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved // // This file is part of th...
#include "Virus.h" #include "Pessoa.h" Virus::Virus(string c1) { //ctor } Virus::~Virus() { //dtor }
// Copyright (C) 2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "gtest/gtest.h" #include "shared_test_classes/base/layer_test_utils.hpp" #include "gflag_config.hpp" #include "conformance.hpp" static std::vector<std::string> splitStringByDelimiter(std::string str, const std::string& delimi...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===---------------------------------...
// Copyright 2014 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 "content/browser/quota/mock_quota_manager.h" #include <memory> #include <set> #include "base/bind.h" #include "base/files/file_util.h" #include...
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "LevelViewportLayout.h" #include "Layout/Margin.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "Widgets/SCompoundWidget.h" #include "Widgets/SOverlay.h" #include "Framework/Docking/LayoutService.h" #include "Misc/ConfigCacheIni.h" #includ...
/*- * Copyright (c) 2002-2018 The UbixOS Project. * All rights reserved. * * This was developed by Christopher W. Olsen for the UbixOS Project. * * Redistribution and use in source and binary forms, with or without modification, are permitted * provided that the following conditions are met: * * 1) Redistribut...
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once #include <cstddef> #include "DataStructures/Tensor/Tensor.hpp" #include "Parallel/CharmPupable.hpp" #include "PointwiseFunctions/AnalyticData/AnalyticData.hpp" #include "Utilities/FakeVirtual.hpp" #include "Utilities/TMPL.hpp" #includ...
/* * This file is a part of the open source stm32plus library. * Copyright (c) 2011,2012,2013 Andy Brown <www.andybrown.me.uk> * Please see website for licensing terms. */ #include "config/stm32plus.h" #include "config/usart.h" using namespace stm32plus; /** * USART test: asynchronous sending data using inter...
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <proxygen/lib/http/codec/HQStreamCodec.h> #include <folly/Format.h> #include <folly/ScopeGua...
#include "stdafx.h" #include <playfab/PFAuthentication.h> #include "Authentication.h" #include "ApiAsyncProviders.h" #include "GlobalState.h" #include "Entity.h" using namespace PlayFab; using namespace PlayFab::Authentication; HRESULT PFAuthenticationAdminCreateOpenIdConnectionAsync( _In_ PFStateHandle contextHa...
#include <gmock/gmock.h> #include "UserContext.h" #include "User.h" #include "util.h" using ::testing::Return; using ::testing::Invoke; using ::testing::_; class MockUserContext : public ty::UserContext { public: MockUserContext(xn::Context *context) : ty::UserContext(context) {} MOCK_METHOD1(onNewUser, void...
// // BakerCLI.cpp // tools/oven/src // // Created by Robbie Uvanni on 6/6/17. // Copyright 2017 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "BakerCLI.h" #include <QObject> #inclu...
// Copyright 2014 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 "content/browser/compositor/reflector_impl.h" #include "base/bind.h" #include "base/location.h" #include "content/browser/compositor/browser_com...
/**************************************************************************** ** ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of a Qt Solutions component. ** ** Commercial Usage ** Licensees hol...
// 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: GameplayRpcMan...
/* //@HEADER // ************************************************************************ // // ode_advance_printing_helpers.hpp // Pressio // Copyright 2019 // National Technology & Engineering Solutions of Sandia, LLC (NTESS) // // Under the terms of Contract DE-N...
// Copyright (c) 2012 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 "update_engine/omaha_request_action.h" #include <inttypes.h> #include <memory> #include <sstream> #include <string> #include <glog/logg...
#ifndef ORACLESOURCE #define ORACLESOURCE #include <iostream> #include <mariadb/conncpp.hpp> namespace N { class OracleSource { public: OracleSource(); ~OracleSource(); sql::Connection* connect(std::string user, std::string password, std::string database, std::string host, std::string port); s...
// Copyright (c) 2009-2014 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 "uritests.h" #include "guiutil.h" #include "walletmodel.h" #include <QUrl> void URITests::uriTests() { SendCo...
#include <VXpch.h> #include <Core/Modules/VXCore.h> #include <Core/Events/WindowEvent.h> #include <Graphics/GraphicsContext.h> #include <Core/VXConsole.h> Vortex::VXCore* GCore; DEFINE_LOGGER(LogCore); DEFINE_LOGGER(LogWindow); namespace Vortex { void VXCore::Startup() { CREATE_LOGGER(LogCore, spdlog::level::tra...
// Copyright 2018 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 "ash/services/ime/public/cpp/rulebased/def/th_pattajoti.h" namespace th_pattajoti { const char* kId = "th_pattajoti"; bool kIs102 = false; cons...
#include "Smark/SmkConfig.h" #include "Smark/SmkMarkWidget.h" SmkMarkWidget::SmkMarkWidget(QWidget* parent) : SmkBasicMarkWidget(parent) { connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(when_VerticalScrollBar_valueChanged(int)) ); } /* **************************...
/* * Copyright (C) 2019 The Android Open Source Project * * 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 app...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2017 The PIVX developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "amount.h" #include "tinyformat.h"...
// 2次低域通過濾波器クラス // 2011/02/14 Yuki YOKOKURA // // 2次低域通過濾波器 G(s)=w^2/(s^2 + w/Q*s + w^2) (双一次変換) // // Copyright (C) 2011 Yuki YOKOKURA // 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 ...
#include <iostream> using namespace std; int main(){ int n; while(cin>>n){ if(n == 1){ cout<<1<<'\n'; continue; } cout<<n*2-2<<'\n'; } return 0; }
//If Statements by u1tbmo #include <iostream> using namespace std; int main(){ bool is_cool; bool is_awesome; cout << "Input 1 for \"TRUE\" and 0 for \"FALSE\"." << endl; cout << "Are you cool? (1/0)" << endl; cin >> is_cool; cout << "Are you awesome? (1/0)" << endl; cin >> is_awesome; ...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2020 The F44RedCoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <netbase.h> #include <sync.h> #include <tinyformat.h> #include <util...
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
/* * Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "...
// clazy:skip #include "proofcore/errornotifier.h" #include "proofcore/memorystoragenotificationhandler.h" #include "gtest/proof/test_global.h" using namespace Proof; TEST(MemoryStorageNotificationHandlerTest, registerUnregister) { MemoryStorageNotificationHandler *handler = ErrorNotifier::instance()->handler<M...
#include "common/Timer.h" #include "common/common.h" #include "core/Loc.h" #include "core/TypeConstraint.h" #include "core/errors/infer.h" #include "core/lsp/QueryResponse.h" #include "infer/SigSuggestion.h" #include "infer/environment.h" #include "infer/infer.h" using namespace std; namespace sorbet::infer { unique_...
/** * Copyright 2021 Huawei Technologies Co., Ltd * * 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...
#pragma once #include "Matrix.hpp" namespace Sirius { /////////////////////////////////////// /// @brief 2-dimensional matrix inverse template<typename T> constexpr Matrix<2, T> inverse(const Matrix<2, T>& mat); /////////////////////////////////////// /// @brief 3-dimensional matrix inverse ...
// Copyright 2020 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/updater/browser_updater_client_util.h" // TODO(crbug.com/1134631): Make updater branding files mergeable with browser // brandin...
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { MatrixXd m = MatrixXd::Random(3,3); m = (m + MatrixXd::Constant(3,3,1.2)) * 50; cout << "m =" << endl << m << endl; VectorXd v(3); v << 1, 2, 3; cout << "m * v =" << endl << m * v << endl; }
// Copyright (c) 2015-2017 Josh Blum // SPDX-License-Identifier: BSL-1.0 #include <Pothos/Framework.hpp> #include <cstring> #include "MacHelper.hpp" /*********************************************************************** * |PothosDoc Simple MAC * * The Simple MAC block is an implementation of a media access contr...
#include "mem.h" #include <vector> #include <iostream> #include <fstream> #include <assert.h> #include "util.h" using namespace vortex; RamMemDevice::RamMemDevice(const char *filename, uint32_t wordSize) : wordSize_(wordSize) { std::ifstream input(filename); if (!input) { std::cout << "Error reading file ...
#include <gsl/gsl> #include <memory> template<typename T, size_t ROW, size_t COL> class Array2D { private: std::unique_ptr<T[]> storage; std::unique_ptr<T*[]> array; public: Array2D() : storage(std::make_unique<T[]>(ROW * COL)), array(std::make_unique<T...
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2016-2017 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
// Copyright (c) 2004 Daniel Wallin and Arvid Norberg // 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,...
// 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...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017 The BeetleCoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or ht...
// Fill out your copyright notice in the Description page of Project Settings. #include "MyDropPart.h"