text
stringlengths
8
6.88M
#include <bits/stdc++.h> using namespace std; int toInt(string s){ int x; stringstream convert(s); convert >> x; return x; } int main(){ string s, result = ""; getline(cin, s); while(!s.empty()){ string number = ""; while(s[0] < '0' || s[0] > '9') s.erase(0,1); while(s[0] >= '0' && s...
/*********************************************************\ * 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...
/*********************************************************************** h£şModel Loader (mainly from file) ************************************************************************/ #pragma once #include "_FbxLoader.h" namespace Noise3D { class IMesh; class IAtmosphere; //name lists of loaded objects ...
/****************************************************************************** * * * Copyright 2018 Jan Henrik Weinstock * * * ...
#include "ClosedState.h" #include "OpenedState.h" #include "StateContext.h" #include <iostream> void ClosedState::unlock(StateContext* stateContext) { std::cout << "Can not unlock, current state is close\n"; } void ClosedState::open(StateContext* stateContext) { stateContext->setState(new OpenedState); std::cout <...
#line 82 "ChessMatchup.cpp" #include <string> #include <vector> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <map> #include <set> #include <cassert> #include <list> #include <deque> #include <iomanip> #includ...
#ifndef KWIK_PARSER_STATE_H #define KWIK_PARSER_STATE_H #include "ast.h" #include "io.h" #include "exception.h" namespace kwik { struct ParseState { ParseState(const Source& src) : src(src), nested_paren(0), program(nullptr) { } // void error_with_context(const std::string& msg, int...
#include "apriltag_opencv.h" #include "apriltag_family.h" extern "C"{ #include "common/homography.h" } #include "getopt.h" #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <iostream> void getRelativeTransform( double tag_size, ...
//UVA 1583 Digit Generator //题意:每个数M可以产生一个新的数N,N等于M加上他的各位数字之和,例如216可以产生216+2+1+6=225。 // 那么给定一个数N,他的Generator(按照前述规则产生N的数称为这个数的Generator)可能会有多个也可能没有, // 例如216的Generator可以是198和207。现在给定一个数N,让你求它的最小Generator,如果没有就输出0 //解题思路:先算出给定的N(1<=N<=100 000)的位数digitNum,则它的Generator肯定在[N-digitNum*9,N]之间产生 // (因为它的各位数...
#include <iostream> #include "Form.hpp" const int Form::minGrade = 1; const int Form::maxGrade = 150; Form::Form(std::string const &name, int sGrade, int eGrade, std::string const &target) throw(GradeTooHighException, GradeTooLowException) : _name(name), _sGrade(sGrade), _eGrade(eGrade), _isSigned(false), _tar...
#pragma once #include "calculateproteinprobability.h" class CCalProteinProbLogisticRegression : public CCalculateProteinProbability { public: void calculateProteinProbability(); CCalProteinProbLogisticRegression(CListMassPeptideXcorr* pLMX,CListProtein* pLP):CCalculateProteinProbability(pLMX,pLP){}; ~CCalProteinPr...
#ifndef REACTOR_BASE_PATH_H #define REACTOR_BASE_PATH_H #include <utility> #include <string> namespace reactor { namespace base { /* * see python os.path for API doc * XXX noly suppory english path name */ namespace path { std::string abspath(const std::string &path); std::string basename(const std::string &path)...
// 특수문자 제외 문자열 뒤집기 // "abs/sae&stge[" #include <iostream> using namespace std; bool isAlphabet(char c) { if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) return true; else return false; } void main() { char str[100]; cout << "문자를 입력하세요. (100자 이내)" << endl; cout << "입력 : "; cin >> str; cout << "입력...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-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" class DataFile_Record; #include "modules...
#ifndef ENEMY_H #define ENEMY_H #include "MobileObject.h" #include <stack> #include "Node.h" #include "Projectile.h" #include "PowerUp.h" class Enemy : public MobileObject { public: Enemy(float, stack<Node*>, int, int, float, glm::vec3, glm::vec3); // Update function for moving the object around by i...
//============================================================================ // Name : Assignment_3.cpp // Author : Aditya // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ ...
#ifndef TRASHBINPIONEERS_H #define TRASHBINPIONEERS_H #include "services/pioneerservice.h" #include "ui/mainwindow.h" #include <QDialog> namespace Ui { class TrashBinPioneers; } class TrashBinPioneers : public QDialog { Q_OBJECT public: explicit TrashBinPioneers(QWidget *parent = 0); ~TrashBinPioneers()...
#include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include <stack> #include <list> #include <map> #include <iomanip> #include <set> #include <climits> #include <ctime> #include <complex> #include <cmath> #include <string> #in...
/** * created: 2013-3-22 19:39 * filename: FKError * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #pragma once //------------------------------------------------------------------------ #include <exception> #include "FKVsVer8Defi...
#include<bits/stdc++.h> using namespace std; struct node{ int a,b; }; node q[100]; int ans[100],n; void readit(){ scanf("%d",&n); for (int i=1;i<=n;i++) scanf("%d%d",&q[i].a,&q[i].b); } int pow(int m,int n,int p){ int ans=1; while (n>0){ if (n&1) ans=ans*m%p; n=n>>1; m=m*m%p; } return ...
/* * HeapUsage.h * * Created on: 2014-12-04 * Author: Roger */ #ifndef HEAPUSAGE_H_ #define HEAPUSAGE_H_ #include <QObject> #include <sys/procfs.h> #include <sys/mman.h> #include <fcntl.h> #include <stdint.h> class HeapUsage : public QObject { Q_OBJECT public: HeapUsage() {} virtual ~HeapUsag...
#include "mainWindow.h" mainWindow::mainWindow(entryStats* userStats, std::list<dataEntry*> &entries, int width, int height, const char* title) : Fl_Window(width, height, title) { entryList = entries; stats = userStats; begin(); //efficiency stat box effAvgStat = new Fl_Box(160, 60, 160, 90); //stats->returnEf...
#ifndef APPLICATION_LOGIN_H #define APPLICATION_LOGIN_H #include <QObject> #include <QMessageBox> #include <CallbacksHolder/Callback/BaseCallback.h> #include <Controller/Controller.h> #include "ui/LoginWidget/loginwidget.h" #include "ui/MainWidget/mainwidget.h" #include "ui/UserData/UserData.h" // Callback for Log...
class ItemAntibacterialWipe { weight = 0.003; }; class ItemSepsisBandage { weight = 0.005; }; class ItemBandage { weight = 0.005; }; class ItemPainkiller { weight = 0.1; }; class ItemMorphine { weight = 0.1; }; class ItemEpinephrine { weight = 0.1; }; class ItemHeatPack { weight = 0.1; }; class ItemBloodbag ...
#include "ConsoleTextStyle.h" #include <iostream> #include <windows.h> const int consoleWidth = 120; OutputTable * CreateOutputTable() { OutputTable * outTable = new OutputTable(); outTable->content = 0; outTable->columnsCount = 0; outTable->rowsCount = 0; outTable->highLights = 0; outTable->highLightsCount = 0...
#include <iostream> using namespace std; int main() { cout<<"hell"<<endl; }
#include <memory.h> #include <clang-c/Index.h> CXChildVisitResult printFuncHeader(CXCursor cursor, CXCursor parent, CXClientData client_data) { CXString str; CXCursor temp; CXChildVisitResult ret = CXChildVisit_Recurse; if (clang_getCursorKind (cursor) != CXCursor_FunctionDecl && clang_getCursorKind (cursor) ...
#pragma once class CUserSession : public CPacketSession { public: CUserSession(); virtual ~CUserSession(); private: BOOL mIsConnected; TCHAR ID[32]; public: BOOL Begin(VOID); BOOL End(VOID); BOOL Reload(SOCKET listenSocket); inline BOOL SetIsConnected(BOOL isConnected) { CThreadSync Sync; mIsConnecte...
#pragma once #include "Header.h" #include "Graphics.h" class Graphics; class GameObject { public: int x; int y; public: GameObject(); virtual ~GameObject(); public: virtual void update(int keyCode); virtual void render(Graphics& graphics); };
#include "PlayerTimer.h" #include "IProcess.h" #include "Player.h" #include "Logger.h" #include "RobotRedis.h" #include "Configure.h" #include "AIDo.h" //====================CTimer_Handler==================================// int CTimer_Handler::ProcessOnTimerOut() { if(handler) return handler->ProcessOnTimerOut(thi...
/* * cppmain.cpp * * Created on: Dec 25, 2020 * Author: hajime */ #include <stdio.h> #include "cppmain.hpp" #include "main.h" #include "tim.h" #include "gpio.h" #include "can.h" // 設定項目 // 左クローラー:MCU_ID = 0X0A,緑LEDを点滅 // 右クローラー:MCU_ID = 0X0B,青LEDを点滅 static const int MCU_ID = 0X0A; static const uint16_t B...
#include<bits/stdc++.h> using namespace std; int main(){ int a=10, b=10; printf("a = %d\n",a++); printf("a = %d\n",a); printf("b = %d\n",++b); printf("b = %d\n",b); }
#ifndef _SHAPE_H_ #define _SHAPE_H_ #include <memory> #include <d3d11.h> #include <wrl\client.h> #include <SimpleMath.h> #pragma once class Shape { public: Shape(); ~Shape(); struct VertexType { DirectX::SimpleMath::Vector3 position; DirectX::SimpleMath::Vector4 color; }; struct VertexTextureType { Dir...
#ifndef __Maze3D_h__ #define __Maze3D_h__ #include <ctime> //FIXME: is this portable? #include "Cell.h" #include "CellCoord.h" #include "Wall.h" #include "Prize.h" #include "Image.h" #include "Picture.h" class Maze3D { public: const static int wMax = 30, hMax = 30, dMax = 30; // This is necessary be...
#include<iostream> #include<string> #include<stdexcept> #include<postgresql/libpq-fe.h> #include<stdlib.h> #include<vector> #include<climits> #include<iomanip> using std::cout; using std::cin; using std::logic_error; using std::cerr; using std::string; using std::endl; using std::vector; using std::to_string; using st...
#include "ccartaoitem.h" CCartaoItem::CCartaoItem(QObject *parent) : QObject(parent) { _estudos = new CEstudos(this, this); QObject::connect(this, SIGNAL(atualizarEstudo()), _estudos, SLOT(calcularSlot())); } CCartaoItem::~CCartaoItem() { _compras.clear(); Q_CHECK_PTR(_estudos); d...
// Created on: 1997-02-14 // Created by: Jean Yves LEBEY // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GN...
// // Created by Kolby on 6/19/2019. // #include <guiutil.h> #include <startoptions.h> #include <ui_startoptions.h> #include <QKeyEvent> #include <QMessageBox> #include <QPushButton> StartOptions::StartOptions(QWidget *parent) : QWidget(parent), ui(new Ui::StartOptions) { ui->setupUi(this); // Size of...
/**************************************************************************** ** Copyright (C) 2017 Olaf Japp ** ** This file is part of FlatSiteBuilder. ** ** FlatSiteBuilder 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 S...
////////////////////////////////////////////////////////////////////////// // // This software is distributed under the terms of the GNU GENERAL // PUBLIC LICENSE Version 2, June 1991. See the package LICENSE // file for more information. // ////////////////////////////////////////////////////////////////////////// ...
/* /home/pi/.arduino15/packages/stm32duino/hardware/STM32F1/2020.6.20/cores/maple/libmaple */ //#include <Wire.h> #ifdef MCU_STM32F103C8 auto &ser = Serial1; #else auto &ser = Serial; #endif #define SID 4 typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; #define __IO volatile #define REG(x)...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Игра, генерирующая случайное число в диапазоне, отбрасывающая повторы // При первом старте генеруируется случайное число, которое заносится в фиксированный массив. // Следующее за первым число сравнимается с первым и, если нет повтора, т...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #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>...
class Solution { public: int romanToInt(string s) { unordered_map<string, int> m = {{"I", 1}, {"IV", 3}, {"IX", 8}, {"V", 5}, {"X", 10}, {"XL", 30}, {"XC", 80}, {"L", 50}, {"C", 100}, {"CD", 300}, {"CM", 800}, {"D", 500}, {"M", 1000}}; int r = m[s.substr(0, 1)]; for(int i=1; i<s.size(); ++i)...
//大二寒假复习2017.2.13 //最简单的思路60-C输入60-C输出100 #include<iostream> #include<cstdio> using namespace std; class Use_for_quicksort{ public: int compare; int store_one; }; //二分查找 int lef_binary_search(Use_for_quicksort *data,int low,int high ,int be_searched){ for(;low<high;){ int middle=(low+high)>>1; if(be_sear...
#include <vector> #include <memory> #include <gtest/gtest.h> #include "ClnUtils.h" #include "PhoneticService.h" namespace PticaGovorunTests { using namespace PticaGovorun; struct PhoneticTranscriptionTest : public testing::Test { }; TEST_F(PhoneticTranscriptionTest, phoneListToStrConversion) { PhoneRegistry p...
#include "llvm/Pass.h" #include "llvm/IR/Function.h" #include "llvm/Support/raw_ostream.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Module.h" #include "llvm/IR/GlobalVariable.h" #include <unordered_map> #include <string> using namespace llvm; namespace{ struct countInstrP...
#include "ReverseL.h" namespace WinTetris { ReverseL::ReverseL() { occupied[0][0] = true; occupied[1][0] = true; occupied[1][1] = true; occupied[1][2] = true; } }
// Copyright 2012 Yandex #ifndef LTR_LEARNERS_DECISION_TREE_ID3_LEARNER_H_ #define LTR_LEARNERS_DECISION_TREE_ID3_LEARNER_H_ #include <string> #include "ltr/learners/decision_tree/decision_tree_learner.h" #include "ltr/learners/decision_tree/id3_splitter.h" #include "ltr/learners/decision_tree/sqr_error_quality.h" ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2007 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ /** \file * * \brief Implement OpMemEvent and OpMemEventListener ob...
/* -*- 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. ** ** Peter Krefting */ /** * @file prefsmanager.h * Declarations...
#include "FontRenderer.h" #include <iostream> FontRenderer::FontRenderer() { fontShader.addShader("shaders/font.vsh", GL_VERTEX_SHADER); fontShader.addShader("shaders/font.fsh", GL_FRAGMENT_SHADER); fontShader.start(); fontShader.activateUniform("translation"); fontShader.activateUniform("fon...
/* * File: main.cpp * Author: Daniel Canales * * Created on June 24, 2014, 9:15 PM */ #include <cstdlib> #include <iostream> using namespace std; /* * */ int main(int argc, char** argv) { float meal = 44.50; //original cost float tip = .15*meal; //tip price float tax = .0675*meal; //tax f...
#include "mymainwindow.h" #include "ui_mymainwindow.h" MyMainWindow::MyMainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MyMainWindow) { ui->setupUi(this); ui->widget->setFocus(); } MyMainWindow::~MyMainWindow() { delete ui; } void MyMainWindow::on_actionQuit_triggered() { close()...
#ifndef SHAREDPREFERENCES_H #define SHAREDPREFERENCES_H #include <QObject> #include <QString> #include <QVariant> class SharedPreferences : public QObject { Q_OBJECT public: ~SharedPreferences(); static SharedPreferences *getPreferences(QObject *parent = nullptr); static SharedPreferences *getSharedPreferences(...
/** * created: 2013-3-22 23:01 * filename: FKStringEx * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include "../Include/FKVsVer8Define.h" #include "../Include/FKStringEx.h" #include <time.h> #include <malloc.h> #include <xhash>...
#include <iostream> using namespace std; //Base Class class Parent { public: int parent_id; }; //Derived Class 1 class Child1 : public Parent { public: int child1_id; }; //Derived Class 2 class Child2 : public Child1 { public: int child2_id; }; int main() { Child2 obj; ...
/* -*- Mode: c++; tab-width: 4; 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. * * @author Markus Johansson */ #include "core/pch.h" #ifdef SESSION_SUPPORT #include ...
#include <bits/stdc++.h> using namespace std; struct tNode{ int data; tNode *left; tNode *right; tNode(int x):data(x),left(NULL),right(NULL){} }; class Solution{ public: int node_count(tNode *root){ if(root == NULL){ return 0; } return 1 + node_count(root->left)...
#include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include<iomanip> #include <stack> #include <list> #include <map> #include <set> #include <climits> #include <cfloat> #include <ctime> #include <cmath> #include <string> #incl...
#include<bits/stdc++.h> using namespace std; const int siz=1005; const int INF=0x3f3f3f3f; int rt=0; struct node{ int ls,rs; int val,cnt,siz; }t[siz]; void add(int s,int v){ if(rt==0){ rt++; t[rt].val=v; t[rt].cnt=1; t[rt].siz=1; return; } t[s].siz++; if(...
#ifndef GNRENDEROBJECTARRAY_H #define GNRENDEROBJECTARRAY_H class GnRenderObject; class GNMAIN_ENTRY GnRenderObjectArray : public GnMemoryObject { enum { DEF_MAX_SIZE = 1024, DEF_GROW_BY = 1024 }; protected: GnRenderObject** mppkArray; gtuint mCurrentSize; gtuint mAllocatedSize; gtuint mGrowBy; public: in...
#pragma once #include "ExampleBase.h" class VertexArray : public ExampleBase { private: GLuint vao; Shader *shader; public: void initGLData() { const char *className = typeid(*this).name() + 6; shader = new Shader(className); glViewport(0, 0, WINDOW_WIDTH - 100, WINDOW_HEIGHT - 100); GLfloat vertices...
#include "VarianceShadowMap.h" #include "RenderTarget.h" #include "SceneManager.h" #include "engine_struct.h" #include "ResourceManager.h" #include "pass.h" #include "RenderSystem.h" #include "TextureManager.h" #include "Camera.h" #include "OPENGL_Include.h" #include <sstream> void VarianceShadowMapGenerateEffect::Ini...
/* -*- 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. * * @author Espen Sand */ #ifndef X11_DESKTOP_POPUP_MENU_HANDLER_H...
#include "Output.h" Output::Output() { //Initialize user interface parameters UI.width = 1280; UI.height = 700; UI.wx = 15; UI.wy =15; UI.AppMode = DESIGN; //Design Mode is the default mode UI.StBrWdth = 50; UI.TlBrWdth = 50; UI.MnItWdth = 80; UI.DrawClr = BLUE; UI.HiClr = RED; UI.MsgClr = RED; UI.AS...
#ifndef REAL_H #define REAL_H class Real{ private: int numerador; int denominador; void reducir(); void setNumerador(int=0); void setDenominador(int=1); public: Real(int =1, int =1); int getNumerador(); int getDenominador(); void setReal(...
#include <iostream> #include <stdlib.h> using std::cout; using std::endl; struct node { int val; struct node* next; }; int main() { node* head = NULL; node* second = NULL; node* third = NULL; head = (node *)malloc(sizeof(node)); // allocate 3 nodes in the heap second = (node *)malloc(sizeof(node));...
#ifndef APPLICATION_CHATOBSERVERCMD_H #define APPLICATION_CHATOBSERVERCMD_H #include "BaseCmd.h" #include "Commands/CmdCreator/Commands.h" #include "ChatObjects/ChatUpdates.h" #include "ChatObjects/MessageStatus.h" #include "ChatObjects/ChatAction.h" // Command for chat observe class ChatObserverCmd : public BaseCmd...
// ConsoleApplication2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <clocale> using namespace std; //Тема: Шаблоны функций Задание.Реализуйте шаблонные функции для поиска максимума, // минимума, сортировки массива(любым алгоритмом сортировки), двоич...
#include "bricks/core/time.h" #include "bricks/core/timespan.h" #if BRICKS_ENV_MINGW #include <pthread.h> #undef GetCurrentTime #endif #include <time.h> #include <sys/time.h> #include <string.h> #define BRICKS_TIME_CONVERT_NANOSECONDS 1000000000 #define BRICKS_TIME_CONVERT_MICROSECONDS_NANOSECONDS 1000 namespace Br...
#include"Hash.h"
// Copyright (c) 2013 Nick Porcino, All rights reserved. // License is MIT: http://opensource.org/licenses/MIT #include "VarObjArray.h" #include "LandruVM/Fiber.h" #include "LandruVM/VarObjStackUtil.h" namespace Landru { LANDRU_DECL_FN(VarObjArray, create) { std::shared_ptr<VarObjArray> voa = p->stack...
/** * author: rasel kibria * created: 10.07.2020 **/ #include<bits/stdc++.h> using namespace std; int main() { int driver, i, j; cin>>driver; string name; double result, d; double score[7]; for(i=0; i<driver; i++) { cin>>name>>d; for(j=0; j<7; j++) { ...
#include "Includes.h" #include <iostream> #include <algorithm> #include <fstream> #include <sstream> using namespace std; void uva10252Main() { string s; stringstream ss(s); while(getline(cin, s) && s!="*") { string str; bool isT = true; ss>>str; char c = (char...
//这次相比原来改进了一下思路,采用了类似广度优先搜索的方法,但还是和原来一样的分数,60 下面的好多超时 //然后想办法加速,看到一个别人的代码,学习了他的邻接表,把那些quicksort,binary_search去了 //然后就70分了 下面超时少了 变成了错误 //暂时先到这里 有空再来 #include<iostream> #include<cstdio> using namespace std; class QUEUE{ public: QUEUE(int length);//构造函数 int current_size;//队列总元素个数 bool enqueue(int val...
// $Id$ // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // // Contribution from Roger Sayle #include <vector> #include <DataStructs/ExplicitB...
//////////////////////////////////////////////////////////////////////////////// #include "region_grow.h" #include <cellogram/navigation.h> #include <cellogram/boundary_loop.h> #include <igl/slice.h> #include <igl/opengl/glfw/Viewer.h> #include <Eigen/Dense> #include <algorithm> #include <queue> #include <iostream> ///...
#include <iostream> class Node{ public: int value; Node* next; public: void SetValue(int aValue) { value = aValue; }; void SetNext(Node* aNext) { next = aNext; }; int Value() { return value; }; Node* Ne...
#include "kg/browser/app.hh" int main(int argc, char ** argv) { kg::App * app = new kg::App {}; return wxEntry(argc, argv); }
/* * clickablelabel.h * A QLabel that we can click on ==> emit a clicked signal. * * @author Yoan DUMAS * @version 1.0 * @date 21/01/2014 */ #ifndef CLICKABLELABEL_H #define CLICKABLELABEL_H #include <QLabel> #include "rules.h" class ClickableLabel : public QLabel { Q_OBJECT public: explicit Click...
// Copyright Epic Games, Inc. All Rights Reserved. #include "TwoTheEdgeCharacter.h" #include "HeadMountedDisplayFunctionLibrary.h" #include "Camera/CameraComponent.h" #include "Components/CapsuleComponent.h" #include "Components/InputComponent.h" #include "GameFramework/CharacterMovementComponent.h" #include "GameFram...
// Copyright <2018> <Tomoyuki Nakabayashi> // This software is released under the MIT License, see LICENSE. #ifndef MOCK_LED_CONTROLLER_OS_TIME_H_ #define MOCK_LED_CONTROLLER_OS_TIME_H_ #include <gmock/gmock.h> #include <cstdint> #include <os/time.h> class MOCK_TIME { public: MOCK_METHOD0(GET_MSEC_OF_DAY, uint3...
#include "windows.h" #include <stdio.h> #include <tchar.h> #include <strsafe.h> #include "initguid.h" #include "dbgeng.h" #include "Registration.h" #include "IOCallbacks.hpp" #include "DebugEventCallbacks.hpp" #include "Common.h" const TCHAR* REGISTER_POST_MORTEM = TEXT("I"); const TCHAR* UNREGISTER_POS...
//------------------------------------------------------------------------------ /* This file is part of Beast: https://github.com/vinniefalco/Beast Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without f...
// https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ // Better solution class Solution { public: int removeDuplicates(int A[], int n) { if (n <= 0) { return 0; } int pre = 1, cur = 1; int occur = 1; while (cur < n) { if...
// Created on: 2005-10-05 // Created by: Mikhail KLOKOV // Copyright (c) 2005-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...
/* StringMath, homeworkProb2.cpp author: william hutchinson date: 20150911 write a program that takes a string containing infix including [(,),+,-,*] (no obvious division or exponents) and integers and computes the value of the expression. ex: (2 + 3) * 4 - 2 = 18 */ #ifndef StringMath_included #define StringMat...
/*! \file */ //Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #ifndef SGFX_FONT_HPP_ #define SGFX_FONT_HPP_ #include <sgfx/sg_font_types.h> #include "Bitmap.hpp" namespace sgfx { /*! \brief Font class * */ class Font { public: Font(); /*! \details Returns a string of the available character set */ ...
#include <iostream> #include <opencv2/opencv.hpp> #include "config.h" #include "tracker.h" #include "kcftracker.h" #include "csktracker.h" #include "stctracker.h" #include "trackerfactory.h" using namespace std; using namespace cv; Tracker* TrackerFactory::createTracker(const Config& c) { string name = c["track...
// Print the sum of series // 1 + 12 + 123 + 1234 + ... nterms #include <iostream> using namespace std; int main() { int i,j,n,s=0,sum=0; cout<<"Enter n "; cin>>n; for(i = 1;i <= n;i++) { s = s * 10 + i; sum += s; } cout<<sum; return 0; }
#include <iostream> #include <vector> #include <map> #include <cmath> #include <queue> #include <algorithm> #include <iomanip> #include <set> using namespace std; /*ϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕ*/ #define int long long int #define ld long double #define F first #define S second #define P p...
#include<iostream> #include<vector> using namespace std; int main() { // Initializing vector with values vector<int> vect1{1, 2, 3, 4}; // Declaring new vector vector<int> vect2; //1.copy vector1 to vector3 vector<int> vect3(vect1); vector<int> vect4; vector<int> vect5; // 2.A loop to co...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Элементарныйе функции для стандартного вывода // Elementary function for standard output // V 1.0 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// #include<iostream> #include<string> using namespace std; void word() { cout << "Ok!" << endl; } int num()...
#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; const int inf = 1e9 + 7; int a[110],f[110]; int main() { int t; scanf("%...
#pragma once #include <string> #include <vector> #include "analytic_gas_disk.h" #include "fargo_gas_disk.h" #include "red_type.h" class pp_disk { public: pp_disk(n_objects_t *n_bodies, gas_disk_model_t g_disk_model, uint32_t id_dev, computing_device_t comp_dev); pp_disk(std::string& path_data, std::st...
#ifndef __REPORTLISTPRESENTER_H #define __REPORTLISTPRESENTER_H #include "CtrlWindowBase.h" #include "IReportListView.h" #include "ReportListModel.h" namespace wh{ //----------------------------------------------------------------------------- class ReportListPresenter : public CtrlWindowBase<IReportListView, ReportL...
#include <string> #include <cmath> #include <fstream> #include <iostream> #include <sstream> #include <list> #include <algorithm> #include <set> #include <map> #include <stack> #include <queue> #include <numeric> #include <bitset> #include <deque> //#include <random> #include <string.h> #include <stdlib.h> #include <ve...
#include <cstdint> #include <vector> #pragma once class UnificationCoef { const uint16_t MAX_VALUE = UINT16_MAX; private: double m_startValue = MAX_VALUE; double m_stopValue = 1; public: double GetStartValue(); void SetStartValue(double value); double GetStopValue(); void SetStopValue(double value); std...
/* Copyright (c) 2015, Vlad Mesco 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 code must retain the above copyright notice, this list of conditions and the following dis...