text
stringlengths
3.08k
12.5k
#include "mbed.h" #include "FATFileSystem.h" #include "simple-mbed-cloud-client.h" #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" using namespace utest::v1; // Default storage definition. BlockDevice* bd = BlockDevice::get_default_instance(); FATFileSystem fs("sd", bd); stat...
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
#include "foo_musicbrainz.h" #include "FileTagMap.h" #include "Medium.h" #include "Release.h" #include "Track.h" using namespace foo_musicbrainz; using pfc::string8; Tag::Tag(const Release &release, const Medium &medium, const Track &track) { write_general(release, medium, track); write_date(release); ...
/* * GraphAlgorithms.cpp * * Created on: Oct 13, 2018 * Author: erik */ #include "GraphAlgorithms.hpp" #include <algorithm> #include <cassert> #include <map> #include <queue> #include <set> Graph generateConnectedComponents(const Vertex& v, const Direction d) { std::set<const Vertex*> connectedVertice...
/* * Copyright (c) 2005, <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, di...
#include "Board.h" #include "Constants.h" #include <core\math\GameMath.h> #include <core\log\Log.h> #include "Map.h" #include <core\math\tweening.h> #include <renderer\sprites.h> #include <renderer\graphics.h> #include <base\InputSystem.h> #include <core\script\vm.h> #include <resources\ResourceContainer.h> #include "B...
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define INF 1 << 30 #define MOD 1000000007 #define rint(x) scanf("%d", &(x)) #define rlong(x) scanf("%lld", &(x)) #define SIZE 500100 #define l(x) x << 1 #define r(x) x << 1 | 1 #define m(x, y) (x + y) / 2 using namespace std; typedef long long ll; t...
/* ---------------------------------------------------------------------------- * GTDynamics Copyright 2020, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * See LICENSE for the license information * -------------------------------------------------------------------------- ...
/* * @brief Wavelet-Tree(ウェーブレット木) * @docs docs/wavelet-tree.md */ template< typename T, int MAXLOG > struct WaveletTree { struct Node { SuccinctIndexableDictionary sid; Node *ch[2]; Node() = default; Node(size_t length) : sid(length + 1), ch{nullptr} {} }; Node *root; Node *build(vecto...
/*Header-MicMac-eLiSe-25/06/2007 MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation eLiSe : ELements of an Image Software Environnement www.micmac.ign.fr Copyright : Institut Geographique National Author : <NAME> Contributors : <NAME>, <NAME>. [1] <NAME>, <NAM...
#define DEBUG_TYPE "mallocs_nonnull" #include <map> #include <queue> #include <set> #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/PostDominators.h" #include "llvm/Assembly/Writer.h" #include "llvm/Constants.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #i...
// 测试四:钻石型虚继承 //虚基指针所指向的虚基表的内容: // 1. 虚基指针的第一条内容表示的是该虚基指针距离所在的子对象的首地址的偏移 // 2. 虚基指针的第二条内容表示的是该虚基指针距离虚基类子对象的首地址的偏移 #pragma vtordisp(off) #include <iostream> using std::cout; using std::endl; /* 测试四:钻石型虚继承, 1. 没有采用虚继承的情况 > 存储二义性问题:顶层基类B在存储空间中出现了2份 1>class D size(48): 1> +--- 1> 0 | +--- (bas...
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
/* * Copyright (c) 2021 <NAME> https://gaztin.com/ * * 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 granted to anyone to use this software for any purpose, includin...
/////////////////////////////////////////////////////////////////////////////// // disks.hpp // // Definitions for two algorithms that each solve the // alternating disks problem. // // As provided, this header has four functions marked with // TODO comments. // You need to write in your own implementation of these ...
/**************************************************************************\ * Copyright (c) <NAME> & Gas Technologies AS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistribu...
/****************************************************************************** * * Project: OpenCPN * Purpose: Climatology Plugin * Author: <NAME> * *************************************************************************** * Copyright (C) 2016 by <NAME> * * ...
#include "ParabolaFit.h" #include <iostream> using namespace std; template <class T> T sqr( T t) {return t*t;} void ParabolaFit::addPoint(double x, double y) { hasWeights = false; addPoint(x,y,1.); } void ParabolaFit::addPoint(double x, double y, double w) { hasValues = false; hasErrors = false; Point p = ...
// RUN: %check_clang_tidy %s performance-faster-string-find %t // RUN: %check_clang_tidy -check-suffix=CUSTOM %s performance-faster-string-find %t -- \ // RUN: -config="{CheckOptions: \ // RUN: [{key: performance-faster-string-find.StringLikeClasses, \ // RUN: value: '::llvm::StringRef;'}]}"...
// // Created by <NAME> on 31/10/20. // #include <iostream> #include <vector> #include <stack> #include <queue> #include <map> #include <unordered_set> #include <tuple> #include <utility> #include <cassert> #include "coord.hpp" #include "sokoban.h" using namespace std; unordered_map<Move, Coord> moves = { {U...
//g++ testing_client.cc cache_resptimer.cc -o clresp.out -lboost_system -pthread -lcurl -ljsoncpp -Wextra -pedantic -Wall #include "cache.hh" #include <iostream> #include <functional> #include "h_depen/shutcall.hh" #include <random> #include <chrono> #include <ctime> #include <time.h> #include <algorithm> std::string ...
#include <ambisonix/AmbSource.h> static const unsigned short speedOfSound = 344; static const unsigned short maxDistance = 150; //================================================================================================= AmbSource::AmbSource( unsigned long sampleRate ) : _sampleRate( sampleRate ), ...
/** * Copyright (c) 2015, <NAME>, Quintelligence d.o.o. and contributors * All rights reserved. * * This source code is licensed under the FreeBSD license found in the * LICENSE file in the root directory of this source tree. */ #include <base.h> #include <qminer.h> ////////////////////////////////////////////////////...
/* Copyright (C) 2012-2013 - Voidious 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 granted to anyone to use this software for any purpose, including commercial a...
#include "mbed.h" #include "m3pi.h" #define MOTOR_MAX 0.4 #define MOTOR_MIN 0.05 m3pi m3pi; //static float voltage; //static float position; float position_of_line; InterruptIn button(p21); DigitalIn button_def(p21); Timeout timeout; /* int main() { m3pi.locate(0,1); m3pi.printf("Polol...
// Athena++ headers #include "hydro_diffusion.hpp" #include "../../athena.hpp" #include "../../athena_arrays.hpp" #include "../../mesh/mesh.hpp" #include "../../coordinates/coordinates.hpp" #include "../hydro.hpp" #include "../../eos/eos.hpp" //--------------------------------------------------------------------------...
#define BOOST_DISABLE_THREADS 1 #include "boost/spirit/core.hpp" #include "boost/spirit/tree/parse_tree.hpp" #include "boost/spirit/tree/ast.hpp" #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> #include <iostream> #include <stack> #include <functional> #include <string> using namespace std; u...
#include "testApp.h" #include "ofxMSALividOhmRGB.h" #include "Button.h" #include "VFader.h" #include "HFader.h" // for receiving midi data ofxMidiIn midiIn; // for sending midi data ofxMidiOut midiOut; // contains the midi config data msa::LividOhm64 ohmRGB; // contains image of the controller ofImage image; ...
#include "fcsdummymodule.h" #include "globalSettings.h" #include <log.h> #include <sstream> #include <limits> namespace airt { #include "interface/pozyxmodule.h" } using airt::FCSDummyModule; using airt::Log; using airt::StdMessage; using airt::StdNotification; FCSDummyModule::FCSDummyModule(const std::string &cmd...
//------------------------------------------------------------------------------ //! \file ARAModelUpdateController.cpp //! implementation of the host ARAModelUpdateControllerInterface //! \project ARA SDK Examples //! \copyright Copyright (c) 2018-2021, Celemony Software GmbH, All Rights Reserved...
/** * \file * \author <NAME> * \date 2014-08-29 * * \copyright * Copyright (c) 2012-2022, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * * ...
#include "FittedRmaxq.hh" namespace { /** The amount of data required before considering a state-action explored, including data generalized (and weighted) from nearby states. */ const double explorationthreshold = 1.0; /** An upper bound on the value of a state or state-action. */ const double ma...
#include "Qjets.hh" Qjets::Qjets(double zcut, double dcut_fctr, double exp_min, double exp_max, double rigidity) : _zcut(zcut), _dcut_fctr(dcut_fctr), _exp_min(exp_min), _exp_max(exp_max), _rigidity(rigidity), _dcut(-1.) { } bool Qjets::JetUnmerged(int num){ if(count(_merged_jets.begin(), _merged_jets.end(), num)...
/* * Copyright (c) 2010 .SE (The Internet Infrastructure Foundation) * 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 *...
/*Copyright (c) 2020 <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, sublicens...
#include <ctime> #include <cstdlib> #include <iostream> #include <array> #include <vector> #include <list> #include <string_view> #include <unordered_map> #include <numeric> #include <algorithm> #include <gtest/gtest.h> #include <extra_algorithm.h> #include <string_utils.h> #include "test_containers.h" class ESTDTe...
#include <iostream> #include <fstream> #include <ffw/graphics.h> #include <ffw/gui.h> #include <ffw/gui/backend/guibackendfinegraphics.h> ///============================================================================= class App : public ffw::GLRenderWindow { public: App(const ffw::RenderWindowArgs& args):GLRender...
#include "core/Util.h" #include "boost/iostreams/device/null.hpp" #include "boost/iostreams/stream.hpp" #include <algorithm> #include <fstream> #include <iostream> #include <random> RVO::Vector2 ToRVO(const vector_t& v) { return RVO::Vector2(static_cast<float>(v.x), static_cast<float>(v.y)); } vector_t FromRVO(con...
#include <unordered_map> #include "Item.h" std::unordered_map<std::string, ICON> icon_map{ {"melee", ICON::MELEE}, {"key", ICON::KEY }, {"explosives", ICON::EXPLOSIVE }, {"questitem", ICON::QUESTITEM }, {"tool", ICON::TOOL }, {"sniperrifle", ICON::SNIPERRIFLE }, {"assaultrifle", ICON::ASSAULTRIFLE }, {"remote...
/** * @file ahc009-a-6.cpp * @brief AHC009 Problem A - Robust Memory of Commuting Routes * @author <NAME> * @date 2022-03-26 * @copyright MIT License * @details https://atcoder.jp/contests/ahc009/tasks/ahc009_a */ // # Solution #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ran...
// libSNL - Simple Nurbs Library // Copyright <NAME>, Australia. // --------------------------------------- // 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...
#include "FrameBuffer.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "../tools/stb_image_write.h" FrameBuffer::FrameBuffer() { } FrameBuffer::FrameBuffer(const int _width, const int _height, const int _channel) : width(_width), height(_height), channel(_channel) { image_buffer = new unsigned char[width * heigh...
/** * @file proportional_controller.cpp * @author <NAME> (<EMAIL>) * @brief Proportional controller to land the vehicle on the landing pad * @version 0.1 * @date 05-01-2020 * * Copyright (c) 2020 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this softwa...
#include "MxMap.hpp" #include "MxComm.hpp" #include "Epetra_Map.h" MxMap::MxMap(size_t numGlobalIndices, RCP<MxComm> comm) : mComm(comm) { setBaseMap(numGlobalIndices); } MxMap::MxMap(size_t numGlobalIndices, size_t numLocalIndices, RCP<MxComm> comm) : mComm(comm) { setBaseMap(numGlobalIndices, numLocalIndices...
/*eLiSe06/05/99 Copyright (C) 1999 <NAME> eLiSe : Elements of a Linux Image Software Environment 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 yo...
#pragma once // not using standard header-guard in order to not pollute macro completion on GCL_TEST* #include <gcl_cpp/type_info.hpp> #include <gcl_cpp/test.hpp> #include <iostream> #include <vector> #include <functional> namespace gcl::test { struct type_info { struct variadic_template { static void procee...
#include "IParser.h" #include <type_traits> #include <string> #include <functional> #include <algorithm> constexpr const char descr_none[] = "Unknown parameter", descr_source_dir[] = "Path (absolute or relative) to a directory" " that contains shader source files", descr_outout_dir[] = "Path (absolute or...
/* ========================================= FCNPC - Fully Controllable NPC ---------------------- - File: Server.cpp - Author(s): OrMisicL =========================================*/ #include "Main.h" CSAMPRPCParams *pCreateNPCParams; extern logprintf_t logprintf; CServer::CServer() { // Reset inst...
#include "EventListWidget.h" #include "Fonts/Roboto_Light_36.h" #include "Fonts/Roboto_Light_48.h" #include "Fonts/FreeMono9pt7b.h" #include "Util.h" struct Event { char name[64]; char startTime[16]; char endTime[16]; char date[32]; char location[64]; int timeStamp; bool fullDay; }; char* data = new c...
#include "inputhandler.h" #include "servo.h" #include "engine.h" #include <stdio.h> #include <termios.h> #include <iostream> #include <qthread.h> #include <pigpio.h> #include <qthread.h> #include <time.h> #include <QtCore> using namespace std; servo *s; engine *e; int servo_offset = 195; bool running...
#include <stdio.h> #include <string> #include <iostream> #include <fstream> #include <vector> #include <chrono> #include <thread> #include <future> #include <curses.h> #include "build.hpp" //#define YAML_CONFIGS #ifdef YAML_CONFIGS #else //JSON #include "json.h" using json = nlohmann::json; #endif std::string bui...
#include<bits/stdc++.h> using namespace std; #define fRead(x) freopen(x,"r",stdin) #define fWrite(x) freopen (x,"w",stdout) #define LL long long #define ULL unsigned long long #define ff first #define ss second #define pb push_back #define ...
// // Copyright 2019 WebAssembly Community Group participants // // 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...
#include <iostream> #include <algorithm> #include <vector> #include "helpers.h" using namespace std; vector<float> initialize_priors(int map_size, vector<float> landmark_positions, float position_stdev); float motion_model(float pseudo_position, float movement, vector<float> priors, int map_size, float control_std...
#include <numeric> #include "Teapots.h" #include "CannonBall.h" const int Teapots::TOTAL_TEAPOTS = 15; const GLfloat Teapots::radius = 0.05f; GLfloat Teapots::colors[15][3] = { { 0.96f, 0.26f, 0.21f }, // Red { 0.91f, 0.12f, 0.39f }, // Pink { 0.61f, 0.15f, 0.69f }, // Purple { 0.40f, 0.23f, 0.72f }, // Deep...
#include "vertex_set.h" #include <stdlib.h> #include <string.h> #include <cassert> #include <stdio.h> #include "mic.h" #include <ctime> using namespace std; #define SCAN_BLOCK_SIZE 512 void pmemset(int * start, int val, int size){ #pragma omp parallel for schedule(static, 512) for(int i = 0 ; i < size; i++){ ...
#include "AABB.h" #include <vector> #include <include/gl_utils.h> #include <include/glm_utils.h> #include <Component/Transform/Transform.h> #include <Component/Mesh.h> #include <Component/MeshRenderer.h> #include <Core/Camera/Camera.h> #include <Core/GameObject.h> #include <GPU/Shader.h> #include <Manag...
// -*- coding: utf-8 -*- /* 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...
#include "constraints.h" #ifndef PI #define PI 3.141592 #endif #include "RigidBody/GeneralizedCoordinates.h" #include "RigidBody/GeneralizedTorque.h" #include "RigidBody/NodeSegment.h" #include "Muscles/StateDynamics.h" #include "Utils/RotoTrans.h" // Preallocate the variables static biorbd::rigidbody::NodeSegment t...
#include <config.h> #include <stdio.h> #include "splash/SplashMath.h" #include "OPVPSplashPath.h" #include "OPVPWrapper.h" #include "OPRS.h" void OPVPSplashPath::getBBox(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA) { int i; SplashCoord xMin, yMin, xMax, yMax; if (length <= 0) { /* return far away poi...
/// @example eagine/c_api_wrap.cpp /// /// Copyright <NAME>. /// Distributed under the Boost Software License, Version 1.0. /// See accompanying file LICENSE_1_0.txt or copy at /// http://www.boost.org/LICENSE_1_0.txt /// #include <eagine/config/platform.hpp> #include <eagine/c_api_wrap.hpp> #include <eagine/extract.h...
/* Copyright (C) 2005-2014 <NAME> This file is part of QuaZip. QuaZip is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. QuaZip is d...
#include "ofApp.h" #define MAX_STATE 11 ofVideoGrabber videoGrabber; ofxCvColorImage originalImage; ofxCvGrayscaleImage grayImage; ofxCvGrayscaleImage binaryImage; ofxCvColorImage blurImage; ofxCvGrayscaleImage contrastImage; ofxCvGrayscaleImage cannyImage; ofxCvColorImage invertImage; ofxCvColorImage dilateImage; of...
#include "network.h" #include <sstream> #include <future> #include <chrono> #include <curl/curl.h> #include <curl/easy.h> #include <json/json.h> #include <uWS/uWS.h> size_t curlWriteCallback(void *contents, size_t size, size_t nmemb, std::string *s) { size_t newLength = size * nmemb; size_t oldLength = s->size(); ...
/* ==================================================================== * The Vovida Software License, Version 1.0 * * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...
// license:GPL-2.0+ // copyright-holders:<NAME>,<NAME> /*************************************************************************** z88.c Functions to emulate the video hardware of the Cambridge Z88 ***************************************************************************/ #include "emu.h" #include "includes/...
#include <string> #include <fstream> #include <iostream> #include <sstream> #include "../lib/uritemplate.hpp" #include "../ext/json/include/nlohmann/json.hpp" using json = nlohmann::json; using std::string; using UriTemplate = uritemplatecpp::UriTemplate; class TestCase{ public: void setVectorVariables(const std::s...
// Copyright (c) 2019 Xilinx // // BSD v3 License // // 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 // li...
#include <QtCore> #include <QString> #include <QtGlobal> #include <QtCore/QDebug> #include <motor.h> #include "adafruit_bbio_pwm.h" motor::motor() { pwm_pin = "Uninit"; dir_pin = "Uninit"; motor_rotation_speed = 1.0; } motor::~motor() { delete dc; delete dir; } /* Create the control structure t...
#include "weak_ptr.hpp" #include <iostream> #include <memory> #include <algorithm> #include <string> #include <vector> // Blog: http://blog.csdn.net/fengbingchun/article/details/52203825 /////////////////////////////////////////////////////// // reference: http://en.cppreference.com/w/cpp/memory/weak_ptr std::weak_pt...
/* * Copyright 2019 Autoware Foundation. 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 b...
/********************************************************************** Rdacity: A Digital Audio Editor powered by Audacity(R) RivendellUtils.cpp This effort was sponsored work by Radio Free Asia https://github.com/RadioFreeAsia/rdacity <NAME> <<EMAIL>> <<EMAIL>> (C) Copyright August 7, 2016 <NAME> <<E...
// 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...
// Fonts definitions #define FONT_NAME_GM "Comic Sans MS" #define FONT_SIZE_GM 28 // Public section font definitions HDC hdc; HFONT hFont; unsigned int charList; // Call this from game.cpp init to setup fonts for use with help function. setupFonts(); /** Draws simulated window with background via OpenGL polygons/p...
// Includes connected with Tensorflow #include "tensorflow/lite/micro/all_ops_resolver.h" #include "tensorflow/lite/micro/testing/micro_test.h" #include "tensorflow/lite/micro/kernels/micro_ops.h" #include "tensorflow/lite/micro/micro_error_reporter.h" #include "tensorflow/lite/micro/micro_interpreter.h" #include "ten...
/* Problema 3 Escreva as funções para inserir e retirar um elemento de uma lista circular. */ #include <stdlib.h> /* malloc, free, exit */ #include <stdio.h> /* printf */ struct lista { int info; struct lista* prox; }; typedef struct lista Lista; Lista* retiracircular(Lista* l1, int i) { } int igual (List...
#include "ftnoir_protocol_wine.h" #include <QDebug> #include <QDir> #include <QVector> #include "api/plugin-api.hpp" QVector< QVector<QString> > steamapps; QVector<QString> steam_libraries; FTControls::FTControls() { ui.setupUi(this); /* Clear all items from Vectors */ steamapps.clear(); steam_librar...
#include "number.hpp" bool Number::validate_value_string(const unsigned int base, const std::string& value_string) { const std::string base_characters = get_base_characters(base); for (const auto& character : value_string) if (base_characters.find(character) == std:...
/* Copyright 2014 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 writing,...
// <NAME> 04/23/2020 Files program (but in C++!) #include <fstream> // import the fstream library to deal with files as a standard stream #include <iostream> // import the iostream library which allows me to output to the console and recieve input #include <ctime> //allows me to get the current time to write to the fil...
#pragma once #include "PMK.hpp" #include <fstream> glm::vec4 colorHex(uint32_t hexVal); // glm::vec4 colorHex(uint64_t hexVal); int clamp(int val, int a, int b); void setColumn(glm::mat4 &mat, int num, glm::vec4 vec); #ifdef USE_BULLET inline glm::vec3 convert(const btVector3& v){ return glm::vec3(v[0], v[1], v...
#include <Solus.h> #include "ImGui/imgui.h" #include <glm/gtc/matrix_transform.hpp> class ExampleLayer : public Solus::Layer { public: ExampleLayer() : Layer("Example"), m_Camera(-1.6f, 1.6f, -0.9f, 0.9f), m_CameraPosition(m_Camera.GetPosition()) { m_VertexArray.reset(Solus::VertexArray::Create()); float ve...
#include "manager.h" #include <QDebug> manager::manager(QString name) : QWidget(nullptr) { managerName = name; QLabel *meetingsLabel = new QLabel("Next meetings:"); meetingsList = new QListWidget; meetingsList->setStyleSheet("QListWidget {" "background: #ffe7d0;" ...
#include <GL/glut.h> #include <GL/GL.h> #include <GL/GLU.h> #include <cmath> GLfloat WHITE[] = { 1, 1, 1 }; GLfloat RED[] = { 1, 0, 0 }; GLfloat BLACK[] = { 0, 0, 0 }; GLfloat GREEN[] = { 0, 1, 0 }; float BallSpeed = 0.05; class Camera { double theta; double y; double dTheta; double dy; public: ...
#include "function.hpp" // grid mapping void grid_mapping() { start = std::chrono::system_clock::now(); // mapping for (unsigned int i = 0; i < dataset_pt.size(); ++i) { // key computation dataset_pt[i].key_computation(cutoff * sampling_rate_cell); // create cell or update point-set aut...
#include <ros/ros.h> #include <geometry_msgs/Twist.h> #include <sensor_msgs/Joy.h> #include <std_msgs/UInt16.h> #include <std_msgs/UInt32.h> #include <std_msgs/Int32MultiArray.h> // create the TeleopTPRobot class and define the joyCallback function that will take a joy msg class TeleopTPRobot { public: TeleopTPRobot...
/*** * The MIT License (MIT) * * Copyright (c) 2015 DocumentDBCpp * * 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 u...
/******************************************************************************* * include/arrays/flat_two_dim_array.hpp * * Copyright (C) 2017 <NAME> <<EMAIL>> * Copyright (C) 2017 <NAME> <<EMAIL>> * * All rights reserved. Published under the BSD-2 license in the LICENSE file. **********************************...
/* * Copyright (C) 2017 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 app...
#include "config.hpp" #include "file.hpp" #include "jute.h" #include "setup.hpp" int64_t get_jint(jute::jValue &v, const std::string &key, int64_t def) { if (v[key].get_type() == jute::jType::JNUMBER) { return v[key].as_int(); } return def; } double get_jdouble(jute::jValue &v, const std::string &key, doub...
#include <bits/stdc++.h> using namespace std; class MatrixMultiplication{ vector<vector<int> > matrix1, matrix2, multiply; struct arguments{ vector<vector<int> > *matrix1, *matrix2, *multiply; int row1; int col2; arguments(vector<vector<int> > &matrix1, vector<vector<int> > &mat...
// Copyright 2021 <NAME> #include "../../../modules/task_3/uglinskii_b_cannon_alg/Cannon.h" #include <random> #include <ctime> double* CreateZeroMatrix(int size) { double* matrix = new double[size * size]; for (int i = 0; i < size * size; i++) { matrix[i] = 0; } return matrix; } double* CreateEmptyMatrix(...
#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <numeric> #include <cstdlib> #include <cmath> const double PI = acos(-1); struct RealPoint { int x, y; }; struct Point { int x, y, count; double angle; std::vector<RealPoint> realPoints; }; inline bool isSameAngle(int x1, int y...
#include <mcl.h> #include <myassert.h> #include <parserCore.h> #include <parserTypes.h> #include <parserWrap.h> #include <stmtProcessor.h> #include <syntaxError.h> #include <util.h> #include <numeric> using namespace synErr; using namespace parserTypes; using namespace util; std::wstring convPut(std::wstring src, st...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <vector> #include "router_hal.h" #include "router.h" extern std::vector<RoutingTableEntry> table; uint32_t convertBigSmallEndian32(uint32_t num) { return (((num >> 0) & 0xFF) << 24) | (((num >> 8) & 0xFF) << 16) | (((num >> 16)& 0xFF) << 8)...
/*---------------------------------------------------------------------- Toy EDAnalyzer for testing purposes only. ----------------------------------------------------------------------*/ #include <math.h> #include <stdexcept> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <map...
/*<NAME>*/ #include <iostream> #include <numeric> #include <fstream> #include <climits> #include <cstring> #include <cstdio> #include <cmath> #include <queue> #include <list> #include <map> #include <set> #include <stack> #include <deque> #include <vector> #include <string> #include <cstdlib> #include <cassert> #includ...
#include "Settings.hpp" #include <regex> #include <fstream> #define SETTINGS_FILEPATH "data/settings.ini" SettingBase::SettingBase(const std::string& name) : name(name) {} SettingBase::~SettingBase() {} void SettingBase::printToFile(FILE *file) { fprintf(file, "%s=%s\n", name.c_str(), getValueAsString().c_str()...
#include "View/Scenes/ConcreteStrategyMapScene.h" ConcreteStrategyMapScene::ConcreteStrategyMapScene() { // load default map: 0 gmap.loadFromFileID(0); // default position for map 0 player.setPosition(65., 94.); thFXIntro = new Thread(&ConcreteStrategyMapScene::timeoutFXIntro, this); } ConcreteStra...
/////////////////////////////////////////////////////////////////////////////// /// @file oolua.cpp /// @author <NAME> /// @email /// See http://www.liamdevine.co.uk for contact details. /// @licence /// See licence.txt for more details. /////////////////////////////////////////////////////////////////////...