text
stringlengths
3.08k
12.5k
#include <cstdio> #include "goalc/compiler/Compiler.h" #include "common/versions.h" #include "common/util/FileUtil.h" #include "common/log/log.h" #include "third-party/CLI11.hpp" #include "third-party/fmt/core.h" #include "third-party/fmt/color.h" #include "common/goos/ReplUtils.h" #include <regex> #include "common/n...
// game over includes files listed below #include "GameOver.h" #include "Level1.h" #include "MainMenu.h" //#include "LeaderBoard.h" //#include "Database.h" #include "Level2.h" #include "ui/CocosGUI.h" #include <iostream> #include "SimpleAudioEngine.h" // cocos2d audio sys // game over audio #define BAC...
/* * * Copyright 2015, Google Inc. * 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 condi...
/** This file defines and demonstrates two necessary components for * the hash table lab for CS 2150. The first is the use of the * getWordInGrid() function, which is used for retrieving a word in a * grid of letters in one of the cardinal 8 directions (north, * south-east, etc). The second is the use of file str...
/* * Copyright (c) 2000, 2001, 2002 <NAME> * Copyright (c) 2007 <NAME> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the Li...
#include "framework/configfile.h" #include "framework/logger.h" #include "game/state/tilemap/collision.h" #include "game/state/tilemap/tilemap.h" #include "library/voxel.h" #include <array> #include <utility> #include <vector> using namespace OpenApoc; class FakeSceneryTileObject : public TileObject { public: Vec3...
#include"stdafx.h" #include"Header/Resources/Bone.h" #include "..\..\..\Header\GameObjects\DefaultGameComponent\ModelDrawComponent.h" void ButiEngine::IKComponent::OnRemove() { shp_modelData = nullptr; vec_endBones.clear(); vec_ikData.clear(); } void ButiEngine::IKComponent::OnSet() { auto model = ga...
// Original author: <NAME> // Note: much of this code was based off NeHe's Lesson 33 // Modified by <NAME> #include "Texture.h" using namespace std; Texture::Texture(char *fileName, bool texture_is_alpha_blended, bool clamp_u, bool clamp_v) { textureFilename = fileName; bTextureLoad...
// client.cpp,v 1.8 2000/11/27 17:56:42 othman Exp /* We need the connector object & we also bring in a simple string class. */ #include "ace/Log_Msg.h" #include "ace/SOCK_Connector.h" #include "ace/SString.h" /* In this tutorial, we extend SOCK_Stream by adding a few wrappers around the send_n() method...
/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: <NAME>, et al. (see THANKS for the full author list) * See LICENSE for the license information * ------------...
/** * \file src/serialization/impl/opr_registry.cpp * MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * * Copyright (c) 2014-2021 Megvii Inc. All rights reserved. * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on ...
/** * @file Tools/Texture.cpp * Implementation of class Texture * @author <A href="mailto:<EMAIL>"><NAME></A> * @author <NAME> */ #include <cstring> #include <cstdio> #include "Platform/OpenGL.h" #include "Platform/Assert.h" #include "Tools/Texture.h" #include <QImage> #ifdef WINDOWS #define strcasecmp _stricmp...
// This file is part of QIpMsg. // // QIpMsg is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // QIpMsg is distributed in the hope...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; const int maxn = 1e5 + 5; vector<int> G[maxn], dft[maxn]; int sz[maxn], heavySonSz[maxn], treeSz, rt, par[maxn], ans; int stat[maxn]; bool vis[maxn], tag[maxn]; multiset<int, greater<int> > a[maxn], b[maxn], c; struct LCA { vector<int> sp; i...
/*! @file @brief タグファイル作成ダイアログボックス @author MIK @date 2003.5.12 */ /* Copyright (C) 2003, MIK Copyright (C) 2006, ryoji Copyright (C) 2018-2021, Sakura Editor Organization This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages a...
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> using namespace std; #define ll long long #define ld long double #define mem(Arr,x) memset(Arr,x,sizeof(Arr)) const int maxN=70100; const int maxDepth=17; const int Mod=100003; const int M=(sqrt(Mod)+10); const...
#include <assert.h> #include "DebugPlotU.h" #include "IChannelBuffer.h" #include "ChannelBufferImpl.h" #include "RingBufferWithTimeStamp.h" #include "FrameWithSizeFilter.h" #define DATA_SIZE 1024 static int testBuffer[DATA_SIZE]; static COMPLEX16 testBufferDots[DATA_SIZE]; static const int PERIOD = 20; static const ...
#include <iostream> #include <cstring> #include <cstdio> #include <vector> using namespace std; #define OPR_RET 0x00 #define OPR_NOT 0x01 #define OPR_ADD 0x02 #define OPR_SUB 0x03 #define OPR_MUL 0x04 #define OPR_DIV 0x05 #define OPR_ODD 0x06 #define OPR_NOP 0x07 #define OPR_CMPE 0x08 #define OPR_CMPNE 0x09 #d...
// Copyright 2012 by BBN Technologies Corp. // All Rights Reserved. #include "Generic/common/leak_detection.h" // This must be the first #include #include "OpenSSLCipherStream/UTF8OpenSSLCipherInputStream.h" #include "Generic/common/UnexpectedInputException.h" #include "Generic/common/InternalInconsistencyExce...
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 <NAME> http://continuousphysics.com/Bullet/ 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 ...
// D O W N <NAME> H M A T T H E W A H N #include "station.h" #include "time.h" #include "assert.h" #include "algos.h" #include <fstream> // #include <istream> #include <string> #include <iostream> #include <cmath> #include <iostream> #include <sstream> #include "line.h" // Ahn'...
/******************************************************************************* * This file is part of the "Data structures and algorithms" course. FMI 2018/19 *******************************************************************************/ /** * @file example.cpp * @author <NAME> * @date 10.2018 * @brief ...
/***************************************************************************** Licensed to Accellera Systems Initiative Inc. (Accellera) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Accellera licenses...
#include <chrono> #include <thread> #include "PinHoleCamera.hpp" const static size_t DIR_SIZE = 8; const static short DIR[][2] = {{ -1, -1}, {0, -1}, {1, -1}, { -1, 0}, { -1, 1}, {1, 0,}, {0, 1}, {1, 1}}; void thread_pool_1stpass(mutex *mutex_w_h, unsigned short *w_t, unsigned short *h_t, unsigned short width, ...
#include <bts/application.hpp> #include <fc/io/json.hpp> #include <fc/reflect/variant.hpp> #include <fc/exception/exception.hpp> #include <fc/io/stdio.hpp> #include <fc/log/logger.hpp> #include <fc/io/fstream.hpp> #include <fc/thread/thread.hpp> #include <sstream> #include <fc/io/json.hpp> #include <iostream> using na...
// Nes_Emu 0.7.0. http://www.slack.net/~ant/ #include "Nes_File.h" #include "blargg_endian.h" /* Copyright (C) 2004-2006 <NAME>. This module 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 versio...
/* Copyright (c) 2016, <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 conditions and the following disclaimer...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ ...
#include "stdafx.h" //#include "PHdynamicdata.h" //#include "Physics.h" #include "level.h" #include "../xrEngine/x_ray.h" #include "../xrEngine/igame_persistent.h" #include "ai_space.h" #include "game_cl_base.h" #include "NET_Queue.h" #include "hudmanager.h" #include "../xrphysics/iphworld.h" #include "phcommander.h...
// // Copyright (C) 2007-2011 by Autodesk, Inc. // // This library is free software; you can redistribute it and/or // modify it under the terms of version 2.1 of the GNU Lesser // General Public License as published by the Free Software Foundation. // // This library is distributed in the hope that it will be use...
//Inspired from A Faster Algorithm for Betweenness Centrality paper. //Takes O(nm) and O(nm + n^2log n) time on unweighted and weighted networks. #include <iostream> #include <cstdio> #include <fstream> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <list> #include <cstrin...
/** * @file server.c * @author <NAME> (<EMAIL>) * @brief An oversimplified IRC server * @version 0.1 * @date 2022-03-20 * * @copyright Copyright (c) 2022 */ #include <iostream> #include <cstdlib> #include <cstring> #include <cerrno> #include <csignal> #include <sys/types.h> #include <sys/socket.h> #include <n...
#include "Protocol.hpp" #include <Arduino.h> uint8_t Protocol::GetCheckSum(uint8_t p_payload[PAYLOAD_SIZE]) { uint8_t checkSum = p_payload[0]; for(int i=1; i<4; ++i) { checkSum ^= p_payload[i]; } return checkSum; } bool Protocol::DecodeMessage(uint8_t p_payload[PAYLOAD_SIZE], uint8_t& p_le...
/* ** Copyright (C) 1996, 1997 Microsoft Corporation. All Rights Reserved. ** ** File: magazineIGC.cpp ** ** Author: ** ** Description: ** Implementation of the CmagazineIGC class. This file was initially created by ** the ATL wizard for the core object. ** ** History: */ // magazineIGC.cpp : Implementation...
#include <dana.h> #include <iostream> #include <variant> using namespace dana; void drawLines(const float x, const float y, Pencil& pencil) noexcept { pencil.save() .translate(x, y) .setAntiAlias(true) .setStrokeWidth(2) .beginPath() .setStrokeColor({255, 0, 0, 255}) .moveTo(10...
//SubTag DS TM W2 W6 #include "DS.hpp" template <int x> struct XG_1 : DS_Module { enum ParamIds { NUM_PARAMS }; enum InputIds { INPUT_A_1, INPUT_B_1 = x, NUM_INPUTS = x + x }; enum OutputIds { OUTPUT_1, NUM_OUTPUTS = x }; enum LightIds { NUM_LIGHTS }; XG_1() : DS_Module() { config(NUM_PARAMS...
#include "RecoEgamma/ElectronIdentification/interface/SoftElectronMVAEstimator.h" #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/GsfTrackReco/interface/GsfTrack.h" #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" #include "Common...
/* MIT License Copyright (c) 2021 <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, copy, modify, merge, publis...
////////////////////////////////////////////////////////////////////////////// // Copyright 2002-2006 <NAME> // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ////////////////////////////////////////////////////...
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vvi = vector<vi>; using ii = pair<int,int>; using vii = vector<ii>; using l = long long; using vl = vector<l>; using vvl = vector<vl>; using ll = pair<l,l>; using vll = vector<ll>; using vvll = vector<vll>; using lu = unsigned long long; usin...
// #include <stdio.h> // #include <unistd.h> // #include <string.h> // #include <sys/socket.h> // #include <arpa/inet.h> // #include <openssl/ssl.h> // #include <openssl/err.h> // #include <iostream> // //https://security.stackexchange.com/questions/90422/ssl-certificates-and-cipher-suites-correspondence // int crea...
#include "collate_custom_mode_api.h" #include "core/indexopts.h" using reindexer::Reindexer; const vector<string> sourceTable = {u8"Вася", u8"Johny", u8"Mary", u8"Иван", u8"Петр", u8"Emmarose", u8"Gabriela", u8"Антон", u8"1й Петр", u8"2й Петр", u8"3й Петр", u8"Maxwell", u8"Anthony", u8"1й Павел"...
#include <iostream> #include <string> #include <errno.h> #include "Connection.h" #include "EventLoop.h" #include "Timer.h" Connection::Connection(EventLoop* loop, int fd, bool timer_on) : _loop(loop), _socketfd(fd), _trigger(fd), _timer_on(timer_on), _peer_shutdown(false) { _socketfd.setTcpNoDel...
/* CmdInterpreter.cpp By <NAME> Jacobus Systems, Brighton & Hove, UK http://www.jacobus.co.uk Provided under the MIT license: https://github.com/jacobussystems/ArdJack/blob/master/LICENSE Copyright (c) 2019 <NAME>, Jacobus Systems, Brighton & Hove, UK Permission is hereby granted, free of charge, to any perso...
#include "DataFormats/Candidate/interface/Candidate.h" #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/Math/interface/deltaR.h" #include "DataFormats/RecoCandidate/interface/IsoDeposit.h" #include "DataFormats/RecoCandidate/interface/IsoDepositDirection.h" #include "DataFormats/TrackReco/interfac...
#include "mesh_generation/point_octotree.h" #include "mesh_generation/cross_field.h" #include <glm/gtc/matrix_transform.hpp> PointOctotree::PointOctotree(vector<vec3>& positions, const AABB& aabb) : positions(positions) { root = {}; free_payload = nullptr; init(root); root.aabb = aabb; last_vis...
/**************************************************************************** ** ** This file is part of the LibreCAD project, a 2D CAD program ** ** Copyright (C) 2010 <NAME> (<EMAIL>) ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved. ** ** ** This file may be distributed and/or modified under the terms of t...
#include <maxtest/blob_test.hh> #include <numeric> int test_longblob(TestConnections* Test, MYSQL* conn, char* blob_name, unsigned long chunk_size, int chunks, int rows) { int size = chunk_size; MYSQL_BIND param[1]; c...
/*! @file GlobalSettings.cpp @author <NAME> This file is part of the Xylasoft Lightrail product. Copyright (c) 2011 <NAME>, Xylasoft, All Rights Reserved http://www.xylasoft.com Licensed for use under the MIT License See accompanying LICENSE file for more information */ #include "GlobalSettings.h" #include "XLogger...
#include <kernel/gdt.h> #include <kernel/io.h> #include <stdio.h> idtdesc gdt::kidt[IDTSIZE]; /* IDT table */ int_desc gdt::intt[IDTSIZE]; /* Interruptions functions tables */ gdtdesc gdt::kgdt[GDTSIZE]; /* GDT */ void gdt::init_idt_desc(uint16_t select, uint32_t offset, uint16_t type, idtdesc *desc) { desc->of...
/* * Logger2.cpp * * Created on: 15 Jun 2012 * Author: thomas */ #include "Logger2.h" Logger2::Logger2(int width, int height, int fps, bool tcp) : dropping(std::pair<bool, int64_t>(false, -1)), lastWritten(-1), writeThread(0), width(width), height(height), fps(fps), logFi...
#include <iostream> #include <thread> #include <iomanip> #include <QDebug> #include <QtWidgets/QMessageBox> #include "mainwindow.h" #include "ui_mainwindow.h" /** * Constructor for a MainWindow instance * * USAGE: * MainWindow w; * * @param parent: QWidget* */ MainWindow::MainWindow(QWidget *parent) : ...
/******************************************************************************* * include/queries/bin_rank_popcnt.hpp * * Copyright (C) 2018 <NAME> <<EMAIL>> * * All rights reserved. Published under the BSD-2 license in the LICENSE file. ***************************************************************************...
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
#include "cvmatandqimage.h" #include "cvimagewidget.h" #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <QApplication> #include <QFileDialog> #include <QTabWidget> #include <QDebug> //We don't defined any custom classes in this example. QtOcv::ImageWidget *createImageWindow(const QIma...
#include "ofApp.h" using namespace YAMPE; using namespace P; //-------------------------------------------------------------- void ofApp::setup() { easyCam.setDistance(RANGE); // instantiate the ground ground.set(RANGE, RANGE); ground.rotate(90, 1,0,0); // lift camera to 'eye' leve...
/* ==================================================================== * The Vovida Software License, Version 1.0 * * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...
#include "pc.h" #include "Sound.h" Sound::Sound() { } void Sound::Release() { Stop(); if( pVoice ) pVoice->DestroyVoice(); } HRESULT Sound::PlayNQ(DWORD delay) { if( isPlaying() ) return E_FAIL; return Play(delay); } HRESULT Sound::PlayNQ() { if( isPlaying() ) return E_FAIL; return Play...
#include "rip.h" #include <stdio.h> #include <string.h> #include "checksum.h" #include "lookup.h" #include "board.h" #include "myip.h" #include "icmp.h" #include "mac.h" using namespace std; #define DEBUG 0 // when testing, you can change 30s to 5s //timer for sending routing table #define TIMER_SRT 5 extern bool ...
/*========================================================================= Program: Visualization Toolkit Module: TestIOADIOS2VTX_VTU2DRendering.cxx ------------------------------------------------------------------------- Copyright 2008 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 ...
#include<iostream> #include<process.h> #include<stdio.h> #include<cstring> #include<stdlib.h> using namespace std; class treenode { treenode* leftchild; int data; treenode* rightchild; public: treenode(int element=0) { data=element; leftchild=NULL; rightchild=NULL; } treenode* insert(int,treenode*); voi...
// SPDX-FileCopyrightText: 2022 <NAME> <EMAIL> // SPDX-License-Identifier: Apache-2.0 #include <cstdlib> #include <functional> #include <iostream> #include <fstream> #include "quicklistclient.h" #include <pwd.h> #include <grp.h> #include "log.h" using std::string; using std::ifstream; using std::ofstream; using std:...
#include "controlled_dfs_algorithm.h" #include "graph/graph.h" #include "functions.h" #include "colors.h" #include <graph/node.h> #include <graph/edge.h> const int DFS_STATE_INIT = 1; const int DFS_STATE_NEW_NODE_SELECTED = 2; const int DFS_STATE_ADJACENT_NODES_UPDATED = 3; const int NODE_STATE_UNKNOWN = 0; co...
#include <stdio.h> #include "ali_api_core.h" #include "ali_string_utils.h" #include "ali_ocs.h" #include "json/value.h" #include "json/reader.h" using namespace aliyun; namespace { void Json2Type(const Json::Value& value, std::string* item); void Json2Type(const Json::Value& value, OcsDescribeInstancesOcsInst...
#include <SDL.h> #include <vector> #include "Scene6.h" #include "Debug.h" #include "Camera.h" #include "Skybox.h" #include "GameObject.h" #include "ObjLoader.h" #include "Mesh.h" #include "Shader.h" #include "MMath.h" #include "glm/gtc/type_ptr.hpp" #include "GameSceneManager.h" #define VERT "Shaders/Vert.glsl" #defin...
/* Portions copyright (c) 2006-2016 Stanford University and Simbios. * Contributors: <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 l...
#include "Mat3.h" #include <algorithm> Mat3::Mat3() { a12 = a13 = 0.f; a21 = a23 = 0.f; a31 = a32 = 0.f; a11 = a22 = a33 = 1.f; } Mat3::Mat3( float a11_, float a12_, float a13_, float a21_, float a22_, float a23_, float a31_, float a32_, float a33_) { a11 = a11_; a12 = a12_; a13 = a13...
/** \file * * $Date: 2010/02/03 16:58:24 $ * $Revision: 1.10 $ * \author <NAME> */ #include <IORawData/DTCommissioning/plugins/DTSpyReader.h> #include <IORawData/DTCommissioning/plugins/DTFileReaderHelpers.h> #include <DataFormats/FEDRawData/interface/FEDHeader.h> #include <DataFormats/FEDRawData/interface/FE...
#include "editorstyle.h" #include <QPainter> #include <QStyleOption> #include <iostream> void EditorStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *widget) const { int x, y, width, height; opt->rect.getRect(&x, &y, &width, &height); switch(pe) { case...
#include "App.h" #include "PathFinding.h" #include "Defs.h" #include "Log.h" PathFinding* PathFinding::instance = nullptr; PathFinding* PathFinding::GetInstance() { if (instance == nullptr) instance = new PathFinding(); return instance; } PathFinding::PathFinding() : map(NULL), width(0), height(0) { //name.Creat...
#include<bits/stdc++.h> // #pragma GCC optimize("Ofast") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define MOD 163577857 #define MAX 1000005 #define ll long long #define sd(t) scanf("%d",&t) #define pd(t) printf("%d\n",t) using namespace std; ll power(ll a,ll b,ll m){ ll x=1%m...
#include <iostream> #include <string> #include "GTUSetBase.h" #include "GTUSet.h" #include "GTUSet.cpp" #include "GTUMap.h" #include "GTUMap.cpp" #include "Node.h" using namespace std; using namespace DurakliEfkanSetAndMap; template<class T> shared_ptr<GTUSetBase<T> > setIntersection (const GTUSetBase<T>&, const GTUSe...
/* * Copyright (c) 2021, Intel Corporation * * 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 <errno.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <signal.h> #include <sys/time.h> #include <fcntl.h> #include <string> #include <map> #include <vector> #include <iostream> #include <unistd.h> #include <chrono> #include <functional> #include <memory> #include <string> #include "rclc...
/* * Legal Notice * * This document and associated source code (the "Work") is a part of a * benchmark specification maintained by the TPC. * * The TPC reserves all right, title, and interest to the Work as provided * under U.S. and international laws, including without limitation all patent * and trademark rig...
#include "eventmodel.h" #include <QSqlError> #include <QSqlQuery> #include <QDebug> #include <QStandardPaths> #include <QDir> #include <QDateTime> EventModel::EventModel() { //createConnection(); } QList<QObject*> EventModel::eventsForDate(const QDate &date) { QList<QObject*> events; QSqlQuery query; ...
//@HEADER // *************************************************** // // HPCG: High Performance Conjugate Gradient Benchmark // // Contact: // <NAME> ( <EMAIL>) // <NAME> (<EMAIL>) // <NAME> (<EMAIL>) // // *************************************************** //@HEADER /*! @file OptimizeProblem.cpp HPCG routin...
#include "VirtualKeyboard.h" #include "Keyboard.h" #include "KeyMap.h" #include "KeyTable.h" #include <iostream> #include <signal.h> #include <string> #include <vector> #include <cstring> #include <linux/input.h> #include <sys/stat.h> #include <dirent.h> #include <unistd.h> #include <fcntl.h> bool running = true; vo...
/** * Copyright (c) 2019 Horizon Robotics. All rights reserved. * @file main.cpp * @brief * @author ruoting.ding * @email <EMAIL> * * * */ #include <signal.h> #include <unistd.h> #include <malloc.h> #include <iostream> #include <memory> #include <sstream> #include <string> #include "json/json.h" // #include...
#include <Utopia/Editor/Core/Systems/FrameGraphVisualizerSystem.h> #include <Utopia/Editor/Core/Components/FrameGraphVisualizer.h> #include <Utopia/Render/DX12/FrameGraphVisualize.h> namespace ed = ax::NodeEditor; static constexpr size_t offset_write_pin = 1; static constexpr size_t offset_read_pin = 2; static cons...
/****************************************************************************** * Copyright 2020 ETC Inc. * * 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/l...
#include <cmath> #include <valarray> #include "ParsysView.hpp" #include "Observer.hpp" /** * @brief Stylizes a given particle according to its role in the game (whether * smaller and hence to be absorbed, bigger and thus a menace, or the moving * particle). */ static void particleDecoration( CircleShape &target,...
#include "mys.hpp" namespace core_fiber { struct SchedulerFiber { enum State { CURRENT = 0, RESUMED, READY, SUSPENDED }; std::shared_ptr<Fiber> m_fiber; uv_thread_t thread; uv_cond_t cond; SchedulerFiber *next_p; int prio; State state; SchedulerFib...
// File Name: 500.cpp // Author: YangYue // Created Time: Tue Jul 22 19:26:51 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...
//真实感图形绘制 #include <stdlib.h> #include <GL/glut.h> GLfloat vertices[][3] = {{-1.0, -1.0, -1.0}, {1.0, -1.0, -1.0}, {1.0, 1.0, -1.0}, {-1.0, 1.0, -1.0}, {-1.0, -1.0, 1.0}, {1.0, -1.0, 1.0}, {1.0, 1.0, 1.0}, {-1.0, 1.0, 1.0}}; static GLfloat theta[] = {0.0, 0.0, 0.0}; static GLint axis = 2; static GLdouble viewer[] = {0....
/* * Copyright (c) 2017 RIKEN * All rights reserved * * The license below extends only to copyright in the software and shall * not be construed as granting a license to any other intellectual * property including but not limited to intellectual property relating * to a hardware implementation of the functionali...
// vim:set ts=4 sw=4 et: // #include <cstdio> #include <cassert> #include <cstring> #include <cstdlib> #include <iostream> #include <list> #include <boost/chrono.hpp> #include <boost/format.hpp> #include <unistd.h> class passe_temps { typedef boost::chrono::high_resolution_clock hr_clock; struct element ...
#include <iostream> #include <sstream> #include <string> using std::string; using std::stringstream; using std::getline; using std::cout; using std::end; using std::endl; #include "roster.h" //parses the student data void Roster::parse(string data) { stringstream ss(data); //the values which will con...
#include <iostream> #include <map> #include "chaincomplex.hpp" #include "debug/debug.hpp" /*! \file hochschild_test.cpp * In this test, the program computes the Hochshild homology of the ring Z[x]/(x-1)^n. * As it is isomorphic to Z[x]/(x)^n, the result can be found in pp.304 Exercise 9.1.4 in [Weibel1994]. * Name...
#include <BLEDevice.h> #include <BLEServer.h> #include <BLEUtils.h> #include <BLE2902.h> #include <Arduino.h> #include "globals.h" #define CYCLING_POWER_SERVICE_UUID "00001818-0000-1000-8000-00805F9B34FB" #define POWER_CHARACTERISTIC_UUID "00002A63-0000-1000-8000-00805F9B34FB" #define SENSORPOS_CHARACTERISTIC_UUID "00...
/** Copyright (C) 2018 <NAME> and <NAME> This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details. */ #include "BondInfo.h" //------------------------------------------------------------------------------ //! Constructor BondInfo::BondInfo() { } //-------...
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved #include <cassert> #include <set> #include <string> #include <vector> #include <nlohmann/json.hpp> #include <glog/logging.h> using namespace std; using json = nlohmann::json; class Formatter { public: const string& formatRequest(const string&...
//===- unittests/http/test_query_to_kvp.cpp -------------------------------===// //* _ _ * //* __ _ _ _ ___ _ __ _ _ | |_ ___ | | ____ ___ __ * //* / _` | | | |/ _ \ '__| | | | | __/ _ \ | |/ /\ \ / / '_ \ * //* | (_| | |_| | __/ | | |_| | | ||...
#include <stdio.h> #include <string.h> #include <X11/Xlib.h> #include <X11/Xutil.h> #include <local_types.h> #include <list.h> #include <xfontpair.h> #include <widget.h> #include <button.h> #include <check.h> #include <tile.h> #include <message.h> #include <icon.h> #include <scrollbar.h> #include <skkserv.h> #include ...
/* * (C) 2009 <NAME> * * Distributed under the terms of the Botan license */ #include <botan/botan.h> #if defined(BOTAN_HAS_COMPRESSOR_BZIP2) #include <botan/bzip2.h> #endif #if defined(BOTAN_HAS_COMPRESSOR_ZLIB) #include <botan/zlib.h> #endif #include <iostream> #include <fstream> using namespace Botan; #inc...
#include "TftTouch.h" #include "utilities/logging.h" volatile bool has_new_touch = false; void handle_interrupt() { has_new_touch = true; } TftTouch::TftTouch(uint8_t int_pin, uint8_t rst_pin) { interrupt_pin = int_pin; reset_pin = rst_pin; } void TftTouch::init() { Serial.println("Setting touchscr...
#include "GameWindow.h" bool draw = false; char scoreText[1000005]; const char *title = "Final Project Team 62"; // ALLEGRO Variables ALLEGRO_DISPLAY* display = NULL; ALLEGRO_SAMPLE *song=NULL; ALLEGRO_SAMPLE_INSTANCE *sample_instance; ALLEGRO_FONT *score_font = NULL; int compare(const void *a, const void *b) { i...
// ====================================================================== /*! * \file * \brief Regression tests for namespace Hints */ // ====================================================================== #include "Hints.h" #include "Missing.h" #include "Traits.h" #include <regression/tframe.h> #include <iostre...
//#include <windows.h> #include <stdio.h> #include <string.h> #include "types.h" #include "surface.h" #include "bmpfile.h" typedef Uint8 BYTE; typedef Uint16 WORD; typedef Uint32 DWORD; typedef Int32 LONG; #define BI_RGB 0L #define BI_RLE8 1L #define BI_RLE4 2L #define BI_BITFIELDS...
#include "aurora.h" #define NO_TOUCH_POSITION TSPoint() #define X_AXIS_RESISTANCE 230 #define PIN_TOUCHPAD_YP A4 #define PIN_TOUCHPAD_XM A5 #define PIN_TOUCHPAD_YM 7 #define PIN_TOUCHPAD_XP 6 #define GRID_SIZE_X 5 #define GRID_SIZE_Y 2 #define STEP_SIZE 9 #define X_AXIS_VALUE_LOWER_BOUND 90 #define X_AXIS_VALUE_UP...