text stringlengths 8 6.88M |
|---|
/***********************************************************************
* created: Fri Sep 19 2014
* author: Martin Preisler
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - ... |
#ifdef FASTCG_VULKAN
#include <FastCG/Graphics/Vulkan/VulkanTexture.h>
#include <FastCG/Graphics/Vulkan/VulkanGraphicsSystem.h>
#include <FastCG/Graphics/Vulkan/VulkanExceptions.h>
#include <cstring>
namespace FastCG
{
VulkanTexture::VulkanTexture(const Args &rArgs) : BaseTexture(rArgs),
... |
/**
* Copyright 2019 Eliza Wszola (eliza.wszola@inf.ethz.ch)
*
* 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 ... |
#include "core.h"
#include "configvar.h"
ConfigVar::ConfigVar()
: m_Type( EVT_None )
, m_String( NULL ) // Initialize this for the whole union; it's a pointer so it's bigger than the rest on x64
, m_Hash( (unsigned int)0 )
#if PARANOID_HASH_CHECK
, m_Name( "" )
#endif
{
} |
//题目:给定一个整型数组,在数组中找出由三个数组成的最大乘积,并输出这个乘积。
//思路:先排序,按照从大到小排列,最大乘积就是 nums[0]*nums[1]*nums[2]
#include<stdio.h>
int main()
{
int nums[10] = {1,2,3,4,5,6,7,8,9,10};
int numsize = sizeof(nums)/sizeof(nums[0]);
int i,j,t,max;
for( i = 0;i < numsize-1;i++)
for( j = 0;j < (numsize-1-i);j++)
if(nums[j]<nums[j+1... |
// Driver to test class tree
#include<iostream>
#include"binarytree.h"
#include"rbtree.h"
int main()
{
RBTree<int> rbtree;
int val;
for(int i = 0; i < 10; i++)
{
std::cin>>val;
rbtree.insertNode(val);
}
//tree.preOrderTraversal();
rbtree.inOrderTraversal();
//tree.postOrderTraversal();
return 0;
}
|
#include <SoftwareSerial.h>
// 매크로 상수, 자주 쓰는거 지정
// TX를 2번에 RX를 3번에 연결했다(실제회로). 아두이노에는 반대로 기입해야 한다.
#define rxPin 2
#define txPin 3
//swSerial(rxPin, txPin)
SoftwareSerial swSerial(rxPin, txPin); // (2,3)
char data;
void setup() {
Serial.begin(9600);
swSerial.begin(9600);
Serial.println("ready...");
}
void ... |
#ifndef _MAZO_
#define _MAZO_ 0
#include <string>
#include <vector>
#include "cartas.h"
vector<Carta> crearmazo(){
vector<Carta> vectorM;
for (int i = 0; i<5;i++){
vectorM.push_back(CartaMilagro()); //5 cartas de MILAGRO
}
for (int i = 0; i<4;i++){
vectorM.push_back(CartaTraicion())... |
//*****************************************************
// VMA209 Push button and LED test
// written by Patrick De Coninck / Velleman NV.
// VMA209 contains 3 Push buttons, they are connected to the Arduino Analog inputs A1, A2, A3
// in this example we will switch ON LED1 when pushing Push button 3 - please feel ... |
#include "producto.h"
Producto::Producto(string nombre_p,float costo_p,int id_p)
{
this->id_producto = id_p;
this->nombre_producto = nombre_p;
this->costo_producto = costo_p;
}
float Producto::getCostoProducto(){
if(costo_producto>100){
costo_producto = costo_producto - (costo_producto*0.1... |
/*
* Copyright (c) 2013-2015 BlackBerry Limited.
*
* 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 ... |
/*****************************************************************************************************
* 剑指offer第33题
* 输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。
例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。
*
* Input: 一维数组
* Output: 数组中所有数字组成的最小的数
*
* Note: (考虑到新建比较规则,并且涉及到大数问题,可能会有数据溢出,考虑字... |
#include "competitive.h"
USESTD;
/*
* Used to solve APSP. O(V^3).
* It can also be used for checking transitive closures:
* initially, AdjMat[i][j] contains 1 (true) if vertex i is directly connected to vertex j,
* 0 (false) otherwise. Perform this operation: AdjMat[i][j] |= (AdjMat[i][k] & AdjMat[k][j]).
* We can ... |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef tuple<ll, ll, ll> tp;
typedef pair<ll, ll> pr;
const ll MOD = 1000000007;
const ll INF = 1e18;
template <typename T> void print(const T &t) {
std::copy(t.cbegin(), t.cend(),
std::ostream_iterator<typename T::value_type>(std::co... |
// note that if((bitOper[i] & bitOper[j]) == 0) but not if(bitOper[i] & bitOper[j] == 0)
class Solution {
public:
int maxProduct(vector<string>& words) {
if(words.empty()) return 0;
int res = 0;
int n = words.size();
vector<int> bitOper(n, 0);
for(int i = 0; i < n; i++)
... |
//============================================================================
// Name : lab3.cpp
// Author : Philippe Gelinas
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//===========================================================================... |
//
// Created by Wesley Moncrief on 4/5/16.
//
#ifndef RAYTRACING_POINT_H
#define RAYTRACING_POINT_H
#include <cmath>
class Point {
public:
double x;
double y;
double z;
Point() { x = 0, y = 0, z = 0;}
Point(double x, double y, double z) : x(x), y(y), z(z) { }
double distance(Point pt) c... |
#pragma once
#include "VertexFormats.h"
#include "VertexBufferManager.h"
class RenderMesh
{
public:
RenderMesh(void);
~RenderMesh(void);
template <typename VertexFormat>
void AddVertices(vector<VertexFormat> vVertices, D3D11_PRIMITIVE_TOPOLOGY ePrimitiveType = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
voi... |
#include "math/cloud_math.h"
#include "io/io.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
int main(int argc ,char** argv)
{
if(argc != 1)
{
std::cout << " Usage: testmath " << std::endl;
}
pc::PointCloud pts;
pc::ReadASC_xyz(argv[1], pts);
pc::PointNormal point = mean(p... |
//
// Created by anggo on 6/10/2020.
//
#ifndef TESTER_HEALTH_H
#define TESTER_HEALTH_H
#include <SFML/Graphics.hpp>
class Health : public sf::Drawable
{
private:
sf::Sprite healthIcon;
sf::Texture texture;
public:
Health(std::string filepath);
void draw(sf::RenderTarget& window,sf:... |
#pragma once
#include <map>
#include <string>
#include <vector>
#include "Comparators.h"
struct World {
World(std::string name, int seed) : Name(name), Seed(seed) {}
std::string Name;
int Seed;
};
namespace Worlds {
std::string Get_Name(int seed);
int Get_Seed(std::string name);
void Creat... |
/**
* Date: 2019-11-08 18:43:18
* LastEditors: Aliver
* LastEditTime: 2019-11-08 20:57:00
*/
#include <iostream>
#include <unistd.h>
#include <cstdlib>
#include <cstring>
using namespace std;
int main(int argc, char *argv[])
{
int pipeFd[2], childPid;
// 建立管道 pipeFd[1]写 pipeFd[0]读
if (pipe(pipeFd) ==... |
#include <iostream>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
#include <time.h>
using namespace std;
int i, j, w = 25, h = 20;
int inicio(void);
char modo(char c);
void game(void);
int direcao(void);
char tela(char mat['h']['w'], int s);
char movimento(char mat['h']['w']);
int caudaX[50]{1}, cau... |
#include "CIL/transform/resize.h"
#include <cfloat>
#include <cmath>
#include <cstring>
#include "CIL/mat/mat.h"
#include "CIL/auto_buffer.h"
#include "CIL/fast_math.h"
#include "CIL/hardware.h"
#include "CIL/parallel.h"
#include "CIL/saturate_cast.h"
#include "CIL/util.h"
namespace cil {
#include "CIL/transform/res... |
#include "planner.h"
#include "nav_msgs/OccupancyGrid.h"
Planner::Planner(){
sub_costmap = n.subscribe("/costmap_node/costmap/costmap", 1, &Sensing::costmapCb, &sensor);
}
void Planner::Astar(){
}
void Planner::move(){
// ROS_INFO("Robot moving . . .");
}
|
#ifndef WINDOWSINPUTLISTENER_H
#define WINDOWSINPUTLISTENER_H
#include "../Input/InputListener.h"
class CWindow;
class CWindowsInputListener : public CInputListener
{
public:
CWindowsInputListener( CInput* pInput, CWindow& rWindow );
virtual ~CWindowsInputListener();
virtual void Push( CMessage& rMessage );... |
#include "ComponentHandler.h"
ComponentHandler::ComponentHandler()
{
}
ComponentHandler::~ComponentHandler()
{
}
int ComponentHandler::Initialize(GraphicsHandler * graphicsHandler, PhysicsHandler* physicsHandler, AIHandler* aiHandler, AnimationHandler* aHandler)
{
int result = 1;
this->m_graphicsHandler = graphi... |
#include "ThirdGift.h"
#include "Controller.h"
ThirdGift::ThirdGift(sf::Vector2f location, sf::Vector2f size, sf::Vector2f scale, sf::Color color)
:Gift(location, size, scale, color) {}
ThirdGift::~ThirdGift() {}
void ThirdGift::getGift()
{
auto& control = Controller::getInstance();
control.setPoints(10);
}
|
#include "expressions/expression.hpp"
namespace flow {
Expression::Expression(Operator op)
: m_op(op) {
}
Operator Expression::getOperator() const {
return m_op;
}
}
|
#pragma once
#include "Piece.h"
class King :
public Piece
{
public:
King();
King(bool);
bool move(char, char);
~King();
};
|
#include<iostream>
#include<set>
using namespace std;
// 统计set容器的大小以及交换set容器
// empty() //判空
// size() //大小
// swap() //交换
//遍历set
void printSet(set<int> &s)
{
for(set<int>::iterator it=s.begin();it!=s.end();it++)
{
cout<<*it<<" ";
}
cout<<endl;
}
void test01()
{
// 默认构造
... |
#include "stdafx.h"
#include "GoCommand.h"
#include "Player.h"
GoCommand::GoCommand()
{
directions["north"] = Room::Direction::North;
directions["east"] = Room::Direction::East;
directions["south"] = Room::Direction::South;
directions["west"] = Room::Direction::West;
}
GoCommand::~GoCommand()
{
}
void GoComman... |
#include <iostream>
#include <Windows.h>
wchar_t *LPCtransferfromstring(const char * title)
{
size_t size = mbsrtowcs(NULL, &title, 0, NULL);
wchar_t * buf = new wchar_t[size + 1]();
size = mbsrtowcs(buf, &title, size + 1, NULL);
return buf;
}
std::wstring convert(const std::string& as)
{
// deal with trivial ... |
/* path.cpp -*- C++ -*-
Rémi Attab (remi.attab@gmail.com), 26 Apr 2014
FreeBSD-style copyright and disclaimer apply
Path implementation.
*/
#include "includes.h"
#include "types/std/string.h"
#include "types/std/vector.h"
#include <algorithm>
namespace reflect {
namespace co... |
#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
char mat[1010][1010], aux[1010][1010];
map < pair < char, char >, char > change;
void rotate(char c, const int &n){
if(c == 'R'){
int a = 0;
for (int j=0; j<n; j++){
int b =0;
for (int i=n-1; i>=0; i--){
aux[a][b] ... |
/*
* Copyright 2016-2017 Flatiron Institute, Simons Foundation
*
* 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 ... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QTextStream>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
n_input=46; //constant하나 추가
n_hidden=50;
m_netH = new double[n_hidden];
m_netO = new double[45];
delta_k... |
//CloseForm.cpp
#include "CloseForm.h"
CloseForm::CloseForm(Form *form)
:FindingFormAction(form) {
}
CloseForm::CloseForm(const CloseForm& source)
: FindingFormAction(source) {
}
CloseForm::~CloseForm() {
}
CloseForm& CloseForm::operator=(const CloseForm& source) {
FindingFormAction::operator=(source);
ret... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int R,C,r,c;
bool find2D(vector<string> s, vector<string> p){
bool found = false;
for(int i=0;i<R-r+1;i++){
for(int j=0;j<C-c+1;j++){
found = true;
for(int i1=0;i1... |
#include <string>
#include <mysql++.h>
#include <fstream>
#include <sys/types.h>
#include <unistd.h>
#include "tiempo.h"
#include "dominio.h"
#include "util.h"
#include "servicio.h"
#include "servicioMultidominio.h"
#include "configuracion.h"
using namespace std;
using namespace mysqlpp;
cServicioMultidominio::cServi... |
// EraseFindIndexVisitor.h
#ifndef _ERASEFINDINDEXVISITOR_H
#define _ERASEFINDINDEXVISITOR_H
#include "Visitor.h"
#include <afxwin.h>
class EraseFindIndexVisitor : public Visitor {
public:
EraseFindIndexVisitor(CDC *dc);
EraseFindIndexVisitor(const EraseFindIndexVisitor& source);
virtual ~EraseFindIndexVisitor();
... |
/**
* 3D NDT-UKF Node.
*/
#include <ros/ros.h>
#include <angles/angles.h>
#include <tf/transform_listener.h>
#include <boost/foreach.hpp>
#include <sensor_msgs/LaserScan.h>
#include <message_filters/subscriber.h>
#include <message_filters/sync_policies/approximate_time.h>
#include <nav_msgs/Odometry.h>
#include <na... |
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <thread>
#include "AppData.h"
AppData app;
int main(int argv, char *args[])
{
if (app.Setup() < 0)
return -1;
app.Run();
app.Shutdown();
return 0;
} |
/***********************************************************************
created: Sun Jun 18th 2006
author: Andrzej Krzysztof Haczewski (aka guyver6)
purpose: This codec provide FreeImage based image loading
*************************************************************************/
/**********************************... |
#ifndef LTUI_BUTTON_H
#define LTUI_BUTTON_H
#include "ftxui/component/component.hpp"
#include <string>
namespace ftxui {
class Button : public Component {
public:
// Constructor.
Button() = default;
Button(const Button &) = default;
Button(Button &&) = default;
~Button() override = default;
Button &opera... |
#include "PUtils.h"
#include "LBLibraryBase.h"
float PUtils::playItemBounceEffect(Node* pNode, float time)
{
WJBase *base = WJBase::convertToWJBase(pNode);
if (base)
{
float scale = base->getSavedScale();
pNode->stopActionByTag(NODE_BOUNCE_ACTION_TAG);
pNode->runAction(Sequence::create(ScaleTo::create(time, s... |
// prgrm for making the reverse of the a given number
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
unsigned long int a,b,c,d=0;
cout<<endl<<"enter a number :";
cin>>a;
b=a;
// logic for reverse of a number
while(a>0)
{
c=a%10;
d=(d*10)+c;
a=a/10;
}
cout<<endl<<"the re... |
#include <string>
#include <vector>
using namespace std;
long long solution(int a, int b) {
if (a > b) {
swap(a, b);
}
long long answer = b;
for (int i = 0; i < b - a; i++) {
answer += a + i;
}
return answer;
}
|
//----------------------------------------------------------------------------//
// VIDEO THREAD CLASS //
//----------------------------------------------------------------------------//
// Author: Łukasz Korbel, e-mail: korbel85@gmail.com ... |
#include "UIHandler.h"
UIHandler::UIHandler()
{
}
UIHandler::~UIHandler()
{
}
void UIHandler::Initialize(ID3D11Device* device, ID3D11DeviceContext* deviceContext)
{
this->m_maxUIComponents = 28;
this->m_nrOfUIComponents = 0;
for (unsigned int i = 0; i < this->m_maxUIComponents; i++)
{
UIComponent* newUIComp = ... |
#include "PCB.h"
#include "system.h"
PCB::PCB(SpaceId c_pid, SpaceId c_parent_pid, Thread* c_thread, int c_status) {
DEBUG('z', "Started making PCB\n");
pid = c_pid;
parent_pid = c_parent_pid;
thread = c_thread;
status = c_status;
files = new BitMap(MAX_USER_FILES);
DEBUG('z', "Finished making PCB\n");
}
Spa... |
/*
* Copyright (c) 2018 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/
extern "C"{
#include <drivers/clock_control.h>
#include <drivers/clock_control/nrf_clock_control.h>
}
#include <irq.h>
#include <logging/log.h>
#include <nrf.h>
#include <esb.h>
#include <zephyr.h>
#includ... |
#include "content\Singularity.Content.h"
namespace Singularity
{
namespace Content
{
class SmurfModelImporter : public Singularity::Content::IModelImporter
{
private:
#pragma region Nested Classes
struct FileHeader
{
char FileId[5];
unsigned Version;
unsigned MeshCou... |
#include <stdio.h>
int sum_Digits(int num);
int main()
{
int num, sum;
printf("Enter any number to find sum of digits: ");
scanf("%d", &num);
sum = sum_Digits(num);
printf("Sum of digits of %d = %d", num, sum);
return 0;
}
int sum_Digits(int num)
{
if(num == 0)
return 0;
... |
#ifndef I2CBUS_H
#define I2CBUS_H
#include "LocalTypes.h"
#include "IoError.h"
#include "IoBuffer.h"
class I2CBus
{
public:
virtual Status Send(byte value) = 0;
virtual Status Send(byte cmd, byte value) = 0;
virtual Status Send(byte cmd, byte* data, int dataLen) = 0;
virtual Status Send(... |
#include "stdafx.h"
#include "BSplineCurve.h"
BSplineCurve::BSplineCurve()
{
}
BSplineCurve::~BSplineCurve()
{
}
BSplineCurve::BSplineCurve(int num_vertices):Curve(num_vertices) {
this->setFlag(1);
}
//float bezierToBSpline[4][4] = { { 1.0 / 6,0,0,0 },{ 2.0 / 3,2.0 / 3,1.0 / 3,1.0 / 6 },{ 1.0 / 6,1.0 / 3,2.0 / 3,... |
vector<int> rightView(Node *root)
{
vector<int> output;
if(root==NULL)
{
return output;
}
int min_level = INT_MAX;
int max_level = INT_MIN;
queue<pair<Node*,int>> Q;
unordered_map<int,vector<int>> hash;
Q.push(make_pair(root,0));
while(!Q.empty())
{
Node* first = Q... |
//
// PocketTextElite - port of Elite[TM] trading system
// Copyright (C) 2008-2009 Michael Fink
//
/// \file MarketView.hpp Market view
//
#pragma once
// forward references
class IMainFrame;
/// market view
class MarketView :
public CDialogImpl<MarketView>,
public CDialogResize<MarketView>,
public CWinData... |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef tuple<ll, ll, ll> tp;
typedef pair<ll, ll> pr;
const ll MOD = 1000000007;
const ll INF = 1e18;
template <typename T> void print(const T &t) {
std::copy(t.cbegin(), t.cend(),
std::ostream_iterator<typename T::value_type>(std::co... |
#pragma once
#include "base/ast.hpp"
#include "base/error.hpp"
namespace z {
namespace Ast {
/*! \brief A compilation unit
The Unit AST node is the owner for all AST nodes in the unit.
This node maintains two namespace hierarchies
- the root namespace is the namespace for all types defined in thi... |
/*
* This is the example of safe_ptr object
* It has been taken from <https://www.codeproject.com/Articles/1183379/We-make-any-object-thread-safe>
* and slightly modified
*/
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <memory>
#include <threa... |
#include <stdio.h>
int main()
{
int value[55];
char str[100][51];
for(int i=0;i<100;i++)
scanf("%s",str[i]);
for(int i=0;i<55;i++)
value[i] = 0;
for(int i=0;i<50;i++)
{
int index = 49-i;
int sum = 0;
for(int j=0;j<100;j++)
{
sum += ((int)str[j][index] - 48);
}
sum += value[i];
sum += (val... |
#include<bits/stdc++.h>
using namespace std;
bool match_5(string s){
if(s == "ahmed" || s=="shiva") return true;
else return false;
}
bool match_6(string s){
if(s == "rakesh") return true;
else return false;
}
int main(){
int n;
string s;
cin >> n >> s;
int ans = 0;
for(int i = 0; i ... |
/*
BAEKJOON
3190. 뱀
1) queue를 사용한 것
- 배열을 사용했으면 체크할 때 배열을 모두 순회해야했다
- 시간 체크 -> queue를 사용해서 맨 앞에 것만 체크하고 pop해주었다
- 뱀 -> 꼬리가 먼저 들어오고, 꼬리를 삭제 해주므로 queue를 선택
2) 문제를 제대로 안읽어서 좌표 확인을 잘못한 것
*/
#include <iostream>
#include <algorithm>
#include <queue>
#define MAX 101
using namespace std;
struct node {
int r... |
#include "as/ScriptContext.hpp"
#include <angelscript.h>
namespace as
{
ScriptContext::~ScriptContext()
{
context->Release();
}
int ScriptContext::getId() const
{
return id;
}
asIScriptContext* ScriptContext::getRaw()
{
return context;
}
const asIScriptContext* ScriptContext::getRaw() const
{
... |
//
// SMImagePickerScene.h
// iPet
//
// Created by KimSteve on 2017. 6. 26..
// Copyright © 2017년 KimSteve. All rights reserved.
//
#ifndef SMImagePickerScene_h
#define SMImagePickerScene_h
#include "../../SMFrameWork/Base/SMScene.h"
#include "../../SMFrameWork/Util/ImageFetcher.h"
#include "../../SMFrameWork/UI... |
#include <bits/stdc++.h>
using namespace std;
struct Node
{
int val;
Node *next;
Node *back;
Node() : val(-1), next(NULL){};
Node(int val) : val(val), next(NULL), back(NULL){};
};
class Queue
{
private:
int _size = 0;
Node *head = new Node(), *end = head;
public:
int size() { return t... |
#include <node.h>
#include <nan.h>
#include <cstdlib>
#include "get.h"
#include "netstat.h"
using v8::Array;
using v8::Number;
using v8::Local;
using v8::Object;
using v8::String;
#define MAC_SIZE 18
#define MAC_TPL "%02x:%02x:%02x:%02x:%02x:%02x"
NAN_METHOD(get) {
NanScope();
node_netstat_iaddress_t* addresses;
... |
/*************************************************************
* > File Name : P2015_3.cpp
* > Author : Tony
* > Created Time : 2019/06/18 12:59:16
* > Algorithm : [DP]Tree
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
... |
#include<iostream>
using namespace std;
bool ternarySearch(int ar[], int left, int right, int num)
{
if (left <= right)
{
int mid1 = left + right/3;
int mid2 = mid1 + right/3;
if (ar[mid1] == num) return true;
if (ar[mid2] == num) return true;
if (num < ar[mid1]) return ternarySearch(ar, l... |
#ifndef __TOKEN_H__
#define __TOKEN_H__
#include <string>
using namespace std;
class Token {
public:
const int tag;
Token(int t) : tag(t) {}
virtual string toString();
};
#endif |
/*************************************************************
* > File Name : P1484.cpp
* > Author : Tony
* > Created Time : 2019/09/14 15:18:38
* > Algorithm : priority_queue+链表
**************************************************************/
#include <bits/stdc++.h>
using namespac... |
#ifndef TESTS_H
#define TESTS_H
class XMTestBase
{
public:
static void MasterAction(){
};
static void SlaveAction(){
};
};
void testAll(bool isMaster);
extern FILE *logFile;
#endif |
/*NodeStoreAsync.h
NodeStoreAsync
copyright Vixac Ltd. All Rights Reserved
*/
#ifndef INCLUDED_NODESTOREASYNC
#define INCLUDED_NODESTOREASYNC
#include "Node.h"
#include <iostream>
#include "AsyncFunctor.h"
#include <set>
namespace vixac
{
namespace ina
{
class NodeGenAsync;
// --//
... |
/*******************************************************************************
* Cristian Alexandrescu *
* 2163013577ba2bc237f22b3f4d006856 *
* 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 ... |
#include "StdAfx.h"
#include "RResource.h"
#include "AThread.h"
#include "BDrawLinePass.h"
#include "BLineBatcher.h"
#include "BViewport.h"
#include "BDriver.h"
BDrawLinePass::BDrawLinePass() {
}
BDrawLinePass::~BDrawLinePass() {
}
void BDrawLinePass::DrawPrimitive(BLineBatcher* LineBatcher) {
... |
#include <iostream>
#include <opencv2/opencv.hpp>
#include <fstream>
#include "darknet.h"
using namespace std;
using namespace cv;
void imgConvert(const cv::Mat &img, float *dst);
void imgResize(float *src, float *dst, int srcWidth, int srcHeight, int dstWidth, int dstHeight);
void resizeInner(float *src, float *ds... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
// Copyright [2014] <lgb (LiuGuangBao)>
//=====================================================================================
//
// Filename: proc.hpp
//
// Description: Linux proc 文件系统
//
// Version: 1.0
// Created: 2013年12月26日 14时49分23秒
// Revision: none
// Compiler: gcc
//
// ... |
// Tap_Proxy.cpp : 구현 파일입니다.
//
#include "stdafx.h"
#include "NSS Ver 1.1.h"
#include "Tap_Proxy.h"
#include "afxdialogex.h"
// Tap_Proxy 대화 상자입니다.
IMPLEMENT_DYNAMIC(Tap_Proxy, CDialogEx)
Tap_Proxy::Tap_Proxy(CWnd* pParent /*=NULL*/)
: CDialogEx(IDD_Proxy, pParent)
{
}
Tap_Proxy::~Tap_Proxy()
{
}
void Tap_Prox... |
// conversion status: type and call issues resolved, algorithm adaptation to coloredAmounts still needs work.
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2013+ The Coin developers
// Distributed under the MIT/X11 software license, see the accompanying
... |
#pragma once
#include <cstdint>
#include <random>
#define JSON_DUMP_SPACES (2)
#define JSON_FILE_IMPORT_KEY ("_file_")
// comment out to use dynamic names
//#define STATIC_DB_NAME (":memory:")
//#define STATIC_DB_LOG_NAME ("sqlitedb.log")
#define PI (3.14159265359)
#define ONE_MiB (1048576.0) //2^20
#define ONE_G... |
#pragma once
#include <algorithm>
#include <functional>
#include <mutex>
#include <stdexcept>
#include <vector>
#include <dsnutil/singleton.h>
namespace dsn {
namespace event {
/// \brief Queue implementation for broadcast channels
///
/// This template provides the facilities to register/unregister han... |
// SPDX-License-Identifier: LGPL-2.1
/*
* Copyright (C) 2017 VMware Inc, Yordan Karadzhov <ykaradzhov@vmware.com>
*/
/**
* @file KsSession.cpp
* @brief KernelShark Session.
*/
// KernelShark
#include "libkshark.h"
#include "libkshark-tepdata.h"
#include "KsSession.hpp"
#include "KsMainWindow.hpp"
/** Cr... |
#include "elf_reader.h"
#include <stdlib.h>
ELF_Reader::ELF_Reader()
{
cadr = 0; csize = 0; cvadr = 0;
dadr = 0; dsize = 0; dvadr = 0;
gp = 0;
madr = 0; mend = 0;
endPC = 0; entry = 0;
val_n = 0;
padr = 0; psize = 0; pnum = 0;
sadr = 0; ssize = 0; snum = 0;
symadr = 0; symsize = 0;... |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
struct Wood {
int length, width;
Wood() {}
bool operator<(const Wood& a) {
if (length != a.length)
return length > a.length;
return width > a.width;
}
};
const int maxn = 5... |
#ifndef VERTEXSTREAM_H
#define VERTEXSTREAM_H
#include <pcx/non_copyable.h>
class VertexBuffer;
class VertexStream : public pcx::non_copyable
{
public:
explicit VertexStream(VertexBuffer &buffer);
VertexStream(VertexStream &&v);
~VertexStream();
operator bool() const { return true; }
template<t... |
#pragma once
#include <string>
#include <ostream>
#include <system_error>
#include <ErrorBase.h>
class CustomError : public llvm::ErrorInfo<CustomError> {
public:
static char ID;
CustomError(std::string file, int line);
void log(std::ostream &OS) const override;
std::error_code convertToErrorCode() const o... |
#ifndef COOKIETEST_H
#define COOKIETEST_H
#include <QTest>
#include <QLocale>
#include "coverageobject.h"
#include <Cutelyst/cookie.h>
using namespace Cutelyst;
class TestCookie : public CoverageObject
{
Q_OBJECT
public:
explicit TestCookie(QObject *parent = nullptr) : CoverageObject(parent) {}
private Q_... |
#ifndef MAXENTMPI_HPP_INCLUDED
#define MAXENTMPI_HPP_INCLUDED
namespace mpi = boost::mpi;
using namespace std;
#endif
|
#ifndef __DUI_TRACK_BAR_H__
#define __DUI_TRACK_BAR_H__
#include "DUIControlBase.h"
DUI_BGN_NAMESPCE
enum TRACK_BAR_IMAGE_INDEX
{
TRACK_BAR_IMAGE_BK = 0,
TRACK_BAR_IMAGE_FORE,
TRACK_BAR_IMAGE_COUNT
};
class DUILIB_API CTrackBarUIData
{
public:
CRefPtr<CImageList> m_pImageBK; // follow TRACK_BAR_IMAGE_INDEX
CR... |
#include "diemthi.h"
DiemThi::DiemThi() : m_maMH(""), m_diem (0)
{
}
DiemThi::~DiemThi()
{
}
string DiemThi::maMH() const
{
return m_maMH;
}
void DiemThi::setMaMH(const string &maMH)
{
m_maMH = maMH;
}
int DiemThi::diem() const
{
return m_diem;
}
void DiemThi::setDiem(int ... |
#include "presenter.h"
#include "baseview.h"
#include "route.h"
#include "model.h"
#include "encodergpx.h"
#include "encoderpolyline.h"
#include "encoderbackup.h"
#include "qcustomplot/qcustomplot.h"
#include <QUndoStack>
#include "commands/commandaddroutes.h"
#include "commands/commandremoveroutes.h"
#include "comman... |
#ifndef CON_TURNO_I
#define CON_TURNO_I
#include "objeto_juego_i.h"
#include "contexto_turno_i.h"
/**
* Interface para representar a aquellos objetos que tienen algo que hacer cada
* cierto tiempo. Además también vamos a usar esta interface para relacionar a
* los objetos con otras cosas del mundo, como el jugador u ... |
#ifndef scene_h__
#define scene_h__
#include <vector>
#include "mesh.h"
#include "Ray.h"
#include "intersection.h"
class Scene
{
private:
std::vector<Mesh*> _objs;
void _Swap(Scene& lhv, Scene& rhv);
public:
Intersection Intersect(const Ray& ray);
Scene(const Scene& scene);
Scene(Scene&& scene);
... |
//
// RenderTarget.h
// cheetah
//
// Copyright (c) 2013 cafaxo. All rights reserved.
//
#ifndef cheetah_RenderTarget_h
#define cheetah_RenderTarget_h
#include "OpenGL.h"
#include <iostream>
#include <vector>
class Entity;
class Shader;
class RenderTarget {
public:
RenderTarget();
void bind();
... |
#include <embr/platform/lwip/dataport.h>
#include <embr/dataport.hpp>
#include <embr/datapump.hpp>
#include <embr/observer.h>
#include "esp_log.h"
typedef embr::DataPump<embr::lwip::experimental::UdpDataportTransport> datapump_type;
struct AppObserver
{
static constexpr const char* TAG = "AppObserver";
temp... |
#include "myStack.h"
int main() {
myStack uno;
uno.push(3);
int tres = uno.top();
int size = uno.size();
uno.pop();
bool isEmpty = uno.isEmpty();
return 0;
} |
#include <iostream>
#include <bits/stdc++.h>
#include <iomanip>
#define E_Type int
using namespace std;
struct Stack
{
E_Type element;
Stack* next;
Stack* top=NULL;
};
void push(Stack* s,E_Type ele);
void pop(Stack* s);
void display(Stack* s);
bool Empty();
int main()
{
Stack stk;
push(&stk,5);
... |
#include "Streckenende.h"
#include <iostream>
#include "stdafx.h"
#include "Kreuzung.h"
using namespace std;
extern double dGlobaleZeit;
Streckenende::Streckenende()
{
}
Streckenende::Streckenende(Fahrzeug * pFahrzeug, Weg * pWeg) : FahrAusnahme(pFahrzeug, pWeg)
{
}
Streckenende::~Streckenende()
{
}
void Strecken... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.