text
stringlengths
3.08k
12.5k
#include <climits> #include "application_logic.h" #include "logger.h" Logic::Logic() { status = LogicStatus::idle; pump_timer.reset(); poll_timer.reset(); measure_reset(); } void Logic::measure_reset() { measure_delay_p1_d1 = 0; measure_delay_p0_d0 = 0; } LogicStatus Logic::get_status() { return status; } ...
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <string> #include <stdlib.h> #include <climits> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x): val(x), next(nullptr) {} }; class Solution { public: /** * [] [[]] */ ListNode *mergeKLists...
#include "GERMLINE.h" #include <string.h> double MIN_MATCH_LEN = 3; int MARKER_SET_SIZE = 128; bool PRINT_MATCH_HAPS = false; bool ROI = false; bool HAP_EXT = false; bool WIN_EXT = false; bool ALLOW_HOM = false; bool HOM_ONLY = false; bool HAPLOID = false; bool SILENT = false; bool DEBUG = false; bool BINARY_OUT = fal...
#include <GL/glew.h> #include <GL/glu.h> #include <GL/gl.h> #include <SDL2/SDL.h> #include <fstream> #include "shader.h" #include "project.h" void print_shader_log(int shader) { if(glIsShader(shader)) { int infoLogLength = 0; int maxLength = infoLogLength; glGetShaderiv(shader, G...
#include "AK9754.h" boolean AK9754::begin(TwoWire &wirePort, uint32_t i2cSpeed, uint8_t i2caddr) { _i2cPort = &wirePort; _i2cPort->begin(); _i2cPort->setClock(i2cSpeed); _i2caddr = i2caddr; uint8_t deviceID = readRegister(AK9754_WIA2); if (deviceID != 21) //Device ID should be 21 retur...
// -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- #include "lin_time.h" // GetElapsedTime #include "cmd/unit_generic.h" #include "cmd/unit_util.h" #include "gfxlib.h" #include "viewarea.h" #include "sphere_display.h" namespace { float GetDangerRate(Radar::Sensor::ThreatLevel::Value threat) { using n...
#include <iostream> using namespace std; struct tree { int x, y = rand(), value, in, a, b; }; tree tr[500000]; int resp[500000]; void update (int t) { if (t == -1) return; tr[t].x = 1; if (tr[t].value == 0) tr[t].in = 1; else tr[t].in = 0; if (tr[t].a != -1) { tr[t].x += tr[tr[t].a].x; tr[t].in += tr[tr[t...
#include "Utils.h" #include <random> #include <fstream> #include <set> #include "Json.h" std::string random_hex_string(unsigned long length) { constexpr static char charset[] = "0123456789abcdef"; thread_local static std::random_device rd; thread_local static std::seed_seq seed{rd(), rd(), rd(), rd()}; /...
//-------------------------------------------------------------------------------- // Projectiles.cpp //-------------------------------------------------------------------------------- // The class that manages the player and enemy projectiles //--------------------------------------------------------------------------...
#include "includes/Lexer.hpp" #include "proto.hpp" #include <algorithm> bool Lexer::isAtEnd() const { if (m_current >= m_src.length()) { return true; } return false; } char Lexer::advance() { return m_src.at(m_current++); } void Lexer::addToken(TokenType type, LiteralType ltype) { auto l...
#include <qtcomponents.h> #define plan SystemPlan N::AttachDock:: AttachDock ( Plan * p ) : SystemPlan ( p ) , Trigger ( NULL ) , Dock ( NULL ) { } N::AttachDock::~AttachDock (void) { } bool N::AttachDock::isDocking(void) { nKickOut ( IsNull ( Dock...
#include "Water.h" #include <cmath> Water::Water(const int& gridX, const int& gridZ, const std::string& filename) : xGridDims(gridX), zGridDims(gridZ), frozen(false), time(0.0), radius(0.0) { texID = Scene::GetTexture(filename); // initialise the grids texture coordinate memory we will need enough memory for both ...
/*********************************************************************************************************************** Copyright (c) 2021, JOiiNT LAB, Fondazione Istituto Italiano di Tecnologia, Intellimech Consorzio per la Meccatronica. All rights reserved. Redistribution and use in source and binary forms, with or...
/*! * wsserver * TestAuth.cpp * * \date 2017 * \author <NAME> (<EMAIL>) * \link https://github.com/edwardstock */ #include <iostream> #include <string> #include <sstream> #include <memory> #include <src/server/web/HttpClient.h> #include <src/server/base/Auth.h> #include <src/server/helpers/base64.h> #inclu...
#include "buffer_consumer.h" #include "buffer_consumer_interface.h" #include "data_store.h" using namespace packer; //////////////////////////////////////////////////////////////////////////////////////// // // BufferConsumer // pthread_t child = -1; pthread_cond_t packer::full = PTHREAD_COND_INITIALIZER; pthread_co...
#include "ModelSurface.h" #include <algorithm> namespace cs557_surface { static const string vs_string_surface_410 = "#version 410 core \n" " \n" "uniform mat4 projectionMatrix; ...
#include <pybind11/pybind11.h> #include "otio_anyDictionary.h" #include "otio_anyVector.h" #include "otio_bindings.h" #include "otio_utils.h" #include "otio_errorStatusHandler.h" #include "opentimelineio/serialization.h" #include "opentimelineio/deserialization.h" #include "opentimelineio/serializableObject.h" #include...
/* * Testing the key exchange protocol. * * @author <NAME> * @date 2017-10-15 * * Copyright 2017 ubirch GmbH (https://ubirch.com) * * ``` * 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...
#include <makelevelset2.h> // find distance x0 is from segment x1-x2 static double point_segment_distance(const Vec2d &x0, const Vec2d &x1, const Vec2d &x2) { Vec2d dx(x2-x1); double m2=mag2(dx); // find parameter value of closest point on segment double s12=(double)( dot(x2-x0, dx)/m2 ); if(s12<0)...
//---------------------------------------------------------------------------// // // // PDFR TextElement implementation file // // // ...
#include "RootIo/FhCmtConfig.h" #ifdef DEFECT_NO_STRINGSTREAM #include <strstream> #else #include <sstream> #endif #include <string> #include <cstdio> FILE* fhPopen(const char* command, const char *mode) { #ifdef WIN32 return _popen(command,mode); #else return ::popen(command,mode); #endif } int fhPclose(FILE* f...
#include <map> #include <sstream> #include <iostream> #include "../utils.h" #include "alibabacloud/core/AlibabaCloud.h" #include "alibabacloud/core/CommonClient.h" using namespace std; using namespace AlibabaCloud; typedef unsigned char u8_t; const string catId = "88888888"; // ref: https://help.aliyun.com/document...
#include <iostream> #include "model.h" #include "assimp_utils.h" Model::Model(std::string path, Shader& shader, Renderer& renderer, Material material) : shader_(shader), renderer_(renderer), bone_count_(0), material_(material) { LoadModel(path); } void Model::Draw() {...
// Copyright (c) 2017 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 "components/omnibox/browser/titled_url_match_utils.h" #include <numeric> #include <vector> #include "base/metrics/field_trial_params.h" #in...
// // Created by ssunah on 6/23/18. // #include "graphoperations.h" #include <memory.h> #include <queue> void GraphOperations::getKCore(const Graph *graph, int *core_table) { int vertices_count = graph->getVerticesCount(); int max_degree = graph->getGraphMaxDegree(); int* vertices = new int[vertices_coun...
/*******************************************************************\ Module: Author: <NAME>, <EMAIL> \*******************************************************************/ #include <cstdlib> #include <ostream> #include "symbol.h" #include "source_location.h" #include "std_expr.h" /********************************...
/* Copyright (C) 2019 <NAME> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial app...
/** * @file StructuredEdgeDetection_.cpp * @brief mex interface for cv::ximgproc::StructuredEdgeDetection * @ingroup ximgproc * @author Amro * @date 2016 */ #include "mexopencv.hpp" #include "opencv2/ximgproc.hpp" using namespace std; using namespace cv; using namespace cv::ximgproc; // Persistent objects namesp...
/* * Copyright (C) 2008 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 <iostream> #include <cstdio> #include <cstdlib> #include <string> #include <fstream> #include "dromaius.h" // Give all components an up-reference to us. Dromaius::Dromaius(settings_t settings) { cpu.emu = this; graphics.emu = this; input.emu = this; memory.emu = this; audio.emu = this; gui.emu = this; ...
// Copyright (c) 2017 The Bitcoin developers // Copyright (c) 2017-2019 The Bitcoin Unlimited developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <inttypes.h> #include <string> #include <boost/algorithm/string.hp...
#include "core/DataSource.h" #include "core/Instances.h" #include "core/Instance.h" #include "core/Utils.h" #include "c48/C48.h" #include "evaluation/Evaluation.h" #include "evaluation/CostMatrix.h" #include <iostream> #include <ctime> #include <string.h> void classify(C48 &, char *, char *, bool isDumpTree = false); ...
/*****************************************************************************/ /* Copyright (c) 1999-2001 Microsoft Corporation, All Rights Reserved / /*****************************************************************************/ /* * SecurityDescriptor.cpp - implementation file for CSecureRegi...
// Fig. 8.8: string1.cpp // Member function definitions for class String. #include <iostream> using std::cout; using std::endl; #include <iomanip> using std::setw; #include <new> // C++ standard "new" operator #include <cstring> // strcpy and strcat prototypes #include <cstdlib> // exit prototype #in...
#include "rose-kernel/PolyhedralKernel.hpp" #include "opencl-from-loops.hpp" #include "rose-utils.hpp" void usage() { std::cout << "usage: loop-ocl input.c dim_out dim_used" << std::endl; std::cout << " dim_out >= 0" << std::endl; std::cout << " dim_used = [1,3]" << std::endl; std::cout << "...
// // utility.cpp // kssio // // Created by <NAME> on 2015-02-05. // Copyright (c) 2015 Klassen Software Solutions. All rights reserved. // Licensing follows the MIT License. // #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <sstream> #include <vector> #include <kss/io/uti...
#include "Tetrahedralization.hpp" #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Mesh_triangulation_3.h> #include <CGAL/Mesh_complex_3_in_triangulation_3.h> #include <CGAL/Mesh_criteria_3.h> #include <CGAL/Polyhedral_mesh_domain_3.h> #include <CGAL/IO/Polyhedron_iostream.h> #include <CG...
// namespace live { DEFINE_CALLBACK(HarvestBoxSelect, Rectf); DEFINE_CALLBACK(ZoneBoxSelect, Rectf); DEFINE_CALLBACK(BuildLeftClick, v2f); struct Interaction { enum Action { kNone = 0, kHarvest = 1, kBuild = 2, kZone = 3, }; b8 left_mouse_down = false; v2f left_mouse_start; Action action = ...
/* * This file is part of the Simutrans project under the Artistic License. * (see LICENSE.txt) */ /* The code is mostly copied and slightly adapted straight from the microsoft documetnation. * There was no clear indicating of license, so public domain is assumed. */ #include <windows.h> #if defined (__GNUC_...
/* Copyright 2019 Intel Corporation * * 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 ...
#pragma once #include "InputTypes.hpp" struct GLFWwindow; namespace flex { enum class CursorMode { NORMAL, // Show HIDDEN, // Hide, but don't restrict movement DISABLED, // Hide and keep within screen bounds _NONE }; enum class WindowMode { WINDOWED, WINDOWED_FULLSCREEN, // (aka "Borderless window...
#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; noise_ax = 9.0; noise_ay = 9.0; ...
#include <SDL2/SDL.h> #include <iostream> #include <iomanip> #include "Context.h" #include "ParseConfig.h" #include "InstanceManager.h" void tryAddControllers() { int n = SDL_NumJoysticks(); for (int i = 0; i < n; i++) { auto name = SDL_JoystickNameForIndex(i); if (name == nullptr) name = "[unknown]"; ...
/* * 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...
#include "CreateSoundProducerDialog.h" #include "global_variables.h" #include "raygui/raygui.h" #include "raygui/raygui_extras.h" #include <cstring> CreateSoundProducerDialog::CreateSoundProducerDialog(const std::string& title) { xPosition = 0.0; yPosition = 0.0; zPosition = 0.0; okClicked = false; cancelClicked...
#include <cstdio> #include <iostream> #include <algorithm> #include <climits> #include <cstring> #include <cmath> #define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e) using namespace std; struct Point { long double x, y; Point() { } Point(long double _x, long double _y) : x(_x), y(_y) { } ...
#include "option.h" #include "allegro_compatibility.h" #include <stdio.h> void option_time(struct option_data *opt, double dt) { if (opt->active) { if (opt->time_in > opt->active_time) { opt->active = false; opt->time_in = 0; } else opt->time_in += dt; } } bool test_pos_o...
#include "IntersectionInfo.hpp" #include "Triangle.hpp" #include <limits> #include <iostream> using namespace Tricible; bool Triangle::IntersectsRay(const Point3 & origin, const Point3 & vec, IntersectionInfo * interInfo, float nearClip, float farClip) { //const float EPSILON = 0.0000001; //Point3 vertex0 = this->_...
#ifndef NAIVEBAYES_H #define NAIVEBAYES_H typedef struct class_summary { std::vector<std::vector<float>> Mean_Stdev; float class_prob; } class_summary; class Naive_Bayes { private: std::vector<class_summary> Summary; std::vector<float> unique_label; public: void fit(std::vector<s...
/* * teleop_arm_key.cpp * Copyright 2013 University of Massachusetts Lowell * Author: <NAME> */ #include "arm/teleop_arm_key.h" #include "arm/movement_definitions.h" #include <signal.h> #include <termios.h> #include <stdio.h> int kfd = 0; struct termios cooked, raw; /*! * \brief Starts the command publisher and...
#include "variables.h" int PC; int SP; std::stack<int> stk; std::map<char, int> offset; std::map<std::string, int> opcode_map; std::vector<std::vector<int>> lines; int X[REG_COUNT]; float S[REG_COUNT]; double D[REG_COUNT]; std::vector<std::pair<int, std::string>> unparsed; std::map<std::string, int> labels; //8KB m...
#include "lib_dir/Settings.h" #include "lib_dir/Util.h" #include "lib_dir/Timer.h" #include "lib_dir/PulseWidthModulation.h" #include "lib_dir/Dell.h" #include "ColorDetector.h" #include "LineFollower.h" #include "RoomFinder.h" volatile bool tick = false; volatile uint16_t colorFrequencyCounter = 0; enum Etats { FI...
#include "L1Trigger/TrackFindingTracklet/interface/imath.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" using namespace trklet; bool VarBase::calculate(int debug_level) { bool ok1 = true; bool ok2 = true; bool ok3 = true; if (p1_) ok1 = p1_->calculate(debug_level); if (p2_) ok2 = p2_-...
/** * Copyright 2016 neurodata (http://neurodata.io/) * Written by <NAME> (<EMAIL>) * * This file is part of knor * * 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....
#include "ofApp.h" using namespace ofxCv; using namespace cv; void removeIslands(ofPixels& img) { int w = img.getWidth(), h = img.getHeight(); int ia1=-w-1,ia2=-w-0,ia3=-w+1,ib1=-0-1,ib3=-0+1,ic1=+w-1,ic2=+w-0,ic3=+w+1; unsigned char* p = img.getPixels(); for(int y = 1; y + 1 < h; y++) { for(int x = 1; x + 1 < ...
#include "APILogCpp.h" using namespace apilog; LogGate::LogGate(string id) { idGate = id; } LogGate::~LogGate() { } string LogGate::getID() { return idGate; } string LogGate::getStatus() { return LogManager::getLogManger()->getStatus(); } void LogGate::writeCritialMessage(string message)...
#include <stdio.h> #include <string.h> #include <stdlib.h> /* "infinity"... > maximum distance possible (for one knight) */ #define MAXN 10400 /* maximum number of rows */ #define MAXR 40 /* maximum number of columns */ #define MAXC 26 /* cost of collecting all knights here */ int cost[MAXC][MAXR]; /* cost of gett...
#pragma once #include <emmintrin.h> #include <immintrin.h> #include <array> #include <cstdint> #include <optional> #include <utility> #include <iostream> #include "board.hpp" #include "move.hpp" #include "piece.hpp" #ifndef TESTING #include <emscripten/fetch.h> #endif using std::int16_t; using std::size_t; // the...
/* authors <NAME> (xkrejc68), <NAME> (xpiskj00) date 7. 12. 2020 */ #pragma once #include <cstdint> #include <vector> #include <map> #include <functional> /// @brief Static class for generating distribution class Distribution { public: static double random(void); static double exponential(i...
/* The MIT License (MIT) Copyright (c) 2016 Embedit Electronics 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, ...
#include <vector> #include <string> #include <unordered_set> #include <gtest/gtest.h> #define _BCLI_TEST_ #include <bcli/bcli.hpp> using vstring = std::vector<std::string>; using namespace bc; class class_1 { public: class_1(bool i) : i(i) {} bool i; }; class class_2 { public: class_2(const std::string& v) : v...
/******************************************************************************\ * British Broadcasting Corporation * Copyright (c) 2007 * * Author(s): * <NAME>, <NAME>, <NAME> * * Description: * Implements Digital Radio Mondiale (DRM) Multiplex Distribution Interface * (MDI), Receiver Status and Control Inter...
#pragma hdrstop #include "atVideoCompressorThread.h" #include <fstream> #include "Poco/Process.h" #include "Poco/PipeStream.h" #include "Poco/StreamCopier.h" #include "Poco/Path.h" #include "Poco/File.h" #include "dslLogger.h" #include "dslFileUtils.h" #include "dslMathUtils.h" using Poco::Path; using namespace Poco;...
/** * MIT License * * Copyright (c) 2019 <NAME>, <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...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; class ColoredStrokes { public: int getLeast(vector <string> P) { int m = P.size(); int n = P[0].size(); ...
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <iostream> #include <string.h> #include <opencv2/opencv.hpp> #include <fstream> #include <vector> #include <cmath> #include <map> #include <ctime> #include <sstream> #include <algorithm> #include <boost/thread/thread.hpp> #include <ros/ros.h> #include...
#include "itkImage.h" #include <itkImageFileReader.h> #include <itkExtractImageFilter.h> #include "itkImageFileWriter.h" #include "itkImageRegionIteratorWithIndex.h" #include "itkIndex.h" #include "OptionParser.h" optparse::OptionParser buildParser() { const std::string usage = "%prog [OPTION]"; const std::s...
#include "coordinategroup.h" #include "universe.h" coordinategroup::coordinategroup(std::vector<double>& coords) { int problemdimension = universe::mymesh->getmeshdimension(); mynumcoords = coords.size()/3; noisethreshold = universe::mymesh->getnodes()->getnoisethreshold(); double meshsize = 0.0;...
/*************************************************************************/ /* */ /* Centre for Speech Technology Research */ /* University of Edinburgh, UK */ /* ...
#include "firmwareUupdateDialog.h" #include "ui_firmwareUupdateDialog.h" QFirmwareUpdateDialog::QFirmwareUpdateDialog(QWidget *parent) : QDialog(parent), ui(new Ui::QFirmwareUpdateDialog) { ui->setupUi(this); ui->lineEdit->setText("None"); ui->pushButton->setDisabled(false); ui->pushButton_2->...
/******************************************************************************* Copyright (C) 2021 <NAME> This file is part of DGGRID. DGGRID is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Found...
#include "map_loader.hpp" /** * \brief Tries to load the map list */ bool LoadMapList( std::vector<std::string>& map_list ) { std::ifstream maps_file_stream; //try to load map list file try { maps_file_stream.open( path_data + "map_list" ); if(maps_file_stream.is_open()) { ...
/* * Copyright (C) 2012 BMW Car IT GmbH * * 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 a...
/* * MIT License * * Copyright (c) 2020 <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, cop...
#include "TestScene.h" #include <math.h> #include <glm/gtc/matrix_transform.hpp> #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/fast_square_root.hpp> #include <glm/gtx/rotate_vector.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/gtx/string_cast.hpp> static GLfloat vertices[] = ...
#include "Signals.h" //////////////////////////////////////////////////////////////////////////////////// // global Signals object static One<TSignals> _Signals; //////////////////////////////////////////////////////////////////////////////////// // global signal handler void _SignalHandler(int sig, siginfo_t *info,...
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any l...
// Copyright (c) 2020, <NAME>. // All rights reserved. // // Software License Agreement (BSD License 2.0) // // 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 abo...
/* * Copyright 2010, <NAME> <<EMAIL>>. * All rights reserved. */ #include "BrushStrokeSnapshot.h" #include <stdio.h> #include "RenderBuffer.h" #include "RenderEngine.h" // constructor BrushStrokeSnapshot::BrushStrokeSnapshot(const BrushStroke* stroke) : BoundedObjectSnapshot(stroke) , fOriginal(stroke) , fBrus...
/* * g++ testpositnew.cpp -o testpositnew -std=c++11 */ #include <iostream> #include <cmath> #include <cstdlib> #include <cstring> #include <cstdio> #include <cstdint> #define FP16_LIMB_SIZE 16 #define FP16_TYPE uint16_t typedef FP16_TYPE fp16; union Bits { float f; int32_t si; uint32_t ui; }; #define _G_NBITS ...
#include "solver.h" #include <boost/program_options.hpp> #include <chrono> #include <fstream> #include <iostream> #include <mutex> #include <random> #include <thread> std::mutex global_mutex; std::vector<Field> all_fields; std::vector<int32_t> all_scores; std::atomic_size_t games_count = 0; size_t scores_sum = 0; si...
/*********************************************************************************/ // Example to control LPD6803-based RGB LED Modules in a strand or strip via SPI // by <NAME> / http://pixelinvaders.ch // v2.0 - // This Library is bsed on work // of Adafruit-WS2801-Library and FastSPI Library /**************...
// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <bench/benchmark.h> #include <dns/n...
/******************************************************************************* SerIn - An Arduino library to parse commands and arguments received over a serial port. Derived from SerialCommand by <NAME>. See SerIn.h for version history. This library is free software; you can redistribute it and/or modify it und...
#include "c_anim.h" #include "l_timer.h" #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" c_AnimationEngine::c_AnimationEngine(c_Var w, c_Var h, c_Var cap) { this->display_output = SDL_Display(h,w); this->objects = (c_AnimationObject*)calloc(N_OBJSMAX, sizeof(c_AnimationObject)); this->sprites = (c_Animation...
#line 2 "BitwiseAnd.cpp" #include <cstdio> #include <cstring> #include <cstdlib> #include <set> #include <algorithm> #include <map> #include <queue> #include <iostream> #include <sstream> #include <cassert> #include <bitset> #include <list> #include <cmath> #include <string> #include <vector> #include <numeric> using ...
/* * main.cpp * * Copyright (c) 2020 <NAME> * * This program is free software; you can redistribute it and/or modify * it under the terms of the MIT License. * * See accompanying LICENSE.md or https://opensource.org/licenses/MIT. */ #include <vector> #include <chrono> #include <numeric> #include "../common.h...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Operations.cpp // OpenGL SuperBible // Demonstrates Imaging Operations // Program by <NAME>. #include "../../shared/gltools.h" // OpenGL toolkit #include <math.h> #include <stdlib.h> ////////////////////////////////////////////////////////////////// // Module globals to save source image data static GLbyte *pImage...
// Class for a least recently used (LRU) cache #include <cassert> #include <iostream> #include <unordered_map> #include <list> // Class implementing a least recently used (LRU) cache class LruCache { public: LruCache(int capacity) : capacity_(capacity), map_(capacity) {} // Lookup key in cache and get value...
//MusicalChairs--This program simulates the musical chairs, which up to 10 players competiting for chairs and tells who is the winner //<NAME> -- Comp. Sci 30S //2020-03-24 --- one day before my birthday #include<iostream> #include<windows.h> #include<conio.h> #include<chrono> #include<cctype> #include<time.h...
#include <iostream> #include "convert_to_LL1.h" #include "first_follow.h" #include "parsingTable.h" #include <stdio.h> #include <vector> #include <string.h> #include "NfaGraph.h" #include "ExpressionEvaluator.h" #include "Node.h" #include "NFAConvert.h" #include "Parser.h" #include "Minimization.h" #includ...
/* Copyright (C) 2018-2019 <NAME>, TKJ Electronics. All rights reserved. * * This program is free software: you can redistribute it and/or modify it * under the terms of the MIT License * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warrant...
/* * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or s...
#include<iostream> #include<vector> #include<cassert> #include<set> using namespace std; const int oo = 2*1000*1000*1000; struct query { int x1, y1, x2, y2; query(int x1 = 0, int y1 = 0, int x2 = 0, int y2 = 0) : x1(x1), y1(y1), x2(x2), y2(y2){} }; istream & operator >> (istream & inStream, q...
#include "SceneSerializer.h" #include <fstream> #include "Components.h" namespace TNG { template<typename T> YAML::Emitter &operator<<(YAML::Emitter &out, T vec) { out << YAML::Flow << YAML::BeginSeq; for (int i=0; i<T::length(); i++) out << vec[i]; out << YAML::End...
#include <LightArray.h> LightArray lightArray = LightArray(); LightArray::LightArray(){ // for (uint8_t i = 0; i < 5; i++) { // pinMode(controller[i], OUTPUT); // } // pinMode(LS_MUX_OUT, INPUT); for (int i = 0; i < 4; i++) { pinMode(controller1[i], OUTPUT); pinMode(controller...
// This file if part of the llir-opt project. // Licensing information can be found in the LICENSE file. // (C) 2018 <NAME>. All rights reserved. #include "core/calling_conv.h" #include "core/cast.h" #include "core/func.h" #include "core/insts.h" #include "core/prog.h" #include "core/visibility.h" #include "passes/inl...
#include "basic_arm_planner/forward_kinematics.h" #include <iostream> #include <stdio.h> #include <bitset> #include <string> #include <utility> #include <math.h> //perform the forward kinematics of the robot to figure out where you are void fk (double* x, double* z, double* alpha, int i, int j, int k,int numticks) { ...
#include <stdafx.h> #include "renderer.h" #include "atlstr.h" #include "atlimage.h" #include "puzzle/twist.h" CRenderer::CRenderer( IRenderable * renderable ) : m_renderable( renderable ) { m_viewLookfrom = CVector3D( 30, 45, 25 ); m_viewLookfrom *= .42; m_viewLookat = CVector3D(); m_up = CVector3D( 0, 0, 1 ); ...