text
stringlengths
3.08k
22k
// // Copyright (c) 2013-2021 The SRS Authors // // SPDX-License-Identifier: MIT or MulanPSL-2.0 // #include "srt_conn.hpp" #include "time_help.hpp" #include "stringex.hpp" #include "srt_log.hpp" #include <vector> #include <srs_protocol_utility.hpp> #include <srs_kernel_utility.hpp> #include <srs_app_config.hpp> boo...
#include "bjit.h" using namespace bjit; void Proc::opt_dce(bool unsafeOpt) { bool progress = true; //debug(); int iters = 0; while(progress) { ++iters; progress = false; for(auto & b : blocks) { if(!b.flags.live) continue; b.flags.live = fa...
// _THE BlowFishEnc ENCRYPTION ALGORITHM_ // by <NAME> // Revised code--3/20/94 // Converted to C++ class 5/96, <NAME> // Updated to support FileEncryption Utility by <NAME>, 9/02 #include "blowfish.h" #include "sboxs.h" // holds the random digit tables #include <string.h> #define S(x,i)(SBoxes[i][x.w.byte#...
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2020 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ...
#include "league_model/skeleton.hpp" #include "league_model/skin.hpp" #include <profiling.hpp> #include <map> #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/transform.hpp> #include <glm/gtx/quaternion.hpp> #include <glm/gtx/compatibility.hpp> uint32_t StringToHash(const std::string& s) { unsigned int hash = 0; ...
/* -------------------------------------------------------------------------- * * File GameOverLayer.cpp * * Ported By <NAME> * Contact <EMAIL> * * Created By <NAME> on 2012/10/04 * * -------------------------------------------------------------------------- ...
/* SROOM - room simulation with stationary sound source p0 output start time p1 input start time p2 input duration p3 amplitude multiplier p4 distance from middle of room to right wall (i.e., 1/2 of width) p5 distance from middle of room to front wall (i.e., 1...
/* Wake FUSE launcher to capture inputs/outputs * * Copyright 2019 SiFive, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You should have received a copy of LICENSE.Apache2 along with * this software. If not, you may o...
//Template #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <climits> #include <cmath> #include <utility> #include <set> #include <map> #include <queue> #include <ios> #include <iomanip> #include <ctime> #include <numeric> #include <functional> #include <fstream>...
#include "ErrorBlocks.h" #include "Common.h" #include "ReturnConstraints.h" #include "ReturnPropagation.h" #include "ReturnedValues.h" #include "Utility.hpp" #include "llvm/IR/Constants.h" #include "llvm/IR/Module.h" #include <glog/logging.h> #include <boost/algorithm/string.hpp> #include <fstream> #include <iostream> ...
#include "BoardClient.h" #include "BoardMessage.h" #include "ImageCoder.h" #include "Poco/Net/SocketAddress.h" #include "Poco/Net/Socket.h" #include "Poco/Net/StreamSocket.h" #include "Poco/Net/NetException.h" #include "Poco/Net/SocketStream.h" #include "Poco/StreamCopier.h" #include "Poco/Timespan.h" #includ...
/* Agobot3 - a modular IRC bot for Win32 / Linux Copyright (C) 2003 Ago 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 your option) any later version. ...
// Tags: Matrix Exponenciation // Difficulty: 5.8 // Priority: 1 // Date: 12-09-2021 #include <bits/stdc++.h> #define all(A) begin(A), end(A) #define rall(A) rbegin(A), rend(A) #define sz(A) int(A.size()) #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple using namespace std...
#include <gtest/gtest.h> #include "voxblox/Block.pb.h" #include "voxblox/Layer.pb.h" #include "voxblox/core/block.h" #include "voxblox/core/layer.h" #include "voxblox/core/voxel.h" #include "voxblox/integrator/merge_integration.h" #include "voxblox/io/layer_io.h" #include "voxblox/io/mesh_ply.h" #include "voxblox/io/s...
/*********************************************************************** ws-util.cpp - Some basic Winsock utility functions. This program is hereby released into the public domain. There is ABSOLUTELY NO WARRANTY WHATSOEVER for this product. Caveat hacker. ****************************************************...
#include <fstream> #include <iostream> #include <limits> #include <strstream> #include "asset.h" using namespace Eigen; using namespace std; bool InitializeAssetDatabase(AssetDatabase& database) { if (!ReadAssetFromObj("../data/bathtub.obj", database.bathtub)) return false; if (!ReadAssetFromObj("../data/was...
// UIButton.cpp: класс нажимаемой кнопки // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "UIButton.h" #include "../HUDManager.h" #include "UILines.h" #include "UIBtnHint.h" #define PUSH_OFFSET_RIGHT 1 #define PUSH_OFFSET_DOWN 1 CUIButton:: CUIButton() { m_eB...
#include "openglwindow.hpp" #include <imgui.h> #include <math.h> #include <cppitertools/itertools.hpp> #include <glm/gtx/fast_trigonometry.hpp> void OpenGLWindow::initializeGL() { glClearColor(0, 0, 0, 1); // Enable depth buffering glEnable(GL_DEPTH_TEST); // Create program m_program = createProgramFromF...
#include <errno.h> #include <fcntl.h> #include <locale.h> #include <stdlib.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <locale.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <chrono> #include <fstream> #include <iostream> #include <sstream> #includ...
// Copyright (c) 2009-2010 <NAME> // Copyright (c) 2009-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <pow.h> #include <arith_uint256.h> #include <chain.h> #include <chainparams.h> #i...
#include <string> #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DQMServices/Core/interface/DQMEDAnalyzer.h" #include "DQMServices/Core/interface/DQ...
/* FreeTDS - Library of routines accessing Sybase and Microsoft databases * Copyright (C) 2015 <NAME> * * 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 Foundation; either * version 2 of the L...
#include "blendMap.h" #include "HeightMap.h" #include "PivotPoint.h" #include "utility.h" BlendMap::BlendMap( std::vector<Util::Texel> p_texels ) { m_texBlendMap = NULL; m_srvBlendMap = NULL; m_texels = p_texels; } BlendMap::~BlendMap() { SAFE_RELEASE(m_texBlendMap); SAFE_RELEASE(m_srvBlendMap); } void BlendMap...
// FILE pacman.cpp // Qui vanno gli #include #include "pacman.h" #include <iostream> #include <fstream> #include <stdlib.h> #include <string> using namespace std; // const string YELLOW="\e[1m\e[33m"; const string RED ="\e[1m\e[91m"; const string GREY ="\e[1m\e[35m"; const string BLUE = "\e[1m\e[44m\e[34m"; const str...
// C++ std #include <iostream> #include <fstream> #include <string> #include <vector> #include <unordered_map> #include <unordered_set> #include <stdexcept> // C std #include <cstdlib> // project #include "my_args_parser.hpp" void transcompile(const MyArgsParser& parser, const std::string& bf_filename, const std:...
#include "level.h" #include "globals.h" #include "creature.h" #include "bspdungeon.h" #include "rng.h" #include "player.h" bool Level::load(const sf::Vector2u tileSize, const Map2D & map) { int width = map.width; int height = map.height; // Resize the vertex array to fit the level size _vertices.setPrimitiveType...
#include "structs.hpp" #include "funcs.hpp" #include <string> #include <cstdio> #include <vector> #include <exception> using namespace TAE; std::wstring readNameW(FILE* file, int offset) { long posBuffer = ftell(file); fseek(file, offset, SEEK_SET); std::wstring text; int peekChar = fge...
//===- InjectDUTHierarchy.cpp - Add hierarchy above the DUT ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
// -*- C++ -*- // // Package: PythiaCumulant/TreeProduction // Class: TreeProduction // /**\class TreeProduction TreeProduction.cc PythiaCumulant/TreeProduction/plugins/TreeProduction.cc Description: [one line class summary] Implementation: [Notes on implementation] */ // // Original Author: <NAME> /...
#include "Octree.h" using namespace Miyuki; AABB getBoundBox(const std::vector<Primitive*> objects) { vec3 a{ inf,inf,inf }, b(-inf, -inf, -inf); for (auto i : objects) { auto box = i->getBoundBox(); a = min(a, box.min); b = max(b, box.max); } vec3 d{ eps,eps,eps }; auto result = AABB(a - d, b + d); for (...
/// Project Includes #include "defines.hpp" #include "globals.hpp" #include "board.hpp" #include "chess_clock.hpp" #include "search.hpp" #include "book.hpp" /// Standard Library Includes #include <iostream> #include <string> /// Third-Party Includes #include <spdlog/spdlog.h> #include <spdlog/sinks/stdout_color_sinks...
//== AnalysisContext.cpp - Analysis context for Path Sens analysis -*- C++ -*-// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// Member Records #include "stdafx.h" #include "TrainingRcds.h" #include "CSVrcds.h" #include "MemberTbl.h" #include "StatusTbl.h" #include "TrnNeeded.h" TrainingRcds trainingRcds; void TrainingRcds::load(CSVrcds& csvRcds) { CSVIter iter(csvRcds); CSVrcd* csvRcd; for (csvRcd = iter(); csvRcd; csvRcd = iter++) ...
#include <cstring> #include <iostream> #include <memory> #include <regex> #include "common/except.h" #include "common/pixel.h" #include "graph/image_filter.h" #include "depth/depth.h" #include "apps.h" #include "argparse.h" #include "frame.h" #include "table.h" #include "timer.h" #include "utils.h" namespace { int d...
#include <MyGL/Drawable/AbstractShape.hpp> #include <algorithm> constexpr const char* vertexSource = "#version 330 core\n" "layout (location = 0) in vec3 aPos;" "uniform mat4 model;" "uniform mat4 view;" "uniform mat4 projection;" "void main(){" " gl_Position = projection * view * model * vec4(aPos, 1...
#include <stdint.h> #include "diablo.h" namespace { size_t skipID3v2Tag(const uint8_t* block) { if (block[0] == 'I' && block[1] == 'D' && block[2] == '3') { int id3v2_major_version = block[3]; int id3v2_minor_version = block[4]; int id3v2_flags = block[5]; int flag_unsynchronisation = id3v2_flags & ...
#include "OnlineDB/CSCCondDB/interface/CSCOnlineDB.h" /** * Constructor for condbon */ condbon::condbon() noexcept(false) { std::string db_user; std::string db_pass; env = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::OBJECT); char *c_user = ::getenv("CONDBON_AUTH_USER"); char...
/*! LTC2944: Multicell Battery Gas Gauge with Temperature, Voltage and Current Measurement @verbatim The LTC®LTC2944 measures battery charge state, battery voltage, battery current and its own temperature in portable product applications. The wide input voltage range allows use with multicell batteries up to ...
//============================================================================================= // MadgwickAHRS.c //============================================================================================= // // Implementation of Madgwick's IMU and AHRS algorithms. // See: http://www.x-io.co.uk/open-source-imu-and-...
/* * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: <NAME> */ #include <random> #include <algorithm> #include <iostream> #include <numeric> #include <math.h> #include <iostream> #include <sstream> #include <string> #include <iterator> #include "particle_filter.h" using names...
#include "Graphics.h" #include <iomanip> #include "GraphicsThread.h" #include "System.h" using namespace std; float Graphics::RatioSize = 2.0f; Graphics::Graphics(System& parent) : _memory { parent.getMemory() } { _addressVRAM = 0; _codeRegister = 0; _actualMode = 0; _controlByte = 0; _controlCmd = 0; _readA...
/******************************* File name: submitter/app.cpp Version: 0.1 Description: app manager for submitter *********************************/ #include <string> #include <vector> #include <stdio.h> #include <iostream> #include "submitter/hdfs_wrapper.h" #include "submitter/app.h" #include "include/classad_at...
#include <opencv2/opencv.hpp> #include <iostream> #include <fstream> #include <string> #include <time.h> //#include <Windows.h> #include "headers.h" #include <sys/types.h> #include <sys/stat.h> #include <omp.h> using namespace cv; using namespace std; void CropFacialComponent(cv::Mat image, cv::Mat_<dou...
#include "GPUParticleSystem.h" #include "Utilities.h" #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/ext.hpp> #include <stb_image.h> GPUParticleEmitter::GPUParticleEmitter() : m_particles(nullptr), m_maxParticles(0), m_position(0, 0, 0), m_drawShader(0), m_updateShader(0) { m_vao[0] = 0; m_vao[1] = 0; ...
#include <arpa/inet.h> #include <netdb.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <sys/time.h> #include <time.h> #include <unistd.h> #include "FlyCapture2.h" #include "opencv2/legacy/legacy.hpp" #include <opencv2/core/core.hpp> #include <opencv2/h...
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. // // Licensed under the Universal Permissive License v 1.0 as shown // at http://oss.oracle.com/licenses/upl // // bulkcp.cpp: dumping output of an arbitrary que...
// Copyright 2020 Makani Technologies 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 ...
/* Copyright (c) 1999 - 2010, Vodafone Group Services Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of condit...
#include "flame/constants.h" #include "flame/moment.h" #include "flame/moment_sup.h" #include "flame/chg_stripper.h" #define sqr(x) ((x)*(x)) #define cube(x) ((x)*(x)*(x)) static double Gaussian(double in, const double Q_ave, const double d) { // Gaussian distribution. return 1e0/sqrt(2e0*M_PI)/d*exp(-0.5e0*...
// <NAME>, 10/18/2006 #include <math.h> #include "OLS.h" #include "MathStats.h" #include "MathSVD.h" OLS_REGRESSION::OLS_REGRESSION() { nuisanceCount = 0; } void OLS_REGRESSION::Print() { printf("%10s%7s%10s%10s%7s", "covariate", "t", "pvalue", "effect", "h2"); if(nuisanceCount) printf("%7s",...
#ifdef ALPINE #include <gdal.h> #include <cpl_string.h> #include <ogr_spatialref.h> #else #include <gdal/gdal.h> #include <gdal/cpl_string.h> #include <gdal/ogr_spatialref.h> #endif #include "dataset.h" static char *sanitizeSRS(const char *); static int datasetGetBounds(dataset *ctx); static int datasetGetCorner(data...
// Copyright 2022 PingCAP, Ltd. // // 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 i...
/* * perftester.cc * * Created on: Aug 29, 2014 * Author: <NAME> */ #include <assert.h> #include <vector> #include <deque> #include <iostream> #include <fstream> #include <atomic> #include <thread> #include <memory> #include <Eigen/Dense> #include <Eigen/Core> #include "gloc/cuboid.hpp" #include "gloc/channe...
// Copyright (c) 2011-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/peertablemodel.h> #include <qt/guiconstants.h> #include <qt/guiutil.h> #include <qt/platformstyle.h> #include ...
#include "get_ray_shell_intersections.h" #ifndef p #define p(i,j) p[(i)+np*(j)] #define t(i,j) t[(i)+ne*(j)] #endif #ifndef facets_bbx #define facets_bbx(i,j) facets_bbx[(i) + ne*(j)] #endif /*************************************************************** * To compile this file use: * For Windows: * mex -v -DWIN32 ...
/** * @file llregioninfomodel.cpp * @brief Region info model * * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2011, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General...
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string> #include <cstring> #include <typeinfo> #include <vector> #include <unordered_map> #include <iostream> #include "seeker/common.h" namespace tmp_test7 { using std::cout; using std::endl; using std::string; using std::vector; template <typenam...
#include "VectorField.hpp" #include "VectorFieldDirections.hpp" #include "ParameterUtils.hpp" #include "AppConfig.hpp" using namespace timelymatter; // Type definition for typing comfort. typedef vector<VectorFieldMark>::iterator MIt; void VectorField::setup(const unsigned int width, const unsigned int height, cons...
#include "seaview.h" #include <FL/Fl_Round_Button.H> #include <FL/Fl_Check_Button.H> #include <FL/Fl_Return_Button.H> #include <FL/Fl_Choice.H> void concatenate_dialog(SEA_VIEW *view); static void cancel_callback(Fl_Widget *, void *); void rank_name_callback( Fl_Widget *o, void *data); void do_concatenate_callback( Fl...
#include "MainWindow.h" MainWindow::MainWindow(const Vector2i & size, const string & caption, nanogui::ref<MonitorWindow> monitorWindow) : Screen(size, caption) , _isVideoStarted{ false } , _colorRatio{ 16.0f / 9.0f } , _depthRatio{ 16.0f / 9.0f } , isClipping{ false } ...
#include "element_tree.hh" #include <rich-log/log.hh> #include <structured-interface/recorded_ui.hh> static constexpr std::byte s_version_byte = std::byte(0x12); bool si::element_tree::is_element(const si::element_tree::element& e) const { if (_elements.empty()) return false; return &_elements.front...
#include <CGnuPlotStyleFilledCurves.h> #include <CGnuPlotGroup.h> #include <CGnuPlotPlot.h> #include <CGnuPlotWindow.h> #include <CGnuPlotRenderer.h> #include <CGnuPlotPolygonObject.h> #include <CGnuPlotUtil.h> #include <CMathGeom2D.h> namespace { void getLimit(const CGnuPlotFilledCurve &filledCurve, const CBBox2D &b...
// Copyright (c) 2019 <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, d...
#include "L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilterBayes.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" using namespace edm; using namespace std; using namespace cmsdt; ; // ============================================================================ // Constructors and destructor // =...
/** * Mapper.cpp * * Created by <NAME> on 27/11/2012. */ #include "Mapper.h" ofMutex Mapper::mutex; void Mapper::setup(xmlgui::Container *targetGui, xmlgui::ofGuiEventDispatcher *events, xmlgui::SimpleGui *sourceGui) { this->sourceGui = sourceGui; this->targetGui = targetGui; this->targetEvents = events; ...
/* LunarlanderMission Game, 2D Graphics Programming. B00239486. Random class created by <NAME>: (<EMAIL>) Bitmap class created by <NAME>, <NAME> and <NAME>: (<EMAIL>, <EMAIL> and <EMAIL> - www.backhouse.tk) Backdrop image taken from deviant art and converted to Bitmap: http://th01.deviantart.net/fs6/PRE/i/20...
/** * @file test_kmer_hash.cpp * @ingroup * @author tpan * @brief * @details * * Copyright (c) 2015 Georgia Institute of Technology. All Rights Reserved. * * TODO add License */ #include "utils/logging.h" // include google test #include <gtest/gtest.h> #include <random> #include <cstdint> #include ...
// // Created by 5dv115 on 4/26/17. // #include "FeaturePoints.h" FeaturePoints::FeaturePoints(std::string imageName, int id) { this->imageName = imageName; } int korder (void const* a, void const* b) { double x = ((double*) a) [2] - ((double*) b) [2] ; if (x < 0) return -1 ; if (x > 0) return +1 ; ...
#include "graph.h" #include <cassert> #include <sys/time.h> #include <sys/mman.h> #include <fcntl.h> #include <unistd.h> #include <chrono> #include <fstream> #include "jetbrains_fake.h" #include "util.h" #include "log.h" #include "search_util.h" #include "../host/parallel_all_edge_cnc.h" void free_graph(graph_t *g...
#include "common/map/MapEngine.h" #include "common/map/GoogleMapEngine.h" #include "common/map/ESRIMapEngine.h" #include <algorithm> #undef DEFAULT_LOGCATEGORY #define DEFAULT_LOGCATEGORY "MapEngine" namespace rho { namespace common { namespace map { MapProvider &MapProvider::getInstance() { static MapProvider ...
// Copyright [2021] <NAME> #include "frontier_exploration/explore.h" #include <thread> #include <vector> #define ATTRIBUTE_UNUSED(expr) (void)(expr) namespace frontier_exploration { Explore::Explore(ros::NodeHandle* nh, ros::NodeHandle* pnh) : _pnh(pnh) , _nh(nh) , _tf(ros::Duration(10.0)) , _active...
// COCOA class implementation file //Id: OptOOpticalSquare //CAT: Model // // History: v1.0 // <NAME> #include "Alignment/CocoaModel/interface/OptOOpticalSquare.h" #include "Alignment/CocoaModel/interface/LightRay.h" #include "Alignment/CocoaModel/interface/ALIPlane.h" #include "Alignment/CocoaModel/...
#pragma warning(disable 4996) #include <GL\glut.h> #include <GL\GL.h> #include <GL\freeglut_ext.h> #include <stdio.h> #include <stdlib.h> //#pragma comment( lib, "glew32.lib" ) unsigned int width = 500, height = 500; GLuint texture; char* filename = NULL; void initGL(); void display(); void reshape(...
#include "ros/ros.h" #include "nav_msgs/Odometry.h" #include "geometry_msgs/Twist.h" #include "sensor_msgs/LaserScan.h" #include <cstdlib> // Needed for rand() #include <ctime> // Needed to seed random number generator with a time value #include <boost/thread/mutex.hpp> #include <boost/date_time/posix_time/posix_time.h...
#include "../share/config.h" #include "animal.h" #include "predator.h" #include "prey.h" #include "basic_funcs.h" #include "birth.h" #include "output.h" #include <future> #include "../share/includes.h" void new_animal(int &id, int index, Birth new_birth, Animal* animal_list[], std::map<std::string, int> config) { if...
// Copyright (c) 2012, 2020 Tel-Aviv University (Israel). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s): <NAME> <<EMAIL>> // <NAME> <<EMAIL>> #include "MergeEdgeCallback.h" #in...
#include "sha256.h" #include <stdio.h> #include <cstring> #define SHA256_DBL_INT_ADD(a,b,c) if (a > 0xffffffff - (c)) ++b; a += c; #define SHA256_ROTLEFT(a,b) (((a) << (b)) | ((a) >> (32-(b)))) #define SHA256_ROTRIGHT(a,b) (((a) >> (b)) | ((a) << (32-(b)))) #define SHA256_CH(x,y,z) (((x) & (y)) ^ (~(x) & (z))) #defi...
#include "mpu-sensor.h" MPUSensor::MPUSensor(int pinCS) : pinCS(pinCS) { this->zax = 0; this->zay = 0; this->zaz = 0; this->zgx = 0; this->zgy = 0; this->zgz = 0; } void MPUSensor::init() { pinMode(pinCS, OUTPUT); digitalWrite(pinCS, LOW); delay(100); digitalWrite(pinCS, HIGH); //TODO try to speed up i2c ...
#include <GL/glut.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <stdarg.h> #include <vector> using namespace std; int WINDOW_WIDTH, WINDOW_HEIGHT, STEP, SIZE, TIMER_PERIOD; #define D2R 0.0174532 bool up = false, down = false, right = false, left = false; int winWidth, winH...
#include <iostream> #include <fstream> #include <vector> #include <unistd.h> #include <algorithm> #include <map> #include <iomanip> #include <sstream> #include <set> #include "DatFile.cpp" #include <string.h> #include <assert.h> class indirect_sort { public: const std::vector<Player> &players; indirect_sort(c...
/************************************************************** * * 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 y...
#include <string> #include <iostream> #include <chrono> #include <math.h> using namespace std; double getTime() { return chrono::duration_cast<chrono::milliseconds>(chrono::system_clock::now().time_since_epoch()).count(); } #define layers 5 #define PI 3.14159265358 int main() { // glossary: W: watt, m: meter...
// 排序 #include <iostream> using namespace std; typedef int KeyType; // 定义关键字类型为整数类型 typedef struct { KeyType key; // 关键字项 //InfoType otherinfo; // 其他数据项 } RcdType; typedef struct { RcdType *r; // r[0]闲置或者用作哨兵 int length; // 顺序表长度 } SqList; // 顺序表类型 ...
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: Contains 2D clipping routines // // $Revision: $ // $NoKeywords: $ //=============================================================================// #include <vgui/ISurface.h> #include "Clip2D.h" #include "tier0/dbg.h" #includ...
#include "AudioManager.hpp" #include <opusfile.h> /// Constructor AudioManager::AudioManager() : shouldStop(true) , shouldLoop(false) , isSkipping(false) , files(0) , currentFile(nullptr) , fileCounter(0) { eprintf("init\n"); ndspInit(); auto const bufferSize = WAVEBUF_SIZE * std:...
/* SPDX-License-Identifier: BSD-2-Clause-Patent * * Copyright (c) 2019 Intel Corporation * * This code is subject to the terms of the BSD+Patent license. * See LICENSE file for more details. */ #include "controller_ucc_listener.h" #include "son_actions.h" #include <unordered_set> using namespace beerocks; cont...
// This #include statement was automatically added by the Particle IDE. #include "cloud_storage.h" // Non-volatile storage #include "storage.h" #include "helpers.h" // Bubble display #include "retro_led.h" #include "ht16k33.h" // Thermocouple amplifier #include "MAX6675.h" // Mirror RGB LED #include "external_led.h...
// // Created by jugos000 on 23-Nov-20. // #include <algorithm> #include <cmath> #include <iostream> #include <fstream> #include <random> #include <string> #include <vector> using namespace std; constexpr int64_t fileSizes[64] = {173669, 275487, 1197613, 1549805, 502334, 217684, 1796841, 274708, ...
#include "camera.h" #include "imagestream.h" #include "camera_texture.h" #include "camera_texture.h" #include "yuv2rgb_material.h" #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <QDebug> #include <QSGGeometryNode> char *Camera::CAPTURE_DEVICE = 0; Cam...
#include "vcShader.h" #include "vcOpenGL.h" #include "../../src/vcConstants.h" // TODO: Fix this #include "udPlatformUtil.h" #include "udStringUtil.h" #include "udFile.h" const char *pVertexFileExtension = ".vert"; const char *pFragmentFileExtension = ".frag"; GLint vcBuildShader(GLenum type, const GLchar *shaderCode...
#include "Arduino.h" #include "string.h" #include "ESP8266WiFi.h" #include "ESP8266HTTPClient.h" #include "PubSubClient.h" #include "Adafruit_Sensor.h" #include "DHT.h" #include "TSL2561.h" // include the user configuration file #include "config.h" extern "C" { #include "user_interface.h" extern struct rst_info rese...
#include "player.hpp" #include <SFML/Graphics.hpp> #include <iostream> #include "world.hpp" /** TODO (not updated) : - Placer l'arme correctement - Animation de l'attaque (rotation du sprite du Weapon) - Empecher de sortir de la fenere / allez trop haut-bas => Fait dans game.cpp <= and fixed back her...
/* <!-- copyright */ /* * aria2 - The high speed download utility * * Copyright (C) 2011 <NAME> * * 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 * (a...
// // Created by Raiix on 2019/12/3. // //注意头文件引用的先后顺序 #include <glad/glad.h> #include <GLFW/glfw3.h> #include <stb/stb_image.h> #include <iostream> #include <fstream> #include <string> #include <streambuf> #include "wrap_shaders.h" std::string GetStringFromFile(std::string path) { using namespace std; #ifdef ...
#include "Common/config.h" #include "playerpro.h" #include "Util/mini.h" #include "Util/MD5.h" #include "Util/logger.h" #include "Thread/AsyncTaskThread.h" using namespace toolkit; static uint8_t s_mute_adts[] = {0xff, 0xf1, 0x6c, 0x40, 0x2d, 0x3f, 0xfc, 0x00, 0xe0, 0x34, 0x20, 0xad, 0xf2, 0x3f, 0xb5, 0xdd, ...
/* * Copyright (C) 2018 by Author: Aroudj, Samir * TU Darmstadt - Graphics, Capture and Massively Parallel Computing * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD 3-Clause license. See the License.txt file for details. */ #include <omp.h> #include <iostrea...
#include "game.h" #include "graphics/assets.h" #include "entities/entity.h" #include "entities/components/body.h" #include "entities/components/renderable.h" #include "entities/components/player.h" #include "entities/filters/physics_filter.h" #include "entities/filters/render_filter.h" #include "entities/filters/player...
// Based on // https://physdiv.jlab.org/DetectorMatrix/ // From June 16 2020 // W.r.t. to the [Detector Requirements and R&D Handbook](http://www.eicug.org/web/sites/default/files/EIC_HANDBOOK_v1.2.pdf) there have been three changes. // For the Backward Detector the Tracking Resolution column was updated as follows: ...
#include "pch_script.h" #include "trade.h" #include "Actor.h" #include "ai/stalker/ai_stalker.h" #include "ai/trader/ai_trader.h" #include "Artefact.h" #include "Inventory.h" #include "xrMessages.h" #include "character_info.h" #include "relation_registry.h" #include "Level.h" #include "xrScriptEngine/script_callback_ex...
#include <glad/gl.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/ext.hpp> #include <assimp/scene.h> #include <assimp/postprocess.h> #include <assimp/cimport.h> #include <assimp/version.h> #include <meshoptimizer.h> #include <stdio.h> #include <stdlib.h> #include <vector> using glm::mat4; using glm::...