text
stringlengths
8
6.88M
#include <arpa/inet.h> #include <sys/socket.h> #include <netinet/in.h> #include<string> #include<cstring> #include<unistd.h> #include "mytcp.h" using std::string; int tcp_client::send_msg(const char* src,int n) { write(server_sock,(char*)&n,4); write(server_sock,src,n); return 1; } int tcp_client::resv_ms...
#include "CRectangle.h" CRectangle::CRectangle(CPoint leftTop, double width, double height) :m_leftTop(leftTop) , m_width(width) , m_height(height) { } CRectangle::CRectangle(CPoint leftTop, double width, double height, uint32_t outlineColor) : m_leftTop(leftTop) , m_width(width) , m_height(height) , m_outline...
/*! * \file machinetreedelegate.h * \author Simon Coakley * \date 2012 * \copyright Copyright (c) 2012 University of Sheffield * \brief Header file for the model tree delegate */ #ifndef MACHINETREEDELEGATE_H_ #define MACHINETREEDELEGATE_H_ #include <QItemDelegate> class MachineTreeDelegate : public QItemDelegat...
#include "mainwindow.h" #include <QApplication> int main( int argc,char * argv[] ) { QApplication a( argc,argv ) ; MainWindow w ; w.show() ; return a.exec() ; }
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * 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 wit...
// memorymanager.cc // Memory Manager used to facilitate contiguous virtual memory #include "memorymanager.h" //---------------------------------------------------------------------- // MemoryManager::MemoryManager // Create a memory manager //---------------------------------------------------------------...
/* -*- 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. * * @author Patricia Aas (psmaas) */ #ifndef UI_CRAWLER_H #define ...
#include "TestGTE.h" #include <iostream> #include <iomanip> int main(int argc, char **argv) { using namespace test; gte device; GTEtestbench tester(&device); tester.constructInstruction(0, 0, 0, 0, 0, SQR); tester.storeData(gte::IR1, 0x00000FFF); // ir1 = 4095 tester.storeData(...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2011-2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Jan Borsodi ** */ #ifndef PROTOBUF_DATA_H #define PROTOBUF_DA...
// Created on: 1995-10-20 // Created by: Yves FRICAUD // Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU L...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/NavBarTitle.g.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Animations.IResize.h> #include <Fuse.Binding.h> #include <Fuse.Controls.Panel.h> #include <Fuse.Drawing.ISurfaceDrawable.h> #include...
// // GameOverScene.h // Aircraft // // Created by lc on 12/1/14. // // #ifndef __Aircraft__GameOverScene__ #define __Aircraft__GameOverScene__ #include <stdio.h> #include "GameOverLayer.h" USING_NS_CC; class GameOverScene : public Scene { public: GameOverScene(void); ~GameOverScene(void); ...
// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2023 Jason Volk <jason@zemos.net> // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice...
#include "StdAfx.h" #include "GameLogic.h" #include "RacketPhysicsMove.h" #include "RacketPhysicsAI.h" void __cdecl odprintf(const char *format, ...); GameLogic::GameLogic(Move::IMoveManager* move, UIManager* uiManager) :move(move), uiManager(uiManager) { ballPhysics = NULL; racketPhysics[0] = NULL; r...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 1995-2007 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" #if defined(VEG...
#ifndef __MUMUSERVER_H__ #define __MUMUSERVER_H__ #include <QTcpServer> #include <QFile> #include <QList> #include <QByteArray> #include "mumuconnection.h" #include "../networkinterface.h" class MumuServer : public QTcpServer, public NetworkInterface { Q_OBJECT private: MumuServer(); MumuServer(int,QObject * pa...
#include <iostream> #include <stack> using namespace std; int main() { char c = '\0'; stack<char> word; while (c != '\n') { while (1) { c = getchar(); if (c != '<' && c != ' ' && c != '\n') { word.push(c); } else { break; } } while (word.size() > 0) { cout << word...
/** * created: 2013-4-6 23:51 * filename: FKMd5Ex * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include "../Include/Endec/FKMd5Ex.h" #include <stdio.h> #include <string.h> #include "../Include/FKVsVer8Define.h" //--------------...
// Copyright (c) 2019, tlblanc <tlblanc1490 at gmail dot com> #include "test.hpp" void test_print_help(const char *prog) { printf("usage: %s [-v] [-h] [-t]\n", prog); printf("\noptions:\n"); printf("\t-v, --verbose: outputs information about tests run\n"); printf("\t-h, --help: prints this menu\n"); printf(...
// Copyright (C) 2012 - 2013 Mihai Preda #pragma once #include "value.h" #include "common.h" #include <assert.h> class Object; class VM; class GC; // Value tags enum { T_NIL = -1, T_OBJ = -2, T_REG = -3, // used during compilation only, to indicate register position T_CF = -4, // plain C function w...
// Created on: 1991-02-21 // Created by: Isabelle GRIGNON // 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 G...
/* * @lc app=leetcode.cn id=978 lang=cpp * * [978] 最长湍流子数组 */ // @lc code=start class Solution { public: int maxTurbulenceSize(vector<int>& A) { vector<int> dp(A.size(), 0); dp[0] = 1; int flag = -1; int ans = dp[0]; for(int i=1;i<A.size();i++) { if(...
#include<stdio.h> int numpal(int a,int b,int c,int d,int e); int main() { int sum=0; int n1,n2,n3,n4,n5; printf("\nEnter a number: "); scanf("%d",&n1); printf("\nEnter a number: "); scanf("%d",&n2); printf("\nEnter a number: "); scanf("%d",&n3); printf("\nEnter a number: "); ...
/** * dynamicEDT3D: * A library for incrementally updatable Euclidean distance transforms in 3D. * @author C. Sprunk, B. Lau, W. Burgard, University of Freiburg, Copyright (C) 2011. * @see http://octomap.sourceforge.net/ * License: New BSD License */ /* * Copyright (c) 2011-2012, C. Sprunk, B. Lau, W. Burgard, Univer...
#ifndef player_h #define player_h namespace exception { class LockOnMarker : public Particle { typedef Particle Super; public: typedef TCache<LockOnMarker> Factory; friend class TCache<LockOnMarker>; void release() { Factory::insertNotUsed(this); } class Drawer : public Parti...
/** * @file main.cc * @author Gerbrand De Laender * @date 18/12/2020 * @version 1.0 * * @brief E091103, Master thesis, software testing * * @section DESCRIPTION * * Uses IP that simply multiplies two short unsigned integers. * */ #include <stdio.h> #include <xparameters.h> #include <xtime_l...
#include <iostream> #include <stdlib.h> using namespace std; void Print_Instructions() { cout<<"\n\nC++ does not offer a graphics library"<<endl; cout<<"So this game does not use graphics, sorry\n\n"<<endl; cout<<"Your avatar is indicated by the number 1"<<endl; cout<<"An empty space is indicated by t...
// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2023 Jason Volk <jason@zemos.net> // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice...
/*==================================================================== Copyright(c) 2018 Adam Rankin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitati...
#include <UnitTest++\src\UnitTest++.h> #include "Build.h" #include "BuildParser.h" #include "ReturnCode.h" using namespace WhatIBuild; SUITE(Test_ParseMSVCSolution) { TEST(testFileNotFound) { Build build; CHECK_EQUAL(e_Return_FileNotFound, Parser::ParseVSSolution("invlid_path", build)); } ...
/* * File: pop3server.cpp * Author: Dirk Vermeir * Edited by: Wouter Van Rossem * * Created on 23 juli 2009, 14:43 */ #include <fstream> #include <iostream> #include <stdexcept> #include <dvutil/debug.h> #include <dvutil/props.h> #include <dvthread/logstream.h> #include <dvnet/serversocket.h> #include "play...
/* -*- 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 DOM_DEVICE_ORIENTATION_EVENT_SUPPOR...
/* * Copyright 2019 LogMeIn * * 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 to in w...
#include "Selection.h" Vehicle* Selection::select(UserInterface* ui) { ui->selection_alert(); while (true) { int passenger; while (true) { ui->passengers_req(); std::cin >> passenger; if (ui->check_symbols() || passenger < 0) { ui->problem_value(); continue; } break; } double lug...
#include "APDcalibration.hh" #include <iostream> #include <sstream> #include <iomanip> APDcalibration::APDcalibration(const std::string& SMName, const std::string CondDBpwd) : SMName_(SMName), CondDBpwd_(CondDBpwd) { nThermfromDB_ = 0; nAPDfromDB_ = 0; std::string SMnumber = SMName_; SMnumber.replace(0, 3, "");...
// Copyright (c) 2013 Nick Porcino, All rights reserved. // License is MIT: http://opensource.org/licenses/MIT #ifndef LANDRU_RUNTIME_VAROBJ_H #define LANDRU_RUNTIME_VAROBJ_H #ifdef __cplusplus #include "LandruVM/RefCounted.h" #include <stddef.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include...
class Solution { public: // Each child of the current root has nodes ranging from // i, n-1-i, repectively where i = 0,1,...,n-1, n = # of current // tree nodes. Recursively visit every block as the current root. int numTrees(int n) { // Note: The Solution object is instantiated only once and is reused b...
//知识点:差分,二分答案 /* 题意分析: 有: 如果在分配的过程中遇到一份订单无法完全满足,则需要停止教室的分配 发现: 如果后面一份订单可以被分配 , 那么前面的所有订单都可以被分配 则答案满足单调性 , 可以进行二分答案 题目要求进行区间修改 首先想到使用线段树 直接进行模拟操作 但是 n,m<=1e6 , 并且需要进行逐个对比 线段树卡过这题的概率变的很玄乎 考虑其他 , 能够进行区间操作 , 并且易于对比的数据结构 想到进行差分 , 建立差分数组 算法实现: 使用二分答案 , 枚举第一个遇到的,无法满足的订单号 x 进行check操作 然后枚...
#include "rtpserver.h" rtpServer::rtpServer(QObject *parent) : rtpClass(parent) { //sess=new RTPSession; } int rtpServer::prosess_pack(int timestamp,int len,char*buf,int index) { static int tmp=0; static int cnt=0; static int length; FILE *file; QString img_name; img_name=QString("%1...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_accessor_ButtonEntry_TextColor.h> #include <_root.ButtonEntry.h> #include <Uno.Bool.h> #include <Uno.Float4.h> #include <Uno.Object.h> #...
//: C12:CopyingVsInitialization.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt class Fi { public: Fi() {} }; class Fee { public: Fee(int) {} Fee(const Fi&) {} }; int main() {...
#ifndef NESTED_INTEGRATION_BOOST_VARIANT_ITERATE_HPP #define NESTED_INTEGRATION_BOOST_VARIANT_ITERATE_HPP #include <boost/variant.hpp> #include "nested/integration/iterate.hpp" #include "nested/integration/boost/detail/variant.hpp" namespace nested { namespace integrate { namespace iterate { templ...
#include "GnMeshPCH.h" #include "GnGamePCH.h" #include "GActionMove.h" GActionMove::GActionMove(GActorController* pController) : GAction( pController ), mpActorLayer( NULL ) , mMoveRange( 5.0f, 40.0f ) { SetMoveLeft( false ); SetMoveRight( false ); SetMoveUp( false ); SetMoveDown( false ); } void GA...
// Copyright (c) 2017 Thomas Heller // // SPDX-License-Identifier: BSL-1.0 // 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) // Simple test verifying basic resource_partitioner functionality. #include <pika/asse...
// Copyright (c) 2019 Agustin Berge // // SPDX-License-Identifier: BSL-1.0 // 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) #pragma once #include <pika/config.hpp> #include <pika/string_util/bad_lexical_cast.hp...
/// \file NiCfPrimaryGeneratorAction.cc /// \brief Implementation of the NiCfPrimaryGeneratorAction class; adapted from /// Geant4 example B5 B5PrimaryGeneratorAction.cc #include "NiCfPrimaryGeneratorAction.hh" #include "G4Event.hh" #include "G4ParticleTable.hh" #include "G4IonTable.hh" #include "G4ParticleDef...
// ========================================================================== // $Id: g_Plane.h 3389 2012-10-19 08:23:25Z jlang $ // Wrapper code to interface g_plane // ========================================================================== // (C)opyright: // // Jochen Lang // SITE, University of Ottawa // 80...
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #ifndef cmDocumentationEntry_h #define cmDocumentationEntry_h #include "cmConfigure.h" // IWYU pragma: keep #include <string> /** Standard documentation entry for cmDocu...
#pragma once #include <stdint.h> extern uint16_t _timeYear; extern uint8_t _timeMonth; extern uint8_t _timeDay; extern uint8_t _timeHour; extern uint8_t _timeMinute; extern uint8_t _timeSecond; extern uint8_t _timeDayOfWeek; class CRtc { public: bool init(); bool update(); void setTime(uint16_t year, uint8_t...
/** \file nxtexception.cpp \brief */ /* * (C) 2013 Uwe Lippmann * * 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 3 of the License, or (at your * option) any later version....
// // Created by 송지원 on 2020/06/25. // //200625 바킹독 4강 연결리스트 듣고 다시 푸는 문제. 시간초과나는 코드임. ㅠ #include <iostream> #include <list> #include <string> using namespace std; list<char> l; int len=0; int cur; string s; int M; char op; list<char>::iterator it; int main () { ios::sync_with_stdio(0); cin.tie(0); cin ...
// Enunt: Se considera urmatoarea problema: // Se dau doua numere intregi a si b. In functie de raspunsul la intrebarea "Ce operatie doriti?" se va // calcula: daca raspunsul e litera x - media aritmetica // daca raspunsul e litera y - media geomertica // daca raspunsul e litera z - catul/restul impartirii a numa...
// Created on: 1993-03-10 // Created by: JCV // 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 Lesser Gen...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2008-2012 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef PI_SYSTEM_OPMUTEX_H #define PI_SYSTEM_OPMUTEX_H #ifdef ...
/* * 10bit PWM out from Arduino UNO * demonstration modified from the Timer1 library example * by Petteri Teikari, 2012 | petteri dot teikari at gmail dot com * * Timer1 library example * June 2008 | jesse dot tane at gmail dot com */ // USE THE TimerOne LIBRARY // http://www.arduino.cc/playground/Code/T...
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2012-2013. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #include "fwCore/spyLog.hpp" // for SLM_TRACE_FUNC() #include "gdc...
#include <iostream> using namespace std; int main() { int t, len, numG, numR; bool moreThan2Pairs, lenMoreThan2, bothPairSame; string s; cin >> t; for (int i = 0; i < t; i++) { cin >> s; len = s.length(); if (len == 1) { cout << "yes" << endl; ...
#ifndef ITERATOR_H #define ITERATOR_H template <class Item> class Iterator { public: virtual void first() = 0; virtual void next() = 0; virtual bool isDone() const = 0; virtual Item currentItem() = 0; }; template <class Item> class NullIterator : public Iterator<Item> { public: void first() {...
#include <iostream> #include <boost/filesystem.hpp> #include <regex> #include "../main.h" #include "../FileMan/cfileinfo.h" #include "../FileMan/cfileini.h" using namespace boost::filesystem; std::string getProjectName(std::string defName = "default"){ std::string name; std::cout << "Input project name [" + defNa...
#include "Camera.h" #include <cassert> #include "Stage.h" #include "CharacterObject.h" #include "Game.h" const int scrSpeed = 6; Camera::Camera(Stage& s) :_stage(s), _pos(0, 0) { auto& size = Game::Instance().GetWindowSize(); auto& range = _stage.GetStageRange();//ステージの範囲を取得 _pos = Position2f(range.center.x, range...
//------------------------------------------------------------------- // schedList Class Definition //------------------------------------------------------------------- #include <iostream> #include <string> #include <iomanip> #include <fstream> #include "schedList.h" using namespace std; //---...
#include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <string> #include "congl.hpp" #include "sprites.cpp" using namespace ConGL; using namespace _2D; using namespace std; Screen screen(true); //====== LAYOUTS ======= int currL = 0; int prevL = 0; bool switchedL = true; bool loop = tru...
// --- This file is distributed under the MIT Open Source License, as detailed // by the file "LICENSE.TXT" in the root of this repository --- #ifndef HURCHALLA_UTIL_SAFELY_PROMOTE_UNSIGNED_H_INCLUDED #define HURCHALLA_UTIL_SAFELY_PROMOTE_UNSIGNED_H_INCLUDED #include "hurchalla/util/traits/ut_numeric_limits.h" #incl...
/* -*- 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. * * @author Adam Minchinton */ #include "core/pch.h" ////////////...
#include <iostream> #include <string> // make string class available int main() { using namespace std; char charr1[20]; char charr2[20] = "jaguar"; string str1; string str2 = "panther"; // C-风格字符串初始化 cout << "Please enter a kind of feline: "; cin >> charr1; cout << "Please enter another kind of feline: "; ci...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <map> #include <vector> #include <algorithm> #include <math.h> #define pb push_back using namespace std; int a, b, c; void input() { scanf("%d %d %d", &a, &b, &c); } int solve() { int maxNum; maxNum...
/* Create Class Person which contains data members as Person Id, Person Name, Nationality Gender Date of Birth Date of Issue Date of Expiry Write a C++ program to perform following member functions: a. Enter the Details of all persons b. Display passport details of one person c. Display passp...
//Andrea Peña Calvin #include "cartas.h" std::ostream & operator << (std::ostream & arch, const tMazo & mazo) { std::string a; for (int i = 0; i < NUMEROCARTAS; i++) { arch << mazo.lista[(i + mazo.inicio) % NUMEROCARTAS] << ' '; } std::cout << '\n'; return arch; } std::ostream & operator << (std...
#include<stdio.h> #include<conio.h> using namespace std; char *removeduplicates(char *s) { bool arrhash[256] = {0}; int ip_index=0,res_index=0; while(*(s+ip_index)) { if(arrhash[*(s+ip_index)]!=1) { arrhas...
#include "upload.h" #include "config.h" #include "bnlogif.h" #include <sys/time.h> //state leval #define NOTE 0.3 #define WARN 0.2 #define SERIOUSWARN 0.1 //size of array #define COLUMN 3072 #define ROW 15 //array for state char memdata[ROW][COLUMN]; char memstate[ROW][COLUMN]; char cpudata[ROW][COLUMN]; char cpustate...
#pragma once #include <vector> #include <glm/glm.hpp> #include <GL/glew.h> #include "Scene.h" #include "Shader.h" #include "VertexArrayObject.h" #include "Fbo.h" class TerrainRenderer { public: //Create Terrain Renderer TerrainRenderer(); //Render Terrain From Scene, with Specific Projection Ma...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2006 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #include "core/pch.h" #ifdef MINPNG_ENCODER #include "modules/z...
#include "bilinear_form.hpp" #include "basis.hpp" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "space/initial_triangulation.hpp" #include "space/integration.hpp" #include "space/operators.hpp" #include "time/bases.hpp" #include "time/integration.hpp" #include "time/linear_operator.hpp" using datastructu...
#include "stdafx.h" #include "Editor.h" #include "DecalEntity.h" CDecalEntity::CDecalEntity() : mDecal(NULL), mScale(1.0f), mSize(4) { mpSceneMgr = GetEditor()->GetSceneManager(); } CDecalEntity::~CDecalEntity() { } void CDecalEntity::Create( const String& decalName, const String& mtlName, int si...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2004-2008 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * Yngve N. Pettersen */ #include "core/pch.h" #if defined(SELFT...
#ifndef SCENEINTERFACE_H_ #define SCENEINTERFACE_H_ class SceneInterface { protected: bool menu; public: SceneInterface(bool isMenu); virtual ~SceneInterface(); bool isMenu(); virtual void update(); }; #endif
#include <PostEffectsStateManager.h> #include <OGLML/PostProcessor.h> #include <MemoryManager.h> #include <LinearAllocator.h> #include <gameContext.h> #include <APostEffectState.h> #include <posteffects/PostEffectsFabric.h> #include <cassert> using namespace breakout; PostEffectsStateManager::PostEffectsStateMan...
#pragma once #include <QObject> #include <QString> //HTTP操作参数类型 typedef enum _HTTPTYPE { HTTPCONNECTION = 0, //HTTP连接参数 HTTPSESSION, //HTTP会话参数 HTTPFILE //HTTP文件参数 }HTTPTYPE; class CHTTPBase : public QObject { Q_OBJECT public: CHTTPBase(QObject *parent = 0); virtual ~CHTTPBase(); //设置下载管理器...
#ifndef BARRECARRE_H #define BARRECARRE_H #include <barre.h> /** * @brief The BarreCarre class */ class BarreCarre { public: BarreCarre(string _reference, const unsigned int _cote, const unsigned int _longueur, const double _densite, string _nomAlliage...
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2008, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condit...
// GuessMyWord.cpp : Ce fichier contient la fonction 'main'. L'exécution du programme commence et se termine à cet endroit. // #include <string> #include <iostream> #include <time.h> using namespace std; int main() { bool play = true; bool wrongEnter = false; bool wordFind = true; bool charFind = tru...
#include "DsgccClient.h" namespace WPEFramework { ENUM_CONVERSION_BEGIN(Exchange::IDsgccClient::state) { Exchange::IDsgccClient::Unknown, _TXT("Unknown") }, { Exchange::IDsgccClient::Ready, _TXT("Ready") }, { Exchange::IDsgccClient::Changed, _TXT("Changed") }, { Exchange::IDsgccClient::Error,...
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "Nerucci.h" #include "NerucciGameMode.h" #include "NerucciPawn.h" ANerucciGameMode::ANerucciGameMode(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { // set default pawn class to our character class DefaultPawnClass = ANe...
#include <iostream> #include <vector> using namespace std; int n, k, x; long long solve() { vector<long long> ending_with_x(n), not_with_x(n); ending_with_x[0] = x == 1 ? 1 : 0; not_with_x[0] = x == 1 ? 0 : 1; for(int i = 1; i < n;i++) { //all the previous not ending with x will end with x...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php....
#ifndef INPUTVIEW_H #define INPUTVIEW_H #include <QWidget> class InputContext; class QPushButton; namespace Ui { class InputView; } class InputView : public QWidget { Q_OBJECT public: explicit InputView(InputContext* inputContext, QWidget *parent = 0); ~InputView(); void setFoc...
/* * 题目:81. 搜索旋转排序数组 II * 链接:https://leetcode-cn.com/problems/search-in-rotated-sorted-array-ii/ * 知识点:二分查找,思维 */ class Solution { public: bool search(vector<int>& nums, int target) { int n = nums.size(); if (n == 0) { return false; } else if (n == 1) { return num...
#include "simpleintrest.h" #include "ui_simpleintrest.h" #include<rone.h> simpleintrest::simpleintrest(QWidget *parent) : QDialog(parent), ui(new Ui::simpleintrest) { ui->setupUi(this); } simpleintrest::~simpleintrest() { delete ui; } void simpleintrest::on_pushButton_clicked() { ...
#include "rsstreewidget.h" RssTreeWidget::RssTreeWidget(QWidget *parent) : QTreeWidget(parent) { setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(onCustomContextMenuRequested(const QPoint&)) ); }
/* * File: TwistOperationTest.cpp * Author: azamat * * Created on Jan 31, 2013, 1:15:59 PM */ #include "twistOperationTest.hpp" CPPUNIT_TEST_SUITE_REGISTRATION(TwistOperationTest); TwistOperationTest::TwistOperationTest() { } TwistOperationTest::~TwistOperationTest() { } void TwistOperationTest::setUp() { ...
#include "Vector3.h" #include "MyDemo.h" static MyDemo* demo = 0; #ifdef _PSP_VER #include <psptypes.h> #include <kernel.h> #include <displaysvc.h> #include <ctrlsvc.h> #include <libgu.h> #include <libgum.h> #include <libvfpu.h> SCE_MODULE_INFO( Fireworks, 0, 1, 1 ); //use VFPU on the main thread int sce_user_mai...
#ifndef _SPIKEBALL_H #define _SPIKEBALL_H #include "geom/geometry.h" #define lerp(t, a, b) ( a + t * (b - a) ) class Spikeball : public Geometry { public: Spikeball(float _rad); ~Spikeball() {}; float dist(glm::vec3 *pt, glm::vec3 *dir = NULL); void debug(); float smoothstep(float ed...
#include <bits/stdc++.h> using namespace std; // Time Complexity will O(3^n); int maxCuts(int n, int a, int b, int c) { if(n==0) return 0; else if(n<0) return -1; // cout << n << a; int result = max ( maxCuts(n-a, a, b, c), maxCuts(n-b, a, b, c), maxCuts(n-c, a, b, c) ); if(result == -1) return -...
#ifndef MIX_WORD_H #define MIX_WORD_H #include "mix_byte.h" #include "mix_field_specification.h" #include "mix_generic_word.h" namespace mix { class Word : public GenericWord<5> { public: Word() = default; Word(Sign sign, byte a1, byte a2, byte i, byte f, byte c); }; } // namespace mix #endif // MIX_WORD_H
#include<iostream> #include"Calculator.h" using namespace std; int main(){ double x=0.0; double y=0.0; double result=0.0; char oper='+'; cout << "Calculator Console Application\n\n" ; cout << "Please enter the operation to perform. Format: a+b | a-b | a*b | a/b\n"; Calculator c; //fo...
ON_CALL(meb, getSpeeed(60)).WillByDefault(Return(60)); ON_CALL(meb, getRoadDistance(180)).WillByDefault(Return(1800));
#ifndef __AFN_HPP__ #define __AFN_HPP__ #include <map> #include <set> #include <queue> #include "afd.hpp" class AFN{ private: std::map< int, std::set< std::pair< char, int > > > trans; std::set< int > ini, fin, est; std::map< int, std::set< int > > eTrans; std::set< char > sim; void _dfsETrans(int v, std::set< i...
/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: kirigaya <kirigaya@mkacg.com> * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or...
#ifndef __MISC_FUNCS_HH__ #define __MISC_FUNCS_HH__ #include <iostream> #include <fstream> #include <vector> #include <string> #include <dirent.h> #include <pthread.h> std::vector<std::string> tokenize(std::string line, char seperator); std::vector<std::string> convert_argv(char* argv[], int argc); bool dir_is_usable...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * 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 wit...