text
stringlengths
3.08k
22k
/* Motivation: given an connected tree G(V,V-1), perform the following queries: - query_path(u, v): get the sum of the weights of the edges on path from u to v. - update_path(u, v, x): increase the weights of the path from u to v with x. --- A ideia é decompor a árvore em ramos disjuntos (chains),...
/** * Wunderdog koodauspähkinä kesä 2015 - Sanojen muhkeus * Author: <NAME>" Viitanen / G-Works Oy * * This code requires file "alastalon_salissa.txt" to be in the working directory * In this file, the charset is changed to ISO-8859-1 or ISO-8859-1 to get rid * of multibyte characters (äöå). * You can do this by...
//++ BulliT #include <VGUI_HeaderPanel.h> #include <VGUI_TablePanel.h> #include <VGUI_LineBorder.h> #include <VGUI_Label.h> #include <VGUI_Button.h> #include <VGUI_ActionSignal.h> #include <VGUI_TextGrid.h> #include <VGUI_TextEntry.h> #include <VGUI_EtchedBorder.h> #include <VGUI_LoweredBorder.h> #include "VGUI_Scroll...
// HFE format for HxC floppy emulator: // http://hxc2001.com/download/floppy_drive_emulator/SDCard_HxC_Floppy_Emulator_HFE_file_format.pdf #include "SAMdisk.h" // Note: currently only format revision 00 is supported. #define HFE_SIGNATURE "HXCPICFE" struct HFE_HEADER { char header_signature[8]; uint8_t f...
#include "wav_logger.hpp" #include <filesystem> #include <ctime> // Wav writing code based on a post by user Duthomhas on http://www.cplusplus.com/forum/beginner/166954/ // Retrieved on October 23, 2019 // Fixed the data chunk size value, based on WAVE format documenatation at http://soundfile.sapp.org/doc/WaveForm...
#include <QtGui> #include <QMessageBox> #include <QImage> #include <QDir> #include <QStringList> #include <QTime> #include <QFileDialog> #include <QFile> #include <QStatusBar> #include "BenchmarkMainWindow.h" #include <GL/GLee.h> BenchmarkMainWindow::BenchmarkMainWindow() : MainWindow( false ) { this->s...
#include <math.h> /* Needed for the ceil() prototype */ #include "mex.h" #include <cstdio> #include <cmath> #include <iostream> #include <fstream> #include <vector> #include "fibheap.h" using namespace std; class HeapNode : public FibHeapNode { double N; long int IndexV; public: HeapNode() : FibHeapNode(...
#include "Enemy.h" #include <iostream> Enemy::Enemy(){ } Enemy::Enemy(SDL_Renderer *renderer, int _type, List<SDL_Point> newPath) : type(_type), path(newPath), gap(0), realPosition(path[0]), relativePosition(0) { int animSpeed, animWidth; std::string upLocation, downLocation, leftLocation, rightLocation; s...
/* This extends the example in sample/trimesh_sdl.h. It loads the mesh specified in the command line and shows it. Navigate around the object with WASD (doom-like) or arrow modes. (wheel, or PGUP, PGDOWN, moves vertically) [F1] changes rendering style. [SPACE] toggles trackball modes. This example shows: - th...
/** * @file cloud_bridge_server.cpp * @date 2021-01-28 * @author <NAME> * @brief * Transfer ROS2 message to cloud using ZeroMQ * @remark * @copyright * LGE Advanced Robotics Laboratory * Copyright(C) 2020 LG Electronics Co., LTD., Seoul, Korea * All Rights are Reserved...
/* Author: <NAME>, <NAME> Date: 05-Aug-2014 =============================================================================== Copyright (c) 2011, School of Computing, National University of Singapore. All rights reserved. Project homepage: http://www.comp.nus.edu.sg/~tants/gdel3d.html If you use gDel3D ...
/* Copyright 2016 Google Inc. All Rights Reserved. Author: <EMAIL> (<NAME>) Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ /* Tool for generating optimal backward references for the input file. Uses sais-lite library for building suffix array. ...
/* * =============================================================== * Description: Neural net inference implementation * * Author: <NAME>, <EMAIL> * <NAME>, <EMAIL> * * Copyright (C) 2015, Cornell University, see the LICENSE file * for licensing agreement * ==...
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Asymmetry class implementation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ #include "Asymmetry.hxx" #include <string> #include <algorithm> #include <vector> #include <array> #include <stdlib.h> #include <stdio.h> #include "TF1.h" #in...
//=====================================================================// /*! @file @brief SCI (UART) サンプル @n RX64M, RX71M: @n 12MHz のベースクロックを使用する @n     P07 ピンにLEDを接続する @n SCI1 を使用する @n RX65N (Renesas Envision kit RX65N): @n 12MHz のベースクロックを使用する @n     P70 に接続された LED を利用する @n SCI9 を...
/* * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.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 ...
#include <fstream> #include <vector> #include <string> #include <iostream> #include <sstream> #include <stdexcept> #include <math.h> #include <assert.h> typedef std::vector<std::vector<float > > image_type; image_type vals(float v,int w,int h) { return image_type(h,std::vector<float>(w,v)); } image_type read_pgm(st...
#include "preview_system.hpp" #include "chunk_system.hpp" #include "command.hpp" #include "room.hpp" #include "util/mutex.hpp" #include <cassert> // static const char *LOG_PREVIEW_SYSTEM = "PreviewSystem"; static const char *LOG_PREVIEW_SYSTEM_LAYER = "PreviewSystemLayer"; PreviewSystemLayer::PreviewSystemLayer(Previ...
#include "DQM/SiStripCommissioningSources/interface/LatencyTask.h" #include "DataFormats/SiStripCommon/interface/SiStripHistoTitle.h" #include <DataFormats/SiStripDetId/interface/SiStripDetId.h> #include "DQMServices/Core/interface/DQMStore.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "DataForm...
//================================================================================================== // Writes Embedded data into FTPC SlowSimulator Sequences (as in StFtpcSlowSimMaker/StFtpcRawWriter.cc) // // Author: <NAME> (<EMAIL>) //==================================================================================...
// ------------------------------------------------------------- // CUDPP -- CUDA Data Parallel Primitives library // ------------------------------------------------------------- // $Revision: $ // $Date: $ // ------------------------------------------------------------- // This source code is distributed under the te...
#include "Model.h" #include <gl_core_4_4.h> #include "StatVariables.h" #include <algorithm> Model::Model() { fbxFile = NULL; } Model::~Model() { if (fbxFile != nullptr) { //Clean up vertex data for each mesh for (unsigned int i = 0; i < fbxFile->getMeshCount(); ++i) { FBXMeshNode* mesh = fbxFile->getMeshB...
// Copyright 2015 <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/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
/************************************************** Simulation of the 1D heat equation: the diffusion of temperature u(x,t) through a solid rod. The finite-difference method is used for spacial discretization. Stepsize dx is uniform. Euler's method ("RK1") is used for temporal discretization. Stepsize dt is constant. ...
/** * @file GConstrainedFPTTest.cpp */ /******************************************************************************** * * This file is part of the Geneva library collection. The following license * applies to this file: * * ------------------------------------------------------------------------------ * Lic...
/* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * @(#)search.cpp 1.8 05/11/14 */ #include "installerDLL.h" #include <string> /** * Search directory tree for JVMs where the bridge can be installed */ void Installer::searchD...
#include <iostream> #include <future> #include "llvm/Support/CommandLine.h" #include "cxx-langstat/Options.h" #include "cxx-langstat/Driver.h" #include <dirent.h> using Twine = llvm::Twine; using StringRef = llvm::StringRef; using namespace clang::tooling; //-------------------------------------------------------...
/* * 3-D gear wheels. This program is in the public domain. * <NAME> */ /* Conversion to GLUT by <NAME> */ /* Conversion to Qt by <NAME> */ #include <QtGui> #include <QtOpenGL> #include <math.h> #include "glwidget.h" #include "qtglut.h" /** Draw a gear wheel. You'll probably want to call this function when ...
#include "Ant.h" #include <string> /** * @file Ant.h/cpp * @brief Ant agent for the ACS heuristic. */ void Ant::init(unsigned _id, int _n, double* _best, std::vector<int>* _bestR, doubleMap* _pher, doubleMap* _deltaPher, doubleMap& _dist, Utils* _u, double _a, double _b, double _ler, double _q) { ...
#include "../../sba/extern/ros_sba/include/sba/sba.h" #include "../../sba/extern/ros_sba/include/sba/sba_file_io.h" #include "../../sba/sba_base.h" #include "../../sba/sba_openmvg.h" #include <time.h> #include <opencv2/core/core.hpp> #include <opencv2/core/eigen.hpp> #include <eigen3/Eigen/Core> using namespace sba...
#include "mavcommunicator.h" MavCommunicator::MavCommunicator(QObject *parent) : QObject(parent) { const auto infos = QSerialPortInfo::availablePorts(); for (const QSerialPortInfo &info : infos) qDebug() << info.portName(); QString portName("COM6"); serial.setPortName(portName); serial.setB...
#include <tf/transform_datatypes.h> #include "tuw_marker_slam_node.h" #include "tuw_marker_slam/ekf_slam.h" using namespace tuw; int main ( int argc, char **argv ) { ros::init ( argc, argv, "slam" ); ros::NodeHandle n; SLAMNode slam ( n ); ros::Rate rate ( 10 ); while ( ros::ok() ) { ///...
#include <windows.h> #include <windowsx.h> #include <atlbase.h> #include <exdisp.h> #include <mshtmhst.h> #include <fstream> #include <memory> #include "resource.h" #include "filemapping.h" #include "blob.h" #include "bitmap.h" #include "synchronization.h" #include "basewindow.h" #include "olesite.h" #include "eventsin...
/* 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 version. This program is distributed in the hope that it wi...
#include "MultiThreadingExample.h" #include <CommonGraphicsAppInterface.h> #include <CommonRenderInterface.h> #include <CommonExampleInterface.h> #include "CommonCameraInterface.h" #include "LinearMath/btTransform.h" #include <CommonGUIHelperInterface.h> #include "../RenderingExamples/TimeSeriesCanvas.h" #include <s...
/** Copyright (c) 2013, <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, this list of conditions and the following dis...
#include "ros/ros.h" #include "arm_controller/arm_controller.h" #include "controllers/armMove.h" #include "controllers/armAngles.h" #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <getopt.h> #include <vector> #include "arm_controller/arduino-serial-lib.h" #defi...
/* * Copyright (c) 2010 <NAME>, <NAME>, <NAME> * * Permission to use, copy, modify, and 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...
// // This class stores the name and related // hardware mapings for a module // #include "CalibFormats/SiPixelObjects/interface/PixelModuleName.h" #include <string> #include <iostream> #include <sstream> #include <fstream> #include <cctype> #include <cstdlib> using namespace std; using namespace pos; PixelModuleNam...
#include <rom/rtc.h> #include "myGlobals_definition.h" #include "Environment_definitions.h" #include "Utils/Utils.h" #include "MQTT/MQTT.h" #include "EEPROM/EEPROM.h" // ESP32 Reset reason codes //char * char_reset_reason(byte reason) String char_reset_reason(byte reason) { switch (rtc_get_reset_reason(reason)) {...
// dllmain.cpp : Defines the entry point for the DLL application. #include <Windows.h> #include <tchar.h> #include <ConsoleInputHandler.h> #include <json.hpp> #include <fstream> #include <map> #include <vector> #include <any> #include <filesystem> std::map<std::string, std::vector<std::any>> jsonMap; void launchExe...
// --------------------------------------------------------------------------- // // The general purpose cross platform C/C++ framework // // S x A c c e l e r a t e // // Home: https://www.sxlib.de // License: Apache 2 // Authors: see src/AUTHOR...
#include "Input.h" #include <HFWindow.h> #pragma comment(lib, "dinput8.lib") namespace Input { ComPtr<IDirectInput8> native_dinput_object; bool initialized; void Initialize() { if(!initialized){ HRESULT hr = DirectInput8Create(GetModuleHandle(0), 0x0800, IID_ID...
#include <stdlib.h> #include <math.h> #include <vector> #include <queue> #include <mutex> #include <algorithm> #include <iostream> #include "Application.h" #include "Core/Log.h" #include "Core/File.h" #include "render/context.h" #include "imgui_support.h" #include "Core/Path.h" #include "Core/StopWatch.h" #include ...
#include "nrncore_utils.h" #include "nrncore_write/callbacks/nrncore_callbacks.h" #include "nrnconf.h" #include <cstdlib> #include "nrndae_c.h" #include "section.h" #include "hocdec.h" #include "nrnsection_mapping.h" #include "vrecitem.h" // for nrnbbcore_vecplay_write #include "parse.hpp" #include <string> #include <...
/* Copyright (c) 2013, 2015 <NAME> <<EMAIL>> * * 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. */ #include "pose-widget.hpp" #include "compat/time...
#include "RenderSystem.h" #include "Renderable.h" #include "Transform.h" #include "Coordinator.h" #include "Camera.h" #include "Transform.h" #include "Collision.h" #include <cmath> #include "bgfx/bgfx.h" #include "bgfx/platform.h" #include "bx/math.h" #include <string> #include <iostream> #include <bitset> struct P...
#include "ogg.h" #include <stdio.h> #include <stdlib.h> #include <math.h> static ogg_int16_t convbuffer[4096]; /* take 8k out of the data segment, not the stack */ int OggDecoder::eos = 0; int OggDecoder::convsize=4096; ogg_sync_state OggDecoder::oy; ogg_stream_state OggDecoder::os; ogg_page OggDecoder::og...
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) #define WINDOWS_LEAN_AND_MEAN // Please, not too much windows shenanigans #endif // Standard libs #include <string> #include <sstream> #include <boost/filesystem.hpp> #include <boost/program_options.hpp> #include "loggers.h" #includ...
// Copyright (c) 2009-2010 <NAME> // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "infinitum.h" #include "chain.h" #include <boost/foreach.hpp> using namespace st...
#include <cassert> #include <cstdint> #include <filesystem> #include <iostream> #include <random> #include <stdexcept> #include <string> #include <vector> #include <QDirIterator> #include <QImage> #include "geometrize/shaperesult.h" #include "geometrize/bitmap/bitmap.h" #include "geometrize/bitmap/rgba.h" #include "g...
// // Created by bokoch on 12/27/17. // #include "TreeExpresssion.h" using namespace std; Expression::Expression(string& expression) { this->expression = expression; srand(time(NULL)); } bool Expression::isLetter(char symbol) { return (symbol >= 'a' && symbol <= 'z') || (symbol >= 'A' && symbol <= 'Z') ...
/* Author: <NAME> * Website: https://www.alexbod.com * Details: https://www.alexbod.com/hopfield-network/ * License: The GNU General Public License, version 2 * hopfield.c: Hopfield network in C */ #include <stdlib.h> #include <stdio.h> #include <unistd.h> /* Convert points */ #define ZERO_OR_ONE(x...
#include <pangolin/pangolin.h> #include <pangolin/video/video_record_repeat.h> #include <pangolin/gl/gltexturecache.h> #include <pangolin/gl/glpixformat.h> #include <pangolin/handler/handler_image.h> #include <pangolin/utils/file_utils.h> #include <pangolin/utils/timer.h> #include <pangolin/gl/gl.h> #include <pangolin/...
/* Lakrits.cpp - Client for transporting data somewhat safely across a serial connection, using the lakrits communications protocol. The protocol supports basic addressing and error checking, but that's about it. For the latest source and documentation, visit: https://github.com/jpettersson/lakrits Copyright 2011 <N...
#include "database.h" #include <algorithm> #include <tuple> #include <fstream> #include <iostream> #include "json/json.hpp" void Database::insert_if_unique(std::vector<std::string>& list, std::vector<bool>& end, const std::string& name) { if (std::find_if(list.begin(), list.end(), [name](const std::string& item){ ...
// Created by <NAME> on 25.04.2018 // Copyright 2018 ETH Zurich #undef NDEBUG #include <HYPRE_struct_ls.h> #include <util/logger.h> #include <cassert> #include <iostream> #include <stdexcept> #include "hypre.h" #include "util/logger.h" #define EV(x) (#x) << "=" << (x) << " " struct Hypre::Imp { struct HypreData ...
/* Custom Libraries */ #include "../include/stereoVision.h" using namespace std; using namespace Eigen; /* Global Variables */ string left_filepath = "../../stereoVision/src/images/left.png"; string right_filepath = "../../stereoVision/src/images/right.png"; // Stereo Camera Intrinsics params double fx = 718.856, f...
#include "Cube.h" Cube::Cube(ID3D11Device* dxdevice, ID3D11DeviceContext* dxdevice_context) : Model(dxdevice, dxdevice_context) { std::vector<Vertex> vertices; std::vector<unsigned> indices; //Front face Vertex vFront0, vFront1, vFront2, vFront3; //Top face Vertex vTop0, vTop1, vTop2, vTop3; //Bottom face V...
/******************************************************************************* * This file is part of the "Enduro2D" * For conditions of distribution and use, see copyright notice in LICENSE.md * Copyright (C) 2018-2020, by <NAME> (<EMAIL>) *************************************************************************...
#include"stdafx.h" #include"function1.h" double sigmoid(double x){ return 1/(1+exp(-x)); } double diff_sigmoid(double x){//sigmoid求导 return sigmoid(x)*(1-sigmoid(x)); } double ReLU(double x){ return max(x,0.0); } double diff_ReLU(double x){//ReLU求导 return x>0?1:0; } void update_dif...
/* routecheck - check the route to a destination and report which of the specified routes were encountered. This was designed to check for which gateway is active in a redundantly linked environment. This is a functional example of the Windows IcmpSendEcho functions to trace a route. MIT License Copyright (c) ...
#include <getopt.h> #include <stdio.h> #include <time.h> #include <unistd.h> #include <stdlib.h> #include <pthread.h> #include <fcntl.h> #include <cmath> #include <semaphore.h> #include <sys/stat.h> #include <sys/wait.h> #include <sys/sysinfo.h> #include <gmpxx.h> #define OMP_MODE 1 #define THREAD_MODE 2 #define PROC_...
#include<bits/stdc++.h> // g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define EPS 1e-6 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(),v.e...
/* showfont: An example of using the SDL_ttf library with 2D graphics. Copyright (C) 2001-2016 <NAME> <<EMAIL>> 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 gra...
/* purpose: solve transposition cipher with 6 cols (cexercise6) author: <NAME> columns are jumbled up (as with typical columnar transposition cipher) 1 guess numCols 2 for each guested numCol 3 workout colLengths 4 divide into each cols 5 find perms 6 choos...
#include "pch.h" #include "ObjectManagerView.h" #include "ObjectManager.h" #include "resource.h" #include <algorithm> #include "SortHelper.h" #include "NtDll.h" #include "ObjectType.h" #include "ObjectTypeFactory.h" #include "SecurityInfo.h" CObjectManagerView::CObjectManagerView(IMainFrame* frame) : CViewBase(frame) ...
#include <client/graphical/opengl/gl_terrain_renderer.hpp> #include <algorithm> #include <cassert> #include <client/graphical/TextureOpener.hpp> #include <client/graphical/opengl/gl_renderer.hpp> #include <client/graphical/gfx_service.hpp> #include <cmath> #include <common/logger.hpp> #include <iterator> #include <con...
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
#include "map.h" #include "stone.h" #include <vector> #include <iostream> #include <sstream> #include <stdio.h> #include <string.h> #include "idxXYZ.h" extern std::vector<idxXYZ> data; extern int totalNumberOfComparisons; void envMap::insertStone(Stone& toBeInserted){ stonesInMap.push_back(&toBeInserted); if (to...
/******************************************************************************\ * simplec.c - Simple TCP/UDP client using Winsock 1.1 * * This is a part of the Microsoft Source Code Samples. * Copyright 1996 - 2000 Microsoft Corporation. * All rights reserved. * This source code is only ...
#include <ros/ros.h> #include <pcl/visualization/pcl_visualizer.h> #include <pcl/io/pcd_io.h> #include <pcl/io/vtk_lib_io.h> #include <pcl/common/transforms.h> #include <vtkVersion.h> #include <vtkPLYReader.h> #include <vtkOBJReader.h> #include <vtkTriangle.h> #include <vtkTriangleFilter.h> #include <vtkPolyDataMapper....
/*************************************************************************** * $Id: DetectorReader.cxx,v 1.24 2007/12/27 21:55:04 perev Exp $ * Author: <NAME> *************************************************************************** * Description: Detector Factory * * * change log * 02-Jul-99 MJL add...
#include <qtphotography.h> N::ColorGroups:: ColorGroups ( QWidget * parent , Plan * p ) : TreeDock ( parent , p ) { WidgetClass ; Configure ( ) ; } N::ColorGroups::~ColorGroups(void) { } void N::ColorGroups::Configure(void) { NewTreeWidgetItem ( head ...
#include "plankton.hpp" #include <cstdlib> #include <csignal> #include <sys/wait.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <set> #include <list> #include "stats.hpp" #include "config.hpp" #include "emulationmgr.hpp" #include "lib/fs.hpp" #include "lib/ip.hpp" #include "lib/logger.hpp" #...
//written by <NAME> //<NAME> 2007 //converts ISODate/Time strings to UTC decimals //Also can output the utc Decimals as MSDate integers #include "TimeConverter.h" #include <ctime> #include <iostream> #include <math.h> #include <cstdio> using namespace std; #define ISO_DATE "%d-%d-%dT%d:%d:%d" //These are needed to ...
// MIT License // Copyright (c) 2020 xadrianzetx // 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, mer...
// Copyright 2015, University of Freiburg, // Chair of Algorithms and Data Structures. // Author: <NAME> (<EMAIL>) #include <gtest/gtest.h> #include <cstdio> #include <fstream> #include "../src/engine/Engine.h" TEST(EngineTest, joinTest) { Engine e; vector<array<Id, 2>> a; a.push_back(array<Id, 2>{{1, 1}}); a...
#define GUIObject_DismissOnMessage // Dismiss "Caution" warning on setOnMessage method #include "GUICore.hpp" #include "GUIWidgets.hpp" #include "WidgetLegacyMenu.hpp" class MainUnloadEvent : public GUIEvent { virtual long Event(GUIObject *){ return GUICore::quit(); } }; class MainPaintEvent : public GUIPaintEve...
#pragma once #include "../languagebackend/languagebackend.hpp" #include "language.hpp" #include "lua.hpp" // vendored lua void hook(lua_State* L, lua_Debug *ar); extern "C" { static int c_getmessage(lua_State* L); static int c_subscribe(lua_State* L); static int c_unsubscribe(lua_State* L); static int c_override...
/* * Copyright 2022 <NAME> * * Licensed under the Apache License, Version 2.0 or MIT. * - http://www.apache.org/licenses/LICENSE-2.0 * - http://opensource.org/licenses/MIT */ #include <fstream> #include <gtest/gtest.h> #include <nlohmann/json.hpp> #include <fcntl.h> #include <inttypes.h> #include <s...
#include <algorithm> #include <map> #include <unordered_map> #include "data_structure.hpp" #include "csv.h" #include "gzstream.h" template<class T> using CountMap = std::map<T, size_t>; template<class T> std::pair<CountMap<T>, CountMap<T>> find_indices(CountMap<T> counts) { CountMap<T> firsts; CountMap<T> l...
/* * BLEUUID.cpp * * Created on: Jun 21, 2017 * Author: kolban */ #include <esp_log.h> #include <string.h> #include <sstream> #include <iomanip> #include <stdio.h> #include "BLEUUID.h" static char TAG[] = "BLEUUID"; /** * @brief Create a UUID from a string. * Create a UUID from a string. There will be t...
#ifdef WIN32 #define _CRT_SECURE_NO_WARNINGS 1 #endif // WIN32 #include <Utopia/Core/Image.h> #define STB_IMAGE_IMPLEMENTATION #include "_deps/stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "_deps/stb_image_write.h" #include <UGM/point.hpp> using namespace Ubpa::Utopia; using namespace Ubpa; using na...
/************************************************************************* * Copyright (c) 2015, Synopsys, Inc. * * All rights reserved. * * * * Redistribution and...
#include <cstdio> #include <QtCore/QEvent> #include <QtCore/QDir> #include <QDebug> #include <QtWidgets/QFileDialog> #include <nodes/DataModelRegistry> #include "ImageDDSSubModel.hpp" #include "PixmapData.hpp" using namespace cv; cv::Mat idlTocv(const dds::core::array<dds::core::array<HelloWorldImg::RGB, He...
//======== (C) Copyright 2002 <NAME> All rights reserved. ========= // // The copyright to the contents herein is the property of <NAME>. // The contents may be used and/or copied only with the written permission of // <NAME>, or in accordance with the terms and conditions stipulated in // the agreement/contract u...
/* License: Zlib see https://github.com/cam900/vgsound_emu/blob/main/LICENSE for more details Copyright holder(s): cam900 Konami K053260 core It's one of Konami's custom PCM playback chip with CPU to CPU communication feature, and built in timer. It's architecture is successed from K007232, but it features...
// g++ -std=c++98 -O2 -s -static-libgcc -static-libstdc++ -o zuckui zuckui.cc -Wl,-Bstatic -lfltk -Wl,-Bdynamic -lcurl -lmpv -DUSE_MPV -lgdi32 -lcomctl32 -lole32 -luuid // g++ -std=c++98 -O2 -s -static-libgcc -static-libstdc++ -o zuckui zuckui.cc -Wl,-Bstatic -lfltk -Wl,-Bdynamic -lcurl -L"C:\Program Files (x86)\VideoL...
#include "WProgram.h" #include <stdarg.h> #include <stdio.h> static void myprint(const char* msg, ...) { va_list va; va_start(va, msg); char buf[512]; vsprintf(buf, msg, va); usb_serial_write(buf, strlen(buf)); va_end(va); } inline static float clamp(float val) { if ( val > 1 ) { val = 1; } else if ( val ...
//======================================================================= // Copyright <NAME> 2011-2016. // Distributed under the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //======================================================================= #include "Variabl...
// ------------------------------------------------------------- // a simple Arduino Teensy3.1 CAN driver // by teachop // #include "FlexCAN.h" #include "kinetis_flexcan.h" static const int txb = 8; // with default settings, all buffers before this are consumed by the FIFO static const int txBuffers = 8; static const ...
/* * Copyright 2008 <NAME> * For license terms, see the file COPYING along with this library. */ #include <stdio.h> #include <stdarg.h> #include "spwin32port.hpp" #include <lm.h> #include <tlhelp32.h> /* Windows doesn't have writev() but does have WSASend */ int spwin32_writev(SOCKET sock, const struct iovec *ve...
/*<std-header orig-src='shore'> $Id: log_exceed.cpp,v 1.6 2010/09/21 14:26:28 nhall Exp $ SHORE -- Scalable Heterogeneous Object REpository Copyright (c) 1994-99 Computer Sciences Department, University of Wisconsin -- Madison All Rights Reserved. Permission to use, copy, modify and distribut...
#include "Localizer.h" #include <tf/transform_broadcaster.h> #include <math.h> #include <time.h> #include <stdlib.h> #define PI 3.14159265 #define NUM_POINTS 1200. Particle::Particle(double x, double y, double theta) { this->x = x; this->y = y; this->theta = theta; weight = .5; } void Particle::upd...
// // "$Id: code.cxx 5935 2007-07-23 21:14:48Z spitzak $" // // Code output routines for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2006 by <NAME> and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as publis...
// Adaption of EthernetWebServer_SSL for Wio Terminal /**************************************************************************************************************************** WebClient_SSL.ino - Dead simple SSL WebClient for Ethernet shields EthernetWebServer_SSL is a library for the Ethernet shields to r...
#include <iostream> #include <QApplication> #include <QGraphicsScene> #include <QGraphicsView> #include <Charstrings.hpp> #include <Geometry.hpp> #include "Demo.hpp" #include "Glyphs.hpp" using namespace csmerge; using namespace csmerge::geometry; using namespace std; static void printCharstring(const Charstring& c...
#include <node.h> #include <Python.h> #include "py_object_wrapper.h" #include "utils.h" #include "datetime.h" #include "time.h" Persistent<FunctionTemplate> PyObjectWrapper::py_function_template; void PyObjectWrapper::Initialize() { HandleScope scope; PyDateTime_IMPORT; Local<FunctionTemplate> fn_tpl = ...
/*! * mixed_initiative_teleop_node.cpp * Copyright (c) 2014, <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 copyri...