text
stringlengths
8
6.88M
#include <vector> #include "kontynent.hpp" class Kraj {}; class Planeta { private: const std::vector<Kontynent> kontynenty; std::vector<Kraj> kraje; static int ile; public: Planeta(std::vector<Kontynent> kontynenty); ~Planeta(); static int get_ile(); };
// Created on: 1996-11-25 // Created by: Christophe LEYNADIER // Copyright (c) 1996-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of t...
#include <iostream> #include <math.h> bool prime(int num) { for( int i = 2; i <= sqrt(num); i++) { if( num % i == 0) { return false; } } return true; } int main() { int num; std::cout << "Input a number: "; std::cin >> num; std::cout << "Prime divisors : " << std::endl; ...
#ifndef PORT_H #define PORT_H //#include <QObject> class IPort //: public QObject { // Q_OBJECT public: virtual ~IPort(); virtual int openPort()=0; virtual int closePort()=0; virtual int readData(char* rxBuffer, int bytes)=0; virtual int writeData(char* txBuffer, int bytes)=0; // virtual v...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "10106" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) int main(int argc, char const *argv[]) { #ifdef DBG freopen("uva" PROBLEM TESTC ".in", "r", stdin); freopen("uva" PROBLEM ".out", "w", stdout); #endif string one,...
#include "MinMaxHierarchy.h" #include "gtest/gtest.h" #include <iostream> using namespace std; // contains depths32x32 #include "TestImages.h" class MinMaxTest : public ::testing::Test { protected: MinMaxTest() : img(8, 8, 1), img32(32, 32, 1) { img.setAll(vector<float>{ 0.0, 0.5, 0.2, 0.7, 0.1, 0.2, 0.3...
#include<stdio.h> int countSort(int a[], int n) { int maxLen = n + 1; int b[maxLen]; int index = 0; for (int i = 0; i < n; i ++) { if (!b[a[i]]) { b[a[i]] = 0; } b[a[i]] ++; } for (int j = 0; j < maxLen; j ++) { while (b[j] > 0) { a[index ++] = j; b[j] --; } } return *a; } int main() { int...
#include <iostream> #include <iomanip> int main() { double TotalCost; double CashReceived; double Change; int Cents; int ChangeBills; int NumTwenties; int ChangeAfterTwenties; //Amount of change remaining after twenties int NumTens; int ChangeAfterTens; int NumFives; int ChangeAfterFives; int NumOnes; int...
#ifndef __USERBOT_H__ #define __USERBOT_H__ #include "Building.h" #include "Move.h" class UserBot { public: void MakeMoves(Building BuildingPlan,Move moves[],int size); }; #endif // __USERBOT_H__
/**************************************************************************** * Copyright (c) 2006 GeoMind Srl. www.geomind.it * All rights reserved. * *--------------------------------------------------------------------------- * This software is part of the GMCommonUtility PROJECT by GeoMind Srl; * it is not a...
#pragma once #include <stdexcept> #include "SDL.h" #include "cow_resource.hpp" #include "Renderer.hpp" namespace SDL { // C++ wrapper around SDL_Window* using RAII ref counting. struct Window { Window() {} explicit Window(SDL_Window* w) : res(w) {} Window(Window&& w) : res(std::move(w.res)) {} ...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- // // Copyright (C) 1995-2007 Opera Software ASA. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. // // Patricia Aas // #ifndef __DOWNLOAD...
//#define F_CPU 1000000UL #define CS PB4 #define CLK PB2 #define MOSI PB0 typedef uint8_t u8; typedef uint32_t u32; void out(u8 pin, u8 init) { pinMode(pin, OUTPUT); digitalWrite(pin, init); } void setup_spi() { out(CS, HIGH); out(CLK, LOW); out(MOSI, LOW); } void pause(int n = 10) { delayMicroseconds...
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> #include <ss...
#include "GnGamePCH.h" #include "GStateUILayer.h" #include "GStateUnitUpgrade.h"
#include "BubbleSort.h" void BubbleSort::sort(Container * c){ for(int i = 0; i < c->size() - 1; ++i){ for(int j = 0; j < c->size() - i - 1; ++j){ if(c->at(j)->evaluate() > c->at(j+1)->evaluate()) { c->swap(j,j+1); } } } }
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <folly/Expected.h> #include <folly/Optional.h> #include <folly/String.h> #include <folly/io/Cursor.h> #inc...
#include<iostream> #include<unistd.h> using namespace std; int countOut(int count) { sleep(1); cout << ". Execution" << endl; if (count > 1) { countOut(-- count); } cout << "Release" << endl; } int main() { countOut(4); return 0; }
#pragma once #include "../system.hpp" #include "CollisionResults/collisionresult.h" #include <memory> #include <map> namespace sbg { struct ResultData; struct CollisionTester; struct CollisionHandler; struct CollisionEntity; struct Group; struct CollisionBody { CollisionBody() = default; CollisionBody(const Col...
#pragma once #ifndef __SOCKETHELPER_H__ #define __SOCKETHELPER_H__ class CTcpSocketHandler { public: CTcpSocketHandler(); ~CTcpSocketHandler(); public: #if 0 static CTcpSocketHandler& GetInstance() { static CTcpSocketHandler instance; return instance; } #endif int Init(const char *cSer...
= イベントのコンセプト 技術書界隈を盛り上げる会 connpassページより抜粋した、イベントの説明がこちらです。 == イベントの説明 技術書典や技書博など、技術書を書く・発行することを応援するイベントです。 YoutubeLive + Twitterを通して、技術書典や技書博で頒布されている書籍の紹介や、著者とお話をしたりなど、技術書の魅力を伝える様々な活動を行っていきます。 このイベントは以下のような方にお勧めです。 * 技術書が好きな人 * 技術書を書いてみたい人 * 技術書を書いている人(著者の人) * 技術書界隈って何?知りたい!という人 収録はZoomで行いますが、YoutubeLiveへは10秒~30秒...
/* * Copyright 2019 LogMeIn * * 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 agreed to in w...
/* * levelset.cpp * deflektor-ds * * Created by Hugh Cole-Baker on 4/1/09. * */ #include <nds.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <fat.h> #include <sys/dir.h> #include <string.h> #include <errno.h> #include "levelset.h" #include "level.h" #include "settings.h" #include "sprit...
#include<map> #include<iostream> #define MAX 20 using namespace std; typedef char vextype; const int inf = 0x3f3f3f3f; typedef int costtype; struct edge { int begin, end; costtype cost; edge(int begin, int end, int cost) :begin(begin), end(end), cost(cost) { } }; int n, m, p[MAX][MAX]; costtype di...
#pragma once #include "utils/ptts.hpp" #include "proto/config_drop.pb.h" using namespace std; namespace nora { namespace config { using drop_ptts = ptts<proto::config::drop>; drop_ptts& drop_ptts_instance(); void drop_ptts_set_funcs(); } }
const int button = 5; int buttonState = 0; int lastButtonState = 0; void setup() { pinMode(button, INPUT); Serial.begin(9600); } void loop() { buttonState = digitalRead(button); if (buttonState == HIGH) { Serial.println("1"); delay(100); } else if(buttonState == LOW) ...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int utopian(int n){ return ~(~1<<(n>>1)) << n%2; } int main() { int t, s; cin >>t; while(t--){ cin >> s; cout << utopian(s)<<endl; } }
#include<bits/stdc++.h> using namespace std; using ll=long long; int n; vector<pair<int,int> > v; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>n; int _,__; for(int i=0;i<n;i++){ cin>>_>>__; v.emplace_back(_,__); } sort(v.begin(),v.end()); i...
#ifndef WALLS_H #define WALLS_H #include<QObject> class Walls :public QObject { Q_OBJECT public: Walls(); public slots: virtual void move()=0; }; #endif // WALLS_H
#ifndef __PCF8574_H__ #define __PCF8574_H__ // // // template <typename ChannelInBufferType, typename ChannelOutBufferType, uint8_t address> class PCF8574 { public: PCF8574(ChannelInBufferType& _inChannel, ChannelOutBufferType& _outChannel) : inChannel(_inChannel), outChannel(_outChannel) ...
/******************************************** * Titre: Travail pratique #5 - GestionnaireUsagers.h * Date: 9 mars 2018 * Auteur: Ryan Hardie *******************************************/ #pragma once #include "ProduitAuxEncheres.h" #include "Client.h" #include "Foncteur.h" #include "GestionnaireGenerique.h" // TODO : ...
/* * dataSmoother.cpp * moviePlayerExample * * Created by William Hooke on 10/12/2011. * Copyright 2011 Wieden + Kennedy. All rights reserved. * */ #include "ofMain.h" #include "testApp.h" #include "dataSmoother.h" #include "ofxXmlSettings.h" void dataSmoother::drawGui() { ofPushMatrix(); ofTranslate(6...
#ifndef __CHATTY_LOGGER_H__ #define __CHATTY_LOGGER_H__ #include <string.h> #include <iostream> namespace chatty { #define LOGERROR \ std::cerr << "ERROR | " << __FILE__ << " | "<< __LINE__ << " | " << strerror(errno) #define LOGDEBUG std::cerr << "DEBUG | " << __FILE__ << " | "<< __LINE__ << " | " ...
#include <SPI.h> int SERcounter; int SERcounter1; int _OEcounter; int RCLKcounter; int SRCLKcounter; int _SRCLRcounter; int SER = 8; int _OE = 7; int RCLK = 6; int SRCLK = 5; int _SRCLR = 4; int testpin = A0; int RCLKprev; int SRCLKprev; int _SRCLRprev; float testvalue; void setup() { pinMode(SER, OUTPUT); pinMod...
#include<iostream> using namespace std; typedef long long int ll; const ll max1=922337203685477580; const ll min1=-922337203685477580; int main(){ ll k,max=min1,min=max1; while(cin>>k){ if(k>max) max=k; if(k<min) min=k; } cout<<min<<"\n"<<max<<"\n"<<max+min; return 0; }
#ifndef IP_ADDRESS_HPP #define IP_ADDRESS_HPP #include <iostream> #include <string> #include <vector> class IpAddress { public: unsigned m_part1; unsigned m_part2; unsigned m_part3; unsigned m_part4; unsigned m_port; IpAddress(); IpAddress(unsigned part1, unsigned part2, unsigned part3, unsigned part4, un...
/** * @file bluetooth_reciever.cpp * @author your name (you@domain.com) * @brief * @version 0.1 * @date 2021-08-16 * * @copyright Copyright (c) 2021 * */ #include "bluetooth_reciever.h" #include "BluetoothSerial.h" #include "printer.h" void BlueToothRetriever::setupRetriever(){ PRINT("Starting Bluetoo...
#include <iostream> #include <cmath> #include <cstring> #define LL long long using namespace std; const double eps = 1e-7; int main() { char s[30]; while (cin >> s && strcmp(s, "0e0") != 0) { LL A = s[0] - '0', B = 0; for (int i = 2; i < 17; i++) A = A * 10 + s[i] - '0'; ...
#include <maya/MGlobal.h> #include <maya/MPxCommand.h> #include <maya/MSyntax.h> #include <maya/MStatus.h> #include <maya/MArgList.h> #include <maya/MArgDatabase.h> #include <maya/MDagPath.h> #include <maya/MSelectionList.h> #include <maya/MFnTransform.h> #include <maya/MItSelectionList.h> #include <maya/MFn.h> #includ...
#include "person.h" Person::Person() { name_ = "undefine"; age_ = 0; } Person::Person(string name, unsigned age) { name_ = name; age_ = age; } Person::~Person() { } ostream &operator<<(ostream &os, const Person &item) { os << item.name_ << "\t" << item.age_; return os; }
#include "rdtsc_benchmark.h" #include "ut.hpp" #include <random> #include <algorithm> #include <math.h> #include <functional> #include <vector> #include "linalg.h" using namespace boost::ut; // provides `expect`, `""_test`, etc using namespace boost::ut::bdd; // provides `given`, `when`, `then` __m256d data_loade...
#include <iostream> using namespace std; int main() { int i = 1; while(i <= 12) { cout << "2 x " << i << " = " << (2*i) << endl; i++; } return 0; }
#ifndef PLAYER #define CAMERA #include "GameInfo.h" #include <math.h> #include "KeyPressed.h" #include "MouseClicked.h" class Player { private: const int width = 16 * 50; const int height = 9 * 50; float pitch = 0.0, yaw = 0.0; float camX = 0.0, camZ = 0.0, camY = 30.0; bool isShot = false; float shotPower = 0....
// // Created by griha on 01.12.17. // #pragma once #ifndef MIKRONSST_HSM_IDECRYPTER_H #define MIKRONSST_HSM_IDECRYPTER_H #include <windows.h> #include <wincrypt.h> #include <unknwn.h> #include "error.hpp" #include "crypto_context.hpp" #include "input_output.hpp" namespace griha { namespace hsm { e...
/* -*- 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" #include "modules/widgets/OpMultiEdit.h" #i...
#ifndef PRAC4_H #define PRAC4_H #include <QDialog> namespace Ui { class prac4; } class prac4 : public QDialog { Q_OBJECT public: explicit prac4(QWidget *parent = 0); ~prac4(); private slots: void on_pushButton_clicked(); private: Ui::prac4 *ui; }; #endif // PRAC4_H
#include <bits/stdc++.h> using namespace std; void solve () { long long x, y; long long a, b; cin >> x >> y; cin >> a >> b; long long sumA = 0, sumB = 0; sumA = b * min(x, y) + a * abs(x - y); sumB = a * (x + y); // cout << sumA << " " << sumB << endl; cout << min(sumA, sumB) << endl; } int main() ...
// // Created by 钟奇龙 on 2019-05-03. // #include <iostream> #include <map> #include <set> using namespace std; class Node{ public: int data; Node *left; Node *right; Node(int x):data(x),left(NULL),right(NULL){} }; //普通解法 Node* getCommonAncestor(Node *root,Node *node1,Node *node2){ if(!root || root =...
#pragma once #include "DrawGraph.h" class DrawTriangle : public DrawGraph { public: DrawTriangle() { } virtual void drawGraph() override; ~DrawTriangle() { } virtual void initBuffer() override; private: // 定义顶点数据 把它作为输入发送给顶点着色器 float vertices[9] = { // 这里是三角形的3个点的坐标,因为绘制的是二维的,所以z轴是0 z轴也是所谓的深度 比如被遮挡了,就是z轴...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "SMITElabs/Public/SLGod.h" #include "SMITElabs/Public/SLAgni.h" #include "SLAgniRainFire.generated.h" class ASLGod; class ASLAgni; UCLASS() class SMITELABS_A...
//扩展欧几里得算法 long long exgcd(long long a,long long b,long long &x,long long &y) { if (b==0) { x=1,y=0; return a; } long long d=exgcd(b,a%b,x,y); long long tmp=x; x=y; y=tmp-a/b*y; return d; }#include <bits/stdc++.h> using namespace std; #define Int register int #define mod 998244353ll #define in...
#include "Type.h" #include "Value.h" #include "String.h" #include "Array.h" #include "Map.h" #include "GC.h" #include "CFunc.h" #include "Object.h" #include "VM.h" #include <unistd.h> Types::Types(VM *vm) : stringType(new StringType(this, vm->gc)), arrayType(new ArrayType(this, vm->gc)), mapType(new MapTy...
/* * Assignennt 2, COMP 5421, summer 2016 * Federico O'Reilly Regueiro 40012304 * Concordia University * * Command header file */ #ifndef LED_COMMAND #define LED_COMMAND #include <iostream> #include <string> #include <cstddef> #include <sstream> using namespace std; /** * Command class used by LED for p...
#include "Statistics.h" const unsigned int Statistics::repeat_ini; Statistics::Statistics(){ } Statistics::Statistics(Simulator *sim, float sampling) : generator((std::random_device())()) { assert(sim != NULL); assert(sampling >= 0.0); assert(sampling <= 1.0); // cout << "Statistics - Start\n"; pool = sim->g...
#include "aeMath.h" namespace aeEngineSDK { /*************************************************************************************************/ /* Constructors /*************************************************************************************************/ aeVector3::aeVector3() { } aeVector3::~aeVector3() ...
#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 maxn = 1e6 + 100; char st[maxn]; int loc[maxn]; int main() { int t...
// Fill out your copyright notice in the Description page of Project Settings. #include "GridContainer.h" #include "Unit.h" // Sets default values AGridContainer::AGridContainer() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.b...
/* Copyright (c) 2016-7 Seth Pendergrass. See LICENSE. */ #pragma once #include <magma_v2.h> #include <vector> namespace ssvd { class Ssvd { public: virtual ~Ssvd(){}; virtual int Run(const float *x, int x_n, bool stream, float *sigma, float *v, double *elapsed = nullptr) = 0; }; class Ssv...
#ifndef TRANSFORM_H #define TRANSFORM_H #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/quaternion.hpp> #include <glm/vec4.hpp> #include "object.h" class transform: public object { public: glm::vec3 position; glm::vec3 size; glm::quat rotation; transform(); ...
// -*- C++ -*- /*! * @file PSGamepad.cpp * @brief Playstation Gamepad class * $Date$ * * $Id$ */ #include "PSGamepad.h" #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } } LPDIRECTINPUT8 g_pDI = NULL; LPDIRECTINPUTDEVICE8 g_pJoystick = NULL; ...
// Talk2MeDlg.h // #pragma once #include"SetServerIpPort.h" #include"Signup.h" #include"Login.h" #include"ChatRoom.h" #include "afxcmn.h" #include"Friends.h" #include"ChatroomIn.h" #include"FileRecv.h" #include"Progress.h" #define DEBUG #undef DEBUG // CTalk2MeDlg 对话框 class CTalk2MeDlg : public CDialogEx { pu...
/* * File: main.cpp * Author: Elijah De Vera * Created on January 26, 2021, 12:36 AM * Purpose: Menu for all assignments in assignment 5 */ //System Libraries #include <iostream> //I/O Library #include <iomanip> #include <math.h> using namespace std; //Function Prototypes void minmax(int, int, int...
#ifndef M2_SERVER_DATABASE_H #define M2_SERVER_DATABASE_H #include "Data.hpp" namespace m2 { namespace server { class Database { public: Database(const std::string& rootDir); public: bool CreateUser(uuids::uuid Uid, const std::string& PublicKey); bool CreateUser(uuids...
#pragma once #ifndef HEXADECIMAL_HPP #define HEXADECIMAL_HPP #include <sstream> #include <iomanip> namespace griha { namespace tools { template<typename InputIterator, typename CharT = char> auto as_hex( InputIterator first, InputIterator last, std::basic_string<CharT> delim = "" ) -> std::basic_string<Ch...
#include <Application.hpp> #include <Util.hpp> int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prevInstance, WCHAR* cmdLine, int cmdShow) { CoInitialize(NULL); try { Application app(instance); app.run(); } catch (Exception& ex) { MessageBox(NULL, ex.messag...
/* Assuming the ocean's level is currently rising at about 1.5 millimeters per year, write a program that displays the number of mm higher than the current level that the ocean's level will be in 5, 7, and 10 years. Author: Aaron Maynard */ #include <iostream> using namespace std; int main() { //Declare variable...
#include "gtest/gtest.h" #include "../../../../options/Option.hpp" #include "../../../../options/OptionPut.hpp" #include "../../../../binomial_method/case/Case.hpp" #include "../../../../binomial_method/case/Wilmott2Case.hpp" #include "../../../../binomial_method/method/regular/euro/EuroBinomialMethod.hpp" double reg...
#include <bits/stdc++.h> using namespace std; #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) #define MAXN 10000 #define INF 0x3f3f3f3f #define DEVIATION 0.00000005 typedef long long LL; bool slove[MAXN+10][5]; vector <int> ans[5]; int main(int argc, char const *argv[]) { int kase; scanf("%d",&kase...
#include "stdafx.h" #include "View.h" #include "Interface.h" namespace RLGM { View::View() { } View::View(HWND HWnd, RLGM::Interface* Owner, double heightAboveSea, double longitude, double latitude) { hWnd = HWnd; owner = Owner; RECT rc; GetClientRect(hWnd, &rc); width = rc.right - rc.left; heig...
#ifndef __QUEUE_H_ #define __QUEUE_H_ // define to use printing, uncommennt to debug //#define DEBUG // Queue node daat type typedef unsigned int xQueueData; // definition of queue struct queueNode { xQueueData data; queueNode *tail; }; // another names for queue and queue pointers typedef que...
#include "..\..\01-Shared\Elysium.Graphics\GameWindow.hpp" Elysium::Graphics::Platform::GameWindow::GameWindow() : Elysium::Core::Object(), Elysium::Graphics::Platform::IGameCanvas() { // prepare the window information const char* const Myclass = "GameWindow"; WNDCLASSEX WindowInformation = { sizeof...
#include <iostream> #include <vector> #include <list> #include <algorithm> #include <deque> #include <set> #include <sequtils.h> using namespace std; int main(int argc, char *argv[]) { set<int, greater<int> > col1; deque<int> col2; set<int> st; vector<int> v; populate_lseq(col1, 9); print_seq(col1); ...
#pragma once #pragma once //------------------------------------------------------------------------- #ifndef H_unit //if not define #define H_unit //------------------------------------------------------------------------- #include <iostream> #include <string> using namespace std; //----------------------------------...
#include <iostream> #include <Windows.h> #include "Board.h" using namespace std; #define COL GetStdHandle(STD_OUTPUT_HANDLE) #define ORIGINAL SetConsoleTextAttribute(COL,0x0007); Board::Board() { int i, j; for (i = 0; i < 10; i++) for (j = 0; j < 20; j++) board_[i][j] = EMPTY; } int Board::GetState(cursur_po...
/* Based on UserCode/Futyan/macros/WenuTemplateFit.cc See WCharge/scripts/genTemplates.py for an example of how to run the code. */ #include "AsymTemplateHistos.hh" #include "KinSuite.hh" #include <fstream> using namespace std; //using namespace Event; AsymTemplateHistos::AsymTemplateHistos(const std::string & folde...
#include <iostream> #include <cmath> #include <ctime> #include <vector> #include <array> #include <algorithm> #include <set> #include <string> #include <sstream> #include <map> #include <future> #include <thread> using namespace std; map<string, set<int>> keyResults; vector<int> list; vector<string> listString; int so...
#ifndef FIGHTER_H #define FIGHTER_H #include "Entity.h" #include <SFML\Graphics.hpp> class Fighter: public Entity { public: Fighter(); ~Fighter(); void dir(int hitwall); virtual int checkColl(int x, int y); int Destroy(int x, int y); bool dead = false; void randomnspawnerEnemies(); // Randomspawner for enemies ...
#include<iostream> using std::cin; using std::cout; using std::endl; float GetPosAmount() { float temp; cout<<"Enter a positive value:"; cin>>temp; while(temp<0.0) { cout<<"**Negative value,enter a positive value:"<<endl; cin>>temp; } return (temp); } main() { GetPosAmount(); }
//: C15:Instrument4.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt // Mozliwosc rozszerzania programow w programowaniu obiektowym #include <iostream> using namespace std; enum note { middle...
// // main.cpp // ListasEjercicio1 // // Created by Daniel on 16/10/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #include <iostream> #include "Cola.h" #include "Pila.h" #include <string> #define N 4 int main(int argc, const char * argv[]) { srand((int)time(NULL)); int temp; Cola<int...
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int MAXN = 100000; int arv[MAXN + 3]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; for(int i = 0; i < n; i++) cin >> arv[i]; sort(arv, arv + n); int jud[MAXN + 3], len ...
#include <iostream> #include <vector> #include <algorithm> #include <fstream> #include <queue> #include <unordered_set> #include <unordered_map> #include <stack> #include <cstdio> #define INT_MIN (1<<31) #define INT_MAX (~INT_MIN) #define UNREACHABLE (INT_MAX>>2) #define INF (1e300) using namespace std; ifstream fin("...
#ifndef MODELFITTING_H #define MODELFITTING_H #include <QWidget> #include "facialmesh.h" namespace Ui { class ModelFitting; } class ModelFitting : public QWidget { Q_OBJECT public: explicit ModelFitting(QWidget *parent = nullptr); ~ModelFitting(); void init(void); void conectar(void); void d...
#include "TextArea.h" #include "../__trash.h" #include "../src/IMAGELoad.h" TextArea::TextArea(Pos p, Font* f) : _f{f} { w = 800; h = 600; g = 6; fg = g*2.0/(GLfloat)w; _pos.x = p.x + fg; _pos.y = p.y - fg; _pos.h = p.h - 2*fg - f->fFH; _pos.w = p.w - 2*fg; bottom = _pos.y - _pos...
/* -*- Mode: c++; tab-width: 4; 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. * * Arjan van Leeuwen (arjanl) */ #include "core/pch.h" #ifdef M2_SUPPORT #include "a...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #include<ctime> using namespace std; int a[10][10]; int main() { srand(time(NULL)); int n = r...
#include <iostream> #include <math.h> using namespace std; int countDigits(int n) { int count_digits = 0; int x = n; while (x) { x = x/10; count_digits++; } return count_digits; } int checkDisarium(int n) { int count_digits = countDigits(n); int sum = 0; ...
#include "TTH/MEAnalysis/interface/EventShapeVariables.h" namespace { namespace { std::vector<TLorentzVector> _TTHMEAnalysis_i1; } }
#ifndef CABAL_WARNING_H #define CABAL_WARNING_H #include <string> class Warning { private: std::string warning; public: explicit Warning(std::string warning) : warning(std::move(warning)) {}; const std::string getWarning() const { return this->warning; }; }; #endif //CABAL_WARNING_H
/**************************************************************************** ** ** Copyright (C) 2010 Instituto Nokia de Tecnologia (INdT) ** ** This file is part of the Rask Browser project. ** ** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free So...
#include <iostream> #include <vector> #include <queue> #include <utility> using namespace std; class Solution { public: vector<vector<int>> getSkyline(vector<vector<int>>& buildings) { if(buildings.empty()){ return buildings; } size_t size = buildings.size(); int cur = 0...
#define CATCH_CONFIG_MAIN #include "../catch/catch.hpp" #include <vector> #include <tuple> template <typename T> struct Maybe { Maybe(bool hasValue, T v) : has_value{ hasValue }, value{ v } { } operator bool() const { return has_value; } T& operator *() const { return &value; } private: boo...
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QDir> #include <QJsonArray> #include <QJsonObject> #include <QFileDialog> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); m_sender = new QUdpSocket(this); } MainWindow::~MainWindow(...
#include <algorithm> #include <csignal> #include <functional> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cm/memory> #include "cm_uv.h" #include "cmGetPipes.h" #include "cmUVHandlePtr.h" #include "cmUVProcessChain.h" #include "cmUVStreambuf.h" struct ExpectedStatus { bool ...
#include <iostream> #include <fstream> #include "VirtualMachine.h" /*constructor*/ VirtualMachine::VirtualMachine(string cfg_fp,string * pfiles,int pcount,int iterations){ //initialize performance array performance = new double[pcount]; for(int i =0;i<pcount;i++){ //loop through all the iterations c...
// // Pantalla.cpp // Tarea4Ejercicio4 // // Created by Daniel on 18/10/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #include "Pantalla.h" bool Pantalla::curses_ON = false; void Pantalla::print(ListaDoblementeEnlazada<ListaDoblementeEnlazada<char> *> *texto){ std::cout<<"------------- Editor de...
#ifndef STARTDIALOG_H #define STARTDIALOG_H #include "gamewindow.hh" #include <QDialog> namespace Ui { class startDialog; } class startDialog : public QDialog { Q_OBJECT public: explicit startDialog(QWidget *parent = 0); ~startDialog(); int numberOfPawns; public slots: // void startGameWindow(...
/**************************************************************************** ** ** Copyright (C) 2010 Instituto Nokia de Tecnologia (INdT) ** ** This file is part of the Rask Browser project. ** ** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free So...
#ifndef _MSG_0X17_SPAWNOBJECT_STC_H_ #define _MSG_0X17_SPAWNOBJECT_STC_H_ #include "mcprotocol_base.h" #include "objectdata.h" namespace MC { namespace Protocol { namespace Msg { class SpawnObject : public BaseMessage { public: SpawnObject(); SpawnObject(int32_t _entityId, int8_t _type, int32_t _x, int32_t _y, int...
/* * * * * * search.cxx * Search function ** MiniMax + Alpha Beta Pruning * White selects highest scoring moves * Black selects lowest scoring moves * Alpha is the minimum score accepted by white parent nodes * Beta is the maximum score accepted by black parent nodes * When Beta is less than Alpha no new nodes ...