text
stringlengths
3.08k
12.5k
// // Created by Harold on 2020/10/18. // #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <iostream> #include "m_fft_opencv.h" // https://stackoverflow.com/questions/19068085/shift-image-content-with-opencv cv::Mat translateImg(cv::Ma...
#include <iostream> #include <fstream> #include <list> #include <string> #include <regex> #include <map> #include <array> #include "common.hpp" list<string> read_lines(string filepath) { ifstream input_file; input_file.open(filepath, ios::in); // get input list<string> input; string chunk = ""; string li...
/* Velocity Engine By SerialVelocity */ #include "VE.hpp" using namespace VE; // Fighter Actor Actor::Actor() { // Set all members to default values mMesh = 0; mRotationSpeed = D3DXVECTOR3( 0.0f, 0.0f, 0.0f ); mAxisRight = D3DXVECTOR3( 1.0f, 0.0f, 0.0f ); mAxisUp = D3DXVECTOR3( 0.0f, 1.0f, 0.0f ); mAxisLook = ...
// --------------------------------------------------------------------------- // // The ab-initio based multiscale library // // S / P H I / n X // // Copyright: Max-Planck-Institute for Iron Research // 40237 Duesseldorf, Germany // // Contact: https://sxlib.mpie.d...
#include "FreeRTOS.h" #include "tick.h" #include "message_client.h" #include "message_bus.h" #include "message.h" #include "message_pool.h" #include "message_queue.h" #include "debug_server.h" #include "TestCase2.h" #include "TestCase4.h" #include <math.h> #ifdef BUILD_SPEC_Linux #include "Linux/network_client.h" #endi...
/* * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
/* Copyright (C) 2011-2014, <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 code must retain the above copyright notice, this list of conditions and the follow...
/** \file * * Copyright (c) 2015 by <NAME>. All rights reserved. * * This program is free software: you can redistribute it and/or modify it under the terms of the Apache License * as published by the Apache Software Foundation, either version 2 of the License, or (at your option) any later * version. * *...
// // PLYParser.cpp // Kuplung // // Created by <NAME> on 1/2/16. // Copyright © 2016 supudo.net. All rights reserved. // #include "PLYParser.hpp" #include <fstream> #include <sstream> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/replace.hpp> PLYParser::PLYParser() { this->Set...
/* * src/write.cpp * * This work was supported by the Director, Office of Science, Division * of Mathematical, Information, and Computational Sciences of the * U.S. Department of Energy under contract number DE-AC03-76SF00098. * * Copyright (c) 2006 * */ #include <string> #include <sstream> #include <iomanip> ...
/* * This file is a part of the open source stm32plus library. * Copyright (c) 2011,2012,2013 <NAME> <www.andybrown.me.uk> * Please see website for licensing terms. */ #include "config/stm32plus.h" #include "config/nvic.h" #include "config/sdcard.h" #include "config/filesystem.h" #include "config/usart.h" #include...
// RUN: %clang_cc1 -malign-double -triple i386-unknown-linux -emit-llvm %s -o - \ // RUN: | FileCheck --check-prefix=CHECK-ON --check-prefix=CHECK %s // RUN: %clang_cc1 -triple i386-unknown-linux -emit-llvm %s -o - \ // RUN: | FileCheck --check-prefix=CHECK-OFF --check-prefix=CHECK %s /* Structs S1, S2, S3, S4, a...
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
// // TelnetServerConnection.cpp // // Created by <NAME> on 3/13/21. // #include "TelnetServerConnection.hpp" #include <iostream> #include <arpa/inet.h> #include <netinet/in.h> #include "LogMgr.hpp" using namespace std; struct TelnetServerConnection::Private { typedef struct __attribute__((__packed__)){ sh...
#include <thread> #include <ostream> #include <iostream> #include "../src/timestamp.h" #include "../src/pool.h" #include "../src/process.h" #include "../src/host.itf.h" #include "../src/log.h" constexpr abc::category_t test_category = 0x1234; constexpr abc::tag_t test_tag = 0x567890ab; void test_log(abc::log& l...
#include <time.h> #include <SFML/Graphics.hpp> #include "Connector.hpp" using namespace sf; int size = 56; Vector2f offset(28, 28); Sprite f[32]; // figures std::string position = ""; int board[8][8] = {-1, -2, -3, -4, -5, -3, -2, -1, -6, -6, -6, -6, -6, -6, -6, -6, 0, 0, 0, 0, 0, 0, 0, 0,...
/* * Copyright (C) 2021 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...
#include "Texture.hpp" #include "Engine/Renderer/RenderContext.hpp" #include "Engine/Renderer/TextureView.hpp" #include "Engine/Renderer/D3D11Common.hpp" Texture::Texture( const char* filePath, RenderContext* ctx, ID3D11Texture2D* handle ) : Texture(ctx, handle) { m_imageFilePath = filePath; } Texture::Texture( con...
/** * LinGe_VScripts * Copyright (C) 2021 LinGe All rights reserved. * ============================================================================= * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, version 3.0, as published by the *...
#include "stdafx.h" #include "UICellItem.h" #include "../xr_level_controller.h" #include "../../xr_input.h" #include "../HUDManager.h" #include "../level.h" #include "../object_broker.h" CUICellItem::CUICellItem() { m_pParentList = NULL; m_pData = NULL; m_custom_draw = NULL; m_b_already_drawn = f...
/// \file AliQnCorrectionsHistogramChannelized.cxx /// \brief Implementation of the single multidimensional histograms with channel support #include "TList.h" #include "AliQnCorrectionsEventClassVariablesSet.h" #include "AliQnCorrectionsHistogramChannelized.h" #include "AliLog.h" /// \cond CLASSIMP ClassImp(AliQnCor...
/* Copyright 2018 The Blueoil Authors. 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 required by applicable law or agre...
#include "common.h" #include "cube.h" #include "vertex_stream.h" void Cube::mk_face( GLfloat d0[], GLfloat d1[], GLfloat d2[], GLfloat d2v) { float ld = -0.50; float ud = 0.50; float luv = 0.00; float uuv = 1.00; d0[cnt] = ld; d1[cnt] = ld; d2[cnt] = d2v; u[cnt] = luv; v[cnt] = luv; cnt++; d...
// // MIT License // // Copyright (c) 2020 <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, m...
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #include "libp2p/network/impl/router_impl.hpp" #include <gtest/gtest.h> #include <gsl/span> #include "mock/libp2p/connection/stream_mock.hpp" using namespace libp2p::network; using namespace libp2p::peer; using names...
#include "interp_2d.hh" #include "fpsupport.hh" #include <algorithm> #include <stdexcept> y3_cluster::Interp2D::Interp2D(std::vector<Point3D>&& data) : xs_(), ys_(), zs_(), interp_(nullptr) { make_grid_(std::move(data)); interp_ = gsl_interp2d_alloc(gsl_interp2d_bilinear, nx(), ny()); gsl_interp2d_init(interp...
// // Created by uniautonom on 15.08.20. // #include "log_serialization.h" LogSerialization::LogSerialization() {} LogSerialization::LogSerialization(QDateTime minTime, QDateTime maxTime, QStringList logLevelFilter, QStringList sourceFilter, QStri...
#include "Histogram1DDataBlock.h" #include "RasterDataBlock.h" using namespace std; using namespace UVFTables; Histogram1DDataBlock::Histogram1DDataBlock() : DataBlock() { ulBlockSemantics = BS_1D_Histogram; strBlockID = "1D Histrogram"; } Histogram1DDataBlock::Histogram1DDataBlock(const Histogram1DDataBlo...
#include <map> #include <unordered_map> #include <string> #include <iostream> #include <chrono> #include <vector> #include <parallel_hashmap/phmap.h> #include <sstream> template <typename T> using milliseconds = std::chrono::duration<T, std::milli>; // type containing std::string. Seems to take a long time to constr...
#include <algorithm> #include "../../include/UbiForm/Component.h" #include <iomanip> #include <nng/supplemental/util/platform.h> #include <fstream> #define SUBSCRIBER_COMPONENT "SUBSCRIBER" #define PUBLISHER_COMPONENT "PUBLISHER" #define MESSAGE_NUM 1000 struct subscriberStartupData{ Component* component; bo...
/* * 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 version. * * This library is distributed in the hope that it wi...
#include "Includes.h" HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); bool file_exists(string& filepath) { struct stat buffer; return (stat(filepath.c_str(), &buffer) == 0); } void Help() { // Main SetConsoleTextAttribute(hConsole, 2); printf("\nCorrect usage: "); SetConsoleTextAttribute(hConso...
#include <FFGL.h> #include <FFGLLib.h> #include "FFGLLumaKey.h" #define FFPARAM_Luma (0) //////////////////////////////////////////////////////////////////////////////////////////////////// // Plugin information //////////////////////////////////////////////////////////////////////////////////////////////////// sta...
// TestData.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "DataItem.h" #include <iostream> #include <typeinfo> static const type_info& DataItemType = typeid(DataItem); static const type_info& NameValueType = typeid(NameValueData); static const type_info& ListType...
#include <cassert> #include <deque> #include <iostream> #include <string> #include <vector> #include "set_utils.h" struct Boss { int hit_points; int damage; }; struct Player { int hit_points; int damage; int armor; int mana; }; enum class EffectType { Shield, Poison, Recharge, }; struct Effect { ...
// This is a test file for testing the interface // >>> virtual std::vector<std::pair<dist_t, labeltype>> // >>> searchKnnCloserFirst(const void* query_data, size_t k) const; // of class AlgorithmInterface #include "../hnswlib/hnswlib.h" #include <assert.h> #include <vector> #include <iostream> #include <string...
#include "Transform.h" void TransformOption(Bitmap &bmp) { int option; cout << "\nChoose an option:" << "\n1. Resize" << "\n2. Flip" << "\n3. Rotate" << "\n4. CutImage" << endl; cin >> option; switch (option) { case 1: int width, height; cout << "\nEnter new width:"; cin >> width; cout << "Ente...
// \file fon9/buffer/MemBlock_UT.cpp // \author <EMAIL> #include "fon9/buffer/MemBlockImpl.hpp" #include "fon9/MessageQueue.hpp" #include "fon9/TestTools.hpp" //--------------------------------------------------------------------------// // 使用 malloc()/free() 模擬 fon9::MemBlock. struct MemAuto { fon9_NON_COPY_NON_...
#include "JoystickMapper.h" #include <map> #include <string> #include <iostream> #include <windows.h> #include <basetyps.h> #include <public.h> #include <vjoyinterface.h> #include "SimpleIni.h" AxisLookup::AxisLookup() { axes["x"] = HID_USAGE_X; axes["y"] = HID_USAGE_Y; axes["z"] = HID_USAGE_Z; axes["rx"] = HID...
#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_A" #include "../../src/makevec.hpp" #include "../../src/Point2D.hpp" #include <cassert> #include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <sstream> using namespace std; using lint = long long; stru...
#include <fcntl.h> #include <unistd.h> #include <netinet/ip.h> #include <arpa/inet.h> #include <getopt.h> #include <string> #include <chrono> #include "Message.h" #include "Datastore.h" #include "debug.h" using json = nlohmann::json; using namespace entangld; using namespace std::chrono; constexpr char DEFAULT_HOST[...
#include <utils-qt/qml/NumericalValidator.h> #include <QQmlEngine> #include <memory> #include <cmath> struct NumericalValidator::impl_t { QVariant step; QVariant rangeTop; QVariant rangeBottom; int decimals {0}; std::unique_ptr<QValidator> standartValidator; }; void NumericalVali...
#define _CRT_SECURE_NO_WARNINGS //Required to compile on Visual Studio #include <cstdio> #include <string> #include <iostream> #include <vector> #include <dirent.h> struct FstEntry { uint32_t str_ofs; uint32_t data_ofs; uint32_t data_len; }; std::vector<std::string> filenames; void die(std::string msg) {...
#include <RcppArmadillo.h> #include <chrono> #include <ctime> // [[Rcpp::depends(RcppArmadillo)]] double AFT_LN_loglik(const arma::mat &Wmat, const arma::vec &wUInf, const arma::vec &wLUeq, const arma::vec &c0Inf, const arma::...
/* * Copyright (C) 2009 <NAME> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distribute...
template<typename T> struct suffix_tree{ //notes: //suffix tree has at most 2*N nodes //longest-common-prefix of 2 suffixes is just root-node path length to their LCA //to 'finish' building suffix_tree you need to append some separator, so called dollar ('$') //dollar must be smaller than all other ...
#include <globals.h> #include <views/logviewer.h> #include <logger.h> #include <adc.h> #include <format.h> #define GRAPH_WIDTH Graphics::GraphBuffer::max #define GRAPH_HEIGHT 55 #define GRAPH_FOOTER 64 #define GRAPH_LEGEND 10 #define GRAPH_LEGEND_MARGIN 2 #define GRAPH_CURSOR_BOX_MARGIN 2 #define GRAPH_CURSOR_BOX_ARRO...
#include "file_system.h" #include "loader.h" #include "pen.h" #include "pen_string.h" #include "renderer.h" #include "timer.h" pen::window_creation_params pen_window{ 1280, // width 720, // height 4, // MSAA samples "textures" // window title / process name }; typedef struct vertex ...
/* * utilities.cpp * * Created on: Oct 27, 2014 * Author: linh */ #include <fstream> #include <boost/filesystem.hpp> #include "utilities.h" void sbrome_print(ostream* f, IdList id_list) { for (IdList::iterator it = id_list.begin(); it != id_list.end(); it++) *f << *it << "\t"; *f << "\n"; } void sbrom...
#include "video_stream.h" #include <cassert> #include <iostream> extern "C" { #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> #include <libavutil/imgutils.h> } VideoStream::VideoStream() : mIsValid(false), mStreamIdx(-1), mCrtFrameNo(0), mFmtCtx(nullptr), mDecCtx(nullptr), mDecOpts(nullptr) { } AVP...
#include <ros/ros.h> #include <sensor_msgs/Joy.h> #include <smart_msgs/MotionCommand.h> #include <geometry_msgs/QuaternionStamped.h> namespace smart { ros::Subscriber joyInput; ros::Publisher motionCommandOutput; ros::Publisher cameraCommandOutput; smart_msgs::MotionCommand motionCommand; geometry_msgs::Qu...
/* The overall strategy is to consider all possible vertices of triangles, and to search through a relevant adjacency list how many triangles there are. First, we split the lines into three grids, and then color these grids: Blue: Lines parallel or perpendicular to the line joining the center of...
#include "minperimeter.h" //! Calculate the area of an element and its derivatives wrt ri and rj. // //! We will use 5-point Gauss quadrature. tuple5 areawithjac(const scalar ti, const scalar tj, const scalar ri, const scalar rj, const scalar a, const scalar b, generatedfunc ffft){ auto quad_obj = FivePointGaus...
#include <ros/ros.h> #include <geometry_msgs/PoseStamped.h> #include <geometry_msgs/PoseArray.h> #include <geometry_msgs/Quaternion.h> #include <geometry_msgs/Pose.h> #include <cmath> #include <vector> #include <tuple> #include <tf2/LinearMath/Quaternion.h> #include <tf2/LinearMath/Matrix3x3.h> #include <tf2_geometry_m...
/*MIT License Copyright (c) 2021 Starstone Software Systems, Inc. Copyright (c) 2021 <NAME>. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
#include "polynomial.h" #include <cmath> using namespace std; Node::Node(int data, Node* next) : data(data), next(next) {} void listInsertHead(Node*& head, int data) { head = new Node(data, head); } void listRemoveHead(Node*& head) { if (head) { Node* victim = head; head = head->next; delete vi...
#include "Inputbox.hpp" #include <tinyxml2.h> #include "../GLSL/Program.hpp" #include "../Input/Event.hpp" #include "../Input/Input.hpp" #include "../Resource/ResourceManager.hpp" #include "../Resource/Texture.hpp" #include "../Shape/GL/Rectangle.hpp" #include "../Utils/Asset.hpp" #include "../Utils/CFG.hpp" #include...
/* * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. * Copyright (c) 2020-2021 Huawei Device Co., 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: * * 1. Redist...
#include "js2erl.h" #include <string.h> #define TERMS(terms, tlen) (terms != NULL ? (terms + tlen) : NULL) // internal static int date_to_terms(Handle<Date> val, ErlDrvTermData *terms, list<void *> *pl); static int object_to_terms(Handle<Object> obj, ErlDrvTermData *terms, list<void *> *pl); static int array_to_terms...
#include "Logger.h" #include <boost/program_options.hpp> #include <boost/uuid/uuid_io.hpp> #include <fstream> #include <gtirb_layout/gtirb_layout.hpp> #include <gtirb_pprinter/ElfBinaryPrinter.hpp> #include <gtirb_pprinter/PrettyPrinter.hpp> #include <iomanip> #include <iostream> #ifdef USE_STD_FILESYSTEM_LIB #include ...
#include "pch.h" #include "GLMUtils.h" /* BaseEntity::BaseEntity( glm::vec3 mins, glm::vec3 maxs, Texture *textures, int TextureLength ) : AABB( BoundingBox( mins, maxs ) ), FaceLength( 6 ), transform( Transform( glm::vec3( 0 ), glm::vec3( 1 ), glm::mat4( 1 ) ) ), EntFaces() { _ASSERTE( TextureLength == 1 || T...
#include "func_instr.h" #include <cassert> #include <cstdlib> #include <iostream> #include <sstream> #include <string> const FuncInstr::ISAEntry FuncInstr::isaTable[] = { { "add", 0x0, 0x20, FuncInstr::FORMAT_R, FuncInstr::ADD}, { "addu", 0x0, 0x21, FuncInstr::FORMAT_R, FuncInstr::ADDU}, { "sub", 0x0, 0x22, ...
#include "config.hpp" #include "extract.hpp" #include "download.hpp" extern "C" { #include "cia.h" } Entry::Entry(json jsonEntry) { state = STATE_NONE; if (jsonEntry["inarchive"].is_string()) m_inArchive = jsonEntry["inarchive"]; if (jsonEntry["inrelease"].is_string()) m_inRelease = jsonEntry["inrelease"]; i...
/* * ArcScripts for ArcEmu MMORPG Server * Copyright (C) 2009 ArcEmu Team <http://www.arcemu.org/> * Copyright (C) 2008-2009 Sun++ Team <http://www.sunscripting.com/> * * 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 * ...
#include <iostream> #include <string> #include <sstream> #include <filesystem> #include <fstream> #include <clipp.h> #include "commonfuncs.h" #include "macro_parser.h" #include <coreclasses.h> #include "in_zone_synchronous_generator.h" using namespace std; std::stringstream verboseStream; namespace javascript_j...
/** @file maiin.cpp @author <NAME> @version 1.1 **/ #include "Engine.h" #include "Snake.h" #include "Food.h" #include "Powerup.h" #include "BodyPart.h" const int BOARD_WIDTH = 22; const int BOARD_HEIGHT = 16; const int INITIAL_BODY_PARTS = 3; Snake::Snake() { Reset(); headTextur...
// count-test.cc // Copyright 2016 Johns Hopkins University (Author: <NAME>) // See ../COPYING for clarification regarding multiple authors // // 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 Lic...
/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors ...
#define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <tlhelp32.h> #include <psapi.h> #include <cstdio> #include <iostream> #include <memory> struct scoped_handle { scoped_handle(HANDLE h) : h(h) {} ~scoped_handle() { if (h != INVALID_HANDLE_VALUE) CloseHandle(h); } scoped_handle...
/* * Copyright © 2015-2017 <NAME> * * 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...
//-------------------------------------------------------------------------- // File and Version Information: // $Id: KalMiniTrk_001.cc,v 1.3 2003/10/02 23:23:02 brownd Exp $ // // Description: // class KalMiniTrk_001. // // Environment: // Software developed for the BaBar Detector at the SLAC B-Factory....
/* * Copyright (C) 2015 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...
/* -------------------------------------------------------------------------- * * File TestBox2D.cpp * Author <NAME> * * -------------------------------------------------------------------------- * * Copyright (c) 2010-2013 cocos2d-x.org * * http://www.cocos2d-x.o...
/* * Copyright (c) 2015 <NAME> <<EMAIL>> */ #include "ofxFilterbank.h" //-------------------------------------------------------------- void ofxFilterbank::setup(int iBufferSize, int iMidiMin, int iMidiMax, int iChans, float iBw, int iSR, float iGain){ bufferSize = iBufferSize; midiMaxVar = midiMax = iMid...
#include <iostream> #include <vector> #include <queue> using namespace std; class Node { // Auxillary structure to store state of board at each iteration public: // Link to previous state, to derive result Node *parent; // Current state of the board vector<vector<char>> board; ...
// MIT License // // Copyright (c) 2021 PingzhouMing // // 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...
/* * Author: <NAME> * Project: Airport simulation (landing and takeoff) * Purpose: using the concepts and algorithm of the car wash simulation * write an airport simulation with landing given a priority over * takeoff when processing on the runway * project uses queue class that was mad...
// (C) Copyright 2015 - 2018 <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) #pragma once #include <primer/base.hpp> #include <primer/error.hpp> #include <primer/error_capture.hpp> #include <primer/expected.hpp...
/* -*- indent-tabs-mode: nil -*- * * Copyright 2016 <NAME> <<EMAIL>> * * 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 list of ...
#include <ctime> #include <fstream> #include <stdio.h> #include <opencv2/opencv.hpp> #include <raspicam/raspicam_cv.h> #include <raspicam/raspicam.h> #include "laserCam.h" //#define MARK_LINE printf("*** FILE: %s - LINE: %d\n", __FILE__, __LINE__) #ifdef __cplusplus RaspicamLaser::RaspicamLaser(int width, int heigh...
// netplay.cpp : Defines the entry point for the console application. // #include <stdio.h> #include <stdlib.h> #include <conio.h> #include "types.h" extern "C" { #include "netserver.h" #include "netclient.h" #include "netsys.h" }; NetServerT _server; NetClientT _client; int _GameLoop(NetClientT *p...
#include "InflatedSurfaceAnalysis.hh" #include <MeshFEM/Triangulate.h> #include <MeshFEM/Utilities/MeshConversion.hh> InflatedSurfaceAnalysis::InflatedSurfaceAnalysis(const InflatableSheet &sheet, const bool useWallTriCentroids) { // The analysis surface vertices consist of all wall triangle centroids and then ...
#include <bits/stdc++.h> #include <unistd.h> #include "../util/helpers.cpp" using namespace std; // http://adventofcode.com/2019/day/15 class intcode_runner { public: map<size_t, long long> program; size_t ip; long long relative_base; bool keep_running; vector<int> input; size_t input_index; intcode_runner(c...
//---------------------------------------------------// // Apache License Version 2.0, January 2004 // // Copyright @ 2016-2019 <NAME> All Rights Reserved // // https://github.com/peitaosu/PalmA-crossplatform // //---------------------------------------------------// #include "widget_palm.h" #include "ui_w...
// https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1256 #include <vector> #include <string> #include <unordered_map> #include <algorithm> using namespace std; // card numbering: value << 2 | suit static int to_card_number(const char value, const char suit) { int numb...
/************************************************************************* * Copyright (c) 2015, Synopsys, Inc. * * All rights reserved. * * * * Redistribution and...
#include "ObstacleShader.h" #include "ParticleShader.h" #include "VelocityArrowShader.h" #include "Application.h" #include "Obstacles.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" #include <filesystem> using namespace std; void Application::Draw() { // update obstacle display if (_...
/** ========================================================================== * 2012 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own risk and comes * with no warranties. This code is yours to share, use and modify with no * strings attached and no restrictions or obligations. * * For more information see g...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; long long total[10][10][2]; long long T[10]; string S; void add(int d, vector<int> &v) { for (int i=0; i<10; ++i) { v...
/** * @file minibatch_sgd_test.cpp * @author <NAME> * * Test file for minibatch SGD. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpack. If not, see * http://www.o...
#include "DXUT.h" #include "d3dUtil.h" const float PI = 3.14159265358979323f; typedef std::vector<D3DXVECTOR3> VertexList; typedef std::vector<DWORD> IndexList; //*************************************************************************************** // Name: Subdivide // Desc: Function subdivides every input t...
#include "tbb/task_scheduler_init.h" #include <atomic> #include <boost/range/irange.hpp> #include <chrono> #include <execution> #include <iomanip> #include <iostream> #include "concurrentqueue.h" moodycamel::ConcurrentQueue<int> q; template <class T> class Node { // Node class representing a node of a linked list con...
#include "game.h" #include <SDL.h> #include <SDL_image.h> #include <SDL_ttf.h> Game::Game() : isRunning_(true), isVSync_(true), isFullscreen_(false) {} bool Game::initialize() { bool success = true; // Initialize SDL if (SDL_Init(SDL_INIT_VIDEO) != 0) { fprintf(stderr, "SDL could not initialize! SDL Error...
//////////////////////////////////////////////////////////////////////////// // Module : XR_IOConsole_callback.cpp // Created : 17.05.2008 // Author : <NAME> // Description : Console`s callback functions class implementation //////////////////////////////////////////////////////////////////////////// #include "std...
/** Copyright (c) 2013, <NAME> */ #include <QDirIterator> #include <QtWidgets/QMenu> #include "dimensionidentifier.h" #include "json/json.h" #include "worldinfo.h" //------------------------------------------------------------------------------------------------- // DimensionInfo used for each defined & found Dimen...
/* * 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. * * This program is distributed in the hope that it will be use...
/** @file gnssStateVec.cpp * @brief gnss state vector -- {x,y,z,cb,tz} * @author <NAME> */ #include "gnssStateVec.h" #include "minisam/miniblas/miniblas.h" #include <cmath> #include <iostream> using namespace std; /* ************************************************************************* */ double gnssStat...
#include <WebServer/base/AsyncLogging.h> #include <WebServer/base/LogFile.h> #include <boost/function.hpp> #include <boost/bind.hpp> #include <stdio.h> #include <assert.h> #include <unistd.h> #include <memory> using namespace ywl; ywl::AsyncLogging::AsyncLogging(const std::string& logFileName, int flushInterval) ...
#include <atomic> #include <memory> #include <string> #include <thread> #include <boost/program_options/cmdline.hpp> #include <boost/program_options/options_description.hpp> #include <boost/program_options/parsers.hpp> #include <boost/program_options/variables_map.hpp> #include "jml/arch/exception.h" #include "soa/ty...
// // Created by Per-Arne on 23.02.2017. // #include "Game.h" #include "graphics/PyGUI.h" std::unordered_map<int, Game*> Game::games; Game::Game(const std::string& map_file): config(Config::defaults()), map(map_file), state({ static_cast<unsigned long>(map.MAP_WIDTH), ...