text
stringlengths
3.08k
22k
/* Emulate a hypothetical very-simple 16-bit CPU! I got the idea from: https://github.com/CodingKraken/K88 My goal isn't to exactly replicate a certain architecture, but to just capture the main ideas of a CPU! I'd rather play around with hypothetical architectures to understand the mai...
/****************************************************************************** * Copyright (c) 2011, <NAME> (<EMAIL>) * * 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...
/** * @file ex_scene_graph_3dcars.cpp * @brief Drawing 3D cars via scene graph * * @author <NAME> * @license MIT */ #include <iostream> #include <string> #include <memory> #include <vector> #include <cmath> #include <numbers> #include <ciso646> #include <glad/glad.h> #include <GLFW/glfw3.h> #include <grafica/sha...
#include <iostream> #include <cstring> #include "utils.h" using namespace std; /* 将信息转化为数字 */ void convertCharToNum(char *text, int x[]) { int i = 0; while (*text != '\0') { x[i] = int(*text); cout << *text << "->" << x[i] << '\t'; ++i; ++text; } } //将密文转换成数字 void convertT...
// // Quake map viewer // // Author: <NAME> <<EMAIL>> // #include <SDL2/SDL.h> #include <getopt.h> // getopt_long #include "Map.h" #include "World.h" #include "Camera.h" enum Parameters { WINDOW = 1, FULLWINDOW = 2, FULLSCREEN = 4, SHOWCURSOR = 8 }; int ParseArguments(int argc, char *argv[], int param) { int par...
// ----------------------------------------------------------------------------------------- // NVEnc by rigaya // ----------------------------------------------------------------------------------------- // // The MIT License // // Copyright (c) 2014-2016 rigaya // // Permission is hereby granted, free of charge, to ...
// Copyright 2020-present <NAME> (<EMAIL>). // // 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 agre...
/*============================================================================= NifTK: A software platform for medical image computing. Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY o...
/*+**************************************************************************/ /*** ***/ /*** Copyright (C) 2005-2006 by <NAME> ***/ /*** all rights reserved ***/ /*** ...
#include "LL1.hpp" #include <cstdio> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <set> #include <sstream> #include <string> #include <vector> #include "json.hpp" #include "lexer.hpp" #define COL_WIDTH 20 // analysis output width using namespace std; using jso...
/*********** OGL_utils.cpp <NAME> , 2021-01 Common OGL templates and functions Template Version: 2020-12 ***********/ #include "OGL_utils.hpp" /************************************************************************************************** * CONFIGURATION: ...
/* MIT License Copyright (c) 2017 hec 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, dis...
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html #include <opencv2/3d.hpp> #include <opencv2/highgui.hpp> #include <opencv2/3d.hpp> #include <opencv2/imgproc.hpp> #include <o...
/* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/******************************************************************************** * Copyright 2009 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...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (c) 2016, <NAME> All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source...
#include "../../includes.hpp" #include "features.hpp" void bhop(Command* cmd) { if (!CONFIGBOOL("Misc>Misc>Movement>Bhop")) { return; } if (Globals::localPlayer->moveType() == MOVETYPE_LADDER || Globals::localPlayer->moveType() == MOVETYPE_NOCLIP) { return; } if (CONFIGBOOL("M...
// Copyright (C) 2019-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <algorithm> #include <string> #include <unordered_map> #include <vector> #include "utils/image_utils.h" #include "utils/ocv_common.hpp" #include "text_detection.hpp" namespace { void softmax(std::vector<float>* data) { ...
// // SVRGBToneCurveCore.h // SVEngine // Copyright 2017-2020 // <NAME>,<NAME>,<NAME>,<NAME>,<NAME>,<NAME> // #include "SVRGBToneCurveCore.h" u16 intSwap16(u16 var){ return (u16)(((var << 8) & 0xFF00) | ((var >> 8) & 0xFF)); } void createSecondDerivative(SVArray<V2> points ,SVArray<f64> *outarray){ int n = ...
// Copyright(c) 2018, Intel Corporation // // 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 ...
// Copyright(c) 2020 <NAME> // Distributed under the MIT License (See accompanying file LICENSE.md file or copy at http://opensource.org/licenses/MIT). #include "math/pch.h" #include "coCube_f.h" #include <debug/log/coAssert.h> #include <container/array/coFixedArray_f.h> #include <container/string/coDynamicString_f.h> ...
// // Created by <NAME> on 2019-07-23. // #include "render.h" #include <cmath> Renderer *allocRenderer(int windowWidth, int windowHeight, const char *windowName){ FT_Library ft; if(FT_Init_FreeType(&ft)) { fprintf(stderr, "Could not init freetype library\n"); return NULL; } FT_Face ...
/*************************************************************************** * Copyright 1998-2018 by authors (see AUTHORS.txt) * * * * This file is part of LuxCoreRender. * * ...
/**************************************************************************** * * Copyright (c) 2017 - 2018 by Rockchip Corp. All rights reserved. * * The material in this file is confidential and contains trade secrets * of Rockchip Corporation. This is proprietary information owned by * Rockchip Corporat...
/* * MIT License * * Copyright (c) 2020 <NAME> <<EMAIL>> * * This file is part of QtGrbl project https://github.com/semlanik/qtgrbl * * 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 * ...
#include "Vicsek.hxx" inline void theta_frc_sva(const int &i, const int &j, const double &r2, const double ni[DIM], const double nj[DIM], double dni[DIM], double dnj[DIM]){ dni[0] = nj[0]; dni[1] = nj[1]; dnj[0] = ni[0]; dnj[1] = ni[1]; } inline void theta_frc_gca(const int &i, const int &j, const doubl...
#include "stdafx.h" #include "String.h" #include "Quaternion.h" #include "Engine/DebugNew.h" const Quaternion Quaternion::IDENTITY(1.0f, 0.0f, 0.0f, 0.0f); void Quaternion::FromAngleAxis(float angle, const Vector3& axis) { Vector3 normAxis = axis.Normalized(); angle *= M_DEGTORAD_2; float sinAngle = sinf(angle); ...
/*Copyright 2016-2018 hyperchain.net (Hyperchain) Distributed under the MIT software license, see the accompanying file COPYING or https://opensource.org/licenses/MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this  software and associated documentation files (the "Software"), to...
#include <torch/torch.h> #include <torch/script.h> #include <torch/autograd.h> #include <torch/utils.h> #include <iostream> #include <unistd.h> #include <iomanip> #include <torch/script.h> // One-stop header. #include <iostream> #include <memory> #include <algorithm> #include <random> #include "../utils/Ch_13_util.h"...
// // Created by yongqi on 17-12-11. // // System // STL #include <iostream> #include <chrono> #include <thread> #include <condition_variable> // 3rd Libraries #include <pcl/io/pcd_io.h> #include <gflags/gflags.h> #include <glog/logging.h> // User Defined #include "utils/CVUtils.hpp" #include "utils/GLCloudViewer.h...
/** * \file PnlWzskObjDetail.cpp * job handler for job PnlWzskObjDetail (implementation) * \copyright (C) 2016-2020 MPSI Technologies GmbH * \author <NAME> (auto-generation) * \date created: 5 Dec 2020 */ // IP header --- ABOVE #ifdef WZSKCMBD #include <Wzskcmbd.h> #else #include <Wzskd.h> #endif #include "Pn...
/** * @class CmdAppCore * @brief Main CLI application. * * Overview: * 1) User calls startParameterScan(), which sets up the scan queue and calls * scanParameters(). * 2) scanParameters() picks the first item in scan queue & calls runModel(). * 3) Upon model exit updateModel() gets called, which store...
#include <cstdlib> #include <strings.h> #include "platform.hpp" #include "nrs.hpp" #include "linAlg.hpp" #include "omp.h" #include <iostream> #include "flopCounter.hpp" namespace{ static void compileDummyKernel(const platform_t& plat) { const bool buildNodeLocal = useNodeLocalCache(); auto rank = buildNodeLocal ?...
// // "$Id$" // // File chooser test program. // // Copyright 1999-2010 by <NAME>. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // // http://www.fltk....
#include "IStorage.h" #include <regex> #include <boost/uuid/uuid.hpp> IStorage::IStorage(HecubaSession* session, std::string id_model, std::string id_object, uint64_t* storage_id, Writer* writer) { this->currentSession = session; this->id_model = id_model; this->id_obj = id_object; this->storageid = storage_id; ...
#include "solver.h" #include <boost/functional/hash.hpp> #include <boost/format.hpp> #include "../parallel.h" #include "../std.h" #include "../time.h" #include "../wavefunction/wavefunction.h" #include "davidson.h" Det Solver::generate_hf_det() { Det det; for (size_t i = 0; i < n_up; i++) det.up.set_orb(i, true);...
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Copyright � 2021 FlowerFell-Sans. */ /* If you are missing that file, acquire a complete release at github.co...
// Author : <NAME> <<EMAIL>> #include <iostream> #include <vector> #include <tuple> #include <memory> #include <chrono> #include <immintrin.h> template<typename Function, class ... Types> decltype(auto) timeit(unsigned repeat, Function f, Types&& ... args) { using namespace chrono; const auto start = high_res...
/** * The SAT solver * Basic functions */ #include "../include/core/solver.hpp" #include "../include/util/algorithm.hpp" using namespace MyyuraSat; // Private ******************************************************************** inline bool Solver::is_removed(CRARef cr) const { return _ca[cr].mark() == 1; } ...
// lang.cpp #include "stdafx.h" #include "main.h" #include "resource.h" #include "generic.h" #include "cfgfile.h" #include "lang.h" #include <strsafe.h> //----------------------------------------------------------------- struct LANGPAIR { UINT uID; stringW sText; }; UINT _FindID(UINT); BOOL _L...
#include "../common/util.h" #include "../common/shader.h" #include "../common/camera.h" #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> const char* VERTEX_SRC = "#version 330 core\n" "layout(location=0) in vec3 position;" ...
#define USE_CAFFE #include <gflags/gflags.h> #include <glog/logging.h> #include <openpose/core/headers.hpp> #include <openpose/filestream/headers.hpp> #include <openpose/gui/headers.hpp> #include <openpose/pose/headers.hpp> #include <openpose/utilities/headers.hpp> #include "ros/ros.h" #include <std_srvs/Empty.h> #in...
// // ODINX.cpp // ODINX // // Created by <NAME> on 11/9/15. // Copyright © 2015 <NAME>. All rights reserved. // #include "ODINX.hpp" OSDefineMetaClassAndStructors(ODINXHostDevice, IOUSBHostDevice); bool ODINXHostDevice::init(OSDictionary *properties) { LOG(V_NOTE, "SAMSUNG ODIN Mode Driver for Mac OS X"); ...
//======================================================================= // Copyright 2015 - 2020 <NAME> // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //=====================================================...
#include <TH1F.h> #include <TH2F.h> #include <TFile.h> #include <TTree.h> #include <CLHEP/Units/SystemOfUnits.h> using namespace CLHEP; #include "HistoManager.hh" #include "G4UnitsTable.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... HistoManager::HistoManager() :fRootFile(0), f...
// // torchscriptConverter.cpp // MNNConverter // // Created by MNN on 2020/11/13. // Copyright © 2018, Alibaba Group Holding Limited // #include <iostream> #include "MNN_generated.h" #include "logkit.h" #include "flatbuffers/idl.h" #include "flatbuffers/minireflect.h" #include "flatbuffers/util.h" #include "To...
#include <iostream> #include <string> #include <ctime> #include <random> #include <algorithm> #include <functional> #include <chrono> #include<windows.h> #include<stdio.h> #include<tchar.h> // Use to convert bytes to MB #define DIV 1048576 #define WIDTH 7 using std::string; using std::cout; using std::cin; using std...
#include "generator_shape.hpp" #include <cmath> #include <iostream> #include <map> #include <memory> #include "constants.hpp" #include "t.hpp" std::vector<float> ShapeGenerator::Cuboid(float width, float height, float depth) { // Фигуру строим относительно центра 0,0,0 - с...
#include "SystemManager.h" #include "Log.h" #include "ESException.h" #include "SystemData.h" #include <fstream> #include <pugixml/pugixml.hpp> #include "Settings.h" #include "views/ViewController.h" namespace fs = boost::filesystem; SystemManager* SystemManager::sInstance = NULL; SystemManager* SystemManager::getIns...
#include "display.hpp" #include "controller.hpp" #include "iodevice.hpp" #include <iostream> #include <curses.h> #include <string> #include <algorithm> #include <exception> #include <cmath> #include <limits> // mention here for linker const struct msgs_struct Display::msgs; void Display::renderBoard() { auto mf...
#include "surakarta.h" #include "mcts.h" #include <arpa/inet.h> #include <cassert> #include <cerrno> #include <cstdlib> #include <iostream> #include <netinet/in.h> #include <sys/socket.h> #include <sys/types.h> #include <unordered_map> #include <utility> #include <vector> const char SurakartaState::player_markers[] = ...
#include <CImageConvert.h> CRGBA CImage::convertBg_ = CRGBA(1,1,1); double CImage::convertAlphaTol_ = 0.1; void CImage:: convertToNColors(uint ncolors, ConvertMethod method) { if (hasColormap()) { if (getNumColors() > (int) ncolors) { CImage::errorMsg("convertToNColors not implemented for color map"); ...
#include "DetectorConstruction.hh" #include "G4Box.hh" #include "G4Material.hh" #include "G4MultiFunctionalDetector.hh" #include "G4NistManager.hh" #include "G4PSEnergyDeposit.hh" #include "G4PVPlacement.hh" #include "G4PhysicalConstants.hh" #include "G4SDManager.hh" #include "G4VisAttributes.hh" #include "AstroTarget...
#include "IOHandler.h" #include "constant.h" #include "utils.h" #include <regex> #include <sstream> void IOHandler::startOfGamePrompt() const { const std::string startPrompt = "You step into the cave. The damp walls muffle the sound of your steps.\n" "A faint, sour odor lingers in the air. This, ...
// // Created by FLXR on 5/27/2019. // #include "exampleparticles.hpp" #include <xe/resources/texturemanager.hpp> #include <xe/ui/imgui/imgui.h> using namespace xe; ExampleParticles *ExampleParticles::instance = nullptr; ExampleParticles::ExampleParticles() : renderBg(true), updateRS(true), updateTS(tru...
/* * Copyright 2005-2007 NVIDIA Corporation. All rights reserved. */ //-*-c++-*- // ==================================================================== // ==================================================================== // // Module: opt_daVinci.cxx // $Revision: 1.2 $ // $Date: 02/11/07 23:41:53-00:00 $ // $A...
// jhcAliaOp.cpp : advice on what to do given some stimulus or desire // // Written by <NAME>, <EMAIL> // /////////////////////////////////////////////////////////////////////////// // // Copyright 2017-2020 IBM Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this fi...
// // Created by <NAME> on 11.02.17. // #include "CLionTestFrame.h" #include <wx/dcbuffer.h> #include <boost/format.hpp> CLionTestFrame::CLionTestFrame() : wxFrame(NULL, wxID_ANY, "Hallo"), tim_(this) { //CreateStatusBar(); this->SetDoubleBuffered(true); wxMenu* menuA = new wxMenu; menuA->Append(ID_Men...
/* The Image Registration Toolkit (IRTK) * * Copyright 2008-2015 Imperial College London * * 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...
// jhcAliaStats.cpp : monitors internal processes of ALIA reasoner // // Written by <NAME>, <EMAIL> // /////////////////////////////////////////////////////////////////////////// // // Copyright 2021 Etaoin Systems // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except...
/* * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
#define GLEW_STATIC // Easier debugging #include <GL/glew.h> #include <SDL2/SDL.h> #include <iostream> #include <memory> //Code from http://stackoverflow.com/questions/3907818/opengl-headers-for-os-x-linux. //Allows the code to be compiled for linux and osx devices (which have the opengl libaries in a different locat...
//===========================================================================// /* MIT License 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 restrictio...
#include <stdint.h> #include "../include/STM32F0x0.h" #include "console.h" #include "spi.h" #include "timer.h" #include "sprite.h" #include "brick.h" #include "brici.h" #define DEMO_HITS 10 void ClassicBrici() { #define Brick_Width 30 #define Brick_Height 10 #define BRICK_COUNT ( (3*SCREEN_WIDTH) / Brick...
/* Copyright (c) 2013, Regents of the University of Alaska 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 cond...
/* * Copyright (C) 2018 Microchip Technology Inc. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 */ #include <chrono> #include <egt/detail/string.h> #include <egt/ui> #include <iostream> #include <sstream> using namespace std; using namespace egt; // warning: not utf-8 safe static std::string line_...
#include "TyphoonEngine.h" #include "imgui.h" using namespace TyphoonEngine; class ExampleLayer : public TyphoonEngine::Layer { public: ExampleLayer() : Layer("Test") , m_cameraPos( glm::vec3( 0.f ) ) , m_squarePos( glm::vec3( 0.f ) ) { // Add triangle mesh & shader m_triangleVA.reset( Renderers::Vertex...
// AUTO GENERATED by vnxcppcodegen #include <mmx/contract/package.hxx> #include <mmx/contract/method_t.hxx> #include <vnx/vnx.h> namespace mmx { namespace contract { const vnx::Hash64 method_t::VNX_TYPE_HASH(0x1f62512698176a39ull); const vnx::Hash64 method_t::VNX_CODE_HASH(0xc1e9bd07bc925983ull); vnx::Hash64 me...
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
/************************************************************** * * 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...
#pragma once #include <jln/mp/smp/functional/sfinaefwd.hpp> #include <jln/mp/functional/try.hpp> #include <jln/mp/functional/lift.hpp> #include <jln/mp/functional/call.hpp> #include <jln/mp/functional/identity.hpp> #include <jln/mp/functional/if.hpp> #include <jln/mp/number/number.hpp> #include <jln/mp/utility/always....
/* * Copyright (c) 2020 Huawei Technologies Co.,Ltd. * * openGauss is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * * http://license.coscl.org.cn/MulanPSL2 * * THIS SOFTWARE IS PROVIDED ...
#include "cola/parser/ObserverBuilder.hpp" #include "cola/util.hpp" #include <sstream> using namespace cola; std::vector<std::unique_ptr<Observer>> ObserverBuilder::buildFrom(CoLaParser::ObserverContext* parseTree, const Program& program) { ObserverBuilder builder(program); parseTree->accept(&builder); return s...
#include <iostream> #include <istream> #include <sstream> #include <fstream> #include <vector> #include <string> #include <cstdio> #include <cstring> #include <sys/wait.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> #include <stdlib.h> #incl...
#include <sgltk/sgltk.h> class Win : public sgltk::Window { bool rel_mode; bool wireframe; bool normals; glm::mat4 model_mat[2]; float tess_level; glm::vec3 light_pos; sgltk::Shader normal_shader; sgltk::Shader sphere_shader; sgltk::Shader light_shader; sgltk::P_Camera cam; sgltk::Mesh light; sgltk::Mesh...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ ...
// Copyright © 2017-2019 Trust Wallet. // // This file is part of Trust. The full Trust copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. #include "HexCoding.h" #include "PrivateKey.h" #include "Pu...
#include "extorch_native/src/native.rs.h" #include "extorch_native/include/utils.h" std::unordered_map<std::string, torch::ScalarType> type_mapping = { {"int", torch::kI32}, {"int8", torch::kI8}, {"int16", torch::kI16}, {"int32", torch::kI32}, {"int64", torch::kI64}, {"uint8", torch::kUInt8}, ...
// Florida.cpp // OpenGL SuperBible // Demonstrates polygon tesselation // Program by <NAME>. #include "../../shared/gltools.h" // OpenGL toolkit #include <math.h> ///////////////////////////////// // Coast Line Data #define COAST_POINTS 24 GLdouble vCoast[COAST_POINTS][3] = {{-70.0, 30.0, 0.0 }, ...
// ScreenPlacement.cc // Copyright (c) 2006 Fluxbox Team (fluxgen at fluxbox dot org) // // 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 /...
#include <fstream> #include <iostream> #include <string> #include <iomanip> #include <vector> #include <chrono> #include "opencv2/core.hpp" #include "opencv2/imgcodecs.hpp" #include <boost/lockfree/queue.hpp> #include <boost/program_options.hpp> #include <boost/filesystem.hpp> #include <boost/smart_ptr.hpp> #include ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <random> #include <chrono> using namespace std; using namespace __gnu_pbds; #define endl '\n' typedef long long ll; typedef pair<int, int> pii; typedef tree<int, null_type,less<int>, rb_tree_tag, tree_o...
#include "Configurations.hpp" #include "PassUtils.hpp" #include "WarAnalysis.hpp" using namespace IdempotentRegion; /* * TODO: Ratchet also cuts intrinsic calls, but I assume thats uninteded? * Figure out if there needs to be two versions! */ bool WarAnalysis::forcesCut(Instruction &I) { if (isa<IntrinsicInst>(I...
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: <NAME> * * Adapted on: June 12, 2019 * Adapted by: <NAME> * */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector...
#include "mex.h" #include <math.h> #include <vector> using std::vector; int getNumConnections(int radius){ int max_conns[] = {1, 5, 8, 16, 20,32,32,36,48,56,64,60,64}; return (max_conns[radius] + 1) >> 1; } void getMaskCoors(int radius, int *coor_h, int *coor_w, double *coor_rad){ int radius2 = radius * ra...
// Copyright (c) 2014, <NAME> // All rights reserved. /* A program for testing the shortest and longest path algorithms of PGM. */ #include <iostream> #include <map> #include <errno.h> #include <string.h> #include <pthread.h> #include "pgm.h" int errors = 0; __thread char __errstr[80] = {0}; #define CheckError(e) ...
// Copyright <NAME> 2008 - 2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <iostream> #include <iomanip> #include "test_case.hpp" #include "snptest/case_control/AlternativeMo...
/// @file CHatSpark.cpp /// @brief CHatSpark class implementation. #include "stdAfx.h" // Includes mecanismos IPC #include <sys/ipc.h> #include <sys/msg.h> #include <string.h> #include <typeinfo> #include <cxxabi.h> #include <iostream> #include <stdlib.h> #include "ChatSpark.h" #include <signal.h> #include <unistd....
#include <bits/stdc++.h> // string split like in Python, nearly identical to https://stackoverflow.com/a/46931770/997151 std::vector<std::string> split(const std::string& s, const std::string& delimiter) { size_t pos_start = 0; size_t pos_end{}; std::vector<std::string> res; while ((pos_end = s.find(d...
#include <iostream> #include <string> #include "AI/FuzzyLogic/FuzzyLogic.hpp" using namespace std; using namespace AI::FuzzyLogic; using namespace AI::FuzzyLogic::FuzzySet; void writeLine(string msg, bool stars = false) { if (stars) { msg = "*** " + msg + " "; while (msg.size() < 45) ...
#include "csm/csm_all.h" #include "csm/utils.h" #include "csm/laser_data_yogo.h" #include "icp/icp_yogo.h" #include "icp/icp_optimization.h" #include <iomanip> #include <string.h> #include <cstring> #include <libgen.h> #include <vector> #include <sstream> #include <dirent.h> #include <ctime> using namespace std; ofs...
// Copyright 2008-2009 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz // or its licensors, as applicable. // // You may not use this file except under the terms of the accompanying license. // // Licensed under the Apache License, Version 2.0 (the "License"); you // may not use this file except in compliance ...
#include "test_helpers.hh" extern "C" { #include <htslib/vcf.h> } #include "GVCFReader.hh" TEST(DepthBlock, intersects) { DepthBlock db1(0, 100, 199, 20, 1, 30,2); DepthBlock db2(0, 100, 100, 20, 1, 30,2); ASSERT_EQ(db1.IntersectSize(db2), 1); ASSERT_EQ(db1.IntersectSize(db2), db2.IntersectSize(db1)...
#include <stdio.h> #include <vector> #include <limits.h> #include <math.h> #include <GL/glut.h> using namespace std; double WINDOW_WIDTH = 900; // window screen width double WINDOW_HEIGHT = 900; // window screen height class Point { public: double x; double y; double z; Point(){}; Point(double X, dou...
#include <random> #include <algorithm> #include <iostream> #include <numeric> #include <math.h> #include <sstream> #include <string> #include <iterator> #include "particle_filter.h" using namespace std; void ParticleFilter::init(double x, double y, double theta, double std[]) { // Sets the number of particles. Init...
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved. #include "NODOLiveLinkSource.h" #include "ILiveLinkClient.h" #include "LiveLinkTypes.h" #include "Roles/LiveLinkAnimationRole.h" #include "Roles/LiveLinkAnimationTypes.h" #include "Roles/LiveLinkCameraRole.h" #include "Roles/LiveLinkCameraTypes.h" ...
/* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
#include "TCPListener.h" #include "../orm/ORM.h" TCPListener::TCPListener(const char* ip, int port) : ip(ip), port(port), handle(0), master({}), initialized(false), private_key_file(""), certificate_file(""), clients({}), fd_max(0), current(0) { initialized = init() == 0; } int TCPListener::init() { #ifde...
//================================================================================ // Copyright (c) 2013 ~ 2021. <NAME>(<EMAIL>) // Freely available under the terms of the 3-Clause BSD License // (https://opensource.org/licenses/BSD-3-Clause) // // Redistribution and use in source and binary forms, // with or without ...