text
stringlengths
8
6.88M
#include "stdafx.h" #include "Game.h" #include "Engine.h" #include "NewGame.h" //#define OLDGAME int main(int argc, char *argv[]) { if ( gEngine.Init() ) { #ifdef OLDGAME gGame.Init(); #else NewGame game; game.Init(); #endif while ( !gEngine.IsExit() ) { gEngine.Update(); #ifdef OLDGAME gGame.Upda...
#include <UECS/EntityFilter.h> using namespace Ubpa::UECS; EntityFilter::EntityFilter() : allHashCode{ TypeID<EntityFilter> }, anyHashCode{ TypeID<EntityFilter> }, noneHashCode{ TypeID<EntityFilter> }, combinedHashCode{ hash_combine(std::array<size_t, 3>{TypeID<EntityFilter>, TypeID<EntityFilter>, TypeID<EntityF...
#pragma once #include <map> #include <string> class SensorParameter { public: enum class SensorType { PHONE_GYROSCOPE, PHONE_ACCELEROMETER, AX3_ACCELEROMETER, LOCATION, GPS_LOC }; static std::map<std::string, SensorType> mapping; static constexpr const char* DEFAULT_TYPE_STRING = "ax3";...
// I write a code that cannot slove the unique issue. // If I use a set to filter the result, then it cause time out. The attached is my code without "unique" property class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(), nums.end()); vector<vector<int>> res; ...
#include <Arduino.h> #include <WiFi.h> // #include "wolfssl/wolfcrypt/srp.h" // #include <Crypto.h> #include <os.h> #include "utils/srp.h" #include "utils/tlv.h" #include "mdns.h" #include "esp_wifi.h" //this include is in gitignore, store security credentials there #include "access/access.h" #include "freertos/FreeRT...
#pragma once #include <tudocomp/config.h> #ifdef STXXL_FOUND #include <tudocomp_stat/StatPhaseExtension.hpp> #include <stxxl/bits/io/iostats.h> namespace tdc { class STXXLStatExtension : public StatPhaseExtension { private: static stxxl::stats* s_stats; static inline stxxl::stats_data sample() { r...
/*! * \file KaiXinApp_GardenList.cpp * \author GoZone * \date * \brief 解析与UI: 偷菜 * * \ref CopyRight * =======================================================================<br> * Copyright ? 2010-2012 GOZONE <br> * All Rights Reserved.<br> * The file is generated by Kaixin_Component Wiza...
//#define NDEBUG #include <cassert> #include <utilities.h> #include "MP3Tasks.h" int main(void) { /// This "stack" memory is enough for each task to run properly (512 * 32-bit (4 bytes)) = 2Kbytes stack const uint32_t STACK_SIZE_WORDS = 0x00000200; assert(sd->Init() && audio->Init() && Init_MP3_GPIO_Inte...
//$Id: GmatODType.cpp 1398 2013-06-04 20:39:37Z tdnguyen $ //------------------------------------------------------------------------------ // GmatODType //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool // // Copyright ...
#ifndef SOXIPNEHE3DWORLDLOADER_H #define SOXIPNEHE3DWORLDLOADER_H #include <Inventor/engines/SoSubEngine.h> #include <Inventor/fields/SoSFString.h> #include <Inventor/fields/SoMFVec3f.h> #include <Inventor/fields/SoMFvec2f.h> #include <Inventor/fields/SoMFUInt32.h> #include <string> #include <vector> class SoXipNehe...
#pragma once #include <mutex> #include <list> #include "misc.h" #include "notification.h" #include "team.h" #include "network.h" struct User { static const uint32_t kNotificationQueueSize = 32; User() = delete; User(const std::string& name, const std::string& password, Team* team); Team* GetTeam(); ...
/** * @file ResourceZipFile.h */ #pragma once #include "IResourceFile.h" #include "Compression/ZipFile.h" namespace liman { class ResourceZipFile : public IResourceFile { ZipFile* m_pZipFile; std::string m_fileName; public: explicit ResourceZipFile(std::string &resFileName) { m_pZipFile = nullptr; ...
#include "startTimer.h" void startTimer::Timer(const uint16_t duration) { // mode CTC du timer 1 avec horloge divisée par 1024 // interruption après la durée spécifiée TCNT1 = 0; // initialise le timer a 0 OCR1A = duration; // La valeur TOP jusque laquelle le TCNT1 doit compter TCCR1A = (1<< WGM12); // Timer/Co...
#pragma once #include "core/RayHitStructs.h" #include "core/Shape.h" #include "math/geometry.h" namespace rt { class Sphere : public Shape { public: // // Constructors // Sphere(Vec3f center, float radius); ~Sphere(); // // Functions that need to be implemented, since Sphere is a sub...
#include "iterator.h" void Iterator::init(void* ptr) { } void Iterator::init(void* ptr, int(*compare)(unsigned char* key, int key_size, unsigned char* value, int value_size), unsigned char* key, int key_size, std::string data_path) { }
#ifndef _HS_SFM_BUNDLE_ADJUSTMENT_CAMERA_SHARED_NOISED_Y_GENERATOR_HPP_ #define _HS_SFM_BUNDLE_ADJUSTMENT_CAMERA_SHARED_NOISED_Y_GENERATOR_HPP_ #include <cmath> #include "hs_math/random/normal_random_var.hpp" #include "hs_sfm/bundle_adjustment/camera_shared_vector_function.hpp" #include "hs_sfm/bundle_adjustment/ca...
// inspired by http://www.lighthouse3d.com/tutorials/view-frustum-culling/ #include "FrustumCull.h" void FrustumCull::setCamInternals(float angle, float ratio, float nearD, float farD) { this->ratio = ratio; this->angle = angle; this->nearD = nearD; this->farD = farD; tang = (float)tan(glm::radians(angle) * 0.5...
#include "common/Compiler.h" #include "common/FastRand.h" #include "common/WorkloadSim.h" #include <benchmark/benchmark.h> #include <sstream> #include <system_error> namespace FwdVoidErrorCode { template <int N> ATTRIBUTE_NOINLINE std::error_code IMPL_FwdVoidErrorCode(int gt10) noexcept { gt10 = workload(gt10); ...
#ifndef TXPacket_hpp #define TXPacket_hpp #include <stdint.h> #include <mutex> #include <bitset> class TXPacket { public: TXPacket(); uint16_t get_header(); void set_vel_x(int8_t vel_x); int8_t get_vel_x(); void set_vel_y(int8_t vel_y); int8_t get_vel_y(); void set_vel_z(int8_t vel_z); int8_t get_vel_z(); v...
#include <iostream> #include <algorithm> #include <ctime> using namespace std; std::string deleteMarks(string& des, char x) { des.erase(remove(des.begin(), des.end(), x), des.end()); return des; } bool checkDateIsExpired(std::string date, std::string startDate, std::string endDate) { int diffStart = 0, diffEnd =...
/** * \file ChildView.cpp * * \author PaulaRed */ #include "pch.h" #include "DoubleBufferDC.h" #include "framework.h" #include "Towers2020.h" #include "ChildView.h" #include "Game.h" #include "Level.h" #include "ImageMap.h" #include <memory> #ifdef _DEBUG #define new DEBUG_NEW #endif using namespace Gdiplus; u...
#include "AppContext.h" std::string AppContext::get_current_space_name() { return current_space_name; } void AppContext::set_current_space_name(std::string &value) { current_space_name = value; } std::string AppContext::get_current_variable_name() { return current_variable_name; } void AppContext::set_c...
// Include required header files from OpenCV directory #include "opencv2/core.hpp" #include "opencv2/face.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <map> #include <iostream> #include <fstream> #include <sstream> #include <regex> #include "/usr/local/include/opencv2/objdetect.hpp" #in...
#include <ESP8266WiFi.h> #include <mDNSResolver.h> #include <WiFiUdp.h> #include <ArduinoOTA.h> #include <PubSubClient.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <ArduinoJson.h> #include <Wire.h> #include <EEPROM.h> #include <math.h> #include <vector> #define UNUSED(x) (void)x //#define SERIA...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once WINRT_EXPORT namespace winrt { namespace ABI::Windows::ApplicationModel::SocialInfo { struct ISocialFeedChildItem; struct ISocialFeedContent; struct ISocialFeedItem; struct ISocialFeedShared...
#pragma once #include<string> #include<iostream> class Student { private: std::string name; int score; public: Student(std::string name="", int score=0) { this->name = name; this->score = score; } friend std::ostream& operator<<(std::ostream& out, Student& student) { out << "name : " << student.name << ", "...
#include <iostream> #include <vector> #include <deque> #include <list> #include <set> #include <map> #include "easyfind.hpp" int main(void) { //vector std::vector<int> vect(10); int value = 2; std::fill(vect.begin(), vect.end(), value); std::vector<int>::iterator found = easyfind(vect, 2); i...
#pragma once #include <cryptopp/osrng.h> #include <array> #include "Network.h" typedef std::array<byte, CryptoPP::AES::DEFAULT_KEYLENGTH> AESKey; AESKey generateKey(CryptoPP::AutoSeededRandomPool& rng); void save_key(AESKey& aes_key, PublicKey& publicKey, CryptoPP::AutoSeededRandomPool& rng); void encrypt_file(const...
#include <cstring> #include "Utility.hpp" bool shiku::Utility::IsEndsWith(const char *str, const char *suffix) { int len1 = strlen(str); int len2 = strlen(suffix); if(len1 < len2) return false; for(int i = 1; i <= len2; ++i) if(str[len1 - i] != suffix[len2 - i]) return false; return true; } uint32_t shiku::...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; using ll = long long int; typedef pair <int,int> PII; typedef pair <ll,ll> PLL; #define F first #define S...
#include "hierarchy_node.hh" #include <unistdx/base/make_object> std::ostream& bsc::operator<<(std::ostream& out, const hierarchy_node& rhs) { return out << sys::make_object( "socket_address", rhs.socket_address(), "weight", rhs.weight() ); }
#include<iostream> #include<cstring> using namespace std; const int MAX_SIDE_NUMBER=100000; const int MAX_POINT_NUMBER=100000; class node { public: int id; node *side[MAX_SIDE_NUMBER]; double cost[MAX_SIDE_NUMBER]; int sideCount; }; node *points[MAX_POINT_NUMBER]; int n,m; void CreatePoint(int id) { points[id]...
#ifndef DeviceNTP_h #define DeviceNTP_h #include "Arduino.h" #include "../ArduinoJson/ArduinoJson.h" #include "RemoteDebug.h" #include "Udp.h" #include "WiFiUdp.h" #define SEVENZYYEARS 2208988800UL #define NTP_PACKET_SIZE 48 #define DEVICE_NTP_SET_UPDATE_CALLBACK_SIGNATURE std::function<void(bool, bool)> #define DE...
#include <iostream> #include <algorithm> #include <vector> long long modul = 1e7 + 7; long long result = 0; void dfs(std::pair<long long, long long> pair, std::vector<std::pair<long long, long long>> *g, long long *sum, long long *temp) { temp[pair.first] = 1; for (size_t i = 0; i < g[pair.first].size(); i++)...
/* * Copyright 2016-2017 Flatiron Institute, Simons Foundation * * 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 ...
#ifndef _TEST_APP #define _TEST_APP #include "ofMain.h" #include "ofxSyphon.h" class testApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void serverAnnounced(ofxSyphonServerDirectoryEventArgs &arg); void serverUpdated(ofxSyphonServerDirectoryEventArgs...
#pragma once #include <vector> #include <iostream> #include <list> #include <memory> #include <random> #include <exception> #include <algorithm> #include <fstream> using namespace std; string createRandomString(int64_t len, int64_t alphabetSize, int64_t seed); bool addBit(vector<bool> &bits); string toString(vector<bo...
#ifndef INSTRUCOES_H #define INSTRUCOES_H #include <allegro.h> class Instrucoes { private: BITMAP* buffer; BITMAP* bmp; float pos_x; float pos_y; public: Instrucoes(); virtual ~Instrucoes(); void Set_instrucoes(BITMAP* buffer, BITMAP* bmp); void Exec...
#include "thread.h" #include <iostream> #include <Windows.h> //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= extern bool test_mode; base::thread::thread() : _handle(0) {} //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= base::thread::~thread() {} ...
#include <SoftwareSerial.h> #include <ArduinoJson.h> SoftwareSerial SIM900(3, 5); // configure software serial port int SittingRoom = 8; int Bedroom = 10; int Security = 11; char buffer[80]; byte pos = 0; //resetting the buffer here void resetBuffer() { memset(buffer, 0, sizeof(buffer)); pos = 0;...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "hlist.h" #include "components.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } bool explore(S_expr* list1, S_expr* list2, string & resul...
#include <iostream> #include <string> #define M 34943 using namespace std; int main() //本题处理 的数太大了,不可以直接处理,需要用大数的处理方法 { string s; int len; long long ans; while(getline(cin,s)) { ans=0; len=s.length(); if(len == 0) { cout << "00 00" << endl; continue; } ...
#include <jni.h> #include <string> #include "opencv2/opencv.hpp" #include <opencv2/highgui/highgui.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <cstddef> using namespace cv; extern "C" JNIEXPORT void Java_com_example_ndktest2_MainActivity_StereomMatching(JNIEnv *env,jobject, jint width, jint height, jbyteArray...
//************************************************************************** //** //** See jlquake.txt for copyright info. //** //** 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 ...
#include <Arduino.h> /** * @name Stepper by hand * @desc How to drive a stepper motor without library. * * @package Arduino Basics * @author Michael <michael@zenbox.de> * @since 2017/01/05 * @version v1.0.0 * @copyright (c) 2017 Michael Reichart * @license MIT License <http://opensource.org/licenses/MIT> */ ...
#include <cstdio> int main(void){ for (int i = 1; i <= 32; ++i){ printf("%d\n", (i & (i - 1)) == 0); } return 0; }
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #include<conio.h> int main() { printf("\n"); char p[10], q[10]; printf(".......................Welcome to Tic Tac Toe game:.....................\n\n"); printf("Player 1 enter your name : "); scanf("%s", p); printf("Player 2 enter your name : ");...
#include "qmlclientstate.h" using namespace secure_voice_call; QMLClientState::QMLClientState(QObject *parent) : QObject(parent) { } QMLClientState::ClientStates QMLClientState::getState() const { return mClientState; } QMLClientState &QMLClientState::getInstance() { static QMLClientState instance; return i...
#ifndef __LOADSHADER_MAT_H__ #define __LOADSHADER_MAT_H__ #include <glad/glad.h> #include <GLFW/glfw3.h> #include <iostream> static char* readShaderSource(const char* shaderFile); int loadShader(const char* vShaderFile, const char* fShaderFile); #endif
//Visitor.cpp #include "Visitor.h" Visitor::Visitor() { } Visitor::~Visitor() { } Visitor::Visitor(const Visitor& source) { } Visitor& Visitor::operator=(const Visitor& source) { return *this; } void Visitor::Visit(Page *page) { } void Visitor::Visit(Memo *memo) { } void Visitor::Visit(Line *line) { } v...
/* * Copyright (C) 2007-2015 Frank Mertens. * * Use of this source is governed by a BSD-style license that can be * found in the LICENSE file. * */ #include <signal.h> #include <flux/SignalMaster> namespace flux { Ref<SignalMaster> SignalMaster::create(SignalSet *listenSet, SignalSet *terminationSet) { ret...
class Solution { public: bool wordBreak(string s, vector<string>& wordDict) { unordered_set wordSet(wordDict.begin(), wordDict.end()); vector<int> memo(s.size(), -1); // initial memo[] return wordBreak(s, wordSet, 0, memo); } bool wordBreak(string s, unordered_set<string> & wordSet, ...
// github.com/andy489 #include <iostream> using namespace std; void merge(int *arr, int l, int mid, int r) { unique_ptr<int[]> l_arr(new int[mid - l + 1]); unique_ptr<int[]> r_arr(new int[r - mid]); memcpy(l_arr.get(), arr + l, sizeof(int) * (mid - l + 1)); memcpy(r_arr.get(), arr + mid + 1, sizeof(...
#pragma once #include "MenuPage.hpp" class MenuPageError : public MenuPage { private: std::string message; public: MenuPageError(StateManager& manager, nk_context* nk); MenuPageError(const MenuPageError& orig) = delete; virtual ~MenuPageError(); virtual void updateContent(); void setMessage(const std::string &...
#pragma once #include <iostream> #include <stdint.h> #include <fstream> #include <sstream> #include <vector> #include <limits> #include <stack> #include <map> #include <set> #include "IOperand.h" #include "Creator.h" #define MAX_PRECISION 308 #define COUNT_NUM_INT 15 #define MAX_COUNT_NUM 800 #define MIN_SIZE_FOR...
/** * Network server */ #ifndef FISHY_NET_SERVER_H #define FISHY_NET_SERVER_H #include "net_common.h" #include <CORE/BASE/status.h> #include <CORE/MEMORY/blob.h> #include <CORE/UTIL/noncopyable.h> namespace core { namespace net { class iNetServer; /** * Data handler called from {@link iNetServer#update} */ cla...
int peak(vector<int> &a,int l,int h) { int n=a.size(); int m=l+(h-l)/2; if((m==0 or a[m-1]<a[m]) and (m==n-1 or a[m]>a[m+1])) return m; else if(m!=0 and a[m-1]>a[m]) return peak(a,l,h-1); else if(m!=n-1 and a[m]<a[m+1]) return peak(a,m+1,h); } int incBinarysearch(vector<int> ...
#include <bits/stdc++.h> using namespace std; class Solution { public: int threeSumClosest(vector<int>& nums, int target) { sort(nums.begin(),nums.end()); int min_distance=10000; int closet=0; int ssize=nums.size(); for(int i=0;i<ssize;i++){ in...
#pragma once #include <map> #include "Animation.h" #include "AnimationMap.h" using namespace std; class AnimationMap { public: AnimationMap(void); ~AnimationMap(void); void addAnimation(string name, Animation animation); void deleteAnimation(string name); Animation * getAnimation(string name); void rename(string...
/* * SPDX-FileCopyrightText: 2008 Till Harbaum <till@harbaum.org> * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include "osm.h" #include <osm2go_platform.h> struct appdata_t; struct project_t; class settings_t; bool osm_download(osm2go_platform::Widget *parent, project_t *project); void osm_up...
#include "common/WorkloadSim.h" #include <benchmark/benchmark.h> #include <numeric> #include <vector> // Measure runtime and noise ratio of workload simulation void BM_100xWorkloadBindConst(benchmark::State &state) { while (state.KeepRunning()) { int i = 100; do { workload(0); } while (--i != 0);...
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int minPrice = INT_MAX; int maxprofitValue = 0; for(auto price : prices) { minPrice = min(minPrice,price); ma...
#pragma once class RShaderBase; class BViewport; class RRenderTarget; class BRenderingBatch; class RMaterial; class BRenderPassResource { public: BRenderPassResource(); ~BRenderPassResource(); unsigned int RenderTargetWidth; unsigned int RenderTargetHeight; RRenderTarget* m_BaseSceneRT; vo...
#ifndef SUDOKUSOLVER_H #define SUDOKUSOLVER_H #include <QWidget> class SudokuWidget; class SudokuSolver : public QWidget { Q_OBJECT public: SudokuSolver(QWidget *parent = Q_NULLPTR); private slots: void onSolve(); void onClear(); void onOpen(); bool solutionFound(const std::vector<std::vector<short>>&) const...
class Solution { public: bool search(vector<int>& nums, int target) { int end = nums.size()-1; int begin = 0; while(begin < end) { int mid = (begin + end)/2; if(nums[mid] == target) return true; if(nums[mid] == nums[begin]) { ...
#include "Purchase.h"
#include<bits/stdc++.h> #define fastio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) using namespace std; int main(){ fastio; int N; cin>>N; int vet[N]; for(int i=0;i<N;i++) cin>>vet[i]; sort(vet,(vet+N)); for(int i=0;i<N;i++) cout<<vet[i]<<" "; cout<<"\n"; return 0; }
#include "UscxmlClibExtensions.h" #include "uscxml/util/DOM.h" #include <xercesc/dom/DOM.hpp> #include "UscxmlClibBase.h" namespace uscxml { /* GlobalDataIOProcessor */ GlobalDataIOProcessor::GlobalDataIOProcessor(ScxmlBase *AScxmlBase) : _ScxmlBase(AScxmlBase) { } void GlobalDataIOProcessor::eventFromSCXML(co...
#ifndef RPEMONI_h #define RPEMONI_h #include <Arduino.h> #include "CircularBuffer.h" #include "EmonLib.h" #define RP_KWH_VAR V_VAR2 class RpEmonI : public RpSensor { public: RpEmonI(byte pin); void setup(); void presentation(); void loop_1s_tick(); void receiveCReq(const MyMessage &message); void ...
// // Maze.hpp // teensyMicromouse // // Created by Yikealo Abraha on 4/23/17. // Copyright © 2017 Yikealo Abraha . All rights reserved. // #ifndef Maze_hpp #define Maze_hpp #include <stdio.h> #include <unordered_map> #include <vector> #include <queue> #include <math.h> //To be removed later here just for debu...
// \file SliceTiming.cpp #include <cstdio> #include <ctime> #include <vector> #include <type_to_vector/SliceMatcher.hpp> using namespace type_to_vector; struct Test { std::string name; StringVector slices; StringVector places; int n; // amount of runs int m; // amount of slicing run double...
#include <iostream> using namespace std; const int size = 3; void printArr(int *arr, int arrSize) { for(int i = 0; i<= arrSize; ++i) { cout << arr[i]<< '\t'; } cout << endl; } void printVariations(int *arr, int n, int start=0) { if (start==n) { printArr(arr, n); return; } // printVariations(arr, n-1...
#include "animations\Singularity.Animations.h" namespace Singularity { namespace Animations { struct Keyframe { #pragma region Variables int JointIndex; int FrameNumber; Vector3 Translation; Quaternion Rotation; Vector3 Scale; Vector4 RotTanX; //Do we need these last bi...
#include "animations\Singularity.Animations.h" namespace Singularity { namespace Animations { struct AnimationState { public: #pragma region Variables float ElapsedTime; float Speed; #pragma endregion #pragma region Constructors and Finalizers AnimationState(float elaps...
#ifndef EXAMPLE_WORLD_H #define EXAMPLE_WORLD_H #include "engine/input.h" #include "engine/camera.h" #include "opengl/renderer.h" #include "prefab/ground.h" #include "point_cloud.h" namespace example { class World final { public: World(); void init(int window_width, int window_height); void update(float tim...
#define BOOST_TEST_MODULE "dsn::lambda_unique_ptr" #include <dsnutil/lambda_unique_ptr.hpp> #include <iostream> #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE(basic_lambda_unique_ptr) { using ptr_type = dsn::lambda_unique_ptr<void>; bool free_executed{ false }; { ptr_type ptr(malloc(10...
/* * File: main.cpp * Author: dan * * Created on November 20, 2012, 4:53 PM */ #define HOMEADV 3 #define MAX 1000 #define GAMES 475 #define CHOP 100 #define START 0 #define FIL "predmar7-1.csv" #include <cstdlib> #include <cstring> #include <iostream> #include <fstream> #include <cmath> #include "game.h" #inclu...
#include "souvpurchases.h" #include <iomanip> #include <fstream> #include <sstream> #include <limits> #include <ios> #include <qdebug.h> //creates a souvenir class based on the text file souvenirInfoList.txt souvPurchases::souvPurchases() { std::ifstream inFile; inFile.open("C:/Users/gdfgdf/Documents/findingnem...
/* Copyright 2017-2018 All Rights Reserved. * Gyeonghwan Hong (redcarrottt@gmail.com) * * [Contact] * Gyeonghwan Hong (redcarrottt@gmail.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 Li...
/*----------------------------------------------------------------------- Matt Marchant 2015 - 2016 http://trederia.blogspot.com Robomower - Zlib license. 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 thi...
#include "Network.h" namespace Network { Network::Network(bool isServer) :m_IsServer(isServer) { if (m_IsServer) { if (WSAStartup(MAKEWORD(2, 2), &m_WSA) != 0) { printf("Failed. Error Code : %d", WSAGetLastError()); exit(EXIT_FAILURE); } if ((m_Socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) ==...
#include <irtkTransformation.h> //#include <nr.h> #include <gsl/gsl_vector.h> #include <gsl/gsl_sort_vector.h> char **dofin_names = NULL, *dofout = NULL; void usage() { cerr << "\t Usage: ffdmedianaverage [dofout] [N] [dofin1...N] <-noaffine> \n" << endl; cerr << "\t The input mffds are assumed to relate to ...
#include <stdio.h> #include <stdlib.h> #include "diag/Trace.h" #include "qp_port.h" #include "BoardSupportPackage.h" #include "BatteryController.h" #include "DebugTracer.h" #include "initQP.h" #include "myEvents.h" /* the start point */ int main (int argc, char* argv[]); int main (int argc, char* argv[]) { (void...
#include <cstdint> #include <iostream> #include <sys/timerfd.h> #include <unistd.h> int main() { const auto timer = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC); itimerspec value{}; value.it_value.tv_sec = 1; value.it_interval.tv_sec = 3; timerfd_settime(timer, 0, &value, nullptr); int coun...
class functions { public: void leseZeile(char* line, int y); void schreibeZeile(char* line); };
#include<bits/stdc++.h> #include<stdio.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") using namespace std; #define ll long long #define scl(n) scanf("%lld",&n) #define scc(c) scanf("%c",&c) #define fr(i,n) for (ll i=0;i<n;i++) #define fr1(i,n)...
#include "targetwidget.h" #include "playerwidget.h" #include "network/connection.h" #include "json11/json11.hpp" #include <QWidget> using namespace json11; TargetWidget::TargetWidget(QWidget *parent) : PlayerWidget(parent) { QSizePolicy sp_retain = this->sizePolicy(); sp_retain.setRetainSizeWhenHi...
//! Bismillahi-Rahamanirahim. /** ========================================** ** @Author: Md. Abu Farhad ( RUET, CSE'15) ** @Category: /** ========================================**/ #include<bits/stdc++.h> #include<stdio.h> using namespace std; #define ll long long #define fr(i,n) for(int i=0;i<n...
#include "engine.h" #include "ctfi.h" #include "origctf.h" #include <iostream> #include <fstream> #include <opencv2/highgui/highgui.hpp> #include <string> using namespace cv; using namespace std; int main(int argc, const char * argv[]) { Mat image = cv::imread(argv[1], CV_LOAD_IMAGE_COLOR); string filename =...
#ifndef __CLineFeature #define __CLineFeature #include "MultiSegLine.h" #include "Feature.h" // 特征类型 #define GENERIC_LINE_FEATURE 0 // 一般直线特征 #define SINGLE_SIDED_LINE_FEATURE 1 // 单侧直线特征 /////////////////////////////////////////////////////////////////////////////// // 定义“特征”基类。...
#ifndef __TYPEDEF_H__ #define __TYPEDEF_H__ #include "serialization.h" #include <iostream> #include <string> #include <vector> namespace fgtcc { struct SvcConfig { int port; }; struct ImageSizeInfo { int width; int height; }; struct GetOpencvVersionResp { std::string version; }; struct GetImageSiz...
#include <stdio.h> #include <iostream> #include <stdlib.h> #include <ros/ros.h> #include "camina/v_repConst.h" //#include "../msg_gen/cpp/include/camina/motor.h" #include "../msg_gen/cpp/include/camina/AngulosMotor.h" // Used data structures: #include <std_msgs/Float64.h> #include <sensor_msgs/JointState.h> #include "...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
// // Created by jf on 11/21/17. // #ifndef SAKJDHASDKJ_ALGORITHM_H #define SAKJDHASDKJ_ALGORITHM_H #include "graph.h" using namespace std; class algorithm { private: CGraph graph; public: bool deep_search(std::vector<CGraph::Graph> &tree, int source, int dest,std::vector<int> &pth); bool wide_search(CGra...
#include <iostream> #include "State_Space_Generator.h" int main (int argc, char * argv[]) { SCHED_ALGO algo; if (!strcmp (argv[1], "OTH")) algo = OTH; else if (!strcmp (argv[1], "RM")) algo = RM; else if (!strcmp (argv[1], "EDF")) algo = EDF; else if (!strcmp (argv[1], "LLF")) ...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#include <GL/freeglut.h> #include<time.h> #include<math.h> #define PI 3.141592 GLvoid DrawScene(); GLvoid Reshape(int, int); GLvoid Keyboard(unsigned char, int, int); GLvoid Timerfunction(int); time_t now; struct tm curr_time; int nums[6]; int rotate_degree = 0; void main(int argc, char** argv) // 윈도우 출력하고 출력함수 설정 ...
#ifndef _VIEW_MOUSE_PAINT_H_ #define _VIEW_MOUSE_PAINT_H_ #include "trinity/trinity_widget_view.h" class ViewMousePaint : public NextAI::WidgetView, NextAI::AppEventListener { public: ViewMousePaint(); virtual ~ViewMousePaint(); virtual void drawImpl(); virtual NextAI::ListenerResult touch(NextAI::TouchType tou...
///connector_co.h // // #ifndef CONNECTOR_CO_H #define CONNECTOR_CO_H #include "connector.h" #include "tcppeer_co.h" #ifndef NAMESPDEF_H #include "namespdef.h" #endif NAMESP_BEGIN namespace net { //@param EventQueueT //@param NetPeer template<class Connector, class EventQueueT ,class TcpPeer > class Connector_co ...
/* primitive_long.cpp -*- C++ -*- Rémi Attab (remi.attab@gmail.com), 12 Apr 2014 FreeBSD-style copyright and disclaimer apply Long reflection */ #include "primitives.h" #include "primitives.tcc" /******************************************************************************/ ...