text
stringlengths
5
1.04M
/************************************************************************* * Copyright (C) [2019] by Cambricon, 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 a...
/* * Copyright © 2011 Mozilla Foundation * * This program is made available under an ISC-style license. See the * accompanying file LICENSE for details. */ #undef NDEBUG #include <AudioUnit/AudioUnit.h> #include <TargetConditionals.h> #include <assert.h> #include <mach/mach_time.h> #include <pthread.h> #include ...
// $Id$ /* Copyright (c) 2007-2015, Trustees of The Leland Stanford Junior University 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...
#include <bits/stdc++.h> using namespace std; using namespace __gnu_cxx; typedef double db; typedef long long ll; typedef pair<db, db> pdd; typedef pair<ll, ll> pll; typedef pair<int, int> pii; typedef unsigned long long ull; #define F first #define S second #define pnl printf("\n") #define ...
/* */ #include "inputdata.h" json inputdata::all_data; vector<string> inputdata::alphabet; map<string, int> inputdata::r_alphabet; int inputdata::num_attributes; tail* tail::split(){ tail* t = new tail(sequence, index, 0); t->split_from = this; t->future_tail = future_tail; t->past_tail = past_tail;...
/* * Copyright 2019 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
/* * Copyright (c) 2016, NVIDIA CORPORATION. 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 co...
/* * 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 "stdio.h" #include "SkSLParser.h" #include "SkSLToken.h" #define register #include "disable_flex_warnings.h" #include "lex.sksl.c" static_assert(YY_FLEX_MAJOR_VERSIO...
// ----------------------------------------------------------------------------------------------------- // 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...
#include "InlineDiff.h" void InlineDiff::printAdd(const String& line, int leftLine, int rightLine) { if(line.empty()) { printWrappedLine("<div class=\"mw-diff-inline-added mw-diff-empty-line\"><ins>", line, "</ins></div>\n"); } else { printWrappedLine("<div class=\"mw-diff-inline-added\"><ins>", line, "</ins></d...
// // Created by Ivan Shynkarenka on 28.05.2019 // #include "server/asio/service.h" #include "server/ws/ws_server.h" #include "system/cpu.h" #include "threads/thread.h" #include "time/timestamp.h" #include <atomic> #include <iostream> #include <thread> #include <vector> #include <OptionParser.h> using namespace Cpp...
// Copyright (c) 2011-2013 The Bitcoin developers // Copyright (c) 2017 The PIVX developers // Copyright (c) 2017-2018 The Artax developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "notificator.h" #include <...
/******************************************************************************* * 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...
// // Created by john on 08/05/2021. // #include "listener.hpp" //! stl #include <algorithm> #include <cstdlib> #include <functional> #include <iostream> #include <memory> #include <string> #include <thread> #include <vector> //! boost #include <boost/beast/core.hpp> #include <boost/beast/http.hpp> #include <boost/a...
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * 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 ma...
/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkRecordDraw.h" #include "SkImage.h" #include "SkPatchUtils.h" void SkRecordDraw(const SkRecord& record, SkCanvas* canvas, SkPic...
/** * @file UARTTX_Demo.cpp * * @author David Zemon * * @copyright * The MIT License (MIT)<br> * <br>Copyright (c) 2013 David Zemon<br> * <br>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 th...
// Copyright (c) 2012-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 "clientversion.h" #include "tinyformat.h" #include <string> /** * Name of client reported in the 'version' messa...
// // 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 conditions and the following disclaimer. // * Redistributions in bin...
#include "file.h" #include <iostream> #include <vector> namespace aoc2017_day01 { int part_1(std::string_view path) { std::string input = file::readFileAsString(path); char prev = input.back(); int sol = 0; for (const auto& c : input) { if (c == prev) { ...
/* * task.cpp * * Copyright 2012-2019 German Aerospace Center (DLR) SC * * 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 * ...
#include "rpcconsole.h" #include "ui_rpcconsole.h" #include "clientmodel.h" #include "bitcoinrpc.h" #include "guiutil.h" #include <QTime> #include <QTimer> #include <QThread> #include <QTextEdit> #include <QKeyEvent> #include <QUrl> #include <QScrollBar> #include <openssl/crypto.h> // TODO: make it possible to filt...
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ #include <game/generated/protocol.h> #include <game/server/gamecontext.h> #include "pickup.h" CPickup::CPickup(CGameWorld *pGam...
#include "vkg/base/base.hpp" using namespace vkg; auto main() -> int { WindowConfig windowConfig{}; FeatureConfig featureConfig{}; Base app{windowConfig, featureConfig}; app.loop([&](double elapsed) { }); return 0; }
/* * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All con...
// // ogles_gpgpu project - GPGPU for mobile devices and embedded systems using OpenGL ES 2.0 // // Author: Markus Konrad <post@mkonrad.net>, Winter 2014/2015 // http://www.mkonrad.net // // See LICENSE file in project repository root for the license. // #include "egl.h" #include "../../common/common_includes.h" u...
#include <assert.h> #include "COP_VU.h" #include "VUShared.h" #include "../Log.h" #include "../MIPS.h" #include "../MemoryUtils.h" #include "offsetof_def.h" #include "Vpu.h" #undef MAX enum CTRL_REG { CTRL_REG_STATUS = 16, CTRL_REG_MAC = 17, CTRL_REG_CLIP = 18, CTRL_REG_R = 20, CTRL_REG_I = 21, CTRL_REG_Q = 22,...
/*============================================================================= Copyright (c) 2011-2019 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout 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) ==...
// Copyright (c) 2020-2021 The Eleccoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/eleccoingui.h> #include <qt/eleccoinunits.h> #include <qt/clientmodel.h> #include <qt/createwalletdialog.h> #i...
/* * PROGRAM: Client/Server Common Code * MODULE: ClumpletReader.cpp * DESCRIPTION: Secure handling of clumplet buffers * * The contents of this file are subject to the Initial * Developer's Public License Version 1.0 (the "License"); * you may not use this file except in compliance with the * License. You...
#include "ghpch.h" #include "ParameterManager.h" #include "game/parameter/ValueParameter.h" #include "game/parameter/TextureParameter.h" #include "core/SharedPointer.h" #include "graphics/Textures.h" namespace Ghurund { const Ghurund::Core::Type& ParameterManager::GET_TYPE() { static const auto CONSTRUCTO...
// Copyright (C) 2020 THL A29 Limited, a Tencent company. // All rights reserved. // Licensed under the BSD 3-Clause License (the "License"); you may // not use this file except in compliance with the License. You may // obtain a copy of the License at // https://opensource.org/licenses/BSD-3-Clause // Unless required ...
/******************************************************************************* * Copyright 2016-2018 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 "vtkUnstructuredGrid.h" #include "vtkUnstructuredGridReader.h" #include "vtkUnstructuredGridWriter.h" #include "vtkMimxMapOriginalCellAndPointIds.h" int main(int argc, char * argv []) { //if( argc < 3 ) //{ // std::cerr << "vtkMimxMapOriginalCellAndPointIds " // << " InputVtkUnstructuredGrid" // << std...
/** * Copyright 2020 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...
// { dg-do run { target c++14 } } // Copyright (C) 2015-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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 Foundatio...
// subtraction.cpp: test suite runner for subtraction on classic floats // // Copyright (C) 2017-2021 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include <universal/utility/directives.hpp> // minimum set of include files ...
// Copyright 2015 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/ash/login/signin/token_handle_fetcher.h" #include <memory> #include "base/bind.h" #include "base/metrics/histogram_macros.h" #i...
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certai...
// Copyright (c) 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 "walletdb.h" #include "bitcoinrpc.h" #include "init.h" #in...
/** \file * \brief Implements front-end for LP solver * * \author Carsten Gutwenger * * \par License: * This file is part of the Open Graph Drawing Framework (OGDF). * * \par * Copyright (C)<br> * See README.txt in the root directory of the OGDF installation for details. * * \par * This program is free sof...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "irc.h" #include "db.h" #i...
#ifndef BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP #define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #pragma inline_depth(511) #pragma inline_recursion(on) #endif #if defined(__MWERKS__) #pragma inline_depth(511) #endif //...
// This file has been generated by Py++. #include "boost/python.hpp" #include "wrap_osg.h" #include "wrap_referenced.h" #include "geode.pypp.hpp" namespace bp = boost::python; struct Geode_wrapper : osg::Geode, bp::wrapper< osg::Geode > { Geode_wrapper( ) : osg::Geode( ) , bp::wrapper< osg::Geode >(){...
/* * This file is part of the WebKit open source project. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later ve...
#include "common/server.h" #include <array> using namespace std; using namespace xynet; inline constexpr static const uint16_t ECHO_PORT = 2007; inline constexpr static const uint16_t ECHO_BUFFER_SIZE = 4096; auto echo(socket_t peer_socket) -> task<> { array<byte, ECHO_BUFFER_SIZE> buf{}; try { for(;;) ...
// Copyright 2016 Open Source Robotics Foundation, 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 appli...
template<typename T, typename Comparator = std::less<T>> struct SparseTable { std::vector<std::vector<T>> u; std::vector<int> lg; Comparator cmp; void build(const std::vector<T>& a) { int n = a.size(), L = 1; while ((1 << L) <= n) ++L; std::vector<std::vector<T>>(n, std::vector<T>(L)).swap(u); ...
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any dam...
/**************************************************************************** ** Copyright (c) 2021, Fougue Ltd. <http://www.fougue.pro> ** All rights reserved. ** See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt ****************************************************************************/ #includ...
/* * Copyright (c) 2015-2017, Intel Corporation * * 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 conditions and the f...
// // MIT License // // Copyright 2019 // // 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, publi...
// Copyright 2016 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/media/session/pepper_playback_observer.h" #include <memory> #include "base/command_line.h" #include "base/metrics/histogram_ma...
// 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 "chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.h" #include "ash/desktop_background/desktop_background_controller.h" #...
// // Copyright (c) 2016, Scientific Toolworks, Inc. // // This software is licensed under the MIT License. The LICENSE.md file // describes the conditions under which this software may be distributed. // // Author: Bryan Williams // #include "ConfigDialog.h" #include "AddRemoteDialog.h" #include "BranchDeleg...
/************************************************************************//** * @file DatabaseTestPluginsStaticLoader.cpp * @author Sylvain Doremus * @version 1.0 * @date 16/06/2014 12:04:46 * * * @brief Specialization of CStaticLibLoader for Database needed plugin * * @details Loads the static library of the ...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "extern/beatsaber-hook/shared/utils/typedefs.h" // Including type: UnityEngine.MonoBehaviour #include "UnityEngine/MonoBehaviour.hpp" //...
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; int flag = 0; for (int i = 0; i <= X; i++) { if ((2 * i + 4 * (X - i)) == Y) { flag = 1; } } if (flag == 0) { cout << "No" << endl; } else { cout << "Yes" << endl; } return 0; }
// Copyright (c) 2011-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 "overviewpage.h" #include "ui_overviewpage.h" #include "popbitunits.h" #include "clientmodel.h" #include "guiconsta...
//+-------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1991 - 1992 // // File: dffuncs.cxx // // Contents: Private support functions for the DocFile code // // Methods: StartMS // DeleteContents // // Hi...
#pragma once #include <string> #include "spdlog/spdlog.h" struct options { std::string jsonFilename; std::string outFilename; spdlog::level::level_enum loggingLevel; };
// // detail/scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff 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) // #ifndef ASIO_DETAIL_SCHEDUL...
// Copyright 2016 Etix Labs // // 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 wr...
#include <fstream> #include <iostream> #include <iterator> #include <regex> #include <vector> #include <omp.h> class pargrep { std::string dir_; std::regex regexp_; std::vector<std::string> results_; public: pargrep(std::string dir, std::string regexp) : dir_(std::move(dir)), regexp_(regexp) {...
#ifndef wali_wfa_TRANS_GUARD #define wali_wfa_TRANS_GUARD 1 /*! * @author Nicholas Kidd */ #include <iostream> #include "wali/Common.hpp" #include "wali/Printable.hpp" #include "wali/Countable.hpp" #include "wali/Markable.hpp" #include "wali/SemElem.hpp" #include "wali/KeyContainer.hpp" #include "wali/wfa/ITrans.h...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The PIVX developers // Copyright (c) 2018 The Crypto Dezire Cash developers // Distributed under the MIT software license, see the accompanying // file COPYI...
#include "node.h" #include "node_buffer.h" #include "node_http_parser.h" #include "base-object.h" #include "base-object-inl.h" #include "env.h" #include "env-inl.h" #include "util.h" #include "util-inl.h" #include "v8.h" #include <stdlib.h> // free() #include <string.h> // strdup() #if defined(_MSC_VER) #define st...
// SPDX-License-Identifier: CC0-1.0 #include "gtest/gtest.h" #include <experimental/expected.hpp> #include <memory> #include <tuple> #include <vector> using cxx20::expected; using cxx20::unexpected; namespace { struct takes_init_and_variadic { std::vector<int> v; std::tuple<int, int> t; template <class... Args>...
#include "caffe2/utils/threadpool/ThreadPool.h" #include "WorkersPool.h" #include "caffe2/core/logging.h" #include <cpuinfo.h> C10_DEFINE_bool( caffe2_threadpool_force_inline, false, "Force to always run jobs on the calling thread"); // Whether or not threadpool caps apply to Android C10_DEFINE_int(caffe...
// // Copyright (C) 2005-2010 Irene Ruengeler // Copyright (C) 2009-2012 Thomas Dreibholz // // 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 op...
// 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 "chrome/browser/chromeos/cryptauth/gcm_device_info_provider_impl.h" #include "base/linux_util.h" #include "base/no_destructor.h" #include "base/...
 #include "util/tc_docker.h" #include "util/tc_http.h" #include "util/tc_http_async.h" #include "util/tc_base64.h" #include "util/tc_json.h" namespace tars { // //class AsyncHttpCallback : public TC_HttpAsync::RequestCallback //{ //public: // AsyncHttpCallback()//std::mutex &m, std::condition_variable &cond ): _m(m),...
// Copyright 2012 the V8 project 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/ast/scopes.h" #include <set> #include "src/ast/ast.h" #include "src/base/logging.h" #include "src/base/optional.h" #include "src/builtin...
/* Copyright 2020 The OneFlow 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 agre...
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercia...
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2022 Ryo Suzuki // Copyright (c) 2016-2022 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # include <Siv3D/Window.hpp> # include <Siv3D/...
//pure struct down_sgn { int operator () (LT x) const { return sgn(x); } }; struct up_sgn { int operator () (LT x) const { return -sgn(x); } }; template <class XSGN> struct HalfConvexHull { #define xsgn XSGN() struct CMPX { bool operator () (const VEC& a, const VEC& b) { ...
 /* Copyright (c) 2010-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...
// This file is a part of Julia. License is MIT: https://julialang.org/license #define DEBUG_TYPE "alloc_opt" #undef DEBUG #include "llvm-version.h" #include <llvm-c/Core.h> #include <llvm-c/Types.h> #include <llvm/ADT/SmallSet.h> #include <llvm/ADT/SmallVector.h> #include <llvm/ADT/SetVector.h> #include <llvm/IR/Va...
/* * BidirectionalBFS.hpp * * Created on: 14.06.2019 * Author: Eugenio Angriman <angrimae@hu-berlin.de> */ #ifndef NETWORKIT_DISTANCE_BIDIRECTIONAL_BFS_HPP_ #define NETWORKIT_DISTANCE_BIDIRECTIONAL_BFS_HPP_ #include <queue> #include <networkit/distance/STSP.hpp> namespace NetworKit { /* * @ingroup dist...
#include "cApp.h" wxIMPLEMENT_APP(cApp); cApp::cApp() { } cApp::~cApp() { } bool cApp::OnInit() { m_frame1 = new cMain(); m_frame1->Show(); return true; }
/* Copyright (C) 2013 Jolla Ltd. Contact: Thomas Perl <thomas.perl@jollamobile.com> All rights reserved. You may use this file under the terms of BSD license as follows: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ar...
/* pbrt source code is Copyright(c) 1998-2016 Matt Pharr, Greg Humphreys, and Wenzel Jakob. This file is part of pbrt. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redi...
// Problem: https://leetcode.com/problems/search-insert-position/ // // Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. // // You may assume no duplicates in the array. // // Example 1: // Input: [1,3,5,6],...
//***************************************************************************** // Copyright 2017-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://w...
#include <catch.hpp> #include <algorithm> #include <atomic> #include <thread> #include <vector> #include "iris/Agent.hpp" #include "iris/Parameters.hpp" #include "iris/Types.hpp" #include "iris/Threading.hpp" #include "iris/Utils.hpp" typedef std::vector<iris::AgentID> IdVector; TEST_CASE("Verify that std::iota wor...
/* * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/indirect_heap/indirect_heap.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/test/common/test_macros/test.h" #include "opencl/source/event/event.h" #include "opencl/test/unit_t...
/*----------------------------------------------------------------------- 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 ...
//===- InterleavedLoadCombine.cpp - Combine Interleaved Loads ---*- C++ -*-===// // // 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 // //===---------------------------...
#include<bits/stdc++.h> using namespace std; int m, s[200010], dp[200010]; int main() { scanf("%d", &m); for (int i = 1; i <= m; ++i) dp[i] = 1e9; int tmp = ceil(sqrt(sqrt(m)) + 1); for (int i = 1; i <= tmp; ++i) s[i] = pow(i, 4); for (int i = 1; i <= tmp; ++i) for (int j = s[i]; j <= m; ++j) dp[j] = mi...
// stack using 2 queues # include <bits/stdc++.h> using namespace std; int l1=0,l2=0; int size=10; int q1[10],q2[10]; int frontA=0,frontB=0,rearA=-1,rearB=-1; bool notEmpty(int i) { if(i==1) { if(frontA>rearA) return false; else return true; } else if(frontB>rearB) return false; else return t...
/* * Copyright 2021 Assured Information Security, 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 a...
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { int A[100][100],i,j,suma=0,sumb=0,N; scanf("%d",&N); for(i=0;i<N;i++) { for(j=0;j<N;j++) { scanf("%d",&A[i][j]); if(i==j) suma+=A[i][j]; i...
//================================================================================================= /*! // \file src/mathtest/dmatreduce/total/DDa.cpp // \brief Source file for the DDa dense matrix total reduction operation math test // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // // This fil...
#include "header/keyaction.h" KeyAction::KeyAction() { connect(&typeStringTimer, &QTimer::timeout, this, &KeyAction::execAndAdvanceTyping); } void KeyAction::execute() { if ((type == Type::String && text.isEmpty()) || (type != Type::String && key.isEmpty())) { return; } swit...
/** * @file * @brief Terrain related functions. **/ #include "AppHdr.h" #include "terrain.h" #include <algorithm> #include <functional> #include <sstream> #include "areas.h" #include "attack.h" #include "branch.h" #include "cloud.h" #include "coord.h" #include "coordit.h" #include "dgn-event.h" #include "dgn-over...
/* Copyright (c) 2017 TOSHIBA Digital Solutions Corporation This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This...
/* * Copyright 2008 Search Solution Corporation * Copyright 2016 CUBRID 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.org/licenses/LICENSE-...
#pragma once #include "tria/fs.hpp" #include <exception> #include <string> #include <string_view> namespace tria::log::err { /* * Exception that is thrown when an error occurs while creating a log file. */ class LogFileErr final : public std::exception { public: LogFileErr() = delete; LogFileErr(const fs::path&...