text stringlengths 8 6.88M |
|---|
/**********************************************************************
* main.cpp
*
* Binary Search Tree
*
* Node.js Addons C/C++
*
* Deps: v8
*
* (C) 2018 Erick Rettozi
*
* MIT LICENCE
**********************************************************************/
#include <node.h>
#include "include/bst.hpp"
using v8::Loc... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e4;
vector<int> sav[maxn + 100];
vecto... |
#ifndef HASHCHECKER_H
#define HASHCHECKER_H
#include <QObject>
#include <QQueue>
#include <QFuture>
#include <QFutureWatcher>
struct CheckedEntry
{
QString name;
qint64 filesize;
bool needdownload;
QList<QPair<qint64, qint64> > chunks;
CheckedEntry(
const QString & u=QString(""),
b... |
#ifndef __COCOS_PILLAR_H__
#define __COCOS_PILLAR_H__
#include "Pillar.h"
#include "cocos2d.h"
// Pillar with cocos physics
class CocosPillar : public Pillar
{
public:
// Initialize instance (physics)
virtual bool init() override;
// static create()
CREATE_FUNC(CocosPillar);
};
#endif // __COCOS_PILLAR_H__
|
#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define pr pair<int,int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define MAX 1000001
typedef long long ll;
vector<int> primes;
void sieve() {
vector<bool> b(MAX,true);
b[0]=false;
b[1]=false;
for(long i=2;i*... |
#ifndef _ROS_sub8_msgs_Alarm_h
#define _ROS_sub8_msgs_Alarm_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "std_msgs/Header.h"
namespace sub8_msgs
{
class Alarm : public ros::Msg
{
public:
std_msgs::Header header;
bool action_required;
const char... |
/**
* Copyright (c) 2014, Timothy Stack
*
* 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 condi... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
long long pri(long long k) {
return (k/5) - (k/403) - (k/65) - (k/155) + (k/13) + (k/31) + (k/2015);... |
/*
* This file is part of Lua API++ library (https://github.com/OldFisher/lua-api-pp)
* distributed under MIT License (http://opensource.org/licenses/MIT).
* See license.txt for details.
* (c) 2014 OldFisher
*/
#ifndef LUA_INDEXER_HPP_INCLUDED
#define LUA_INDEXER_HPP_INCLUDED
#include "luapp_lazy.hxx"
namespace lua ... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2002 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#ifndef XSLT_APPLYTEMPLATES_H
#define XSLT_APPLYTEMPLATES_H
#ifdef XSLT_... |
#include "stdafx.h"
#include <algorithm>
#include <iostream>
#include <fstream>
#include "EdgesPriorityQueue.h"
using std::swap;
using std::cout;
EdgesPriorityQueue::EdgesPriorityQueue()
{
r = 1000;
rozmiar = 0;
kopiec = new pole[r];
}
EdgesPriorityQueue::~EdgesPriorityQueue()
{
if (kopiec != NULL)
delete[] ... |
#ifndef TERMINOA_H
#define TERMINOA_H
#include <iostream>
using namespace std;
class TerminoA
{
private:
int coeficiente;
char literal = 'x';
int exponente;
public:
TerminoA(void);
TerminoA(int c,int e);
TerminoA(int c, char l,int e);
int dameTuExponen... |
#ifndef STAT_H
#define STAT_H
class SamplerStat{
public:
SamplerStat(){}
static int count_1d;
static int count_nd;
static int total_1d;
static int total_nd;
};
#endif
|
#include <gameContext.h>
#include <gameWindow.h>
#include <ConfigManager.h>
#include <LogManager.h>
#include <GameStateManager.h>
#include <EventsStorage.h>
#include <MemoryManager.h>
#include <SystemManager.h>
#include <AssetsManager.h>
#include <EntityComponentSystem.h>
#include <SystemManager.h>
#include <RenderSy... |
#ifndef STANDARDCUBESMOOTHER_H
#define STANDARDCUBESMOOTHER_H
#include "ICubeSmoother.h"
#include "CubePolisher.h"
class StandardCubeSmoother : public ICubeSmoother
{
private:
CubePolisher mPolisher;
int mSmoothIterations;
public:
StandardCubeSmoother(int smoothIterations) : mPolisher(CubePolisher... |
#ifndef LINEOFSIGHT_H
#define LINEOFSIGHT_H
#include <cMap.h>
class LineOfSight
{
public:
bool checkLine(int i1, int j1, int i2, int j2, const cMap& map)
{
int delta_i = std::abs(i1 - i2);
int delta_j = std::abs(j1 - j2);
int step_i = (i1 < i2 ? 1 : -1);
int step_j = (j1 < j2 ? ... |
#ifndef FORCE_H
#define FORCE_H
#include "Vector.h"
class Force : public Vector
{
public:
explicit Force(Vector);
Force(const Force&);
virtual ~Force(void);
virtual void exec(void) = 0;
virtual bool isDone(void) = 0;
virtual Vector getForcePoint(void) = 0;
};
#endif
|
#include <iostream>
#include <map>
int main() {
int n;
std::cin >> n;
std::map<std::string, long> mylist;
std::string key;
long number;
for (int i = 0; i < n; i++) {
std::cin >> key;
std::cin >> number;
mylist[key] = number;
}
while (std::cin >> key) {
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2011 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_UIPOPUP_H
#define DOM_EXTENSIONS_UIPOPUP_H
... |
/*=========================================================================
Program: Visualization Toolkit
Module: TestUnstructuredGridGeometryFilter.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
... |
#include <gflags/gflags.h>
#include "r2/src/rdma/sop.hh"
#include "rlib/core/lib.hh"
#include "../../huge_region.hh"
using namespace nvm;
DEFINE_uint32(payload, 2, "The sequential write payload (in MB)");
DEFINE_uint32(coros, 4, "#coroutines used");
DEFINE_string(addr, "localhost:8888", "Server address to connect to... |
/* -*- 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.
*/
#include "core/pch.h"
#include "modules/doc/frm_doc.h"
#include ... |
//
// Created by 周华 on 2021/5/5.
//
#include "ColliderComponent.h"
|
#ifndef CSERIALPOLLING_H
#define CSERIALPOLLING_H
#include <QObject>
class CSerialPortPrivate;
class CPollingThread;
class CSerialPolling : public QObject
{
Q_OBJECT
public:
explicit CSerialPolling(QObject *parent = 0);
bool open(const QString &portName);
void close();
void write(const QByteArray... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2008 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* arjanl
*/
#ifndef CORE_HISTORY_MERGE_SORT_H
#define CORE_HISTO... |
/** This file is a linked list implementation. I declare my function signatures
* here, and implement them in queue.cpp as any good student would do.
* Justification for the perhaps overly short variable names fst, lst, and nxt:
* That is the standard naming convention in Haskell and many other languages.
* @author... |
#pragma once
#include <stdint.h>
#include <string>
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef int32_t i32;
//using fn_t = std::function<void(void)>;
typedef void (*fnptr)();
typedef struct {const char* name; fnptr parse; fnptr fn; } prim_t;
typedef struct {
unsigned char code : 8;
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2008 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Patricia Aas (psmaas)
*/
#ifndef UI_CONTROLLER_H
#defi... |
// Created on: 1992-02-04
// Created by: Christian CAILLET
// Copyright (c) 1992-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 ... |
#include "SDL.h"
#include "SDL_image.h"
#include <iostream>
#include "WindowClass.h"
#include "Entity.h"
#include "objects.h"
#include <vector>
#include <sstream>
using namespace std;
Windows::Windows(const char* tittle, int width, int height)
:createdWindow(NULL), windowRenderer(NULL)
{
createdWi... |
void setup()
{
pinMode(RED_LED, OUTPUT);
digitalWrite(RED_LED, LOW);
pinMode(GREEN_LED, OUTPUT);
digitalWrite(GREEN_LED, LOW);
pinMode(P2_6, OUTPUT);
digitalWrite(P2_6, LOW);
pinMode(P2_5, OUTPUT);
digitalWrite(P2_5, LOW);
pinMode(P2_5, INPUT);
pinMode(P2_4, OUTPUT);
digitalWrite(P2_4,... |
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
inline long long MAX2(long long a, long... |
#include "simplefilter.h"
#include "imagenormalizer.h"
SimpleFilter::SimpleFilter(ICoreGenerator *generator, int size):
size(size), generator(generator)
{
if(generator->isSeparable()) {
coreX = generator->generateX(size);
coreY = generator->generateY(size);
core = nullptr;
}
els... |
#include<conio.h>
#include<stdio.h>
#define tam 5
void sumarVectores(int[],int[],int[]);
int main()
{
int i=0,j=0,k=0,vector1[tam],vector2[tam],vectorResultado[tam];
for(i=0;i<tam;i++)
{
printf("\nInserte el numero [%d] del vector 1: ",i+1);
scanf("%d",&vector1[i]);
}
for(i=0;i<tam;i++)
{
printf("\nInserte el... |
#include "ybBMPImageIO.h"
#include"ybImage.h"
#include<windows.h>
#include"ybFileHangle.h"
NS_YB_BEGIN
bool BMPImageIO::Write(Image* img, FileHandle* handle)
{
int header_offset = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
int debug = img->BytesPerImage();
BITMAPFILEHEADER header = { 0x4d42, debug + heade... |
#include "opencvsharkitem.h"
OpencvSharkItem::OpencvSharkItem(QQuickItem *parent):
QQuickItem(parent)
, m_imageFlag(0)
{
// By default, QQuickItem does not draw anything. If you subclass
// QQuickItem to create a visual item, you will need to uncomment the
// following line and re-implement updatePain... |
#include <iostream>
#include <stdlib.h>
using namespace std;
int compare (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}
int d(int num) {
int sum = 0;
for (int i = 1; i < num; i++) {
if ( num % i == 0 ) {
sum += i;
}
}
return sum;
}
int main() {
int abundant[28123];
int sums[2812... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2008 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef XPPATTERN_H
#define XPPATTERN_H
#ifdef XPATH_PATTERN_SUPPORT
#inc... |
/************************************************************************
* @project : sloth
* @class : NormalMappingRenderer
* @version : v1.0.0
* @description : 带法线映射实例的渲染操作类
* @author : Oscar Shen
* @creat : 2017年2月22日13:38:39
* @revise :
****************************************************... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2005 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef MODULES_WEBFEEDS_WEBFEEDS_MODULE_H
#define MODULES_WEBFEE... |
#include "tpiece.h"
namespace
{
std::vector<TetrisCoordinate> buildCoordinates(
const TetrisCoordinate& centerCoordinate, int orientation)
{
switch (orientation)
{
case 0:
return { centerCoordinate, centerCoordinate.plusColumns(1),
centerCoordinate.plusColumns(-1), centerC... |
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without f... |
#ifndef _LOG_H
#define _LOG_H
#include <sstream>
#include <boost/format.hpp>
#include <iostream>
using namespace std;
enum log_level_t {
LOG_NOTHING,
LOG_ERROR,
LOG_BASIC,
LOG_VERBOSE,
LOG_DEBUG
};
// Global variable.
// This is like a forward declaration for functions
// The actual declaration ... |
/*
* Stopping Times
* Copyright (C) Leonardo Marchetti 2011 <leonardomarchetti@gmail.com>
*/
#ifndef _DIRECTIONAL_FUNCTOR_H_
#define _DIRECTIONAL_FUNCTOR_H_
#include "functor1D.h"
#include "functor2D.h"
namespace StoppingTimes{
/* FP is a template for Floating Point types. */
template <typename FP>
class Directio... |
// MyResourceDlg.cpp : 实现文件
//
#include "stdafx.h"
#include "MyTask.h"
#include "PE.h"
#include "MyResourceDlg.h"
#include "afxdialogex.h"
extern PE MyPe;
// MyResourceDlg 对话框
IMPLEMENT_DYNAMIC(MyResourceDlg, CDialogEx)
MyResourceDlg::MyResourceDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(IDD_RESOURCE... |
/*
This file is part of SMonitor.
Copyright 2015~2016 by: rayx email rayx.cn@gmail.com
SMonitor 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 3 of the License, or
(at your option) any later ver... |
#ifndef _OPENGAME_H
#define _OPENGAME_H
#include "cocos2d.h"
class openGame : public cocos2d::Layer
{
public:
static cocos2d::Scene* createScene();
openGame();
void update(float delta);
void preloadMusic();
void playBgm();
void playEffect();
private:
cocos2d::Sprite* sprite1;
cocos2d::Sprite* ... |
#include <iostream>
#include <typeinfo>
#include <type_traits>
int main()
{
std::cout << "int -> " << typeid(std::decay_t<int>).name() << std::endl;
std::cout << "int* -> " << typeid(std::decay_t<int*>).name() << std::endl;
std::cout << "int& -> " << typeid(std::decay_t<int&>).name() << std::endl;
std:... |
#include <stdio.h>
#include<stdlib.h>
#define NEGA_INFINIT -999999;
/***************************************
*
*function find_max_crossing_subarray()
*
* args:
*
* A inttype array
* low the lower index of A
* mid the middle index of A
* high the higher index of A
*
* return
* *max_suba
*
***************... |
#include <fcntl.h>
#include <ros/ros.h>
#include <semaphore.h>
#include <sys/shm.h>
#include <cstring>
#include <iostream>
#include "astra_camera/constants.h"
int main() {
using namespace astra_camera;
sem_t *sem = sem_open(DEFAULT_SEM_NAME.c_str(), O_CREAT, 0644, 0);
if (sem == SEM_FAILED) {
ROS_ERROR_STR... |
#include<ncurses.h>
class bomb;
class hostage;
class player;
const unsigned char bmb = 'B';
const unsigned char htge = 'H';
const unsigned char pyr = 'P';
int xdim, ydim; //world dimensions
|
#pragma once
#include<string>
#include "candidate.h"
using namespace std;
// max number of candidates
const int MAX_CAND = 5;
class office {
public:
office();
void setOfficeName(string newName);
string getOfficeName();
int getNumCandidates();
void addCandidate(int ballotNum, string party, string newCandName);
... |
// Created on: 1997-03-04
// Created by: Jean-Pierre COMBE
// Copyright (c) 1997-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 ... |
#include <iostream>
#include <unistd.h>
#include <ncurses.h>
#include <time.h>
#include <dirent.h>
#include <wiringPi.h>
#include <pca9685.h>
#include <fstream>
#include <ctime>
#include <string>
#include <chrono>
#include "utils.h"
#include "servo_commands.h"
#include <stdio.h>
#include "../../raspicam/src/raspicam_st... |
#include "qrenderer.h"
namespace qEngine
{
/************************************************************************/
/* Construction/Destruction Functions */
/************************************************************************/
qRenderer::qRenderer(void)
{
}
qRendere... |
#include <Tanker/UserKeyStore.hpp>
#include <Tanker/Crypto/Crypto.hpp>
#include <Tanker/DataStore/ADatabase.hpp>
#include <Tanker/Errors/Errc.hpp>
#include <Helpers/Await.hpp>
#include <Helpers/Buffers.hpp>
#include <Helpers/Errors.hpp>
#include <Helpers/UniquePath.hpp>
#include <cppcodec/base64_rfc4648.hpp>
#includ... |
//
// Created by axtyax on 8/15/18.
//
#include <android/log.h>
#define APPNAME "MyApp"
#include <jni.h>
#include <string.h>
#include <fstream>
#include <android/log.h>
extern "C" JNIEXPORT jstring
JNICALL Java_com_androiddev_axtyax_filestream_MainActivity_parseFile (JNIEnv* env, jstring filepath) {
std::string... |
#include<stdlib.h>
#include<dirent.h>
#include<string.h>
#include<stdio.h>
#include<sys/stat.h>
#include<iostream>
#define BUFFER_LENGTH 8192
int IsDir(std::string path)
{
if(path.empty())
{
return 0;
}
struct stat st;
if(0 != stat(path.c_str(),&st))
{
return 0;
}
if(S_ISDIR(st.st_mode))
{
return 1;
}... |
#ifndef GROMACSOPTIONFILE_H
#define GROMACSOPTIONFILE_H
#include "gromacsoptionenter.h"
#include "gromacstoolsdefinition.h"
class QLineEdit;
class GromacsOptionFile : public GromacsOptionEnter
{
Q_OBJECT
public:
explicit GromacsOptionFile(bool inputFile, QWidget *parent = 0, QString value = "");
bool Co... |
// Created on: 1993-01-11
// Created by: Christophe MARION
// Copyright (c) 1993-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 ... |
#pragma once
#include <vector>
using namespace std;
extern long g_dwTlsIndex; //tls公用槽
extern long g_dwThreadTlsId; //tls锁
extern unsigned short g_iWorkerThreadNumbers; //工作线程数量
//分布式内存管理器
template <class InnerInfoType>
class CResMemThreadManager
{
public:
CResMem... |
/**
** rfidPositionerCntrlTaskCodels.cc
**
** Codels used by the control task rfidPositionerCntrlTask
**
** Author:
** Date:
**
**/
#include <portLib.h>
#include "server/rfidPositionerHeader.h"
|
#ifndef STRAT_GAME_FIXED_HPP
#define STRAT_GAME_FIXED_HPP
#include <iostream>
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <Fixed.hh>
typedef glm::detail::tvec2<fixed, glm::highp> fvec2;
typedef glm::detail::tvec3<fixed, glm::highp> fvec3;
typedef glm::detail::tquat<fi... |
class Solution {
public:
void sortColors(vector<int>& nums) {
if(nums.empty()) return;
quickSort(nums,0,nums.size()-1);
}
void quickSort(vector<int> &nums,int left,int right){
if(left >= right) return;
int lt = left;
int i = left+1;
int gt = right;
in... |
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Portions of this file are from JUCE.
Copyright (c) 2013 - Raw Material Software Ltd.
Please visi... |
#ifndef PROTOCOL_H_
#define PROTOCOL_H_
#include <cryptopp/aes.h>
#include <cryptopp/modes.h>
#include <cryptopp/osrng.h>
#include "connection.h"
class protocol {
protected:
connection **cons;
CryptoPP::AutoSeededRandomPool *rnd;
CryptoPP::CTR_Mode<CryptoPP::AES>::Encryption *prgs;
public:
const cha... |
//
// Created by fab on 31/05/2020.
//
#include "../../../headers/components/rendering/Mesh.hpp"
#include <utility>
void Mesh::draw(Shader* shader)
{
glBindVertexArray(vao);
int i = 0;
for(auto& tex : textures)
{
switch (tex->getType())
{
case ITexture::Diffuse:
... |
#ifndef SJTU_EXCEPTIONS_HPP
#define SJTU_EXCEPTIONS_HPP
#include <cstddef>
#include <cstring>
#include <string>
class exception {
};
class unallocated_space : public exception {
};
class non_existent_file : public exception {
};
class invalid_format : public exception {
};
class invalid_offset : public exception... |
#ifndef __LOAM_SCAN_REGISTRATION_H__
#define __LOAM_SCAN_REGISTRATION_H__
#include <loam_velodyne/LoamImu.h>
#include <vector>
#include <cmath>
#include <pcl/point_types.h>
class ScanRegistration {
public:
class Outputs {
public:
pcl::PointCloud<PointType>::Ptr laserCloudOut;
pcl::PointCloud<PointType>::... |
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
using namespace std;
/**------- ShortCuts----------*/
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair<int, int> p... |
#if defined (_PSP_VER)
#include "Vector4.h"
#include "Vector3.h"
#include <libvfpu.h>
//--------------------Operators-----------------------//
Vector4& Vector4::operator =(const Vector4 &rhs)
{
_vec.x = rhs.X();
_vec.y = rhs.Y();
_vec.z = rhs.Z();
return *this;
}
Vector4 Vector4::operator +(const Vector4 &rhs... |
#include "ros/ros.h" // ROS 기본 헤더파일
#include "std_msgs/Int32.h" // std_msgs 메시지 파일헤더
int main(int argc, char **argv)
// 노드 메인 함수
{
ros::init(argc, argv, "msg_publisher_node"); // 노드명 초기화
ros::NodeHandle nh; // 노드 핸들 선언
// 발행자 선언
// 발행자 ros_pub 를 작성한다. 토픽명은 "ros_test_msg" 이며,
// 발행자 큐(queue) 사이즈를 10... |
/*Time utility module.*/
#include "cc/shared/time_utils.h"
#include "cc/shared/common.h"
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
namespace cc_shared {
int64 get_epoch_milliseconds() {
struct timeval time_val;
int64 result = 0;
int status = gettimeofday(&time_val, NULL);
RT_ASSERT_EQ(0, sta... |
/**************************************************************************/
/* */
/* Copyright (c) 2013-2022 Orbbec 3D Technology, Inc */
/* */
/* PROPRIETA... |
#include<ft2build.h>
#include<epoxy/gl.h>
#include<map>
#include FT_FREETYPE_H
#include"OGLWidget.h"
#ifndef _OGL_LABEL_H_
#define _OGL_LABEL_H_
struct OGLLabelDescription {
OGLWidgetDescription widget;
struct {
//FALTARIA ALINEACION Y COLOR
std::string str;
std::string font;
i... |
#include "lvox3_computelvoxgridspreparator.h"
#include "ct_itemdrawable/ct_scene.h"
#include "ct_itemdrawable/ct_scanner.h"
#include "ct_itemdrawable/ct_shootingpatternd.h"
#include "ct_itemdrawable/abstract/ct_abstractimage2d.h"
#include "ctlibio/readers/ct_reader_larchitect_grid.h"
#include "ct_iterator/ct_... |
#pragma once
#include "random.hpp"
#include "renderer.hpp"
#include "level.hpp"
namespace yama {
////////////////////////////////////////////////////////////////////////////////
//! The entire game "world".
////////////////////////////////////////////////////////////////////////////////
class world {
public:
exp... |
#include "gl_compat_3_2.h"
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glfw.h>
#include <cstdlib>
#include <cstdio>
//#include "config.h"
#include "OpenGLController.h"
OpenGLController controller;
void keyEvent( int key, int state ) {
controller.keyEvent(key,state);
}
void mainLoop(OpenGLController & con... |
#ifndef CODEGENERATOR_H
#define CODEGENERATOR_H
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
class CodeGenerator {
public:
CodeGenerator(char * filename);
~CodeGenerator();
void write(string code_to_write);
void define(string function_name);
void end_de... |
#include <string>
using namespace std;
class CHAR {
char x;
public:
CHAR();
CHAR(char);
string concatenar(char c1, char c2);
}; |
#include <iostream>
#include <map>
#include <set>
#include <string>
using namespace std;
using Friends = set<string>;
using FriendGroup = map<string, Friends>;
// typedef set<string> Friends;
// typedef map<string, Friends> FriendGroup;
//So FriendGroup is map<string, set<string>>
void print_friends(con... |
// Copyright 2018 Joseph Smith, Alex Martin
#include <stdio.h>
#include <stdint.h>
#include <thread>
#include <mutex>
std::mutex mtx;
/*
Function..: CANDecode
Description..: takes in a message as an unsigned 8 bit integer array, decodes it, and returns the decoded integer
Parameters..: unsigned 8 bit integer a... |
#ifndef WALI_NWA_TRAVERSE_TRANSITION_FUNCTOR_HPP
#define WALI_NWA_TRAVERSE_TRANSITION_FUNCTOR_HPP
#include <vector>
#include "opennwa/NwaFwd.hpp"
namespace opennwa {
namespace traverse {
class ConstTransitionFunctor
{
public:
virtual ~ConstTransitionFunctor() {}
virtual void doInternal(Nw... |
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
float Media(float vp1, float vp2, float vf){
float media = (vp1+vp2*2+vf*3)/6;
return media;
}
int main(void) {
float vp1;
float vp2;
float vf;
cout << "Informe as n... |
#include "main.h"
#include <iostream>
#include "WindowRef.h"
void setup(WindowRef window) {
settings.antialiasingLevel = 8;
window->setFramerateLimit(240);
window->setMouseCursorVisible(false);
}
void draw(WindowRef window) {
sf::Event event;
while (window->pollEvent(event))
{
if (event.type == sf::Event::Clo... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
const int INF = 1e6;
struct dat{
int w,s,num;
};
dat a[1010];
int f[1010],d[1010];
bool cmp(dat ... |
#ifndef uuid_guard_125991b1_57cde5fd_24169b4a_f4a3372f
#define uuid_guard_125991b1_57cde5fd_24169b4a_f4a3372f
#include <vector>
namespace tul{
namespace crypto{
std::vector<unsigned char> rand(std::size_t size);
}
}
#endif // uuid_guard_125991b1_57cde5fd_24169b4a_f4a3372f
|
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2012 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
*/
group "desktop_util.i18n";
include "adjunct/desktop_util/string/i18n.h";
include "... |
#include<iostream>
using namespace std;
int power(int loc){
int result = 1;
while (loc != 0) {
result *= 2;
--loc;
}
return result;
}
int decimal(int i, int len){
int loc = len - i - 1;
int ans = power(loc);
return ans;
}
int calculation(int sum){
int pow = 1;
whil... |
//Andrea Peņa Calvin
//#pragma once
#ifndef JUGADOR_H
#define JUGADOR_H
#include <iostream>
#include <iomanip>
#include <fstream>
#include<vector>
#include<string>
#include<conio.h>
#include<Windows.h>
#include "tablero.h"
#include "cartas.h"
struct tJugador {
std::string nombre;
tMazo mazojug;... |
#ifndef FAHRZEUG_H
#define FAHRZEUG_H
class Passagier{
};
class Fracht{
};
template <class T> class Fahrzeug
{
public:
// Fahrzeug(){}
Fahrzeug();
void einladen(T e){
_e = e;
}
T ausladen(){
return _e;
}
private:
T _e;
};
#endif // FAHRZEUG_H
|
#include "Fenetre_Entry.hh"
#include "Fenetre_Choix.hh"
Fenetre_Entry::Fenetre_Entry():
Fenetre_Reponse::Fenetre_Reponse(), zone()
{
set_title("Elections Trump ;) - Enregistrement");
boiteV.pack_start(message, Gtk::PACK_SHRINK);
boiteV.pack_start(zone, Gtk::PACK_SHRINK);
boiteV.pack_start(bouton1, Gtk::PACK_SHRINK... |
#ifndef EMPLOYEE
#define EMPLOYEE
#include "json.hpp"
namespace SMS{
class Employee{
private:
char name[100];
char surname[100];
char position[100];
int age;
int salary;//dollar (monthly)
int check = 0;
public:
Employee();
Employee(const char *name, const char... |
// -----------------------------------------------------------------------------
// GeneratorParticle.h
//
// Class definition of GeneratorParticle
// * Author: Everybody is an author!
// * Creation date: 4 September 2020
// -----------------------------------------------------------------------------
#ifndef Ge... |
#include <vector>
#include <string>
#include <cmath>
#include <fstream>
#include <iostream>
#include <sstream>
#include <list>
#include <algorithm>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <numeric>
#include <bitset>
#include <deque>
#include <random>
#include <stdlib.h>
const long long... |
//
// Created by giofn on 08/01/2020.
//
#ifndef CELLE_FORMULASUM_H
#define CELLE_FORMULASUM_H
#include "Formula.h"
class FormulaSum: public Formula {
public:
FormulaSum() : Formula(),sum(0) {}
~FormulaSum() {}
void update() override ;
float calculate() override;
private:
float sum;
};
#e... |
#include "Arduino.h"
#include "driver/rtc_io.h"
#include "SDCardManagement.h"
#include "WifiManagement.h"
#include "CameraManagement.h"
#include "MailManagement.h"
#include "Configuration.h"
#include "TraceDebug.h"
#include "MQTTManagement.h"
RTC_DATA_ATTR int bootCount = 0;
String configFile = "/Configuration/Conf... |
#include "treeface/gl/TypeUtils.h"
#include <treecore/StringRef.h>
namespace treeface {
int size_of_gl_type(GLenum type)
{
switch (type)
{
case GL_BOOL:
return sizeof(GLTypeHelper<GL_BOOL>::Type);
case GL_BYTE:
return sizeof(GLTypeHelper<GL_BYTE>::Type);
case GL_UNSIGNED_BYTE:
... |
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "GameFramework/PlayerState.h"
#include "DeathmatchScoreComponent.generated.h"
// Information about a players performance during a match
USTRUCT(BlueprintType)
struct FPlay... |
#include <QApplication>
#include <QGLFormat>
#include <iostream>
#include <iostream>
#include "CGMainWindow.h"
#ifdef max
#undef max
#endif
int main (int argc, char **argv) {
QApplication app(argc, argv);
if (!QGLFormat::hasOpenGL()) {
qWarning ("This system has no OpenGL support. Exiting.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.