text stringlengths 8 6.88M |
|---|
//---------------------------------------------------------
//
// Project: dada
// Module: gl
// File: VBO.h
// Author: Viacheslav Pryshchepa
//
// Description:
//
//---------------------------------------------------------
#pragma once
#include "dada/core/Object.h"
namespace dada
{
cl... |
/* -*- 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.
*
* @author Arjan van Leeuwen (arjanl)
*/
#ifndef NULL_WIDGET_H
#... |
#ifndef JSONPARSE_H
#define JSONPARSE_H
#include <iostream>
#include <jsoncpp/json.h>
using namespace std;
int jsonParse(string _s);
#endif /* JSONPARSE_H */
|
#include "class_int.h"
cint::cint()
{
size=0;
int_=NULL;
}
cint::cint(int s_int)
{
size=1;
int_=(int*)malloc( sizeof(int));
int_[0]=s_int;
}
cint::~cint()
{
if(int_) free(int_);
}
int& cint::operator[](int index)
{
return int_[index];
}
int cint::length(void)
{
return size;
}
void cint::append(int s_int)
{
... |
#ifndef _LINK_H
#define _LINK_H
#include<fstream>
#include<cstdlib>
#include<iostream>
template <class T>
struct box{
T carid;
box<T>*next;
};
template<class T>
class linklist{
protected:
box<T> *head;
box<T> *tails;
int count;
public:
void initialize();
void print();
void p... |
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <map>
#include <iomanip>
#include <set>
#include <climits>
#include <ctime>
#include <complex>
#include <cmath>
#include <string>
#in... |
class ItemStone
{
weight = 10;
};
class ItemConcreteBlock
{
weight = 15;
};
class CinderBlocks
{
weight = 100;
};
class MortarBucket
{
weight = 21;
};
class equip_brick
{
weight = 0.5;
};
class CementBag
{
weight = 40;
}; |
#ifndef MEMORY_MODEL_H
#define MEMORY_MODEL_H
#include <stdint.h>
#include <vector>
#include <string>
class MemoryModel
{
public:
MemoryModel();
~MemoryModel();
bool load(const std::string &filename);
private:
std::vector<uint32_t> memory_;
uint64_t start_address_;
uint64_t end_address_;
uint64_t entry_a... |
/** Kabuki SDK
@file /.../Source/Kabuki_SDK-Impl/_G/Char.h
@author Cale McCollough
@copyright CopYright 2016 Cale McCollough ©
@license Read accompanying /.../README.md or online at http://www.boost.org/LICENSE_1_0.txt
*/
#pragma once
#include "Color.h"
namespace _G {
/** */
class _G_A... |
//
// CompleteBinaryTree.hpp
// DataStructures
//
// Created by Tri Khuu on 2/5/18.
// Copyright © 2018 TK. All rights reserved.
//
#ifndef CompleteBinaryTree_hpp
#define CompleteBinaryTree_hpp
#include <vector>
namespace CompleteBinaryTree {
template<typename T>
class AbsCompleteBinaryTree
{
... |
/******<CODE NEVER DIE>******/
#include<bits/stdc++.h>
#include<unordered_map>
using namespace std;
#define ll long long
#define FastIO ios_base::sync_with_stdio(0)
#define IN cin.tie(0)
#define OUT cout.tie(0)
#define CIG cin.ignore()
#define pb push_back
#define pa pair<int,int>
#define f first
#define s second
#def... |
#include <IterativeRobot.h>
#include <Joystick.h>
#include <LiveWindow/LiveWindow.h>
#include <RobotDrive.h>
#include <Timer.h>
#include <XboxController.h>
#include <Spark.h>
//^^^^^ All libraries go here ^^^^^\\
double RStick;
double LStick;
int FRP = 3;
int FLP = 2;
int BRP = 0;
int BLP = 1;
//^^^^^ Declare all g... |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* buildTree(vector<int>& preorder, vector<int>& inorder) {
if(preorder.empty() ... |
//===========================================================================
//! @file light_manager.h
//! @brife ライトの管理
//===========================================================================
#pragma once
//===========================================================================
//! @class LightManager
//=... |
#include <iostream>
#include <vector>
#include <string>
using namespace std;
class BlockTower
{
public:
int getSum(vector<int> &tower)
{
int sum=0;
for (int i=0; i<tower.size(); ++i) {
sum += tower.at(i);
}
return sum;
}
int getTallest(vector <int> blockHeights)
{
int max = 0,sum;
int point = ... |
/*********************************************************************************************
cfglp : A CFG Language Processor
--------------------------------
About:
Implemented by Tanu Kanvar (tanu@cse.iitb.ac.in) and Uday
... |
#include <DynamixelSerial.h>
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <PacketSerial.h>
#define actuatorSSerial_RX 10
#define actuatorSSerial_TX 11
#define actuatorSSerial_Baud 9600
#define Dynamixel_Baud 1000000
#define DIRECTION_PIN 8
PacketSerial ActuatorPacket... |
/*
* Buttons.h
*
* Created on: 29.01.2019
* Author: Igor
*/
#ifndef CLASSES_BUTTONS_H_
#define CLASSES_BUTTONS_H_
#include "cmsis_os.h"
#include "USBTask.h"
extern uint8_t start_parking_USB;
extern uint8_t start_obstacle_USB;
extern uint8_t start_parking_sent;
extern uint8_t start_obstac... |
#pragma once
#include "Predefines.h"
#include "EJobQueue.h"
class EGameInstance;
class EJobManager
{
public:
bool Init();
// 모든 스레드에서 이 함수를 호출합니다.
void ThreadProc();
// 스레드풀을 생성한다.
void InitThreadPool();
// 스레드 풀을 제거한다.
void DestroyThreadPool();
// 초기화가 완료되고 OnBeginPlay에서 각각 시스템은 Tic... |
#ifndef __FACTORY_HPP__
#define __FACTORY_HPP__
#include "base.hpp"
#include "op.hpp"
#include "rand.hpp"
#include "add.hpp"
#include "sub.hpp"
#include "mult.hpp"
#include "div.hpp"
#include "pow.hpp"
#include <string>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
class factory{
public:
... |
#include<iostream>
#include <sstream>
#include <string>
#include "main.h"
#include "timer.h"
#include "ball.h"
#include "enemy.h"
#include "background.h"
#include "porcupine.h"
using namespace std;
GLMatrices Matrices;
GLuint programID;
GLFWwindow *window;
/**************************
* Customizable functions *
*... |
//
// Created by frenchcommando on 2019-09-11.
//
#include "EulerProject.h"
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2002 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#ifndef OP_RESIZE_CORNER_H
#define OP_RESIZE_CORNER_H
#include "... |
#ifndef ETW_CONFIG_PLATFORM_RESTRICTION_VALIDATOR_H_
#define ETW_CONFIG_PLATFORM_RESTRICTION_VALIDATOR_H_
#include "ValidatorInterface.h"
#include "PlatformValidatorInterface.h"
#include <string>
namespace etw {
class PlatformRestrictionValidator : public PlatformValidatorInterface
{
public:
PlatformRestrictionVal... |
#pragma once
#include <string>
//fight : levelid = 0
//hundred :
//01(2) + gameid(8) + levelid(2) + startid(6) + (14)
#define ROBOT_FLAG_OFFSET (30)
#define GAME_ID_OFFSET (22)
#define LEVEL_ID_OFFSET (17)
#define START_ID_OFFSET (12)
#define MAX_ROBOT_NUMBER (2048)
#define IS_ROBOT_UID(uid) (((uid >> ROBOT_F... |
//
// Created by gaoxiang on 19-5-2.
//
#include "myslam/backend.h"
#include "myslam/algorithm.h"
#include "myslam/feature.h"
#include "myslam/g2o_types.h"
#include "myslam/map.h"
#include "myslam/mappoint.h"
namespace myslam {
Backend::Backend() {
backend_running_.store(true);
backend_thread_... |
// BEGIN CUT HERE
// PROBLEM STATEMENT
//
// Musical notes are are given the following 12 names, in
// ascending order:
//
//
//
//
// A, A#, B, C, C#, D, D#, E, F, F#, G, G#
//
//
//
// The names repeat for higher and lower notes,
// so the note one step higher than "G#" is "A"
// and the note 5 steps low... |
// Copyright (c) 2012-2017 The Cryptonote developers
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "gtest/gtest.h"
#include <cstdint>
#include <vector>
#... |
#include "Persona.h"
#include <sstream>
#include <iostream>
using std::stringstream;
using std::endl;
using std::cin;
using std::cout;
Persona::Persona(){
}
Persona::Persona(string n, string na, int e, string s, Elemento* el){
nombre=n;
nacion=na;
edad=e;
sexo=s;
elemento=el;
... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
//
// Copyright (C) Opera Software AS. All rights reserved.
//
// This file is part of the Opera web browser. It may not be distributed
// under any circumstances.
#ifndef CHARSETDETECTOR_H_
#define CHARSETDETECTOR_H_
class CharsetDetector... |
//
// am_pm_clock.cpp
// Summer_Assignment_1
//
// Created by карим on 6/5/19.
// Copyright © 2019 карим. All rights reserved.
//
#include "am_pm_clock.h"
#include <iostream>
am_pm_clock::am_pm_clock() :
hours(12),
minutes(0),
seconds(0),
am(true)
{... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2007 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef ADDACTIONBUTTONCONTROLLER_H
#define ADDACTIONBUTTONCONTRO... |
#include <bits/stdc++.h>
#define isnum(x) ('0' <= x && x <= '9')
#define read(x) do { \
x = 0, R::c = getchar(), R::m = 1; \
while (!isnum(R::c) && R::c != '-') R::c = getchar(); \
if (R::c == '-') R::c = getchar(), R::m = -1; \
while (isnum(R::c)) x = x * 10 + R::c - '0', R::c = getchar(); \
x *= R::m; \
} while ... |
#include "CyclistTrackedObject.hpp"
CyclistTrackedObject::CyclistTrackedObject() {
this->ltr = 0;
this->framesAlive = 0;
}
CyclistTrackedObject::CyclistTrackedObject(cv::Point pt, cv::Rect rectangle, unsigned int id,
bool left2right) {
this->pt = pt;
this->pt0 = pt;
this->rect = rectangle;
... |
#pragma once
#include <armadillo>
namespace Algorithms
{
class LinearImpute
{
public:
static void LinearImpute_Recovery(arma::mat &input);
// other function signatyures go here
};
} // namespace Algorithms |
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
#include <cppunit/TextTestRunner.h>
int main(int argc, char **argv) {
CppUnit::TextTestRunner runner;
runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
if(runner.run()) {
return EXIT_SUCCESS;
} else {... |
#define _WINSOCKAPI_
#include "App_SSS.h"
#include "app_PBR.h"
//#include "app_edushi_VR.h"
#include "app_edushi.h"
//#include "app_VR.h"
#include "GLFWFramework.h"
//#include "edushiKey.h"
//#include "connection.h"
//#pragma comment(lib,"LibConnection.lib")
//#include "socketSceneLoader/SceneLoader.h"
std::function... |
#include<fstream>
#include<iostream>
#include<string>
#include<list>
#include<cstdlib>
#include"dataEntry.h"
//loads previously recorded entries from file
//input: address to list which contains pointers to loaded entries, file object
//output 1 for success, 0 for fail
bool loadEntries(std::list<dataEntry*> &entries... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-1999 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/dom/src/domcore/commen... |
#include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_set>
#include <cmath>
using namespace std;
void dfs(int v, vector<unordered_set<int>> &g, vector<int> &used, vector<int> &ans) {
used[v] = true;
for (auto to : g[v]) {
if (!used[to]) {
dfs(to, g, used, ans);
... |
//I affirm that all code given below was written solely by me,
// Samantha Nix, and that any help I received adhered to the rules stated for this exam.
#include "Runner.h"
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
void sortPace(vector<Runner... |
#include"TuringMachine.h"
#include"StlSet.h"
#include"StlTransitionFunction.h"
#include"DLLTape.h"
#include"MachineStrategy.h"
TuringMachine* TuringMachine::instance = 0;
TuringMachine::TuringMachine()
{
this->startState = "";
this->alphabet = new StlSet<SymbolType>();
this->states = new StlSet<StatesType>();
th... |
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <fstream>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
class Printer {
static int id;
public:
int get_id() const { return id; }
void set_id(int value) { id = value; }
};
int main() {
P... |
#include <bits/stdc++.h>
using namespace std;
ofstream fout ("hps.out");
ifstream fin ("hps.in");
#define For(x) for(int i = 0; i < x; i++)
#define For2(x) for(int j = 0; j < x; j++)
#define Forv(vector) for(auto& k : vector)
int main(){
int n;
fin >> n;
vector<pair<int,int> > turns;
For(n){
int... |
/***************************************************************************
* Copyright (C) 2009 by Dario Freddi *
* drf54321@gmail.com *
* *
* This pr... |
class Solution {
public:
int maxArea(vector<int>& height) {
int i = 0, j = height.size()-1, area = 0;
while(i < j){
int h = min(height[i], height[j]);
area = max(h*(j-i), area);
while(i < j && height[i] <= h) ++i;
while(i < j && height[j] <= h) --j;
... |
#include "base_entity.h"
BaseEntity::BaseEntity(QObject * parent)
: Base(parent)
{
}
uuid BaseEntity::genUuid() {
char* id = new char[36];
QByteArray ba = QUuid::createUuid().toByteArray();
strcpy(id, (uuid) ba.mid(1, 36).data());
return (uuid) id;
}
int BaseEntity::timestamp() {
return QD... |
SpreadsheetCell myCell(4);
cout<<myCell.getValue()<<endl;//correct
myCell.setString("9.0");
const SpreadsheetCell& anotherCell=myCell;//correct
cout<<anotherCell.getValue()<<endl;
anotherCell.setString("9.0");//incorrect
|
#include <iostream>
#include <cmath>
using namespace std;
class Gear
{
public:
bool teeth[8];
void rotate(bool direction);
};
void Gear::rotate(bool direction)
{
int offset = (direction) ? 7 : 1;
bool buff[8];
for (int i = 0; i < 8; i++)
{
int idx = (i + offset) % 8;
buff[i]... |
#include "monaffichage.h"
#include "ui_monaffichage.h"
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>
#include <QPixmap>
monaffichage::monaffichage(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::monaffichage)
{
ui->setupUi(this);
QGraphicsScene * ma_scene;
ma_scene = new QGraphicsSce... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long t,i,m,arr[100000],j=0,k;
scanf("%lld",&t);
while(j<t){
scanf("%lld",&m);
for(i=0;i<m;i++){
scanf("%lld",&arr[i]);
}
k=arr[0];
for(i=0;i<m;i++){
if(arr[i]>k) k=arr[i];
}
pr... |
#include <gmp_lib/WSoG/WSoG.h>
#include <gmp_lib/trainMethods/LeastSquares.h>
#include <gmp_lib/trainMethods/LWR.h>
namespace as64_
{
namespace gmp_
{
double WSoG::zero_tol = 1e-200;
double WSoG::sigma_eps = 1e-3;
// ===================================
// ======= Public Functions ========
// =====================... |
/* XMRig
* Copyright (c) 2002-2006 Hugo Weber <address@hidden>
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the ter... |
#define uno once
#pragma uno
#include "InputManager.h"
namespace Sonar
{
bool InputManager::IsSpriteClicked(const sf::Sprite& object, sf::Mouse::Button button, const sf::RenderWindow & window) const
{
if(!sf::Mouse::isButtonPressed(button))
return false;
const auto mousePosition = GetMousePosition(window);
... |
#include "../../src/includes/test.hpp"
BEGIN_TEST
DESCRIBE("TEST")
IT("1=1")
int nbr = 1;
SHOULD(int, nbr).BE(1);
END_IT
IT("1=2")
int nbr = 1;
SHOULD(int, nbr).BE(2);
END_IT
IT("1!=3")
int nbr = 1;
SHOULD(int, nbr).NOT.BE(2);
END_IT
IT("BE_NULL")
int* nbr = nullptr;
SHOULD(int, nbr).BE_NULL;
... |
// Created on: 1994-11-16
// Created by: Marie Jose MARTZ
// Copyright (c) 1994-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 G... |
const float color[7][3] = { // identifyZone()用の固定値
{90, 85, 28},
{52, 20, 35},
{21, 53, 62},
{57, 8, 4},
{13, 43, 15},
{2, 10, 35},
{13, 20, 46}
};
float minDistance; // identifyZone()用のグローバル変数
// startからzoneへの移動(zone番号の認識もする)
void startToZone()
{
int zoneNumber;
int done;
switch ( mode_G ) {
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
**
** Copyright (C) 1995-2011 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 "ad... |
#include "parametersettingwindow.h"
#include "ui_parametersettingwindow.h"
#include "externdata.h"
#include <QMessageBox>
#include <QDebug>
ParameterSettingWindow::ParameterSettingWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::ParameterSettingWindow)
{
ui->setupUi(this);
this->setFixedSize(420... |
#include <bits/stdc++.h>
using namespace std;
#define TESTC ""
#define PROBLEM "10534"
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 10000
int NUM[MAXN+5],LIS[MAXN+5],LDS[MAXN+5];
int main(int argc, char const *argv[])
{
#ifdef DBG
freopen("uva" PROBLEM TESTC ".in", "r", stdin);
freo... |
/*
Copyright (c) 2015-2022 Xavier Leclercq
Released under the MIT License
See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt
*/
#include "FilesTeardownAction.hpp"
#include <boost/filesystem/operations.hpp>
namespace Ishiko
{
void FilesTeardownAction::teardown()
{
for (size_t i = 0... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2006 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef CSS_CHARSET_RULE_H
#define CSS_CHARSET_RULE_H
#include "... |
// SPDX-FileCopyrightText: 2021 Samuel Cabrero <samuel@orica.es>
//
// SPDX-License-Identifier: MIT
#ifndef __LOG_H__
#define __LOG_H__
#include <Arduino.h>
class TLog {
public:
TLog();
void debug(const char *fmt, ...);
void info(const char *fmt, ...);
void error(const char *fmt, ...);
int count() co... |
#ifndef parser_h
#define parser_h
#include <string>
class BlockParser {
int blocks_count = 0;
public:
enum Block {
StartBlock,
CancelBlock,
Command,
Empty
};
Block parsing(const std::string& line);
bool is_block = false;
};
int start_parsing(int argc, char *argv[], uint n);
#endif
|
/**************************************************************************/
/* */
/* Copyright (c) 2013-2022 Orbbec 3D Technology, Inc */
/* */
/* PROPRIETA... |
#ifndef _MAC_OP_SOUND_H_
#define _MAC_OP_SOUND_H_
#ifndef NO_CARBON
#include "platforms/mac/model/macthread.h"
#include "modules/util/simset.h"
#define Size MacSize
#define Style MacFontStyle
#include <QuickTime/QuickTime.h>
#undef Style
#undef Size
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_... |
/*
==============================================================================
blueprint.cpp
Created: 26 Nov 2018 3:19:03pm
==============================================================================
*/
#ifdef BLUEPRINT_H_INCLUDED
/* When you add this cpp file to your project, you mustn't include ... |
#ifndef _DIALOG_LAYER_H
#define _DIALOT_LAYER_H
#include "cocos2d.h"
class DialogLayer : public cocos2d::Layer
{
public:
virtual bool init();
void menuCloseCallback(cocos2d::Ref* pSender);
CREATE_FUNC(DialogLayer);
//virtual bool onTouchBegan(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);
//vir... |
/***************************************************
* Mir Ali Talpur
* Matrix4.cpp
* 4/1/2015
***************************************************/
#include <math.h>
#include <iostream>
#include <iomanip>
#include <cstring>
#include "Matrix4.h"
#include "Vector4.h"
#include "Vector3.h"
#include <vector>
... |
#include <bits/stdc++.h>
using namespace std;
#define debug(x) cout << '>' << #x << ':' << x << endl;
#define all(v) v.begin(), v.end()
#define pii pair<int, int>
#define mxN 1e7
#define newl cout << "\n"
#define vi vector<int>
typedef pair<int, pair<int, int>> threepair;
class Solution {
public:
int largestRectan... |
#include "basepawn.hh"
#include <QPointF>
#include <QPolygonF>
#include <QVector>
#include <QBrush>
basepawn::basepawn(int id) {
playerId = id;
QVector<QPointF> basePoints;
basePoints << QPointF(0, 0) << QPointF(1, 0) << QPointF(0, 1)
<< QPointF(1, 1) << QPointF(0, 0);
int scaler = 7... |
/* -*- 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.
**
*/
#include "core/pch.h"
#include "modules/display/vis_dev.h"
#... |
#include <iostream>
#include <string>
#include "Player.h"
using namespace std;
string playerName;
char token;
Player::Player(){
}
Player::Player(char _token){
token = _token;
}
void Player::setName(string name){
playerName = name;
return;
}
string Player::getName(){
return playerName;
}
char Player::getToken(... |
#include <ros/ros.h>
#include <sstream>
#include <sensor_msgs/PointCloud.h>
#include <sensor_msgs/PointCloud2.h>
#include <sensor_msgs/point_cloud_conversion.h>
class VeloSubscribetoPCL
{
public:
VeloSubscribetoPCL()
{
this->subscriber = this->nh.subscribe("/ce30_points", 10, &VeloSubscribetoPCL::... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2009 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"
#ifdef HAS_SET_HTTP_DATA
#include "modules... |
#include "pch.h"
#include <Kore/System.h>
#include <Kore/Application.h>
#include <Kore/Input/Keyboard.h>
#include <Kore/Log.h>
using namespace Kore;
bool System::handleMessages() {
return true;
}
void System::swapBuffers() {
}
void* System::createWindow() {
return nullptr;
}
void System::destroyWindow() ... |
#include "Cd.h"
class Classic :public Cd
{
char main[50];
public:
Classic(const char* m, const char* performers, const char* label, int se, double pt);
Classic(const char* m, const Cd& d);
Classic();
void Report() const;
};
|
#pragma once
#include "Material.h"
#include "Lambertian.h"
class Matte : public Material
{
public:
BRDF *ambientBRDF;
BRDF *diffuseBRDF;
BRDF* getAmbientBRDF();
BRDF* getDiffuseBRDF();
Matte();
~Matte();
}; |
/*
* File: maildrop.h
* Author: Wouter Van Rossem
*
*/
#ifndef _MAILDROP_H
#define _MAILDROP_H
#include <dvthread/thread.h>
#include <vector>
#include <string>
#include <fstream>
#include <sys/types.h>
#include <dirent.h>
#include "message.h"
/** The Maildrop class represents a maildrop of a user.
* All the... |
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <list>
#include <algorithm>
#include <sstream>
#include <set>
#include <cmath>
#define INF (1<<20)
#define MAX 101
using namespace std;
class YetAnotherIncredibleMachine {
public:
int countWays(vector <int> platfo... |
// Copyright (C) 2012 - 2013 Mihai Preda
#include "Map.h"
#include "Array.h"
#include "String.h"
#include "Value.h"
#include "Object.h"
#include "GC.h"
#include "NameValue.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdarg.h>
void Map::traverse(GC *gc) {
int sz = s... |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra. Eigen itself is part of the KDE project.
//
// Copyright (C) 2009 Mark Borgerding mark a borgerding net
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// L... |
#include "dbcached.hpp"
#include "utils/process_utils.hpp"
namespace nora {
namespace dbcache {
dbcached::dbcached(const shared_ptr<service_thread>& st) {
if (!st_) {
st_ = make_shared<service_thread>("dbcached");
... |
#include <iostream>
#include <string.h>
#include "Clase.h"
using namespace std;
Persoana::Persoana()
{
id = -1;
nume = NULL;
nr_obiecte++;
}
Persoana::Persoana(int numar)
{
id = numar;
nume = NULL;
nr_obiecte++;
}
Persoana::Persoana(char* denumire)
{
int nr = strlen(denumire);
nume = ... |
#include<bits/stdc++.h>
using namespace std;
void modularExponent(int base, int exp, int mod){
int res=1;
base=base % mod;
while(exp){
if(exp%2==1){
res = (res*base)%mod;
}
exp=exp>>1;
base = (base*base)%mod;
}
cout<<res<<endl;
}
int main(){
int base... |
/* A module for low-level communication over the streaming virtio port.
*
* \copyright
* Copyright 2018 Red Hat Inc. All rights reserved.
*/
#ifndef SPICE_STREAMING_AGENT_STREAM_PORT_HPP
#define SPICE_STREAMING_AGENT_STREAM_PORT_HPP
#include <cstddef>
#include <string>
#include <mutex>
namespace spice {
namespa... |
//
// Created by goturak on 06/03/19.
//
#include "Addition.h"
int Addition::apply(int i1 , int i2){
return i1 + i2;
} |
#ifndef __DACTPROPEDITOR_H
#define __DACTPROPEDITOR_H
#include "MAct.h"
#include "MProp.h"
#include "TPresenter.h"
#include "TViewCtrlPanel.h"
namespace wh{
namespace view{
//-----------------------------------------------------------------------------
/// Редактор для свойства действия
class DActPropEditor
: public... |
// BEGIN CUT HERE
// PROBLEM STATEMENT
//
// Given a finite alphabet S, a binary code over this
// alphabet S is a
// function that maps each element of S to some (possibly
// empty) string over the alphabet {0,1}.
//
//
//
// An example of such a code for S={a,b,c,d} is the function
// f defined by
// f(a)=1,... |
/*
Name: ·´×ªÁ´±í
Copyright:
Author: Hill Bamboo
Date: 2019/8/30 12:11:53
Description:
*/
#include <bits/stdc++.h>
using namespace std;
struct ListNode {
int val;
ListNode* next;
};
ListNode* reverse1(ListNode* head) {
if (head == nullptr || head->next == nullptr) return head;
ListNode* pre = head;
ListNode... |
#include "Config.h"
Config::Config()
:
WIDTH(640),
HEIGHT(640),
TITLE("Fractal Renderer"),
VERTEX_START_STRING("$vertex"),
FRAGMENT_START_STRING("$fragment"),
BG_COLOR({ 0, 0, 0 }),
SPEED(5),
VIEW_LEFT(-320.f),
VIEW_RIGHT(320.f),
VIEW_BOTTOM(-320.f),
VIEW_TOP(320.f),
CELL_WIDTH(160),
AXIS_SIZE({ 5.f, 5.f... |
// Created on: 2005-03-15
// Created by: Peter KURNEV
// Copyright (c) 2005-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 Lesser General Public License version 2.1 as ... |
#include "Arduino.h"
#include "HCSR04.h"
HCSR04::HCSR04(int echo, int trig) {
pinMode(echo, INPUT);
pinMode(trig, OUTPUT);
echopin = echo;
trigpin = trig;
count = 0;
duration = 0;
distance = 0;
}
double HCSR04::getdist() {
digitalWrite(trigpin, LOW);
delayMicroseconds(2);
digitalWrite(trigpin, HIG... |
/**********************************************************************
*Project : EngineTask
*
*Author : Jorge Cásedas
*
*Starting date : 24/06/2020
*
*Ending date : 03/07/2020
*
*Purpose : Creating a 3D engine that can be used later on for developing a playable demo, with the engine as static library
*
***... |
#pragma once
#include <frc/commands/Subsystem.h>
class ExampleSubsystem : public frc::Subsystem
{
public:
ExampleSubsystem();
void InitDefaultCommand() override;
}; |
// std headers
#include <iostream>
// arrow headers
#include <arrow/api.h>
using namespace arrow;
struct data_row_t {
data_row_t(int64_t id_, double cost_, std::vector<double> v)
: id(id_), cost(cost_), cost_components(std::move(v))
{}
data_row_t(data_row_t const& other) :
id(other.id), c... |
//
// MyBizierWarp.h
// ParticleMotion
//
// Created by james KONG on 13/8/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#ifndef ParticleMotion_MyBizierWarp_h
#define ParticleMotion_MyBizierWarp_h
#include "ofxBezierWarp.h"
#include "ofxGLWarper.h"
#include "ofxSimpleGuiToo.h"
#include "ofxT... |
#ifndef __sudoku__LedSolver__
#define __sudoku__LedSolver__
#include "Headers.h"
//using namespace cv::ml;
class LedSolver {
public:
LedSolver();
~LedSolver();
//void init(const char* file);
void init();
bool process(Mat& led_roi, Rect& bound_all_rect);
int getResult(int index);
void setP... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cmath>
#include <string>
#include <cstring>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>
#inc... |
// Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
========================================================================... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.