text stringlengths 8 6.88M |
|---|
#include "System.h"
#include <GL/glew.h>
static int totalVRAM;
std::string System::GetVRAMUsage() {
int availableMemory;
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &availableMemory);
return FormatOutput((totalVRAM - availableMemory) * 1024);
}
#ifdef _WIN32
#include <Windows.h>
#in... |
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "GameFramework/Character.h"
#include "Items/IGSEquipment.h"
#include "GSCharacter.generated.h"
UCLASS(config=Game)
class GAMESYSTEM_API AGSCharacter : public ACharacter, public IIGSEquipment
{
GENERATED_BODY()
public:
UPROPERTY(Visi... |
#include "lista.h"
template<class TIPO>
lista<TIPO>::~lista()
{
nodo<TIPO> *aux;
Primero();
while(plista)
{
aux = plista;
plista = plista->siguiente;
delete aux;
}
}
template<class TIPO>
void lista<TIPO>::Insertar(TIPO v)
{
nodo<TIPO> *nuevo;
Primero();
// Si la... |
#include "mbed.h"
#include "bbcar.h"
#include "bbcar_rpc.h"
Ticker servo_ticker;
PwmOut pin9(D9), pin8(D8);
Serial xbee(D12, D11);
BBCar car(pin8, pin9, servo_ticker);
int main()
{
char buf[256], outbuf[256];
double pwm_table0[] = {-150, -120, -90, -60, -30, 0, 30, 60, 90, 120, 150};
double speed_table0[]... |
#include <iostream>
#include <memory>
#include <vector>
#include "gtest/gtest.h"
#include "span/Common.hh"
#include "span/Timer.hh"
#include "span/exceptions/Assert.hh"
#include "span/fibers/Fiber.hh"
#include "span/io/IOManager.hh"
#include "span/io/Socket.hh"
namespace {
struct Connection {
span::io::Socket:... |
#pragma once
#include <d3d12.h>
#include <d3d12sdklayers.h>
#include <d3d12shader.h>
#include <dxgi1_5.h>
#include <wrl/client.h>
#pragma comment(lib, "d3d12")
#pragma comment(lib, "dxgi.lib")
using Microsoft::WRL::ComPtr;
#define RELEASE(obj) \
if (obj != nullptr) { \
obj->Release(); \
}
|
//
// SceneBase.h
// Boids
//
// Created by Yanjie Chen on 3/3/15.
//
//
#ifndef __Boids__SceneBase__
#define __Boids__SceneBase__
#include "cocos2d.h"
class SceneBase : public cocos2d::Scene {
public:
SceneBase();
virtual ~SceneBase();
static SceneBase* create();
virtual bool init();
};... |
#include "ros/ros.h"
#include "std_msgs/Float64.h"
#include <iostream>
#include <string>
#include <sstream>
int main(int argc, char **argv)
{
ros::init(argc, argv, "rc_simple");
ros::NodeHandle n;
ros::Publisher remote_pub = n.advertise<std_msgs::Float64>("/simple_machine/joint1_position_controller/command", 10... |
//
//
/// \file
/// \brief blomberg API wrapper code
/// \ingroup python
///
/// Set BB_USING_DLL to compile with bloomberg dll
/// Set USE_BOOST_THREAD to compile with boost thread
///
/// BB_PLATFORM_WINDOWS_NT ?
///
///
#ifndef __BLOOMBERG_QM_HPP__
#define __BLOOMBERG_QM_HPP__
//#include <q... |
/**
* @author NageshAC
* @email nagesh.ac.aralaguppe@fau.de
* @create date 2021-07-27 11:46:49
* @modify date 2021-07-27 11:46:49
* @desc Particle info class
*/
#pragma once
#include<iostream>
#include<cuda_runtime.h>
class base_particle{
protected:
double density, position[3], velocity[3];
pub... |
#include <stdafx.h>
#include <TywLib\math\GLXMath.h>
#include <TywLib\geometry\JointTransform.h>
#include <TywLib\geometry\VertData.h>
#include <TywLib\utilities\templates.h>
#include <TywLib\utilities\EngineString.h>
#include <TywLib\utilities\EngineVariables.h>
//Engine Includes
#include <TywEngine\EventManager\IEve... |
#ifndef OPERATEURNOT_H
#define OPERATEURNOT_H
#include "../headers/operateur.h"
#include "../headers/pile.h"
#include "../headers/entier.h"
#include "../headers/expressionmanager.h"
///
/// \brief Opération logique NOT
///
class OperateurNOT : public Operateur
{
friend class ExpressionManager;
private:
///
... |
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#include "render/irender_buffer.h"
using namespace jactorio;
void render::IRenderBuffer::GlInit() noexcept {
vtxBuffer_.Init();
idxBuffer_.Init();
ResizeDefault();
GlHandleBufferResize();
}
uint32_t ... |
#include "CPropToggle.h"
#include "elements/Model.h"
#include "DescriptorList.h"
void CPropToggle::toggle(CBaseEntity* originator){
m_model->setVisible(!m_model->getVisible());
}
void CPropToggle::show(CBaseEntity* originator){
m_model->setVisible(true);
}
void CPropToggle::hide(CBaseEntity* orig... |
#ifndef SKP_DRAWING_ELEMENT_HPP
#define SKP_DRAWING_ELEMENT_HPP
#include "common.hpp"
#include <SketchUpAPI/model/drawing_element.h>
#include "entity.hpp"
#include "bounding_box.hpp"
#include "layer.hpp"
typedef struct {
SkpEntity skp_entity;
SUDrawingElementRef (*get_su_drawing_el)(void*);
} SkpDrawingElement... |
#ifndef MYPANELOPENGL_H
#define MYPANELOPENGL_H
#include <QGLWidget>
class MyPanelOpenGL : public QGLWidget
{
Q_OBJECT
public:
explicit MyPanelOpenGL(QWidget *parent = 0);
signals:
public slots:
void changeSides(int sides);
void changeRadius(double radius);
private:
int sides;
doubl... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Management::Policies {
struct INamedPolicyData;
struct INamedPolicyStatics;
struct NamedPolicyData;
}
namespace Windows::Management::... |
void GC()
{
}
|
// Copyright (c) 2009-2010 Roman Neuhauser
// Distributed under the MIT license (see LICENSE file)
// vim: sw=4 sts=4 et fdm=marker cms=\ //\ %s
#include <ostream>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/phoenix_stl.hpp>
#include <boost/spirit/in... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <sstream>
using namespace std;
/*
一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级。求该青蛙跳上一个n级的台阶总共有多少种跳法。
解析: f(n) = f(1) + f(2) + ... + f(n-1) + 1
*/
class Solution {
public:
int jumpFloorII(int n) {
... |
using namespace std;
#include<iostream>
#include<vector>
template <class T>
//vector<T> vec;
class DLLNode {
public:
T info;
DLLNode *next;
DLLNode *prev;
DLLNode(const T& el, DLLNode *n = 0, DLLNode *p = 0){
info = el;
next = n;
p= prev;
}
};
template <class T>
class ... |
//============================================================================
// Name : zVision.cpp
// Author : Leonardo Costa
// Version :
// Copyright : LC Software
// Description : Interface de Detecção de Objetos C++, Ansi-style
//==================================================================... |
/*
* ImageLoader.h
*
* Created on: 11 окт. 2017 г.
* Author: Соня
*/
#ifndef IMAGELOADER_H_
#define IMAGELOADER_H_
#include "Common.h"
class ImgLoader {
public:
static void LoadImage(const String &fileName);
};
#endif /* IMAGELOADER_H_ */
|
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "Windows.Web.Http.1.h"
#include "Windows.Foundation.1.h"
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Foundation::Collections {
#ifndef WINRT_GENERIC_bb78502a_f79d_54fa_92... |
#pragma once
#ifndef IHTTPDISPATCHER_H
#define IHTTPDISPATCHER_H
#include <variant>
#include <cpr/cpr.h>
#include "NetworkReply.h"
#include "IHTTPRequest.h"
class IHTTPDispatcher {
public:
virtual NetworkReply get(IHTTPRequest* r) = 0;
virtual NetworkReply post(IHTTPRequest* r) = 0;
};
#endif
|
#include "mvPythonTranslator.h"
#include "Core/mvApp.h"
#include "Core/mvLogger.h"
namespace Marvel {
mvPythonTranslator::mvPythonTranslator(const std::initializer_list<mvPythonDataElement>& elements,
bool standardKeywords, const std::string& about)
: m_elements(elements), m_about(about)
{
if (standardKeywo... |
#ifndef RTSP_TASK_H
#define RTSP_TASK_H
#include <string>
#include <QDateTime>
#include "Common.h"
#include "liveMedia.hh"
#include "jsoncpp/json.h"
/*
* rtsp的任务类,每路rtsp流对应一个rtsp任务
*/
class RtspTask
{
public:
RtspTask(RTSPServer *server, UsageEnvironment *environment);
// 开始任务
bool star... |
//
// main.cpp
// Author-ID XTRA_CRED
// Program Build and Client Interaction
//
// Created by Andrew Masters on 5/30/17.
// Copyright © 2017 IronHack Studios. All rights reserved.
//
#include <iostream>
#include <string>
#include <functional>
#include <unistd.h>
#include <stdlib.h>
#include "DataBase.h"
using na... |
/*
* job.h
*
* Created on: Feb 9, 2015
* Author: dvorka
*/
#ifndef JOB_H_
#define JOB_H_
class StopMotionJob {
int movieWidth;
int movieHeight;
char *movieFormat;
public:
void setImagePaths();
};
#endif /* JOB_H_ */
|
#include<stdio.h>
#include<stdlib.h>
int permute(char *,int,int);
int swap(char *,char *);
int main(){
char str[]="ABC";
permute(str,0,2);
getchar();
return 0;
}
int permute(char *str,int s,int e){
int j;
if(s==e)
printf("%s\n",str);
else{
for(j=s;j<=e;j++){
swap((str+s),(str+j));
permute(str,s+... |
#include "RemoveDuplicateLetters.hpp"
#include <stack>
#include <vector>
#include <algorithm>
using namespace std;
string RemoveDuplicateLetters::removeDuplicateLetters(string s) {
vector<int> freqs(256, 0);
vector<bool> visited(256, false);
stack<char> rec;
string ret;
for (auto c : s)
... |
/**
* @class SCDMsgServer - https://github.com/SC-Develop/SCD_MC
*
* @author Ing. Salvatore Cerami - dev.salvatore.cerami@gmail.com - https://github.com/SC-Develop/
*
* @brief SCD Message Center Server: Interprocess messaging comunications server
*
* This is a part of SCD Message Center QT Class Library,... |
/**
* $Source: /backup/cvsroot/project/pnids/zdk/zls/zlang/ZLangFunction.cpp,v $
*
* $Date: 2001/11/14 19:03:08 $
*
* $Revision: 1.3 $
*
* $Name: $
*
* $Author: zls $
*
* Copyright(C) since 1998 by Albert Zheng - 郑立松, All Rights Reserved.
*
* lisong.zheng@gmail.com
*
* $State: Exp $
*/
#include <zls/... |
#include <stdio.h>
#include <stdlib.h>
void funcao(int *pVariavel);
void alocarMatriz(int **variavel);
int main(){
int variavel;
//scanf("%d", &variavel);
funcao(&variavel);
int *pVariavel;
//pVariavel = (int *) malloc (sizeof(int));
alocarMatriz(&pVariavel);
return 0;
}
int ** funcao(int *pVariavel){
... |
/************************************************************
* ** File Name: RPS.hpp
* ** Author 1: Nathaniel Bennet
* ** Author 2: Aaron Berns
* ** Author 3: Juan Du
* ** Author 4: Christopher Dubbs
* ** Author 5: Chieko Duncans
* ** Author 6: Molly Johnson
* ** Author 7: Armand Reitz
* ** Date: 02/06/2016
... |
#include <bits/stdc++.h>
using namespace std;
int findPeak(int arr[], int left, int right, int n)
{
int mid = left + (right - left) / 2;
if ((mid == 0 || arr[mid - 1] <= arr[mid]) && (mid == n - 1 || arr[mid + 1] <= arr[mid]))
{
return mid;
}
if (mid > 0 && arr[mid - 1] > arr[mid])
{... |
#include<stdio.h>
#include<unistd.h>
int main() {
fork();
fork();
fork();
printf("*");
} |
/**
* Copyright (C) 2017 Alibaba Group Holding Limited. 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
*
* ... |
#include "GameObject.h"
#include <GLM/gtc/matrix_transform.hpp>
GameObject::GameObject() : m_parent(nullptr), m_firstChild(nullptr), m_lastChild(nullptr), m_prevSibling(nullptr), m_nextSibling(nullptr) {
m_position = glm::vec3(0.0F, 0.0F, 0.0F);
m_axis = glm::vec3(0.0F, 1.0F, 0.0F);
m_angle = 0;
m_scale =... |
#ifndef __CONCRETE_ALGORITHM_H__
#define __CONCRETE_ALGORITHM_H__
#include "Algorithm.h"
class Knife : public Weapon
{
public:
virtual void attack() override;
};
class Gun : public Weapon
{
public:
virtual void attack() override;
};
#endif // __CONCRETE_ALGORITHM_H__
|
/**
* Copyright (C) 2017 Alibaba Group Holding Limited. 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
*
* ... |
#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pr(x) cerr << #x << ": " << x << endl
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
const int N = 2e5+22;
const ll INF = 2e1... |
#include <stdio.h>
#include <math.h>
int main()
{
int n;
char sympol;
scanf("%d %c", &n, &sympol);
int m = sqrt(2 * (n + 1)) - 1;//m为总共的层数,以及一层最大的符号个数
if (m % 2 == 0) //这里是防止放大了m使它变为偶数(而题目要求是奇数)
{
m--;
}
int tag = 0, count = 0;//tag控制左侧空格的输出,count计数
for (int i = m; i >= 1; ... |
#include <iostream>
#include "define.h"
CvRect box1;
void MouseCallback1(int event, int x, int y, int flag, void * param)
{
cv::Mat scene = *((cv::Mat *) param);
switch (event)
{
case CV_EVENT_LBUTTONDOWN:
box1 = cvRect(x, y, 0, 0);
std::cout << "CV_EVENT_LBUTTONDOWN\n";
break;
case CV_EVENT... |
#ifndef __LINBOX_BM_SlicedPolynomialBM_SlicedPolynomialMatrixMulKaratsuba_INL
#define __LINBOX_BM_SlicedPolynomialBM_SlicedPolynomialMatrixMulKaratsuba_INL
#include "SlicedPolynomialMatrixAddSub.h"
#include <vector>
#include <stdlib.h>
#include <stdint.h>
#include <iostream>
namespace LinBox
{
template<class GField,... |
//===--- ClassLayout.h - Class instance layout ------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
#include <bits/stdc++.h>
using namespace std;
const int MAX_INT = std::numeric_limits<int>::max();
const int MIN_INT = std::numeric_limits<int>::min();
const int INF = 1000000000;
const int NEG_INF = -1000000000;
#define max(a,b)(a>b?a:b)
#define min(a,b)(a<b?a:b)
#define MEM(arr,val)memset(arr,val, sizeof arr)
#defi... |
#include "SpaceCreationView.h"
SpaceCreationView::SpaceCreationView() {
cancelCommandEnabled = true;
name = "space creation";
}
void SpaceCreationView::displayStaticContent() {
std::cout << "Enter new space name" << std::endl;
}
void SpaceCreationView::displayDynamicContent() {
auto space_name = Vie... |
// VScrollActionCreator.h
#ifndef _VSCROLLACTIONCREATOR_H
#define _VSCROLLACTIONCREATOR_H
#include "Scroll.h"
#include "ScrollAction.h"
#include "VerticalScroll.h"
class VScrollActionCreator {
public:
VScrollActionCreator();
VScrollActionCreator(const VScrollActionCreator& source);
~VScrollActionCreator();
VScro... |
#include "stdafx.h"
#include <iostream>
#include <string>
#include "SQLcontrol.h"
#include "Logging.h"
#include "sqlite3.h"
using namespace std;
#pragma warning(disable:4996)
/**
* Prints the version of the .dll
*
*/
SQLCONTROL_API void SQLcontrol_printVersion()
{
printf(buildString);
}
/**
* Creates the Database ... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <sstream>
using namespace std;
/*
因为出现偶数次的数字,异或操作之后会变成0. 例如2^2^13^13=0
我们用0将数组data中全部的数字异或操作一遍,得到结果 t = num1^num2
任取t的二进制表达式中等于1的某一位,那么num1和num2的二进制表达式在这一位上不同。
此时我们根据这一位将data中的数字分为两组(1或者0),然后每一组单独做异... |
class RandomizedCollection {
public:
/** Initialize your data structure here. */
unordered_map<int, unordered_set<int>> dict;
int v[10000];
int size;
RandomizedCollection() {
dict.clear();
size = 0;
}
/** Inserts a value to the collection. Returns true if the c... |
const int n = 1e5 + 5, P = 1e9+7;
int A[n+1], B[n+1];
int lowbit(int x) { return x & -x;}
void update(int x) {
while (x <= n) {
A[x]++;
x += lowbit(x);
}
}
int get(int x) {
int ans = 0;
while (x > 0) {
ans += A[x];
x -= lowbit(x);
}
return ans;
}
class Soluti... |
#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int findContentChildren(int g[],int n, int s[],int m) {
sort(g,g+n);
sort(s,s+m);
int count = 0;
for(int i = 0,j = 0; i < n && j < m;) {
if(g[i] <= s[j]) {
i++;
count++;
... |
#include<iostream>
#include"myList.h"
using namespace std;
int menu();
int Smenu();
int Qmenu();
int main()
{
bool qF = 0, sF = 0, cF = 0;
do
{
int c = menu();
if (c==1)
{
myList* Sobj = new myList();
do
{
int s = Smenu();
if (s==1)
{
int d;
cout << "Ente... |
class Solution
{
public:
void nextPermutation(vector<int>& nums)
{
for (int i = nums.size()-2; i >= 0; --i)
{
if (nums[i] < nums[i+1])
{
int j = nums.size();
while (nums[i] >= nums[--j]);
swap (nums[i], nums[j]);
... |
#include <iostream>
struct Node {
int value;
Node* left;
Node* right;
};
Node* MakeBST() {
Node *node_24 = new Node;
node_24->value = 24;
Node *node_18 = new Node;
node_18->value = 18;
Node *node_30 = new Node;
node_30->value = 30;
Node *node_10 = new Node;
node_10->value = 10;
Node *node_21 =... |
class Solution {
public:
int climbStairs(int n) {
int a = 1;
int b = 1;
while(n >= 2)
{
int temp = b;
b = a + b;
a = temp;
n--;
}
return b;
}
}; |
#include <cstdio>
#include "memory.h"
#include "def.h"
Memory::~Memory()
{
//printf("Memory destructor.\n");
}
void Memory::HandleRequest(unsigned long long addr, int bytes,
int read, char *content,
int &hit, int &time)
{
#ifdef DEBUG
printf(" Mem always ... |
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include <GL/glew.h>
#include <QGLWidget>
#include <QTimer>
#include "SteeringBehaviors/GameWorld.h"
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
explicit GLWidget(QWidget *parent = 0);
virtual ~GLWidget();
protected:
void initializeGL();
void resizeG... |
/*
* Timer.h
*
* Created: 02.02.2015 11:36:24
* Author: User
*/
#define F_CPU 1000000
#include <avr/io.h>
#include <avr/interrupt.h>
#ifndef __TIMER_H__
#define __TIMER_H__
typedef unsigned char* reg;
const unsigned char OCR0A = 0x4B;
const unsigned char OCR0B = 0x49;
class Timer
{
//variables
public:
enum num... |
class Solution {
public:
int lengthOfLastWord(const char *s) {
int length = 0, reset = 0;
int i=0;
while(*(s+i) != '\0') {
if(*(s+i) != ' '){
if(reset) {length = 1; reset = 0;}
else length++;
} else {
reset = 1;
... |
#pragma once
class Car {
public:
Car();
void set_cx(int cx);
void set_cy(int cy);
void set_width(int width);
void set_height(int height);
int get_cx() const;
int get_cy() const;
int get_width() const;
int get_height() const;
int get_score() const;
void set_score(); // score를 0으로 바꾼다.
private:
int cx_, cy_... |
#pragma once
#include "DCoordinates3.h"
#include "GenericCurves3.h"
#include "Matrices.h"
#include "TriangulatedMeshes3.h"
#include <GL/glew.h>
#include <algorithm>
#include <iostream>
#include <vector>
namespace cagd {
class TensorProductSurface3
{
public:
// a nested class the stores the zeroth a... |
#include <ArduinoBLE.h>
void setup()
{
BLE.begin();
BLE.scanForUuid("19b10000-e8f2-537e-4f6c-d104768a1214");
}
void loop()
{
BLEDevice peripheral = BLE.available();
//Serial.println(convertToString(buf, count.length()+1));
if (peripheral)
{
// discovered a peripheral, print out address, local name, and a... |
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. ... |
//Student Name: Bair Suimaliev
//Student email: bsuimaliev@myseneca.ca
//Student ID: 159350198
//Date: 09.25.2021
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <cstring>
#include "event.h"
using namespace std;
size_t g_sysClock{};
namespace sdds {
Event::Event() : ... |
// BOOTCAMP (SINGLE) LINKED LIST I CODING
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Buat terlebih dahulu struct-nya
/*
struct Node
{
char name[255];
int score;
};
*/
// kalau kita ingin menjadikan Linked List, kita tinggal menambahkan satu baris di Struct, yaitu pointer. Selain itu, kita j... |
#include<iostream>
using namespace std;
class complex
{
float x,y;
public:
complex(){}
complex(float i,float j)
{ x=i; y=j; }
complex sum(complex,complex);
friend void show(complex);
};
complex complex:: sum(complex c1,complex c2)
{
c... |
#pragma once
namespace GraphicsEngine
{
class RasterizerState
{
public:
RasterizerState();
RasterizerState(ID3D11Device* d3dDevice, const D3D11_RASTERIZER_DESC& rasterizerDesc);
void Initialize(ID3D11Device* d3dDevice, const D3D11_RASTERIZER_DESC& rasterizerDesc);
void Reset();
void Set(ID3D11DeviceCon... |
#include "project.hpp"
#include "member.hpp"
Project::Project(QObject *parent)
: QObject(parent), XTableModel<Project>()
{
m_guid = 0;
}
Project::Project(const QString &name, const QString &description, QObject *parent)
: QObject(parent), XTableModel<Project>()
{
m_name = name;
m_description = des... |
#include "RakPeerInterface.h"
#include "RakSleep.h"
#include <stdio.h>
#include <stdlib.h>
#include "RakNetworkFactory.h"
#include <string.h>
#include "Kbhit.h"
#include "MessageIdentifiers.h"
#include "BitStream.h"
#include "RakSleep.h"
#include "NatTypeDetectionServer.h"
#include "NatTypeDetectionClient.h"... |
class Solution {
public:
vector<string> summaryRanges(vector<int>& nums) {
if(nums.empty()) return vector<string>{};
vector<string> res;
if(nums.size() == 1)
{
res.push_back(to_string(nums[0]));
return res;
}
int start = nums[0];
int fi... |
#include <bits/stdc++.h>
#include <cassert>
#define rep(i, N) for (int i = 0; i < (N); ++i)
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep3(i, a, b) for (ll i = a; i >= b; --i)
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(c) begin(c), end(c)
#define ok() put... |
#include <algorithm>
#include <array>
#include <cstdio>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define ll long long
using namespace std;
typedef tuple<ll, ll, ll> tp;
typedef pair<ll, ll> pr;
const l... |
#include <cstring>
#include <fstream>
#include <iostream>
#include "attacks.h"
#include "bitboard.h"
#include "log.h"
#include "move.h"
#include "position.h"
#include "uci.h"
using apollo::Bitboard;
using apollo::Move;
using apollo::Position;
using apollo::Square;
using apollo::UciServer;
const char* kUsage =
R"... |
#include <iostream>
#include <string>
#include "PGameContainer.h"
using namespace GameContainer;
using std::cout;
using std::cin;
using std::endl;
using std::string;
int main()
{
int option;
PGameContainer theCont;
string filename;
cout << "Welcome to the PGameContainer test program! What would you... |
// *****************************************************************
// This file is part of the CYBERMED Libraries
//
// Copyright (C) 2011 LabTEVE (http://www.de.ufpb.br/~labteve),
// Federal University of Paraiba.
// All rights reserved.
//
// This program is free software; you can redistribute it and/or
// modify i... |
/*
* grid_map_example_node.cpp
*
* Created on: Nov 4, 2014
* Author: Péter Fankhauser
* Institute: ETH Zurich, Autonomous Systems Lab
*/
#include <ros/ros.h>
#include "grid_map_example/GridMapExample.hpp"
int main(int argc, char** argv)
{
ros::init(argc, argv, "grid_map_example");
ros::NodeHandle n... |
#ifndef ARRAY_H
#define ARRAY_H
#include<array>
template<typename Type>
class Array
{
friend ostream &operator<<(ostream &, const Array &);
friend istream &operator>>(istream &, Array &);
public:
Array();
Array(int);
~Array();
const Array $operator=(const Array &);
Array& operator=(const Array &arg)
{
if (t... |
#include "aulibdefs.h"
#include "auplcsetup.h"
#include <QFile>
#include <QRegExp>
#include <QSettings>
#include <QGridLayout>
#include <QVBoxLayout>
#include <QLabel>
#include <QComboBox>
#include <QMessageBox>
#include <QNetworkInterface>
#define OFF -1 // виключено, обмін даними в буль-якому вигляді відсутній
#de... |
#include <iostream>
#include <vector>
#include <iterator>
int main()
{
std::vector<int> ivec;
std::cout << "Please input 10 integers:";
for (int i = 0; i < 10; ++i)
{
int tmp;
while (!(std::cin >> tmp))
{
std::cin.clear();
while(std::cin.get() != '\n')
continue;
std::cout << "illegal input, r... |
//===- HexagonMCChecker.h - Instruction bundle checking ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include <bits/stdc++.h>
using namespace std;
int solve(vector<int> satisfaction)
{
sort(satisfaction.begin(), satisfaction.end());
int ans = 0;
for (int i = 1; i <= satisfaction.size(); i++)
ans += i * satisfaction[i - 1];
for (int i = 1; i <= satisfaction.size(); i++)
{
int temp =... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/StaticMeshComponent.h"
#include "TankTurret.generated.h"
/**
*
*/
UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class BATTLETANKS_API UTankTurret : public... |
#ifndef TRIANGLEMESH_H
#define TRIANGLEMESH_H
#include "Shape.h"
#include "Math/Vector2.h"
namespace tinyxml2
{
class XMLElement;
}
class Triangle;
class TriangleMesh : public Shape
{
DECLARE_DYNAMIC_CREATE_DERIVED( TriangleMesh , Shape )
public:
TriangleMesh();
~TriangleMesh();
public:
void Deserialization... |
#include "car.h"
#include <iostream>
#include <vector>
//int main(void) {
//
// Car *Cars[10];
//
// for (int i = 0; i < 10; ++i) {
// Cars[i] = new Car(i);
// }
//
// for (int i = 0; i < 10; ++i) {
// Cars[i]->Resume();
// }
//
// for (int i = 0; i < 10; ++i) {
// Cars[i]->WaitForThread();
// }
//
// for (int i =... |
#include "stdafx.h"
#include "data/rawcollection.h"
#include "data/rawrecord.h"
namespace data
{
//////////////////////////////////////////////////////////////////////////
class raw_record_t : public raw_record
{
public:
raw_record_t(const raw_info &inf);
void receive_data(
char *data, const char *s... |
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <vector>
using namespace std;
int a[101][101], mark[101], an[101];
int n, m, ans, cnt, t;
void search (int now) {
if (now > n) {
if (cnt <= ans) return;
ans = cnt;
memset (an, 0... |
#include "Graphs.h"
#include <imgui/imgui.h>
#include <imgui/imguiExtended.h>
#include <sstream>
#include <cstring>
namespace solar
{
namespace
{
const char* newGraphPopUp = "NewGraph##PopUp";
const size_t noneSelected = SIZE_MAX;
const float comboOffset = 200.0f;
const Unit origin {Vec3d(),Vec3d(),1.0,"<Or... |
#include "pch.h"
#include "DBControl.h"
DBControl::DBControl()
{
mDSN = L"MS Access Database";
mConnString = L"ODBC;DRIVER=Microsoft Access Driver (*.mdb, *.accdb); DBQ=.\\Data.accdb";
}
bool DBControl::OpenConnection()
{
if (!db.Open(mDSN, FALSE, FALSE, mConnString))
{
AfxMessageBox(L"Ошибка открытия БД", MB_I... |
/**********************************************************
* License: The MIT License
* https://www.github.com/doc97/TxtAdv/blob/master/LICENSE
**********************************************************/
#pragma once
#include <string>
#include <vector>
#include "LambdaResponseHandler.h"
namespace txt
{
/* Class: R... |
#pragma once
namespace Utility
{
struct Vec2
{
float x;
float y;
};
struct Vertex
{
char data;
Vec2 position;
bool visited;
};
} |
/*
Sensing the Temperature with the LM35
Authors: Andrea Lizzi, Edoardo Scalafiotti edoardo.s@daviom.com
This script will output the sensed temperature of the LM35 from 20 to 32°C .
*/
const int sensorPin = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorVal = analogRead(sensorPin);
flo... |
#include <bits/stdc++.h>
using namespace std;
list<pair<int, int> > *graph;
int main()
{
bool f = 1;
int n, m;
cin>>n>>m;
graph = new list<pair<int, int> >[n];
while(m--)
{
int u, v;
cin>>u>>v;
u--;
v--;
graph[u].push_back(make_pair(v, 1));
graph[v].push_back(make_pair(u, 1));
}
for(int i=0; i<n;... |
#include "VirtualProxy.h"
#include "RealSubject.h"
#include <iostream>
VirtualProxy::VirtualProxy(std::shared_ptr<Subject> subject)
{
m_subject = subject;
}
std::string VirtualProxy::actionA()
{
std::cout << "[VirtualProxy] actionA doing" << std::endl;
return m_subject->actionA();
}
std::string Virtual... |
/********************************************************
* *
* Name: 조성룡 *
* Student ID : 20123417 *
* Program ID : Lab#1_2 *
* Description: 데이터 파일에서 한 단어씩 읽고 *
* 단어의 개수를 출력하는 프로그램 *
* Algorithm : 배열을 초기화 한 후(NULL값)으로 데이터를 *
* 배열에 저장, 저장된 배열에서 단어의 수를 *
* Countin... |
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#include "./button.hpp"
#include <algorithm>
#include <iostream>
#include <memory>
namespace ftxui {
void Button::set_content(Element val) { content = std::move... |
#pragma once
#define INVALID_INDEX -1
class BGGraphEdge
{
BGGraphEdge(int from, int to, double cost = 1.0) : m_dCost(cost), m_iFrom(from), m_iTo(to) {}
BGGraphEdge() : m_dCost(1.0), m_iFrom(INVALID_INDEX), m_iTo(INVALID_INDEX) {}
virtual ~BGGraphEdge() {}
int From()const { return m_iFrom; }
void SetFrom(int... |
//
// Created by vybirto1 on 15.3.18.
//
#include "CSDLColor.h"
CSDLColor::CSDLColor(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a) : r(r), g(g), b(b), a(a) {}
uint8_t CSDLColor::getR() const {
return r;
}
uint8_t CSDLColor::getG() const {
return g;
}
uint8_t CSDLColor::getB() const {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.