text stringlengths 8 6.88M |
|---|
#include<fstream.h>
#include<conio.h>
void main()
{
ofstream fin;
fin.open("D:\eesma.txt");
fin.close();
getch();
}
|
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setGeometry(MAIN_X1, MAIN_Y1, MAIN_X2, MAIN_Y2);
QFont font = this->font();
font.setPointSize(FONT_SIZE);
this->setFont(font)... |
#pragma once
#include <vector>
#include <string>
#include <iostream>
#include <bullet\\src\\btBulletDynamicsCommon.h>
#include <glm\glm.hpp>
#include <glew\glew.h>
#include "../Terrain/Terrain.h"
#include "../Physics/PhysicsEngine.h"
class Entity;
enum DamageLocation {
LARM, RARM, LLEG, RLEG, HEAD, CHEST
};
cla... |
#include <iostream>
#include <fstream>
#include <unordered_map>
#include <functional>
#include <algorithm>
#include <random>
#include "gtest/gtest.h"
#include "tuple2.h"
TEST(basic, default_con)
{
tuple2<std::string, int, double> t;
get<1>(t) = 4;
get<0>(t) = "sta";
assert(get<0>(t) == "sta");
ass... |
#pragma once
//CharacterFaces.h
#ifndef _CHARACTERFACES_H
#define _CHARACTERFACES_H
#include "Array.h"
#include "CharacterSize.h"
#include <afxWin.h>
#include <string>
using namespace std;
typedef signed long int Long;
class CDC;
class CharacterFaces {
public:
~CharacterFaces();
static CharacterFaces* Instance(CD... |
#include "cadvtextedit.h"
#include "blowfish.h"
#include "qftp.h"
#include <QDebug>
#include <QtWidgets/QWidget>
#include <QKeyEvent>
#include <QDate>
#include <QFile>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QAction>
#include <QTextOption>
//#include <QtGui>
#include <QProcess>
#include <QProgressDialog>... |
#include "FootStepManager.hpp"
namespace FootStepPlanner {
FootStepManager::~FootStepManager() {
}
}
|
/*
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
/* Enable FSAA
* Enable full-screen antialiasing.
* PATCHES: Pleione.dll
*/
#include "../Main.h"
#include "../Singleton.h"
#include "GenericPatcher.h"
class CPatcher_EnableFSAA : public IGenericPatcher {
public:
CPatcher_EnableFSAA();
bool ReadINI( void );
bool WriteINI( void );
private:
// Hook... |
#include "StdAfx.h"
#include "imageitem.h"
ImageItem::ImageItem(QString &path)
: mPath(path)
{
//imread flags
//>0 the loaded image is forced to be a 3-channel color image
//=0 the loaded image is forced to be grayscale
//<0 the loaded image will be loaded as-is (note that in the current implementation t... |
#include "../../algostuff.hpp"
int main(int argc, char *argv[])
{
std::list<int> coll;
INSERT_ELEMENTS(coll, 1, 6);
PRINT_ELEMENTS(coll, "coll:");
std::cout << "coll inner_product: "
<< std::inner_product(coll.begin(), coll.end(), coll.begin(), 0)
<<std::endl;
std::cout << "coll inn... |
//
// FileLoader.cpp
// PocketMoneyBook
//
// Created by HeeCheol Kim on 09/12/2018.
// Copyright © 2018 HeeCheol Kim. All rights reserved.
//
#include <stdio.h>
|
#include <bits/stdc++.h>
using namespace std;
class Person
{
private:
public:
string name;
int age;
Person() : name(""), age(0){};
Person(string name, int age) : name(name), age(age){};
void hello() { cout << this->name << " says hello to the fucking world" << endl; }
};
class Student : public Pe... |
#include "SoundManager.h"
#include "Log.h"
#include "Timer.h"
#include "ResourceManager.h"
#include "StringUtils.h"
#include "FileUtils.h"
#include <functional>
// Manager instance
SoundManager SndMngr;
// ACM
#include "acmstrm.h"
// OGG
#include "vorbis/codec.h"
#include "vorbis/vorbisfile.h"
sta... |
//
// Admission.cpp
// Homework7
//
// Created by HeeCheol Kim on 01/11/2018.
// Copyright © 2018 HeeCheol Kim. All rights reserved.
//
#include <stdio.h>
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t > 0)
{
string str;
cin >> str;
int s = str.length();
int arr[26] = {0};
for (int i = 0; i < s; i++)
{
arr[str[i] - 'a']++;
}
int max = 0, k = ... |
#include <cstdio>
#include <cstdlib>
#include <pthread.h>
#include <cstring>
#include <ctime>
#include <unistd.h>
#define MAX_MSG_LEN 64
typedef struct alarm_node_t
{
alarm_node_t *next;
time_t sleep_to;
int sec;
char msg[MAX_MSG_LEN];
}alarm_t;
static pthread_mutex_t alarm_mutex = PTHREAD_MUTEX_INITIALIZER;
ala... |
//
// Created by Sweet Acid on 02.05.2021.
//
#define IMGUI_IMPL_OPENGL_LOADER_GLAD
#include "imgui_impl_opengl3.h"
#include "imgui_impl_glfw.h" |
#include <vector>
#include <iostream>
using namespace std;
void VectorOfVector(){
cout << "=============== *Vector of Vectors* ===============" << endl;
// 'vecvec' is a vector of three ('3') 'vector<int>' each of
// which holds two ('2') int elements, both initialised to '0'.
vector< vector<int> > vecvec(3, ve... |
#include "antscreepinggame.h"
#include "ui_antscreepinggame.h"
AntsCreepingGame::AntsCreepingGame(QWidget *parent) :
QWidget(parent),
ui(new Ui::AntsCreepingGame)
{
ui->setupUi(this);
}
AntsCreepingGame::~AntsCreepingGame()
{
delete ui;
}
|
/////////////////////////////////////////////////////////////////////////////
// Name: src/osx/dialog_osx.cpp
// Purpose: wxDialog class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: dialog.cpp 54820 2008-07-29 20:04:11Z SC $
// Copyright: (c) Stefan Csomor
/... |
#ifndef MOHICAN_H
#define MOHICAN_H
class Mohican {
private:
static Mohican* lastMohican;
static int id;
int personalId;
std::string name;
public:
Mohican(const std::string& name);
~Mohican();
static int getId();
std::string getName... |
#ifndef SORTWIDGET_H
#define SORTWIDGET_H
#include <QWidget>
#include<QtWidgets>
#include"sorting.h"
QT_BEGIN_NAMESPACE
namespace Ui { class SortWidget; }
QT_END_NAMESPACE
class SortWidget : public QWidget
{
Q_OBJECT
public:
SortWidget(std::vector<double>,std::vector<double>,std::vector<QString>,QWidget *pa... |
#include <curses.h>
#include <unistd.h>
// Compile as:
// need libncurses
// gcc curses.cpp -o curses -lcurses
void spinner(int spin_seconds) {
static char const spin_chars[] = "/-\\|";
unsigned long i, num_iterations = (spin_seconds * 10);
for (i=0; i<num_iterations; ++i) {
mvaddch(0, 0, spin_c... |
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
#include "Airport.h"
#include "models/Passenger.h"
#include "models/Feature.h"
typedef std::pair<Airport, std::vector<Passenger>> ParsedInput;
ParsedInput parseInput(const std::string& filename) {
std::ifstream infile(filename);
// ... |
#include <iostream>
#include <string>
#include "Printer.h"
using namespace std;
void Printer::print(string str){
cout << str << endl;
}
|
#include "basic_factory.hh"
#include <unistdx/util/system>
#include <bscheduler/config.hh>
namespace {
inline void
start_all() {}
template <class Pipeline, class ... Args>
void
start_all(Pipeline& ppl, Args& ... args) {
ppl.start();
start_all(args ...);
}
inline void
stop_all() {}
template <class Pi... |
#include <ros/ros.h>
#include <math.h>
#include <stdio.h>
#include <tf2_ros/transform_listener.h>
#include <tf2_ros/buffer.h>
#include <tf2/transform_datatypes.h>
#include <tf2_sensor_msgs/tf2_sensor_msgs.h>
#include <tf2/convert.h>
#include <fstream>
#include <istream>
#include <string>
#include <iostream>
#include... |
/**********************************************
string类型对字符串常用操作进行了封装
注意<string>和<string.h>是不同的库文件
定义方式:
string str;
string str="hello world";
***********************************************/
//通过下表访问string内容
#include<stdio.h>
#include<string>
#include<iostream>
using namespace std;
int main(){
string str="abcd";
f... |
#include "queue.h"
#include <iostream>
using namespace std;
#define SIZE 100
class queue {
int q[SIZE];
int sloc, rloc;
public:
void init ();
void insert (int val);
int qget ();
};
void queue::init()
{
rloc = sloc = 0;
}
void queue::insert(int val)
{
if ( sloc == SIZE ) {
cout... |
#include "pattern.h"
Pattern::Pattern(Config *_config, Shape* _shapes, int _nshapes, Shape* _anchor)
{
config = _config;
nshapes = _nshapes;
shapes = _shapes;
anchor = _anchor;
center_x = config->GRID_WIDTH/2;
center_y = config->GRID_HEIGHT/2;
for(int i = 0; i < 12; i++) codeblock[i] = -9;
anchor_at ... |
const int LedRed = 10;
const int LedYellow = 11;
const int LedGreen = 12;
// Como os LEDs estão ligados nas portas 10, 11 e 12
// por convenção se coloca as portas de cada pino utilizado como uma constante;
int currentLED = 0; // Led que será aceso
void setup() {
// Configurando quais as portas que serão utiliz... |
#include "../util/Ray.h"
#include "Plane.h"
#ifndef PHOTON_CUBE_H
#define PHOTON_CUBE_H
class Cube : public Shape {
public:
Vec3 center;
double radius; // radius of a circumscribed sphere within the cube
Plane* planes[6];
Cube() : Cube(0, 0, 0, 1) {}
Cube(double x, double y, double z, double r)... |
#pragma once
#define GLEW_STATIC
#include <GL/glew.h>
#include <SDL2/SDL.h>
class screen {
SDL_Window *_window;
SDL_GLContext _gl_context;
public:
int window_width, window_height;
bool running;
screen(int n_window_width, int n_window_height);
~screen();
void mainloop(void (*load_cb)(screen*)
, voi... |
// This file has been generated by Py++.
#ifndef ResourceProvider_hpp__pyplusplus_wrapper
#define ResourceProvider_hpp__pyplusplus_wrapper
void register_ResourceProvider_class();
#endif//ResourceProvider_hpp__pyplusplus_wrapper
|
/*
* MyUtilClass.h
*
* Created on: Jan 20, 2012
* Author: marchi
*/
#ifndef MYUTILCLASS_H_
#define MYUTILCLASS_H_
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include "Ftypedefs.h"
const double eps=1.0e-4;
const bool DEBUG=false;
namespace MATRIX{
struct... |
#ifndef DE_HEIGHTMAPRENDERER_H
#define DEčHEIGHTMAPRENDERER_H
#include "export.h"
#include "core/AComponent.h"
#include "core/ARenderable.h"
#include "core/Material.h"
#include "core/ComponentFactory.h"
#include "data/Mesh.h"
#include "data/HeightmapInfo.h"
namespace de
{
namespace component
{
class DE_EXPORT Hei... |
#include <iostream>
using namespace std;
void main()
{
char ch;
int n;
cout << "정수 입력(0~25): ";
cin >> n;
ch = n + 'A';
cout << n << "번째 영어 대문자는" << ch << endl;
}
|
#if !defined(BOB_H)
#define BOB_H
#include <string>
#include <cctype>
#include <algorithm>
namespace bob {
std::string hey(std::string);
} // namespace bob
#endif // BOB_H |
#include <ugvc_navigation/build_3D_map.h>
using namespace std;
/**
* 本函数的作用:利用激光雷达的点云数据,分别得到迷宫栅格地图和无人机的栅格地图
*/
class convert2image
{
private:
ros::NodeHandle nh;
ros::Subscriber map_sub;
ros::Publisher map_pub;
ros::Subscriber uav_sub;
ros::Publisher uav_pub;
ros::Subscriber front_sub;
ros::Publishe... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Nicolas Jinchereau. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*------------------------------------------------------------------... |
#include<iostream>
#include<string>
#include<algorithm>
#include<cctype>
using namespace std;
void func() {
string tar,example,output;
cin >> tar;
transform(tar.begin(), tar.end(), tar.begin(), ::tolower); // 转换为小写,注意::.明确命名空间
int len = tar.size();
char tmp[100];
while (gets(tmp)) { // 读取整行
exampl... |
// LispBDB_Intf.cpp -- Interface for Berkeley DB and Lisworks
// DM/MCFA 06/04
//
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <db.h>
#include <cscids.h>
// ---------------------------------------
extern "C"
int lwbdb_open(const char *file, DB **dbp)
{
DB *pdb;
int ... |
/*******************************************
*** Dateiname: Motorcontrol.cpp
********************************************
*** Zweck: Einlesen, verarbeiten und
*** und Ausgeben von Steuersignalen an den Motor
***
*** Erstellt: 19.10.2016
******************************************
*** Geändert: 26.10.2016
*************... |
#include <algorithm>
#include <array>
#include <cstdio>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define ll long long
using namespace std;
typedef tuple<ll, ll, ll> tp;
typedef pair<ll, ll> pr;
const ll MOD = 1000000007;... |
#ifndef TURNCOMPONENTOFF_H
#define TURNCOMPONENTOFF_H
#include "command.h"
#include "room.h"
//typedef void(Room:: *Action)(std::string);
class TurnComponentOff: public Command
{
public:
TurnComponentOff(Room *r);
void execute(std::string s);
protected:
Room *_receiver;
//Action action;
};
#endif // TU... |
#ifndef _HS_SFM_BUNDLE_ADJUSTMENT_BA_NAIVE_NORMAL_EQUATION_BUILDER_HPP_
#define _HS_SFM_BUNDLE_ADJUSTMENT_BA_NAIVE_NORMAL_EQUATION_BUILDER_HPP_
#include <cassert>
#include <cmath>
#include "hs_math/linear_algebra/eigen_macro.hpp"
#include "hs_sfm/bundle_adjustment/ba_naive_vector_function.hpp"
#include "hs... |
/**
* Encapsulates a single row read from data file.
*
* Jason Leake October 2019
*/
#pragma once
#include <array>
#include <string>
#include "SensorParameter.h"
namespace Rowcons {
static constexpr auto COLUMNS = 6;
}
class Row : public std::array<double, Rowcons::COLUMNS> {
private:
static constexpr auto... |
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>
int main(int argc, char **argv)
{
if (argc != 2) {
return 1;
}
std::ifstream f(argv[1]);
std::string line;
while (true) {
std::getline(f, line);
... |
#include <AFMotor.h>
#include <Servo.h>
/*
Control robot from Android phone via USB
by cpro29a@gmail.com
all distances are in cm
all angles are in degrees
*/
//Ultrasonic distance meter pins:
#define echoPin 25 // Echo Pin
#define trigPin 24 // Trigger Pin
#define ledPin 13
// Maximum measurable distance
#define ma... |
#ifndef ___ApplicationProxy_H
#define ___ApplicationProxy_H
#include <string>
#include "ProxyArray.h"
#include "PrimitiveArray.h"
#include "JStringHelper.h"
#include "JStringHelperArray.h"
using namespace de::freegroup::jnipp;
class ApplicationProxy
{
private:
static std::string className;
static jclass objec... |
#include<iostream>
#include<string>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
using namespace std;
class complexes
{
int real,comp;
public:
friend istream &operator >>(istream &a, complexes &b);
friend ostream &operator <<(ostream &a, complexes &b)... |
#ifndef QH_MESH_H
#define QH_MESH_H
/*
* Halfedge: http://www.flipcode.com/archives/The_Half-Edge_Data_Structure.shtml
*/
struct QhHalfEdge;
class QhElement
{
private:
bool Deleted = false;
public:
//
bool IsDeleted() const
{
return Deleted;
}
//
void Delete()
{
Deleted = true;
}
};
struct QhVertex :... |
#pragma once
#include "Geometry/Public/Box.h"
#include "Math/Vec3.h"
namespace Geometry {
namespace Index {
void Expand (Box& box, const Math::Vec3& point) {
if (point.x < box.min_corner().x) {
box.min_corner().x = point.x;
}
if (point.y < box.min_corner().y) {
box.min_corner().y = point.y;
}
if (point.x ... |
#ifndef BIT_VECTOR_H
#define BIT_VECTOR_H
#include <utility>
#include <vector>
#include "BitSet.h"
template <class Type>
class LargeBitVector {
private:
BitSet array;
unsigned int writeOnHeader(unsigned int pointer, unsigned int value,
unsigned int b);
unsigned int readFromHeader(unsigned int pointer)... |
//! Bismillahi-Rahamanirahim.
/** ========================================**
** @Author: Md. Abu Farhad ( RUET, CSE'15)
** @Category:
/** ========================================**/
#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
#define ll long long
#define scl(n) scan... |
#include "preferences.h"
#include <QSettings>
#include <QSet>
Preferences::Preferences()
{
}
Preferences::~Preferences()
{
qDeleteAll( m_preferences );
m_preferences.clear();
}
void Preferences::setValue(const QString &key, const QVariant &value)
{
m_preferences.value(key)->setValue(value);
}
Preference... |
// modelerview.h
// This is the base class for your view window. It contains
// a camera control for your use. The draw() function will
// set up default lighting and apply the projection.
#ifndef MODELERVIEW_H
#define MODELERVIEW_H
#ifdef WIN32
#include <windows.h>
#endif
#include <FL/Fl_Gl_Window.H>
#inclu... |
#include "camera.h"
Camera::Camera()
{
position.x = 0;
position.y = 0;
}
Camera::~Camera() {}
void Camera::update(int width, int height, float time, sf::Vector2f& player_position , sf::Vector2u& size) {}
void Camera::updateCamera(sf::Vector2f& playerPosition, sf::Vector2f& gameSize, sf::VideoMode& scr... |
/*
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... |
/*
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 "DemoTexture.h"
#include <SOIL/SOIL.h>
struct Color
{
float r, g, b;
Color(float r0, float g0, float b0)
{
r = r0;
g = g0;
b = b0;
}
};
GLuint CreateTexture()
{
const unsigned int TEXTURE_X = 2;
const unsigned int TEXTURE_Y = 2;
Color Texture[TEXTURE_X][TEXTURE_Y] = {{Color(0.0,1.0,0.0),Col... |
#pragma once
//PaintVisitor.h
#ifndef _PAINTVISITOR_H
#define _PAINTVISITOR_H
#include "Visitor.h"
class CDC;
class CPaintDC;
class CRect;
class PaintVisitor :public Visitor {
public:
PaintVisitor(CDC *dc = 0, CRect *rect = 0);
PaintVisitor(const PaintVisitor& source);
virtual ~PaintVisitor();
PaintVisitor& oper... |
#include <irtkImage.h>
char *input_name = NULL;
void usage()
{
cerr << "Usage: i2wmatrix [image] [matrix name]\n";
exit(1);
}
int main(int argc, char **argv)
{
if (argc < 3){
usage();
}
irtkRealImage image;
image.Read(argv[1]);
image.GetImageToWorldMatrix().Write(argv[2]);
}
|
//#include <Afx.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <conio.h>
#include "piraq.h"
#include "control.h"
#include "hpib.h"
#include "subs.h"
#include "config.h"
#include "timerlib.h"
#include "pci_w32.h"
#define STOPDELAY 30
#define REF 100... |
#include "SDI12.h"
#include "SDI12.h"
#include <string.h>
#define DATAPIN 11 // change to the proper pin
#define LED_PIN 13
#define SENSOR_ADDRESS "?"
SDI12 mySDI12(DATAPIN);
String sdiResponse = "";
String myCommand = "";
char buf[20];
char *p;
void setup() {
Serial.begin(9600);
mySDI12.begin();
dec... |
/**
* \file NumericConverter.hpp
*
* \brief Converts scalar typelib values to a double;
*
* German Research Center for Artificial Intelligence\n
* Project: VirGo4
*
* \date 22.10.2012
*
* \author felix.rehrmann@dfki.de
*/
#ifndef TYPETOVECTOR_NUMERIVCONVERTER_HPP
#define TYPETOVECTOR_NUMERIVCONV... |
#include <iostream>
using namespace std;
int main()
{
double N, size;
cin >> N;
size = (N / 2) / 3.14;
cout << round(size*size*3.14);
}
|
#include <stdafx.h>
#include "ScriptEvent.h"
ScriptEvent::CreationFunctions ScriptEvent::s_creationFunctions;
//---------------------------------------------------------------------------------------------------------------------
// Returns the event data after building it (if necessary)
//--------------------------... |
/*
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... |
//
// Created by nickolay on 19.12.2020.
//
#ifndef HUAWEIROUTER_CPUINFO_H
#define HUAWEIROUTER_CPUINFO_H
#include <string>
const int NUM_CPU_STATES = 10;
enum CPUStates
{
S_USER = 0,
S_NICE,
S_SYSTEM,
S_IDLE,
S_IOWAIT,
S_IRQ,
S_SOFTIRQ,
S_STEAL,
S_GUEST,
S_GUEST_NICE
};
typ... |
#pragma once
#include "BasePrimitive.h"
class VectorScalar : BasePrimitive
{
public:
VectorScalar(class Shader *shader);
~VectorScalar();
virtual void Bind() override;
virtual void Render() override;
protected:
private:
};
|
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <Windows.h>
#include <iostream>
#include "Object.h"
#include "Player.h"
#include "Map.h"
#include "Animation.h"
#include "Monster.h"
#include "ClockGame.h"
#include "Menu.h"
// create the window
sf::RenderWindow window(sf::VideoMode(800, 600), "MAZE Nguye... |
// Problem: Winner
// Link: https://codeforces.com/contest/2/problem/A
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
while(t>0){
int n;
cin >> n;
int num[n];
vector<int> s;
int x,distinct=0;
int maxx=-... |
// Simulation.cpp
// ICS46 Winter 2021 Project 2
// Name: Keyu Zhang
// ID: 19898090
// UCINetID: keyuz4
// handles the mechanics of simulation
#include <iostream>
#include <string>
#include <vector>
#include "Simulation.hpp"
Simulation::Simulation(Log* log, Statistics* stats)
: log{log}, stats{stats}
{
}
vo... |
#include "Connection.h"
namespace database {
Connection::Connection() : conn_(nullptr) {}
Connection::~Connection() {
Close();
}
Connection& Connection::operator=(Connection&& c) noexcept {
conn_ = c.conn_;
c.conn_ = nullptr;
return *this;
}
bool Connection::Connect(const std::string &url, const... |
#include<stdio.h>
#define SIZE 50
struct Subject{
char subName[30];
int marks;
};
struct Student {
char name[30];
int total_Marks;
struct Subject *subject;
};
int main() {
int i,j,students,subjects,total_Marks=0;
struct Student st[SIZE];
struct Subject sub[SIZE];
// struct subject sub[SIZE];
/... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Security::Cryptography {
struct ICryptographicBufferStatics;
}
namespace Windows::Security::Cryptography {
struct ICryptographicBuff... |
#pragma once
#include <string>
#include "FTPConnection.hpp"
#include "FTPExceptions.hpp"
class FTPClient{
public:
const std::string& getResponse() const { return this->lastResponseFromControlConnection; }
void connect(const std::string &hostname, const std::string &port);
void login(const std::string... |
/*
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... |
#ifndef POLYOMINO_H
#define POLYOMINO_H
#include <vector>
class QGroupBox;
// Squares are defined by the bottom left corner 'coordinates'
struct Square{
int x;
int y;
const static int x_size = 1;
const static int y_size = 1;
void print();
void translate(const int x, const int y);
};
... |
// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
// (“Fluent UI”)。该示例仅供参考,
// 用以补充《Microsoft 基础类参考》和
// MFC C++ 库软件随附的相关电子文档。
// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
// http://go.microsoft.com/fwlink/?LinkId=238214。
//
// 版权所有(C) Microsoft Corporation
// 保留所有权利。
// iSAMAppVie... |
#include "Title.h"
#include "Child.h"
namespace Sequence
{
class Child;
class Title;
class Parent
{
public:
enum SeqID{
SEQ_STAGE_SELECT,
SEQ_TITLE,
SEQ_GAME,
SEQ_NONE,
};
Parent();
~Parent();
void update();
private:
Title* mTitle;
int mStageID;
SeqID mNext;
... |
/*
Author: Nayeemul Islam Swad
Idea:
- Since the graph is guaranteed to be connected, let's do an euler
tour in it's dfs tree. We will keep a counter and assign answers
to the edges in the order they are visited. This way,
* The root has an incident edge with assigned answer 1, so it's
edges... |
/*NodeStore.h
NodeStore
copyright Vixac Ltd. All Rights Reserved
*/
#ifndef INCLUDED_NODESTORE
#define INCLUDED_NODESTORE
#include "Node.h"
#include "GraphUtil.h"
#include <map>
#include <set>
namespace vixac
{
namespace inout
{
class NodeStore;
//--//
class Tie;
class Node... |
#include "Stack.h"
#include "Calculator.h"
int main() {
int i = 0;
string exp;
Calculator cclt;
cout << "----------------【通用计算器】系统介绍----------------\n" << endl;
cout << "1.支持基本运算,如+、-、*、/、^、%" << endl;
cout << "2.支持函数运算,如sin()、cos()、tan()、sqrt()、abs()" << endl;
cout << "3.支持指对运算,如lg()、ln()、e^2... |
#include<stdio.h>
#include<string.h>
char a[30],b[30];
void fun(int ab, int ae, int bb, int be)
{//四个参数分别为:先序遍历的起始位置和结束位置和中序遍历的起始位置和结束位置
int i;
if(ab>ae)
return;
putchar(a[ae]);//由于是求先序遍历,所以要先输出根节点
putchar(' ');
for(i=bb; b[i]!=a[ae]; ++i);//对应的,后序序列的最后一个为根,所以根为a[ae]
fun(ab, ae-be+i... |
#ifndef _RACECOURSE_H_
#define _RACECOURSE_H_
#define MAX_CHECKPOINTS 16
#include "Info.h"
#include "RenderInstance.h"
#include "Renderer.h"
#include "Racer.h"
#include "Texture.h"
class RaceCourse
{
Racer* m_racers; //the racers
int32 m_numRacers; //number of racers
RenderInstance* m_checkPoints; //checkpoi... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "UI_Interaction.generated.h"
class UImage;
UCLASS()
class THIRDPERSONSHOOTER_API UUI_Interaction : public UUserWidget
{
GENERATED_BODY()
private:
UPROPER... |
#ifndef SKP_MATERIAL_HPP
#define SKP_MATERIAL_HPP
#include "common.hpp"
#include <SketchUpAPI/model/material.h>
#include "color.hpp"
#include "entity.hpp"
#include "texture.hpp"
typedef struct {
SkpEntity skp_entilty;
SUMaterialRef _su_material;
} SkpMaterial;
static void SkpMaterial_dealloc(SkpMaterial* self)... |
##ifndef COMPETITIVE_H
#define COMPETITIVE_H value
#include<bits/stdc++.h>
#define vi std::vector<int>
#define viiter std::vector<int>::iterator
#define vs std::vector<string>
#define vsiter std::vector<string>::iterator
#define ds std::deque<string>
#define dsiter deque<string>::iterator
#define str string
#defin... |
#include<iostream.h>
#include<conio.h>
class month
{
public:
int m;
void read();
void disp();
void operator ++();
};
void month :: read()
{
sp:
cout<<"\n enter the month no:";
cin>>m;
if(m>12)
{
cout<<"\n The Enter Month is invalid:";
goto sp;
}
}
void month :: operat... |
#include<bits/stdc++.h>
using namespace std;
int solve(string input)
{
int n = input.size();
int* dp = new int[n];
for(int i=0;i<n;i++)
{
dp[i]=-1;
}
int left = -1;
for(int i=0;i<n;i++)
{
if(input[i]=='.')
{
if(left!=-1)
{
dp[left]=i-left;
left = -1;
}
}
else
{
if(left==-1)
... |
// Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.
#include "src/vm/object_memory.h"
#include "src/vm/object.h"
namespace fletch {
static Smi* chun... |
//
// Copyright (c) 2019, University of Edinburgh
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this lis... |
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#include "game/input/mouse_selection.h"
#include "game/player/player.h"
#include "game/world/world.h"
#include "proto/abstract/entity.h"
#include "proto/sprite.h"
#include "render/tile_renderer.h"
using namespace jact... |
//
// su.cpp
// CRsim
//
// Created by Ji on 14-10-6.
// Copyright (c) 2014年 lj. All rights reserved.
//
#include "su.h"
SU::SU() : User() {
return;
}
vI SU::getAvaiChanRandom(int _chan_n) {
vI ans;
this->avaiChanNum = _chan_n * global::CHAN_AVAI_RATIO;
int tmp = 0;
while (tmp < avaiChanNum) ... |
//
// Copyright Jason Rice 2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef NBDL_DETAIL_BIND_TAG_OF_HPP
#define NBDL_DETAIL_BIND_TAG_OF_HPP
#include <nbdl/bind_map.hpp>
#include <nbdl/bind_sequenc... |
//Written by Timothy Hopkins
#include "point.h"
//#include "vectors.h"
#include <ctime>
#include <vector>
#include <iostream>
double rotation(point p1, point p2, point p3);
int main(int argc, char* argv[])
{
std::string num = argv[1];
int length = std::stoi(num, nullptr, 0);
std::vector<point*> points = g... |
#include <stdio.h>
#include <stdlib.h>
#include <GL/glut.h>
#include <math.h>
#define janela_altura 480
#define janela_largura 640
int on = 1;
float x = 0.0, y = 0.0, z = 0.0;
float mat_ambient[] = { 0.23f, 0.23f, 0.23f, 1.0f };
float mat_diffuse[] = { 0.27f, 0.27f, 0.27f, 1.0f };
float mat_specular[] = {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.