text
stringlengths
7
961k
/* My Image Manipulation Tools for Digital Humanities Argument Parser Utility argparse.cpp Copyright (C) 2019 Tsukasa OI. ------------------------------------------------------------------------ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby gr...
/**************************************************************************************************************************************************** * Copyright (c) 2014 Freescale Semiconductor, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are ...
// Copyright 2018 The Chromium OS 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 "patchpanel/subnet.h" #include <arpa/inet.h> #include <string> #include <utility> #include <base/bind.h> #include <base/check_op.h> #includ...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2018 The Syscoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <addrdb.h> #include <addrman.h> #include <chainparams.h> #include <clie...
#ifndef UTILITY_ENVIRONMENT_HPP #define UTILITY_ENVIRONMENT_HPP #include <string> #include <SDL.h> namespace utility { /** * @brief All the environment variables we might need. */ class Environment { public: /** * @brief Initialize all the environment variables. */ static void initialize(); ...
#pragma once #include "sdkconfig.h" #include "human_face_detect_msr01.hpp" #include "human_face_detect_mnp01.hpp" #include "face_recognition_tool.hpp" #if CONFIG_MFN_V1 #if CONFIG_S8 #include "face_recognition_112_v1_s8.hpp" #elif CONFIG_S16 #include "face_recognition_112_v1_s16.hpp" #endif #endif #include "__base__...
/* * 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...
#ifdef WITH_AD3 //#define GraphicalModelDecomposition LOC_Inference_GraphicalModelDecomposition #include <boost/python.hpp> #include <string> #include "inf_def_visitor.hxx" #include <opengm/inference/loc.hxx> # include <param/loc_param.hxx> using namespace boost::python; template<class GM,class ACC> void export_lo...
// QueryManager.cpp #include <new> #include <fsproto.h> #include "AutoLocker.h" #include "Debug.h" #include "HashMap.h" #include "Locker.h" #include "QueryManager.h" #include "Volume.h" #include "VolumeManager.h" typedef DLList<QueryIterator, QueryIterator::GetVolumeLink> IteratorList; // IteratorMap struct QueryM...
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "behavior/test_plugin.hpp" using namespace BehaviorTestsDefinitions; namespace { const std::vector<InferenceEngine::Precision> netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine...
#ifndef Rice__Address_Registration_Guard__hpp_ #define Rice__Address_Registration_Guard__hpp_ #include "Address_Registration_Guard_defn.hpp" #include "Address_Registration_Guard.ipp" #endif // Rice__Address_Registration_Guard__hpp_
// Project specific #include <Doremi/Core/Include/SkyBoxHandler.hpp> #include <DoremiEngine/Graphic/Include/GraphicModule.hpp> #include <EntityComponent/EntityHandler.hpp> #include <DoremiEngine/Graphic/Include/Interface/Manager/SubModuleManager.hpp> #include <DoremiEngine/Graphic/Include/Interface/Manager/ShaderManage...
// Copyright (c) 2010 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 "pdf/pdfium/pdfium_page.h" #include <math.h> #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/s...
#include "BaseSearch.h" #include "QtExtensions.h" #include <QThreadPool> #include "QRunnableFunctor.h" OsmAnd::BaseSearch::BaseSearch(const std::shared_ptr<const IObfsCollection>& obfsCollection_) : obfsCollection(obfsCollection_) { } OsmAnd::BaseSearch::~BaseSearch() { } void OsmAnd::BaseSearch::startSearch( ...
/********************************************************************* Interlace.cpp Definition file for interlace module. *********************************************************************/ #include "stdafx.h" #include "Image.h" #include "Interlac.h" /*------------------------------------------------------...
/*****************************************************************************/ /* XDMF */ /* eXtensible Data Model and Format */ /* */ ...
//===-- OpenMP.cpp -- Open MP directive lowering --------------------------===// // // 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 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 /// ...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__new_delete_array_long_81_bad.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__new_delete_array.label.xml Template File: sources-sinks-81_bad.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory Ma...
// Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "activemasternode.h" #include "governance-classes.h" #include "masternode-payments.h" #include "masternode-sync.h" ...
#include <stdlib.h> #include "gtest/gtest.h" #include "braincloud/BrainCloudClient.h" #include "braincloud/BrainCloudEntity.h" #include "TestResult.h" #include "json/json.h" #include "braincloud/FriendPlatform.h" #include "braincloud/AuthenticationType.h" #include "TestBCFriend.h" #include <vector> #include <string> #i...
#include <contract/contract.hpp> #include "contract_error.hpp" #include <boost/test/unit_test.hpp> void fun_contract_test_precondition(bool par) { contract(fun) { precondition(par); }; } void fun_contract_test_precondition(bool par, char const * msg) { contract(fun) { precondition(par, msg); }; } void fun_...
/* Copyright (c) 2007 Cyrus Daboo. 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 re...
// Copyright (c) 2015-2016, Kai Wolf // // 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...
/////////////////////////////////////////////////////////////////////////////////////////////////// // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2008-08-31 // Updated : 20...
#ifndef VOXELMEDIUM_HPP_ #define VOXELMEDIUM_HPP_ #include "Medium.hpp" #include "grids/Grid.hpp" namespace Tungsten { class VoxelMedium : public Medium { Vec3f _sigmaA, _sigmaS; Vec3f _sigmaT; bool _absorptionOnly; std::shared_ptr<Grid> _grid; Mat4f _worldToGrid; Box3f _gridBounds; publi...
#include <iostream> #include <queue> #include <tree.hpp> using namespace std; class Solution { public: int lenLongestFibSubseq(vector<int>& A) { int res = 0; for (int i = 0; i < A.size(); i++) { for (int j = i + 1; j < A.size(); j++) { vector<int> fibs = { A[i], A[j] }; while (find(A.begin(), A....
#include <mjolnir/input/read_external_potential.hpp> #ifndef MJOLNIR_SEPARATE_BUILD #error "MJOLNIR_SEPARATE_BUILD flag is required" #endif namespace mjolnir { template ImplicitMembranePotential<double> read_implicit_membrane_potential(const toml::value& external); template ImplicitMembranePotential<float > read_impl...
/* Author: Gudakov Ramil Sergeevich a.k.a. Gauss Гудаков Рамиль Сергеевич Contacts: [ramil2085@mail.ru, ramil2085@gmail.com] See for more information LICENSE.md. */ #include "gtest/gtest.h" #include "FileParser.h" TEST(Parser, PassMustBeFails) { TFileParser fileParser; auto res = fileParser.Parse("this file ...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "pch.h" #include "Public/AppInstallerRepositorySource.h" #include "CompositeSource.h" #include "SourceFactory.h" #include "Microsoft/PredefinedInstalledSourceFactory.h" #include "Microsoft/PreIndexedPackageSourceFactory.h" namespace A...
/* Write code to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x Approach: Given the partition number and the head of the linked list, we split the list into 2 sublists and then at the end we merge the sublists and return the new he...
/** * EasyButtonTouch.cpp * @author Evert Arias, Gutierrez PS * @version 1.1.0 * @license MIT */ #if defined(ESP32) #include "EasyButtonTouch.h" void EasyButtonTouch::begin() { _current_state = _readPin(); _time = millis(); _last_state = _current_state; _changed = false; _last_change = _time; } bool EasyBu...
// Factory method for classes having constructors // that take an arbitary number of parameters #include <iostream> #include <memory> class Factory { public: template <typename T, typename... Params> static auto create(Params... params) { return std::make_unique<T>(params...); } }; struct Foo {...
// Copyright (c) 2020-2021 AVME Developers // Distributed under the MIT/X11 software license, see the accompanying // file LICENSE or http://www.opensource.org/licenses/mit-license.php. #include "API.h" std::string API::httpGetRequest(std::string reqBody, bool isWebSocket) { std::string result = ""; using tcp = bo...
#include <stdio.h> #include <string> double compute(double *x, int n) { double res = 0.0; std::string s(COMPILE_STRING); for (int i=0; i < n; ++i) { res = res + x[i]; // NaN res = (res-res) / (res-res); } printf("string: %s\n", s.c_str()); return res; }
// // 35 Search Insert Position.cpp // Leetcode // // Created by Quinn on 2020/8/26. // Copyright © 2020 Quinn. All rights reserved. // #include <vector> using namespace std; class Solution { public: int searchInsert(vector<int>& nums, int target) { int left = 0; int right = nums.size(); ...
#include "stdafx.h" #include "xrmu_model.h" poolSS<xrMU_Model::_vertex,8*1024> mu_vertices; poolSS<xrMU_Model::_face,8*1024> mu_faces; // vertex utilities void xrMU_Model::_vertex::prep_add (_face* F) { for (v_faces_it I=adjacent.begin(); I!=adjacent.end(); I++) if (F==(*I)) return; adjacent.push_back(F); } vo...
// Copyright (c) 2007-2015 Hartmut Kaiser // Copyright (c) 2011 Matt Anderson // Copyright (c) 2011 Bryce Lelbach // // 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) #include <hpx/hpx.hpp> #include <hpx/hpx_ini...
/* _______________________________________________________________________ DriverManager.cpp - DriverManager driver library _______________________________________________________________________ */ #include "Arduino.h" #include "DriverManager.h" DriverManager::DriverManager() { Port = 0; Class = "Generic"; ...
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <memory> #include "default_opset.hpp" #include "ngraph/builder/reshape.hpp" #include "op/compress.hpp" namespace ngraph { namespace onnx_import { namespace op { namespace set_1 ...
#include "walletmodel.h" #include "guiconstants.h" #include "optionsmodel.h" #include "addresstablemodel.h" #include "mintingtablemodel.h" #include "transactiontablemodel.h" #include "ui_interface.h" #include "wallet.h" #include "walletdb.h" // for BackupWallet #include "base58.h" #include <QSet> #include <QTimer> W...
/* * 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 <map> #include <string> #include <locale> #include <random> #include <scene/renderer3d/lighting/ambientocclusion/AmbientOcclusionManager.h> #include <api/render/shader/builder/ShaderBuilder.h> #include <api/render/target/NullRenderTarget.h> #include <api/render/GenericRendererBuilder.h> #include <texture/filt...
#include "gl_core_4_4.h" #include "Font.h" #include <stdio.h> #define STB_TRUETYPE_IMPLEMENTATION #include <stb_truetype.h> namespace aie { Font::Font(const char* trueTypeFontFile, unsigned short fontHeight) : m_glyphData(nullptr), m_glHandle(0), m_pixelBufferHandle(0), m_textureWidth(0), m_textureHeight(0) { ...
// builds all boost.asio SSL source as a separate compilation unit #include <boost/version.hpp> #ifdef __ANDROID__ #define OPENSSL_NO_ENGINE 1 #endif #if BOOST_VERSION >= 104610 #include <boost/asio/ssl/impl/src.hpp> #endif
#include <arch/variable.hpp> struct TransferDescriptor; struct QueueHead; enum class Packet : uint8_t { in = 0x69, out = 0xE1, setup = 0x2D }; namespace td_status { static constexpr arch::field<uint32_t, uint16_t> actualLength(0, 11); static constexpr arch::field<uint32_t, uint8_t> errorBits(17, 6); static con...
#include <iostream> using namespace std; int main() { int a, b, c; // 不妨用abc来表示甲乙丙三人说话真假状态 值为1表示说真话,为0表示说假话 for (a = 0; a <= 1; a++) { b = 1 - a; c = a; if (a + b + c == 2) { if (a == 0) { cout << "甲说谎(发帖)。\n"; if (b == 0) { cout << "乙说谎(发帖)。\n"; if (c == 0) { cout << "丙说谎(发帖)。\n";...
//============================================================================================================= /** * @file plugininputdata.cpp * @author Christoph Dinh <chdinh@nmr.mgh.harvard.edu>; * Lorenz Esch <lesch@mgh.harvard.edu> * @since 0.1.0 * @date August, 2013 * * @section LIC...
// Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "base58.h" #include "init.h" #include "validation.h" #include "net.h" #include "netbase.h" #include "rpc/server.h" ...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 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 <util/validation.h> #include <consensus/validation.h> #include <tinyfor...
// This file was created automatically, do not modify the contents of this file. #include "UnrealDotNetRuntime.h" #include "DotnetTypeName.h" #include "Generate/Manage/ManagePawnAction_Repeat.h" PRAGMA_DISABLE_DEPRECATION_WARNINGS // Source file C:\Program Files\Epic Games\UE_4.22\Engine\Source\Runtime\AIModule\Clas...
/* * AbstractTexQuartzRenderer.cpp * * Copyright (C) 2018 by VISUS (Universitaet Stuttgart) * Alle Rechte vorbehalten. */ #include "AbstractTexQuartzRenderer.h" #include "stdafx.h" #include "vislib_gl/graphics/gl/IncludeAllGL.h" #include <vector> namespace megamol { namespace demos_gl { /* * AbstractTexQuartzRe...
/* * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2020-2021 Couchbase, 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 * * ...
// Copyright 2015 Stellar Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "util/asio.h" #include "LedgerTestUtils.h" #include "ledger/AccountFrame.h" #include "...
#include <Framework/GameObject.hpp> #include <Framework/PhysicsWorld.hpp> using namespace std; using namespace Framework; robin_hood::unordered_map<unsigned int, GameObject*> GameObject::m_IDs; robin_hood::unordered_map<string, vector<GameObject*>> GameObject::m_GlobalTags; unsigned int GameObject::GetNextID() { un...
//===--- TypeCheckStmt.cpp - Type Checking for Statements -----------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define dd double #define ld long double #define sl(n) scanf("%lld", &n) #define si(n) scanf("%d", &n) #define sd(n) scanf("%lf", &n) #define pll pair <ll, ll> #define pii pair <int, int> #define mp make_pair #define pb p...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2017. // Modifications copyright (c) 2017, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, m...
/* Copyright (C) 2020 Red Hat, Inc. This file is part of microdnf: https://github.com/rpm-software-management/libdnf/ Microdnf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or ...
/* * Copyright (c) 2017 ARM Limited. * * SPDX-License-Identifier: MIT * * 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 ...
#include"Chromosome.h" using namespace std; typedef Chromosome C; C::Chromosome( const string& name ) : mName( name ) {};
/** * @file main.cpp * @author YAN Lin (sheeplin@bupt.edu.cn) * @brief 程序入口 * @date 2021-12-24 * * @copyright Copyright (c) 2021 * */ #include <stdio.h> #include "parser.h" int main(int argc, char** argv) { if (argc == 3) { Parser parser(argv[1]); Lexer lexer(argv[2]); parser.analys...
/* 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 (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD+Patents license found in the * LICENSE file in the root directory of this source tree. */ // -*- c++ -*- #include "IndexFlat.h" #include <cstring> #include <limits> #include "utils.h" #include...
///////////////////////////////////////////////////////////////////////////// // Name: minimal.cpp // Purpose: Minimal wxWidgets sample // Author: Julian Smart // Modified by: // Created: 04/01/98 // Copyright: (c) Julian Smart // Licence: wxWindows licence ////////////////////////////////////...
#pragma once #include <atomic> #include <cstdint> #include <libcore/module.hpp> #include <libcore/peripherals/gpio.hpp> #include <libcore/utility/enum.hpp> namespace sjsu { /// An abstract interface for controlling a hardware counter, internal or /// external. /// /// @ingroup l1_peripheral class HardwareCounter : pu...
/* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @generated from magmablas/zher2k_vbatched.cpp, normal z -> c, Sun Nov 20 20:20:32 2016 @author Jakub Kurzak @author Stan Tomov ...
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long n, r; cin >> n >> r; long long arr[n]; long long ans = 0; map<long long, long long> map1, map2; for (long long i = 0; i < n; i++) cin >> arr[...
// Copyright (c) 2011-2013 The Bitcoin Core and Deuscoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "peertablemodel.h" #include "clientmodel.h" #include "guiconstants.h" #include "guiutil.h" #...
// written by bastiaan konings schuiling 2008 - 2015 // this work is public domain. the code is undocumented, scruffy, untested, and should generally not be used for anything important. // i do not offer support, so don't ask. to be used for inspiration :) #include "league_inbox.hpp" #include "../pagefactory.hpp" Le...
/* * Copyright 2019 Xilinx 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 ...
/* * MIT License * * Copyright (c) 2017 David Allen * * 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, mo...
// 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 "components/autofill/core/browser/autofill_profile_sync_util.h" #include "base/strings/utf_string_conversions.h" #include "base/test/scoped_feat...
// 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 <boost/version.hpp> #if defined(WIN32) && BOOST_VERSION == 104900 #define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTT...
/* * Copyright (C) 2010 Advanced Micro Devices, Inc. All Rights Reserved. */ /* * Copyright 2005, 2006 PathScale, Inc. All Rights Reserved. */ /* 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 ...
// 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 "net/quic/chromium/quic_chromium_client_stream.h" #include <utility> #include "base/bind_helpers.h" #include "base/callback_helpers.h" #inc...
////////////////////////////////////////////////////////////////////////////// /// 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 /// ...
/****************************************************************************** * Copyright 2020 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 ...
/* * 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...
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace::std; class Solution { public: double myPow(double x, int n) { double res = 1.0; for (int a = abs(n); a; a = a >> 1,x *= x) if (a & 1) res *= x; return n < 0 ? 1 / res : res; } }; int main() { Solution sol; cout << ...
/* * 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 "PostLowering.h" class NoopPostLowering : public PostLowering { public: void gather_components(std::vector<DexString*>...
/*************************************************************************** copyright : (C) 2002 - 2008 by Scott Wheeler email : wheeler@kde.org ***************************************************************************/ /************************************************************...
/* * 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 ...
/* * If not stated otherwise in this file or this component's LICENSE file the * following copyright and licenses apply: * * Copyright 2020 RDK Management * * 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 cop...
// Copyright (c) 2011 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/common/switch_utils.h" #include "base/basictypes.h" #include "chrome/common/chrome_switches.h" namespace switches { // Switches en...
// 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 #ifndef OPENCV_HAL_INTRIN_AVX_HPP #define OPENCV_HAL_INTRIN_AVX_HPP #define CV_SIMD256 1 #define CV_SIMD256_64F 1 #define CV_...
/**************************************************************************** * * Copyright (c) 2015 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...
////////////////////////////////////////////////////////////////////////// // // pgScript - PostgreSQL Tools // // Copyright (C) 2002 - 2016, The pgAdmin Development Team // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////////////////// #include "p...
#include "mex.h" #include "mexOliUtil.h" #include "math.h" #include "affineTransferDistanceMEX.h" #include "stdio.h" // [ dist flip ] = affineTransferDistanceMEX(matchlist, affMatrix1, affMatrix2, bSingle, bReflective) // This generates a matrix with the 'affine symmetric transfer error' // between all the possib...
#include "LoaderPool.hpp" #include "aderite/io/ILoadable.hpp" #include "aderite/io/Loader.hpp" #include "aderite/utility/Log.hpp" #include "aderite/utility/LogExtensions.hpp" #include "aderite/utility/Macros.hpp" namespace aderite { namespace io { LoaderPool::LoaderPool() : LoaderPool(std::thread::hardware_concurren...
// Copyright (c) 2012-2013 The Bitcoin Core developers // Copyright (c) 2017-2019 The KCOIN developers // Distributed under the MIT/X11 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 ...
/*****************Please don't remove this part from the code*****************************/ // Author: Xuefeng Ding <xuefeng.ding.physics@gmail.com> // Insitute: Physics Department, Princeton Unviersity, Princeton, NJ 08542, USA // Date: 2020 June 25th. // Version: v1.0 // Description: Phoenix, a binned likleihood fitt...
// -*-Mode: C++;-*- // * BeginRiceCopyright ***************************************************** // // $HeadURL$ // $Id$ // // -------------------------------------------------------------------------- // Part of HPCToolkit (hpctoolkit.org) // // Information about sources of support for research and development of //...
/* * Copyright (C) 2013 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,...
#include "editor_layer.h" #include <core/application.h> #include <imgui.h> #include <gui/extensions/extensions.h> #include <gui/styles/styles.h> namespace ph { EditorLayer::EditorLayer(std::shared_ptr<ph::Scene> scene) : Layer("EditorLayer") { m_hierarchy_panel = std::make_shared<ph::HierarchyPanel>(scene); ...
/* ======================================================== * * * Members 1: (Me) * * * ========================================================*/ /* Purpose: Determines the voltage output of an amplifer depending on the values set for input voltage, resistors, and type of amplifier sel...
/* Another demonstration of the using keyword */ // Preprocessor directive #include <iostream> // Start of your program int main() { using std::cout; using std::endl; /* Write to the screen using std::cout */ cout << "Hello World" << endl; // Return a value to the OS return 0; }
#include "isr.h" #include <array> #include <atomic> #include <functional> #include <memory> #include <mutex> #include <utility> #include <pthread.h> #include <wiringPi.h> namespace { constexpr int MAX_PIN = 64; std::array<std::shared_ptr<xrg_robot::interrupt_handler>, MAX_PIN> handlers; std::mutex thread_creation_mu...
/*============================================================================ 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. =================...