text
stringlengths
3.08k
12.5k
#pragma once #include <model.hpp> #include <utils.hpp> #include <exception> #include <vector> #include <iostream> #include <fstream> namespace dummyml { class k_means : public Model { private: size_t _k; size_t _feature_size; double _inertia = std::numeric_limits<double>::infinity(); std::vector<std::...
#include <iostream> #include <WinSock2.h> #include <WS2tcpip.h> #include <sstream> #define LHOST "0.0.0.0" // Don't change this #define LPORT 3000 // Set to the port you set on the client #define MAXCONN 100000 // Set the max number of connections // Colors #define RESET "\033[0m" #define BLACK "\033[30m" #...
//------------------------------------------------------------------ // // @@@ 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. ...
#include "stdafx.h" #include "ScriptExtensions.h" #include "vendor.h" /** * Construction * * @path Location of script extension directory */ ScriptExtensions::ScriptExtensions(const bfs::wpath& path, bool reload) : m_path(path), pathManifest(path / L"manifest.json") { logger->debug(L"S...
#include "ui/main_window.hpp" #include "ui_main_window.h" #include "ui/widgets/chat_pane.hpp" #include "ui/widgets/stream_pane.hpp" #include "ui/widgets/stream_widget.hpp" #include "ui/widgets/video_widget.hpp" #include "ui/widgets/foreign_widget.hpp" #include "ui/overlays/video_controls.hpp" #include "ui/tools/vlc_lo...
#include "linechart2d.h" LineChart2D::LineChart2D() { Initialized = false; MaxOfX = 0; MaxOfY = 0; MinOfX = 0; MinOfY = 0; } void LineChart2D::clearData() { Initialized = false; MaxOfX = 0; MaxOfY = 0; MinOfX = 0; MinOfY = 0; DataOfXAxis.clear(); DataOfYAxis.clear(); }...
/* Copyright (c) 2021 <NAME> * * Permission to use, copy, modify, and/or 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 DISCLAIMS ALL W...
#include "basic_cg.h" #include <cstdlib> #include <algorithm> #include <cmath> #include <QStack> #include <QPair> void lineBresenham(GrayImage &im, const QPoint &a, const QPoint &b) { int xa=a.x(), ya=a.y(), xb=b.x(), yb=b.y(); int dx = xb - xa, dy = yb - ya; int adx = std::abs(dx), ady = std::abs(dy); ...
/** ***************************************************************************** * @author This file is part of libsnark, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) **************************************************************************...
/** * @file stereoCalibrate.cpp * @brief mex interface for cv::stereoCalibrate * @ingroup calib3d * @author <NAME> * @date 2011 */ #include "mexopencv.hpp" using namespace std; using namespace cv; namespace { /** Create a new MxArray from stereo calibration results. * @param cameraMatrix1 First camera matrix. ...
#include "../header.hpp" #include <stack> #define GREEN "\033[0;32m" #define RED "\033[0;31m" #define NC "\033[0m" class StackTester { public: StackTester() { std::cout << " - - - - - - - - - - - - - - - - - - - - - - - -"; std::cout << "\n" << " - - - - - - - - - S T A C K - - - - - - - - - - " << "\n"; std::...
// QueryManager.cpp #include <new> #include <fsproto.h> #include <AutoLocker.h> #include <HashMap.h> #include "DebugSupport.h" #include "Locker.h" #include "QueryManager.h" #include "Volume.h" #include "VolumeManager.h" typedef DoublyLinkedList<QueryIterator, QueryIterator::GetVolumeLink> IteratorList; // Iterat...
/* * 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 ...
/* * Copyright (c) 2003-2016 <NAME> <<EMAIL>>. * All rights reserved. Use of the code is allowed under the * Artistic License 2.0 terms, as specified in the LICENSE file * distributed with this code, or available from * http://www.opensource.org/licenses/artistic-license-2.0.php */ /** \file mainManage.cpp * T...
/* * Copyright (c) 2018 <NAME> * https://github.com/iotaledger/hub * * Refer to the LICENSE file for licensing information */ #include "hub/service/sweep_service.h" #include <chrono> #include <numeric> #include <sstream> #include <string> #include <string_view> #include <unordered_map> #include <utility> #includ...
// Range v3 library // // Copyright <NAME> 2014-present // // Use, modification and distribution is subject to 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) // // Project home: https://github.com/ericniebler/range-v3 // //=...
//===- AsyncRefCountingOptimization.cpp - Async Ref Counting --------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
// Copyright (c) 2011, 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 conditi...
/* * Copyright (c) 2015 Cryptonomex, Inc., and contributors. * * The MIT License * * 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...
/******************************************************************************* * This file is part of KaHyPar. * * Copyright (C) 2019 <NAME> <<EMAIL>> * * KaHyPar 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 F...
/** * Advent of code 2021 * @author : <NAME> */ #include <algorithm> #include <assert.h> #include <fstream> #include <functional> #include <iostream> #include <map> #include <memory> #include <numeric> #include <optional> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <vector> ...
// // MODULE: APGTSLOG.CPP // // PURPOSE: User Activity Logging Utility // Fully implements class CHTMLLog // // PROJECT: Generic Troubleshooter DLL for Microsoft AnswerPoint // // COMPANY: Saltmine Creative, Inc. (206)-284-7511 <EMAIL> // // AUTHOR: <NAME> // // ORIGINAL DATE: 8-2-96 // // NOTES: // 1...
//===- FuzzerMain.cpp - main() function and flags -------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
#include "MySolver.h" using namespace Simplex; // MySolver vector3 MySolver::GRAVITY = vector3(0, -.035f, 0); void MySolver::Init(void) { m_v3Acceleration = ZERO_V3; m_v3Position = ZERO_V3; m_v3Velocity = ZERO_V3; m_fMass = 1.0f; } void MySolver::Swap(MySolver& other) { std::swap(m_v3Acceleration, other.m_v3Acc...
#include "main.h" void *__dso_handle=0; uint8_t buffer[SSD1331_WIDTH * SSD1331_HEIGHT * 2] = {0}; ILI9341 display(SPI_DEVICE_1, 10, 9, 8); BME280 atmo(SPI_DEVICE_1, 11); TextRenderer font(8, 12); FATFS fs; int main() { initializeFPIOA(); initializeGPIOHS(); initializeFatFs(); initializeFont(); d...
#include "stdafx.h" #pragma hdrstop #pragma warning(push) #pragma warning(disable:4995) #include <d3dx9.h> #pragma warning(pop) #include "frustum.h" void CBackend::OnFrameEnd () { #ifndef DEDICATED_SERVER for (u32 stage=0; stage<HW.Caps.raster.dwStages; stage++) CHK_DX(HW.pDevice->SetTexture(0,0)); CHK_DX (HW...
/* * box2dmousejoint.cpp * Copyright (c) 2011 <NAME> <<EMAIL>> * * This file is part of the Box2D QML plugin. * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from * the use of this software. * * Permission is...
//===- UseDefAnalysis.cpp - Analysis for Transitive UseDef chains ---------===// // // 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 <iostream> #include "gtest/gtest.h" #include "bfloat16.hpp" #include "bfloat16sr.hpp" /* Bfloat test cases */ TEST(bfloat_test_case, size_test) { rndcmp::bfloat16 val(0.f); EXPECT_EQ(sizeof(val), 2) << "expected sizeof half be 2 bytes, not " << sizeof(val); } TEST(bfloat_test_case, integer_precisi...
/** * \file dnn/src/cuda/relayout_format/opr_impl.cpp * MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * * Copyright (c) 2014-2021 Megvii Inc. All rights reserved. * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed o...
/************************************************************************** *** *** Copyright (c) 2004-2005 Regents of the University of Michigan, *** <NAME> and <NAME> *** *** Contact author(s): <EMAIL>, <EMAIL> *** Original Affiliation: EECS Department, *** The Universi...
//===--- TypeJoinMeet.cpp - Swift Type "join" and "meet" -----------------===// // // 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/L...
#include "view.h" View::View(std::string title, unsigned int res_x, unsigned int res_y, unsigned int num_objects) : QGraphicsView() { running = true; reset_velocity = false; object_size = 10.f; objects.resize(num_objects + 1); setWindowTitle(title.c_str()); setScene(&scene); resize(res_x, res_y); setAlignme...
#include <iostream> #include <string> #include <chrono> #include <functional> #include <bfgs/dval.h> template <typename T> T fun(const T* const x, int n) { auto res = x[0] * x[1] * x[2] * x[3] * x[4]; for (int i = 0; i < 10000; ++i) { res += 1.1; res -= 1.2; res *= 1.3; res /= 1.4; res += x[1]; res -=...
/* Copyright (C) 2006 - 2013 ScriptDev2 <http://www.scriptdev2.com/> * 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 version....
// Copyright (C) <NAME> <<EMAIL>> // This file is part of FreeFT. See license.txt for details. #include "navi_heightmap.h" #include "grid.h" #include <algorithm> #include <fwk/gfx/texture.h> static constexpr int max_levels = 16; NaviHeightmap::NaviHeightmap(const int2 &size) { DASSERT(size.x >= 0 && size.y >= 0); ...
#include "RadonFramework/precompiled.hpp" #include "RadonFramework/System/String.hpp" #include "RadonFramework/Collections/List.hpp" #include "RadonFramework/Core/Types/String.hpp" using namespace RadonFramework::Core::Types; using namespace RadonFramework::Collections; using namespace RadonFramework::System::String; ...
#include <cstddef> #include <cstddef> #include <fstream> #include <iomanip> #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <ShlObj.h> #include <windows.storage.h> #include <windows.system.h> #include <wrl.h> #define WIDEIFYIMP(x) L##x #define WIDEIFY(x) WIDEIFYIMP(x) #include <queue> #include <filesyste...
#include "kernel.h" #include "types.h" #include "macros.h" #include "utils.h" #include "rmode.h" #include "vga.h" #include "vesa.h" #include "heap.h" #include "devices_manager.h" #include "storage_device.h" #include "usb_device.h" #include "tasks_manager.h" #include "keyboard_listener.h" #include "event_manager.h"...
#include "ros/ros.h" #include "std_msgs/String.h" #include <geometry_msgs/Twist.h> #include <geometry_msgs/Point.h> #include <sstream> #include <string> #include <vector> #include <angles/angles.h> #include <sensor_msgs/LaserScan.h> #define RANGE_MAX 5.6; using namespace std; //prottype; class Lidar_detection{ pu...
#include <SFML/Graphics.hpp> #include <math.h> #include <vector> #include <math.h> #include<stdio.h> #include<sstream> #define PI 3.14159265 #define CIRCLE_IN_NUM 5 #define CIRCLE_OUT_NUM 9 #define CIRCLE_RADIUS 10 #define CIRCLE_CENTER_RADIUS 40 #define RAY_LENGTH 130 #define CENTER_X 170 #define CENTER...
/* * TransportHTTP.cpp * iPhone_p2p_engine * * Created by <NAME> & <NAME>, 2010 * */ #include "transport/http/http_operations.h" //I include .c file for the linker to notice the .o #include "transport/http/TransportHTTP.h" #include "HTTP_Client.h" #include "protocols/chord/ChordNode.h" #include "transport/IOv...
// // FeatureDetector.cpp // HomographyTest // // Created by <NAME> on 26/04/2019. // #include "ofxFeatureDetector.hpp" void ofxFeatureDetector::setup() { detector = ORB::create(5000); extractor = BRISK::create(60, 4 ); matcher = new cv::BFMatcher(cv::NORM_HAMMING, false); b...
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002-2012, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that ...
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
/** * Copyright (c) 2022, Ouster, Inc. * All rights reserved. * * This file contains example code for working with 2D and 3D representations of * lidar data with the C++ Ouster SDK. Please see the sdk docs at * static.ouster.dev for clearer explanations. */ #include <fstream> #include <iomanip> #include <iostre...
/****************************************************************************** * Copyright (c) Open Connectivity Foundation (OCF), AllJoyn Open Source * Project (AJOSP) Contributors and others. * * SPDX-License-Identifier: Apache-2.0 * * All rights reserved. This program and the accompanying ...
// This whole thing took me way longer than it should have. // defines // #define LOGARGS // c++ includes #include <filesystem> #ifdef LOGARGS #include <fstream> #endif #pragma warning (disable : 6276 ) // cast warning idk #pragma warning (disable : 4267 ) // loss of data warning (i should probably fix this but im...
/* * The MIT License (MIT) * * Copyright (c) 2018 <NAME> * * 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,...
/* -------------------------------------------------------------------------- * * File MainScene.cpp * Description * Ported By <NAME> * Contact <EMAIL> * * -------------------------------------------------------------------------- * * Copyright (c) ...
/* (c) Copyright 2013 - 2016 Xilinx, Inc. All rights reserved. This file contains confidential and proprietary information of Xilinx, Inc. and is protected under U.S. and international copyright and other intellectual property laws. DISCLAIMER This disclaimer is not a license and does not grant any rights to the ma...
#include <TGeoManager.h> #include <TGeoNode.h> #include "EDepSimUserEventAction.hh" #include "EDepSimException.hh" #include "EDepSimUserEventInformation.hh" #include "EDepSimVertexInfo.hh" #include "EDepSimTrajectoryMap.hh" #include "EDepSimTrajectory.hh" #include "EDepSimHitSegment.hh" #include "EDepSimRootGeometryMa...
/* * Copyright (c) 2016, <NAME> * * 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 conditions and the following disclaim...
#include "InputFormatDXF.h" InputFormatDXF::InputFormatDXF(const char * inputFilename) { // Get the insertions / blocks - so that we know what offsets to use as we encounter these blocks: DL_Dxf * fetchInsertions = new DL_Dxf(); this->insertionReceiver = new GetInsertions(); if (!fetchInsertions->in(inputFilename,...
#include "datawriter.h" DataWriter::DataWriter(const config::FeatureExtractorConfig config) : dataset_size_(0) { file_ = H5Fcreate(config.output_file().c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); for (const config::FeatureStreamConfig& feature : config.feature()) { stream& s = stre...
/* <starsha/runner.cc> Implements <starsha/runner.h>. Copyright 2010-2014 Stig LLC 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 ...
/* main Copyright 2012 <NAME> - http://tomdalling.com/ 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...
/** * PGA Tour Prize Money, UVa207 * * 用一个数组保存奖金表,用一个结构体数组保存选手信息,包括名字和每轮的成绩 * 用自定义的比较函数对索引数组进行排序,把犯规处理成无穷大,使得犯规选手自动有序 * 第一次排序后指出排名前70的选手 * 第二次对上次指出的选手排序,然后按照规则计算奖金 * * 注意事项 * 1.第一次getline前要用getchar吃掉换行符 * 2.用两个指针处理排名相同的区间 * 3.第一轮排名时,并列70名要算进去 * 4.第二轮排名时,只要超过70名就不发奖金(设为isAma即可),但是仍然要算排名 * 5.eps不要取太大 **/ ...
#define BOOST_TEST_MODULE sorted array tests #define BOOST_TEST_DYN_LINK #include <boost/test/unit_test.hpp> #include "avl_tree.h" #include <iostream> BOOST_AUTO_TEST_CASE(init) { AvlTree<int, 16> t; BOOST_CHECK_EQUAL(0, t.size); } BOOST_AUTO_TEST_CASE(push_1) { AvlTree<int, 16> t; auto n = t.insert(4...
//****************************************************************************** //****************************************************************************** // NameMappings.cpp // // Purpose: // To support renamings, this file supports one operation: normalize_name, // while maps input name into its output ...
#include "colors.hpp" #include <stdlib.h> #include <fstream> #include <string> #include <queue> #include "inputdetector.cpp" #include "code.cpp" #include "clearscreen.cpp" using namespace std; using namespace rang; pair1 home; int map[100][100]; void sethome(){ int x,y; cout<<fgB::yellow; cout<<"Enter abcissa:...
#include "solv_plug.hpp" #include <Eigen/SparseCholesky> #include <Eigen/Geometry> #include <set> #include "mesh/meshinfo.hpp" #include "tetelem.hpp" struct Triplet // for Eigen interface { int Row; int Col; real Value; int row() const { return Row; } int col() const { return ...
/* * BSD 2-Clause License * * Copyright (c) 2021-2022, <NAME> * 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,...
//Motor ID: 0x02 #include <CAN.h> #include <FastLED.h> #include <Arduino.h> #include <ArduinoJson.h> #define NUM_LEDS 25 #define DATA_PIN 27 CRGB leds[NUM_LEDS]; #define M1A 22 #define M1B 19 #define M2A 23 #define M2B 33 #define PWM_FREQUENCY 1000 #define PWM_RESOLUTION 8 #define M1A_PWM_CHANNEL 0 #define M1B_PWM_...
#include "kid.h" #include "add.h" #include "del.h" #include "alert.h" #include "failure.h" #include <nana/gui.hpp> #include <nana/gui/place.hpp> #include <nana/gui/widgets/combox.hpp> #include <nana/gui/widgets/picture.hpp> #include <nana/gui/widgets/panel.hpp> #include <nana/gui/widgets/button.hpp> #include <nana/gui/...
/* * Copyright (C) 2005-2013 Team XBMC * http://xbmc.org * * 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, or (at your option) * any later version. * * ...
#include <cstring> #include <sstream> #include <iostream> #include <string> #include "Model.h" #include "../Futz.h" Model::Model(string name) { filename = name; size_t found; found = filename.find_last_of("/\\"); path = filename.substr(0,found+1); } void Model::Statistics(){ stringstream ss; ss << "Model loaded...
#include "DarkSDK.h" #include "physics.h" // global variables - used for the camera float g_fSpeed = 0.1f; // speed at which camera moves float g_fTurn = 0.03f; // turn speed for mouse look float g_fOldCamAngleX = 0.0f; // to store original x angle float g_fOldCamAngleY = 0.0f; // to store original...
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // Name : SslTcpServer.cpp // Author : <NAME> // Revision : $Revision: #173 $ // // Copyright 2009-2020 ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http:/...
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once #include <array> #include <cstddef> #include <limits> #include <ostream> #include "Domain/Structure/Side.hpp" #include "Utilities/ConstantExpressions.hpp" #include "Utilities/Gsl.hpp" #include "Utilities/Requires.hpp" #include "Utilit...
/// @file vcdMerge/src/Merge.cpp /// /// The merging unit. /// /// @par Full Description /// The class defines the merging entity. /// /// @ingroup Merge /// /// @par Copyright (c) 2018 vcdMaker team /// /// Permission is hereby granted, free of charge, to any person obtaining a /// copy of this software and associated...
// // This source file is part of appleseed. // Visit https://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2010-2013 <NAME>, Jupiter Jazz Limited // Copyright (c) 2014-2018 <NAME>, The appleseedhq Organization // // Permission is ...
#include<iostream> #include<algorithm> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<string> #include<climits> #include<queue> #include<stack> #include<map> #include<set> #define N 500100 #define M 1000200 #define lowbit(x) x&(-x) using namespace std; inline int read() { int x=0,f=1;cha...
#pragma once #include <algorithm> #include <concepts> #include <cstddef> // For std::ptrdiff_t #include <iterator> #include <iterator> // For std::forward_iterator_tag #include <map> #include <memory> #include <ranges> #include <string> template <typename TValue, std::integral TId = std::size_t> requires(!std::same...
/* * Copyright (C) 2015, <NAME> * TU Darmstadt - Graphics, Capture and Massively Parallel Computing * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD 3-Clause license. See the LICENSE.txt file for details. */ #include <iostream> #include <fstream> #include "u...
/* Copyright (c) 2005-2021, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
// for i in g++-5 g++ clang++ ; do $i -std=c++11 -Ofast -I /opt/AMDAPPSDK-3.0-0-Beta/include/ ocl_ker_q.cpp -lOpenCL -o ocl_ker_q && ./ocl_ker_q ; done #include <vector> // want std::vector, not cl::vector #include <iostream> // std::cout #include <exception> // want to catch std::bad_alloc + friends #inc...
#include "../libs/CImg.h" #include "image.h" #include <fstream> #include <iostream> #include <math.h> //Constructor from path of file-to-be-input. image::image(char* file_name){ raw_image = new cimg_library::CImg<unsigned char>(file_name); resolution = 6; pType = standard; //Consider putting this in an init func...
#include "user_functions.hpp" #include "CppUTest/TestHarness.h" #include <cstring> /* The current draw when the output is disabled */ #define DPM_MIN_CURRENT PD_MA2PDI(100) bool pdbs_dpm_evaluate_capability(const pd_msg *capabilities, pd_msg *request) { /* Get the number of PDOs */ uint8_t numobj = PD_NUMOBJ_GET(...
#pragma once #include "IonFwd.h" #include "ion/math/vector.h" #include <fstream> #include <map> #include "ion/math/matrix.h" #include "ion/base/notifier.h" #include "ion/math/range.h" class Hud; class Camera; class ProgressHandler; namespace Snapshot{ class State { public: uint16_t ScIdx; int SampleIdx = -1; ...
//Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved. //For the list of developers, see <http://www.MercuryDPM.org/Team>. // //Redistribution and use in source and binary forms, with or without //modification, are permitted provided that the following conditions are met: // * Redistributions ...
//===- ASanStackFrameLayoutTest.cpp - Tests for ComputeASanStackFrameLayout===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
/** * @authors <NAME> (<EMAIL>) * @date 2020-08-27 23:59:22 * @link github.com/taseikyo */ #include <ctime> #include <cstdlib> #include <vector> #include <iostream> #include <functional> #include <iomanip> #include <time.h> using namespace std; /** * selection_sort */ void selection_sort(vector<int>& num...
/*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, i...
/*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, i...
//Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved. //For the list of developers, see <http://www.MercuryDPM.org/Team>. // //Redistribution and use in source and binary forms, with or without //modification, are permitted provided that the following conditions are met: // * Redistributions ...
#include <windows.h> #include <malloc.h> #include <stdio.h> #include "COFFSymbolTable.h" COFFSymbol::COFFSymbol( PIMAGE_SYMBOL pSymbolData, PSTR pStringTable, DWORD index ) { m_pSymbolData = pSymbolData; m_pStringTable = pStringTable; m_index = index; m_pszShortString = 0; } COFFSymbol::~COFFSymbol( ) { Clean...
struct Treap{ int lsum , rsum , sum , maxsum; int sz , num , val , pri , tag; bool tagn; Treap *l , *r; Treap( int _val ){ lsum = rsum = sum = maxsum = val = _val; sz = 1; pri = rand(); l = r = NULL; tag = 0; tagn = false; } }; void push( Treap * a ){ if( a->tagn ){ a->val = a->num; if( a->l ){ a->l->s...
#include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #define mi 19931117 #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) #define pwr(x) (1 << (x)) using namespace std; char ori[60010]; int sa[60010], rank[60010], len, slen; int *rankt, rt[2][60010], orik; int height[60010],...
/****************************************************************************** * Copyright (c) 2020, Intel Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. * *****************************************************************************/ #include "sct_assert.h" #include ...
/* * CollisionWorld detects and handles the line segment intersections */ #include <iostream> #include <stdlib.h> #include <math.h> #include <assert.h> #include <stdio.h> #include "CollisionWorld.h" #include "IntersectionDetection.h" #include "Line.h" // Constructor. CollisionWorld::CollisionWorld() { numLineWa...
// bit_manipulation.cpp : test runner for bit manipulation of abitrary precision fixed-size integers // // Copyright (C) 2017-2022 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include <universal/utility/directives.hpp> #in...
/*Particle.cpp $Author: jlconlin $ $Id: Particle.cpp 264 2008-03-03 15:44:29Z jlconlin $ $Revision: 264 $ $Date: 2008-03-03 08:44:29 -0700 (Mon, 03 Mar 2008) $ This file provides the implementation for the Particle class. The Particle represents (obviously) a Particle. */ #include<iostream> #include<cassert> #i...
#include "plasticlogic031.h" #include <stdio.h> #include <stdlib.h> #include "esp_log.h" #include "freertos/task.h" // Constructor PlasticLogic031::PlasticLogic031(EpdSpi2Cs& dio): Adafruit_GFX(PLOGIC031_WIDTH, PLOGIC031_HEIGHT), PlasticLogic(PLOGIC031_WIDTH, PLOGIC031_HEIGHT, dio), IO(dio) { printf("PlasticLog...
/******************************************************************************* "A Collection of Useful C++ Classes for Digital Signal Processing" By <NAME> Official project location: https://github.com/vinniefalco/DSPFilters See Documentation.cpp for contact information, notes, and bibliography. ------...
// Copyright (c) 2007-2009 Google Inc. // Copyright (c) 2006-2007 Jaiku Ltd. // Copyright (c) 2002-2006 <NAME> and <NAME> // // This software is licensed at your choice under either 1 or 2 below. // // 1. MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software ...
#include "kanon/net/inet_addr.h" #include <string.h> #include <netdb.h> #include <memory> #include <sys/socket.h> #include <cctype> #include "kanon/string/string_view.h" #include "kanon/util/macro.h" #include "kanon/util/mem.h" #include "kanon/net/sock_api.h" #include "kanon/net/endian_api.h" using namespace kanon;...
#pragma once /* GLFW */ #include <glad/glad.h> #include <GLFW/glfw3.h> #include <cstdlib> #include <cstring> #include <string> #include <chrono> #include <ctime> inline void CheckOpenGLError(const char* stmt, const char* fname, int line) { GLenum err = glGetError(); // const GLubyte* sError = gluErrorStr...
#include "parser.h" #include <fstream> #include <sstream> using namespace std; map_info_t stringToMapInfoType(string shopTypeString){ if("department_store" == shopTypeString) return DEPARTMENT_STORE; if("variety_store" == shopTypeString) return VARIETY_STORE; if("supermarket" == shopTypeString) return SUPERMARKE...
/** -*- C++ -*- * * Manager for transition systems * author: <NAME> <<EMAIL>> * * This file is part of ic3ia. * Copyright (C) 2015-2016 <NAME>. * * ic3ia 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 Foundatio...