text
stringlengths
8
6.88M
#include "device.h" // Device header #include "shape.h" #include "colors16bit.h" #ifndef RECTANGLE_H #define RECTANGLE_H class Rectangle : public Shape { private: uint16_t x, y, length; uint8_t width, thick; uint16_t * color; public: Rectangle (uint16_t x_, uint16_t y_, uint16_t * color_, uint16_t ...
#pragma once #include <iostream> #include <string> #include <vector> #include <list> #include <memory> #include <unordered_map> #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <fmt/printf.h> #include <fmt/format.h> namespace rl { // macros for declaring and implementing the resource container #defi...
#include <bits/stdc++.h> using namespace std; bool buddyStrings(string A, string B) { if (A.size() != B.size()) return false; bool trig = false; for (int i = 0; i < A.length(); i++) { if (trig && A[i] != B[i]) return false; else if (A[i] != B[i]) { ...
#include "graphics\Singularity.Graphics.h" namespace Singularity { namespace Graphics { namespace Devices { #pragma region Static Variables HardwareContext* HardwareContext::Instance = NULL; #pragma endregion #pragma region Constructors and Finalizers HardwareContext::HardwareContext...
#ifndef WALL_H //インクルードガード.ヘッダの2重読み込みを防止する #define WALL_H #include <cmath> using namespace std; #include "particle.h" /*//////////////////////////////////////////////////// Plane構造体 個々の平面壁の物理パラメータ,位置情報などを保持する構造体. 有限領域平面対応.エッジ衝突処理実装済み. 以下,全て単位はmks系 /////////////////////////////////////////////////...
/* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.BarCode for .NET API reference when the project is build. Please check https://docs.nuget.org/consume/nuget-faq for more information. If you do not wish to use NuGet, you can manually download Aspose.BarCode for .NET API from http://www.a...
// // VirtualMaze.hpp // teensyMicromouse // // Created by Yikealo Abraha on 5/5/17. // Copyright © 2017 Yikealo Abraha . All rights reserved. // #ifndef VirtualMaze_hpp #define VirtualMaze_hpp #include <stdio.h> #include <utility> #include <iostream> //my classes #include "Maze.h" #include "Vector.h" #include ...
#include "throttle.h" // Setup function for the throttle void setup_throttle() { analogReadResolution(12); analogWriteResolution(12); } // Returns the present percentage of the throttle pedal double get_position_throttle () { throttle_sensor_value = (analogRead(PIN_THROTTLE_IN)/4095.0) * 100; return t...
#include <iostream> const int MAXDIM = 10; //----------------------DO NOT CHANGE ANYTHING ABOVE THIS LINE------------------ // Write your function definitions here void read_matrix(int matrix[MAXDIM][MAXDIM], int &dim){ std::cin >> dim; for(int y = 0; y < dim; ++y){ for(int x = 0; x < dim; ++x){ std...
#include "oxygine-framework.h" #include "oxygine-sound.h" #include "res.h" #include "Game.h" #include "MainMenuScene.h" #include "GameScene.h" #include "GameMenu.h" #include "ResFontFT.h" using namespace oxygine; SoundPlayer player; void example_preinit() { } void example_init() { ResFontFT::initLibrary(); Res...
#include "Stack.h" Stack::Stack(int s) { arr = new char[s]; MaxSize = s; CurrentSize = 0; } Stack::Stack(const Stack& obj) { MaxSize = obj.MaxSize; CurrentSize = obj.CurrentSize; arr = new char[MaxSize]; for (int i = 0; i < CurrentSize; i++) { arr[i] = obj.arr[i]; } } Stack:: ~Stack() ...
#ifndef TURTLE_BASE_H #define TURTLE_BASE_H template<class Scalar_T,class TurtleState_T> class TurtleBase { protected: Scalar_T dDist; Scalar_T dAngle; // TurtleState_T InitialState; // public: // void Set_dDist(Scalar_T d_dist) { dDist = d_dist; } // void Set_dAngle(Scalar_T d_angle) { dAngle = d_angl...
class Solution { public: bool isHappy(int n) { set<int> s; while(n!=1 && s.find(n) == s.end()) { s.insert(n); int temp = 0; while(n > 0) { temp += pow(n%10,2); n = n / 10; } n = temp; ...
#ifndef GENERICLIST_H #define GENERICLIST_H #include <iostream> #include <stdexcept> #include <sstream> #include <iomanip> using namespace std; template<class T> struct GenericNode { T val; GenericNode<T>* next; }; template<class T> class GenericList { public: GenericList(); GenericList(int size, T ...
#include<bits/stdc++.h> using namespace std; int demUCLN(int x, int y){ if (y==0) return x; else return demUCLN(y,x%y); } void inUCLN(int x, int y){ if(demUCLN(x,y) > 1){ cout << "NO"; } else { cout << "YES"; } } int main(){ int a,b; cin >> a >> b; cout << demUCLN(a,b...
#ifndef _BCTEMPERATURE_H_ #define _BCTEMPERATURE_H_ #include "BCScalarBase.h" namespace BCBase { class BCBASEAPI BCTemperature : public BCScalarBase { public: BCTemperature(); ~BCTemperature() = default; protected: private: }; } #endif
#include "restclient.h" #include "mclient.h" #include <stdio.h> #include <thread> #include <iostream> #include <chrono> using namespace std::chrono; //using namespace std::literals; ClientApi::workerD ClientApi::metricData; ofstream ClientApi::workerFile; void ClientApi::sendMetrics() { auto start = std::chrono::...
#ifndef OPTICALSYSTEM_HPP #define OPTICALSYSTEM_HPP #include "optics/Interface.hpp" #include <vector> using namespace std; template <typename T> class OpticalSystem : public vector<Interface<T> > { public: /* Friend functions */ template <typename U> friend std::ostream& operator<<(std::ostream& out, cons...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
#ifndef GL_HYPERGRAPH_RENDERER_H #define GL_HYPERGRAPH_RENDERER_H #include "../GLExt.h" #include "../GLRenderer.h" #include "GLCatmullRom.h" class GLGeneralizedCylinder : public GLCatmullRom { private: float BeginTime; float EndTime; // float Radius; // protected: // virtual void DrawCall(IGLShaderProgram &re...
#ifdef HAS_VTK #include <vtkFloatArray.h> #include <vtkPoints.h> #include <vtkPointData.h> #include <vtkDataArray.h> #include <vtkStructuredGrid.h> #include <vtkStructuredGridReader.h> #include <vtkStructuredGridWriter.h> char *input_name = NULL, *output_name = NULL; void usage() { cerr << "Usage: vtkscale [vtk]...
 /// @file SatImp.cc /// @brief SatImp の実装ファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2005-2012 Yusuke Matsunaga /// All rights reserved. #include "SatImp.h" #include "ImpNode.h" #include "ImpInfo.h" #include "ImpHash.h" #include "ImpMgr.h" #include "ImpListRec.h" #include "YmLogic/SatSolver.h" #...
#ifndef FUZZYCORE_INPUT_TERM_DELETION_VIEW_H #define FUZZYCORE_INPUT_TERM_DELETION_VIEW_H #include "../abstractView/AbstractView.h" #include "../../models/inputTerm/InputTerm.h" class InputTermDeletionView : public AbstractView { private: std::vector<InputTerm> terms; void display_terms() const; public: ...
// // Created by wqy on 19-12-11. // #include "Term.h" using namespace esc; //Term::Term() {}
// Fill out your copyright notice in the Description page of Project Settings. #include "KotlinUnreal.h" #include "Modules/ModuleManager.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, KotlinUnreal, "KotlinUnreal" );
#include<bits/stdc++.h> #define N 100000 using namespace std; bool isVisited[N+1]; vector<int> node[N+1]; void dfs(int parent) { isVisited[parent]=true; for(auto x: node[parent]) if(!isVisited[x]) dfs(x); } int main() { int n,e; cin>>n>>e; int a,b; for(int i=0;i<e;i++) { cin>>a>>b; node[a].push_back(b)...
// // chain_test.cpp // design_pattern // // Created by jack on 14-7-23. // Copyright (c) 2014年 jack. All rights reserved. // #include "chain_test.h" int main(int argc, char **argv) { Manager *common=new CommonManager("A"); Manager *major=new Majordomo("B"); Manager *general=new GeneralManager("C"); ...
#include "Tree.h" Tree::Tree(){} Tree::Tree(int id, std::string name, int posX, int posY){ this->_id = id; this->_name = name; this->_posX = posX; this->_posY = posY; } Tree::~Tree(){}
#pragma once #include "data/traits.h" #include "tileview/TVView.h" #include "ListMaker.h" #include "ListModel.h" ////////////////////////////////////////////////////////////////////////// class CListWindow : public CTileViewImpl<CListWindow> , public process::host_listener { public: DEFINE_ERROR(fault, ...
#include<bits/stdc++.h> #include<time.h> #define ll long long #define testcase ll t;cin>>t;while(t--) #define timeb auto start = high_resolution_clock::now(); #define timee auto stop = high_resolution_clock::now();auto duration = duration_cast<seconds>(stop - start);cout << "Time taken by function: "<<duration.count(...
#include <iostream> #include <string> #define min(a, b) (a <= b)? a : b using namespace std; int main() { int T; // # of test cases int N; // # of patents int M; // # of months to complete int X; // # of workers work at most in a month int K; // # of workers string s; // working month preference of ...
#pragma once #include "opencv2/core/core.hpp" using namespace cv; class ImagePkg{ public: Mat* images[2]; ImagePkg(){} ~ImagePkg(){} };
#ifndef __ItemBullet_H__ #define __ItemBullet_H__ #include "Item.h" class ItemBullet : public Item { public: static ItemBullet* create(CCDictionary* dict); bool init(CCDictionary* dict); }; #endif
#include "CThread.h" CThreadException::CThreadException( const string &sMessage, bool blSysMsg /*= false*/ ) throw() :m_sMsg(sMessage) { if (blSysMsg) { m_sMsg.append(": "); m_sMsg.append(strerror(errno)); } } CThreadException::~CThreadException() throw () { } CThread::CThread() { } CThre...
#ifndef Factory_ERASER_H_ #define Factory_ERASER_H_ #include "Factory.h" class Factory_Eraser : public Factory { public: Factory_Eraser(); Botton* generateBotton(); Graph* generateGraph(); Painter* generatePainter(); }; #endif // !Factory_ERASER_H_ #pragma once
#include <UI/UI.hpp> #include <Durak/durak.hpp> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR pCmdLine, int) { try { UI::create(hInstance); // Create the UI Durak::load_settings(pCmdLine); // Load the game settings Durak::run(); UI::run(); } catch (const std::r...
// Functions can getting array or pointer as a parameter. These ways are similar logic. #include <iostream> using namespace std; // this function scales by 10 times each element of array. int scale( int *a, int size ){ // array method for ( int i = 0; i < size; i++) a [ i ] *= 10; /* pointer ar...
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; if(n == 1){ cout << "0\n"; } else if(n == 2){ cout << "0\n6\n"; } else if(n == 3){ cout << "0\n6\n28\n"; } else if(n == 4){ cout << "0\n6\n28\n96\n"; } else{ long long a[n + 1]; a[1] = 0; a[2] = 6...
#include <iostream> #include "Winsock2.h" using namespace std; #pragma comment(lib, "WS2_32.lib") string GetErrorMsgText(int code) // cформировать текст ошибки { string msgText; switch (code) // проверка кода возврата { case WSAEINTR: msgText = "WSAEINTR"; b...
#pragma once #include <streambuf> #include <libbig/big.hpp> namespace libbig { class EntryStream : public std::streambuf { public: EntryStream(Big& arch, Big::Entry& entry): m_arch(arch), m_entry(entry) { } virtual int overflow(int c) ...
//************************************************************************** //** //** 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 ...
/* SW Expert Academy 1767. 프로세서 연결하기 DFS + 백트래킹 */ #include <iostream> #include <algorithm> #include <vector> #include <math.h> #define MAX 13 using namespace std; struct node{ int r, c; node() {} node(int _r, int _c) : r(_r), c(_c) {} }; int T, N; int map[MAX][MAX]; int max_core, min_line; //...
#include "Utilities.h" #include <fstream> void Utilities::addValues(std::vector<float>* vec, int startPos, std::string* lineString) { int newPosition = lineString->find(' ', startPos); while (newPosition != std::string::npos) { newPosition = lineString->find(' ', startPos); vec->pu...
#include<iostream> #include<stdlib.h> #include<string> using namespace std; int main(){ int N=0,a=0,b=0; string str; cin>>N; if(N<1||N>1000) exit(-1); cin>>str; int len=str.length(); if(len<1||len>100000) exit(-1); int i=0,temp=0; int j=0; for(j=0;j<N;++j){ cin>>a>>b; if(a<1||a>len||b<1...
// // Created by artim on 15.06.2020. // #ifndef RADIOSTATION_DLL_SERVER_H #define RADIOSTATION_DLL_SERVER_H #include "../tools/Socket.h" #include <list> #include "message.h" #include <mutex> #include <thread> class Server { bool exit_flag; std::mutex list_mutex{}; Socket socket; std::list<Socket*...
#include "CTriggerSphere.h" #include <boost/foreach.hpp> #include "CBaseEngine.h" CTriggerSphere::CTriggerSphere(): CWorldEntity(), m_radius(1.), m_classname("player") {} void CTriggerSphere::think(){ BOOST_FOREACH(CBaseEntity* ent, engine->ents->m_entities){ if(ent->m_descriptor->getClassna...
/* 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...
#ifndef SETTINGS_H #define SETTINGS_H #include <QObject> #include "task.h" #include <QDebug> class Settings : public QObject { Q_OBJECT public: explicit Settings(QObject *parent = 0); QVector<Task> tasks; int curTaskID; void setEnteredText(QString text); bool checkIn...
#ifndef CONV2D_H_ #define CONV2D_H_ #include "Module.h" namespace StaticNet { template <typename... T> class Conv2D { Conv2D() = delete; }; template <class T, size_t IDim, size_t ODim, size_t C, size_t FN> class Conv2D<Tensor<T, C, IDim, IDim>, Tensor<T, FN, ODim, ODim>> : pub...
/** * * @file TimeSeriesBuffer.cpp * @author NaokiTakahashi * **/ #include "TimeSeriesBuffer.hpp" namespace RobotStatus { template <typename T> TimeSeriesBuffer<T>::TimeSeriesBuffer(const typename Buffer<TimeSeriesData<T>>::SizeType &size) : Buffer<TimeSeriesData<T>>(size) { } /* template class TimeS...
// // Created by wiktor on 09.04.18. //
#include "CDNode.h" void CDNode::start() { } void CDNode::loop() { }
/* ============================================================================ * Copyright (c) 2009-2016 BlueQuartz Software, LLC * * 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 ...
#include <ncurses.h> #include <unistd.h> #include "Game.hpp" int main(void) { initscr(); cbreak(); noecho(); keypad(stdscr, TRUE); nodelay(stdscr, TRUE); curs_set(FALSE); Game *game = new Game(); game->start(); delwin(stdscr); endwin(); }
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; typedef long long LL; int a[1000001]; LL compute(LL x) { if(x<=11) return x; else { if(x<=1000000) { if(a[x]==0) { a[x]=m...
#pragma once #include "CSomething.h" #include "CBullet.h" #include "CUserInput.h" class CCharacter : public CSomething { list<int> V_Items; int V_Power;//bullet power int V_InvTime; int V_SuperTime; T2Double V_OldMP; T2Double V_LookAngle; void M_CalculateLook(void); public: virtual void M_Loop(double t); ...
#include "Base.h" #include "Derived1.h" #include "Derived2.h" int main() { Base* base = new Derived1(); // Apres l'appel, derived pointe vers l'instance de Derived // car base pointe en fait vers une instance de Derived1 Derived1* derived1 = dynamic_cast<Derived1*>(base); // Apres l'appel, derived2 vaut 0 // c...
/* * * @APPLE_LICENSE_HEADER_START@ * * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file...
// // Created by 梁栋 on 2019-03-18. // #include <vector> #include <iostream> using namespace std; class Solution { public: int trap(vector<int>& height) { // 时间复杂度 N^2, 空间复杂度1 // if(height.empty()) // return 0; // int res = 0; // for(int i=1;i<height.size()-1;i++){ // ...
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<vector<int>> pathSum(TreeNode* root, int sum) { vector<int> temp; backtr...
#include "simulation/all_simu.h" int main() { DirectionalAntennaImprove cur; cur.startSimulation(); return 0; }
#include <iostream> #include <cmath> #include <fstream> #include <iomanip> const int niter = 10000; const int ntau = 40; const double dtau = 1e0; int BoxMuller(double& p, double& q) { double pi = 2e0*asin(1e0); double r = (double)rand()/RAND_MAX; double s = (double)rand()/RAND_MAX; p = sqrt(-2e0*log...
#ifndef BACHERO_ENGINE_COMPONENTS_TRANSFORM_COMPONENT #define BACHERO_ENGINE_COMPONENTS_TRANSFORM_COMPONENT #include "Engine/ECS/Component.h" #include "Engine/Math/Vector2.h" namespace Engine { class TransformComponent : public ECS::DataOnlyComponent { public: Math::Vector2f position; float ro...
/*#######. ########",#: #########',##". ##'##'## .##',##. ## ## ## # ##",#. ## ## ## ## ##' ## ## ## :## ## ## ##*/ #include <string> #include <iostream> #include <sstream> #include "Brain.hpp" Brain::Brain() { std::cout << "Created Brain" << std::endl; } std::string Brain::identi...
//--------------------------------------------------------------------------- #ifndef UnitTesterW3CH #define UnitTesterW3CH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> #include <ExtCtrls.hpp> #...
/* * This program is to illustrate this pointer. * Simply it is address of the current working object of a class. */ #include<iostream> // Header using namespace std; class Vector{ // Vector class public: Vector(int x,int y){ // Constructor this->x=x; /* Here the name of the passed variable and the class m...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
#ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include <QTableWidget> #include <QTableWidgetItem> #include "windows.h" #include <tlhelp32.h> #include "integrityfile.h" extern QString level; extern QString FileNameGlobal; QT_BEGIN_NAMESPACE namespace Ui { class Dialog; } QT_END_NAMESPACE class Dialog : public ...
// // UICurrencyLayer.cpp // Boids // // Created by chenyanjie on 6/9/15. // // #include "UICurrencyLayer.h" #include "../Utils.h" using namespace cocos2d; #define CURRENCY_LAYER_FILE "ui/page/ui_cost.csb" UICurrencyLayer::UICurrencyLayer() { } UICurrencyLayer::~UICurrencyLayer() { } UICurrencyLayer* UICu...
class Solution { private: vector<vector<string>> result; vector<string> path; void backtracking(const string& s,int index){ if(index>=s.size()){ result.push_back(path); return; } for(int i=index;i<s.size();++i){ if(isPalindrome(s,index,i)...
// // Created by 王润基 on 2017/4/16. // #ifndef INC_2RAYTRACE_RAYTRACER_H #define INC_2RAYTRACE_RAYTRACER_H #include "Renderer.h" #include <vector> class RayTracer: public Renderer { protected: bool saveLights = false; std::vector<Light>* lights = new std::vector<Light>(); Color epsColor = Color(1e-3f, 1e-...
#ifndef __MenuButtonContainer__ #define __MenuButtonContainer__ #include "MenuButton.h" #include <vector> using namespace std; class MenuButtonContainer : public GameObject { public: MenuButtonContainer() {} ~MenuButtonContainer() {} void addButton(MenuButton* button); virtual void draw(); virtu...
/* * EBYTE LoRa E32 Series * * AUTHOR: Renzo Mischianti * VERSION: 1.5.13 * * https://www.mischianti.org/category/my-libraries/lora-e32-devices/ * * The MIT License (MIT) * * Copyright (c) 2019 Renzo Mischianti www.mischianti.org All right reserved. * * You may copy, alter and reuse this code in any way yo...
#include<iostream> #include <cstdio> #include <string.h> #include <cmath> #include <algorithm> using namespace std; int find(char** s) { //cout<<*(*s)<<endl; if (*((*s)++) == 'l') { return 0; } return max(find(s), find(s)) + 1; } int main() { int t; //char arr[...
// 567. Permutation in String // Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's permutations is the substring of the second string. // Example 1: // Input: s1 = "ab" s2 = "eidbaooo" // Output: True // Explanation: s2 contai...
//----------------------------------------------------------------------------// // Unpublished work. Copyright 2021 Siemens // // // // This material contains trade secrets or otherwise confidential ...
#ifndef __MF_NODE_EXPRESSION_ADDRESSING_H__ #define __MF_NODE_EXPRESSION_ADDRESSING_H__ #include <cdk/nodes/expressions/BinaryExpression.h> #include "SemanticProcessor.h" namespace mayfly { namespace node { namespace expression { /** * Class for describing the addressing expression */ ...
#pragma once #ifndef STATE_HPP #define STATE_HPP #include <SFML/Graphics/RenderWindow.hpp> #include "inc/utility.hpp" #include "inc/texture_manager.hpp" namespace astroblaster { class State { public: State(sf::RenderWindow &window, TextureManager &tm); virtual ~State(); //void input(); virtual void int...
#include "test.h" cooAxis::cooAxis(int xx, int yy) { this->x = xx; this->y = yy; } const cooAxis operator+(const cooAxis &a, const cooAxis &b) { return cooAxis(a.x + b.x, a.y + b.y); } const cooAxis operator-(const cooAxis &a, const cooAxis &b) { return cooAxis(a.x - b.x, a.y - b.y); } cooAxis operator+=(cooAx...
#include "stdafx.h" #include "LtDerrota.h" void LtDerrota::actualizarMatrizModelo() { modelo = mat4(1.0f); modelo = translate(modelo, coordenadas); modelo = rotate(modelo, 3.14159f, vec3(0.0f, 1.0f, 0.0f)); modelo = scale(modelo, vec3(2.0f, 2.0f, 2.0f)); } LtDerrota::LtDerrota() { //============================...
#include<bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> using namespace std; //using NAMspace __gnu_pbds; //typedef tree<LL, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds; #define LL long long #define ull u...
/* 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...
//int video_img_cap(); //int video_play(); //int cam_play(); //int cam_img_cap(); //int cam_enum(); int cam_select_cap(); int main() { cam_select_cap(); }
#include "server.h" #include "deserialize.h" #include "block.h" #include "transaction.h" #define __CMD_HANDLER //just helper macro static Status __CMD_HANDLER sendBlock(const std::string &data) { std::cout << "going to send message: " << data << std::endl; //TODO. MsgBlock msg; return Status::OK; } static Sta...
#include "jDynamicLoad.h" #include <windows.h> #include <iostream> #include <tchar.h> using namespace std; list<jDll*> dynamicLoad::DynamicLibraries = list<jDll*>(); void dynamicLoad::load(wstring path, wstring name) { wstring strg; strg = path; strg += name; HINSTANCE instance = LoadLibrary((LPCWSTR)strg.c_str()...
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; //公众号:一航代码 进阶版判断素数 bool isPrime(int num) { if (num <= 3) { return num > 1; } // 不在6的倍数两侧的一定不是质数 if (num % 6 != 1 && num % 6 != 5) { return false; } for (int i = 5; ...
#include "PermutationStream.h" #include <vector> PermutationStream::PermutationStream( std::vector<char> symbols, int variationSize): symbols(symbols), variationSize(variationSize) { PermutationState initial; initial.targetSize = variationSize; for (int i = 0; i < symbols.size(); i++) { ...
#include <bits/stdc++.h> #define MAX_V 1024 using namespace std; int N, M; // tamanho das linhas e colunas da matriz char G[MAX_V][MAX_V]; int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, -1, 1}; int flood_fill(int x, int y, char color, char new_color) { if (x < 0 || y < 0 || x >= N || y >= M) return 0; ...
// // Created by chloe on 01/06/18. // #include "../../header/Graph.h" Graph::Graph(const int n) { nodeCount = n; edgeCount = 0; inS = new bool[nodeCount]; } Graph::~Graph() { } int Graph::getNodeCount() { return nodeCount; } int Graph::getEdgeCount() { return edgeCount; } void Graph::initInS...
#include "hollow_process.h" PPEB GetRemotePEBAddress(HANDLE hProcess) { PPEB retAddr = nullptr; PROCESS_BASIC_INFORMATION ProcInfo = {}; DWORD dwReturnLength = 0; NTSTATUS status = NtQueryInformationProcess(hProcess, ProcessBasicInformation, &ProcInfo, ...
#include "Menu.h" #include "Macro.h" #include "Controller.h" #include <chrono> #include<thread> using namespace std::chrono_literals; Menu::Menu() { std::string str[2] = { "new game","exit" }; for (int i = 0; i < 2; i++) { m_text.push_back( sf::Text(str[i], m_res.getFontTexture())); m_text[i].setPosition(0, H...
#include <iostream> #include<cmath> using namespace std; void primeFactors(long long int number); int main() { long long int t,number; cin>>t; while(t--) { cin>>number; primeFactors(number); } return 0; } void primeFactors(long long int number) { long long int coun = 0,p = 1,s,prod = 1,flag = 0,...
/************************************************************* * Copyright © 2015, Felix Bytow <felix.bytow@googlemail.com * * * * See the file COPYING for copying permissions. * *************************************************************/ #in...
#include "frameio.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> frameio net; // gives us access to the raw network struct ether_frame // handy template for 802.3/DIX frames { octet dst_mac[6]; // destination MAC address octet src_mac[6]; // sourc...
#include "server.h" #include "ui_server.h" #include <QMessageBox> #include <QFileDialog> #include <QFileInfo> Server::Server(QWidget *parent) : QWidget(parent), ui(new Ui::Server) { ui->setupUi(this); //实例化监听对象 tcpServer = new QTcpServer(this); //监听 端口8888 bool isOK = tcpServer->listen(QHo...
#include "help.h" Help::Help(QWidget *parent) : QWidget(parent) { ui.setupUi(this); } Help::Help(int Type_Displayed_Page,QWidget *parent) : QWidget(parent) { ui.setupUi(this); connect(ui.Previous_Page, SIGNAL(clicked()), this, SLOT(Previous_Page())); connect(ui.Next_Page, SIGNAL(clicked()), this, SLOT(Next_Pag...
#include<bits/stdc++.h> using namespace std; class node { public: int data; node *next; node(int data = 0, node* next = NULL) { this -> data = data; this -> next = next; } }; class linkedList { public: node *Head, *Tail; linkedList() { Head = NULL; ...
// This file has been generated by Py++. #ifndef PropertyDefinitionColourRect_hpp__pyplusplus_wrapper #define PropertyDefinitionColourRect_hpp__pyplusplus_wrapper void register_PropertyDefinitionColourRect_class(); #endif//PropertyDefinitionColourRect_hpp__pyplusplus_wrapper
#include <sstream> #include <iostream> #include <string> #include <graphics.h> #include "Partida.h" //En las clases omiti comentar los set y gets más básicos, como los de las varibales primitivas, ya que es algo que creo se puede obviar. //Desde ya informo lo que el proyecto no hace: manejo de archivos, y que la compu...
// This file has been generated by Py++. #ifndef XMLSerializer_hpp__pyplusplus_wrapper #define XMLSerializer_hpp__pyplusplus_wrapper void register_XMLSerializer_class(); #endif//XMLSerializer_hpp__pyplusplus_wrapper