text
stringlengths
3.08k
12.5k
#include "ncmconntcp.h" #include <errno.h> #include <event2/event.h> #include <event2/buffer.h> //copied from libevent #ifdef WIN32 #define NCM_EVUTIL_ERR_CONNECT_RETRIABLE(e) ((e) == WSAEWOULDBLOCK || (e) == WSAEINTR || (e) == WSAEINPROGRESS || (e) == WSAEINVAL) #define NCM_EVUTIL_ERR_RW_RETRIABLE(e) ((e) == ...
#include <iostream> #include <cmath> #include <string> #include <Windows.h> #include <conio.h> using namespace std; float delta; //main variables float b; float c; //a string al; string ar; float a1; float a2; //b string bl; string br; float b1; float b2; //c string cl; string cr; float c1; float c2; string ap; string ...
#include "tracer.hpp" #include "initial_conditions/initial_conditions.hpp" #include "ode_state.hpp" #include "dynamics/ray_dynamics.hpp" #include <future> #include <chrono> #include <boost/numeric/odeint/integrate/integrate_const.hpp> #include <boost/numeric/odeint/stepper/runge_kutta4.hpp> #include <boost/numeric/ode...
/************************************************************************************************** * * * Package: FlowVectorCorrections * * Authors: <N...
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
#include "pairwise_scoring.h" #include "pairwise_leaves_calculation.h" TVector<TVector<double>> ComputeDerSums( TConstArrayRef<double> weightedDerivativesData, int leafCount, int bucketCount, const TVector<ui32>& leafIndices, const TVector<ui32>& bucketIndices ) { TVector<TVector<double>> derSu...
/* DHT library MIT license written by Adafruit Industries */ // Modified by <NAME> // #include "SensorDHT.h" void SensorDHT::setup() { // set up the pins! pinMode(_pin, INPUT_PULLUP); #ifdef __AVR _bit = digitalPinToBitMask(_pin); _port = digitalPinToPort(_pin); #endif _maxcycles ...
/* * utils.cpp * * Created on: Nov 4, 2017 * Author: dumbledore */ #include "utils.hpp" #include <cmath> #include <random> #include <iostream> #include "helper_functions.h" #include <assert.h> Utils::Utils() { // nothing for now } Utils::~Utils() { // nothing for now } double Utils::getTotalWeight(s...
#include <atwork_commander/Control.hpp> #include <ros/ros.h> #include <boost/program_options.hpp> #include <string> #include <vector> #include <regex> #include <fstream> #include <chrono> #include <thread> #include <memory> using namespace std; namespace po = boost::program_options; namespace fs = boost::filesyste...
/*This work has been funded by rosin.org (contract agreement 732287) through EP project "Robobo AI"*/ /******************************************************************************* * * Copyright 2019, Manufactura de Ingenios Tecnológicos S.L. * <http://www.mintforpeople.com> * * Redistribution, modifica...
/* * Copyright (C) 2011 - 2012 ArkCORE <http://www.arkania.net/> * * 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....
#include <iostream> #include <map> using namespace std; int checkHowManyCycleToDo(); void initializationVerbalNotationOfNumbers(map<unsigned long long int,string> &verbalNotation); string convertDecimalsAndUnitsToWord(unsigned long long int &number, map<unsigned long long int,string> &verbalNotation); string convertH...
#include <gtest/gtest.h> #include "Filesystem.hpp" #include "FilesystemHelpers.hpp" #include "TestFixture.hpp" #include <fmt/format.h> #include <vector> #include <iostream> #include <fstream> #include <boost/filesystem.hpp> namespace fs = openstudio::filesystem; // @param ignoredPaths: a list of subfolders to igno...
/* Copyright (c) 2015 Convey Computer Corporation * * This file is part of the OpenHT jpegscale application. * * Use and distribution licensed under the BSD 3-clause license. * See the LICENSE file for the complete license text. */ #include "JpegHdrDec.h" void jpegDecodeBlk( JpegHuffDec &huffDec, bool bFirstMcu...
#include <iostream> #include <ios> #include <fstream> #include <map> #include <algorithm> #include <boost/filesystem.hpp> #include <zeep/xml/document.hpp> #include <boost/algorithm/string.hpp> #include <boost/format.hpp> #include "M6Lib.h" #include "M6File.h" #include "M6Index.h" #include "M6Tokenizer.h" #include "M...
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2017 Couchbase, 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 * * ...
// // Created by Dylann on 13/12/2021. // #include "DylIA.h" #include "IA.h" int DylIA::evaluate(Board board, bool isJ1, bool AIPlaying, int depth, int depthMax) { int x; int nbJ2Seeds = board.getNbJ2Seeds(); int nbJ1Seeds = board.getNbJ1Seeds(); int J2Pieces = board.getNbJ2Pieces(); int J1Pieces...
#include "VonMisesRand.h" #include "../UniformRand.h" VonMisesRand::VonMisesRand(double location, double concentration) : CircularDistribution(location) { SetConcentration(concentration); } String VonMisesRand::Name() const { return "von Mises(" + toStringWithPrecision(GetLocation()) + ", " + toStringWithPrec...
// <NAME> // Solution to 2006 UCF High School Programming Contest Problem: Picture // 5/2/06 #include <iostream> #include <fstream> using namespace std; // Stores information about one type of terrain. struct terrain { char name[31]; double factor; }; // Stores information about one type of road segment. Althou...
#include "Particle.h" #include "RenderGlobals.h" #include "Gameobject.h" #include "ResourceMesh.h" #include "ResourceMaterial.h" #include "Application.h" #include "ModuleGameObjects.h" Particle::Particle(ResourceMesh* mesh, ResourceMaterial* tex, float lifeTime, float3 pos, float3 scale, float angle, float acc,float ...
/*================================================================================== Copyright (c) 2008, binaryzebra 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...
#include "MiceGenerator.h" #include <stdlib.h> MiceGenerator::MiceGenerator() {} MiceGenerator::MiceGenerator(std::vector<Point*> location, GameLevel* level) { //TODO: Accept a list of Points to use as spawn locations for (Point* p : location) { addSpawnLocation(p); } // due to some issue with th...
#include <ros/ros.h> #include <actionlib/client/simple_action_client.h> #include <move_base_msgs/MoveBaseAction.h> #include <visualization_msgs/Marker.h> #include <tf2_geometry_msgs/tf2_geometry_msgs.h> #include <geometry_msgs/Pose.h> #include <std_msgs/Int8.h> #include <sstream> #include "pick_objects/MarkerPose.h" ...
#include <sstream> #define _USE_MATH_DEFINES // For M_PI, etc. #include <cmath> #include "radial_distribution.h" #include "image_matrix.h" #include "../globals.h" RadialDistribution_features::RadialDistribution_features (const std::vector<Pixel2>& raw_pixels, const std::vector<Pixel2>& contour_pixels) { ...
#include "gtest/gtest.h" #include "MTL/win32/uni.h" #include "MTL/disp/bstr.h" #include "MTL/disp/disp.h" #include "MTL/disp/variant.h" #include "MTL/disp/sf_array.h" #include "MTL/punk.h" #include "MTL/win32/box.h" #include "MTL/util/path.h" #include "MTL/obj/collection.h" #include "MTL/obj/marshall.h" #inc...
/** * Copyright 2018 Woods Hole Oceanographic Institution * * 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 th...
#include <CppUtil/OpenGL/Shader.h> #include <CppUtil/Basic/File.h> // Choose OpenGL API #if USE_QT_OPENGL_API #include <CppUtil/Qt/RawAPI_Define.h> #else #include <glad/glad.h> #endif #include <iostream> using namespace std; using namespace CppUtil::OpenGL; using namespace CppUtil::Basic; Shader::Shader() : valid(...
#include "calibration.h" #include <cstring> #include <string> #include "daisy_patch.h" #include "daisysp.h" #include "settings.h" using namespace daisy; using namespace daisysp; class Calibrator { public: Calibrator(DaisyPatch *_patch) : patch(_patch) {} void AudioCallback(float **in, float **out, size_t size)...
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <algorithm> #include <SFML/Graphics.hpp> using namespace std; using namespace sf; void load_csv(string & filename, vector<float> & data) { ifstream infile(filename.c_str()); string s_number, line; getl...
/*copyright 2016-2018 hyperchain.net (Hyperchain) Distributed under the MIT software license, see the accompanying file COPYING or https://opensource.org/licenses/MIT. Permission is hereby granted, free of charge, to any person obtaining a copy of this  software and associated documentation files (the "Software"), t...
// // TracingParticle.h // // // Created by <NAME> on 1/6/16. // // #include "TracingParticle.h" TracingParticle::TracingParticle(){ ofTrueTypeFont::setGlobalDpi(72); typeText.load("tracingParticles/font/Arial.ttf", 300); typeText.setLineHeight(20.0f); typeText.setLetterSpacing(1.05f); type...
// Copyright 2021, Autonomous Space Robotics Lab (ASRL) // // 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 (c) 2021 Graphcore Ltd. All rights reserved. #include <sstream> #include <poprithms/error/error.hpp> #include <poprithms/util/permutation.hpp> #include <poprithms/util/printiter.hpp> namespace { using poprithms::util::Permutation; std::ostream &operator<<(std::ostream &ost, const std::vector<uint64_t> ...
// ======================================================================== // // Copyright 2020 <NAME> // // 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/lic...
/************************************************************** * * 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...
/*Copyright 2019-2021 CasualYouTuber31 <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
#include <simsync/application.hpp> #include <simsync/architecture.hpp> #include <simsync/estimate.hpp> #include <simsync/system.hpp> #include <simsync/reports/event_trace.hpp> #include <simsync/reports/scheduler_trace.hpp> #include <simsync/reports/criticality_stack.hpp> #include <simsync/reports/time_stack.hpp> #inc...
#include <uWS/uWS.h> #include <fstream> #include <iostream> #include "helpers.h" #include "path_plan.h" #include "parameter.h" // for convenience using nlohmann::json; using std::string; using std::vector; //start lane int target_lane = 1; double ref_vel = 0; //mile/h int main() { uWS::Hub h; char dir[255]; g...
// // test_numerical // // test the numerical.h header // // Copyright <NAME> 2017 @ CSHL // #include <algorithm> #include <cmath> #include <exception> #include <functional> #include <future> #include <iomanip> #include <iostream> #include <limits> #include <random> #include <utility> #include <vector> #include "erro...
#include "StreamingMesh.hpp" #include <AntTweakBar.h> #include <ugl/ErrorCheck.hpp> #include <sstream> /** * @brief Constructor. * @param path */ StreamingMesh::StreamingMesh(const std::string& path) : path(path) { } /** * @brief Destructor. */ StreamingMesh::~StreamingMesh() { } /** * @brief Initializat...
// ROS Libraries #include <ros/ros.h> #include <sensor_msgs/JointState.h> // Misc Libraries #include <termios.h> #include <thread> #define THRUSTER_NUM 4 // defining publishers ros::Publisher joint_state_pub; // Control variables sensor_msgs::JointState set_thrust; float cur_effort[THRUSTER_NUM]; float...
#include "order.h" #include "util/util.h" const char* Order::DEFAULT_LOCATION = "Head Office"; Order::Order(Client &client, Worker &worker, std::string location, Date date) : _client(&client), _worker(&worker), _clientEvaluation(0), _delivered(false), _totalPrice(0.0f), _requestDate(date), _deliverD...
/////////////////////////////////////////////////////////////////////////// // C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "Frame.h" /////////////...
#include "reportsframe.h" #include "datathread.h" ReportsFrame::ReportsFrame(QWidget *parent) : QFrame(parent) { qDebug() << "ReportsFrame::init"; init(); qDebug() << "ReportsFrame::init end"; } ReportsFrame::~ReportsFrame() { } int ReportsFrame::selDays() { QString label = _daycb->currentText(...
// // Generic Wang-Landau sampler for estimating the energy density of a Boltzmann distribution. // Performs a certain amount of random-walk steps on a weighted energy function and returns // ending state, accumulated histogram and updated density function. // // This can work with any generic Boltzmann distribution wh...
/* Port.cpp (c)2005 Palestar, <NAME> */ #define FONTPORT_DLL #include "stdafx.h" #include "Port.h" #include "PortView.h" #include "ChildFrame.h" #include "Resource.h" #include "Draw/Font.h" //------------------------------------------------------------------------------- extern AFX_EXTENSION_MODULE g_PortDLL...
#include <vector> #include <deque> #include <string> #include <algorithm> #include <iostream> #include <fstream> using namespace std; #include <boost/program_options.hpp> using namespace boost; namespace po = boost::program_options; #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <op...
#include "common.h" Laser::Laser() : Bullet() { active = false; hurtPlayer = true; } Laser::~Laser() { } void Laser::activate(Enemy *e, bool _p, Fixed _a) { origin = e; active = true; polarity = _p; amplitude = 0; angleOffset = _a; angle = -origin->getRotation() + angleOffset; x = fixtoi(origin->getx()) +...
/* FancyLED.h - FancyLED for Wiring/Arduino (cc) 2007 <NAME> . Some rights reserved. Created 29 Oct 2010 Version 0.1 */ // include core Wiring API #include "WProgram.h" // include this library's description file #include "FancyLED.h" // Constructor ////////////////////////////////////////////////...
/* ==== Author: <NAME> (<EMAIL>) Visual Geometry Group, Department of Engineering Science University of Oxford ==== Copyright: The library belongs to <NAME> and the University of Oxford. No usage or redistribution is allowed without explicit permission. */ #include <stdint.h> #include <string> #include <vector> #i...
/* Copyright (C) 2011 Ion Torrent Systems, Inc. All Rights Reserved */ // #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <libgen.h> #include <string.h> #include <sstream> #include <iostream> #include <vector> #include "IonVersion.h" #include "LinuxCompat.h" #include "Utils.h" #include "RawWells.h" ...
#include "optimizer.h" #include <random> #include <cassert> #include <iomanip> #include <iostream> #include <sstream> using namespace LiteMath; struct OptComplex : public IOptimizer { OptComplex(){} void Init(const TriangleMesh& a_mesh, const Img& a_image) override; TriangleMesh Run (size_t a_numIters...
#include "card.h" #include "utils/image_contours.cpp" using namespace cv; const std::vector<std::vector<cv::Point> > diamond_contour = LoadContour("./images/diamond2.png"); const std::vector<std::vector<cv::Point> > squiggle_contour = LoadContour("./images/squiggle2.png"); const std::vector<std::vector<cv::Po...
/******************************************* * Copyright (C) 2017-2020 Intel Corporation * SPDX-License-Identifier: Apache-2.0 *******************************************/ #include "infer_network.h" #include <string.h> nnperr_error::nnperr_error(const std::string &where, NNPError err) throw() : std::runtime_error...
#include <chrono> #include <thread> #include <future> #include <iostream> #include <windows.h> #include <filesystem> #include <MemoryLib.h> #include <LuaBackend.h> #include "config.h" using namespace std; int _refresh = 16; LuaBackend* _backend = nullptr; chrono::high_resolution_clock::time_point _msClock; void E...
/********************************************************************* * Software License Agreement (BSD License) * * Joystick control of Phidgets motor control HC * Copyright (c) 2010, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are ...
#include <iostream> #include <algorithm> #include <vector> #include <array> using std::cout; using std::endl; #define DIM 9 #define BLANK 0 #define SPACE " " #define LINE "|" #define NEW_ROW "-------------------------------------" #define GRID_FULL std::make_pair(9, 9) // Prints the Soduko grid void print_grid(int g...
#include "JoyCon.h" #include"hidapi.h" #define JOYCON_L_PRODUCT_ID 8198 #define JOYCON_R_PRODUCT_ID 8199 #include<Windows.h> #include<thread> using namespace std; // void SendSubcommand(hid_device* dev, uint8_t command, uint8_t data[], int len, uint8_t* globalCount) { if (dev != nullptr) { uint8_t buf[0x40]; memset...
#include <iostream> #include <string> #include <array> #include <numeric> using namespace std; #include "olcConsoleGameEngine.h" enum class Direction { UP, DOWN, LEFT, RIGHT }; // Enemies are Unit objects. class Unit { public: int unitX = 0; int unitY = 0; int timeForMove = 2000; bool unitHit = false; }; ...
#include "VCXParser.hpp" #include <iostream> #include <cerrno> using namespace proj2cmake::vcx; namespace { std::string pathToNative(std::string& in) { for(auto& c : in) if(c == '\\') c = '/'; return in; } void toUpper(char& c) { if(c >= 'a' && c <= 'z') c += 'A' - 'a'; } std::string to...
/* * explorer.cpp * * Created on: Dec 18, 2015 * Author: jcassidy */ #include <iostream> #include <fstream> #include <string> #include <boost/archive/binary_iarchive.hpp> #include <boost/graph/adj_list_serialize.hpp> #include "StreetsDatabase.h" #include "StreetsDatabaseAPI.h" #include "OSMDatabaseAPI....
// Copyright 2020 Google 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
#include <torch/extension.h> #include <ATen/cuda/CUDAContext.h> // #include <torch/csrc/autograd/variable.h> // #include <THC/THCDeviceUtils.cuh> // #include <THC/THCGeneral.h> // #include <ATen/ATen.h> // #include <ATen/AccumulateType.h> // #include <ATen/core/TensorAccessor.h> // #include <ATen/cuda/CUDAContext.h> /...
#include "diag_operator_expression.h" #include "helpers.h" #include "orbital_space.h" DiagOpExpression::DiagOpExpression() {} // DiagOpExpression::DiagOpExpression(const std::vector<DiagOperator> // &vec_dop, // scalar_t factor) { // add(vec_dop, factor); //} DiagOpExpression::Diag...
/************************************************************************* * Copyright (c) 2015, Synopsys, Inc. * * All rights reserved. * * * * Redistribution and...
#include "EditorControls/UVEditor.h" #include <glad/glad.h> #include "Actions/MoveUVAction.h" #include "ColorTheme.h" #include "CurveModel.h" #include "EditorControls/Editor.h" #include "Gizmos.h" #include "imgui.h" #include "Object.h" #include "RenderTexture.h" #include "SelectionControl.h" #include "Workspace.h" c...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 1e5 + 5; int N, M, ne, val[maxn], first[maxn], jump[maxn * 2]; int id, far[maxn], son[maxn], dep[maxn], top[maxn], cnt[maxn], idx[maxn]; struct Edge { int u, v; void set (int u, int v) { this->u = u; this->v = v; }...
/* Copyright 2002-2020 <NAME>. 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 agreed to...
#include "controller.h" #include <iostream> Controller::Controller() { velocity = 0.0; lane = 1; tick = 0; } Controller::~Controller() { } double Controller::getVelocity() { return velocity; } int Controller::getLane() { return lane; } double Controller::getTrajectoryModifier() { // Set smoother path for h...
#include <CAdjacency.h> #include <algorithm> CAdjacency:: CAdjacency() { grey_ = 0xEE/255.0; } void CAdjacency:: addNode(int id, const std::string &name, int group) { CAdjacencyNode *node = new CAdjacencyNode(id, name, group); nodes_[node->id()] = node; } void CAdjacency:: connectNodes(int source, int target,...
/********************************************************************* * * Software License Agreement (BSD License) * * Copyright (c) 2009, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ...
#include "etcd-beast/ETCDParsedResponse.h" #include "etcd-beast/ETCDError.h" #include <boost/beast/core/detail/base64.hpp> std::string FromBase64(const std::string& str) { #if BOOST_VERSION >= 107100 std::string result; std::size_t size = boost::beast::detail::base64::decoded_size(str.size()); result.resi...
#include <iostream> #include <SDL2/SDL.h> #include <stdio.h> #include <time.h> #include <stdlib.h> const int SCREEN_WIDTH = 640; const int SCREEN_HEIGHT = 480; const int CHUNK_SIZE = 10; const int DOT_COUNT = 20; struct Dot { float x; float y; float xvel; float yvel; int color; }; SDL_Window ...
#include "Application.h" #include "Obstacles.h" #include "glm/gtc/random.hpp" #include <algorithm> using namespace std; #define min4(a,b,c,d) std::min( std::min(a,b), std::min(c,d) ) #define max4(a,b,c,d) std::max( std::max(a,b), std::max(c,d) ) #define min8(a,b,c,d,e,f,g,h) std::min( std::min( std::min(a,b), std::...
/* Copyright 2015 <EMAIL> 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, soft...
#include <mach/mach.h> #include <sys/mman.h> #include <cmath> #include <memory> #include <iostream> #include <stdexcept> #include "cpu_statistics.hpp" #include "../third_party/libsmc/smc.hpp" namespace { size_t GetCPUInfo(processor_cpu_load_info_t* p) { unsigned int num_cpus; mach_msg_type_number_t num_infos; k...
#include <string> #include <vector> #include <map> #define MAX_FONT_PIX_WIDTH 32 #define MAX_FONT_PIX_HEIGHT 32 using namespace std; template <typename ... Args> string format(const string& fmt, Args ... args ) { size_t len = snprintf( nullptr, 0, fmt.c_str(), args ... ); vector<char> buf(len + 1); snprint...
/**************************************************************************** * * Copyright 2020 Samsung Electronics All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * ...
#include <ros/ros.h> #include <sensor_msgs/PointCloud.h> #include "pavo_driver.h" #define MAX_RESPONSES (4096) pavo::pavo_driver *drv = NULL; int main(int argc, char** argv){ ros::init(argc, argv, "point_cloud_publisher"); std::string frame_id, lidar_ip, host_ip, cloud_topic; int lidar_port, host_port; int mot...
// Copyright (c) 2019-2020 <NAME> // https://www.veriblock.org // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <gtest/gtest.h> #include <util/pop_test_fixture.hpp> #include <veriblock/blockchain/alt_block_tree.hpp> us...
/* * * * * * AzFindSplit.cpp * Copyright (C) 2011, 2012 <NAME> * * 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 * (at your option) any later ve...
// ========================================================================== // // ___. __ // // ____ ____ _____ ______\_ |__ ____ ____ _______/ |_ // // _/ ___\/ _ \ / \\____ \| __ \ / _ \ / _ \/ ___/\ __\ ...
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
/* File: Drawing.cpp Sample: Drawing Author: <NAME> Description: Demos drawing functions and graphics contexts. Notes: The following is a sample that shows basic graphics usage using the helper files created for use in the XPlatformer project. In this sample the `XInfo` is primarily used to perform common drawing func...
// Copyright 2015-2018 RWTH Aachen University // // 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...
/* * MIT License * * Copyright 2016 <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, modify, merge...
#include<bits/stdc++.h> #include "./fractions.h" Fraction::Fraction(int numerator , int denominator , bool simplfy_frac ) : _numerator(numerator) , _denominator(denominator) { if(simplfy_frac) *this = simplfy(*this); }; Fraction::Fraction(int numerator ) : _numerator(nume...
/* * 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 (C) 2006 <NAME> 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. This program is distributed in the hope t...
/* This example shows Fusin's output capabilities. It allows you to enter a sentence, which will then be spelled back using the Morse code, by flashing the LEDs and using vibration. */ #include <iostream> #include <iomanip> #include <chrono> #include <thread> #include <cctype> #include "Fusin.h" #include "Devices/Fusi...
#include <gtest/gtest.h> #include <string> #include <common/cycles.h> #include "../src/volume_agent.h" #include "../src/volume_agent_session.h" using namespace std; using namespace comanche; namespace { // The fixture for testing class Foo. class Volume_agent_test : public ::testing::Test { protected: // You can...
/* The MIT License (MIT) * * Copyright (c) 2016, 2017 <NAME>, KryptoLogik 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 restriction, including * without li...
#include "L2.h" using namespace std; /***********************************************************/ /**** Public Functions ****/ /***********************************************************/ int L2::recvFromL2(byte* data, size_t dataLen) { uint16_t action; /* Checking validity of data */ if (dataLen < ...
#include <fstream> #include <iostream> #include "logger.h" #include <ctime> #ifdef __linux__ #include <sys/time.h> #endif // __linux__ #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <stdint.h> // portable: uint64_t MSVC: __int64 // MSVC defines this in winsock2.h!? typedef struct timeval ...
/* ADC Example This example will perform some basic ADC operations with the ULP, using 3 pins: PIN1: Simply read and store the value PIN2: Oversample and store the average value PIN3: Wake from deep sleep if value is below threshold */ #include "freertos/FreeRTOS.h" #include "freertos/task...
#include "stdafx.h" #include "Vec2.h" #include "../EngineSettings.h" /*---------CONSRUCTORES-----------*/ // cosntructor predeterminado Vec2::Vec2() : x(0) , y(0) { x = 0; y = 0; } // Constrcutor Initialization Vec2::Vec2(float _posX, float _posY) { x = _posX; y = _posY; } // Getters y setters de las variables ...
#include "quadrature/qhermite.hpp" #include "spectral/basis/spectral_basis.hpp" #include "spectral/basis/spectral_basis_factory_hermite.hpp" #include "spectral/basis/spectral_basis_factory_ks.hpp" #include "spectral/basis/spectral_elem.hpp" #include "spectral/basis/spectral_elem_accessor.hpp" #include "spectral/basis/s...
// // Created by kiran.narayanaswamy on 8/17/18. // #include "Logging.h" #include "../../lib/pugixml/pugixml.hpp" LOGGING_UTILITY::LOGGING_UTILITY(std::string _ID, std::string Module, std::string SubModule) { pugi::xml_document doc; if (!doc.load_file("../config/logging_utility/config.xml")) { fprint...
#include "wled.h" /* * Adalight and TPM2 handler */ enum class AdaState { Header_A, Header_d, Header_a, Header_CountHi, Header_CountLo, Header_CountCheck, Data_Red, Data_Green, Data_Blue, TPM2_Header_Type, TPM2_Header_CountHi, TPM2_Header_CountLo, }; uint16_t currentBaud = 1152; //default b...
/* * Copyright (C) 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 applicab...