text
stringlengths
8
6.88M
#include<bits/stdc++.h> using namespace std; int main(){ long long int n, k; scanf("%lld %lld", &n, &k); vector< pair< long long int, long long int> > v; long long int a; for (int i =0 ; i < n; i++){ scanf("%lld", &a); v.push_back( pair<long long int, long long int>(a, i) ); ...
#include "sevens.h" using namespace std; using namespace Jtol; void input(Net net){ int tp; while(1){ cin.clear(); cin >> tp; if(cin.fail()){ cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), '\n'); cout<<"請勿輸入非整數"<<endl; } ...
// Fill out your copyright notice in the Description page of Project Settings. #include "Data_Prep.h" #include "Modules/ModuleManager.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Data_Prep, "Data_Prep" );
/** * @file SparseMatrix.cpp * @brief Sparse matrix functionality for iSAM. * @author Michael Kaess * @version $Id: SparseMatrix.cpp 6376 2012-03-30 18:34:44Z kaess $ * * Copyright (C) 2009-2013 Massachusetts Institute of Technology. * Michael Kaess, Hordur Johannsson, David Rosen, * Nicholas Carlevaris-Bianco ...
#include <string> #include <iostream> #include <cstdlib> const int LINES = 100000; int main () { std::cout << LINES << " " << LINES << std::endl; for (int i = 0; i < LINES; i++) { std::cout << rand() << " " << rand() << std::endl; } return 0; }
/** * File: ffsnet_bridger.cpp * Desc: This is a C wrapper to call the ffsnet library * Author: dzhao8@hawk.iit.edu * History: * 06/25/2011 - initial development * * Compile to a shared library: * g++ -fPIC ffsnet_bridger.cpp --shared -o libffsnet_bridger.so -L. -lffsnet * */ int ffs_mkdir(const char *, c...
#include<iostream> #include<algorithm> #include<vector> using namespace std; // 遍历算法之 transform 搬运容器到另一个容器中 // // transform(iterator begin1,iterator end1,iterator begin2, _func) // 参数列表分别是 // 原容器开始迭代器 // 原容器结束迭代器 // 目标容器开始迭代器 // 函数或者函数对象 class Transform { public: int operator()(int v) { return v*100...
// Andrew Niklas // Homework 2 // Completed 1/20/2016 #include <iostream> #include <cmath> double sum(double[], int); double mean(double[], int); double stdDev(double[], int); double values[10]; int size = 10; double difSqrd[10]; double sum(double values[], int size){ double x = 0; for(int i = 0;...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; #define pb push_back #define all(x) begin(x), end(x) #define rep(i, a, b) for(ll i = a; i < b; ++i) using pi = pair<int, int>; #define f first #define s second void setIO(string name = "measurement") { ios_base::sync_wi...
#include <bits/stdc++.h> using namespace std; /*void preorder(vector< vector< int > > v) { vector <bool> visited(500,false); queue <int> q; q.push(0); visited[0] = true; while(q.size() > 0) { int x = q.front(), sz = v[x].size(); q.pop(); cout<<x<<"\n"; ...
#include<bits/stdc++.h> using namespace std; int main(){ int a,n,d,e; cin>>n; d=n/5; e=n%5; if(e!=0){ a=d+1;} else a=d; cout<<a; }
/* Cpp DEITEL EXERCISE 7.14 Mix and distribute a 52-card deck.*/ #include <iostream> #include <ctime> #include <cstdlib> using namespace std; void mix( int [ ][ 13 ] ); void distribute( const int [ ][ 13 ], const char *[], const char *[] ); int main(){ const char *firs[ 4 ] = { "kupa", "karo", "sinek", "maca" };...
#include "IncludeReplacer.h" #include "Helpers.h" using namespace Common; using namespace std; void IncludeReplacer::ReplaceIncludes(const std::wstring& inputFilename, const std::wstring& outputFilename) { auto filePath = Helpers::GetFilePath(inputFilename); vector<char> content; Helpers::ReadData(inputFilename,...
/** * @file CElevator.cpp * @brief implementation of CElevator class * @author li shuangjiang * @version 1.0.0 * @date 2012-12-13 */ #include "CElevator.h" CElevator::count=0; CElevator::CElevator(int kind,CBuilding* parent,int current_floor=1;int speed_running=elevator_speed_running,int speed_outin=elevator_spe...
#include "zenlang.hpp" namespace zz { struct OnDataReceivedHandler { inline OnDataReceivedHandler(z::Response& r) : _ps(psProtocol), _inHeader(true), _r(r) {} private: enum ParseState { psProtocol, psStatus, psMessage, psKey, psVal, psBody, psDone }; ...
#include "world.hpp" #include <iostream> #include <ctime> #include <cstdlib> int main () { // Seed the random number generator srand (time (NULL)); World world; while (world.exists) { world.getInput (); world.update (); world.display (); } return 0; }
//Sliding max windows LC.239 #include <bits/stdc++.h> using namespace std; void getMax(int arr[], int n, int k) { std::deque<int> Qi(k); int i; for (i = 0; i < k; i++) { while ((!Qi.empty()) && arr[i] >= arr[Qi.back()]) Qi.pop_back(); Qi.push_front(i); } for (; ...
// // Copyright © 2017 Lennart Oymanns. All rights reserved. // #include <iostream> #include <map> #include "Error.h" #include "Factor.hpp" #include "Function.hpp" #include "Lexer.hpp" #include "Number.hpp" #include "Parser.hpp" #include "Power.hpp" #include "Summand.hpp" #include "UnaryMinus.hpp" #include "Variable....
#include <bits/stdc++.h> #define ll long long const int MAX_N = 1e5 + 10 ; struct data { int m , p , pl ; }a[MAX_N] ; struct info { ll num ; int pl ; friend bool operator <(info a , info b) {return a.num > b.num || (a.num == b.num && a.pl > b.pl) ;} } ; std::set<info> ch , sw1 ; int n , sta[MAX_N] , lst1[MAX_N]...
// This file has been generated by Py++. #ifndef PropertyLinkDefinitionColourUDim_hpp__pyplusplus_wrapper #define PropertyLinkDefinitionColourUDim_hpp__pyplusplus_wrapper void register_PropertyLinkDefinitionColourUDim_class(); #endif//PropertyLinkDefinitionColourUDim_hpp__pyplusplus_wrapper
#include<bits/stdc++.h> #include<stdio.h> using namespace std; #define ll long long #define scl(n) scanf("%lld", &n) #define fr(i,n) for (ll i=0;i<n;i++) #define fr1(i,n) for(ll i=1;i<=n;i++) #define pfl(x) printf("%lld\n",x) #define endl "\...
//#include <bits/stdc++.h> //using namespace std; // //const int MAX_INT = std::numeric_limits<int>::max(); //const int MIN_INT = std::numeric_limits<int>::min(); //const int INF = 1000000000; //const int NEG_INF = -1000000000; // //#define max(a,b)(a>b?a:b) //#define min(a,b)(a<b?a:b) //#define MEM(arr,val)memset(arr,...
// Author: Markus Schordan // $Id: DOTRepresentation.C,v 1.3 2006/04/24 00:21:27 dquinlan Exp $ #ifndef DOTREPRESENTATION_C #define DOTREPRESENTATION_C #include <iostream> #include <fstream> #include <sstream> #include <typeinfo> #include "DOTRepresentation.h" // DQ (4/23/2006): Required for g++ 4.1.0! #include "ass...
#pragma once #include "ImageFeatures.h" class FRAlgorithm{ public: FRAlgorithm(void){} ~FRAlgorithm(void){} virtual ImageFeatures* detect(Mat* img){ return nullptr; } };
int i; double d; bool b; // declaration 3 void func(); void func_2() { // reference 3 func(); }
#include <iostream> #include <fstream> #include <set> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { if (argc != 3) { cout << "Invalid arguments: [dictionary file] [text file]" << endl; return 0; } set<string> dict; string w; ifstream ifdict(argv[1]...
/* * EBYTE LoRa E32 Series * https://www.mischianti.org/category/my-libraries/lora-e32-devices/ * * The MIT License (MIT) * * Copyright (c) 2019 Renzo Mischianti www.mischianti.org All right reserved. * * You may copy, alter and reuse this code in any way you like, but please leave * reference to www.mischiant...
#pragma once #ifndef __MODULE_GAME_H__ #define __MODULE_GAME_H__ #include "Module.h" #include "Timer.h" #define TIMEMULTIPLIER_LIMIT 3.0f #define TIMEMULTIPLIER_STEP 1.0f enum GameState { IN_EDITOR = 0, IN_PLAY, UNKNOWN }; class TimeManager : public Module { public: TimeManager(bool start_enabled = true); ~Tim...
#ifndef __DRIFTCALIBHOOK_HPP #define __DRIFTCALIBHOOK_HPP #include <epecur/cxx11_compat.hpp> #include <epecur/loadfile.hpp> #include <epecur/StdHits.hpp> static const int MAX_TIME_COUNTS = 384; class DriftCalibHook : public StdHits { private: int drift_calib_cut; unsigned int generate_calibration_curve( chamber_...
#include "sdw_string.h" void SetLocale() { #if SDW_PLATFORM == SDW_PLATFORM_MACOS setlocale(LC_ALL, "en_US.UTF-8"); #else setlocale(LC_ALL, ""); #endif } n8 SToN8(const string& a_sString, int a_nRadix /* = 10 */) { return static_cast<n8>(strtol(a_sString.c_str(), nullptr, a_nRadix)); } n8 SToN8(const wstring& a_s...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include<QPushButton> #include<QPaintEvent> #include<QPainter> #include<QPen> #include<vector> #include<QLabel> #include"generatesudoku.h" #include"dancelinked.h" #include<QDebug> #include<QTime> #include<QTimer> #include<QMessageBox> using namespace st...
#include <string> #include <vector> #include <fstream> #include <iostream> #include <memory> #include <map> #include "caffe/caffe.hpp" #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #define INPUT_SIZE_NARROW 600 #define INPUT_SIZE_LONG 1000 using std...
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. #include "CyLandEditorDetailCustomization_ProceduralLayers.h" #include "IDetailChildrenBuilder.h" #include "Framework/Commands/UIAction.h" #include "Widgets/Text/STextBlock.h" #include "Framework/MultiBox/MultiBoxBuilder.h" #include "Misc/MessageDialog.h" #i...
#include <iostream> #include <vector> #include <utility> class InsertionSort { public: void operator()(std::vector<int>& inputStore) { int key{0}, j{0}, storeSize = inputStore.size(); for (int i = 1; i < storeSize; ++i) { key = std::move(inputStore[i]); j = i - 1; while ((j>=0) && (inputStore...
#include <Keypad.h> #include <TimeAlarms.h> #include <TimeLib.h> #include <Time.h> #include <SPI.h> #define BOREWELL_NODE #define NODE_HAS_RELAY #define NODE_WITH_HIGH_LOW_FEATURE #define WATER_TANK_NODE #define KEYPAD_1R_2C #define MY_RADIO_NRF24 #define MY_NODE_ID BOREWELL_NODE_ID //#define MY_PARENT_NODE_ID REPEAT...
#ifndef __POLY_SPRITE_H__ #define __POLY_SPRITE_H__ #include "cocos2d.h" #include "cocos-ext.h" USING_NS_CC; class PolySprite: public cocos2d::CCSprite { public: PolySprite() : vertexs_(NULL), uvs_(NULL), indices_(NULL), verCnt_(0) {} virtual ~PolySprite(); static PolySprite* create(const char *pFile, const co...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "../base.h" #include "Windows.Devices.Bluetooth.Background.0.h" #include "Windows.Devices.Bluetooth.0.h" #include "Windows.Devices.Bluetooth.Advertisement.0.h" #include "Windows.Device...
#ifndef _ROS_cob_perception_msgs_ActionRecognitionmsg_h #define _ROS_cob_perception_msgs_ActionRecognitionmsg_h #include <stdint.h> #include <string.h> #include <stdlib.h> #include "ros/msg.h" #include "std_msgs/Header.h" namespace cob_perception_msgs { class ActionRecognitionmsg : public ros::Msg { public: ...
#include<bits/stdc++.h> using namespace std; double x1=(double)1/2,x2=-(double)1/2,x3=-(double)1/2; void jacobi( ) { x1=(double)1/4*(2-x2-x3); x2=(double)1/5*(-6-2*x3-x1); x3=(double)1/3*(-4-2*x2-x1); cout<<x1<<" " <<x2<<" " <<x3<<" "<<endl; } int main() { for(int i=0;i<10;i++) jacobi(); return...
#pragma once #include <appdata.h> #include <gps_state.h> #include <icon.h> #include <map.h> #include <uicontrol.h> #include <cstdlib> #include <map> #include <osm2go_annotations.h> class MainUiDummy : public MainUi { public: std::multimap<menu_items, bool> m_actions; MainUiDummy() : MainUi(), msg(nullptr) {} ...
#include "userdefines.h" userDefines::userDefines() { } userDefines::~userDefines() { int size = _defs.size(); if(size != 0) _defs.clear(); } sExpression * userDefines::returnExisting(string name) { std::vector<sExpression *>::size_type iter; std::transform(name.begin(), name.end(), name.begin(), ::toupper)...
// Adapted from: // Code Example for jolliFactory's Bi-color 16X16 LED Matrix Conway's Game of Life example 1.0 // and Adafruit NeoPixel Example 'simple' #include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> #endif #define Width 8 #define Height 4 // Which pin on the Arduino is connected to the Neo...
/* ID: sarthak16 PROG: friday LANG: C++ */ #include <iostream> #include <fstream> #include <string> using namespace std; int isLeap(int); int perfectWeek(int); int month[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int ans[7] = { 0, 0, 0, 0, 0, 0, 0 }; int presentDay = 3; //perfectWeek(3/* 3 is monday...
#ifndef CPP_SERVICE_LAYER_BACKEND_H_ #define CPP_SERVICE_LAYER_BACKEND_H_ #include <map> #include <set> #include <string> #include <vector> #include <grpcpp/grpcpp.h> #include "chirp_service_layer.grpc.pb.h" #include "key_value_client_grpc.h" // service layer backend class that can strategically call the key value g...
#pragma once #include "image.h" class PFMImage : public Image { public: //拷贝构造函数 PFMImage(const PFMImage& pfmImage); //赋值函数 PFMImage& operator=(const PFMImage& pfmImage); //pfmType为0时代表grayscale,其余代表color PFMImage(int width, int height, int pfmType, float* pixel); PFMImage(int type);//type为0代表单通道,...
#include <iterator> #include <set> #include <string> #include <fstream> #include <cstdlib> #include <ctime> #include <iomanip> #include <cmath> template <class Iter> double calc_median(Iter, const Iter&); template <class Iter> double calc_rms(const Iter&, const Iter&); template <class Iter> double calc_std...
#include "9_C++Primer6h.h" #include <iostream> using namespace std; List::List() { max = 10; total = 0; } bool List::append(int n) { if (total < 10) { contents[total] = n; total++; return true; } return false; } bool List::isFull() const { return total == 10; } bool List::isEmpty() const { return tota...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a[n]; for(int i=0; i<n; i++) cin>>a[i]; int ans = 0; bool f = 1; for(int i=0; i<n-1; i++) { if(a[i]%2!=0) { a[i]++; a[i+1]++; ans += 2; } } if(a[n-1]%2==0) cout<<ans<<endl; else cout<<"NO"<<endl; }
/* * UAE - The Un*x Amiga Emulator * * MC68881/68882/68040/68060 FPU emulation * * Native FPU, MSVC 80-bit hack */ #include "sysconfig.h" #include "sysdeps.h" #include "options.h" #if CPU_x86_64 || CPU_i386 #include <math.h> #include <float.h> #include <fenv.h> #define USE_HOST_ROUNDING 1 #include "memory.h" #inc...
#include<bits/stdc++.h> using namespace std; int main() { long long i,j,m,n,b,cnt1=0,cnt2=0,ans1,ans2,l; cin>>n; long long a[n]; //cin>>l; for(i=0; i<n; i++) { cin>>a[i]; } sort(a,a+n); int cn; for(i=0; i<n; i++) { ans1 = a[n-1] - a[0]; ...
#pragma once #include "Constraint.h" class HingeConstraint : public Constraint { private : int m_idx[5]; float m_rest_angle; float m_stiffness; public : HingeConstraint(Particle* p0, Particle* p1, Particle* p2, Particle* p3, Particle* p4, float rest_angle, float stiffness) { m_constrained_particles.push_back(p...
#include <iostream> #include <queue> #include <vector> #include <math.h> using namespace std; int prime[10000] = { 0, }; int isvisit[10000] = { 0, }; int dist[10000] = { 0, }; vector<int> ans; queue<int> q; int IsPrimeNumber(int n) { int i = 0; int last = n / 2; if (n <= 1)//소수는 1보다 큰 자연수여야 함 { return 0; } fo...
#ifndef MAPOBJECT_H #define MAPOBJECT_H #include "dllmacro.h" #include "shapes.h" #include <map> #include <vector> #include <iostream> namespace POICS { class POICS_API POI { public: int id; std::string name; int activityType; int activityTime; Rect border; std::vector<double> topic_relevance; POI(in...
#pragma once #include <vector> #include "Vector.hh" class Shape{ protected: std::string filename; std::vector<Vector3D> points; Vector3D translation; public: void translate(Vector3D change) {translation = translation + change;} inline static int counterTotal = 0; inline static int coun...
//program to find maximum and minimum from given array. #include <iostream> using namespace std; int main() { int ar[5],t; cout<<"Please enter the 5 number\n"; for(int i=0;i<5;i++) { cin>>ar[i]; } for(int i=0;i<5;i++) { for(int j=i+1;j<5;j++) { if(ar[i]>ar[j]) { t=ar[j]; ar[j]=ar[i]; ar[...
#include "VertexLayout.h" #include <cassert> vkw::VertexLayout::VertexLayout(const std::vector<VertexAttribute>& layout) :m_Layout(layout) { for (const VertexAttribute& type : m_Layout) { m_Stride += uint32_t(GetVertexTypeSize(type)); } } uint32_t vkw::VertexLayout::GetStride() { return m_Stride; } const std:...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { unsigned int n, a, max=0; cin>>n; if(n>=1&&n<=100000){ while(n--){ cin>>a; if(a>=1&&a<=1000000000){ if(max>a){ ...
#ifndef LinkedList_H #define LinkedList_H class LinkedList{ public: LinkedList(){ Next = 0; PosCount = 0; atEnd = false; } ~LinkedList(){} bool IsEnd(){return atEnd;} bool IsEnd(int Position){return PosCount == Position;} int GetData(int Index) {return DataList[Index];} void Add(int Data){ Da...
 /// @file ZddImp2.cc /// @brief ZddImp2 の実装ファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2005-2011 Yusuke Matsunaga /// All rights reserved. #include "ZddImp2.h" #include "YmNetworks/BdnMgr.h" #include "YmNetworks/BdnNode.h" BEGIN_NAMESPACE_YM // @brief コンストラクタ // @param[in] mgr ZddImp2::ZddIm...
/* Copyright 2017-2018 All Rights Reserved. * Gyeonghwan Hong (redcarrottt@gmail.com) * Eunsoo Park (esevan.park@gmail.com) * Injung Hwang (sinban04@gmail.com) * * [Contact] * Gyeonghwan Hong (redcarrottt@gmail.com) * * Licensed under the Apache License, Version 2.0(the "License"); * you may not use this f...
#include "kmlp.h" #include <math.h> #include <float.h> #include <stdlib.h> #include <time.h> KMLP::KMLP(int nInput, int nHidden, int nOutput, int id) { m_nInput = nInput; m_nHidden = nHidden; m_nOutput = nOutput; m_netH = new double[m_nHidden]; m_netO = new double[m_nOutput]; m_nvInput = new d...
#include<iostream> #include<math.h> #include<iomanip> using namespace std; int main() { string k; double pole,r; clog<<"Podaj pole powierzchni figury: "; cin>>k; try { pole=stod(k,0); } catch (exception &e) { cerr<<"Pole nie może być ujemne!"<<endl; return 0; } if (pole>=0) { r=pow(pole/M_PI,0...
#ifndef CAMERA_H #define CAMERA_H //DirectX9 Graphics The Definitive Guide to Direct3D #include "Defines.h" #include "MathDX.h" #include <d3d9.h> #include <d3dx9.h> namespace kyrbos { class Renderer; class ENGINE_API Camera { public: Camera(Renderer * renderer); ~Camera(); //Called each frame to update...
////////////////////////////////////////////////////////////////////////////////// // Created by Maciej Kopa 230451 and Dominik Czerwoniuk 230446. // ////////////////////////////////////////////////////////////////////////////////// #include <stdio.h> //printf() #include <dos.h> //pokeb(), inportb() #i...
/** * * @file DynamixelCommunicationProtocolV1.hpp * @brief Dynamixel communication protocol version 1.0 address * @auther Naoki Takahashi * @todo Create base class * **/ #pragma once #include <cstdint> #include <string> #include <vector> #include "../SerialFlowScheduler.hpp" namespace IO { namespac...
#ifndef UtilitiesH #define UtilitiesH #include <iostream> #include <fstream> #include "LinearAlgebra.h" #include "GLGeometryViewer.h" class Utilities { public: static void readDataFile(string fileName, vector<Point2D> * data); static void getPoints(GLGeometryViewer * viewer, vector<Point2D> * data); static void ...
// License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 FRAMOS GmbH. #include "d400e.h" #include "smcs_cpp/CameraSDK.h" namespace librealsense { namespace d400e { heartbeat_time::heartbeat_time() { constexpr seconds DEFAULT_HEARTBEAT_TIME = 3; s...
#ifndef _MATERIAL_H_ #define _MATERIAL_H_ #include "color.h" #include<string> class Material { public: Material(const string&_name="default", const Color&_ka=Color(0.2f,0.2f,0.2f), const Color&_kd=Color(0.8f,0.8f,0.8f), const Color&_ks=Color(1.0f,1.0f,1.0f), float _shininess=10.f); string name; Color...
/** * Name: LiFuelGauge * Author: Nick Lamprianidis <nlamprian@gmail.com> * Version: 1.0 * Description: A library for interfacing the MAXIM MAX17043/MAX17044 * Li+ fuel gauges. These ICs report the relative state of charge * of the connected Lithium Ion Polymer battery, and the library * can help yo...
#ifndef COMPUTER_VISION_DETECT_CIRCLE_H #define COMPUTER_VISION_DETECT_CIRCLE_H #include <iostream> #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> int detectCircle(cv::Mat &image); #endif
#ifndef ___CHARACTER__ #define ___CHARACTER__ #include "definitions.h" #include "gaps.h" #include "matrixUtils.h" #include "indelCoderOptions.h" using namespace std; class character { public: explicit character(int coord_5p, int coord_3p, int numOfSquencs, int numOfStates=0):_coord_5p(coord_5p), _...
// OnHScrollLineRight.h #ifndef _ONHSCROLLLINERIGHT_H #define _ONHSCROLLLINERIGHT_H #include "ScrollAction.h" #include "HorizontalScroll.h" class OnHScrollLineRight : public ScrollAction { public: OnHScrollLineRight(HorizontalScroll *horizontalScroll); OnHScrollLineRight(const OnHScrollLineRight& source); virtual...
#ifndef _SERVICIOFTPANONIMO_H #define _SERVICIOFTPANONIMO_H #include "servicio.h" #include "dominio.h" class cServicioFTPAnonimo:public cServicio { public: //Constructor e iniciador cServicioFTPAnonimo(cDominio *dominio); bool iniciar(); //Agrega la configuracion al archivo proftpd.conf int agregarFilePro...
#ifndef BACKPACK_H #define BACKPACK_H #include "Item.h" #include "../inventory/IStorage.h" class Backpack : public IStorage, public Item { }; #endif // BACKPACK_H
//////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2006-2010 MStar Semiconductor, Inc. // All rights reserved. // // Unless otherwise stipulated in writing, any and all information contained // herein regardless in any format shall remain the sole proprietary of ...
//main函数是程序的唯一入口!没有它整个程序就没有入口,无法执行! int main(){//{}包起来的叫做代码块 return 0; }
#ifndef TRENDLOADTHEAD_H #define TRENDLOADTHEAD_H #include <QThread> class QString; class QStringList; class TrendChart; class TrendLoadThead : public QThread { public: TrendLoadThead(TrendChart *trChart); void run(); void setLen(int v) {len=v;} void setQuery(QString v) {sQuery=v;} private: Tr...
#pragma once #include <GL/glew.h> class Sprite { public: Sprite(); ~Sprite(); void init(float x, float y, float width, float height); void draw(); private: float _x; float _y; float _width; float _height; //Guaranteed to be 32 bits. GLuint _vboID; };
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Devices.Radios.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_eac62c40_8dbc_5854_8ba0_b7b9940e7389 #define WINRT_GENERIC_eac...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/PlayerController.h" #include "TankPlayerController.generated.h" class ATank; /** * */ UCLASS() class BATTLETANKS_API ATankPlayerController : public APlayerController { GEN...
#ifndef TINYENGINE_LTE_CRYPTO_H_ #define TINYENGINE_LTE_CRYPTO_H_ // Compile: // CXXFLAGS=-lblkid make hdio // Run: // sudo ./hdio /dev/<device> #pragma once #if defined(__linux__) || defined(__linux) || defined(linux) #include <blkid/blkid.h> #endif #include <err.h> #include <errno.h> #include <fcntl.h> #if defined...
#include "d3dUtil.h" Microsoft::WRL::ComPtr<ID3D12Resource> d3dUtil::CreateDefaultBuffer( ID3D12Device* device, ID3D12GraphicsCommandList* cmdList, const void* initData, UINT64 byteSize, Microsoft::WRL::ComPtr<ID3D12Resource> &uploadBuffer) { Microsoft::WRL::ComPtr<ID3D12Resource> defaultBuffer; //Creat...
/** * Investor.cpp * Observer class **/ #include <iostream> #include <string> #include <list> #include "Investor.h" #include "StockBase.h" using namespace std; Investor::Investor(const std::string &name) { static int s_investorId = 0; m_id = s_investorId++; m_name = name; } void Investor::notify(StockBase *sto...
#ifndef ROSE_ARMINSTRUCTIONENUM_H #define ROSE_ARMINSTRUCTIONENUM_H #include <string> enum ArmRegisterClass { arm_regclass_gpr, /* general purpose registers */ arm_regclass_psr /* program status registers */ }; enum ArmProgramStatusRegister { arm_psr_current, arm_psr_saved }; ...
#ifndef MTLWRITER_H #define MTLWRITER_H #include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include <vector> #include <fstream> #include <sstream> using namespace std; class MtlWriter { public: MtlWriter(); void open(); }; #endif
#if !defined MyCar_H_ #define MyCar_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 const int MAX_SPEED = 500; const int MAX_NAME_LENGTH = 20; #include "CarLocalServerTypeInfo.h" class MyCar : public IEngine, public ICreateMyCar, public IStats { public: MyCar(); virtual ~MyCar(); // IUnknown ST...
#include<iostream> using namespace std; /* Число символов, какой использовать символ, и какая будет линия - вертикальная, или горизонтальная - указывает пользователь. */ int main() { setlocale(LC_ALL, "Rus"); int simbolCount, lineType, index = 0; char simbol; cout << "\tВвыведите количество символов в линии: ";...
#pragma once #include "iostream" #include "vector" #include "map" #include "vector" #include "map" #include "math.h" using namespace std; class lsm { private: vector<pair<double, double> > points; public: void init() { points.push_back(make_pair(0, 68)); points.push_back(make_pair(10, 67.1)); points.push_back(m...
#ifndef WIRE_HPP #define WIRE_HPP #include <string> /* * Class reprenting a wire connected between two components. * The wire can hold a single value, 0 (false) or 1 (true). * The wire does not have references to the components it connects. Rather, * the components must get/set the value held in the wire themselve...
// // Created by 98595 on 2020/4/18. // https://www.acwing.com/blog/content/9/ // 自定义哈希表,在unordered_map和unordered_set中不能直接存入pair // https://blog.csdn.net/cloud323/article/details/63251495这个博客可以学习一下const关键字的用法 #include <iostream> #include <unordered_map> #include <vector> using namespace std; class Myclass { public: ...
/* * Muhammed Burak Bugrul * 150140015 * AI - Assignment 1 * 09.11.2018 */ #include <cstdio> #include <iostream> #include <queue> #include <set> #include <vector> #include <cmath> #include <ctime> #include "node.hpp" using namespace std; struct AStar{ int maxNodeCount = 0; int totalNodeCount = 1; i...
//================================================================// // // //$Id:$ // // // // smbreak.cpp ...
#include <iostream> #include <string> using namespace std; class V1 { protected: int i; public: V1() : i(0) {} virtual void a(string msg) { i++; print("V1", msg, &i); } void b(string msg) { i += 3; print("V1", msg, &i); } void print(string msg1, string msg2, int* j) { cout << msg1 << m...
#include "stdafx.h" #include "Level.h" Level::Level(int _width, int _height, int _floor) { width = _width; height = _height; floor = _floor; DungeonGenerator* g = new DungeonGenerator(); dungeon = g->GenerateRooms(width, height, floor); chooseStartRoom(); if (floor < 4) { chooseStairRoom(); } else { ch...
#ifndef _EULER_ANGLES_H_ #define _EULER_ANGLES_H_ #pragma anon_unions namespace Euler { struct CAngles { double axis[1][3]; const double * operator[]( unsigned int i ) const {return axis[i];} double * operator[]( unsigned int i ) {return axis[i];} double X() const { return axis[0][0]; } double Y() const {...
#include "window.h" #include "PandoranRemains.h" #include "sound.h" #include "fileIO.h" #include "timer.h" #include "xinput.h" #include "gamecode.h" global_variable bool gRunning; global_variable HWND gWindow; global_variable win32_offscreen_buffer gBackBuffer; global_variable HDC gWindowContext; global_variable Soun...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
#include "series.h" namespace series { std::vector<int> digits(std::string num) { std::vector<int> output; for (auto i : num) output.push_back(i - 48); return output; } std::vector<std::vector<int>> slice(std::string num, int pr) { if (num.length() < pr) throw std::domain_error("Dupa"); std::vect...
// // Fans.h // fan-controller // // Created by Damian Stewart on 11/24/11. // Copyright (c) 2011 __MyCompanyName__. All rights reserved. // #ifndef fan_controller_Fans_h #define fan_controller_Fans_h #include "ofMain.h" static const int NUM_FANS=8*2*8; class Fans { public: void setup(); void loa...
#pragma once #include <string> #include <vector> #include "tangible_filesystem.h" #include "../EngineLayer/EngineLayer.h" using namespace EngineLayer; #include "MzLibUtil.h" using namespace MzLibUtil; #include "../TaskLayer/TaskLayer.h" using namespace TaskLayer; namespace Test { class TestToml final { public...