text
stringlengths
3.08k
12.5k
/* @file system.cpp * @copyright [2020] */ #include <gtest/gtest.h> #include <chrono> #include <iostream> #include <limits> #include <Controller.hpp> #include <Params.hpp> #include "fake/plant.h" #define WHEEL_BASE 1.5 #define TRACK_WIDTH 1.5 #define MAX_WHEEL_SEPARATION 45.0 #define CONTROL_FREQUENCY 100.0 using ...
// // Created by 王耀 on 2017/10/30. // #include <gtest/gtest.h> #include <fstream> #include "parser.h" std::string SourceCode1 = \ "setstacksize 512 ;; 设置堆栈大小\n" "Var Array[256] ;; 声明数组 Array\n" "Var X; ;; 声明全局变量 X\n" "Func MyAdd { ;; 声明函数 MyAdd,将两个参数相加\n" " Param ...
#include "WaveFile.h" #include <cstring> WaveFile::WaveFile(uint32_t sampleRate) : bitsPerSample(0x10), dataSize(0x00), fmtDataLength(0x10), format(0x01), numChannels(0x01), sampleRate(sampleRate) {} WaveFile::WaveFile(std::string filePath) {} bool WaveFile::addPCMData(pcm_data data) { this->pcmData.push_ba...
#include <stdio.h> #include "profiler.h" #define MAX_SIZE 10000 Profiler profiler("Tema 1"); void swap(int *a, int *b) { int aux; aux = *a; *a = *b; *b = aux; } void selectionSort(int *v, int n) { int a = 0, c = 0, poz_min, i, j; for (i = 0; i < n - 1; i++) { poz_min = i; for (j = i + 1; j < n; j++) { ...
// Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // ...
// test homogeneous propagation for heteronuclear decoupling #include "spinhalf_system.h" #include "Propagation.h" #include "FunctionObject.h" #include "NMR.h" #include "ttyio.h" #include "timer.h" #include "rmatrix.h" timer<> stopwatch; void print_usage(int rep_times) { double ttake=stopwatch(); cout << "Time t...
/** * Copyright (c) 2019 Horizon Robotics. All rights reserved. * @File: face_id_verification.cpp * @Brief: Identify the nv12 images after affine * @Author: zhengzheng.ge * @Email: <EMAIL> * @Date: 2019-05-07 14:27:05 * @Last Modified by: zhengzheng.ge * @Last Modified time: 2019-05-07 15:18:10 */ #include <f...
/** * @file main.cpp * @brief FPGA-readBridge * @author <NAME> (https://github.com/robseb) * @mainpage * rstools application to read any bridge to FPGA * address for Intel Arria 10 SX */ #include <cstdio> #include "hps.h" #include <string.h> #include <fstream> #include <iostream> #include <unistd.h> #includ...
/* * Copyright (c) 2006, <NAME> (www.ondrej-danek.net) * 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 l...
#include "exports.h" using namespace Nan; using namespace v8; using namespace node; static char errStr[NJT_MSG_LENGTH_MAX] = "No error"; #define _throw(m) {snprintf(errStr, NJT_MSG_LENGTH_MAX, "%s", m); retval=-1; goto bailout;} int decompress(unsigned char* srcData, uint32_t srcLength, uint32_t format, int* width, i...
// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "system_info/system_info_utils.h" #include <stdio.h> #if defined(TIZEN) #include <tzplatform_config.h> #endif #include <unistd.h> #include <al...
/* * PathFinder.cpp * Provided as a part of MapPlanner Software * Author: <NAME> * <EMAIL> * 2017.5.7 * See LICENCE.txt for license of this software. */ #include "stdafx.h" #include "PathFinder.h" #include <queue> #include <functional> #include <math.h> #include <iostream> PathFinder::PathFinder(MapP...
/* * Copyright (c) 2019 <NAME> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <utility> #include <vector> #include <cstdlib> #if defined(_WIN32) // windows # define NOMINMAX // to remove min,max macro # include <windows...
#include <iostream> #include <fstream> #include <random> #include <thread> #include <unistd.h> #include <chrono> // for high_resolution_clock #include "ias_Tissue.h" #include "ias_TissueGen.h" #include "ias_Integration.h" void internal(Teuchos::RCP<ias::SingleIntegralStr> fill) { using namespace std; using n...
/* Copyright (c) 2002, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following discla...
/* * Copyright 2014-2018 <NAME> and VRBN * * 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 agr...
#include "ButtonShim.h" const uint8_t ButtonShim::LED_GAMMA[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, ...
#include <ncurses.h> #include <sstream> #include <string> #include "../game/Game.hpp" #include "ErrorScreen.hpp" #include "../ColorPairGenerator.hpp" #include "GameScreen.hpp" // margin between windows #define MARGIN 1 // command imput size #define INPUT_SIZE (10 + 1) // height of statistic window #define STATS_HE...
/* * Copyright (c) 2012, 2018 ARM Limited * All rights reserved. * * The license below extends only to copyright in the software and shall * not be construed as granting a license to any other intellectual * property including but not limited to intellectual property relating * to a hardware implementation of th...
/* Copyright 2013-present Barefoot Networks, 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 la...
// Copyright (c) 2021-2022 ChilliBits. All rights reserved. #include "SourceFile.h" #include "analyzer/PreAnalyzerVisitor.h" #include <algorithm> #include <utility> #include <util/FileUtil.h> SourceFile::SourceFile(CliOptions *options, SourceFile *parent, std::string name, const std::string &filePath, bool stdFile)...
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
#include "game_state.hpp" #include "dictionary.hpp" #include "greedy.hpp" #include "hash_game_state.hpp" #include "utils/command.hpp" #include <algorithm> #include <array> #include <set> #include <vector> using namespace std; using namespace fmt; namespace { vector<InternalString> sort_words_by_greedy( const vec...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <sstream> #include <string> #include <vector> using namespace std; template<class T> vector<T> tokenize(string s, const string &delim=" ") { vector<T> ret_val; ...
#include <functional> #include <iostream> #include <vector> #include <map> #include <string> #include <tuple> #include <iterator> #include <algorithm> #include <random> #include <forward_list> #include <sstream> using namespace std; static void print(const vector<int> &v) { copy(begin(v), end(v), ostream_iterator...
/* Copyright 2019 <NAME>, <NAME> * * This file exemplifies usage of alpaka. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE I...
// // Created by zeph on 12/1/16. // /* 445. Add Two Numbers II You are given two linked lists representing two non-negative numbers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not conta...
/* -------------------------------------------------------------------------- * * File FileInputOutput.cpp * Description Shows the usage of the OpenCV serialization functionality. * through pixels. * Author OpenCV team, <NAME> * * ---------------...
#include <iostream> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <cstring> #include <unistd.h> #include <gsky/crypto/pe.hh> #include <gsky/util/vessel.hh> #include <gsky/net/pp/pp.hh> #include <gsky/log/log.hh> #include <memory> using namespace gsky::crypto; using namespace gsky::net...
#include <iostream> #include <cstdio> #include <cstring> #include <cassert> #include <cctype> #include <vector> using namespace std; typedef long long lint; #define cout cerr #define ni (next_num<int>()) template<class T>inline T next_num(){ T i=0;char c; while(!isdigit(c=getchar())&&c!='-'); bool flag=c=='-'; flag...
#include <stdio.h> #include <stdlib.h> #include <limits.h> struct AdjListNode { int dest; int weight; struct AdjListNode* next; }; struct AdjList { struct AdjListNode *head; }; struct Graph { int V; struct AdjList* array; }; struct AdjListNode* newAdjListNode(int dest, int weight) { struct AdjListNode* newNode...
// // Academic License - for use in teaching, academic research, and meeting // course requirements at degree granting institutions only. Not for // government, commercial, or other organizational use. // File: sortLE.cpp // // MATLAB Coder version : 4.3 // C/C++ source code generated on : 14-Apr-2020 21:4...
#include <stdio.h> #include <stdlib.h> #include <X11/Xlib.h> #include <GL/glx.h> #include <GL/gl.h> #include "code/utilities/graphics/x11/main_state/setup_display_settings.hpp" #include "code/utilities/graphics/x11/main_state/x11_main_state_creator.hpp" #include "code/utilities/graphics/glx/x11_to_opengl...
// Copyright (c) 2009-2010 <NAME> // Copyright (c) 2009-2015 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 "primitives/block....
/* ** Copyright (C) 2018 <NAME> ** All rights reserved. ** **Author:<NAME> <EMAIL> **Description: The source file of class X264Encoder. */ #include "x264_encoder.h" #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include <opencv2/imgproc.hpp> #include "../common/timemeasurer.h" #include ...
#include "particle_filter.h" #include <algorithm> #include <iostream> #include <iterator> #include <math.h> #include <numeric> #include <random> #include <sstream> #include <string> #include "helper_functions.h" static std::default_random_engine gen; ParticleFilter::ParticleFilter() : num_particles(0), is_initialized...
/* Copyright (c) 2011 <NAME> */ /* Vendor Trash may be freely redistributed. See license for details. */ #include <SDL.h>/**Standard SDL stuff.*/ #include <SDL_mixer.h>/**SDL audio stuff.*/ #include <SDL_ttf.h>/**SDL true type font stuff.*/ #include <SDL_image.h>/**SDL graphics stuff.*/ #include "main.h" #include "t...
#define __USE_MINGW_ANSI_STDIO 0 #include <iostream> #include <stdio.h> #include <stdlib.h> #include <vector> #include <algorithm> #include <queue> #include <map> #include <set> #include <string.h> #include <math.h> using namespace std; #define PI 3.141592653589793 #define epsilon 0.000000001 struct Plane{ doubl...
#pragma once #include "BVH.hpp" #include "Common.hpp" #include "Model.hpp" #include "Tile.hpp" #include "recastnavigation/Detour/Include/DetourNavMesh.h" #include "recastnavigation/Detour/Include/DetourNavMeshQuery.h" #include "utility/Ray.hpp" #include "utility/Vector.hpp" #include <filesystem> #include <memory> #in...
/** * NCtoolKit © 2007-2017 <NAME>, under zlib software license. * https://github.com/nczeroshift/nctoolkit */ #include "nckDemo_HttpServer.h" #include "nckUriCodec.h" #include "../codecs/JSON.h" class CustomRequestHandler : public Network::HttpCallbackHandler { Core::Mutex * messageListMutex; int totalCount...
// // Created by <NAME> on 4/8/17. // #include <cstdlib> #include <iostream> #include <zconf.h> #include "EditorIO.h" #include "Config.h" using namespace std; EditorInput::EditorInput(Terminal *terminal) : terminal(terminal) { this->setRow_offset(0); this->setCol_offset(0); } void EditorInput::processKeyPre...
/* Arduino TextLCD Library, for a 4-bit LCD based on HD44780 * Copyright (c) 2020, sstaub * * 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 limita...
#include "FusionEKF.h" #include "tools.h" #include "Eigen/Dense" #include <iostream> #ifndef M_PI #define M_PI (3.14159265358979323846) #endif using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; using std::vector; /* * Constructor. */ FusionEKF::FusionEKF() { is_initialized_ = false; previous_t...
/* AI Lib Copyright (C) 2014 <NAME> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applic...
/*************************************************************************** * * Author: "<NAME>" * MRC Laboratory of Molecular Biology * * 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; e...
// Copyright <NAME> 2016 // 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 <cpl/geometry/rotations.hpp> #include <gtest/gtest.h> #include <cpl/geometry/vector_2d.hpp> #include <cmath...
/** * @package AutoItObject * @copyright Copyright (C) The AutoItObject-Team. All rights reserved. * @license Artistic License 2.0, see Artistic.txt * * This file is part of AutoItObject. * * AutoItObject is free software; you can redistribute it and/or modify * it under the terms of the Artistic License as p...
// //////////////////////////////////////////////////////// // # Title // Rectangles in cross-hatched grids // // # URL // https://projecteuler.net/problem=147 // http://euler.stephan-brumme.com/147/ // // # Problem // In a 3x2 cross-hatched grid, a total of 37 different rectangles could be situated within that grid as...
// Copyright (c) <NAME> // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt) // // Official repository: https://github.com/beached/header_libraries // #include "daw/daw_benchmark.h" #include "daw/daw_tuple_helper.h" #includ...
#include <iostream> #include <sys/socket.h> #include <csignal> #include <cassert> #include <cstring> #include <unistd.h> #include <netinet/in.h> #include <arpa/inet.h> #include <vector> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> const static size_t BUFFER_SIZE = 1024 * 4; enum CHECK_STATE { C...
/* The MIT License Copyright (c) 2013 <NAME> <<EMAIL>> 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, mo...
#include "encoder.h" #include <algorithm> #include <memory> #include <string> #include <vector> #include <ros/ros.h> #include <sensor_msgs/JointState.h> struct EncoderDescription { int cpr; int channel; std::string name; std::unique_ptr<Encoder> encoder_ptr; /** @returns true if this EncoderDescription is...
// Include these two files for CPU computing. #include <cufhe_gpu.cuh> using namespace cufhe; #include <tfhe/tfhe.h> #include <tfhe/tfhe_io.h> #include <iostream> #include <memory> #include "Utils.hpp" std::shared_ptr<LweSample> make_lwe_sample( const TFheGateBootstrappingCloudKeySet& ckey) { return std::sh...
// // This source file is a part of borsch.3d // // Copyright (C) borsch.3d team 2017-2018 // // 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 limitat...
#include <iostream> #include <vector> #include <map> #include <set> #include <queue> #include <functional> using namespace std; struct Pos { int x, y; bool operator<(const Pos& o)const { return x < o.x ? true : x > o.x ? false : y < o.y; } }; struct Table { void resi...
// rdspy.cpp // llvm pass // <NAME> -- 2018 #include "llvm/Bitcode/BitcodeWriter.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Intrinsics.h" #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Error.h" #include "llvm/Sup...
// Part of the Soundplane client software by Madrona Labs. // Copyright (c) 2013 Madrona Labs LLC. http://www.madronalabs.com // Distributed under the MIT license: http://madrona-labs.mit-license.org/ #include "TrackerCalibrateView.h" TrackerCalibrateView::TrackerCalibrateView() : mpModel(nullptr) { setInterceptsM...
/*Header-MicMac-eLiSe-25/06/2007 MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation eLiSe : ELements of an Image Software Environnement www.micmac.ign.fr Copyright : Institut Geographique National Author : <NAME> Contributors : <NAME>, <NAME>. [1] <NAME>, <NAM...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_BUFF 200 /* map structure */ typedef struct Point { float time; float lat; //need to change to GPS relevent values float lon; float vel; //need to change to imu relevent values float velAng; float accel; float accelAng; ...
/* ** Yab2Cpp ** ** Transpiler by <NAME> ** ** Based on Yab ** */ #include "yab2cpp.h" #include <cassert> unordered_map<string, unique_ptr<variableType> >globals; unordered_map<string, unique_ptr<variableType> >locals; unordered_map<string, unique_ptr<variableType> >statics; /* These correspond to the enum COMPILE_ER...
#include <Arduino.h> /*************************************************** 2.8" TFT SPI Display mit LOLIN D1 MINI (ESP8266) Daten an das Display senden 26.01.2021 Der Hobbyelektroniker https://community.hobbyelektroniker.ch https://www.youtube.com/c/HobbyelektronikerCh ************************************...
/******************************************************************************** * Copyright 2015 The Robotics Group, The <NAME>-<NAME>ler Institute, * Faculty of Engineering, University of Southern Denmark * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in c...
#include<bits/stdc++.h> using namespace std; using vi = vector<int>; using ii = pair<int,int>; using vii = vector<ii>; using vvi = vector<vi>; using ll = long long; using llu = unsigned long long; using vb = vector<bool>; using vvb = vector<vb>; using vd = vector<double>; using vvd = vector<vd>; using vll = vector<ll>...
/* 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 <gnuplot-iostream/gnuplot-iostream.h> #include <boost/tuple/tuple.hpp> #include <iostream> #include <iomanip> #include <ctime> #include "Tools.hpp" #include "Magnet.hpp" using namespace std; /***************************************************************************** This program contains the main function...
#pragma once #define BOSS_NOT_INCLUDE_FOR_INTELLIGENCE #include <boss.hpp> #if BOSS_WINDOWS #define BOSS_API(PACK, TYPE, FUNC, ...) \ static autorun API_##PACK##_##FUNC = CollectForPlatform(#TYPE, #FUNC, #PACK "_" #FUNC, #__VA_ARGS__); \ BOSS_API_FUNC(PACK, TYPE, FUNC)(__VA_ARGS__) #de...
/* * Copyright (c) 2008-2016, Integrity Project 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 ...
/// \file MppShapeCircle.cpp /// \brief MppShapeCircle class /// \author <NAME> /// \version 0.1 /// \date 2020 #include "MppShapeCircle.h" #include <iostream> #include <algorithm> MppShapeCircle::MppShapeCircle(){ } MppShapeCircle::MppShapeCircle(int x, int y, int r){ m_x = x; m_y = y; m_r = r; } MppS...
//============================================================================ // Name : UtcPlugin.cpp // Author : Battelle Memorial Institute // Version : // Copyright : Copyright (c) 2014 Battelle Memorial Institute. All rights reserved. // Description : Hello World in C++, Ansi-style //============...
#include<iostream> #include<windows.h> #include<conio.h> #include<stdlib.h> #include<time.h> #include <stdio.h> using namespace std; #define ARRIBA 72 #define IZQUIERDA 75 #define ABAJO 80 #define DERECHA 77 #define ESC 27 char tecla; int cuerpo[200][2]; int n=1; int tam = 3; int x=10, y=12; in...
#include <iostream> #include <string> #include <tuple> #include <vector> #include "protenc.h" // Example use of the ProtEnc library: an advanced builder pattern. // // Here, we have an HTTP connection builder. We want to force the user to add // one or more headers, then exactly one body, after which he will be able ...
#include <iostream> #include <fstream> #include <string> #include <vector> #include <opencv2/opencv.hpp> #include "driveu_dataset.h" #include "driveu_calibration.h" #include "compand.h" bool parseArgs(int argc, char **argv, std::string &label_file, std::string &calib_dir, std::string &data_base_dir) { label_file ...
/** * Copyright (c) 2013 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, di...
/* * Copyright (c) 2011-2019, The DART development contributors * All rights reserved. * * The list of contributors can be found at: * https://github.com/dartsim/dart/blob/master/LICENSE * * This file is provided under the following "BSD-style" License: * Redistribution and use in source and binary forms, w...
/* * -------------------------------------------------------------------------------------------------------------------- * Example sketch/program showing how to read data from a PICC to serial. * -------------------------------------------------------------------------------------------------------------------- * ...
#include <filesystem> #include <fstream> #include <iostream> #include "lemon/connectivity.h" #include "lemon/dijkstra.h" #include "lemon/graph_to_eps.h" #include "solvers/pl_eca_2.hpp" #include "solvers/pl_eca_3.hpp" #include "parsers/std_mutable_landscape_parser.hpp" #include "parsers/std_restoration_plan_parser.h...
/* * flyCoin Daemon Listener * by suibex * http://cyfly.rs * * 11 Jan 21. */ #include <unistd.h> #include <stdlib.h> #include <sstream> #include <netdb.h> #include <iostream> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> #include <fstream> #include <vector> #i...
#pragma once #include <vector> #include "decima/serializable/object/object.hpp" #include "decima/serializable/string.hpp" #include "decima/serializable/guid.hpp" #include "decima/serializable/reference.hpp" namespace Decima { enum class TextureColorSpace : std::uint32_t { Linear = 0, SRGB = 1 ...
//This is a code for implementing a general puropose segment tree //The code can be reused as a blackbox by just changing the range funtion and the identity element for that function //A dummy use is given in the main fucntion for reference #include<bits/stdc++.h> using namespace std; //implementation starts here ...
////////////////////////////////////////////////////////////////////////////// // ICE INCLUDES #include "Audio/icSound.h" #include "Memory/icMinHeap.h" ////////////////////////////////////////////////////////////////////////////// // SYSTEM INCLUDES #include <stdlib.h> #include <string.h> bool Load_Wave_File(const c...
#include "stdafx.h" #pragma hdrstop #include "ObjectAnimator.h" #include "xrCore/Animation/Motion.hpp" bool motion_sort_pred(COMotion* a, COMotion* b) { return a->name < b->name; } bool motion_find_pred(COMotion* a, shared_str b) { return a->name < b; } ////////////////////////////////////////////////////////////////...
#include <iostream> #include <libav/buf_mgr.hpp> #include <cstdlib> #include <deque> using namespace std; void* alloc_func(size_t size) { cout << "Register allocate function.\n"; return malloc(size); } void free_func(void* ptr) { cout << "Register free function.\n"; free(ptr); } int main() { instek::BufMgr buf...
#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; // GLOBAL CONSTANT VARIABLES const int NUMBER_OF_BOWLERS = 10; // change according to how many players are in the file. const int GAME_ROUNDS = 5; // change according to how many scores per player are in the fi...
#include "../src/args.hpp" #include <cassert> #include <cstdio> #include <cstdlib> #include <iostream> #include <sstream> #include <string> #include <vector> static void read_file(std::ostringstream& f, const std::string& expected) { if (f.str() != expected) { std::cout << "\n\noutputs differ\n"; std::cout << "==...
// Expression View #pragma once #include <stdint.h> #include "Views.h" #include "struse\struse.h" #include "WatchView.h" #include "imgui.h" #include "C64Colors.h" #include "Expressions.h" #include "machine.h" #include "Config.h" WatchView::WatchView() : open( false ), rebuildAll( false ), recalcAll( false ) { numExp...
//////////////////////////////////// // TestReferenceImplementation.cc // //////////////////////////////////// #include <iostream> #include <iomanip> #include <chrono> #include <cassert> #include <cstdlib> #include <string> #include <mpc.h> #include "MultiPrecisionUtils/MultiPrecisionUtils.h" #include "ReferenceImpl...
#include "VAOWrapper.h" // Each vertex point consists of 2 floats [X,Y] GLint vertexAttributeSize = 2; GLenum vertexAttributeType = GL_FLOAT; // Each texture coordinate for each vertex point consists of 2 floats [S,T] GLint textureAttributeSize = 2; GLenum textureAttributeType = GL_F...
/**========= Copyright <NAME>, All rights reserved. ============// 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 ...
#include <bits/stdc++.h> using namespace std; struct Team { set<string> toppings; set<long long> pizzas; int numPeople; }; struct Pizza { long long numToppings; set<string> toppings; long long numP; }; int m; Pizza pizzas[100000]; vector<Pizza> pizzaBuffer; int lastPizza = 0; long long ben...
#include <vector> #include <chrono> #include <iostream> #include <iostream> #include <fstream> #include <opencv2/opencv.hpp> #include <tensorflow/lite/model.h> #include <tensorflow/lite/interpreter.h> #include <tensorflow/lite/kernels/register.h> #include "detect.h" static std::unique_ptr<tflite::FlatBufferModel> mo...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <arpa/inet.h> #include <time.h> #include <slankdev/extra/pcap.h> #include <slankdev/hexdump.h> #include <slankdev/net/hdr.h> #include <slankdev/net/addr.h> #include <string> #include "argparse/argparse.hpp" static inline size_t ge...
/************************************************************************* > File Name: main.cpp > Author:robbie > Mail: <EMAIL> > Created Time: Thu 14 Aug 2014 03:04:40 PM CST ************************************************************************/ #include <iostream> #include <queue...
#include <cassert> #include <fstream> #include <iostream> #include <iterator> #include <limits> #include <mutex> #include <sstream> #include <string> #include <thread> #include <vector> #include <boost/heap/fibonacci_heap.hpp> struct Edge { const int target; const int cost; Edge(int target, int cost) : ta...
typedef pair<ll,ll> pll; #define mp make_pair ll fun45(double x){if(x>=0) return x+0.5;return x-0.5;} ll mod_mul(ll a,ll b,ll c){__int128 tp=1;return tp*a*b%c;} ll fast_exp(ll a,ll b,ll c){ ll res=1;a=a%c;assert(b>=0); while(b>0) { if(b&1) res=mod_mul(a,res,c); b=b>>1;a=mod_mul(a,a,c); }...
/* The MIT License Copyright 2019 hiratake26to 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 "ObjectInSurface.h" #include "ObjectInSurfacePosition.h" #include <cmath> #include <qDebug> static void checkVertexIndex(const QString& surfaceId, const QVector<Vector3>& objectPoints, int index, const QString &vertexName) { if (index > objectPoints.length() || index < 0){ throw std::invalid_argument( ...
#include "camera.hpp" #include <cmath> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/rotate_vector.hpp> const glm::vec3 camera::UP = glm::vec3(0.f, 1.f, 0.f); camera::camera(window* win) : m_win(win), m_fov(45.f) { init(m_win); } camera::~camera() { } void camera::update() { child_update(); m_wi...
#include "async_comm.hpp" #include <algorithm> #include <assert.h> #include <cstring> #include <mpi.h> template <typename T> void AsyncComm<T>::init(int world_rank, MPI_Datatype const mpi_t, size_t max_buffer_size) { constexpr int send_info_initial_reserve = 256; this->world_rank = world_ra...
/**************************************************************************** * MeshLab o o * * A versatile mesh processing toolbox o o * * _ O _ * * Co...
// // Created by wc on 5/6/19. // #include "./tcp_connection.h" #include "../util/rwtool.h" #include "./accepter.h" #include "event_handler.h" #include "event_loop.h" #include "socket.h" #include <glog/logging.h> #ifdef __linux__ #include <sys/sendfile.h> #else #include <fstream> #endif using namespace qg; int TcpConn...