text
stringlengths
3.08k
12.5k
#include <iomanip> #include <iostream> #include <stdint.h> #include <string> #include <ft2build.h> #include FT_FREETYPE_H void reportOnFace(FT_Face face) { std::cout << "FamilyName: " << face->family_name << "\n"; std::cout << "StyleName: " << face->style_name << "\n"; std::cout << "NumFaces: " << face->num_fac...
#include <fcntl.h> #include <poll.h> #include <sys/mman.h> #include <unistd.h> #include <algorithm> #include <cerrno> #include <memory> #include <set> #include <unordered_map> #include <vector> #include <c10/util/tempfile.h> #include <libshm/err.h> #include <libshm/socket.h> const int SHUTDOWN_TIMEOUT = 2000; // 2s ...
/** * \file * \brief Linear hashtable unit test * * \date 2015/12/29 * \author <NAME> <<EMAIL>> * * * LEGAL NOTICE * * Copyright (c) 2015, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the follo...
/*************************************************************/ /* */ /* Lazer Command video handler */ /* */ /*************************************************************/ ...
/* * Copyright (c) 2008-2010 * <NAME> * All rights reserved. * * $Id: Rlacn2.cpp,v 1.11 2010/08/13 00:14:22 nakatamaho Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions o...
/* * MIT License * * Copyright (c) 2019-2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modi...
/////////////////////////////////////////////////////////////////////////////// // // This software module was originally developed by // // Intel Corporation // TU-Munich, <NAME> // (contributing organizations names) // // in the course of development of the MPEG-7 Experimentation Model. // // This software ...
/* minIni - Multi-Platform INI file parser, suitable for embedded systems * * These routines are in part based on the article "Multiplatform .INI Files" * by <NAME> in the March 1994 issue of Dr. Dobb's Journal. * * Copyright (c) CompuPhase, 2008-2020 * * Licensed under the Apache License, Version 2.0 (the ...
// Copyright 2014 <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, // modify, merge, publish,...
#include "PlayerCompoment.h" #include "BaseCompoment.h" #define ANIMATION_INTV 1.f #define ANIMATION_FRAMECNT 2 NAMESPACE_SOKOBAN; void PlayerSystem::changeAnimation(PlayerInput iInput, PlayerCompoment* pPlayerCompoment) { PlayerAnimation iTargetAnimation = PlayerAnimation::DownAnimation; switch (iInput...
/**********************************************************************/ /** Microsoft Windows/NT **/ /** Copyright(c) Microsoft Corporation, 1997 - 2002 **/ /**********************************************************************/ /* guids.cpp IPSe...
#include "lexer.h" #include <algorithm> #include <cctype> #include <stdio.h> namespace { constexpr char COMMENT = '#'; } uc::Lexer::Lexer(std::string const& source) : code(std::move(source)) {} bool uc::Lexer::is_ready() const { return code.is_open(); } uc::Token uc::Lexer::nextToken() { static auto next_characte...
/* (c) <NAME>. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ #include <engine/graphics.h> #include <game/mapitems.h> #include <game/layers.h> #include "flow.h" CFlow::CFlow() { m_pCells = 0; m_H...
/* * Copyright (c) 2015, 2016, 2017, 2018, 2019, 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 ...
/* * Copyright (C) 2011 - 2012 ArkCORE <http://www.arkania.net/> * * 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. * * T...
/*=--------------------------------------------------------------------------=* * NetDebug.cpp -- Implementation of the BNetDebug class. * * Written by <NAME> (<EMAIL>) * * Remarks: * * Although this would more properly be implemented as a namespace... * * Do not burn the candle at both ends as it leads to t...
/** * Copyright (C) 2021 Xilinx, Inc * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
#include <iostream> #include <string> #include <stdexcept> #include <vector> using namespace std; template<class ItemType> class StackInterface { public : virtual bool isEmpty() const = 0; virtual bool push( const ItemType& newEntry) = 0; virtual bool pop() = 0; virtual ItemType popItem() = 0; virtual Ite...
//---------------------------------------------------------------------------- // // TSDuck - The MPEG Transport Stream Toolkit // Copyright (c) 2005-2022, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following c...
#include "perfmodel.hxx" #include <cmath> #include <cassert> #include <array> using namespace std; using namespace perf; namespace machine { // 10 TF CPU ( 5e11 FMA / second ) double wflop_secs = (double) 1.0 / 5e11; // bytes per word int word_byte_n = 8; // cache line bytes int cl_byte_n = 64; // 256 ...
#define EIGEN_USE_MKL_ALL #include <eigen3/Eigen/Dense> // linear algebra library #include "constants.h" #include "qp-math.h" #include "gates.h" using namespace Eigen; // single qubit gates const MatrixXcd gates::Z = sz; const MatrixXcd gates::X = sx; const MatrixXcd gates::Y = sy; const MatrixXcd gates::HG = (sx+s...
/* * FILE: 1082-Array_Queries.cpp * * @author: <NAME> <opendoor.arafat[at]gmail[dot]com> * * LINK: http://www.lightoj.com/volume_showproblem.php?problem=1082 * * DATE CREATED: 30-03-20 18:33:57 (+06) * LAST MODIFIED: 31-03-20 19:46:34 (+06) * * VERDICT: Accepetd * * DEVELOPMENT HISTORY: * Date Vers...
#include <algorithm> #include <cstring> #include <iostream> #include <memory> #include <string_view> #include <utility> #include "httpparser/httprequestparser.h" #include "httpparser/request.h" #include "util.h" #include "spinet.h" static const char RESPONSE_CONNECTION_CLOSED[] = "HTTP/1.1 200 OK\r\nConnection: clos...
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "xfa/fgas/crt/fgas_codepage.h" void FX_SwapByteOrder(FX_WCHAR* pStr,...
/* <NAME> 2014/02/13 Heap MIT License g++ Heap.cpp -o main; and ./main A heap implemented as a flat array using index math to access elements. */ #include <stdlib.h> #include <ctype.h> // isdigit (parsing for tokens/ops) #include <string> // duh #include <vector> // vector of tokeniz...
#include "cFBO.h" // Calls shutdown(), then init() bool cFBO::reset(int width, int height, std::string &error) { if ( ! this->shutdown() ) { error = "Could not shutdown"; return false; } return this->init( width, height, error ); } bool cFBO::shutdown(void) { glDeleteTextures( 1, &(this->colourTexture_0_ID...
#include "weights_IO.h" using namespace cv; using namespace std; void save2txt(const Mat &data, string path, string str){ string tmp = path + str; FILE *pOut = fopen(tmp.c_str(), "w"); for(int i = 0; i < data.rows; i++){ for(int j = 0; j < data.cols; j++){ fprintf(pOut, "%lf", data.ATD...
//============================================================================ // Name : Polimorphism.cpp // Author : <NAME> // Version : // Copyright : // Description : Hello World in C++, Ansi-style //============================================================================ #include <vector> #i...
#include <Adafruit_MPU6050.h> #include <Adafruit_Sensor.h> #include <Wire.h> #include <gesture_recognition_full_demo_inferencing.h> #define FREQUENCY_HZ 59 #define INTERVAL_MS (1000 / (FREQUENCY_HZ + 1)) #define RED 5 #define GREEN 18 #define BLUE 19 // objeto da classe Adafruit_MPU6050 Adafruit_MPU6050 mpu; float f...
#include "../include/Terrain.h" void Terrain::LoadTextureTile (UINT _level, const char* _filename) { if (_level >= MAX_TILE_NUM) { THROW_ERROR (ERRC_OUT_OF_RANGE); } if (m_Tile[_level].IsLoaded ()) { UnloadTextureTile (_level); } m_Tile[_level].Load (_filename); if (m_...
#include <torchdglgraph/utils.h> #include <torch/custom_class.h> #include <torch/script.h> dgl::NDArray ToNDArray(at::Tensor t) { return dgl::NDArray::FromDLPack(at::toDLPack(t.contiguous())); } dgl::NDArray ToNDArray(const c10::optional<at::Tensor> &t) { if (t) { return dgl::NDArray::FromDLPack(at::t...
#include <random> #include <ogdf/planarity/PlanarSubgraphBoyerMyrvold.h> #include <ogdf/planarity/PlanarSubgraphFast.h> #include <ogdf/planarity/MaximalPlanarSubgraphSimple.h> #include <ogdf/planarity/MaximumPlanarSubgraph.h> #include <ogdf/planarity/PlanarSubgraphCactus.h> #include <ogdf/planarity/PlanarSubgraphTree....
// system includes #include <vector> #include <cmath> #include <fstream> #include <iostream> // user includes #include "CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h" #include "CondFormats/SiPixelObjects/interface/SiPixelQuality.h" #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/Trac...
/*========================== begin_copyright_notice ============================ Copyright (C) 2017-2021 Intel Corporation SPDX-License-Identifier: MIT ============================= end_copyright_notice ===========================*/ #pragma once #include "common/Types.hpp" #include "AdaptorCommon/customApi.hpp" #...
#include "stdafx.h" #include "Track.h" Track::Track (Vec2 start) : last_point(start), very_last_point(start) { point_list.push_back (start); } Track::~Track () { } void Track::add (Vec2 point) { Drawing::Rectangle *dot; dot = new Drawing::Rectangle (point, Vec2 (0.03f, 0.03f), Environment::black); std::cout...
// vim:ts=2:sw=2:expandtab:autoindent:filetype=cpp: /* The MIT License Copyright (c) 2008, 2009 Flusspferd contributors (see "CONTRIBUTORS" or http://flusspferd.org/contributors.txt) Permission is hereby granted, free of charge, to any person obtaining a copy of this software an...
#include <sys/types.h> #include <sys/mman.h> #include <linux/types.h> #include <unistd.h> #include <stdio.h> #include <termios.h> #include <fcntl.h> #include <sstream> #include <string> #include <iomanip> #include <iostream> #include <string.h> #include <stdlib.h> #include <stdint.h> #include "../include/PgpCardMod....
#include "FrameBuffer.h" #include "dev_data.h" using namespace std; FrameBufferDemo::~FrameBufferDemo() { glDeleteVertexArrays(1, &cubeVAO); glDeleteVertexArrays(1, &planeVAO); glDeleteVertexArrays(1, &quadVAO); glDeleteBuffers(1, &cubeVBO); glDeleteBuffers(1, &planeVBO); glDeleteBuffers(1, &quadVBO); } void F...
/* Copyright © 2017-2020 ABBYY Production LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
#include <core/ui_object.h> #include <core/ui_manager.h> #include <core/ui_window.h> #include <container/pod_hash.h> #include <control/ui_viewport.h> #include <event/ui_event_host.h> #include "../private/ui_private_control.h" // function node struct LongUI::CUIEventHost::FunctionNode : LongUI::CUISmallObject { //...
// Copyright 2010, <NAME>. All rights reserved. // http://code.google.com/p/muduo/ // // Use of this source code is governed by a BSD-style license // that can be found in the License file. // Author: <NAME> (chenshuo at chenshuo dot com) // #include <muduo/net/inspect/ProcessInspector.h> #include <muduo/base/Proces...
#include <vector> #include <array> #include "Window.hpp" #include "Camera.hpp" #include "Error.hpp" #include "Cone.hpp" #include "Cube.hpp" #include "FPS.hpp" struct objectStorage { glm::mat4 placement; Object *object; }; GLsizei WIDTH = 800, HEIGHT = 600; glm::mat4 VIEW, PROJECTION; std::ve...
#include "cli_driver.hh" #include "../common/context_singleton.hh" #include "../common/histogram.hh" #include <vector> #include <iostream> #include <iterator> #include <iomanip> using vec_str = std::vector<std::string>; using namespace std; using namespace velox; const string help = "veloxdfs [options] <command> <FIL...
// Copyright (c) 2019, Lawrence Livermore National Security, LLC. // See top-level LICENSE file for details. #include <curious/curious.h> #include "caliper/Caliper.h" #include "caliper/CaliperService.h" #include "caliper/SnapshotRecord.h" #include "caliper/common/Log.h" #include <string.h> #include <cstddef> #inclu...
/* port.cc Copyright (C) 2016 Belledonne Communications, Grenoble, France This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later vers...
#include "generator.hpp" #include "resources.hpp" #include <iostream> #include <fstream> #include <string> #include <memory> #include <exception> #include <stdexcept> #include <streambuf> #include <cassert> using std::cout; using std::endl; using std::string; using std::runtime_error; using std::ofstream; using std::...
#include "polyvalidate.h" #include <sys/stat.h> #include <string> #include <fstream> #include <iostream> #include <chrono> #include <jsoncpp/json/json.h> #include "PolyCiphertext.h" inline bool file_exists (const char* name) { struct stat buffer; return (stat(name, &buffer) == 0); } void usage() { std::cerr <...
#include "File.h" EXPL_NODE* EXPLORER_ID_LL = NULL; extern FARPROC APIArray[55]; MemeCreateToolhelp32Snapshot TempCreateToolhelp32Snapshot; MemeProcess32FirstW TempProcess32FirstW; MemelstrcmpiW TemplstrcmpiW; MemeProcess32NextW TempProcess32NextW; MemeCloseHandle TempCloseHandle1; MemeMultiByteToWideChar TempMultiB...
#include "trs80_twilio.h" Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1); SoftwareSerial trsSerial; size_t trsBytes = 0; char trsBuffer[TRSBUFF_SIZE]; void setup() { initSerial(); initDisplay(); initWifi(); yield(); syncPrintfClr("Listening...\n"); } void loop(){ if(WiFi.status() == W...
#include "llvm/Support/raw_ostream.h" #include "CatConstantPropagationProcessor.hpp" std::vector<llvm::Value*> CatConstantPropagationProcessor::getReplaceValues(llvm::Value* catVar, llvm::Value* replaceCandidate, bool& nonConstFound, std::unordered_set<llvm::Value*>& exploredNodes) { if (llvm::isa<llvm::CallInst...
// misc.cpp : miscellaneous tests for abitrary precision integers // // Copyright (C) 2017-2020 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include <iostream> #include <string> // configure the integer arithmetic class #...
/* * $Id$ * * Author: <NAME> * Copyright (c) 2008-2012 Regents of the University of California */ /** * \file * Description not yet available. */ # include <admodel.h> # include <df1b2fun.h> # include <adrndeff.h> /* int fcount =0; static int no_stuff=0; double evaluate_function(const dvector& x,fun...
/// @file /// /// kuka_plan_runner is designed to wait for LCM messages constraining /// a lcmt_robot_plan message, and then execute the plan on an iiwa arm /// (also communicating via LCM using the /// lcmt_iiwa_command/lcmt_iiwa_status messages). /// /// When a plan is received, it will immediately begin executing th...
#include "util/util.hpp" #include "player.hpp" #include "inputEvents.hpp" #include <cmath> Player::Player() { halfSize = 0.3f; height = 1.8f; camHeight = 1.5f; pos = glm::vec3(0.f); yaw = 0.f; pitch = 0.f; velocity = glm::vec3(0.f); acceleration = glm::vec3(0.f); flightMode = fals...
/* * Copyright (c) 2014, Shogun Toolbox Foundation * 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, * this lis...
#include <memory> #include <cassert> #include <vector> #include <string> #include <algorithm> #include <unordered_map> #include <jit/jit-plus.h> // forward declaration for Visitor struct BinaryExprAST; struct UnaryExprAST; struct NumberExprAST; struct IdentifierExprAST; // visitor interface class Visitor { publi...
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* *************************************************************************** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by ...
extern "C" { #include <fcntl.h> #include <sys/resource.h> #include <sys/stat.h> #include <sys/time.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> } // extern "C" #include <cerrno> #include <cstdlib> #include <cstring> #include <iostream> #include <ostream> #include <sstream> #include <string> voi...
//accepts a callback binding so r14 writes can trigger ROM buffering transparently struct reg16_t { uint16 data = 0; function<auto (uint16) -> void> modify; inline operator unsigned() const { return data; } inline auto assign(uint16 i) -> uint16 { if(modify) modify(i); else data = i; return ...
/* This software and supporting documentation are distributed by * Institut Federatif de Recherche 49 * CEA/NeuroSpin, Batiment 145, * 91191 Gif-sur-Yvette cedex * France * * This software is governed by the CeCILL-B license under * French law and abiding by the rules of distribution of free soft...
/********************************************************************************* * @file ringbuffer.cpp * @brief ringbuffer belongs to zltest * @details ringbuffer belongs to zltest * @author zhenglei * @date 2021/09/13 * @copyright Copyright (c) 2021 Gohigh V2X Division. * @verbatim * * Change History...
#include <cassert> #include <iostream> #include <string> #include <cstdio> #include <vector> #include <sstream> #include <fstream> #include <algorithm> #include <set> #include <optional> #include <cmath> namespace { struct Position { int x; int y; int z; explicit Position(int x, int y, int z) : x(x),...
/* This file is part of PyMbs. PyMbs is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PyMbs is distributed in the hope that it will ...
#include <iostream> #include <fstream> #include <cmath> #include <string> #include <sstream> // #include <cstdlib> // for Windows Visual Studio using namespace std; bool compareMode = false; // can be turn on if only specific characters are wanted(e.g. the most common words): the list of unicodes of wanted characters...
/* * Copyright (C) 2016-2018 by <NAME>. * Copyright (C) 2016-2018 by <NAME>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provimed that the following conditions are met: * * 1. Redistributions of source code must retain the above...
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURP...
#include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <vector> #include "geometry.h" double distance(const Point& a, const Point& b) { return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)); } bool equals(double a, double b, double eps = 1e-6) { return a - b <= eps && ...
// Copyright information can be found in the file named COPYING // located in the root directory of this distribution. #include "platform/platform.h" #include "forest/forestItem.h" #include "forest/forestCollision.h" #include "core/stream/bitStream.h" #include "console/consoleTypes.h" IMPLEMENT_CO_DATABLOCK_V1(Fore...
// // main.cpp // raytracer2 // // Created by <NAME> on 8.11.2020. // Copyright © 2020 <NAME>. All rights reserved. // #include "glm/glm.hpp" #include "IO.h" #include "pixel_buffer.h" #include "helper.h" #include "camera.h" #include "hittable_list.h" #include "material.h" #include "sphere.h" #include "aarect.h" ...
// // Copyright (c) 2015 Singular Inversions Inc. (facegen.com) // Use, modification and distribution is subject to the MIT License, // see accompanying file LICENSE.txt or facegen.com/base_library_license.txt // // Authors: <NAME> // Created: Feb 28, 2005 // #include "stdafx.h" #include "FgMath.hpp" #include...
// [[Rcpp::plugins(cpp11)]] // [[Rcpp::depends(RcppProgress)]] #include <Rcpp.h> #include <progress.hpp> #include <progress_bar.hpp> #include <fstream> #include <string> #include <unordered_map> #include <iterator> #include <algorithm> #include <unordered_set> using namespace std; using namespace Rcpp; // Intersection ...
// Copyright (c) 2017 <NAME> // Test code for a real operator. #include <iostream> #include <iomanip> #include <cmath> #include <string> #include <sstream> #include <complex> #include <random> // Borrow dense matrix eigenvalue routines. #include <Eigen/Dense> using namespace Eigen; #include "blas/generic_vector.h" #...
/******************************************************* HIDAPI - Multi-Platform library for communication with HID devices. <NAME> Signal 11 Software 8/22/2009 Copyright 2009, All Rights Reserved. At the discretion of the user of this library, this software may be licensed under the terms of the GNU Public License...
/** * Copyright lizhaolong(https://github.com/Super-long) * 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 applicab...
#include <Eigen/Dense> #include "ZMatrix.hh" #include "io/manipulators.hh" #include "support.hh" namespace { struct ElementGetter { ZMatrix *zmat; std::string elem; ElementGetter(ZMatrix* zmat): zmat(zmat), elem() {} }; struct IndexGetter { const ZMatrix *zmat; int idx; std::string lbl; IndexGetter(ZMatrix*...
#include "PrincipleAxes.h" #include "ShaderLoader.h" using namespace std; // Example data for principle axes // Packed vertex buffer for principle axes model static float paPositionArray[] = { // x 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.025f, 0.025f, 0.0, 1.0f, 1.075f, 0.075f, 0.0, 1.0f, 1.025f, 0...
#include <iostream> #include <string> #include <sstream> #include "../parser.hpp" #include "../node.hpp" class Test_SchemeInterpreter { public: Test_SchemeInterpreter() { _test("123", "123"); _test("-123", "-123"); _test("007", "7"); // booleans _test("#t", "#t"); _test("#f", "#f"); /...
#include "GraphScheduler.h" #include "GraphSampler.h" #include "TriangleCounter.h" #include "UDynGraph.h" #include "Stats.h" #include <iostream> #include <cassert> #include <cstring> #include <cmath> using namespace std; struct Result { double pearson = 0.0; double mean_eps_err = 0.0; //As defined in mascot doubl...
#include "include.h" #include <sys/types.h> #include <sys/stat.h> #include <string> #include <vector> #include "leveldb/db.h" #include "leveldb/options.h" #include "leveldb/slice.h" #include "leveldb/iterator.h" #include "link.h" #include "include.h" #include "util/log.h" #include "util/file.h" #include "util/string...
//===--------------------------------------------------------------------------------*- C++ -*-===// // _ _ // | | | | // __ _| |_ ___| | __ _ _ __ __ _ // / _` | __/ __| |/ _` | '_ \ / _` | // | (_| | || (_...
#include "common.h" enum Opcodes { OP_ADD = 0, OP_DEFINE, OP_JUMP, OP_SET, OP_EVAL, OP_IF, OP_RETURN, OP_CONVERT }; std::vector<ItemPtr> refs; Item *readNumber(char *&, char *); Item *readStorage(char *&, char *); Item *readString(char *&, char *); Item *readItem(char *&, char *); Item *readNumber(char *&cu...
#include <iostream> #include <stdlib.h> #include <fstream> #include <time.h> #include <iomanip> #include <conio.h> #include <string> #include "SortTimeAnalysisHeader.h" using namespace std; // DEFINES #ifndef __TRUE_FALSE__ #define __TRUE_FALSE__ #define TRUE 1 #define FALSE 0 #endif SortTimeAnalys...
/*! @file */ /* Copyright (C) 2007, kobake 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 ap...
/** * \file XLinkScorer.cpp * AUTHOR: <NAME> * CREATE DATE: 18 September December 2014 * \brief Object for scoring xlink products. Tries to optimize the scoring time *****************************************************************************/ #include "XLinkScorer.h" #include "model/Scorer.h" #include "model/I...
#include "MetroLevel.h" #include "MetroFileSystem.h" enum DescriptionChunk : size_t { DC_Header = 0x00000001, // seems to be same as MdlHeader DC_Materials = 0x00000002, DC_Info = 0x00000015, }; enum GeomChunks : size_t { GC_Vertices = 0x00000009, GC_Indices = 0x000000...
/* * HDF5-UDF: User-Defined Functions for HDF5 * * File: main.cpp * * Compiles the UDF into executable form and embeds it as a * HDF5 dataset. */ #include <stdio.h> #include <string.h> #include <string> #include <vector> #include <map> #include "json.hpp" #include "hdf5-udf.h" using json = nlohmann::json; #def...
#include "UnPAZ.h" #include "Utility.h" #if _MSC_VER >= 1910 #include "BDOFiles-exp.h" namespace fs = std::experimental::filesystem; #else #include "BDOFiles-boost.h" namespace fs = boost::filesystem; #endif using namespace std; namespace { fs::path SourcePath; fs::path TargetPath; string sMas...
// nonsugar // // Copyright iorate 2016-2018. // 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) #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE flag_short_test #include <boost/test/unit_test.hpp> #include...
#include <string.h> #include <stdio.h> #include <inttypes.h> #include <stdlib.h> #include <assert.h> static const char *CHARSET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; static const int8_t TABLE[128] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -...
#include <gtest/gtest.h> #include "integer.h" TEST(BitShift, left){ // operator<< integer pos("1", 16); uint64_t exp_pos = 1; for(uint8_t i = 0; i < 64; i++){ EXPECT_EQ(pos << i, exp_pos << i); } // negatives work for left shift because 0s are getting pulled from nowhere, not 1s i...
// SPDX-FileCopyrightText: Copyright (c) 2019-2021 Virginia Tech // SPDX-License-Identifier: Apache-2.0 #pragma once #include <timestone++.hpp> #include <cstdint> #include <iostream> // RULE 1. Inherit ts::ts_object class node : public ts::ts_object { public: int64_t val; // RULE 2. Use ts::ts_persistent_ptr<> // ...
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= // // PrefixSum: this code sample implements the inclusive scan (prefix sum) in // parallel. That is, given a randomi...
#include <sm/eigen/gtest.hpp> #include <aslam/backend/CompressedColumnJacobianTransposeBuilder.hpp> #include <aslam/backend/CompressedColumnMatrix.hpp> #include <numeric> #include "DummyDesignVariable.hpp" #include "MatrixTestHarness.hpp" #include "SampleDvAndError.hpp" TEST(CompressColumnMatrixTestSuite, testMatInte...
#include "common.hpp" #include <sstream> #include <iomanip> #include <algorithm> #include "rntSequencer.hpp" struct Renato; struct RenatoWidget : SequencerWidget { public: void onMenu(int action); RenatoWidget(Renato *module); void resetAccess(); enum MENUACTIONS { RANDOMIZE_PITCH = 0x01, RANDOMIZE_GATEX = 0x...
#include<bits/stdc++.h> #define watch(x) cout<<(#x)<<" is "<<(x)<<"\n" #define print(x) cout<<x<<"\n" #define For(i, x, y) for(i = x; i < y; i++) typedef std::vector<int> vi; typedef std::vector<std::vector<int>> vvi; typedef long long ll; int INF = INT32_MIN; using namespace std; void fast() { ios::sync_with_std...
#include "BMP280.h" BMP280::BMP280(int i2c_fd) { this->I2C_FILE = i2c_fd; std::cout << "BMP: " << this->I2C_FILE << std::endl; } BMP280::~BMP280() {} int * BMP280::GetTemperatureCoefficients(char buffer[24], int tempCoefficients[3]) { for(int i = 0; i < 3; i++) { tempCoefficients[i] = (buffer[(i * 2 + 1)] << ...
#include <cstdio> #include <cstdint> #include <cstdbool> #include <cstdlib> #include <cstring> #include <cmath> #include <csignal> #include <iostream> #include <fstream> #include <chrono> #include <thread> #include <mutex> #include <string> #include "ros/ros.h" #include "ros/package.h" #include "std_msgs/Header.h" #in...
/** * Copyright (c) 2007-2012, <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 conditi...
/* SimionZoo: A framework for online model-free Reinforcement Learning on continuous control problems Copyright (c) 2016 SimionSoft. https://github.com/simionsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to ...
/* PURPOSE: (Data record to disk in binary format.) PROGRAMMERS: (((<NAME>) (LinCom Corp) (3/96) (SES upgrades) ((<NAME>) (NASA) (April 2009) (--) (c++ port))) */ #include <iostream> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <sys/stat.h> #include <unistd.h> #include "trick/DRBi...