text
stringlengths
3.08k
12.5k
/** * \file cluster_subtractive_tripdata.cpp * * Based on the MATLAB Fuzzy Logic Toolbox example: * "Modeling Traffic Patterns using Subtractive Clustering" * See [1], in the references below. * The following is a description of the problem as found in [1]. * * The purpose of this example is to understand the ...
#include<bits/stdc++.h> using namespace std ; #define deb(x) {cout << #x << " " << x << endl ;} // Two Sum Target void _twoSum(vector<int>& v, int &target) { set<int> cache ; for (int i = 0; i < v.size(); i++) { int r = target - v[i] ; if (cache.find(v[i]) != cache.end() ) { cout <...
/*========================================================================= * * Copyright <NAME>, <NAME>, <NAME>. 2011. * * 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.o...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ #include "webStructClass.h" WebStrucetCLASS::WebStrucetCLASS() { } WebStrucetCLASS::WebStrucetCLASS(shStorage*getAndWebShare) :g...
/* rendercore.cpp - Copyright 2019/2020 Utrecht 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 ...
#include "gtest/gtest.h" #include "points.h" #include "qe_input_parser.h" TEST (PhononH0, Velocity) { //int main() { Context context; context.setPhFC2FileName("../test/data/444_silicon.fc"); context.setSumRuleFC2("simple"); auto tup = QEParser::parsePhHarmonic(context); auto crystal = std::get<0>(tup); au...
// test.cpp : 定义控制台应用程序的入口点。 // #include <gtest/gtest.h> #include <amo/path.hpp> #ifdef OS_WIN #ifdef _DEBUG #pragma comment(lib, "gtestd.lib") #pragma comment(lib, "gtest_maind.lib") #else #pragma comment(lib, "gtest.lib") #pragma comment(lib, "gtest_main.lib") #endif #endif // OS_WIN // //#ifdef WIN32 ////#pra...
#include "level_parser.h" #include "constants.h" #include "misc.h" #include "exceptions.h" #include <sstream> const std::vector<std::string> emitterIdentifiers = { "direction", "maxRelativeSpeed", "lifeTime", "spawnRate", "shape", "position", "color", "size", "particleSize" }; const std::vector<std::string> fie...
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsSMILCompositor.h" #inc...
#include <iostream> #include <vector> #include <chrono> #include <math.h> #include <limits> #include <algorithm> #include <bits/stdc++.h> #include <time.h> #include <stdio.h> #include <stdlib.h> using namespace std; #define MAX_BOARD_SIZE 100 #define MAX_NUM_VERTICES (MAX_BOARD_SIZE * MAX_BOARD_SIZE) #define TURRET ...
/* * This code uses a modification of the implemetation presented at: * https://gist.github.com/tkelestemur/60401be131344dae98671b95d46060f8 for using GPD * * Please refer to the gist provided for more information * */ #include "ros/ros.h" #include "armada_flexbe_utilities/CalculateGraspWaypoints.h" #include "ar...
#include "magicpool.h" #include <QtMath> #include <QTimer> #include <QPainter> MagicPool::MagicPool(QQuickPaintedItem *parent) : QQuickPaintedItem(parent), m_moving(false), m_startCircle(false), m_circleRadius(4), m_circleAlpha(150), m_moveStep(0.0) { m_circleTimer = new QTimer(th...
#include "unittest.h" #include "rapidjson/document.h" #include "rapidjson/reader.h" #include "rapidjson/writer.h" #include "rapidjson/stringbuffer.h" using namespace rapidjson; TEST(Writer, Compact) { StringStream s("{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\"...
/* Task: Transofrmations * Plik wykonywalny: atest * * Opis: Celem zadania jest napisać system klas który mógłby być * wykorzystany w programach graficznych. * * Dwie klasy są już podane: Transformable (abstrakcyjna klasa * odpowiadająca za transformacje figur) oraz Point. Proszę zwrócić * uwagę na zależn...
/* ============================================================================ * Copyright (c) 2009-2016 BlueQuartz Software, LLC * * 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 ...
#include <iostream> #include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdint.h> #include <unistd.h> #include <sys/time.h> #include "MPU9250.h" #include "AHRS.hpp" //#include <ros/ros.h> //#include <sensor_msgs/Imu.h> //#include <sensor_msgs/Temperature.h> // Objects ...
/* Copyright 2019 <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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
/***************************************************************** * Copyright (c) 2005 <NAME> * * * * All rights reserved. * * Distributed under the terms of the MIT License. * *****************************************************************/ #ifndef PING_HA...
// // Created by kellerberrin on 27/1/21. // #include "kgl_analysis_mutation_gene.h" #include "kgl_variant_mutation.h" #include <fstream> namespace kgl = kellerberrin::genome; // Perform the genetic analysis per iteration. bool kgl::GenomeMutation::writeOutput( const std::shared_ptr<const HsGenomeAux>& genome...
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2004, Industrial Light & Magic, a division of Lucasfilm // Entertainment Company Ltd. Portions contributed and copyright held by // others as indicated. All rights reserved. // // Redistribution and use in source and bi...
/** * Supports creation of free Telos accounts * * @author <NAME> * @copyright defined in telos/LICENSE.txt */ #include <telos.free/telos.free.hpp> using eosio::print; freeaccounts::freeaccounts(name self, name code, datastream<const char*> ds) : contract(self, code, ds), configuration(self, self.value), fre...
// // Bullet.cpp // Moon3d // // Created by <NAME> on 3/4/14. // // // version ported to win32 by <NAME> email : <EMAIL> #include "Bullets.h" #include "3d/Sprite3D.h" #include "consts.h" #include "GameLayer.h" #include "GameEntity.h" #include "GameControllers.h" #include "Enemies.h" #include "ParticleManager.h" boo...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "rscene.h" #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } void MainWindow::showEvent(QShowEvent* event) { int a, b, c, d, e, f, g, h; a = world.addPoint(QV...
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); // 用于播放 timer = new QTimer(this); connect(timer,&QTimer::timeout,this,&MainWindow::play); } MainWindow::~MainWindow() { this->stop...
#include <algorithm> #include "../math/quaternion.hpp" #include "../rendering/primitives.hpp" #include "../util/logging.hpp" #include "camera.hpp" Camera::Camera(nlohmann::json json) { if (json == nullptr) { Log::error("Tried to create a Camera from json with nullptr"); return; } if (json.empty()) { ...
// BEGIN CUT HERE // END CUT HERE #line 5 "UnsortedSequence.cpp" #include <iostream> #include <cstdlib> #include <cmath> #include <cstring> #include <string> #include <vector> #include <map> #include <list> #include <queue> #include <stack> #include <bitset> #include <deque> #include <set> #include <sstream> using na...
// Copyright 2016 Google 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 in ...
#include <cmath> #include <vector> #include <string> #include <algorithm> using namespace std; #include "factor.h" #include "gcd.h" #include "gcdAlgo.h" #include "gcdAlgo2.h" /////////// For Testing /////////////////////////////////////////////////////// #include <time.h> #include <cassert> #include <iostream> #inc...
#include "biopac_control_window.hpp" // std #include <algorithm> // opengl-utility #include "opengl/vao.hpp" using namespace tool::graphics; bool BiopacControlWindow::initialize_gl(){ // implot imPlotContext = ImPlot::CreateContext(); gl::VAO::unbind(); return m_glInitialized = true; } void Biopa...
/** \file gameengine/Physics/Bullet/CcdGraphicController.cpp * \ingroup physbullet */ /* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 <NAME> http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the aut...
#include "Instruction.hpp" #include <QMap> using namespace std; QString Instruction::Operand::getBitsStrFromSize() const { return bitsStrfromSize(size, QString()); } QString Instruction::Operand::getName() const { return QString(name).replace("###", bitsStrfromSize(size)); } void Instruction::Operand::repairName(...
/* Copyright (c) 2007 <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, publish, distribute, sublicen...
#include "mainwidget.h" #include <AzQtComponents/Components/EditorProxyStyle.h> #include <AzQtComponents/Components/StyledDockWidget.h> #include <AzQtComponents/Components/ToolButtonComboBox.h> #include <AzQtComponents/Components/ToolButtonLineEdit.h> #include <AzQtComponents/Components/WindowDecorationWrapper.h> #incl...
//============================================================================= // socket.cpp // (c) 8-12-2010, <NAME>, <NAME> // enhanced for cross-platform use by <NAME> (c) 2013, 2014 // // Implementation of classes Socket, ServerSocket and CientSocket //==============================================================...
// ***************************************************************************** /*! \file src/PDE/Transport/Problem/ShearDiff.cpp \copyright 2012-2015 <NAME>, 2016-2018 Los Alamos National Security, LLC., 2019 Triad National Security, LLC. All rights reserved. See the LI...
#include "http_session.h" #include <memory> #include <vector> #include <boost/beast/core.hpp> #include <boost/beast/http.hpp> #include <boost/beast/version.hpp> #include <boost/asio/dispatch.hpp> #include <boost/asio/signal_set.hpp> #include <jemalloc/jemalloc.h> #include <glog/logging.h> HttpSession::HttpSession(boo...
/* * Copyright (C) 2019 MediaTek 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 agr...
#include "ofApp.h" ofxFaceTracker::Gesture gestureIds[] = { ofxFaceTracker::MOUTH_WIDTH, ofxFaceTracker::MOUTH_HEIGHT, ofxFaceTracker::LEFT_EYEBROW_HEIGHT, ofxFaceTracker::RIGHT_EYEBROW_HEIGHT, ofxFaceTracker::LEFT_EYE_OPENNESS, ofxFaceTracker::RIGHT_EYE_OPENNESS, ofxFaceTracker::JAW_OPENNE...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <limits.h> #include <iostream> #include "Curve.h" #include "C12Map.h" #define FLOAT_MAX 9.99E37 // Just test, disable tunelling #define PURE_MONTE_CARLO using namespace std; static void usage(char const *); int main(int argc, c...
#include "cocos-ext.h" #include "HelloWorldScene.h" #include "Render.h" #include "FileInfo.h" #include "trigger/EventDef.h" #include "ColliderRectDrawer.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include <jni.h> #include "../cocos2dx/platform/android/jni/JniHelper.h" #include <android/log.h> #endif using na...
//-----------------------------------------------------------------------------| // Authorship //-----------------------------------------------------------------------------| // // <NAME> // <EMAIL> // Created: 2018.07.15 // Modified: 2018.08.21 // /* 1.2 - CheckPermutation() - P.90 Given two strings, write a method...
/* * This is the source code for the "gcode" library * Interpreter function and calls to m and g functions are defined * Usage: pass the string containing the command to the 'interpret' function from your .ino code * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this softwar...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "stw_timer.h" /* todo : 1. add jitter support 2. in case ticks take too much time add a quata and keep the time in the current bucket then speed up hhaim */ void CTimerObj::Dump(FILE *fd){ fprintf(fd,"m_rotation_count :%lu \n", (ulon...
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
/* Copyright (c) 2012, <NAME> (kb1vc) 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 conditions and the...
#include <iostream> #include <string> #include <set> #include <algorithm> #include <cctype> #include <iterator> #include <fstream> #include <chrono> #include <utility> #include <vector> using anaset=std::multiset<char>; using anaword=std::pair<anaset,std::string>; using anawords=std::vector<anaword>; usi...
#include "tracetool.h" #include "rasterimageeditor.h" #include "timeline.h" #include "openglrenderer.h" #include "command.h" #include "tracelayer.h" TraceTool::TraceTool(RasterImageEditor* editor, QUndoStack* undoStack) :mEditor(editor) ,mUndoStack(undoStack) ,mBrushSize(1.0f) ,mSmooth(0) ,mBrushMo...
// Copyright 2020 cryptonote.social. All rights reserved. Use of this source code is governed by // the license found in the LICENSE file. #include <atomic> #include <cfenv> #include <string> #include <thread> #include <stdint.h> // RandomX includes #include "randomx.h" #include "virtual_machine.hpp" #include "datase...
// This code is a replica of shaders_interpolation.cpp, which is in // <NAME>' LearnOpenGL, which is licensed under CC BY-NC 4.0. // Check the website below: // https://github.com/JoeyDeVries/LearnOpenGL/blob/master/src/1.getting_started/3.2.shaders_interpolation/shaders_interpolation.cpp // https://learnopengl.com/Abo...
#include "pathfinder.h" #include <vector> #include <iostream> #include <list> #include <limits> #include "math.h" //<NAME> <NAME> // CSC 2110 //Final Project using A* Algorithm using namespace std; pathfinder::pathfinder(cell *pmap, int initialColumn, int initialRow) { _MAP = new cell[MAP_WIDTH * MAP_HEIGHT]; //Set ...
#include <iostream> #include <fstream> #include <vector> #include <string> #include <stdexcept> #include <boost/program_options.hpp> #include <boost/lexical_cast.hpp> #include <boost/tuple/tuple.hpp> #include <btl/fasta_writer.h> #include "ereal.h" #include "dna_sequence.h" #include "main_io.h" #include "io.h" #inclu...
/******************************************************************************* * Copyright 2019 Intel Corporation * * 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 restrict...
/* * This file is part of json11 project (https://github.com/borisgontar/json11). * * Copyright (c) 2013 <NAME>. * This library is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. */ // Version 0.6.5, 2013-11-07 #include "json11.h" #include <...
#include "sdl.hpp" // Create a new sdl display screen with the specified dimensions. SDLDisplay::SDLDisplay(int width, int height) { this->width = width; this->height = height; this->initialize(); } // Create a new sdl display screen with the specified dimensions and zoom. SDLDisplay::SDLDisplay(int width, int hei...
#include "common.hpp" #include <sstream> #include <iomanip> #include <algorithm> #include "rntSequencer.hpp" struct Renato; struct RenatoWidget : SequencerWidget { public: void onMenu(int action); RenatoWidget(Renato *module); enum MENUACTIONS { RANDOMIZE_PITCH = 0x01, RANDOMIZE_GATEX = 0x02, RANDOMIZE_GATEY...
#pragma once /* This file is part of EmuFramework. Imagine 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 version. Imagine is distributed in...
#include"stdafx.h" CSystemJTR::CSystemJTR() {TR; } CSystemJTR::~CSystemJTR() {TR; } ILC7Interface *CSystemJTR::GetInterfaceVersion(QString interface_name) { if (interface_name == "ILC7Component") { return this; } return NULL; } QUuid CSystemJTR::GetID() {TR; return UUID_SYSTEMJTR; } ...
/* * Copyright (c) 2020 <NAME> * This file is part of Onyx, and is released under the terms of the MIT License * check LICENSE at the root directory for more information */ /* Implementation of the ping command for Onyx */ #include <cstdint> #include <stdio.h> #include <unistd.h> #include <cstdlib> #include <errno.h>...
// // Created by jonas on 02.11.2018. // #include "iterative_mergesort.h" template<typename Iterator> void mergesort(Iterator start, Iterator end) { //Iterators for the new vector typename std::vector<typename std::iterator_traits<Iterator>::value_type> newVector(end - start); typename std::vector<typename...
#include "OBJImporter.h" OBJImporter::OBJImporter() { } bool OBJImporter::import(char* filename, float*& modeldata) { nV = 0; nN = 0; nT = 0; nF = 0; std::fstream f(filename); std::string tmp; if (f) { while (f.eof() != true) { f >> tmp; if (tmp == "v") nV++; else if (tmp == "vt") nT++; else i...
#include "Headers\AlienLogic.h" #include <iostream> #include <random> #include <ctime> #include "Headers/GameCore.h" using namespace CDP; AlienLogic::AlienLogic(std::vector<std::shared_ptr<Component>>& components, GameObject& go, Transform& trans, int moveLength, double moveInterval, int...
#include <portinfo> #include "QueryElev.hh" // implementation of class methods #include "geomodelgrids/serial/Query.hh" // USES Query #include "geomodelgrids/utils/ErrorHandler.hh" // USES ErrorHandler #include <getopt.h> // USES getopt_long() #include <iomanip> #include <fstream> // USES std::ifstream, std::ofstrea...
#include "network/tcp_client.h" #include "network/socket_address.h" #include "network/connection.h" #include "network/epoll.h" #include "network/timer.h" #include "network/eventloop_pool.h" #include "libbase/buffer.h" #include "libbase/noncopyable.h" #include "libbase/logger.h" #include "libbase/timeutil.h" #include <...
#include "TcpListener.h" #include <string> #include <sstream> int TcpListener::init() { // Initialze winsock WSADATA wsData; WORD ver = MAKEWORD(2, 2); int wsOk = WSAStartup(ver, &wsData); if (wsOk != 0) { return wsOk; } // Create a socket m_socket = socket(AF_INET, SOCK_STREAM, 0); if (m_socket == INVA...
/* * viewerexample.cpp * * Created on: Dec 18, 2015 * Author: <NAME> */ #include <osgDB/ReadFile> #include <osgGA/TrackballManipulator> #include <osgViewer/Viewer> #include "openvrviewer.h" #include "openvreventhandler.h" osg::Node* createEarth(); class GraphicsWindowViewer : public osgViewer::Viewer { p...
#include <Box2D\Box2D.h> #include <SFML/Graphics.hpp> #include "main.h" using namespace sf; using namespace std; // Things to remember about Box2D: // 1. B2D has its own Vector maths classes that we munvert to/from. // 2. B2D's positive y is towards the top of the screen. // 3. B2D's has a scale. We rende...
// File game_of_life.cpp // Author <NAME> <<EMAIL>> // Brief Using EA to find the initial configuration of a Game of Life 2D cellular // automaton that leads in 1 to N steps to the desired configuration // Date 8.5.2022 // Up2date sources can be found at: https://github.com/TomasBeranek/but-bin-project...
#include "BasicAI.h" #include "PlayerData.h" #include <stdexcept> #include "HTNDomain.h" #include "RequestHTNDomain.h" #include "SimWorld.h" #include "AbstractAction.h" #include <sstream> #include "pLog.h" #include "Constants.h" #include <vector> #include "TranslateToHTNWorldState.h" #include "HTNPrimitives.h" EAction...
#include "stdafx.h" #include "CommonUtility.h" #include <fstream> #include <regex> #include <Windows.h> #include <atlbase.h> #include "Logger.h" #include "CodeConvert.h" /// 現在実行中の exeのあるフォルダのパスを返す fs::path GetExeDirectory() { WCHAR exePath[MAX_PATH] = L""; GetModuleFileName(NULL, exePath, MAX_PATH); fs::path exeF...
/* 一般通用版本 https://blog.csdn.net/u011472272/article/details/109038476 A Fast Algorithm for Finding Dominators in a Flowgraph 论文原文 10 15 1 2 2 3 3 4 3 5 3 6 4 7 7 8 7 9 7 10 5 6 6 8 7 8 4 1 3 6 5 3 * */ // https://www.luogu.com.cn/problem/P5180 // https://blog.csdn.net/u011472272/article/details/109038476 #incl...
#define _USE_MATH_DEFINES #include <cmath> #include <iostream> #include <string> #include "Player.hpp" #include "GameWorld.hpp" #include "Game.hpp" #include "CircleRigidbody.hpp" #include "PlayerMovement.hpp" #include "Gun.hpp" #include "TextComponent.hpp" #include "CollisionFilters.hpp" Player::Player(Vector2f positi...
/* Copyright (c) 2012, <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: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following ...
#include <google/protobuf/compiler/plugin.h> #include <google/protobuf/compiler/code_generator.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/io/zero_copy_stream.h> #include <sstream> #define FMT_HEADER_ONLY #include <fmt/format.h> #include "p2pop/plugin.hpp" #include "options.pb.h" void write_al...
/* This code will query a ntp server for the local time and display * it. it is intended to show how to use a NTP server as a time * source for a simple network connected device. * This is the C version. The orignal was in Perl * * For better clock management see the offical NTP info at: * http://www.eecis.ud...
// // libieeep1788 // // An implementation of the preliminary IEEE P1788 standard for // interval arithmetic // // // Copyright 2013 - 2015 // // <NAME> (<EMAIL>) // Department of Computer Science, // University of Wuerzburg, Germany // // Licensed under the Apache License, Ve...
#include "SND_SoundEngine.h" #include "SYS_Threading.h" #include "SYS_Main.h" #include "SND_Main.h" #include "SYS_FileSystem.h" #include "CSlrString.h" //#define WRITE_AUDIO_OUT_TO_FILE CSoundEngine *gSoundEngine; #if defined(WRITE_AUDIO_OUT_TO_FILE) FILE *fpMainAudioOutWriter; #endif //static int getOneSampleSin()...
//http://docs.opencv.org/2.4/doc/tutorials/core/mat-mask-operations/mat-mask-operations.html#maskoperationsfilter #include <stdio.h> #include <string> #include <opencv2/opencv.hpp> #include <highgui.h> using namespace std; using namespace cv; // The tutorial shows how to manually do this, we later use filter2D void ...
#include "DSCalibrator.h" #include "DSException.h" #include <iostream> using namespace cv; using namespace std; DSCalibrator::DSCalibrator(std::vector<cv::Mat> left_images, std::vector<cv::Mat> right_images, int board_width, int board_height, float square_size) { if (left_images.size() != right_images.size()){ th...
// Copyright (c) 2016-2021 FRC Team 3512. All Rights Reserved. #pragma once #include <units/length.h> #include <units/time.h> #include <wpi/math> // Includes definition for Talons and etc that connect to the RoboRIO /* Order of constants: * > Motor IDs * > Solenoid Ports * > Limit switches * > Distance per puls...
#include "small_vector.h" #define BOOST_TEST_MODULE svTest #include <boost/test/unit_test.hpp> #include <boost/test/floating_point_comparison.hpp> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <string> #include <sstream> #include <iostream> #include <vector> using name...
/*------------------------------------------------------------------------------ * * Author: <NAME> * Email: <EMAIL> * Status: Development * Date: 08/27/21 * Description: Implementation of kdv PDE using complex physical space values * ---------------------------------------------------------...
/* * \author <NAME> - DESY */ #ifndef HTBDAQ_DATA_STANDALONE #include "EventFilter/CastorRawToDigi/interface/CastorMergerData.h" #else #include "CastorMergerData.h" #endif #include <cstring> #include <cstdio> #include <algorithm> CastorMergerData::CastorMergerData() : m_formatVersion(-2), m_rawLength(0), m_rawCon...
/* Copyright (C) 2016 <NAME>. All Rights Reserved. * Written by <NAME> (<EMAIL>) This file is part of Kung Foo Barracuda. Kung Foo Barracuda 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 th...
#include <iostream> #include <utility> #include "map" #include "vector" #include "fstream" #define String std::string #define Vector std::vector const std::map<String, int> keyword_map = {{"if", 1}, {"else", 2}, {"while", 3}, ...
/////////////////////////////////////////////////////////////////////////////// // RsCamera.cpp // Local includes #include "RsCamera.h" #include "MtMath.h" #include "ApConfig.h" #include "BtBase.h" #include "RsUtil.h" /////////////////////////////////////////////////////////////////////////////// // Constructor RsCa...
// Copyright 2020 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 (c) 2019 <NAME> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <cstdlib> #include <vector> #include "delfem2/dtri2_v2dtri.h" // -------------- #include <GLFW/glfw3.h> #include "delfem2/opengl/glfw/viewer_glfw...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "dbmanager/dbmanager.h" #include <QChart> #include <QChartView> #include <generategraph.h> #include <QLineSeries> #include <QLayoutItem> #include <QValueAxis> #include <vector> #include <utility> using std::vector; using std::pair; MainWindow::MainWindow(...
#include <iostream> #include "encrypterror.h" #include "encryptpasswordhandle.h" #include <termios.h> // This are from the getopt (unistd) extern int optind, opterr; extern char *optarg; const char *VERSION = "Version 0.1"; namespace { int getch() { int ch; struct termios t_old, t_new; tcgetattr(STDIN_FILE...
#include <gpio.h> #include <clocks.h> #include <tasks.h> #include <wdt.h> #ifdef __MSP430_HAS_USCI__ #include <usci_uart.h> #else #include <timer.h> #include <soft_uart.h> #endif #include <io.h> #include <adc.h> typedef VLOCLK_T<> VLO; typedef DCOCLK_T<> DCO; typedef ACLK_T<VLO> ACLK; typedef MCLK_T<DCO> MCLK; typedef...
// Programa de prueba de la clase ModbusServe #define TITULO "ModbusRTU: entradas analógicas y digitales del 14 al 20" #include <iostream> #include <iomanip> #include <vector> #include "Mensaje.hpp" #include "ModbusRTU.hpp" int pruebas = 0; int fallos = 0; #define ID_DEV 54 void testea(ModbusRTU &mbs, std::stri...
// dear imgui - standalone example application for Remote // If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp. #include "imgui.h" #include <chrono> #include <thread> void ImImpl_RenderDrawLists(ImDrawData* draw_data) { // @RemoteImgui begin ImGui::RemoteDraw(draw...
#include <Stage.h> const float pi=3.14; // API void StageManager::switch_touch(short mode){ touch_mode = mode; } void StageManager::pwm_send(short k, int voltage){ if(voltage == 0) pwm->setPWM(k, 4095, 0); else pwm->setPWM(k, 0, voltage); int b = map(voltage, 0, 4095, 0, 255); dock_color(k, stage_l...
// // Original Author: <NAME> // // Copyright 2009 Spielberg Family Center for Applied Proteomics // Cedars Sinai Medical Center, Los Angeles, California 90048 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You m...
#include "../../src/GUI.h" Vector2 window = {470, 1080}; Vector2 center = {window.x / 2, window.y / 2}; Color focusCol = GRAY; Color backCol = BLACK; std::vector< std::string > notification(1, "Notify!"); int spacing = 100; int fps = 10; class EventHandler : public NoGUI::Listener { void onNotify(std::shared_ptr< No...
#include <iostream> #include <librealsense2\rs.hpp> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; float get_depth_scale(rs2::device dev); static void get_field_of_view(const rs2::stream_profile& stream); rs2_stream find_stream_to_align(const std::vector<rs2::stream_profile>& streams); int mai...
/* IZ3D_FILE: $Id$ * * Project : iZ3D Stereo Driver * Copyright (C) iZ3D Inc. 2002 - 2010 * * $Author$ * $Revision$ * $Date$ * $LastChangedBy$ * $URL$ */ // DX9ShaderAnalyzingTest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <windows.h> #include <tinyxml.h> #include <ios...
/// \file /// \brief This file implements a node that publishes cmd_vel for making the turtlebot /// translate /// /// PARAMETERS: /// ~frac_vel(double) : Fraction of the maximum velocity to use /// max_rot_vel_robot(double) : Maximum rotation velocity of the robot /// /// PUBLISHES: /// cmd_vel (geometry_msgs/Twist)...
//========= Copyright Valve Corporation, All rights reserved. ============// #include "movieobjects/timeutils.h" #include "tier0/dbg.h" #include "mathlib/mathlib.h" #include <math.h> //////////////////////////////////////////////////////////////////////////////////////// // // DmeFramerate_t // // exact (rational...
#define HANDMADE_MATH_IMPLEMENTATION #define HANDMADE_MATH_NO_SSE #include "HandmadeMath.h" #define GLFW_INCLUDE_NONE #include <GLFW/glfw3.h> #include "flextgl/flextGL.h" #define SOKOL_IMPL #define SOKOL_GLCORE33 #include "sokol_gfx.h" #include <stdlib.h> #include <stdio.h> #include <sdf-shader.hpp> #include <iostream>...