text
stringlengths
8
6.88M
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once WINRT_EXPORT namespace winrt { namespace ABI::Windows::Devices { struct ILowLevelDevicesAggregateProvider; struct ILowLevelDevicesAggregateProviderFactory; struct ILowLevelDevicesController;...
/*************************************************************************** Copyright (c) 2020 Philip Fortier 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 version 2 of the License, or...
#ifdef __cplusplus #include <cstdlib> #else #include <stdlib.h> #endif #ifdef __APPLE__ #include <SDL/SDL.h> #else #include <SDL.h> #include <SDL_image.h> #endif int main ( int argc, char** argv ) { if ( SDL_Init( SDL_INIT_VIDEO ) < 0 ) { printf( "Unable to init SDL: %s\n", SDL_GetError() ); ...
#include<iostream.h> void destinations() { clrscr(); gotoxy(30,7); cout<<"Domestic destinations"; gotoxy(33,9); cout<<"1. New Delhi"; gotoxy(33,10); cout<<"2. Mumbai"; gotoxy(33,11); cout<<"3. Chennai"; gotoxy(33,12); cout<<"4. Kolkata"; gotoxy(33,13); cout<<"5. Hyderabad"; gotoxy(27,16); cout<<"Press an...
// // Copyright Jason Rice 2017 // 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) // #ifndef NBDL_CONCEPT_BUFFER_HPP #define NBDL_CONCEPT_BUFFER_HPP #include <nbdl/concept/Container.hpp> #include <type_traits> #i...
 /// @file CutHash.cc /// @brief CutHash の実装ファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2005-2012 Yusuke Matsunaga /// All rights reserved. #include "CutHash.h" #include "Cut.h" BEGIN_NAMESPACE_YM ////////////////////////////////////////////////////////////////////// // クラス CutHash ///////////...
#ifndef VECTOR2_H #define VECTOR2_H #include <math.h> #include "pacman-main.h" #ifdef near #undef near #endif // near // Conflict between WinDef.h archaic // "near" and our Vector2.near() // If two vectors v1 and v2 // are within EPS of each other // in both x and y, // then v1.near(v2) // is true #d...
#ifndef EXAMPLE_HPP #define EXAMPLE_HPP #include <vector> int fact(int n); void print_vector(); std::vector<int> ret_vector(); void pass_print_vector(std::vector<int> array); class Shape{ public: Shape(); Shape(int x, int y); ~Shape(); double x, y; void move(double dx, d...
/***************************************************************************************************** * 剑指offer第42-2题 * 题目描述 * 用字符串模拟这个指令的运算结果。对于一个给定的字符序列S,请你把其循环左移K位后的序列输出。例如, 字符序列S=”abcXYZdef”,要求输出循环左移3位后的结果,即“XYZdefabc” * * Input: 字符串和翻转的位置 * Output: 翻转后的字符串 * * Note: (着重掌握翻转字符串的操作,是各种字...
// // Student.cpp // Homework7 // // Created by HeeCheol Kim on 01/11/2018. // Copyright © 2018 HeeCheol Kim. All rights reserved. // #include "Student.h" Student::Student() { this->id = 0; this->name = ""; this->school = ""; this->score = 0; } void Student::showInfo() { cout << "학번 : " << thi...
//Problem link:- https://www.hackerrank.com/challenges/array-splitting/ #include<bits/stdc++.h> using namespace std; typedef long long ll; ll solve(int s,int e,ll arr[],ll sum[]){ if(s>=e)return 0; ll x=sum[e]-(s>0?sum[s-1]:0); int f=0;ll xx=0;ll idx; for(int i=s;i<=e;i++){ xx+=arr[i]; if(2*xx==x){idx=...
// -*- 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...
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; scanf("%d %d", &a, &b); if ( a <= b && b <= a*6 ){ printf("Yes\n"); } else printf("No\n"); }
#ifndef FOGDELETEEXPR_HXX #define FOGDELETEEXPR_HXX class FogDeleteExpr : public FogDecoratedExpr { typedef FogDecoratedExpr Super; typedef FogDeleteExpr This; TYPEDECL_SINGLE(This, Super) FOGTOKEN_MEMBER_DECLS FOGTOKEN_LEAF_DECLS private: IsGlobalDelete _is_global; const IsArrayDelete ...
// Copyright 2013 Daniel Parker // Distributed under Boost license #include <boost/test/unit_test.hpp> #include <jsoncons/json.hpp> #include <jsoncons/json_serializer.hpp> #include <jsoncons/json_parser.hpp> #include <jsoncons/json_decoder.hpp> #include <sstream> #include <vector> #include <utility> #include <ctime> ...
/* HOW TO USE: spritemanager is basic class to manage load and release sprite and texture. It load all image you have, if you want to use sprite any where, just getSprite from SpriteManager. if you dont want you use this image any more, you can call release. everytime use this, you have to call SpriteManager::ge...
#ifndef __CONCRETE_STATE_H__ #define __CONCRETE_STATE_H__ #include "State.h" class Order : public State { public: virtual void process() override; }; class Pay : public State { public: virtual void process() override; }; class Ordered : public State { public: virtual void process() override; }; class F...
/////////////////////////////////////////////////////////////////// //Copyright 2019-2020 Perekupenko Stanislav. All Rights Reserved.// //@Author Perekupenko Stanislav (stanislavperekupenko@gmail.com) // /////////////////////////////////////////////////////////////////// #include "CPP_PlayerController.h" ACPP_PlayerCo...
#if (defined HAS_VTK) #include <irtkImage.h> //#include <nr.h> //#include <time.h> //#include <unistd.h> #include <gsl/gsl_rng.h> #include <sys/time.h> #include <vtkMath.h> #include <vtkPointData.h> #include <vtkCell.h> #include <vtkFloatArray.h> #include <vtkIdList.h> #include <vtkPolyData.h> #include <vtkPolyDataR...
/* Copyright (c) 2011 Andrew Wall 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, merge, publish, distribut...
#include "Dish.h" #include <iostream> Dish::Dish() { } Dish::Dish(const std::string& v_type) { this->type = v_type; }
// // Created by Vesper on 6/8/18. // // code note for modern c++ metaprogramming // https://www.youtube.com/watch?v=JSR8YBhW_uM&t=5077s #include <iostream> #include <type_traits> using namespace std; struct HasX {int x;}; struct HasY {int y;}; template <typename T, typename=void > constexpr bool has_x = false; te...
// vesamode.h - VESA graphics mode // (c) 1997, 2020 Michael Fink // https://github.com/vividos/OldStuff/ #pragma once #ifndef __vesa_mode_h_ #define __vesa_mode_h_ #include "defs.h" #include "graphic.h" struct vesa_vbe_info_block; struct vesa_mode_info_block; // base class for VESA graphics modes // http://www.ph...
/* 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...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[10000]; for (int i=0; i<n; i++) cin >> a[i]; sort(a, a+n); for (int i=0; i<n-1; i++) for (int j=i+1; j<n; j++) if (!(a[i]+a[j])) { cout << a[i] << ' ' << a[j] << e...
/*********************************************************************** created: 24/9/2004 author: Paul D Turner *************************************************************************/ /*************************************************************************** * Copyright (C) 2004 - 2009 Paul D T...
#ifndef DOWNLOAD_LISTENER_H #define DOWNLOAD_LISTENER_H #include <megaapi.h> class file_cache_item; class download_listener : public mega::MegaTransferListener { file_cache_item &cache_item; std::string id; public: download_listener(file_cache_item &cache_item); virtual void onTransferStart(mega:...
//************************************************************************** //** //** 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 ...
// // Recorder - a GPS logger app for Windows Mobile // Copyright (C) 2006-2019 Michael Fink // /// \file WaitEventThread.hpp WaitEvent() thread // #pragma once #include "WorkerThread.hpp" #include <boost/bind.hpp> /// \brief class that implements a worker thread that waits on a serial port for read/write events /// ...
/******************************************************************************** Copyright (c) 2012, Francisco Claude. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source co...
#pragma once #define _USE_MATH_DEFINES #include "math.h" #include "iostream" using namespace std; class CIR { private: double a,b; double p; int n; double f(double x) { return pow(M_E,x)*cos(x); } public: double f1() { double h = b - a; double t = ((b - a) / 2) * (f(a) + f(b)); double tt = 1; int n=0; ...
#include "custom_glog_sink.h" #include <iostream> #include <sstream> void CustomGlogSink::send(google::LogSeverity severity, const char* full_filename, const char* base_filename, int line, const struct ::tm* tm_time, const char* message, size_t message_len) { auto...
#ifndef _SERVICIOPAGINAERROR_H #define _SERVICIOPAGINAERROR_H #include "servicio.h" #include "dominio.h" class cServicioPaginaError:public cServicio { public: //Constructor e iniciador cServicioPaginaError(cDominio *dominio); bool iniciar(); //Agrega la pagina de error a la configuracion del apache int ag...
#include<iostream> #include<list> using namespace std; // //list 链表 // 将数据进行链式存储,物理存储单元上非连续的存储结构 // 数据元素的逻辑顺序是通过链表的指针链接实现的 // 链表是由一系列结点组成 // 结点的组成:存储数据元素的数据域 和 存储下一个结点地址的指针域 // 优点,可以对任意位置进行快速插入或删除元素 //缺点,遍历速度没有数组快;占用的空间大 // STL中的链表是一个双向循环链表 // 指针域中存两个指针,指向前一个结点和指向下一个结点 // list迭代器,只支持迁移和后移,属于双向迭代器 // list和vector是最...
// This is an independent project of an individual developer. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include <boost/test/unit_test.hpp> #include "complex.hpp" using std::complex; using std::string; using std::exception; BOOST_AUTO_TEST...
#include "enemigo_tanque.h" using namespace App_Juego_ObjetoJuego; const float Enemigo_tanque::SALUD_DEFECTO=30.0f; const float Enemigo_tanque::TIEMPO_PROXIMO_DISPARO_DEFECTO=3.0f; Enemigo_tanque::Enemigo_tanque(float px, float py, int w, int h, float s) : Objeto_juego_I(), Actor(px, py, w, h), salud(0.0f, s, s)...
#ifndef BACKSTROKE_TESTCODEBUILDER_H #define BACKSTROKE_TESTCODEBUILDER_H #include "builderTypes.h" class BasicExpressionTest : public TestCodeBuilder { public: BasicExpressionTest(const std::string& name, bool is_cxx_style = false) : TestCodeBuilder(name, is_cxx_style) {} protected: virtual void build(); }; cla...
#include <wx/msgdlg.h> #include <iostream> #include <wx/timer.h> #include <wx/vector.h> #include <fstream> #include <bits/stdc++.h> #include "PacManDesktopAppMain.h" using namespace std; // Class MAP class c_map { private: const unsigned int POINT_2=5; const unsigned int POINT_1=1; int i_pozio...
#include "RendererConsole.hpp" void RendererConsole::render(const LifeSimulator& simulation) { rlutil::cls(); rlutil::hidecursor(); for (int i = 0; i < simulation.getSizeY(); i++) { for (int j = 0; j < simulation.getSizeX(); j++) { if (simulation.getCell(j, i)) { ...
// // Created by twome on 08/05/2020. // #include <iostream> #include <nfd.h> #include "MenuScreen.h" #include "../components/Button.h" #include "../../io/XmlGuiLoader.h" #include "../../render/GameWindow.h" #include "NewGameScreen.h" #include "../../io/FieldIO.h" MenuScreen::MenuScreen() : Screen("menuScreen") { ...
#include <bits/stdc++.h> using namespace std; vector<int> sortA(int a[], int n) { vector<int> b(n, 1); // 0 from 0 .... pt1-1, 1 from pt1 ..... pt2-1, 2 from pt2 to n-1 int pt1 = 0, pt2 = n-1; for (int i = 0; i < n; i++) { if (a[i] == 0) b[pt1++] = 0; else if (a[i] == 2) b[pt2-...
/* * observer.h * * Created on: Oct 27, 2013 * Author: leal */ #ifndef OBSERVER_H_ #define OBSERVER_H_ /** * Define an object that is the “keeper” of the data model and/or business logic (the Subject). * Delegate all “view” functionality to decoupled and distinct Observer objects. * Observers register t...
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 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 ag...
#include <iostream> // cin/cout #include <string> #include <vector> #include "Book.h" #include "Library.h" #include "Patron.h" using namespace std; // Library Constructor Library::Library() { currentDate = 0; vector<Book> holdings; vector<Patron> members; holdings.reserve(100); members.reserve(1...
// // Created by Nudzejma on 4/2/2018. // #ifndef ADVANCED_ALGORTIHMS_MAXCYCLEDECOMPOSITION_H #define ADVANCED_ALGORTIHMS_MAXCYCLEDECOMPOSITION_H #include <stack> #include "../node/Node.h" #include "../graph/Graph.h" vector< vector<Node*> > getMaxCycleDecomposition(const Graph &eulerianGraph) { vector< vector<No...
// Fill out your copyright notice in the Description page of Project Settings. #include "TestingGrounds.h" #include "ChooseNextWaypoint.h" #include "BehaviorTree/BlackboardComponent.h" #include "AIController.h" #include "PatrolComponent.h" EBTNodeResult::Type UChooseNextWaypoint::ExecuteTask(UBehaviorTreeComponent& O...
#include <cstdio> #include <cstring> #include <iostream> #include <set> #include <string> using namespace std; typedef long long ll; // 字母表的大小 const int max_size = 30, maxn = 5e5 + 5; // 根节点编号为0 struct Trie { // ch[i][j]表示节点i的第j个字母存放的节点编号,若不存在则为0 // count表示前缀(单词)出现的次数 int ch[maxn][max_size], index, count[m...
#ifndef __COMMON_H #define __COMMON_H #include "NetworkIDObject.h" #include "MessageIdentifiers.h" #include "PacketLogger.h" #include "BitStream.h" #define SERVER_MAXCLIENTS 4 #define DOLOG 1 // Define our custom message ID's enum { ID_USER_SERVERAPPLE_CREATED = ID_USER_PACKET_ENUM+1 }; #if (...
#include <iostream> #include <string> using namespace std; int main(){ string a, b; cin >> a >> b; int sum1 = 1, sum2 = 1; for(int i = 0; i < a.length(); i++){ sum1 *= a[i] - 'A' + 1; } for(int i = 0; i < b.length(); i++){ sum2 *= b[i] - 'A' + 1; } // cout << sum1 << su...
#include <SimbleeCOM.h> #include "Wire/Wire.h" #include "config.h" #include "rtc.h" #include "rom.h" #include "accel.h" #include "radio_common.h" #include "debug.h" // Time keeping data structure Time timer; // RTC time data structure struct ts rtcTime; // Time keeping and time sharing variables int interruptTime; un...
int GetMajor() { return 0; } int GetMinor() { return 0; }
#ifndef _TNA_VKRENDERER_TOOLS_H_ #define _TNA_VKRENDERER_TOOLS_H_ value #include "vkrenderer.h" namespace tna { VkFormat find_supported_format(VkPhysicalDevice physical_device, VkFormat* candidates, uint32_t num_candidates, VkImageTiling tiling, ...
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin>>a>>b; char ans[a.length()]; bool f = 0; for(int i=0; i<a.length(); i++) { if(a[i]==b[i]) { if(a[i]=='z') ans[i] = 'z'; else ans[i] = a[i]+1; } else if(b[i]>a[i]) { f = 1; break; } else if(a[i]>b[i]) ans[i] = b...
// Author: Daniel Rush #pragma once #include <stdarg.h> #include <string.h> #include <stdio.h> #include "pico/stdlib.h" enum LoggerLevel { kLogDebug = 0, kLogInfo = 1, kLogError = 2, kLogFatal = 3, kLogLevels, }; const int32_t MSG_SIZE = 256; class Logger { public: void Printf(LoggerLevel Level, co...
#ifndef COMPUTERLOADING_H #define COMPUTERLOADING_H class GameWindow; class ComputerLoading { public: ComputerLoading(); ComputerLoading(GameWindow *gameWindowP); void update(); private: GameWindow *gameWindowP = 0; }; #endif // COMPUTERLOADING_H
#include <iostream> #include <stdlib.h> #include <time.h> //zaeem: 19L-1196 //--------------- function prototypes int show_menu(); int Search(int [],int); bool Delete(int [], int &, int ); bool Insert(int [], int, int &, int); void Print(int [],int &); using namespace std; int main(){ const int capacity=...
//////////////////////////////////////////////////////////////////////////////// // Module Name: main.cpp // Authors: Sergey Shershakov // Version: 0.1.0 // Date: 01.05.2017 // // This is a part of the course "Algorithms and Data Structures" // provided by the School of Software Engineering of the ...
// // SMImageEditorCropGuideView.cpp // iPet // // Created by KimSteve on 2017. 4. 19.. // Copyright © 2017년 KimSteve. All rights reserved. // #include "SMImageEditorCropGuideView.h" #include "../../SMFrameWork/Base/SMButton.h" #include "../../SMFrameWork/Util/ViewUtil.h" #define kCropGuideBorderLineWidth 4...
#include<iostream> using namespace std; long long w(long long a,long long b,long long c) { if(a<=0 || b<=0 || c<=0) { return 1; } if(a>20 || b>20 || c>20) { return w(20,20,20); } if(a<b && b<c) { return w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c); } return w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1,b-1,c-1); } ...
/* Copyright 2017-2018 All Rights Reserved. * Gyeonghwan Hong (redcarrottt@gmail.com) * Eunsoo Park (esevan.park@gmail.com) * Injung Hwang (sinban04@gmail.com) * * [Contact] * Gyeonghwan Hong (redcarrottt@gmail.com) * * Licensed under the Apache License, Version 2.0(the "License"); * you may not use this f...
#include <bits/stdc++.h> using namespace std; #define ll long long std::random_device rd; mt19937 gen(rd()); const uint32_t MOD = 4294967291; const uint32_t BASE = 53; class hashSet { uint32_t cnt; uint32_t sz; vector<list<pair<string, string> > > table; vector<list<pair<string, string> > > newTable...
#include "builder.hpp" int main(int argc, char *argv[]) { Consumer consumer; F18 f18; A320 a320; consumer.ProducePlane(&f18); consumer.SeePlane(); consumer.ProducePlane(&a320); consumer.SeePlane(); return 0; }
#ifndef __ItemFlyFish_H__ #define __ItemFlyFish_H__ #include "Item.h" class ItemFlyFish : public Item { public: static ItemFlyFish* create(CCDictionary* dict); bool init(CCDictionary* dict); int _duration; int _offsetH; int _offsetV; bool _alreadyFly; void updateStatus(); void move(float dt); void collisi...
//! Bismillahi-Rahamanirahim. /** ========================================** ** @Author: Md. Abu Farhad ( RUET, CSE'15) ** @Category: /** ========================================**/ #include<bits/stdc++.h> #include<stdio.h> using namespace std; #define ll long long #define scl(n) cin>...
#include <iostream> using namespace std; struct node{ int data; node *next; }; node *head = NULL; node *tail = NULL; void InsertNodeAtEnd(int data); void ReverseList(node *head); void Print(); void InsertNodeAtEnd(int data){ node *temp = new node; temp -> data = data; temp -> next = NULL; if(head==NULL && ...
/** * \file assert.cpp * \date Jan 29, 2016 */ #include "pcsh/assert.hpp" #include <cstdlib> #if defined(_MSC_VER) #define _CRT_SECURE_NO_WARNINGS #define NOMINMAX #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <io.h> #else//UNIX #include <unistd.h> #include <fcntl.h> #endif//defined(_MSC_VER) #de...
#include <iostream> #include <initializer_list> int calc(std::initializer_list<int>); int main() { std::cout << "result is " << calc({0,1,2,3,4,5}) << std::endl; return 0; } int calc(std::initializer_list<int> il) { int result = 0; for (auto it = il.begin(); it != il.end(); ++it) result += *it; return r...
#include<stdio.h> #include<conio.h> int main() { int num,cube; printf("enter a no.\n "); scanf("%d",&num); cube=num*num*num; printf("cube of no. is %d ",cube); return 0; }
// // Copyright Jason Rice 2016 // 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) // #include <assets/TestContext.hpp> #include <nbdl/detail/make_create_path_type.hpp> #include <nbdl/make_context.hpp> #include <nb...
#include <iostream> #include<Windows.h> using namespace std; //Prototipos void ordenRapido(int a[], int izq,int der); void llenarArray(int a[], int n); void mostrarArray(int a[],int n); double PCFreq = 0.0; __int64 CounterStart = 0; void StartCounter() { LARGE_INTEGER li; if(!QueryPerformanceFrequency(&li))...
/* * Copyright (C) 2007-2015 Frank Mertens. * * Use of this source is governed by a BSD-style license that can be * found in the LICENSE file. * */ #include <flux/Format> #include <flux/syntax/SyntaxState> #include <flux/syntax/exceptions> namespace flux { namespace syntax { SyntaxError::SyntaxError(String tex...
#define _USE_MATH_DEFINES // for C++ #include "COD7.h" #include "./Utility/VectorMath.h" #include "Engine/Engine.hpp" #include <cmath> #include <cstring> #include <cfloat> // for max float value #include <fmt/core.h> bool g_god = false; bool g_norecoil = false; bool g_rapidfire = false; bool g_aimbot = false; bool g_e...
/*! * \file KaiXinApp_PokeList.cpp * \author GoZone * \date * \brief 解析与UI: 动它一下 * * \ref CopyRight * =======================================================================<br> * Copyright ? 2010-2012 GOZONE <br> * All Rights Reserved.<br> * The file is generated by Kaixin_Component Wiza...
#include "TradosUnit.h" TradosUnit::TradosUnit() { } TradosUnit::~TradosUnit() { } std::wostream& operator<<(std::wostream& s, const TradosUnit& tu) { s << L"TradosUnit ["; s << L"id="; s << tu.id(); s << L", creationdate='"; s << tu.creationdate(); s << L"', creationid='"; s << tu.creati...
#include <math.h> #include <conio.h> #include <stdio.h> #include <locale.h> #include <stdlib.h> #include <string.h> typedef struct tipo_no no; struct tipo_no { int info; struct tipo_no *prox; }; int main () { setlocale (LC_ALL, "Portuguese"); no *lista = NULL; system ("PAUSE"); return 0; }
#include <boost/asio.hpp> #include <string> #include "gtest/gtest.h" #include "session.h" #include <fstream> #include "logger.h" #include "request_handler.h" #include "request_parser.h" #include <map> #include "request.h" using boost::asio::ip::tcp; class MockSession : public session { public: MockSession(boost::a...
#ifndef __MovingWall_H__ #define __MovingWall_H__ class MovingWall : public GameObject { protected: double m_changeMovementTimer; double m_timeChangeMovement; Vector2 m_velocity; public: MovingWall(double timerToChange,Vector2 moveVelocity,Scene* pScene, std::string name, Vector3 pos, Vector3 rot, Vector3 scale, ...
// -*- 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...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Devices.Enumeration.Pnp.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_bb78502a_f79d_54fa_92c9_90c5039fdf7e #de...
//auto create by tocpp.rb, plz don't modify it! //2013-10-29 17:14:25 +0800 #include "TemplateSkill.h" using std::string; TemplateSkill::TemplateSkill() { m_sn = 0; m_Distance = 0; m_SkillCD = 0; m_TrajectorySpeed = 0; m_scriptFunc = "20"; //////// } bool TemplateSkill::ReadJsonImpl(const CSJs...
/* * Ticker.h * * Created on: Dec 2, 2019 * Author: annuar */ #ifndef OURS_TICKER_H_ #define OURS_TICKER_H_ #include "Arduino.h" class Ticker { private: unsigned long _gap; unsigned long _lock; public: bool set; Ticker(unsigned long gap, unsigned long lock){ this->_gap = gap; this->_lock = lock; ...
#include<graphics.h> #include<stdlib.h> #include<stdio.h> #include<math.h> int main() { int gd=DETECT,gm,i, x2,y2,x1,y1,x,y; printf("Enter the 2 line end points :x1,y1,x2,y2: "); scanf("%d%d%d%d",&x1,&y1,&x2,&y2); initgraph(&gd,&gm,(char*)""); line(x1,y1,x2,y2); printf("Enter translation co-ordinates :tx...
// // Created by ikigai on 15.09.18. // #include "AnalysisOfGronsfeld.h" #include "Gronsfeld.h" #include <fstream> #include <math.h> #include <iostream> char AnalysisOfGronsfeld::searchKeyForOnePartOfText(const std::string &onePartOfText) { std::map<char, float> characters; for (char symb : onePartOfText) {...
// Copyright (c) 2015 University of Szeged. // Copyright (c) 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. #include "sprocket/browser/ui/context_menu_model.h" #include "base/strings/utf_string_conversions.h" #...
#include "Board.hpp" #include "City.hpp" #include "Player.hpp" #include "FieldDoctor.hpp" using namespace pandemic; const int MAX_CARDS =48; const int six = 6; FieldDoctor::FieldDoctor(Board &board, enum City city){ CurrentCity = city; theBorad = &board; } Player& FieldDoctor::treat(enum City a){ ...
/** * @file StaticSelectorMacros.h * @author seckler * @date 02.05.19 */ #pragma once /** * Macro to execute the code defined in ... with a static bool. * The bool will be renamed to be called c_BOOLNAME, * where BOOLNAME is the name of the bool passed in this macro. */ #define AUTOPAS_WITH_STATIC_BOOL(theBoo...
#ifndef TESTARRAYUTILS_H #define TESTARRAYUTILS_H namespace cpp_class2_test { void testGetPowerOfTwoCount(); void testGetPrimeCount(); void testMultiplyArrays(); void testMergeSortedArray(); void testReverseArray(); void testTruncateArray(); void testXorArrays(); } #endif // !TESTARRAYUTILS_H
#ifndef _MESH_H_ #define _MESH_H_ #include <vector> // #include "payoff.h" class Mesh { public: /* Constructor and Destructor */ Mesh(); Mesh(double lower, double upper, double maturity, unsigned int imax, unsigned int jmax); ~Mesh(); /* operator overloading */ std::vector<double>&...
#include "boss.h" #include "ui_boss.h" #include "mainwindow.h" #include "client.h" Boss::Boss(QWidget *parent) : QDialog(parent), ui(new Ui::Boss) { ui->setupUi(this); this->setWindowTitle("Administrator"); } //Named Boss for Administrator Boss::~Boss() { delete ui; } //Show Adminisrator WindowPa...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "TempCapstoneProjectCharacter.h" #include "TempCapstoneProject.h" #include "PaladinCharacter.generated.h" UCLASS() class TEMPCAPSTONEPROJECT_API APaladinCharacter : public ATempCapstoneProjec...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> class QGraphicsScene; class QGraphicsView; class Panel; class QDockWidget; class Scene; class Triangle; class QPen; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = 0); ~MainWindow(); virtual QSize...
// $Id: FunctionSymbol.h,v 1.5 2013-05-11 22:15:29 ist164787 Exp $ -*- c++ -*- #ifndef __MF_SEMANTICS_FUNCTIONSYMBOL_H__ #define __MF_SEMANTICS_FUNCTIONSYMBOL_H__ #include <string> #include "semantics/Symbol.h" class FunctionSymbol : public Symbol { public: const std::string TYPE = "FUNCTION"; protected: bool _is_...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Storage.Search.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_bb78502a_f79d_54fa_92c9_90c5039fdf7e #define WINR...
#include <Bridge.h> #define BugPin1 2 //蟲罐 #define BugPin2 3 //蟲罐 int BugCounter = 0; int BugPin1state = 0; long suspendTimestamp = millis(); void blink1(){//BugPin1 //Serial.println("Bug Pin1 triggered."); BugPin1state = 1; } void blink2(){//BugPin2 //Serial...
#include "wizDocumentListView.h" #include <QtGui> #include "wizDocumentListViewItem.h" #include "wizCategoryView.h" #include "widgets/wizScrollBar.h" #include "wiznotestyle.h" #include "wiztaglistwidget.h" #include "share/wizsettings.h" #include "wizFolderSelector.h" #include "wizProgressDialog.h" #includ...
#ifndef BLOCKORIENTEDDATAMAPPER_H #define BLOCKORIENTEDDATAMAPPER_H #include "Definitions.h" #include "SpaceDefinition.h" #include "IDataPersistenceHandler.h" #include "SpaceMappedDataPersistenceHandler.h" namespace Utilities { template<typename T> class BlockOrientedDataMapper { public: BlockOrientedDataMapper(...
#include <cmath> #include <cstdio> #include <ctime> #include <iostream> #include <queue> using namespace std; typedef long long ll; const int INF = 0x7fffffff; #define HB pair<Treap*, Treap*> #define siz(v) ((v) ? ((v)->size) : 0) struct Treap { int prior, data, size; Treap *lc, *rc; Treap() {} Treap(i...
/* Đề bài: Mô tả Bài toán: Giả sử chúng ta muốn biết quả của phép lũy thừa A ^ B. Tuy nhiên, bởi vì kết quả phép lũy thừa trên có thể là một con số rất lớn, nên chúng ta sẽ thực hiện một phép chia lấy dư với C. Bạn hãy viết chương trình tìm số dư đó. Mô tả Input: - Dòng đầu tiên sẽ là ba số nguyên dương A, B, C có ...
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll get_div(ll n) { if(n==1) return 1; for(int i=2;i*i<=n;i++) { if(n%i==0) return i; } return n; } int main() { int t; cin>>t; while(t--) { ll n,k,i=1; cin>>n>>k; ...
// // SMImageEditorStickerListView.h // iPet // // Created by KimSteve on 2017. 5. 22.. // Copyright © 2017년 KimSteve. All rights reserved. // #ifndef SMImageEditorStickerListView_h #define SMImageEditorStickerListView_h #include "../../SMFrameWork/Base/SMTableView.h" #include <cocos2d.h> #include "ItemInfo.h" #i...