text
stringlengths
8
6.88M
#ifndef TRANSFERT_H #define TRANSFERT_H #include "clientele.h" #include "personne.h" #include"QString" #include "QSqlQueryModel" #include "QDate" #include <QPalette> #include <QDesktopWidget> #include <QtGui> #include "personne.h" class Transfert {private: int ID_client_t; QString Type; QString Position ...
#ifndef VINO_H #define VINO_H #include <string> #include <iostream> #include <iomanip> #include <sstream> using std::string; class Vino { private: string nome; string nazione; string regione; string produttore; string aggettivo; string colore; string img64; double prezzo; double g...
/* * Operation System Shared Linkage Library Wrapper Implementation * Copyright(C) 2003-2016 Jinhao * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * @file: _/SharedWrapper.hpp * @description: */ #p...
#include <iostream> #include <cmath> using namespace std; bool isPrime(int x) { //Check if a number is prime if(x <= 1) return false; if(x == 2 || x == 3) return true; else if (x % 2 == 0) return false; else { for (int i = 3; i < (int)sqrt((float)x)+1; i++) { if (x % i == 0...
//#include<bits/stdc++.h> #include<iostream> #include<vector> using namespace std; int main(){ vector<int> haha; int num; for(int i=0;i<10;i++){ cin>>num; haha.push_back(num); } for(int i=0;i<10;i++){ cout<<haha[i]; } return 0; }
#pragma once #include <utility> #include <iostream> #include "../JuceLibraryCode/JuceHeader.h" #include "Global.h" #include "AddFood.h" #include "AddNote.h" #include "SceneManager.h" #include <boost/any.hpp> #include <memory> // std::unique_ptr #include <vector> // std::vector #include "DailyPlanImpl.h" #in...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software ASA. 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 GADGET_SUPPORT #include "modules/ga...
#include<bits/stdc++.h> using namespace std; #define pi 3.141592653589793 main() { double a,b,c,s,area_of_triangle,r,area_of_circle,sunflower,radious_of_incr; double area_of_incr,red,violets; while(scanf("%lf %lf %lf",&a,&b,&c)==3) { if(a<=b&&b<=c&&c<=1000){ s = (a+b+c)/2.00; ar...
#ifndef Q06_H #define Q06_H #include<iostream> using namespace std; /** 串 * 存储结构:定长顺序存储(数组)、堆(动态)分配存储(链表) * * 字符串匹配 * 1. 暴力匹配 * 2. KMP算法 */ // 1. 暴力匹配 int hardMatch(string haystack, string needle); // 2. KMP算法 void cal_next(char *str, int *next, int len); int KMP(char *str, int slen, char *ptr, int plen); #...
#include <stdio.h> int main(void) { char title[13] = "Cloud Atlas"; int year = 2012; float budget = 128.5; float income = 130.5; printf("-----------------------------------Random film-----------------------------\n"); printf("|%-12s | %13s | %15s | %20s ) |\n", "Title", "Released year", "Budge...
#include "BaseObject.h" BaseObject::BaseObject() { position = glm::vec3(0); direction = glm::vec3(1.0f, 0.0f, 0.0f); directionAngle = 0; modelMatrix = glm::mat4(1); isDestroyed = false; } BaseObject::BaseObject(glm::vec3 fposition, glm::vec3 fdirection) { position = fposition; direction = fdirection; isDest...
#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...
#pragma once #include "IServer.h" #include "IOCompletionContext.h" class _SERVERAPI_EXPORT_ IOCompletionServer { public: IOCompletionServer(void); virtual ~IOCompletionServer(void); protected: //--------------------------------------------------------------------------- //创建完成端口 //-------------------------------...
#include <unistd.h> #include <pool_keeper.hpp> #include <worker.hpp> #include <algorithm> #include <iostream> #include <thread> namespace thread_pool { pool_keeper::pool_keeper(int pool_size, int socket_fd) : socket_fd_(socket_fd) { int i; pool_size_ = pool_size; for (i=0; i<pool_size_; i++) { ...
#include <cstdarg> #include <cstdint> #include <cstdlib> #include <new> struct Foo; struct FooRef { Foo *ptr; }; extern "C" { FooRef FooRef_create(); void FooRef_sayHello(FooRef self, uint8_t times) /*a comment!*/; void rust_print_hello_world(); } // extern "C"
class equip_lever : CA_Magazine { scope = 2; count = 1; type = 256; picture = "\dayz_equip\textures\equip_lever.paa"; model = "\z\addons\dayz_epoch_w\magazine\dze_handle.p3d"; descriptionShort = $STR_EQUIP_DESC_LEVER; displayName = $STR_EQUIP_NAME_LEVER; }; class ItemSledgeHead : CA_Magazine { scope = 2; cou...
#pragma once #include "utils/ptts.hpp" #include "proto/config_mirror.pb.h" using namespace std; namespace pc = proto::config; namespace nora { namespace config { using mirror_ptts = ptts<pc::mirror>; mirror_ptts& mirror_ptts_instance(); void mirror_ptts_set_fu...
/////////////////////////////////////////////////////////////////////////////// // bench.cpp - Compare speed of different parsers // /////////////////////////////////////////////////////////////////////////////// #define EXPAT 1 #ifdef WIN32 // Because I couldn't compile xerces on Linux #define XERCES 1 #endif #ifde...
#ifndef DUMMYCLASSIFIER_HPP #define DUMMYCLASSIFIER_HPP #include "Classifier.hpp" /** * @brief Example Classifier class. Extends Classifier class and * implements basic methods */ class DummyClassifier: public Classifier { public: DummyClassifier(int, Conf &); ClassificationResult *Classify(DetectionResu...
// // Created by 钟奇龙 on 2019-05-10. // #include <string> #include <vector> #include <iostream> using namespace std; bool compare(string a,string b){ return a + b < b + a; } string lowestString(vector<string> arr){ if(arr.size() == 0) return ""; sort(arr.begin(),arr.end(),compare); string res = ""; ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2012 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef MODULES_OTL_MAP_H #define MODULES_OTL_MAP_H #include "module...
// // Packet.cpp // SAD // // Created by Marquez, Richard A on 4/11/15. // Copyright (c) 2015 Richard Marquez. All rights reserved. // #include "Packet.h" Packet::Packet(float heading, vector<Range> RFData) { this->heading = heading; this->RFData = RFData; }
#include "SLAM.hpp" using namespace std; using namespace cv; Mat imdisp_debug(0,0, CV_32F); void SLAM::waitForInit() { do { mongoose.FetchMongoose(); } while (!mongoose.isInit); } matf SLAM::CameraState::getLocalCoordinatesPoint(const matf & p2d) const { matf out(3,3); matf a0 = out.col(0), a1 = out.col(...
#pragma once #include <functional> #include "integration.hpp" #include "sparse_vector.hpp" namespace Time { template <typename Basis> class LinearFunctional { public: virtual ~LinearFunctional<Basis>() {} SparseVector<Basis> Eval(const SparseIndices<Basis> &indices) const { SparseVector<Basis> out; out...
#include "menu.h" #include "visitor.h" #include "sort_by_price_visitor.h" #include <string> Menu::Menu(){} Menu::Menu(std::string newName, std::string newDescription) :_name(newName), _description(newDescription) {} std::string Menu::GetName() { return _name; } std::string Menu::G...
// Created on: 1993-07-09 // Created by: Isabelle GRIGNON // Copyright (c) 1993-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 G...
/** Copyright (c) 2015 Eric Bruneton All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follo...
/* * video.cpp * * Created on: Apr 14, 2012 * Author: edge87 */
/* * loadsave.h */ #ifndef LOADSAVE_H #define LOADSAVE_H #include <QFile> #include <QTextStream> using namespace std; class LoadSave { static LoadSave* loadsave; LoadSave() {} public: static LoadSave& instance(); // loads a save state and configures objects void load(QString filename); // configures obje...
#include <iostream> #include <vector> using namespace std; //暴力法 class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { int i, j, k, row, col; //基本思想:两次循环对9*9的数独每一个数字遍历一遍,然后比较该数字在每一行、每一列、每一宫是否有重复数字,有则返回false for (i = 0; i < 9; i++) { for (j = 0; j < 9; j+...
#include "add_observation_noise.h" #include "linalg.h" #include <cstdlib> #include <cmath> /***************************************************************************** * IMPLEMENTATION STATUS * Done: Base implementation, unit test * ToDo: Start optimizing *********************************************************...
#include "stdafx.h" #include "UIAnimator.h" void UIAnimator::OnDestroy() { for (auto sp : m_Sprits) DeleteGO(sp); for (auto o : m_anims) delete o; } void UIAnimator::loadUI(const wchar_t* path, std::function<SpriteRender* (sUI* ui,bool &isfook)> func) { FILE* file = nullptr; _wfopen_s(&file, path, L"rb"); ...
// // Player.h // GLWF // // Created by Rodrigo Castro Ramos on 1/29/19. // Copyright © 2019 Rodrigo Castro Ramos. All rights reserved. // #ifndef Player_h #define Player_h #include <vector> // GL Includes #define GLEW_STATIC #include <GL/glew.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #i...
// // Created by Lee on 2019-04-23. // #include "ImageFileManager.h" #include <QFileInfo> #include <QFileDialog> #include <QDir> #include <QDebug> #include <QProcess> Photo ImageFileManager::uploadPhotoFileToGithub(QWidget * parent) { QString fileName = QFileDialog::getOpenFileName(parent, ("Open File"), ...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> typedef long double LD...
#ifndef CDT_CORE_STRINGUTILS_HPP #define CDT_CORE_STRINGUTILS_HPP #include <string> #include <vector> #include "includes/libexport.h" namespace cdt { class CDT_API StringUtils { public: static std::string padLeft(const std::string& str, const char c, size_t length); static std::string padRight(const std::string& ...
#pragma once #include "utils.hpp" #include "utils/ptts.hpp" #include "proto/config_relation.pb.h" using namespace std; namespace pc = proto::config; namespace nora { namespace config { using relation_logic_ptts = ptts<pc::relation_logic>; relation_logic_ptts& relation_logic_p...
#include "fixedp.h" #include "Globals.h" #include "rrrandom.h" #include "rrrus_function.h" #include "rrrus_hsv2rgb.h" #include "Stripes.h" // 0 bits int, 8 bits fraction. typedef fixedp<false, 0, 8> ufixdot8; void Stripes::setup() { // Start at 0 speed, hold for 5 seconds. _speedAnim.animate(0, 0, 5_s); _speedA...
// Fill out your copyright notice in the Description page of Project Settings. #include "SLRangedBasicProjectile.h" #include "SMITElabs/Public/SLGod.h" // Sets default values ASLRangedBasicProjectile::ASLRangedBasicProjectile() { // Set this actor to call Tick() every frame. You can turn this off to improve perfo...
#include <iostream> #include "Vector2D.h" #include "Vector3D.h" #include "Matrix.h" using namespace std; int main() { return 0; }
// WhitewoodEncryptionRandNumProvider.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #include "WhitewoodEncryptionRandNumProvider.h" // This is an example of an exported variable WHITEWOODENCRYPTIONRANDNUMPROVIDER_API int nWhitewoodEncryptionRandNumProvider=0; // This is an exa...
/* ** EPITECH PROJECT, 2019 ** tek3 ** File description: ** Codec */ #include "Codec.hpp" #include <stdexcept> babel::Codec::Codec() { _encoder = opus_encoder_create(SAMPLE_RATE, NUM_CHANNELS, APPLICATION, &_error); if (_error != OPUS_OK) throw std::runtime_error("error"); _error = opus_encoder_ct...
/** * @Author Vladimir Hardy */ #include <iostream> #include <fstream> #include <sstream> #include <cstring> #include <vector> // To access members of a structure, use the dot operator. To access members of a structure through a pointer, use the arrow operator. struct node { std::string data; node *next; ...
/* * Copyright 2020 OmniSci, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
#ifndef SOPNET_GROUND_TRUTH_EXTRACTOR_H__ #define SOPNET_GROUND_TRUTH_EXTRACTOR_H__ #include <vector> #include <boost/shared_ptr.hpp> #include <pipeline/all.h> #include <imageprocessing/ImageStack.h> #include <sopnet/segments/Segments.h> // forward declarations class ImageExtractor; class SliceExtractor; class Grou...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/SaveGame.h" #include "NameScore.generated.h" USTRUCT() struct FSingle { GENERATED_BODY() public: UPROPERTY(VisibleAnywhere, Category = Basic) FString PlayerName; UPROP...
#ifndef _RaseProcess_H_ #define _RaseProcess_H_ #include "BaseProcess.h" class Table; class Player; class RaseProcess : public BaseProcess { public: RaseProcess(); virtual ~RaseProcess(); int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket, Context* pt); int doResponse(CDLSocketHandler* clie...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; int a[10010],f[10010]; int main() { int n; scanf("%d",&n); f[0] = 0; int loc = 0; for (int ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef OP_LINKS_VIEW_H #define OP_LINKS_VIEW_H #include "a...
#include<iostream> using namespace std; typedef struct node { int a; struct node *next; }Node; node *head, *end1; void create(){ node *temp = new Node; cin>>temp->a; temp->next=NULL; if(head == NULL) { head = temp; end1 = temp; } else { end1->next =...
#ifndef DEFINE_H #define DEFINE_H #include <QString> #include <optional> namespace hls { class Define { public: std::optional<QString> name() const; void setName(const std::optional<QString> &name); std::optional<QString> value() const; void setValue(const std::optional<QString> &value); std::optional<Q...
#include <iostream> #include <vector> bool isPrime(int n) { for(int i = 2; i * i <= n;i++) { if(n % i == 0) return false; } return true; } int countPrimes(int n) { vector<bool> isPrim(n,true); for(int i = 2;i * i < n; i++) { if(isPrim[i]) for(int j = i * i; j < n; j+=i) isPr...
#include <iostream> using namespace std; class { public: void fun(){ cout<<"Hello World"; } }a; int main(){ a.fun(); return 0; }
#include <iostream> #include <vector> using namespace std; string soliMensaje() ; int soliCantidadMensaje() ; vector<string> matriz() ; template <typename T> void mostrarMatriz( vector<T> ) ; int main() { vector<string> mensaje ; mensaje = matriz() ; cout << "Mostrar contenido de la matri...
#ifndef DIALOGFILTER_H #define DIALOGFILTER_H // Qt #include <QDialog> #include <QList> #include <QToolBar> #include <QAction> #include <QActionGroup> #include <QThreadPool> #include <QMessageBox> #include <QProgressBar> #include <QStackedWidget> #include <QTreeWidget> #include <QTreeWidgetItem> // Grids #include ".....
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * Code in this file has been copied from adjunct/quick/managers/D...
#pragma once #include <string> using namespace std; class Sportsman { public: Sportsman() = default; Sportsman(string FIO, double height, double weight); double GetHeight() const; double GetWeight() const; string GetFIO() const; private: string m_FIO; double m_height; double m_weight; };
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef SAVEWITHINLINE_H #define SAVEWITHINLINE_H #ifdef SAVE_S...
/*! * \file mpost.h * \author Simon Coakley * \date 2012 * \copyright Copyright (c) 2012 University of Sheffield * \brief Header file for mpost */ #ifndef MPOST_H_ #define MPOST_H_ #include <QMetaType> #include <QPainter> #include "./variable.h" #include "./memorymodel.h" struct statement { QString lhs; ...
// // Created by Dawid Szymański on 2019-06-01. // #include <iostream> int exercise07() { int length, temporary = -1, sum = 0; std::cout << "Podaj wielkosc tablicy : "; std::cin >> length; int table[length]; if (length <=0) { std::cout << "Unprocessable Entity"; return 422; } ...
#include<iostream> #include"graph-parser-utilities.h" using namespace std; int main() { graph *A = new graph(); string inp; while(true) { A->currentState(); cout<<"\nWhere to next? "; if(inp=="stop") break; cin>>inp; A->moveTo(inp); } }
#ifndef BATTLE_SYSTEM_H #define BATTLE_SYSTEM_H #include <map> #include "../Internal/SingletonTemplate.h" #include "../AI/AIBase.h" #include "../Objects/Characters/CharacterEntity.h" #include "../Objects/Characters/Player.h" using std::map; class BattleSystem : public SingletonTemplate<BattleSystem> { map<size_t, C...
#include <iostream> #include <string> #include <vector> using namespace std; int main() { string a; string b; string c; cin >> a; cin >> b; cin >> c; vector<int> aCount(26); vector<int> bCount(26); vector<int> cCount(26); for(int i = 0; i < a.size(); ++i) { ...
#include <QDate> #include <QStringList> #include <iostream> using std::cout; using std::endl; static const unsigned int grades[4] = { 1, 2, 5, 8 }; static const QStringList kids = QStringList() << "A" << "E" << "K" << "S"; static const QStringList gradeNames = QStringList() << "Kindergarten" ...
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. /*============================================================================= OpenGLDrv.h: Public OpenGL RHI definitions. =============================================================================*/ #pragma once // Dependencies. //#include "Core.h" #...
//===-- server/server-app.hh - ServerApp class definition -------*- C++ -*-===// // // ODB Library // Author: Steven Lariau // //===----------------------------------------------------------------------===// /// /// \file /// The master class server side, responsible for controlling all the parts of /// the debugger: c...
#include <cppunit/extensions/HelperMacros.h> #include "cppunit/BetterAssert.h" #include "model/SensorData.h" using namespace Poco; using namespace std; namespace BeeeOn { class SensorDataTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SensorDataTest); CPPUNIT_TEST(testCreate); CPPUNIT_TEST(testIterator);...
#include<iostream> using namespace std; struct node { int data; node *next; }*head; void addNode(int); void display(); void reverseLL(node**); int main() { int a[] = {1,23,3,45,5,6,7}; int length = sizeof(a)/sizeof(a[0]); for(int i=0; i<length; i++) addNode(a[i]); display(); reverseLL(&head); ...
#include "GreeJniHelper.h" #include <string.h> #include "CCDirector.h" #include "jni/Java_org_cocos2dx_lib_Cocos2dxGreePlatform.h" using namespace cocos2d; using namespace cocos2d::gree_extension; jobject gCreateScoreListenerObj; extern "C" { // Score std::string getScoreIdJni(jobject obj){ JniMethodInfo t; ...
/* Author: Mincheul Kang */ #include <boost/chrono.hpp> #include <boost/foreach.hpp> #include <ompl/base/SpaceInformation.h> #include <harmonious_sampling/ManipulationRegion.h> MainpulationRegion::MainpulationRegion(planning_scene::PlanningScenePtr& planning_scene, std::string ...
//email address: hung.nguyen@student.tut.fi - student id: 272585 //email address: sanghun.2.lee@student.tut.fi - student id: 272571 #include <iostream> #include <string> #include <vector> using namespace std; //Splitter to split the date string to int-type components. //Return a vector of integers based on the in...
// Created on: 1998-06-08 // Created by: data exchange team // Copyright (c) 1998-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...
#ifndef JOYSTICK_EXCEPTION_HPP #define JOYSTICK_EXCEPTION_HPP #include <string> namespace joystick { class exception : public std::exception { std::string msg_; public: exception(const std::string &msg) : msg_(msg) {} const char *what() const noexcept override { ...
#pragma once #include <sstream> #include <cmath> #include <assert.h> #include "object.h" #include "array.h" #include "utf8.h" namespace json { ///enables parsing numbers as precise numbers /** this option is global for whole application. If you need specify * option locally, construct Parse instance with correc...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <map> typedef long long LL; typedef unsigned long long ULL; #define PI 3.141592653589...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2008 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef _SSL_API_H_ #define _SSL_API_H_ #if defined(_NATIVE_SSL_S...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #inc...
#ifndef SENSOR_MODEL_H_ #define SENSOR_MODEL_H_ #include "models.h" namespace model { template<class T> class SimpleSensorVelocityModel : public SensorModel<T> { public: SimpleSensorVelocityModel() : SensorModel<T>() {} ~SimpleSensorVelocityModel...
#include <posteffects/IdlePostEffect.h> #include <OGLML/PostProcessor.h> namespace breakout { IdlePostEffect::IdlePostEffect(oglml::PostProcessor* pp) : APostEffectState(pp) { } IdlePostEffect::~IdlePostEffect() { } void IdlePostEffect::Awake() { } void IdlePostEffect::Begin() { } void IdlePost...
#pragma once #include "Forms/EntitiesForm/EntitiesForm.h" class User; class UsersForm : public EntitiesForm { Q_OBJECT public: explicit UsersForm(QWidget *parent = nullptr); void showRemoveUserDialog(uint userIndex); void showEditUserView(const User &user); void showAddUserView(); signals: ...
#include <algorithm> #include <iostream> #include <vector> int main() { using namespace std; vector<int> numsVector { 61, 41, 231, 764, 45 }; sort(numsVector.begin(), numsVector.end(), std::greater<int>()); for (int num : numsVector) { cout << num << " "; } cout << endl << endl; ...
#ifndef SHOETCPCLIENT_H #define SHOETCPCLIENT_H #include <QHostAddress> #include <QTcpSocket> #include <QObject> #include "shoemanagernetwork_global.h" #include "ShoeManagerTcpSocket.hpp" class SHOEMANAGERNETWORKSHARED_EXPORT ShoeManagerTcpClient : public QObject { Q_OBJECT public: ShoeManagerT...
#ifndef __SPACESHIP_H__ #define __SPACESHIP_H__ #include "cocos2d.h" // Base class for spaceships class Spaceship : public cocos2d::Sprite { public: // Initialize instance (sprite) virtual bool init() override; // Spaceship's "jump" void boost(); // Plays basic animation void onCrash(); private: // Movement...
#include "QtTerminalWindow.h" #include "Line.h" #include "../pty.h" #include <QKeyEvent> #include <QPainter> #include <QtGlobal> #include <cstdio> #include <cmath> QtTerminalWindow::QtTerminalWindow() : QFrame(NULL) , m_pty(NULL) , m_previousCharacter('\0') , m_fontMetrics(0) , m_font(0) , m_si...
/********************************************** **Description: Header file of Person ***********************************************/ #ifndef PERSON_HPP // PERSON.hpp is the Person class specification file. #define PERSON_HPP #include<string> class Person { private: //This is member of variable std::string...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define oo 666666666 int A[2001][2001]; //[node][v] - id of edge that connects node with other node with color v int color[2001][2001]; int edge[2001][2001]; vector<array<int,3>>E; void dfs(int u, int v, int c1, int c2) { if...
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #include "gttocmodel.h" #include "gtbookmark.h" #include "gtbookmarks.h" #include "gtdoccommand.h" #include "gtdocmodel.h" #include "gtdocpage.h" #include "gtdocument.h" #include "gttocdelegate.h" #include <QtCore/QDebug> #include <QtCore/QMimeData> #include <...
 // DBTestDlg.cpp: 구현 파일 // #include "pch.h" #include "framework.h" #include "DBTest.h" #include "DBTestDlg.h" #include "afxdialogex.h" #ifdef _DEBUG #define new DEBUG_NEW #endif #define DB_LOCATE _T("localhost")// 내지 Server IP #define DB_USER _T("root") //DB 접속 계정 #define DB_PASS _T("1234") //DB 계정 비밀 번호 #define D...
#ifndef SHOC_MODE_GCM_H #define SHOC_MODE_GCM_H #include "shoc/mode/ctr.h" namespace shoc { /** * @brief Shift bits right in array of integer elements from most significant bit * and considering 0-th byte as the left most. * uint16_t example: 0b10000000'11100001 ==> 0b11000000'01110000. * * @tparam T Integer ...
/* 实验题目:无向图存储结构的建立与搜索(遍历) 实验内容: 图的搜索(遍历)算法是图型结构相关算法的基础,本实验要求编写程序演示无向图三种典型存储结构的建立和(搜索)遍历过程。 实验要求: 1.分别实现无向图的邻接矩阵、邻接表和邻接多重表存储结构的建立算法,分析和比较各建立算法的时间复杂度以及存储结构的空间占用情况; 2.实现无向图的邻接矩阵、邻接表和邻接多重表三种存储结构的相互转换算法; 3.在上述三种存储结构上,分别实现无向图的深度优先搜索(递归和非递归)和广度优先搜索算法。并以适当的方式存储和显示相应的搜索结果(深度优先或广度优先生成森林(或生成树)、深度优先或广度优先序列和编号); 4.分析搜索算法的...
#include "../../gl_framework.h" using namespace glmock; extern "C" { #undef glGenFramebuffers void CALL_CONV glGenFramebuffers(GLsizei n, GLuint* framebuffers) { } DLL_EXPORT PFNGLGENFRAMEBUFFERSPROC __glewGenFramebuffers = &glGenFramebuffers; }
#pragma once #include "GameNode.h" // tile 21 x 16 #define MAXTILEX 21 #define MAXTILEY 16 #define MAXWINTILEX WINSIZEX / 25 // 40 #define MAXWINTILEY WINSIZEY / 25 // 30 struct tagTileInfo { RECT rc; int x, y; // 윈도우에서 타일의 위치 x, y int tileX, tileY; // 이미지에서 읽어올 타일 x, y bool check; // 그려졌는지 체크 }; class ...
#include <iostream> #include <stdio.h> #include <math.h> #include <stdlib.h> using namespace std; int iter = 0; void gauss(double**& A, double*& B,int size); void cholesky(double**& A, double*& B,int size); void jacobi(double**& A, double*& B,int size); void gauss_seidel(double**& A, double*& B,int size); void reverse...
/*! * \file commdialog.cpp * \author Simon Coakley * \date 2012 * \copyright Copyright (c) 2012 University of Sheffield * \brief Implementation of message communication dialog */ #include "./commdialog.h" #include "./messagemodel.h" #include "./mpredelegate.h" #include "./messagedelegate.h" #include "./sortdelega...
const int OUT_PIN = 9; void setup() { pinMode(OUT_PIN, OUTPUT); Serial.begin(9600); } float g_x = 0; void loop() { g_x += 0.01f; double y = cos( g_x ); int vol = y*128 + 128; Serial.println( vol ); analogWrite(OUT_PIN, vol); //digitalWrite(OUT_PIN, HIGH); }
#include "UdataUtils.h" #include <QDebug> #include <QDir> #include <QFile> #include <QProcess> using udata::UdataUtils; QString udata::UdataUtils::userFilePath = ""; /** * @brief UdataUtils::UdataUtils */ UdataUtils::UdataUtils() { } /** * @brief UdataUtils::saveUserData * * @param newUser */ void UdataUtils...
#include "ErrorMessage.h" const char* g_errorMsg = "[Error]\n" "2=您已离开房间\n" "1=长时间未操作退出房间\n" "-1=找不到用户\n" "-2=找不到房间\n" "-3=进入房间的等级和服务器等级不同\n" "-4=您的金币不足以进入房间\n" "-5=密码错误\n" "-6=您还没有登陆,请登陆\n" "-7=匹配失败\n" "-8=您已经准备不要重复点击准备\n" "-9=您已经准备不要重复点击准备\n" "-11=房间不处于玩牌状态\n" "-12=当前不是轮到您下注\n" "-13=没有足够的金币下注\n" "-14=您下注数量有误\n" "-15...
#include <assert.h> #include <jni.h> #include <android/log.h> #include "FLACStreamEncoder.h" #include "VADWebRTC.h" extern "C" { static char const * const FLACStreamEncoder_classname = "com/evature/evasdk/evaapis/FLACStreamEncoder"; static char const * const FLACStreamEncoder_mObject = "mObject"; static char const ...
#include "TakeSeatProc.h" #include "Logger.h" #include "HallManager.h" #include "Room.h" #include "ErrorMsg.h" #include "IProcess.h" #include "ProcessManager.h" #include "GameCmd.h" REGISTER_PROCESS(CLIENT_MSG_TAKESEAT, TakeSeatProc) TakeSeatProc::TakeSeatProc() { this->name = "TakeSeatProc"; } TakeSeatProc::~Take...
/*************************************************************************** * Copyright (C) 2009 by Dario Freddi * * drf54321@gmail.com * * * * This pr...