text
stringlengths
7
961k
#include "tests.h" #include "yaml-cpp-0.2.7/yaml.h" #include <sstream> #include <algorithm> namespace Test { namespace Parser { void SimpleScalar(std::string& inputScalar, std::string& desiredOutput) { inputScalar = "Hello, World!"; desiredOutput = "Hello, World!"; } void MultiLineScalar(std::string& i...
//------------------------------------------------------------------------------ // IOTypes.cc //------------------------------------------------------------------------------ #include "Pre.h" #include "IOTypes.h" #include "IO/IO.h" namespace Oryol { #define _TOSTRING(c) case c: return #c //------------------------...
/* * This source file is part of RmlUi, the HTML/CSS Interface Middleware * * For the latest information, see http://github.com/mikke89/RmlUi * * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd * Copyright (c) 2019 The RmlUi Team, and contributors * * Permission is hereby granted, free of charge, to...
/* Copyright 2016 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...
// // WeatherData.cpp // Observer Pattern // // Created by Abhinay Reddyreddy on 2/14/18. // Copyright © 2018 Brian Arnold. All rights reserved. // #include "WeatherData.hpp" namespace wf { ListenerToken WeatherData::tokenId = 1; ListenerToken WeatherData::registerObserver(ListenerCallback func) { List...
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "UnrealHeaderTool.h" #include "ParserClass.h" #include "Classes.h" #include "ClassMaps.h" FString FClass::GetNameWithPrefix(EEnforceInterfacePrefix::Type EnforceInterfacePrefix) const { const TCHAR* Prefix = 0; if (HasAnyClassFlags(CLASS_Interfa...
/*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without m...
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp" #include "while.h" TEST_CASE("Verify Test Configuration", "verification") { REQUIRE(true == true); } TEST_CASE("Test sum of squares function") { REQUIRE(sum_of_squares(3) == 14); REQUIRE(sum_of_sq...
#include <bits/stdc++.h> #define ll long long int using namespace std; #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) int main() { fastio; int tc; cin >> tc; while (tc--) { ll p; cin >> p; ...
// 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...
// // detail/string_view.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2018 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 BOOST_ASIO_DETA...
/* * This file is part of the SpaceAdventures package. * * (c) Jason Schilling <jason.schilling@sourecode.de> * * For the full copyright and license information, please view the LICENSE * File that was distributed with this source code. */ #pragma once #include <SFML/Graphics.hpp> #include <vector> #include <B...
#pragma once namespace challenge { void SomeFunc() { } class SomeClass { public: void doingSomething() {} }; }
/* Copyright 2016 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 2019 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 <fuchsia/hardware/pciroot/c/banjo.h> #include <lib/zx/vmo.h> #include <stdint.h> #include <zircon/errors.h> #include <zircon/syscalls/types.h> #i...
#ifndef PLATFORM_MEMORY_HPP_87E958A6_C4DE_4F53_A9F6_337D97D664E6 #define PLATFORM_MEMORY_HPP_87E958A6_C4DE_4F53_A9F6_337D97D664E6 #pragma once /* platform.memory.hpp */ /* Copyright © 2017 Far Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted p...
/** * @file bindings/go/print_doc_functions.hpp * @author Yashwant Singh * @author Yasmine Dumouchel * * This file contains functions useful for printing documentation strings * related to Go bindings. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD l...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/finspace-data/model/User.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace ...
// Copyright (C) 2007, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). /*! \file CbcSolver.hpp \brief Defines CbcSolver, the proposed top-level class for the new-style cbc solver. This class is c...
// Copyright (C) 2020 Jérôme Leclercq // This file is part of the "Nazara Engine - Platform module" // For conditions of distribution and use, see copyright notice in Config.hpp // Interface inspirée de la SFML par Laurent Gomila #pragma once #ifndef NAZARA_VIDEOMODE_HPP #define NAZARA_VIDEOMODE_HPP #include <Nazar...
//Создайте динамический массив, хранящий в первой строке имя, а во второй - телефон. //Организуйте поиск по имени и по номеру телефона и возможность ввода и изменения данных. #include <iostream> #include <string> using namespace std; void output( string**& arr, int sizeRow, int sizeCol ) { int i; for (i = ...
/* TMC26XStepper.cpp - - TMC26X Stepper library for Wiring/Arduino based on the stepper library by Tom Igoe, et. al. Copyright (c) 2011, Interactive Matter, Marcus Nowotny Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "So...
/* * 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 "include/core/SkPaint.h" #include "include/core/SkPath.h" #include "include/core/SkTypeface.h" #include "include/private/SkTemplates.h" #include "include/private/SkTo...
// #include <openssl/hmac.h> // #include <openssl/evp.h> // #include "emp-sh2pc/emp-sh2pc.h" // #include "sha-256.h" // bool compareHash(uint8_t* sslHash, Integer* empHash) { // for (int i =0; i < SHA256HashSize; i++) { // bitset<8> sslBitset(sslHash[i]); // for (int j = 7; j >= 0; j--) { // if(empHash...
#pragma once namespace pre::variant { template< template<class...> class Variant, class F, class... Types> inline void for_each_type( Variant<Types...>& variant, F&& f) { (void)std::initializer_list<int>{(std::ref(f)(std::forward<Types>(Types{})),0)...}; } template< template<class...> class Variant, clas...
#include <precompiled.h> /// /// MIT License /// Copyright (c) 2018-2019 Jongmin Yun /// /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL...
/* * Copyright (c) 2021 Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * */ #include "tensorflow/lite/schema/schema_generated.h" #include "tensorflow/lite/version.h" #include "ml_model.h" MLModel::MLModel(const unsigned char tflite_model[], int tensor_arena_size) : ...
// 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/lib/line_input/line_input.h" #include <lib/syslog/cpp/macros.h> #include <stdio.h> #include <sys/ioctl.h> #include <termios.h> #include <uni...
// Copyright (c) 2020 Daniel (@L33T) and contributors of the VTIL 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: // // 1. Redistributions of source code must retain ...
/**************************************************************************** Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2010-2013 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any...
/* * 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 ...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/kendra/model/IssueSubEntity.h> #include <aws/core/utils/HashingUtils.h> #include <aws/core/Globals.h> #include <aws/core/utils/EnumParseOverflowContainer.h> using namespace Aws::Utils; ...
#include "cpgf/scriptbind/gscriptservice.h" #include "cpgf/scriptbind/gscriptbind.h" #include "cpgf/scriptbind/gscriptbindutil.h" #include "cpgf/metadata/metautility/gmetadata_metabytearray.h" #include "cpgf/metadata/metautility/gmetadata_metaobjectarray.h" #include "cpgf/metautility/gmetabytearray.h" #include "cpgf/m...
#include "arch/x86_64/kernel/IDT.h" extern uintptr_t __interrupt_vector[]; IDT64Entry idt[IDT_ENTRY_COUNT] = {}; IDT64Descriptor idt_descriptor = { .size = sizeof(IDT64Entry) * IDT_ENTRY_COUNT, .offset = (uint64_t)&idt[0], }; void idt_initialize() { for (int i = 0; i < 48; i++) { idt[i] = ID...
/********************************************************************** Audacity: A Digital Audio Editor LyricsWindow.cpp Vaughan Johnson Dominic Mazzoni **********************************************************************/ #include "LyricsWindow.h" #include "Lyrics.h" #include "AudioIO.h" #include "Comm...
#include <vector> #include "gtest/gtest.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/layers/region_target_layer.hpp" #include "caffe/layers/region_loss_layer.hpp" #include "caffe/layers/sigmoid_layer.hpp" #include "caffe/layers/euclidean_loss_layer.hpp" #include...
/*========================================================================= Program: ParaView Module: pqTextureSelectorPropertyWidget.h Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc. All rights reserved. ParaView is a free software; you can redistribute it and/or modify it under the terms...
// Copyright Contributors to the Open Shading Language project. // SPDX-License-Identifier: BSD-3-Clause // https://github.com/AcademySoftwareFoundation/OpenShadingLanguage ///////////////////////////////////////////////////////////////////////// /// \file /// /// Shader implementation of Algebraic operations /// NOTE...
#include "src/hlstl_allocator.h" #include "src/hlstl_construct.h" #include <iostream> using namespace std; int main() { hl::Allocator<int> alloc; int* p = static_cast<int*>(alloc.allocate(1000)); hl::construct(p, 1); cout << *p << endl; hl::destroy(p); alloc.deallocate(p); return 0; }
/* * 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 3 of the License, or * (at your option) any later version. * * Written (W) 2013 Kevin Hughes * ported from scikit-learn ...
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The PIVX developers // Copyright (c) 2019-2020 The MasterWin developers // Copyright (c) 2018-2021 The Dequant developers // Distributed under the MIT/X11 software license, see the accompanying //...
// 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 "chromatic_imap_ddsSplDcps.h" #include "ccpp_chromatic_imap_dds.h" const char * __chromatic_imap_dds_chromatic_imap_command__name(void) { return (const char*)"chromatic_imap_dds::chromatic_imap_command"; } const char * __chromatic_imap_dds_chromatic_imap_command__keys(void) { return (const char*)"ses...
#include "tools.hpp" #include "tools-ui.hpp" #include "script-extractor.hpp" #include "text-renderer.hpp" struct ScriptContext : Script { string category; //the type of script this is ("Chapter" or "Field") string filename; //the filename sans path of this script on disk u32 index; ...
// 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/chromeos/drive/drive_integration_service.h" #include "base/bind.h" #include "base/files/file_enumerator.h" #include "base/fi...
#ifndef MARITIME_MSG_19_HPP #define MARITIME_MSG_19_HPP #include "msg.hpp" class Msgs_19 : public AIS_Msgs<libais::Ais19> { vec_int spare; vec_dbl sog; vec_int position_accuracy; vec_dbl lng_deg; vec_dbl lat_deg; vec_dbl cog; vec_int true_heading; vec_int timestamp; vec_int spare2; vec_chr name; ...
// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <vector> #include <memory> #include <transformations_visibility.hpp> #include <ngraph/ngraph.hpp> #include <ngraph/pass/graph_rewrite.hpp> #include "ngraph/pattern/matcher.hpp" namespace ngraph { namespace pass ...
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #include "test_precomp.hpp" namespace opencv_test { namespace { const int ARITHM_NTESTS = 1000; const int ARITHM_RNG_SEED = ...
/* This file is part of Magnum. Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Vladimír Vondruš <mosra@centrum.cz> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ...
/* Copyright 2017 R. Thomas * Copyright 2017 Quarkslab * * 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...
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
//Copyright (c) 2019-2020 The PIVX developers //Copyright (c) 2020 The earnscoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "qt/earnscoin/settings/settingsdisplayoptionswidget.h" #include "qt/earnscoin/s...
/* * Copyright (C) 2011 Google Inc. 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 condit...
/* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * 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 noti...
#include "config.h" #include "uhjfilter.h" #include <algorithm> #include <iterator> #include "AL/al.h" #include "alnumeric.h" #include "opthelpers.h" namespace { /* This is the maximum number of samples processed for each inner loop * iteration. */ #define MAX_UPDATE_SAMPLES 128 constexpr float Filter1CoeffS...
// 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 <stdio.h> #define TEST_FOR_MEMORY_LEAKS 0 // set to 1, on Windows only, to enable memory leak checking on application exit #if TEST_FOR_MEMORY_LEAKS #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> #else #include <stdlib.h> #endif #include <string.h> #include <stdint.h> #define ENABLE_VHACD...
#pragma once #include <consensus/Types.hpp> #include <fc/time.hpp> namespace gdwcore { namespace consensus { struct SlotIndex { AccountIdType delegate_id; time_point_sec timestamp; SlotIndex() {} SlotIndex(const AccountIdType id, const time_point_s...
// Copyright 2019 Google LLC & Bastiaan Konings // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
/* * cppAttributeInterpreterAccess.hpp * * * @date 14-07-2020 * @author Teddy DIDE * @version 1.00 * cppBase generated by gensources. */ #ifndef _CPPATTRIBUTE_INTERPRETER_ACCESS_HPP_ #define _CPPATTRIBUTE_INTERPRETER_ACCESS_HPP_ #include "config.hpp" #include "Macros.hpp" #include "String.hpp" #include "cpp...
#pragma once #include <chrono> #include <ratio> #include <cmath> using namespace std::chrono; namespace chassis { class pid { public: /** * The constructor for the pid class, it takes the three constants used in pid control. * Optionally you can pass a target to set it in the constructor, otherwise you can ...
#include <gtest/gtest.h> #include <JSONPath.h> #include <rapidjson/document.h> #include <string.h> #include <string> using namespace std; using namespace rapidjson; const char *testdoc = "{ \"a\" : { \"b\" : \"x\" }, " \ "\"c\" : [ \"d\", \"e\" ], " \ "\"f\" : [ { \"g\" : \"h\", \"i\" : \"j\" }, " \ "...
/* ScalMC and ScalMC Copyright (c) 2009-2015, Mate Soos. All rights reserved. Copyright (c) 2014, Supratik Chakraborty, Kuldeep S. Meel, Moshe Y. Vardi Copyright (c) 2015, Supratik Chakraborty, Daniel J. Fremont, Kuldeep S. Meel, Sanjit A. Seshia, Moshe Y. Vardi Permission is hereby granted, free of charge, to ...
#include <node.h> #include <node_buffer.h> #include <nan.h> #include <stdlib.h> #include "ed25519/ed25519.h" using namespace v8; using namespace node; /** * MakeKeypair(Buffer seed) * seed: A 32 byte buffer * returns: an Object with PublicKey and PrivateKey **/ NAN_METHOD(MakeKeypair) { Nan::HandleScope scope;...
/******* \class DTSegmentResidual ******* * * * \author : Stefano Lacaprara - INFN LNL <stefano.lacaprara@pd.infn.it> * * Modification: * *********************************/ /* This Class Header */ #include "RecoLocalMuon/DTSegment/test/DTSegmentResidual.h" /* Collaborating Class Header */ #include "DataFormats...
class Solution { private: vector<vector<int>> vv{{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; public: bool exist(vector<vector<char>> &board, string word) { int m = board.size(); int n = board[0].size(); int cnt[128] = {0}; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { ...
#include "Frame.h" #include "SFML/Graphics/RenderTarget.hpp" #include "SFML/Graphics/RectangleShape.hpp" Frame::Frame(const unsigned int& width, const unsigned int& height) : m_width(width), m_height(height) {} Frame::~Frame() {} void Frame::draw(sf::RenderTarget& target, sf::RenderStates states) const { sf::Rect...
#pragma once #include "memory_managers.hpp" #include "tasks.hpp" namespace mtbase { struct task_allocator : private generic_allocator { task_allocator(std::pmr::memory_resource* r) : generic_allocator{ r } {} public: template<class Func, class TupleArgs> ...
#include "BasicComponent.h" BasicComponent::BasicComponent(){ } BasicComponent::~BasicComponent(){ if (sprite){ sprite->isAlive = false; } if (font){ font->isAlive = false; } } void BasicComponent::Update(){ if(isFontChange && font){ oldFont = font; oldFont->isAlive = false; font = fontManager->Get...
// Copyright 2008, Google Inc. // 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 conditions ...
// 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 "ipc/ipc_channel_proxy.h" #include "base/bind.h" #include "base/compiler_specific.h" #include "base/location.h" #include "base/memory/ref_co...
#include "SceneLoader.h" #include <iostream> #include "extern/json/json.hpp" #include <fstream> #include "Utilities/FileSystem.h" #include "Utilities/Logger.h" using namespace Utilities; using namespace GenParam; using namespace std; void SceneLoader::readScene(const char *fileName, Scene &scene) { LOG_INFO << "Loa...
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permiss...
/* This code was generated by Usuba. See https://github.com/DadaIsCrazy/usuba. From the file "samples/usuba/rectangle_bitslice.ua" (included below). */ /* Do NOT change the order of those define/include */ #define NO_RUNTIME #ifndef BITS_PER_REG #define BITS_PER_REG 128 #endif /* including the architecture spec...
// Copyright 2013 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 "ui/base/ime/remote_input_method_win.h" #include "base/command_line.h" #include "base/observer_list.h" #include "base/strings/utf_string_convers...
#include "DialogUp.h" #include "Dialog.h" namespace AssortedWidgets { namespace Widgets { DialogUp::DialogUp(int x,int y,unsigned int width,unsigned int height) { m_position.x=x; m_position.y=y; m_size.m_width=width; m_size.m_height=height; } DialogUp::~Dialog...
/** * @file e131bridgediscoverypacket * */ /* Copyright (C) 2019-2021 by Arjan van Vught mailto:info@orangepi-dmx.nl * * 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 restricti...
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04...
/* Copyright (C) 2016 Quaternion Risk Management Ltd All rights reserved. This file is part of ORE, a free-software/open-source library for transparent pricing and risk analysis - http://opensourcerisk.org ORE is free software: you can redistribute it and/or modify it under the terms of the Modified BSD License...
#include "natives.h" #include "main.h" #include "errors.h" #include "context.h" #include "modules/debug.h" #include "modules/strings.h" #include "modules/tags.h" #include "modules/containers.h" #include "modules/variants.h" #include "modules/amxutils.h" #include <limits> #include <cstring> cell get_level(AMX *amx, ce...
// Question: https://projecteuler.net/problem=531 // g++ problem531.cpp -I$HOME/pari/include/ -L$HOME/pari/lib -lpari -O3 #include<pari/pari.h> #include<iostream> #include<vector> #include<numeric> #include<algorithm> using namespace std; typedef uint64_t ui; #define endl "\n" const ui L = 1000000; const ui R = 10...
#include "Element2D.h" Element2D::Element2D(const glm::vec2& pos, const glm::vec2& scale) { m_pos = pos; m_scale = scale; } void Element2D::SetPosition(const glm::vec2& newp) { m_pos = newp; } void Element2D::MovePosition(const glm::vec2& delta) { m_pos += delta; } void Element2D::SetScale(const glm::ve...
//================================================================================================= /*! // \file src/mathtest/smatdmatmult/MIbMHa.cpp // \brief Source file for the MIbMHa sparse matrix/dense matrix multiplication math test // // Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved // // Thi...
/* https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV4suNtaXFEDFAUf */ #include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <tuple> using namespace std; int dx[] = {0,0,-1,1}; int dy[] = {-1,1,0,0}; int n, a[12][12]; bool check[12][12]; vector<pair<int, in...
/* * CSRMatrix.cpp * * Created on: May 6, 2015 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #include <networkit/algebraic/CSRMatrix.hpp> #include <cassert> #include <atomic> #include <numeric> #include <omp.h> namespace NetworKit { CSRMatrix::CSRMatrix() : rowIdx(0), columnIdx(0), nonZero...
/** * @file * @copyright defined in eos/LICENSE.txt */ #pragma once #include <eosio/chain/chain_config.hpp> #include <eosio/chain/types.hpp> #include <eosio/chain/asset.hpp> #include <fc/crypto/sha256.hpp> #include <string> #include <vector> namespace eosio { namespace chain { struct account_tuple { publi...
/****************************************************************************** * _ _____ __________ * * | | / / _ | / __/_ __/ Visibility * * | |/ / __ |_\ \ / / Across * ...
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #include "stdafx.h" using nam...
// Time: O(logn) = O(1) // Space: O(1) // Only using integer type. class Solution { public: /** * @param dividend the dividend * @param divisor the divisor * @return the result */ int divide(int dividend, int divisor) { // Handle corner case. if (dividend == numeric_limits<...
// File Automatically generated by eLiSe #include "general/all.h" #include "private/all.h" #include "cEqAppui_NoDist__PTInc_M2CPolyn4.h" cEqAppui_NoDist__PTInc_M2CPolyn4::cEqAppui_NoDist__PTInc_M2CPolyn4(): cElCompiledFonc(2) { AddIntRef (cIncIntervale("Intr",0,27)); AddIntRef (cIncIntervale("Orient",27,33)...
#include "ast.hpp" #include <iostream> int main(int argc, char *argv[]) { stdin = fopen(argv[1], "r"); ast_Top *ast = parseAST(); ast->print(); return 0; }
// Solved 2021-04-29 20:25 // Runtime: 28 ms (99.20%) // Memory Usage: 18.3 MB (84.26%) class SubrectangleQueries { public: SubrectangleQueries(vector<vector<int>> &rectangle) { this->rectangle.swap(rectangle); } void updateSubrectangle(int row1, int col1, int row2, int col2, int newValue) { ...
// (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to 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) // See http://www.boost.org for most recen...
// // Created by basto on 11/20/19. // #include <FeatureCheck.h> #include <gtest/gtest.h> feature * UseSoftwareBreakpointsTest = new feature("UseSoftwareBreakpoints", 1); feature * RunTimeTestFilerTest = new feature("RunTimeTestFiler",2,2); feature * printOverGDBTest = new feature("printOverGDB",3,6); TEST(FeatureC...
// Copyright 2020 Anisimova Polina #include <gtest-mpi-listener.hpp> #include <gtest/gtest.h> #include <vector> #include "./wrong_vector.h" TEST(Parallel_Operations_MPI, Test_Negative_Size) { int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); std::vector<int> vec; const int size_vector = -10; if (rank == 0) {...
#pragma once // this is to avoid dealing with QMetaObject for the time being -sh 20190203 #include "export.hpp" namespace options { class slider_value; } #include <QObject> #include <QList> namespace _qt_sig_impl { template<typename t> struct sig; class OTR_COMPAT_EXPORT sig_void final : public QObject { Q_OBJ...
//===-- asan_win.cc -------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// Fill out your copyright notice in the Description page of Project Settings. #include "MotionStructs.h" float FJointData::CompareTo(const FJointData Other) const { return (FVector::Dist(BoneCSPos, Other.BoneCSPos)) + (FVector::Dist(BoneCSVel, Other.BoneCSVel)); } float FTrajectoryData::CompareTo(const FTrajector...
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node* next; }; void push(struct Node** head_ref, int new_data) { struct Node* new_node = new Node; new_node->data = new_data; new_node->next = (*head_ref); (*head_ref) = new_node; } bool detectLoop(struct Node* h) { unordered_set<Nod...
#include "Sound.h" #include "Game.h" #include "Resources.h" Sound::Sound(GameObject &associated) : Component (associated) { this->chunk = nullptr; this->channel = -1; this->active = true; this->loops = 0; } Sound::Sound(GameObject &associated, std::string file) : Sound (associated) { this->Open(file); } So...