text
stringlengths
8
6.88M
#include<iostream> #include<vector> using namespace std; int main() { vector<int> v; for(int i=0;i<5;++i){ v.push_back(i); } vector<int>::iterator i; for(i = v.begin();i!=v.end();++i){ cout<<*i<<" "; *i *=2; } cout<<endl; for(vector<int>::reverse_iterator it=...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2007 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef PASSWORD_STRENGTH_H #define PASSWORD_STRENGTH_H namespa...
#pragma once #include "ofMain.h" #include "grotesParticle.h" class grotes { public: void setup(); void update(); void draw(); void toggleGo(); void clear(); vector <grotesParticle> p; void fadeOut(); void compalsion(); private: int time; bool bFadeOut; bool bakuhatu; };
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-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 PROXYOPPLUGINWINDOW_H__ #define PROXYOPPLUGINWINDOW_H__ ...
// Created on: 2002-07-09 // Created by: Andrey BETENEV // Copyright (c) 2002-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 version 2.1 a...
#ifndef C_OBSERVER_H #define C_OBSERVER_H class CObservable; class CObserver { public: virtual ~CObserver() = default; virtual void OnNotified(const CObservable* observable) = 0; protected: CObserver() = default; }; #endif
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2008-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 _EXTERNAL_SSL_SUPPORT_ #...
#include "CRegResetPassword.h" #include "json/json.h" #include "Logger.h" #include <string> #include "MySqlDBAccess.h" #include "../threadres.h" #include "JsonValueConvert.h" #include "SqlLogic.h" int CRegResetPassword::do_request(const Json::Value& root, char *client_ip, HttpResult& out) { //Json::Value jvRet; J...
/*! * \file statedelegate.h * \author Simon Coakley * \date 2012 * \copyright Copyright (c) 2012 University of Sheffield * \brief Header file for the machine state delegate */ #ifndef STATEDELEGATE_H_ #define STATEDELEGATE_H_ #include <QItemDelegate> #include <QModelIndex> #include <QObject> #include <QSize> cla...
#pragma once #include "global.h" #ifndef LEVELMAP_H #define LEVELMAP_H #include "sprite.h" class LevelMap { private: public: LevelMap(); ~LevelMap(); Sprite Container; }; #endif
// // Created by griha on 16.12.17. // #include <misc/logger.hpp> DECLARE_LOG_DEBUG(Standard, "MICRON SST");
#ifndef JOYSTICK_CALLBACK_HPP #define JOYSTICK_CALLBACK_HPP #include <vector> #include "axis.hpp" #include "button.hpp" namespace joystick { class callback { public: virtual void on_read(const std::vector<axis> &axes, const std::vector<button> &buttons) { return; } ...
/* -*- 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 LIBSSL_RANDFIELD_H #define LIBSSL_R...
#include "mix_instruction.h" #include <sstream> namespace mix { enum bytes_format { byte_a1 = 0, byte_a2 = 1, byte_i = 2, byte_f = 3, byte_c = 4 }; short Instruction::get_address() const { return word.get_address(); } Instruction::Instruction(const Word &word) : word{word} { } Instruction::Instruction(byte cmd,...
#if !defined(_ABAQUS_H_) #define _ABAQUS_H_ #include "DataStruct.h" #include <afx.h> class CABAQUS { private: int m_PointNum; int m_TetraNum; int m_FaceNum; vec3d* m_Point; vec3i* m_Face; vec4i* m_Tetra; public: CABAQUS() { m_Point=NULL; m_Tetra=NULL; m_Face=NULL; }; ~CABAQUS() { if(m_Point) ...
#include <posteffects/PostEffectsFabric.h> #include <APostEffectState.h> #include <posteffects/IdlePostEffect.h> #include <posteffects/ChaosPostEffect.h> #include <posteffects/ConfusePostEffect.h> #include <posteffects/ShakePostEffect.h> #include <MemoryManager.h> #include <LinearAllocator.h> #include <cassert> usi...
#include <string> #include <vector> #include "pico/stdlib.h" int main() { stdio_init_all(); //sleep_ms(10000); std::string str("im a string"); puts(str.c_str()); std::vector<int> vec; vec.push_back(22); try { throw 666; puts("this is never printed"); } catch (int e) { printf("Caught error %d\n", e); ...
// Created on: 2006-12-05 // Created by: Sergey KOCHETKOV // Copyright (c) 2006-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 version 2....
#include "Input.hh" #include "Sim.hh" #include "Map.hh" #include "Client.hh" #include "Terrain.hh" #include "Config.hh" #include "util/Profiling.hh" #define GLM_FORCE_RADIANS #include <GL/glu.h> #include <glm/gtx/rotate_vector.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <inli...
#include "Shader.h" #include <iostream> #include <fstream> #include <sstream> #include <string> Shader::Shader(const std::string& path) :filePath(path), rendererID(0) { ShaderProgramSource source = ParseShader("resources/shaders/Basic.shader"); rendererID = CreateShader(source.VertexSource, source.FragmentSource);...
// BEGIN CUT HERE // PROBLEM STATEMENT // In Chemistry, there's a different meaning to the word // 'solution' than in programming. When we mix x liters of // some substance with (100-x) liters of water, we get 100 // liters of x-% solution of that substance. // You are given several bottles containing solutions of t...
#ifndef CONTACT_CLASS_H # define CONTACT_CLASS_H class Contact { public: int index; std::string firstName; std::string lastName; std::string nickName; std::string login; std::string postal_address; std::string email_address; std::string phone_numer; std::string birthday_date; ...
#include <iostream> #include "x.cpp" using namespace std; void addNode(BSTNode * &tree, int klucz) { BSTNode *newNode=new BSTNode; newNode->right=NULL; newNode->left=NULL; newNode->up=NULL; newNode->key=klucz; if (tree == NULL) { tree = newNode; } else { BSTNode * cp = tre...
#include "../includes/polinom.h" #include "../includes/monom.h" #include <iostream> using namespace std; polinom::polinom () { head = NULL; } void polinom::add (int deg_x, int deg_y, int deg_z, double a) { link* t = new link (deg_x, deg_y, deg_z, a); if (head == NULL) { head = new link (*t); ...
#pragma once #include <iberbar/Renderer/RendererBase.h> #include <iberbar/Utility/Size.h> namespace iberbar { namespace Renderer { namespace OpenGL { class CDevice; class __iberbarExports__ CRenderer : public CRendererBase { public: CRenderer(); virtual ~CRenderer(); public: /...
#include <iostream> #include <opencv2/opencv.hpp> // include OpenCV header file #include <librealsense2/rs.hpp> // include the librealsense C++ header file using namespace std; using namespace cv; using namespace rs2; int main(int argc, char* argv[]) try { // Declare depth colorizer for pretty visualiza...
#include <iostream> using namespace std; class INavigation{ public: virtual void MoveToRight()=0; virtual void MoveToLeft()=0; }; class Carplay:public INavigation{ public: void MoveToRight(){ cout<<"\n Carplay -> Right \n"; } void MoveToLeft(){ cou...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef __MIMESEC_H__ #define __MIMESEC_H__ #include "modules/...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int solve(int n, int p){ int turnFront, turnBack; if(p%2==1) turnFront = (p-1)/2; else turnFront = p/2; if(n%2==1) turnBack = (n-p)/2; else{ n++...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <quic/QuicException.h> #include <quic/congestion_control/CongestionControlFunctions.h> #include <quic/cong...
/** * @author Emilie Wirbel * * This file was generated by Aldebaran Robotics ModuleGenerator */ #ifndef BUMPER_BUMPER_H #define BUMPER_BUMPER_H #include <boost/shared_ptr.hpp> #include <boost/function.hpp> #include <alcommon/almodule.h> #include <string> #include <vector> #include <alproxies/almemoryproxy.h> #i...
// Created on: 1992-09-28 // Created by: Remi GILET // Copyright (c) 1992-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 Les...
#include "BulletLayer.h" #include "PlaneLayer.h" BulletLayer::BulletLayer(void) { //bulletSpriteFrame=NULL; // bulletBatchNode = nullptr; m_pAllBullet = __Array::create(); m_pAllBullet->retain(); } BulletLayer::~BulletLayer(void) { m_pAllBullet->release(); m_pAllBullet = nullptr; } bool Bulle...
/* * HCSR04P * based on: * https://github.com/gamegine/HCSR04-ultrasonic-sensor-lib * * modified by Pascal Pfeiffer * 2019 07 04 */ #include <Arduino.h> class HCSR04P { public: // initialisation class HCSR04 (trig pin , echo pin) HCSR04P(int out,int echo); // initialisation class HCSR04 (trig pin , e...
// // Created by giofn on 03/01/2020. // #ifndef CELLE_CELL_H #define CELLE_CELL_H #include "Subject.h" #include "Formula.h" class Cell :public Subject{ public: Cell():Subject(),value(0) {} ~Cell(){ for (auto itr = formule.begin(); itr != formule.end(); itr++) (*itr)->unsubscribe(this...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- // // Copyright (C) 2003-2010 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 "adjunct/quick/managers/Downloa...
#include <Poco/Runnable.h> #include <Poco/Thread.h> #include <iostream> using namespace Poco; class MyWorker : public Runnable { public: MyWorker(int k = -1) : Runnable(), n(k) {} virtual void run() { for (int i = 1; i <= 10; i++) { for (int j = 0; j < 1000000; j++) ; // do nothing std::c...
#include "../classes/AppBill.h" #include "../threads/ThreadWeb.h" #include "../threads/ThreadLog.h" #include "../threads/ThreadSyncMaster.h" #include "../threads/ThreadSyncSlave.h" AppBill &app() { static AppBill appVar; return appVar; } void AppBill::runApp() { registerAllThreads(); // Модуль веб...
#include "GnMeshPCH.h" #include "GnDataStreamLockPolicy.h"
/*********************************************************************************** * Name: John Costello * Date: 5/11/2017 * Project 3 * Description: This program lets two Creatures battle. ***********************************************************************************/ #ifndef INPUTVALIDATION_HPP #define INPUT...
#include <ctime> #include <iostream> #include <vector> #include <cassert> #include <algorithm> #include "UrgentQueue.h" #include "Job.h" //Most of these functions are taken from lab or modified versions of it, besides remove_from_index UrgentQueue::UrgentQueue(std::vector<Job*> const& values) { //Taking pas...
#include <iostream> using namespace std; class square { public: int multi(int); };
#ifndef SKILLFACTORY_H #define SKILLFACTORY_H #include <vector> #include <string> class CSkill; class TiXmlElement; class CSkillFactory { public: CSkillFactory(); virtual ~CSkillFactory(); public: virtual std::wstring getName() = 0; virtual CSkill* create(TiXmlElement* pSkillNode) = 0; }; class CInc...
vector<uint64_t> generate_fibonaccis(int n) { vector<uint64_t> fib(n); fib[0] = 1; fib[1] = 1; for (int i = 2; i < n; ++i) { fib[i] = fib[i - 2] + fib[i - 1]; } return fib; } int main() { int n = 10; vector<uint64_t> fib = generate_fibonaccis(n); for (int i = 0; i < n; i++) { std::cout << fib...
#ifndef CHANGEWINDOW_H #define CHANGEWINDOW_H #include <QDialog> namespace Ui { class ChangeWindow; } class ChangeWindow : public QDialog { Q_OBJECT public: explicit ChangeWindow(QWidget *parent = nullptr); ~ChangeWindow(); bool not_closed(); QVariant get_new_status(); private slots: vi...
// Created on: 2007-11-24 // Created by: Alexander GRIGORIEV // Copyright (c) 2007-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 version ...
/**************************************************************************************************************************************************************** Author: Dhairya Dhondiyal Description: This program decodes huffman encoded file Disclaimer: Copyright (C) - All Rights Reserved Unauthorized ...
#include<iostream> using namespace std; int main() { int L, D; int K, P; int custoP, custoK, custoT; cin >> L >> D; cin >> K >> P; custoP = (L/D)*P; custoK = L*K; custoT = custoP + custoK; cout << custoT; return 0; }
#ifndef CONFIGURATION_HPP #define CONFIGURATION_HPP // Namespace name configuration #define MATH_NAMESPACE math #define PHYSICS_NAMESPACE phy #define GRAPHICS_NAMESPACE gfx // Platform independent data types using i8 = char; using i16 = short; using i32 = int; using i64 = long long; using u8 = unsigned char; u...
int sensor = 0; int sensorLumiValue = 0; const int Led1 = 7; const int Led2 = 6; const int Led3 = 5; void setup() { // put your setup code here, to run once: pinMode(sensorLumiValue, INPUT); //comunicação serial Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: // pr...
#include <cmath> #include <iostream> using namespace std; using ll = long long; const ll INF = 1LL << 50; int main() { int Q; cin >> Q; for (int q = 0; q < Q; ++q) { ll n, x, y, d; cin >> n >> x >> y >> d; ll ans = INF; if (abs(y - x) % d == 0) { ans = min(an...
// // Created by PulsarV on 18-9-25. // #ifndef FLIGHTER_FLIGHT_SERIAL_H #define FLIGHTER_FLIGHT_SERIAL_H #include <map> #include <string> #include <fcntl.h> #include <iostream> #include <termios.h> #include <zconf.h> #define RC_SERIAL_MAX_RECIVE_BUFFER_SIZE 2048 #define RC_SERIAL_STATUE int #define RC_SERIAL_ERROR -...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); ...
#ifndef _CITY #define _CITY #include "MyPoint.h" #include "GeoInfo.h" class City : public MyPoint { public: City(string city, Earth &earth); void draw(void); string address; int offset; private: void initQuadric(); string name; GeoInfo* geoinfo; GLUquadricObj *q; // Quadratic For Drawing A Sphere }; #...
#ifndef WIDGET_H #define WIDGET_H #include "inserisci.h" #include "ricerca.h" #include "catalogo.h" #include "model.h" #include "menu.h" #include <QWidget> #include <QVBoxLayout> class Controller : public QWidget{ Q_OBJECT private: Model* modello; Menu* menu; QHBoxLayout* layoutPrincipale; Cata...
#ifndef LIST_H #define LIST_H #include <cstdlib> // malloc, free #include <cassert> template<class T> struct List { T *data; int num; int cap; }; template<class T> void ListReserve(List<T> &list, int n) { assert(n > 0); if (list.cap < n) { T *new_data = (T*)malloc(n * sizeof(T)); ...
//function taking the root which checks if the given tree is a binary search tree or not #include <climits> bool checkNode(Node* n,int min,int max) { if (!n) return true; //leaf, don't disqualify if (n->data < min || n->data > max) return false; return checkNode(n->left,min,n->data -1) && checkNode(n->righ...
#include"TextPanel.h" #include<iostream> std::string TextPanel::message = ""; TextPanel::TextPanel() { } void TextPanel::appendMessage(std::string message) { TextPanel::message += message; } void TextPanel::outputStates() { Player *p = Floor::getInstance()->getPlayer(); std::cout << "\tClass:" << p->getType(); ...
#include <bits/stdc++.h> using namespace std; long long t,prevnum,prevans; struct numbers { long long val,pos,ans; }s[1000000]; bool sortstruct1(struct numbers x, struct numbers y) { if(x.val > y.val) return 0; else return 1; } bool sortstruct2(struct numbers x, struct number...
// Created on: 2013-12-25 // Created by: Varvara POSKONINA // 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 version 2....
#include <I2CDevice.h> #include <iostream> #include <unistd.h> #include <linux/i2c-dev.h> using namespace std; I2CDevice::I2CDevice(int busFileDescriptor, int address) : _busFileDescriptor(busFileDescriptor) { if (ioctl(_busFileDescriptor, I2C_SLAVE, address) < 0) { cout << "I2CDevice::I2CDevice Failed to open t...
/* -*- 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 SSLURL_RETRIEVE_H #define SSLU...
#include<bits/stdc++.h> using namespace std; #define MOD 1000000007 #define pr pair<int,int> #define pb push_back #define mp make_pair #define fi first #define se second typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin>>t; while(t--) { long a,b,c,x,y; ...
/* #include "Globals.h" #include "Application.h" #include "ModuleTextures.h" #include "ModuleRender.h" #include "ModulePlayer.h" #include "ModuleBackground.h" #include "ModuleInput.h" #include "SDL/include/SDL.h" #pragma comment( lib, "SDL/libx86/SDL2.lib" ) #pragma comment( lib, "SDL/libx86/SDL2main.lib" ) // Refer...
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen ( SIVA ) // 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 ...
#pragma once #include "iUser.h" class iPlayer { public: virtual ~iPlayer() {} virtual bool IsBankrupty() = 0; virtual bool Debit(unsigned int money) = 0; virtual bool Withdraw(unsigned int money) = 0; };
#include<iostream> using namespace std; int main() { long long n,first,second,third; cin>>n; if(n%2==0) { first=(n/2)*(n/2)-1; second=n; third=(n/2)*(n/2)+1; } else { long long a=(n+1)/2; long long b=(n-1)/2; first=a*a-b*b; second=2*a...
def Dphi_pDvi(vi, xi, xj): u0,u1,u2 = vi x0,x1,x2 = xi y0,y1,y2 = xj vi_mag_sqr = u0*u0 + u1*u1 + u2*u2 vi_mag = sqrt(vi_mag_sqr) sin_alpha_i = sin( 0.5*vi_mag ) cos_alpha_i = cos( 0.5*vi_mag ) Dphi_pDu0 = ((-x0 + y0)*(2*cos_alpha_i*sin_alpha_i*u1/vi_mag + ...
#pragma once #include <iberbar/LuaCppApis/Headers.h> //#define LuaCppNamespace "iberbar.Rhi" // //#define LuaCppName_Texture "CTexture" //#define LuaCppName_Texture_FullName LuaCppNamespace "." LuaCppName_Texture namespace iberbar { namespace RHI { static const char LuaCppNamespace[] = "iberbar.Rhi"; static...
/* 7. Write a program to implement FCFS scheduling algorithm. Author: Anshul Verma */ #include <iostream> #include <stdlib.h> using namespace std; struct Process { int pID; int priority; int arrivalTime; int burstTime; int completionTime; int waitingTime; int turnAroundTime; }; void swapProcess(struct Proc...
/** * @file messagemanager.h * * @brief This file contains the interface for how incoming messages will be * handled. * @version 0.1 * @date 2021-06-24 * * @copyright Copyright (c) 2021 * */ #include "message.h" // * All message retriever includes below * #include "messageretriever....
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; typedef long long LL; const LL mod = 1000000007; const int maxn = 2e6; LL mul[max...
#include <string> #include <vector> #include <fstream> #include <iostream> #include <algorithm> #include <GL/glew.h> #include <glm/glm.hpp> #include "../include/shader.h" using namespace std; GLuint LoadShaders( const char * vertexFilePath,const char * fragmentFilePath ){ // Create shaders GLuint VertexSh...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*- * * Copyright (C) 2007-2012 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 MEDIA_...
#include<stdio.h> #include<stdlib.h> #include<conio.h> struct node { int data; struct node *link; }; void append(struct node **q, int num) { struct node *temp, *r; if (*q == NULL) { temp = (struct node *)malloc(sizeof(struct node)); temp->data = num; temp->link = NULL; *q = temp; } else { temp = *...
#include<iostream> #include<cstdio> #include<cmath> using namespace std; #define ull unsigned long long #define ll long long #define ul unsigned long #define min(a,b) ((a)<(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b)) #define pi acos(-1.0) #define mod 10000000007 #define precision 0.00000...
#include <Wire.h> #include <Arduino.h> //#include <SoftPWMServo.h> #include <Servo.h> #define DEBUG_SERIAL 1 #define MAX_CMD_BUF 17 #define CMD_AUTO 0 #define CMD_STR 1 #define CMD_THR 2 #define CMD_TIME 3 const int PIN_STR = 9; const int PIN_THR = 7; const int PIN_IN_STR = 13; const int PIN_IN_THR = 12; const int ...
#ifndef __VIVADO_SYNTH__ #include <fstream> using namespace std; // Debug utility ofstream* global_debug_handle; #endif //__VIVADO_SYNTH__ #include "mp23_4_opt_compute_units.h" #include "hw_classes.h" struct in_in_update_0_write0_merged_banks_2_cache { // RAM Box: {[0, 124], [0, 127], [0, 63]} // Capacity: 33...
/* -*- coding: utf-8 -*- !@time: 2019/11/28 14:31 !@author: superMC @email: 18758266469@163.com !@fileName: 0005_achieve_queue_by_two_stacks.cpp */ #include <environment.h> class Solution { public: void push(int node) { while (!stack1.empty()) { stack1.pop(); } ...
#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...
// // C++ Interface: SendFileData // // Description: // 发送文件数据 // // Author: Jally <jallyx@163.com>, (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SENDFILEDATA_H #define SENDFILEDATA_H #include "mess.h" class SendFileData: public TransAbstract { public: SendFileDat...
// This file was generated based on /usr/local/share/uno/Packages/Fuse.Marshal/1.3.1/Computer.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Computer.h> namespace g{namespace Fuse{struct Computer1;}} namespace g{ namespace Fuse{ // internal abstract class Computer<...
// 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....
//https://www.reddit.com/r/dailyprogrammer/comments/4savyr/20160711_challenge_275_easy_splurthian_chemistry/ //bonus 1 and 2 as well. #include <iostream> // std::cout #include <string> // std::string #include <vector> #include <algorithm> void isValidName(std::string ele, std::string sym) { signed shor...
#include <DMA.h> /*** DMA device channel ***/ void dmaChannel::transferBlock() { // set start bits channel_control.bit_fields.start_busy = 1; channel_control.bit_fields.start_trigger = 0; // transfer all at once if (channel_control.bit_fields.sync_mode == 0) { // TODO:...
#pragma once #include <QtWidgets/QMainWindow> #include "ui_Qt_Battery_View.h" #include<QGraphicsScene> #include<QGraphicsView> //graphicsview类 #include <qlabel.h> //label类 #include<opencv2\imgproc\imgproc.hpp> #include <opencv2\core\core.hpp> #include <opencv2\highgui\highgui.hp...
#pragma once #ifndef ARRAYQUEUE_HPP_INCLUDE #define ARRAYQUEUE_HPP_INCLUDE namespace aq { #include <stdio.h> #include <stdlib.h> typedef int type; typedef struct Queue { int size; int head; int tail; type *array; }Queue; int aqUI(); Queue *initQueue(int size); void enQueue(Queue *queue, type value); i...
#ifndef TRIENODE_H #define TRIENODE_H #include "../utilities/Utils.h" namespace model { class TrieNode { private: bool isLeaf; TrieNode* children[ALPHABET_SIZE]; public: // // Node used for Trietree // // @precondition none // @postcondition none // TrieNode(); // // De...
#ifndef NPCMANAGERBTDECISIONMAKINGADMINISTRATOR_H_INCLUDED #define NPCMANAGERBTDECISIONMAKINGADMINISTRATOR_H_INCLUDED #include "BehaviourTree/BehaviourTreeModule.h" class NPCManagerBTDecisionMakingAdministrator { private: BehaviourTree::BlocRoot m_behaviorTreeRoot; public: NPCManagerBTDecisionMakingAdmin...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "Room.h" #include "item.h" #include <iostream> #include <sstream> #include <string> using namespace std; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); createRooms(); ...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include "draw.hpp" #include "sgfx.hpp" #include "ui/List.hpp" #include "ui/Button.hpp" using namespace ui; List::List(ElementLinked * parent) : ElementLinked(parent) { set_scroll_visible(); set_animation_type(AnimationAttr::PUSH_LEFT); m_scroll_animation.s...
// Created on: 1996-11-25 // Created by: Philippe MANGIN // Copyright (c) 1996-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...
#pragma once #include <iberbar/Font/FontBase.h> namespace iberbar { class CFontDeviceFt; class CFontDeviceFtCore; class CFontFaceFt; class CFontFaceFtCore; class CBitsBuffer; class __iberbarFontApi__ CFontDeviceFt { public: CFontDeviceFt(); ~CFontDeviceFt(); public: CResult Initialize(); CResult...
//: C11:NoCopyConstruction.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 // Zapobieganie uzyciu konstruktora kopiujacego class NoCC { int i; NoCC(const NoCC&); // Brak definicji publ...
/* -*- 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. */ #ifndef CHAT_DESKTOP_WINDOW #define CHAT_DESKTOP_WINDOW #if defi...
#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...
#include <_/PlatformSpecSelector.h> #include <_G/text_renderer.h> #include <_/UnicodeBidi.h> #include <_G/NativePaintInterface.h> namespace _GUI { namespace Paint { namespace helper { template<typename F> void for_each_line (const wchar_t* str, std::size_t len, int top, F& f) { auto head = str; auto end = str ...
#include<stdio.h> int t,m,s,a; main() { scanf("%d %d %d",&t,&m,&s); a=t*3600+m*60+s; printf("%d",a); }
#include "Character.h" #include <math.h> Character::Character() { playerNumber = -1; } void Character::Setup( int player ) { playerNumber = player; if ( playerNumber == 1 ) { x = 10*32; y = 36*32; w = 32; h = 32; mousePlayer = true; } else { ...
/** *xuchen *2015-11-24 16:45:06 **/ /** *Flow network Demo **/ #include "stdio.h" #include <cstring> #include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> using namespace std; const int N = 205; const int INF = 0x3f3f3f3f; int map[N][N]; int path[N]; int flow...