text stringlengths 8 6.88M |
|---|
#ifndef COMPUTER_VISION_SORT_FUNCTIONS_H
#define COMPUTER_VISION_SORT_FUNCTIONS_H
#include <vector>
#include <iostream>
std::vector<int> selectionSort(std::vector<int> numbers, int &stepCounter, int o = 1);
int* selectionSort(int array[], int size, int &stepCounter, int o = 1);
std::vector<int> insertionSort(std::ve... |
/***************************************************************************
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... |
#pragma once
#include "calibration/Calibration.h"
#include "Energy.h"
class TH1;
namespace ant {
namespace expconfig {
namespace detector {
struct PID;
}}
namespace calibration {
class PID_Energy :
public Energy,
public ReconstructHook::EventData
{
public:
PID_Energy(
std::shar... |
#include<bits/stdc++.h>
using namespace std;
int solve(int n)
{
int end = (2*(n-1))+1;
int start = 1;
int value = (start + end)/2;
int total = 0;
for(int i=0;i<(n/2);i++)
{
int cur = (2*i)+1;
total+=(value-cur);
}
return total;
}
int main()
{
int n;
cin >> n;
cout << solve(n) << endl;
} |
#include "CValuteEntry.h"
#include "sdltest2.h"
#include <string>
#include <iostream>
#include <algorithm>
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
CValuteEntry::CValuteEntry(std::string ANominal, std::string ACharCode, std::string AValue)
{
Font = TTF_OpenFont(FONT_FILENAME, FONT_SIZE);
Nomi... |
// Copyright ⓒ 2020 Valentyn Bondarenko. All rights reserved.
#pragma once
#include <IGameObject.hpp>
namespace be::game
{
class Terrain : public IGameObject
{
public:
Terrain() = default;
~Terrain() = default;
Terrain(const Terrain&) = delete;
Terrain(Terr... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "../base.h"
#include "Windows.System.RemoteSystems.0.h"
#include "Windows.Foundation.0.h"
#include "Windows.Foundation.Collections.0.h"
#include "Windows.Networking.0.h"
#include "Wind... |
// 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 ... |
#pragma once
#include "cocos2d.h"
#include <string>
#include "Singleton.h"
typedef enum
{
etNone = 0,
etItem
} eElementType;
typedef enum
{
PID_NONE = 0,
PID_STEP2,
PID_STEP3,
PID_STEP4,
PID_STEP5,
PID_TOTAL,
PID_MAX,
} PRODUCT_ID;
struct WordCard
{
std::string word;
int level;
std::string tex... |
/*
1017. 소수 쌍
이분 매칭
http://blog.naver.com/PostView.nhn?blogId=kks227&logNo=220617618294
*/
#include <iostream>
#include <vector>
#include <stack>
#include <cstring>
#include <algorithm>
using namespace std;
int N, A, First, Pair;
int OMax = 0, EMax = 0;
vector<int> Arr[2];
vector<int> Adj[25];
int Left[25];
int... |
#ifndef WIZWELCOMEDIALOG_H
#define WIZWELCOMEDIALOG_H
#include <QHash>
#include <QDialog>
#include "share/wizverifyaccount.h"
#include "share/wizcreateaccount.h"
#include "share/wizsettings.h"
class QAbstractButton;
class QUrl;
namespace Ui {
class WelcomeDialog;
}
class WelcomeDialog : public Q... |
#include <iostream>
using namespace std;
#ifndef TEST_H
#define TEST_H
class Test{
string person_name;
int test_number;
int questions_count;
vector <int> points;
public:
Test();
Test(string person_name,int test_number,int questions_count, vector <int> points);
//void read... |
#ifndef CHANNEL_H
#define CHANNEL_H
#include <rclcpp/rclcpp.hpp>
#include <ackermann_msgs/msg/ackermann_drive_stamped.hpp>
class Mux;
class Channel {
private:
// Publish drive data to simulator/car
rclcpp::Publisher<ackermann_msgs::msg::AckermannDriveStamped>::SharedPtr drive_pub;
// Mux index for this ... |
#ifndef SHOPMAINWINDOW_H
#define SHOPMAINWINDOW_H
#include <QLineEdit>
#include <QtGui>
#include <QMainWindow>
#include "tool/editablequerymodel.h"
namespace Ui {
class ShopMainWindow;
}
typedef struct CheckLineEdit
{
int editType;
int checkType;
bool checkFailed;
} CHECK_LINE_EDIT_S;
class QFileDialog;... |
//Manca funzione find
#ifndef LINQEDINCLIENT_H
#define LINQEDINCLIENT_H
#include "string"
#include "utente.h"
#include "db.h"
using std::string;
class LinQedInClient{
private:
Utente* userClient; //puntatore polimorfo
DB* database; //Caricato da file e solo in lettura
public:
LinQedInClient(Username);
... |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fr(i,n) for (ll i=0;i<n;i++)
#define fr1(i,n) for(ll i=1;i<=n;i++)
int main()
{
ll m,n,i,j,k;
cin>>n>>k;
ll a[n+5];
fr1(i,n)cin>>a[i];
sort(a+1, a+n+1);
ll l=1, r=n;
while(1)
{
while(... |
#include "DirectZob.h"
#include "Events.h"
#include "tinyxml.h"
#include "ZobObject.h"
#include "SceneLoader.h"
static char buffer[MAX_PATH];
DirectZob *DirectZob::singleton = nullptr;
DirectZob::DirectZob()
{
DirectZob::singleton= this;
}
DirectZob::~DirectZob()
{
//delete m_engine;
delete m_meshManager;
dele... |
#pragma once
#include "value.h"
class cScene;
class cFade;
class cSceneMgr
{
private:
_SYNTHESIZE_INHER( cScene*, m_pScene, Scene );
_SYNTHESIZE_REF_INHER( float, m_fFade, Fade );
_SYNTHESIZE_REF_INHER( float, m_fFadePlus, FadePlus );
_SYNTHESIZE_INHER( bool, m_IsFade, IsFade );
_SYNTHESIZE_INHER( int, m_nSceneI... |
#include <ncurses.h>
#include <stdlib.h>
#include "Player.h"
#include "Ball.h"
#include "Player2Factory.h"
#include "Player2.h"
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
//State Definitions
static int START_MENU = 0;
static int PLAY_GAME = 1;
static int UPDATE_SCORE = 2;
static int ... |
#include "ResursaEconomica.h"
#include <iostream>
#include "Date.h"
using namespace std;
void ResursaEconomica::print(ostream& os, ResursaEconomica& re) const
{
os << "Nume: " << re.nume << endl;
os << "Data intrarii in companie: " << re.data << endl;
os << "Valoare: " << re.valoare << endl;
}
void Res... |
#include "tinyxml.h"
#include <iostream>
#include <sstream>
#include <string>
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkImageDuplicator.h"
#include "itkImageRegionIterator.h"
#define _USE_MATH_DEFINES
int main(int argc, char *argv[])
{
if(argc != 2)
{... |
#pragma once
//PaintHighLightVisitor.h
#ifndef _PAINTHIGHLIGHTVISITOR_H
#define _PAINTHIGHLIGHTVISITOR_H
#include "Visitor.h"
typedef signed long int Long;
class CDC;
class HighLight;
class PaintHighLightVisitor :public Visitor {
public:
PaintHighLightVisitor(CDC *dc, HighLight *selectedBuffer, Long xPosition, Lon... |
#include <sstream>
#include <stack>
#include <string>
class Solution {
public:
std::string simplifyPath(std::string path) {
std::stringstream ss(path);
std::string str;
std::stack<std::string> sta;
while (getline(ss, str, '/')) {
if (str == "" || str == ".") {
continue;
} else i... |
/////////////////////////////////////////////////
#include "ulity.h"
#include "stdio.h"
#include "string.h"
#include "assert.h"
#include <QString>
#include <QApplication>
bool isValidUseString(QString& str)
{
if (str.isEmpty()) return false;
int nLen = str.length();
if (nLen <= 0) return false;
#if 1
... |
#ifndef ROSE_ABISTUFF_H
#define ROSE_ABISTUFF_H
#include <vector>
#include <string>
#include <iosfwd>
//! Support for cross compilation or extended UPC support
/*! UPC data type sizes depend on a specified runtime implementation,
* So we allow users to optionally provide customized sizes and alignments.
*/
struc... |
#ifndef FUNCMGR_H
#define FUNCMGR_H
/// @file FuncMgr.h
/// @brief FuncMgr のヘッダファイル
/// @author Yusuke Matsunaga (松永 裕介)
///
/// Copyright (C) 2005-2012, 2014 Yusuke Matsunaga
/// All rights reserved.
#include "YmLogic/TvFunc.h"
#include "YmUtils/IDO.h"
#include "YmUtils/ODO.h"
BEGIN_NAMESPACE_YM
///////////////... |
/* Input-side (button) Arduino code */
#include <stdlib.h>
#include <dht.h> //// library for Temp/Humidity Sensor
#include <avr/wdt.h> // library for default watchdog functions
#include <avr/interrupt.h> // library for interrupts handling
#include <avr/sleep.h> // library for sl... |
/*
* SPDX-FileCopyrightText: (C) 2017-2022 Daniel Nicoletti <dantti12@gmail.com>
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef URIFOR_H
#define URIFOR_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
# include <grantlee/filter.h>
# include <grantlee/node.h>
# include <grantlee/safestring.h>
# include <grantlee/... |
#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,val, sizeof arr)
#defi... |
#include "stdafx.h"
#include "ImageWnd.h"
#include "ui_ImageWnd.h"
#include "HsImage.h"
#include "HmyMprMaker.h"
#include "WorkZone.h"
#include "OperateMprLines.h"
#include "ResliceControl.h"
#include "AppConfig.h"
#include "Hmy3DMath.h"
extern RECT GetShowRcByImgSize(RECT rc, double ImgWidth, double ImgHeight);
Im... |
#pragma once
class BaseWindow
{
public:
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
BaseWindow() : m_hwnd(NULL) { }
void Register();
BOOL Create(
PCWSTR lpWindowName,
DWORD dwStyle,
DWORD dwExStyle = 0,
int x = CW_USEDEFAULT,
int y = CW_USEDEFAULT,
int nWidth ... |
#pragma once
class IVideoFrameSink
{
public:
virtual ~IVideoFrameSink() {};
virtual void Send(
winrt::Windows::Media::Capture::Frames::MediaFrameReference frame,
long long pTimestamp) = 0;
}; |
//
// common_request_handler.cc
// ~~~~~~~~~~~~~~~~~
//
#include <string>
#include "common_request_handler.h"
#include "response.h"
#include "server_information.h"
#include "response_helper.h"
#include "logger.h"
request_handler* common_request_handler::Init(const std::string& location_path, const NginxConfig& config... |
#pragma once
#include "define.h"
class board
{
public:
board();
~board();
int checkBoard();//判断棋局,更新分数栏,顺便判断游戏状态(输、赢、继续)
inline void lineMove(int *line); //将一条线上的数字滑动到一段 并且按照规则归并
void leftMove(); //左滑
void rightMove(); //右滑
void upMove(); //上滑
void downMove(); //下滑
void Usermove(int choice); //用户滑动一次
v... |
#include "WeaponComponent.h"
#include "Net/UnrealNetwork.h"
#include "..//Public/Character/Player/PlayerCharacter.h"
#include "..//Public/Weapons/WeaponActor.h"
UWeaponComponent::UWeaponComponent()
{
//PrimaryComponentTick.bCanEverTick = true;
//SetIsReplicated(true);
}
void UWeaponComponent::BeginPlay()
{
Super:... |
#pragma once
//Line.h
#ifndef _LINE_H
#define _LINE_H
#include "Composite.h"
#include <string>
using namespace std;
class Character;
class Line : public Composite {
public:
Line(Long capacity = 256);
Line(Long capacity, string str);
Line(const Line& source);
virtual ~Line();
Line& operator=(const Line& source);... |
#include "Viiva.h"
class smooth{
int add_i = 0;
public:
std::vector<float> values;
float get();
void add(float);
unsigned int max_size = 10;
};
class pensseli{
public:
static const int MAX_KOKO = 300;
bool viivaJatkuu = false;
float koko = 10;
float blur = 0.1;
float... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s1,s2;
cin >> nouppercase >> s1 >> s2;
for(int i = 0; i < s1.size(); i++)
{
if(s1[i] > 90 )
{
s1[i] -= 32;
}
if(s2[i] > 90 )
{
s2[i] -= 32;
}
}
if(s1 =... |
#ifndef __LPC1300_SERIES_INCLUDED__
#define __LPC1300_SERIES_INCLUDED__
#if !defined(PART)
#error PART not defined! Must be one of the following literal values: {lpc1313, lpc1343}
#elif PART == lpc1313 //32K Flash, 8K RAM
#elif PART == lpc1343 //32K Flash, 8K RAM, USB
#else
#error PART must be one of the foll... |
/*
Mercury/32 4.51 SMTPD CRAM-MD5 Pre-Auth Remote Stack Overflow(Universal)
Public Version 1.0
http://www.ph4nt0m.org
2007-08-22
Code by: Zhenhan.Liu
Original POC: http://www.milw0rm.com/exploits/4294
Vuln Analysis: http://pstgroup.blogspot.com/2007/08/tipsmercury-smtpd-auth-cram-md5-pre.html
Our Mail-... |
#pragma once
#include "ChunkOctreeNode.h"
#include <vector>
#include <algorithm>
#include <thread>
#include <mutex>
//TODO: Update blockGroups
class ChunkOctree
{
public:
//isBuild: should this chunk be builded. True = build chunk, False = destruct chunk.
//needDelete: should this chunkNode be freed after destr... |
/**
* @file InputReaction.h
* @author matthewpoletin
*/
#pragma once
#include "Application.h"
using namespace liman;
void TempInputReaction(); |
#include <iostream>
#include "graph.h"
#include "airports.h"
#include "node.h"
namespace {
using Airports::kAirports;
using Airports::AirportID;
using Airports::AirportData;
} // namespace
int main(int argc, char** argv) {
if (argc != 3) {
std::cout << "Error: requires initial and final airport names" << std:... |
#pragma once
#include <string>
#include <memory>
#include <vector>
#include "constants.h"
#include "IConfigConsumer.hpp"
#include "ISite.hpp"
struct SFile;
class CGridSite : public ISite
{
public:
std::vector<std::unique_ptr<CStorageElement>> mStorageElements;
CGridSite(const std::uint32_t multiLocationIdx, s... |
/*
* SPDX-FileCopyrightText: (C) 2017-2022 Matthias Fehring <mf@huessenbergnetz.de>
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "validatorboolean_p.h"
#include <QStringList>
using namespace Cutelyst;
ValidatorBoolean::ValidatorBoolean(const QString &field, const ValidatorMessages &messages, const QStrin... |
#include "ConcreteAggregate.h"
#include "ConcreteIterator.h"
#include <iostream>
int main(int argc, char *argv[])
{
std::shared_ptr<ConcreteAggregate> menu = std::make_shared<ConcreteAggregate>();
menu->addFruit("Apple");
menu->addFruit("Orange");
menu->addFruit("Melon");
menu->addFruit("Banana");... |
#pragma once
namespace Render {
constexpr char PointCloudVertShader[] = R"(#version 330 core
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aCol;
uniform mat4 u_projView;
out vec4 vertexColor;
void main()
{
vertexColor = vec4(aCol, 1.0);
gl_Position = u_... |
#include <iostream>
#include <string>
using namespace std;
int main() {
string simonPattern;
string userPattern;
int userScore;
int i;
userScore = 0;
simonPattern = "RRGBRYYBGY";
userPattern = "RRGBBRYBGY";
/* Your solution goes here */
for (int i = 0; i <simonPattern.length() ... |
/*反转字符串*/
void Reverse(char *s, int n) {
for (int i = 0, j = n - 1; i < j; i++, j--) {
char c = s[i];
s[i] = s[j];
s[j] = c;
}
int c = 0;
}
/*双指针删除某个字符的做法*/
void doubleptr(char *str)
{
char *p = str;
char *q = str;
while ((*p = *q )!= '\0') //注意此处的赋值
{
if (*p!='a')
{
p++;
q++;
}
else
{
... |
// Created by YUANZHONGJI on 2015/09
#include "LockGameLayer.h"
#include "Store.h"
USING_NS_CC;
LockGameLayer* LockGameLayer::create(GameNumber number)
{
LockGameLayer *layer = new (std::nothrow) LockGameLayer();
if (layer && layer->init(number))
{
layer->autorelease();
return layer;
}
CC_SAFE_DELETE(layer... |
#include<iostream>
using namespace std;
int main()
{
int i=1;
for(;i<=5;)
{
cout<<"hello"<<endl;
i++;
}
return 0;
} |
///event_queue.h
//
//
#ifndef EVENT_QUEUE_H
#define EVENT_QUEUE_H
#include <memory>
#include <iostream>
#include "fddef.h"
NAMESP_BEGIN
namespace net
{
template<class Poller>
class EventQueue
{
public:
EventQueue()
{
}
~EventQueue()
{
}
void process();
template<class Event>
void bind(fd_t fd, Eve... |
//this is kind of a poor example for plugins, since the format's not totally known and the code is WIP.
//but it does showcase some interesting usages.
#include "stdafx.h"
#undef max
#undef min
#include "half.hpp"
using half_float::half;
#include <map>
#include <stack>
#include <stdint.h>
const char *g_pPluginName = ... |
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
// #define DEBUG
const int maxn = 5 * 1e5 + 5;
int n, arr[maxn], tmp[maxn];
ll mergeSort(int left, int right) {
if (left >= right)
return 0;
int mid = (left + right) >> 1;
ll res = mergeSort(left, mid) + mergeSort(mid... |
#include "mutex_thread.h"
mutex_thread::mutex_thread::mutex_thread(unsigned int usec)
{
this->sleep_time=usec;
}
mutex_thread::mutex_thread::mutex_thread()
{
this->sleep_time=400000;
this->state=STOPPED;
this->running=1;
}
void mutex_thread::mutex_thread::pause()
{
this->mux.lock();
}
void mutex_thread::mutex... |
#include <iostream>
#include <vector>
#include <sstream>
#include <fstream>
using namespace std;
vector<string> split0(string str,char deli) // string+vector逐字节处理
{
vector<string> vec;
string tmp;
string::iterator it=str.begin();
for(; it != str.end();it++)
{
if (*it != deli)
... |
//
// Created by Terry on 15/9/12.
//
#include "utfstring.h"
using namespace std;
utfstring::utfstring()
{
}
utfstring::utfstring(const char *str)
{
int i = 0;
while (str[i] != 0x00) {
if ((signed char)str[i] < 0) {
string *zh_char = new string({str[i++], str[i++], str[i++]});
... |
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#ifndef JACTORIO_INCLUDE_PROTO_ABSTRACT_ENTITY_H
#define JACTORIO_INCLUDE_PROTO_ABSTRACT_ENTITY_H
#pragma once
#include "jactorio.h"
#include "game/world/tile_layer.h"
#include "proto/detail/type.h"
#include "proto/fr... |
#include "coordTransform.h"
extern RECT clientRect; |
/*******************************************************
FILE: stitcher.cpp
AUTHOR: Zach Sadler - zps6
DOES: Generates vertices and normals for 3d shapes, and displays them
on screen. Also has some fun extra credit goodies
PLATFORM: macosx
********************************************************/
#includ... |
/* header */
#ifndef SUM_H_
#define SUM_H_
#include <iostream>
#include <array>
using namespace std;
#pragma once
// prototype
int Sum( int num1, int num2);
void UpdateStep(int& step); //int& means to pass address (pointer)
int Max2(int num1, int num2);
int Max3(int num1, int num2, int num3);
int Max10(const s... |
#include "SoundEngine.h"
#include "Globals.h"
SoundEngine::SoundEngine() {
}
SoundEngine::~SoundEngine() {
}
void SoundEngine::initialize() {
int numsubsounds;
result_ = FMOD::System_Create(&system_);
result_ = system_->getVersion(&version);
result_ = system_->init(100, FMOD_INIT_NORMAL, extradriverdata);
re... |
#ifndef LIBNDGPP_DETAIL_STRTO_HPP
#define LIBNDGPP_DETAIL_STRTO_HPP
#include <climits>
#include <cstdlib>
namespace ndgpp
{
namespace detail
{
template <class T>
struct strtoi_traits;
template <>
struct strtoi_traits<signed long long>
{
static constexpr bool exact = true;
static ... |
#ifndef POOMA_FIELD_FIELDOPERATORS_H
#define POOMA_FIELD_FIELDOPERATORS_H
///////////////////////////////////////////////////////////////////////////////
//
// WARNING: THIS FILE WAS GENERATED AUTOMATICALLY!
// YOU SHOULD MODIFY THE INPUT FILES INSTEAD OF CHANGING THIS FILE DIRECTLY!
//
// THE FOLLOWING INPUT FILES WE... |
#include "CDoorBase.h"
#include "DescriptorList.h"
#include "CBaseEngine.h"
void CDoorBase::init(){
CWorldEntity::init();
m_direction = 0.;
m_fraction = 0.;
m_open = false;
}
void CDoorBase::think(){
if(m_direction != 0.){
m_fraction+=m_direction*engine->getTimeDelta()*m_moveSpeed;
i... |
/*
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 form... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <map>
#include <sstream>
#include <cmath>
#include <unordered_set> // 需要c++ 11才能支持
#include <unordered_map> // 需要c++ 11才能支持
using namespace std;
#include<unordered_set>
/* BFS搜索得到的结果即为最短路径 */
clas... |
#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define pii pair<int,int>
#define all(x) begin(x), end(x)
#define loop(i,n) for(int i=0; i<n; i++)
#define rep(i,a,b,c) for(int i=a; i<b; i+=c)
#define tc(t) int t; cin>>t; ... |
/*
Project: Evaporate
Author: Blake Trahan www.blaketrahan.com
Date: December 2015 - 2016
TODO: Immediate list
- fix brush and palette relative sizes
TODO list
- figure out resolution independent rendering
- add color picking from image
- can't draw dots yet bc they're not lines
- something fu... |
#include "JobQueue.h"
size_t JobQueue::GetQueuedJobCount()
{
std::lock_guard<Spinlock> LockGuard(queuedLock);
return queuedJobs.size();
}
Job *JobQueue::GetNextJob()
{
Job *nextJob = nullptr;
//
{
std::lock_guard<Spinlock> LockGuard(queuedLock);
if(queuedJobs.size() > 0)
{
auto I = queuedJobs.begin();
... |
/// \file
/// \brief Tests the NAT-punchthrough plugin
///
/// This file is part of RakNet Copyright 2003 Jenkins Software LLC
///
/// Usage of RakNet is subject to the appropriate license agreement.
#include "RakPeerInterface.h"
#include "RakSleep.h"
#include <stdio.h>
#include <stdlib.h>
#include "Rak... |
#pragma once
#include <iostream>
using std::cout;
using std::endl;
class Contained3
{
public:
Contained3()
{
cout << "Contained3 constructor." << endl;
}
}; |
//Manca da inserire, volendo, la modifica delle liste e dei suoi nodi
#ifndef INFO_H
#define INFO_H
#include <iostream>
#include <list>
#include "string"
using std::list;
using std::string;
class Info{
private:
string name;
string surname;
string address;
string telephonNumber;
string email;
... |
#include <math.h>
#include <windows.h>
#include "freeglut.h"
const float Pi=3.1415926535897932384626433832795;
int windowPositionX = 100, windowPositionY = 100; //parametry dla glutInitWindowPosition()
int windowSizeX = 800, windowSizeY = 800; //parametry dla glutInitWindowSize()
double fovy = 89.0, aspect = 1.... |
//51 Lab 13 Write a function template for finding the minimum value contained in an array.
#include <iostream>
using namespace std;
template <class T>
T findMin(T arr[],int n)
{
int i;
T min;
min=arr[0];
for(i=0;i<n;i++)
{
if(min > arr[i])
min=arr[i];
}
return(min);
}
in... |
//#include "stdafx.h"
#include <time.h>
#include "TreeBanks.h"
#include "..\..\..\..\Util\Clasters.h"
#include "..\..\AppRiverTrees\Source\clRiverBanks.h"
clTreeBank glBankTurn;
//----------------------------------------------------------------------------------------------------------------------------
void clTreeB... |
/***************************************************************************
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 <iostream>
#include <cmath>
using namespace std;
#include "vec.h"
int main() {
// ---------------------------------------------------
// initialize v1 with 10 values... the multiples of 5
Vec<int> v1( 10, 0 );
Vec<int>::size_type i;
for ( i = 0; i < v1.size(); i++) {
v1[i] =... |
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
// size(); //返回容器中元素的个数
// empty(); //判断容器是否为空
// resize(num); //重新指定容器的长度为num,
// 若容器变长,则以默认值填充新位置。
// 如果容器变短,则末尾超出容器长度的元素被删除。
// resize(num, el... |
#include "intcomparatortest.h"
IntComparatorTest::IntComparatorTest(QObject *parent) :
QObject(parent)
{
}
|
#include "stdafx.h"
//#include "Klasa_ListaZamowien.hpp"
std::vector<ZamowionyPrzedmiot>ListaZamowien::Lista;
std::fstream ListaZamowien::Plik_Lista;
std::string ListaZamowien::Plik_Lista_Nazwa = "Lista_ZamowionePrzedmioty.bin";
ListaZamowien::ListaZamowien() {
//Ladowanie listy zamowien z pliku
this->wczytajdane(... |
// -*- 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... |
//================================================================
// PROGRAMMER : 陳佳佑
// DATE : 2015-10-7
// FILENAME : HW02A036.CPP
// DESCRIPTION : This is a program to find the sum, average, product, largest and smallest number of a,b,c;
//=============================================... |
#include "FBO.h"
#include <iostream>
unsigned int FBO::MULTI_SAMPLE_COUNT = 16;
FBO::FBO(bool useTextureColor, bool useTextureDepth, bool multiSample, unsigned int width, unsigned int height, bool addSecondColorBuffer)
:multiSample(multiSample),width(width), height(height)
{
unsigned int nrColorTexture = addSecond... |
#include <stdio.h>
#include <stdlib.h>
typedef struct data
{
int number;
data *next;
}data;
int n,k;
data *make(int number)
{
data *temp;
temp = (data*)malloc(sizeof(data));
temp->number = number;
return temp;
}
int main()
{
int c;
scanf("%d",&c);
while(c--)
{
scanf("%d %d",&n,&k);
data *start;
st... |
#include <iostream>
#include "DataLexer.hpp"
#include "DataParser.hpp"
int main(int argc,char* argv[])
{
ANTLR_USING_NAMESPACE(std)
try {
DataLexer lexer(cin);
DataParser parser(lexer);
parser.file();
} catch(std::exception& e) {
std::cerr << "exception: " << e.what() << std::endl;
}
}
|
/*
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... |
#include<bits/stdc++.h>
#define ll long long
#define MAX 1000003
#define V vector<int>
#define pii pair<int,int>
#define VP vector< pii >
#define MOD 1000000007
#define mp make_pair
#define pb push_back
#define rep(i,a,b) for(int (i) = (a); (i) < (b); (i)++)
#define all(v) (v).begin(),(v).end()
#define S(x) scanf("%d"... |
#pragma once
#include <iostream>
using namespace std;
class MyString
{
char* m_pStr; //строка-член класса
public:
MyString();
explicit MyString(const char* pStr);
MyString(const MyString & other);
MyString( MyString && other);
~MyString();
void SetNewString(const char * pStr);
const char * GetString()... |
class Solution {
public:
vector<string> mostVisitedPattern(vector<string>& username, vector<int>& timestamp, vector<string>& website) {
unordered_map<string, map<int, string>> userData; // user-<time, web>, map sorted by time
unordered_map<string, int> sequenceCount; // pattern-cnt
int n = u... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "Windows.Security.Authentication.Web.Provider.1.h"
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Foundation::Collections {
#ifndef WINRT_GENERIC_ac7f26f2_feb7_5b2a_8ac4_345... |
/***************************************************************************
dialogoimportar.h - description
-------------------
begin : mar abr 6 2004
copyright : (C) 2004 by Oscar G. Duarte
email : ogduarte@i... |
#include <iostream>
#include <vector>
using namespace std;
int main() {
{// basic for loop
int numTimes{ 0 };
cin >> numTimes;
/* Initializer; Conditional ; What happens after each loop*/
for (int i{ 0 }/*ES.74*/; i <= numTimes; i++)
{
cout << i << endl;
//i++; //ES.86
}
cout << endl;
}
... |
#pragma once
#include <Box2D/Box2D.h>
#include <vector>
class PhysicsComponent : public Component
{
public:
PhysicsComponent(b2BodyDef* bd, bool ControlComponents, b2FixtureDef* fixdef, ...)
{
va_list args;
BodyDef = bd;
Fixtures = std::vector<b2FixtureDef*>();
for (va_start(args, fixdef); fixdef !=... |
#include "mainwindow.h"
#include <QApplication>
#include <QSplashScreen>
#include <QTimer>
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
QSplashScreen *splash=new QSplashScreen;
splash->setPixmap(QPixmap(":/MyFiles/fallout.jpg"));
splash->show();
MainWindow window;
... |
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main() {
int s[10],q[10],l;
srand((unsigned)time(NULL));
for(int i=0;i<10;i++) {
s[i] = rand() % 10;
}
for (int i = 0; i < 10; ++i) {
if(cin>>l)
q[i]=l;
break;
}
int *p=begin(... |
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <malloc.h>
#define MAX 100
typedef struct graph
{
int v;
struct graph *e;
}graph;
int visited[101];
int bfs[101];
int main() {
int N,M,ui,vi,i,l,c,chld[101]={0},vrtx;
graph *g[MAX],*next;
scanf("%d%d",&N,&M);
i... |
#include "main.h"
//-----------------------------------------------------------------------------
void MyGlDraw(void)
{
//*************************************************************************
// Chame aqui as funções do mygl.h
//*************************************************************************
glClea... |
// file : liblava/app/gui.cpp
// copyright : Copyright (c) 2018-present, Lava Block OÜ
// license : MIT; see accompanying LICENSE file
#include <liblava/app/gui.hpp>
#include <liblava/app/def.hpp>
#define GLFW_INCLUDE_NONE
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#ifdef _WIN32
#undef APIENTRY
#defi... |
#include "event.hpp"
sf::Event Event::get_Event() const {
return event;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.