text
stringlengths
7
961k
/* Copyright 2019 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...
#include "Arduino.h" #include "device_db.h" #include <sqlite3.h> #include <SPI.h> #include <FS.h> #include "SPIFFS.h" #define FORMAT_IF_FAILED true sqlite3 *deviceDB; const char* data = "Callback function called"; static int callback(void *data, int argc, char **argv, char **azColName) { int i; Serial.printf("%s:...
// ImGui Win32 + DirectX9 binding // In this binding, ImTextureID is used to store a 'LPDIRECT3DTEXTURE9' texture identifier. Read the FAQ about ImTextureID in imgui.cpp. // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. // If you use this binding you'll ...
class Solution { public: bool isValid(vector<vector<int>>& image, int row , int column) { if((row<0||row>=image.size()||column<0||column>=image[0].size())) return false; return true; } void call(vector<vector<int>>& image, int r, int c, int OldColo...
// // wirelessly connected cloud (Wireless Mesh Networking) // // // Conversations about the ROOT @ SEMA storage, Seoul // // // 2021 02 15 // // (part-2) teensy35 : 'client:osc' (osc over slip --> mesh post) // //arduino #include <Arduino.h> //osc (already included in "framework-arduinoteensy") #include <OSCBundle...
//== ObjCSelfInitChecker.cpp - Checker for 'self' initialization -*- C++ -*--=// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// -*- C++ -*- // Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011 // 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 // ...
#include <ossimPlanet/ossimPlanetYahooGeocoder.h> #include <wms/wmsCurlMemoryStream.h> #include <ossim/base/ossimXmlDocument.h> #include <ossim/base/ossimXmlNode.h> #include <sstream> void ossimPlanetYahooGeocoder::getLocationFromAddress(std::vector<osg::ref_ptr<ossimPlanetGeocoderLocation> >& result, ...
// Copyright (c) 2012-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 "pubkey.h" #include "key.h" #include "script/script.h" #include "script/standard.h" #include "uint256.h" #include "t...
#include "output_display.h" OutputDisplay::OutputDisplay(const std::string& font_path, int x0, int y0, unsigned int font_size) : font_(font_path.c_str()) { if (font_.Error()) { uErrorOut(__FILE__, __func__, __LINE__, "フォントが開けません"); } else { font_.FaceSize(font_size); } x0_ = x0; y0_ = y0; font_size_ = font...
#include "pch.h" #include "$safeitemname$.h" using namespace winrt; using namespace Windows::UI::Xaml; namespace winrt::$rootnamespace$::implementation { int32_t $safeitemname$::MyProperty() { throw hresult_not_implemented(); } void $safeitemname$::MyProperty(int32_t /*value*/) { ...
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // A fuchsia-specific shell test. // // This test is only supposed to be ran on Fuchsia OS, as it exercises // Fuchsia-specific functionality for which no ...
/* * Copyright (c) 2012 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 contribut...
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017 The Condominium developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/m...
// This file was automatically generated on Mon Dec 09 09:47:37 2019 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // 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/L...
// 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...
/* * DynamicMatrix.hpp * * Created on: 13.03.2014 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #ifndef NETWORKIT_ALGEBRAIC_DYNAMIC_MATRIX_HPP_ #define NETWORKIT_ALGEBRAIC_DYNAMIC_MATRIX_HPP_ #include <networkit/algebraic/AlgebraicGlobals.hpp> #include <networkit/algebraic/SparseAccumulator....
#include "layers/resample_layer.h" #include "cpp/resample.h" namespace spherical { namespace cpu { torch::Tensor ResampleToMap(torch::Tensor input, torch::Tensor sample_map, int outputHeight, int outputWidth, InterpolationType interpolation) { // Useful dimens...
/*============================================================================= Library: CTK Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the ...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__delete_class_malloc_62a.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete.label.xml Template File: sources-sinks-62a.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory Management Routines ...
/* * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "core/helpers/debug_helpers.h" #include <stdexcept> #include <string> namespace NEO { void debugBreak(int line, const char *file) { } void abortUnrecoverable(int line, const char *file) { std::string message = "Abo...
#ifndef BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED // Copyright Eric Friedman 2002 // Copyright Aleksey Gurtovoy 2004 // // 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....
//===- PHITransAddr.cpp - PHI Translation for Addresses -------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//Holds the candidate matches #ifndef FPGAFULLMATCH_H #define FPGAFULLMATCH_H #include "FPGATracklet.hh" #include "FPGAMemoryBase.hh" #include "FPGAStub.hh" #include "L1TStub.hh" using namespace std; class FPGAFullMatch:public FPGAMemoryBase{ public: FPGAFullMatch(string name, unsigned int iSector, double phi...
// Copyright Esteve Soler Arderiu 2015 // 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 STACK_TRACE_HPP_ #define STACK_TRACE_HPP_ #include <deque> #include "stack_frame.hpp" name...
#include "chainerx/native/native_device.h" #include <cmath> #include <cstdint> #include "chainerx/array.h" #include "chainerx/device.h" #include "chainerx/dtype.h" #include "chainerx/kernels/trigonometric.h" #include "chainerx/native/elementwise.h" #include "chainerx/native/kernel_regist.h" #include "chainerx/numeric...
#include "MyGame.h" using namespace std; const int WIDTH = 800; const int HEIGHT = 600; const int USE_FULL_TEXTURE = NULL; MyGame::MyGame(TTF_Font* font, SDL_Surface* background, SDL_Surface* batleft, SDL_Surface* batright, SDL_Surface* starball, Mix_Chunk* hitbat, Mix_Chunk* hitwall, Mix_Chunk* hitside) { ...
#define DURATION 1000000 #define NOTE_BF4 1073 #define NOTE_AF4 1205 #define NOTE_F4 1433 #define NOTE_EF5 804 #define NOTE_D5 852 #define PAUSE 1000000 int funkyTown[11] = {NOTE_BF4, NOTE_BF4, NOTE_AF4, NOTE_BF4, PAUSE, NOTE_F4, PAUSE, NOTE_F4, NOTE_BF4, NOTE_EF5, NOTE_D5, NOTE_BF4}; int16_t audioPin...
/* * CallVolumeData.cpp * * Copyright (C) 2011 by Universitaet Stuttgart (VISUS). * Alle Rechte vorbehalten. */ #include "stdafx.h" #include "mmcore/CallVolumeData.h" /* * megamol::core::CallVolumeData::CallVolumeData */ megamol::core::CallVolumeData::CallVolumeData(void) : xSize(0), ySize(0), zSize(0), attr...
////////////////////////////////////////////////////////////////////////////// /// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand /// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI /// /// Distributed under the Boost Software License, Version 1.0 /// ...
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2008 Roland Lichters Copyright (C) 2009, 2014 Jose Aparicio This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is fr...
#include "host/wasi/wasifunc.h" #include "common/filesystem.h" #include "common/log.h" #include "host/wasi/environ.h" #include "runtime/instance/memory.h" #include <chrono> #include <csignal> #include <limits> #include <numeric> #include <random> #include <string_view> namespace WasmEdge { namespace Host { namespace ...
#include "UnitTests/UnitTests.h" #include "Base/BaseTypes.h" #include "Math/Color.h" #include "Math/MathDefines.h" #include "Reflection/ReflectionRegistrator.h" #include "Scripting/LuaScript.h" struct ReflClass : public DAVA::ReflectionBase { DAVA_VIRTUAL_REFLECTION(ReflClass); ReflClass() : colorVal(...
#include <boost/variant.hpp> #include <string> #include <unordered_map> #include <utility> namespace gg { /* A config file parser that stores identifier-value pairs in a table. Keys must start with an alphabetic or an underscore char. They may also contain numbers. Supported types: - string, - number (doub...
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2006 Giorgio Facchinetti This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it...
// 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 "extensions/common/message_bundle.h" #include <memory> #include <string> #include <vector> #include "base/containers/hash_tables.h" #include "b...
/* * 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 (c) 2009-2016 The Schezuancoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "core_io.h" #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" #incl...
/* * Copyright (C) 2005-2013 Team XBMC * http://xbmc.org * * 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, or (at your option) * any later version. * * ...
// Fill out your copyright notice in the Description page of Project Settings. #include "LineTraceObjectStrategy.h" LineTraceObjectStrategy::LineTraceObjectStrategy(AActor* OwnerRef, UWorld* WorldRef) : LineTraceStrategy(OwnerRef, WorldRef) { } /// <summary> /// Raycast with FVector from GetPlayersWorldPos() and Ge...
/****************************************************************************** * Copyright 2017 The Apollo 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 ...
// Distributed under the MIT License. // See LICENSE.txt for details. /// \file /// Defines the abstract base class EmbeddingMap. #pragma once #include <memory> #include "DataStructures/Tensor/Tensor.hpp" #include "Parallel/CharmPupable.hpp" /// Contains all embedding maps. namespace EmbeddingMaps {} /// \ingroup...
// 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: DG.Tweening.DOTweenModuleUI #includ...
#include "GAMER.h" //------------------------------------------------------------------------------------------------------- // Function : Flu_CorrAfterAllSync // Description : Apply various corrections after all levels are synchronized // // Note : 1. Corrections include: // 1-1. Syn...
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: IM.SwitchService.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "IM.SwitchService.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded...
#include "FusionEKF.h" #include <iostream> #include "Eigen/Dense" #include "tools.h" using Eigen::MatrixXd; using Eigen::VectorXd; using std::cout; using std::endl; using std::vector; /** * Constructor. */ FusionEKF::FusionEKF() { is_initialized_ = false; previous_timestamp_ = 0; // initializing matrices ...
#include "pch.h" #include <sddl.h> #include "SecurityHelper.h" bool SecurityHelper::EnablePrivilege(PCWSTR privName, bool enable) { HANDLE hToken; if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) return false; bool result = false; TOKEN_PRIVILEGES tp; tp.PrivilegeCount = 1; tp...
// Copyright 2018 The gVisor 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 agree...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. // SEALNet #include "sealnet/stdafx.h" #include "sealnet/secretkey_wrapper.h" #include "sealnet/utilities.h" // SEAL #include "seal/secretkey.h" using namespace std; using namespace seal; using namespace sealnet; SEALNET...
// // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2013 Project Chrono // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file at the top level of the distribution // and at http://projectchrono.org/license-chrono.txt. // // Fil...
#include "MasterModel.h" int main(int argc, char *argv[]) { MasterModel master; master.start(); }
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "c_vguiscreen.h" #include <vgui/IVGui.h> #include <vgui_controls/Controls.h> #include <vgui_con...
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #inc...
/* ========================= eCAL LICENSE ================================= * * Copyright (C) 2016 - 2019 Continental 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 * * ...
#pragma once #include <cstring> #include <lug/System/Export.hpp> #include <lug/System/Debug.hpp> namespace lug { namespace System { namespace Memory { namespace Policies { class NoBoundsChecking { public: static constexpr size_t SizeFront = 0; static constexpr size_t SizeBack = 0; void guardFront(void* ...
#include <ros/ros.h> #include <hector_change_map/hector_change_map.h> #include <XmlRpcException.h> #include <hector_change_layer_msgs/MapLayerList.h> #include "tf2_geometry_msgs/tf2_geometry_msgs.h" #include <std_msgs/String.h> #include <hazard_model_lib/hazard_model_grid_map.h> #include <hazard_model_lib/hazard_model_...
// This file is part of The New Aspell // Copyright (C) 2001 by Kevin Atkinson under the GNU LGPL license // version 2.0 or 2.1. You should have received a copy of the LGPL // license along with this library if you did not you can find // it at http://www.gnu.org/. #ifndef stack_ptr #define stack_ptr #include <asser...
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "SwitchRequest.hpp" namespace app::manager { SwitchRequest::SwitchRequest(const ApplicationName &senderName, ApplicationName applicationN...
version https://git-lfs.github.com/spec/v1 oid sha256:77cf2c20bfc9d8f308291fa496f4d6f55432e3038ddee9a73cfc9dfd8fca0e29 size 45
#include "WavStream.h" #include <cstring> #include "WavFunctions.h" QAudioFormat WavStream::getParameters() const { QAudioFormat ret; ret.setSampleRate(format.samplingRate); ret.setChannelCount(format.channels); ret.setSampleSize(format.bitsPerSample); ret.setCodec("audio/pcm"); ret.setByteOr...
/* * PDFedit - free program for PDF document manipulation. * Copyright (C) 2006-2009 PDFedit team: Michal Hocko, * Jozef Misutka, * Martin Petricek * Former team members: Miroslav Jahoda * * This program is free soft...
/* mbed Microcontroller Library * Copyright (c) 2006-2015 ARM 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
/************************************************************** * * 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...
// // $Id: DataFetcherContainer.cpp 1539 2009-11-19 20:12:28Z khoff $ // // // Original author: Kate Hoff <katherine.hoff@proteowizard.org> // // Copyright 2009 Center for Applied Molecular Medicine // University of Southern California, Los Angeles, CA // // Licensed under the Apache License, Version 2.0 (the "Licens...
#include "taichi/common/util.h" #include "taichi/util/io.h" #include "taichi/lang_util.h" #include "taichi/program/program.h" #include "taichi/ir/ir.h" #include "codegen_cpu.h" #include "codegen_llvm.h" TLANG_NAMESPACE_BEGIN using namespace llvm; class CodeGenLLVMCPU : public CodeGenLLVM { public: using IRVisitor:...
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../../../include/fpdfapi/fpdf_resource.h" #include "../../../../i...
// Copyright (c) 2019 - 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 r...
/* * Copyright (C) 2004-2019 ZNC, see the NOTICE file for details. * * 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 requi...
/* Copyright (C) 2014-2014 by Serge Lamikhov-Center 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, publis...
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
#include <chrono> #include "core/cbinding/resultserializer.h" #include "core/cjson/ctag.h" #include "core/cjson/jsonbuilder.h" #include "core/cjson/msgpackbuilder.h" #include "core/cjson/msgpackdecoder.h" #include "core/itemimpl.h" #include "estl/span.h" #include "ns_api.h" #include "tools/jsontools.h" #include "tools/...
#include <map> #include <set> #include <Windows.h> #include <Common/Hook.h> #include <Common/Log.h> #include <Common/ScopedSrwLock.h> #include <Dll/Dll.h> #include <Gdi/CompatDc.h> #include <Gdi/Dc.h> #include <Gdi/PresentationWindow.h> #include <Gdi/ScrollBar.h> #include <Gdi/ScrollFunctions.h> #include <Gdi/TitleBa...
/** * Marlin 3D Printer Firmware * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General...
// @COPYRIGHT@ // Licensed under MIT license (LICENSE.txt) // clxx/cl/clobj.hpp /** // doc: clxx/cl/clobj.hpp {{{ * \file clxx/cl/clobj.hpp * \brief Declares the \ref clxx::clobj "clobj" class. */ // }}} #ifndef CLXX_CL_CLOBJ_HPP_INCLUDED #define CLXX_CL_CLOBJ_HPP_INCLUDED #include <clxx/common/types.hpp> #includ...
/* * Copyright (C) 2012 Igalia S.L. * * 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 following dis...
#pragma once #include "Generator.hpp" class DotnetClassGenerator : public Generator { public: void generate(); };
// generated from // rosidl_typesupport_introspection_cpp/resource/msg__rosidl_typesupport_introspection_cpp.hpp.em // generated code does not contain a copyright notice #ifndef TEST_MSGS__ACTION__NESTED_MESSAGE__RESULT__RESPONSE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ #define TEST_MSGS__ACTION__NESTED_MESSAGE__RES...
// Copyright (c) 2013 GitHub, Inc. All rights reserved. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/app/atom_main_delegate.h" #include <string> #include "atom/app/atom_content_client.h" #include "atom/browser/atom_browser_client.h" #include "atom...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__char_connect_socket_fopen_66b.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-66b.tmpl.cpp */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: connect_socket Read data using a c...
#include <iostream> using namespace std; int main() { int a[]={12,4,78,131,67,1}; int n=6; int minidx,temp; for (int i=0;i<n-1;i++) { minidx=i; for(int j=i+1;j<n;j++) { if(a[j]<a[minidx]) minidx=j; } temp=a[minidx]; a[minid...
/* Copyright 2009-2021 Nicolas Colombe 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, distribute...
//------------------------------------------------------------------------------ // Copyright (C) 2018 - present, Seokhwan Kim (kim at seokhwan.net) // This file is part of "the SN_STL" // For conditions of distribution and use, see copyright notice in // <sn_stl/sn_stl.h> //-------------------------------------------...
/* * Copyright 2009-2017 Alibaba Cloud 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...
/* Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it would...
#include <boost/scoped_array.hpp> #include <iostream> int main() { boost::scoped_array<int> p{new int[2]}; *p.get() = 1; p[1] = 2; std::cout<<*p.get()<<std::endl; std::cout<<*(p.get()+1)<<std::endl; p.reset(new int[3]); std::cout<<*p.get()<<std::endl; std::cout<<*(p.get()+1)<<std::endl; }
//////////////////////////////////////////////////////////////////////////// // ExcelHelper.cpp -- utility functions for XLL #include <Windows.h> #include <strsafe.h> #include "XLCALL.H" #include "ExcelHelper.h" #include "XLString.h" using namespace xll; static LPCWSTR s_specialEntryPoints[] = { L"xlAddInManagerInf...
// Copyright John Maddock 2006. // 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) #include <boost/math/bindings/rr.hpp> #include <boost/math/special_functions/log1p.hpp> #includ...
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
//********************************** // OpenGL Framebuffer sRGB decode // 25/01/2012 - 25/01/2012 //********************************** // Christophe Riccio // ogl-samples@g-truc.net //********************************** // G-Truc Creation // www.g-truc.net //********************************** #include <glf/glf.hpp> na...
/** * 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...
/** * @file bzip_compressor.cc * * @section LICENSE * * The MIT License * * @copyright Copyright (c) 2017-2020 TileDB, Inc. * * 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 with...
#include "rfu.h" #include <Windows.h> #pragma comment(lib, "WinInet.lib") #include <WinInet.h> #include <string> #include <regex> bool HttpRequest(const char* url, std::string& response) { if (auto* const internet = InternetOpenA("LewisTehMinerz/RFU", INTERNET_OPEN_TYPE_PRECONFIG, nullptr, nullptr, NULL)) { i...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2018 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 <rpc/blockchain.h> #include <amount.h> #include <base58.h> #include <chain.h...
// _ _____ __________ // | | / / _ | / __/_ __/ Visibility // | |/ / __ |_\ \ / / Across // |___/_/ |_/___/ /_/ Space and Time // // SPDX-FileCopyrightText: (c) 2021 The VAST Contributors // SPDX-License-Identifier: BSD-3-Clause #include <vast/plugin.hpp> #include <vast/transform_step...
/** @file */ #ifndef __STL_CONCEPT_NULLABLE_POINTER_HPP__ #define __STL_CONCEPT_NULLABLE_POINTER_HPP__ #include "concept/same.hpp" #include "concept/convertible_to.hpp" #include "concept/copy_assignable.hpp" #include "concept/copy_constructible.hpp" #include "concept/default_constructible.hpp" #include "concept/destru...
// Copyright 2020 Tier IV, 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 i...
#include "Algo/MinimumSpanningTree.h" #include "Math/Edge2D.h" // From : https://www.geeksforgeeks.org/kruskals-minimum-spanning-tree-algorithm-greedy-algo-2/ FMSTWeightedEdge2D::FMSTWeightedEdge2D( const FEdge2D & edge, const int weight ) : Edge( edge ), Weight( weight ) {} struct FSubset { explicit FS...
/* * Copyright (c) 2006-2011 Erin Catto http://www.box2d.org * * 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. * Permission is granted to anyone to use this software for any purpose, * i...
/* * 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...