text stringlengths 8 6.88M |
|---|
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
const int maxn = 105;
struct Point{
double x;
double y;
}point[maxn];
struct Edge{
int x;
int y;
double dist;
}edge[5000] ;
int parent[maxn];
double distancia_pontos ( Point x , Point y){
return ... |
//
// Robot.cpp
// Crapenstein
//
// Created by Bruno Caceiro on 20/06/14.
// Copyright (c) 2014 Bruno Caceiro. All rights reserved.
//
#ifndef __ROBOT__
#define __ROBOT__
#include <stdio.h>
#include <cmath>
#include "Robot.h"
#include "Camera.h"
#include "OpenGLIncludes.h"
#include "collidingObject.h"
#include ... |
/*
* Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
*
* Author: kirigaya <kirigaya@mkacg.com>
* 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 3 of the License, or... |
#include "admintype.h"
AdminType::AdminType()
{
}
AdminType::AdminType(QString initlName, QString initfName, loginType initKey)
{
fname = initfName;
lname = initlName;
key = initKey;
}
QString AdminType:: getfName()
{
return fname;
}
QString AdminType:: getlName()
{
retur... |
#ifndef _JNI_REGIST_STATIC_METHOD_H_
#define _JNI_REGIST_STATIC_METHOD_H_
#include <jni.h>
#include <string>
#include <android/log.h>
#include "NE_pubhead.h"
using namespace std;
/*
* 通用的注册Java静态方法的接口, 可变参数CallRequestedMothod
* */
//JNIRegistStaticMethod 参数 JNI实现
class JNIRegistStaticMethod
{
publ... |
///
/// @author Florian Feuerstein
///
/// @date 02/2017
///
/// @class Match
///
/// @brief
///
#pragma once
#include <Eigen/Core>
#include <limits>
#include <tuple>
#include <vector>
namespace Cvl
{
class Match
{
public:
Match() :
mTemplateId(std::numeric_limits<size_t>::max()),
mMeasuredId(... |
//
// RigidBody.hpp
// closedFrameworks
//
// Created by William Meaton on 12/05/2016.
// Copyright © 2016 WillMeaton.uk. All rights reserved.
//
#ifndef RigidBody_hpp
#define RigidBody_hpp
#include <stdio.h>
#include "Component.hpp"
class RigidBody : public Component{
RigidBody();
void update();
};
#e... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
using namespace std;
typedef unsigned lo... |
#include <iostream>
#include <cstdio>
#include <cassert>
using namespace std;
int main(){
int N,L;
cin >> N >> L;
assert(3 >= N and N <= 1000000);
int perimeter = N * L;
cout << perimeter<<"\n";
return 0;
} |
#include <heap.h>
// TODO: We allegedly need to make sure we align our allocations
// this has never been a problem for me but on some systems, it's
// an error, undefined behavior, blah blah blah
void initHeapDescriptor(HeapDescriptor *hd,
HeapDescriptor *prev, HeapDescriptor *next, bool usable) {
hd->magic = HEAP... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2005 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#ifndef SVG_LENGTH_PARSER_H
#define SVG_LENGTH_PARSER_H
#ifde... |
#ifndef NESTED_INTEGRATION_FUSION_APPLY_HPP
#define NESTED_INTEGRATION_FUSION_APPLY_HPP
#include <boost/type_traits/is_same.hpp>
#include "nested/integration/state.hpp"
namespace nested
{
namespace integrate
{
namespace apply
{
namespace fusion
{
template<typename State, typename Tar... |
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
void swap(int *a, int *b) {
int tmp = *a;
*a = *b;
*b = tmp;
}
// n is index = size -1
int paritition(int arr[], int start, int end, int n) {
//if (start > end) return -1;
int i = start -1;
int j = start;
// pivot is last eleme... |
#include<stdio.h>
int a;
main()
{
scanf("%d",&a);
if(a==12 || a==11 || a==1) { printf("Winter"); }
if(a==2 || a==4 || a==3) { printf("Spring"); }
if(a==5 || a==6 || a==7) { printf("Summer"); }
if(a==8 || a==10 || a==9) { printf("Autumn"); }
}
|
#pragma once
#include "stdafx.h"
#include "BankAccount.h"
class CertificateOfDeposit :public BankAccount
{
private:
//earns 10% with a 5 year term
const double FIVEYEARTERM = 0.10;
//earn 5% if anything less
const double LOWERRATE = 0.05;
int term;
public:
//constructor
CertificateOfDeposit(int term... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2007 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"
#if CACHE_CONTAINERS_ENTRIES>0
#include "m... |
#pragma once
#include "array_sequence.h"
#include "linked_list_sequence.h"
template <class T> class Sequence
{
public:
// Decomposition
virtual T GetFirst() const = 0;
virtual T GetLast() const = 0;
virtual T Get(size_t index) const = 0;
virtual T Set(size_t index, T item) = 0;
virtual Sequence* GetSubsequenc... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
#include "elog/formatters/pattern_formatter.hpp"
#include "elog/severity.hpp"
namespace elog
{
const char* PatternFormatter::abbreviatedWeekdayName(const struct tm& t)
{
switch (t.tm_wday)
{
case 0: return "Sun";
case 1: return "Mon";
case 2: return "Tue";
case 3: return "Wed";
case 4: ... |
#include "Transform.hpp"
Transform::Transform(Vector3 position, Vector3 rotation, Vector3 scale)
{
this->position = position;
this->rotation = rotation;
this->scale = scale;
}
|
store both keys and values in each collision list.
|
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
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 a... |
#include <iostream>
using namespace std;
int main()
{int a,b;
a=0;
b=0;
cout<<"Introduceti numarul a:";
cin>>a;
cout<<"Introduceti numarul b:";
cin>>b;
while(a!=b)
{
if(a>b)
{
a=a-b;
}
if(b>a)
{
b=b-a;
}
}
... |
#include "octonav/a_star.hpp"
// Contents moved to a_star.hpp since most were templates
// Probably should use polymorphism instead. |
//Server
#include<iostream>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<unistd.h>
#include<stdlib.h>
#include<string.h>
#include<fstream>
#define PORT 9991
#define SERV "127.0.0.1"
using namespace std;
void die(char *s)
{
perror(s);
exit(1);
}
int main()
{
//1.Create a socket
int sockfd;
if((sockfd=sock... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2005 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/regexp/src/re_tree.h"
#include "... |
//: C09:Hidden.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
// Ukryte dzialania w funkcjach inline
#include <iostream>
using namespace std;
class Member {
int i, j, k;
public:
Mem... |
#include <Servo.h>
#include <SoftwareSerial.h>
SoftwareSerial BTserial(6, 7); // RX | TX
// Connect the HC-05 TX to Arduino pin 6 RX.
// Connect the HC-05 RX to Arduino pin 7 TX through a voltage divider.
char c = ' ';
const int acc = 8;
const int cru = 10;
const int brk = 12;
int speed = 0;
void setup(){
pinMo... |
#pragma once
#include "singletonBase.h"
#include "image.h"
#define MAXBULLET_BOSS 300
enum PATTRN
{
PATTRN1,
PATTRN2,
PATTRN3
};
struct tagBossBullet
{
float x, y;
float angle;
float radius;
image* img;
RECT _rc;
bool isFire;
float speed;
PATTRN pt;
int _count;
int _index;
int width;
int height;
};
cl... |
#ifndef CDT_APPLICATION_TEST_MYAPP_HPP
#define CDT_APPLICATION_TEST_MYAPP_HPP
#include "../../src/AApplication.hpp"
namespace cdt {
class MyApp : public AApplication {
public:
MyApp ();
~MyApp();
void load () override;
void run () override;
void clean() override;
};
} // namespace cdt
#endif // CDT_... |
#ifndef _SAMPLE_H_
#define _SAMPLE_H_
class Sample {
public:
int a; // publicなメンバ変数
private:
int b; // privateなメンバ変数
public:
void func1(); //publicなメンバ関数
private:
void func2(); // privateなメンバ関数
};
#endif // _SAMPLE_H_ |
#ifndef QT_MAIN_WINDOW_H
#define QT_MAIN_WINDOW_H
#include <memory>
#include <QAction>
#include <QtWidgets/QMainWindow>
class QtMainWindow
: public QMainWindow
{
Q_OBJECT
public:
QtMainWindow();
~QtMainWindow();
void setContent(QWidget* widget);
};
#endif // QT_MAIN_WINDOW_H
|
/*
Ejercicio # 1:
Se dispone de un archivo STOCK correspondiente a la existencia de artículos de un almacén y se desea señalar aquellos artículos cuyo nivel está por debajo del mínimo y que visualicen un mensaje “hacer pedido”. Cada artículo contiene un registro con los siguientes campos: número del código del artículo... |
// 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 <Common/StringBuffer.h>
#include <gtest/gtest.h>
using ... |
#include "../../gl_framework.h"
using namespace glmock;
extern "C" {
#undef glCheckFramebufferStatus
GLenum CALL_CONV glCheckFramebufferStatus(GLenum target) {
return GL_FRAMEBUFFER_COMPLETE;
}
PFNGLCHECKFRAMEBUFFERSTATUSPROC __glewCheckFramebufferStatus = &glCheckFramebufferStatus;
}
|
#include "HardwareSerial.h"
#include "stm32f1xx_ll_usart.h"
/**
* @brief 串口对象构造函数
* @param 串口外设地址
* @retval 无
*/
HardwareSerial::HardwareSerial(USART_TypeDef *_USARTx)
{
this->USARTx = _USARTx;
USART_Function = 0;
_rx_buffer_head = _rx_buffer_tail = 0;
}
/**
* @brief 串口中断入口
* @param 无
* ... |
#pragma once
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
class Sobel
{
private:
Sobel();
static Sobel *_instance;
public:
static Sobel* GetInstance();
cv::Mat SobelInHardware(cv::Mat input);
};
|
/* -*- 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.
*/
#ifndef FORM_ELEMENT_OF_INTEREST_H
#define FORM_ELEMENT_OF_INTERE... |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
#define S 2005
#define T 2005
ll dp[S][T] = {0};
ll dp_sumCommonString(vector<int>& s, vector<int>& t){
rep(i, s.size())rep(j, t.size()){
if (s[i] == t[j]){
... |
#include "submdiwindow.h"
SubWindow::SubWindow(QWidget *parent, Qt::WindowFlags flags)
: QMdiSubWindow(parent, flags)
{
setAttribute(Qt::WA_DeleteOnClose, false);
}
SubWindow::~SubWindow()
{
}
void SubWindow::closeEvent ( QCloseEvent * closeEvent )
{
//hide();
emit onClose(this);
} |
#include<conio.h>
#include<stdio.h>
double abs(double n)
{
if( n >= 0 )
return n;
else
return -n;
}
double sqrt(double n)
{
double num = n / 2;
const double range = 1.0e-7;
do
num = (num + n / num) / 2;
while( abs(num * num - n) > range);
return num;
}
void main()
{ clrscr();
... |
#include "ProcedureControl.h"
#include "Logger.h"
#include "FileHandler.h"
#include <limits.h>
#include <cstdlib>
#include <ctime>
ProcedureControl::ProcedureControl()
{
m_pFileHandler = new FileHandler();
m_pLogger = Logger::getLogger();
m_pMatrix = new map<int, map<int, int>*>;
}
ProcedureControl::~ProcedureCo... |
// small_eigenvalues.c
// Andrei Alexandru
// Nov 2003
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "arnoldi.h"
#include "overlap.h"
//#include "../overlap_eigensys/overlap_eigensystem_chiral_template.h"
#include "terminate.h"
#include "small_eigenvalues.h"
#include "chebyshev.... |
/*******************************************************************************
* filename: C_Mutation.cpp
* description: Implementation of 'Mutation' class
* author: Moritz Beber
* created: 2010-04-16
* copyright: Jacobs University Bremen. All rights reserved.
*************************************... |
/******************************************************************************
* *
* Copyright 2018 Jan Henrik Weinstock *
* *
... |
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
*
* 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.
*
* @author Alexander Remen (alexr)
*/
group "m2.imap-uid-analyzer";
require M2_SUPPORT... |
#include "user.h"
#include <string>
#include <fstream>
using namespace std;
void initialize(tUser &user, string id, string password)
{
user.id = id;
user.password = password;
user.mail_inbox.counter = 0;
user.mail_outbox.counter = 0;
}
bool load(tUser &user, ifstream &file)
{
string line;
bool loaded = false;
... |
#pragma once
#include "ofMain.h"
#include "ofxXmlSettings.h"
#include "ofxOsc.h"
#include "ofxGui.h"
#include "ofxOpenCv.h"
#include "ofxBlobTracker.h"
#include "PSEyeWrapper.hpp"
#include <vector>
typedef struct {
float x;
float y;
bool bBeingDragged;
bool bOver;
float radius;
}dra... |
#define _CRT_SECURE_NO_WARNINGS
#include "factory.h"
#include <fstream>
#include <sstream>
#include <string>
#include <stdlib.h>
#include <time.h>
#define BUFSIZE 4096
const char* servers_labels[NB_SERV] = { "Bancho", "Kawata", "Ripple", "Akatsuki", "Akatsuki Relax", "Enjuu", "Enshi", "Gatari" };
const char* servers[N... |
#include "../headers/matrix.h"
#include <iostream>
using namespace std;
int Matrix::counter = 0;
Matrix::Matrix()
:m_Zeilen(2),
m_Spalten(1){
Matrix::counter++;
}
int Matrix::getCounter() {
return Matrix::counter;
}
void Matrix::ausgabe() {
for(int i = 0; i < m_Zeilen; i++) {
for(int k = 0; k < m_Spalten; k+... |
/* -*- 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_TRANSFORMATION_H
#define XSLT_TRANSFORMATION_H
#ifdef XSLT_... |
#include "WorkArea.h"
//Fill flow line with units
Unit CheckUnitType(string line, FlowLine FL)
{
Unit DummyUnit;
int i = 0;
while (i < FL.UnitList.size())
{
if (line == FL.UnitList[i].first)
{
return FL.UnitList[i].second;
}
i++;
}
return DummyUnit; //nothing was found
}
string CheckAreaName(string ... |
#pragma once
#include "Shader.h"
class TextShader : public Shader {
public:
static TextShader* getInstance() {
static TextShader instance;
return &instance;
}
virtual void updateX();
private:
TextShader();
};
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* 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.
*/
#ifndef OP_LABEL_H
#define OP_LABEL_H
#include "modules/widgets/... |
#include "SendCardProc.h"
#include "HallHandler.h"
#include "Logger.h"
#include "Configure.h"
#include "GameServerConnect.h"
#include "PlayerManager.h"
#include <string>
using namespace std;
SendCardProc::SendCardProc()
{
this->name = "SendCardProc";
}
SendCardProc::~SendCardProc()
{
}
int SendCardProc::doRequest... |
#include "Team.h"
#include "Monster.h"
CTeam::CTeam()
{
memset(m_nCount, 0, sizeof(int) * EC_ALL);
}
CTeam::~CTeam()
{
}
std::vector<CMonster*>::iterator CTeam::begin()
{
return this->m_oMonsterList.begin();
}
std::vector<CMonster*>::const_iterator CTeam::begin() const
{
return m_oMonsterList.begin();
}... |
#include "JsonPacket.h"
#include "EVWork.h"
using namespace evwork;
#define XOR_KEY 16
Jpacket::Jpacket()
{
}
Jpacket::~Jpacket()
{
}
std::string& Jpacket::tostring()
{
return str;
}
Json::Value& Jpacket::tojson()
{
return val;
}
void Jpacket::end()
{
#ifdef __DEBUG__
Json::FastWriter writer;
std::string s... |
#include <iostream>
#include "mhw.h"
struct Position {
int x = 0;
int y = 0;
int treesHit = 0;
char on = '.';
int length = 0;
void move(const int right, const int down) {
x += right;
y += down;
if (x > length - 1) { x -= length; }
}
};
bool onTree(const char c) {
... |
#include "aeMath.h"
namespace aeEngineSDK
{
aeAABB::aeAABB()
{
m_xMin = aeVector3(aeMath::LOW_FLOAT, aeMath::LOW_FLOAT, aeMath::LOW_FLOAT);
m_xMax = aeVector3(aeMath::MAX_FLOAT, aeMath::MAX_FLOAT, aeMath::MAX_FLOAT);
}
aeAABB::aeAABB(const aeAABB & A)
{
*this = A;
}
aeAABB::aeAABB(const aeVector3 & A, ... |
// TODO: cache all FindClass/Find* calls globally
// TODO: better error messages with (void) jvmti->GetErrorName(errnum, &errnum_str);
// TODO: do we need any locking? jrawMonitorID lock; jvmti->RawMonitorEnter(lock); jvmti->RawMonitorExit(lock);
// TODO: use *options instead of env for log level
#include "jvmti.h"
#i... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "MarranconiProjectile.h"
#include "MyMarranconiProjectile.generated.h"
/**
*
*/
UCLASS()
class MARRANCONI_API AMyMarranconiProjectile : public AMarranconiProjectile
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere,... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** 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.
**
*/
#ifndef SPEEDDIAL_SUGGESTIONS_H
#define SPEEDDIAL_SUGGESTIONS_... |
int edit_distance(int a, int b, string& s, string& t) {
// indexado em 0, transforma s em t
if(a == -1) return b+1;
if(b == -1) return a+1;
if(tab[a][b] != -1) return tab[a][b];
int ins = INF, del = INF, mod = INF;
ins = edit_distance(a-1, b, s, t) + 1;
del = edit_distance(a, b-1, s, t) + 1... |
#pragma once
#include <WinSetup.h>
#include <string>
class Exception
{
public:
Exception(unsigned int line, const wchar_t* file)noexcept;
public:
unsigned int GetLine()const noexcept;
std::wstring_view GetFile()const noexcept;
std::wstring GetOriginString()const noexcept;
public:
virtual const wchar_t* GetType()c... |
#include <vector>
#include <iostream>
#include <cmath>
using namespace std;
class EllysCheckers {
public:
string getWinner(string board)
{
int move = 0;
int right = static_cast<int>(board.size())-1;
for (int i=0; i<board.size(); ++i) {
if (board.at(i)=='o') {
move += right - i;
}
}
return move%... |
#ifndef __LIB_STATUS_MACHINE_H
#define __LIB_STATUS_MACHINE_H
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/time.h>
#include <iconv.h>
#include <mutex>
#include "ros/ros.h"
#include "transfer_msgs/CarLpr.h"
#include "transfer_msgs/DoorScreen.h"
#include "transfer_msgs/Door.h"
#include "trans... |
#include "Terrain.h"
// public
Terrain::Terrain()
{
mVertexData.clear();
mIndexData.clear();
mBuffer = NULL;
}
Terrain::~Terrain()
{
SafeReleaseCom(mBuffer);
mIndexData.clear();
mVertexData.clear();
}
void Terrain::Initialize()
{
mInstanced = false;
mTessellated = true;
mInputLayoutSize = sizeof(IL_PosTe... |
//
// Created by gurumurt on 11/27/18.
//
#include "include/headers.h"
#include "include/Environment.h"
#include "include/data_api.h"
#include "include/kernel_api.h"
#include "include/runtime_api.h"
#include "include/Importkernel.h"
#include <math.h>
#include <chrono>
using namespace std::chrono;
unsigned int *in... |
// Created on: 1994-03-30
// Created by: Jacques GOUSSARD
// 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... |
#define F_CPU 8000000UL
#include <avr/io.h>
#include <stdio.h>
#include <util/delay.h>
#include <string.h>
void delay_ms(int ms)
{
volatile long unsigned int i;
for (i = 0; i < ms; i++)
_delay_ms(1);
}
void delay_us(int us)
{
volatile long unsigned int i;
for (i = 0; i < us; i++)
_delay_us(1);
}
#define RS 0
#... |
#include <string>
#include <vector>
#include <list>
#include <fstream>
#include <algorithm>
#include <iostream>
using std::cin;
using std::cout;
using std::istream;
using std::ostream;
using std::string;
using std::vector;
using std::list;
struct Datum
{
// ...
};
struct Person
{
// ...
};
// Typ AdressbuchT un... |
template <typename T>
struct SingletonIterator
{
T& data;
void operator += (ptrdiff_t diff) {}
T& operator* ()
{
return data;
}
};
template <typename T>
class SingletonStore : BaseStore
{
public:
using TELEMENT = T;
void new_entity(EntityRef ref) override
{
}
T& get()
{
return data;
}
T& get(Entit... |
#include "depth_to_point_cloud.hpp"
DepthToPointCloud::DepthToPointCloud(int width, int height, double fx, double fy, double cx, double cy, double factor)
: width_(width), height_(height), fx_(fx), fy_(fy), cx_(cx), cy_(cy), factor_(factor)
{
initialize_matrix();
}
pcl::PointCloud<pcl::PointXYZ>::Ptr DepthToPoi... |
#include <iostream>
using namespace std;
void RevStr(char *src)
{
char *start=src;
char *end=src;
char *ptr=src;
while(*ptr++ != '\0')
{
if(*ptr == ' '||*ptr == '\0')
{
end = ptr-1;
while(start < end)
swap(*start++,*end--);
star... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); ... |
//====================================================================================
// @Title: ASSET MANAGER
//------------------------------------------------------------------------------------
// @Location: /prolix/framework/include/cAssetMgr.cpp
// @Author: Kevin Chen
// @Rights: Copyright(c)... |
// Created on: 1996-12-16
// Created by: Christian CAILLET
// Copyright (c) 1996-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 "../RenderState.h"
#include "../rapidjson/document.h"
#include "gl_program.h"
#include <map>
#include <set>
#include "engine_struct.h"
#include "as_InputLayout.h"
#include "ResourceManager.h"
#include "PreDefine.h"
using namespace rapidjson;
using namespace HW;
using namespace std;
class as_Pas... |
//
// Created by baptiste roubieu on 20/06/2018.
//
#include "IrrlichtDisplay.hpp"
#include <algorithm>
IrrlichtDisplay::IrrlichtDisplay()
: _timeUnit(1)
, _device(nullptr)
, _driver(nullptr)
, _sceneManager(nullptr)
, _camera(nullptr)
, _isInit(false)
, _followCam(IrrlichtDisplayConst::CLICK_ON_MAP)
, _zoomC... |
#ifndef STUDENTINFO_H
#define STUDENTINFO_H
#include <QDialog>
#include "login.h"
namespace Ui {
class studentinfo;
}
class studentinfo : public QDialog
{
Q_OBJECT
public:
explicit studentinfo(QString Username,QWidget *parent = 0);
~studentinfo();
private slots:
void on_pushB... |
#pragma once
#include "cpu.h"
#include "fifo.h"
#define sub void
#define Sub void
#define Sub_AutoField void
#define call send_para(RD0);
#define call_AutoField push_AutoField;
#define Return(x) RSP += (x+MMU_BASE);\
return
#define Return_AutoField(x) RSP += x... |
#include "CAppController.h"
#include "glut.h"
#include "Timer.h"
#include <stdio.h>
// --------------------------------------------------------------------------
// CAppController []
// --------------------------------------------------------------------------
/**
* \brief
**/
CAppController::CAppControl... |
#pragma once
#ifndef H_TRO_UTILITIES_H
#define H_TRO_UTILITIES_H
#include "stdafx.h"
#include <cstdio>
#include <fstream>
#include <iostream>
#include <direct.h>
#include <string>
#include <vector>
#include <random>
#include <algorithm>
#include <cmath>
//
inline void stringSplit(std::string s,
std::st... |
#include"snake.h"
Snake::Snake()
{
head = new Snakecoor;
head->x = 6, head->y = 6;
head->next = NULL;
rear = head;
gotoxy(6, 6);
cout << "¡ñ";
dir = RIGHT;
}
int Snake::textself()
{
p = head->next;
while (p != NULL)
{
if (p->x == head->x&&p->y == head->y)
return 1;
p = p->next;
}
return 0;
}
void Sna... |
#include "stdafx.h"
#include "SpriteRender.h"
#include "font/FontRender.h"
SpriteRender::SpriteRender()
{
}
SpriteRender::~SpriteRender()
{
if (m_isPosChangeByMouse)
DeleteGO(m_PosDataText);
}
bool SpriteRender::Start() {
return true;
}
void SpriteRender::Init(const wchar_t* FilePath, float w, float h, bool ... |
// Created on: 1992-01-30
// Created by: Didier PIFFAULT
// 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 GN... |
#include "game_show.h"
int main(int argc, char* argv[]){
GameShow* pGs = new GameShow();
if(argc == 2 && std::string(argv[1]) == "--test"){
pGs->test();
}else{
pGs->run();
}
}
|
#include "../include/basic.h"
PermissionUser::PermissionUser()
{
;
}
std::list<PermissionUser *> PermissionUser::getAll()
{
std::string delimiter = DELIMITER;
std::ifstream file("permissions_users.txt");
std::string line;
std::string properties[NUMBER_PERMISSION_USER_PROPERTIES];
std::list<P... |
#include "pch.h"
#include "../minimalist_malloc/malloc.h"
#include "../minimalist_malloc/slab_allocator.h"
TEST(SlubTests, TestName) {
static Slab<0x010, 0x200> slab;
slab.init();
EXPECT_EQ(sizeof(slab), 0x10);
slab.alloc();
} |
#ifndef MP3PLAYER_H
#define MP3PLAYER_H
#include "song.h"
#include "bass/bass.h"
#include <thread>
class mp3Player{
song _current;
HSTREAM _stream;
thread _thr;
int songNumber;
vector<song> queue;
void resumeStream();
void pauseStream();
bool initializeEngine();
void stopStream();
... |
#ifndef MAINDIALOG_H
#define MAINDIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QRadioButton>
class MainDialog : public QDialog
{
Q_OBJECT
public:
MainDialog(QWidget *parent = 0);
~MainDialog();
public slots:
void onLoginSlot();
private:
... |
#include "Diccionario.hpp"
template<class T>
class Multiconjunto {
public:
Multiconjunto();
void agregar(T x);
int ocurrencias(T x);
bool operator<=(Multiconjunto<T> otro) const;
private:
Diccionario<T, int> d;
};
template<class T>
Multiconjunto<T>::Multiconjunto() {}
template<class T>
void Multi... |
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
class Dsu {
private:
vector<int> parents;
bool ranked;
vector<int> ranks;
public:
explicit Dsu(int n, bool rnkd = true) {
n++;
parents = vector<int>(n);
ranked = rnkd;
... |
#include "easylevel.h"
#include "ui_easylevel.h"
#include "secondeasylevel.h"
#include "mainwindow.h"
Easylevel::Easylevel(QWidget *parent) :
QDialog(parent),
ui(new Ui::Easylevel)
{
ui->setupUi(this);
}
Easylevel::~Easylevel()
{
delete ui;
}
void Easylevel::on_pushButton_clicked()
{
this->clos... |
//
// Created by PulsarV on 18-9-25.
//
#include <serial/flight_serial.h>
namespace flight {
namespace serial {
RC_SERIAL_STATUE Serial::recive(char *buffer, int size) {
SERIAL_FLAGS empty;
if (this->isOpend())
if (read(this->device_point, buffer, size) > 0x0000)
... |
#pragma once
#include "Board.h"
#include "Center_control.h"
#include "control_block.h"
#include "control_key.h"
#include "cursur_point.h"
#include "score.h"
#include <ctime>
using namespace std;
class Center_control
{
private:
cursur_point reference_pos_;
bool running_;
Board board_;
score score_;
control_bloc... |
#include <string> // std::string
#include "DAOMakersImpl.h"
#pragma warning(push)
#pragma warning(disable:4100) // unreferenced formal parameter
#pragma warning(disable:4127) // conditional statement is const
#pragma warning(disable:4244) // type conversion: possible data loss
#pragma warning(disable:4245) // sig... |
//单摆 1602
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define ul unsigned long
const int pin = 8;
float time[8]={0,0,0,0,0,0,0,0};
const ul MAXHT = 30*1000*1000;
unsigned long time_avr;
unsigned long f;
unsigned long T;
unsigned long g;
int n=8;
int t=4;
float M=4*3.14*3.14*0.35;
void setup()... |
#ifndef ROLE_H
#define ROLE_H
#include "baseobject.h"
#include "movething.h"
#include <QTimer>
class Role : public BaseObject, public MoveThing {
Q_OBJECT
public:
Role(QObject *parent = nullptr);
Role(int x,
int y,
int width,
in... |
// Created on: 2007-05-29
// Created by: Vlad Romashko
// Copyright (c) 2007-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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.