text stringlengths 8 6.88M |
|---|
/*
Bullet Continuous Collision Detection and Physics Library Maya Plugin
Copyright (c) 2008 Walt Disney Studios
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising
from the use of this software.
Permission is granted to... |
#ifndef INEXOR_RPC_MCRPCSERVER_HEADER
#define INEXOR_RPC_MCRPCSERVER_HEADER
#include <google/protobuf/service.h>
#include <google/protobuf/descriptor.h>
#include <cstdbool>
#include <cstddef>
#include <cstdint>
#include "net/MessageConnect.h"
namespace inexor {
namespace rpc {
/**
* Rpc Server backed by a Mes... |
/*********************************************************************
Matt Marchant 2014 - 2016
http://trederia.blogspot.com
xygine - Zlib license.
This software is provided 'as-is', without any express or
implied warranty. In no event will the authors be held
liable for any damages arising from the use of this soft... |
#pragma once
#include <QObject>
class Integ : public QObject
{
Q_OBJECT
public:
Integ(QObject *parent);
~Integ();
};
|
#ifndef TREE_HPP
#define TREE_HPP
#define USTEMP template<typename T>
#include "node.hpp"
//fournir les operateurs [], =, ==, <, >, <=, >=, parcourir les noeud
//Classe template a semantique de valeur qui represente un arbre
template<typename T>
class BasicTree
{
public:
BasicTree()
{
}//Le constructeur s... |
// -*- C++ -*-
//
// Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory,
// Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC
//
// This file is part of FreePOOMA.
//
// FreePOOMA is free software; you can redistribute it and/or modify it
// under the terms of the Expat license.
//
// This progr... |
#ifndef LOGREADER_H
#define LOGREADER_H
#include <QThread>
#include <QDateTime>
#include <QFile>
#include <QByteArray>
#include <QSharedPointer>
#include "Globals.h"
#include HTTP_MULTI_PART_INCLUDE
#include "Network/NetworkSender.h"
#include "Log/LogFragment.h"
class HTTP_MULTI_PART_USED;
class LogReader : public ... |
#ifndef FFMPEG_DEMUX_H_
#define FFMPEG_DEMUX_H_
class SavedData; // forward
class FFmpegDemuxedElementaryStream;
class AVBitStreamFilterContext;
struct AVPacket;
#define boolean Boolean
class FFmpegDemux: public Medium {
public:
static FFmpegDemux* CreateNew(UsageEnvironment& env, char const* filename,
... |
/*
Copyright (c) 2019 Stefan Kremser
This software is licensed under the MIT License. See the license file for details.
Source: github.com/spacehuhn/SimpleCLI
*/
#include "arg.h"
#include <stdlib.h> // malloc()
#include <string.h> // memcpy()
#include "comparator.h" // compare
// ===== Arg ==... |
/**
*
* @file B3MSC1170A.hpp
* @authors Yasuo Hayashibara
* Naoki Takahashi
*
**/
#pragma once
#include "SerialServoMotor.hpp"
namespace IO {
namespace Device {
namespace Actuator {
namespace ServoMotor {
class B3MSC1170A final : public SerialServoMotor {
public :
B3MSC1170A(Robo... |
#include <bits/stdc++.h>
using namespace std;
int n;
bool a[100];
void show() {
for(int i = 1; i<=n;++i){
if(a[i])
cout << i;
}
cout << endl;
}
void recurse(int u){
if (u == n+1){
show();
return;
}
a[u] = 0;
recurse(u + 1);
a[u] = 1;
recurse(u +... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "../base.h"
#include "Windows.Security.Authentication.Identity.0.h"
#include "Windows.Foundation.1.h"
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Security::Authentication:... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <set>
#include <algorithm>
using namespace std;
int main() {
set<int> s;
int n, a;
long long int b;
cin >> n;
for(int i=0; i<n; i++) {
cin >> a;
cin >> b;
switch(a) {
... |
#include "reqcompilemacro.h"
using std::unique_ptr;
using std::string;
#include <llvm/IR/Module.h>
using namespace llvm;
#include "defconstint.h"
ReqCompileMacro::ReqCompileMacro(const string& name)
:ReqCompile(name), snippet_name(snippet_prefix + name)
{
}
void ReqCompileMacro::addCodeTo(string &code) const
{
... |
/****************************************************************************
**
** Copyright (C) 2009 Du Hui.
**
****************************************************************************/
#include "qwinserialcomm.h"
bool WinSerialComm::SetPortSettings(const PORTSETTINGS* portSettings)
{
if ( !IsO... |
#include <iostream>
#include "connnode_loginsrv.h"
#include "../scomm/msgid.h"
ConnNodeLoginSrv::ConnNodeLoginSrv():PassiveConnNodeBase() {
}
ConnNodeLoginSrv::~ConnNodeLoginSrv() {
}
ConnNodeLoginSrv& ConnNodeLoginSrv::operator=(const ConnNodeLoginSrv&)
{
return *this;
}
int ConnNodeLoginSrv::DispatchMsg(MsgH... |
#ifndef ENVIRONMENT_H_
#define ENVIRONMENT_H_
#include "Files.h"
#include "Commands.h"
#include <string>
#include <vector>
using namespace std;
class Environment {
private:
vector<BaseCommand*> commandsHistory;
FileSystem fs;
public:
Environment();
void start();
FileSystem& getFileSystem(); // ... |
#include<bits/stdc++.h>
using namespace std;
int findceil(vector<int>& arr,int index,int n)
{
int min_index = index+1;
int min_value = arr[index+1];
for(int i=index+1;i<n;i++)
{
if(arr[i] > arr[index])
{
if(arr[i] < min_value)
{
min_value = arr[i];
min_index = i;
}
}
}
return min_index;
}
... |
#pragma once
#include <memory>
#include "CIL/defs.h"
#include "CIL/io/bitstream.h"
#include "CIL/mat/mat.h"
namespace cil {
class BaseImageDecoder;
class BaseImageEncoder;
typedef std::shared_ptr<BaseImageEncoder> ImageEncoder;
typedef std::shared_ptr<BaseImageDecoder> ImageDecoder;
///////////////////////////////... |
#include"syscall.h"
/* Address space control operations: Exit, Exec, and Join */
/* This user program is done (status = 0 means exited normally). */
void Exit(int status)
{
printf("stub exit\n");
}
/* Run the executable, stored in the Nachos file "name", and return the
* address space identifier
*/
SpaceId Exe... |
/*************************************************************
Author : qmeng
MailTo : qmeng1128@163.com
QQ : 1163306125
Blog : http://blog.csdn.net/Mq_Go/
Create : 2018-03-17 17:53:09
Version: 1.0
**************************************************************/
#include <cstdio>
#include <iostream>
#include <set... |
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <set>
#include <stack>
#include <sstream>
#include <string>
using namespace std;
struct TreeNode
{
int val;
TreeNode* left;
Tr... |
#include "PersonalInformation.h"
PersonalInformation::PersonalInformation(string filepath)
{
InitFromFile(filepath);
Check();
}
PersonalInformation::~PersonalInformation()
{
}
int PersonalInformation::GetHeroNumber()
{
return heroexperience.size();
}
int PersonalInformation::GetOneHeroExperience(int heroInd... |
/*
* apds9960.h
*
* Created on: Jan 8, 2021
* Author: ap7u5
*/
#ifndef SRC_APDS9960_H_
#define SRC_APDS9960_H_
#include <cstdint>
#include "apds9960_enum.h"
template <int (*i2c_write)(uint8_t* buf, uint32_t len), int (*i2c_read)(uint8_t* buf, uint32_t len)>
class APDS9960 {
private:
uint8_t readBuffer[1... |
#include<bits/stdc++.h>
using namespace std;
int main() { long long m,n,i,k,ans,l; while(cin>>m>>n) { ans=0; for( i=1;i<=m;i++) {ans+=(n+(i%5) )/5;} cout<<ans<<endl; }}
|
/*!
* \file KaiXinApp_Repaste_Vote.cpp
* \author huxianxiang@GoZone
* \date 2010-10-6
* \brief 解析与UI: 转贴的评论投票
*
* \ref CopyRight
* =======================================================================<br>
* Copyright ? 2010-2012 GOZONE <br>
* All Rights Reserved.<br>
* The file is gener... |
#include <bits/stdc++.h>
using namespace std;
// Complete the repeatedString function below.
long repeatedString(string s, long n) {
// compute how many a's do we have in the string s
int a_count = 0 ;
long long int a_total = 0 ;
for (int i=0; i<s.length(); i++)
{
if (s[i] == 'a')
... |
// A mixed, flexible variable data type (plain ol' data - POD) with all-public data access.
// (C) 2016 CubicleSoft. All Rights Reserved.
#ifndef CUBICLESOFT_STATIC_MIXED_VAR
#define CUBICLESOFT_STATIC_MIXED_VAR
#include <cstdint>
#include <cstddef>
#include <cstring>
namespace CubicleSoft
{
enum StaticMixedVarMod... |
//**************************************************************************
//**
//** See jlquake.txt for copyright info.
//**
//** 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 ... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n;
cin>>n;
vector<pair<int , string>> c;
for(int i=0;i<n;i++){
int a;
cin>>a;
string b;
getline(cin,b);
c.push_back(make_pair(a,b... |
#pragma once
#include "boundingsphere.h"
namespace LM {
class Plane
{
private:
const glm::vec3 m_Normal;
const float m_Distance;
public:
Plane(const glm::vec3& normal, float distance) :
m_Normal(normal),
m_Distance(distance) {}
Plane Normolized() const;
IntersectData IntersectSphere(const Bound... |
//@@author A0112218W
#include "Command_Sort.h"
SortCommand::SortCommand(Sort_Type type) : Command (CommandTokens::PrimaryCommandType::Sort){
_newSortType = type;
}
UIFeedback SortCommand::execute(RunTimeStorage* runTimeStorage) {
checkIsValidForExecute(runTimeStorage);
_oldSortType = runTimeStorage->getSortType()... |
#include "CGraphics.h"
CGraphics::CGraphics()
{
}
CGraphics::~CGraphics()
{
}
void CGraphics::M_RenderGame(void)
{
static double anim = 0.0;
anim += 0.05;
V_CrazyParam += 0.05;
//render map
double gsize = V_PEngine->V_Grid_Size;
auto s = V_PEngine->V_Map.size;
for (int i = 0; i < s[0]; i++)
{
for (int j... |
#ifndef __GEOMETRYVIEWDATA_H__
#define __GEOMETRYVIEWDATA_H__
#include <QList>
#include <QHash>
#include <Standard_Handle.hxx>
#include "moduleBase/ModuleType.h"
class vtkPolyData;
class TopoDS_TShape;
class QColor;
class vtkPoints;
class vtkCell;
class vtkCellArray;
class vtkKdTree;
namespace Geometry
{
class Geo... |
//
// scenes.h
// led_matrix
//
// Created by Alex on 16.11.15.
//
//
#ifndef scenes_h
#define scenes_h
#include "ofMain.h"
#include "utils.h"
#include "ofxAnimatableFloat.h"
class scene {
ofxAnimatableFloat fader;
public:
ofxAnimatableFloat pulse;
ofColor pixelMatrix[10][10];
virtual ... |
/*
* 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 "funcs.hh"
namespace Analysis {
//PLAN: get rid of "match_position". Pass two vectors instead, and have a third & fourth which are written to with the matches (tomatch & candidate). If size != 0, we have matches.
//another consideration: need to be able to remove jets from the "candidates" vector after t... |
/****************************************************************************
** Meta object code from reading C++ file 'qtmaterialcircularprogress_internal.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.1)
**
** WARNING! All changes made in this file will be lost!
********************************... |
/*
* PropellingMagnet.cpp
*
* Created on: Feb 12, 2012
* Author: wjones
*/
#include "MagneticFieldComponents/PropellingMagnet.h"
#include "GeometricComponents/CoordinateUtilities.h"
namespace CoordinateComponents
{
template<typename T>
PropellingMagnet<T>::PropellingMagnet()
{
// TODO Auto-generated cons... |
#include <iostream>
#include <string>
//using namespace std;
/**
* @brief Shows how to define and use a string object
*
* We will define string variables and then see what operators and
* functions work with these variables.
*
* @return int 0 means function exited with success
*/
int main()
{
// create a v... |
#ifndef IMAGEFACTORY_H
#define IMAGEFACTORY_H
#include "notefactory.h"
#include "image.h"
class NotesManager;
/*!
* \file imagefactory.h
* \brief Classe ImageFactory permettant de construire une note de type Image
* \author Pauline Cuche/Simon Robain
*/
/**
*\class ImageFactory
* \brief Classe permettant d'inst... |
bool isPalindrome(Node *head)
{
Node *slow=head,*fast=head,*prev=NULL,*nxt=NULL;
bool ans=true;
if(!head)
return !ans;
while(fast->next and fast->next->next)
{
fast=fast->next->next;
nxt=slow->next; // reversing the first half link list
slow->next=prev;
pr... |
#include "ExtendedHttpMultiPart.h"
#include <QSharedPointer>
#include <QFile>
#include <QDateTime>
#include "Debug/DebugMacros.h"
ExtendedHttpMultiPart::ExtendedHttpMultiPart(QObject *parent) :
QHttpMultiPart(parent)
{
}
ExtendedHttpMultiPart::ExtendedHttpMultiPart(ContentType contentType, QObject *parent) :
QHtt... |
#include "dialog.h"
#include "ui_dialog.h"
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
QGraphicsScene *scene = new QGraphicsScene;
ui->setupUi(this);
ui->graphicsView->setScene(scene);
mycolor = QColor::fromRgb(rand()%255,rand()%255,rand()%255);
myfont.setIta... |
#include "App.hpp"
void App::addShape(App::Shape* shape) {
shapes.push_back(shape);
return;
}
void App::addShapes(App::ShapePoints shapePoints) {
short size = shapePoints.size();
this->shapes.resize(size);
for (int i = 0; i < size; i++)
shapes.at(i) = shapePoints.at(i);
return;
}
App:... |
#include "signedindialog.h"
#include "ui_signedindialog.h"
#include "mainwindow.h"
#include <QDebug>
#include <QMessageBox>
#include <QTableView>
#include <QSqlTableModel>
#include <QtGui>
#include <QGridLayout>
SignedInDialog::SignedInDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SignedInDialog)
{
... |
#include "DebugUI.h"
#include <imgui.h>
#include "imgui_impl_vulkan.h"
#include "imgui_impl_glfw.h"
#include "VulkanWrapper/VulkanDevice.h"
#include "VulkanWrapper/Window.h"
#include "VulkanWrapper/VulkanHelpers.h"
#include "VulkanWrapper/VulkanSwapchain.h"
#include "VulkanWrapper/RenderPass.h"
#include "VulkanWrapper/... |
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
char change_case(char c)
{
if(int(c) >=65 && int(c) <=90)
c = tolower(c);
else c = toupper(c);
return c;
}
int main()
{
string input;
string output;
getline(cin,input);
output = input;
int i = 1;
for( ; i<input.length... |
#include "WindowsOpenGlWindow.h"
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <assert.h>
#include "Common/Macros.h"
#include "Messenger/Messenger.h"
#include "Windows Input/WindowsInputMessage.h"
#include "Messenger/TypedMessage.h"
#include "Window/WindowImplementation.h"
CWindowsOpenGlWindow* ... |
//**************************************************************************
//**
//** See jlquake.txt for copyright info.
//**
//** 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 ... |
/*
* test_suite.h
*
* Created on: Oct 16, 2013
* Author: vbonnici
*/
#ifndef TEST_SUITE_H_
#define TEST_SUITE_H_
/*
* a set of functions for binomial tests, or other distribution
*/
//#define DEBUG_TEST_SUITE_H_
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <v... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "Windows.Graphics.Printing.2.h"
WINRT_EXPORT namespace winrt {
namespace Windows::Graphics::Printing {
template <typename H> struct impl_PrintTaskSourceRequestedHandler : implements... |
#include "../CWE/CWELib.h"
#include "Game.h"
#include "Information.h"
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
CoInitializeEx(NULL, COINIT_MULTITHREADED);
// 基礎処理機構の初期化
#if defined(_DEBUG) || defined(DEBUG)
const bool initalized =CWE::Init(1920, 1080, true, L"Rapid Cross");
#else
const bool inita... |
/**
* @file Animating.h
*/
#pragma once
namespace liman {
class Animating {
bool animationUp = false;
float animation1 = 0.0;
int animationType;
};
} |
#include "Board.hpp"
#include "City.hpp"
#include "Player.hpp"
#include "Scientist.hpp"
#include <array>
using namespace pandemic;
const int MAX_CARDS =48;
const int five = 5;
const int four = 4;
Scientist::Scientist(Board &board, enum City a, int toThrow1){
CurrentCity = a;
theBorad = &board;
t... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll func(vector<ll>&a,ll i,ll n,ll m,ll prev,vector<vector<ll>>&dp, ll mod){
if(i==n) return 1;
if(dp[i][prev]!=-1) return dp[i][prev]%mod;
if(i==0 && a[i]==0){
ll ans=0;
for(ll j=1;j<=m;j++)
ans+=(func(a,i+1,n,m,j,dp,mod)%mod);
return dp[... |
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#include <gtest/gtest.h>
#include "jactorioTests.h"
namespace jactorio::proto
{
class AssemblyMachineTest : public testing::Test
{
protected:
game::World world_;
game::Logic logic_;
... |
#ifndef MAJORLEAGUESTADIUMS_H
#define MAJORLEAGUESTADIUMS_H
#include <QDialog>
namespace Ui {
class majorleaguestadiums;
}
class majorleaguestadiums : public QDialog
{
Q_OBJECT
public:
explicit majorleaguestadiums(QWidget *parent = 0);
~majorleaguestadiums();
private slots:
void on_pushButton_click... |
#ifndef QT_CLIENT_H
#define QT_CLIENT_H
#include <service_api/serviceapi.h>
class QTClient
{
public:
static int
execute(int argc, char *argv[], ServiceAPI* service_api);
};
#endif // QT_CLIENT_H
|
#define _CRT_SECURE_NO_WARNINGS
//벡터와 스칼라 곱
#include <cstdio>
#include <cstring>
//3차원 벡터
class Vector3 {
public:
float X;
float Y;
float Z;
Vector3() {
X = 0.0f;
Y = 0.0f;
Z = 0.0f;
}
Vector3(float x, float y, float z) {
this->X = x;
this->Y = y;
this->Z = z;
}
void printInfo(float x, float ... |
#include "itkImage.h"
#include <itkImageFileReader.h>
#include <itkExtractImageFilter.h>
#include "itkImageFileWriter.h"
#include "itkImageRegionIteratorWithIndex.h"
#include "itkIndex.h"
#include "OptionParser.h"
optparse::OptionParser buildParser()
{
const std::string usage = "%prog [OPTION]";
const std::s... |
#include "graphics\Singularity.Graphics.h"
namespace Singularity
{
namespace Graphics
{
class OctTreeRenderGraph : public Singularity::Graphics::IRenderGraph
{
private:
#pragma region Variables
struct OctNode
{
#pragma region Variables
OctNode* Parent;
OctNode* Childre... |
#include "CircleLayer.h"
#include "P002Catcher.h"
CircleLayer* CircleLayer::create(WJLayerJson *layer, bool usingSke, PBase *parent)
{
CircleLayer* deco = new (std::nothrow) CircleLayer();
if (deco && deco->init(layer, usingSke, parent))
{
deco->autorelease();
return deco;
}
CC_SAFE_DELETE(deco);
return NU... |
#include "SystemSetting.h"
#include "CommonStructEnum.h"
using namespace System;
using namespace Newtonsoft::Json;
using namespace Newtonsoft::Json::Converters;
using namespace System::IO;
SystemSetting::SystemSetting()
{
SystemParameters^ sysPara = gcnew SystemParameters();
configPath = AppDomain::CurrentDomain->Ba... |
vector<int> spirallyTraverse(vector<vector<int> > matrix, int r, int c)
{
// code here
vector<int> v;
int r1=0,c1=0;
r--;c--;
while(r1<=r && c1<=c)
{
func(matrix,r1,r,c1,c,v);
r1++;
c1++;
r--;c--;
}
retu... |
#ifndef UIABOUT_H
#define UIABOUT_H
//
#include <QDialog>
#include "ui_about.h"
//
class UIAbout : public QDialog, public Ui::aboutDialog
{
Q_OBJECT
public:
UIAbout( QWidget * parent = 0, Qt::WFlags f = 0 );
private slots:
};
#endif
|
#ifndef Map_hpp
#define Map_hpp
#include <stdint.h>
#include <vector>
class Map {
public:
Map(std::vector<uint8_t> snes_vram) : vram(snes_vram) {};
std::vector<uint16_t> ics_map();
private:
std::vector<uint8_t> vram;
};
#endif /* Map_hpp */
|
#include "chat_window.h"
#include "ui_chat_window.h"
#include <QMessageBox>
#include <QThread>
#include <QtDebug>
#include <regex>
Chat_Window::Chat_Window(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Chat_Window)
{
ui->setupUi(this);
buff=new char[SIZE];
buffer=new char[SIZE];
... |
/* format.cpp -*- C++ -*-
Rémi Attab (remi.attab@gmail.com), 14 Apr 2015
FreeBSD-style copyright and disclaimer apply
*/
namespace reflect {
namespace json {
/******************************************************************************/
/* FORMATTER ... |
/**
* VisitorNewOP2.cpp
* Concrete Visitor class
**/
#include <iostream>
#include <stdlib.h>
#include "VisitorNewOP2.h"
using namespace std;
void VisitorNewOP2::visitMyInt(MyInt *myInt)
{
cout << myInt->m_a / myInt->m_b << endl;
}
void VisitorNewOP2::visitMyDouble(MyDouble *myDouble)
{
cout << myDouble->m_a / my... |
#include "explosion.hpp"
void Explosion::update(float dt){
spawnTime -= dt;
checkExplosion();
}
void Explosion::checkExplosion() {
if (spawnTime <= 0)
myScene->storeRemovedEntity(this);
}; |
#pragma once
#include "IRDefine.h"
class StatisticInfo
{
private:
char m_filename[MAX_FILENAME_LEN];
public:
StatisticInfo();
StatisticInfo(char *filename);
~StatisticInfo(){}
bool write(void *key, int key_len, void *value, int value_len);
bool write(const char *key, char *value);
bool read(void *key, i... |
#pragma once
#include "TDataTypes.h"
enum EClassType {
CLASS_Abstract,
};
#define DECLARE_CONSTRUCTOR_CLASS_Abstract(ClassName) \
class UClassConstructor_##ClassName : public AClassConstructor \
{ \
public: \
AObject* Construct() ... |
#pragma once
#include "Mele.h"
/** Class that derives from Mele. It has special abilites for sword.*/
class Sword :
public Mele
{
public:
/*Constructor for Sword*/
Sword();
/*Destructor for Sword*/
~Sword();
/*The method returns the unit type as the first character of the unit name*/
char type_of_unit();
};
|
/*************************************************************************
> File Name: 41-45.cpp
> Author: wk
> Mail: 18402927708@163.com
> Created Time: Wed 24 Aug 2016 12:17:49 PM CST
************************************************************************/
#include<iostream>
#include<vector>
#include<string.h... |
#pragma once
#include <SFML/Graphics.hpp>
#include "macro.h"
class Bonus {
public:
Bonus(sf::Texture* texture, int xx, int yy, int type);
sf::Sprite& getSprite();
private:
int x_;
int y_;
int type_;
sf::Sprite sprite_;
}; |
#ifndef ADDACE_H
#define ADDACE_H
#include <QDialog>
namespace Ui {
class AddAce;
}
class AddAce : public QDialog
{
Q_OBJECT
public:
explicit AddAce(QWidget *parent = nullptr);
~AddAce();
private:
Ui::AddAce *ui;
};
#endif // ADDACE_H
|
//
// Recorder - a GPS logger app for Windows Mobile
// Copyright (C) 2006-2019 Michael Fink
//
/// \file Logger.cpp Logger implementation
//
#include "StdAfx.h"
#include "Logger.hpp"
void LogDebug(LPCTSTR msg, LPCTSTR category)
{
CString text;
text.Format(_T("[%s] %s\n"), category, msg);
OutputDebugString(t... |
// *****************************************************************
// This file is part of the CYBERMED Libraries
//
// Copyright (C) 2007 LabTEVE (http://www.de.ufpb.br/~labteve),
// Federal University of Paraiba and University of São Paulo.
// All rights reserved.
//
// This program is free software; you can redist... |
class Solution {
public:
int firstUniqChar(string s) {
vector<int> count(26,0);
for(auto ch:s)
{
count[ch-'a']++;
}
for(int i=0; i < s.length(); i++)
{
if(count[s[i]-'a'] == 1) return i;
}
return -1;
}
}; |
#include "drake/multibody/multibody_tree/weld_mobilizer.h"
#include <gtest/gtest.h>
#include "drake/common/eigen_types.h"
#include "drake/common/test_utilities/eigen_matrix_compare.h"
#include "drake/multibody/multibody_tree/multibody_tree.h"
#include "drake/multibody/multibody_tree/multibody_tree_system.h"
#include ... |
#ifndef MAIN_DATA_STORAGE_H_
#define MAIN_DATA_STORAGE_H_
class DataStorage {
public:
double pitch;
double roll;
double heading;
double vsi;
double qnh;
int altitude;
int airspeed;
int ground_speed;
int desired_altitude;
int desired_heading;
};
#endif // MAIN_DATA_STORAGE_H_... |
#pragma once
#include <list>
#include <map>
#include <set>
#include "InputConstants.h"
#include "InputContext.h"
#include "InputFetcher.h"
// for organizing InputContexts in a set
struct PriorityInputContext {
InputContext* context;
int priority;
PriorityInputContext(InputContext* context = nullptr, int pri... |
/*
* masterhttpconnector.h
*
* Created on: 2015年5月3日
* Author: root
*/
#ifndef MASTERHTTPCONNECTOR_H_
#define MASTERHTTPCONNECTOR_H_
#include"AbstractMasterConnector.h"
#include<cstdint>
#include<list>
// @param maxim connection number
#define MAX_CONN_NUM 1024
#define INET_IPV4
#ifdef INET_IPV4
#define... |
int Solution::searchInsert(vector<int> &a, int k) {
int n=a.size();
int l=0,h=n-1;
int ans=0;
while(h>=l)
{
int m=l+(h-l)/2;
if(a[m]==k)
return m;
if(a[m]>k)
h=m-1;
else
{
l=m+1;
ans=m+1;
}
}
ret... |
/*
* Copyright 2013 Maciej Poleski
*/
#ifndef BUILTINNAMETOTIMETRANSLATOR_H
#define BUILTINNAMETOTIMETRANSLATOR_H
#include "INameToTimeTranslator.hxx"
class BuiltinNameToTimeTranslator : public INameToTimeTranslator
{
public:
virtual std::tuple< uint_fast16_t, uint_fast16_t >
timeFromName(const std::strin... |
#include <bits/stdc++.h>
#include "Test.h"
using namespace std;
Test::Test(){}
Test::Test(string person_name,int test_number,int questions_count, vector <int> points){
this->person_name=person_name;
this->test_number=test_number;
this->questions_count=questions_count;
this->points=points;
}... |
#include <elevation_mapping/elevation_mapping.h>
namespace elevation_mapping
{
ElevationMapping::ElevationMapping(ros::NodeHandle nh) :
nh_(nh),
frame_count_(0)
{
}
ElevationMapping::~ElevationMapping()
{
}
void
ElevationMapping::init()
{
ros::NodeHandle private_nh("~");
get_octomap_client_ = nh... |
#include <Wire.h>
#include <Servo.h>
int valRead;
Servo servo;
int pos = 0; // variable to store the servo position
int incomingByte = 0; // for incoming serial data
bool shouldOpenDoor = false;
bool shouldCloseDoor = false;
void setup() {
Wire.begin(0x8);
Wire.onReceive(receiveEvent);
Serial.begin(9600)... |
/**
* $Source: /backup/cvsroot/project/pnids/zdk/zls/zfc/CSingletonFactoryT.hpp,v $
*
* $Date: 2001/11/14 17:25:11 $
*
* $Revision: 1.3 $
*
* $Name: $
*
* $Author: zls $
*
* Copyright(C) since 1998 by Albert Zheng - 郑立松, All Rights Reserved.
*
* lisong.zheng@gmail.com
*
* $State: Exp $
*/
#ifndef _ZL... |
#ifndef TAXONOMY_H
#define TAXONOMY_H
#include <string>
#include <vector>
#include <stack>
struct Node
{
std::string name;
std::vector<Node*> children;
Node(std::string name): name(name) { }
bool isLeaf() const
{
return children.empty();
}
Node* findChild(std::string name) const
... |
#pragma once
#include <string>
class MapAIHitBox
{
public:
MapAIHitBox(float x, float y, float width, float height, std::string event = "", std::string eventaction = "");
~MapAIHitBox();
bool hitdetection(MapAIHitBox tocheck);
float x;
float y;
float width;
float height;
std::string event;
std::string eventA... |
/*****
描述
石头剪子布是一种很简单的游戏:
石头胜剪子
剪子胜布
布胜石头
A和B猜拳,已知他们出拳的序列,编程求出谁胜谁负。
关于输入
第一行是一个正整数n(n<200),表明A和B一共猜了n次拳。
接下来是n行,每行有两个数字,分别表示A和B在这次猜拳中出了什么。0表示石头,1表示剪刀,2表示布。
关于输出
输出一行,"A"表示A胜,"B"表示B胜,"Tie"表示平局。
例子输入
4
1 0
2 2
1 2
2 0
例子输出
A
*****/
#include <iostream>
using namespa... |
/*
Name: Mohit Kishorbhai Sheladiya
Student ID: 117979203
Student Email: mksheladiya@myseneca.ca
Date: 21/02/16
*/
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <istream>
#include <iomanip>
#include <cstring>
#include "Account.h"
using namespace std;
namespace sdds {
void Acco... |
/****************************************************
* RoseBin :: Binary Analysis for ROSE
* Author : tps
* Date : Jul27 07
* Decription : Control flow Analysis
****************************************************/
#ifndef __RoseBin_ControlFlowAnalysis__
#define __RoseBin_ControlFlowAnalysis__
#include "RoseBin... |
class System
{
public:
int getK();
int getRa();
int getRb();
void setK(int tmpK );
void setRa(int tmpRa);
void setRb(int tmpRb);
void calculate(float Sa);
private:
int K;
int Ra,Rb;
};
|
/*
Cell.h
Contains funcitonality for the cell class
Fouad Al-Rijleh, Rachel Rudolph
*/
#pragma once
#include "d_matrix.h"
#include "d_except.h"
#include "Constants.h"
#include <vector>
class Cell
{
private:
vector<int> location;
int value;
public:
void setLocation(int i, int j);
void setLocation(vector<int> ne... |
#include <Wire.h>
void setup()
{
Wire.begin();
Serial.begin(9600);
}
void loop()
{
delay(2000);
int16_t bigNum, smallNum;
byte a,b;
Wire.requestFrom(54,2);
a = Wire.read();
b = Wire.read();
smallNum = a;
bigNum = smallNum << 8 | b;
Serial.print(bi... |
#ifndef NOTEPAD_H
#define NOTEPAD_H
#include <QWidget>
#include <QTextEdit>
#include <QPushButton>
class Notepad : public QWidget {
public:
Notepad();
~Notepad();
// slots, to connect with signals
void open();
void save();
void exit();
private:
QTextEdit* text_edit = new QTextEdit;
QP... |
/* NO WARRANTY
*
* BECAUSE THE PROGRAM IS IN THE PUBLIC DOMAIN, THERE IS NO
* WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
* LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE AUTHORS
* AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
* WARRANTY OF ANY KIND, EITHER E... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.