text
stringlengths
8
6.88M
#pragma once #include "SFML/Graphics.hpp" #include <functional> class Button { public: Button(std::function<void()> foo); ~Button(); void SetOnClick(std::function<void()> foo); void OnClick(); sf::Sprite icon; private: std::function<void()> function; };
/* * SharedPtr.h * * Created on: 2021. 9. 14. * Author: dhjeong */ #ifndef RAIIANDMEM_SHAREDPTR_H_ #define RAIIANDMEM_SHAREDPTR_H_ #include <iostream> #include <boost/shared_ptr.hpp> #include "struct.h" class SharedPtr { public: SharedPtr(); virtual ~SharedPtr(); void run(); void inside(boost::shared...
//Phoenix_RK /* https://leetcode.com/problems/rotting-oranges/ You are given an m x n grid where each cell can have one of three values: 0 representing an empty cell, 1 representing a fresh orange, or 2 representing a rotten orange. Every minute, any fresh orange that is 4-directionally adjacent to a rotten orang...
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved #pragma once #include "CoreMinimal.h" #include "Kismet/BlueprintFunctionLibrary.h" #include "GenericTeamAgentInterface.h" #include "GDKShooterFunctionLibrary.generated.h" /** * */ UCLASS() class GDKSHOOTER_API UGDKShooterFunctionLibrary : public UBluepri...
#ifndef __state__machine__ #define __state__machine__ #include <iostream> #include <string> #include <vector> #include <map> #include <ctime> namespace smach { std::string getCurrentDateString(); enum Transition { Failure, Success, Continue, Complete }; const std::string INVALID_TRANSITION("INVALID/NOTSET");...
// // Llamada.h // ExamenFinal_Pregunta2 // // Created by Daniel on 01/12/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #ifndef __ExamenFinal_Pregunta2__Llamada__ #define __ExamenFinal_Pregunta2__Llamada__ #include <iostream> class Operador; using namespace std; class Llamada{ private: public:...
#ifndef NETWORK_H #define NETWORK_H #include <iostream> #include <stdio.h> #include<string> #include"Gsearch.h" #include"mylynx.h" using namespace std; class network { private: string uinput; string output; public: int getwebpage(string); vector<string> links; void setuinput(string); void operatio...
#include <systemc.h> #include "counter.h" void CounterMod8::counter() { if (!reset.read()) { count = 0; } else if(enable.read()) { if (load.read()) { count = in; } else { count++; } } out.write(count); }
// Created on: 2015-10-29 // Created by: Irina KRYLOVA // Copyright (c) 2015 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 publ...
/** ****************************************************************************** * @file System_config.cpp * @brief Deploy resources,tasks and services in this file. ****************************************************************************** * @note * - Before running your Task you should first inc...
#include "StdAfx.h" #include <stdlib.h> //get rand from here #include "RandomWalker.h" #include <algorithm> using namespace std; RandomWalker::RandomWalker(void) { counter = 10; face = 'R'; skin = 4; } RandomWalker::~RandomWalker(void) { } void RandomWalker::step() { if(--counter < 1) { counter = 10; //mo...
// naive O(n^3) implementation of matric multiplication #include <iostream> using namespace std; int a[30][30], b[30][30]; int r1, c1, r2, c2; int c(int i , int j){ int ans = 0; for(int k = 0; k < c1; k++){ ans += a[i][k] * b[k][j]; } return ans; } int main(){ int tc = 1; while(cin ...
#pragma once class PdbModuleDetails : public IPdbModuleDetails { public: PdbModuleDetails( PdbModule* ); virtual ~PdbModuleDetails(); // Set Properties void SetCompilerName( const wstring& s );; void SetGetBackEndBuildNumber( const wstring& s ); void SetManagedCode( bool b ); // Retrieve Properties. const st...
#include <bits/stdc++.h> using namespace std; const int maxn = 100010; int n, m; long long M, ans, a[maxn]; int main() { scanf("%d%d%lld", &n, &m, &M); for (int i = 1; i <= n; i++) scanf("%d", &a[i]); int x, y, k; for (int i = 1; i <= m; i++) { scanf("%d", &x); if (x == 1) { scanf("%d%d%d", &x, &y, &k); ...
// // GameController.cpp // Puissance 4 // // Created by Glorian on 16/04/2016. // Copyright (c) 2016 Glorian . All rights reserved. // #include "GameController.h" using namespace std; GameController::GameController(Player j1, Player j2, int taille, int puissance){ Tableau table(taille, puissance); Game...
#include<stdio.h> #include<conio.h> #include<string> #include<stdlib.h> /*t main() { char n[6]="naren"; char *k = "kumar"; printf("%s",strcat(n,k)); getch(); } */ int main() { char *a[] = {"n" , "ku" , "s"}; printf("%d",sizeof(a)); getch(); }
#ifndef CMESSAGEMEDIATOR_H #define CMESSAGEMEDIATOR_H #include <QObject> class CMessageEventMediator : public QObject { Q_OBJECT public: CMessageEventMediator(QObject *parent = 0); ~CMessageEventMediator(); Q_SIGNALS: void sigLoginIn(); }; #endif // CMESSAGEMEDIATOR_H
/*****************************************************************************/ /* Class : Worker Version 1.0 */ /*****************************************************************************/ /* */ ...
#include<bits/stdc++.h> using namespace std; main() { char line[150], line2[150]; int i,j,k,l,m,n, len; while(gets(line)) { if(!(strcmp(line, "DONE"))) break; else { for(i=0; line[i]!='\0'; i++) { while (!((line[i]>='a' && line[i]<='z') || ...
#include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; }; bool isSubTree(TreeNode* t1, TreeNode* t2) { if(!t1) return !t2; if(t1->val != t2->val) return false; bool leftSubTree = isSubTree(t1->left, t2->left); ...
#ifndef BULLET_H #define BULLET_H #include <SFML\Graphics.hpp> #include "Entity.h" class Bullet: public Entity { public: Bullet(sf::Texture& text, int type, bool enemybullet); virtual ~Bullet(); void fire(int x, int y); //Fire centre bullet void fire1(int x, int y); //Fire left bullet void fire2(int x, int y); //...
#include <iostream> using namespace std; // bool sorted(int arr[], int n) // { // if (n == 1) // { // return true; // } // bool restArray = sorted(arr + 1, n - 1); // return (arr[0] < arr[1] && restArray); // } // void dec(int n) // { // if (n == 0) // { // return; // ...
 //Turns the DEFINE_GUID for EventTraceGuid into a const. #define INITGUID #pragma warning(disable:4996) #include <windows.h> #include <stdio.h> #include <wbemidl.h> #include <wmistr.h> #include <evntrace.h> #include <tdh.h> #include <in6addr.h> #include <stdlib.h> #include <iostream> #include <sstrea...
// // SDL_windows.cpp for training in /home/franco_n/tek_one/test/cpp/git/pokemon_poubelle/classes // // Made by François Clément // Login <franco_n@epitech.net> // // Started on Tue Sep 15 18:53:18 2015 François Clément // Last update Tue Sep 15 19:22:04 2015 François Clément // #include "SDL_windows.hh" bool ...
//---------彩票主程序---------- #include"caipiao.h" const int M=0,N=400; //---------------------------------------------- int main() { int a[2][33+16]={0}; //a[0][i]代表红球和蓝球 int b[N][7]={0}; //a[1][0]-----a[32]代表红球出现的次数, shuchuhlq(a); //a[1][33]-----a[48]代表篮球出现的次数 wenjiansr(b); ...
#ifndef __INCLUDE_UDP_SOCK_H__ #define __INCLUDE_UDP_SOCK_H__ #include "Def.h" #include "Sock.h" //UDP套接字类 class CUdpSock : public CSock { public: CUdpSock(); ~CUdpSock(); public: //打开打开套接字 int Open( const char* ip, int port ); //设置远端地址 //参数:remote:远端网络地址 //返回值:0成功,-1失败 int SetRemote( const char* ip, int port...
/* ** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp $ ** Auxiliary functions from Debug Interface module ** See Copyright Notice in lua.h */ #ifndef ldebug_h #define ldebug_h #include "lstate.h" namespace youmecommon { #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) #define getfuncline(f,pc) (((f)->l...
#ifndef GNRECT_H #define GNRECT_H template<typename T> class GNMAIN_ENTRY GnRect : public GnMemoryObject { public: T left; T top; T right; T bottom; public: GnRect() : left(0), top(0), right(0), bottom(0) {} GnRect(T l, T t, T r, T b) : left(l), top(t), right(r), bottom(b) {} void MoveX(T v...
#include "utils.hpp" #include "loading_ptts.hpp" namespace pc = proto::config; namespace nora { namespace config { loading_ptts& loading_ptts_instance() { static loading_ptts inst; return inst; } void loading_ptt...
// // uiWindow.cpp // TuboWariProjection // // Created by Shuya Okumura on 2013/01/26. // // #include "uiWindow.h" ////////////////// //////GLOBAL////// bool bTail = false; bool trTail = false; vector <ofPoint> messagePoint; ofFloatColor mainPink = ofFloatColor(1.0f, 0.44f, 0.82f, 1.0f); int currentScene = 0; //ma...
#include "StdAfx.h" #include "global.h" float rand_num(int num) { return rand()%num; } float get_angle(float x1,float y1,float x2,float y2) { return atan2((y2-y1),(x2-x1))*180/3.14; } float get_distance(float x1,float y1,float x2,float y2) { return sqrt(pow(x2-x1,2)+pow(y2-y1,2)); }
#include <iostream> #include <stdlib.h> using namespace std; int main(const int argc, const char* const argv[]){ //int NUM_BINS = 9; //define the number of bins int bin[9] = {}; //float voltage; int valid = 0; for (int i = 1; i < argc-1; i++){ float voltage = atof(argv[i]); if((vol...
#include "../interface/corrector.hh" #include <iostream> #include <sstream> #include <TFile.h> corrector::corrector(const std::string iFile,int iNFrac) { TFile *lFile = new TFile(iFile.c_str()); fNEta = 61; fNPhi = 72; fNFrac = iNFrac; fGraph = new TGraph***[fNEta]; lFile->Print(); for(int i0 = 0; i0 <...
/******************************************************************************** ** Form generated from reading UI file 'mainwindow.ui' ** ** Created by: Qt User Interface Compiler version 5.8.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ****************************************...
// Created on: 1993-06-23 // Created by: Jean Yves LEBEY // 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 // the terms of the GN...
#include <iostream> #include <algorithm> #include <vector> using namespace std; struct frete{ float preco; float distancia; int idx_preco; int idx_dist; }; struct fretista{ float preco; int idx; }; struct distancia{ float distancia; int idx; }; bool comparaPreco (fretista &a, fretis...
// Copyright Lionel Miele-Herndon 2020 #include "A_Gun.h" #include "Components/SkeletalMeshComponent.h" #include "Kismet/GameplayStatics.h" #include "DrawDebugHelpers.h" // Sets default values AA_Gun::AA_Gun() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don'...
// // Game.cpp // MirrorChess // // Created by Sergio Colado on 22.04.20. // Copyright © 2020 Sergio Colado. All rights reserved. // #include "Game.hpp" #include <iostream> #include "utils.hpp" using namespace sf; Game::Game(): board("chess-board") { } void Game::init() { render(); } void Game::handle...
#ifndef NEUMANN_HH #define NEUMANN_HH #include <cstdint> #include <memory> #include "trng.hh" class TRNG_VonNeumannDebias : public TRNG { public: TRNG_VonNeumannDebias(std::shared_ptr<TRNG> baseTRNG) { mBaseTRNG = baseTRNG; } void start() override { mBaseTRNG->start(); } void stop() override { mBaseTRNG->sto...
#include <iostream> #include <vector> #include <stdlib.h> #include <algorithm> #define min(x, y) (x > y ? y : x) #define LIMITED 1000000007 using namespace std; /* W = 1 pat = 1 (0) W = 2 pat = 2 (1) W = 3 pat = 3 (1) W = 4 pat = 5 (2,1) W = 5 pat = 8 (3,2) W = 6 pat = 13 (5,3,4) W = 7 pat = 21 (8,5,6) W = 8...
#if CONFIG_FREERTOS_UNICORE #define ARDUINO_RUNNING_CORE 0 #else #define ARDUINO_RUNNING_CORE 1 #endif #define mqttServer "192.168.137.69" //#define mqttServer "broker.hivemq.com " #define WiFiSSID "thao" #define WiFiPass "thao12345" #define PubTopic "ESP32" #include <WiFi.h> #include <PubSubClient.h> #include <SPI.h...
#ifndef REDDIALOG_H #define REDDIALOG_H #include <QDialog> class RedDialog : public QDialog { Q_OBJECT public: explicit RedDialog(QWidget *parent = nullptr); protected: void paintEvent(QPaintEvent *event) override; }; #endif // REDDIALOG_H
#include <iostream> #include <string> #include <ctime> using namespace std; int solve(int); int solve(int, int, int, int, int, int); int main() { clock_t start = clock(); int result = solve(100); clock_t end = clock(); cout << result << ' ' << (static_cast<double>(end) - start) / CLOCKS_PER_SEC << endl; system(...
class Solution { public: bool escapeGhosts(vector<vector<int>>& ghosts, vector<int>& target) { int N = ghosts.size(); int ourDistance = abs(target[0]) + abs(target[1]); for(vector<int> &ghost : ghosts){ int ghostDistance = abs(ghost[0] -target[0]) + abs(ghost[1] - target[1]); ...
#pragma once #include "../../../Toolbox/Toolbox.h" #include "../../Drawable/Drawable.h" #include <functional> namespace ae { /// \ingroup graphics /// <summary> /// 2D quad that covers the entire screen. Setup to be used directly in normalized device coordinates. /// </summary> class AERO_CORE_E...
#include <reactor/net/EPollPoller.h> #include <assert.h> #include <errno.h> #include <string.h> #include <sys/epoll.h> #include <unistd.h> #include <reactor/base/SimpleLogger.h> #include <reactor/net/Channel.h> using namespace reactor::base; namespace reactor { namespace net { EPollPoller::EPollPoller(int size): P...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "Item.h" #include "Runtime/Engine/Classes/Components/DestructibleComponent.h" #include "DestructibleJunk.generated.h" /** * */ UCLASS() class HYPOXIA_API ADestructibleJunk : public AItem { GENERATED_BODY() prot...
#include<iostream> using namespace std; int main() { // Беззнаковые типы данных cout << "Знаковые типы данны" << endl; short varShort = -32; // Тип short - для очень небольших целых чисел int varInteger = 2147; // Тип int - для небольших целых чисел long varLong = 9'223; // Тип long - для больших ц...
#include "GApp.h" void GApp::onCleanup(void) { SDL_Quit(); }
#include "Contact.hpp" std::string Contact::_fields_name[11] = { "First Name", "Last Name", "Nickname", "Login", "Address", "E-mail", "Phone", "Birthday", "Favorite Meal", "Underwear Color", "Darkest Secret" }; Contact::Contact() { } Contact::~Contact() { } bool Contact::create_contact(void) { int len =...
#pragma once #include <memory> #include <string> #include <vector> #include <wrl/client.h> struct IWICImagingFactory; namespace imageutil { class Image { std::vector<unsigned char> m_buffer; int m_width; int m_height; int m_pixelBytes; public: Image(int w, int h, int pixelBytes); int Width()c...
// RekeningTabungan.h #ifndef REKENINGTABUNGAN_H #define REKENINGTABUNGAN_H #include "Rekening.h" class RekeningTabungan : public Rekening { public: // Konstruktor menginisialisi saldo (parameter 1) dan biaya transaksi (parameter 2) // Set biaya transaksi 0.0 apabila biaya transaksi bernilai negatif RekeningTabung...
#pragma once #include <tuple> #include <vector> #include <string> #include <windows.h> #include "result.h" Result<DWORD> send_bytes(HANDLE handle, std::string writeBuffer, int len); Result<std::tuple<DWORD, DWORD>> recv_bytes(HANDLE handle, char * readBuffer, int size); Result<std::tuple<DWORD, std::vector<char>>> ...
#include "CLArguments.h" #include <iostream> namespace cppag { std::vector <std::string> CLArguments::mArguments; CLArguments::CLArguments(int argc, char** argv) { for(int i = 0; i < argc; ++i) { if(i==0) { std::string temp=argv[0]; //Windows or Unix style? if(temp.f...
/* ** FILENAME CSerialPort.h ** ** PURPOSE This class can read, write and watch one serial port. ** It sends messages to its owner when something happends on the port ** The class creates a thread for reading and writing so the main ** program is not blocked. ** ** CREATION DATE 15-09-1997 ...
#include "Parser.h" #include <iostream> #include <string> #include <fstream> Parser::Parser(std::string fileInput) { file = fileInput; inputFile.open(file); } bool Parser::hasMoreCommands() { return !(inputFile.eof()); } void Parser::advance() { if (hasMoreCommands()) { std::getline(inpu...
#include "sfmlDrawManager.h" #include "resourceManager.h" #include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Graphics/Text.hpp> #include <SFML/System/Vector2.hpp> #include <memory> SFMLDrawManager::SFMLDrawManager(sf::RenderWindow *window, SFM...
#pragma once enum enMouseEve { enLeftClick, enMiddleClick, enRightClick, enNotchUp, enNotchDown, enNumMouseEve }; namespace Mouse { int GetMouseNotch(); void UpdateMouseInput(); bool isTrigger(enMouseEve); bool isPress(enMouseEve); CVector3 GetCursorPos(); }
#pragma once #include <ctime> #include <chrono> #include <string> namespace meplay { class MPTimeTester final { public: MPTimeTester(const std::string& name,uint64_t nMinDelay = 0); ~MPTimeTester(); public: void Show(uint64_t nMinDelay = 0)const; private: std::chrono::time_point<std::chrono::steady_clock>...
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; int n; int a[N]; int32_t main() { int t; cin >> t; while (t--) { cin >> n; vector<int> even, odd; for (int i = 1; i <= 2 * n; i++) { cin >> a[i]; if (a[i] % 2) od...
#pragma once namespace leaves { namespace pipeline { // traits for numeric types template <typename T> struct numeric_traits; template <> struct numeric_traits<float> { static constexpr data_format format() noexcept { return data_format::float_; } static constexpr size_t reg() noexcept { return...
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #ifndef cmPropertyDefinition_h #define cmPropertyDefinition_h #include "cmConfigure.h" // IWYU pragma: keep #include <string> #include "cmProperty.h" /** \class cmPrope...
// https://oj.leetcode.com/problems/valid-palindrome/ class Solution { public: bool isPalindrome(string s) { if (s.size() == 0) { return true; } size_t len = s.size(); size_t i = 0, j = len - 1; while (i < j) { if (!isalnum(s[i])) { ...
#ifndef _PlayerTimer_H #define _PlayerTimer_H #include <time.h> #include "CDL_Timer_Handler.h" #define LEAVE_TIMER 20 #define HEART_TIMER 21 #define START_TIMER 22 #define BET_TIMER 23 #define CHECK_TIMER 24 class Player; class Player; class PlayerTimer; class CTimer_Handler:public CCTimer { public:...
#ifndef AWS_TOKENIZER_H #define AWS_TOKENIZER_H /* * aws/tokenizer.h * AwesomeScript Tokenizer * Author: Dominykas Djacenka * Email: Chaosteil@gmail.com */ #include <istream> #include <sstream> #include <string> #include "exception.h" #include "token.h" namespace AwS{ //! Converts a stream to Tokens. /*! *...
// // main.cpp // simpleJson // // Created by brainelectronics on 29.04.20. // Copyright (c) 2020 brainelectronics. All rights reserved. // #include "main.h" #include "jsonHelper.h" int main(int argc, const char * argv[]) { // allocate head and tmp node in the heap struct Node* head = getNode(); // st...
#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...
/* struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; */ /* Should return data of n'th node from the end of linked list. * head: head of the linked list * n: nth node from end to find */ int getNthFromLast(Node *head, int n) { // only gravity will pull me down...
#include "settings.h" Settings::Settings() { restore(); } void Settings::restore() { autorun = true; dateFormat = "dd/MM/yyyy"; rDisplay = repeatedDisplay::Future; showNumber = false; } void Settings::save() const { QSettings settings(filePath, QSettings::IniFormat); settings.setValue("Au...
#ifndef PLAYER_H #define PLAYER_H #include <SFML\Graphics.hpp> class Player { public: Player(); ~Player(); protected: }; #endif // !PLAYER_H
/* -*- c++ -*- */ /* * Copyright 2015 <+YOU OR YOUR COMPANY+>. * * This 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, or (at your option) * any later version. * * This software is d...
// ofile.cpp #include "BlobCrystallinOligomer/monomer.h" #include "BlobCrystallinOligomer/ofile.h" #include "BlobCrystallinOligomer/particle.h" namespace ofile { using monomer::Monomer; using nlohmann::json; using particle::Particle; using shared_types::distT; using shared_types::CoorSet; usi...
#include<iostream> using namespace std; int main() { int x; cout<<"Enter value of x:"; cin>>x; cout<<"The value of x is:"<<x; return 0; }
#include "mathutil.h" #include <GL/glew.h> #include <sr1/vector> #include <sr1/memory> #include <sr1/noncopyable> #include <sr1/zero_initialized> #include "stb_truetype.h" //Maria's Work namespace rend { struct Context; struct Font : public std::sr1::noncopyable { ~Font(); void initFont(std::vector<unsigned ...
// Copyright (c) 2015 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 ...
/* * Stopping Times * Copyright (C) Leonardo Marchetti 2011 <leonardomarchetti@gmail.com> */ template <typename FP> WrappedFunction2D<FP>::WrappedFunction2D(FP (*fptr)(FP, FP)) : fptr_(fptr){} template <typename FP> WrappedFunction2D<FP>::~WrappedFunction2D(){} template <typename FP> FP WrappedFunction2D<FP>::oper...
// Created on: 2002-08-02 // Created by: Alexander KARTOMIN (akm) // Copyright (c) 2002-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 ve...
#include <cstdio> #include <iostream> using namespace std; string add(string s1, string s2) { //s1更长 if(s1.length() < s2.length()) { string temp = s1; s1 = s2; s2 = temp; } for(int i = s1.length() - 1, j = s2.length() - 1; i >= 0; i--, j--) { s1[i] += j >= 0 ? s2[j] - '0' :...
/* * UDPTransportStreamer.h * * Created on: 5 Apr 2011 * Author: two */ #ifndef UDPTRANSPORTSTREAMER_H_ #define UDPTRANSPORTSTREAMER_H_ #include "MyThread.h" #include <iostream> #include <time.h> #include "Packetiser.h" // for timeDifCalc function extern "C" { #include <sys/socket.h> #include <sys/types...
#include<random> #include<iostream> #include<string> using namespace std; const int N = 4; int score[2] = { 0, 0 }; const int GOAL = 1 << (3 * N - 1); char grid[N][N] ; char uncovered[N][N]; void print_grid() { for (int i = 0; i < ((N + 4) * N + 1); cout<< "-", i++); cout << "\n"; for (int i...
/* * Light.cpp * * author: Thomas Blackwell * CS Username: tablackw * email: tablackwell@email.wm.edu * * Contains the method definitions for the Light class. */ #include <math.h> #include "Light.hpp" #include <iostream> // Constructor method for light Light::Light(double x, double y, double z){ Vecto...
#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>...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2007 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 "stdafx.h" #include "GraphicsEngine.h" #include "ShaderResources.h" #include "CShaderResource.h" GraphicsEngine::GraphicsEngine() { } GraphicsEngine::~GraphicsEngine() { Release(); } void GraphicsEngine::BegineRender() { float ClearColor[4] = { 0.5f, 0.5f, 0.5f, 1.0f }; m_pd3dDeviceContext->OMSetRender...
#pragma once #include <Tanker/Crypto/SymmetricKey.hpp> #include <Tanker/Device.hpp> #include <Tanker/DeviceKeys.hpp> #include <Tanker/Entry.hpp> #include <Tanker/Groups/Group.hpp> #include <Tanker/Groups/GroupProvisionalUser.hpp> #include <Tanker/Trustchain/Actions/KeyPublish.hpp> #include <Tanker/Trustchain/DeviceId....
#include <iostream> #include <windows.h> // knihovny #include <conio.h> using namespace std; int main() { int delka,d,i,p=0; char zn[100]="",text[100]=""; cout << "Pro si...
/* * Stopping Times * Copyright (C) Leonardo Marchetti 2011 <leonardomarchetti@gmail.com> */ #ifndef _TEST_DE_SOLVER_H_ #define _TEST_DE_SOLVER_H_ #include "sde.h" #include "test.h" #include "test-poly.h" #include "logger.h" #include <boost/function.hpp> namespace StoppingTimes{ namespace Testing{ class TestDESol...
/** * “Experience is the name everyone gives to their mistakes.” – Oscar Wilde * * author : prodipdatta7 * created : Monday 08-June, 2020 10:19:04 PM **/ //#include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <...
// 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 Lesser General Public License version 2.1 as published // by the Free Software Foundation, with spe...
// // Created by 史浩 on 2023/3/28. // #include "GLLooper.h" GLLooper* glLooper=0;
#include "particles.h" #include "imgui.h" #include "utility.h" #include "shaders.h" #include "glbuffers.h" #include <random> #include <glad/glad.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> float GetRand(float min, float max, std::mt19937& rng) { std::uniform_real_distribution<float> uid(min,...
#pragma once #include "aeTexture2DResource.h" namespace aeEngineSDK { struct aeMaterialProperty { }; class AE_ENGINE_EXPORT aeMaterial { private: friend class aeResourceManager; public: aeMaterial(); aeMaterial(const aeMaterial& M); ~aeMaterial(); String GetName(); private: Vector<aeTexture2DRe...
#include<bits/stdc++.h> using namespace std; char as[1010]; int a[42]; main() { int k; while(cin>>k) { getchar(); cin>>as; bool flag = true; int i, j, p; for(i=0; i<26; i++)a[i]=0; for(i=0; i<strlen(as); i++) a[as[i]-'a']++; for(i=0; i<26...
/* Nabaztag.cpp - Arduino library to send data to Nabaztag via I2C (RFID injected) Copyright (c) 2011 Tobias Bielohlawek. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software F...
#include "HallRegistProc.h" #include "HallManager.h" #include "ClientHandler.h" #include "ServerManager.h" #include "Logger.h" HallRegistProc::HallRegistProc() { this->name = "HallRegistProc" ; } HallRegistProc::~HallRegistProc() { } int HallRegistProc::doRequest(CDLSocketHandler* socketHandler, InputPacket* input...
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #include "gtmainsettings.h" #include <QtCore/QSettings> GT_BEGIN_NAMESPACE GtMainSettings::GtMainSettings(QObject *parent) : QObject(parent) { } GtMainSettings::~GtMainSettings() { } void GtMainSettings::load() { QSettings settings; m_geometry...
// 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 <iostream> #include <stdio.h> #include <algorithm> #include <vector> typedef long long ll; using namespace std; const int N = 200111; struct Tp { ll d, t; bool operator<(const Tp& c) const { return d < c.d || (d == c.d && t < c.t); } } A[N]; bool alive[N]; int main() { freopen("input....
#pragma once #include <functional> #include <Poco/SharedPtr.h> namespace BeeeOn { /** * Class for asynchronous executing tasks. */ class AsyncExecutor { public: typedef Poco::SharedPtr<AsyncExecutor> Ptr; AsyncExecutor(); virtual ~AsyncExecutor(); /** * Add task to queue for executing */ virtual void i...
#include "LDR.h" #include <iostream> #include <fstream> using namespace std; double readLight() { double adc_val = 0; double light = 0; // Input from file: fstream LDRFile (LDR_PATH, fstream::in); LDRFile >> adc_val; LDRFile.close(); // Calibrate values: light = (adc_val*1.8)/4095; return light; }