text stringlengths 8 6.88M |
|---|
#ifndef VirtualDirectory_def
#define VirtualDirectory_def
#include <map>
#include <string>
#include "datastructure.hpp"
using namespace std;
struct VD_item {
string name;
string path;
int type;
DataStructure contents;
};
class VirtualDirectory {
public:
/**
*
*/
void createFolder(string path, string name);
... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <memory>
#include "form_fft.h"
#include "qcustomplot.h"
#include "packet.h"
#include "packetparser.h"
#include "kalmanpacketfilter.h"
#include "highpassfilter.h"
#include "complementarypacketfilter.h"
enum plotterType{
ACCELEROMETER = 0,
... |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define endl '\n'
#define int long long
#define print(v) for(auto x:v){cout<<x<<" ";}cout<<endl;
int mod=1000000007;
bool isValid(int sum, int W){
int th = (W%2==0) ? W/2 : W/2+1;
return (sum>=th && sum<=W) ? true : false;
}
int32_t main(){
... |
#include <cassert>
#include <iostream>
using namespace std;
//calc 2^e % 1000000007
//formular: (AB)%C = ((A%C)(B%C))%C
unsigned long long expMod(int e)
{
assert(e >= 0);
if (e < 64)
return ((unsigned long long)(1) << e) % 1000000007;
unsigned long long r = expMod(e / 2);
r = (r *... |
// File contains the implementation of the game class
// Author: Jamie Beamguard
// Last Revision: 6/29/2021
#include "game.h"
#include <string>
#include <iostream>
using namespace std;
// Return the opposing team's name
string Game::printOpponent(string teamName) {
if(teamName == homeTeam) {
return awayTeam; //... |
//Jason Strange
//PrintItem doesn't really need much explanation
#include "PrintItem.h"
PrintItem::PrintItem (string file) {
f=file;
}
string PrintItem::getfile () {
return f;
}
|
#include <algorithm>
#include <array>
#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;
const ll INF = 1e... |
#ifndef throwif_h
#define throwif_h
#include <vector>
#include <sstream>
#include <stdexcept>
#include <string>
// for convenient and verbose output of throw_if
// exeption messages
#define SOURCE_LOCATION \
__FILE__, "@", std::to_string (__LINE__), ": "
// convient use of throw if function including source locatio... |
#pragma once
#include "lab/dialogs/lab_dialog.h"
class Variables : public LabDialog {
public:
~Variables() override = default;
private:
void open(Button* caller) override;
void close() override {
if (dialogWindow != nullptr) {
dialogWindow->DeleteChildren();
dialogWindow = nullptr;
}
}
void update(La... |
class Solution
{
public:
ListNode* deleteDuplicates(ListNode* head)
{
ListNode **cur = &head;
while (*cur != nullptr)
{
ListNode *next = (*cur)->next;
while (next != nullptr && (*cur)->val == next->val)
next = next->next;
if ((*cur)->n... |
#include <gtest/gtest.h>
#include <whiskey/Unicode/FileByteInStream.hpp>
using namespace whiskey;
TEST(Unicode_Unit_FileByteInStream, Unopened) {
const char *path = "thisIsAFileNameThatProbablyDoesntExist.txt";
FileByteInStream bs(path);
ASSERT_FALSE(bs.isOpen());
ASSERT_DEATH({ bs.isMore(); }, "");
AS... |
#include "SoundLoader.h"
QMediaPlayer* SoundLoader::loadSongFromURL(std::string url)
{
QMediaPlayer* player = new QMediaPlayer();
if (!url.empty()) {
player->setMedia(QUrl(url.c_str()));
}
return player;
} |
int main()
{
int a = 1;
int b = 1;
int* k = (int*)malloc(sizeof(int) * 2);
k[0] = 111;//111
cout << k[0]<<endl;
printf("%p\n", k);
free(k);
printf("%p", k);
cout << k[0];//-23445243534
//free掉仍然可以访问,操作系统没有回收这片内存
getchar();
}
void* operator new (std::size_t size) throw (std::bad_alloc); //会抛异常
nothr... |
#include "GameEffect.h"
#include <iostream>
#include "C:\Users\DELL\GameDirectX\MMX3\DemoDirectX\DemoDirectX\GameObjects\Entity\Entity.h"
#include "C:\Users\DELL\GameDirectX\MMX3\DemoDirectX\DemoDirectX\GameObjects\Player\GamePlayer.h"
#include "C:\Users\DELL\GameDirectX\MMX3\DemoDirectX\DemoDirectX\GameDefines\GameDef... |
#include <DS3231.h>
#include <Wire.h>
#include <EEPROM.h>
#include <DHT.h>
#include <OneWire.h>
#include <DS18B20.h>
#define MED_FIL_ARR_SIZE 9 // Median filter window size. Must be odd
#define BAUDRATE 9600 // Baudrate for serial interface
#define TEMP_MEASR_DELAY_S 15 // For correct functioning, ... |
#include "SnakePart.h"
SnakePart::SnakePart() {}
SnakePart::SnakePart(sf::Vector2i posv)
{
rect.setSize(sf::Vector2f(GameManager::get().gridWidth - 1, GameManager::get().gridHeight - 1));
rect.setFillColor(sf::Color(0, 255, 0));
setPos(posv);
} |
#ifndef Rose_NullSemantics_H
#define Rose_NullSemantics_H
#include "x86InstructionSemantics.h"
#include "BaseSemantics.h"
namespace BinaryAnalysis { // documented elsewhere
namespace InstructionSemantics { // documented elsewhere
/** Semantic domain that does nothing, but is well documented.
... |
#pragma once
template <typename X>
class HeapNode {
//Constructor
HeapNode(const X& data);
X data;
HeapNode* left;
HeapNode* right;
HeapNode* parent;
}; |
#include "FinitePlane.h"
FinitePlane::FinitePlane(vec3 corner, float width, float height, vec3 color, bool reflective, bool trans, float ior)
{
Corner = corner;
Width = vec3(corner.m_X + width, corner.m_Y, corner.m_Z);
Height = vec3(corner.m_X, corner.m_Y + height, corner.m_Z);
Color = color;
Reflective = reflec... |
/**
*
* @file Logger.hpp
* @brief Logging class
* @author Naoki Takahashi
*
**/
#pragma once
#include "Messenger.hpp"
#include <memory>
#include <string>
#include <thread>
#include <vector>
#include "../Math/Matrix.hpp"
namespace Tools {
namespace Log {
class Logger {
public :
Logger();
... |
/*
*/
#include <Wire.h>
#include "VL6180X.h"
#define SET_SENSORS_ADDRESSES
// #define TEST_LATENCY
#define RANGE 1
#define NUM_OF_SENSORS 4
#define RANGE_PERIOD 30
/*
List of adresses for each sensor - after reset the address can be configured
The I2C address have to be gap of 2, according to I2C protocal
Note... |
#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
#define ll long long
#define scl(n) cin>>n;
#define scc(c) cin>>c;
#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)
... |
#pragma once
#include "ofMain.h"
#include "int2.h"
//Flood fill and blobs processing
//Rose of winds
//sv=4 or 8 - connectivity of pixels
vector<int2> ofxKuRoseOfWinds(int sv, int w);
//Flood fill
//outPoints as x+w*y
size_t ofxKuFloodFill(vector<unsigned char> &input, int w, int h, int sv,
... |
#include <string.h>
#include "iComm.h"
#include "iBaseClientConfig.h"
namespace Comm
{
BaseClientConfig :: BaseClientConfig( const std::string& sConfig) :
IniConfig( sConfig )
{
_poEndpointMgr = new EndpointMgr( "Server" );
}
BaseClientConfig :: ~BaseClientConfig()
{
if( _poEndpointMgr )
delete _poEndp... |
#include "pch.h"
#include <iostream>
#include "fstream"
using namespace std;
int Bin(int n, int m)
{
if (n == m)
return 1;
if (m == 1)
return n;
return Bin(n - 1, m - 1) + Bin(n - 1, m);
}
int main()
{
ofstream lof;
ifstream lin;
int m;
int n;
lin.open("lin.txt");
lin >> n;
lin >> m;
lin.close();
if ... |
#ifndef GALES_FLUID_PROPERTIES_READER_HPP
#define GALES_FLUID_PROPERTIES_READER_HPP
#include "chemicals.hpp"
#include "mixtures.hpp"
namespace GALES {
/**
This class reads fluid properties.
To distinguish between the type of a material we use keywords: mix_of_mix, mix_of_ch, magma_mix, ch_as... |
class Solution {
public:
double myPow(double x, int n) {
if(n == 0) return 1;
bool tag = false;
int nn;
if(n < 0)
{
tag = true;
if(n != -2147483648)
nn = -1*n;
else nn = 2147483647;
}
double res = mypositiveP... |
#include <fstream>
#include <string>
#include "sprite.hpp"
namespace Game
{
SimpleSprite*
SimpleSprite::Load(const char *name)
{
int uwidth, uheight;
int states;
int keyR, keyG, keyB;
std::ifstream fin(name);
fin >> uwidth >> uheight;
... |
#ifndef BUILDING_NODE_EXTENSION
#define BUILDING_NODE_EXTENSION
#endif
#include <iostream>
#include <vector>
#include <algorithm>
#include <exception>
#include <Magick++.h>
#include <node.h>
#include <v8.h>
#include <node_buffer.h>
#include "nan.h"
using namespace v8;
// input
// args[ 0 ]: options. required, objec... |
#ifndef MAILBOT_HPP_INCLUDED
#define MAILBOT_HPP_INCLUDED
#include "email.hpp"
#include "pop.hpp"
#include <string>
/**
A bot that can take order from mails in a mailbox.
**/
class Mailbot
{
public:
Mailbot(boost::asio::io_service& iosev)
: iosev(iosev), mailbox(iosev), emails(),
name("mailbot"), ... |
#pragma once
#ifndef _AILEVEL_H_
#define _AILEVEL_H_
class AILevel
{
private:
unsigned short m_usWidth, m_usHeight;
char* m_cpBuffer = nullptr;
unsigned short* m_uspColours = nullptr;
public:
AILevel(unsigned short a_usWidth, unsigned short a_usHeight);
void Draw();
~AILevel();
void SetCharacter(unsigned sho... |
#ifndef AUBASE_H
#define AUBASE_H
#include <QObject>
#include <QVector>
#include <QHash>
/* трохи термінології від 20200215
* все вищенаписане треба розглядати в контексті поточної копії програми яка виконується на поточному комп'ютері.
* ця поточна копія називатиметься місцевою,
* відповідно всі дані які така мі... |
/********************************************************************************
** Form generated from reading UI file 'tablewidget.ui'
**
** Created by: Qt User Interface Compiler version 5.13.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
**************************************... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "base.h"
WINRT_WARNING_PUSH
#include "internal/Windows.UI.3.h"
#include "internal/Windows.Foundation.3.h"
#include "internal/Windows.Storage.Streams.3.h"
#include "internal/Windows.UI... |
//
// Created by janos4276 on 05/12/16.
//
#include "Anonymiser.h"
#include <cstring>
#include <iomanip>
#include <sstream>
using adelost::Anonymiser;
Anonymiser::Anonymiser(const std::string& salt):
m_ctx(::EVP_MD_CTX_create()),
m_salt(salt)
{
clear_digest();
}
Anonymiser::~Anonymiser()
{
... |
// /**
// * // This is the robot's control interface.
// * // You should not implement it, or speculate about its implementation
// * class Robot {
// * public:
// * // Returns true if the cell in front is open and robot moves into the cell.
// * // Returns false if the cell in front is blocked and robo... |
#include<bits/stdc++.h>
using namespace std;
int partition( int a[],int si,int ei)
{
int count=0,x=a[si];
for(int i=si;i<=ei;i++)
{
if(a[i]<x)
count++;
}
int temp=a[si];
a[si]=a[si+count];
a[si+count]=temp;
for(int i=si;i<(si+count);i++)
{
for(int j=ei;j... |
#include "dataobject.h"
DataObject::DataObject(QString name, QString color) : QObject(NULL)
{
m_name = name;
m_color = color;
}
QString DataObject::getName() const
{
return m_name;
}
void DataObject::setName(const QString &name)
{
if(m_name != name){
m_name = name;
emit nameChanged();... |
/////////////////////////////////////////////////////////////////////////
// Filename: clusterip.cpp
// Description:
// Date Created: 04/01/2013
// Modification History:
// 04-01-2013 - Initial coding(Eric)
////////////////////////////////////////////////////////////////////////
#include<queue>
#include<stdio.h>
... |
// This file has been generated by Py++.
#include "boost/python.hpp"
#include "generators/include/python_CEGUI.h"
#include "RenderingContext.pypp.hpp"
namespace bp = boost::python;
struct RenderingContext_wrapper : CEGUI::RenderingContext, bp::wrapper< CEGUI::RenderingContext > {
RenderingContext_wrapper(CEGUI:... |
#include <cstdio>
#include <cstring>
#include <cctype>
int c2i(char c)
{
if (isdigit(c))
return c - '0';
else if (c >= 'a' && c <= 'z')
return c - 'a' + 10;
else
return c - 'A' + 10;
}
char i2c(int i)
{
if (i < 10)
return i + '0';
else
return i - 10 + 'A';
}... |
/*
* Copyright (c) 2009-2012 André Tupinambá (andrelrt@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use... |
//
// Encrypt.cpp
// user
//
// Created by Vincent on 2020/6/26.
// Copyright © 2020 Vincent. All rights reserved.
//
#include "Encrypt.hpp"
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <string>
#include "md5.hpp"
std::string Encrypt::randomSalt()
{
auto randchar = []() -> char
{
... |
#include <iostream>
using namespace std;
void extended_array(int *&arr,int &size);
void fill_array(int *&arr,int size);
int main(){
int size;
cout << "enter input size: ";
cin >> size;
int *A= new int [size];
fill_array(A,size);
extended_array(A,size);
for(int i=0; i< size; i++) cout << A[i] <... |
#include <testbench.h>
#include "Vregister_single_in.h"
class RegisterSingleInTest : public Testbench<Vregister_single_in> {
protected:
RegisterSingleInTest() {
}
virtual ~RegisterSingleInTest() {
}
void TestValue(uint8_t value) {
dut->load = 0;
eval();
dut->data_in = value;
dut->load = 1;
eval()... |
// 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::Graphics {
struct PointInt32;
struct SizeInt32;
struct RectInt32;
}
namespace Windows::Graphics {
using PointInt32 = ABI::Windows::G... |
#ifndef HELIT_STAND_H
#define HELIT_STAND_H
#include "../HelitState.h"
class HelitStand :public HelitState
{
public:
explicit HelitStand(Helit* helit);
~HelitStand() = default;
::StateHelit getState() override;
void update(float dt) override;
};
#endif
|
#ifndef SAVINGSMANAGER_H
#define SAVINGSMANAGER_H
#include <iostream>
#include "UserManager.h"
#include "IncomesManager.h"
#include "ExpensesManager.h"
using namespace std;
class SavingsManager {
UserManager userManager;
IncomesManager *incomesManager;
const string INCOMES_FILE_NAME;
ExpensesManager... |
/*************************************************
* Publicly released by Rhoban System, August 2012
* www.rhoban-system.fr
*
* Freely usable for non-commercial purposes
*
* Licence Creative Commons *CC BY-NC-SA
* http://creativecommons.org/licenses/by-nc-sa/3.0
*************************************... |
/*
Copyright (C) 2011 by Ladislav Hrabcak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
//
// Created by abrdej on 20.12.17.
//
#ifndef PIGEONWAR_BOARD_CONTAINER_H
#define PIGEONWAR_BOARD_CONTAINER_H
#include <array>
#include <vector>
#include <algorithm>
#include <functional>
#include <limits>
class board_container final {
public:
static const std::uint32_t cols_n = 15;
static const std::uint32_t ro... |
/*
*****************************************************************************
* ___ _ _ _ _
* / _ \ __ _| |_| |__(_) |_ ___
* | (_) / _` | / / '_ \ | _(_-<
* \___/\__,_|_\_\_.__/_|\__/__/
* Copyright ... |
#pragma once
#include <vector>
#include "Vertex.h"
#include "Texture.h"
class Mesh {
public:
GLuint vao, vbo, ebo;
std::vector<Vertex> vertices;
std::vector<GLuint> indices;
std::vector<Texture> textures;
Mesh(std::vector<Vertex> vertices, std::vector<GLuint> indices, std::vector<Texture> textures);
... |
#include <bits/stdc++.h>
#define ll long long
const ll MOD = 1000000007;
const ll INF = 1e18;
using namespace std;
template<typename T>
void print(const T& t) {
std::copy(t.cbegin(), t.cend(), std::ostream_iterator<typename T::value_type>(std::cout, " "));
cout << endl;
}
template<typename T>
void print2d(con... |
/***********************************************************************
created: Mon Jul 27 2009
author: Paul D Turner <paul@cegui.org.uk>
*************************************************************************/
/***************************************************************************
* Copyrigh... |
#include <stdio.h>
// 题意:给出A、B瓶的容量,给出目标水量数,要求只用fill、pour、empty三种操作。
// 做法:看过网上的做法,知道了两个瓶子的容量值是互质的,而且不用最优解,这就给出了一个傻瓜式的步骤,有点辗转相除法的意思。
// 规则:首先加满A,然后倒到B,每从A倒向B一次,就判断一次B中的水量是否达到目标,没达到目标的话,对B判断是否满,满了就倒,对A判断是否不为零,为零就补满。
int main() {
int ca, cb, n;
while(scanf("%d %d %d", &ca, &cb, &n) != EOF) {
int ta, tb;
... |
#ifndef HASHTABLELINEARPROBING_H
#define HASHTABLELINEARPROBING_H
#include "Hash.h"
template <typename HashElement>
struct Element
{
Element(HashElement* elem)
{
data = elem;
haveBeenUsed = false;
}
bool haveBeenUsed;
HashElement* data;
};
template <typename HashElement>
class HashTableLinearProbing
{
publ... |
// AT.cpp : Defines the entry point for the console application.
//----------------------------------------------
//#include<ilcplex/ilocplex>
//#include<ilconcert/ilolinear.h>
#include<iostream>
#include<sstream>
#include<cstring>
#include<string>
#include<fstream>
#include<math.h>
#include<algorithm>
#incl... |
/*************************************************************
Author : qmeng
MailTo : qmeng1128@163.com
QQ : 1163306125
Blog : http://blog.csdn.net/Mq_Go/
Create : 2018-03-11 11:25:10
Version: 1.0
**************************************************************/
#include <cstdio>
#include <iostream>
using namesp... |
/* @brief ProcessCFB.h
* Archivo que contiene los prototipos de las funciones
* encargadas de llevar a cabo el procedimiento del
* modo de operacion CFB
*/
#ifndef PROCESSCFB_H
#define PROCESSCFB_H
#include <bits/stdc++.h>
using namespace std;
void vectorIVGeneration( string *vectorIV );
void saveVectorIV( str... |
#ifndef CSHADERMGR_H
#define CSHADERMGR_H
#include <map>
#include "typedefs.h"
#include "GL/glew.h"
class Program;
class CShaderMgr{
public:
Program* getProgram(const String& name);
void cleanup();
private:
typedef std::map<String, Program*> ProgramMap;
ProgramMap m_programs;
... |
//https://practice.geeksforgeeks.org/problems/boundary-traversal-of-binary-tree/1 |
/*
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 "Coada.h"
#include<iostream>
#include "Myexception.h"
using namespace std;
Coada::Coada(int dimMax):Vector(dimMax)
{
varf=-1;
cout<<"Coada\n";
}
Coada::~Coada()
{
cout<<"Distruge coada\n";
}
Coada::Coada(const Coada& other):Vector(other)
{
varf=other.varf;
cout<<"Copiaza... |
#ifndef __CannonProjectile__H__
#define __CannonProjectile__H__
class CannonProjectile :
public GameObject
{
protected:
Pool<CannonProjectile>* m_pPoolOwner;//the pool in which the enemy is
double m_projectileLiveTimer;
bool m_pendingPoolRemoval;
public:
CannonProjectile(Pool<CannonProjec... |
#include <iostream>
using namespace std;
class Animal {
public:
string name;
int age;
string species;
void greet () {
cout << "I am " << species << ' ' << name << ". I am " << age << " years old" << endl;
}
Animal() {
name = "unknown";
age = 0;
species = "unk... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "EndGameMenu.h"
#include "Components/Button.h"
#include "../UniverseGameInstance.h"
#include "Components/TextBlock.h"
bool UEndGameMenu::Initialize() {
bool Success = Super::Initialize();
if (!Success) return false;
if (!ens... |
extern "C" {
#include <util/delay.h>
#include <inttypes.h>
#include <stdlib.h>
#include <avr/io.h>
}
#include "cppcompat.h"
//#include "SerialController.h"
#include "I2CController.h"
#include "Accelerometer.h"
#include "ADCDevice.h"
#include "Motor.h"
#include "Light.h"
// COMPILE TIME CONSTANTS
// ... |
/*
Copyright (c) 2014, Martin Björkström
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
list of conditions an... |
/*
* Copyright (C) 2018-2020 wuuhii. All rights reserved.
*
* The file is encoding with utf-8 (with BOM). It is a part of QtSwissArmyKnife
* project. The project is a open source project, you can get the source from:
* https://github.com/wuuhii/QtSwissArmyKnife
* https://gitee.com/wuuhii/QtSwissArmyKnife... |
//
// Created by 邓岩 on 2018/10/31.
//
#ifndef QT_FINDDIALOG_H
#define QT_FINDDIALOG_H
# include <QDialog>
class QCheckBox;
class QLabel;
class QLineEdit;
class QPushButton;
class FindDialog : public QDialog {
Q_OBJECT;
public:
FindDialog(QWidget * parent = 0);
signals:
void findNext(const QString &str, Qt:... |
/* --COPYRIGHT--,BSD
* Copyright (c) 2011, Texas Instruments Incorporated
* 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 copy... |
#include "FilterWin.h"
FilterWin::FilterWin(QWidget *parent)
: QDialog(parent)
{
ui.setupUi(this);
connect(ui.yesBtn, SIGNAL(clicked()), this, SLOT(yesBtnPressed()));
}
FilterWin::~FilterWin()
{
}
void FilterWin::yesBtnPressed()
{
FilterClass fc;
fc.nr_k = ui.nr_k->text().toInt();
fc.stddev_mult = ui.stddev_... |
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <iostream>
#include <fstream>
Assimp::Importer gImp;
std::string gOutputName = "";
enum VertexData
{
VERTEX = 0x1,
NORMAL = 0X2,
UV = 0x4,
TANGENT = 0X8
};
void loadModel(std::string pPath)
{
const aiScene* s... |
///
/// \file Targets.cpp
/// \brief
/// \author PISUPATI Phanindra
/// \date 01.04.2014
///
#include "Targets.h"
#include "StringFunc.h"
#include <fstream>
#include <iostream>
void Targets::initialiseTargets() {
std::string targetDirectory = "..//data//targets//";
std::ifstream fTargets(target... |
#include "GUI.h"
GUI::GUI(QWidget* parent) :QMainWindow{ parent }
{
this->readSettings();
this->initializeGUI();
this->listCoats();
this->setMinimumHeight(500);
this->setMinimumWidth(600);
}
void GUI::initializeGUI()
{
QWidget* centralWidget = new QWidget{};
this->administratorLayout = new QWidget{};
this->us... |
#ifndef EX3_2_PVECTOR_H
#define EX3_2_PVECTOR_H
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "persistence_traits.h"
using namespace std;
template<typename T, typename P=persistence_traits<T>>
class pvector : public vector<T> {
string f;
void read() {
ifstream i... |
#include <fstream>
#include <string>
#include <cstdlib>
#include <iostream>
using namespace std;
inline char complement(char element)
{
static const char charMap[] =
{
'T', 'V', 'G', 'H', '\0', '\0', 'C', 'D', '\0', '\0', 'M', '\0', 'K',
'N', '\0', '\0', '\0', 'Y', 'S', 'A', 'A', 'B', 'W', '\0', 'R', '\0... |
/**
* $Source: /backup/cvsroot/project/pnids/zdk/zls/zlang/ConstantPool.cpp,v $
*
* $Date: 2001/11/14 19:03:08 $
*
* $Revision: 1.3 $
*
* $Name: $
*
* $Author: zls $
*
* Copyright(C) since 1998 by Albert Zheng - 郑立松, All Rights Reserved.
*
* lisong.zheng@gmail.com
*
* $State: Exp $
*/
#include <zls/z... |
// 问题描述
// 一个正整数如果任何一个数位不大于右边相邻的数位,则称为一个数位递增的数,例如1135是一个数位递增的数,而1024不是一个数位递增的数。
// 给定正整数 n,请问在整数 1 至 n 中有多少个数位递增的数?
// input:30 output: 26
#include <bits/stdc++.h>
using namespace std;
int solve(const int& a) {
bool flag = true;
int count = 0;
if (a == 10) return 9;
if (a < 10) return a;
for... |
// Created by wangwenjie on 2013/04
#ifndef __ZOOM_LAYER__
#define __ZOOM_LAYER__
#include "cocos2d.h"
#include "WJLayerJson.h"
#include "WJLayerJson2x.h"
USING_NS_CC;
class ZoomLayer : public WJLayerJson2x
{
private:
Size m_winSize;
Point m_origion;
// 移动到最外面
bool m_moveOutSide;
// 两点之间的距离
double m_twoTou... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "../Utils/Structs.h"
#include "BaseShootingWeapon.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FRecoilResetDelegate);
class ATPPlayer;
UCLASS()
class THI... |
#include "TerrainTile.h"
#include "SimplexNoise.h"
#include "geo/Mesh.h"
// #include "Image2D.h"
namespace revel
{
TerrainTile::TerrainTile()
{
}
TerrainTile::~TerrainTile()
{}
void
TerrainTile::set_vertex_array(const std::shared_ptr<renderer::VertexArray>& va)
{
m_VertexArray = va;
}
const std::shared_ptr<ren... |
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include "ACIO.h"
#include "Menu.h"
#include "... |
// An "Antiafk" program that prevents the character from timing out in-game.
// For World of Warcraft version 3.3.5 123450
#include <iostream>
#include <thread>
#include <distant/process.hpp>
#include <distant/virtual_memory.hpp>
void* operator new(const std::size_t sz)
{
//std::cout << "[NEW] new operator called\n... |
// =============================================================================
// Copyright 2012.
// Scott Alexander Holm.
// All Rights Reserved.
// =============================================================================
#ifndef CRIBHAND_H
#define CRIBHAND_H
#include <iostream.h>
#include "hand.h... |
#ifndef QTITIMERMANAGER_H
#define QTITIMERMANAGER_H
#include <map>
#include <string>
#include <thread>
#include "QtiTimerObj.H"
//
// QtiTimerManager has its own thread and manages all timers
// When a timer is fired, it inserts an event into the specified EventQ
//
class QtiTimerManager
{
typedef std::map<std::s... |
#include <iostream>
#include <queue>
#include <cstdio>
#include <math.h>
using namespace std;
#define LL int
const int maxn = 1e5 + 10;
LL a[maxn], b[maxn];
priority_queue<LL, vector<LL>, greater<LL>> p1;
int main()
{
int n;
cin >> n;
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (i... |
using namespace std;
#include<math.h>
#include <iostream>
int Myroot(double, double, double, double&, double&);
int Myroot2(double, double, double, double&, double&);
int main()
{
double a, b, c;
double root1, root2;
cout << "Input first coefficient " << endl;
cin >> a;
cout << "Input second coefficient " << ... |
//
// Created by zanbo on 2020/4/16.
//
class Solution {
public:
ListNode* rotateRight(ListNode* head, int k) {
if(!head || !head->next) return head;
//首先使用快指针计算链表长度
ListNode* fast = head;
int i=1;
int len=0;
while(fast->next && fast->next->next)
{
... |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include "libstr.h"
#include "st.h"
#include "tree.h"
#include <time.h>
//___type
#define TNUM 1001
#define TADD 1003
#define VADD 901
#define VSUB 903
#define TMUL 999
#define VMUL 805
#define VDIV 807
#define TX 1101
#define VSIN 701
#define VCOS 703
#define... |
/*
* SPDX-FileCopyrightText: (C) 2017-2022 Matthias Fehring <mf@huessenbergnetz.de>
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef CUTELYSTVALIDATORDIFFERENT_H
#define CUTELYSTVALIDATORDIFFERENT_H
#include "validatorrule.h"
#include <Cutelyst/cutelyst_global.h>
namespace Cutelyst {
class ValidatorDifferentPr... |
#include <stack>
#include <set>
#include "ReadWriter.h"
//string, fstream, iostream, vector, algorithm, Edge.h - included in ReadWriter.h
//Можно создавать любые классы и методы для решения задачи
struct Vertex;
using namespace std;
using Matrix = vector<vector<bool>>;
using Vertices = vector<Vertex>;
//Структура,... |
#include "particles.h"
#include <cmath>
#include <iostream>
using namespace std;
using namespace Eigen;
void makeGrid(ParticleSystem *psys);
void ParticleSystem::init() {
makeGrid(this); // also creates spring forces
forces.push_back(new DragForce(this, 0.01));
forces.push_back(new GravityForce(this, Vec... |
#include <iostream>
#include <cstdlib>
using namespace std;
class Employees {
private:
string name;
int ssn;
int salary;
public:
Employees()
{
ssn = 12345;
salary = 3500;
name = "Jim Moriarty";
}
void setName(string newName)
{
name = newName;
}
st... |
/*
Copyright (C) 2011 RVRS Industriis <http://rvrs.in>
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
(at your option) any later version.
This program is distrib... |
#include<stdio.h>
#include<string>
const int MAXSIZE=10;
void quickSort(int a[],int num){
if( num <=1 )
return ;
int i=0;
int j=num;
int tem = a[0];
while( i< j ){
for(;j>i;j--){
if(a[j]<tem){
a[i]=a[j];
break;
}
}
for (;i<j;i++){
if(a[i]>tem){
a[j]=a[i];
break;
}
}
}
... |
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <stdio.h>
#include <WinSock2.h>
#include <wsipv6ok.h>
#pragma comment(lib, "Ws2_32.lib")
int main() {
SOCKET s;
struct sockaddr_in server, client;
int c, l, err;
WSADATA wsaData;
if (WSAStartup(MAKEWORD(2, 2), &wsaData) < 0) {
printf("Error initializing windo... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using PII = pair < int,int>;
int const N = 1e5 + 10;
vector<int> g[N] ;
int n;
vector<int> cen;
int sub[N];
void dfs(int u, int p){
sub[u] = 1;
bool c = 1;
for(int v : g[u]){
if(v == p) continue;
dfs(v,u);
sub[u]... |
// ----------------------------------------------------------------------
// RakNet version 1.405
// ClientFileVerification.cpp
// Created by Rakkar Software (rakkar@jenkinssoftware.com) December 1, 2003
// Shows how to verify that a file on the client matches a file on the server.
// -----------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.