text
stringlengths
3.08k
22k
/* * Copyright (c) <NAME>. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "CPURegLiveness.h" #include "Analysis.h" #include "PubIR.h" #include "ir/IRUtil.h" #include "apple2tc/support.h" #include <deque> /// Return rever...
#include <numpy_eigen/boost_python_headers.hpp> #include <bsplines/BSpline.hpp> using namespace bsplines; using namespace boost::python; // Function wrappers turn std::pairs into tuples. boost::python::tuple timeInterval1(const bsplines::BSpline* bs) { std::pair<double, double> ti = bs->timeInterval(); retur...
#include <algorithm> #include <cassert> #include <cstdlib> #include <cstring> #include <iostream> #include <memory> #include "debug.hpp" #include "task.hpp" int Task::ID_gen = 0; /* Comparison function for activities in a priority queue (like ready_q). */ bool ActivityPrioCompare::operator()(std::pair<Activity*, i...
/**************************************************************************** ** $Id: ametadataioxml.cpp,v 1.7 2008/12/24 20:06:51 leader Exp $ ** ** Code file of the Ananas configuration objects of Ananas ** Designer and Engine applications ** ** Created : 20031201 ** ** Copyright (C) 2003-2004 Leader InfoTech. All r...
#include "TaskCorrel.h" // ============================= **************** ============================= // * cTriForTiepTri * // ============================= **************** ============================= cTriForTiepTri::cTriForTiepTri(cAppliTaskCorrel *aAp...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include <k4a/k4a.h> #include <k4arecord/playback.h> #include <string> #include "transformation_helpers.h" #include "turbojpeg.h" #include "opencv2/core.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" ...
#ifndef RUNTIME_INCLUDE_SYCL_SYCL_HPP_ #define RUNTIME_INCLUDE_SYCL_SYCL_HPP_ #include <CL/sycl.hpp> namespace sycl = cl::sycl; #endif // RUNTIME_INCLUDE_SYCL_SYCL_HPP_ #include "amul.hpp" #include "constants.hpp" // Original implementation by <NAME> for mumax2 // Modified for mumax3 by <NAME>, 2013, 2016 template ...
// Author(s): <NAME> // Copyright: see the accompanying file COPYING or copy at // https://github.com/mCRL2org/mCRL2/blob/master/COPYING // // 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) // /// \file pbes2bool.c...
#include "basic.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> bool is_power_of_two(uintptr_t n) { return n > 0 && (n & (n-1)) == 0; } uintptr_t align_forward(uintptr_t p, uintptr_t align) { assert(is_power_of_two(align)); p = (p + (align - 1)) & (~(align - 1)); r...
#include "menu.h" #include <SFML/Graphics/RenderWindow.hpp> #include <SFML/Graphics/Text.hpp> #include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Window/Keyboard.hpp> #include <SFML/Window/Joystick.hpp> #include <SFML/Window/Mouse.hpp> #include "engine.h" #include "input.h" #include <math.h> #include "misc.h" u...
#include <windows.h> #include "Quantize.h" ///////////////////////////////////////////////////////////////////////////// CQuantizer::CQuantizer (UINT nMaxColors, UINT nColorBits) { m_nColorBits = nColorBits < 8 ? nColorBits : 8; m_pTree = NULL; m_nLeafCount = 0; for (int i=0; i<=(int) m_nColorBits; i++) m_pReduc...
//************************************************************* // // Debugging functions // // Microsoft Confidential // Copyright (c) Microsoft Corporation 1995 // All rights reserved // //************************************************************* #include "fdeploy.hxx" // // Global Variable con...
/*========================================================================= Library: iMSTK Copyright (c) Kitware, Inc. & Center for Modeling, Simulation, & Imaging in Medicine, Rensselaer Polytechnic Institute. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file e...
#include "My3DLayer.h" #include "../square/ZFTManager.h" #include "../bndev/MyDraw.h" #include "../square/DiaoLuoManager.h" #include "../square/DiCiBox.h" #include "../square/JiaZiBox.h" #include "../square/TanShe.h" #include "../square/YiDongBox.h" #include "../bndev/Touch2D.h" int My3DLayer::flag[TREE_NUMBER] = {1,1...
#include "spheres_collisions.hpp" #include "image_utility.hpp" #include "renderer/Scene.hpp" #include "renderer/objects/Sphere.hpp" #include "renderer/objects/Parallelogram.hpp" #include <iostream> struct DynamicSphere { DynamicSphere (Sphere *sphere, const Vect velocity) : m_sphere(sphere), m_vel...
/**************************************************************************** * * Copyright (c) 2012-2016 PX4 Development Team. 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. Red...
/* * main.cpp * * Copyright (c) 2020 <NAME> * * This program is free software; you can redistribute it and/or modify * it under the terms of the MIT License. * * See accompanying LICENSE.md or https://opensource.org/licenses/MIT. */ #include "atto/opengl/opengl.hpp" using namespace atto; /** * Set data and ...
/* * Copyright 2019 Xilinx Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
#include "embree3/rtcore.h" #include <memory.h> #include <vector> #include <iostream> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// struct Vertex { float x,y,z,r; }; // FIXME: rename to Vertex4f struct Triangle { int v0, v1, v2; }; struct Global...
typedef long long ll; bool ge(const ll& a, const ll& b) { return a >= b; } bool le(const ll& a, const ll& b) { return a <= b; } bool eq(const ll& a, const ll& b) { return a == b; } bool gt(const ll& a, const ll& b) { return a > b; } bool lt(const ll& a, const ll& b) { return a < b; } int sgn(const ll& a) { return a >=...
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2012, <NAME>, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
// Arduino code for Tonino (my-tonino.com) using // - DFRduino Nano // - Adafruit 0.56" 7-segment LCD backpack display // see http://learn.adafruit.com/adafruit-led-backpack/0-dot-56-seven-segment-backpack // - TSC3200 DFRobot sensor // see http://www.dfrobot.com/wiki/index.php/TCS3200_Color_Sensor_(...
#include <omp.h> #include <stdio.h> #include <math.h> #include "ray.h" #include "sphere.h" #include "triangle.h" #include "lightcube.h" #include "vec3.h" #include "light.h" #include "scene.h" #include "camera.h" #include "easyppm.h" #include "easyppm.c" #include "box.h" #include "parser.h" #include <iostream> int imag...
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/containers/contains.h" #include "base/files/file_enumerator.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include...
#include "ScrollBar.h" #include "QtUtilities.h" using namespace qge; /// Constructs a default sized ScrollBar. ScrollBar::ScrollBar(): bgBarWidth_(20), bgBarLength_(250), fgBarWidth_(15), fgBarLength_(35), bgBarIsColor_(true), fgBarIsColor_(true), bgBarColor_(Qt::darkGray), fgBarColor...
/* __ ___ ____ _____ ______ _______ ________ _______ ______ _____ ____ ___ __ // // Copyright (C) 1993-2012, ART+COM AG Berlin, Germany <www.artcom.de> // // This file is part of the ART+COM Standard Library (asl). // // It is distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_...
#include "compression.h" // __________________________________________________________________________________________ // Name : CompressPixMap // Input : srcPix: a pixMapHandle to the source data, needs to be in 32 bits/pixel // Output : target: a newly allocated memory block containing the compressed data // ...
// -*- mode: C++; c-file-style: "cc-mode" -*- //************************************************************************* // DESCRIPTION: verilator_coverage: top implementation // // Code available from: http://www.veripool.org/verilator // //************************************************************************* // ...
/* * Copyright (C) 2019 Atos Spain SA. All rights reserved. * * This file is part of pCEP. * * pCEP is free software: you can redistribute it and/or modify it under the * terms of the Apache License, Version 2.0 (the License); * * http://www.apache.org/licenses/LICENSE-2.0 * * The software is provided "AS IS...
#include "Shader.hpp" using std::ifstream; using std::stringstream; Shader::Shader(const char* vertexPath, const char* fragmentPath) : hasTes(0), hasGeo(0) { string vertexCode; string fragmentCode; ifstream vShaderFile; ifstream fShaderFile; vShaderFile.exceptions (ifstream::failbit | ifstream:...
//////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2021 <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, includ...
/** * * @file sim.cpp * * @date March 31, 2019 * * @brief This file contains the top-level main routine driving the circuit * simulator. * * @author <NAME> (<EMAIL>) * */ #include <iostream> #include <stdbool.h> #include <parser/netparser.hpp> #include <components/component.hpp> #include <stdio.h> #include ...
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <math.h> #include <time.h> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <cv.h> #include <highgui.h> #include "cvaux.h" using namespace cv; //#include "CImg.h" //using namespace cimg_library; usi...
/****************************************************************************** * Copyright © 2014-2018 The SuperNET Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * ...
//===--- SemaStmtAttr.cpp - Statement Attribute Handling ------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // // And has the following additional copyright: // // (C) Cop...
/* * sh_sim_GL.h * * * implements sh_sim_GL.cpp * */ /////////////////////////////////////////////////////////////////////// // main header file #include <GL/glew.h> #include "shepherding_base.h" #include "GL/gl_draw_env.h" #include "GL/shadowMap_glsl.h" //////////////////////////////////////////...
/* ----------------------------------------------------------------------------------- * * File LabelAtlasCostom.cpp * Ported By <NAME> * Contact <EMAIL> * * ----------------------------------------------------------------------------------- * * Copyright (c) 20...
#include "NodeGraph.h" #include <raylib.h> #include <xlocinfo> DynamicArray<NodeGraph::Node*> reconstructPath(NodeGraph::Node* start, NodeGraph::Node* end) { DynamicArray<NodeGraph::Node*> path; NodeGraph::Node* currentNode = end; while (currentNode != start->previous) { currentNode->color = 0x00FF00FF; start...
/** * The MIT License (MIT) * * Copyright (c) 2015-2016 MUSE / Inria * * 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, c...
#include "Util.h" #include <algorithm> #include <codecvt> #include <iterator> #include <locale> #include <thread> #ifdef _WIN32 #include <Windows.h> #endif using namespace std; string currentExceptionMessage() { const auto exceptionPtr = current_exception(); if (nullptr == exceptionPtr) return "no exception"; ...
/* Copyright (c) 2014 Aerys 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 <stdio.h> #include <complex> #include <iostream> using namespace std; struct BiQuad{ double kk; double b0; double b1; double b2; double a1; double a2; double dx1; double dx2; double dy1; double dy2; }; struct BiQuad biquad[] = { { 9.028...
// Copyright (c) 2021 <NAME> International Graduate School // All rights reserved. #include "processor.h" using Addresses = std::vector<eevm::Address>; void append_argument(std::vector<uint8_t>& code, const uint256_t& arg) { // To ABI encode a function call with a uint256_t (or Address) argument, // simply app...
#include "Scene.h" #include "Camera.h" // for Camera #include "Context.h" // for ContextObjects, Context #include "InputManager.h" // for InputManager #include "Planet.h" // for Planet #include "SpriteFont.h" // for SpriteFont #include "TextRenderer.h" // for TextRenderer #inc...
#include "characters/gardener.hpp" #include <iostream> #include <cmath> #include "core/game_scene.hpp" #include "input_cache_ref.hpp" const char* Gardener::type = "Gardener"; const bool Gardener::good = GameCharacter::register_class<Gardener>(Gardener::type); Gardener::Gardener(salmon::ActorRef actor, GameScene* sc...
#include "Shader.h" Shader::Shader() : shaderID(0) { memset(shaders, 0, sizeof(shaders)); memset(uniforms, 0, sizeof(uniforms)); } void Shader::init(const std::string& glslPath) { std::string shaderFile = LoadShader(glslPath); for (size_t i = 0; i < (int)ShaderType::SH_Max; i++) { size_t indicator = shaderFile...
#include "utils.h" #include <iostream> #include <omp.h> #ifdef __ARM_NEON #include "arm_neon.h" #endif void box_nms_cpu(std::vector<Anchor>& boxs, const float threshold, std::vector<Anchor>& res, int target_size) { res.clear(); if(boxs.size() == 0) return; std::vector<size_t> indexs(boxs.size()...
#include "demo.h" #include "adapter.h" #include "nurbs_surface.h" #include "bounding_object.h" #include <CoreServices/CoreServices.h> WCNurbsSurface *surface; WCVector4 mark, move, spot; WCControlPoint *_ipt, *pt; WPFloat _tangentVal = 0.0; /*************************************************************************...
#include "dtk/chaining_mesh.hpp" #include "dtk/sort.hpp" #include <set> template<typename T> void smart_delete(T* array){ if(array) delete [] array; } namespace dtk{ ChainingMeshIndex::ChainingMeshIndex(float* len_xyz, size_t* len_ijk, int dim_num): dim_num(dim_num),element_index(0), element_cell(0){ l...
/** * Copyright (C) 2016-2017 Xilinx, Inc * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// 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, software // distributed ...
// //////////////////////////////////////////////////////// // # Title // Consecutive prime sum // // # URL // https://projecteuler.net/problem=50 // http://euler.stephan-brumme.com/50/ // // # Problem // The prime 41 can be written as the sum of six consecutive primes: // 41 = 2 + 3 + 5 + 7 + 11 + 13 // // This is the...
#include "string_util.hpp" #include <algorithm> #include <stdexcept> #include <fstream> #include <iomanip> #include <sstream> std::string ipv6_prettify(std::string addr) { for(int ii=0;ii<2;++ii) addr=replace_all(addr,"00","0"); if(addr.substr(0,2)=="0:") { addr.erase(0,1); addr[0]=':'; } ...
// // physics.cpp // Game Engine // #include <algorithm> #include "core.hpp" // // MARK: - Core // void _resolveCollisions(Entity & collider, Entity & obsticle, Vector2 & travel_distance, bool collision_response, vecto...
// Copyright (c) 2007-2009 Google Inc. // Copyright (c) 2006-2007 Jaiku Ltd. // Copyright (c) 2002-2006 <NAME> and <NAME> // // This software is licensed at your choice under either 1 or 2 below. // // 1. MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software ...
/* * BeetleConfig.cpp * * Created on: May 23, 2016 * Author: <NAME> */ #include "BeetleConfig.h" #include <unistd.h> #include <json/json.hpp> #include <cassert> #include <iostream> #include <fstream> #include <stdexcept> #include "ble/hci.h" #include "util/file.h" static std::string getDefaultName() { c...
// Copyright (c) 2015, Autonomous Systems Lab, ETH Zurich // 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 // noti...
/********************************************************************** optswx.cpp - Constructs wxWidgets Option controls from description text Copyright (C) 2006 by <NAME> This file is part of the Open Babel project. For more information, see <http://openbabel.org/> This program is free software; you can redistrib...
//----------------------------------------------------------------------------- // File: TetraTex.cpp // Desc: Load a tetrahedral mesh into textures // Copyright (C) 2005, <NAME>, <NAME>, UFRGS-Brasil //----------------------------------------------------------------------------- // This library is free software; you c...
// __BEGIN_LICENSE__ // Copyright (C) 2006-2010 United States Government as represented by // the Administrator of the National Aeronautics and Space Administration. // All Rights Reserved. // __END_LICENSE__ #include <vw/Plate/Blob.h> #include <vw/Plate/Exception.h> // Vision Workbench #include <vw/Core/Exception.h...
/* * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. * * 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...
// // StructuredGridV3D.cpp // AxiSEM3D // // Created by <NAME> on 4/15/20. // Copyright © 2020 <NAME>. All rights reserved. // // 3D volumetric models based on structured grid #include "StructuredGridV3D.hpp" #include "mpi.hpp" // constructor StructuredGridV3D:: StructuredGridV3D(const std::string &modelName, ...
#include "generator/maxspeeds_parser.hpp" #include "base/assert.hpp" #include "base/string_utils.hpp" #include <cctype> #include <limits> #include <unordered_map> namespace { using namespace measurement_utils; using namespace routing; using namespace std; unordered_map<string, SpeedInUnits> const kRoadCategoryToSpe...
#include "colorlinez2.h" #include <cstdlib> #include <ctime> #include <QDebug> #include <iostream> #include <vector> void printm(MAT mt){ int x = mt.size(); int y = mt[0].size(); for(int ii = 0;ii<x;ii++){ for(int jj = 0;jj<y;jj++){ std::cout<<mt[ii][jj]<<" "; }...
#include "MPC.h" #include <cppad/ipopt/solve.hpp> MPC::MPC() {} MPC::~MPC() {} void MPC::operator()(ADvector & fg, const ADvector & vars) { fg[0] = 0; for (int t = 0; t < this->n; t++) apply_cost(fg, vars, t); // Since cost is located at 0: add 1 to each of the starting indices for (size_t i: si.lis...
/* Copyright © 2021 <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, sublicense...
#include <stdio.h> #include "InfoChip8.h" #include "System.h" #include "CPU.h" #include "PPU.h" #include "IO.h" /*-------------------------------------------------------------------*/ /* CPU Resources */ /*--------------------------------------------------...
#include <gtest/gtest.h> #include "Factory.hpp" #include "Product.hpp" #include "Singleton.hpp" #include "Prototype.hpp" #include "Builder.hpp" #include "Abstraction.hpp" #include "AbstractionImp.hpp" #include "ClassAdapter.hpp" #include "Adapter.hpp" #include "Decorator.hpp" #include "Composite.hpp" #i...
#include "Application.h" #include "Common.h" #include "GlobalTimer.h" #include "Input.h" #include "Renderer.h" #include "Utilities.h" #include "SpellSystem.h" #include "TypingSystem.h" #include "tinyxml/tinyxml.h" #include <time.h> Application::Application() { // Seed the PRNG. srand(static_cast<...
/* The MIT License (MIT) Copyright (c) 2006-2016 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
#include "plot.h" #include "curvedata.h" #include "signaldata.h" #include <qwt_plot_grid.h> #include <qwt_plot_layout.h> #include <qwt_plot_canvas.h> #include <qwt_plot_marker.h> #include <qwt_plot_curve.h> #include <qwt_plot_directpainter.h> #include <qwt_curve_fitter.h> #include <qwt_painter.h> #include <qevent.h> c...
#include <chrono> #include <filesystem> #include <fstream> #include <iomanip> #include <iostream> #include <vector> #include "graph.hpp" #include "graph_generation_controller.hpp" #include "graph_generator.hpp" #include "graph_printer.hpp" #include "graph_traversal_controller.hpp" #include "graph_traverser.hpp" #includ...
// // OptionsTests.cpp // EchoErrorCorrection // // Created by <NAME> on 21/11/13. // #include "OptionsTests.hpp" #include <string> #include <vector> using namespace std; CPPUNIT_TEST_SUITE_REGISTRATION( OptionsTest ); void OptionsTest::setUp() {} void OptionsTest::tearDown() {} //tests void OptionsTest::emptyOp...
#pragma once #include "ofxXboxController.h" #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> #include <commdlg.h> #include <basetsd.h> #include <objbase.h> #ifdef USE_DIRECTX_SDK #include <C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\include\xinput.h> #pragma comment(lib,"xinput.lib") #...
// // Created by CantelopePeel on 2020-02-11. // #include <iostream> #include <fstream> #include <string> #include <vector> #include <cmath> #include <map> #include <algorithm> #include <unordered_map> #include <bitset> #include "types.h" #include "methods.h" #include "utils.h" std::vector<std::string> split_string(...
/***************************************************************************** * matrix_test.cpp * * Matrix class testing. * * <NAME>, 2010-01 (revised 2010-12), Xi'an Jiaotong University. *****************************************************************************/ #defi...
//----------------------------------------------------------------------------- // Copyright (c) 2013 GarageGames, LLC // // 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 restrictio...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// cProgressBarGfx.cpp: implementation of the cProgressBarGfx class. // ////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "cProgressBarGfx.h" #include "gfx_util.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction /////...
/* * Software License Agreement (BSD License) * * Copyright (c) 2017, Toshiba Corporation, * Toshiba Infrastructure Systems & Solutions Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the f...
#include <iostream> #include <stdio.h> #include <time.h> #include <Windows.h> #include "Defines.h" #include "Game.h" Game::Game() : _players(0), _currentPlayer(0), _choice(1), _newScore(501), _temp(0), _simulateCounter(0) {} Game::~Game() {} //There is no deleting of pointers in vector of pointers '_players' or Board...
// Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC // (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. // Government retains certain rights in this software. #include <string> #include <algorithm> #include "gtest/gtest.h" #include "faodel-common/Common.hh" #include "k...
/** * @file libusb_gps.h * @author <NAME> <<EMAIL>> * @date 23.12.2016 * * @brief Used to read uBlox EVKM8N. * Has been included in ROS in gnss_protocols.h * * * Coding Standard: * wiki.ros.org/CppStyleGuide * https://google.github.io/styleguide/cppguide.html * * * ...
#include "board.h" #include "evaluate.h" #include "search.h" #include "threats.h" #include "types.h" #include <iostream> #include <vector> #include <algorithm> void initSearch() { // Initialize killers for (int i = 0; i <= MAX_PLY; ++i) { killers[0][i] = NO_MOVE; killers[1][i] = NO_MOVE; } } void printPV(Boar...
//-------------------------------------------------------------------- // parser.cpp - sample code // Copyright (C) Microsoft Corporation, 2001 // // Created by: <NAME> (duncanb), 9-13-2001 // // Code to parse the samples returned from hardware providers // #include "pch.h" // // FORMAT STRING SPECIFICA...
#include "verlet/List.hpp" #include "simul/Simulation.hpp" #include "forces/NonlocalForce.hpp" #include <Eigen/Geometry> using namespace mdk; using namespace mdk::vl; #include <iostream> using namespace std; extern Eigen::AlignedBox3d bboxTP; extern std::vector<int> firstTP, lastTP; extern Pairs pairsTP; #pragma omp...
/* gameplay.cpp GamePlay is the entry point of the actual game. It is responsible for initializing the gameplay area. It loads the resources needed in the game, calls the Grid display and composeFrame functions, and controls the state of the game. It is also responsible for cleaning up when the game is finished. ...
#include "draw.hpp" #include "addresses.hpp" #include <cstdio> void __stdcall re::draw_all() { HDC hdc = GetDC(g_window_handle); draw_all_context(hdc); ReleaseDC(g_window_handle, hdc); } void __stdcall re::draw_all_context(HDC hdc) { draw_frame_context(hdc); draw_flag_counter_context(hdc); draw_smiley_...
#include <Arduino.h> /* Stepper Motor Control via Bluetooth commands This program drives a unipolar or bipolar stepper motor. The motor is attached to digital pins 8 - 11 of the Arduino. A Bluetooth module may be connected to D2/D12 (TX, RX on Arduino side). Created 9 July 2017 Modified 5 July 2019 by <NAME...
#include "WikiSort.h" #include <iostream> #include <unordered_map> #include <unordered_set> #include <vector> #include <fstream> #include <sstream> #include <string> #include <boost/algorithm/string.hpp> #include <iomanip> #include <map> // Nick // George // Arthur // NGA using namespace std; Wiki...
/* * std::atomic * * When using concurrency, communication using shared memory is way trickier * than you would expect. As threading is part of C++ since C++11, there are a * few things you should know. * * First of all, don't use threads. Use fibers instead (such as * https://github.com/jhrutgers/zth). Howeve...
#include <cstdlib> // random numbers #include <chrono> // measuring wall time #include <string> #include <iomanip> #include <poplar/DeviceManager.hpp> #include <poplar/Engine.hpp> inline static float randomFloat() { return static_cast <float> (rand()) / static_cast <float> (RAND_MAX); } poplar::Device getDevice(uns...
// -------------------------------------------- // Copyright KAPSARC. Open source MIT License. // -------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2015 <NAME> Studies and Research Center // // Permission is hereby granted, free of charge, to any person obtaining a copy of this s...
#include <cstring> #include "Font.h" Font::Font() { texID=0; srcBlend = GL_SRC_ALPHA; dstBlend = GL_ONE_MINUS_SRC_ALPHA; scale.x = 1; scale.y = 1; TextColor[0]=1; TextColor[1]=1; TextColor[2]=1; bShadow = true; mAlign = ALIGN_CENTER; sine =0; bSineWave = false; } Font::~Font() { if(texID) glDeleteTexture...
#include "slot_terminal.hpp" #include "pty.h" #include "types.hpp" #include <unistd.h> #include "nanoclock.hpp" #include "interface.hpp" #include "interface_ncurses.hpp" #include <iostream> #include "slot_linux_common.hpp" #include "bsd_pty.h" #ifdef __WIN32 #error "Terminal (pty) glue does not work on Windows." #en...
#include <eosio/eosio.hpp> #include <eosio/table.hpp> struct test_record { int pk; float s; std::string n; }; class [[eosio::contract]] kv_map_tests : public eosio::contract { public: using contract::contract; using testmap_t = eosio::kv::map<"testmap"_n, int, float>; using testmap2_t = eosio::kv::...
//===--- IndexSymbol.cpp - Types and functions for indexing symbols -------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// Copyright 2016 The University of North Carolina at Chapel Hill // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
#include <3ds.h> #include <string> #include "json.hpp" #include "httpc.h" #include "gfx.h" #include "nfs.h" #include "config.hpp" #include "utils.h" #include "common.h" #include "updater.hpp" extern Config *config; static char *newVerString = nullptr; static char *newChangelog = nullptr; static char *urlDownload = nu...
/** * @file * @brief Implementation of ProjectionPropagation module * @copyright MIT License */ #include "ProjectionPropagationModule.hpp" #include <cmath> #include <limits> #include <string> #include <utility> #include "core/messenger/Messenger.hpp" #include "core/utils/log.h" #include "objects/DepositedCharge....