text
stringlengths
8
6.88M
#include <Poco/Exception.h> #include <cppunit/extensions/HelperMacros.h> #include "util/WithTrace.h" using namespace std; using namespace Poco; using BeeeOn::ForPoco::WithTrace; namespace BeeeOn { class WithTraceTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(WithTraceTest); CPPUNIT_TEST(testThrowCatch)...
/* this is class for holding the information concerning a camera: * Field of vision * Size of display * Clip near and far * and the combination of these for a quick and ready projection matrix * Location vector */ //Currently the Camera deals with a lot of the transform logic. I may be removing this down the //r...
#include <iostream> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: ListNode* oddEvenList(ListN...
/* -*- 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. */ /** * @file unistream.cpp * This file contains code for stream...
// Переставьте соседние элементы массива (A[0] c A[1], A[2] c A[3] и т.д.). Если элементов нечетное число, то последний элемент остается на своем месте. // Формат входных данных // В первой строке вводится количество элементов в массиве. Во второй строке вводятся элементы массива. // Формат выходных данных // Выведит...
/************************************************************************/ /*题目:输入一个正数 n,输出所有和为 n 连续正数序列。 例如输入 15,由于 1+2+3+4+5=4+5+6=7+8=15,所以输出 3 个连续序列 1-5、 4- 6 和 7-8。 分析:这是网易的一道面试题*/ /************************************************************************/ /**********************************************************...
#pragma once #include "envoy/network/address.h" #include "envoy/network/socket.h" #include "common/singleton/threadsafe_singleton.h" namespace Envoy { namespace Network { class SocketInterfaceImpl : public SocketInterface { public: IoHandlePtr socket(Socket::Type socket_type, Address::Type addr_type, ...
#pragma once #include <Tanker/Groups/IAccessor.hpp> #include <Tanker/ContactStore.hpp> #include <Tanker/Groups/Group.hpp> #include <Tanker/Groups/IRequester.hpp> #include <Tanker/ProvisionalUserKeysStore.hpp> #include <Tanker/Trustchain/GroupId.hpp> #include <Tanker/UserKeyStore.hpp> #include <tconcurrent/coroutine....
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #ifndef __PDF_DOCUMENT_H__ #define __PDF_DOCUMENT_H__ #include "gtabstractdocument.h" #include <QtCore/qplugin.h> extern "C" { #include "mupdf-internal.h" } GT_BEGIN_NAMESPACE class PdfDocument : public GtAbstractDocument { public: explicit PdfDocument...
#include "many.h" int many(int x, int y) { if(x<y){ return y; } return x; }
#include<iostream> #include<algorithm> #include<cstdio> #include<vector> #include<queue> using namespace std; #define MAX_SIZE 6677 #define MOD 747474747 #define ull unsigned long long int #define INFINITY 1<<31 int n,d,counter1,counter2; struct vertex { int id,c[5],marked,key,count,tcount; }; vector<vertex> a; ull di...
/* * Stopping Times * Copyright (C) Leonardo Marchetti 2011 <leonardomarchetti@gmail.com> */ #ifndef _DE_SOLVER_H_ #define _DE_SOLVER_H_ #include <boost/function.hpp> #include "de-solver.h" namespace StoppingTimes{ /* FP is a template for Floating Point types. */ template<typename FP> class DESolver { public: ...
//===-- apps/odb-cli/cli.hh - CLI class definition --------------*- C++ -*-===// // // ODB Library // Author: Steven Lariau // //===----------------------------------------------------------------------===// /// /// \file /// Centralize client/server interface to communicate with debugger /// //===---------------------...
#include <vector> #include <unordered_map> #include <string> using namespace std; /** * This solution has not survived all the test cases; */ class Solution { public: int myAtoi(string str) { unordered_map<char, int> validDigits = { {'0', 0}, {'1', 1}, {'2', 2}, {'3', 3}, {'4', 4}, {'5', 5}, {'...
/* * Clarinet.cpp * * Created on: Jun 16, 2016 * Author: g33z */ #include "Clarinet.h" void Clarinet::play(Enote n){ cout << "Tüdelü in Clarinet" << endl; Woodwind::play(n); }
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#pragma once /* It's an interface for IP headers used within the project. It allow to create different IP headers for different platforms, consequently, the cross-platform is easily implementable. All IP headers within in the project must inherit of this interface. */ #include <stdint.h> class IIPHeader { publ...
// Fill out your copyright notice in the Description page of Project Settings. #include "InventoryManagerComponent.h" #include "InventoryComponent.h" // Sets default values for this component's properties UInventoryManagerComponent::UInventoryManagerComponent() { // Set this component to be initialized when the gam...
#include "drawable_cloud.h" #include <math.h> void DrawableCloud::Draw() const { // fprintf(stderr, "DrawableCloud::Draw()\n"); if (!_cloud_ptr) { throw std::runtime_error("DrawableCloud has no cloud to draw."); } // fprintf(stderr, "DrawableCloud::Draw() after _cloud_ptr check\n"); gl...
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <math.h> #include <cstdlib> #include <cstring> #include <string> using namespace std; class o1strings{ public : int k; static int testcase; char value; string str = "0"; string rev_str; ...
#include <iostream> #include <vector> using namespace std; int contComp=0; //&function void Particion(vector<int> &d, int ini, int fin, int &pivote){ int elempivote = d[ini], j = ini; for(int i = ini + 1 ; i <= fin; i++) { if(d[i] < elempivote) { swap(d[i], d[++j...
// // MachineDefinition.cpp // Landru // // Created by Nick Porcino on 10/28/14. // // #include "MachineDefinition.h" #include "Property.h" #include "State.h" namespace Landru { MachineDefinition::~MachineDefinition() { for (auto i : states) delete i.second; for (auto i : prope...
#include "Button.h" Button::Button(SDL_Rect *r, /*SDL_Texture *t*/SDL_Surface *s):GameInterface(r,/*t*/s) { } bool Button::isActive(Uint32 mouseState, SDL_Event event) { return mouseState == SDL_BUTTON_LEFT&&event.type==SDL_MOUSEBUTTONUP; }
#include "Ad.h" #include "Utils.h" Ad::Ad() : QWidget() { idEmploye = 0; day = 0; setAd(); } void Ad::setAd() { layoutAd = new QGridLayout(this); teamValueDisplay = new QLabel("+100%", this); QLabel* valueText = new QLabel(tr("Last performance"), this); QGroupBox* groupTeam = new QGroupBox(tr("Team"...
#pragma once #include <QWidget> #include "ToDoWidgets/TaskWidget/Priority/specialtypes.h" namespace Ui { class PriorityWidget; } class PriorityWidget : public QWidget { Q_OBJECT public: PriorityWidget(); ~PriorityWidget(); importanceDegree getImportance(); private: Ui::PriorityWidget *ui; };
/* * op.cpp * * Created on: 2 mars 2014 * Author: droper */ #include <memory> #include "op.h" op::op() { } op::~op() { child1.reset(); child2.reset(); } void op::setChild1(std::shared_ptr<node> child) { child1 = child; } void op::setChild2(std::shared_ptr<node> child) { child2 = child; } std::shar...
#ifndef SOLARSYSTEM_H #define SOLARSYSTEM_H #include "SimConstants.h" #include "world.h" #include <glm/glm.hpp> #include "custom_sim_exceptions.h" namespace Simulation { class SolarSystem { public: SolarSystem(int ID); ~SolarSystem(void); void Init(glm::vec2); ...
// Parses a sequence of texts into separate lines. Client defines // the delimiter. Parsed output is returned as a vector of strings. #ifndef UTILS_QSORT_QSORT_H_ #define UTILS_QSORT_QSORT_H_ #include <fstream> // TODO: Remove after FileWriter is implemented #include <iostream> // DEBUG #include <string> #include...
#include <iostream> #include <vector> #include <map> #include <string> #include <bitset> #include <queue> #include <algorithm> #include <functional> #include <cmath> #include <cstdio> #include <sstream> #include <stack> #include <istream> #define INF 2000000001 #define SIZE 8 using namespace std; typedef pair<int, i...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2011 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef OPURLFILTERAPI_H #define OPURLFILTERAPI_H #ifdef URL_FILTER ...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <queue> #include <set> using namespace std; struct ListNode{ int val; ListNode* next; ListNode(int x):val(x),next(NULL){} }; void printLL(ListNode* head){ ListNode* temp = head; ...
/* * ReverseString.cpp * * @author: Collin Guarino * Created: May 15, 2014 */ #include <iostream> using namespace std; string inputString; int main() { cout << "Reverse String\n" << endl; while(1) { cout << "String to reverse: "; cin >> inputString; cout << string(inputString.rbegin(), inputString...
#pragma once #ifndef __TEST02_H #define __TEST02_H #include <iostream> #include <string> #include "cpp_primer_config.h" #ifdef USE_TEST02_H class Test02 { public: void showBookInfo(void) const; public: Test02(std::string Name, unsigned int ID); ~Test02(); private: std::string BookName; unsigned int BookID; }; ...
#pragma once #include <string> #include "Cart.hpp" class MyAccount { public: MyAccount(); MyAccount(const std::string& name, const std::string& email, const std::string& password); void enter_name(std::string name); void enter_emai(std::string email); void enter_password(std::string password); void set_name(co...
#include "pch.h" #include "core.h" using namespace System; int main() { int n = 4, m = 7; char InputAction; bool checkForCycle = true, CheckForNegative, CheckForP = false, CheckForQ = false; array<int, 2>^ P, ^ Q; array<int>^ R, ^ T; Console::Write("Lab 2\nSpecify values for integer elements of...
#pragma once using boost::asio::ip::udp; class AppDealer; class UdpDealer { public: UdpDealer(boost::asio::io_service& io_service, short port); void do_receive(); void do_send(const std::string& data); private: boost::shared_ptr<AppDealer> _app_do; udp::socket socket_; udp::endpoint sender...
#include <stdio.h> #include <stdlib.h> int main() { FILE *fp1 = fopen("F1.txt", "r"); FILE *fp2 = fopen("F_2.txt", "w"); char c; while ((c = fgetc(fp1)) != EOF) fputc(c, fp2); fclose(fp1); fclose(fp2); return 0; }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*- ** ** Copyright (C) 2004 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Morten Stenshorne ** */ /* This is the ...
#include "stdafx.h" #include "voxelList.h" #include "voxelObject.h" #include "neighbor.h" voxelList::voxelList() { } voxelList::~voxelList() { } void voxelList::init() { updateBoundingBox(); } void voxelList::updateBoundingBox() { Box b = getBoundingOfVoxels(m_voxelIdxs); m_curLeftDown3F = b.leftDown; m_curRi...
#pragma once #pragma unmanaged #include <BWAPI\Force.h> #include <BWAPI\Forceset.h> #pragma managed #include "IIdentifiedObject.h" using namespace System; using namespace System::Collections::Generic; namespace BroodWar { namespace Api { ref class Player; public ref class Force sealed : public IIdentifiedOb...
//====================================================================== #include <upl/input.hpp> #include <cstdio> //====================================================================== namespace UPL { //====================================================================== UTF8FileStream::UTF8FileStream (Path ...
#include <iostream> #include <vector> using namespace std; // Problem specific constants. const int POWER = 500500; const long long MODULO = 500500507; // Return a vector of the first n primes. vector<int> getNPrimes(int n) { vector<bool> prime(15 * POWER, true); prime[0] = prime[1] = false; vector<int>...
// Copyright (c) 2021 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 Free Software Foundation, with special ...
#include "AA_SIPP_O.h" AA_SIPP_O::AA_SIPP_O(double weight, bool breakingties) { this->weight = weight; this->breakingties = breakingties; closeSize = 0; openSize = 0; } AA_SIPP_O::~AA_SIPP_O() { } double AA_SIPP_O::calculateDistanceFromCellToCell(double start_i, double start_j, double fin_i, double ...
#include "flex_typeclass_plugin/Tooling.hpp" // IWYU pragma: associated #include "flex_typeclass_plugin/flex_typeclass_plugin_settings.hpp" #include <flexlib/per_plugin_settings.hpp> #include <flexlib/reflect/ReflTypes.hpp> #include <flexlib/reflect/ReflectAST.hpp> #include <flexlib/reflect/ReflectionCache.hpp> #inclu...
#pragma once #include "stdafx.h" #include "DataTypes/define.h" #include "nodeGenFuncs.h" class VoxelObj; #define ZERO_INT 0 class sumTable { public: sumTable(); ~sumTable(); void initSumTable(VoxelObj *obj); void setTablePointer(int ***table){m_table = table;}; void computeSum(); int volumeInBox(Boxi b); int...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define show(x) for(auto i: x){cout << i << " ";} typedef long long ll; int main() { int n; cin >> n; vector<pair<string, int>> a; rep(i ,n){ string s; int num; ...
// // VertexBufferLayout.hpp // Neverland // // Created by Admin on 14.07.2021. // #pragma once #include <OpenGLES/ES3/gl.h> #include <glm/glm.hpp> #include <vector> struct Vertex { // position glm::vec3 Position; // texCoords glm::vec2 TexCoords; Vertex(glm::vec3 aPosition, glm::vec2 aTexCoor...
#ifndef SEARCHMAP_HEADER #define SEARCHMAP_HEADER #include "Node.h" #include <vector> #include <set> class Map; class SearchNode; class SearchMap { // The start and goal node for the A* SearchNode* m_start; SearchNode* m_goal; // List of all the open node to search std::vector<SearchNode*> openLi...
#include "HashTable.h" //#include "LinkedList.h" #include <iostream> #include <vector> #include <cmath> using namespace std; /* int main() { std::cout << "start" << std::endl << " ----------------------" << std::endl; HashTable ht1(9); ht1.insert("bat"); ht1.insert("cat"); ht1.insert("rhinoceros"); ht1.i...
#pragma once namespace keng::memory { class VirtualMemoryChunk { public: VirtualMemoryChunk(); VirtualMemoryChunk(size_t bytes, size_t pageSize); VirtualMemoryChunk(const VirtualMemoryChunk&) = delete; VirtualMemoryChunk(VirtualMemoryChunk&& that); ~VirtualMemoryChun...
/***************************************** * (This comment block is added by the Judge System) * Submission ID: 13545 * Submitted at: 2015-03-16 19:49:43 * * User ID: 94 * Username: 53064064 * Problem ID: 176 * Problem Name: Internet Bandwidth (UVa 820) */ #include<iostream> #include<queue> #i...
#ifndef POINT_H #define POINT_H class Point { public: Point(float x, float y); ~Point() = default; const float abs() const; Point operator+ (const Point& rhs) { return Point(x + rhs.x, y + rhs.y); } friend bool operator== (const Point& lhs, const Point& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y; } frien...
#ifndef Snake_h #define Snake_h #include "Position.h" #include "Point.h" using namespace std; struct Snake { Position positionH, positionT; int sizeS, num, stepX, stepY, times; vector <Position> position_arr; Snake(); void render(SDL_Renderer* renderer, const int& head, SDL_Texture** const Imag...
#include "Real.h" #include <iostream> #include <iomanip> Real::Real(int n, int d) { setReal(n, d); } void Real::setReal(int n, int d) { setNumerador(n); setDenominador(d); reducir(); } void Real::setNumerador(int n) { numerador = n; } void Real::setDenominador(int d) { if (d < 0) //si denomi...
/* -*- 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. ** ** Yngve Pettersen ** */ #include "core/pch.h" #include "module...
#include"cXmlLogger.h" cXmlLogger::cXmlLogger(float loglvl) { loglevel = loglvl; LogFileName = ""; doc = 0; } cXmlLogger::~cXmlLogger() { if (doc) { doc->Clear(); delete doc; } } bool cXmlLogger::getLog(const char *FileName) { std::string value; Ti...
#include <iostream> using namespace std; int mult(int n, int m) { if (m < 0) { return -mult(n, -m); } else if (m == 0) { return 0; } else if (m == 1) { return n; } else { return n + mult(n, m - 1); } } int main() { cout << mult(4, 2) << endl; cout << mult(...
#include <iostream> using namespace std; #include "Entry.h" #include <fstream> #include "mapVector.h" #include "dictionary.h" int main() { dictionary d; d.userInterface(); return 0; }
//Created by: Mark Marsala, Marshall Farris, and Johnathon Franco Sosa //Date: 5/4/2021 //Reading and writing for an 16 bit mono wav file #include <string> #include <fstream> #include <iostream> #include "mono16.h" using namespace std; Mono16::Mono16(string newFile) { fileName = newFile; } void Mono16::readFile() ...
// Copyright (c) 2018 Hartmut Kaiser // // 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) #include <pika/future.hpp> #include <pika/init.hpp> #include <pika/testing.hpp> #incl...
// // proj07_functions.cpp // // Created by Kristjan von Bulow. // Copyright © 2018 Kristjan von Bulow. All rights reserved. // #include<string> using std::string; using std::getline; using std::stod; using std::to_string; #include<vector> using std::vector; #include<map> using std::map; #include<fstream> using std...
/* * angleblocker.h * deflektor-ds * * Created by Hugh Cole-Baker on 1/18/09. * Blocks the beam unless it enters at a certain angle. * */ #ifndef deflektor_angleblocker_h #define deflektor_angleblocker_h #include "spinblocker.h" class AngleBlocker : public SpinBlocker { protected: bool destroyed; ...
/* Name : Aman Jain Date : 05-07-2020 Question-> Top down approach Fibonacci Time complexity : O(n) Space Complexity : O(n) (Memoization) */ #include<bits/stdc++.h> using namespace std; int fibonacci(int n, int dp[]){ if(n<2) return n; if(dp[n]!=0) return dp[n]; int ans= fibonacci(n-1,dp)+fibonac...
#include "SceneHandler.h" #include "DebugScene.h" SceneHandler::SceneHandler(WindowRef window) { setWindow(window); start(); } void SceneHandler::setWindow(WindowRef window) { this->window = window; } void SceneHandler::start() { currentState = START_SCENE; switchScene(); } void SceneHandler::switchScene() { dele...
#pragma once using namespace Ogre; static void HK_CALL errorReport(const char* msg, void* userArgGivenToInit); class CPhysicsManager : public Singleton<CPhysicsManager> { public: CPhysicsManager(); ~CPhysicsManager(); void Create(); void Destroy(); void Update(); void SetHeightfieldData(); ...
/** * Copyright (c) 2020, Timothy Stack * * 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 condi...
/* * Copyright (c) 2016-2020 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_DETAIL_STABLE_ADAPTER_SELF_SORT_ADAPTER_H_ #define CPPSORT_DETAIL_STABLE_ADAPTER_SELF_SORT_ADAPTER_H_ //////////////////////////////////////////////////////////// // Headers ///////////////////////////////////////////////////////...
#include<iostream> #include<cstdio> #define MAX 70 #define getint(n) scanf("%d",&n) #define putint(n) printf("%d\n",n) #define ll long long int using namespace std; ll dp[MAX][MAX]; void preprocess() { dp[0][0] = 1; for(int i = 0 ; i < MAX; i++) { for(int j=0 ; j < MAX ; j++) { if( i == 0 && j == 0) continue...
/** * @file test/test_sdp.cc * @brief * @version 0.1 * @date 2021-01-14 * * @copyright Copyright (c) 2021 Tencent. All rights reserved. * */ #include <iostream> #include "mini_sdp.h" using namespace std; using namespace mini_sdp; string origin_sdp = "v=0\r\no=- 1 0 IN IP4 127.0.0.1\r\n" "s=webrtc_c...
#include "Hora.h" void Hora::verificaHora(void){ if(h<0 || h>23 || m<0 || m>59 || s<0 || s>59){ h=0; m=0; s=0; } } Hora::Hora(void){ h=0; m=0; s=0; } Hora::Hora(int h, int m, int s){ this->h = h; this->m = m; this->s = s; this->verificaHora(); } Hora::~Hora(...
#include "stdafx.h" #include "Ai4wwTests.h" #include "StringUtils.h" #include "Station.h" #include "TextFile.h" #include "TestError.h" #include "Contest.h" Ai4wwTests::Ai4wwTests() : TestBase("Ai4wwTests"), m_station(nullptr) { } Ai4wwTests::~Ai4wwTests() { if (m_station) delete m_station; } bool Ai4...
// // tertura.h // opengl2 // // Created by Tiago Rezende on 4/2/13. // // #ifndef __opengl2__tertura__ #define __opengl2__tertura__ #include "ofMain.h" #include <vector> #include <string> class GenTextureShader { protected: ofVbo vbo; public: virtual void setup() {}; virtual ~GenTextureShader() {} ...
#include <json.h> #ifdef _WIN32 #include <windows.h> #endif #include <exception> #include <iostream> #include <clocale> int main(int argc, char* argv[]) { std::setlocale(LC_ALL, ""); try { json::value config; config["test"];// = 3; } catch (const std::exception& e) { std::cerr << "error: " << e.wh...
#include "brickstest.hpp" #include <bricks/imaging/png.h> #include <bricks/imaging/bitmap.h> #include <bricks/io/filestream.h> using namespace Bricks; using namespace Bricks::IO; using namespace Bricks::Imaging; class BricksImagingPngTest : public testing::Test { protected: AutoPointer<Stream> fileStream; virtual ...
/* * Death Star Lamp * * Firmware to connect my Death Star lamp device to the cloud using a MKR1000. * Subscribes to a real-time messaging channel on PubNub and parses messages. * Adds logic to turn lamp on/off and move stepper motor in between ten levels. * * You need to add your WiFi and device details in li...
// window.h // The Window class has the main Qt components and links together the GUI with your scene graph #ifndef WINDOW_H #define WINDOW_H #include <QWidget> #include <QtWidgets> #include <QSlider> #include <QPushButton> #include "gMatrix.h" #include "eController.h" class Data; // forward declaration of my simp...
#ifndef S3INDEX_LIBRARY_H #define S3INDEX_LIBRARY_H #include "Vertica.h" #include <stdio.h> #include <stdlib.h> #include <aws/core/Aws.h> #include <aws/core/auth/AWSCredentialsProvider.h> #include <aws/s3/S3Client.h> #include <aws/s3/model/GetObjectRequest.h> #include <aws/transfer/TransferManager.h> using namespace...
#include <stdio.h> #include <time.h> #include <locale.h> int main() { int dia, mes, ano, idade; struct tm*data; time_t segundos; time(&segundos); data = localtime(&segundos); printf("Digite o seu ano de nascimento: "); scanf("%d", &ano); printf("Digite o seu mes de nascimento: "); scanf("%d", &mes); prin...
#include "mainwindow.h" #include "ui_mainwindow.h" #include <sstream> #include <iostream> #include "segmentedimage.h" #include "statisticscollector.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); // DEBUG std::vector<std::pair<double, ...
#include "scenario_erase.hpp" ScenarioErase::~ScenarioErase() { } ScenarioErase::ScenarioErase(const std::vector<std::string>& word_list, std::size_t nqueries) : Scenario() { std::random_device rd; std::mt19937 gen(rd()); this->m_impl->queries.reserve(nqueries); this->m_impl->...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * */ #ifndef BITMAP_BUTTON_H #define BITMAP_BUTTON_H #include "mod...
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; long long sum =0; for(int i=1; i <= N; i++){ if(i%3 !=0 && i%5 !=0 && i%15 != 0)sum += i; } cout << sum << endl; }
#include <cstdio> #include <iostream> #include <vector> #include <string> #include <stack> #include <unordered_map> #include <unordered_set> #include <queue> #include <algorithm> #define INT_MAX 0x7fffffff #define INT_MIN 0x80000000 using namespace std; bool isMatch(const char *s, const char *p){ } int main(){ ...
#pragma once namespace ionir { class ConstructFactory { public: // TODO }; }
#include "ReadsSetAnalyzer.h" namespace PgSAReadsSet { template<class ReadsSourceIterator> ReadsSetProperties* ReadsSetAnalyzer::analyzeReadsSet(ReadsSourceIterator *readsIterator) { ReadsSetProperties* properties = new ReadsSetProperties(); bool symbolOccured[UCHAR_MAX] = {0}; while ...
#ifndef CSERIALPORTCOMMON_H #define CSERIALPORTCOMMON_H #include <Windows.h> #include <QString> class CSerialPortCommon { public: CSerialPortCommon(); bool isOpen() { return comopen; } void cleanRx(); bool write(LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite); DWORD read(LPVOID lpBuffer, DWORD nBu...
#ifndef ENEMY_H #define ENEMY_H #include<iostream> #include "SFML/Graphics.hpp" #include "Ground.h" class Enemy { public: /** Default constructor */ Enemy(sf::RenderWindow* windowPtr, Ground* ground, sf::Texture* enemyTex, int floater ); bool update(int direction, bool moveDete...
/* This was a lab from CS 210, creating a simple vector list of items in a grocery cart */ #include <iostream> #include <vector> using namespace std; #include "ItemToPurchase.h" int main() { //declare a vector to easily add multiple items //temp variables for working with the loop ItemToPurchase tempItem; vec...
/***************************************************************************************** * * * owl * * ...
// // 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. // // Arjan van Leeuwen (arjanl) // #ifndef IMAP_FOLDER_H #define IMAP_FOLDER_H #include "adjunct/desktop_util/adt/opsortedvector.h" #include ...
#include<iostream> #include<algorithm> #include<queue> #include<cstring> #include<vector> #include<stdio.h> using namespace std; int N, X; int arr[21][21]; int play() { int cnt = 0; // 상하 for (int x = 0; x < N; x++) { int k = 1; int cmp = arr[0][x]; bool up = 0; int y = 1; while (y < N) { if (arr[...
// Created on: 1997-04-17 // Created by: Christophe MARION // 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 ...
#pragma once #ifndef INPUT_H #define INPUT_H class Input { public: Input(); double getPotenza(); double getDirezione(); void setPotenza(double var); void setDirezione(double var); private: double potenza; double direzione; }; #endif
#include <iostream> #include <iomanip> #include <assert.h> #include <stdlib.h> #include "array_2d.h" template <class T> inline unsigned int Array2D<T>::index(unsigned int i1, unsigned int i2) { return this->cols*i1 + i2; } template <class T> Array2D<T>::Array2D(unsigned int rows, unsigned int cols) { this->in...
#include "CyclistPreprocessor.hpp" #include <iostream> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Winline" CyclistPreprocessor::CyclistPreprocessor(int processorId, Conf &cfg) : Preprocessor(processorId, cfg) { #ifdef OPENCV3 #ifdef LB_MOG this->bg = new LBMixtureOfGaussians(); #else ...
#pragma once #include "FzgVerhalten.h" class Weg; class Fahrzeug; class FzgFahren : public FzgVerhalten { public: FzgFahren(Weg * ptWay); ~FzgFahren(void){}; virtual double dStrecke(Fahrzeug *ptCar, double dZeit); };
#include <vector> #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 <stdlib.h> const long long...
/** * Copyright (c) 2015, Timothy Stack * * 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 condi...
#pragma once #ifndef SLOTH_CAMERA_3RD_H_ #define SLOTH_CAMERA_3RD_H_ #include "raw_camera.h" #include <entities/player.h> namespace sloth { class Camera3rd : public RawCamera { protected: float m_DistanceFromPlayer = 50.0f; float m_AngleAroundPlayer = 0.0f; Player &m_Player; private: // ¼Ç¼ijһʱ¿Ì d...