text
stringlengths
7
961k
// compreg.cpp : CCompReg 的实现 #include "stdafx.h" #include "compreg.h" // CCompReg
// // #include "DataFormats/PatCandidates/interface/Electron.h" #include "FWCore/Utilities/interface/Exception.h" #include "DataFormats/Common/interface/RefToPtr.h" #include <limits> using namespace pat; /// default constructor Electron::Electron() : Lepton<reco::GsfElectron>(), embeddedGsfElectronCore_(fal...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. #include "common.h" #include "fptrstubs.h" // ------------------------------------------------------- // FuncPtr stubs // ------------------------------------------------------- ...
/******************************************************************************* * Copyright 2020-2022 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
/* * Copyright (c) 2020, The Regents of the University of California (Regents). * 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 a...
// Copyright (c) 2018 Intel Corporation // Copyright (c) 2020 Francisco Martin Rico // // 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 //...
#include "capture_device.hpp" #include <pcap/pcap.h> #include <string> /** * Opens a pcap device. * * @return Error/return code. */ enum CaptureDevice::ErrorCode CaptureDevice::open_device(const std::string device_name, bool promiscuous_mode) { int rc = 0; char errbuf[PCAP_ERRBUF_SIZE]; errbuf[0] = '...
#include <iostream> int main(int argc, char *argv[]){ std::cout << "Hello World!\n" return EXIT_SCUCCESS; }
// Mono Native Fixture // Assembly: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // Namespace: System // Name: ArgIterator // C++ Typed Name: mscorlib::System::ArgIterator #include <gtest/gtest.h> #include <mscorlib/System/mscorlib_System_ArgIterator.h> #include <mscorlib/System/mscorli...
#include <bits/stdc++.h> #define endl '\n' #define eat cin #define moo cout #define int long long using namespace std; int R, G, B; int32_t main(){ eat.tie(0) -> sync_with_stdio(0); eat >> R >> G >> B; if(R < G) swap(R, G); if(B > R) swap(B, R); if(B > G) swap(B, G); int ans = B; if(R - 2...
// File: FilePath.cpp // Copyright: Copyright(C) 2013-2017 Wuhan KOTEI Informatics Co., Ltd. All rights reserved. // Website: http://www.nuiengine.com // Description: This code is part of NPlan Project (Powered by NUI Engine) // Comments: // Rev: 1 // Created: 2018/8/27 // Last edit: ...
/* * Copyright (c) 2020, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
// 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 "chrome/browser/android/voice_search_tab_helper.h" #include "components/google/core/browser/google_util.h" #include "content/public/browser/rend...
/* * The MIT License * * Copyright 2019 Palmtree Software. * * 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, co...
#include <Eigen/Dense> int main() { Eigen::MatrixXd d; }
/* MIT License Copyright(c) 2020 Futurewei Cloud 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, p...
#include <atcoder/all> #include <cstdio> using namespace std; using namespace atcoder; int main() { int n, q; scanf("%d %d", &n, &q); dsu uf(n); for (int i = 0; i < q; i++) { int t, u, v; scanf("%d %d %d", &t, &u, &v); if (t == 0) { // merge uf.merge(u,...
// UNSUPPORTED: hip // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %HOST_RUN_PLACEHOLDER %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out #include "image_read.h" int main() { s::default_selector selector; s::queue myQueue(selector); bool passed = true; ...
// Copyright (c) 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 "wallet.h" #include "walletdb.h" #include "bitcoinrpc.h" #include "init.h" #in...
// AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from dynamic.djinni #ifndef DJINNI_GENERATED_DYNAMICOBJECT_HPP_JNI_ #define DJINNI_GENERATED_DYNAMICOBJECT_HPP_JNI_ #include "../../api/DynamicObject.hpp" #include "djinni_support.hpp" namespace djinni_generated { class DynamicObject final : ::...
#ifndef _OP_PACKET_PROTOCOL_TRANSMOGRIFY_ETHERNET_HPP_ #define _OP_PACKET_PROTOCOL_TRANSMOGRIFY_ETHERNET_HPP_ /** * swagger <-> libpacket transmogrify header for Ethernet * * This file is automatically generated by the transmogrify code generator. * Do not edit this file manually. **/ #include "packet/protocol/e...
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/ic/ic.h" #include "src/accessors.h" #include "src/api-arguments-inl.h" #include "src/api.h" #include "src/arguments.h" #include "src/base...
//===-------- llvm/unittest/CodeGen/ScalableVectorMVTsTest.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 // //===---------------------------...
#include <bulls_and_cows_lib/game_options.hpp> #include <catch2/catch.hpp> #include <sstream> // Examples of unit tests for the functions declared in game_options.hpp // These unit tests are disabled because you first need to define the tested functions in game_options.cpp TEST_CASE("TEST bulls_and_cows::display_ga...
#include "boost/date_time/local_time/local_time.hpp" #include <iostream> /* This example shows a program that calculates the arrival time of a plane * that flys from Phoenix to New York. During the flight New York shifts * into daylight savings time (Phoenix doesn't because Arizona doesn't use * DST). * * */ i...
#include <cstdlib> #include <iostream> #include "document.hpp" #include "constants.hpp" #include "error.hpp" #ifndef SASS_PRELEXER #include "prelexer.hpp" #endif namespace Sass { using namespace std; using namespace Constants; void Document::parse_scss() { read_bom(); lex< optional_spaces >(); Se...
/* * Copyright (c) 2016 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...
/* --------------Some Information----------------- Down = kiDown Right = kiRight Up = kiUp Left = 75 ESC = 27 s=115 S=83 Horizontal Distance = 76 Characters Vertical Distance = 17 Lines Coordinates of Score (14,21) Single Player Coordinates of Time (73,21) Single Pl...
// wrapCaliper.cpp // This file is generated by Shroud 0.12.2. Do not edit. #include "wrapCaliper.h" #include "caliper/cali.h" #include "caliper/ConfigManager.h" #include "BufferedRegionProfile.h" #include "typesCaliper.h" #include <cstdlib> // splicer begin CXX_definitions // splicer end CXX_definitions extern "C" ...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2017 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <base58.h> #include <chai...
// 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 <lib/async-loop/cpp/loop.h> #include <lib/async-loop/default.h> #include "src/lib/fxl/command_line.h" #include "src/lib/syslog/cpp/logger.h" #inc...
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once namespace domain { namespace FunctionsOfTime { void register_derived_with_charm(); } // namespace FunctionsOfTime } // namespace domain
#include "delete.hpp" #include <memory> #include <string> #include <utility> #include "concurrency/transaction_context.hpp" #include "operators/validate.hpp" #include "statistics/table_statistics.hpp" #include "storage/reference_segment.hpp" #include "utils/assert.hpp" namespace opossum { Delete::Delete(const std::...
#include "maolan/plugin/io.hpp" namespace midi = maolan::midi; namespace audio = maolan::audio; using namespace maolan::plugin; IO::IO(const std::string &name, const bool &reg) : audio::IO(name, reg), midi::IO(name, reg) { } maolan::audio::Buffer IO::audio(const std::size_t &channel) { if (channel < audio::...
// Copyright (c) 2014-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // Copyright (c) 2014-2017 The Xeon Core developers // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "chainparams.h" #include "validation.h" #include "net.h" #inclu...
// ZlibTest.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> int main() { std::cout << "Hello World!\n"; } // 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单 // 调试程序: F5 或调试 >“开始调试”菜单 // 入门使用技巧: // 1. 使用解决方案资源管理器窗口添加/管理文件 // 2. 使用团队资源管理器窗口连接到源代码管理 // 3. 使用输出窗口查看生成输出和其他消息 // 4. 使用错误列表窗口查看错误 // 5. 转到“项目...
// Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup...
#include "sound.h" #include "soundsource.h" #include <QJsonObject> #include "Systems/soundsystem.h" #include "Managers/soundmanager.h" Sound::Sound(std::shared_ptr<SoundSource> Sound, bool playOnSpawn) : audio_(Sound) { if(playOnSpawn) SoundSystem::playSound(this); } Sound::Sound(QJsonObject Json) { f...
/// @ref gtx_fast_square_root /// @file glm/gtx/fast_square_root.hpp /// /// @see core (dependence) /// /// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root /// @ingroup gtx /// /// @brief Fast but less accurate implementations of square root based functions. /// - Sqrt optimisation based on Newton's method, ///...
//================================================================================== // BSD 2-Clause License // // Copyright (c) 2014-2022, NJIT, Duality Technologies Inc. and other contributors // // All rights reserved. // // Author TPOC: contact@openfhe.org // // Redistribution and use in source and binary forms, wi...
#include <UIDGeneratorDetail.hpp> #include <common/ATFCore.hpp> START_ATF_NAMESPACE namespace Detail { Info::UIDGeneratorgetuid2_ptr UIDGeneratorgetuid2_next(nullptr); Info::UIDGeneratorgetuid2_clbk UIDGeneratorgetuid2_user(nullptr); Info::UIDGeneratorgetuid4_ptr UIDGeneratorg...
// Copyright (c) 2020, Nohzmi. All rights reserved. namespace reflectpp { template<typename T, typename> REFLECTPP_INLINE instance::instance(T& object) REFLECTPP_NOEXCEPT : m_is_owner{ true }, m_variant{ new variant(object) } { } template<typename T> REFLECTPP_INLINE T* instance::try_convert() const REFLECT...
#include <bits/stdc++.h> #define max_size (int)10e6 #define Pi 3.14159 using namespace std; typedef unsigned long long ull; typedef long long ll; typedef unsigned int ui; int isPangram(string s) { vector<bool> alphabets(28, 0); for (int i = 0; i < s.length(); ++i) alphabets[tolower(s[i]) - 'a'] = 1;...
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include...
// Copyright (c) 2011-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 "timedata.h" #include "test/test_scicoin.h" #include <boost/test/unit_test.hpp> BOOST_FIXTURE_TEST_SUITE(timedat...
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2012, John Haddon. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributio...
#include <util/system/defaults.h> #if defined(_unix_) #include <netdb.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <netinet/in.h> #include <netinet/tcp.h> #endif #if defined(_freebsd_) #include <sys/module.h> #define ACCEPT_FILTER_MOD #include <...
/* Copyright (C) 2016 hidenorly 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 writing, sof...
#include "modengine/extension.h" #include "modengine/mod_engine.h" namespace modengine { void ModEngineExtension::register_patch( GameType type, const std::string_view& signature, std::function<void(uintptr_t)> replace_callback) { if (m_mod_engine->game_info().is_supported(type)) { m_mod_engin...
#pragma once #include <mirrage/ecs/component.hpp> #include <mirrage/ecs/entity_handle.hpp> #include <mirrage/utils/sf2_glm.hpp> #include <glm/gtx/quaternion.hpp> #include <glm/vec3.hpp> namespace mirrage::ecs::components { struct Transform_comp : public ecs::Component<Transform_comp, ...
/* * 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...
/*============================================================================= Copyright (c) 2001-2007 Joel de Guzman 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) =========================================...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. //************************ Includes ***************************** #include <k4a/k4a.h> #include <k4ainternal/common.h> #include <utcommon.h> #include <gtest/gtest.h> #include <azure_c_shared_utility/tickcounter.h> #include ...
#pragma once #ifdef __cplusplus #include "./cpp21.hpp" #endif int main() { return 0; };
/* * Copyright (C) 2019 Open Source Robotics Foundation * * 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 appl...
#include <bits/stdc++.h> using namespace std; //-----------------Data-Structure------------------------// class Vector{ private: double* elem; int size; double* last public: Vector(): elem {double[]}, size {0}, last {elem} Vector(int sz) :elem {new double[sz]}, size {sz} { for (int i = 0; i < sz; ++i) {...
#include "XMLHttpRequest.h" #include <Babylon/JsRuntime.h> #include <Babylon/Polyfills/XMLHttpRequest.h> namespace Babylon::Polyfills::Internal { namespace { namespace ResponseType { constexpr const char* Text = "text"; constexpr const char* ArrayBuffer = "arraybuffer"; ...
#include <iostream> #include <string> using namespace std; string compress(string &a){ string res; if(a.size()==0){ return res; } char pre=a[0]; int count=1; for(int i=1; i<a.size(); i++){ if(a[i]==pre){ count++; }else{ res+=(pre+to_string(count)); count=1; pre=a[i]; } } res+=(pre+to_str...
// Copyright 2018 crankyoldgit // The specifics of reverse engineering the protocols details: // * HSU07-HEA03 by kuzin2006. // * YR-W02/HSU-09HMC203 by non7top. #include "ir_Haier.h" #ifndef UNIT_TEST #include <Arduino.h> #else #include <string> #endif #include "IRremoteESP8266.h" #include "IRutils.h" // ...
#include <iostream> #include <cstring> using namespace std; int main() { string s1 = "C++语言"; string s2 = "程序设计"; string s3 = s1 + s2; string s4; s4 = s1.append(s2); if(s3 == s4)cout << "结果相同" << endl; else cout << "结果不同" << endl; int size = s1.size(); int length = s1.length(); cout << "size=" << size << ",le...
#include "pch.h" #include "MockPowerRenameRegExEvents.h" IFACEMETHODIMP_(ULONG) CMockPowerRenameRegExEvents::AddRef() { return InterlockedIncrement(&m_refCount); } IFACEMETHODIMP_(ULONG) CMockPowerRenameRegExEvents::Release() { long refCount = InterlockedDecrement(&m_refCount); if (refCount == 0) { ...
#ifndef HAMMING_H #define HAMMING_H #include <core/Sequence.h> namespace bio { /** * Compute Hamming distance between given sequences. Note that sequences must * have same length or unexpected behavior will occur. */ size_t hammingDistance(const Sequence& s1, const Sequence& s2); } #endif
/* * Copyright (C) 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. * Copyright (C) 2007 Alp Toker <alp@atoker.com> * * 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...
// Copyright (c) 2009-2020 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/syscoin-config.h> #endif #include <arith_uint256.h> #include <clientversion.h> #...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2017-2018 The Terracoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/lice...
#include<iostream> using namespace std; int t; int m, n, x, y; int g[15][15]; int res = 0; int dx[8]={1,1,2,2,-2,-2,-1,-1}; int dy[8]={2,-2,1,-1,1,-1,2,-2}; void dfs(int x, int y, int counter){ if(counter==m*n){ res++; return; } g[x][y] = 1; for(int i=0; i<8; i++){ int nx = x+dx[i]; int ny = y+dy[i]; ...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // // File contains modifications by: The Gulden developers // All modifications: // Co...
#ifndef UTILS_HPP #define UTILS_HPP #include <string> #include <string_view> [[nodiscard]] auto read_file(std::string_view filename) -> std::string; #endif // UTILS_HPP
// Copyright (c) 2011-2016 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/bitcoin-config.h" #endif #include "bitcoingui.h" #include "bitcoinunits.h" #inc...
#include "tasksviewer.h" // Tnz6 includes #include "menubarcommandids.h" #include "batches.h" #include "floatingpanelcommand.h" #include "tsystem.h" // TnzQt includes #include "toonzqt/dvdialog.h" #include "toonzqt/menubarcommand.h" #include "toonzqt/gutil.h" #include "toonzqt/dvscrollwidget.h" // TnzCore includes #...
// decl.C99\Error_union_forward_def_volatile4.hpp // using singly defined union // (C)2010 Kenneth Boyd, license: MIT.txt union good_test; union good_test volatile; union good_test { int x_factor; };
//{ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(ll i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<=n;i++) #define FILL(i,n) memset(i,n,sizeof i) #define X first #define Y second #define SZ(_a) (int)_a.size() #define ALL(_a) _a.begin(),_...
// Copyright (C) 2017 Jérôme Leclercq // This file is part of the "Nazara Engine - Graphics module" // For conditions of distribution and use, see copyright notice in Config.hpp #include <Nazara/Utility/PixelFormat.hpp> #include <Nazara/Renderer/Debug.hpp> namespace Nz { /*! * \brief Constructs a Light object by de...
/***************************************************************************** * * Copyright (c) 2003-2020 by The University of Queensland * http://www.uq.edu.au * * Primary Business: Queensland, Australia * Licensed under the Apache License, version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Development unti...
#pragma once #include <string> #include <string_view> #include <memory> #include "acmacs-base/timeit.hh" #include "acmacs-chart-2/verify.hh" // ---------------------------------------------------------------------- namespace acmacs::chart { class Chart; using ChartP = std::shared_ptr<Chart>; ChartP imp...
#include "debugger/apu_debugger.h" #include <algorithm> #include <array> #include <magic_enum.hpp> #include "debugger/debugger_util.h" #include "gameboy/apu/apu.h" #include "imgui.h" namespace gameboy { apu_debugger::apu_debugger(const observer<gameboy::apu> apu) noexcept : apu_{apu} { memory_editor_.ReadO...
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Domain/ElementLogicalCoordinates.hpp" #include <array> #include <memory> #include <unordered_map> #include <utility> #include <vector> #include "DataStructures/IdPair.hpp" #include "DataStructures/Tensor/Tensor.hpp" // IWYU pragma: keep...
/********************************************************************** * Copyright (c) 2008-2015, Alliance for Sustainable Energy. * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the...
/** * Action video on libvlc * * ADD: end event, opacity * */ #include "smactionvideovlc.h" #include "smactionlist.h" SMActionVideoVLC::SMActionVideoVLC(QWidget *parent): SMAction(parent) { poller = new QTimer(0); connect(poller, SIGNAL(timeout()), SLOT(slotTimeout())); //preparation of the ...
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file xFileAnimationSet.cxx ...
// Copyright (c) 2014 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // 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/local/init.hpp> #include <iostream> #include <string> #include <vector>...
#include <bits/stdc++.h> #include "Node.cpp" #include "Input.cpp" using namespace std; int length(Node *head) { Node *temp = head; int count = 0; while (temp != NULL) { ++count; temp = temp->next; } return count; } int midpoint(Node *head) { Node* temp = head; int l= l...
// Copyright (c) 2019 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...
#include "matrix_all.h" using namespace std; namespace matrix_hao_lib { /*************************************/ /*Matrix Multiply C=alpha*A.B+beta*C */ /*************************************/ void gmm_cpu(const Matrix<float,2>& A, const Matrix<float,2>& B, Matrix<float,2>& C, char TRANSA, char TRANS...
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/modules/mediarecorder/vpx_encoder.h" #include <algorithm> #include "base/system/sys_info.h" #include "media/base/vi...
//compute.cpp //for Lab 12 //by Philip Westrich //Tuesday, November 27, 2012 //#include "compute.h" int calcAVG(int array[], int num_students){ int sum = 0; for (int i = 0; i < num_students; i++) sum += array[i]; return (sum / num_students); } int calcMax(int array[],...
/* * Copyright (c) 2016 MariaDB Corporation Ab * * Use of this software is governed by the Business Source License included * in the LICENSE.TXT file and at www.mariadb.com/bsl11. * * Change Date: 2022-01-01 * * On the date above, in accordance with the Business Source License, use * of this software will be g...
/* Copyright (c) 2010-2014 Stanford University * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(...
/* * Author : Jatin Rohilla * Date : 26/11/2017 * * Editor : Dev c++ 5.11 * Compiler : g++ 5.1.0 * flags : -std=c++11 * * Problem link : https://www.interviewbit.com/problems/reverse-the-string/ */ #include<iostream> using namespace std; #include<string> void reverseWords(string &A) { string res...
// Copyright (c) 2011-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. #if defined(HAVE_CONFIG_H) #include <config/chuckrum-config.h> #endif #include <qt/optionsdialog.h> #include <qt/forms/ui_op...
#include "enemy.hpp" #include "game_manager.hpp" #include "health_drop.hpp" #include "ammo_drop.hpp" #include "overhead_bar.cpp" #include "gun.hpp" #include "utils.hpp" #include "collision_ray.hpp" Enemy::Enemy(GameManager *_manager, GameEntity *parent = nullptr) : Enemy(_manager, parent, sf::Vector2f(0, 0)) {} Enemy:...
// Copyright (c) 2018, The Monero 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 the above copyright notice, this list of // ...
/** * @file textdat.cpp * * Implementation of all dialog texts. */ #include "all.h" /* todo: move text out of struct */ /** Contains the data related to each speech ID. */ const TextDataStruct alltext[] = { #ifdef SPAWN { "Nice try... ", 0, 0, TSFX_TAVERN36 }, { "Nice try... ", 0, 0, TSFX_TAVERN36 }, { "Nice t...
// 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 "content/browser/geolocation/access_token_store.h" #include "base/string_piece.h" #include "base/utf_string_conversions.h" #include "base/va...
/* This software is licensed under the MIT License: https://github.com/spacehuhntech/esp8266_deauther */ #include "SSIDs.h" #include <LittleFS.h> #include "settings.h" SSIDs::SSIDs() { list = new SimpleList<SSID>; } void SSIDs::load() { internal_removeAll(); DynamicJsonBuffer jsonBuffer(4000); chec...
// Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2020 The KFX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "budget/budgetmanager.h" #include "masternode-sync.h" #include "masternod...
// // Copyright (c) .NET Foundation and Contributors // Portions Copyright (c) Texas Instruments Incorporated. All rights reserved. // See LICENSE file in the project root for full license information. // #include <nanoHAL.h> #include <nanoHAL_ConfigurationManager.h> #include "simplelink_sockets.h" #include <ti/driv...
// 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/extensions/api/system_info_cpu/cpu_info_provider.h" #include <cstdio> #include <sstream> #include "base/file_util.h" #inclu...
/* Copyright 2015 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 "AudioEngine.h" #include <stdlib.h> //below needed for VirtualAlloc etc #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <cassert> //add the following libraries to the build #pragma comment(lib, "AkSoundEngine.lib") //sound engine core #pragma comment(lib, "AkMemoryMgr.lib") //memory manager #pragm...