text
stringlengths
8
6.88M
#include <vector> #include <iterator> #include <iostream> #include <fstream> #define INFINITE 100000 #define FOUND 0 #define NOT_FOUND 1 using std::vector; using std::cout; using std::cin; using std::endl; int FindWay(int i, int mask, vector <vector <int>> & edges, int n, vector<vector<int>> & IsWayThru){ if (!ma...
#include <map> #include "Logger.h" #include "Room.h" #include "BaseClientHandler.h" #include "Configure.h" #include "GameCmd.h" #include "IProcess.h" #include "AllocSvrConnect.h" static Room * Instance = NULL; Room::Room() { this->m_nStatus = 1; this->monitor_time = Configure::getInstance()->monitor_time; th...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2004 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" #ifdef IRC_SUPPORT #include "color-par...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "127" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) int main(int argc, char const *argv[]) { #ifdef DBG freopen("uva" PROBLEM TESTC ".in", "r", stdin); freopen("uva" PROBLEM ".out", "w", stdout); #endif string Poker[...
// Created on: 2017-06-26 // Created by: Andrey Betenev // Copyright (c) 2017 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.1 as pub...
#ifndef CHARACTER_ENTITY_H #define CHARACTER_ENTITY_H #include <vector> #include <string> #include "../../Base/Source/Main/Engine/Objects/BaseObject.h" #include "../../Objects/Characters/Skill.h" using std::string; using std::vector; class CharacterEntity : public BaseObject { protected: //Character's Base stats V...
#ifndef C_OBSERVABLE_H #define C_OBSERVABLE_H #include <vector> class CObserver; class CObservable { public: virtual ~CObservable() = default; void AddObserver(CObserver* observer); void RemoveObserver(CObserver* observer); protected: CObservable() = default; void NotifyObservers(); void NotifyObservers(COb...
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int n; vector<string> v; bool comp(const string &a, const string &b){ if(a.size() != b.size()){ return a.size() < b.size(); }else{ return a.compare(b) < 0; } } int main(){ ios_base::sync_w...
#ifndef MANUALCONTROLLER_H #define MANUALCONTROLLER_H #include "Controller.h" #include "OdometerLocalizer.h" #include "IntersectionLocalizer.h" #include "KalmanLocalizer.h" #include "ParticleFilterLocalizer.h" class ManualController : public Controller { public: ManualController(SoccerBot* bot); ...
#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <Eigen/Core> #include <Eigen/Dense> #include <Eigen/Geometry> #include <Eigen/SVD> #include <g2o/core/base_vertex.h> #include...
#include "value.h" namespace json { namespace _details { class IWrap: public IValue { public: virtual const void *cast(const std::type_info &type) const = 0; virtual void throwPtr() const = 0; }; template<typename Object> class ObjWrap: public IWrap { public: template<typename T> ObjWrap(T &&obj...
/* * Criado por: Talita Valéria * Data: 05/08/2015 * Descrição: Exemplo de uso da priority_queue */ #include <iostream> #include <queue> #include <vector> using namespace std; /* Essa clase pode ser utilizada para tratar de estruturas em lista prioritária * Por default ela ela funciona como o less<T> * Passando c...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#include "Ship.h" Ship::Ship() { } bool Ship::isBurnt() { return (_deck[0]._status == false && _deck[1]._status == false && _deck[2]._status == false); } void Ship::setShip(Location deck[3]) { for (int i =0; i<3; i++) { _deck[i] = deck[i]; } } Ship::~Ship() { //dtor }
#ifndef ATTACH_H #include "Attach.h" #endif // Defintions of the members of interval // R. Sheehan 8 - 3 - 2013 // interval object // Constructors interval::interval() { // Default constructor interval_defined = false; xlower = xupper = 0.0; } interval::interval(double xl, double xu) { // Constructor // constru...
// // Copyright (C) 2014 Novartis Institutes for BioMedical Research // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <list> #incl...
#include "User.h" int User::getId() const { return id; } User::User(){ id = 0; name = ""; } User::User(int id, std::string username){ this->id = id; this->name = username; } void User::setId(int id) { User::id = id; } const std::string &User::getName() const { return ...
#pragma once #include "../../Game.h" class ResultCamera; class Fade; class Win:public GameObject { public: Win(int team); Win(); ~Win(); void OnDestroy() override; void init(int team, Game::Mode mode); bool Start(); void Update(); void MonsterSet(); void CameraSet(); private: ResultCamera* m_cam = nullpt...
#pragma once #include <iostream> #include <fstream> #include <vector> #include <cstdlib> #include <time.h> #include <ctime> #include <math.h> #include <algorithm> #include <queue> #include <map> #include <set> #include <windows.h> #include "Point.h" #include "Task.h" #include "Map.h" #include "Robot.h" #include "Commo...
#pragma once #include <memory> #include <boost/optional.hpp> #include "ray.h" #include "material.h" class intersection; class intersectable { public: explicit intersectable(std::shared_ptr<material> material); intersectable(const intersectable& other) = delete; intersectable(intersectable&& other) = delete; aut...
#include <iostream> #include <sstream> using namespace std; int lengthOfLastWord(string s) { string str; istringstream stream(s); while(stream>>str); return str.size(); } int main(int argc, char const *argv[]) { cout << lengthOfLastWord(" aaa") << endl; cout << lengthOfLastWord("aaa ") << endl; ...
#ifndef MONAFFICHAGE_H #define MONAFFICHAGE_H #include <QMainWindow> namespace Ui { class monaffichage; } class monaffichage : public QMainWindow { Q_OBJECT public: explicit monaffichage(QWidget *parent = 0); ~monaffichage(); private: Ui::monaffichage *ui; }; #endif // MONAFFICHAGE_H
#include "rapidjson/document.h" #include "rapidjson/prettywriter.h" #include "rapidjson/filestream.h" #include <cstdio> #include <string> #include <fstream> #include <streambuf> #include <sstream> #include <limits.h> #include <iostream> #include <ctime> #include <unordered_map> #include <stdio.h> using namespace rapid...
// // DynamicDateTime.h // // $Id: //poco/Main/Data/include/_Db/DynamicDateTime.h#7 $ // // Library: Data // Package: DataCore // Module: DynamicDateTime // // Definition of the Date and Time cast operators for _::Dynamic::Var. // // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // and Contributor...
#include "independentview.h" #include "ui_independentview.h" #include "cvimagewidget.h" IndependentView::IndependentView(QWidget *parent) : QWidget(parent), ui(new Ui::IndependentView) { ui->setupUi(this); setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested...
#pragma once #include "Predefines.h" class ETimer : public SystemBase { //**************************************************************************************************// // // // Method Area // // // //**********************************...
/* Name: Adrian Dy SID: 861118847 Date: 5/01/2015 */ #include <iostream> #include <string> #include "lab4.h" using namespace std; int main(int argc, char* argv[]) { //note to self int in = stoi(argv[1]); //stoi c++11 takes std::string as argument, so no nee...
#include "SLgineImport.h" namespace SL { void Particle::Update() { life -= 1.1f; if (life < 0) { dead = true; } direction.x /= 1.002; direction.y /= 1.002; pos.x += direction.x; pos.y += direction.y; if (sizeChange == true) { size = baseSize * (life / lifeTime); } else { size = bas...
// // Created by poiza on 10/27/19. // #include "BinarySearchTree.h" #include <iostream> using std::cout; BST::BST(){ tree = NULL; } void BST::cleanMemory(node* note) { if (note != NULL) { cleanMemory(note->left); cleanMemory(note->right); delete note; } } /* BST::~BST(){ ...
// Created by: Peter KURNEV // Copyright (c) 1999-2014 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.1 as published // by the Free S...
////////////////////////////////////////////////////////////////////// ///Copyright (C) 2011-2012 Benjamin Quach // //This file is part of the "Lost Horizons" video game demo // //"Lost Horizons" is free software: you can redistribute it and/or modify //it under the terms of the GNU General Public License as published ...
#ifndef MECOMBINATION_H // header guards #define MECOMBINATION_H #include <map> #include <cmath> #include <vector> #include <map> ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // permutations for SL(4,2) events w...
// Copyright (c) 2018, tlblanc <tlblanc1490 at gmail dot com> #ifndef IO_DISPOSEFUNC_H_ #define IO_DISPOSEFUNC_H_ #include <functional> using DisposeFunc = std::function<void(uint8_t*)>; extern inline void array_delete_dispose_func(uint8_t *ptr) { delete [] ptr; } extern inline void do_nothing_delete_dispose_fun...
#include "vnatriggertest.h" #include "VnaTrigger.h" using namespace RsaToolbox; #include <QDebug> #include <QtTest> #include <cassert> VnaTriggerTest::VnaTriggerTest(QObject *parent) : VnaTestClass(parent) { assert(false); } VnaTriggerTest::VnaTriggerTest(ConnectionType type, const QString &address, QObjec...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "GeneticAI.h" #include "GameFramework/Pawn.h" #include "WreckingBall.generated.h" //Forward declaration class UStaticMeshComponent; class UCameraComponent; class UNeuralInputComponent; class UFloatingPawnMovement; cl...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QStandardItemModel> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private slots: void loadFile(); void saveFile(); ...
#include <ctime> #include <memory> #include <queue> #include <string> #include <unordered_map> #include <vector> #include "mqexec_shared.h" using JobMap = std::unordered_map<std::string, JobPtr>; void processTimeout(JobPtr job); void processJobError(JobPtr job, std::string errmsg); void processResult(JobPtr job, con...
#pragma once namespace Jaraffe { namespace Light { enum class LightType { Directional, Point, Spot, }; struct BasicLight { public: BasicLight() { ZeroMemory(this, sizeof(this)); } public: XMFLOAT4 Ambient; XMFLOAT4 Diffuse; XMFLOAT4 Specular; }; // Note: Make sure structure alignment agrees with HLSL struct...
/* XMRig * Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh> * Copyright (c) 2016-2020 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 * ...
/* -*- 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. */ #ifndef OP_TOOLBAR_H #define OP_TOOLBAR_H #include "adjunct/quic...
#ifndef TREEITEM_H #define TREEITEM_H #include <QVector> #include <QVariant> #include <QStyledItemDelegate> #include <QEvent> #include <QDebug> #include <QMouseEvent> class TreeItem : public QStyledItemDelegate { Q_OBJECT public: explicit TreeItem(const QVector<QVariant> &data, TreeItem *parentItem = nullptr...
/******************************************************* * Title : 1001 * Date : 2015/12/01 * Author : HillBamboo * Source : http://www.patest.cn/contests/pat-b-practise/1001 * Status : AC * Summary: STEP BY STEP * Remarkr: ... *******************************************************/ #include <...
//////////////////////////////////////////////////////////////////////////////// #include "StringUtils.h" #include <iomanip> #include <sys/stat.h> // no clue why required -- man pages say so #include <sys/types.h> // required for stat.h //////////////////////////////////////////////////////////////////////////////// ...
#include <swDuino.h> swDuino objswDuino; const int relay_ctrl = 7; const int photoresistor_in = 0; const int dist_sensor_echo = 2; const int dist_sensor_trig = 5; const int led = 8; const int max_luminocity_lvl = 200; const long activation_distance = 50; byte mode = 2; //0 - disabled, 1 - enabled, 2 - auto bool lig...
#include<iostream> #include<cstdio> #include<map> #include<vector> #include<queue> #include<string> #include<cstring> #include<algorithm> #define PI 3.1415927 using namespace std; int main() {double r; while (cin >> r) printf("%.3lf\n",4*PI*r*r*r/3); return 0; }
#include "opencv2/core.hpp" #include <opencv2/core/utility.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/video/background_segm.hpp" #include "opencv2/videoio.hpp" #include "opencv2/highgui.hpp" #include <stdio.h> using namespace std; using namespace cv; static void help() { printf("\nDo background segmentati...
//------------------------------------------------------------------------------ /* This file is part of Beast: https://github.com/vinniefalco/Beast Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com> Portions of this file are from JUCE. Copyright (c) 2013 - Raw Material Software Ltd. Please visi...
// Copyright 2012 Yandex #ifndef LTR_CROSSVALIDATION_CROSSVALIDATION_RESULT_H_ #define LTR_CROSSVALIDATION_CROSSVALIDATION_RESULT_H_ #include <vector> #include <algorithm> #include <string> #include "ltr/measures/measure.h" #include "ltr/learners/learner.h" #include "ltr/crossvalidation/splitter.h" #include "ltr/data/d...
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** * Copyright (c) 2013-2015 Regents of the University of California. * * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). * * ndn-cxx library is free software: you can redistribute it and/or modify it under the ...
#include<iostream> #include<stdlib.h> #include<stdio.h> #include<cstring> using namespace std; const int size=50; class StackIP { public: char infix[size]; char postfix[size]; char Stack[size]; int top=-1; int precedence(char ch); char pop(); char topelement(); void push(char ch); in...
#include <iostream> #include <vector> #include <queue> using namespace std; // 28分15秒 // 失敗 class Solution { public: int trap(const vector<int>& height); private: struct TWD{ size_t start; size_t end; }; vector<TWD*> findTWD(const vector<int>& height); int computeWaterVolume(const ...
class Accelerometer { int max_inputs; std::deque<int> input_vals; public: void append_val(int val); int get_acceleration(); int get_recommended_output(); };
/*==================================================================== Copyright(c) 2018 Adam Rankin 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 limitati...
#include "../testMacros.h" #include "../Group.h" #include "../Clan.h" #include "../exceptions.h" using namespace mtm; bool testClanConstractor(){ ASSERT_EXCEPTION(Clan(""),ClanEmptyName); ASSERT_NO_EXCEPTION(Clan("GameOfThrones")); return true; } bool testClanAddGroup(){ Clan game_of_thrones("GameOfT...
#pragma once #include "UI.h" #include <vector> class SceneRenderer { public: void AddObject(UISprite* obj) { Sprites.push_back(obj); } void Render() { for (int i = 0; i < Sprites.size(); i++) { Sprites[i]->Render(); } } private: vector<UISprite*> Sprites; };
#include "DbTransaction.hpp" const Elysium::Core::Data::IDbConnection * Elysium::Core::Data::Common::DbTransaction::GetConnection() const { return _Connection; } const Elysium::Core::Data::IsolationLevel Elysium::Core::Data::Common::DbTransaction::GetIsolationLevel() const { return _IsolationLevel; } Ely...
#ifndef RgbStrip_h #define RgbStrip_h #define CLK 9 //pins definitions for the driver #define DIO 10 #include <Arduino.h> #include <RGBdriver.h> class RgbStrip { private: int red; int green; int blue; int bright; int power; void fade(int t_red, int t_green, int t_blue); void setRGB(int r...
// Fill out your copyright notice in the Description page of Project Settings. #include "Monte.h" #include "MyMonteProjectile.h" AMyMonteProjectile::AMyMonteProjectile(const class FObjectInitializer& PCIP): Super(PCIP), m_YConstantAcceleration(100.0f), m_ProjectileVelocity(0.0f){ //used o make this projectile cal...
#include<iostream> using namespace std; template<class t> class node { public: t data; node<t> *next; }; template<class t1> class list { int n; node<int> *first; public: list() { fi...
// ThreadDataGlovesDeviceDriver.cpp : This file contains the 'main' function. Program execution begins and ends there. #ifndef WIN32 #define WIN32 #endif #include <WinSock2.h> #include <WS2tcpip.h> #include <Windows.h> #include "BluetoothManager.h" #include <iostream> #include <fstream> #include <future> #include <th...
/* Copyright (c) 2016, Los Alamos National Security, LLC All rights reserved. Copyright 2016. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the ...
#include"Builder.h" #include"Product.h" #include"Director.h" #include"ConcreteBuilder.h" #include<iostream> //增加新的具体建造者无须修改原有类库的代码,指挥者类针对抽象建造者类编程,系统扩展方便,符合“开闭原则” //可以更加精细地控制产品的创建过程 。将复杂产品的创建步骤分解在不同的方法中 //使得创建过程更加清晰,也更方便使用程序来控制创建过程。 int main() { ConcreteBuilder* builder = new ConcreteBuilder(); Director director; ...
//Heap is also called priority queue //******************* Heap(priority queue)***************************************************************** //Element with highest priority comes out of the queue //It is like a queue but having some priority //Why to use this? //Finding Max/Min of the N elements //Types of function...
#pragma once #include <memory> #include <ionir/construct/type/integer_type.h> #include <ionir/construct/type/void_type.h> #include <ionir/construct/type/boolean_type.h> #include <ionir/construct/construct.h> #include <ionir/tracking/symbol_table.h> #include "util.h" namespace ionir { class TypeFactory { publi...
/* * MIT License * * Copyright (c) 2016, 2017 by S. Yingchareonthawornchai and J. Daly at Michigan State University * * 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 res...
#ifndef D_RECTANGLE_H #define D_RECTANGLE_H #include "figure.h" struct rectangle : figure{ rectangle(const point& p1, const point& p2, const point& p3, const point& p4); rectangle(std::istream& is); point center() override; double area() override; void print(std::ostream& os) override; pr...
#ifndef TP_PPROJECT_ROLECONTROLLER_H #define TP_PPROJECT_ROLECONTROLLER_H #include <memory> #include "UserOptions/BaseUserOptions.h" #include "UserOptions/GuestOptions.h" #include "UserOptions/EmployeeOptions.h" #include "UserOptions/ManagerOptions.h" #include "UserOptions/CompanyOptions.h" // Role controller for s...
#ifndef BBB_ITEM_HPP #define BBB_ITEM_HPP #include <QObject> // Include ui_view.h only in source namespace bbb { class Item : public QObject { Q_OBJECT Q_SLOT void go(); }; } #endif
//program to print all even or odd numbers in a given range #include<iostream> using namespace std; //function for even numbers int even(int i, int j) { if(j>i) return 1; else { cout<<j<<endl; j+=2; even(i,j);//recursion return 0; } } //function for odd numbers int odd(int i, int j) { i...
/* -*- 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. ** ** Øyvind Østlund ** */ #include "core/pch.h" #include "platf...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- */ #include "core/pch.h" #include "modules/libgogi/mde.h" #include "modules/dragdrop/dragdrop_manager.h" #include "modules/windowcommander/OpWindowCommanderManager.h" #ifdef MDE_SUPPORT_DND void MDE_View::TrigDragStart(int start_x, int start_y, ShiftKeyState modif...
#include "stdafx.h" #include "VaporPlus.h" #include "DirectXRaytracingHelper.h" #include "CompiledShaders\Raytracing.hlsl.h" using namespace DX; const wchar_t* VaporPlus::c_hitGroupName = L"MyHitGroup"; const wchar_t* VaporPlus::c_raygenShaderName = L"MyRaygenShader"; const wchar_t* VaporPlus::c_closestHitShaderName...
/** * @file * @brief Miscellaneous utility functions. */ #pragma once #include "file_util.h" #include "resource_util.h" namespace peconv { /** Checks if the given buffer is fully filled with the specified character. \param cave_ptr : pointer to the buffer to be checked \param cave_size : size of th...
#pragma once #include "renderer2D.h" #include "../renderable/renderable2D.h" #include "../buffers/indexbuffer.h" #include "../../math/rectangle.h" #include <stddef.h> namespace sge { namespace graphics{ #define RENDERER_MAX_SPRITES 10000 #define RENDERER_VERTEX_SIZE sizeof(VertexData) #define RENDERER_SPRITE_SIZE ...
/* This is a C++ port of the following PyQt example http://diotavelli.net/PyQtWiki/Python%20syntax%20highlighting C++ port by Frankie Simon (www.kickdrive.de, www.fuh-edv.de) The following free software license applies for this file ("X11 license"): Permission is hereby granted, free of charge, to any person obtain...
#pragma once #include "texture.hpp" namespace leaves { namespace pipeline { template <> struct texture_traits<texture_ds> : texture_traits_base { static constexpr bool is_texture_2d() noexcept { return true; } static constexpr bool is_texture_ds() noexcept { return true; } static constexpr obj...
// Copyright 2017 Google Inc. All rights reserved. // // 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, ...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php....
/* Name: OhmBass.ino Created: 03/05/2019 14:41:31 Author: ActiOhm & Jana */ #include <TimeLib.h> int i; time_t mMinute; // the setup function runs once when you press reset or power the board void setup() { i = 0; mMinute = minute(now()); Serial.begin(9600); } // the loop function runs over and over again ...
int trig = 12; int echo = 13; long lecture_echo; long cm; void setup() { Serial.begin (9600); pinMode(trig, OUTPUT); digitalWrite(trig, LOW); pinMode(echo, INPUT); } void loop() { Serial.println("-----------------"); Serial.println("StartLoop"); digitalWrite(trig, HIGH); // Added this line dela...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <errno.h> #include "ff.h" #include "pmetest.h" #ifndef _WIN32 #define MPI_ON 1 #endif #define MAX_PROC (72) #ifdef MPI_ON #include <mpi.h> #include <unistd.h> //for linux #else #include <direct.h> //for win #endi...
#include "networkhandler.h" #include "../server.h" #include <iostream> #include <fstream> #include <sys/types.h> #include <sys/socket.h> #include <sys/fcntl.h> #include <netinet/in.h> #include <memory.h> #include <sstream> #include <unistd.h> #include <fcntl.h> #include "../exceptions.h" NetworkHandler::NetworkHandle...
// Created on: 1995-01-06 // Created by: Christophe MARION // Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 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 ...
/************************************************************************************** * File Name : vec2.hpp * Project Name : Keyboard Warriors * Primary Author : JeongHak Kim * Secondary Author : * Copyright Information : * "All content 2019 DigiPen (USA) Corporation, all rights reserved...
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFileDialog> #include <QMessageBox> #include <QTextStream> // zmiennie globalne QString tekst; // tekst znajdujący się w polu tekstowym QString szukany_tekst; // tekst, który zamienimy na inny QString zamiennik; // tekst na jaki zo...
#include "relation.h" Relation::Relation(){ } Relation::Relation(string comp, string pio){ cName = comp; pName = pio; } string Relation::getCompName(){ return cName; } string Relation::getPioName(){ return pName; }
int main(){ //վերագրումները փոխարինել ավելի կաճ տարբերակով int a = 1, b = 2; a += 10; b /= 2; a += b; b *= a; return 0; } int main(){ //Մտածել խնդիր որում կօգտագործեք % ( տոկոս)օպերատորը, նաեւ կօգտվեք cin եւcoutօպերատորներից int num; cout << "Enter numeral = "; cin >> num; if(num % 2 ==1){ cout << "Your Entere...
#include "commands/MecanumDrive.h" //References the main header file #include <Robot.h> double deadZone = 0.2; MecanumDrive::MecanumDrive() : frc::Command("MecanumDrive") { Requires(&Robot::driveTrain); } void MecanumDrive::Initialize() { } void MecanumDrive::Execute() { double speedWheel = (Robot::m_oi.Yok...
#include <iostream> using namespace std; class Human{ friend ostream &operator<<(ostream&, const Human&); public: Human(string, int, float); Human(); ~Human(); void setHuman(string, int, float); string getfirstName(); int getAge(); float getHeight(); private: str...
#include<iostream> #include<list> using namespace std; int main() { list<int> list1{1,1,2,2,3,3,4,5}; list<int> list2{6,7,8}; //remove the multiple occurance from list list1.unique(); cout<<"After remove occurance from list :"; for(int &i:list1) cout<<"\t"<<i; ...
#include <iostream> #include <string> #include <vector> using namespace std; template <class T1, class T2> class Person { public: Person(T1 a, T2 b); void show(); T1 a; T2 b; }; template <class T1, class T2> Person<T1, T2>::Person(T1 a, T2 b) { this->a = a; this->b = b; } template <class T1...
#include "stdafx.h" #include "Prof-UIS.h" extern "C" __declspec(dllexport) BOOL WINAPI UISalLabelGetFontBold(HWND labelHandle) { // access label CExtLabel* extLabel = (CExtLabel*)CExtLabel::FromHandlePermanent(labelHandle); if (extLabel == NULL) { __EXT_SUBCLASS_PROFUISCTRL(labelHandle, CExtLabel); extLabel = ...
// Copyright (c) 2018 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.1 as published // by the Free Software Foundation, with special ...
// // Utils.h // RSA // // Created by ivan sarno on 21/08/15. // Copyright (c) 2015 ivan sarno /* 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 ...
#pragma once #include <iberbar/Paper2d/Headers.h> #include <iberbar/Paper2d/Transform.h> #include <iberbar/RHI/ShaderVariables.h> #include <iberbar/Utility/Rect.h> #include <iberbar/Utility/Clonable.h> #include <DirectXMath.h> namespace iberbar { namespace RHI { class IShaderState; class IShaderVariableTable; ...
#include <iostream> #include <math.h> #include <string> #include <algorithm> #include <sstream> #include <vector> using namespace std; bool isPrime(int n) { for (int i = 2; i <=sqrt(n); i++) { if (n%i == 0) { return false; } } return true; } int Reverse(int n) { ...
#ifndef LIGHTIMAGE_COLOR_H #define LIGHTIMAGE_COLOR_H #include "LightImage.h" namespace li { Image rgb2gray(Image &_im); } #endif //LIGHTIMAGE_COLOR_H
void setup() { // put your setup code here, to run once: pinMode(A0,INPUT_PULLUP); pinMode(3,OUTPUT); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: if(digitalRead(A0)==HIGH){ digitalWrite(3,HIGH); Serial.print("HIGH\n"); }else{ digitalWrite(3,LOW); Ser...
#include "utils.hpp" #include "serverlist_ptts.hpp" #include "channel_specify_ptts.hpp" namespace nora { namespace config { serverlist_ptts& serverlist_ptts_instance() { static serverlist_ptts inst; return inst; } ...
#include "segment_tree_abstract.h" #include <list> #ifndef CP_ALGORITHMS_AND_TRICKS_SEGMENT_TREE_COMPOSITE_H #define CP_ALGORITHMS_AND_TRICKS_SEGMENT_TREE_COMPOSITE_H template<class T> class SegTreeComposite { protected: std::list<SegTree<T>* >children_; public: void add(SegTree<T>* child) { this->ch...