text
stringlengths
3.08k
12.5k
#include "ObjectDetector.h" #include <iostream> #include <map> #include <boost/filesystem.hpp> namespace fs = boost::filesystem; std::vector<std::string> get_file_list(const std::string& path) { std::vector<std::string> m_file_list; if (fs::is_directory(path)) { fs::path apk_path(path); fs::d...
#include <gtest/gtest.h> #include "Eigen/Core" #include "idocp/robot/robot.hpp" #include "idocp/ocp/split_kkt_residual.hpp" #include "idocp/ocp/split_kkt_matrix.hpp" #include "idocp/ocp/split_solution.hpp" #include "idocp/ocp/split_direction.hpp" #include "idocp/unconstr/unconstr_dynamics.hpp" #include "robot_factor...
#include "Ui.h" // emulator interface #include "UiCrtConfigDlg.h" #include "UiCrtFrame.h" #include "UiSystem.h" // sharing info between UI_wxgui modules #include "host.h" // for Config*() #include "wx/slider.h" // ----------------------------------------------------------------...
#include "gtest/gtest.h" #include "../include/Controller.h" #include "../include/Game.h" #include "../include/Move.h" #include "../include/Color.h" #include <unistd.h> #include <string> #include <sstream> #include <iostream> #include <thread> #include "../include/Dice.h" #define LAST_ASCII_CHAR 127 #define LC_R 114 #d...
#include "app/Application.h" #include "app/GameState.h" #include "app/PauseState.h" #include "utils/Assert.h" #include "utils/File.h" #include "utils/Json.h" #include "utils/Log.h" #include "utils/Locator.h" #include "utils/StringId.h" #include "system/WrenBindings.h" #include "system/DebugDrawRenderer.h" #i...
#include "stdafx.h" #include "AVC1Parser.h" #include "stdint.h" /************************************************************************/ /* DISCLAIMER: */ /* This code is based on FFmpeg (libavcodec/h264_mp4toannexb_bsf.c) */ /* Licensed under the LGPL v2...
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ // Include a header file from your module to test. #include "ns3/double-probe.h" #include "ns3/test.h" #include "ns3/random-variable-stream.h" #include "ns3/trace-source-accessor.h" #include "ns3/traced-value.h" #include "ns3/nstime.h" #include "ns3/sim...
/* >> pulse-sensor-arduino.cpp << A simple library for using the heart rate pulse sensor in an Arduino Yún board (may be used in other boards too). Reference: https://github.com/WorldFamousElectronics/PulseSensor-Amped-Leonardo This code is for Pulse Sensor Amped by <NAME> and <NAME> www.pulsesensor.com >>>...
/* american fuzzy lop - LLVM instrumentation bootstrap --------------------------------------------------- Written by <NAME> <<EMAIL>> and <NAME> <<EMAIL>> LLVM integration design comes from Laszlo Szekeres. Copyright 2015, 2016 Google Inc. All rights reserved. Licensed under the Apa...
#include "Joystick.h" #define UNICODE #include <windows.h> #include <mmsystem.h> #include <regstr.h> QString getJoystickName(const QString & registryKey, unsigned int joystickIndex) { HKEY hKey; HKEY hTopKey = HKEY_LOCAL_MACHINE; LSTATUS result; WCHAR temp[256]; DWORD tempSize; ...
/*@@@ File: dfdt.cxx Version: 1.00 Description: Class DFDT - Data Field Definitions Table Author: <NAME>, <EMAIL> @@@*/ #include <stdlib.h> //for exit() #include <string.h> #include "dfdt.hxx" #include "common.hxx" DFDT::DFDT() { Initialize(); } void DFDT::Initialize() { Table = new DFD[5]; TotalEntries = 0;...
// ybmj #include <bits/stdc++.h> using namespace std; #define lson (rt << 1) #define rson (rt << 1 | 1) #define lson_len (len - (len >> 1)) #define rson_len (len >> 1) #define pb(x) push_back(x) #define clr(a, x) memset(a, x, sizeof(a)) #define mp(x, y) make_pair(x, y) typedef long long ll; typedef pair<int, int> pii; ...
/**************************************************************************/ /*! @file Adafruit_ADXL375.cpp @author <NAME> and K.Townsend (Adafruit Industries) BSD License (see license.txt) The ADXL375 is a digital accelerometer with 13-bit resolution, capable of measuring +/-200g. This dri...
/* * Copyright (c) 2013, <NAME>, <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 conditio...
#include "stdafx.h" #include "audioheader.h" #include "mergeaudio.h" #include <io.h> //-------------------------------------------------------------------------------------------------------------- static unsigned long _ComputeMask(AudioHeader *pHdr) { unsigned char *p = (unsigned char *)pHdr; unsigned lo...
// IFT3100H21_CurveBezier/renderer.cpp // Classe responsable du rendu de l'application. #include "renderer.h" void Renderer::setup() { ofSetFrameRate(60); ofSetBackgroundColor(0); ofSetSphereResolution(32); ofDisableDepthTest(); // paramètres line_resolution = 100; line_width_outline = 4.0f; line_wid...
/**************************************************************************\ * * This file is part of the Coin 3D visualization library. * Copyright (C) by <NAME> & Gas Technologies. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License...
#include "flare/animation/interpolators/cubic_solver.hpp" #include <cmath> using namespace flare; static const float Epsilon = 1e-8f; CubicSolver::CubicSolver() : m_X0(0.0f), m_Y0(0.0f), m_X1(0.0f), m_Y1(0.0f), m_X2(0.0f), m_Y2(0.0f), m_X3(0.0f), m_Y3(0.0f), m_E(0.0f), m_F(0.0f), m_G(0.0f), m_H(0.0f) {...
/*eLiSe06/05/99 Copyright (C) 1999 <NAME> eLiSe : Elements of a Linux Image Software Environment 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 yo...
// // Created by joe on 24/01/16. // #include "xDisplay.h" #include <X11/Xatom.h> #include <boost/date_time/posix_time/posix_time.hpp> using namespace osmMapper; using namespace Cairo; using namespace boost::interprocess; using namespace boost::posix_time; using namespace std; xDisplay::xDisplay(int &x, int &y) : ...
// =============================================================================== // NVIDIA PHYSX SDK TRAINING PROGRAMS // LESSON 407: PARTICLE SYSTEMS // // Written by <NAME>, 3-15-05 // Edited by <NAME>, 5-1-06 // Edited by Yongdong, 7-9-08 // ================================...
#include "Decoders.hh" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <exception> #include <phosg/Encoding.hh> #include <phosg/Filesystem.hh> #include <phosg/Image.hh> #include <phosg/Strings.hh> #include <stdexcept> #include <string> #i...
/* I2CHelper.cpp - Library for handling unreliable I2C communication with a Raspbery Pi. Created by <NAME>, February 20, 2017 Released under the ASL2 */ #include <Arduino.h> #include <Wire.h> #include "I2CHelper.h" byte _receiveBuffer[RECEIVE_BUFFER_SIZE]; I2CReader I2CHelper::reader(_receiveBuffer, REC...
#include "particle_generator.h" ParticleGenerator::ParticleGenerator( Shader shader, Texture2D texture, unsigned int amount ) : shader( shader ), texture( texture ), amount( amount ) { this->init(); } /* first loop might look a little daunting. Because particles die over time we want to spawn nr_new_pa...
#include <bits/stdc++.h> #include "../util/helpers.cpp" using namespace std; // http://adventofcode.com/2017/day/25 class state { public: string name; // things to do if current value is zero bool write_zero; bool move_dir_zero; // 0 is left, 1 is right string next_state_zero; // things to do if current value...
#include "DifficultyCalculator.h" #include "DifficultyLoader.h" #include <Consensus.h> #include <Core/Global.h> using namespace Consensus; DifficultyCalculator::DifficultyCalculator(std::shared_ptr<const IBlockDB> pBlockDB) : m_pBlockDB(pBlockDB) { } // Computes the proof-of-work difficulty that the next block sh...
#include "Pattern.h" #include <assert.h> #include "Board.h" static char pointToCharMap[] = { '_', 'W', 'B', 'O' }; Pattern::Pattern() : hash(""), goodMoves(std::vector<std::pair<char, char>>()) { } char Pattern::pointToChar(Point* p) { return pointToCharMap[p->color]; /* if (p == nullptr) return 'O'; ...
// // Created by baoxing on 10/10/17. // #include "GetPseudoGenomeSequence.h" int getPseudoGenomeSequence(std::map<std::string, Fasta>& referenceSequences, const std::string& sdiFile, std::map<std::string, Fasta>& targetSequences, const std::string& vcfFix, std::map<std::string, std::stri...
const int N = 100000 + 5, MAX_TRIS = N * 6; bool in_circumcircle (cp p1, cp p2, cp p3, cp p4) { double u11 = p1.x - p4.x, u21 = p2.x - p4.x, u31 = p3.x - p4.x; double u12 = p1.y - p4.y, u22 = p2.y - p4.y, u32 = p3.y - p4.y; double u13 = sqr (p1.x) - sqr (p4.x) + sqr (p1.y) - sqr (p4.y); double u23 = sqr (p2.x) - sq...
#include "generator/hierarchy_entry.hpp" #include "indexer/feature_utils.hpp" #include "indexer/ftypes_matcher.hpp" #include "coding/string_utf8_multilang.hpp" #include "base/assert.hpp" #include "base/string_utils.hpp" #include "base/stl_helpers.hpp" #include <algorithm> #include <sstream> #include <tuple> #includ...
#include "null-analyzer.h" #include "../ast/decl.h" #include "../backend/ir.h" using namespace cx; Nullability NullAnalyzer::analyzeNullability(Value* nullableValue, Instruction* startFrom) { visited.clear(); return analyzeNullability_recursive(nullableValue, startFrom); } Nullability NullAnalyzer::analyzeNu...
/** * @file rmsprop_test.cpp * @author <NAME> * * Tests the RMSProp optimizer. */ #include <mlpack/core.hpp> #include <mlpack/core/optimizers/rmsprop/rmsprop.hpp> #include <mlpack/core/optimizers/sgd/test_function.hpp> #include <mlpack/methods/logistic_regression/logistic_regression.hpp> #include <mlpack/method...
#include "image.h" #include "stream/file_stream.h" #include <cmath> #include <cstdio> #include <cstring> namespace { typedef unsigned char RGBE[4]; constexpr int R = 0; constexpr int G = 1; constexpr int B = 2; constexpr int E = 3; constexpr int MINELEN = 8; // minimum scanline length for encoding constexpr i...
#include "sudoku.h" Sudoku::Sudoku() { } //Index start at 0, row-major. First value of pair is the index, the second one is the value Sudoku::Sudoku(const std::vector<std::pair<int, int>>& values) { setValues(values); } //Index start at 0, row-major. First value of pair is the index, the second one is the value vo...
#include "MemMappedArchive.h" #include "DirectoryMetadata.h" #include "MemMappedBucket.h" #include "MemMapper.h" #include "MemOps.h" #include <algorithm> #include <cassert> using namespace AssetMap; namespace fs = std::filesystem; class ArchiveBuilder { uint8_t* const begin; uint8_t* const bucketsTbl; uint8_t* ...
/*** ** <NAME> <NAME> ** Update: 17-12-2019 ***/ //#include <bits/stdc++.h> #include<iostream> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<cstring> #include<time.h> #include<limits.h> #include<vector> #include<string> #include<stack> #include<queue> #include<map> #include<unordered_map> #inclu...
#include "Halide.h" #include "benchmark.h" #include "halide_image.h" #include "halide_image_io.h" using namespace Halide; using namespace Halide::Tools; double run_test(bool auto_schedule) { // This implements the basic description of non-local means found at // https://en.wikipedia.org/wiki/Non-local_means. ...
#include "weapon_type.h" #include "events.h" #include "sprite_set.h" #include "util/text.h" #include "parser.h" #include "resource_base.h" #include "game_actions.h" #include "omfgscript/omfg_script.h" #include "util/macros.h" #include "timer_event.h" #include "luaapi/context.h" #include "FindFile.h" #include <string>...
/*++ Copyright (C) Microsoft Corporation, 1997 - 1999 Module Name: onestop.hxx Abstract: This file contains the common functions that are helpful in notifying OneStop of logon/logoff events. Author: <NAME> <GopalP> Notes: a. This is being used in senslogn.dll on NT5. ...
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories <NAME>, <EMAIL> Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with San...
//=========================================== // Lumina-DE source code // Copyright (c) 2015, <NAME> // Available under the 3-clause BSD license // See the LICENSE file for full details //=========================================== #include "LScreenSaver.h" #include <QScreen> #include <QApplication> #define DEBUG ...
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
#include "2019/day5/cpp/include/intcode.hpp" #include <iostream> #include <numeric> #include "utils/cpp/include/utils.hpp" using std::tuple; Intcode::Intcode(bool reset, bool verbose) : m_program(), m_input(), m_iter(0), m_base(0), m_output(0), m_reset(reset), m_verbose(verbo...
// // simple_kd_tree.cpp // kd-tree-12-05 // // Created by <NAME> on 5/12/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #include "simple_kd_tree.hpp" #include "KD_tree.hpp" #include <vector> #include <vector> #include <iostream> #include <algorithm> #include <cmath> using namespace std; template < cl...
/* *MIT License * * Copyright (c) 2017 <NAME> * * AUTHOR : <NAME> * AFFILIATION : UNIVERSITY OF MARYLAND, MARYLAND ROBOTICS CENTER * EMAIL : <EMAIL> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to...
/* */ /** * @file raycast.cpp * * Raycasting routine that gives intersection points with map tiles. * */ #include "lib/framework/frame.h" #include "raycast.h" #include "MayaScape/map.h" // TILE_UNITS #include "MayaScape/display3d.h" // clipXY() struct HeightCallbackHelp_t { const int height; uint16_t pitch; }...
#define PROJECTNAME "memman" #define PROJECTVER PROJECTNAME ## _versions #define USEMSV_MSVCORE #define USEMSV_HASH #define USEMSV_HTTP #define USEMSV_CONSOLE // #define USEMSV_MEMORYCONTROL - set as global // #define USEMSV_INTERCEPT - set as global #define USEMSV_MEMORYCONTROL_INFO // Add memory info #define USEMSV...
/* Copyright 2020 <NAME>. This file is part of gdstk, distributed under the terms of the Boost Software License - Version 1.0. See the accompanying LICENSE file or <http://www.boost.org/LICENSE_1_0.txt> */ #include <stdio.h> #include "gdstk.h" using namespace gdstk; Cell* alignment_mark() { Cell* cell = (Cell*...
//Implementation of rates #include "rates.h" #include "Common.h" using namespace std; /************************** Source spectra ***************************************/ // Planck curve divided by nu double PlanckDivNu( double x, double T ){ return pow( x, 2.0 ) / ( exp( planckConstant * x * nu0HI / ( k * T )...
#include "header/keyhandler.h" KeyHandler::KeyHandler() { makeKeyLists(); method = Method::SENDINPUT; } void KeyHandler::press(const QString &key) { INPUT* event = makeEvent(key); sendKeyEvent(event, EventType::Down); sendKeyEvent(event, EventType::Up); delete event; } void Ke...
// // Created by idk on 25/01/2021. // #include <fstream> #include <numeric> #include <chrono> #include <iostream> #include "Trainer.h" #include "../utils/Utils.h" #include <bits/stdc++.h> bool Trainer::isIa() const { return is_ia; } void Trainer::setIsIa(bool new_isIa) { is_ia = new_isIa; } int Trainer::g...
#include "window.h" GuiWindow::GuiWindow(std::string path, glm::vec2 resolution) : resolution(resolution), path{path} { loadClicks(); std::fstream file{path}; if (file.is_open()) { DataLoader loader; DataObj * win = loader.LoadDataObj(file, "window"); file.close(); glm:...
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrTextUtils.h" #include "GrAtlasTextBlob.h" #include "GrBatchFontCache.h" #include "GrBlurUtils.h" #include "GrContext.h" #include "GrDrawContext.h" #include "GrTex...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.cpp * Author: dev * * Created on June 4, 2018, 10:19 AM */ #include "IPCInterface.h" #include <cstdlib> #inclu...
#include "net.h" #if defined(USE_NCNN_SIMPLEOCV) #include "simpleocv.h" #else #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #endif #include <stdio.h> #include <vector> void ncnnmat_save(ncnn::Mat out) { FILE* fp = fopen("featuremap.txt", "w"); f...
/** initialization & event handling of input devices ************************* * * * Copyright (c) 2016 <NAME> * * This file is distributed under the MIT License * * See LIC...
// // Created by timi on 30.7.2017. // #include <chrono> #include <iostream> #include <utility> #include "../entities/Robot.h" #include "DifferentialEvolutionAlgorithm.h" #include "../utils/VectorOperations.h" #include "../utils/TestingMatricesUtils.h" // CONSTRUCTOR DifferentialEvolutionAlgorithm::DifferentialEvol...
/////////////////////////////////////////////// /// @file 005_insert-interval.cpp /// @author <NAME> (<EMAIL>) /// @brief https://leetcode.com/problems/insert-interval/ /// @version 0.1 /// @date 2022-01-05 /// /// @copyright Copyright (c) 2022 /// /////////////////////////////////////////////// #include <vector> #incl...
#include "atestscene.h" #include "atexturedquad.h" #include "acamera.h" #include "anode.h" #include "adirectionallight.h" #include <qdebug.h> ATestScene::ATestScene() : m_time( 0.0f ) , m_metersToUnits( 0.05f ) { } ATestScene::~ATestScene() { } void ATestScene::initialize() { m_cam...
#include "BurmanSmith.h" #include "constants.h" #include <iostream> const double degree = pi/180.0; const double normzc[] = {0.8851, -0.1015, 0.1459, -0.0265}; const double knots[] = {0,0,0,30,70,180,180,180}; const double B = 25.0;//Need to double check this const double mp = MASS_PROTON*1000.0; const double md = M...
// RVIZ Drawing (Just for debugging) #include <visualization_msgs/Marker.h> #include "Navigator.h" void Navigator::initDrawing() { target_marker_pub = n.advertise<visualization_msgs::Marker>("visualization_marker/target", 1); obstacles_marker_pub = n.advertise<visualization_msgs::Marker>("visualizatio...
#include "hook.h" #include "exported.h" #include <wingdi.h> constexpr unsigned char injectedByteCode[64] = { 0x02, 0x48, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x90, 0x...
#include "ros/ros.h" #include <unistd.h> #include <sstream> #include "std_msgs/Empty.h" #include <geometry_msgs/Twist.h> #include <nav_msgs/Odometry.h> #include <geometry_msgs/Point.h> #include <tf/tf.h> #include <queue> #include "EventTriggerUtility.h" #include "PerformTaskConstants.h" #include "elderly_care_simula...
#include <inttypes.h> #include <png.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include "openGLShading.hpp" using std::string; #include <OpenGL/gl3.h> unsigned int width; unsigned int height; int row_size; png_bytep *row_pointers; uint8_t *input_data; uint8_t *o...
#include<stdlib.h> #include<conio.h> #include<iostream> #include<stdio.h> #include<windows.h> #define width 70 #define height 70 //The global map char ma[width][height]; int w=35,h=35; char ch = 'd';//initially the snake's direction int initialize=0; int frow; int fcol; int score = 0; int stuck = 0; int found;//to ch...
//main.cpp #include <opencv2/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> #include <opencv2/core/types.hpp> enum Colors {BLUE, RED, GREEN, YELLOW, PURPLE, GRAY}; class Ball { public: Colors color; cv::Point position; cv::Rect rect; Ball(); Ball(Colors color, cv::Rect...
/* Copyright (c) <NAME>(<EMAIL>), 2012 - 2017 -*- C++ -*- */ /* * Description: User Defined Transform Function for UnPivot: convert columns to rows * * Create Date: Dec 17, 2017 */ #include "Vertica.h" #include <sstream> using namespace Vertica; using namespace std; #define DEFAULT_separator "," class UnPivot ...
#include "responseparser.h" #include <string.h> #include <vector> #include <string> #include <set> #include <map> #include "exception.h" #include "commandhelper.h" #include <sys/types.h> #include <fcntl.h> #include <errno.h> #include <signal.h> #ifndef _WIN32 #include <unistd.h> #include <sys/mman.h> #include...
#pragma once #include <ostream> #include <type_traits> // is_arithmetic #include <stdexcept> // invalid_argument #include <cmath> // abs, sqrt, sqrtf #include <algorithm> // max_element #include <unordered_set> #include <numeric> #include <valarray> #include <vector> namespace tess { /** * A represent...
#include <bits/stdc++.h> using namespace std; template <class T> struct SegmentTree { T neutro = 0; int N; vector<T> st; // 8 SegmentTree(int n) : st(2 * n, neutro), N(n) {} T F(T a, T b) { return max(a, b); } // 5 // O(2N) void build() { for (int i = N - 1; i > 0; i--) st[i] = F(st[i << 1]...
#include <QDragEnterEvent> #include <QDragLeaveEvent> #include <QDragMoveEvent> #include <QDropEvent> #include <QFileInfo> #include <QMimeData> #include <string> #include "window-basic-main.hpp" #include "qt-wrappers.hpp" using namespace std; static const char *textExtensions[] = { "txt", "log", nullptr }; static ...
// MIT License // // Copyright (c) 2018, 2019 degski // // 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, modif...
#include "caoper.h" #include <tchar.h> #include <Windows.h> #include <string> #include <comutil.h> #include <atlcomcli.h> #import "JITComVCTK_S.dll" using namespace std; CAOper::CAOper(QObject *parent) : QObject(parent) { m_InitializeHandle = NULL; m_SetCert = NULL; m_SetCertChooseType = NULL; m...
/** * @file main.cpp * * This module holds the main() function, which is the entrypoint * to the program. * * © 2019 by <NAME> */ #include <algorithm> #include <fstream> #include <functional> #include <limits> #include <map> #include <math.h> #include <memory> #include <set> #include <stdlib.h> #include <stdio....
// Fill out your copyright notice in the Description page of Project Settings. #include "HoverBoss.h" #include "ReturnoftheGormGameMode.h" #include "HoverMini.h" #include "TimerManager.h" #include "Kismet/GameplayStatics.h" // Sets default values AHoverBoss::AHoverBoss() { // Set this actor to call Tick() every f...
#include <llvm/IR/Module.h> #include <llvm/IR/InstIterator.h> #include <llvm/IR/DataLayout.h> #include <llvm/IR/CallSite.h> #include <llvm/Support/raw_ostream.h> #include <llvm/Support/CommandLine.h> #include "Analysis/MemAccess.h" using namespace llvm; static cl::opt<bool> OptDetectMemCmp("memaccess-memcmp", ...
/* Complexitate: O(n * log n) Sortare: O(n * log n) Parcurgerea tuturor actvităților: timp liniar -> O(n) Init: O(n) Find: O(log maxi) Union: O(1) Soluție: Folosim o implementare similară cu algoritmul lui Kruskal. Sortăm descrescător activitățile după...
#include "ATDev.h" // return value for function sendATCmd #define SENDATCMD_END(X) \ memset(m_endBuffer, 0x00, ATDEV_BUFF_END_SIZE +1); \ return X; ATDev::ATDev() { m_hwSerial = NULL; memset(m_endBuffer, 0x00, ATDEV_BUFF_END_SIZE + 1); memset(m_cmdBuffer, 0x00, ATDEV_BUFF_CMD_SIZE + 1); ...
#include "pressio_rom_lspg.hpp" #include "../helpers.hpp" constexpr double dt = 0.5; struct MyFakeApp { const int N_ = {}; std::string & checkStr_; mutable int callCounter_ = 0; mutable int callCounter1_ = 0; using scalar_type = double; using state_type = Eigen::VectorXd; using residual_type = state_t...
/* Copyright 2014-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 writing, software dis...
#include <dremini/GeminiServer.hpp> #include <drogon/HttpAppFramework.h> #include <memory> #include <regex> using namespace drogon; using namespace dremini; using namespace trantor; GeminiServer::GeminiServer(EventLoop* loop, const InetAddress& listenAddr, const std::string& key, const std::string& cert) : loop_(...
/** * The MIT License (MIT) * * Copyright (c) 2015-2016 Ripcord Software Ltd * * 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 rig...
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2014-, Open Perception, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condition...
#include <string.h> #include <chrono> #include <cstdint> #include <iostream> using std::cin; using std::cout; using std::endl; typedef int internal_type; typedef uint64_t index_type; typedef uint64_t size_type; // Assuming n = number of elements in array... class GrowArray { private: size_type num_elements; siz...
#include "global.hpp" sf::RenderWindow window; sf::Clock globalClock; sf::RenderTexture colorMapFBO; sf::RenderTexture normalMapFBO; sf::RenderTexture heightMapFBO; sf::RenderTexture shadowMapFBO; sf::RenderTexture ambientShadowMapFBO; sf::RenderTexture lightDiffuseMap1FBO; sf::RenderTexture lightDiffuseMap2FBO; sf::R...
/* * ProceduralTexture.cpp * * The MIT License (MIT) * * Copyright (c) 2015 FilipeCN * * 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 limitati...
/* * Copyright (c) 2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 * * 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 * * Unle...
/* * The MIT License * * Copyright (c) 2010 <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, co...
// Modified from // https://github.com/SJTU-Thinklab-Det/r3det-on-mmdetection/blob/master/mmdet/ops/fr/src/feature_refine_kernel.cu #include "rotated_feature_align.h" #include "../ort_mmcv_utils.h" template <typename T> T bilinear_interpolate(const T *input, const int height, const int width, T y, ...
// $Id$ /*main.cpp * *The starting point of the network simulator *-Include all network header files *-initilize the network *-initialize the traffic manager and set it to run * * */ #include <sys/time.h> #include <string> #include <cstdlib> #include <iostream> #include <fstream> #include <sstream> #include ...
// Copyright(c) 2016, Kitware SAS // www.kitware.fr // 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...
/**The MIT License (MIT) Copyright (c) 2018 by ThingPulse Ltd., https://thingpulse.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 ri...
/* PsyTexx: xm_instrum.cpp. Functions for working with instruments Copyright (C) 2002 - 2007 <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 2 of the Licens...
//<NAME>, Bob #include <iostream> #include <fstream> #include <assert.h> #include <math.h> #include "RSA.h" #include "ModularArithmetic.h" #include <gmpxx.h> using namespace std; RSA::RSA(int n) { mpz_class p,q,N,s,e; //generate n-bit prime p p=ModularArithmetic::genPrime(n); //generate prime and d...
/************************************************************ * Student Name: <NAME> * * Exercise Name: Ex3 * * File description: Implementation of Threadable Class * ***********************************************************/ #include "Threadabl...
/*************************************** ** Tsunagari Tile Engine ** ** world.cpp ** ** Copyright 2011-2015 <NAME> ** ** Copyright 2011-2019 <NAME> ** ***************************************/ // ********** // Permission is hereby granted, free of charge, to any person obtaining ...
/* * Integrationsroutinen.cpp * * Created on: 24.04.2017 * Author: mona */ #include <iostream> #include <complex> #include <cstdlib> #include <vector> #include <cmath> #include <sstream> #include <utility> #include <math.h> #include <fstream> #include <functional> using namespace std; double F1(double x...
// This file is part of CxxDoc, The RAVL C++ Documentation tool // Copyright (C) 2004, University of Surrey // This code may be redistributed under the terms of the GNU General // Public License (GPL). See the gpl.licence file for details or // see http://www.gnu.org/copyleft/gpl.html // file-header-ends-here ///////...
/* This file is part of TACS: The Toolkit for the Analysis of Composite Structures, a parallel finite-element code for structural and multidisciplinary design optimization. Copyright (C) 2010 University of Toronto Copyright (C) 2012 University of Michigan Copyright (C) 2014 Georgia Tech Research Corporatio...
// C++ version to be a bit faster #include <vector> #include <iostream> #include <string> #include <fstream> #include <stdio.h> /* printf, scanf, puts, NULL */ #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ int cardsForTieBreak = 3; std::vector<int> player1; std::vector<...