text
stringlengths
8
6.88M
#pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <deque> #include <iostream> #include <iterator> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; void abhisheknaiidu()...
#include<bits/stdc++.h> using namespace std; int main(){ int a[]={1,2,3,4,5}; int b[]={6,7,8,9,10,11,12}; int n=sizeof(a)/sizeof(a[0]); int m=sizeof(b)/sizeof(b[0]); int p; int c[100],count=0; for(int i=0; i<m; i++) { c[count++]=a[i]; p++; c[count+4]=b[i]; } // for(int i=0;i<m;i++) // { // c[count++]=b...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 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 M2_SUPPORT #include "m2glue.h" #in...
int outpin = 8; float kiloh; float freq = 10; long period; bool ones = false; long lastTime = 0; long now; // Timer output const byte CLOCKOUT = 9; // Only for Arduino Uno #define NOP __asm__ __volatile__ ("nop\n\t") void setup() { // put your setup code here, to run once: Serial.begin(115200); pin...
// Created on: 1998-05-07 // Created by: Andre LIEUTIER // Copyright (c) 1998-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...
#include "login.h" #include "ui_login.h" #define Path_to_DB "C:/Users/Admin/Documents/TermPaperTEST/build-automated_workplace_of_confectioner-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug/awoc.db" Login::Login(QDialog *parent) : QMainWindow(parent) , ui(new Ui::Login) { ui->setupUi(this); //Підключаємо базу д...
/***************************************************************************************** * * * owl * * ...
#include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: double myPow(double x, int n) { //基本思想:快速幂算法,将n看成二进制数,比如n为11,3^11=3^1011=3^1000*3^10*3^1,也就是从低位往高位不断循环右移一位且当前x值为x*=x,最低位遇到1也就是当前为奇数res乘当前x即res*=x double res = 1.0; if (n == 0 || x==1.0) return 1.0; long lon...
#include "Arduino.h" #include "PIC.h" //Constructor PIC::PIC(float Kp, float Ti, float dt){ _Kp = Kp; _Ti = Ti; _dt = dt; _u_max = 5.0; _u_min = 0.0; _u_k1 = 0.0; _e_k1 = 0.0; } float PIC::ControlSignal(float setPoint, float temperature){ float e = setPoint-temperature; flo...
#include "deferred.h" #include "util.h" #include <functional> namespace { class PassThroughHandler : public CefV8Handler { public: typedef std::function<bool (const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception)> Function; Pa...
#ifndef QSERIAL_H #define QSERIAL_H #include <QtSerialPort/QSerialPort> #include <QTimer> #include <QQueue> #include <QTextStream> class QSerial : public QObject { public: explicit QSerial(QString, int = 9600, bool = true, bool = false); ~QSerial(); bool open(); void close(); /* * envia por ...
// Created on: 1992-06-22 // Created by: Gilles DEBARBOUILLE // 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 th...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 2001-2007 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef _WIN_HANDY_H_INCLUDED__8496...
#pragma once class CMainFrame; class CSKMobileView; class Controller { public : virtual void Init(CMainFrame * mainFrame) = 0; virtual void Init(CSKMobileView * view) = 0; virtual void Fini() = 0; virtual BOOL OnCopyData(CWindow wnd, PCOPYDATASTRUCT pCopyDataStruct) = 0; virtual LRESULT O...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define show(x) {for(auto i: x){cout << i << " ";} cout<<endl;} #define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;} typedef long l...
#pragma once #ifndef FACETRACKING_H #define FACETRACKING_H #if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) #include <windows.h> #endif // OpenCV #include "opencv2/objdetect.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/videoio.hpp" #include "opencv2/ca...
#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 <...
#include "f3lib/assets/model/Motion.h" #include <cassert> using namespace f3; using namespace f3::types; Motion::Motion() { } Motion::~Motion() { } void Motion::initBones(const Skeleton& skeleton, std::vector<Matrix>& boneMatrices) const { for (unsigned int i = 0; i < skeleton._bones.size(); ++i...
#ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include <iostream> #include <sstream> #include <iomanip> #include <cstdlib> #include <cstring> #include "glExtension.h" #include "Timer.h" void displayCB(); void reshapeCB(int w, int h); void timerCB(int ...
#include <iostream> #include <sstream> #include <string> #include <fstream> using namespace std; #include "VoterDB.h" #include "VoterMenu.h" int main(int argc, char *argv[]) { int voters = 0; string file; if (argc == 1) { cout << "\nYou must supply a max voters parameter.\n"; return 0; } if (argc > 1) { is...
#include <SPI.h> #include <MFRC522.h> #define SS_PIN 5 #define RST_PIN 9 #define RELAY 3 //connect the relay to number 3 pin #define BUZZER 2 // connect the buzzer to 2 pin #define ACCESS_DELAY 2000 #define DENIED_DELAY 1000 //LED Light const int pwm = 10 ; //LCD #include <LiquidCrystal.h> // initialize the li...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "mqtt.h" #include <QDebug> #include <string> #include <QMessageBox> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); connect(&configDialog, SIGNAL(configChanged()), this, SLOT(on_config...
// // Created by silvman on 3/2/19. // #ifndef EESKORKA_HTTPUTILITY_H #define EESKORKA_HTTPUTILITY_H #include <string> #include <filesystem> #include <regex> #include <fstream> #include "../server/ServerConfig.h" #include "../logger/ServerLogger.h" namespace eeskorka { namespace fs = std::filesystem; names...
// Created on: 1994-10-13 // Created by: Jean Yves LEBEY // Copyright (c) 1994-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 "BufferManager.h" #include "RWLockable.h" #include "Block.h" #include <bitstream.h> #include <unordered_map> namespace credb { namespace trusted { class Shard : public RWLockable { public: explicit Shard(BufferManager &buffer); Shard(const Shard &other) = delete; shard_id_t identif...
class Solution { public: bool wordBreak(string s, vector<string>& wordDict) { vector<bool> DP(s.size() + 1, 0); DP[0] = 1; set<string> setDict; for (auto i : wordDict) { setDict.insert(i); } for (int i=1; i<=s.size(); i++) { for (int j=0; j<i; ...
// BEGIN CUT HERE // PROBLEM STATEMENT // A big box contains marbles of one or more colors. You're // given a vector <int> colors, each element of which denotes // the number of marbles there are of a particular color. You // draw n marbles randomly from the box, leaving each marble // outside the box after taking ...
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib // This simple sketch will adjust the RTC time to the desired time as defined // in DATE and TIME defines. The adjustment will be made upon pressing the // SET_BUTTON. The adjustment can be skipped by pressing the SKIP_BUTTON. When // done, t...
#include <my_filters/common_include.h> //--------------- KF ---------------// class KF { // ros ros::NodeHandle nh_; ros::Publisher pub_kf, pub_pf; ros::Subscriber sub_arucoResult; ros::Subscriber sub_arucoPixel; ros::Subscriber sub_pcl; geometry_msgs::PointStamped msg_kf, msg_pf; // ti...
// // Main Components // ------------------- // - Ball // - Paddel // - Playing Field // - Scores #if defined (__EMSCRIPTEN__) #include <emscripten/emscripten.h> #include <emscripten/html5.h> #endif #include <functional> #include "GameScene.h" // variable to hold GameScene's frame function for emscripten...
#include "GnMainPCH.h" #include "GnTimeController.h" GnImplementRootRTTI(GnTimeController); void GnTimeController::SetCycleType(GnTimeController::eCycleType eType, GnObjectForm *pObject) { GnTimeController* ctrl = pObject->GetTimeControllers(); GnAssert( ctrl ); while ( ctrl ) { ctrl->SetCycleType( e...
#include "../include/drift_diffusion.h" #include "../include/unscaling.h" void Drift_diffusion::unscaling_results(void) { int N = grid_scaled.N_points_scaled; // Plus two sided boundaries scaled_result result_scaled = result_it1_scaled; // Only the last is used result_it.V.resize(N); result_it.E.resize(N); resul...
//Напишите функцию, которая //называется PalindromFilter, //возвращает vector<string>, //принимает vector<string> words и int min_length, //возвращает из вектора words все строки - палиндромы длиной не меньше min_length. // //Примеры //WORDS/min_length РЕЗУЛЬТАТ //abacaba, aba //5 abacaba /...
// // EPITECH PROJECT, 2018 // nanotekspice // File description: // simulate chipsets // #include "../include/AComponent.hpp" std::map<std::string,std::function<std::unique_ptr<nts::IComponent> *(const std::string &value)> > nts::AComponent::_funcs; nts::AComponent::AComponent() { _funcs.insert(std::make_pair("inpu...
#ifndef CONTROLWIDGET_H #define CONTROLWIDGET_H #include <QWidget> #include <QPushButton> #include <QHBoxLayout> #include <QVBoxLayout> #include <QGridLayout> #include <QLabel> #include <QLineEdit> class ControlWidget : public QWidget { Q_OBJECT public: explicit ControlWidget(int width, QWidget *parent = 0); ...
#include <bits/stdc++.h> using namespace std; int main(){ int h, w; cin >> h >> w; vector<string> m(h); for(int i=0; i<h; i++) cin >> m[i]; for(int i=0; i<h; i++){ for(int j=0; j<w; j++){ if(m[i][j] == '.'){ int cnt = 0; for(int x=-1...
#include <iostream> #include "entity.h" Entity::Entity(QVector<Mesh *> meshes, const QVector3D &position, btRigidBody* rigidBody) : meshes(std::move(meshes)), position(position), rigidBody(rigidBody) { } QVector<Mesh *> Entity::getMeshes() const { return meshes; } QVector3D Entity::get...
#include "GameObject.h" #include <DxLib.h> #include "Reference.h" #include "misc\Func.h" int GameObject::resolution; void GameObject::setResolution(int r) { resolution = r; } GameObject::GameObject(Vector2 position) : Object(position), hitRange(0.0F), count(0), minCount(-1), dispRange(10.0F) { } void GameObject::...
#include<bits/stdc++.h> using namespace std; vector<int> e[100]; string s[100],val[100]; int siz[100],f[100],t,n,minf,ans; inline void ins(int u,int v){ e[u].push_back(v); e[v].push_back(u); } void readit(){ scanf("%d",&n); for (int i=1;i<=n;i++) e[i].clear(); for (int i=1;i<=n;i++){ int x; sc...
#ifndef VNAFILESYSTEM_H #define VNAFILESYSTEM_H #include "Definitions.h" #include <QObject> #include <QScopedPointer> namespace RsaToolbox { class Vna; class VnaFileSystem : public QObject { Q_OBJECT public: enum Directory { DEFAULT_DIRECTORY, EMBED_DIRECTORY, DEEMBED_DIRECTORY, ...
#include "precompiled.h" #include "interface/pos.h" #include "interface/interface.h" #include "render/render.h" #include "render/dx.h" #include "render/font.h" #include "game/game.h" #include "game/player.h" using namespace ui; Pos::Pos() { d3dfont = NULL; draw = 0; } Pos::~Pos() { delete d3dfont; } void Pos::re...
#include "DwriteCairo.h" #include <dwrite.h> #include "DebugUtility.h" HRESULT __stdcall DwriteCairoCreateTextRender( _In_ REFIID iid, _COM_Outptr_ IUnknown **textRender ) { if (textRender == nullptr) return E_POINTER; DebugAssert(iid == IDirectWriteCairoTextRenderer::IID_IDirectWriteCairoTextRenderer, "IID ...
#include "QueueTp.h" #include "Worker.h" #include <iostream> #include <cstring> const int SIZE = 5; int main() { using std::cin; using std::cout; using std::endl; using std::strchr; Queue<Worker*> workerQueue(SIZE); for (int i = 0; i < SIZE; ++i) { cout << "Enter the employee category:\nw:waiter\ts:singer\tt:...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Arjan van Leeuwen (arjanl) */ #include "core/pch.h" #...
#ifndef __DF40940SDVCV__DFNIDS_HPP__ #define __DF40940SDVCV__DFNIDS_HPP__ #include <string> #include <iostream> namespace g9898fvc909gg_e { namespace fgbcxh4g43xvc { std::string df40940sdvcv__dfnids(const std::string& flxfbdfb4364b_e4vx); } } namespace g9898fvc909gg_e { namespace fgbcxn4g43xvc { std::string df...
#ifndef DRAWMAP #define DRAWMAP #include "glut.h" class DrawMap { public: static DrawMap* Instance(); void drawMap(); private: DrawMap() { } virtual ~DrawMap() { } }; #endif
#include <Arduino.h> /* This code will fetch the latest data from your antares project device. Your Antares project device must have a structure like this: (Note that nesting the JSON object can only be done up to 2 levels using this library) { "temperature": some-integer, "humidity": some-integer, ...
#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; #define max(a,b) ((a>b)?a:b) const int inf = 1e9 + 7; const int maxn = 1e6 + 10; ...
#include<iostream> #include<bits/stdc++.h> using namespace std; //count distinct elements in union of two arrays //IDEA: copy both arrays in hashset and return hashset's size int count(int a[],int n,int b[],int m){ unordered_set<int> u; u.insert(a,a+n); u.insert(b,b+m); return u.size(); } int main(...
#include "gtest/gtest.h" #include "opennwa/Nwa.hpp" #include "opennwa/query/language.hpp" #include "opennwa/construct/union.hpp" #include "opennwa/query/automaton.hpp" #include "opennwa/query/language.hpp" #include "Tests/unit-tests/Source/opennwa/fixtures.hpp" #include "Tests/unit-tests/Source/opennwa/int-client-inf...
//#include "stdafx.h" #include <iostream> #include <fstream> #include <string> //#include <dos.h> #include "Lexer.h" using namespace std; ifstream inFile("input.go"); string Lexer::readString() { string app; if (inFile.fail()) { cerr << "Unable to open file for reading." << endl; exit(1); } if (inFile.is_o...
#define SPLITTERS 8 // nombre de délimiteurs MAX pris en compte String Subs[SPLITTERS]; int SplitIndex[SPLITTERS]; void String_Split(char Splitter, String _string) { int i; int Index=0; int Nsubs; for(i=0; i<SPLITTERS; i++) { SplitIndex[i]=_string.indexOf(Splitter,Index); ...
#ifndef UTILS_HH_ # define UTILS_HH_ // #include <gtk/gtk.h> // // #include <string> #include <vector> #include <iostream> #include <deque> #include <list> #include "WoZ.hh" using namespace std; void add_toolTips (GtkWidget *w, const char* s); void display_infoTab (); string d2s(double n); string i2s(int n); void ...
/* This file is part of the Pangolin Project. * http://github.com/stevenlovegrove/Pangolin * * Copyright (c) 2015 Steven Lovegrove * * 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 Softw...
#include <ros/ros.h> int main(int argc, char **argv) { ros::init(argc, argv, "log"); ros::NodeHandle nh; ros::Rate loopRate(10.0); for (auto i = 1; ros::ok(); ++i, loopRate.sleep()) { ROS_DEBUG_STREAM("Counted to " << i); auto mod = 3; if (i % mod == 0) { ROS_INFO_STREAM(i << " is divisibl...
#include<bits/stdc++.h> using namespace std; #define PI 3.1415926535897932 int main(){ char message[256]; printf("%d\n",strlen(message)); //先頭をヌル文字に message[0] = '\0'; printf("message[] = %s\n",message); printf("message len = %d\n",strlen(message)); //copy strcpy(x, y); -> x = y; str...
/* BEGIN LICENSE */ /***************************************************************************** * SKCore : the SK core library * Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr> * $Id: integerlist.h,v 1.5.4.3 2005/02/17 15:29:20 krys Exp $ * * Authors: Arnaud de Bossoreille de Ribou <debossoreille @at@...
/* * 判断两个有环单链表是否相交,并且可求出相交节点 */ #include <bits/stdc++.h> struct ListNode{ int data; ListNode *next; ListNode(int x):data(x),next(NULL){} }; class Solution{ public: bool list_judge_two_joined_hasCircle(ListNode *head1,ListNode *head2){ if(head1 == NULL || head2 == NULL){ return f...
// // Created by jakub on 31.10.18. // #ifndef ESP32ACTUATOR_NVS_H #define ESP32ACTUATOR_NVS_H #include <nvs_flash.h> #include <nvs.h> #include <esp_system.h> #include "TempSensor/TempSensor.h" #include "Actuator/Actuator.h" namespace Nvs{ static nvs_handle my_handle; static esp_err_t err; static int32_t ...
// 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...
#include <iostream> #include <cmath> using namespace std; int main() { int num = 0; cout << "Enter a number: "; cin >> num; int cube = num*num*num; if ( cube % num == 0 ) { cout << "The cube of " << num << " is " << cube << "." << endl; } else { cout << "Error! The...
#include "terminallistdialog.h" #include "ui_terminallistdialog.h" TerminalListDialog::TerminalListDialog(QSqlQueryModel *modTerm, QWidget *parent) : QDialog(parent), ui(new Ui::TerminalListDialog) { ui->setupUi(this); modelTerminals = modTerm; createUI(); } TerminalListDialog::~TerminalListDialo...
// Copyright 2017 Pok On Cheng // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
#ifndef OBJECT_UPPER_EXT_H #define OBJECT_UPPER_EXT_H #include <QObject> class Object_Upper_Ext_H : public QObject { Q_OBJECT Q_SLOT void go(){}; }; #endif
#include "Options.h" Options::Options(QWidget* parent) : QDialog(parent) { this->setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); this->setAttribute(Qt::WA_DeleteOnClose); this->setMinimumSize(300, 300); storedSettings = Utils::loadSettingsFromFile(); oldSettingsToCompare = storedSettings...
#include <stdio.h> using namespace std; int main() { freopen("student.txt", "w", stdout); int i; for(i=1; i<=31000; i++) printf("0 0\n"); return 0; }
#include <iostream> #ifndef TOKEN_H #define TOKEN_H class Token { private: public: std::string Type; std::string Value; friend std::ostream& operator<<(std::ostream& os, const Token& token); Token(std::string Token_Type = "None", std::string Token_value = "None"); }; #endif
#pragma once #include <QStyledItemDelegate> namespace envire { namespace viz { /**A double spin box item delegate with high precision */ class DoubleSpinboxItemDelegate : public QStyledItemDelegate { Q_OBJECT /**NOTE: This whole class only exists because the default precision of * QDoubleSpinBox is 2 and ...
#include <Arduino.h> #include<Wire.h> // SHT25 I2C address is 0x40(64)ds #define Addr 0x40 void setup() { Wire.begin(); Serial.begin(9600); } void loop() { unsigned int data[2]; Wire.beginTransmission(Addr); Wire.write(0xF5); // Send humidity measurement command, NO HOLD master Wire.endTransmis...
#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; int a[100]; int main() { int t;long long n; scanf("%d",&t); while (...
#include "PCH.hpp" #include "Tree.hpp" #include "Game.hpp" Tree::Tree(Game* game) { m_game = game; m_ID = "tree"; } void Tree::Update() { GameObject::Update(); } void Tree::Render() { GameObject::Render(); } void Tree::Clean() { GameObject::Clean(); }
//Class to define a stock object #ifndef H_STOCK #define H_STOCK #include "stdafx.h" class Stock { //**************************************************** //Overloaded Stream Operators //**************************************************** friend istream& operator>> (istream &in, Stock &astock); friend ostream& ...
/* TouchKeys: multi-touch musical keyboard control software Copyright (c) 2013 Andrew McPherson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at you...
#include "log.hpp" #include "admin_mgr_class.hpp" #include "admin.hpp" #include "route/route_mgr.hpp" #include "utils/client_process_mgr.hpp" #include "config/options_ptts.hpp" #include "proto/config_options.pb.h" #include "proto/ss_gm.pb.h" #include <condition_variable> #include <mutex> namespace nora { names...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define showmap(is, js, x) {rep(i, is){rep(j, js){cout << x[i][j] << " ";}cout << endl;}} #define show(x) {for(auto i: x){cout << i << " ";} cout...
/* Given is the code to print numbers from 1 to n in increasing order recursively. But it contains few bugs that you need to rectify such that all the test cases pass. Input Format : Integer n Output Format : Numbers from 1 to n (separated by space) Constraints : 1 <= n <= 10000 Sample Input 1 : 6 S...
#include "Screen.h" #include "Exception.h" Screen::Screen(glm::vec2 _size) { if (SDL_Init(SDL_INIT_VIDEO) < 0) { throw std::exception(); } size = _size; window = SDL_CreateWindow("GEP Engine", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, size.x, size.y, SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL); if ...
#include <bits/stdc++.h> using namespace std; #define MAX 10010 vector<int> graph[MAX]; bool used [MAX]; void dfs(int u){ if(used[u]) return; used[u] = true; for(int i = 0; i < graph[u].size();++i){ int v = graph[u][i]; if(!used[v]) dfs(v); } } int main() { i...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2004 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ /** * @author Daniel Bratell */ #include "core/pch.h" #include...
// Copyright (c) 2012-2017 The Cryptonote developers // 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. #include "gtest/gtest.h" #include <thread> #include "Transfers/...
#include <iostream> #include "am_pm_clock.h" int main() { am_pm_clock initial_time; std::cout << initial_time << "\n"; if( initial_time.get_hours() = 12 ) std::cout << "1. Getter for hours is correct\n"; else std::cout << "1. Getter for hours is wrong\n" ; if( initial_t...
#include <iostream> #include <vector> #include <algorithm> #define MAX 1001 using namespace std; int n, m, k, cost = 0; int vRoot[MAX] = {0, }; class Tunnel{ public: int i, j, w; Tunnel(int i = 0, int j = 0, int w = 0) :i(i), j(j), w(w) {} bool operator < (const Tunnel &t) const { return w < t....
// Created on: 1992-11-17 // Created by: Christian CAILLET // 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 ...
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen ( Kiran ) // 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...
#include <iostream> #include <cstdio> #include <vector> using namespace std; #define root 1 class Heap { private: vector <int> data; public: Heap(); // constructor void insert(int val) { data.push_back(val); // refreshing our heap int v = data.size() - 1; while (v > 1) { if (data[v / 2] >...
// // Transaccion.h // ListasEjercicio1 // // Created by Daniel on 16/10/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #ifndef __ListasEjercicio1__Transaccion__ #define __ListasEjercicio1__Transaccion__ #include <iostream> class Transaccion{ public: Transaccion(); Transaccion(int); std::s...
#include "MsgTip.h" #define SHOWTIMER 10080 CMsgTip::~CMsgTip() { } void CMsgTip::MsgLoop() { MSG msg = { 0 }; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } } LRESULT CMsgTip::MessageHandle(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { CMsgTip *pThis = NULL; ...
#ifndef __Core__GGameFactory__ #define __Core__GGameFactory__ #include "GnSingletonManager.h" class GGameFactory : public GnMemoryObject { GnDeclareSingleton(GGameFactory); }; #endif
#include "core/pch.h" #ifdef DAPI_JIL_NETWORKRESOURCES_SUPPORT #include "modules/device_api/jil/JILNetworkResources.h" #include "modules/url/url_api.h" #include "modules/xmlutils/xmlfragment.h" #include "modules/xmlutils/xmlnames.h" #include "modules/pi/device_api/OpSubscriberInfo.h" #include "modules/device_api/jil/...
/* -*- 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/encodings/encoders/iso-...
// // GItemInfo.cpp // Core // // Created by Max Yoon on 11. 8. 12.. // Copyright 2011년 __MyCompanyName__. All rights reserved. // #include "GnGamePCH.h" #include "GItemInfo.h" GnImplementSingleton(GItemInfo) const gchar* GItemInfo::GetIconFileName(gtuint uiIndex) { uiIndex -= INDEX_ITEM; if(...
#include "stdafx.h" #include "MultipleResponseQuestion.h" #include "MultipleResponseQuestionView.h" #include "MultipleResponseQuestionState.h" using namespace qp; using namespace std; BOOST_AUTO_TEST_SUITE(MultipleResponseQuestionViewTests) BOOST_AUTO_TEST_CASE(MultipleResponseQuestionViewShowsDescriptio...
#include "../command.hpp" void iterate(const unsigned int count) { response::vacuous(); }
#include<graphics.h> #include<conio.h> #include<string.h> #include<process.h> #include<stdio.h> #include<dos.h> #include<stdlib.h> #include<fstream.h> #include<time.h> #include"H:\PROJECTS\MOUSE.CPP" clock_t start=clock(), end=clock(); int x,y,button; int qno=0; int fif=1,exp=1,e20=1; int dip=1,dipactive=0; int expq=...
class BTR90; class BTR90_DZ: BTR90 { scope = 2; displayName = "$STR_VEH_NAME_BTR90"; vehicleClass = "DayZ Epoch Vehicles"; commanderCanSee = 2+16+32; gunnerCanSee = 2+16+32; driverCanSee = 2+16+32; crew = ""; typicalCargo[] = {}; class TransportMagazines {}; class TransportWeapons {}; transportMaxMagazine...
#include "struct.hpp" #include "parse.hpp" using namespace std; using namespace Eigen; // Vertex Helper Function Vertex convert_v(string x, string y, string z) { Vertex v; // convert the strings to float to store in Vertex struct v.x = stof(x); v.y = stof(y); v.z = stof(z); return v; } //Fa...
#include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include <SFML/Audio.hpp> #include <SFML/Window.hpp> #include <math.h> #include <limits.h> #include <iostream> #include <string> #include <exception> #include <stdexcept> #include <vector> #include "RingBuffer.hpp" #include "GuitarString.hpp" #define CONCERT_A...
#include "Blending.h" Blender::Blender(CImg<float> src1, CImg<float> src2){ this->srcImg1 = src1; this->srcImg2 = src2; } CImg<float> Blender::blendImages(){ // Construct center og overlapping points double sum_x = 0; double sum_y = 0; int n = 0; double sum_x_overlap = 0; double sum_y_overlap = 0; int overl...
#pragma once #include "utils/assert.hpp" #include "utils/instance_counter.hpp" #include "proto/data_item.pb.h" namespace pd = proto::data; namespace nora { namespace scene { class item : private instance_countee { public: item(); ...
#pragma once #include "../scene/Patch.h" #include "../math/Complex.h" class Utils { public: static void saveHeightmap(const std::vector<Patch::Vertex>& vertices, int N, const std::string& path); static void saveComplexMatrix(const std::vector<std::vector<Complex>>& data, const std::string& path, double Are, d...