text
stringlengths
8
6.88M
//--------------------------------------------------------------------------- ///// BackgroundCommThread.h ///// purpose : Header file for the background thread. ///// copyright: Harold Howe, bcbdev.com 1999-2000. ///// notice : This file demonstrates how to use the commport class. It exists solely for educ...
#include "queue.cpp" #include <iostream> #include <string> using namespace std; int main() { int score = 0; Queue<string> myQueue; cout << "Starting test 1" << endl; myQueue.enqueue("h"); myQueue.enqueue("e"); myQueue.enqueue("l"); myQueue.enqueue("l"); myQueue.enqueue("o"); myQueue.AddVip("W"); myQueue...
#pragma once #using<system.dll> #using <System.Drawing.dll> #using <System.Windows.Forms.dll> using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Collections::Generic; using namespace System::Windows::Forms; using namespace System::Data; using ...
//Windows GDI #include <windows.h> #include <math.h> LRESULT __stdcall WndProc(HWND, UINT, WPARAM, LPARAM); int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { char szWindowClass[] = "SineWave"; //注册窗口类 WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX);...
//===-- command-queue.h - OpenCL Command Queue ------------------*- C++ -*-===// // // TODO (Zhongliang): Add a license. // //===----------------------------------------------------------------------===// /// /// \file /// \brief This file contains the definition of OpenCL command queue class. /// //===----------------...
#include "usergui.h" #include "ui_usergui.h" #include <QMessageBox> #include "BankCustomerPut.h" #include "BankCustomerCall.h" #include <vector> UserGUI::UserGUI(QWidget *parent, QString _firstName, QString _lastName, QString _id) : QDialog(parent), ui(new Ui::UserGUI) { ui->setupUi(this); this->firs...
#include<iostream> using namespace std; #define STACK_INIT_SIZE 100 #define STACKINCREMENT 10 #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef struct pos { int x; int y; bool operator==(const pos& a) { return( x == a.x) && (y== a.y); } } PosType; typedef struct { int ord; PosType seat; int di; } SEle...
// Redirector.cpp : Implementation of CRedirector #include "stdafx.h" #include "BrowserHooker.h" #include "Redirector.h" #pragma comment(lib, "urlmon.lib") //#pragma comment(lib, "user32.lib") // for _variant_t _bstr_t support //#include <comutil.h> //#pragma comment(lib, "comsuppw.lib") //#pragma comment(...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2002 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef DOM_DOMJILDEVICE_H #define DOM_DOMJILDEVICE_H #ifdef D...
#ifndef WIDGET_H #define WIDGET_H #include <QWidget> #include<QDir> #include<QFileDialog> #include<qDebug> namespace Ui { class Widget; } class Widget : public QWidget { Q_OBJECT public: explicit Widget(QWidget *parent = 0); ~Widget(); public: QFileInfoList list; //保存的是路径下的文件列表; int index; ...
/****************************************************************************** * * * Copyright 2020 Jan Henrik Weinstock * * * ...
#pragma once #include "../include/Loadgame.h" void Loadgame::load() { ifstream file; file.open("saved game/savepawns.dat"); if (!file.is_open()) throw LoadException(); float value; amountOfBlack = 0; amountOfWhite = 0; file >> amountWhiteCanMove; file >> amountBlackCanMove; file >> centerOfMenuSectionX; ...
// Created on: 2017-07-25 // Created by: Anastasia BOBYLEVA // Copyright (c) 2017-2019 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2...
#include <SFML/Graphics.hpp> #include <iostream> #include "Fighter.h" using namespace std; Fighter::Fighter() { _Sprite.setPosition(600 - 32, 350 - 32); //Set Sprite Position (Centre) _Sprite.setScale(0.5f, 0.5f); //Sprite Scale _Sprite.setTextureRect(sf::IntRect(0, 0, 114, 200)); //Crop Sprite Sheet (Default Crop)...
#ifndef PROJET_H #define PROJET_H #include<QtWidgets> #include <iostream> #include<QString> #include<QDate> #include<QTextStream> #include "timing.h" #include "tache.h" using namespace TIME; <<<<<<< HEAD // ======= >>>>>>> en_dev //Statut = 0 => Projet non programmé, à venir class Projet { //friend class Proje...
// // Created by JACK on 11/6/2015. // #ifndef CEF05A_VEHICLE_H #define CEF05A_VEHICLE_H #include <iostream> using namespace std; class Vehicle { protected: string name; int price; public: Vehicle(); Vehicle(string,int); Vehicle(const Vehicle&); Vehicle& operator =(const Vehicle&); friend istream& operator >>(...
#pragma once #include <string> #include <Poco/NamedMutex.h> #include <Poco/SharedPtr.h> #include "util/Loggable.h" namespace BeeeOn { /** * @brief SingleInstanceChecker can detect another equivalent running * application instance. This might prevent running a same kind of * application multiple-times. * * Sin...
#include "../src/Dvector.hpp" #include <iostream> #include <cassert> #include <sstream> int main(){ Dvector v = Dvector(3,10); Dvector v2 = v; assert(v2.size() == 3); bool vrai = (v == v2); assert(vrai == true ); }
#include <iberbar/Renderer/Mesh.h> iberbar::Renderer::CMesh::CMesh() : m_nIndexCount( 0 ) , m_IndexData( nullptr ) , m_nVertexCount( 0 ) , m_Positions( nullptr ) , m_Normals( nullptr ) , m_TexcoordSlots() { memset( m_TexcoordSlots, 0, sizeof( m_TexcoordSlots ) ); } iberbar::Renderer::CMeshDefault::CMes...
/** * @file valknut/core/internal/platform/win32.hpp * * @brief This header detects features for Windows platforms * * @note This is an internal header file, included by other library headers. * Do not attempt to use it directly. */ /* * Symbols Defined: * * VALKNUT_PLATFORM_WINDOWS ...
#include<cstdio> #include<cstring> #define MAX_DIGITS 11 int convert_to_dec(char *num_str,int radix){ int len = strlen(num_str); int base = 1,ret = 0; for(int i=len-1;i>=0;i--){ int cur = (num_str[i]>='0'&&num_str[i]<='9')? num_str[i]-'0':num_str[i]-'a'+10; if(cur>radix-1) retur...
#include<bits/stdc++.h> using namespace std; int n,k,u,v; int g[20][20]; int dfs(int u, int v, int k) { int count[n][n][k + 1]; // 1st D-source node, 2nd D-destination node, 3rd D-no of edges from source to dest. for (int e = 0; e <= k; e++) { // dfs + dp for (int i = 0; i < n; i++) { ...
#include "GamePch.h" #include "IKObject.h" #include "IKComponent.h" #include "Projectile.h" uint32_t IKObject::s_TypeID = hg::ComponentFactory::GetGameComponentID(); IKObject::IKObject() : m_ik(nullptr), m_parent (nullptr), m_child (nullptr), m_length (0) { } hg::Entity* IKObject::Create(XMVECTOR pos, XMVECTOR d...
#include "gtest/gtest.h" #include "opennwa/Nwa.hpp" #include "opennwa/query/language.hpp" #include "Tests/unit-tests/Source/opennwa/fixtures.hpp" #include "Tests/unit-tests/Source/opennwa/class-NWA/supporting.hpp" using namespace opennwa; #define NUM_ELEMENTS(array) (sizeof(array)/sizeof((array)[0])) // WARNING:...
/* * * * * * movegen.cxx * Move generation ** Pawn Moves * White pawns move positive * Black pawns move negative * White pawns on rank 1 move two ranks up * Black pawns on rank 6 move two ranks down * Pawns on file 0 cannot capture left * Pawns on file 7 cannot capture right * Pawns can capture on the en pass...
// Copyright Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ========================================================================...
#include <iostream> using namespace std; using ll = long long; int main() { ll N; cin >> N; if (N % 2 == 0) { cout << N / 2 << endl; return 0; } for (ll p = 2; p * p <= N; ++p) { if (N % p == 0) { cout << (N - p) / 2 + 1 << endl; return 0; ...
class Solution { public: string multiply(string num1, string num2) { string res = ""; int n1 = num1.size(); int n2 = num2.size(); int k = n1 + n2 - 2; vector<int> arr(n1+n2,0); for(int i=0; i<n1; ++i){ for(int j=0; j<n2; ++j){ arr[k-i-j] +=...
#include "stdafx.h" #include "MonsterActionList.h" #include "../GameData.h" #include "Monster.h" #include "MonsterAction.h" MonsterActionList::~MonsterActionList() { } void MonsterActionList::OnDestroy() { DeleteGO(m_back); DeleteGO(m_icon); for (auto a : m_actBlocks) DeleteGO(a); for (auto a : m_frs) Dele...
// "Copyright [2020] <Taraymovich Igor>" #include <iostream> #include <string> #include <csignal> void signal_handler(int signal) { std::string signal_name; switch (signal) { case SIGINT: signal_name = "SIGINT"; break; case SIGTERM: signal_name = "SIGTERM"; } std::cerr ...
#pragma once #include <iostream> class Node { public: int data; Node* link; Node(int); }; class LinkedList { public: Node* start; int length; LinkedList(int); ~LinkedList(); bool isEmpty(); // void CreateList(); void AppendNode(int); void InsertNode(int, int); void DeleteNode(int); void...
#ifndef __SEQA_H__ #define __SEQA_H__ #include <string> #include "Seq.h" #include "EncodedSequence.h" class SeqA : public Seq { public: SeqA( const std::string &entete, const EncodedSequence &seq ); SeqA( const std::string &entete = "", const std::string &s...
/* * InternalSerialDriverMCB.cpp * File implementing the serial driver for communicating with the * main payload computer (DIB) from the MCB. * Author: Alex St. Clair * February 2018 */ #include "InternalSerialDriverMCB.h" InternalSerialDriverMCB::InternalSerialDriverMCB(SafeBuffer * state_q, Saf...
// The Computer Language Benchmarks Game // http://benchmarksgame.alioth.debian.org/ // // contributed by Elam Kolenovic // // Changes (2013-05-07) // - changed omp schedule for more even distribution of work // - changed loop variables to signed mse::msev_size_teger because msvc was complaining // when omp was...
// AG - PCV.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <vector> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <algorithm> // std::shuffle #include <random> // std::default_random_engine #include <chrono> // s...
#include "../include/sizeCheck.hpp" #define DEBUG 1 #define SIZE_VAR 0.5//percentual variation of expected ball size sizeCheck::sizeCheck(float a, float b){ this->a = a; this->b = b; } int sizeCheck::run(std::vector<cv::Vec3f> circles){ for(int i=0; i < circles.size(); i++){ float expected = (circles[i][1] *...
#include "LoginWidget.h" #include <QIntValidator> #include <QMessageBox> #include <stdio.h> #include "MainWindow.h" LoginWidget::LoginWidget(QMainWindow *parent) : QWidget(parent), parentWindow(parent) { setGUI(); } void LoginWidget::setGUI() { setFixedSize(300, 300); label_title = new QLabel("UOS A...
#include "Serial.h" int Serial::set_opt(int fd, int nSpeed, int nBits, char nEvent, int nStop) { struct termios newtio, oldtio; if (tcgetattr(fd, &oldtio) != 0) { perror("SetupSerial 1"); return -1; } bzero(&newtio, sizeof(newtio)); newtio.c_cflag |= CLOCAL | CREAD; newtio.c_cfla...
#ifndef falsenearestH #define falsenearestH #include "nearest.h" /* The false nearest neighbour algorithm is described in o Matthew B Kennel, Reggie Brown, and Henry D. I. Abarbanel o Determining embedding dimension for phase-space reconstruction using a geometrical construction o Physical Re...
#include <iostream> using namespace std; using ll = long long; template <typename T> inline T sq(T a) { return a * a; } int main() { ll N, M; cin >> N >> M; ll sum[M + 1][M + 1]; fill(sum[0], sum[1], 0); for (ll i = 1; i <= M; ++i) { sum[i][0] = 0; for (ll j = 1; j <= M; ++j) { ...
#ifndef _TICTACTOE_H #define _TICTACTOE_H #include <iostream> #include <cstdlib> class TicTacToe { public: TicTacToe(); ~TicTacToe(); enum GridType { GRID_NONE = 0, GRID_X, GRID_O }; //app functions void resetBoard(void); ...
/***************************************************************************************************************** * File Name : LCM.h * File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\fun\maths\books\time\numbers\LCM.h * Created on : Jan 23, 2014 :: 7:31:27 PM * Author : AVINASH * Te...
/* * @author : dhruv-gupta14 * @date : 14/01/2019 */ #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; int cnt[n] = {0}; for(int i=0;i<n;i++) { cin >> arr[i]; cnt[arr[i]]++; } for(int j=0;j<n;j++) { if(cnt[arr[j]] != -1) { cout << arr[j] <<...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2006 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * */ #include "core/pch.h" #include "adjunct/desktop_util/tree...
/* XMRig * Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com> * * 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 * ...
#include "BridgeDriver.h" #ifndef __BridgeDriver_H #error [E030] Не определен заголовочный файл BridgeDriver.h #endif #ifndef __BRIDGE_PINS_H #error [E030] Не определен заголовочный файл BridgeDriver_PINS.h #endif #include "ADC.h" //-----------public---------------------------- void BridgeDriver::i...
#include "database.h" database::database() { } //This function accesses the database bool database::getDatabase() { QSqlDatabase db; db = QSqlDatabase::addDatabase("QSQLITE"); QString dbName = "database.sqlite"; db.setDatabaseName(dbName); return db.open(); } //Function to populate a vector...
/** * @file MyDigi.cc * @brief implements MyDigi detector output class * * @date 10 Dec 2009 * @author adotti */ #include "MyDigi.hh" #include "CLHEP/Random/RandFlat.h" #include "G4UnitsTable.hh" #include "G4SystemOfUnits.hh" // -- one more nasty trick for new and delete operator overloading: G4Allocator<MyDigi>...
class outhouse_kit { weight = 50; }; class wooden_shed_kit { weight = 75; }; class wooden_shed_kit2 { weight = 150; }; class wood_shack_kit { weight = 50; }; class wood_shack_kit2 { weight = 100; }; class storage_shed_kit { weight = 100; }; class storage_shed_kit2 { weight = 200; }; class ItemGunRackKit { ...
#include "Briscola.hpp" #include "StringCards.hpp" Briscola::Briscola() : Game(false), atout(-1), manche_finie(false) { all_actions.push_back("Finir tour"); // action 0 all_actions.push_back("Finir manche"); // action 1 deck_actions_begin = all_actions.size(); // action 1 à 32 for (int i=1; i<=32; i++){ a...
#include "time.h" #include "ui_time.h" time::time(QWidget *parent) : QDialog(parent), ui(new Ui::time) { ui->setupUi(this); } time::~time() { delete ui; }
#pragma once #ifndef WORLD_ECONOMY_HPP_ #define WORLD_ECONOMY_HPP_ #include "BaseHeader.h" #include "economy.hpp" #include "brent.hpp" #include <random> using namespace std; using namespace brent; class WorldEconomy : public func_base { public: WorldEconomy(int p_numCountries, int currentState); ~WorldEconomy(); v...
#pragma once #define aDDict_NONE 0 #define aDDict_LINEAR 1 #define aDDict_HERMITE 2 #define aDDict_BEZIER 3 #define aDDict_CATMULL 4 #define aDDict_SINE 5 #define aDDict_SAW 6 #define aDDict_SQUARE 7 struct Key { float Value; float Time; float an,bn; }; class SPLINE { public: int KeyNum; int KeyCapacity; Key *...
#ifndef TOWER_HH #define TOWER_HH #include "JetInfo.hh" class Tower { public: int et; }; class SuperTower { public: int et; int peak_et; void init() { et = 0; peak_et = 0; } void set(SuperTower &supertower) { et = supertower.et; peak_et = supertower.peak_et; } }; #endif
#include "utiles.h" #include <sstream> int convertirInt(std::string s) { int v; std::stringstream r(s); r >> v; return v; } double convertirDouble(std::string s) { double v; std::stringstream r(s); r >> v; return v; } void imprimeCadena(string cadena) { cout << cadena; // IMPRIME CADENA } v...
#include "hero.h" hero::hero() { setPosition(0, 0); setColor(Color::White); } hero::hero(int pos_x, int pos_y, int w, int h, Color _color) { setPosition(pos_x, pos_y); setSize(w,h); setColor(_color); } hero::hero(int pos_x, int pos_y, int w, int h) { setPosition(pos_x, pos_y); setSize(w,h); setColor(Color::Whi...
#pragma once #include "object\Enemy.h" class EnemyScript { bool flag; int effectFlag; int spawnCount; int enemyType; int motionPettern; double x; double y; double speed; int shotFunc; int deathFunc; int life; public: EnemyScript() = default; ~EnemyScript() = default; int getSpawnCount() const; bool sho...
#include "gmock/gmock.h" #include "gtest/gtest.h" #include "Types.h" #include "expressions/BasicExpressions.h" #include "mock/MockConfiguration.h" #include "mock/MockOption.h" using ::testing::Return; using ::testing::_; using ::testing::DoAll; using ::testing::SetArgPointee; TEST(ValueOf, SimpleTest) { std::string ...
// Driver Program for testing `sorting` class // Author: // Roll Number: #include <iostream> #include <thread> #include "seq_linear_list.hpp" #include "sorting.hpp" #include "timer.hpp" template<typename Item> void quickSort(cs202::LinearList<Item>* A, int low, int high) { static unsigned int number_of_threads_run...
#include<iostream> #include<string.h> #include<ctype.h> using namespace std; template<class T> class strAr { public: T *ar; int top,max; strAr(int n) { max=n; ar=new T[n]; top=-1; } bool isempty() { if(top==-1) return true; else return false; } bool isfull() { if(top==max...
// Created by: Peter KURNEV // Copyright (c) 2010-2014 OPEN CASCADE SAS // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This file is part of Open CASCADE Techn...
#pragma once #include <string> #include <Poco/Nullable.h> #include <Poco/Net/IPAddress.h> #include "net/MACAddress.h" namespace BeeeOn { /** * @brief DeviceCriteria holds a criteria for device searching. * Device can be search by one of the following properties: * * - by IP address * - by MAC address * - by ...
#pragma once #include "Agent.h" //base class class Decision { public: virtual void makeDecision(Agent* agent, float deltaTime) = 0; };
#include <cstdio> int main(){ int d; scanf("%d", &d); int dd = (d+2) % 7; if ( dd == 0) printf("7\n"); // corner case printf("%d\n", dd); return 0; }
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> using namespace std; typedef long long ll; #define INF 10e17 // 4倍しても(4回足しても)long longを溢れない #define rep(i,n) f...
/* * EpollMain.h * * Created on: Jun 11, 2017 * Author: root */ #ifndef NETWORK_EPOLLMAIN_H_ #define NETWORK_EPOLLMAIN_H_ #include <vector> #include <map> #include <deque> #include "../Thread/Task.h" #include "../define.h" #include "Session.h" #include "../Common.h" #include "../Memory/MemAllocator.h" usi...
#pragma once #include "Inconstructible.h" #include "VirtualMethod.h" class Entity; class ClientTools { public: INCONSTRUCTIBLE(ClientTools) VIRTUAL_METHOD_V(Entity*, nextEntity, 7, (Entity* entity), (this, entity)) };
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 1995-2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Espen Sand */ #ifndef __X11_OPTASKB...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Engine/UserDefinedEnum.h" #include "CharacterMovementModes.generated.h" /** * */ UCLASS() class UNREALAI_API UCharacterMovementModes : public UUserDefinedEnum { GENERATED_BODY() public...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2012 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef MODULES_LIBLCMS_LIBLCMS_MODULE_H #define MODULES_LIBLCMS_...
// // Path.cpp // w06_h02_pathfollow2 // // Created by Kris Li on 10/14/16. // // #include "Path.hpp" Path::Path(){ radius = 40; start = ofPoint(0,ofGetHeight()/3); end = ofPoint(ofGetWidth(),2*ofGetHeight()/3); } void Path::draw(){ ofSetLineWidth(radius*2); ofSetColor(0,100); ofDrawLine...
#include "SeekNodeBehaviour.h" vector2 SeekNodeBehaviour::Update(Agent* agent, float deltaTime) { return SeekNode(agent, deltaTime); } vector2 SeekNodeBehaviour::SeekNode(Agent* agent, float deltaTime) { SetTarget(path.front()); vector2 force(0, 0); if (m_target == nullptr) { return force; } vector2 agent...
#include <iostream> #include <string> #include <sstream>// zz to string #include <NTL/ZZ.h> #include <vector> #include <random> using namespace std; using namespace NTL; class RSA { ZZ claveprivada; public: RSA(); RSA(ZZ, ZZ); ZZ modulozz(ZZ, ZZ); ZZ mcd(ZZ, ZZ); ZZ EuclidesExtendido(ZZ,...
/* * FileDump.h * * Created on: 4 Apr 2011 * Author: two */ #ifndef FILEDUMP_H_ #define FILEDUMP_H_ #include <stdio.h> #include <iostream> #include "IOBuffer.h" #include "TransporterService.h" using namespace std; class FileDump: public TransporterService { private: FILE* m_File; char* m_sFilePath; ...
#include "am_pm_clock.h" #include <iostream> #include <ostream> //#include <stdexcept> using namespace std; //Default constructor am_pm_clock::am_pm_clock() : hours(12), minutes(0), seconds(0), am(true) {} //Constructor am_pm_clock::am_pm_clock(unsigned int hrs, unsigned int mins, unsigne...
// // KTypeErrorException.cpp <Keepi> // // Made by Julien Fortin // contact <julien.fortin.it@gmail.com> // #include "KTypeException.hpp" KTypeException::KTypeException(const std::string& what) throw() : exception() { this->_what = what; } KTypeException::KTypeException() throw() : exception() { } KTypeExceptio...
/*! * \file RenderSystem.cpp * * \author Shiyang Ao * \date November 2016 * * */ #include "pch.h" #include "RenderSystem.h" #include "D3DUtil.h" #include "DebugRenderer.h" #include "Component/Transform.h" #include "RenderDevice.h" #include "System/CameraSystem.h" #include "VertexSignature/ColorVertexSignature...
#ifndef TREEFACE_VEC3_H #define TREEFACE_VEC3_H #include <treecore/FloatUtils.h> #include <treecore/SimdObject.h> #include <cmath> namespace treeface { template<typename T> struct Vec3 { typedef typename treecore::similar_float<T>::type FloatType; typedef treecore::SimdObject<T, 4> TmpType; ...
#pragma once #include "IAsyncDictionary.hpp" #include "naive_dictionary.hpp" /// The naive implementation is blocking to ensure Sequential Consistency class naive_async_dictionary : public IAsyncDictionary { public: naive_async_dictionary() = default; template <class Iterator> naive_async_dictionary(Iterator b...
#ifndef UI_ACTION_INSTANTACTIONS_SHOW_H_ #define UI_ACTION_INSTANTACTIONS_SHOW_H_ #pragma once namespace ui { class UILIB_API Show : public InstantAction { public: static Show* Create(); virtual void Update(float time) override; virtual InstantAction* Reverse() const override; virtual Show* Clone() ...
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <map> using namespace std; char vowel[5] = {'a','i','u','e','o'}; class KingXNewBaby { public: string isValid(string name) { if (name.size() != 8) { return "NO"; } map<char,int> cnt; for (int i=0; i<name.size(); ++i)...
// // nehe03.h // NeheGL // // Created by Andong Li on 8/30/13. // Copyright (c) 2013 Andong Li. All rights reserved. // #ifndef NeheGL_nehe03_h #define NeheGL_nehe03_h #include <OpenGL/gl.h> #include <OpenGL/glu.h> #include <GLUT/glut.h> #include <iostream> #include <stdlib.h> #include <stdio.h> using namespace...
#ifndef GROGSETTINGS_H #define GROGSETTINGS_H #include <QDialog> namespace Ui { class GrogSettings; } class GromacsToolsDefinition; class GrogSettings : public QDialog { Q_OBJECT public: explicit GrogSettings(QWidget *parent = 0); ~GrogSettings(); protected: void showEvent(QShowEvent * event);...
// // Created by heyhey on 20/03/2018. // #ifndef PLDCOMP_TABLEAU_H #define PLDCOMP_TABLEAU_H #include <ostream> #include <vector> #include "Variable.h" class Tableau : public Variable { public: Tableau(); Tableau(string type, const string &nom); virtual ~Tableau(); private: unsigned int taille;...
#ifndef VECTOR_BASE_H #define VECTOR_BASE_H #include <iostream> #include <memory> template <typename T, typename A> struct vector_base { A alloc; T* elem; int sz; int space; vector_base(): elem{0}, sz{0}, space{0} {} vector_base (const A& a, int n) :alloc{a}, elem {alloc.allocate(n)}, ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2002 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch.h" #include "modules/dom/src/domenvironmen...
#include "application.h" using namespace std; /// @brief Le constructeur par défaut. /// /// Constructeur de la classe Application Application::Application() { } /// @brief Fonction qui donne le @ref PointDeCollecte si il est présent. /// /// @param lieu nom du @ref PointDeCollecte recherché /// /// @return le @ref...
///////////////////////////////////////////////////////////////////// /// ESP32 PWM class /// Paul Stoaks /// Nov. 22, 2020 /// /// Sets up PWM on a pin and allows for some control. /// /// MCPWM API is documented at: /// http://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/mcpwm.html /////////////////////...
#include "GameSystem.h" #include <string> #include <conio.h> #include <iostream> using namespace std; void GameSystem::_playerMovement() { char dir; cout << "\nEnter direction you want to move in: \n"; dir = _getch(); _level.tryMovePlayer(dir, _player); } GameSystem::GameSystem(string levelFile) { _player.ini...
// // MobileDevice.h // Sentinel // // Created by Roshan Nindrai Senthilnathan on 5/24/17. // // /* ---------------------------------------------------------------------------- * MobileDevice.h - interface to MobileDevice.framework * * Adapted from http://theiphonewiki.com/wiki/index.php?title=MobileDevice_Lib...
// include the library for stepper motor and servo motor #include "Stepper.h" #include <Servo.h> // name different servo motors according to what valve they're controlling Servo blackChoco; Servo whiteChoco; Servo strawberry; Servo peach; // the force sensor reading int FSR = 0; // the last reading of the force se...
#include "ScaleStatisticsForm.h" #include "ui_ScaleStatisticsForm.h" #include "../Model/ScaleStatisticsModel.h" #include "Modules/GroupsResults/Assembler/GroupsResultsAssembler.h" #include "Modules/GroupsResults/View/GroupsResultsForm.h" #include "Modules/Correlations/Assembler/CorrelationsAssembler.h" #include "Modul...
// // Created by Alan de Freitas on 12/04/2018. // #include "selection_EA.h" template <typename problem, typename solution> std::default_random_engine selection_EA<problem,solution>::_generator = std::default_random_engine(std::chrono::system_clock::now().time_since_epoch().count()); template <typename problem, type...
#include "linked_list.h" #include <cstddef> #include <string> #include <gtest/gtest.h> using namespace std; vector<int> Vectorize(const Node *head) { auto linkedListContents = vector<int>(); while (head != nullptr) { linkedListContents.push_back(head->data); head = head->next; } return linkedListConte...
#include"stdafx.h" #include"RTSP.h" RTSP::RTSP() { this->UserAgent = "User-Agent: LibVLC/2.1.5 (LIVE555 Streaming Media v2014.05.27) YunYouJun 2019.12.21"; //this->ClientRtpPort = "56789"; //this->ClientRtcpPort = "56790"; this->ClientRtpPort = "65432"; this->ClientRtcpPort = "65433"; this->request =...
#include "AutoTouchboard.h" #include "HelperClass.h" static const int sensorMap[] = { 6, 7, 4 ,5 , 2 , 3 , 0 , 1, // TOUCH_0 30, 31, 28, 29, 26, 27, 24, 25, // TOUCH_1 22, 23, 20, 21, 18 ,19, 16, 17, 14, 15, 12, 13, 1...
module; #include <string> #include <memory> #include <memory_resource> #include "fmt/color.h" import Fibo.PmrUtils; export module Fibo.Pmr2; namespace fibo::pmr2 { class Bar { std::string mData{ "data" }; }; class Foo { std::unique_ptr<Bar> mBar{ std::make_unique<Bar>() }; }; export void testBar() { ...
#ifndef _ZORK_DEF_ #define _ZORK_DEF_ #include <functional> #include <vector> using namespace std; typedef function<void(const string&)> Action; typedef function<bool()> Condition; vector<string> WordParser(const string &input); Action ActionParser(const string& input); Condition ConditionParser(const string& obj,c...
#include <SoftwareSerial.h> //#include <Console.h> #include <Servo.h> Servo myservo; // create servo object to control a servo // a maximum of eight servo objects can be created int pos = 0; // variable to store the servo position int x = 0; String input = ""; int data; void setup() { myservo.attach(9)...
#include "Camera.h" Camera::Camera(glm::vec3 _position, glm::vec3 _lookAt, glm::vec3 _up, float _fov, float _near, float _far, float _speed, float _mouseSpeed) : position(_position), lookAt(_lookAt), fov(_fov), near(_near), far(_far), speed(_speed), mouseSpeed(_mouseSpeed) { forward = glm::normalize(_lookAt - _posi...