text
stringlengths
3.08k
12.5k
/* RF24SensorNet A library for sending standard sensor and actuator messages between nodes connected using RF24Network. -- <NAME> <<EMAIL>> */ #include "RF24Network.h" #include "RF24SensorNet.h" // Neat hack for reading Vcc compared to internal reference voltage. // http://provideyourown.com/2012/secret-ard...
// This file is part of comma, a generic and flexible library // Copyright (c) 2011 The University of Sydney // 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 cod...
/*! \file SimpleForwardRussianRouletteSampler.cpp * \author <NAME> * \brief Implementation of SimpleForwardRussianRouletteSampler class. */ #include "SimpleForwardRussianRouletteSampler.h" #include "RussianRoulette.h" #include "../shading/ScatteringDistributionFunction.h" #include "../geometry/Ray.h" #include ".....
//===-- FileSystem.cpp ----------------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /* 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 la...
// // GraphCheapest.cpp // Data Course // // Created by <NAME> on 11/27/17. // Copyright © 2017 <NAME>. All rights reserved. // #include <fstream> #include <iostream> #include <list> #include <queue> #include <stack> #include <string> #include <vector> #include <utility> using namespace std; #include <cstdlib> st...
#include "AMRWind.h" #include "NaluWind.h" #include "OversetSimulation.h" #include "MPIUtilities.h" #include "mpi.h" #ifdef EXAWIND_HAS_STD_FILESYSTEM #include <filesystem> #endif #include "yaml-cpp/yaml.h" #include "tioga.h" static std::string usage(std::string name) { return "usage: " + name + " [--a...
/* Copyright 2010 Computer Vision Lab, Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland. All rights reserved. Authors: <NAME>, <NAME>, and <NAME> This file is part of the BRIEF_demo software. BRIEF_demo is free software; you can redistribute it and/or modify it under the terms of the GNU ...
#include "TextObject.h" #include <QOpenGLTexture> #include <QFontMetrics> #include <QImage> #include <QPainter> #include <QDebug> #include <QOpenGLShaderProgram> #include "ShaderProgram.h" #include "PlaneMesh.h" #define TEXTURE_ID 0 TextObject::TextObject() : m_vbo(QOpenGLBuffer::VertexBuffer), // actually the def...
// GLShader.cpp // Last update 2/7/2021 by Madman10K #include <GL/glew.h> #include "GLShader.hpp" void UVK::GLShader::createFromString(UVK::String vertex, UVK::String fragment) { compileShader(vertex, fragment); } void UVK::GLShader::createFromFile(UVK::String vLocation, UVK::String fLocation) { compileShader(readF...
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define debug(x) cout<<"#"<<#x<<" = "<<x<<endl; typedef long long llong; typedef vector<int> vi; template <class T> struct Node{ Node *parent,*child,*left,*right; bool mark; int degree; T data; Node(T data){ this->data=data;...
/* * Copyright 2016 Quora, 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 "id3tag.h" #include "readjson.h" #include <QDebug> #include <QCryptographicHash> //#include <iostream> //#include <stdio.h> // taglib headers { #include <taglib.h> #include <tmap.h> #include <tstring.h> //#include <tpropertymap.h> #include <id3v2tag.h> #include <mpegfile.h> #include <id3v2frame.h> #include ...
// // Created by RAGESH on 5/18/18. // //////////////////////////////////////////////////////////////////////////////// // My naming conventions for the project // Put header files separated different category and in alphabetical order // unless there some compatibility issue between the header files // macros and con...
// Boost.Polygon library voronoi_benchmark.cpp file // Copyright <NAME> 2010-2012. // 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) // See http://www.boost.org for updates, documentat...
#include "TouchWindow.h" #include <stdio.h> #include <SDL_image.h> #include "InputHandler.h" TouchWindow::TouchWindow(const char* title) : title(title) {} TouchWindow::TouchWindow() : TouchWindow("TouchPad") {} int runProjectionWindow(void * data) { ((Window*)data)->update(); return 0; } void TouchWindow::init()...
#include <iostream> #include <fstream> #include <cstring> #include "config_utility.h" #include "live_model.h" #include "constants.h" namespace r = reinforcement_learning; namespace u = reinforcement_learning::utility; namespace m = reinforcement_learning::model_management; namespace err = reinforcement_learning::erro...
#include "MPC.h" #include "Eigen-3.3/Eigen/Core" #include "Model.h" #include <cmath> #include <cppad/cppad.hpp> #include <cppad/ipopt/solve.hpp> #include <vector> using CppAD::AD; using Eigen::MatrixXd; using Eigen::VectorXd; void MPC::SetupWarmStart(Dvector &vars, const VectorXd &state) { // warm start using previ...
//Language: GNU C++ #include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <queue> #include <string.h> using namespace std; typedef long long lld; struct CV { lld from, to; }; struct Q { lld vert, dist; }; lld n, m, queries; vector<lld> Graph[200002], fg...
#pragma once #define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING #include <cstdint> #include <limits> #include <string> #include <codecvt> #include <vector> #include <array> #include <unordered_map> #include <bitset> //Types using i8 = std::int8_t; using u16 = std::uint16_t; using u32 = std::uint32_t; using u6...
// // Created by blockost on 1/28/19. // #include "Player.h" Player::Player(Graphics &graphics, Coord spawnPoint) : posX(0), posY(0), velX(0), velY(0), accX(0), accY(0), facingDirection(Direction::RIGHT), isOnTheGround(false) { SDL_Texture *playerTexture = graphics.getTexture("../data/sprites/...
#include <gtest/gtest.h> #include <cstring> #include <stdint.h> #include "udp.h" #include "ip.h" using namespace std; using namespace Tins; class UDPTest : public testing::Test { public: static const uint8_t expected_packet[], checksum_packet[]; void test_equals(const UDP& udp1, const UDP& udp2); }; c...
#include "core/math/Rect.h" #include "core-ext/utils/MeshBuilder.h" #include "renderer/material/RrShaderProgram.h" #include "renderer/texture/RrTexture.h" #include "m04-editor/entities/UIDragHandle.h" #include "m04-editor/standalone/mapeditor/EditorObject.h" #include "GizmoRenderer.h" using namespace M04; GizmoRen...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <unordered_map> using namespace std; const int MAX_N = 2e5 + 10; const int INF = 1e9; const int NONE = -1; int n, m, q; int a[MAX_N]; int p[MAX_N]; vector<vector<int>> g(MAX_N); vector<int> min_idx(MAX_N, INF); vector<int> max_idx...
/*** * * Binomial co-efficients (n choose k) modulo mod * * Generalization of the Lucas theorem, which calculates binomial mod p^q * * Let mod = p1^q1 * p2^q2 * ... * pm^qm * * Then, time complexity will be: * O(sqrt(mod)) + O(max(p_i^q_i)) to pre-process * O(m * (log(n) + log(k))) roughly for each n ...
#include <config.h> #include <apt-pkg/configuration.h> #include <string> #include <vector> #include <gtest/gtest.h> //FIXME: Test for configuration file parsing; // currently only integration/ tests test them implicitly TEST(ConfigurationTest,Lists) { Configuration Cnf; Cnf.Set("APT::Keep-Fds::",28); Cnf.Set("...
#include <bits/stdc++.h> using namespace std; #define long int64_t // ***** inline namespace lib { template <typename T> struct merging_interval_tree { using interval_t = array<T, 2>; set<interval_t> tree; merging_interval_tree() = default; void insert(interval_t intv) { assert(intv[0] < ...
#include <filesystem> #include <iostream> #include <string> #include <vector> #include <opencv2/calib3d.hpp> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <opencv2/videoio.hpp> #include <rbv/Camera.hpp> #include <rbv/StereoPair.hpp> std::vector<cv::Point3f> generateChessboardPoints(cv::Size boa...
//---------------------------------------------------------------------------- // // Copyright (c) 2013-2017, <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...
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BS...
#pragma once template <typename T, T (*add)(T, T), T (*sub)(T, T), T (*mul)(T, long long)> struct LinkCutForSubtreeNode { using Node = LinkCutForSubtreeNode; using Ptr = LinkCutForSubtreeNode*; Ptr l, r, p; T key, sum, lazy, cancel, subsum; int cnt, subcnt; bool rev; LinkCutForSubtreeNode(const T& t = T...
//#include <Eigen/Dense> #include <fstream> #include <ctime> #include <memory> #include <ros/ros.h> #include <ros/package.h> #include <assembly_task_guidance_mode.hpp> #include <dbot_ros_msgs/ObjectsState.h> #include <object_assembly_msgs/FetchSurfaceParams.h> #include <object_assembly_msgs/ConnectionInfoList.h> c...
///////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2021 <NAME>. // // Email: <EMAIL> // // 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 "slam/slam.h" #include "mona/text_renderer.hpp" #include <iostream> #include <vector> auto init_freetype(const std::string& font, int size) -> std::tuple<FT_Library, FT_Face> { FT_Library ft; if (FT_Init_FreeType(&ft)) { std::clog << "FreeType error: could not init library.\n"; st...
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
/*给定一个 n 次多项式 F(x)=a0+a1x+a2x^2+...+anx^n 以及一个 m 次多项式 G(x)=b0+b1x+b2x^2+...+bmx^m 已知 H(x)=F(x)*G(x)=c0+c1x+c2x^2+...+c(n+m)x^(n+m) 计算并输出c0,c1,...,cn+m。1<=n,m<=1e5,0<=ai,bi<=9*/ const int N = 300010; //2^n,20w之后的是26w左右 直接开30w const double PI = acos(-1); int n, m; struct Complex { //复数 double x, y; //实部x 虚部 y Com...
#include <Python.h> #include "VoronoiExplorer.h" #include "VoronoiGraph.h" static VoronoiNodeKey keyOfPointItem(PyObject *pointitem) { auto key = PyObject_GetAttrString(pointitem, "key"); auto _keyx = PyTuple_GetItem(key, 0); auto _keyy = PyTuple_GetItem(key, 1); auto _keyz = PyTuple_GetItem(key, 2); ...
#include "pch.h" #include "argagg.h" #include <iostream> #include <winrt/Windows.Foundation.Collections.h> #include <winrt/Windows.Media.Ocr.h> #include <winrt/Windows.Globalization.h> #include <winrt/Windows.Data.Pdf.h> #include <winrt/Windows.Storage.h> #include <winrt/Windows.Storage.Streams.h> #include <winrt/Wind...
/* -*- mode: c++; -*- *----------------------------------------------------------------------------- * $RCSfile: RequestQueueingInvoker.cpp,v $ * * See Copyright for the status of this software. * * The OpenSOAP Project * http://opensoap.jp/ *---------------------------------------------------------------------...
/** * @File : spectral_residual_significance.cpp * @Brief : 显著性检测: 谱残差显著性检测 * @Author : <NAME> * @Date : 2021-10-21 */ #include <iostream> #include <vector> #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> // ------------ 快速离散傅里叶变换 ------------ void FFT2Image(cv...
#include <user_config.h> #include <configuration.h> #include <Services/ArduinoJson/ArduinoJson.h> #include <Libraries/OneWire/OneWire.h> #include <Libraries/DS18S20/ds18s20.h> Timer lcdTimer; int8_t currentBrightness = 0; // 0 - 59 int8_t startFadeIn = 6; // Start fade in at 7 hrs int8_t startFadeOut = 18; // start fa...
#include <cstring> #include <cctype> #include <limits> #define IS_SPACE(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\v' || (c) == '\f' || (c) == '\r') #include "udf.h" using namespace impala_udf; bool EqStringValImpl(const StringVal& s1, const StringVal& s2) { if (s1.is_null != s2.is_null) ...
#include <base.h> #include <Scene.h> #include <Object.h> #include <Model.h> #include <Shader.h> #include <imgui.h> #include <imgui_impl_glfw.h> #include <imgui_impl_opengl3.h> #include <thread> auto MainCamera = std::make_shared<Camera>(glm::vec3(0,0,1.5f)); void mouse_callback(GLFWwindow* window, double xpos, doub...
#include <spriteBatch.h> #include <nds.h> #include <luascript.h> #include <lua.hpp> #include <glWrapper.h> spriteBatch::spriteBatch( ) { //batchList = new list<Sprite>; } bool spriteBatch::add(Sprite* mySprite, int _x, int _y, int _width, int _height, int _z) { spriteData newSprite; newSprite.sprite = mySprite...
// SPDX-License-Identifier: MIT // Copyright 2015,2018-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...
#include <mc_control/mc_global_controller.h> #include <mc_rtc/logging.h> #include <franka/exception.h> #include <franka/robot.h> #include <franka/vacuum_gripper.h> #include <iostream> // mc_panda #include <mc_panda/devices/Pump.h> namespace { template <class T, size_t N> std::ostream& operator<<(std::ostream& ostream...
/***************************************************************************************** * * * OpenSpace * * ...
#include <ros/ros.h> #include "bezier_quintic_segment.h" //#include<normal_toppra_traj_instant_1.h> #include<normal_toppra_traj_instant_3.h> #include <python2.7/Python.h> #include "matplotlibcpp.h" namespace plt = matplotlibcpp; using namespace std; const double max_pos=180, max_vel= 130, max_acc=250, max_jrk=1000,...
// Copyright (c) 2010-present Bifrost Entertainment AS and <NAME> // Distributed under the MIT License. // (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) #include "Script/JavaScript/JavaScript.h" #include "FileSystem/Bundle.h" #include "FileSystem/File.h" #include "FileSystem/FileSystem...
#include <iostream> #include "csvworker.h" // If counts of rows and columns !=0, this fills vector of rows "data"; // each of rows has cols_count empty strings CsvWorker::CsvWorker(char delim, unsigned int rows_count, unsigned int cols_count) { this->delimiter = delim; this->rows_count = rows_count; ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <list> #include "blocks.h" #include "sched.h" cstate ref; void init(cstate &s) { memset(&s, 0, sizeof(s)); ref = s; s.first = true; s.silent = false; } void update(cstate &s) { for(;;) { std::list<void (*)(cstate &)> f; compute_sc...
#include "GameScene.h" #include "Graphics.h" #include "CameraConstant.h" #include <cmath> #include <set> GameScene::~GameScene() {} void GameScene::Setup(Graphics& g) { taskQueue_.Setup(cThreadCount); models_.Resize(cModelCount); auto pDevice = g.DevicePtr(); auto resourceViewCount = 0; { auto pCommandList...
/* * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ //#include <d3dcompiler.h> #include "src/gpu/d3d/GrD3DPipelineStateBuilder.h" #include "include/gpu/GrContext.h" #include "include/gpu/d3d/GrD3DTypes.h" #include "src/core/Sk...
/* * Ptax (C)kvark, Oct 2006 * the DC transformer ver 4.0 */ #include "total.h" #include "ptax.h" #define GRLOG 4 #define GRSIZE (256>>GRLOG) #define GRNUM (1<<GRLOG) int dc,ca[9] = {6,5,4,3,2,1,4,6,4}; void Ptax::setcon(SYMBOL *ps) { dc = getlog(ps->df); if(dc>11) dc=11; int fl = (pov<2?0:(pov<8?1:2)); bc.t0 = ...
/** \file "integer_traits_test.cc" Testing compile-time integer traits facilities. $Id: integer_traits_test.cc,v 1.7 2006/05/07 20:56:12 fang Exp $ */ #ifdef NDEBUG #undef NDEBUG #endif #include <string> #include <iostream> #include <unistd.h> // for ssize_t #include "util/numeric/integer_traits.hh" #include "ut...
#include "pch.h" #include "FarmlandManager.h" //std::vector<CropConfig> FarmlandManager::_pCropData = std::vector<CropConfig>(); FarmlandManager::FarmlandManager(GameObject* parent) : Component(parent) { } bool FarmlandManager::PlaceFarmLand(glm::vec2 position) { // Bool to check if a plot has been found bool plot...
#include "Texture.h" #ifdef _WIN32 #include "imgui/imgui_impl_dx9.h" #else #include "imgui/imgui_impl_opengl3.h" #endif void Texture::init(int width, int height, const std::uint8_t* data) noexcept { texture = ImGui_CreateTextureRGBA(width, height, data); } void Texture::clear() noexcept { if (texture) ...
#include "gamegenerator.h" #include <map> #include <utility> #include <cmath> #include "randomgenerator.h" namespace GameGeneratorImpl { constexpr auto minSensitiveAngle = 7; Pipeline GeneratePipeline() { int pressure = RandomGenerator::Get(3); return { static_cast<PressureType>(pressure...
// Copyright (c) Nuralogix. All rights reserved. Licensed under the MIT license. // See LICENSE.txt in the project root for license information. #include "dfx/api/types/MeasurementTypes.hpp" #include "dfx/api/CloudTypes.hpp" using namespace dfx::api; const std::map<MeasurementStatus, std::string> MeasurementStatusMa...
#include "OpsTest.h" StrTestMap ops = { {"CharToLPCSTR",CharToLPCSTR}, {"CharToStr",CharToStr}, {"CreateFolder",CreateFolder}, {"FloatRectLerp",FloatRectLerp}, {"GetDistanceX",GetDistanceX}, {"GetDistanceXY",GetDistanceXY}, {"GetDistanceY",GetDistanceY}, {"GetFloatRect",GetFloatRect}, {"GetSDLRect",GetSDLRect...
/*! * @brief Provides implementation of ChassisTreeStabilizer class * * @copyright * Copyright (c) 2015-2017 Intel Corporation * * @copyright * 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 Licen...
/* Copyright 2010 Computer Vision Lab, Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland. All rights reserved. Author: <NAME> (http://cvlab.epfl.ch/~calonder) Version: 1.0 This file is part of the BRIEF DEMO software. BRIEF DEMO is free software; you can redistribute it and/or modify it under the terms of...
#include "LucusCore.h" #include "LucusMemoryManager.h" #include "LucusFileSystem.h" #include "LucusResourceManager.h" #include "LucusImageFormatManager.h" #include "LucusMeshFormatManager.h" #include "LucusTimeManager.h" #include "LucusLuaState.h" #include "LucusRenderSystem.h" #include "LucusWorld.h" #include "lua...
#include "..\..\inc\Type\ArraySize.h" #define MAX_ARG_NUM 20 #define MAX_ARR_SIZE 0x2000 ULONG args[MAX_ARG_NUM]; SIZE_KIND parseSizeKind(const char* s, PULONG pReadBytes) { if (checkMatch(s, "unknown", pReadBytes)) { return UNKNOWN_SIZE; } else if (checkMatch(s, "fixed", pReadBytes)) { return FIXED_SI...
/****************************************************************** This file is part of https://github.com/martinruenz/dataset-tools 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 ...
// laboratorio2 - <NAME> //g++ 9.3.0 corriendo en ubuntu 20.04 #include <iostream> //leer datos de terminal #include <string> //usar strings #include <math.h> //usar operaciones matematicas como raiz y cuadrado using namespace std; //abreviar escritura //variables globales int cantidad = 0; //cantidad de puntos int c...
/* * Copyright (c) 2020 Sprint * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
#include <iostream> #include "inventory.h" static SDL_Color color_from_rarity(int rarity) { switch(rarity) { case 0: return {255,255,255,255}; case 1: return {0,255,255,255}; case 2: return {255,0,255,255}; } return {255,255,255,255}; } void render_tooltip(camera_t &camera, texture_dict &textu...
#include <stingraykit/log/LogLevel.h> #include <stingraykit/string/StringParse.h> #include <stingraykit/string/StringUtils.h> #include <gtest/gtest.h> using namespace stingray; TEST(StringParseTest, Medley) { char c; int i; double d; std::string s; ASSERT_TRUE(StringParse("character: z, integer: 100500, doubl...
#include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "ddsmpg.hh" static void error(const char * s, ...) { va_list args; va_start(args, s); vfprintf(stderr, s, args); fprintf(stderr, "\n"); va_end(args); } DDSMpg::DDSMpg(void) { mFrames = ...
// kate: replace-tabs off; indent-width 4; indent-mode normal // vim: ts=4:sw=4:noexpandtab /* Copyright (c) 2010--2012, <NAME> and <NAME>, ASL, ETHZ, Switzerland You can contact the authors at <f dot pomerleau at gmail dot com> and <stephane at magnenat dot net> All rights reserved. Redistribution and use in source...
/* Author: <NAME> License: MIT, https://en.wikipedia.org/wiki/MIT_License Date: 2016-12-18 TimeZone strings for the configuration interface Sources repository: https://github.com/microentropie/ */ #include "TimeZone.h" #include "DateTime.h" int DstCriteriaStrings(dstCriteria crit, const char **briefD...
#include "CTweakLoader.h" #include "Core/Resource/Factory/CScriptLoader.h" #include "Core/Resource/Script/NGameList.h" CTweakData* CTweakLoader::LoadCTWK(IInputStream& CTWK, CResourceEntry* pEntry) { // Find the correct template based on the asset ID. static const std::unordered_map<uint, const char*> skIdToTe...
/*---------------------------------------------------------------------------*/ /* */ /* Program Name = Client.cpp */ /* */ ...
// // Created by yalavrinenko on 23.05.2021. // #include "trivial_cp_detector.hpp" #include <opencv2/opencv.hpp> #include <opencv2/dnn/dnn.hpp> #include <fstream> #include <iterator> #include <span> namespace { using namespace cv; void fourPointsTransform(const Mat& frame, const Point2f vertices[], Mat& result) ...
// // AttributeDictionary.cpp // // Sketchup C++ Wrapper for C API // MIT License // // Copyright (c) 2017 <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, i...
#include <functional> #include <glog/logging.h> #include <gtest/gtest.h> #include <tudocomp/ds/DSManager.hpp> #include <tudocomp/ds/providers/DivSufSort.hpp> #include <tudocomp/ds/providers/ISAFromSA.hpp> #include <tudocomp/ds/providers/SparseISA.hpp> #include <tudocomp/ds/providers/PhiAlgorithm.hpp> #include <tudoc...
/* *************************************************************************** Copyright (c): 2008 - 2013 Hericus Software, LLC. License: The MIT License (MIT) Authors: <NAME> *************************************************************************** */ #include "TheMain.h" #include "OdbcObj.h" using nam...
// Copyright 2016 <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 writi...
/* Cafu Engine, http://www.cafu.de/ Copyright (c) <NAME> and other contributors. This project is licensed under the terms of the MIT license. */ #include "ClientStateConnecting.hpp" #include "Client.hpp" #include "../GameInfo.hpp" #include "../NetConst.hpp" #include "ConsoleCommands/Console.hpp" #include "ConsoleComma...
#include "MeshLoader.h" #include "Globals.h" #include "Application.h" #include "ModuleFileSystem.h" #include "ResourceMesh.h" #include "Assimp/include/cimport.h" #include "Assimp/include/scene.h" #include "Assimp/include/postprocess.h" #include "Assimp/include/cfileio.h" MeshLoader::MeshLoader() { } MeshLoader::~M...
#include <cstdio> #include <iostream> using namespace std; #include <cmath> template <typename T> class AVL { protected: struct node { node* left; node* right; int height; T value; }; node* data; size_t __size; node* i_query(node* root, T& to_query) { if (root...
#include <lo/lo.h> #include <lo/lo_cpp.h> #include <lsl_cpp.h> #include <iostream> #include <atomic> #include <unistd.h> #include <map> #include <getopt.h> #define DEBUG(x) std::cerr << __FILE__ << ":" << __LINE__ << " " << #x << "=" << x << std::endl typedef std::map<std::string,lsl::stream_outlet*> stream_map_t; s...
// // Fraction implementation // // Author: <NAME> // // Does NOT ever check for division by 0. // Division by 0 will only cause a runtime error if you use the // toDouble() function. // #include <iostream> #include <cstdlib> using namespace std; // Change this to whatever integer data type will prevent overflow //...
#include <Rcpp.h> #include <Rmath.h> #include <iostream> #include <string> #include <vector> #include <map> #include <unordered_set> using namespace Rcpp; using namespace std; class Key { public: int a, b; Key(int a_a, int a_b) : a(a_a), b(a_b){} bool operator < (const Key& k) const { if(a == k.a){ ...
#include "c3.h" #include "aui.h" #include "aui_control.h" #include "aui_uniqueid.h" #include "c3window.h" #include "c3_static.h" #include "c3_button.h" #include "c3ui.h" #include "c3_fancywindow.h" extern C3UI *g_c3ui; #define k_ORIGINAL_UNIT_STATUS_WIDTH 538 #define k_ORIGINAL_UNIT_STATUS_HEIGHT 479 #defin...
/** * @file solve.cpp * @author <NAME> (<EMAIL>) * @brief Entry program * @version 0.1 * @date 2020-05-07 * * Entry programm that takes inputs and calls solvers. */ #include <filesystem> #include <iostream> #include <boost/range/algorithm/find_if.hpp> #include "parsers/std_mutable_landscape_parser.hpp" #incl...
#include <iostream> #include <vector> #include <algorithm> #include <climits> #include <cstdint> #include <set> #include <string> using namespace std; #include <set> #include <string> #include <sstream> template<typename T> void printT(vector<T>& arr) { cout << "["; for (int i = 0; i < (int)arr.size(); i++) { ...
// // "$Id: pnmImage.cxx 4288 2005-04-16 00:13:17Z mike $" // // pnmImage routines. // // Copyright 1997-2005 by Easy Software Products. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundat...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <cmath> using namespace std; unsigned long long tdig = 10000000000LL; unsigned long long M = 10000000000000LL; string to_str(unsigned long long...
#include <Bacon/Bacon.h> #include <cassert> #include <cstdio> using namespace std; int g_Kitten, g_Kitten2; int g_Font; int g_Buffer, g_Buffer2; struct Glyph { Glyph() : m_Image(0) { } int m_Image; int m_OffsetX, m_OffsetY; int m_Advance; }; Glyph g_Glyphs[26]; int s_NumGlyphs = 1; void Tick() { static float ...
// // Created by Dado on 2019-02-06. // #include "audio_manager_openal.hpp" #include <unordered_map> #include <cstring> #include <core/util.h> #include <graphics/audio/audio_file.h> #ifdef OSX #include <OpenAL/OpenAL.h> #include <OpenAL/OpenAL.h> #else #include <AL/al.h> #include <AL/alc.h> #endif #ifdef _ULTRADEBU...
#include "writer.hpp" #include <Eigen/Core> #include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <stdexcept> //! Vector type typedef Eigen::VectorXd Vector; /// Uses forward Euler and upwind finite differences to compute u from time 0 to time T /// Propagation of information is assu...
// Copyright (c) 2014-2018 Bauhaus-Universitaet Weimar // This Software is distributed under the Modified BSD License, see license.txt. // // Virtual Reality and Visualization Research Group // Faculty of Media, Bauhaus-Universitaet Weimar // http://www.uni-weimar.de/medien/vr #include <fstream> #include <sstream> #i...
// Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and // other Axom Project Developers. See the top-level COPYRIGHT file for details. // // SPDX-License-Identifier: (BSD-3-Clause) #include "gtest/gtest.h" #include "axom/primal/geometry/Point.hpp" #include "axom/primal/operators/squared_distance.hp...
// Chapter 10 Exercise 3 // CIS 1610 Page 494 // Dale * Weems, Programming in C++ 5th Edition // Programmed by <NAME> // // Location Name Year range in millions // 0 Neogene 23 - 64 // 1 Paleogene 65 - 135 // 2 Cretaceous 136 - 191 // 3 Jurassic 192 - 224 // ...
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This class uses GSL MathMore's MultiRootFinder to find the momenta of the produced particles. In this case, a proton, and a negative pion. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ #include <vector> #include <stdio.h...
#include "sldfe_sq.h" #include "chi_log.h" extern ChiLog& chi_log; //################################################################### /**Prints the quadrature to file.*/ void chi_math::SimplifiedLDFESQ::Quadrature::PrintQuadratureToFile() { chi_log.Log() << "Printing SLDFE-Quadrature to file."; std::ofstream ...
/* The MIT License (MIT) Copyright (c) 2015 <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, publis...
/* Copyright 2022 NVIDIA CORPORATION 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, softw...