text
stringlengths
5
1.04M
//--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2014 Pivotal Inc. // // @filename: // CPartInfo.cpp // // @doc: // Implementation of derived partition information at the logical level //---------------------------------------------------------------...
// This example demonstrates how to use 'reduce' method. #include <taskflow/taskflow.hpp> #include <chrono> #include <limits.h> struct Data { int a {::rand()}; int b {::rand()}; int transform() const { return a*a + 2*a*b + b*b; } }; // Procedure: reduce // This procedure demonstrates void reduce() { ...
struct Flag { bool s1, s0, c, z, ov1, ov0; inline operator unsigned() const { return (s1 << 5) + (s0 << 4) + (c << 3) + (z << 2) + (ov1 << 1) + (ov0 << 0); } inline unsigned operator=(unsigned d) { s1 = d & 0x20; s0 = d & 0x10; c = d & 0x08; z = d & 0x04; ov1 = d & 0x02; ov0 = d & 0x01; return d; ...
#include "testbed.hxx" #include <arpa/inet.h> #include <errno.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #define TEST_BED_HOST "testbed_service_container" #define TEST_BED_PORT 9494 #define FALSE 0 #define TRUE 1 v...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include <stdint.h> #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: System.ValueType #include "System/ValueType.hpp" // Completed inc...
#include "TraceCollector.h" #include <Core/Field.h> #include <Poco/Logger.h> #include <common/Pipe.h> #include <Common/StackTrace.h> #include <common/logger_useful.h> #include <IO/ReadHelpers.h> #include <IO/ReadBufferFromFileDescriptor.h> #include <IO/WriteHelpers.h> #include <IO/WriteBufferFromFileDescriptor.h> #inc...
/* MIT License # # Copyright (c) 2020 Ferhat Geçdoğan All Rights Reserved. # Distributed under the terms of the MIT License. # # */ #include <iostream> #include <cstring> #include <GetInfo.hpp> #include <Terminal.hpp> #include <ShellUtilities.hpp> #include <Output/Print.hpp> std::string ShellUtilities::SetTerminal(...
#include <atomic> #include <thread> #include <assert.h> bool x=false; std::atomic<bool> y; std::atomic<int> z; void write_x_then_y() { x=true; std::atomic_thread_fence(std::memory_order_release); y.store(true,std::memory_order_relaxed); } void read_y_then_x() { while(!y.load(std::memory_order_relaxed...
//===--- SourceMgr.cpp - SourceManager implementations --------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt f...
// Copyright (c) 2014 BitPay Inc. // Copyright (c) 2014-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. #include <stdint.h> #include <vector> #include <string> #include <map> #include <univalue.h...
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/gpu/GrDrawingManager.h" #include "include/core/SkDeferredDisplayList.h" #include "include/gpu/GrBackendSemaphore.h" #include "include/private/GrRecordingContext...
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *delion_strings[] = { QT_TRANSLATE_NOOP("delion-core", " mints deleted\n"), QT_TRANSLATE_NOOP("delion-core", " mints updated, "), QT_TRANSLA...
#include <bits/stdc++.h> using namespace std; #include "bloom_filter.hpp" int main(void) { for(int i=4;i<8;i*=2) { for(int j=1;j<=100;j++) { bloom_parameters parameters; //parameters.maximum_size=16; parameters.projected_element_count = i; param...
/** * firewall API generated from firewall.yang * * NOTE: This file is auto generated by polycube-codegen * https://github.com/polycube-network/polycube-codegen */ /* Do not edit this file manually */ #include "FirewallJsonObject.h" #include <regex> namespace polycube { namespace service { namespace model { Fire...
///////////////////////////////////////////////////////////////////////// /// /// /// /// /// This Academic Free License applies to any software and associated /// /// documentation (the "...
#include "Refureku/Exceptions/OutOfRange.h" using namespace rfk; OutOfRange::OutOfRange(std::string const& errorMessage) noexcept: std::out_of_range(errorMessage) { }
// Copyright (c) 2016-2019 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <clocale> #include <cstdio> #include "test.hpp" namespace tao { namespace TAO_PEGTL_NAMESPACE { struct file_content : seq< TAO_PEGTL_STRING( "dummy content" ), ...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE129_listen_socket_72b.cpp Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE129.label.xml Template File: sources-sinks-72b.tmpl.cpp */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: listen_soc...
#ifndef WIN32 # include <stdexcept> # include <iostream> # include <errno.h> # include <cstring> # include <netinet/in.h> # include <sys/socket.h> # include <netdb.h> # include <netinet/in.h> # include "utils/Logger.hpp" # include "UnixSocket.hpp" using namespace zhttpd::implementation; UnixSocket::UnixSocket(api:...
#include "GridServer.h" namespace SmartMet { namespace QueryServer { namespace Corba { static void* GridServer_maintenanceThread(void *arg) { try { GridServer *server = static_cast<GridServer*>(arg); server->run(); return nullptr; } catch (...) { Fmi::Exception exception(BCP,"Operation fai...
#include "pepch.h" #include "Vector4.h" #include "Matrix4.h" namespace PrettyEngine { Vector4::Vector4(float scalar) : x(scalar), y(scalar), z(scalar), w(scalar) { } Vector4::Vector4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) { } Vector4::Vector4(const Vector3& xyz, float w) : x(xyz....
// Copyright 2010-2016, Google 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: // // * Redistributions of source code must retain the above copyright // notice, this list of condit...
#include "stdafx.h" #include "Msconfig.h" #include "MSConfigCtl.h" #include "pagebase.h" #include "pagegeneral.h" #include "pagebootini.h" #include "pageini.h" #include "pageservices.h" #include "pagestartup.h" #include <htmlhelp.h> #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FI...
#include <filesystem> #include "compiler.h" int main(int argc, char** argv) { std::filesystem::path exePath = argv[0]; std::filesystem::path shaderPath = exePath.parent_path() / "shaders/rt_bindless.hlsl"; auto compiler = shc::Compiler(); compiler.AddSearchPath(shaderPath.parent_path().string()); ...
/*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...
// 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 <fuchsia/web/cpp/fidl.h> #include "content/public/test/browser_test.h" #include "fuchsia/base/test/frame_test_util.h" #include "fuchsia/base/tes...
/* Copyright 2018 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...
// This file has been generated by Py++. #include "boost/python.hpp" #include "indexing_suite/container_suite.hpp" #include "indexing_suite/vector.hpp" #include "wrap_osg.h" #include "_pair_less__osg_scope_ref_ptr_less__osg_scope_StateSet__greater__comma__osg_scope_Polytope__greater___value_traits.pypp.hpp" #include "...
#ifndef RBX_GC_OBJECT_MARK_HPP #define RBX_GC_OBJECT_MARK_HPP namespace rubinius { class VM; class GarbageCollector; class Object; /** * Implementation in gc.cpp for now.. */ class ObjectMark { public: GarbageCollector* gc; public: ObjectMark(GarbageCollector* gc) : gc(gc) {} ...
// // Created by inosphe on 2016. 4. 1.. // #include "FBXLoader.h" #include "FBXScene.h" namespace Resource { namespace FBX{ FBXLoader::FBXLoader(){ } FBXLoader::~FBXLoader() { Clear(); } bool FBXLoader::Init() { m_pManager = FbxManager::Create(); // Create an IOSettings object. IOSROOT is de...
#include "engine/buffs_engine/cloak_buff_sub_system.h" #include "core/buffs/cloak_buff.h" #include "core/buffs/i_buff_holder_component.h" #include "core/i_cloak_component.h" #include "../cloak_changed_event.h" namespace engine { CloakBuffSubSystem::CloakBuffSubSystem() : mScene( Scene::Get() ) , mProgramState...
/** * Copyright (C) 2017 MongoDB 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, * but WITH...
// Copyright (c) 2015 Hartmut Kaiser // // 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_init.hpp> #include <hpx/hpx.hpp> #include <hpx/include/parallel_set_operations.hpp> #include <hpx/util/li...
/* * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #include <AK/Function.h> #include <LibJS/Runtime/AbstractOperations.h> #include <LibJS/Runtime/Array.h> #include <LibJS/Runtime/ArrayConstructor....
// Copyright (c) 2014 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "shell/browser/native_window_views.h" #if defined(OS_WIN) #include <wrl/client.h> #endif #include <memory> #include <tuple> #include <utility> #include <vector> #include "b...
// 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 "src/developer/memory/metrics/printer.h" #include <lib/trace/event.h> #include <zircon/types.h> #include <algorithm> #include <cstdint> #include...
#include <iostream> #include <cstdio> #include <vector> using namespace std; #define ElemType int #define _for(i,a,b) for(int i=(a);i<(b);i++) //P323.2 //编写双向冒泡排序算法, 在正反两个方向交替进行扫描, 即第一趟把关键字最大的元素 //放在序列的最后面, 第二趟把关键字最小的元素放在序列的最前面, 如此反复进行。 void BubbleSort(vector<ElemType> &A) { int low = 0, high = A.size() - 1; ...
/* * 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 ...
// 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. #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "bitcoinunits.h" #include "qvalidatedlineedit.h" #include...
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2014 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person ...
#include "stdafx.h" #include "CaptainAmericaStateManager.h" CaptainAmericaStateManager* CaptainAmericaStateManager::instance = nullptr; CaptainAmericaStateManager * CaptainAmericaStateManager::getInstance() { if (instance == nullptr) instance = new CaptainAmericaStateManager(); return instance; } CaptainAmericaSt...
// SceneTable.cpp: implementation of the KSceneTable class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "SceneEditor.h" #include "SceneTable.h" #include "SceneSkinEdit.h" #include ".\scenetable.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FI...
#pragma once namespace Audio { namespace Music { enum ID { menuTheme, gameplayTheme, gameOverTheme, none }; } }
/*============================================================================ 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. =================...
#ifdef RAI_OPENCV #include "opencv.h" #include "opencvCamera.h" struct sOpencvCamera { cv::VideoCapture capture; }; OpencvCamera::OpencvCamera(const Var<byteA>& _rgb) : Thread(STRING("OpencvCamera_"<<_rgb.name()), 0.) , rgb(this, _rgb) { s = make_shared<sOpencvCamera>(); threadLoop(); } OpencvCamera::~Ope...
/* ******************************************************************************* * Copyright (c) 2020-2021, STMicroelectronics * All rights reserved. * * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You...
// type wrapper #include "type_wrapper.h" #include "nan_macros.h" std::map<const TypeHandle *, std::shared_ptr<const TypeHandle>> TypeWrapper::type_cache; NAN_METHOD(TypeWrapper::New) { if (!info.IsConstructCall() || info.Length() == 0 || !info[0]->IsExternal()) { return Nan::ThrowError("Cannot insta...
// Tests all operations and iterators concurrently. It doesn't check any // operation for correctness, only making sure that everything completes without // crashing. #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <algorithm> #include <array> #include <atomic> #include <chrono> #include <iostream> #includ...
//Precompiler definitions #define _WINSOCK_DEPRECATED_NO_WARNINGS //Internal includes #include "TCPSocket.h" //External includes #include <WinSock2.h> //Creates and initializes a TCP socket instance TCPSocket::TCPSocket() { //Initialize TCP socket m_socketHandle = 0; m_connectedClientsList = vector<int>(); } //O...
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include "DDDG.h" #include "file_func.h" #include "Scratchpad.h" #include "ScratchpadDatapath.h" SCENARIO("Test removeInductionVariable w/ Triad", "[triad]") { GIVEN("Test Triad w/ Input Size 128") { std::string bench("outputs/triad-128"); std::string trace_fi...
/*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2017, Alliance for Sustainable Energy, LLC. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are perm...
/* * Copyright (c) 2008 Princeton University * 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 conditio...
#include <rpl_exploration/FlyToAction.h> // Note: "Action" is appended #include <actionlib/server/simple_action_server.h> #include <ros/ros.h> #include <tf/transform_listener.h> namespace rpl_exploration { class FlyTo { private: ros::NodeHandle nh_; ros::Publisher pub_; actionlib::SimpleAct...
/*************************************************************************/ /* dialogs.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
/* * BSD LICENSE * Copyright (c) 2021 Samsung Electronics 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 th...
// fstencode.cpp : Defines the entry point for the console application. // #include "stdafx.h" int main() { return 0; }
// 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 2017 Applied Research Associates, 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...
/* * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
/** * @file setmaps.cpp * * Implementation of functionality the special quest dungeons. */ #include "setmaps.h" #include "drlg_l1.h" #include "drlg_l2.h" #include "drlg_l3.h" #include "engine/load_file.hpp" #include "objdat.h" #include "objects.h" #include "palette.h" #include "quests.h" #include "t...
// Long Vy - October 20, 2017 - Proj4_1_V1 // This program uses functions to print text #include <iostream> #include <string> using namespace std; int rows, columns, fields, i, j, k; char symbol = '*'; void input(void) // User input function for rows, columns, and fields ...
/* * Copyright (c) 2011-2016, Matthieu FAESSEL and ARMINES * 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 ...
// Copyright 1996-2018 Cyberbotics Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
#include <algorithm> #include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> using std::cout; using std::endl; using std::ifstream; using std::istringstream; using std::sort; using std::string; using std::vector; enum class State { kEmpty, kObstacle, kClosed, kPath, kStart, kFini...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: System.Enum #include "System/Enum.h...
#include "HostControlMenuComp.h" HostControlMenuComp::HostControlMenuComp (HostParamControl& controller, size_t idx) : PopupMenu::CustomComponent (false), name ("Assign " + String (idx + 1)) { controller.loadParamList (paramList,...
#include<iostream> #include<stdlib.h> #include<stdlib.h> using namespace std; int c; int a[2000]; int m; void calculate(int num); int main() { int i,j,t; long n; cin>>t; for(i=1;i<=t;i++) { cout<<endl; cin>>n; m=1;a[0]=1;c=0; ///m is showing the no of digits for(j=1;j<=n;j++) ...
/* * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * 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, t...
/* * A good random number engine. * * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef EXT_SMALL_FAST_COUNTING_ENGINE_V4_HPP #define EXT_SMALL_FAST_COUNTING_ENGINE_V4_HPP #include <algorithm> #include <a...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__delete_array_wchar_t_malloc_01.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete_array.label.xml Template File: sources-sinks-01.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory M...
/* * Copyright (C) 2012 Google 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: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
#include "memoryview.h" MemoryView::MemoryView(QWidget* parent) : QAbstractScrollArea(parent) { init(); } MemoryView::~MemoryView() {} void MemoryView::init() { connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &MemoryView::adjustContent); connect(horizontalScrollBar(), &QScroll...
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
///* // link: https://www.geeksforgeeks.org/find-first-node-of-loop-in-a-linked-list/ //*/ // // //#include "01_reverse_linklist.cpp" //#include "CppUnitTest.h" //#include <iostream> //#include <algorithm> //#include <vector> //#include <map> //#include <unordered_set> //#include <set> //#include <unordered_map> //#...
#include "selfdrive/boardd/panda.h" #include <unistd.h> #include <cassert> #include <stdexcept> #include <vector> #include "cereal/messaging/messaging.h" #include "panda/board/dlc_to_len.h" #include "selfdrive/common/gpio.h" #include "selfdrive/common/swaglog.h" #include "selfdrive/common/util.h" static int init_us...
/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include <AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h> #include <AzManipul...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT-style license found in the * LICENSE file in the root directory of this source tree. */ #include <array> #include "flashlight/fl/nn/Utils.h" #include "flashlight/fl/autograd/Utils.h" #include "flashlight/fl/comm...
/* -LICENSE-START- ** Copyright (c) 2009 Blackmagic Design ** ** Permission is hereby granted, free of charge, to any person or organization ** obtaining a copy of the software and accompanying documentation covered by ** this license (the "Software") to use, reproduce, display, distribute, ** execute, and transmit the...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; bool done[1<<19][12]; int cnt[1<<19]; enum { NEG_FIX = 12000 }; int sol; int n; const unsigned black = 0x54A; int next[19][12]; int bitcount(u...
#include "secretstapler.hpp" #include <botan/auto_rng.h> #include <botan/cipher_mode.h> #include <botan/hex.h> #include <fstream> using namespace std; namespace ss { static const string_view kAlgorithm = "AES-128/CBC/PKCS7"; filesystem::path generate(const filesystem::path &file) { if (filesystem::is_directory(...
#include "routing_table.hpp" #include "util.hpp" #include <arpa/inet.h> #include <linux/rtnetlink.h> #include <net/if.h> #include <netinet/in.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> #include <phosphor-logging/elog-errors.hpp> #include <phosphor-logging/log.hpp> #i...
// Licensed under the MIT License <http://opensource.org/licenses/MIT>. // SPDX-License-Identifier: MIT // Copyright (c) 2019 Daniil Goncharov <neargye@gmail.com>. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"...
// Copyright Glen Knowles 2021. // Distributed under the Boost Software License, Version 1.0. // // git.cpp - dim tools #include "pch.h" #pragma hdrstop using namespace std; using namespace Dim; /**************************************************************************** * * Git helper functions * ***/ //=======...
#include "WindowApp.h" #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <Windows.h> using namespace Engine; int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow) { int val = -1; WindowApp window("My Application", 800.0f, 600.0f...
#include <iostream> #include <stdio.h> #include <Eigen/Dense> #include <Eigen/LU> #include <Eigen/Core> /* * A benchmark to test performance of calculating determinants of * 6x6 matrices with the Eigen linear algebra package. */ using namespace std; using namespace Eigen; int main(int argc, char * argv[]) { if...
#include <optional> #include <fstream> #include <iostream> #include <vector> #include <string> #include <io2d.h> #include "route_model.h" #include "render.h" #include "route_planner.h" using namespace std::experimental; static std::optional<std::vector<std::byte>> ReadFile(const std::string &path) { std::ifstr...
/* $Id: seq_id_handle.cpp 557201 2018-02-12 17:27:57Z vasilche $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Wor...
/****************************************************************************** * Copyright 2017 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
/*++ Copyright (c) 1998-1999 Microsoft Corporation Module Name: path.cxx Abstract: This file contains the PathCracker Functionality Environment: User mode Revision History: 12/07/98 -felixw- Created it --*/ #include "oleds.hxx" #pragma hdrstop DEFINE_IDispatc...
#ifndef FRACTALIZATION_COMPONENTS_FRACTAL_MANDELBROT_HPP #define FRACTALIZATION_COMPONENTS_FRACTAL_MANDELBROT_HPP #include <cmath> #include <utility> namespace fractalization { template <typename CmplxScalar, typename FrctlScalar, FrctlScalar MaxIterations> class Mandelbrot { public: FrctlScalar Evaluate(std::pai...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2021 Conceal Network & Conceal Devs // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #...
// Copyright 2014-2015 SDL plc // 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,...
#include "testing/testing.hpp" #include "base/logging.hpp" #include <utility> #include <vector> namespace { void TestLogMessage(my::LogLevel, my::SrcPoint const &, std::string const &) { } bool g_SomeFunctionCalled; int SomeFunction() { g_SomeFunctionCalled = true; return 3; } } UNIT_TEST(Lo...
#pragma once #include <SDL2/SDL.h> #include "Common.hpp" class EventHandler { public: void HandleEvents(); bool ShouldClose(); private: bool m_ShouldClose = false; };
// Copyright 2009 Mark Leone (markleone@gmail.com). All rights reserved. // Licensed under the terms of the MIT License. // See http://www.opensource.org/licenses/mit-license.php. #include "cg/CgConst.h" #include "cg/CgTypes.h" #include "ir/IRValues.h" #include "util/UtCast.h" #include <llvm/Constants.h> #include <ll...
#include "hypotnode.h" HypotNode::HypotNode() { this->setTitle("Hypot"); this->setHeight(180); this->setWidth(150); this->setPanelColor(QColor(121,159,12)); this->setPanelGradColor(QColor(255,224,0)); this->functionName="math.hypot"; Port p1; p1.Parent=this; p1.Position=QPoint(20,...
// Copyright 2017 The Ray Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
// Copyright 2017 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "xfa/fxfa/cxfa_ffrectangle.h" #include "xfa/fxfa/parser/cxfa_rectang...
#include <stdlib.h> #include <stdio.h> #include <conio.h> struct K_Daten { char Name[20]; int Kontonummer; double Kontostand; int passwort[12]; }; void Eingabe (struct K_Daten *); void Ausgabe (struct K_Daten); int main() { struct K_Daten Kunde; system("cls"); Eingabe(&Kunde); Ausgabe(Kunde); system ("P...
class Car { public: Car(); void accelerate(); static int whichIsFaster(Car carA, Car carB); private: float speed; }; Car::Car() : speed(0.0f) { } void Car::accelerate() { speed += 0.5f; } int Car::whichIsFaster(Car carA, Car carB) { if(carA.speed > carB.speed) { return 0; } retu...