text
stringlengths
8
6.88M
#include <iostream> using namespace std; int luasPersegi (int sisi){ return (sisi*sisi); } int kelilingPersegi (int sisi){ return 4*sisi; } int main() { int s; cout<<"masukkan sisi persegi :"; cin >> s; cout <<"luas persegi = " << luasPersegi(s)<<endl; cout <<"keliling perse...
#include<iostream> using namespace std; int main() { int a, b, c, d; int aux; cin >> a >> c >> b >> d; aux = ((b*60)+d) - ((a*60)+c); if(aux<=0) aux += 24*60; cout << "O JOGO DUROU " << aux/60 << " HORA(S) E " << aux%60 << " MINUTO(S)" << endl; return 0; }...
#ifndef INTENSITY_HPP #define INTENSITY_HPP #include "globals.hpp" cv::Mat intensityLUT( std::function<unsigned char( unsigned char )> func ); cv::Mat intensityTransform( cv::Mat img, std::function<unsigned char( unsigned char )> func ); cv::Mat intensityTransform_iter( cv::Mat img, ...
/* https://www.acmicpc.net/problem/8393 */ #include <iostream> using namespace std; int main(void) { int num, total = 0; scanf("%d", &num); for (int i = 1; i <= num; i++) total += i; printf("%d", total); return 0; }
/*************************************************************************** * Copyright (C) 2009 by Dario Freddi * * drf@chakra-project.org * * * * This pr...
#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...
#include "test_lib_1.h" int main() { test_lib_1(); return 0; }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 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/layout/box/flexitem.h" ...
#pragma once #include <iberbar/Gui/Headers.h> #include <iberbar/Utility/ViewportState.h> #include <iberbar/Utility/Result.h> #include <memory_resource> namespace iberbar { struct UMouseEventData; struct UKeyboardEventData; class CBaseCommand; class CCommandQueue; namespace Renderer { class CRenderer; cla...
#include <wx/combo.h> #ifndef __WXCOMBOBTN_H #define __WXCOMBOBTN_H /** контрол для выбора данных типа комбобокса, только с троеточием */ class wxComboBtn: public wxComboCtrl { public: wxComboBtn() : wxComboCtrl() { Init(); } wxComboBtn(wxWindow *parent, wxWindowID id = wxID_ANY, ...
#ifndef SENDRCV_H #define SENDRCV_H #include "synch.h" class sendRcv { private: Lock *mon_lock; Condition Sender[10]; Condition Recv[10]; int Buffer[10]; Semaphore mesg[10]; public: sendRcv(); ~sendRcv(); void Send(int port, int msg); void Receive(int port, int *msg); }; #endif
// // Created by fab on 25/11/2020. // #ifndef DUMBERENGINE_EDITOR_HPP #define DUMBERENGINE_EDITOR_HPP #include <vector> #include <glfw/glfw3.h> #include <iostream> #include "ISystem.hpp" #include "../utils/IDragNDrop.hpp" class Editor : public ISystem { private: std::vector<IDragNDrop*> callbackDragNDrop; publ...
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int n, input; vector<int> arr; cin >> n; for(int i=0; i<n; i++) { cin >> input; arr.push_back(input); } int tmp; for(int i=0; i<n; i++) { tmp = i; for(int j=i; j<n; j++) { if(arr[tmp] > ...
// 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 "Transfers/BlockchainSynchroni...
#include "SimFastTiming/FastTimingCommon/interface/SimpleElectronicsSimInMIPs.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" using namespace ftl; SimpleElectronicsSimInMIPs::SimpleElectronicsSimInMIPs(const edm::ParameterSet& pset) : debug_(pset.getUntrackedParameter<bool>("debug", false)), a...
//知识点:贪心 /* 将输入数列进行排序 可以发现: 1.若此时最大的,最小的两数之和<=w 那么将这两个数组成一对,一定是较优的 2.若此时最大,最小的两数之和>w 那么不再有数,能与最大的数组成一组 则将最大的数单独作为一组, 一定是较优的. 按照上述法则, 使用首尾两指针模拟即可 */ #include<cstdio> #include<algorithm> #include<ctype.h> const int MARX = 3e4+10; //============================================================...
#include "rsa.h" #include <iostream> int main() { RSA rsa; std::cout << "¹«Ô¿£º"<<rsa.GetPkey() << std::endl; rsa.EncryptionFile("test.txt", "test.ecrept.txt"); rsa.DecryptFile("test.ecrept.txt", "test.decrept.txt"); return 0; }
#ifndef wali_KEY_SET_SOURCE_GUARD #define wali_KEY_SET_SOURCE_GUARD 1 /*! * @author Amanda Burton */ #include "wali/Common.hpp" #include "wali/KeySource.hpp" #include "wali/KeyContainer.hpp" #include <set> namespace wali { class KeySetSource : public wali::KeySource { public: KeySetSource( std::set<...
#ifndef SERVER_H #define SERVER_H #define _WINSOCK_DEPRECATED_NO_WARNINGS #include <WinSock2.h> #include <iostream> #include <string> #include <pthread.h> #include <fstream> #include <list> #include <utility> #include <stdlib.h> #define NOMBRE_OCTET 2048 typedef struct connectedClient{ int ID; char* pseudo; SOCK...
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> using namespace std; #define MAXLEN 50 struct Data{ char key[10]; char value[10]; int id; }; struct QueueType{ Data node[MAXLEN+1]; int front; int tail; }; void QInit(QueueType &QT){ QT.front = 0; QT.tail = 0; } int QIsEmpty(Q...
#include <memory> #include <vector> #include "gmock/gmock.h" #include "explicit_transversals.h" #include "orbits.h" #include "perm.h" #include "perm_set.h" #include "schreier_tree.h" #include "test_main.cc" using cgtl::ExplicitTransversals; using cgtl::Orbit; using cgtl::Perm; using cgtl::PermSet; using cgtl::Schre...
// // Created by biega on 22.03.2018. // #ifndef TANKSMAPGENERATOR_MAPMODIFICATOR_H #define TANKSMAPGENERATOR_MAPMODIFICATOR_H #include "map.h" class MapModificator { public: Map* generateMap(int level, int size); //generates symbol map Map* modify(int x, int y, char a, Map* m); //modifyies a sym...
#pragma once class MonsterAction; //モンスターアクションのローディングを担っている class MonsterActionManeger:public GameObject { public: //モンスターに技を加えるときに使うローダー //id: 技のID //target: 対象のモンスター static MonsterAction* LoadAction(int id,int target,...); /*enum en_action { en_Chase, en_Atack, en_Leave, en_Fire, };*/ private: }...
/* -*- 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. * */ #ifndef OP_SEPARATOR_H #define OP_SEPARATOR_H #include "modu...
#include <string> #include <iostream> using namespace std; #include "City.h" City::City() { } City::City(string name) { this->name = name; } City::City(string origin, string name, string departure, string arrival, string cost) { this->origin = origin; this->name = name; this->departure = Time(departure); this-...
/* -*- 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. * * @author Patricia Aas (psmaas) */ #include "core/pch.h" #include "modules/util/OpHa...
#include "Phong.h" Phong::Phong() { ambientBRDF = new Lambertian; diffuseBRDF = new Lambertian; specularBRDF = new GlossySpecular; } Phong::~Phong() { delete ambientBRDF; delete diffuseBRDF; delete specularBRDF; } BRDF* Phong::getAmbientBRDF() { return ambientBRDF; } BRDF* Phong::getDiffuseBRDF() { return d...
#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 pri[44] = {2,3,5,7,13,17,19,31,6l,89,107,127,521,607,1279,2203,2281, 3217...
// Created on: 1994-11-03 // Created by: Marie Jose MARTZ // 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 G...
#include "Util.h" #include <ctime> #include "User.h" #include "Pisica.h" #include "Caine.h" #include "Iepure.h" #include "testoasa.h" #include "papagal.h" #include "iguana.h" #include "corb.h" #include "caracatita.h" #include "peste.h" #include "porumbel.h" #include "sarpe.h" #include "foca.h" void p...
/* * SpewFiltering.hpp * * Created on: Apr 2, 2015 * Author: tomh */ #ifndef SPEWFILTERING_HPP_ #define SPEWFILTERING_HPP_ #include <string> //#include "boost/filesystem.hpp" namespace SpewFilteringSpace { const size_t SUCCESS = 0; const size_t ERROR_IN_COMMAND_LINE = 1...
#include "server.h" #include<iostream> Server::Server() { } Server::~Server() { } void Server::Start() { std::cout << "(-TCP-) t or u (-UDP-)" << std::endl; std::cin >> mode; std::cout << "Set server port: "; std::cin >> port; std::cout << "Set max number of players: "; std::cin >> playersString; m...
class Solution { public: int minDistance(string word1, string word2) { int len1=word1.length(),len2=word2.length(); //dp[index1][index2]:前index1个word1字符转换成前index2个word2字符需要的最少步数 vector<vector<int>> dp(len1+1,vector<int>(len2+1)); for(int index1=0;index1<=len1;index1++){ f...
/** * @file * @brief Reading from a PE module that is loaded within a remote process. */ #pragma once #include <windows.h> #include "pe_hdrs_helper.h" #include "pe_virtual_to_raw.h" #include "exports_mapper.h" #include "pe_dumper.h" namespace peconv { bool fetch_region_info(HANDLE processHandle, BYTE* start_...
//------------------------------------------------------------------------------ /* This file is part of Beast: https://github.com/vinniefalco/Beast Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without f...
#pragma once #include "SFML\Graphics.hpp" #include <iostream> #include "SFML\Audio.hpp" #define MAX_NUMBER_OF_ITEMS 1 class rules { public: rules(); rules(float width, float height); ~rules(); void printRules(); void draw(sf::RenderWindow &window); void MoveUp(); void MoveDown(); int GetPressedItem() { return s...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2011 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Yngve Pettersen ** */ #include "core/pch.h" //#include "url_...
#include<stdio.h> #define limit 1000000 int gcd(int a,int b){int tmp; if(a<b){tmp=a;a=b;b=tmp;} while(b){tmp=a%b;a=b;b=tmp;}return a; } int main(){ unsigned long long n_max=0,d_max=1,n,d; for(d=2;d<=limit;d++){if(d%7){goto label;}continue;label:; n=(3*d)/7; if(n*d_max>n_max*d){d_max=...
#include "bricks/core/string.h" #include "bricks/core/exception.h" #include <stdarg.h> #include <stdio.h> namespace Bricks { const String String::Empty; static size_t UTF8GetCharacterSize(String::Character character) { if (!character) return 2; if (character <= 0x7F) return 1; else if (character <= 0...
// // Light.h // Odin.MacOSX // // Created by Daniel on 17/10/15. // Copyright (c) 2015 DG. All rights reserved. // #ifndef Odin_MacOSX_Light_h #define Odin_MacOSX_Light_h #include <string> #include "Vector3.h" #include "Vector4.h" #include "NumericTypes.h" #include "Shader.h" namespace odin { namespace ren...
// // CCarrierListenerCAPI.h // SwitchServer // // Created by Joel Liang on 2018/8/26. // #ifndef CCarrierListenerCAPI_h #define CCarrierListenerCAPI_h #ifdef __cplusplus #include "elatypes.h" class CCarrierListener; extern "C" { #else typedef struct CCarrierListener CCarrierListener; #endif typedef _ELAST...
#include <SPI.h> #include <SdFat.h> SdFat SD; const int chipSelect = 4; void setup() { Serial.begin(9600); Serial.print("--Formula SAE-E UFPB 2016--"); Serial.println("SIS v1.0"); sdsetup(); } void loop() { sdsetup(); gpsdata(); } void sdsetup(){ Serial.print("\nInicializando SD Card..."); pinMode...
#ifndef MEMORY_RTL_H #define MEMORY_RTL_H #include "simple_mem_if.h" class MEMORY_RTL : public sc_module { public: // inputs sc_in< sc_logic > Clk; sc_in< sc_logic > Ren, Wen; sc_in< sc_uint<32> > Addr; sc_in< sc_uint<32> > DataIn; // outputs sc_out< sc_uint<32> > DataOut; sc_out< sc_logic > Ack; unsigned ...
#ifndef FAST_DENSEALKS_H #define FAST_DENSEALKS_H #include <igraph.h> #include <stdio.h> #include <iostream> #include <assert.h> #include <set> #include <vector> #include "mystr.h" #include "read_data.h" #include "expected_degree.h" #include "graph_partition.h" #include "print_graph.h" #include "Fast-D...
/* * 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. */ #include <folly/futures/Future.h> #include <folly/io/async/test/MockAsyncTransport.h> #include <folly/portability/GMock.h> #inclu...
#include<stdio.h> int main() { int a[5] = {1,2,3,4,5}; int *p = &a[0]; int i; for (i = 0; i < 5; i ++) { printf("a[%d]=%d\n", i, a[i]); } for (i = 0; i < 5; i ++) { printf("*(a+%d)=%d\n", i, *(a+i)); } for (i = 0; i < 5; i ++) { printf("p[%d]=%d\n", i, p[i]); } for (i = 0, p = a; p < 5 + a; i ++, p ++) ...
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → */ #define int long long int #define ld long double #define F first #define S second #define P pair<int,int> #define pb pu...
// ---------------------------------------------------------------------------- // nexus | LiquidArgonProperties.cc // // This class collects the relevant physical properties of liquid xenon. // // The NEXT Collaboration // ---------------------------------------------------------------------------- #include "LiquidAr...
group "url URI-test"; // -*- Mode: C++; tab-width: 4; -*- require init; include "core/pch.h"; include "modules/url/url2.h"; include "modules/url/url_man.h"; include "modules/encodings/utility/charsetnames.h"; // Extracted from draft-fielding-uri-rfc2396bis-05 // Base URI = http://a/b/c/d;p?q // URL, expected URL, e...
#pragma once #include "Template.hh" #include "Typedefs.hh" #include <memory> #include <vector> namespace HotaSim { using CCC::SPtrVec; class Biom : public TemplateObject<Biom> { public: Biom(const BiomTemplate& _tmpl); SPtrVec<Ability> getAbilities() const noexcept; private: SPtrVec<Ability> abiliti...
// exception.cc // Entry point into the Nachos kernel from user programs. // There are two kinds of things that can cause control to // transfer back to here from user code: // // syscall -- The user code explicitly requests to call a procedure // in the Nachos kernel. Right now, the only function we support is // "H...
/* Question: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example: In...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2005 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef MODULES_DOCHAND_DOCHAND_MODULE_H #define MODULES_DOCHAND_...
// // main.cpp // Tarea1Ejercicio2 // // Created by Daniel on 26/08/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #include <iostream> #define N 6 void imprimir(int **a); bool resolver(int **a, int x, int y); int main(int argc, const char * argv[]) { /*construir laberinto * 1 casilla disponib...
#include "config.h" #include <iostream> #include <QDomDocument> namespace httpserver { QString configFileLocation = "config.xml"; std::map<QString, ConfigValue> Config::s_configDeclarations = { std::make_pair("port", ConfigValue::Port), std::make_pair("not_found_page_location", ConfigValue::Not...
#pragma once class CPong { public: void start(); };
/*============================================================================= /*----------------------------------------------------------------------------- /* [JSONHelper.h] RapidJSONヘルパークラス /* Author:Kousuke,Ohno. /*----------------------------------------------------------------------------- /* 説明:JSON操作ヘルパークラス =...
#include "stdafx.h" #include "Dict.h" using namespace Dictionary; Instance Dictionary::Create(const char name[DICTNAMEMAXSIZE], int size) { if (strlen(name) > DICTNAMEMAXSIZE) throw THROW01; if (size > DICTMAXSIZE) throw THROW02; Instance *dict = new Instance; dict->dictionary = new Entry[size]; dict->s...
#include"Sort3.h" void Swap(float& a,float& b) { float temp; temp=a; a=b; b=temp; } void Sort3(float& x,float& y,float& z) { if(x>y) Swap(x,y); else ; if(y>z) Swap(y,z); else ; if(x>y) Swap(x,y); else ; }
/** * @file AudioMachine.cpp * @brief Header file for Engine::AudioMachine * * @author Gemuele (Gem) Aludino * @date 09 Dec 2019 */ /** * Copyright © 2019 Gemuele Aludino * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associa...
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
#include "stdafx.h" #include "MusicFade.h" #include "Fade.h" void MusicFade::OnDestroy() { if (m_Music != nullptr) m_Music->Stop(); } void MusicFade::init(Sound * music,float vol,float speed) { m_Music = music; m_vol = vol; if (speed < 0) { m_speed = FindGO<Fade>("fade")->GetSpeed(); } else m_speed = ...
#include <iostream> #include <vector> using namespace std; int main(){ vector<int> measurements = vector<int>(); int num; int numIncreased = 0; int x1, x2; while(cin >> num){ measurements.push_back(num); } for(auto it = measurements.begin(); it < measurements.end(); it++){ ...
#ifndef EMPLOYEE_H #define EMPLOYEE_H using namespace std; //#include "headers.h" #include <string> #include <iostream> #include <unistd.h> class Employee { private: string name_; string surname_; string office_; string salary_; public: Employee(){} void setName(string str)...
#include "trainer.h" trainer::trainer() { }
#include<stdio.h> int main(int argc, char const *argv[]) { int a[20]; int i; for(i=0;i<=19;i++) scanf("%c",&a[i]); for(i=19;i>=0;i--) printf("%c",a[i]); return 0; }
#ifndef SHADER_H #define SHADER_H #include <string> #include <stb_image.h> #include <glad/glad.h> class VertexArrayObject { public: GLuint id; void init(); // Select this VAO for subsequent draw calls void bind(); void free(); }; class VertexBufferObject { public: GLuint id; int attrib_num; void init(...
#include "FogShader.h" FogShader::FogShader() { } FogShader::FogShader(std::shared_ptr<Graphics> graphics) { m_Graphics = graphics; } FogShader::~FogShader() { } bool FogShader::Initialize(HWND hwnd) { if (!InitializeShader(hwnd, "FogVertex.cso", "FogPixel.cso")); return true; } bool FogShader::Render(int vert...
#include<cstdio> #include<cstring> #include<map> #include<vector> #include<queue> using namespace std; typedef map<int,int>::iterator IT; struct TRIE{ int pre,dep; int end; map<int,int> next; TRIE() { end=0; dep=0; next.clear(); } }; vector<TRIE> trie; int n,m; void input() { char ch; int x,tmp; scanf(...
// Created on: 2016-11-14 // Created by: Irina KRYLOVA // Copyright (c) 2016 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...
#include "game.h" #include "..\\engine\scene.h" #include "..\\engine\text_component.h" bool Game::Startup() { bool success = engine_->Startup(); score_event_handle_ = engine_->GetSystem<EntityEventDispatcher>() ->Subscribe("score", std::bind(&Game::OnScore, this, std::placeholders::_1)); monch_handle_ = engine...
#include "treeface/gl/Errors.h" #include "treeface/gl/ImageRef.h" #include "treeface/gl/Texture.h" #include "treeface/graphics/Image.h" #include "treeface/graphics/ImageManager.h" #include "treeface/misc/Errors.h" #include "treeface/misc/PropertyValidator.h" #include "treeface/misc/StringCast.h" #include <treecore/Dyn...
#include <string> #include "Direction.hpp" #include "Board.hpp" #include <iterator> #include <map> #include <bits/stdc++.h> using namespace std; namespace ariel { /* * Initializes the minimum row and minimum column * to be what is given in the question, * if this is the first time something ...
// Created on: 1996-02-26 // Created by: Philippe MANGIN // 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 the GN...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef OPNETWORKINTERFACE_H #define OPNETWORKINTERFACE_H #ifdef ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2002 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef DOM_TEXT_H #define DOM_TEXT_H #include "modules/dom/s...
#define ButtonPin1 2 #define ButtonPin2 3 #define LedPin 13 #include <Arduino.h> int pin_reading1 = 0; int pin_reading2 = 0; int a = 0; void setup() { pinMode(ButtonPin1,INPUT_PULLUP); pinMode(ButtonPin2,INPUT_PULLUP); pinMode(LedPin,OUTPUT); } void loop() { pin_reading1 = digitalRead(ButtonPin1); pin_reading...
#include "stdafx.h" #include "UIAnimationTabLayout.h" namespace UiLib{ CAnimationTabLayoutUI::CAnimationTabLayoutUI() : m_bIsRunning(false), m_bIsVerticalDirection(false), m_nPositiveDirection( 1 ) { m_AnimatID = 1001; m_iOldXOffset = 0; m_iOldYOffset = 0; m_nStep = 0; CControlUI::OnInit += MakeDelegate(this,&C...
#include<iostream> #include<stdio.h> #include<bits/stdc++.h> #include<algorithm> #include<cmath> #include<string> #include<cstring> #include<vector> #include<map> #include<queue> #include<set> #include<list> #include<unordered_map> #include<unordered_set> #define ll long long #define MAX 100000003 #define MAX_RLEN 50 #...
/* * BinConvert.h * * Created on: 8 Jul 2015 * Author: Jack */ #ifndef BINCONVERT_H_ #define BINCONVERT_H_ #include <vector> #include <cmath> #include <iostream> class BinConverter { private: int bits; int dpIndex; public: BinConverter(int bits, int dpIndex = 0); std::vector<bool> decToBin(int dec); ...
#include <iostream> #include <string> using namespace std; int GetUserInput() { cout << "Enter a number: "; int a; cin >> a; return a; } int main() { int A = GetUserInput(); if (A % 3 == 0) { cout << "Fizz"; } if (A % 5 == 0) cout << "Buzz"; } if (A % 3 > 0) { if (A % 5 > 0) { c...
#ifndef _SUB1_H_ #define _SUB1_H_ #include "Sup1.h" class Sub1 : public Sup1 { public: void func(); }; #endif //_SUB1_H_
#include <iostream> #include <string> #include <vector> #include <cstring> #include "Creature.h" #include "../rapidxml/rapidxml.hpp" #include "../rapidxml/rapidxml_utils.hpp" #include "../rapidxml/rapidxml_print.hpp" using namespace std; using namespace rapidxml; Creature::Creature(xml_node<> * creatureTag){ xml_no...
// Motor Y es el de los leds // Motor X es el del enfoque del portamuestras (eje z del portamuestras) #define Y_DIR_PIN 61 // poner n�mero del pin de direcci�n #define Y_STEP_PIN 60 // poner n�mero de pin de conexi�n al motor #define Y_ENABLE_PIN 56 // poner n�mero de pin de poner en marcha #define FIN_CARRERA_1 3 //...
#include "Arr.h" std::size_t n; //int** arr = new int*[n]; //std::vector < std::vector < int> > arr; /* void reserve(std::size_t n) { int* arr = new int[n]; } void arrtemp(std::size_t n, int i) { arr[i] = new int[n]; // добавляем новую строку } void inputelement(int i, int j, int a) { arr[i][j] = a; } void rend(...
/** * @file NetworkFlow.cpp * CS 225: Data Structures */ #include <vector> #include <algorithm> #include <set> #include <climits> #include "graph.h" #include "edge.h" #include "NetworkFlow.h" using std::vector; int min(int a, int b) { if (a<b) return a; else return b; } NetworkFlow::NetworkFlow(Graph &...
#ifndef JSKEYS_HH #define JSKEYS_HH namespace NC { namespace DateKeys { constexpr const char* year = "year"; constexpr const char* month = "month"; constexpr const char* day = "day"; constexpr const char* hours = "hours"; constexpr const char* minutes = "minutes"; constexpr const char* second...
#pragma once #include "helpers.hpp" #include <climits> #include <vector> #include <iostream> // SCANNER DEFINITION // You can freely add member fields and functions to this class. class Scanner { int line; //int semicolonCount = 0; int value; int current_token_length; bool very_end_newline; ...
s#include<string> #include<iostream> #include<vector> using namespace std; class Solution { public: ListNode* reverseKGroup(ListNode* head, int k) { ListNode* hair = new ListNode(0); hair->next = head; ListNode* pre = hair; while (head) { ListNode* tail = pre; ...
// // Created by Noam pnueli on 2/11/17. // #ifndef PHYSICSENGINE_PHYSICS_H #define PHYSICSENGINE_PHYSICS_H #include "renderer.h" #include "constraints.h" #define RUN_TIME 500 #define GRAVITY 9.807 #define TIME_INTERVAL 0.01 class Physics { private: std::vector<Object*> stage; Renderer* renderer; public: ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-1999 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef DOM_DOMXSLT_H #define DOM_DOMXSLT_H #ifdef DOM_XSLT_S...
//===-- DWARFDebugRangesList.cpp ------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// // Created by manout on 17-7-6. // #include "all_include.h" #include <opencv2/opencv.hpp> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/imgproc.hpp> #define KERNEL_SIZE cv::Size(7, 7) void show_blur(cv::Mat& src, const string& name) { cv::Mat...
#include <iostream> #include <array> #include <fstream> #include <string> #include <optional> #include <cmath> #include <iomanip> typedef std::array<std::array<double, 3>, 3> matrix; struct Args { std::string matrixFile1; std::string matrixFile2; }; std::optional<Args> ParseArgs(int argc, char* argv[]) { ...
#ifndef __GAME__ #define __GAME__ #include "..\EngineLib\RDFTEngine.h" #include <math.h> class Minigame { public: enum GAMESTATE { WAITING, RUNNING, WINNING }; private: Minigame::GAMESTATE GameState; unsigned char lmState; HWND hwnd; void Setup(HWND hwnd); int Level; int NumMoves; Ball * ball; Hole * hol...
#include "form02.h" #include "ui_form02.h" Form02::Form02(QWidget *parent) : QWidget(parent), ui(new Ui::Form02) { ui->setupUi(this); setWindowFlag(Qt::WindowStaysOnTopHint); tabModel = new QStandardItemModel(0, 4, this); ui->tableView->setModel(tabModel); tabSelectionModel = new QItemSelectionMo...
// Created on: 2006-10-28 // Created by: Alexander GRIGORIEV // Copyright (c) 2006-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 ...
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
// // utility.cpp // #include "utility.h" double util::C2F(double TC) { double TF = 9*TC/5 + 32; return TF; } double util::F2C(double TF) { double TC = 5*(TF-32)/9; return TC; }
#include <iostream> #include <fstream> #include <string> #include "ImageProc.h" using namespace std; ifstream image; string header, input; int width, height, max_val, choice; void print_filters() { cout << " 0 --- Gaussian Blur\n"; } int main() { // will only accept .ppm P3 format! cout << "Would you like to cre...