text stringlengths 8 6.88M |
|---|
#pragma once
#include <glm.hpp>
#include <gtc/matrix_transform.hpp>
#include <array>
#include <vector>
namespace oglml
{
class Texture2D;
class Shader;
class Particles
{
using ColorsData = std::array<float, 4>;
using OffsetsData = std::array<float, 2>;
public:
Particles();
~Particles() = default;
... |
#include "m580_button.h"
M580_button::M580_button(QString text, QWidget *parent) : QPushButton(parent), m_text(text)
{
setText(m_text);
setStyleSheet("background-color: rgb(237, 187, 153);"
"color: rgb(255, 255, 255);");
}
void M580_button::setName(QString text)
{
m_text = text;
}
QStri... |
#include <iostream>
#include "console.h"
#include<ctime>
using namespace std;
#define tuong_tren 2
#define tuong_duoi 23
#define tuong_trai 5
#define tuong_phai 69
struct ToaDo
{
int x,y;
};
ToaDo thanran[200];
enum TrangThai {UP,DOWN,RIGHT,LEFT};
struct snake
{
int n;//so đot cua ran
TrangThai tt;
};
void ... |
/* usb test with libusb-1.0 */
#include <iostream>
#include "libusb.h"
int main() {
libusb_device **devs;
libusb_device *dev;
libusb_device_descriptor desc;
libusb_device_handle *dh;
uint8_t path[8];
uint8_t sdat[255];
int r, cnt;
r = libusb_init(NULL); // initalize
if(r < 0) return r;
cnt = lib... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
//
// Copyright (C) 2003-2007 Opera Software AS. All rights reserved.
//
// This file is part of the Opera web browser. It may not be distributed
// under any circumstances.
//
// Julien Picalausa
//
#ifndef OPERAINSTALLER_H
#define OPERAINST... |
#include "ExpressionTree.h"
#include <fstream>
#include <iostream>
std::vector<ExpressionTree> fillFromFile(std::string);
int main()
{
std::vector<ExpressionTree> exprTrees = fillFromFile("expressions.txt");
for(auto& exprTree : exprTrees)
{
exprTree.printInfixExpr();
std::cout << '\n';
std::cout << '\n';... |
#include <iostream>
#include <iomanip>
#include <cmath>
#include "Sphere.h"
Sphere::Sphere(){}
void Sphere::set(float radius, int sectors, int stacks)
{
this->radius = radius;
this->sectorCount = sectors;
if(sectors < MIN_SECTOR_COUNT)
this->sectorCount = MIN_SECTOR_COUNT;
this->stackCount = ... |
#include "stdafx.h"
#include "ReadyGO.h"
ReadyGO::~ReadyGO()
{
DeleteGO(m_ready);
DeleteGO(m_GO);
}
bool ReadyGO::Start()
{
m_ready = NewGO<SpriteRender>(30, "sp");
m_ready->Init(L"Assets/sprite/Ready2.dds", 980.f*0.8f, 388.414f*0.8f);
m_rpos = { -630,0,0 };
m_ready->SetPosition(m_rpos);
m_ready->SetScale({ ... |
//Tran Nhan To - 58131391
#include<stdio.h>
#include<conio.h>
#include <stdlib.h>
#include<iostream>
#include<fstream>
#define fo "output1.txt"
using namespace std;
int a[50][50],n,m;
int i,j;
//nhap ma tran kich thuot nxn
void nhapmang()
{
do{
cout<<"So dong va so cot phai bang nhau!"<<endl;
cout<<"Nhap so dong ... |
/*!
* \file arrow.cpp
* \author Simon Coakley
* \date 2012
* \copyright Copyright (c) 2012 University of Sheffield
* \brief Implementation of graphics arrow in stategraphs
*/
#include <QtGui>
#include <math.h>
#include "./arrow.h"
const qreal Pi = 3.14; /* definition of Pi */
/*!
* \brief Arrow constructor
* ... |
#include <iostream>
#include <vector>
#include <map>
#include <ios>
#include <iomanip>
using namespace std;
vector< vector<int> > llenarMatriz( int , int ) ;
vector<int> soliNumeros( int ) ;
void mostrarMatriz( vector< vector<int> > ) ;
int valMaxMatriz( vector< vector<int> > ) ;
int valMaxVector( vecto... |
#include "stdafx.h"
#include "MyCompute.h"
#include "math.h"
CMyCompute::CMyCompute(void)
{
m_data = 0;
}
CMyCompute::CMyCompute(double data)
{
m_data = data;
}
CMyCompute::~CMyCompute(void)
{
}
double CMyCompute::MyCube(void)//立方运算
{
return m_data*m_data*m_data;
}
double CMyCompute::MyCube(double data)
{... |
/**************************
编(chao)写(xi)于2018-09-19日
抄袭自m0n0ph1/Process-Hollowing
用来Inject的进程必须是GUI进程
***************************/
#include <Windows.h>
#include <iostream>
using namespace std;
typedef struct _BASE_PROCESS_INFO
{
ULONG BaseAddress;
CONTEXT ThreadContext;
PROCESS_INFORMATION ProcessI... |
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#include "core/pch.h"
#include "modules/img/src/imagemanagerimp.h"
#include "modules/i... |
//
// Created by pierreantoine on 11/01/2020.
//
#include <cstdio>
#include <cstdarg>
#include <cstring>
#include <cmath>
#include "fb3-2.h"
static unsigned symhash(const char *sym)
{
unsigned int hash = 0;
unsigned c;
while ((c = *(sym++)))
{
hash = hash * 9 ^ c;
}
return hash;
}
sym... |
#include <iostream>
#include <vector>
//Metodo de burbuja.
int main()
{
//Se agrega una lista con valores aleatorios
std::vector<std::int32_t> l1 = {18,15,75,22,10,5,68,4};
int dam = 8;
std::cout << "Lista inicial: ";
for (int i = 0;i < dam;i++) {
std::cout << l1[i] << ",";
}
std::cout << "\n";... |
// Created on: 1999-02-15
// Created by: Andrey BETENEV
// Copyright (c) 1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Less... |
#include<iostream>
#include<string>
using namespace std;
int convert_stoi(string s,auto it)
{
if(it==s.end())
return result;
else
return *it
}
int main()
{
string s;
cin>>s;
auto it=s.begin();
cout<<convert_stoi(s,it);
return 0;
}
|
#include "stdafx.h"
#include "QsoError.h"
QsoError::QsoError(QsoErrorType errorType)
:
m_error(),
m_errorType(errorType)
{
}
QsoError::~QsoError()
{
}
|
#pragma once
#include "sx/GlyphStyle.h"
#include <cu/cu_macro.h>
#include <vector>
namespace sx
{
class GlyphStyle;
class GlyphStyleID
{
public:
int Gen(const GlyphStyle& style);
private:
static size_t Hash(const GlyphStyle& style);
static void HashColor(size_t& seed, const pt2::GradientColor& color);
privat... |
/*
* convert.cpp
* Author: Claire Savard (claire.savard@colorado.edu)
*
* This file converts decimal values to ap_fixed and
* prints them in the proper format required here:
* https://www.xilinx.com/support/documentation/sw_manuals/xilinx11/cgn_r_coe_file_syntax.htm
*
* To run:
* $ make run
* $ ./convert... |
#ifndef PI_SBUS
#define PI_SBUS
class PiSBus {
public:
PiSBus(std::string);
int Begin();
void Read();
void DisplayData();
private:
std::string _port;
int _file;
uint16_t _channel_values[18];
uint8_t _sbus_data[25];
};
#endif
|
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <list>
#include <algorithm>
#include <sstream>
#include <set>
#include <cmath>
#include <map>
#include <stack>
#include <queue>
#include <stdio.h>
#include <string.h>
#define MAX 50000 // 5133
#define SIZE 10000
#def... |
#pragma once
#include <cmath>
#include <ostream>
#include "ross.hpp"
namespace ross
{
/**
* Immutable type to represent colors by various channels, each of which is measured in intensity from 0.0 to 1.0
*/
template<uint8_t kChannels>
class color
{
public:
/**
* Each channel is a value from 0.0 (minimu... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*- */
#include "core/pch.h"
#include "modules/ecmascript/carakan/src/es_pch.h"
#include "modules/ecmascript/carakan/src/builtins/es_builtins.h"
#include "modules/ecmascript/carakan/src/builtins/es_date_builtins.h"
#i... |
#ifndef COMPUTETINITIAL_H
#define COMPUTETINITIAL_H
#include <vector>
#include <properties/properties.h>
/*!
\file
\brief This function computes the initial temperature distribution at all cells
*/
/**
Creates inittial temperature distribution
@param[in] grid - takes total number of nodes in X and Y directions
@par... |
//---------------------------------------------------------
//
// Project: dada
// Module: gl
// File: Program.cpp
// Author: Viacheslav Pryshchepa
//
//---------------------------------------------------------
#include "dada/gl/GL.h"
#include "dada/core/Log.h"
#include "dada/gl/Program.h"... |
#include<iostream>
#include "BBoard.hpp"
// #include "Ship.cpp"
#include<string>
using namespace std;
int main(){
Ship shipA("je", 4);
Ship shipB("Su", 2);
Ship shipC("Ta", 3);
BBoard boardA;
cout << shipA.getName() << endl;
//newBoard.getShipsArrayElement(2,4);
cout << boardA.placeShip(&shipA, 2, ... |
/////////////////////////////////////////////
/////////////////////////////////////////////
//
//
// APEX_Sieve
//
// small class used to get Sieve information:
// translates between hole number to column and row and vice vers
// (slighlty more complex arangement in APEX sieve)
//
// Also has function to return TCS (T... |
#include "NutrientTableImpl.h"
#include <mylibs/io.hpp> // pl::printContainer
#include "Utils.h" // fa::utils::makeClassString
#include <functional> // std::plus, std::minus
#include <utility> // std::move
#include <mylibs/container.hpp> // pl::eraseIf
namespace fa {
using namespace literals;
Nutrie... |
#ifndef VLEX_UTILS_H
#define VLEX_UTILS_H 1
#include <cassert>
#include <string>
//void *checked_malloc(int);
//std::string String(char *);
namespace vlex{
struct U_boolList{
bool head_;
U_boolList *tail_;
U_boolList(bool head, U_boolList *tail = nullptr):head_(head), tail_(tail){
}
};
}// namespa... |
#include "processicon.h"
extern Game * game;
ProcessIcon::ProcessIcon(QGraphicsItem *parent): QGraphicsRectItem(parent){
setRect(0,0,100,100);
setBrush(Qt::green);
}
void ProcessIcon::mousePressEvent(QGraphicsSceneMouseEvent *event){
//when player clicks the process icon, creates a process
... |
//
// main.cpp
// 6. 面向对象
//
// Created by 赵志诚 on 2021/1/6.
// Copyright © 2021年 赵志诚. All rights reserved.
//
#include<iostream>
#include<cstdlib>
#include<cstring>
using namespace std;
class vehicle
{
protected:
int wheels;
double weight;
public:
vehicle(int wh,double we)
{
wheels=wh;
... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>... |
#include "Battery.h"
const double X0 = 512;
const double Y0 = 640;
Battery::Battery():
m_theta(0)
{
}
void Battery::Draw() {
Circle(X0, Y0, 60).draw(Color(100, 100, 100, 180));
Line(X0, Y0, X0 + R * cos(Theta()), Y0 + R * sin(Theta())).drawArrow(3, { 15, 15 }, Color(70, 70, 70, 180));
//font(Mouse::Pos()).draw... |
#ifndef BASE_SCHEDULING_TASK_LOOP_FOR_UI_H_
#define BASE_SCHEDULING_TASK_LOOP_FOR_UI_H_
// For now, TaskLoopForUI is just a pass-through to TaskLoopForWorker since we
// don't really support UI capabilities just yet. Once we implement a real UI
// thread along with UI event listening mechanics, then we can implement a... |
#ifndef __SVR_CONFIG_H__
#define __SVR_CONFIG_H__
#include <string.h>
#include "Typedef.h"
#define MAX_SERVER_NODE_LIST (128)
class ServerNode
{
public:
ServerNode(int svid, const char* ip, short port)
{
this->svid = svid;
strcpy(this->ip,ip);
this->port = port;
}
char ip[64];
short port;
int svid;... |
#pragma once
#include <stack>
#include <memory>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Window/Event.hpp>
#include "EntityManager.h"
#include "Output.h"
namespace FW
{
class Application;
class SceneManager
{
public:
class BaseScene // base scene in which all other scenes inherit ... |
//: C03:Menu.cpp
// Kod zrodlowy pochodzacy z ksiazki
// "Thinking in C++. Edycja polska"
// (c) Bruce Eckel 2000
// Informacje o prawie autorskim znajduja sie w pliku Copyright.txt
// Prosty program menu, ilustrujacy
// uzycie instrukcji "break" i "continue"
#include <iostream>
using namespace std;
int main... |
#pragma once
#include <set>
#include "../system.hpp"
namespace sbg {
struct PhysicEngine : Engine {
void add(std::shared_ptr<Entity> entity);
void remove(std::weak_ptr<Entity> entity);
void execute(Time time) override;
private:
std::set<std::weak_ptr<Entity>, std::owner_less<std::weak_ptr<Entity>>> _objects;
... |
/*
ID: andonov921
TASK: comehome
LANG: C++
*/
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <algorithm>
#include <sstream>
#include <climits>
#include <fstream>
#include... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
#define INF 10e10
#define rep(i,n) for(int i=0; i<n; i++)
#define r... |
#pragma once
#include "Unit.h"
#include "Inventory.h"
class Player2 : public Unit, public Inventory
{
public:
Player2();
~Player2();
void InputPlayer();
void ShowStatus();
};
|
#include "Command.h"
Command::Command(std::string commandName, std::string(*Execute)(std::vector<std::string> &arguments, unsigned short originID, unsigned short targetID), bool requiresTarget, int numParams, int minLevel)
{
// lets assume good data;
this->commandName = commandName;
this->executeFnc = Execute;
thi... |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 100
#define INF 0x3f3f3f3f
#define DEVIATION 0.00000005
typedef long long LL;
bool ans;
int num[5];
void DFS(int k,int now){
if( ans ) return;
if( k == 5 ){
if( now == 23 )
ans = true;
... |
//
// ofxTwistedRibbon.cpp
// example
//
// Created by Atsushi Tadokoro on 8/14/14.
//
//
#include "ofxTwistedRibbon.h"
ofxTwistedRibbon::ofxTwistedRibbon(int _length, ofColor _color, float _thickness){
length = _length;
color = _color;
thickness = _thickness;
}
void ofxTwistedRibbon::update(ofVec3f p... |
#include <stdio.h>
#include <assert.h>
#include "exeq.h"
/////////////////////////////////////////////////////////////
// Init function initializes the EXEQ
/////////////////////////////////////////////////////////////
EXEQ* EXEQ_init(void){
int ii;
EXEQ *t = (EXEQ *) calloc (1, sizeof (EXEQ));
for(ii=0; ii<MA... |
#include<bits/stdc++.h>
using namespace std;
main()
{
long long int a, b, count, extra, sum;
while(scanf("%lld %lld",&a,&b)==2)
{
if(a==0 && b==0)
break;
while(a!=0 ||b!=0)
{
sum = (a%10+b%10);
if(sum + extra>9)
{
count... |
#include "../DetectMemoryLeak.h"
#include "Minimap.h"
#include "GraphicsManager.h"
#include "RenderHelper.h"
#include "../EntityManager.h"
#include "GL\glew.h"
#include "../PlayerInfo/PlayerInfo.h"
#include "../Application.h"
#include "MouseController.h"
#include "KeyboardController.h"
#include "MeshList.h"
CMinimap:... |
//
// Created by heyhey on 20/03/2018.
//
#include "Structure.h"
Structure::Structure() {
}
Structure::Structure(Condition *condition) : condition(condition) {}
Condition *Structure::getCondition() const {
return condition;
}
void Structure::setCondition(Condition *condition) {
Structure::condition = cond... |
#include <iostream>
#include <vector>
/************************************
* Some Experimentation with vectors*
************************************/
using namespace std;
int main (int argc, char **argv) {
vector<int> v;
vector<int> *v_ptr = &v;
v.push_back(11);
v.push_back(22);
cou... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
* Author: Petter Nilsen
*/
#include "core/pch.h"
#ifdef WIC_PERMI... |
//include header
#include "main.hpp"
//prototypes
void Main_Testing();
void ConnectFour_Testing();
void Gomoku_Testing();
void TicTacToe_Testing();
void TicTacToe_Implementation_Test1();
void Hex_Testing();
void Go_Testing();
void Benchmark();
void DiffSim_Testing(Game_Engine* diffSim, Player_Engine* players[], string... |
#ifndef HOSTMANAGERWIDGET_H
#define HOSTMANAGERWIDGET_H
#include <QDialog>
class HostManager ;
class QTableView ;
class QToolBar ;
class QTextEdit ;
class QStandardItemModel ;
class HostManagerDialog : public QDialog
{
Q_OBJECT
public:
explicit HostManagerDialog(QWidget * parent = 0);
~HostManagerDialog()... |
#pragma once
#ifndef __MACROS_H_
#define __MACROS_H_
#include <map>
#include <vector>
#include <string>
#define __MY_A(V) #V
#define __MY_W(V) L##V
#define STRING std::string
#define WSTRING std::wstring
#if !defined(_UNICODE) && !defined(UNICODE)
#define TSTRING std::string
#define __MY_T... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2010 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef LOGDOC_H
#define LOGDOC_H
#include "modules/logdoc/marku... |
#ifndef note_h
#define note_h
#include <QString>
#include <QDate>
#include <QXmlStreamWriter>
#include "noteediteur.h"
#include "ui_mainwindow.h"
class NoteEditeur;
class ArticleEditeur;
class TaskEditeur;
class ImageEditeur;
class VideoEditeur;
class AudioEditeur;
class MultimediaEditeur;
/*************************... |
#include "areainfopool.h"
CAreaInfoPool::CAreaInfoPool()
{
m_pBase = NULL;
m_AreaInfoList = NULL;
m_nPoolCount = 0;
m_nCurrIndex = 0;
}
CAreaInfoPool::~CAreaInfoPool()
{
Close();
}
void CAreaInfoPool::Close()
{
m_pBase = NULL;
m_AreaInfoList = NULL;
}
size_t CAreaInfoPool::Init(int nPoolC... |
#ifndef __SP_
#define __SP_
#include <float.h>
#include <stack>
#include "EdgeWeightedDigraph.h"
class SP
{
private:
vector<double> dist_to;
vector<DirectedEdge> edge_to;
private:
void relax(DirectedEdge e)
{
int v = e.from();
int w = e.to();
if(dist_to[w] > dist_to[v] + e.get... |
//: C12:CopyingWithPointers.cpp
// Kod zrodlowy pochodzacy z ksiazki
// "Thinking in C++. Edycja polska"
// (c) Bruce Eckel 2000
// Informacje o prawie autorskim znajduja sie w pliku Copyright.txt
// Rozwiazanie problemu utozsamiania wskaznikow
// za pomoca kopiowania wskazywanych przez nie
// obszarow podczas p... |
#include <bits/stdc++.h>
using namespace std;
bool judge(string S) {
string tmp = S;
reverse(tmp.begin(), tmp.end());
if (S == tmp)return true;
else return false;
}
int main(void) {
string S, substr1, substr2;
cin >> S;
substr1 = S.substr(0, (S.size() - 1) / 2);
substr2 = S.substr((S.siz... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2012 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef DOM_EXTENSIONS_MENUEVENT_H
#define DOM_EXTENSIONS_MENUEVEN... |
#include "Apriori.h"
using namespace std;
Apriori::Apriori(bitset<MAX_ITEM_LEN_> input[], int line_ans, double sup) {
for(int i = 0; i < MAX_INPUT_LINE_; i ++) {
data[i] = input[i];
}
min_sup = sup;
ans = line_ans;
}
Apriori::~Apriori() {
}
void Apriori::genL1() {
for (int i = 0; i < MA... |
#include "semantic_localization/semantic_localization.h"
boost::shared_ptr<SemanticLocalization> sl_ptr;
void sigintHandler(int sig)
{
// Save latest pose as we're shutting down.
sl_ptr->savePoseToServer();
sl_ptr.reset();
ros::shutdown();
}
int main(int argc, char** argv)
{
ros::init(argc, argv,... |
//
// Button.cpp
// Zengine
//
// Created by zs on 14-6-13.
//
//
#include "Button.h"
#include "GameScene.h"
Button::Button():_font(NULL),_fontScale(1),_sprite(NULL)
{
}
Button::~Button()
{
}
Button* Button::create(int id,const char* name)
{
Button* pRet = new Button();
if(pRet &... |
#pragma once
#include <GL/glew.h>
#include <GLM/glm.hpp>
#include "Scene.h"
#include "Shader.h"
class FontRenderer {
public:
FontRenderer();
virtual ~FontRenderer();
void render(Scene &scene);
private:
Shader fontShader;
};
|
/*
* StateManagerMCB.h
* File defining the MCB monitor
* Author: Alex St. Clair
* October 2018
*/
#ifndef MONITORMCB_H_
#define MONITORMCB_H_
#include "InternalSerialDriverMCB.h"
#include "StorageManagerMCB.h"
#include "ConfigManagerMCB.h"
#include "LTC2983Manager.h"
#include "ActionsMCB.h"
#i... |
#include "api/FRCNN/frcnn_api.hpp"
namespace FRCNN_API{
void Detector:: preprocess(const cv::Mat &img_in, const int blob_idx) {
const vector<Blob<float> *> &input_blobs = net_->input_blobs();
cv::Mat img_out;
img_in.convertTo(img_out, CV_32FC1);
CHECK(img_out.isContinuous()) << "Warning : cv::Mat img_out is n... |
#include "Peon.h"
#include "ETSIDI.h"
#define M 8
#define PX_X 800
#define PX_Y 800
Peon::Peon()
{
tipo = PEON;
}
Peon::~Peon()
{
}
void Peon::Mueve()
{
}
void Peon::SetColor(Color col)
{
color = col;
}
void Peon::SetRadio(float rad)
{
radio = rad;
}
void Peon::SetPos(float ix, float iy)
{
posicion[0] = ... |
#include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <utility>
using namespace std;
struct Node{
char c;
int prev;
int status;
vector<Node*> nexts;
Node(char project);
};
Node::Node(char project){
c = project;
nexts = vector<Node*>();
prev = ... |
#include "PHG4TPCPadPlaneReadout.h"
#include <g4detectors/PHG4Cellv1.h>
#include <g4detectors/PHG4CellContainer.h>
#include <g4detectors/PHG4CylinderCellGeom.h>
#include <g4detectors/PHG4CylinderCellGeomContainer.h>
#include <g4main/PHG4HitContainer.h>
#include "TF1.h"
#include <TSystem.h>
#include <TNtuple.h>
#incl... |
#include<stdio.h>
int function(int &x)
{
char ret;
char ran[9],dom[9],uni[3], uni2[3];
char open,close,comma,separ,brak;
int temp[9];
uni[1]='a';
uni2[1]='a';
uni[2]='b';
uni[3]='c';
uni2[2]='b';
uni2[3]='c';
for(int init=0;init<=8;init++)
temp[init]=1;
printf("\n\t\tU= { %c,%c,%c ... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QMessageBox>
#include <QWebElement>
#include <QWebFrame>
#include <QMessageBox>
// ---------------------------------------
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(&... |
#ifndef FILE_H
#define FILE_H
#include <iostream>
#include <fstream>
#include <string>
bool isFileExist(std::string name_of_file);
void createFile(std::string name_of_file);
int defineNumberOfNotesInFile(std::string name_of_file);
void showFileContent(std::string name_of_file);
#endif |
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
const int TARGET = 2020;
int find_target(const std::vector<int> numbers)
{
int index_of_second_number = 0, index_of_third_number = 1;
for (int number : numbers)
{
while (index_of_second_number < numbers.size())
{
... |
#include <string>
#include "PugiXml/src/pugiconfig.hpp"
#include "PugiXml/src/pugixml.hpp"
#include "j1ObjManager.h"
#include "App.h"
#include "j1Render.h"
#include "j1Textures.h"
#include "Object.h"
#include "j1Window.h"
#include "j1Scene.h"
#include "PugiXml/src/pugiconfig.hpp"
#include "PugiXml/src/pugixml.hpp"
... |
#include <HTStack/App/App.hpp>
#include <HTStack/Server/Server.hpp>
#include <HTStack/Request/Request.hpp>
#include <map>
#include <string>
class App : public HTStack::App {
public:
App (HTStack::Server & server, std::map <std::string, std::string> & settings);
void handleRequest (HTStack::Request & request);... |
/*
* Copyright 2019 LogMeIn
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
//
// Created by dylan on 23-5-2020.
//
#include "game_moves.hpp"
/// Constructor of the class game_moves
/// \param player: Represents either player 1 or player 2
/// \param x_cor: Represents: the x coordinate of the move
/// \param y_cor: Represents: the y coordinte of the move
game_moves::game_moves(cons... |
#include <chrono>
#include <thread>
#include "Context.hpp"
#include "GUIEventDispatcher.hpp"
using namespace uipf;
void Context::displayImage(const std::string& strTitle, const Matrix& oMat, bool bBlocking, bool bAutoClose)
{
// if we are running in the gui, open the window using Qt in the Qt MainWindow thread
if ... |
///< @author Michael Kulik
void start_part() // начальная расстоновка фигур
{
for(int i = 7; i >= 0; i--) // пешки белые
{
figures.push_back(new Pawn(0,i,1));
cells[1][i]->set_figure(figures.back());
}
for(int j = 7; j >= 0; j--) // пешки чёрные
{
figures.push_back(new Pawn... |
// ИК-приемник подключить к Digital Pin-02 на MEGA или Duemilanove
// Кнопку начала сканирования подключить между землей и Digital Pin-04
// Arduino Mega
#if defined(__AVR_ATmega2560__)
#define IRpin_PIN PINE
#define IRpin 4
// Arduino Duemilanove
#else
#define IRpin_PIN PIND
#define IRpin 4
#endif
#define MAXPULSE 6... |
#include <iostream>
class Vector {
private:
int erk;
int* arr;
int tamp ;
int count = 0;
int i = 0;
int* newArr(int size, int& er) {
int* array;
if(size == 1) {
array = new int [er * 2];
for(int j = 0; j < i; ++... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright (C) Opera Software ASA 2010-2011
*
* WebGL compiler -- compilation context.
*
*/
#include "core/pch.h"
#ifdef CANVAS3D_SUPPORT
#include "modules/webgl/src/wgl_context.h"
#include "modules/webgl/src/wgl_symbol.h"
#include "... |
#include "amelie.h"
#include <vector>
#include <QFileInfo>
#include <QResource>
#pragma region AmelieEvent
AmelieEvent::AmelieEvent()
{
this->amelie = AmelieApplication::getInstance();
}
AmelieEvent* AmelieEvent::getInstance()
{
static AmelieEvent* instance = new AmelieEvent();
return instance;
}
QU... |
#include <boost/lexical_cast.hpp>
#include <gui/TextPainter.h>
#include "NeuronsStackPainter.h"
static logger::LogChannel neuronsstackpainterlog("neuronsstackpainterlog", "[NeuronsStackPainter] ");
NeuronsStackPainter::NeuronsStackPainter() :
_section(0),
_showSingleNeuron(false),
_currentNeuron(0),
_showEnds(tr... |
//
// GameUI.h
// GetFish
//
// Created by zhusu on 15/1/27.
//
//
#ifndef __GetFish__GameUI__
#define __GetFish__GameUI__
#include "cocos2d.h"
#include "ButtonWithSpriteManage.h"
USING_NS_CC;
class GameUI : public CCLayer
{
public:
static const int DIR_NONE = 0;
static const int DIR_LEFT = 1;
s... |
#include "GlowEffect.h"
#include "Window.h"
#include <GL/glew.h>
GlowEffect::GlowEffect() {
preGlowFbo = new Fbo(window::getWindowSize(), false);
fbo = new Fbo(window::getWindowSize(), false);
glowShader.addShader("shaders/gui.vsh", GL_VERTEX_SHADER);
glowShader.addShader("shaders/glowEffect.fsh"... |
#include<cstdio>
#include<iostream>
#include<queue>
#include<map>
#include<vector>
using namespace std;
typedef long long ll;
int main(){
int res=0;
for(ll i=3;i<=59084709587505;++i){
ll temp=i;
bool flag=false;
while(temp%3==0){temp/=3;flag=true;}
while(temp%5==0){temp/=5;flag=true;}
while(temp%7==0){temp/... |
#include "stdafx.h"
#include <iostream>
#include <list>
#include <map>
#include <deque>
#include <algorithm>
#include <string>
#include <iterator>
#include <initializer_list>
#include <memory>
#include "List.h"
using namespace std;
bool sort_function_ubiv(List* object1, List* object2)
{
return (objec... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "DoorInteractorComponent.h"
#include "Door1.h"
bool UDoorInteractorComponent::Interact(UObjectInfo* info) {
ADoor1* owner = (ADoor1*)GetOwner();
if (owner) {
if (owner->IsLocked) {
owner->PlaySound("locked", owner->GetActo... |
#include <QApplication>
#include <QLabel>
#include <QPixmap>
#include <QPushButton>
#include <QGridLayout>
#include <QHBoxLayout> //horizontal box layout
#include <QVBoxLayout> //vertical box layout
#include <QGroupBox> //group radio buttons
#include <QRadioButton>
#include <QSlider>
#include <QSpinBox>
#include <QStri... |
// RsaToolbox includes
#include "VnaMath.h"
#include "VnaTrace.h"
#include "Vna.h"
using namespace RsaToolbox;
// Qt includes
// #include <QDebug>
VnaMath::VnaMath(QObject *parent) :
QObject(parent)
{
placeholder.reset(new Vna());
_vna = placeholder.data();
_trace.reset(new VnaTrace());
_channe... |
/*******************************************************************\
Module:
Author: CM Wintersteiger
\*******************************************************************/
#ifdef _WIN32
#include <windows.h>
#include <io.h>
#include <direct.h>
#endif
#include <stdlib.h>
#include <string.h>
#ifdef __MACH__
#inclu... |
class ItemPickaxe : ItemCore
{
scope = 2;
model = "z\addons\dayz_communityweapons\models\pickaxe\pickaxe.p3d";
picture = "\z\addons\dayz_communityweapons\models\pickaxe\pickaxe.paa";
displayName = $STR_EQUIP_NAME_PICKAXE;
descriptionShort = $STR_EQUIP_DESC_PICKAXE;
class ItemActions
{
class Use
{
text ... |
#include <iostream>
#include <stdlib.h>
#define MAXF 50
#define MAXC 50
using namespace std;
void imprimeMatriz(unsigned int W[MAXF][MAXC], unsigned int m);
void imprimeMatrizStr(string W[MAXF][MAXC], unsigned int m);
void leeMatriz(unsigned int W[MAXF][MAXC], unsigned int m);
int main()
{
char c = 164;
uns... |
#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>
#include <ctime>
#include <cstdlib>
#include <curses.h>
bool** genGrid (int rows, int cols)
{
bool** grid = 0;
grid = new bool*[rows];
srand(time(0));
for (int i = 0; i < rows; i++)
{
grid[i] = new bool[cols];
for (int j = 0; j < cols; j++)
{
... |
// Copyright (c) 2018 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special ... |
#ifndef DIALOG_H
#define DIALOG_H
#include <QMessageBox>
#include <QPushButton>
#include <QLabel>
class MessageBox : public QMessageBox
{
public:
MessageBox(QString message);
~MessageBox();
private:
QPushButton *button_dialog;
QLabel *label_dialog;
};
#endif // DIALOG_H
|
#pragma once
#include <iberbar/RHI/Types.h>
#include <iberbar/RHI/OpenGL/Headers.h>
namespace iberbar
{
namespace RHI
{
namespace OpenGL
{
void ConvertVertexFormat( UVertexFormat nFormat, uint32* pnSize, GLenum* pnType );
GLenum ConvertPrimitiveType( UPrimitiveType nPrimitiveType );
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.