text
stringlengths
3.08k
12.5k
#undef NDEBUG #include"Boss/Mod/ChannelCandidateInvestigator/Secretary.hpp" #include"Boss/Msg/ProposeChannelCandidates.hpp" #include"Ev/Io.hpp" #include"Ev/start.hpp" #include"Sqlite3.hpp" #include<algorithm> #include<assert.h> namespace { auto const A = Ln::NodeId("020000000000000000000000000000000000000000000000000...
#include <iostream> #include <boost/asio.hpp> #include <boost/beast.hpp> #include <boost/fiber/all.hpp> #include <boost/process.hpp> #include "http_parser.hpp" namespace net = boost::asio; using tcp = boost::asio::ip::tcp; using namespace std::literals; namespace integrated_test { template<std::size_t Size, std::s...
/****************************************************************************** Copyright (C) 2020 by <NAME> <<EMAIL>> 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...
#include "main.h" #include <MozziGuts.h> // Load first so digipots don't use Wire void MozziInit(); #include "digipots.h" #include "dac.h" #include "midi.h" #include "arturia_minilabmk2.h" #include "quantizer.h" /* * Boilerplate connecting code */ void setup() { Serial.begin(115200); Serial.println(__FILE__);...
#include "App.h" #include "Input.h" #include "Textures.h" #include "Render.h" #include "Window.h" #include "SceneEarth.h" #include "Player.h" #include "Audio.h" #include "ModuleController.h" #include "Defs.h" #include "Log.h" #define G 1.23 * pow(10,-11) SceneEarth::SceneEarth() : Module() { name.Create("scenearth"...
#include <algorithm> #include <istream> #include <limits> #include <queue> #include <ranges> #include <vector> #include <cassert> #include "util.h" namespace { struct Pos { explicit Pos(int xn, int yn) : x(xn), y(yn) {} std::int16_t x; std::int16_t y; auto operator<=>(const Pos&) const = default; Pos o...
#include "Application2D.h" #include "Texture.h" #include "Font.h" #include "Input.h" #include <time.h> Application2D::Application2D() { } Application2D::~Application2D() { } bool Application2D::startup() { srand(time(NULL)); m_2dRenderer = new aie::Renderer2D(); m_font = new aie::Font("./font/consolas.ttf",...
/** * Testea segmentos. * * @package tests.elements * @author <NAME> * @date 19/04/2018 */ // Define bloque #pragma clang diagnostic push #pragma ide diagnostic ignored "bugprone-narrowing-conversions" // Importación de librerías #include <iostream> #include <cassert> #include "../../elements/segment.h" /** *...
#include "types.h" #include "kernel.hh" #include "benchcodex.hh" #include "cpu.hh" #include "codex.hh" #include "amd64.h" class count_down_latch { public: count_down_latch(unsigned int c) : c(c) {} ~count_down_latch() { assert(c.load() == 0); } void decr(void) { if (c-- == 0) assert(false); ...
// Copyright (c) 2018 <NAME> <<EMAIL>>. Released under MIT License. #include <fstream> #include <string> void generateResourceDataSourceFile(char* resource_name, char* resource_file_name, char* output_file_name); void generateResourcesConfigSourceFile(char* resource_names_list, char* config_file_name); std::string mo...
// BrushConverter.cpp: implementation of the CBrushConverter class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "BrushConverter.h" #include "VMFUtils.h" vec3_t vec3_origin = {0,0,0}; ////////////////////////////////////////////////////////////////////// // C...
#include "ThingerWifiConfig.h" ThingerWiFiConfig WiFiConfig; #define NETWORKS_FILE "/cfg/networks.json" ThingerWiFiConfig::ThingerWiFiConfig() : available_networks_(-1), current_network_(-1) { } ThingerWiFiConfig::~ThingerWiFiConfig(){ } int ThingerWiFiConfig::networks_count(){ if(available_n...
///////////////////////////////////////////////////////////////////////////////////////// // This code contains NVIDIA Confidential Information and is disclosed // under the Mutual Non-Disclosure Agreement. // // Notice // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES // NO R...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <queue> #include <utility> using namespace std; bool done[10][10][10]; int D[10][10][10][10][10]; vector<string> B; int M, N; queue< pair<in...
// Copyright 2002 - 2008, 2010, 2011 National Technology Engineering // Solutions of Sandia, LLC (NTESS). Under the terms of Contract // DE-NA0003525 with NTESS, the U.S. Government retains certain rights // in this software. // // Use of this source code is governed by a BSD-style // license that can be found in the L...
#include "CacheRecordManager.h" #include "CacheOperateHelper.h" #include "TimerManager.h" #include "GuidFactory.h" #include "CallBack.h" #include "Log.h" using namespace util; using namespace evt; using namespace thd; void CCacheRecordManager::Init() { if(m_bInit) { return; } m_bInit = true; m_timerId = CGu...
#include "stdafx.h" #include <fstream> #include <iostream> #include <algorithm> #include <ppl.h> #include "seedAffinityMatrix.h" #include "tiles.h" #include "bfaMatrix.h" #include "image.h" bfaMatrix::bfaMatrix(int width, int height, image& image) : width(width), height(height), nCells(width*height) { data = std::vec...
#include "c_api.h" #include "cavs/proto/types.pb.h" #include "cavs/proto/tensor_shape.pb.h" #include "cavs/proto/devices.pb.h" #include "cavs/proto/func_def.pb.h" #include "cavs/proto/op_def.pb.h" #include "cavs/midend/session_base.h" #include "cavs/midend/tensor.h" #include "cavs/midend/scope.h" #include "cavs/backen...
/* * This file is part of the CitizenFX project - http://citizen.re/ * * See LICENSE and MENTIONS in the root of the source tree for information * regarding licensing. */ #include <StdInc.h> #include <Hooking.h> #include <Pool.h> #include <EntitySystem.h> #include "Streaming.h" #include <Error.h> #...
#include "QuickResponse.hpp" #include <iostream> #include <cstdlib> #include <opencv2/videoio.hpp> #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> using std::vector; #define DEBUG #define VIDEODEVICE 0 void QR::start() { cv::V...
#include "stdafx.h" #include "AudioPlayerView.h" #include "crackers.h" #include "Rect.h" #include "resourceppc.h" #include "Tools.h" #include <fstream> #include <voicectl.h> using namespace htmlayout; using namespace htmlayout::dom; using namespace std; using namespace Tools; //---------- // interf...
// #include <iostream> #include <algorithm> #include <cmath> #include <vector> #include "weighted_choice.h" // gets the distances between all the pairs of elements from a list // // @param sites array of positions // @return vector of paired positions void _get_distances(int sites[], int & len, int distances[]) { ...
/************************** * time: 2015-03-15-13.04 * name: name) * Copyright (c) 2015 Kean * email: <EMAIL> ****************************/ #include <cstdio> #include "common.h" #include "parsetree.h" #include "tokenmap.h" #include "lexer.h" #ifndef ShowNewTree #define OutTreeInsertBlank #endif /**采用松散形式输出语法树**/ #de...
/* * Copyright (c) <NAME>. All Rights Reserved. * * License: See License.txt */ /** * @file * @brief Main propertysheet * @author <NAME> * * Revision History * 2018-12-16 Convert to fmt. * 2012-07-10 Fix serialization. Broken in 4/15 wxString checkin. * 2011-10-19 Add timestamp info on skipped files. Add f...
/************************************************************************* * * * Open Dynamics Engine, Copyright (C) 2001-2003 <NAME>. * * All rights reserved. Email: <EMAIL> Web: www.q12.org * * ...
#include "objFileObject.h" /** * @brief A utility for loading * * @param path * @param out_vertices * @param out_normals * @return true object loading was successful * @return false object loading failed. */ bool loadOBJ2 (const char * path, std::vector<glm::vec3> & out_vertices, std::vector<glm::vec2> & ...
#include <string> #include <sstream> #include <iostream> #include <memory> #include "Includes.hpp" #include "CCameraFPS.hpp" #include "CDirector.hpp" #include "CSC2MapLoader.hpp" #include "CTerrainNode.hpp" const int WINDOW_WIDTH = 1920; const int WINDOW_HEIGHT = 1080; const float ROT_SPEED = 20.0f; const float STA...
#include "artworkManagement.h" using namespace std; /** * This method is used to retrieve the index of the selected Artwork * @param id Artwork id to look up * @return Index of the selected Artwork * @precondition (id is a non empty/null string and an Artwork collection exists) * @postcondition (Index of the Art...
// File Name: 250.cpp // Author: YangYue // Created Time: Sun Apr 13 00:01:46 2014 //headers #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <cstring> #include <cmath> #include <ctime> #include <string> #include <queue> #include <set> #include <map> #include <iostream> #include <v...
/* *CREATED BY: <NAME> * */ #include<iostream> using namespace std; int turnScore = 0;/////The score for each game turn int totalScoreA = 0;////Total score for player 1 int totalScoreB = 0;////Total score for player 2 ////The following function checks how much was rolled by the dice, three parameters, the dice and re...
/* * Copyright (c) 2016 maldicion069 * * Authors: <NAME> <<EMAIL>> * * This file is part of MonkeyBrushPlusPlus <https://github.com/maldicion069/monkeybrushplusplus> * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License version 3.0...
#include <stdio.h> #include <time.h> #include <sys/time.h> #include <raimd/md_stream.h> using namespace rai; using namespace md; void xprint( void *buf, size_t asz ) { MDMsgMem mem; MDMsg * m; MDOutput mout; m = MDMsg::unpack( buf, 0, asz, 0, NULL, &mem ); if ( m != NULL ) { m->print( &mout ); } ...
// This file is part of the QuantumGate project. For copyright and // licensing information refer to the license file(s) in the project root. #include "pch.h" #include "VideoResampler.h" #include <Common\Util.h> #include <Common\ScopeGuard.h> // For some reason MEDIASUBTYPE_I420 gives an unresolved external linker e...
#include <iostream> #include <cassert> #include <chrono> #include <fstream> #include <algorithm> #include <signal.h> #include <Eigen/Dense> #include "csv.h" #include "server_http.hpp" #include "server_util.h" #include "startree.h" using namespace startree; using namespace Eigen; using namespace std; using namespace...
// This file is part of VecGeom and is distributed under the // conditions in the file LICENSE.txt in the top directory. // For the full list of authors see CONTRIBUTORS.txt and `git log`. /// Unit test for Paralleliped. /// @file test/unit_tests/TestParaboloid.cpp /// @author <NAME> #undef NDEBUG #include "VecGeom/b...
#include "precompiled_stl.hpp" using namespace std; #include "utils.hpp" #include "core_functions.hpp" #include "image_functions.hpp" #include "image_functions2.hpp" #include "visu.hpp" #include "brute2.hpp" #include "pieces.hpp" #include "compose2.hpp" extern int MAXDEPTH; bool operator<(const point a, const point ...
/* ESP8266WebServer.cpp - Dead simple web-server. Supports only one simultaneous client, knows how to handle GET and POST. Copyright (c) 2014 <NAME>. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as p...
#include "ofApp.h" //-------------------------------------------------------------- float ofApp::ease(float p) { return 3 * p * p - 2 * p * p * p; } //-------------------------------------------------------------- void ofApp::cube(float d, float alpha) { float alphaScale = 255.0f; ofPushMatrix(); ofTransl...
#include <GameEngine/Systems/SpriteRenderSystem.hpp> #include <raylib.h> #include <ECS/world.hpp> #include <GameUtilities/math.hpp> #include <GameUtilities/messagebus.hpp> #include <DataStructures/QuickSort.hpp> #include <ECS/components/transform-component.hpp> #include <GameEngine/Components/SpriteComponent.hpp> #inc...
/* * Copyright (c) 2017, The OpenThread Authors. * 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 * n...
#include "game.h" Game::Game(int h, int w) { matrixH = h; matrixW = w; matrix.resize(h); matrixInit(); } void Game::matrixInit() { for (int i = 0; i < matrixH; i++) { for (int j = 0; j < matrixW; j++) { matrix[i].push_back(0); } } lastMatrix = matrix; } void Game::setMatrixElem(int x, int y) { matri...
#include "GizmoSpriteDrawer.h" #include "ApplicationManager.h" float GizmoSpriteDrawer::gizmoScale = 0.25f; GLuint GizmoSpriteDrawer::VAO = (GLuint)0; GLuint GizmoSpriteDrawer::VBO = (GLuint)0; bool GizmoSpriteDrawer::initializedSpriteBuffers = false; const GLfloat GizmoSpriteDrawer::spriteQuadVerices[12] = { -0.5f...
#include "lz4_embedded/lz4.h" #include "lz4_embedded/lz4hc.h" #include "comp0types.h" /***************************************************************************** The auxiliary memory required by LZ4_embedded_compress() is as follows: sizeof(struct refTables) = sizeof(HTYPE) * HASHTABLESIZE = 4 * (1 << (14 - ...
#include "UnitCluster.h" #include "UnitUtil.h" #include "Geo.h" #include "Boids.h" #include "DebugFlag_UnitOrders.h" /* * Cluster movement as a ball * * When we have a navigation grid (which is usually the case), we implement flocking with three boids: * - Goal: moves the unit towards the target position * - Co...
/* * Copyright (c) 2021, 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 Softwa...
#include "DPDKShuffleSimulate.hpp" #include "Config.hpp" // for Config #include "ICETelescope.hpp" // for ice_stream_id_t, ice_encode_stream_id #include "StageFactory.hpp" // for REGISTER_KOTEKAN_STAGE, StageMakerTemplate #include "Telescope.hpp" // for Telescope #include "buffer.h" // ...
/* * Copyright 2018- The Pixie 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 License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
#pragma once #include <cinttypes> #include <cmath> #include <optional> #include <queue> #include <stdexcept> #include <tuple> #include <vector> using EdgeList = std::vector<std::tuple<uint32_t, uint32_t, double>>; //(from, to, weight) using Tree = std::vector<std::vector< std::tuple<uint32_t, double, uint32_t...
// rawReceive.cpp : Defines the entry point for the console application. // // winpcap is used for this packet capture. See http://www.winpcap.org // Include directory should point to pcap.h // Library should point to wcap.lib // Both available in the wpdback (binary) // // http://www.winpcap.org/docs/docs_40_2/html/gr...
#include<iostream> #include<string> #include<fstream> #include<ctime> #include<cstdlib> using namespace std; class square{ private: int move; string message; char symbol; public: square(); void print(); int action(); char get_symbol(); void set(int,char,string); }; void print_board(square[],int,int); void rea...
/* Kookmin University Software 알고리즘 프로젝트 Hidato Puzzle Solver Programming */ #include <iostream> #include <vector> #include <iterator> using namespace std; class Solver { // 하나의 칸이 갈 수 있는 8가지 경로(dx, dy) const int dx[8] = { -1, -1, -1, 0, 0, 1, 1, 1 }; const int dy[8] = { -1, 0, 1,-1, 1, 1, 0,-1 }; int row, col...
/***************************************************************** | | AP4 - mdhd Atoms | | Copyright 2002 <NAME> | | | This file is part of Bento4/AP4 (MP4 Atom Processing Library). | | Unless you have obtained Bento4 under a difference license, | this version of Bento4 is Bento4|GPL. | Bento4|GPL i...
// // Created by willenborg on 11/08/16. // #include "opcode.h" std::vector<Opcode*> Opcode::opcodes; const Opcode Opcode::OP_00E0 = Opcode( ( unsigned char[] ){ 0x00, 0x00, 0x0E, 0x00 }, 4 ); const Opcode Opcode::OP_00EE = Opcode( ( unsigned char[] ){ 0x00, 0x00, 0x0E, 0x00 }, 4 ); const Opcode Opcode::OP_1NNN = Op...
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// // BLACK - Bounded Ltl sAtisfiability ChecKer // // (C) 2019 <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...
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include <boost/asio.hpp> #include <boost/bind.hpp> #include <base/logging.h> #include <db/db_entry.h> #include <db/db_table.h> #include <db/db_table_partition.h> #include <ksync/ksync_index.h> #include <ksync/ksync_entry.h> #include <ksync/ksyn...
#include "FileServer2.h" #include "slite/Logger.h" #include "base/public_define.h" #include "pbs/IM.BaseDefine.pb.h" #include <sys/time.h> #include <list> #include <random> using namespace IM; using namespace slite; using namespace std::placeholders; FileServer2::FileServer2(std::string host, uint16_t port, EventLo...
/* cipher-xts.c - XTS mode implementation * Copyright (C) 2017 <NAME> <<EMAIL>> * * This file is part of Libgcrypt. * * Libgcrypt 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...
#include <iostream> #include "path_validator.h" #include "vehicle.h" #include "state_machine.h" #include "collision_detector.h" #include "trajectory.h" #include "helpers.h" using namespace std; PathValidator::PathValidator() { } PathValidator::~PathValidator() { } PathValidationStatus PathValidator::validate(const ...
/** * @filename : epd7in5.cpp * @brief : Implements for e-paper library * @author : <NAME> * * Copyright (C) Waveshare August 10 2017 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documnetation files (the "Software"), ...
#include "ContactsManager.h" void ContactsManager::addContact(int idUserLoggedIn) { Contact contact; system("cls"); cout << " >>> ADDING CONTACT <<<" << endl << endl; contact = setNewContact(idUserLoggedIn); contacts.push_back(contact); textFileContacts.addContactToFile(contact); } void Con...
/* Copyright 2020 <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 distributed ...
/* Documentation snippet (C) 2017-2019 <NAME> <http://www.nedproductions.biz/> (7 commits), <NAME> <<EMAIL>> (4 commits) and Krzemienski <<EMAIL>> (2 commits) File Created: Mar 2017 Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization ob...
// Sarvottamananda (shreesh) // 2020-09-28 // shader_stuff.cpp v0.0 (OpenGL Code Snippets) // // Low level shader stuff // clang-format: off #include <GL/glew.h> // clang-format: on // clang-format: off #include "shader_stuff.h" // clang-format: on #include <fstream> #include <iostream> #include <sstream> #include <...
#include <algorithm> #include <cctype> #include <cstdint> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <memory> #include <string> #include <utility> #include <vector> namespace ref { __attribute__((noinline)) std::string get_search_string() { std::string rv = ...
// Copyright 2019 Amazon.com, Inc. or its affiliates. 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 // // Unles...
#include "stdafx.h" #include "engine.h" #include "channel.h" #include "logger.h" #include "../app/application.h" #include "../opengl.h" namespace { std::string intepretGLFWerrorcode(int code) { switch (code) { case GLFW_NOT_INITIALIZED: return "GLFW has not been initialized"; case GLFW_NO_CURRENT_CO...
// // CppParserTest.cpp // // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #include "CppParserTest.h" #include "Poco/CppUnit/TestCaller.h" #include "Poco/CppUnit/TestSuite.h" #include "Poco/CppParser/Utility.h" #include "Poco/CppPars...
//===- RDFCopy.cpp --------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===-- ThreadPlanRunToAddress.cpp ----------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
/* An integer M and a non-empty array A consisting of N non-negative integers are given. All integers in array A are less than or equal to M. A pair of integers (P, Q), such that 0 ≤ P ≤ Q < N, is called a slice of array A. The slice consists of the elements A[P], A[P + 1], ..., A[Q]. A distinct slice is a slice cons...
#include "texter.h" Texter::Texter(std::string _text, std::string _font, glm::vec3 pos, ShaderLoader* _shdloader, AssetLoader* _tloader, Camera* _cam, bool _isUI, glm::vec3 color, float scale) { text = _text; SetColor(color); SetScale(scale); SetPosition(pos); isUI = (_isUI); levelCamera = _cam; textureLoader...
#include "ast/vslContext.hpp" #include "diag/diag.hpp" #include "irgen/irgen.hpp" #include "lexer/vslLexer.hpp" #include "parser/vslParser.hpp" #include "gtest/gtest.h" #define valid(src) EXPECT_TRUE(validate(src)) #define invalid(src) EXPECT_FALSE(validate(src)) // returns true if semantically valid, false otherwise...
#include <algorithm> #include <cmath> #include "DataFormats/Math/interface/GeantUnits.h" #include "DetectorDescription/Core/interface/DDCurrentNamespace.h" #include "DetectorDescription/Core/interface/DDLogicalPart.h" #include "DetectorDescription/Core/interface/DDMaterial.h" #include "DetectorDescription/Core/interfa...
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* 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 "txList.h" //---------...
#include "animal/mamifero/mamifero_nativo.h" using namespace std; // ------------------------------------------------------------------------ // Construtores e destrutor // ------------------------------------------------------------------------ MamiferoNativo::MamiferoNativo(){ limpar(); } MamiferoNativo::Mamife...
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
#include "file.h" #include "folder.h" #include "gdocfile.h" #include "utils.h" #include "filecache.h" using namespace GDrive; File * File::NOT_FOUND = (File *) -1; File::File() { type = FILE; parent = NULL; m_contents_retrieved = false; } File::~File() { } string File::get_id() const { return ...
#include "SDInterface.h" bool SDInterface::initSD() { String display_string = ""; #ifdef KIT pinMode(SD_DET, INPUT); if (digitalRead(SD_DET) == LOW) { Serial.println(F("SD Card Detect Pin Detected")); } else { Serial.println(F("SD Card Detect Pin Not Detected")); this->supported ...
#include "octree.hpp" #include <array> #include <chrono> #include <cstdio> #include <random> #include <vector> namespace { struct Timer { std::chrono::steady_clock::time_point t0; const char *name; Timer(const char *name) : name(name) { t0 = std::chrono::steady_clock::now(); } void stop() ...
#include <SDL.h> #include <glad/glad.h> #include "renderer/screen/Window.h" #include "events/EventBus.hpp" #include "events/WindowEvent.h" #include "events/KeyboardEvent.h" #include "events/MouseEvent.h" int filterEventCallback(void *userdata, SDL_Event * event) { WindowData* data = (WindowData*)userdata; switch...
#include "unpack.h" #include "../text.h" #include <string.h> constexpr uint32_t NBASE = 37L*36L*10L*27L*27L*27L; // convert packed character to ASCII character // 0..9 a..z space +-./? char charn(uint8_t c) { if (c >= 0 && c <= 9) return '0' + c; if (c >= 10 && c < 36) return 'A' + c - 10; ...
/* * MP3関連 * * Copyright (c) 2016 Wakayama.rb Ruby Board developers * * This software is released under the MIT License. * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL * */ #include <Arduino.h> #include <MsTimer2.h> #include <WavMp3p.h> #include <mruby.h> #include <mruby/string.h> #include "...
#include <sqlite_orm/sqlite_orm.h> #include <iostream> #include <memory> #include <cassert> using std::cout; using std::endl; /** * This is a enum we want to map to our sqlite db. * First we have to decide what db type enum must have. * Let's make it `TEXT`: Gender::Male will store as 'male' string * and Ge...
// matrix.cpp // author bombard1004 // last_update Jan 28 2021 #include <bits/stdc++.h> class Matrix; class SquareMatrix; class Column; SquareMatrix eye(int n); long long det(SquareMatrix &sqm); std::pair<bool, Column> Cramer(SquareMatrix &A, Column &b); class Matrix { private: std::pair<int, int> msize; st...
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
#include <iostream> #include <fstream> #include <algorithm> #include <AnalyzerHelpers.h> #include "JtagAnalyzerResults.h" #include "JtagAnalyzer.h" #include "JtagAnalyzerSettings.h" const char* TAPStateDescLong[] = { "Test-Logic-Reset", "Run-Test/Idle", "Select-DR-Scan", "Capture-DR", "Shift-...
#include <graphics.h> #include <conio.h> #include <math.h> #define W GetSystemMetrics(SM_CXSCREEN) #define H GetSystemMetrics(SM_CYSCREEN) #define Wp W/1366 int rosesize = 500; int h = -250; struct DOT { double x; double y; double z; double r; double g; }; bool calc(double a, double b, double c, DOT &d) { d...
// Solve of six-hump camel-back function using differential evolution #include <iostream> #include <fstream> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> inline int randomBetween(int a, int b) // [a, b) { return ( a + rand() % (b+1-a) ); } inline double randomBetween(double a, double b) /...
#include "CommonTools/UtilAlgos/interface/TFileService.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/MessageLogger/interface/MessageLogger.h...
/** * @example standalone/001_triangle_screenshot.cpp * @brief Shows the basic usage of OGLplus with EGLplus * * @oglplus_screenshot{001_triangle} * * Copyright 2008-2014 <NAME>. Distributed under the Boost * Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boo...
#include <dirent.h> #include <unistd.h> #include <string> #include <vector> #include <iostream> #include "linux_parser.h" using std::stof; using std::string; using std::to_string; using std::vector; // Read Operating System Name string LinuxParser::OperatingSystem() { string line; string key; string value; st...
#include <iostream> #include <TH1D.h> #include <TCanvas.h> #include <TFile.h> #include <TLegend.h> #include <TGraphAsymmErrors.h> void drawHisto(TString type, TFile * outputFile, const double & minX, const double & maxX, const double & minY, const double & maxY) { TFile * inputFileData = new TFile("/...
#include "EepromWearLeveling.h" /** @brief Initialize the object. Should be called before using another function. Data Type | Size in Bytes | Range ------------- | ------------- | ------------------------------- uint8_t | 1 | 0..255 uint16_t |...
/* -------------------------------------------------------------------------- * * OpenMM * * -------------------------------------------------------------------------- * * This is part of the OpenMM molecular simulation toolkit originating from * ...
#pragma once #include <tuple> #include <limits> #include <string> #include <utility> #include <vector> #include <algorithm> namespace impl { class node; class edge { public: using Cost_t = int; constexpr static Cost_t INF_COST = std::numeric_limits<Cost_t>::max(); public: edge(node* from, node* to, Co...
/** * @file rtp/yuri_decoders.cpp * @author <NAME> <<EMAIL>> */ /* * Copyright (c) 2013 CESNET z.s.p.o. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, is permitted provided that the following conditions * are met: * * 1. Redistributions of so...
// Copyright 2016 The SwiftShader 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 b...
#pragma once #include "drape_frontend/stylist.hpp" #include "drape_frontend/tile_key.hpp" #include "drape_frontend/shape_view_params.hpp" #include "drape/pointers.hpp" #include "indexer/ftypes_matcher.hpp" #include "indexer/road_shields_parser.hpp" #include "coding/point_to_integer.hpp" #include "geometry/point2d....
/* * Copyright (c) 2008 <NAME> <<EMAIL>> * * 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 li...