text
stringlengths
7
961k
extern "C" { // Vulkan #define VK_ENABLE_BETA_EXTENSIONS #include <vulkan/vulkan.h> } #include <iostream> #include "app/render.h" int main(int argc, const char** argv) { if (argc != 2) { std::cout << "Usage: ./main BigBuckBunny.mp4" << std::endl; std::cout << "* http://commondatastorage.googleapis.com/gtv-...
/* Copyright (c) 2003-2016, Arvid Norberg, Daniel Wallin All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of ...
#include "ExplorerForm.h" System::Void WinExplorer::ExplorerForm::BackButton_Click(System::Object^ sender, System::EventArgs^ e) { TreeNode^ dir; array<TreeNode^>^ backPath = gcnew array<TreeNode^>(backPathList->Count); backPath = backPathList->ToArray(); for (int i = 0; i < backPath->Length - 1; i++) { dir =...
// Copyright Contributors to the OpenVDB Project // SPDX-License-Identifier: MPL-2.0 #include <cppunit/extensions/HelperMacros.h> #include <openvdb/Exceptions.h> #include <openvdb/openvdb.h> #include <set> class TestInternalOrigin: public CppUnit::TestCase { public: virtual void setUp() { openvdb::initialize(); }...
#include <iostream> #include "cross_mapping_cpu.h" #include "stats.h" #include "timer.h" #ifdef LIKWID_PERFMON #include <likwid.h> #else #define LIKWID_MARKER_INIT #define LIKWID_MARKER_THREADINIT #define LIKWID_MARKER_SWITCH #define LIKWID_MARKER_REGISTER(regionTag) #define LIKWID_MARKER_START(regionTag) #define LIK...
/* * Copyright (c) 2012 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall * not be construed as granting a license to any other intellectual * property including but not limited to intellectual property relating * to a hardware implementation of the funct...
#include "pch/wx_pch.h" #include <wx/wxprec.h> #include <wx/renderer.h> #include "MyListCtrlCheckbox.h" //#include "Record.h" MyListCtrlCheckbox::MyListCtrlCheckbox(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, const wxValidator &validator, const wxString &n...
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // /*++ Module Name: modulename.cpp Abstract: Implementation of internal functions to get module names --*/ #include "pal/thread.hpp" #include "pa...
/* * Copyright (C) 2013 The Android Open Source Project * * 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 app...
// // Copyright (c) .NET Foundation and Contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #include "Core.h" //////////////////////////////////////////////////////////////////////////////////////////////////// CL...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen #include "pch.h" #include "common.h" #include "ProgressRing.h" namespace winrt::Micr...
// This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sourc...
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
#include "Plans/Tackle1402489318663.h" using namespace alica; /*PROTECTED REGION ID(eph1402489318663) ENABLED START*/ // Add additional using directives here /*PROTECTED REGION END*/ namespace alicaAutogenerated { // Plan:Tackle /* generated comment Task: DefaultTask -> EntryPoint-ID: 1402489329142 */ shared_ptr<...
#include<iostream> #include<stdlib.h> using namespace std; class Node{ protected: char data; Node* next; public: Node() {} Node(char d) { data=d; next=NULL; } void setnext(Node* n) {next=n;} char getdata() {return data;} Node* getnext() {return next;} }; class stack : public Node{ private: Node* h...
#include "pch.h" #include "Encoding.h" namespace Utility { std::wstring to_utf( const std::string& t, std::string enc ) { using boost::locale::conv::to_utf; return to_utf<wchar_t>( t, enc ); } }
#include "SchedulerTest.h" #include "../testResource.h" enum { kTagAnimationDance = 1, }; static int sceneIdx = -1; Layer* nextSchedulerTest(); Layer* backSchedulerTest(); Layer* restartSchedulerTest(); static std::function<Layer*()> createFunctions[] = { CL(SchedulerTimeScale), CL(TwoSchedulers), C...
#include <string> class Solution { public: int lengthOfLastWord(std::string s) { auto i = s.size()-1; while (i >= 0 && s[i] == ' ') --i; if (i < 0) return 0; // i: position to last non-empty char past 1 int j = i; while (j >= 0 && s[j] != ' ')...
class Solution { public: vector<int> rearrangeBarcodes(vector<int>& packages) { unordered_map<int, int> counter; for(int p : packages) ++counter[p]; int n = packages.size(); vector<int> ans(n); vector<int> nums; nums.reserve(n); vector<pair<int, int>> pairs; ...
/* * 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...
// Classic Shell (c) 2009-2017, Ivo Beltchev // Classic Start (c) 2017-2018, The Passionate-Coder Team // Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author // ClassicExplorer.cpp : Implementation of DLL Exports. #include "stdafx.h" #include "res...
/// \file message.hpp /// /// \brief /// /// \authors Maarten P. Scholl /// \date 2019-04-02 /// \copyright Copyright 2017-2019 The Institute for New Economic Thinking, /// Oxford Martin School, University of Oxford /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// ...
#include <Rcpp11> #include <iostream> #include <math.h> #include <numeric> using namespace Rcpp; using namespace std; double loglik(NumericVector eta, NumericVector y, NumericVector weights, Function linkinv, Function devfun) { try { // Compute some values we need for the logLik computation: Num...
/* Copyright (c) 2019 - 2020 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 rights to use, ...
/* Copyright © 2017 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 */ #ifndef TURI_EVAL_INTERFACE_H_ #define TURI_EVAL_INTERFACE_H_ // Types #include <core/storage/sframe...
///////////////////////////////////////////////////////////////////////////// // Name: screenshot_app.cpp // Purpose: Implement Application Class // Author: Utensil Candel (UtensilCandel@@gmail.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////...
// Copyright 2018 The Fuchsia Authors // // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT #include <assert.h> #include <debug.h> #include <lib/system-topology.h> #include <zircon/boot/image.h> #include <zircon/errors.h> ...
#include <eigen3/Eigen/Core> #include <numpy_eigen/boost_python_headers.hpp> Eigen::Matrix<float, 4, 5> test_float_4_5(const Eigen::Matrix<float, 4, 5> & M) { return M; } void export_float_4_5() { boost::python::def("test_float_4_5",test_float_4_5); }
/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights * reserved. * Copyright (C) 2007 Alexey Proskuryak...
/* * Copyright (c) 2010 .SE (The Internet Infrastructure Foundation) * 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 *...
#include <optional> #include <Common/FieldVisitors.h> #include <Storages/StorageMergeTree.h> #include <Storages/MergeTree/MergeTreeBlockOutputStream.h> #include <Storages/MergeTree/DiskSpaceMonitor.h> #include <Storages/MergeTree/MergeList.h> #include <Databases/IDatabase.h> #include <Common/escapeForFileName.h> #inclu...
#include "solver.h" #include <iostream> #include <fstream> #include <vector> //#include <malloc.h> #include <string> #include <sys/time.h> #include <sys/resource.h> using namespace std; int main(int argc, char *argv[]) { string file_name; SolverConfiguration config; if (argc == 2 && (strcmp(argv[1], "-h...
/* * Copyright (c) 2010-2015 Pivotal Software, Inc. 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 req...
#include "duckdb/execution/operator/join/physical_join.hpp" using namespace std; namespace duckdb { PhysicalJoin::PhysicalJoin(LogicalOperator &op, PhysicalOperatorType type, JoinType join_type) : PhysicalSink(type, op.types), join_type(join_type) { } } // namespace duckdb
#include <iostream> #include <cstdlib> #include <cstring> #include <cstdlib> #include <cstdio> #include <vector> #include<algorithm> using namespace std; int n, m, u, v,vis[110000],ans=0; vector<int> to[110000]; struct Node { int x,y; Node(int xx,int yy) { x=xx; y=yy; } bool operato...
#include <math.h> #include <numeric> #include "../../src/filtering.h" #include "../../src/function_pool.h" #include "../../src/image_function.h" #include "../../src/image_function_helper.h" #include "../../src/image_function_simd.h" #include "../../src/thread_pool.h" #include "../../src/penguinv/cpu_identification.h" #...
/** * MXS-2037: Wildcards not working with source in NamedServerFilter * * https://jira.mariadb.org/browse/MXS-2037 * * This test only tests that ip addresses with wildcards are accepted by * NamedServerFilter. The actual matching functionality is not tested * because the client IPs can change with the different...
// Copyright (c) 2014-2020 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) #pragma once #include <pika/execution.hpp> #include <pika/modules/iterator_suppo...
// // StaticBillboardParticleDrawable.cpp // Chilli Source // Created by Ian Copland on 13/10/2014. // // The MIT License (MIT) // // Copyright (c) 2014 Tag Games Limited // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the...
#include "drape_frontend/gui/ruler_helper.hpp" #include "drape_frontend/gui/drape_gui.hpp" #include "drape_frontend/visual_params.hpp" #include "platform/measurement_utils.hpp" #include "platform/settings.hpp" #include "geometry/mercator.hpp" #include "geometry/screenbase.hpp" #include "base/macros.hpp" #include <a...
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...
// // Copyright 2005-2007 Adobe Systems Incorporated // Copyright 2018 Mateusz Loskot <mateusz at loskot dot net> // // 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 <boost/gil/channel_algorithm.hpp> #de...
/* * 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 ...
// 2020.05.23 Thu // 第3回アルゴリズム実技検定 // J問題 -- // インクルード #include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <iomanip> // 名前空間省略 using namespace std; // メイン int main() { // 入出力の高速化 ios::sync_with_stdio(false); cin.tie(nullptr); // 表示精度変更 cout << fixed << setprec...
/* * SPDX-License-Identifier: Apache-2.0 */ //===---------------- Compress.cpp - Lowering Compress Op -----------------===// // // Copyright 2021-2022 The IBM Research Authors. // // ============================================================================= // // This file lowers the ONNX Compress Operator to Krn...
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "MessagingDebuggerPrivatePCH.h" #include "SExpandableArea.h" #define LOCTEXT_NAMESPACE "SMessagingEndpoints" /* SMessagingEndpoints structors *****************************************************************************/ SMessagingEndpoints::~S...
/******************************************************************************* * Copyright 2016-2018 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://www.apa...
// Copyright (c) 2020 Ivan Petrov <petroviv90@gmail.com> // Licensed under the MIT license. // // The module contains type sender server_reply related to SMTP Replies. // (rfc 5321, 4.2. SMTP Replies [page 46]) // // References: // https://tools.ietf.org/html/rfc5321#section-4.2 #ifndef SERVER_REPLY_HPP #define SERVE...
/*======================================================================================================== * Robot.cpp *======================================================================================================== * * File Description: * * This file defines the main robot class *======================...
//===-test_simple_rnn_with_initial_bias_eigen.cc-----------------------------------------------------------===// // // Copyright (C) 2019-2020 Alibaba Group Holding Limited. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You m...
#ifndef I_BEHAVIOR_HPP #define I_BEHAVIOR_HPP class IMoveStrategy; class IHitStrategy; class ISearchStrategy; class IBehavior { public: virtual void get_move_strategy(IMoveStrategy&) const = 0; virtual void set_move_strategy(const IMoveStrategy&) = 0; virtual void get_hit_strategy(IHitStrategy&) const =...
/* * 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...
// // main.cpp // DS_Homework 3_1 // // Created by Nguyen Le Khanh Ngoc on 30/11/2020. // #include <iostream> #include "dictionary.h" using namespace std; int main(int argc, const char * argv[]) { cout<<"Stack implementation:"<<endl; Dictionary s; s.push("Marisa Bradshaw",119745); s.push("Zak Orteg...
#include "wdmsem.h" #pragma PAGEDCODE CSemaphore* CWDMSemaphore::create(VOID) { return new (NonPagedPool) CWDMSemaphore; } #pragma PAGEDCODE VOID CWDMSemaphore::initialize(IN PRKSEMAPHORE Semaphore, IN LONG Count, IN LONG Limit) { ::KeInitializeSemaphore (Semaphore,Count,Limit); } #pragma PAGEDCODE LONG CWDMSemapho...
/* Copyright (c) 2006-2017, 2019-2020, Arvid Norberg Copyright (c) 2015, Thomas Copyright (c) 2015, 2017, Steven Siloti Copyright (c) 2016-2018, Alden Torres Copyright (c) 2016-2017, Andrei Kurushin Copyright (c) 2017, Pavel Pimenov All rights reserved. Redistribution and use in source and binary forms, with or witho...
#pragma once namespace rfm { class Vector3; class Vector4 { public: Vector4(float x, float y, float z, float w); Vector4(float val = 0); Vector4(const Vector3& v3, float w); ~Vector4() = default; float& operator[] (int index) noexcept; float operator[] (int index) const noexcept; float length2() co...
#include <iostream> #include <cassert> int get_fibonacci_last_digit_naive(int n) { if (n <= 1) return n; int previous = 0; int current = 1; for (int i = 0; i < n - 1; ++i) { int tmp_previous = previous; previous = current; current = tmp_previous + current; } ...
/* * PKCS #10/Self Signed Cert Creation * (C) 1999-2008,2018 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #include <botan/x509self.h> #include <botan/x509_key.h> #include <botan/x509_ext.h> #include <botan/x509_ca.h> #include <botan/der_enc.h> #include <botan/pubkey.h> #includ...
// 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/bitcoin-config.h> #endif #include <qt/sendcoinsdialog.h> #include <qt/forms/ui_s...
#include <iostream> #include "network.hpp" #include "opengl/window.hpp" #include "player.hpp" int main() { std::string ip; std::cout << "ip (default 127.0.0.1): "; getline(std::cin, ip); if (ip.empty()) ip = "127.0.0.1"; std::string port; std::cout << "port (default 3198): "; getline(std::cin, port); if (p...
//===----------------------- AMDGPUFrameLowering.cpp ----------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //==--------------------------------------------------------...
/* * Copyright (c) 2020, Matthew Olsson <matthewcolsson@gmail.com> * * SPDX-License-Identifier: BSD-2-Clause */ #include <LibGfx/Painter.h> #include <LibWeb/CSS/StyleComputer.h> #include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Event.h> #include <LibWeb/Layout/SVGSVGBox.h> #include <LibWeb/SVG/AttributeNames.h...
// // Copyright 2021 Autodesk // // 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 ...
/** * @file particle_relaxation_single_resolution.cpp * @brief This is the test of using levelset to generate particles with single resolution and relax particles. * @details We use this case to test the particle generation and relaxation for a complex geometry. * Before particle generation, we clean the sharp...
/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2013 Intel Corporation. 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 noti...
#include "EditorStringValue.h" #include "ui_EditorStringValue.h" #include "DataProperty/ParameterString.h" #include "InputValidator.h" #include <QTimer> namespace FastCAEDesigner{ EditorStringValue::EditorStringValue(QWidget *parent) : QDialog(parent), ui(new Ui::EditorStringValue) { ui->setupUi(this); } E...
//==- WebAssemblyDisassembler.cpp - Disassembler for WebAssembly -*- C++ -*-==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
/*************************************************************************** Atari Super Breakout machine If you have any questions about how this driver works, don't hesitate to ask. - Mike Balfour (mab22@po.cwru.edu) ***************************************************************************/ #include "driver.h" ...
// file : xsd/cxx/compilers/vc-7/pre.hxx // author : Boris Kolpackov <boris@codesynthesis.com> // copyright : Copyright (c) 2005-2007 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #if (_MSC_VER < 1310) # error Microsoft Visual C++ 7.0 (.NET 2002) is not support...
/////////////////////////////////////////////////////////////////////////////// // Copyright 2012 John Maddock. 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 <boost/multiprecision/cpp_int.hpp> using ...
/*************************************************************************/ /* resource_format_wav.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
#include "art/Utilities/ToolMacros.h" #include "art/test/Utilities/tools/OperationBase.h" namespace fhicl { class ParameterSet; } namespace arttest { class SubtractNumber : public OperationBase { public: explicit SubtractNumber(fhicl::ParameterSet const&) {} private: void do_adjustNumber(int& i) ...
// Copyright 2020 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/webcodecs/image_decoder_external.h" #include "base/logging.h" #include "base/metrics/histogram_functions.h" ...
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
/*========================================================================= Program: Visualization Toolkit Module: TestHyperOctreeSurfaceFilter.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. T...
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2019 The PivX developers // Copyright (c) 2018-2019 The KYD developers // Distributed under the MIT software license, see the accompanying // file COPYING or http...
#include <NonEngine.h> class Sandbox : public NonEngine::Application { public: Sandbox() { } ~Sandbox() { } }; NonEngine::Application* NonEngine::CreateApplication() { return new Sandbox(); }
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2017 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 <wallet/db.h> #include <addrman.h> #include <hash.h> #include <protocol...
/*========================================================================= Program: Visualization Toolkit Module: $RCSfile$ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distrib...
/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2001 Peter Kelly (pmk@post.com) * (C) 2001 Dirk Mueller (mueller@kde.org) * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2012 Apple Inc. All rights reserved. * * This library i...
/* * Copyright (C) 2013 BMW Car IT GmbH * * 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 "LatchButton.h" LatchButton::LatchButton(int buttonPin) : _buttonPin(buttonPin) {} void LatchButton::initialize() { pinMode(_buttonPin, INPUT_PULLDOWN); } bool LatchButton::getAndClearState() { bool result = false; if (digitalRead(_buttonPin) == HIGH) { if (!_buttonLatched) { ...
/** ***************************************************************************** * @author This file is part of libsnark, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) **************************************************************************...
#include <iostream> #include <fstream> #include <math.h> #include <vector> #include <string> #include <algorithm> using namespace std; bool comp(long long a, long long b){ return a>b; } int main(){ long long n; ifstream in; in.open("input.txt"); in>>n; vector<long long> arr(n); for(long long i=0; i<n; i+...
#include "keybindings.h" #include <SDL/SDL.h> using namespace std; bimap<InterfaceKey,std::string> bindingNames; bimap<InterfaceKey,std::string> displayNames; bimap<SDLKey,std::string> sdlNames; void keybinding_init() { bindingNames.insert(INTERFACEKEY_NONE, "NONE"); bindingNames.insert(INTERFACEKEY_SELECT, "SELE...
#include <bits/stdc++.h> using namespace std; char s[100010], t[1010]; int nxt[100010][26], fst[26]; int n, l, x; int main() { scanf("%s%d", s, &n); l = strlen(s); memset(fst, -1, sizeof(fst)); for(int i = 0; i < 26; ++i) nxt[l - 1][i] = -1; for(int i = l - 2; ~i; --i) { memcpy(nxt[i]...
#include <map> using namespace std;
/* AudioGeneratorMP3 Audio output generator using the Helix MP3 decoder Copyright (C) 2017 Earle F. Philhower, III This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of ...
// Copyright (c) 2009-2014 The Bitcoin 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/MTNC-config.h" #endif #include <cstddef> #if defined(HAVE_SYS_SELECT_H) #include <sy...
#ifndef android_jni_support_jni_io_hpp #define android_jni_support_jni_io_hpp #include <errno.h> #include <limits.h> #include <string> #include <sys/stat.h> #include <android-jni-support/jni_config.hpp> ANDROID_JNI_NAMESPACE_BEGIN_DECL namespace filesystem { bool exists(const std::string &filename); bool is_file(...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. #include "jitpch.h" //------------------------------------------------------------------------ // optRedundantBranches: try and optimize redundant branches in the method // // Retur...
// // Created by jrusnak on 10/13/19. // #include "pyllars/internal/pyllars_membersemantics.impl.hpp" #include "pyllars/internal/pyllars_classwrapper-members.impl.hpp" #include "pyllars/internal/pyllars_classwrapper.hpp" #ifndef PYLLARS_PYLLARS_CLASSMEMBER_HPP #define PYLLARS_PYLLARS_CLASSMEMBER_HPP namespace pyllars...
#include "equals.hpp" #include "../../queries/builders/ast.hpp" using namespace indexes; using namespace mapping; using namespace std; #include "kernels.hpp" namespace queries::model { void EqualsModel::selectChunks() { if (hasFunctionInside || !exprList.at(1)->values.at(0).empty()) { return RootModel::s...
#include <iostream> #include <string> #include <fstream> #include <vector> #include <utility> // std::pair #include <stdexcept> // std::runtime_error #include <sstream> // std::stringstream #include "fisvdd.cpp" using namespace std; vector<vector<double>> read_csv(string filename){ // Reads a CSV file into a vecto...
/********************************************************************** // @@@ START COPYRIGHT @@@ // // 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. ...
/* * Copyright 2015 Aldebaran * * 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...
/* * Copyright 2021 4Paradigm * * 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 ...
#include "instruction.hpp" //constructors Instruction::Instruction(void) : op_code{OP_Code::INVALID} {} Instruction::Instruction(std::string _op_code,std::string _address){ op_code = enum_cast<OP_Code>(_op_code); address = _address; } //Observers Address Instruction::Get_Address(void) const{ return address; } OP_...
/*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT A...
#include <bits/stdc++.h> using namespace std; int main() { }