text
stringlengths
7
961k
//===-- ValueObjectConstResult.cpp ----------------------------------------===// // // 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 // //===---------------------------...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-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 "chainparamsbase.h" #include "clientversion.h" #include "rpcclient.h" #i...
#include "hevcStreamReader.h" #include <fs/systemlog.h> #include "hevc.h" #include "nalUnits.h" #include "tsMuxer.h" #include "tsPacket.h" #include "vodCoreException.h" using namespace std; static const int MAX_SLICE_HEADER = 64; static const int HEVC_DESCRIPTOR_TAG = 0x38; HEVCStreamReader::HEVCStreamReader() ...
#include <jps3d/planner/planner_util.h> template <int Dim> JPSPlanner<Dim>::JPSPlanner(bool verbose): planner_verbose_(verbose) { planner_verbose_ = verbose; if(planner_verbose_) printf(ANSI_COLOR_CYAN "JPS PLANNER VERBOSE ON\n" ANSI_COLOR_RESET); } template <int Dim> void JPSPlanner<Dim>::setMapUtil(const st...
// Copyright Take Vos 2021. // 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) #include "ttauri/geometry/transform.hpp" #include <gtest/gtest.h> #include <iostream> #include <string> using namespace tt::geo; TEST(g...
version https://git-lfs.github.com/spec/v1 oid sha256:e18138deeb3f9fad38375032d6ef0b59faa370cc487c35506d7c1642d9ed0e15 size 3511
#include "Matrix.h" #include "exceptions.h" #include <string> #include <sstream> #include <iostream> using namespace std; Matrix::Matrix(int _n, int _m) : n(_n), m(_m), data(nullptr) { data = (int*)calloc(n * m, sizeof(int)); } Matrix::Matrix(int _n, int _m, std::istream& is) : n(_n), m(_m), data(nullptr) { data = ...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: System.ValueType #include "System/V...
// This file is made available under Elastic License 2.0. // This file is based on code available under the Apache license here: // https://github.com/apache/incubator-doris/blob/master/be/src/exec/mysql_scanner.cpp // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreemen...
/** * @file * @copyright defined in Achainplus/LICENSE */ #pragma once #include <eosio/chain/wasm_interface.hpp> #include <fc/time.hpp> #pragma GCC diagnostic ignored "-Wunused-variable" namespace eosio { namespace chain { namespace config { typedef __uint128_t uint128_t; const static auto default_blocks_dir_n...
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // // --------------------------------------------------------------------------- // // This file was generated by the CEF translato...
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). // // Copyright (c) 2011 The LevelDB Authors. All rights r...
#include "tensorflow/core/lib/strings/str_util.h" #include <gtest/gtest.h> namespace tensorflow { TEST(CEscape, Basic) { EXPECT_EQ(str_util::CEscape("hello"), "hello"); EXPECT_EQ(str_util::CEscape("hello\n"), "hello\\n"); EXPECT_EQ(str_util::CEscape("hello\r"), "hello\\r"); EXPECT_EQ(str_util::CEscape("\t\r\...
/** * cpp/virtual.cc * * Contains the (empty) definitions for some of the functions required by g++. **/ // TODO: Trigger kernel panic if one of these occur? // Function for invalid virtual calls extern "C" void __cxa_pure_virtual() { } extern "C" void __cxa__virtual() { } // We don't want to call anything at ke...
class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { int len = 0; ListNode* head_copy = head; while (head_copy != nullptr) { head_copy = head_copy->next; len++; } if (n == len) { ListNode* new_head ...
// 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/views/accessibility/view_ax_platform_node_delegate_win.h" #include <oleacc.h> #include <wrl/client.h> #include <memory> #include <string> #...
// 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. #if defined(HAVE_CONFIG_H) #include "config/wiki-config.h" #endif #include <cstring> #if HAVE_DECL_STRNLEN == 0 size_t strn...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "extern/beatsaber-hook/shared/utils/typedefs.h" // Including type: System.Enum #include "System/Enum.hpp" // Completed includes // Type namespac...
#define CATCH_CONFIG_RUNNER #include<bits/stdc++.h> #include "catch.hpp" #include "anagram.h" using namespace std; CheckValues check; string tempreature="tempreature",humidity=humidity; TEST_CASE("raise error and warning when tempreature is greater than alert level") { REQUIRE(check.checkforhighvalues(42,tempr...
/** * @copyright * * Tencent is pleased to support the open source community by making IoT Hub available. * Copyright(C) 2018 - 2021 THL A29 Limited, a Tencent company.All rights reserved. * * Licensed under the MIT License(the "License"); you may not use this file except in * compliance with the License. You ma...
// classical dp class Solution { public: int minimumTotal(vector<vector<int>>& triangle) { int height = triangle.size(); for (int i = 1; i < height; i++){ triangle[i][0] += triangle[i-1][0]; for (int j = 1; j < triangle[i].size()-1; j++) triangle[i][j] += min...
/* * libjingle * Copyright 2004--2011, Google Inc. * * 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...
/** @file traffic_ctl @section license License Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache...
/* Copyright © 2020 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at * https://opensource.org/licenses/BSD-3-Clause */ #include <ml/neural_net/PosixTaskQueue.hpp> #include <core/parallel/lambda_omp.hpp> namespace ...
#ifndef CUAUV_SIM_FMTS_H #define CUAUV_SIM_FMTS_H #include <memory> #include <iostream> #include <string> #include <stdio.h> // Originally from http://stackoverflow.com/a/26221725 . namespace cuauv { namespace fishbowl { template<typename... Args> std::string fmts(const std::string& format, Args... args) { size...
/* * The MIT License (MIT) * * Copyright (c) 2015 vmolsa <ville.molsa@gmail.com> (http://github.com/vmolsa) * * 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 wi...
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The SYNERGYWORK developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "overviewpage.h"...
/* ************************************************************************************************************* */ /* */ /* GLIP-COMPUTE ...
// 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 "chrome/browser/ash/policy/external_data/user_cloud_external_data_manager.h" #include <memory> #include "base/location.h" #include "base/task/s...
No-one has translated the ppqueue example into C++ yet. Be the first to create ppqueue in C++ and get one free Internet! If you're the author of the C++ binding, this is a great way to get people to use 0MQ in C++. To submit a new translation email it to zeromq-dev@lists.zeromq.org. Please: * Stick to identical fu...
// Copyright 2017-2018 by Martin Moene // // https://github.com/martinmoene/string-view-lite // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include "string-view-main.t.hpp" #define nssv_PRESENT( x ) \ std::c...
//! \file /* ** Copyright (C) - Triton ** ** This program is under the terms of the BSD License. */ #include <triton/pythonBindings.hpp> #include <triton/pythonUtils.hpp> #include <triton/callbacks.hpp> /*! \page py_CALLBACK_page CALLBACK \brief [**python api**] All information about the CALLBACK python names...
//------------------------------------------------------------------------------ // // Copyright 2018-2019 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 // // ...
#include <string> using std::string; #include "crypto_scalarmult.h" string crypto_scalarmult_base(const string &n) { unsigned char q[crypto_scalarmult_BYTES]; if (n.size() != crypto_scalarmult_SCALARBYTES) throw "incorrect scalar length"; crypto_scalarmult_base(q,(const unsigned char *) n.c_str()); return stri...
//------------------------------------------------------------------------------ // ceuigeometrybuffer.cc // (C) 2009 Radon Labs GmbH //------------------------------------------------------------------------------ #include "stdneb.h" #include "sui/ceui/ceuigeometrybuffer.h" #include "sui/ceui/ceuiserver.h" #include ...
/* Motor.cpp - Library for motor control Created by Klaus Röbenack, 2015, 2019 */ #include "Arduino.h" #include "Motor.h" // Constructor Motor::Motor (byte pinDIRA, byte pinDIRB, byte pinPWMA, byte pinPWMB) : DIRA(pinDIRA), DIRB(pinDIRB), PWMA(pinPWMA), PWMB(pinPWMB) { digitalWrite (PWMA, 0); ...
// // Copyright © 2017 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #pragma once #include "LayerTestResult.hpp" #include <backendsCommon/IBackendInternal.hpp> #include <backendsCommon/WorkloadFactory.hpp> LayerTestResult<float, 4> StridedSlice4dFloat32Test( armnn::IWorkloadFactory& workloadF...
/************************************************************************************** Copyright 2015 Applied Research Associates, 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.ap...
// Copyright 2021 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/pdf/browser/pdf_navigation_throttle.h" #include <memory> #include <utility> #include "base/location.h" #include "base/run_loop.h" #...
#include "CuaEstatica.h" #include <iostream> #include <vector> #include <stdexcept> using namespace std; CuaEstatica::CuaEstatica(const int max_size) { _data = new int[max_size]; _max_size = max_size; _size = 0; _front = 0; _rear = 0; cout << "Estructura creada.\n\n"; } CuaEstatica::~CuaEstat...
/* Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke 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 ...
// Copyright (c) 2020 Jason Waataja // 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, publish, d...
/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2005, 2006 // University of Rochester // Department of Computer Science // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the fo...
#include "services/network/HttpClientImpl.hpp" #include "infra/stream/CountingOutputStream.hpp" #include "infra/stream/StringInputStream.hpp" namespace services { HttpClientImpl::HttpClientImpl(infra::BoundedConstString hostname) : hostname(hostname) , bodyReaderAccess(infra::emptyFunction) ...
/* FLAGS: TINGE_PRINT_OFF disables print function TINGE_ERR_OFF disables err function TINGE_LOG_OFF disables log function TINGE_PLAIN disables all styles and colours */ #pragma once #ifndef TINGE_HPP #define TINGE_HPP #include <iostream> #include <iomanip> #include <sstream> #include <utility> #...
#pragma once #include "util/logger.hpp" #include "config.hpp" #include "QounterRegistry.hpp" #include "custom-types/shared/macros.hpp" #include "questui/shared/BeatSaberUI.hpp" #include "GlobalNamespace/SimpleLevelStarter.hpp" #include "GlobalNamespace/BeatmapLevelSO.hpp" #include "GlobalNamespace/GameplayModifiers.hp...
/** * Copyright (C) 2021-present MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Server Side Public License, version 1, * as published by MongoDB, Inc. * * This program is distributed in the hope that it will be useful, * but W...
/* * X.509 Name Constraint * (C) 2015 Kai Michaelis * * Botan is released under the Simplified BSD License (see license.txt) */ #include <botan/pkix_types.h> #include <botan/ber_dec.h> #include <botan/internal/loadstor.h> #include <botan/x509cert.h> #include <botan/internal/parsing.h> #include <sstream> #include <func...
// 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/ui/views/crostini/crostini_uninstaller_view.h" #include "base/bind.h" #include "base/metrics/histogram_functions.h" #include "ba...
/* Copyright 2017 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 (c) 2010-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke 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 ...
// OpenArchive.cpp // #define SHOW_DEBUG_INFO #ifdef SHOW_DEBUG_INFO #include <stdio.h> #endif #include "../../../../C/CpuArch.h" #include "../../../Common/ComTry.h" #include "../../../Common/IntToString.h" #include "../../../Common/StringConvert.h" #include "../../../Common/StringToInt.h" #include "../../../Comm...
//===----------------------------------------------------------------------===// // // 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 (c) 2018 PaddlePaddle 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 agr...
/****************************************************************** * * Copyright 2018 GRANITE RIVER LABS All Rights Reserved. * 2021 CASCODA LTD All Rights Reserved. * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the L...
/*************************************************************************/ /* multimesh.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
/** @file @brief Implementation @date 2015 @author Sensics, Inc. <http://sensics.com/osvr> */ // Copyright 2015 Sensics, 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 L...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2020 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #i...
// 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/first_run/first_run.h" #include "base/path_service.h" #include "base/prefs/pref_service.h" #include "base/utf_string_convers...
// This is an independent project of an individual developer. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include "stdafx.h" #include "DynamicTileset.h" #include "Log.h" #include "Bitmap.h" #include "Utility.h" #include "Geometry.h" #include "Encoding....
// See the file "COPYING" in the main distribution directory for copyright. // // See ConnSize.h for more extensive comments. #include "ConnSize.h" #include "analyzer/protocol/tcp/TCP.h" #include "IP.h" #include "Reporter.h" #include "events.bif.h" using namespace analyzer::conn_size; ConnSize_Analyzer::ConnSize_A...
#include "mtf/SSM/ProjectiveBase.h" #include <boost/random/random_device.hpp> #include <boost/random/seed_seq.hpp> #include "mtf/Utilities/warpUtils.h" #include "mtf/Utilities/miscUtils.h" _MTF_BEGIN_NAMESPACE ProjectiveBase::ProjectiveBase(const SSMParams *params) : StateSpaceModel(params){ init_pts_hm.resize(Eigen...
#include "Enem.h" Enem::Enem() { mySprite = LoadTexture("barb.png"); position = { 0, 0 }; // destination = { 0, 0 }; isActive = true; speed.x = GetRandomValue(15, 70); speed.y = GetRandomValue(15, 70); int xNeg = GetRandomValue(0, 1); int yNeg = GetRandomValue(0, 1); if(xNeg == 0) { speed.x *= -1; } ...
// // $Id: PercolatorXmlReader.cpp 6870 2014-11-03 19:12:11Z chambm $ // // // Original author: Barbara Frewen <frewen@u.washington.edu> // // Copyright 2012 University of Washington - Seattle, WA 98195 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in complia...
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
#include <string> #include <stdexcept> #include <fstream> #include <vector> #include <ctime> #include "SFML/Graphics.hpp" #include "SFML/Audio.hpp" #include "chip8.hpp" #include "cpu.hpp" // 0x0NNN #define ADDR (opcode & 0x0FFF) // 0x000N #define N (opcode & 0x000F) // 0x0X00 #define X ((opcode & 0x0F00) >> 8) // 0x00...
//========= Copyright Valve Corporation, All rights reserved. ============// // c_bot_npc.cpp #include "cbase.h" #include "NextBot/C_NextBot.h" #include "c_bot_npc.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" #undef NextBot //--------------------------------------------...
#include <algorithm> #include <cassert> #include <cstring> #include "p2p.h" #include "p2p_api.h" #ifdef P2P_USER_NAMESPACE #error API build must not use custom namespace #endif namespace { struct packing_traits { enum p2p_packing packing; p2p_unpack_func unpack; p2p_pack_func pack; p2p_pack_func pack_one_fill;...
#pragma once #include "frc/smartdashboard/Smartdashboard.h" #include "networktables/NetworkTable.h" #include "networktables/NetworkTableInstance.h" class LimeLight { std::shared_ptr<NetworkTable> table = nt::NetworkTableInstance::GetDefault().GetTable("limelight"); public: enum class LED_Mode { Keep_Current ...
//===--- AllocBoxToStack.cpp - Promote alloc_box to alloc_stack -----------===// // // 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...
/*************************************************************** * Name: IUserModel.cpp * Purpose: Code AWServiceCommonData * Author: David Lecoconnier (david.lecoconnier@free.fr) * Created: 2016-09-27 * Copyright: David Lecoconnier (http://www.getfux.fr) * License: **********************************...
//===----------------------------------------------------------------------===// // // 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 "PlayerEntity.h" #include "Engine.h" #include "MapManager.h" #include "CreatureManager.h" #include "FireballEntity.h" #include "GamePlayLogicEntity.h" #include <Windows.h> #include <cstdio> #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> #include <cmath> using namespace glm; void PlayerEntity::OnCr...
/*Exercise 3 - Repeatition Convert the C program given below which calculates the Factorial of a number that you input from the keyboard to a C++ program. Please Note that the input command in C++ is std::cin. This is a representation of the Keyboard.*/ #include<stdio.h> #include<iostream> int main() { int no; ...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "util.h" #include "sync.h" #include "strlcpy.h" #include "version.h" #inc...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <gtest/gtest.h> #include "EnumClinitAnalysis.h" #include "verify/VerifyUtil.h" using namespace optimize_enums; namespa...
// 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 "raw_ptr_to_gc_managed_class_error.h" namespace blink { void HeapObject::trace(Visitor* visitor) { visitor->trace(m_objs); } }
#include "engine.h" #define NUMCAUSTICS 32 static Texture *caustictex[NUMCAUSTICS] = { NULL }; void loadcaustics(bool force) { static bool needcaustics = false; if(force) needcaustics = true; if(!caustics || !needcaustics) return; useshaderbyname("caustics"); if(caustictex[0]) return; loopi(N...
/* * Copyright (c) 2021, Tim Flynn <trflynn89@pm.me> * * SPDX-License-Identifier: BSD-2-Clause */ #include <AK/AllOf.h> #include <AK/AnyOf.h> #include <AK/Array.h> #include <AK/CharacterTypes.h> #include <AK/Find.h> #include <AK/Function.h> #include <AK/QuickSort.h> #include <AK/TypeCasts.h> #include <LibJS/Runtim...
/************************************************************************* * Copyright 2018 Reegan Troy Layzell * * 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...
#include "Metal.h" Metal::Metal(const color3& a) { albedo = a; } Metal::Metal(const color3& a, double f) { albedo = a; fuzz = f; } bool Metal::Scatter(const Ray& RayIn, const hitRecord& record, color3& attenuation, Ray& scattered) const { vec3 reflected = Reflect(RayIn.dir.normalized(), record.normal); if (fuzz...
/* GEODIFF - MIT License Copyright (C) 2020 Martin Dobias */ #include "changesetreader.h" #include "geodiffutils.hpp" #include "changesetvarint.h" #include "portableendian.h" #include <assert.h> #include <memory.h> #include <sstream> ChangesetReader::ChangesetReader() = default; ChangesetReader::~ChangesetRead...
// // Copyright 2019 DreamWorks Animation // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with...
/* * @lc app=leetcode id=332 lang=cpp * * [332] Reconstruct Itinerary */ #include <set> #include <vector> #include <map> #include <string> using namespace std; class Solution { public: vector<string> ans; map<string,set<string>> G; map<string,map<string, int>> remain_visits; int N; bool DFS...
/* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"...
/* * Copyright (c) 2016, Humanoid Lab, Georgia Tech Research Corporation * Copyright (c) 2016-2017, Graphics Lab, Georgia Tech Research Corporation * Copyright (c) 2016-2017, Personal Robotics Lab, Carnegie Mellon University * All rights reserved. * * This file is provided under the following "BSD-style" License:...
//===- InstCombineAddSub.cpp ------------------------------------*- 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 "Core/Core.h" #include <angelscript.h> #include "AngelState.h" #include <SDL_mixer.h> #include "Math/Math.h" #include "Asset/AssetManager.h" using namespace asset; using namespace math; namespace script { int convertVolumef(float vol) { return (int)(max(min(vol, 1.0f), 0.0f) * MIX_MAX_VOLUME)...
/*++ Copyright (c) 2015 Microsoft Corporation Module Name: rlimit.cpp Abstract: Resource limit container. Author: Nikolaj Bjorner (nbjorner) 2015-09-28 Revision History: --*/ #include "util/rlimit.h" #include "util/common_msgs.h" #include "util/mutex.h" static DECLARE_MUTEX(g_rlimit_mux); void in...
/*============================================================================= Copyright (c) 2003 Vaclav Vesely http://spirit.sourceforge.net/ Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boos...
/* * 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...
/* * This file contains code from "C++ Primer, Fourth Edition", by Stanley B. * Lippman, Jose Lajoie, and Barbara E. Moo, and is covered under the * copyright and warranty notices given in that book: * * "Copyright (c) 2005 by Objectwrite, Inc., Jose Lajoie, and Barbara E. Moo." * * * "The authors and publis...
// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em // with input from halodi_msgs:msg/ImuMeasurement.idl // generated code does not contain a copyright notice #include "array" #include "cstddef" #include "string" #include "vector" #include "rosidl_generator_c/message_type_support_...
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"), QT_TRANSLATE_NOOP("bitcoin-core", "" "%s, you must set a rpcpa...
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/REDhash.hpp> #include <RED4ext/Types/generated/user/SettingsVar.hpp> namespace RED4ext { namespace user { struct SettingsVarListName : user::SettingsVar { static constexpr co...
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.o...
// Copyright (c) 2019 The PIVX developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "qt/mninfodialog.h" #include "qt/forms/ui_mninfodialog.h" #include "walletmodel.h" #include "wallet/wallet.h" #include "guiutil.h...
#pragma once #include "IModule.hpp" #include "InverseKinematics.hpp" #include "Servomechanism.hpp" // local Y axis is used as look direction class Yaml; class Turret : public IModule { private: int m_targetIndex; Servomechanism servo; InverseKinematics ik; const glm::vec4& getTarget() { return ...
// Copyright 2012 Cloudera 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 wr...
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--){ long n, k, sum_dad = 0, sum_son = 0; cin >> n >> k; std::vector<long> v(n); for (long i = 0; i < n; ++i) { cin >> v[i]; } sort(v.begin(), v.end()); k = (n - k < k) ? (n - k) : k; for(int i = 0; i < n...