text
stringlengths
8
6.88M
#include "skipUicGen.hpp" #include "ui_uigen2.h" void skipGen() { }
#include <iostream> #include <boost/graph/adjacency_list.hpp> #include <fstream> #include <boost/algorithm/string.hpp> #include <unordered_set> #include <time.h> #include <boost/range/adaptors.hpp> #include <boost/range/algorithm.hpp> #include <boost/graph/topological_sort.hpp> #include <unordered_map> #include <ctime>...
#include <Stepper.h> #include <Servo.h> int inByte = 0; char inData[5] = {0}; //int inData[0]Count = 0; int index = 0; int controlLRModifier; char alt = 1; int chargepos = 0; int triggerpos = 0; unsigned long time = 0; int state = 0; const int stepsPerRevolution = 500; Stepper lemotor(stepsPerRevolution, 8,11,12,13)...
//--------------------------------------------------------------------------- #pragma hdrstop #include "blockclient.h" #include "commfunc.h" //--------------------------------------------------------------------------- #pragma package(smart_init) //-----------------------------------------------------------------...
#include "AddUserView.h" #include <QDate> #include "Entities/Gender/Gender.h" #include "Forms/PersonalDataForm/PersonalDataForm.h" #include "Forms/UserDataForm/UserDataForm.h" // :: Constants :: const QString TITLE = "Создание учётной записи"; // :: Lifecycle :: AddUserView::AddUserView(QWidget *parent) : ...
#include "CClientLog.h" #include <QtCore/QCoreApplication> #include <QDebug> CClientLog::CClientLog(QObject *parent) : LogBase(qApp) { } CClientLog::~CClientLog() { qDebug() << "~CClientLog()"; } CClientLog* CClientLog::m_Instance = NULL; CClientLog* CClientLog::Instance() { if (NULL == m_Instance) { m_Instan...
/* @author Aytaç Kahveci */ #include <kuka_hw_cart/kuka_hardware_interface_cart.h> #include <kuka_ros_open_comm/KRLPos.h> #include <kuka_ros_open_comm/KRLE6Pos.h> #include <unistd.h> int main(int argc, char **argv) { ROS_INFO_STREAM_NAMED("hardware_interface", "Starting hardware interface..."); ros::init(argc...
//auteur : Pierre Morcello #ifndef EASYDEFINES_H #define EASYDEFINES_H #include <sstream> #include <iostream> // affiche une message box // exemple d'usage : // MBOX("value of x "<< x <<" and things "); #define MBOX(X) {std::stringstream box__ss; box__ss << X ; EasyDefines::showMessageBox(box__ss.str());} // exemp...
#ifndef RAYSCENEQUERY_H #define RAYSCENEQUERY_H #include <vector> #include "mathlib.h" namespace HW{ class SceneManager; class Movable; struct RaySceneQueryResultElement { float distance; Movable * movable; bool operator < (const RaySceneQueryResultElement & rhs) const { return distance < rhs.distance;...
// // Created by 钟奇龙 on 2019-05-18. // #include <iostream> #include <map> using namespace std; class Node{ public: Node *front; Node *next; int value; Node(int x):value(x),front(NULL),next(NULL){ } }; class NodeDoubleLinkedList{ private: Node *head; Node *tail; public: NodeDoubleLink...
#include <stdio.h> #include <stdlib.h> #include <time.h> #define MAX_SIZE 50 int findTheKthSmallNumber(int arr[], const int begin, const int end, const int k); inline void swap(int& a, int& b) { int temp = a; a = b; b = temp; } int main() { int arr[MAX_SIZE]; for (int i = 0; i < MAX_SIZE; i++) ...
// 0922_4.cpp : 定义控制台应用程序的入口点。 //绝对值排序 //输入n(n<=100)个整数,按照绝对值从大到小排序后输出。 //题目保证对于每一个测试实例,所有的数的绝对值都不相等。 //输入数据有多组,每组占一行,每行的第一个数字为n,接着是n个整数,n=0表示输入数据的结束,不做处理。 #include <iostream> using namespace std; int main() { int n; const int size = 100; while (cin >> n) { if (n <= 0 ||n>100) break; int a[size]; int i, ...
#include "../../idlib/precompiled.h" #pragma hdrstop #include "../Game_local.h" #define MAX_SECTOR_DEPTH 12 #define MAX_SECTORS ((1<<(MAX_SECTOR_DEPTH+1))-1) // RAVEN BEGIN // ddynerman: SD's clip sector code typedef struct clipSector_s { int contents; int dynamicContents; struct clipLink_s * ...
#pragma once #include <memory> #include <string> class TimeStamp { public: TimeStamp(); ~TimeStamp(); bool parseValue(const std::string value); std::shared_ptr<unsigned long long int> getValue(); private: std::shared_ptr<unsigned long long int> _timeStamp; }; TimeStamp::TimeStamp() ...
#pragma once #include <map> #include <list> #include "GameObject.h" #include "Player.h" #include "Bullet.h" #include "../Shared/NetworkDefinitions.h" #include "ClientHandler.h" #include "Enemy.h" class World { public: World(); ~World(); void create_players(std::list<ClientId > clients); bool upd_pla...
//=========================================================================== //! @file gpu_buffer.h //! @brief GPUバッファー //=========================================================================== #pragma once #include "system/directX.h" // DirectX11 //=======================================================...
#ifndef _BASE_VECTOR_2 #define _BASE_VECTOR_2 #ifdef _PSP_VER #include <libgum.h> #else #include <D3dx9math.h> #endif class BaseVector2 { protected: BaseVector2(void) {} public: virtual ~BaseVector2(void) {} public: #ifdef _PSP_VER ScePspFVector2& GetVector(void) { return _vec; } const ScePsp...
#include<iostream> using namespace std; int linear_search(int *arr,int i,int n,int x) { if(arr[i]==x) return i; if(i==n) return -1; return linear_search(arr,i+1,n,x); } int main() { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) cin>>arr[i]; int x; cin>>x; co...
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <set> #include <memory> #include <vespa/vespalib/stllike/string.h> namespace document { class GlobalId; } namespace proton { class IGidToLidChangeListener; /* * Interface c...
#include "../DetectMemoryLeak.h" #include "../WeaponInfo/Rifle.h" #include "../WeaponManager.h" #include "GraphicsManager.h" #include "RenderHelper.h" #include "MeshBuilder.h" #include "../Projectile/ProjectileManager.h" Rifle::Rifle(GenericEntity::OBJECT_TYPE _bulletType) : CWeaponInfo(_bulletType) { WeaponManager::...
#include "Replace.h" std::string Replace::execute(std::string& text) { size_t pos = text.find(word1); while (pos != std::string::npos) { text.replace(pos, word1.length(), word2); pos = text.find(word1); } return text; }
/* -*- 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" #include "modules/doc/frm_doc.h" #...
#include "proto/data_actor.pb.h" #include "config/utils.hpp" #include "config/buff_ptts.hpp" #include "config/common_ptts.hpp" #include "config/actor_ptts.hpp" #include <map> #include <mutex> #include <string> using namespace std; namespace pd = proto::data; namespace nora { namespace scene { ...
#include "SendProto.h" using namespace CPPClient::Net::Cmd; lspb::CliReq *SendProto::CreateCliReq(lspb::ClientMsgType methodId, int userId, lspb::ModuleId moduleId) { lspb::CliReq *req = new lspb::CliReq; req->set_methodid(methodId); req->set_userid(userId); req->set_moduleid(moduleId); return req...
#ifndef STUBS_HPP #define STUBS_HPP #include "interfaces.hpp" #include <stdexcept> #include <iostream> using namespace std; // Declara��o de classe stub da interface ISAutenticacao. class StubSAutenticacao : public ISAutenticacao { public: // Defini��es de valores a serem usados como gatilhos para notifica��es...
// Created by: NW,JPB,CAL // Copyright (c) 1991-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 GNU Lesser General Public License...
#include "gtest/gtest.h" #include <chrono> #include "kompute/Kompute.hpp" TEST(TestAsyncOperations, TestManagerParallelExecution) { // This test is built for NVIDIA 1650. It assumes: // * Queue family 0 and 2 have compute capabilities // * GPU is able to process parallel shader code across different fam...
#include "Variable.h" // Setter method for Variable name void Variable::setName(string n){ name = n; } void Variable::inc_const(int num){ constant += num; } void Variable::setSolved( bool state ){ solved = state; }
#include "SystemBase.h" SystemBase::SystemBase() { m_pmapCompIndex = new unordered_map<uint64, int>; } SystemBase::~SystemBase() { SAFE_DEL(m_pmapCompIndex) } int SystemBase::CreateComponent(int ownerID, int AssetID) { return 0; }
/* * Player.h * * Created on: Aug 16, 2016 * Author: Kevin Koza */ #ifndef PLAYER_H #define PLAYER_H_ #include <iostream> #include "Inventory.h" #include "Location.h" namespace std { class Player { public: Player(); virtual ~Player(); void listInventory(); void sayHi(); int inventoryAdd(Item thing); ...
class Solution { public: int findKthLargest(vector<int>& nums, int k) { if(nums.size() < k) return -1; priority_queue<int,vector<int>,greater<int> > Q; for(int i=0; i<nums.size(); ++i){ if(Q.size() < k){ Q.push(nums[i]); }else{ if(Q.top...
#include <sstream> #include <chrono> #include <QTextCodec> #include <QDebug> #include "PhoneticDictionaryViewModel.h" #include <ClnUtils.h> #include "SpeechProcessing.h" #include "SpeechAnnotation.h" #include "SpeechDataValidation.h" #include "assertImpl.h" namespace PticaGovorun { PhoneticDictionaryViewModel::Phonet...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "12439" #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 int kase; ...
#include <gtest/gtest.h> #include <string> #include <sstream> #include "../src/arbol.h" namespace { TEST(ArbolTests, Test_Constructor) { Arbol *arbol = new Arbol(); arbol->AgregarNodo(1, 1, 0); std::ostringstream streamSalida {}; streamSalida << *arbol; std::string actual ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2008 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Yngve Pettersen ** */ #ifndef _KEYGEN_TRACKER_H_ #define _K...
#ifndef INCLUDED_MATH_MATRIX33_H #define INCLUDED_MATH_MATRIX33_H namespace Math { class Vector2; class Matrix33 {//数学に合わせて右手座標系を使用 public: Matrix33(); Matrix33(const Matrix33& a); ~Matrix33(); Matrix33& operator=(const Matrix33& a); //単位行列 void set_identity(); //転置 void set_transposition(); //逆...
// Created on: 1993-06-10 // Created by: Christian CAILLET // 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 ...
#include <bits/stdc++.h> #define ll long long using namespace std; ll a0[1005]; ll a1[1005]; ll a2[1005]; ll a3[1005]; int main() { int tc; cin>>tc; while(tc--) { int n; cin>>n; for(int i=1; i<=n; i++) { cin>>a0[i]>>a1[i]>>a2[i]>>a3[i]; } int...
// Author: Kirill Gavrilov // 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.1 as published // by the Free So...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
#include "Sight.h" #include "Field.h" #include "Object.h" #include "Gunner.h" #include "PlayerNeo.h" #include "UniversalForce.h" #include "UniversalTorque.h" #include "Define.h" #include <QKeyEvent> #include <iostream> Sight::Sight(PlayerNeo* playerNeo, UniversalForce* accel, UniversalTorque* torque) : lookAtF( 0, 0...
// Created on: 1997-03-26 // Created by: Christian CAILLET // Copyright (c) 1997-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 ...
// Copyright Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ========================================================================...
#pragma once #include <iterator> #include <vector> static void Merge(size_t low, size_t middle, size_t high, std::vector<int>& data) { std::vector<int> v; size_t lowIndex = low; size_t highIndex = middle + 1; while (lowIndex <= middle && highIndex <= high) { if (data[lowIndex] <= data[highIndex]) { v.push_b...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "TargetController.h" #include "GameFramework/HUD.h" #include "ShootingGalleryHUD.generated.h" /** * */ UCLASS() class SHOOTINGGALLERY_API AShootingGalleryHUD : public AHUD { GENERATED_BOD...
// // Created by 송지원 on 2019-10-28. // #include "iostream" #include <stack> #include "string.h" using namespace std; char * result[2] = {"NO", "YES"}; int main() { int T, i; char input[51]; cin >> T; while (T--) { stack<char> left; cin >> input; for (i=0; i<strlen(input); i++...
/* leetcode 300 * * * */ #include <vector> #include <algorithm> #include <string> #include <unordered_set> #include <algorithm> #include <map> using namespace std; class Solution { public: int lengthOfLIS(vector<int>& nums) { if(nums.empty()) { return 0; } int len = nums.size...
#pragma once #include <QGraphicsScene> #include <memory> using std::unique_ptr; using std::make_unique; class canvas_scene : public QGraphicsScene { Q_OBJECT public: template<typename ... ARGS> static unique_ptr<canvas_scene> make (ARGS && ... args) { unique_ptr<canvas_scene> ret (new canvas_...
// Copyright (c) 2017 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // Distributed under the pika Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* Copyright (C) 2001 * Housemarque Oy * http://www.housemarque.com * * Distributed...
// // GameScene.h // Aircraft // // Created by lc on 12/3/14. // // #ifndef __Aircraft__GameScene__ #define __Aircraft__GameScene__ #include <stdio.h> #include "GameLayer.h" USING_NS_CC; class GameScene : public Scene { public: GameLayer* gameLayer; virtual bool init(); CREATE_FUNC(GameSce...
#include <iostream> #include <vector> #include <algorithm> #include <tuple> #include <iterator> #include <numeric> using std::vector; void printVector(const std::vector<int> &a) { std::cout << "["; for(auto i : a) { std::cout << i << ","; } std::cout << "]" << std::endl; } struct Comp { int segmenti;...
#include "threebody.h" #include "../vec3.h" #include "../system.h" #include <cmath> void ThreeBody::setupParticles(System &system) { double twopi = std::atan(1.0)*8; double mass1 = 3.0e-6; double mass2 = 9.5e-4; Particle* sun = new Particle(vec3(0,0,0), vec3(0,0,0), 1.0); Particle* earth = new P...
#pragma once #include "PreDefine.h" //#include "SharedPointer.h" #include <string> #include <vector> #include "Sampler.h" using namespace std; namespace HW { class Texture { public: enum TextureFormat{ LUMINANCE, RGB, RGBA, DEPTH, R8, RG8, RGB8, RGBA8, R16F, RG16F, RGB16F, RGBA...
/* -*- 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. * * @author Arjan van Leeuwen (arjanl) */ #ifndef GENERIC_GRID_H ...
#ifndef APPLICATION_DELETEUSER_H #define APPLICATION_DELETEUSER_H #include "BaseCommand.h" /* * Delete user command class */ class DeleteUser: public BaseCommand { public: explicit DeleteUser(boost::property_tree::ptree& params); ~DeleteUser() override = default; /* * Executing a command */ ...
/* -*- Mode: c++; tab-width: 4; 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. * * @author Patricia Aas (psmaas) */ #ifndef __FILEHANDLER_THEME_NODE_H__ #define __FIL...
#include "il2cpp-config.h" #include "class-internals.h" #include "codegen/il2cpp-codegen.h" const Il2CppType* Int32_t327_0_0_0_var; const Il2CppType* MonoBehaviour_t3_0_0_0_var; const Il2CppType* DisallowMultipleComponent_t222_0_0_0_var; const Il2CppType* RequireComponent_t223_0_0_0_var; const Il2CppType* ExecuteInEdi...
#pragma once #include "../interfaces/PhysicsEngine.h" #include "BulletDebugDrawer.h" #include "BulletObject.h" #include "../../modules/graphics/DrawModule.h" #include <btBulletCollisionCommon.h> #include <btBulletDynamicsCommon.h> #include <atomic> namespace Game { class Bullet : public PhysicsEngine { ...
#ifndef DECK52_HPP #define DECK52_HPP #include "Deck32.hpp" class Deck52: public Deck32{ public : Deck52(); }; #endif
#include "CPContactEvaluator.h" #include "CPBody.h" #include "CPCircle.h" #include "CPRectangle.h" #include "cocos2d.h" // We use Vec2 for physics #include <array> USING_NS_CC; // Contact tests bool CPContactEvaluator::intersects(CPBody * a, CPBody * b) { assert(a && b); // If bit masks are not compatible if ((...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Pawn.h" #include "AimingCPP.h" #include "TankCPP.generated.h" UCLASS() class CARRIARMATI_API ATankCPP : public APawn { GENERATED_BODY() FORCEINLINE UStaticMeshComponent* Ge...
#ifndef _TEST_ITEM_H_ #define _TEST_ITEM_H_ #pragma once #include "common.h" #include "scriptOneLine.h" // this is test item class class testCase{ public: // 构造函数 testCase(){ } // 从缓冲区中生成测试命令序列, // only for client // type 0: for server // 1: for client testCase(char *pBuffer,int t...
#include "stdafx.h" #include "Program.h" #include "GameObject\Rect.h" #include "GameObject\BackGround.h" Program::Program() { srand(time(NULL)); bg = new BackGround; bg->Init(); rect = new Rect; rect->Init(); D2D::GetDevice()->SetRenderState( // 라이트 지정 D3DRS_LIGHTING, // 사용 여부 FALSE ); // 알파값 제거 ...
// Created on: 1998-01-14 // Created by: Philippe MANGIN // 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 GN...
#ifndef __RENDERER_HPP__ #define __RENDERER_HPP__ #ifndef GL_GLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES 1 #endif #include "MovingAverage.hpp" #include <GL/freeglut.h> #include <GL/gl.h> #include <GL/glu.h> #include <chrono> using namespace std; using namespace std::chrono; namespace mobo { class Renderer ...
#include <iostream> #include "calculator.h" int main(){ std::cout << "adding two numbers :" << add(5,3) << std::endl; std::cout << "Subtracting two numbers :" << sub(5,3) << std::endl; std::cout << "Multiplying two numbers :" << multiply(5,3) << std::endl; std::cout << "Dividing two numbers :" << divide(5,3) << ...
#include "Application.h" #include "Coin.h" #include "ModuleEnemies.h" #include "ModuleCollision.h" #include "ModuleInterface.h" COIN::COIN(int x, int y, int type) :Enemy(x, y, type) { up.PushBack({ 44, 1787, 14, 16 }); up.PushBack({ 64, 1787, 14, 16 }); up.PushBack({ 84, 1787, 12, 16 }); up.PushBack({ 102, 1787, 1...
#include<graphics.h> #include<constream.h> void main(){ int driver=DETECT,mode; clrscr(); initgraph(&driver,&mode,"\\tc\\bgi"); //rectangle(left,top,right,bottom); setcolor(4); rectangle(300,300,100,100); rectangle(200,250,400,50); line(200,50,100,100); line(300,100,400,50); line...
#pragma once #include "../mathlib.h" #include <map> #include <vector> #include "PreDefine.h" using namespace std; using namespace HW; struct as_Light{ Vector3 ColorAmbient; Vector3 ColorDiffuse; Vector3 ColorSpecular; Vector3 direction; Vector3 position; Vector3 attenuation; float MaxDistance; int typ...
#pragma once #include "aeGraphicsResource.h" namespace aeEngineSDK { enum struct AE_GRAPHICS_EXPORT AE_TEXTURE_TYPE { AE_TEXTURE_TYPE_NONE, AE_TEXTURE_TYPE_DIFFUSE, AE_TEXTURE_TYPE_SPECULAR, AE_TEXTURE_TYPE_AMBIENT, AE_TEXTURE_TYPE_EMISSIVE, AE_TEXTURE_TYPE_HEIGHT, AE_TEXTURE_TYPE_NORMALS, AE_TEXTURE...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2005-2206 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef SVG_AVERAGER_H #define SVG_AVERAGER_H #ifdef SVG_SUPP...
#include <iostream> #include <fstream> using namespace std; struct articulo{ string codea; int nivelmin; int nivelact; string proveedor; float precio; }; struct alumno{ string identificacion; string nombre; int nota; }; bool validar_codigo(int tipo, string codigo, string nombreArchivos); void agregar_a...
#include <iostream> #include <fstream> #include <vector> #include <boost/random.hpp> #include <cppmc/cppmc.hpp> using namespace boost; using namespace arma; using namespace CppMC; using std::vector; using std::ofstream; using std::cout; using std::endl; class EstimatedY : public MCMCDeterministic<double,Mat> { privat...
#include <iostream> #include <Console.hpp> #include <widgets/Window.hpp> #include <widgets/Text.hpp> #include <widgets/Button.hpp> #include <widgets/Scale.hpp> class Demos{ private: Blame::Console *console; Blame::Widgets::Window *window; Blame::Widgets::Text *text, ...
#ifndef _CONTROLLER_H_ #define _CONTROLLER_H_ #include <SDL.h> #include "modellist.h" #include "view.h" #include "spriteaiengine.h" class Controller { public: Controller(ModelList& modellist, View& view); ~Controller(); void updateView(SDL_Surface *screen); private: ModelList modellist; View view; Spr...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> #include <iomanip> using namespace std; typedef long long ll; #define INF 10e10 #define rep(i,n) for(int i=0; ...
/** * Project: ows-qt-console * File name: edit_job_dialog.h * Description: this header describes the job editing dialog window * * @author Mathieu Grzybek on 2012-06-19 * @copyright 20?? Mathieu Grzybek. All rights reserved. * @version $Id: code-gpl-license.txt,v 1.2 2004/05/04 13:19:30 garry Exp $ * * @see T...
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_REAPER_REAPER_IMPL_H_ #define SERVICES_REAPER_REAPER_IMPL_H_ #include <map> #include <set> #include "base/macros.h" #include "mojo/comm...
/** * @file messagedecodertest.cpp * * @brief File contains an example message decoder. Essentially, this outlines what a new * decoder will have to look like. This implements the necessary overrides * for a full implementation. ExampleDecoder allows access to the internal * file syst...
#pragma once #include <SFML/Graphics.hpp> #include <string> using namespace std; using namespace sf; class ball { public: ball(); ~ball(); ball(int pos_x, int pos_y, float _radius, Color _color); ball(int pos_x, int pos_y, float _radius); void setColor(Color _color); void setSize(float _radius); void setPosition...
#pragma once namespace cvfn { public ref class MouseEvtArgs : public System::EventArgs { public: int Evt; int X; int Y; MouseEvtArgs( int evt, int x, int y) : Evt(evt), X(x), Y(y) {} virtual ~MouseEvtArgs(void) {} }; }
#ifndef _SCROLL_INTERFACE_H_ #define _SCROLL_INTERFACE_H_ class Scroll; class ScrollInterfaceMagicMissile; class ScrollInterface { public: ScrollInterface(); ~ScrollInterface(); virtual void accept(ScrollInterfaceMagicMissile *) = 0; }; #endif
#include <iostream> #include <cstring> #include "carddeck.h" #include "cardgame.h" #include "gameFunctions.h" #ifndef _USER_ROLES_H #define _USER_ROLES_H using namespace std; int menu(int DECKSIZE); int displayCards(); #endif
#pragma once #include "DRAW.h" using namespace std; /*string sticker[4] = { " ** ", "******", " **", "** **", };*/ //hàm vẽ bảng điểm string sticker[4] = { " __", " / ~'-*", " *--|_| --'", "(_)...(_)", }; string stickerleft[4] = { " __", "...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
// // Created by ssi on 03.04.15. // #ifndef _TEMPLATESTACK_STACK_H_ #define _TEMPLATESTACK_STACK_H_ #include <glob.h> template< class T > class Stack { private: T *a; size_t count; public: Stack(const int &_a); Stack(); Stack(const Stack< T > &stack); ~Stack(); void push(const T &_a); T pop(); void incTop(...
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmWIXFeaturesSourceWriter.h" cmWIXFeaturesSourceWriter::cmWIXFeaturesSourceWriter( cmCPackLog* logger, std::string const& filename, GuidType componentGuidType)...
//--------------------------------------------------------------------------- //通信协议类,负责客户端和服务器端的通信协议,数据包生成,拆分,校验等工作 //By LinYi 2004.02.16 #ifndef accprotocolH #define accprotocolH #include <Windows.hpp> #include <dstring.h> #include "md5.h" #include "cryptclass.h" enum TCmdType {acLOGIN=0,acCREATE_USER,acSAVEPOINT,ac...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> #include <vector> using namespace std; class Point { public: void setX(int x) { mX = x; } void setY(int y) { mY = y; } int GetX() { return mX; } int GetY() { return mY; ...
//Phoenix_RK /* https://leetcode.com/problems/power-of-two/ Given an integer, write a function to determine if it is a power of two. Example 1: Input: 1 Output: true Explanation: 20 = 1 Example 2: Input: 16 Output: true Explanation: 24 = 16 Example 3: Input: 218 Output: false */ class Solution { public: b...
#include "jni/JniHelper.h" #include <string.h> #include <android/log.h> #include <jni.h> #include "CCDirector.h" #include "CCWebView.h" #define LOG_TAG "WebViewJni" #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) #define JAVAVM cocos2d::JniHelper::getJavaVM() using namespace std; us...
#pragma once #include "iconvar.h" #include "cdll_int.h" class ConVar; class CCommand; class ConCommand; class ConCommandBase; struct characterset_t; using CUtlString = std::string; class IConCommandBaseAccessor { public: virtual bool RegisterConCommandBase(ConCommandBase *pVar) = 0; }; typedef void (*FnCommandCall...
class Solution{ public: string Reduced_String(int k,string s){ stack<char> st; for(int i = 0;i<s.length();i++){ st.push(s[i]); //cout<<st.size()<<" "; if(st.size()>=k){ string t =""; t+=st.top(); //cout<<t<<endl;...
#include "windowstimer.h" #include "defines.h" #ifdef OS_Windows #include "windows.h" WindowsTimer::WindowsTimer() { stopped = false; timeBeginPeriod(1); begin = timeGetTime(); } WindowsTimer::~WindowsTimer() { timeEndPeriod(1); //dtor } void WindowsTimer::start() { stopped = false; begin = timeGetTime(); }...
#ifndef JETFINDER_HH #define JETFINDER_HH #include "../../../../../APx_Gen0_Algo/VivadoHls/null_algo_unpacked/vivado_hls/src/algo_unpacked.h" #include "Config.hh" #include "JetInfo.hh" #include "Jet.hh" #include "Tower.hh" void findJets(Tower towers[M_TOWERS],Jet jets[M_JET]); #endif
// Created on: 1993-01-21 // Created by: Remi LEQUETTE // 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 GNU ...
#include <iostream> #include <random> #include <chrono> #include <trevi.h> #include "udptransmitter.h" #include "udpreceiver.h" #include "Timer.h" #include "cmdline.h" int main( int argc, char** argv ) { cmdline::parser a; a.add<int>("input_port", 'i', "UDP port for input data", false, 5000 ); a.add<in...
#include <conio.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <string.h> #include <math.h> #include <locale.h> #include <ctype.h> float p1,p2,p3,p4,p5,total,dinheiro,troco; int x=0; int main() { printf("\n Digite o valor do primeiro produto:\n"); scanf("%f",&p1); ...
#include<bits/stdc++.h> using namespace std; typedef long long ll; int t; ll n, lessThanN,lessAns, moreAns; // find the number which is less than n and is of the form 2^x ll findLessThanN(){ ll curr; for(int i = 0; i < 32; i++){ curr = 1 << i; if (curr > n) return curr...
#pragma once class dadasd { public: dadasd(); ~dadasd(); };