text
stringlengths
5
1.04M
// 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 <string> #include <vector> #include "base/utf_string_conversions.h" #include "content/browser/renderer_host/render_view_host_impl.h" #includ...
/*============================================================================= Copyright (c) 2001-2011 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) =========================================...
#include <CL/sycl.hpp> #include <dpct/dpct.hpp> #include <iostream> #include <stdlib.h> #include "prefixScan.h" using namespace cms::cuda; template <typename T> struct format_traits { public: static const constexpr char *failed_msg = "failed %d %d %d: %d %d\n"; }; template <> struct format_traits<fl...
#ifndef AUTONOMY_H #define AUTONOMY_H namespace autonomy { enum class StepResult { OK, DONE, ERROR }; struct OccupancyGrid { int* grid; int grid_size; int max; static OccupancyGrid create(int grid_size); void set(int q, int r, int val); int get(int q, int r); void inc(int q, ...
#ifndef IHOTELCLI_HPP #define IHOTELCLI_HPP #include "IHotel.hpp" class IHotelCLI : public IHotel { public: IHotelCLI() = default; virtual ~IHotelCLI() = default; /* HOTEL INTERFACE */ virtual int printLoginScreen() override; virtual int printAuthScreen() override; virtual int p...
#include <stdio.h> bool create(char *inputFile, char *outputFile, char *symbol) { char buf[1024]; FILE *fpIn = fopen(inputFile, "rb"); if(fpIn == NULL) { printf("Error opening '%s' for reading\n", inputFile); return false; } FILE *fpOut = fopen(outputFile, "w"); if(fpOut ==...
/* ************************************************************************ * Copyright (c) 2019 Advanced Micro Devices, 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 without re...
#include "MapScanner.h" // TODO: Implement
/* mbed AX-12+ Servo Library * * Copyright (c) 2010, cstyles (http://mbed.org) * * 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 ri...
/******************************************************************************* * Copyright (c) 2016, ROBOTIS CO., LTD. * 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 so...
/* //@HEADER // ************************************************************************ // // KokkosKernels 0.9: Linear Algebra and Graph Kernels // Copyright 2017 Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retain...
#include "src/lang.hh" namespace warc2text { // hint = {content language code(s), tld, original encoding, CLD2::Language} const CLD2::CLDHints NO_HINT = {nullptr, nullptr, CLD2::UNKNOWN_ENCODING, CLD2::UNKNOWN_LANGUAGE}; bool detectLanguage(const std::string& text, std::unordered_map<std::string, std::str...
#include "utility/SimpleAgent.h" using namespace std; using namespace cubesat; // A simple request that gives a friendly greeting string SayHi() { printf("Hey there! (inside agent)\n"); return "Hey there (outside agent)"; } int main() { SimpleAgent *agent = new SimpleAgent("my_agent"); // Create the SimpleAgen...
// Copyright 2016 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/password_manager/android/account_chooser_dialog_android.h" #include "base/bind.h" #include "base/macros.h" #include "base/test/m...
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #incl...
// 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...
//------------------------------------------------------------------ // // @@@ 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 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/permissions/permission_manager.h" #include <memory> #include "base/bind.h" #include "base/macros.h" #include "base/metrics/field_tr...
#include "basics.h" #include "turtle.h" #include <string> #include <unistd.h> #include <time.h> #define SCREEN_WIDTH 1000 #define SCREEN_HEIGHT 1000 void framebuffer_size_callback(GLFWwindow* window, int width, int height); void processInput(GLFWwindow *window); void nextGeneration(string&); void drawPatternFromStr...
#include "buoy_action.h" using namespace cv; using namespace std; BuoyAction::BuoyAction(actionlib::SimpleActionServer<ram_msgs::VisionNavAction> *as){ namedWindow( "Gray image", CV_WINDOW_AUTOSIZE ); //initialize background subtractors, keeping both in for now m_as = as; //you can decide which version of th...
#include <stdexcept> #include "algo/PositionQueue.hpp" #include <cstring> namespace algo { PositionQueue::PositionQueue() : m_ptr(nullptr), m_size(0), m_maxSize(0) { } PositionQueue::~PositionQueue() { if (m_ptr) { delete[] m_ptr; } } void PositionQueue::resize(unsigned int maxSize) { ...
/********** Copyright (c) 2018, Xilinx, Inc. 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 conditions and the fol...
/* * Copyright © 2007 Chris Wilson * Copyright © 2009,2010 Red Hat, Inc. * Copyright © 2011,2012 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * * Permission is hereby granted, without written agreement and without * license or royalty fees, to use, copy, modify, and distribute this * ...
/*! * Copyright (c) 2017 by Contributors * \file file_util.cc */ #include <dmlc/json.h> #include <dmlc/logging.h> #include <tvm/runtime/serializer.h> #include <fstream> #include <vector> #include "file_util.h" namespace tvm { namespace runtime { void FunctionInfo::Save(dmlc::JSONWriter* writer) const { std::ve...
#include <rndf_visualizer/DrawLanes.h> #include <rndf_visualizer/euclidean_distance.h> #include <iostream> DrawLanes::DrawLanes(int x, int y, float multi) { MULT=multi; imageWidth=int(ceil(x*MULT)); imageHeight=int(ceil(y*MULT)); image = new RGB[imageWidth*imageHeight]; clear(); } DrawLanes::~DrawLanes() {...
#include <InspectorPCH.h> #include <Foundation/Communication/Telemetry.h> #include <Foundation/Logging/LogEntry.h> #include <GuiFoundation/Models/LogModel.moc.h> #include <Inspector/LogDockWidget.moc.h> #include <MainWindow.moc.h> #include <qlistwidget.h> ezQtLogDockWidget* ezQtLogDockWidget::s_pWidget = nullptr; ez...
#include <iostream> #include <iomanip> #include <vector> #include <unordered_map> #include <sparsehash/dense_hash_map> #include <sparsehash/sparse_hash_map> //#define DBMS_HASH_MAP_DEBUG_RESIZES #include <Common/Stopwatch.h> #include <AggregateFunctions/UniquesHashSet.h> #include <Core/Types.h> #include <IO/ReadBu...
// File import/export for icons, cursors, and bitmaps #include "stdafx.h" #include <direct.h> #include <sys\stat.h> #include "global.h" #include "pbrush.h" #include "pbrusdoc.h" #include "pbrusfrm.h" #include "bmobject.h" #include "imgsuprt.h" #include "imgwnd.h" #include "imgfile.h" #include "ferr.h"...
#include <occi.h> extern "C" #ifdef WIN32 __declspec(dllexport) #endif sword embulk_output_oracle_OCIDirPathColArrayEntriesSet( OCIDirPathColArray *dpca, OCIError *errhp, ub2 columnCount, ub4 rowCount, ub1* data, ub2* sizes) { for (ub4 row = 0; row < rowCount...
/* * 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 ...
// !!! This is a file automatically generated by hipify!!! #include <ATen/ATen.h> #include <ATen/Parallel.h> #include <test/cpp/tensorexpr/test_base.h> #include <thread> // This checks whether threads can see the global // numbers of threads set and also whether the scheduler // will throw an exception when multiple ...
/* Authors: Lutong Wang and Bangqi Xu */ /* * Copyright (c) 2019, The Regents of the University of California * 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 sourc...
#include <neo/sqlite3/connection.hpp> #include "./statement.hpp" #include "./tests.inl" TEST_CASE_METHOD(sqlite3_memory_db_fixture, "Open a simple connection") {} TEST_CASE_METHOD(sqlite3_memory_db_fixture, "We are not in a transaction by default") { CHECK_FALSE(db.is_transaction_active()); } TEST_CASE_METHOD(...
// Copyright 2019 Open Source Robotics Foundation, 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 appli...
// -------------------------------------------------------------------------- // Copyright © 2014 CS - All rights reserved // -------------------------------------------------------------------------- #include <stdio.h> // printf(), perror() #include <stdint.h> // uint32_t, ... #include <stdlib.h> // ...
/* math > ad-hoc difficulty: easy date: 30/Mar/2020 by: @brpapa */ #include <iostream> #include <vector> #include <cmath> #define INF (1 << 30) using namespace std; int main() { int N, m; cin >> N >> m; vector<int> A(N); for (int &a : A) cin >> a; int mx = -INF; for (int a : A) mx = max(mx, a); ...
#include "vtkIOVeraOut.h" vtkIOVeraOut::vtkIOVeraOut() { }
/* * Copyright (c) 2014-2015, Hewlett-Packard Development Company, LP. * 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 of the License, or (at your option) * any later versi...
//===-- AppleGetPendingItemsHandler.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 // //===---------------------------...
// DO NOT EDIT ! // This file is generated using the MantaFlow preprocessor (prep generate). /****************************************************************************** * * MantaFlow fluid solver framework * Copyright 2020 Sebastian Barschkis, Nils Thuerey * * This program is free software, distributed unde...
// RUN: %cml -cpp %s -o %t && %t | FileCheck %s #include<stdio.h> void foo(int a, int b=10) { printf("SUM: %d\n",a+b); } int main() { foo(1); // CHECK: 11 foo(2,7); // CHECK: 9 return 0; }
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #if !defined(DART_PRECOMPILED_RUNTIME) #include "vm/compiler/backend/il.h" #include "vm/bit_vector.h"...
/*********************************************************************************/ /********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/ /*********************************************************************************/ #ifndef FRONTENDAPPLICATIONBASE_HPP #define FRONTENDAPPLICATIONBASE_...
#include "L1Trigger/TrackFindingTracklet/interface/MatchProcessor.h" #include "L1Trigger/TrackFindingTracklet/interface/Globals.h" #include "L1Trigger/TrackFindingTracklet/interface/Util.h" #include "L1Trigger/TrackFindingTracklet/interface/ProjectionRouterBendTable.h" #include "L1Trigger/TrackFindingTracklet/interface...
#pragma once #include <cstddef> #include <functional> #include <arbor/common_types.hpp> #include <arbor/util/any_ptr.hpp> namespace arb { using cell_member_predicate = std::function<bool (cell_member_type)>; static cell_member_predicate all_probes = [](cell_member_type pid) { return true; }; inline cell_member_pr...
#include <iostream> #include <cstdio> #include <vector> #include <string> #include <algorithm> #ifndef ONLINE_JUDGE #define ONLINE_JUDGE #endif #define MAX(x,y) ((x)>(y)?(x):(y)) #define MIN(x,y) ((x)<(y)?(x):(y)) #define pb push_back #define mp make_pair #define rep(i,n) for(i=0;i<n;i++) #define repr(i,j,n) for(i=j...
#include "game/game_app.hpp" int main(int argc, char **argv) { try { GameApp app(argc, argv); return app.run(); } catch (...) { return EXIT_FAILURE; } }
/* This testcase is part of GDB, the GNU debugger. Copyright 1992-2017 Free Software Foundation, Inc. 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 the License, or ...
/* Copyright (c) 2015 drugaddicted - c17h19no3 AT openmailbox DOT org 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, mod...
// Copyright 2014 BitPay Inc. // Copyright 2015 Bitcoin Core Developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <stdint.h> #include <iomanip> #include <sstream> #include <stdlib.h> #include "univalue.h" using...
#pragma once #include "Record.hpp" namespace oless { namespace excel { namespace records { class HeaderRecord : public Record { public: HeaderRecord(unsigned short type, std::vector<uint8_t> data) : Record(type, data) { } }; } } }
// Copyright (c) 2012 The LevelDB Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. #include "table/filter_block.h" #include "leveldb/filter_policy.h" #include "util/coding.h" namespace...
/* * @brief 計算幾何学/計算幾何学 (凸包) */ #define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=CGL_4_A" #include <algorithm> #include <cmath> #include <iostream> #include <utility> #include <vector> #include "../../geometry/geometry.hpp" int main() { int n; std::cin >> n; std::vector...
/** * @filename : imagedata.cpp * @brief : data file for epd demo * * Copyright (C) Waveshare August 7 2017 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documnetation files (the "Software"), to deal * in the Software...
/* * File: logicrcv.cpp - Logical recovery * Copyright (C) 2008 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS) * * Logical recovery is a process of sequential scanning of records and calling corresponding microoperations. * To specify function for every type of operation use llR...
#include <boost/config.hpp> #if defined(BOOST_MSVC) #pragma warning(disable: 4786) // identifier truncated in debug info #pragma warning(disable: 4710) // function not inlined #pragma warning(disable: 4711) // function selected for automatic inline expansion #pragma warning(disable: 4514) // unreferenced inl...
// Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "test/test_seed2need.h" #include "policy/feerate.h" #include "txmempool.h" #include "util.h" #include <boost/test/...
#ifndef __GLTRACESIM_ANALYZER_MEMORY_INTEL_CACHE_HH__ #define __GLTRACESIM_ANALYZER_MEMORY_INTEL_CACHE_HH__ #include <memory> #include "util/cache.hh" #include "util/cache_impl.hh" #include "util/sat_counter.hh" #include "stats/cache.hh" #include "stats/cache_impl.hh" #include "stats/distribution.hh" #include "stats...
#include "stdafx.h" #include "gltypes.h" #include <stdexcept> namespace overdrive { namespace render { size_t getTypeSize(GLenum value) { switch (value) { case GL_BYTE: return sizeof(GLbyte); case GL_UNSIGNED_BYTE: return sizeof(GLubyte); case GL_SHORT: return sizeof(GLshort); case GL_...
#include <iostream> #include <jni.h> #include "Window.hh" #include "impl/JNILocal.hh" #include "impl/Library.hh" jwm::Window::~Window() { fEnv->DeleteGlobalRef(fWindow); } void jwm::Window::dispatch(jobject event) { if(fWindow) jwm::classes::Consumer::accept(fEnv, fWindow, event); } bool jwm::Window:...
//===----------------------------- Registers.hpp --------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // // // Models register sets for supported pro...
/** * @file pixels.hpp * * @brief Pixels の定義 * * @author myoukaku */ #ifndef BKSGE_CORE_RENDER_DETAIL_PIXELS_HPP #define BKSGE_CORE_RENDER_DETAIL_PIXELS_HPP //#include <bksge/fnd/serialization/access.hpp> //#include <bksge/fnd/serialization/vector.hpp> //#include <bksge/fnd/serialization/version.h...
// File: hello.cpp // Author: Pascal Enderli // Date: Zuerich, 06.02.2021 #include "hello.h" Hello::Hello(int preset) : preset_(preset) {}; int Hello::Compute(int factor) { return preset_ * factor; } int Hello::GetPreset() { return preset_; }
/* * The information in this file is * subject to the terms and conditions of the * GNU Lesser General Public License Version 2.1 * The license text is available from * http://www.gnu.org/licenses/lgpl.html */ #include "ModuleManager.h" #include "PlugInFactory.h" #include <algorithm> #include <vector> const ...
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2020 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby grante...
/* * Trace.cpp * * This source file is part of the FoundationDB open source project * * Copyright 2013-2018 Apple Inc. and the FoundationDB project 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 c...
// Copyright (c) 2011-2015 The Bitcoin Core developers // Copyright (c) 2014-2018 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/cadex-config.h" #endif #incl...
/** @file @author Shin'ichiro Nakaoka */ #include "FireDevice.h" #include "SceneFire.h" #include <cnoid/YAMLBodyLoader> #include <cnoid/SceneDevice> #include <cnoid/EigenArchive> #include <cnoid/Body> using namespace std; using namespace cnoid; namespace { YAMLBodyLoader::NodeTypeRegistration registerFireDevi...
/* ///////////////////////////////////////////////////////////////////////////////////////////////// // // 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 d...
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 PIVX Developers // Copyright (c) 2018 -2019 POINT Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-licen...
#include "inputDevice.h" #include <QDateTime> #include <QObject> #include <QTextCodec> #include <QFile> #include <QFileInfo> #include <QJsonArray> InputDevice InputDevice::makeInputDeviceFromJson(const QJsonObject &json) { InputDevice inputDevice; inputDevice.init(json); return inputDevice; } InputDevic...
// ******************************************************** // This C++ code was automatically generated by ml2cpp (development version). // Copyright 2020 // https://github.com/antoinecarme/ml2cpp // Model : DummyClassifier_Pipeline // Dataset : iris_str_tgt // This CPP code can be compiled using any C++-17 compil...
#include "drone.hpp" #include "blind_jump/game.hpp" #include "blind_jump/network_event.hpp" #include "common.hpp" #include "number/random.hpp" Drone::Drone(const Vec2<Float>& pos) : Enemy(Entity::Health(4), pos, {{16, 16}, {8, 13}}), state_{State::sleep}, timer_(0), shadow_check_timer_(milliseconds(50...
#include <iostream> #include <string> double getFinalGrade (int sum, int total); int main() { std::cout.precision(2); std::cout << std::fixed; double grade{}; char sum{}; char total{}; std::cout << "\nPlease enter the sum of your grades: "; std::cin >> sum; //GET SUM OF GRADES ...
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2019 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining ...
#pragma comment(linker, "/stack:640000000") #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iomanip> #include <iterator> #include <list> #include <map...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<int>arr; int a; for(int i=0;i<n;i++) { cin>>a; arr.push_back(a); } int temp=arr[n-1]; for(int i=n-1;i>=0;i--) { arr[i]=a...
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/renderer/render_frame_impl.h" #include <map> #include <string> #include "base/auto_reset.h" #include "base/command_line.h" #include "b...
#include <tasks/boolean-task.hh> namespace tasks { BooleanTask::BooleanTask(const std::string& description, const std::string& opt, const std::string& dependancy, bool& boolean) : BasicTask(description, opt, dependancy) ...
#include <iostream> #include <cstdlib> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { private: vector<TreeNode *> res; public: vector<TreeNode *> generateTrees(int n) { res...
/**************************************************************************** ** Meta object code from reading C++ file 'mainwindow.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.5) ** ** WARNING! All changes made in this file will be lost! *********************************************************...
// Copyright (c) 2013-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 "consensus/validation.h" #include "data/sighash.json.h" #include "hash.h" #include "main.h" // For CheckTransaction ...
#include "Hitbox.h" #include <SFML/Graphics.hpp> Hitbox::Hitbox(sf::Vector2f StartSize) { Position = sf::Vector2f(0,0); Size = StartSize; } Hitbox::Hitbox(sf::Vector2f StartSize,sf::Vector2f StartPosition) { Position = StartPosition; Size = StartSize; } sf::RectangleShape CreateShapeFromHitbox(Hitbo...
// Copyright (c) 2007-2015 Hartmut Kaiser // Copyright (c) 2016-2017 Thomas Heller // Copyright (c) 2011 Bryce Adelstein-Lelbach // // 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/LICEN...
#include <bits/stdc++.h> using namespace std; int main(){ ifstream fin("bcount.in"); ofstream fout("bcount.out"); int N, Q, breedC[100001][3], istr, istr2; fin >> N >> Q; fill(breedC[0], breedC[0] + 3, 0); for(int i = 1; i < N + 1; i++){ fin >> istr; copy(breedC[i-1], breedC[i-...
/** * Copyright 2019-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 applicabl...
// // bypslib.hpp // bypslib // // Created by Wolfgang Imig on 30.12.17. // Copyright © 2017 Wolfgang Imig. All rights reserved. // #ifndef bypslib_ #define bypslib_ /* The classes below are exported */ #pragma GCC visibility push(default) class bypslib { public: void HelloWorld(const char *); }; #pragm...
#include <new> #include <cassert> #include "uisceneblock.h" #include <QListWidget> #include <QLineEdit> #include <QPushButton> gui::uiblocks::UISceneBlock::UISceneBlock() : lstScenes(nullptr), txtSceneName(nullptr), btnSceneAdd(nullptr), btnScenesMoveFront(nullptr), btnScenesMoveBack(nullptr), btnSceneDelete(nullptr),...
#include <bits/stdc++.h> using namespace std; /// Shell Sort, Average complexity O(N^1.5) int main() { int x[] = {68, 894, 15, -20 , 8}; int n = sizeof(x)/sizeof(x[0]); int h=1; while(h<n/3)h=3*h+1; while(h>=1){ for(int i=h;i<n;i++){ for(int j=i;j>=h;j--){ if...
/* ---------------------------------------------------------------------------- * Copyright 2017, Massachusetts Institute of Technology, * Cambridge, MA 02139 * All Rights Reserved * Authors: Luca Carlone, et al. (see THANKS for the full author list) * See LICENSE for the license information * -------------------...
#include <iostream> // Header Files #include <algorithm> using namespace std; struct Node{ int data; Node *next; Node(int x){ data = x; next = NULL; } }; Node* takeInput() { Node *head = NULL, *tail = NULL; char ch; do{ int x; cout<<"Enter Value "<<endl; cin>>x; Node *new_node = new Node(x); if(he...
/** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "Yoga.h" #include <string.h> #include <algorithm> #include "Utils.h" #include "YGNode.h" #include "YGNodePrint.h" #include "Yog...
#pragma once #include <chrono> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <vector> namespace nano { enum class timer_state { started, stopped }; /** Timer utility with nesting support */ template <typename UNIT = std::chrono::milliseconds, typename CLOCK = std::chrono::ste...
/*************************************************************************** qgsauthpkcs12method.cpp --------------------- begin : September 1, 2015 copyright : (C) 2015 by Boundless Spatial, Inc. USA author : Larry Shaffer email : lshaffer ...
// Copyright (c) 2011-2013 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 "walletview.h" #include "addressbookpage.h" #include "askpassphrasedialog.h" #include "kbcgui.h" #include "clientmod...
/* * 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 ...
// Copyright 2016 Google 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 required by applicable...
// Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2019 The Huntcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <spork.h> #include <base58.h> #include <chainparams.h> #include <hu...
// Copyright (c) by respective owners including Yahoo!, Microsoft, and // individual contributors. All rights reserved. Released under a BSD (revised) // license as described in the file LICENSE. #include "numeric_casts.h" #ifdef _WIN32 # pragma warning(disable : 4996) // generated by inner_product use #endif #includ...
#ifndef PYTHONIC_INCLUDE_NUMPY_CORRELATE_HPP #define PYTHONIC_INCLUDE_NUMPY_CORRELATE_HPP #include "pythonic/include/utils/functor.hpp" #include "pythonic/include/types/ndarray.hpp" PYTHONIC_NS_BEGIN namespace numpy { template <class A, class B, typename U> types::ndarray<typename A::dtype, types::pshape<long>> ...