text
stringlengths
7
961k
/**************************************************************************** * * Copyright (c) 2018 PX4 Development Team. 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. Redistri...
#pragma once // haunt { // clang-format off #include "Evaluable.h" #if defined(_MSC_VER) # pragma warning(push, 0) #elif defined(__clang__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wall" # pragma clang diagnostic ignored "-Wextra" #endif #include <phantom/namespace> #include <phan...
// Copyright (c) by respective owners including Yahoo!, Microsoft, and // individual contributors. All rights reserved. Released under a BSD (revised) // license as described in the file LICENSE. #include <cfloat> #include <cmath> #include <cstdio> #include <sstream> #include "log_multi.h" #include "learner.h" #incl...
#ifndef TFMP_TFM_TFMP_TFM_DATA_LIGKERN_H_ #include "tfm/tfmp_tfm_data_ligkern.h" #endif #ifndef TFMP_TFM_TFMP_TFM_CONST_H_ #include "tfm/tfmp_tfm_const.h" #endif namespace tfmp{ namespace tfm{ namespace data{ LigKernCommand::LigKernCommand() { skip_ = 0; next_char_ = 0; op_ = 0; remainder_ = 0; } ...
#include "NodeManager.h" #include "Configuration.h" #include "ContainerManager.h" #include "AMService.h" #include "NodeUpdateService.h" namespace yarn { bool NodeManager::Start(const char * path) { if (!_config.LoadFrom(path)) return false; hn_info("load configuration success"); if (!AMService::Instance().S...
/* * Copyright (c) 2020 LG Electronics Inc. * SPDX-License-Identifier: MIT */ #include <gtest/gtest.h> #include <experimental/filesystem> #include <cstdio> #include <fstream> #include <memory> #include <stdexcept> #include "git-harness/GitHarness.hpp" #include "sentinel/exceptions/IOException.hpp" namespace fs = ...
/*Exercise 4 - Functions Write a program to calculate the function called nCr which is defined as nCr = n!/ r!(n−r)! Where n! is the factorial of n. Implement the functions long Factorial(int no); long nCr(int n, int r); Do not modify the main function.*/ #include <iostream> long Factorial(int no); long nCr(int n...
// tokenizer_test.cpp /** * Copyright (C) 2012 10gen 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 i...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2018 The TheBurningSavage Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <utilstrencodings.h> #include <tinyformat.h> #include <cstdli...
/* * Copyright (C) 2017-2019 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "runtime/utilities/spinlock.h" #include "gtest/gtest.h" #include <mutex> #include <thread> using namespace NEO; TEST(SpinLockTest, givenTwoThreadsThenVerifyThatTheySynchronizeWithSpinLock) { std::atomic<bool> thr...
#include "types/exceptions/iterator_exceptions.h" namespace simple_json::iterators::exceptions { #pragma region Constructors InvalidIteration::InvalidIteration(const types::DataType used_type) : used_type {used_type} {} InvalidIterator::InvalidIterator(types::IteratorTypes used_type) : used_type {used_ty...
// -*- coding: us-ascii-unix -*- // Copyright 2012 Lukas Kemmer // // 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...
// 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 "components/password_manager/core/browser/credential_manager_impl.h" #include <memory> #include <string> #include "base/bind.h" #include "base/...
// Copyright (c) 2019 2020 The Stealth Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "AddrInOutInfo.hpp" using namespace std; using namespace json_spirit; void AddrInOutInfo::SetNull() { address....
/* * WinterScene.cpp * norwegianWood * * Created by Joel Gethin Lewis on 28/02/2011. * Copyright 2011 Hellicar&Lewis. All rights reserved. * */ #include "WinterScene.h" void WinterScene::setup(string aName, ofxControlPanel* aGUI, ofxBox2d* aBox2D){ Scene::setup(aName, aGUI, aBox2D); gui->setWhichColumn(2...
/********************************************************************** * Copyright (c) 2008-2013, 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 the Fre...
/* * @Author: geekli * @Date: 2021-01-06 23:55:02 * @LastEditTime: 2021-01-07 00:01:40 * @LastEditors: your name * @Description: * @FilePath: /ray_tracing/ray_tracing_in_one_week/03-添加Vec3类/main.cc */ #include "color.hpp" #include "vec3.hpp" #include <iostream> int main() { // Image const int image_...
#include "ofApp.h" #include "ofxGrafica.h" //-------------------------------------------------------------- void ofApp::setup() { ofSetBackgroundColor(255); // Create the first plot plot1.setPos(0, 0); plot1.setMar(60, 70, 40, 70); plot1.setDim(300, 300); plot1.setAxesOffset(4); plot1.setTicksLength(4); // C...
#include <stan/math/prim/scal.hpp> #include <gtest/gtest.h> #include <boost/random/mersenne_twister.hpp> #include <boost/math/distributions.hpp> TEST(ProbNegBinomial2, ccdf_log_matches_lccdf) { double y = 0.8; double mu = 1.1; double phi = 2.3; EXPECT_FLOAT_EQ((stan::math::neg_binomial_2_lccdf(y, mu, phi)), ...
#pragma once #ifndef DISH2_RECORD_MAKE_FILENAME_MAKE_DUMP_ARBITRARY_OVER_ALL_ROOTS_GENOME_FILENAME_HPP_INCLUDE #define DISH2_RECORD_MAKE_FILENAME_MAKE_DUMP_ARBITRARY_OVER_ALL_ROOTS_GENOME_FILENAME_HPP_INCLUDE #include <cstdlib> #include <string> #include "../../../../third-party/conduit/include/uitsl/mpi/comm_utils.h...
#include <gtest/gtest.h> #include "util.h" #define TEST_COMPILE(src) DO(test_compile(src, "verify")) #define TEST_ERROR(src) DO(test_error(src, "verify")) class StableTypeTest : public PassTest {}; TEST_F(StableTypeTest, EphemeralIsoReturnShouldCompile) { const char* src = "class A\n" "actor Main\n" " ...
// // Copyright 2015 The ANGLE 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 "test_utils/ANGLETest.h" #include "test_utils/gl_raii.h" using namespace angle; class DrawBuffersTest : public ANGLETest { protect...
///////////////////////////////////////////////////////////////// // smem command file. // // Author: Jonathan Voigt, voigtjr@gmail.com, // Nate Derbinsky, nlderbin@umich.edu // Date : 2009 // ///////////////////////////////////////////////////////////////// #include <portability.h> #include "cli_CommandLine...
#include "internals.h" // ********************************************** /// Constructor. // ********************************************** sensor_osus_manager_class::sensor_osus_manager_class() :atrlab_manager_class(100) // Never should use this max value { strcpy(class_type, "sensorOSUS"); n_data = 0; //...
// Copyright 2017 The Ray Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
/** * Copyright (c) 2011-2018 Bill Greiman * This file is part of the SdFat library for SD memory cards. * * 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 rest...
#ifndef KEYBOARD_HPP #define KEYBOARD_HPP #include "Utils.hpp" #include "Keys.hpp" /** * This class manage KeyBoard's inputs inheriting from Keys. * It has Static Const variables useful to call GetKeyState(). * * Example * if( KeyBoard::GetKeyState( KeyBoard::K_W ).held ) * //do something if button...
#include "pch.cxx" #include "..\..\ifsutil\src\spaset.cxx"
// Copyright Catch2 Authors // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 #include <catch2/internal/catch_run_context.hpp> #include <catch2/interface...
#include <algorithm> #include "CalibCalorimetry/HcalAlgos/interface/HcalTimeSlew.h" #include "RecoLocalCalo/HcalRecAlgos/interface/SimpleHBHEPhase1Algo.h" #include "RecoLocalCalo/HcalRecAlgos/interface/HcalCorrectionFunctions.h" #include "FWCore/Framework/interface/Run.h" #include "DataFormats/HcalRecHit/interface/...
// Copyright information can be found in the file named COPYING // located in the root directory of this distribution. #include "platform/platform.h" #include "terrain/terrFeatureTypes.h" #include "materials/materialFeatureTypes.h" ImplementFeatureType( MFT_TerrainBaseMap, MFG_Texture, 100.0f, false ); ImplementFea...
#include "stdafx.h" #include "extension.h" #include "HFWindow.h" #include "DX\DX.h" namespace Ext { VALUE __msgbox__(VALUE self, VALUE msg) { msg = rb_funcall(msg, rb_intern("to_s"), 0); cstring s; U8ToU16(rb_string_value_cstr(&msg), s); MessageBoxW(0, s.c_str(), L"MessageBox", MB_O...
#include "bbobject.h" #include "bbdebug.h" #include "bbarray.h" bbNullCtor_t bbNullCtor; /* bbException::bbException(){ _debugStack=bbDB::stack(); } bbException::bbException( bbString message ):bbException(){ _message=message; } */
#include "o3d3xx_camera.h" #include <cstdint> #include <memory> #include <vector> #include "gtest/gtest.h" TEST(ImportExport_Tests, ImportExportApp) { o3d3xx::Camera::Ptr cam = std::make_shared<o3d3xx::Camera>(); cam->RequestSession(); cam->SetOperatingMode(o3d3xx::Camera::operating_mode::EDIT); std::vec...
#include <iostream> #include <iomanip> #include "color/color.hpp" int main( int argc, char *argv[] ) { //Instead of rgb you may use hsl, hsv, yiq, etc. ::color::rgb<double> a = ::color::constant::orange_t{}; //Instead of rgb you may use hsl, hsv, yiq, etc. ::color::rgb<double> b = ::color::constant::chocolat...
/** * \file CrdWznmVer.cpp * API code for job CrdWznmVer (implementation) * \copyright (C) 2016-2020 MPSI Technologies GmbH * \author Alexander Wirthmueller (auto-generation) * \date created: 5 Dec 2020 */ // IP header --- ABOVE #include "CrdWznmVer.h" using namespace std; using namespace Sbecore; using namespa...
/** Copyright 2009-2020 National Technology and Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government retains certain rights in this software. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering ...
#include <iostream> #include <vector> #include <queue> #define int long long using namespace std; struct Edge { int u, v, w; explicit Edge(int _u = 0, int _v = 0, int _w = 0) : u(_u), v(_v), w(_w) {} }; struct Node { int dis; bool inq; bool vis; vector<Edge> edges; explicit Node(int _d...
#include "stdafx.h" #include "./base64.h" #include "../lib_base64/base64.h" #if _DEBUG #pragma comment(lib, "../Debug/lib_base64.lib") #else #pragma comment(lib, "../Release/lib_base64.lib") #endif namespace cqplus::utils::base64 { std::string encode(const unsigned char *bytes, const unsigned int len) { return...
/* * * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Level 2 and Level 3 source code contains trade secrets of ...
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *kryptohash_strings[] = { QT_TRANSLATE_NOOP("kryptohash-core", "" "%s, you must set a rpcpassword in the configuration file:\n" "%s\n" "It is ...
#define CATCH_CONFIG_MAIN #include <catch.hpp> #include <chrono> #include <iostream> #include <thread> #include "etcd/Client.hpp" TEST_CASE("setup") { etcd::Client etcd("http://127.0.0.1:2379"); etcd.rmdir("/test", true).wait(); } TEST_CASE("add a new key") { etcd::Client etcd("http://127.0.0.1:2379"); etc...
/* ___ /'___\ /\ \__/ __ __ ___ __ __ __ ____ \ \ ,__\/\ \/\ \ /' _ `\ /'_ `\/\ \/\ \ /',__\ by Zax0mA \ \ \_/\ \ \_\ \/\ \/\ \/\ \L\ \ \ \_\ \/\__, `\ \ \_\ \ \____/\ \_\ \_\ \____ \ \____/\/\____/ 2.5 ...
#include "defs.h" bool ERdrBltFlip12_cl_sb_oh(BLTFLIP_PARAMS) { EINT32 xctr; unsigned EINT32 sc; unsigned short *pdd = (unsigned short *)dst; unsigned short *psd = (unsigned short *)src; unsigned char opshl = 0; unsigned EINT32 opand = 0; if (opacity == 128) opshl = 1; else if (opacity == 192) opshl =...
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2022 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
#include "binary_GA_utils.h" namespace binary_GA { population generate_population(const pms& ranges, size_t amount) { } void mutate(genome& target_genome, const vector<double>& sigmas, double target_gene_number) { } vector<vector<double>> select_matting_pool(const population& genomes, const vector<dou...
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. /...
// AC & TLE #include <bits/stdc++.h> #define LLI unsigned long long #define MOD 4294967296 using namespace std; LLI mod(LLI n) { return (n % MOD); } int main() { // ios_base::sync_with_stdio(false); // cin.tie(NULL); LLI n,q; cin >> n >> q; LLI weight[n]; for (LLI i=0;i<n;i++) { ...
//===-test_training_dropout_default_dnnl.cc-----------------------------------------------------------===// // // Copyright (C) 2019-2020 Alibaba Group Holding Limited. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may ob...
//------------------------------------------------------------------------------ // // Copyright 2018-2020 Fetch.AI Limited // // 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 // // ...
// This file was generated by Rcpp::compileAttributes // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <Rcpp.h> using namespace Rcpp; // factor_to_integer_bylevel Rcpp::IntegerVector factor_to_integer_bylevel(Rcpp::IntegerVector factor, std::vector<std::string> levels); RcppExport SEXP fastercaster_...
#include "../Includes.hpp" namespace IL2CPP { namespace String { Unity::System_String* New(const char* m_pString) { return reinterpret_cast<Unity::System_String*(IL2CPP_CALLING_CONVENTION)(const char*)>(Data.Functions.m_pStringNew)(m_pString); } Unity::System_String* New(std::string m_sString) { return N...
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DyeRegionButton_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //------------------------------------------------------...
class Solution { public: vector<int> shuffle(vector<int>& nums, int n) { vector <int> ans; for (int i = 0; i < n; ++ i) { ans.push_back(nums[i]); ans.push_back(nums[i + n]); } return ans; } };
#include "main.h" namespace Playback { const char szPlaybackDirectory[] = "playbacks"; int iPlaybackType = PLAYBACK_TYPE_NONE; DWORD dwStartTime; bool bPlaying = false; int iCurrentIndex = 0; std::vector<DWORD> v_dwTime; std::vector<ONFOOT_SYNC_DATA> v_playerSyncData; std::vector<INCAR_SYNC_DATA> v_vehicleS...
/// @file /// @author David Pilger <dpilger26@gmail.com> /// [GitHub Repository](https://github.com/dpilger26/NumCpp) /// @version 2.0.0 /// /// @section License /// Copyright 2020 David Pilger /// /// Permission is hereby granted, free of charge, to any person obtaining a copy of this /// software and associated docum...
#ifndef SERVICES_HTTP_CLIENT_IMPL_HPP #define SERVICES_HTTP_CLIENT_IMPL_HPP #include "infra/util/Optional.hpp" #include "infra/util/PolymorphicVariant.hpp" #include "infra/util/SharedOptional.hpp" #include "infra/stream/CountingInputStream.hpp" #include "infra/stream/LimitedInputStream.hpp" #include "services/network/...
// mge - Modern Game Engine // Copyright (c) 2021 by Alexander Schroeder // All rights reserved. #include "mge/graphics/hardware_buffer.hpp" namespace mge { hardware_buffer::hardware_buffer(render_context& context, buffer_type type, siz...
#include <algorithm> #include <vector> #include "catch.hpp" #include "pipes/custom.hpp" #include "pipes/do_then.hpp" TEST_CASE("several operations in custom_inserter") { auto const inputs = std::vector<int>{1, 2, 3, 4, 5}; auto const expected1 = std::vector<int>{2, 4, 6, 8, 10}; auto const expected2 = std...
/*========================================================================= * * 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...
#ifndef ENTT_META_META_HPP #define ENTT_META_META_HPP #include <tuple> #include <array> #include <memory> #include <cstring> #include <cstddef> #include <utility> #include <functional> #include <type_traits> #include "../config/config.h" #include "../core/hashed_string.hpp" namespace entt { class meta_any; class ...
/* Author: Remon Hasan University of Asia Pacific */ #include<bits/stdc++.h> #include<string.h> using namespace std; #define fRead(x) freopen(x,"r",stdin) #define fWrite(x) freopen (x,"w",stdout) #define ll long long #define ull unsigned long long #define ff firs...
#include <iostream> #include <string.h> using namespace std; int main(){ char str[20]; int i,len; int flag = 0; cout << "Enter a string: "; cin >> str; len = strlen(str); for(i=0;i<len;i++){ if(str[i] != str[len-i-1]){ flag = 1; break; } } if (fl...
/** * @file * @copyright defined in eos/LICENSE.txt * @defgroup eosclienttool EOSIO Command Line Client Reference * @brief Tool for sending transactions and querying state from @ref nodeos * @ingroup eosclienttool */ /** @defgroup eosclienttool @section intro Introduction to cleos `cleos` is a comma...
// includes #include <Kernel/FileSystem/Plan9FileSystem.h> #include <Kernel/Process.h> namespace Kernel { NonnullRefPtr<Plan9FS> Plan9FS::create(FileDescription& file_description) { return adopt_ref(*new Plan9FS(file_description)); } Plan9FS::Plan9FS(FileDescription& file_description) : FileBackedFS(file_des...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 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 "db.h" #include "net.h" #include "init.h" #include "addrman.h" #include "...
// Copyright 2019 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 "components/autofill_assistant/browser/details.h" #include <unordered_set> #include <base/strings/stringprintf.h> #include "base/i18n/time_form...
#include <iostream> #include "lista.h" using namespace std; void imprimir(const Lista<int>& lista) { typename Lista<int>::ConstIterator it = lista.cbegin(); while (it != lista.cend()) { cout << it.elem(); it.next(); } //cout << '\n'; } int main() { int n, aux; Lista<int> lista; cin >> n; for (int...
/* * Vortex OpenSplice * * This software and documentation are Copyright 2006 to ADLINK * Technology Limited, its affiliated companies and licensors. All rights * reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except i...
// // MultiJoystickMachine.hpp // Clock Signal // // Created by Thomas Harte on 09/02/2018. // Copyright 2018 Thomas Harte. All rights reserved. // #ifndef MultiJoystickMachine_hpp #define MultiJoystickMachine_hpp #include "../../../../Machines/DynamicMachine.hpp" #include <memory> #include <vector> namespace A...
/* * Copyright (C) 2020 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) 2011-2012, 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 ...
// Copyright (c) by respective owners including Yahoo!, Microsoft, and // individual contributors. All rights reserved. Released under a BSD (revised) // license as described in the file LICENSE. #include <cfloat> #include "correctedMath.h" #include "reductions.h" #include "vw_exception.h" using namespace VW::config;...
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "platform/globals.h" #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. #if defin...
#include "problem.h" namespace fp::diagnostic { problem& problem::add_primary(fp::source_location location, std::string text) { locations_.push_back(diagnostic::location { .kind = location_kind::PRIMARY, .source_location = std::move(location), .text = std::move(text) }); return *th...
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2012, Willow Garage, Inc. * Copyright (c) 2013, Ioan A. Sucan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE124_Buffer_Underwrite__new_char_memcpy_67a.cpp Label Definition File: CWE124_Buffer_Underwrite__new.label.xml Template File: sources-sink-67a.tmpl.cpp */ /* * @description * CWE: 124 Buffer Underwrite * BadSource: Set data pointer to before the allocated memory buffe...
/*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. =================...
#include <iostream> #include <thread> #include <array> #include <vector> #include <mutex> #include <string> #include <random> #include <condition_variable> #include <queue> using namespace std; int waitingConsumers = 0; bool onChair = false; mutex m; condition_variable cv_sleepingBarber, cv_waitingConsumers, cv_chair...
/* Copyright (c) 2021 - present Advanced Micro Devices, Inc. All rights reserved. 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...
#include <cstdio> #include <bitset> using namespace std; #define NMAX 200000 #define TREE_SIZE 1500000 #define TO_BINARY(x) (bitset<32>(x).to_string().c_str()) struct Query { int pos; int val; }; // struct Query struct Node { int left; int right; int count; }; // struct Node static int n; st...
// Copyright (c) YugaByte, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
/* * Copyright (c) 2018, Arm Limited and affiliates. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICEN...
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
/************************************************************** * * 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 y...
#ifndef ENTT_CORE_TYPE_INFO_HPP #define ENTT_CORE_TYPE_INFO_HPP #include <string_view> #include "../config/config.h" #include "../core/attribute.h" #include "hashed_string.hpp" #include "fwd.hpp" namespace entt { /** * @cond TURN_OFF_DOXYGEN * Internal details not to be documented. */ namespace internal { ...
/** * Copyright © 2017 IBM 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-2.0 * * Unless required by applicable law or agr...
/***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License...
/** * Copyright (C) 2012 10gen 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) 2020, The OpenThread Authors. * 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 ...
// // NNetwork.cpp // BiSUNAOpenCL // // Created by RHVT on 14/5/19. // Copyright © 2019 R. All rights reserved. // // 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 cop...
// Author: Stancioiu Nicu Razvan // Problem: http://uva.onlinejudge.org/external/8/846.html #include <cstdio> using namespace std; int t,x,y,steps,distance; int main() { scanf("%d",&t); while(t--) { scanf("%d %d",&x,&y); distance=y-x; int sum=0; for(steps=0;;++steps) { if(steps%2==0) { sum+=ste...
// Copyright Odin Holmes 2016. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at // http://www.boost.org/LICENSE_1_0.txt) #pragma once #include "../compatability/dependent_call.hpp" #include "../functional/bind.hpp" #include "../functiona...
// Copyright 2014 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/compiler/js-context-specialization.h" #include "src/compiler/common-operator.h" #include "src/compiler/js-graph.h" #include "src/compiler...
/* @file dur_commitjob.cpp */ /** * Copyright (C) 2009 10gen 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 hop...
/* * Copyright Andrey Semashev 2007 - 2013. * 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) */ /*! * \file formatters/xml_decorator.hpp * \author Andrey Semashev * \date 18.11.2012 ...
// 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/media/router/test/mock_logger.h" namespace media_router { MockLogger::MockLogger() = default; MockLogger::~MockLogger() = defa...
// Copyright (C) 2020-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <algorithm> #include <memory> #include <vector> #include "matmul_bias.hpp" #include "ngraph/util.hpp" #include "ngraph/validation_util.hpp" using namespace std; using namespace ngraph; using namespace ArmPlugin; opset::...
/* PROG: countbead LANG: C++ ID: felikju1 */ #include <cstdio> #include <iostream> #include <string> #include <cstring> #include <algorithm> using namespace std; int n,x,y,jumlah; int bead[100]; int main() { freopen("countbead.in","r",stdin); freopen("countbead.out","w",stdout); scanf("%d",&n...