text stringlengths 8 6.88M |
|---|
#ifndef CBASEDATAVIEW_H
#define CBASEDATAVIEW_H
#include "statviewbase.h"
class CBaseDataView : public CStatViewBase
{
public:
explicit CBaseDataView(QWidget *parent = 0);
virtual ~CBaseDataView();
protected:
QVector <QString> m_vecBoxName;
//virtual bool _getStatDataFromFile(QString statFilePath... |
class Solution {
public:
int lengthOfLongestSubstring(string s) {
int max_length = 0;
int hash[256];
fill_n(hash, 256, -1);
for(int start=0, i=0;i<s.size();i++){
if(hash[s[i]] != -1){
while(start <= hash[s[i]]){
hash[s[start++]... |
#include "stdafx.h"
#include "MenuButton.h"
#include "../GameCursor.h"
MenuButton::~MenuButton()
{
DeleteGO(m_button);
DeleteGO(m_moji);
DeleteGO(m_dummy);
}
bool MenuButton::Start()
{
m_button = NewGO<SpriteRender>(27, "sp");
m_button->Init(L"Assets/sprite/simple_button.dds", 400.0f, 89.6f);
m_dummy = NewGO<S... |
#ifndef IMU_MPU9250_H_
#define IMU_MPU9250_H_
#ifndef __cplusplus
#error "Please define __cplusplus, because this is a c++ based file "
#endif
#include "stm32h7xx_hal.h"
#include <array>
#include <stdint.h>
#include <main.h>
using Vector3d = std::array<int16_t, 3>;
#define SPI_POLLING_MODE 0
#define SPI_DMA_MODE 1
... |
#include "NaivePar.h"
std::string NaivePar::name()
{
return "Naive Algorithm, split range array";
}
int* NaivePar::find(int min, int max, int* size)
{
int arraySize = max - min;
bool* array = new bool[arraySize];
*size = 0;
#pragma omp parallel
{
int localSize = 0;
#pragma omp for schedule(dynamic)
for (i... |
#pragma once
#include "../string_view.hh"
#include <array>
static const std::array<bool, 256> is_dropped = []()
{
std::array<bool, 256> delimiters{false};
const string_view DELIMITERS = " \t.,:;?!\"'[]{}|&*=+-_()#";
for (const auto c: DELIMITERS)
delimiters[c] = true;
return delimiters;
}();
class Toke... |
/* -*- 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.
** psmaas - Patricia Aas
*/
#include "core/pch.h"
#ifdef HISTORY_SU... |
#pragma once
#include "plbase/PluginBase.h"
#pragma pack(push, 4)
class PLUGIN_API CDoor
{
public:
float m_fOpenAngle;
float m_fClosedAngle;
short m_nDirn;
unsigned char m_nAxis;
unsigned char m_nDoorState;
float m_fAngle;
float m_fPrevAngle;
float m_fAngVel;
};
#pragma pack(pop)
VALI... |
/* -*- 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.
*/
#ifndef DBCS_ENCODER_H
#define DBCS_ENCODER_H
#if defined ENCOD... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2005 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#include "core/pch.h"
#ifdef SUPPORT_PROBETOOLS
#include "modul... |
#ifndef SOLDIER_HPP
#define SOLDIER_HPP
class Soldier {
SDL_Point center;
SDL_Rect Pos, TestPos;
Vector2Df Vel;
int frame, anim;
float health;
double rad, deadangle;
bool musflag;
SDL_Rect Clip[4];
SoldierState state;
std::vector<Bullet> bullets;
int x, y;
public:
void Init();
void Update(int mouseX, i... |
/**
* @file messageretriever.cpp
*
* @brief Defines some of the base class functionality for the classes that inhert this class to use.
* @version 0.1
* @date 2021-06-23
*
* @copyright Copyright (c) 2021
*
*/
#include "messageretriever.h"
#include "message.h"
#ifndef MESSAGERETRIEVER_CPP
#d... |
/****************************************************************
* TianGong RenderLab *
* Copyright (c) Gaiyitp9. All rights reserved. *
* This code is licensed under the MIT License (MIT). *
*****************************************************************/
#pragma once
#include <iostream>
void Outp... |
//
// Monitor.cpp
// Odin.MacOSX
//
// Created by Daniel on 16/06/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#include "Monitor.h"
namespace odin
{
namespace io
{
Monitor::Monitor(MonitorHandle* handle):
m_handle(handle)
{
m_isPrimaryMonitor = (m_handle == li... |
#include <string>
#include <vector>
//#include "stdafx.h"
using namespace std;
class TreeNode {
public:
TreeNode();
struct node{
string data;
node* firstchild = NULL;
node* sibling = NULL;
};
node root;
node decl;
node func;
node packages;
node imports;
node* createNode(string val);
void traverse(n... |
#include<bits/stdc++.h>
using namespace std;
char a[6]={'a','a','b','b'};
int main(){
int n;
cin>>n;
int cnt=0;
for(int i=0;i<n;i++){
printf("%c",a[cnt]);
cnt++;
if(cnt==4)
cnt=0;
}
return 0;
}
|
//算法:卡特兰数/递推/dp
//题目要求
//对于一个栈
// 给定的n个数
//计算并输出由操作数序列1,2,…,n,
//经过操作可能得到的输出序列的总数。
//很明显,就是卡特兰数
//直接递推即可
#include<cstdio>
using namespace std;
int n;
int f[20]={1,1};
int main()
{
scanf("%d",&n);
for(int i=2;i<=n;i++)//递推公式
for(int j=0;j<=i-1;j++)
f[i]+=(f[j]*f[i-j-1]);
printf("%d",f... |
/************************************************************************/
/*
给定一整型数组,若数组中某个下标值大的元素值小于某个下标值比它小的元素值,称这是一个反序。
即:数组 a[]; 对于 i < j 且 a[i] > a[j],则称这是一个反序。
给定一个数组,要求写一个函数,计算出这个数组里所有反序的个数。
*/
/************************************************************************/
#include <vector>
using namespace std... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) 1995-2011 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#include "core/pch.h"
#include "modu... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2002 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#ifndef DOM_PROCINST_H
#define DOM_PROCINST_H
#include "modul... |
//MyCat.cpp
//Aaron Nicanor
//anicanor
#include <iostream>
#include <fstream>
#include <string>
#include <assert.h>
using namespace std;
int main(int argc, char *argv[]){
if (argc < 3){
cerr << "Must specify input and output file." << endl;
return 1;
}
if (argc > 3){
... |
//
// LayeredSample.hpp
// DrumConsole
//
// Created by Paolo Simonazzi on 22/01/2016.
//
//
#ifndef LayeredSample_hpp
#define LayeredSample_hpp
const int numOfLayersUsed = 3;
class LayeredSample : public AudioSource {
public:
LayeredSample ( void );
~LayeredSample ( void );
void ... |
#pragma once
namespace eXistenZ
{
namespace Javascript
{
JSObject* CreateInputManagerObject(InputManager* manager);
void DestroyInputManagerObject(InputManager* manager);
}
} |
class 30Rnd_6x35_KAC: CA_Magazine
{
scope = 2;
displayName = $STR_DZ_MAG_30RND_KACPDW_NAME;
descriptionShort = $STR_DZ_MAG_30RND_KACPDW_DESC;
picture = "\RH_pdw\inv\m_30pdw_ca.paa";
model = "\RH_pdw\RH_pdw_mag.p3d";
ammo = "B_6x35_Ball";
count = 30;
initSpeed = 930;
lastroundstracer = 0;
class ItemActions
... |
// Created on: 2003-06-04
// Created by: Galina KULIKOVA
// Copyright (c) 2003-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 ... |
#pragma once
#ifndef HEAPSORT_H
#define HEAPSORT_H
#include <vector>
class Heapsort
{
public:
Heapsort();
~Heapsort();
int heapSort(std::vector<int> &vec);
private:
void heapify(std::vector<int> &vec, int n, int i);
};
#endif |
/*
Author: Michael Martin
CSCE 236 Embedded Systems - UNL
Spring 2020 Semester
Driver for robot obstacle avoidance project using Atmega 328p
Distances were changed to pure values returned by ultrasonic sensor
to greater increase the accuracy of measurement.
*/
#include "robotlib.h"
#include "motors.h"
#include <math.h... |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i++)
#define showmap(is, js, x) {rep(i, is){rep(j, js){cout << x[i][j] << " ";}cout << endl;}}
#define show(x) {for(auto i: x){cout << i << " ";} cout... |
#include "zoomslider.h"
// ___________________Class ZoomSlider___________________
ZoomSlider::ZoomSlider(QWidget *parent)
: QWidget(parent)
{
hide();
m_layout = new QVBoxLayout;
setLayout(m_layout);
m_slider.setSingleStep(1);
m_slider.setOrientation(Qt::Horizontal);
m_slider.setMinimum(-4);
m_slider.s... |
#include <DS18B20.h>
const int ONE_WIRE_BUS= D4 ;
const int garageControlPin = D6 ;
const int garageIndicatorPin = D9 ;
const int boardLed = D7; // This is the LED that is already on your device.
const boolean debug = false ;
const int MAXRETRY = 3;
const char appVer[] = "v2.1-GarageDoorControl" ;
int iterCount;
in... |
/* -*- 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_GENERIC_THUMBNAIL_H
#define OP_GENERIC_THUMBNAIL_H
#... |
#pragma once
#include "FwdDecl.h"
#include "Keng/ResourceSystem/IResourceFabric.h"
namespace keng::graphics
{
class ShaderFabric : public core::RefCountImpl<resource::IResourceFabric>
{
public:
virtual const char* GetNodeName() const override final;
virtual const char* GetResourceType() co... |
// BEGIN CUT HERE
// PROBLEM STATEMENT
//
// In a contest, we know the scores of all our competitors,
// and we estimate that
// our own score is equally likely to be any integer value
// between low and high,
// inclusive. We want to know what our rank will most likely
// be. We define our
// rank to be 1 + the n... |
class CfgPatches
{
class itc_exp_ieds
{
author = "ITC Addons Team";
authors[] = {"Herbiie","ToadBall","Yax","VKing"};
units[] = {"itc_exp_moduleIEDs"};
requiredVersion = 1.0;
requiredAddons[] = {"A3_Modules_F","ace_interaction","ace_interact_menu","ace_common"};
weapons[] = {"itc_exp_ecmL","itc_exp_ecmM",... |
/*#include <iostream>
#include "Map.h"
using namespace std;
using namespace GraphWorld;
int main()
{
string s1 = string("My Country");
Country* c1 = new Country(0, true,true, &s1);
string s2 = "MakramLand";
Country* c2 = new Country(1, false,false, &s2);
Country* c3 = new Country(2, false,true, &s2);
Country* c... |
#include<iostream>
#include<queue>
#include<stack>
using namespace std;
#define N 5
int BFS_maze[5][5] = {
{ 0, 1, 1, 0, 0 },
{ 0, 0, 1, 1, 0 },
{ 0, 1, 1, 1, 0 },
{ 1, 0, 0, 0, 0 },
{ 0, 0, 1, 1, 0 }
};
int DFS_maze[5][5] = {
{ 0, 1, 1, 0, 0 },
{ 0, 0, 1, 0, 1 },
{ 0, 0, 1, 0, 0 },
... |
/*
* @Description:
* @Author: Ren Qian
* @Date: 2020-02-28 18:50:16
*/
#include "lidar_localization/sensor_data/pose_data.hpp"
namespace lidar_localization {
Eigen::Quaternionf PoseData::GetQuaternion() {
Eigen::Quaternionf q;
q = pose.block<3,3>(0,0);
return q;
}
} |
#ifndef COMMON_SRC_PIMPL_H
#define COMMON_SRC_PIMPL_H
#include <memory>
namespace common
{
namespace util
{
/*!
* \brief The Pimpl class is a helper class to ease the use of the pimpl idiom.
*
* The idea is to use it like this:
* \code
* class MyClass
* {
* public:
* void func();
*
* private:
*... |
/*
* @brief CPU timer for Unix
* @author Deyuan Qiu
* @date May 6, 2009
* @file timer.cpp
*/
#include "CTimer.h"
void CTimer::init(void){
_lStart = 0;
_lStop = 0;
_lStart = timeGetTime();
}
DWORD CTimer::getTime(void){
_lStop = timeGetTime();
return _lStop - _lStart;
}
void CTimer::reset(void){
init();
}
|
#include "exception.h"
Exception::Exception(const std::string &arg, const char *file, int line) :
std::runtime_error(arg)
{
std::ostringstream o;
o << file << ":" << line << ": " << arg;
msg = o.str();
}
Exception::~Exception() throw() {}
const char* Exception::what() const throw() {
return... |
#pragma once
#include "../../Graphics/Shader/ShaderParameter/ShaderParameterVector2.h"
#include "../../UI/Dependencies/IncludeImGui.h"
namespace ae
{
namespace priv
{
namespace ui
{
inline void ShaderParameterVector2ToEditor( ShaderParameterVector2& _ShaderParameterVector2 )
{
Vector2 Value = _ShaderP... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t, h, m;
cin >> t;
for (int i = 0; i < t; i++)
{
cin >> h >> m;
int time = ((23 - h) * 60) + (60 - m);
cout << time << endl;
}
return 0;
} |
#include <iostream>
using namespace std;
int main()
{
std::ios::sync_with_stdio(false);
int T,x,avg,n,ans;
cin>>T;
while(T>0)
{
cin>>x>>avg;
n=avg-x;
ans=n*(avg+1)-n*(n-1)/2;
cout<<ans<<endl;
T--;
}
return 0;
}
|
#ifndef SEARCHWIDGET_H
#define SEARCHWIDGET_H
#include <QWidget>
#include <QCompleter>
#include <QSortFilterProxyModel>
#include <QStringListModel>
#include <iofile.h>
#include <QComboBox>
#include <QLabel>
#include <QMessageBox>
namespace Ui {
class SearchWidget;
}
class SearchWidget : public QWidget
{
Q_OBJECT
... |
#include "m_pd.h"
//IMPROVE -
//IMPROVE -
//TODO - hep file
#include "elements/dsp/part.h"
inline float constrain(float v, float vMin, float vMax) {
return std::max<float>(vMin,std::min<float>(vMax, v));
}
static t_class *lmnts_tilde_class;
typedef struct _lmnts_tilde {
t_object x_obj;
t_float f_dummy... |
#ifndef VENDEDOR_H
#define VENDEDOR_H
class Vendedor{
public:
Vendedor();
void ObtenerVentasDelUsuario();
void establecerVentas(int, double);
void imprimirVentasAnuales();
private:
double totalVentasAnuales();
double ventas[12];
};
#endif |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 200000
#define LowerBit(k) (k&-k)
int table[MAXN+5];
int FT[MAXN+5];
int total(int k){
int ans = 0;
for(int i = k ; i > 0 ; i-=LowerBit(i) )
ans += FT[i];
return ans;
}
int main(int argc, c... |
#ifndef MAP_H
#define MAP_H
#include "gif.h"
#include "scenestate.h"
#include "sceneinfo.h"
#include "rankinfo.h"
#include "classname.h"
#include "collisioninspector.h"
#include "updater.h"
#include <QWidget>
#include <QSet>
#include <QMovie>
#include <QPainter>
#include <QSet>
#include <QMap>
#include... |
#ifndef _MSG_0X84_UPDATETILEENTITY_STC_H_
#define _MSG_0X84_UPDATETILEENTITY_STC_H_
#include "mcprotocol_base.h"
namespace MC
{
namespace Protocol
{
namespace Msg
{
class UpdateTileEntity : public BaseMessage
{
public:
UpdateTileEntity();
UpdateTileEntity(int32_t _x, int16_t _y, int32_t _z, int8_t _action, int16_t... |
/*********************************************************************
* Software License Agreement (BSD License)
* Copyright (C) 2012 Ken Tossell
* Copyright (c) 2022 Orbbec 3D Technology, Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are ... |
#include "stdafx.h"
#include "Cage.h"
#include "PhysxManager.h"
#include "Components.h"
#include "../OverlordProject/CourseObjects/Week 2/Character.h"
#include "Projectile.h"
#include "ContentManager.h"
#include "Sparkler.h"
#include "SoundManager.h"
Cage::Cage(DirectX::XMFLOAT3 position):
m_Position(posit... |
#ifndef WPP__QT__IMAGE_PICKER_H
#define WPP__QT__IMAGE_PICKER_H
#include <QQuickItem>
#ifdef Q_OS_ANDROID
#include <QAndroidActivityResultReceiver>
#endif
#include <QFutureWatcher>
#include <QFuture>
namespace wpp {
namespace qt {
#ifdef Q_OS_ANDROID
class ImagePicker : public QQuickItem, QAndroidActivityResultRece... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2000-2008 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
*/
#include "core/pch.h"
#include "modules/url/protocols/common.h"... |
#include "A.hpp"
using namespace std;
A::A(char d) {
data = d;
cout << "cons " << d << endl;
}
A::A(const A& other) {
data = other.data;
cout << "ccons " << data << endl;
}
A::~A() {
cout << "dest " << data << endl;
}
A& A::operator=(const A& other) {
cout << "cassign " << data << " = " << ... |
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <sys/time.h>
#include <jni.h>
#include <android/log.h>
#include "debuginfo.h"
DebugLog* DebugLog::m_instance = NULL;
DebugLog* DebugLog::GetInstance()
{
if(m_instance == NULL)
{
m_instance = new DebugLog();
}
return m_ins... |
#include <algorithm>
#include "variable.h"
variable::variable(int min_val, int max_val): _set(false)
{
for (int i = min_val; i <= max_val; i++)
_domain.push_back(i);
}
variable::variable(const variable& obj)
{
_set = obj._set;
_value = obj._value;
_domain = std::vector<int>(obj._domain);
}
void variable... |
/**
* Copyright (c) 2017, Timothy Stack
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of condi... |
#pragma once
#include <SFML/Graphics.hpp>
#include <memory>
#include <stack>
#include "Updatable.hpp"
#include "SoundManager.hpp"
class Game
{
public:
Game();
~Game();
void handleEvent();
void update(const sf::Time& deltaTime);
void draw();
void stop();
void pushState(std::unique_ptr... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
unsigned int ano;
bool f = false;
int n;
scanf("%d", &n);
while(n--)
{
scanf("%u", &ano);
if(ano>=2015)
{
f = true; ano-=2014;
}
else
ano = 2015 - ano;
if(f)
... |
// http://oj.leetcode.com/problems/scramble-string/
class Solution {
public:
bool isScramble(string s1, string s2) {
if (s1.size() != s2.size())
return false;
int size = s1.size();
int alpha[26];
memset(alpha, 0, 26 * sizeof(alpha[0]));
for (in... |
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
// UnityEngine.Texture2D
struct Texture2D_t3884108195;
// System.String
struct String_t;
// System.Object
struct Il2CppObject;
#include "mscorlib_System_Object4170816371.h"
#ifdef _... |
#ifndef KEYBOARD_H
#define KEYBOARD_H
#include "xil_types.h"
class Keyboard
{
public:
Keyboard(uint32_t baseaddr);
uint8_t IsKeyPressed();
uint8_t GetKey() const;
private:
uint32_t baseaddr;
uint8_t key;
};
#endif
|
#include <bits/stdc++.h>
using namespace std;
void bfs_result(vector<int>& levels, vector<int>& parents, int s)
{
for(int i=1; i<levels.size();++i)
{
if(i==s) continue;
if(levels[i] == -1)
{
cout << "There is no path from " << s << " to " << i << endl;
}
else
{
int v = i;
cout << "The path from... |
// 1.16(화) Day 4
// 과제 : 숫자 야구 게임 만들기
// 중복되지 않는 숫자
#include <iostream>
#include <time.h>
using namespace std;
void main() {
srand(time(NULL));
int GameCount = 0;
int number[10];
int baseBallNumber[4];
int selectNumber[4];
for (int i = 0; i < 10; i++)
number[i] = i ;
// 셔플
for (int i = 0; i < 1000; i++... |
#pragma once
#include "PBRPipeline.h"
#include "AppFrameWork2.h"
class App_PBR :public App {
public:
void Init() {
render = new EGLRenderSystem;
render->SetWandH(w, h);
render->Initialize();
InitDevice();
InitPipeline();
CreateScene();
}
void InitPipeline()
{
pipeline = new PBRPipeline2;
pipeline... |
/* BEGIN LICENSE */
/*****************************************************************************
* SKCore : the SK core library
* Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr>
* $Id: skptr.h,v 1.8.4.3 2005/02/17 15:29:20 krys Exp $
*
* Authors: Mathieu Poumeyrol <poumeyrol @at@ idm .dot. fr>
* ... |
/*
* @lc app=leetcode.cn id=26 lang=cpp
*
* [26] 删除排序数组中的重复项
*/
// @lc code=start
#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
int removeDuplicates(vector<int>& nums) {
int n = nums.size();
if(n==0)return 0;
int slow = 0;
int fast = 1;
... |
// Alfred Shaker
// accumulating_observer.h
// cs33901
#ifndef ACCUMULATING_OBSERVER
#define ACCUMULATING_OBSERVER
#include "observer.h"
#include "observable.h"
#include <iostream>
#include <vector>
class AccumulatingObserver : public Observer {
public: virtual void update(Observable*);
voi... |
#include "afficherfournisseur.h"
#include "ui_afficherfournisseur.h"
afficherfournisseur::afficherfournisseur(QWidget *parent) :
QDialog(parent),
ui(new Ui::afficherfournisseur)
{
ui->setupUi(this);
ui->fornisseurView->hide();
}
afficherfournisseur::~afficherfournisseur()
{
delete ui;
}
void af... |
#include "message.h"
Message::Message(){
subject = "";
to = "";
from = "";
body = "";
}
|
#include <cppunit/extensions/HelperMacros.h>
#include "cppunit/BetterAssert.h"
#include "di/DIDaemon.h"
using namespace std;
namespace BeeeOn {
class TestableDIDaemon : public DIDaemon {
public:
TestableDIDaemon():
DIDaemon(About())
{
}
using DIDaemon::handleVersion;
using DIDaemon::versionRequested;
using... |
#include <cmath>
#include <iostream>
#include "predefine.h"
#include "matrix_elements.h"
#include "lorentz.h"
#include "simpleLogger.h"
////////////////////// Hard Quark //////////////////////////
/// Q + q --> Q + q + g
double M2_Qq2Qqg(const double * x_, void * params_){
// unpack variables, parameters and check ... |
/*
* Created by Peng Qixiang on 2018/7/24.
*/
/*
* 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字
* 例如 1 2 3 4
* 5 6 7 8
* 9 10 11 12
* 13 14 15 16
* 依次打出 1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10。
*
*/
# include <iostream>
# include <vector>
using namespace std;
vector<int> printMatrix(vector<vector<int>... |
#ifndef BONUSLIFE_H
#define BONUSLIFE_H
#include "Element.h"
#include "xil_types.h"
class BonusLife : public Element
{
public:
BonusLife();
void Init() override;
uint8_t IsCollidable() const override;
uint8_t IsFireCollidable() const override;
uint8_t Code() const override;
};
#endif
|
#include<cstdio>
#include<iostream>
#include<string>
#include<cstring>
#include<queue>
#include<map>
using namespace std;
string word;
map<string,int> M;
int Dabiao(){
int cnt=1;
for(char a='a';a<='z';a++){
string w;
w=a;
M[w]=cnt;
cnt++;
}
for(char a='a'... |
#include "Solver.h"
Solver::Solver()
{
}
Solver::~Solver()
{
free( rungeKutta );
free( adamsBashforth );
free( orthoBuilder );
}
//SolInfo::SolInfo()
//{
// o.resize( EQ_NUM * EQ_NUM, 0.0 );
// z1.resize( EQ_NUM );
// z2.resize( EQ_NUM );
// z3.resize( EQ_NUM );
// z4.resize( EQ_NUM );
// z5.resize( EQ_NUM );
//... |
#include "task.h"
#include "Vector.h"
#ifndef _INPUT_
#define _INPUT_
enum possibleInputContexts {
NormalInput = 0,
ConsoleInput,
PersonelMenu,
BuildMenu,
EditMode,
Sailing
};
class Input : public Task
{
public:
Input(void);
~Input(void);
void run();
void SetKeyState(int key, int ... |
#include <bits/stdc++.h>
using namespace std;
vector <string> v;
int main(){
int n,m;
string s;
cin >> n >> m;
for(int i=0; i<n; i++){
cin>>s;
v.push_back(s);
}
int max=0;
int count=0;
for(int i=0; i<n-1; i++){
for(int j=i+1; j<n; j++){
... |
#include<iostream>
using namespace std;
int main()
{
//first test Init
//test push
return 0;
} |
// Test program for server infrastructure
#include <iostream>
#include <fstream>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <chrono>
#include <string>
#include <vector>
#include <atomic>
#include <cmath>
#include <cstdint>
std::string pretty(uint64_t u) {
if (u == 0) {
return "0";... |
// 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 GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with spe... |
//http://demon-school.webuda.com
#include "funct.cpp"
int main(){
int comand,m=1,m1=0,m2=0,m3=0;
char fname[10];
nod *t=NULL;
while(1){
while(m){m=0; system("cls"); fflush(stdin);
printf("Meniu:\n\n");
printf("[ 1 ] Manual\n");
printf("[ 2 ] Fisier\n\n");
printf("[ 0 ] Exit\n\n");
printf("Comand >> ");
s... |
#pragma once
class AudioMarkupNavigator
{
public:
AudioMarkupNavigator();
virtual ~AudioMarkupNavigator();
public:
virtual bool requestMarkerId(int& markerId);
};
|
#pragma once
#include <WiFiClientSecure.h>
#include <Arduino.h>
#include "mumble_base.h"
#include "mumble_messages.h"
#define BUF_LEN 2048
#ifdef DEBUG
// #define DEBUG_SEND_PACKAGE
// #define DEBUG_SEND
// #define DEBUG_READ
// #define DEBUG_UPDATE
#endif
union MumbleVersion
{
uint32_t combine... |
#include<bits/stdc++.h>
using namespace std;
#define maxn 100010
using ll=long long;
pair<ll,ll> p[maxn];
int n;
ll l_max[maxn];
ll l_min[maxn];
ll r_max[maxn];
ll r_min[maxn];
bool judge(ll m){
int ind=1;
for(int i=1;i<n;i++){
while(ind+1<=n&&p[ind+1].first-p[i].first<=m)
... |
#ifndef GLOBALCONFIG_H
#define GLOBALCONFIG_H
#include <Arduino.h>
class Globalconfig{
public:
const static int MAP_SIZE = 16;
const static int DIMENSION_X = 4;
const static int DIMENSION_Y = 4;
};
#endif
|
/*
* RedisConnPool.h
*
* Created on: Oct 10, 2017
* Author: root
*/
#ifndef REDIS_REDISCONNPOOL_H_
#define REDIS_REDISCONNPOOL_H_
#include <hiredis/hiredis.h>
#include <string>
#include "../Common.h"
#include <list>
#include <map>
#include "../define.h"
#include "../Memory/MemAllocator.h"
using namespace ... |
/*
* Action.h
*
* Created on: May 18, 2014
* Author: florent
*/
#ifndef ACTION_H_
#define ACTION_H_
#include "Client.h"
namespace Donnees
{
enum TypeAction { DEPLACEMENT, DEPOT };
class Action {
private:
TypeAction t;
Client* start;
Client* end;
Commande* comm;
public:
Action(Client* s, Clien... |
#include<float.h>
#include<math.h>
#include<stdbool.h>
#include<stddef.h>
#include<stdint.h>
#include<stdio.h>
#include<string.h>
#include<ap_int.h>
#include<hls_stream.h>
#ifndef BURST_WIDTH
#define BURST_WIDTH 64
#endif//BURST_WIDTH
#ifdef UNROLL_FACTOR
#if UNROLL_FACTOR != 4
#error UNROLL_FACTOR != 4
#endif//UNRO... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "GameFramework/ProjectileMovementComponent.h"
#include "SMITElabs/Public/SLGod.h"
#include "SMITElabs/Public/SLAgni.h"
#include "SLAgniFlameWave.generated.h"
... |
#include<iostream>
int fib( int num) {
if( 1 >= num ) {
return num;
} else {
return fib( num - 1 ) + fib( num - 2);
}
}
int main() {
int num = 0;
std::cout << " Input the index of Fibonacci sequance : ";
std::cin >> num;
std::cout << "\n The Fibonacci number is : " << fib( num ) << std::endl;
ret... |
// Created on: 1995-03-16
// Created by: Christian CAILLET
// Copyright (c) 1995-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 <core/Parse.h>
#include <core/Result.h>
#include <core/Union.h>
#include <core/cli/Arguments.h>
#include <launcher/cli/Options.h>
#include <launcher/cli/error/BadOption.h>
#include <launcher/cli/error/NotEnoughArguments.h>
namespace core {
template<>
struct Parse<launcher::cli::Options, For<cli... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2012 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#include "core/pch.h"
#include "modules/layout/content/multicol.... |
#include<vector>
#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
class Solution {
public:
int superPow(int a, vector<int>& b) {
//基本思想:快速幂算法+取模运算性质
//a^b%p=((a%p)^b)%p
int res=1;
a=a%1337;
for(int i=int(b.size())-1;i>=0;i--)
{
... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
using namespace std;
const int maxn = 1e5 + 10;
int prime[10010],n = 0;
bool vis[maxn + 10];
void init... |
// @(#)73 1.2 src/htx/usr/lpp/htx/inc/hxfcpp_wrap.H, htx_libhtx, htxubuntu 6/4/04 14:36:26
extern "C" {
# include <hxihtx.h>
# include <htxlibdef.h>
}
class cHtxLib {
public:
cHtxLib (char *pExerName, char *pDevName, char *pRunType);
void start ();
void finish ();
void sendMsg (int, int, char *);
int hxfo... |
class ServletFactory {
static map<string, IServlet> url_servlet_mapping;
public static bool register(string url_pattern, IServlet servlet) {
if (url_servlet_map.find(url_pattern) == url_servlet_map.end()) {
url_servlet_map.insert(make_pair(url_pattern, servlet));
return true;
... |
// Created on: 1993-01-09
// Created by: CKY / Contract Toubro-Larsen ( TCD )
// Copyright (c) 1993-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
/... |
#pragma once
#include "RelayThread.h"
#include "ContiguousQueue.h"
#include "Helpers.h"
#include <array>
#include <thread>
#include <functional>
static const int THREAD_COUNT = 1024;
struct RelayThreadController {
bool valid;
std::shared_ptr<Semaphore> mutex = std::make_shared<Semaphore>();
void join()... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.