text
stringlengths
8
6.88M
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2010 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #include "core/pch.h" #include "modules/database/src/opdatabase...
#pragma once #include <Component.h> #include <array> namespace breakout { class MovementComponent : public BaseComponent { public: static EComponentType GetType() { return EComponentType::Movement; }; MovementComponent(); ~MovementComponent(); const std::array<float, 2>& GetVelocity() const; ...
#include <iostream> #include <algorithm> using namespace std; int main(void) { int time[1001] = { 0 }; int n; int result = 0; cin >> n; for (int i = 1; i <= n; i++) { cin >> time[i]; } sort(time+1, time + n +1); for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { result += time[j];...
#ifndef LIGHTIMAGE_POINT_H #define LIGHTIMAGE_POINT_H namespace li { template<typename _Tp> class Point2_ { public: Point2_(_Tp _x, _Tp _y); Point2_(const li::Point2_<_Tp> &p); Point2_(); const Point2_ operator+(const Point2_ &p); const Point2_ operator-(const P...
#pragma once class GameCursor; class AIEditNodeButton; class AIEditNode; class AIEditNodeTechnique; class AIEditNodeProcess; class AIEditNodeSelectFonts; class AIEditNodeTarget : public GameObject { public: ~AIEditNodeTarget(); bool Start(); void Update(); void Num(); void Technique(); void FontsConfirmation();...
#ifdef __BUILDING_THE_DLL #define __EXPORT_TYPE __export #else #define __EXPORT_TYPE __import #endif #ifndef _MYDLL_H #define _MYDLL_H typedef struct _dllversioninfo { DWORD dwmajorversion; DWORD dwminorversion; DWORD dwbuildnumber; DWORD dwplatformid; }dllversioninfo; typedef LONG HRESULT; ...
#include <iostream> #include <windows.h> #include <algorithm> using namespace std; #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) //必要的,我是背下来的 int getPixel(){ HDC hDC = ::GetDC(NULL); //获取屏幕DC POINT pt; GetCursorPos(&pt); COLORREF clr = ::GetPixel(hDC,pt.x,pt.y); int r...
// // Utils.cpp // RSA // // Created by ivan sarno on 21/08/15. // Copyright (c) 2015 ivan sarno /* 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....
#include "_pch.h" #include "RecentDstOidModel.h" using namespace wh; //----------------------------------------------------------------------------- RecentDstOidModel::RecentDstOidModel(std::size_t max_items) :mMaxItems(max_items) { } //----------------------------------------------------------------------------- v...
// // main.cpp // Pila // // Created by Daniel on 09/10/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #include <iostream> #include "Pila.h" int main(int argc, const char * argv[]) { Pila<int> * pila = new Pila<int>(); pila->push(1); pila->push(2); std::cout<< "tamano de ...
/** * @file RunActionMessenger.cc * * @date 31 Mar 2011 * @author Pico * * @brief Physics list: particle definitions and processes. */ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... #include "RunActionMessenger.hh" #include "RunAction.hh" #include "G4UIdirectory.hh" #inc...
// // SDL_windows.hh for training in /home/franco_n/tek_one/test/cpp/git/pokemon_poubelle/classes // // Made by François Clément // Login <franco_n@epitech.net> // // Started on Tue Sep 15 18:51:18 2015 François Clément // Last update Tue Sep 15 19:11:15 2015 François Clément // #ifndef SDL_WINDOWS_HH_ # define S...
#ifndef GENERIC_ENTITY_H #define GENERIC_ENTITY_H #include "EntityBase.h" #include <string> #include "Collider/Collider.h" class Mesh; class GenericEntity : public EntityBase, public Collision { public: GenericEntity() { modelMesh = nullptr; }; GenericEntity(Mesh* _modelMesh); virtual ~GenericEntity(); enum OBJ...
// // Created by laureano on 11/11/19. // #ifndef AEDA_PROJETO_BILHETE_H #define AEDA_PROJETO_BILHETE_H #include "SalaEspetaculo.h" class Bilhete { float valor; Evento *evento; public: Bilhete() {}; float getValor() const; void setValor(float valor); const Evento &getEvento() const; v...
#pragma once #include"Product.h" class Builder{ public: Builder(); virtual ~Builder(); virtual void BuildPartA(); virtual void BuildPartB(); virtual void BuildPartC(); virtual Product* GetResult(); protected: Product* m_prod; };
#include<bits/stdc++.h> using namespace std; int main(){ int T; cin>>T; while(T--){ int l,n; cin>>l>>n; int minn=INT_MIN,maxx=INT_MIN; for(int i=0;i<n;i++){ int a; cin>>a; int ta=min(a,l-a); int tb=max(a,l-a); ...
#include "stdafx.h" #include "IP.h" BOOL IP::Write(BYTE *link) { memcpy(link, &m_VersionIHL, 1); memcpy(link + 1, &m_DifferentiatedServices, 1); memcpy(link + 2, &m_Totallength, 2); memcpy(link + 4, &m_Identification, 2); memcpy(link + 6, &m_UnusedDFMFFragmentoffset, 2); memcpy(link + 8, &m_Timetolive, 1); memc...
const int buttonPin1 = 2; const int buttonPin2 = 4; const int buttonPin3 = 7; const int buttonPin4 = 12; const int buttonPin5 = 13; const int buttonPin6 = 14; const int encoderPin_A = 8; const int encoderPin_B = 9; const int potPin = 2; //LED Pins const int LEDhighest = 3; const int LEDhigh = 5; const int LEDmid = 6;...
#include "solarsystem.h" namespace Simulation { SolarSystem::SolarSystem(int _ID) { this->ID = _ID; } SolarSystem::~SolarSystem() { for (int i = 0; i < this->world_count; i++) { delete this->worlds[i]; } } void SolarSystem::Init(glm::vec2 _position) { ...
// 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 <ESP8266WiFi.h> //https://github.com/esp8266/Arduino //needed for library #include <DNSServer.h> #include <ESP8266WebServer.h> #include <WiFiManager.h> //https://github.com/tzapu/WiFiManager int led1 = D1; int led2 = D2; String readString; WiFiServer server(80); void setup() { // put you...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2006 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef OPBPATH_H #define OPBPATH_H #ifdef SVG_SUPPORT #defi...
#include <stdlib.h> #include <GL/glut.h> //global variable int connection = 1; //control points which control the curvature GLfloat controlPoints[6][3] = { {-4.0, -4.0, 0.0}, {-2.0, 4.0, 0.0}, {-3.0, -3.0, 0.0 }, { 4.0, 4.0, 0.0 }, { 2.0, -4.0, 0.0 }, { 3.0, 2.0, 0.0 }}; void init(void) { glClearColor(0.0...
#include <QtGui/QApplication> #include "chekinadmin.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); chekinadmin w; w.show(); return a.exec(); }
//Created by: Mark Marsala, Marshall Farris, and Johnathon Franco Sosa //Date: 5/4/2021 //Header file for echo class #ifndef ECHO_H #define ECHO_H #include <iostream> /** * Class that creates an echo effect for the wav file */ class Echo{ int delay; public: /** * Constructor for the Echo class */ Echo(); /** ...
/// For Education Purpose /// Author: EstKey #include "stdafx.hpp" int main(char* argv[], int argc) { //sll::sllUI(); // Single Linked list //da::daUI(); //Dynamic Array //as::asUI(); //Array Stack //ls::lsUI(); //Linked Stack //aq::aqUI(); //Array Queue //sq::sqUI(); //Stack QUeue printf("Compiled Successf...
#include "aeTime.h" #include "aeString.h" #include <windows.h> namespace aeEngineSDK { /*************************************************************************************************/ /* @struct TIME_DATA /* /* @brief Time data. /*********************************************************************************...
/************************************************************************************** * File Name : ChatBox.hpp * Project Name : Keyboard Warriors * Primary Author : JeongHak Kim * Secondary Author : * Copyright Information : * "All content 2019 DigiPen (USA) Corporation, all rights reser...
// Fill out your copyright notice in the Description page of Project Settings. #include "TabletProject.h" #include "Modules/ModuleManager.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, TabletProject, "TabletProject" );
#include "articuloqueue.h" #include <cstddef> ArticuloQueue::ArticuloQueue() { //ctor this->start = NULL; this->end = NULL; } ArticuloQueue::~ArticuloQueue() { //dtor this->free(); } Articulo* ArticuloQueue::retrieve() { if (!start) return NULL; Articulo* valu...
/* Problem: 1008 Author: Kevin Washington (@kevinwsbr) */ #include <iostream> #include <stdio.h> using namespace std; int main(){ int a, b; float c; cin >> a; cin >> b; cin >> c; printf("NUMBER = %d\n", a); printf("SALARY = U$ %.2f\n", b*c); return 0; }
#pragma once #include <string> #include <iostream> #include <map> class SpelledNums { std::map<int, std::string> Num2Letter; int i_input; public: SpelledNums(); std::string Parse(std::string input); };
// ************************************** // File: KCheckboxView.h // Copyright: Copyright(C) 2013-2017 Wuhan KOTEI Informatics Co., Ltd. All rights reserved. // Website: http://www.nuiengine.com // Description: This code is part of NUI Engine (NUI Graphics Lib) // Comments: // Rev: 2 // C...
/* leetcode 146 * * * */ #include <unordered_map>; using namespace std; struct DLinkNode { int key, value; DLinkNode* prev; DLinkNode* next; DLinkNode():key(0), value(0), prev(nullptr), next(nullptr) {} DLinkNode(int _key, int _value):key(_key), value(_value), prev(nullptr), next(nullptr) {} };...
#ifndef GUARD_MEMdataConverter #define GUARD_MEMdataConverter #include <iostream> #include <string> #include <vector> #include "BaseConverter.hh" namespace xdaq { class ApplicationContext; } namespace xdaq { class ApplicationDescriptor; } class MEMdataConverter: public BaseConverter { public: MEMdataConverter(xdaq...
#ifndef __BATON_H__ #define __BATON_H__ #include <nan.h> #include <iostream> using namespace v8; typedef std::shared_ptr<Nan::Persistent<Function>> PersistentCallback; extern int nextBatonID; template<class T> class Baton { public: Baton(T *object, PersistentCallback callback) : id(++nextBatonID), inst...
#include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; ifstream myfile("infile-12.txt"); class Student { private: string fname; // first name of student string lname; // last name of student int G1, G2, G3, G4, G5, G6, G7; // grades for labs 1-7 int total; ...
/*! * @author Evan Driscoll */ #include "wali/witness/CalculatingVisitor.hpp" template class wali::witness::CalculatingVisitor<int>;
#include "Tool_Kalman.h" /** * @brief 构造一个新的卡尔曼滤波器实例 * 构造完成后,必须按照物理模型手动给 A、B、H 赋值 * * @param stateDim 状态空间维度,即你整个卡尔曼滤波器会接触到多少种物理量。 * 这些物理量之间必须是线性的,就是说他们之间的关系只有加减乘除、积分、微分 * 例如 位置-速度-加速度 的状态空间,就有3个维度 * * @param measureDim 测量矩阵维度,即有多少个传感器 * 例如你有 绝对码盘(角度)-相对码盘(角速度)-陀螺仪(角加速度),就有3个维度 * * @param controlDim 控制矩阵...
#include <iostream> #include <queue> #include <deque> #include <algorithm> #include <string> #include <vector> #include <stack> #include <set> #include <map> #include <math.h> #include <string.h> #include <bitset> #include <cmath> using namespace std; vector<int> getPartialMatch(const string &N) { int m = N.size()...
void rc(){ //Serial.begin(9600); ch1 = pulseIn(ip1, HIGH); //THRUSTER if (ch1 > 1550) { val1=map(ch1, 1550, 1900, 1550, 1900); thruster1.writeMicroseconds(val1); thruster2.writeMicroseconds(val1); delay(100); } else if (ch1 < 1450) { val1=map(ch1, 1450, 1100, 1450, 1300); thrust...
#include "TestFramework.h" #include "treeface/misc/PropertyValidator.h" #include <treecore/Array.h> #include <treecore/RefCountHolder.h> #include <treecore/Identifier.h> #include <treecore/NamedValueSet.h> #include <treecore/RefCountObject.h> #include <treecore/String.h> #include <treecore/Variant.h> using namespace ...
const int MOD=1e9+7; struct mint{ int x; mint():x(0){} mint(int s){ x=s;if(x<MOD && x>=0)return; x%=MOD;if(x<0)x+=MOD; } mint(ll s){int ts=s%MOD;if(ts<0)ts+=MOD;x=ts;} mint& operator+=(mint t){ if( (x+=t.x) >=MOD)x-=MOD;return *this;} mint& operator-=(mint t){ ...
// Created by: Kirill GAVRILOV // Copyright (c) 2013-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 as published // by the Fre...
#include <ionir/construct/inst_yield.h> namespace ionir { InstYield::InstYield(std::string yieldId) : yieldId(std::move(yieldId)) { // } }
#ifndef UTL_MATH_H #define UTL_MATH_H #include "utl/base.h" #include <cmath> namespace utl { namespace imp { inline constexpr double pi = 3.14159265358979323846; // M_PI isn't always defined } /** * @brief Convert decimal degrees to radians. * * @param deg Decimal degrees * @return Radians */ constexpr double ...
#include "keyframeselection.h" #include "ui_keyframeselection.h" #include <iostream> #include <string> #include <QFileDialog> #include "MatToQImage.h" #include <QGraphicsDropShadowEffect> KeyFrameSelection::KeyFrameSelection(QWidget *parent) : QWidget(parent), ui(new Ui::KeyFrameSelection) { std::cout << "...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2005 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Lars Thomas Hansen */ #ifndef OP_BITVECTOR_H #define OP_BITVEC...
/* 2015年12月9日21:45:04 #1037 : 数字三角形 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 问题描述 小Hi和小Ho在经历了螃蟹先生的任务之后被奖励了一次出国旅游的机会,于是他们来到了大洋彼岸的美国。美国人民的生活非常有意思,经常会有形形色色、奇奇怪怪的活动举办,这不,小Hi和小Ho刚刚下飞机,就赶上了当地的迷宫节活动。迷宫节里展览出来的迷宫都特别的有意思,但是小Ho却相中了一个其实并不怎么像迷宫的迷宫——因为这个迷宫的奖励非常丰富~ 于是小Ho找到了小Hi,让小Hi帮助他获取尽可能多的奖品,小Hi把手一伸道:“迷宫的介绍拿来!” 小Ho选择的迷宫是一个被称为“数字三角形”的...
// Erich Dingeldein #include <iostream> #include <fstream> #include <queue> #include <thread> #include <unistd.h> #include <semaphore.h> #include <fcntl.h> #include <sys/stat.h> const char* filenames[] = { "./output1.txt", "./output2.txt", "./output3.txt" }; const char* output_filename = "./output4.txt"; ...
#include <iostream> #include<string.h> using namespace std; int main() { int n,q; cin>>n; string strings[n]; for(int i=0;i<n;i++) { cin>>strings[i]; } cin>>q; string queries[q]; int result[q]; for(int i=0;i<q;i++) { cin>>queries[i]; result[i]=0; } //cou...
#include <iostream> #include <climits> using namespace std; typedef struct CircularQueue { int rear; int front; int size; int *arr; CircularQueue(int s) { front = rear = -1; size = s; arr = new int[s]; } void enQue(int); int deQue(); void displayQueue(...
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
#include <iostream> #include <stdexcept> #include <cstdlib> #include <string.h> #include <cstdint> #include "logger.hpp" #include "application.hpp" #include "world/block.hpp" #include "world/world.hpp" #include "world/generators/generator_flat.cpp" int main(int argc, char *argv[]) { Application application; //...
#include <Memory.h> #include <PSException.h> #include <iostream> // TODO: dealing with multiple bytes might need improvement. this needs to be quick. // these also need to be carefully tested. casting etc /*** Memory Bus ***/ int memBus::find(unsigned address) { // search list for correct memory device for (u...
#include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { //基本思想:动态规划,dp[i][0 or 1 or 2]表示第i天手上是否持有股票或冷冻期状态下的最大收益 //dp[i][0]表示第i天手中不持有股票状态下的最大收益 //dp[i][1]表示第i天手中持有股票状态下的最大收益 //dp[i][2]表示第i天冷冻期状态下的最大收益 ...
#pragma once #include "interface.h" enum InitReturnVal_t { INIT_FAILED = 0, INIT_OK, INIT_LAST_VAL, }; class IAppSystem { public: virtual bool Connect(CreateInterfaceFn factory) = 0; virtual void Disconnect() = 0; virtual void *QueryInterface(const char *pInterfaceName) = 0; virtual InitReturnVal_t Init() = 0;...
#include<stdio.h> int main() { printf("%d", 0 <= 0); return 0; }
#include <iostream> #include "WizardState.h" WizardState::WizardState(const std::string& name, int health, int damage, int mana) : SpellCasterState(name, health, damage, mana) { std::cout << " creating WizardState " << std::endl; } WizardState::~WizardState() { std::cout << " deleting WizardState " << std::en...
// // BoxShape.h // Odin.MacOSX // // Created by Daniel on 10/10/15. // Copyright (c) 2015 DG. All rights reserved. // #ifndef __Odin_MacOSX__BoxShape__ #define __Odin_MacOSX__BoxShape__ #include "AABB.h" #include "Drawable.h" #include "Material.h" namespace odin { namespace render { namespace s...
#include "stdafx.h" #include "Matrix.h" namespace MyDirectX { Matrix::Matrix(int nDimension) { Resize(nDimension); } Matrix::Row& Matrix::operator[](int nIndex) { return vecRow[nIndex]; } void Matrix::Resize(int nDimension) { vecRow.resize(nDimension); for (int i = 0; i < nDimension; i++) { vecR...
/*Напишите программу находящую обратный по модулю элемент. Иначе говоря по числам X и N нужно найти такое число Y, что остаток от деления X*Y на N равняется единице. В программе гарантируется, что все числа - натуральные*/ #include <iostream> using namespace std; bool ready = false; int a, b, i; int main()...
#include <memory> #include <iostream> #include <cstddef> void test0() { char *ptr = static_cast<char*>(std::malloc(100)); std::free(ptr); } template<typename... Ts> struct alignas(Ts...) S {}; struct alignas(32) SS {}; void test1() { std::cout << "size of S = " << sizeof(S<int, double, SS>) << std::endl...
/* -*- 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. ** */ #include "core/pch.h" #ifdef CANVAS3D_SUPPORT #include "modu...
#ifndef _CDL_UDP_SERVER_H_ #define _CDL_UDP_SERVER_H_ #include <string.h> #include "poller.h" #include "net.h" class CDL_UDP_Server : public CPollerObject { public: CDL_UDP_Server(){}; virtual ~CDL_UDP_Server(){}; virtual int OnPacketComplete(const char * data, int len,char* ip,int port)=0; virtual int Pa...
#include <iostream> #include <string> #include <cstddef> #include <Windows.h> #include <vector> #include "cpp_primer_config.h" #include "Test01.h" #ifdef USE_TEST01_C using namespace std; void Test01::showMsg(const std::string Str) { cout <<"["<< this->ShowMsgCounter++ <<"] - "<< Str << endl; } unsigned int Test0...
#pragma once #include "struct.h" #include "log.h" #define BB_POOL_TAG 'Esk' UCHAR PiDDBLockPtr_sig[] = "\x48\x8D\x0D\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x4C\x8B\x8C"; UCHAR PiDDBCacheTablePtr_sig[] = "\x66\x03\xD2\x48\x8D\x0D"; //you can also put the sig within the function, but some of the sig ends up on the stack an...
#ifndef GAME_H #define GAME_H #include <QGraphicsScene> #include "Player.h" #include "Enemy.h" #include <QGraphicsView> #include <QTimer> #include <QObject> #include <QMediaPlayer> #include "Score.h" #include "Health.h" #include <QMouseEvent> class Game : public QGraphicsView { public: // Public Functions Game(); ~G...
/** * @author: Karthick < karthikn2099@gmail.com > * @github: https://github.com/karthikn2098 * @date: 10/01/2018 */ #include <bits/stdc++.h> using namespace std; /** * @desc: function to get the pascal triangle number of given row and column... * @param: row , column * @return: pascal number for given row and...
#include "NeuralNet.h" using namespace std; ofstream fout; NeuralNet::NeuralNet(int numInput, int numHidden, int numOutput) { //Constructor numTestData = 20; //hard coded for now srand((unsigned int)time(NULL)); //Seeding Random for first time this->numInput = numInput; //Initializing # of Input...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> typed...
#ifndef SOFTBODY_H #define SOFTBODY_H #include "object.h" ///Not implemented class softbody:public Object { public: softbody(); ~softbody(); void makeBody(btScalar mass); private: }; #endif // SOFTBODY_H
// Created on: 1992-05-06 // Created by: Jacques GOUSSARD // 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 G...
/**************************************** @_@ Cat Got Bored *_* #_# *****************************************/ #include <stdio.h> #define loop(i,s,e) for(int i = s;i<=e;i++) //including end point #define pb(a) push_back(a) #define sqr(x) ((x)*(x)) #define CIN ios_base::sync_with_stdio(0); cin.tie(0); #define ...
#ifndef DELETEDIALOGUE_H #define DELETEDIALOGUE_H #include "QWidget" #include "memory" #include "note.h" #include "notetreeitem.h" namespace Ui { class DeleteDialogue; } class DeleteDialogue : public QWidget { Q_OBJECT public: explicit DeleteDialogue(std::unique_ptr<QList<Note*>>, QWidget *parent = 0); ...
// // 11659.cpp // baekjoon // // Created by 최희연 on 2021/07/07. // #include <iostream> using namespace std; int main(){ int n, m; scanf("%d %d", &n, &m); int arr[100001]; for(int i=0;i<n;i++){ int a; scanf("%d", &a); arr[i+1] = arr[i]+a; } while (m--) { int i...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2010 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef SCOPE_ID_TABLE_H #define SCOPE_ID_TABLE_H #ifdef SCOPE_SUPPORT...
//=========================================================================== //! @file asset_texture_manager.cpp //! @brief テクスチャ管理クラス //=========================================================================== //--------------------------------------------------------------------------- //! 初期化 //-----------------...
#include "OutCardProc.h" #include "HallHandler.h" #include "Logger.h" #include "ProcessManager.h" #include "GameCmd.h" #include "GameServerConnect.h" #include "PlayerManager.h" #include <string> //REGISTER_PROCESS(CLIENT_MSG_OUT_CARD, OutCardProc) OutCardProc::OutCardProc() { this->name = "OutCardProc"; } OutCard...
#ifndef WIZARDPAGE_H #define WIZARDPAGE_H #include "Wizard.h" #include "WizardButtons.h" #include "BreadCrumbs.h" #include <QWidget> #include <QSharedPointer> #include <QList> namespace RsaToolbox { class Wizard; class BreadCrumbs; class WizardButtons; class WizardPage; typedef QList<WizardPage*> WizardPages; cl...
#include "EmployeeOptions.h" void EmployeeOptions::getLog(const LogUpdates &logUpdates, int globalId, const std::shared_ptr<BaseCallback> callback, std::shared_ptr<BaseClient> client, std::shared_ptr<CallbacksHolder> callbackHolder) { throw std::runtime_error("exception: employee can't...
/* HashMap.cpp by Alan Agon a1636896 */ #include <iostream> #include <string> #include <assert.h> #include "hashMap.h" using namespace std; //Constructors HashMap::HashMap(int capacity) { //Confirm the input capacity is valid if( capacity>0 && capacity<2147483647 ){ size= 0; cap= capacity; hashTable...
#ifndef LISTAD_H #define LISTAD_H #include <iostream> using namespace std; #include "NodoD.h" class ListaD { private: NodoD* inicio; NodoD* fin; public: ListaD(void){ inicio = NULL; fin = NULL; } void muestraTusDatosA(void){ NodoD*...
#pragma once #include<iostream> #include<string> using namespace std; class Monhoc { private: string TenMonhoc; int SoChiMonhoc; float DiemMonhoc; public: string GetMonhoc() { return TenMonhoc; } void SetMonhoc(string x) { TenMonhoc = x; } int Getsochi() { return SoChiMonhoc; } void Setsochi( int val...
//lamuto partition //partition using the element as pivot //4 5 2 9 8 1 6 #include <iostream> //#include "lomuto.h" using namespace std; void swap(int [],int,int); void lomutoP(int arr[], int n){ int p=arr[n-1]; int j=0; for(int i=0;i<n;i++){ if(arr[i]<=p){ swap(arr,i,j); j++; } } for (in...
/* Author : Bhavin Kotak */ #include <iostream> #include <algorithm> #include <utility> using namespace std; class Edge{ int source; int destination; int weight; public: Edge(){ } Edge(int source, int destination, int weight){ this->source = source; this->destination = destination; this->weight = weight;...
/* * MonteCarloPrintFunctions.cc * * Created on: Nov 23, 2009 * Author: acodas */ #include "MonteCarloPrintFunctions.h" #include <stdio.h> #include <stdlib.h> #include <string.h> //@tested //prints a mc_Point void mc_printPoint(const mc_Point p) { printf("{x=%g, y=%g, theta=%g}", p.x, p.y, p.theta); } ...
#include <iostream> #include <cstdio> #include <cstring> using namespace std; const int maxn = 10000; int main() { char p[maxn]; int lenp; cin >> p; lenp = strlen(p); int next[lenp]; int k = -1; int j = 0; next[0] = -1; while(j < lenp - 1) { if(k == -1 || p[j] == p[k]) { ++k; ++j; ...
/*********************************************************\ * 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...
#include <iostream> using namespace std; int f(int a, int n){ if(n == 0) return 1; if(n == 1) return a; return a * f(a,n-1); } string f2(int x){ string res = ""; while(x > 0){ res = char(x % 2 + 48) + res; x = x / 2; } return res; } string f3(string s, int i){ s[s.s...
/**************************************************************************************** Copyright (C) 2017 Autodesk, Inc. All rights reserved. Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, or which otherwise accompanies ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2008 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef WINDOWSPLUGINDETECTOR_H #define WINDOWSPLUGINDETECTOR...
#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 ...
#include "Viruss.h" #include <iostream> #include <fstream> using namespace std; Viruss::Viruss() { this->m_dna = NULL; this->m_resistance = 0; } Viruss::Viruss(char *dna, int resistance) { this->m_dna = dna; this->m_resistance = resistance; } Viruss::Viruss(const Viruss * viruss) { this->m_dna = viruss->m_dna...
#include "AndroidFramework.h" #include "App_SSS.h" using namespace std; AndroidFramework::AndroidFramework(android_app *state) : app(state) { egl_service = new EGLService; app->onAppCmd = CommandHandler; app->onInputEvent = InputHandler; state->userData = this; Renderer = new App_SSS; } void AndroidFramework...
/* * Values.h * * Created on: 21 Nov 2017 * Author: Riemann */ #include "Kontrolsystem.h" #ifndef VALUES_H_ #define VALUES_H_ using namespace std; class Values: public Kontrolsystem { public: //Values(double a, double b, double c, double d, double e) : light_val(a), temp_val(b), fert_val(c), hum_val(d), w...
stock strtok(const string[], &index, delimiter = ' ') { new length = strlen(string); while ((index < length) && (string[index] <= delimiter)) { index++; } new offset = index; new result[128]; while ((index < length) && (string[index] > delimiter) && ((index - offset) < (sizeof(result) - 1))) { result[index ...
#ifndef METREE_H #define METREE_H #include "TTree.h" class TreeData { public: int ncommon_mem; double common_mem_p_bkg[1]; // double common_mem_p[1]; // double common_mem_blr_4b[1]; // double common_mem_blr_2b[1]; // double common_mem_p_sig[1]; // int nfatjets; double fatjets_phi[4]; // double fatjet...
#pragma once #include <map> #include <string> #include <vector> namespace mvm0 { constexpr std::size_t SYM_NONE = static_cast<std::size_t>(-1); struct Ins { std::size_t def_sym; // symbol id If ins has a symbol, SYM_NONE otherwhise std::size_t use_sym; // symbol id if one operand is a symbol, SYM_NONE oth...
//////////////////////////////////////////////////////////////////////////////// #include "dijkstra.h" #include <igl/edges.h> #include <vector> #include <queue> //////////////////////////////////////////////////////////////////////////////// namespace cellogram { // ---------------------------------------------------...