text
stringlengths
3.08k
12.5k
#include "font_handler.hpp" #include "utility/custom_exp.hpp" #include <algorithm> #include <iostream> FontHandler::FontHandler(AtlasTexture &atlas_texture, const std::string &font_name, unsigned int font_size) : atlas_texture_(atlas_texture) , font_name_(font_name) , font_size_(font_size) { if (FT_I...
// PHP TOKENIZER // Copyright (c) 2007 <NAME>, Facebook, inc // All rights reserved #include "php_tok.h" php_tok::php_tok(bool bOut, bool bWarn) : php_stl() { // check that the tokenizer is loaded, die if it is not if(!call_bool("extension_loaded", "s", "tokenizer")){ printf("Failed because tokenizer is not ...
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
#include "interState.h" interState::interState() : m_sample(nullptr), m_signalDrag(nullptr), m_noise(0), m_noSignalMaxGap_dt(0), m_noRiseMaxCalGap_dt(0), m_targetHit_dt(0), m_stillRunningSampleProbe(false), m_targetHit(false), m_hyper(false), m_doResetCalibrate(false), m_elevated(false), m_signal(false), m_pulseHi...
//============================================================== // Copyright Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <CL/sycl.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> // dpc_common.hpp can be found in the dev-utilities in...
// Copyright 2020 <NAME> #include "DiyAirSensor.hh" /* At init, instantiate all other components. Here we: * Start the serial port * Configure the Digital I/O pins for buttons * Instantiate the LogFile class to which we write logs * Add and configre all of the sensors * Update my configs with my...
/** * Copyright (C) 2020 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...
/** * @copyright (c) 2017 <NAME>. All rights reserved. * @file listener.cpp * * @author MJenkins, ENPM 808X Spring 2017 * @date Mar 27, 2017 - Creation * @date Apr 4, 2017 - Updated * * @brief ROS Tutorials - Publisher/Subscriber - listener node * * This source file creates a subscriber node within the ROS e...
struct Architecture; struct Bass { auto target(const string& filename, bool create) -> bool; auto source(const string& filename) -> bool; auto define(const string& name, const string& value) -> void; auto constant(const string& name, const string& value) -> void; auto assemble(bool strict = false) -> bool; ...
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include "frc/IterativeRobotBase.h" #include <fmt/format.h> #include <hal/DriverStation.h> #include <networktables/Netw...
#include "WAVLTree.h" #include "project2.h" #include <iostream> #include <utility> #include <string> #include <cmath> // Instructions // some test cases for the WAVLTree and bin packing algorithms can be found in the main function below // // 1. Move all source code/header files you will be submitting to a new direct...
#include "Voronoi.h" #include "VoronoiMath.h" #include <array> #include <cassert> #include <algorithm> //temporary #include <cstdio> #include <iostream> Voronoi::Voronoi(const Rect & _boundary) :boundary_rect(_boundary) ,edges_alloc() { onInit(); } Voronoi::~Voronoi() { onClear(); } v...
// // 2DCanvas.cpp // example-audio-receiver // // Created by <NAME> on 9/19/19. // // #include "ofx2DCanvas.h" //-------------------------------------------------------------- void ofx2DCanvas::begin(const ofRectangle& viewport){ this->set(viewport); ofPushView(); ofViewport(viewport); ofSetupScreenOrtho(); o...
// Frame.cpp #include "Frame.h" #include "Application.h" #include "Puzzle.h" #include "Canvas.h" #include <wx/menu.h> #include <wx/aboutdlg.h> #include <wx/msgdlg.h> #include <wx/sizer.h> Frame::Frame( void ) : wxFrame( 0, wxID_ANY, "Symmetry Group Madness" ), timer( this, ID_Timer ) { wxMenu* gameMenu = new wxMenu(...
// Shasta. #include "LocalAssemblyGraph.hpp" using namespace ChanZuckerberg; using namespace shasta; // Boost libraries. #include <boost/graph/graphviz.hpp> // Standard libraries. #include "fstream.hpp" LocalAssemblyGraph::LocalAssemblyGraph(AssemblyGraph& globalAssemblyGraph) : globalAssemblyGraph(globalAssem...
/* NAME Utils.hpp - Body file of the utilities. DESCRIPTION Some utilities. 常用函数 */ #include "Utils.hpp" #include "Logger.hpp" #include "Symbol.hpp" #include <ctime> #include <fstream> #include <sstream> #include <dirent.h> #include <sys/stat.h> // 创建文件 bool create_file(const std::string& filename) {...
#include <demo.hpp> const int COORD_FRACTIONAL_BITS = 5; const int COORD_DENOMINATOR = ( 1 << ( COORD_FRACTIONAL_BITS ) ); const float COORD_RESOLUTION = ( 1.0f / ( COORD_DENOMINATOR ) ); const int COORD_FRACTIONAL_BITS_MP_LOWPRECISION = 3; const float COORD_DENOMINATOR_LOWPRECISION = ( 1 << ( COORD_FRACTIONAL_BITS_M...
#include "KidMon.h" #include "os/Api.h" #include "common/Utils.h" #include <boost/asio.hpp> #include <spdlog/spdlog.h> #include <filesystem> #include <iomanip> #include <sstream> #include <thread> #include <chrono> namespace net = boost::asio; namespace fs = std::filesystem; using TimePoint = std::chrono::system_cl...
#include "Base/ir.h" #include "Base/serialize.h" #include "CodeGenA64/codegen.h" #include "CodeGenA64/legalize.h" #include "CodeGenA64/regs.h" #include "CpuA64/assembler.h" #include "Util/breakpoint.h" #include "Util/parse.h" #include "Util/switch.h" #include "Util/webserver.h" #include <fstream> #include <iomanip> #i...
// // 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> // #include "stdafx.h" #include "FgTestUtils.hpp" #include "FgString.hpp" #include "Fg...
// Copyright (c) 2013 Adobe Systems Inc // 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, publis...
#include <cmath> #include <cstdio> #include <cstdlib> #include <cassert> #include <cfenv> #include <complex> #include <iomanip> #include <iostream> #include <armadillo> #include <omp.h> #include "pme.h" #include "abort_unless.h" using namespace std; using namespace arma; const complex<double> I(0.0, 1.0); const ...
#include "camera.h" #include "globals.h" #include <QtMath> #include <QMatrix3x3> Camera::Camera() { // Camera position position = QVector3D(0.0, 2.0, 6.0); isOrbital = false; } QVector4D Camera::getLeftRightBottomTop() { const float aspectRatio = float(viewportWidth) / viewportHeight; const floa...
// Copyright information can be found in the file named COPYING // located in the root directory of this distribution. #include "ljpeg/jpeglib.h" #include "core/stream/stream.h" #include "gfx/bitmap/gBitmap.h" static bool sReadJPG(Stream &stream, GBitmap *bitmap); static bool sWriteJPG(GBitmap *bitmap, Stream &str...
// Module: Log4CPLUS // File: socket-win32.cxx // Created: 4/2003 // Author: <NAME> // // // Copyright (C) <NAME> All rights reserved. // // This software is published under the terms of the Apache Software // License version 1.1, a copy of which has been included with this // distribution in the LICENSE.APL file...
/* *************************************** * * * Laser Studio - BeOs * * * * Adapté par Trap#1 (<NAME>) * * (1998-1999) * *-------------------------------------* * * * E...
#include <chrono> #include <string> #include <sstream> #include <cstdio> #include <thread> #include <gtest/gtest.h> #include "hazelcast/logger.h" using hazelcast::logger; TEST(log_level_test, test_ordering) { ASSERT_LT(logger::level::all, logger::level::finest); ASSERT_LT(logger::level::finest, logger::leve...
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ** Copyright (c) 2010, Monash University ** All rights reserved. ** Redistribution and use in source and binary forms, with or without modification, ** are permitted provided that the following conditions are met: ** ...
#include "Common_ExampleApp.h" // The code below was copy-pasted verbatim from imgui_demo.cpp // Do not edit!!! //----------------------------------------------------------------------------- // [SECTION] Example App: Docking, DockSpace / ShowExampleAppDockSpace() //----------------------------------------------------...
// BEGIN CUT HERE // END CUT HERE #include <sstream> #include <cstdio> #include <cstdlib> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <string> #include <set> #include <iostream> #include <algorithm> using namespace std; const int N = 64; cons...
#ifdef PARSER_DEBUG #include <iostream> #endif #include <vector> #include <string> #include <map> #include <list> enum arg_type {mtx, ptr, val, reg, idx}; class argument { public: argument(bool is_const, bool is_end, int id): type(arg_type::mtx), data({id}), is_c(is_const) { add_matrix_refere...
#include <bits/stdc++.h> using namespace std; #define SIZE 200020 #define OFFSET 100002 #define LEFT_SON (segPt << 1) #define RIGHT_SON (segPt << 1 | 1) typedef struct _SegNode { int leftPt, rightPt; int sum; int mulLazy, updLazy; } SegNode; SegNode segTree[SIZE << 2]; void pushUp(int se...
// Copyright <NAME> 2020 - 2021. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE or copy at // https://www.boost.org/LICENSE_1_0.txt) /*! \file Sends messages of a fixed size between ranks 0-N/2 and N/2-N */ #include "../include/cuda_runtime.hpp" #in...
#include <iostream> #include <memory> #include <optional> #include <vector> #include "../abstractions/GlUtils.hpp" #include "../abstractions/IndexBuffer.hpp" #include "../abstractions/ShaderUtil.hpp" #include "../abstractions/VertexBuffer.hpp" #include <GL/glew.h> #include <GLFW/glfw3.h> #include <cassert> namespac...
#include "precomp.h" // include (only) this in every .cpp file TrainingData trainingData( 4000, 1000, 1000 ); Network nn; // ----------------------------------------------------------- // Initialize the application // ----------------------------------------------------------- void Game::Init() { FILE* f = fopen( "n...
// Copyright 2015 <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 or agreed to in w...
#include "compat.h" #include <cstring> #include "serialize.h" #include "netbase.h" #include "util.h" #include "cdatastream.h" #include "cflatdata.h" #include "net/csubnet.h" CSubNet::CSubNet() : valid(false) { memset(netmask, 0, sizeof(netmask)); } CSubNet::CSubNet(const std::string &strSubnet...
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "remoting/protocol/pairing_registry.h" #include "base/base64.h" #include "base/bind.h" #include "base/guid.h" #include "base/json/json_string_va...
#include <algorithm> #include <cstdlib> #include <iostream> #include <string> #include <unordered_set> #include <vector> #include <boost/program_options.hpp> #include <boost/format.hpp> #include "slide/ExactSolver.hpp" #include "slide/HitodeSolver.hpp" #include "slide/KurageSolver.hpp" #include "slide/StraightSolver....
// PacArchive.cpp // // Copyright 2016 <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...
/* ------------------------------------------------ Copyright 2014 AT&T Intellectual Property 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...
#include "../../../Tracks/TracksInterface.h" #include "../../../TuningGroup.h" #include "../NotesArea.h" #include "Render/Utils/UtaPitchCurves.h" #include "Render/Utils/UtaTranslator.h" QList<RenderArgs> NotesArea::getRenderArgsCore(QPoint range) const { QList<RenderArgs> args; int left = (range.x() < 0 || ra...
#include "MyApplication.h" #include <iostream> #include <algorithm> MyApplication::MyApplication() { interpreter = new KeyInterpreter(10); } MyApplication::MyApplication(std::string image_file_path) : image_name(image_file_path) { interpreter = new KeyInterpreter(10); } MyApplication::~MyApplicatio...
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2011, <NAME>, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
#include "MetroTexturesDatabase.h" #include "MetroReflection.h" #include "MetroTypes.h" #include "MetroBinArrayArchive.h" #include "MetroBinArchive.h" void MetroTextureInfo::Serialize(MetroReflectionReader& s) { METRO_READ_MEMBER(s, type); METRO_READ_MEMBER(s, texture_type); METRO_READ_MEMBER(s, source_na...
#include <bits/stdc++.h> #ifdef LOCAL #include "code/formatting.hpp" #else #define debug(...) (void)0 #endif using namespace std; static_assert(sizeof(int) == 4 && sizeof(long) == 8); struct disjoint_set_rollback { int N, S; vector<int> next; vector<pair<int, int>> history; explicit disjoint_set_roll...
#include "engine.h" Engine::Engine(int fps, ALLEGRO_DISPLAY *display) : fps{fps}, window_width{al_get_display_width(display)}, window_height{al_get_display_height(display)}, display{display}, shift{false}, lctrl{false}, click{false}, turning_right{false}, turning_left{false}, lo...
#include <iostream> #include <math.h> #include "UtilSources/Math/const.h" #define GRAV 9.81 #define RHOW 1025. #define RHOA 1.225 #define PI 3.14 void calc_tendon(int n, double x) { double tendonsTension = 0; double Ttx; for (int i = 0; i < n; i++) { } } class Turbine_Platform { double m0 = 22...
#include "FusionEKF.h" #include "tools.h" #include "Eigen/Dense" #include <iostream> using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; using std::vector; /* * Constructor. */ FusionEKF::FusionEKF() { is_initialized_ = false; previous_timestamp_ = 0; // initializing matrices R_laser_ = Mat...
/* Copyright 2016 <NAME> This file is part of T4ME and covered by the BSD 3-clause license. You should have received a copy of the BSD 3-clause license along with T4ME. If not, see <https://opensource.org/licenses/BSD-3-Clause/>. */ #include <iostream> #include <numeric> #include <cmath> #include <vector>...
// =============================================================== // Computer Graphics Homework Solutions // Copyright (C) 2017 by <NAME> // // HW2a.cpp - HW2a class // // Written by: <NAME>, 2017 // =============================================================== #include "HW2a.h" // shader ID enum { HW2A }; // uni...
/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "Verifier.h" #include <algorithm> #include <map> #include <string> #include <unordered_map> #include <unordered_set> #i...
/* * TODO */ #include "./disas.h" #include <new> #include <cstdlib> #include "../util/data.h" #include "../util/util.h" #include "../memory/memory.h" #include "./mnemonics.h" // Stores the information used to disassemble the program. struct DisasMemory { Memory *memory; size_t bank; DoubleWord pc; DoubleW...
/** * @file * This is the main application file for the stockgui application. * stockgui is a simple GTK+3 application which allows the user to query the * bid/ask price of any ticker symbol. */ #include <iostream> #include <thread> #include <sstream> #include <gtk/gtk.h> #include <curl/curl.h> #include <stock...
#include <iostream> #include <string> #include <list> #include <fstream> #include <filesystem> #include <boost/program_options.hpp> #include <boost/algorithm/string.hpp> #include <zeep/xml/document.hpp> #include <zeep/exception.hpp> #include <zeep/xml/parser.hpp> #include <zeep/xml/xpath.hpp> using namespace std; us...
#include "ali_bss.h" #include "http_test_listener.h" using namespace aliyun; static const char* test_describe_cash_detail_response = "{" " \"BalanceAmount\": \"BalanceAmount\"," " \"AmountOwed\": \"AmountOwed\"," " \"EnableThresholdAlert\": \"EnableThresholdAlert\"," " \"MiniAlertThreshold\": 0," " \"Froze...
#include "yuv420rgbbuffer.h" #include <QFile> #include <QDebug> YUV420RGBBuffer::YUV420RGBBuffer() { m_iBufferWidth = 0; m_iBufferHeight = 0; m_iFrameCount = -1; m_puhYUVBuffer = NULL; m_puhRGBBuffer = NULL; m_bIs16Bit = false; } YUV420RGBBuffer::~YUV420RGBBuffer() { delete[] m_puhYUVBu...
/* * The MIT License * * Copyright (c) 2016-2017 The University of Utah * * 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 * right...
#include <algorithm> #include <cmath> #include <cstdlib> #include <ctime> #include <fstream> #include <iostream> #include <list> #include <string.h> #include <string> #include <vector> using namespace std; struct sehirler { string sehirsayı; double x; double y; }; // nodeların olusturduğu cizgiler arasını hesapla...
/* * Copyright (c) 2018 T-Life Research Center, Fudan University, Shanghai, * China. See the accompanying Manual for the contributors and the way to cite * this work. Comments and suggestions welcome. Please contact Dr. <NAME> * <<EMAIL>> * * @Author: Dr. <NAME> * @Date: 2016-04-19 11:37:42 * @Last Modified By...
// // Created by lucasyu on 18-6-22. // #include "commander.h" //const float max_thrust = 0.5827*1.3; const float max_thrust = 9810; #define _USE_MATH_DEFINES //PI //MODE_RAW 0 //MODE_POS 1 //MODE_TRJ 2 void Commander::posspReset(const float& x, const float& y, const float& z) { (*m_pos_sp)[0] = x; (*m_pos...
#include "packer.h" #include <functional> #include <algorithm> #include "../../include/3rdparty/framepacker/framepacker.hpp" #include "../../include/texture.h" #include "../../include/imageformats/bmploader.h" // ============================ sad::freetype::Packer::T methods ============================ #define PAD...
#include "package.hpp" #include "frill/misc/target_id.hpp" #include <fstream> inline std::string replace_separator(const std::string &str) { auto s = str; for (auto &c : s) { if (c == '\\') { c = '/'; } } return s; } void package_to_hpp(const frill::fs::path &shader_folder, c...
#include "shared.h" using namespace media; using namespace media::xfont; namespace { IFontRasterizer* font_rasterizer_creator (const RasterizedFontCreationParams& params, RasterizedFontParamsPtr font_params) { return new XFontFontRasterizer (params, font_params); } } namespace media { namespac...
// // Created by datasone. // This file is part of CrystalLyrics. // #include "CLyricUtils.h" #include <algorithm> #include <zlib.h> #include <cstring> size_t utf8StringChars(const std::string &str) { size_t count = 0, i = 0; while (i < str.length()) { auto ch = static_cast<unsigned char>(str[i++]); ...
// RUN: %clang_cc1 -verify %s int foo() { int x[2]; // expected-note 4 {{array 'x' declared here}} int y[2]; // expected-note 2 {{array 'y' declared here}} int *p = &y[2]; // no-warning (void) sizeof(x[2]); // no-warning y[2] = 2; // expected-warning {{array index of '2' indexes past the end of an array (tha...
/* * Copyright 2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
#include "inflate.h" Inflate::Inflate() : dis_hfm_tree_(new DisHuffman), ll_hfm_tree_(new LlHuffman), in_data_(0), in_bit_cnt_(0), out_buffer_(new uint8[I_O_BUFFSIZE]), out_buffer_cnt_(0), fp_out_(NULL), fp_in_(NULL) {} Inflate::~Inflate() { delete dis_hfm_tree_; dele...
#include <samples/common/serialization.h> #include <samples/common/truetype.h> #include <agge.text/font.h> #include <fcntl.h> #include <io.h> #include <numeric> #include <samples/common/platform/win32/dc.h> #include <stdio.h> #include <strmd/serializer.h> #include <strmd/container_ex.h> #include <windows.h> using nam...
#include "StdAfx.h" #include "UIOutfitInfo.h" #include "UIXmlInit.h" #include "UIStatic.h" #include "UIDoubleProgressBar.h" #include "..\CustomOutfit.h" #include "..\string_table.h" #include "..\actor.h" #include "..\ActorCondition.h" #include "..\player_hud.h" LPCSTR immunity_names[]= { "burn_immuni...
#include "atk/toolkit.h" #include "atkui/framework.h" #include "atkui/skeleton_drawer.h" #include <stdio.h> #include <string.h> using namespace atk; using namespace atkui; using namespace glm; class Unique : public atkui::Framework { public: Unique() : atkui::Framework(atkui::Perspective) {} virtual ~Unique() {} ...
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
#pragma once #include <symbol_table_entry.h> #include <error.h> #include <iostream> #include <unordered_map> #include <stack> #include <vector> using namespace std; string to_str(Type *type) { if (type->category == Category::PRIMITIVE) { if (type->primitive == Primitive::INT) return "INT"; ...
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /* * auto_calibration.cpp - airspeed auto calibration * Algorithm by <NAME> * */ #include <AP_HAL/AP_HAL.h> #include <AP_Math/AP_Math.h> #include <AP_Common/AP_Common.h> #include "AP_Airspeed.h" extern const AP_HAL::HAL& hal; // co...
/* * Copyright 2018-2021 Membrane Software <<EMAIL>> https://membranesoftware.com * * 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...
/* * Copyright (c) 2011 <NAME> * This source code is distributed under the MIT license. * See the accompanying file LICENSE.MIT.txt for details. */ #include <wexus/Widgets.h> #include <assert.h> #include <wexus/Context.h> #include <wexus/Registry.h> #include <wexus/Application.h> #include <wexus/AssertException...
/* Copyright (c) 2010-2011 mbed.org, MIT License * * 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, pu...
/* * Copyright 2012, 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 applica...
// // disparity.cpp // - logpolar disparity. // Sept 2001. // #include <sys/kernel.h> #include <iostream.h> #include "YARPImageServices.h" #include "YARPPort.h" #include "YARPImagePort.h" #include "temporary/YARPConverter.h" #include <VisDMatrix.h> YARPInputPortOf<YARPGenericImage> inImgPortL; YARPInputPortOf<YARPGe...
// Copyright (c) Nuralogix. All rights reserved. Licensed under the MIT license. // See LICENSE.txt in the project root for license information. #include "dfx/api/StudyAPI.hpp" #include "dfx/api/grpc/CloudGRPC.hpp" #include "dfx/api/grpc/StudyGRPC.hpp" #include "dfx/api/validator/CloudValidator.hpp" #include "CloudG...
/* * Knowledge.cpp * * Created on: Apr 4, 2016 * Author: goldman */ #include "Knowledge.h" #include <cassert> using std::endl; unordered_set<size_t> Knowledge::add(const size_t variable, const bool value) { auto rewrite_it = rewrites.find(variable); // If "variable" is currently being rewriten to somet...
// // main.cpp // // This program uses 'Olympic scoring' to average a set of numbers // where the highest and lowest scores are tossed out. // // Notes // // Arrays feel clunky after getting used to vectors. But vectors are built // from arrays and I'll probably abuse vectors if I don't retain an // appreciation for t...
/* * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) * * 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...
#include <iostream> #include <cmath> #include <string> #include <vector> #include <fstream> #include <sstream> #include <set> #include <map> struct Object { std::vector<uint> edges; std::vector<float> vertices; unsigned int vCount = 0; unsigned int eCount = 0; }; int main(int argc, char** argv){ std::vector<Ob...
#include <iostream> #include <chrono> #include <thread> #include <vector> #include <iomanip> #include <etl/crc16.h> #include <lpl/util.hpp> #include <lpl/peripheral/i2c.hpp> namespace lcd { constexpr uint8_t i2c_addr = 0x27; constexpr size_t lcd_width = 16; constexpr uint8_t lcd_chr = 1; constexpr uint8_t lcd_cmd ...
// Created by <NAME> on 2019-09-03. #include "../../include/pw/FullAligner.hpp" FullAligner::FullAligner(ScoringScheme scoring_scheme) : PairwiseFunction(), scoring_scheme(scoring_scheme) {} //template<typename TSequenceValue, typename TSpec> //void SeedExtendXdrop<TSequenceValue, TSpec>::apply( void FullAl...
#include "stdafx.h" using namespace XSI; SICALLBACK XSILoadPlugin_2(PluginRegistrar& in_reg) { in_reg.PutAuthor(L"Exocortex Technologies, Inc."); in_reg.PutName(L"HeavyLoadTest"); in_reg.PutVersion(1, 0); in_reg.RegisterCommand(L"exocortex_run_test", L"exocortex_run_test"); in_reg.RegisterOperat...
/* PROGRAM: $PROGRAM AUTHOR: <NAME> DATE: 2011-11-26 DESCRIPTION: $DESCRIPTION */ #include <cstdio> #include <cstring> using namespace std; typedef long long int lli; const int MAXN=12; const int MAXSTATE=300001; int N,M; int mapd[MAXN][MAXN]; int mapr[MAXN][MAXN]; int sc,SC; int s_[MAXSTATE],S_[MAXS...
/* ***** BEGIN LICENSE BLOCK ***** Version: MPL 1.1/LGPL 2.1/GPL 2.0 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with ... for the specific language governing rights and limitations under the License. The Original Code...
/** * 分配问题 * tags: 残余网络最短/最长路 * ps: 残余网络找最长路(初始时不能有环):直接将所有边权取反,用SPFA找最短路 * 找最长路径过程中不会出现负环。 * 在增广的过程中,会出现反向边,**反向边的权值相反**,可能导致有环,而原网络中没有环,故出现的环中必定有源点 * 对于**任意**一条边(u, v), * 设源点s到v的最短距离为a,s到v的最短距离为b,此边权为w * 由最短路径的三角不等式可知 * a <= b + w (1.1) * 增广后会出现一个 s -> ... -> u -> v -> ... -> s的环,其权值之和为: * \s...
/* * This file is part of the DUDS project. It is subject to the BSD-style * license terms in the LICENSE file found in the top-level directory of this * distribution and at http://www.somewhere.org/somepath/license.html. * No part of DUDS, including this file, may be copied, modified, propagated, * or distributed...
//used online references to generate logic #include <iostream> #include <vector> #include <queue> #include <utility> #include <random> #include <ctime> using namespace std; //set the 2d vector to store the game board typedef vector<vector<char>> matrix; //set size of minesweeper board //printf("Enter the size of the...
#include "common.h" #include "node.h" #include <algorithm> #include <fstream> #include <cassert> std::ostream &operator<<(std::ostream &o, const AlignmentOutput &alignment) { for (const Sequence &s : alignment) { for (const Symbol &c : s) o << c; o << "\n"; } return o; } std::t...
/** MIT License * * Copyright (c) 2020 - 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...
/* * Copyright 2008 by IDIAP Research Institute * http://www.idiap.ch * * See the file COPYING for the licence associated with this software. */ #include "SocketTee.h" #include <cstdio> // For perror() #include <cstring> // For memset() #include <unistd.h> #include <sys/types.h> #include <sys...
/* Copyright (C) 2019 <NAME> [http://luiscript.com] 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, ...
// Please see license.txt for licensing and copyright information // // Author: <NAME>, University of Michigan // #include "ase.h" using namespace std; void ASE::alloc(int natoms0) { natoms = natoms0; anumbers = new int[natoms+1]; anames = new string[natoms+1]; return; } void ASE::init(string infil...
/* * Distributed under the OSI-approved Apache License, Version 2.0. See * accompanying file Copyright.txt for details. */ #include <cstdint> #include <cstring> #include <iostream> #include <stdexcept> #include <adios2.h> #include <gtest/gtest.h> #include "../SmallTestData.h" class SstWriteTest : public ::test...