text
stringlengths
8
6.88M
#include<stdio.h> #include <stdlib.h> #include<string.h> #include<ctype.h> #include<time.h> #define RETURNTIME 15 char catagories[][15]={"Samsung","Apple","Nokia","Sony","LG","HTC"}; void returnfunc(void); void mainmenu(void); void ...
#include "qcolorwidget.h" #include <qcolordialog.h> QColorWidget::QColorWidget(QWidget *parent) : QWidget(parent) { this->color = QColor(Qt::white); this->setMinimumSize(50, 20); } QColor QColorWidget::getColor() { return this->color; } void QColorWidget::setColor(const QColor &color) { this->color =...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "../base.h" #include "Windows.UI.Input.Inking.Analysis.0.h" #include "Windows.Foundation.0.h" #include "Windows.UI.Input.Inking.0.h" #include "Windows.UI.Input.Inking.1.h" #include "Wi...
#ifndef LETTERS_H_INCLUDED #define LETTERS_H_INCLUDED #include <iostream> #include <string> #include <windows.h> using namespace std; /// --- REQUIRED FUNCS --- /// void gotoxy (int x, int y){ //With this func we can control cursor's position. COORD coordinates; // coordinates is declared as COORD coordin...
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* ** Copyright UCAR (c) 1992 - 1999 ** University Corporation for Atmospheric Research(UCAR) ** National Center for Atmospheric Research(NCAR) ** Research Applications Program(RAP) ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA ** All rights reserved. ...
#include <Common.h> #include <cassert> #include <memory> #include <string> enum class Token : int { Multiply = '*', Plus = '+', LParens = '(', RParens = ')', Number = 1, Eof = -1, }; class Lexer { public: /// Token consumes a buffer of input Lexer(const std::string &buffer) : buffer(buffer){}; ///...
#include <initializer_list> #include <string_view> #include <unordered_set> #include "gtest/gtest.h" #include "move.h" #include "movegen.h" #include "position.h" using apollo::Move; using apollo::Position; using apollo::Square; template <typename First> void AssertHasMoveInSet(const std::unordered_set<Move>& move_se...
#ifndef __RESOURCE_H__ #define __RESOURCE_H__ #include "Globals.h" #include <xstring> #include <string> #define INVALID_RESOURCE_UID 0 #define TO_STRING( x ) #x class JSONFile; typedef unsigned int uint; //**************** // CLASS_DECLARATION // // This macro must be included in the declaration of any subclass o...
/* * Copyright 2016-2017 Flatiron Institute, Simons Foundation * * 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 ...
/*************************************************************************** dialogocolores.cpp - description ------------------- begin : jue abr 1 2004 copyright : (C) 2004 by Oscar G. Duarte email : ogduarte@...
// // Created by 王润基 on 2017/4/19. // #ifndef INC_2RAYTRACE_UVMAP_H #define INC_2RAYTRACE_UVMAP_H #include "../Geometry/Vector3.h" class UVMap { public: virtual Vector3f getUV (Vector3f const& point) const; }; #endif //INC_2RAYTRACE_UVMAP_H
#include "Singularity.Particles.h" namespace Singularity { namespace Particles { class ParticleVertex { private: #pragma region Static Variables static Singularity::Graphics::VertexDeclaration* g_pVertexDeclaration; #pragma endregion public: #pragma region Static Methods ...
#ifndef TYPECHECK_EXCEPTIONS_H #define TYPECHECK_EXCEPTIONS_H #include "../exceptions.h" #include "../syntaxtree/node.h" #include "../syntaxtree/returnstmt.h" #include "../syntaxtree/funcall.h" #include "../syntaxtree/assign.h" using namespace std; /** * Common abstract superclass of all errors detected when * doi...
/** * @author NageshAC * @email nagesh.ac.aralaguppe@fau.de * @create date 2021-07-28 09:50:26 * @modify date 2021-07-28 09:50:26 * @desc Reads input from ./data/*.in file. */ #pragma once #include<iostream> #include<fstream> #include<thrust/host_vector.h> #include "./particle.cpp" using namespace std; using na...
#include <iostream> void uppgift1(); void uppgift2(); void uppgift3(); int main() { int uppgift; std::cout<<"Vilken upgift vill du se?:"; std::cin>>uppgift; switch(uppgift) { case 1: std::cout<< "visar uppgift 1\n"; uppgift1(); break; case 2: std::cout<< "visar uppgift 2\n";...
// // ClassSelector.hpp // DDCSSParser // // Created by 1m0nster on 2018/8/7. // Copyright © 2018 1m0nster. All rights reserved. // #ifndef ClassSelector_hpp #define ClassSelector_hpp #include <stdio.h> #include <iostream> #include "Selector.hpp" namespace future { class ClassSelector: public Selector { ...
#include<iostream> using namespace std; bool marked[101][101]; int a[101][101]; int ans; int m, n; int go[8][2] = { 1,0, -1,0, 0,1, 0,-1, 1,1, 1,-1, -1,1, -1,-1 }; bool leagl(int i, int j) { if (i<1 || i>m)return false; if (j<1 || j>n)return false; return true; } void DFS(int i, int j) { for (int k = 0;k...
#include <bits/stdc++.h> using namespace std; #define N 1010 typedef long long ll; int n, m, mat[N][N]; int getRand(ll n){ return (((ll)rand()<<30)^ll(rand())) % n; } int main(){ int n, m; n=getRand(1000)+1; m=getRand(1000)+1; printf("%d %d\n", n, m); for(int i=0; i<n; i++) for(int j=0; j<m; j++) p...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.ApplicationModel.SocialInfo.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_c210bbd7_2f56_5076_bb0e_b7497726cf95...
// // Created by zander on 2018/01/03. // #ifndef PICPNG_H #define PICOPNG_H #include <vector> //die function is verklaar in aparte file extern int decodePNG(std::vector<unsigned char> &out_image, unsigned long &image_width, unsigned long &image_height, const unsigned char *in_png, size_t in_size, bool convert_to_rg...
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "UE4VoxelTerrain.h" #include "UE4VoxelTerrainPlayerController.h" #include "SandboxTerrainController.h" #include "SandboxCharacter.h" #include "VoxelIndex.h" #include "VoxelDualContouringMeshComponent.h" AUE4VoxelTerrainPlayerController::AU...
#pragma once #include "Common.h" #include "GraphicStructures.h" #include "FileUtils.h" class AnimSet { private: friend class AnimController; struct BoneOutput { hash nameHash; FloatVec scaleTime; VectorVec scaleValue; FloatVec rotationT...
#include "PEngine/graphics/spritesheet.h" #include "PEngine/app/resource_manager.h" #include <iostream> namespace pear { namespace graphics { SpriteSheet::SpriteSheet(const glm::vec4& pos_and_dim, const char* texture_name, float depth) : Renderable2D( RenderableType::SPRITESHEET, pos_and_dim, texture_name, dept...
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin>>n; while(n--) { int a, b, c, cnt = 0; cin>>a>>b>>c; if(a) cnt++; if(b) cnt++; if(c) cnt++; if(cnt>=2) ans++; } cout<<ans<<endl; }
///////////////////////////////////////////////////////////////////////////// // Name: src/gtk/colour.cpp // Purpose: // Author: Robert Roebling // Id: $Id: colour.cpp 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ////////////////////////...
#include "components\scripting\Singularity.Components.Scripting.h" namespace Singularity { namespace Components { namespace Scripting { class LuaMethods { private: #pragma region Static Variables static LuaMethods* g_iInstance; #pragma endregion #pragma region Static...
#include<bits/stdc++.h> using namespace std; #define ll long long int #define mod 1000000007 ll util(int n,int m,vector<vector<ll> > &dp){ if(n==2 && m==1) return 1; if(n==1 && m==2) return 1; if(n==0 && m==0) return 1; if(n<=0 || m<=0) return 0; if(dp[n][m]!=-1) return dp[n][m]; return dp[n][m]=(util(n,m-2,dp...
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2021, 4Paradigm Inc. */ #ifndef LOG4P_H #define LOG4P_H #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #include <iostream> #include <limits> #include <string> #include <stdio.h> #include <stdarg.h> #define LOG4P_LEVEL_ERROR...
// Copyright 2020 JD.com, Inc. Galileo Authors. All Rights Reserved. // // 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 requ...
#include <iterator> #include <vector> #include <iostream> int main() { std::vector<double> vec = {1.1, 2.2, 3.3, 4.4, 5.5}; // Declaring iterator to a vector std::vector<double>::iterator iter; // Printing vector elements using begin() and end() std::cout << "The vector elements are: "; for ...
// // Created by Peter Chen on 5/29/16. // #ifndef CUBEWORLD_DAYCYCLEMANAGER_H #define CUBEWORLD_DAYCYCLEMANAGER_H class DayCycleManager { }; #endif //CUBEWORLD_DAYCYCLEMANAGER_H
#include "Functions.h" #include <cmath> double FunctionsToIntegrate::UserFunction(double ST) { return PDFofStockPrice(ST)*PayOff(ST); } double FunctionsToIntegrate::PDFofStockPrice(double ST) { double s = m_sigma * sqrt(m_T); double m = log(m_S0) + (m_r - 0.5*m_sigma*m_sigma)*m_T; return (1 / (ST*...
#ifndef FTPWINDOW_H #define FTPWINDOW_H #include <QWidget> #include <QDialog> #include <QHash> #include <QNetworkConfigurationManager> QT_BEGIN_NAMESPACE class QDialogButtonBox; class QFile; class QFtp; class QLabel; class QLineEdit; class QTreeWidget; class QTreeWidgetItem; class QProgressDialog; class QPushButton; ...
#include "zenlang.hpp" #include "base/base.hpp" #include "base/XcodeGenerator.hpp" #include "base/compiler.hpp" class z::XcodeGenerator::Impl : public z::Generator::Impl { public: inline Impl(const z::Ast::Project& project) : Generator::Impl(project) {} public: void run(); private: inline void generateConf...
#include <iostream> #include <string> #include <iomanip> #include <vector> #include <unordered_map> #include <cmath> #include "../../io/io.h" #include "game.h" #include "../../data/troop/troop.h" void Game::printTroop(int x, int y) { this->lg3.lock(); int freeCamp = this->resource->camp - this->...
#include "Camera.h" #include "GameObject.h" #include "Transform.h" #include <functional> //constructor, assigns properties Camera::Camera(float inNP, float inFP, float inFOV, float inAR) : nearPlane(inNP), farPlane(inFP), fieldOfView(inFOV), aspectRatio(inAR) { } //recalculates the matrices void Came...
class Solution { public: int findTargetSumWays(vector<int>& nums, int S) { int res = 0; findTargetSumWays(nums, S, 0, res); return res; } void findTargetSumWays(vector<int> & nums, unsigned int S, int start, int & res) { // use unsigned int, in case of "S=INT_MAX" if (start >...
#include<iostream> #include<climits> using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int b[n+1]; b[0]=0; int sum; int maxSum=INT_MIN; for(int i=1;i<=n;i++){ if((b[i-1]+a[i-1])<0 ) b[i]=...
#pragma once #include "BRenderPass.h" class BRTRenderPass: public BRenderPass { public: BRTRenderPass(); ~BRTRenderPass(); virtual void BeginPass(BViewport* InViewport); void DrawPrimitive(); };
#include "CommonHeader.h" SplashScreen::SplashScreen() { m_gameTitle = nullptr; m_gameTitleInPosition = false; m_mainMenuLoaded = false; } SplashScreen::~SplashScreen() { } void SplashScreen::LoadGameObjects() { m_gameTitle = AddGameObject("GameTitle", new GameObject(this, "GameTitle", Vector3(-10, 0, ...
/** * Copyright (C) 2017 Alibaba Group Holding Limited. All Rights Reserved. * * * 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 * * ...
//============================================================================ // Name : C_structureEx.cpp // Author : Cristian Mosquera // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //=================================================================...
// $Id: AAP_lp.hpp,v 1.2 2003/12/03 01:52:30 magh Exp $ /* ------------------------------------------------------------------------ Author: Matthew Galati (magh@lehigh.edu) (c) Copyright 2003 Lehigh University. All Rights Reserved. This software is licensed under the Common Public License. Please see accompanying f...
// AUTHOR: Sumit Prajapati #include <bits/stdc++.h> using namespace std; #define ull unsigned long long #define int long long #define pii pair<int, int> #define pll pair<ll, ll> #define pb push_back #define mk ...
#ifndef FUZZYCORE_RULE_CONTROLLER_H #define FUZZYCORE_RULE_CONTROLLER_H #include <utility> #include <vector> #include "../../models/rule/Rule.h" class RulePresentation { public: static void createRule(std::string contents, const std::string &space_name); static void deleteRule(unsigned long); static st...
// github.com/andy489 #include<algorithm> #include<iostream> #include<vector> int main() { using namespace std; // NOTE: These are sorted vector<int> nums { 41, 45, 61, 231, 764 }; int searchNum = 62; auto it = lower_bound(nums.begin(), nums.end(), searchNum); if (it != nums.end()) { ...
#pragma once #include <GL\glew.h> #include "Buffer.h" class VertexArray { private: GLuint value; GLuint index = 0; public: VertexArray(); ~VertexArray(); VertexArray * bind(); template <typename T> VertexArray * layout( Buffer<T> * buffer, GLint count, GLboolean normalized, GLsizei stride, GLsizei o...
#pragma once #include "app.h" #include "game_save_section.h" class rival_info : public game_save_section { public: rival_info(u8* memory_pointer); ~rival_info(); u8* get_name(); private: u8* _name; };
// Copyright ⓒ 2020 Valentyn Bondarenko. All rights reserved. #include <StdAfx.hpp> #include <FileSystem.hpp> #include <Error.hpp> #include <Log.hpp> namespace be { using path = be::fs::path; string FileSystem::CONFIG_EXTENSION = ".cfg"s; string FileSystem::FONT_EXTENSION = ".ttf"s; ...
#ifndef DWIZ_COMMON_SIGNALS_CONNECTION_H #define DWIZ_COMMON_SIGNALS_CONNECTION_H #include <common/dwiz_std.h> #include <functional> #include <memory> namespace dwiz { template <typename... Args> class Connection { public: using SlotType = std::function<void(Args...)>; Connection(std::shared_ptr<SlotType> co...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.ApplicationModel.Search.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_e2fcc7c1_3bfc_5a0b_b2b0_72e769d1cb7e #de...
class Solution { public: void solve(int n,int open,int close,string op,vector<string> &v){ if(n==0){ v.push_back(op); return; } if(open!=n){ string op1 = op; op1 += '('; solve(n-1,open+1,close,op1,v); } if(o...
#include <iostream> #include <stdio.h> using namespace std; void main() { setlocale(LC_CTYPE, "Russian"); char m[33], g[3]; int i, n, p = 3; unsigned int A, r, B, l, q,C; const unsigned int mask1 = 1 << 31; cout << "Введите число A: "; cin >> A; cout << "Введите число B: "; cin >> B; _itoa_s(A, m, 2); cout <<...
#pragma once #include <string> #include "model/Sprite.hpp" /** * @brief An Actor is an entity in control of a Sprite. * */ class Actor { Sprite* sprite; public: const std::string name; const std::string description; Actor(Sprite& sprite, std::string name, std::string description = ""); Sp...
#include "cineimage.h" CINEIMAGE::CINEIMAGE(std::ifstream *input, int64_t imagePointer, const BITMAPINFOHEADER & bitmapheader) { int k; bitreader br(input); br.seekToByte(imagePointer); AnnotationSize = br.readDWORD(); if (AnnotationSize-8 >0) { Annotation = new BYTE[AnnotationSize-8]; for (k = 0; k ...
#ifndef _INC__RPG2K__MAP_HPP #define _INC__RPG2K__MAP_HPP #include "Define.hpp" #include <map> #include <stdexcept> namespace rpg2kLib { namespace structure { template< typename Key, typename T > class Map { private: std::multimap< Key, T* > data_; typedef typename std::multimap< Key, T* >::value_ty...
#include <iostream> #include "Token.h" using namespace std; int main() { Token_stream ts {cin}; Calculator calc{ts}; calc.calculate(); return 0; }
#include <iostream> using namespace std; int main() { int index = 1; while (index <= 5){ cout << index << endl; index++; } int ind = 6; do{ cout << ind << endl; ind++; }while (ind <=5); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, k; cin>>n>>k; int ans = 0; for(int i=0; i<n; i++) { int v; cin>>v; if(v>k) { ans += v-k; k = v; } } cout<<ans<<endl; }
#include <iostream> using namespace std; int a[300][300]; int n, mark[300]; int main () { cin >> n; for (int i=1; i<=n; i++) { int tmp; cin>>tmp; while (tmp != 0) { a[i][tmp] = 1; cin>>tmp; } } for (int k=1; k<=n; k++) ...
// define connectors #define GATE 2 #define LED 13 int led = LOW; void setup() { // Configure D0 as input pinMode(GATE, INPUT); // Configure LED pin as output pinMode(LED, OUTPUT); } void loop() { int value; // Check digital input value = digitalRead(GATE); // Check if the digital input is high or...
/* * LineHashIndex.h * * Created on: Nov 15, 2010 * Author: root */ #ifndef LINEHASHINDEX_H_ #define LINEHASHINDEX_H_ class MemoryBuffer; class ChunkManager; class MMapBuffer; #include "TripleBit.h" class LineHashIndex { public: struct Point{ ID x; ID y; }; struct chunkMetaData //except the firs...
// // SMImageEditorListener.h // iPet // // Created by KimSteve on 2017. 4. 27.. // Copyright © 2017년 KimSteve. All rights reserved. // #ifndef SMImageEditorListener_h #define SMImageEditorListener_h #include <cocos2d.h> class SMImageEditorListener { public: virtual void onImageEditResult(cocos2d::Sprite * e...
#include <iostream> #include <new> #include <cstdlib> using namespace std; int main() { int n; cout << "How many numbers would you like to enter?" << endl; cin >> n; int *arr; arr = new (nothrow) int[n]; if (arr == nullptr) { cout << "Error allocating space" << endl; exit(1); } for (int i ...
#include <iostream> #include <vector> struct Foo { int a; std::string s; Foo(int _a, const std::string& _s) : a{ _a }, s{ _s } { } }; int main() { std::vector<Foo> foo; foo.emplace_back(2018, "C++"); std::cout << foo[0].a << '\n' << foo[0].s << '\n'; return 0; }
#include "UnpackerA2Geant.h" #include "expconfig/ExpConfig.h" #include "tree/TEvent.h" #include "tree/TEventData.h" #include "base/WrapTFile.h" #include "base/Logger.h" #include "TTree.h" #include <memory> #include <random> using namespace std; using namespace ant; namespace ant { namespace unpacker { namespace ...
/*========================================================================= Program: Visualization Toolkit Module: vtkExtractSelectedBlock.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This sof...
/* * Copyright 2017 Roman Katuntsev <sbkarr@stappler.org> * * 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 ap...
/* ENGR 152 * Maker Competition * Remind Device * Last edited by Kyler Howard, 4-17-20 */ //================================================================================ // Declare Global Variables & Header Files //===============================================================================...
/* Author: Nayeemul Islam Swad Idea: - For some query l r v, if we find an x such that a[x] = v, then we can just set y = x and thus have found a solution (x, y). - If there is no such x, then a pair (x, y) would be a solution iff l <= x <= y <= r and there exists two distinct subtrees of v such tha...
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> findAnagrams(string s, string p) { int letters[26] = {0}; for (char c : p) letters[c - 'a']++; vector<int> result; int remaining = p.size(), j = 0; for (int i = 0; i < s.size(...
//************************************************************************** //** //** See jlquake.txt for copyright info. //** //** 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 ...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
/** * @file IteratorTest.cpp * @author seckler * @date 22.07.19 */ #include "IteratorTest.h" #include "testingHelpers/commonTypedefs.h" constexpr double cutoff = 1.; constexpr double skin = 0.2; constexpr std::array<double, 3> boxMin{0., 0., 0.}; constexpr std::array<double, 3> haloBoxMin{0. - skin - cutoff, 0. -...
/** * * @file LoadConfigBase.cpp * @author Naoki Takahashi * **/ #include "LoadConfigBase.hpp" #include <stdexcept> namespace IO { namespace LoadConfig { LoadConfigBase::~LoadConfigBase() { } void LoadConfigBase::update() { throw std::runtime_error("Unoverride"); } void LoadConfigBase::for...
#include <esp-helper.h> #include "esp_system.h" #include "esp_wifi.h" void udp_echo_handler(void*); extern "C" void app_main() { init_flash(); #ifdef FEATURE_IDF_DEFAULT_EVENT_LOOP wifi_init_sta(); #else wifi_init_sta(event_handler); #endif xTaskCreate(udp_echo_handler, "udp_echo_ha...
#include <math.h> #include <time.h> #include "..\..\..\..\card\naborCards.h" #include "TurnTree.h" #include "..\..\..\..\Util\TemplateFileRec.h" #include "..\..\..\..\Util\Sort.h" #include "..\..\..\Common\HoldemTree.h" #include "..\..\..\Common\FlopAllIn.h" #include "..\..\..\..\util\Clasters.h" #include "..\..\AppRi...
/*************************************************************************** Copyright (c) 2020 Philip Fortier 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 2 of the License, or...
#include "./home_view.hpp" #include <iostream> #include <memory> using namespace std; namespace ltui { home_view::home_view(std::shared_ptr<router> router) : view(), _router(std::move(router)), _container(ftxui::Container::Vertical()), _menu() {} void home_view::initialize_ui() { _menu.entries.emplace_ba...
#include <sstream> #include <string.h> #include "iException.h" using namespace std; namespace stdext { Exception :: Exception(const int iErrno, const string sFunc , const string sErrMsg, const string sFile , const int iLine ) { _iErrNo = iErrno; _sErrMsg = sErrMsg; _sFile = sFile; _sFunc = ...
/* Emrah YILDIRIM 111044056 HW07 */ #include "Ivector.h" namespace HW07 { // Ivector::Ivector() : sizeV(0), capacityV(10) { nums = new int[capacityV]; } // Ivector::Ivector(int wcapacity) : sizeV(0), capacityV(wcapacity) { nums = new int[capacityV]; } // Ivector::Ivector(const Ivector& other) : ...
#include <iostream> #include <tuple> int main() { std::tuple<int, char, bool> tuple{ 10, 'A', true }; int a; bool b; std::tie(a, std::ignore, b) = tuple; std::cout << a << '\n' << b << '\n'; return 0; }
#include <iostream> #include <cstring> #include "rsa.h" using namespace std; enum TYPE_CIPHER { RSA_CIPHER = 1 }; enum TYPE_COMMAND { ENCODE_COMMAND = 1, DECODE_COMMAND }; int main(void) { TYPE_CIPHER flag_cipher; TYPE_COMMAND flag_command; // Выбор алгоритма do { cout << "...
#include<bits/stdc++.h> #include<stdio.h> using namespace std; int main() { int x1,x2,y1,y2,x,y,z,l,q,r; cin>>x1>>y1>>x2>>y2>>x>>y; l=abs(x1-x2); r=abs(y1-y2); if( l%x==0 && r%y==0 && (l/x)%2 ==(r/y)%2 ) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
// ***************************************************************** // This file is part of the CYBERMED Libraries // // Copyright (C) 2007 LabTEVE (http://www.de.ufpb.br/~labteve), // Federal University of Paraiba and University of São Paulo. // All rights reserved. // // This program is free software; you can redist...
#pragma once #include "../EngineLayer/MetaMorpheusEngine.h" #include "../EngineLayer/MetaMorpheusEngineResults.h" #include <string> #include <vector> #include "stringbuilder.h" //C# TO C++ CONVERTER NOTE: Forward class declarations: namespace EngineLayer { class MetaMorpheusEngine; } using namespace Engi...
#include <cstdio> #include <cstdlib> int exit_with_errstr(const char* errstr, int errnumber) { printf("%s\n", errstr); exit(errnumber); return errnumber; }
#pragma once #include <string> #include <vector> struct PyEXRImage { PyEXRImage(const std::string &filename); PyEXRImage(int width, int height); ~PyEXRImage(); float getPixel(int x, int y, int channel); float get(int i); float *data() { return out_rgba; } void set(int i, int channel, float ...
#include "price_update.h" #include "ui_price_update.h" price_update::price_update(QWidget *parent) : QDialog(parent), ui(new Ui::price_update) { ui->setupUi(this); update_state = 0; } price_update::~price_update() { delete ui; } void price_update::on_checkBox_stateChanged(int arg1) { if(ui->c...
#include <bits/stdc++.h> using namespace std; int goldMine(int M[][100],int m,int n){ int dp[m][n]; memset(dp,0,sizeof(dp)); for(int j=0;j<n;j++){ for(int i=0;i<m;i++){ int x = (i==0||j==0) ? 0 : dp[i-1][j-1]; int y = (j==0) ? 0 : dp[i][j-1]; int z = (i==m-1...
#pragma once #include <iostream> #include <iterator> #include <sstream> #include <string> #include <typeinfo> using std::bad_cast; using std::iterator; using std::ostream; using std::random_access_iterator_tag; using std::string; using std::stringstream; namespace lab3 { enum direction_t { DIR_NORTH, DIR_EAST, DIR...
// // Shaft Robotica // 08 fev 2019 // Vitor Domingues // github.com/vitorshaft // instagram.com/shaftrobotica // vtrshaft@gmail.com // // código adaptado a partir do FirebaseDemo_ESP8266.ino. Copyright 2015 Google Inc. // Licença Apache versão 2.0 #include <ESP8266WiFi.h> #include <FirebaseArduino.h> // configuraçã...
#include "stdafx.h" #include "MainDialog.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // Dialog::Dialog(CWnd *parent) : CDialog(IDD_MAIN_DIALOG,parent) { } BEGIN_MESSAGE_MAP(Dialog, CDialog) ON_WM_CREATE() ON_WM_DESTROY() ON_WM_SIZE() ON_COMMAND(ID_CONTEXT_MENU_POP, OnContextMenuPop) ON_COMMAND(ID_CONTEXT_M...
#ifndef EX3OS_SEARCH_H #define EX3OS_SEARCH_H #include <iostream> #include "MapReduceFramework.h" #include "MapReduceClient.h" /* * File name key for the search task. */ class FileNameKey : public k1Base, public k2Base, public k3Base { private: std::string _name; public: FileNameKey(std::string name) : _n...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#pragma once #include <fstream> #include "Square.hpp" static Color getClosestColor(glm::vec3 color); /* return the euchlidian distance between two colors */ static int getEuchlidianDistance(glm::vec3 color1, glm::vec3 color2); class BMPImage { private: size_t width, height; char header[54]; // file metadata 54 b...
#ifndef GDIPLUS_TEXTURE #define GDIPLUS_TEXTURE #include <windows.h> #include <gdiplus.h> // for rendering primitives to textures #include <tchar.h> #include <d3d9.h> // core direct3d #include <d3dx9.h> // aux libs #include "helperFunctions.h" using namespace Gdiplus ; class GDIPlusTexture { private: ...
#include "stdafx.h" #include<sstream> #include<fstream> #include<iostream> #include<algorithm> #include<string> using namespace std; void printLastKlines(string filename){ const int k = 4; string L[k]; ifstream in(filename); int size = 0; if (in){ //Returns the next character in the inpu...
#include <Adafruit_Sensor.h> //Compass stuff #include <Wire.h> //I2C Arduino Library #define address 0x1E //0011110b, I2C 7bit address of HMC5883 // Ultrasonic sensors use digital ports and needs a trigger to get an echo int rearUStrigger = 24; // rear Ultrasonic prox sensor trigger int rearUSecho = 22; // rear Ultra...
// // GroupScene.cpp // XinzhouProject // // Created by YangLin on 2017/6/20. // // #include "GroupScene.h" GroupScene::GroupScene() { } GroupScene::~GroupScene() { } Scene * GroupScene::createScene() { auto scene = Scene::create(); auto layer = GroupScene::create(); scene->addChild(layer);...