text stringlengths 8 6.88M |
|---|
#ifndef SDUZH_OWNLIB_NET_CALLBACKS_H
#define SDUZH_OWNLIB_NET_CALLBACKS_H
#include <functional>
#include <memory>
#include "types.h"
namespace reactor {
namespace net {
typedef std::function<void (const TcpConnectionPtr &)> ConnectionCallback;
typedef std::function<void (const TcpConnectionPtr &)> MessageCallback;
... |
// Created on: 1998-06-03
// Created by: data exchange team
// Copyright (c) 1998-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 <YouMeCommon/CrossPlatformDefine/PlatformDef.h>
#include <memory>
#include <YouMeCommon/XSharedArray.h>
#include <YouMeCommon/SyncUDP.h>
#include <YouMeCommon/SyncTCP.h>
#include <YouMeCommon/SqliteOperator.h>
#include <YouMeCommon/XSemaphore.h>
#include <thread>
#include <queue>
struct... |
// Variable.cc
#include <iostream>
#include <map>
#include <string>
#include "variable.h"
namespace expression{
int numOpArgs(string op){
static const std::map<string, int> op_args = {
{"plus", 2},
{"minus", 2},
{"multiply", 2},
{"divide", 2},
{... |
#include <math.h>
#include <SDL.h>
#include <algorithm>
#include "WidgetWave.hh"
#include "AudioStream.hh"
WidgetAudioView::WidgetAudioView(PG_Widget *parent,
const PG_Rect &rect,
AudioInputController *audio_input,
cons... |
class Solution {
public:
bool verifyPreorder(vector<int>& preorder) {
if(preorder.empty()) return true;
int min = INT_MIN, max = INT_MAX;
stack<int> root;
root.push(preorder[0]);
for(int i = 1; i < preorder.size(); i++){
if(preorder[i] < preorder[i-1]){ //left chi... |
#ifndef MON_JEU_H
#define MON_JEU_H
#include <QMainWindow>
namespace Ui {
class mon_jeu;
}
class mon_jeu : public QMainWindow
{
Q_OBJECT
public:
explicit mon_jeu(QWidget *parent = 0);
~mon_jeu();
int y; //Revoir
int x; //Revoir
private:
Ui::mon_jeu *ui;
};
#endif // MON_JEU_H
|
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <termios.h>
#include <dirent.h>
#include <bits/stdc++.h>
#include <vector>
#include <sys/ioctl.h>
#include <iostream>
#include <time.h>
#include <unistd.h>
#include <linux/kd.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>
#include <string>
... |
#ifndef COLLISIONFILTER_H
#define COLLISIONFILTER_H
namespace CollisionLayer
{
#define BIT(x) (1<<(x))
///collisionLayers , use int layer = ONE|TWO to combine ONE and TWO
enum {
NOTHING = 0,
DEFAULT = BIT(0),
ONE = BIT(1),
TWO = BIT(2),
THREE = BIT(3),
FOUR =... |
#include<bits/stdc++.h>
using namespace std;
int sort(int a[], int n)
{
int temp=0;
for(int i=0;i<n;i++)
{
for(int j=0;j<n-i-1;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
}
int removeduplicates(int a,int n)
{
int temp[n],j=0;
for(int i=0;i<n-1;i++)
{
if(a[... |
// Copyright 2017 The WCT(Wisdom City Times) Authors. All rights reserved.
#ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_PREVIEW_CONTROLLER_H_
#define CHROME_BROWSER_UI_VIEWS_TABS_TAB_PREVIEW_CONTROLLER_H_
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
#include "chrome/browser/thu... |
/*********************************************************************
This file is part of QtUrban.
QtUrban 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, version 3 of the License.
QtUrban is d... |
#include <iostream>
#include <unordered_set>
#include <vector>
using namespace std;
void permuWithoutDupli(vector<string>* ans, string preS, string rest){
if(rest.empty()){
ans->push_back(preS);
return;
}
for(int i=0; i<rest.size(); i++){
string newString = preS + rest[i];
s... |
#ifndef PROTON_MESSAGING_HANDLER_HPP
#define PROTON_MESSAGING_HANDLER_HPP
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this... |
#include "PlanetClass.h"
PlanetClass::PlanetClass()
{
m_Model = 0;
m_TexturesArray = 0;
m_VertexBuffer = 0;
m_IndexBuffer = 0;
}
PlanetClass::PlanetClass(const PlanetClass& other)
{
}
PlanetClass::~PlanetClass()
{
}
bool PlanetClass::Initialize(ID3D10Device *device, SphereModelClass* sphere, char *textureFilen... |
#pragma once
#include <functional>
#include <Poco/Timestamp.h>
#include <Poco/Mutex.h>
namespace BeeeOn {
/**
* Helper providing occasional execution of some command.
* E.g. we want to log some events but not every time we
* execute the call. This class wraps a sampling capability
* that provides just occasional... |
#include <stdio.h>
#include <fstream>
#include <iostream>
#include <math.h>
#include <ios>
#include <iomanip>
#include <cstdlib>
#include "APDcurrConverter.hh"
#include <xdaq/ApplicationDescriptor.h>
APDcurrConverter::APDcurrConverter(xdaq::ApplicationContext* appContext) {
NumberOfConverted_ = 0;
appContext_ = app... |
#include<iostream>
#include<stdio.h>
#include<bits/stdc++.h>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<map>
#include<queue>
#include<set>
#include<list>
#include<unordered_map>
#include<unordered_set>
#define ll long long
#define MAX 100000003
using namespace std;
... |
#include "Component.h"
#include "DenseGraph.h"
#include "Helper.h"
#include "Path.h"
#include "ReadGraph.h"
#include "ShortestPath.h"
#include "SparseGraph.h"
#include <iostream>
#include <vector>
using namespace std;
int main() {
string projPath{"/home/strobe/search-graph/"};
bool directed{false};
/... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2003-2008 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
**
*/
#ifndef _FL_DEBUG_H_
#define _FL_DEBUG_H... |
/*
* ArrayInventory.cpp
* Comp 220 Bookstore Project
* Written by Joe Cleveland, Chase McGough, and Anthony Pizzo
* This file is the method definitions for ArrayInventory
*/
#include "ArrayInventory.h"
//Constructor
ArrayInventory::ArrayInventory(int initialCapacity) {
array = new Book[initialCapacity];
... |
#include "pistol.h"
Pistol::Pistol(Aggressor *owner, XY owner_pos, GameManager *game) :
Weapon(1, 100, owner, owner_pos, game)
{
}
|
#include<bits/stdc++.h>
using namespace std;
int countTriplets(int arr[], int n, int sum)
{
int ans = 0;
for (int i = 0; i < n-2; i++)
{
for (int j = i+1; j < n-1; j++)
{
for (int k = j+1; k < n; k++)
if (arr[i] + arr[j] + arr[k] < sum)
ans++;
... |
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{int t;
long long x,y,z;
cin >> t;
for (int i = 1;i <= t; i++)
{cin >> x >> y >> z;
printf("Case #%d: ",i);
int ans = (x+y)%z;
if (ans < 0) ans += z;
cout << ans << endl;
}
return 0;
}
|
#pragma once
#include "common.hpp"
namespace PPU {
enum Scanline { VISIBLE, POST, NMI, PRE };
enum Mirroring { VERTICAL, HORIZONTAL, ONE_SCREEN_HI, ONE_SCREEN_LO, FOUR_SCREEN };
/* Sprite buffer */
struct Sprite
{
uint8_t id; // Index in OAM.
uint8_t x; // X position.
uint8_t y; ... |
#pragma once
#include "GameObjectData.h"
/*
SeedData holds the Data of the Seed, such has the animations that
the Seed has
*/
class SeedData : public GameObjectData
{
public:
SeedData() = default;
// parameter PossibleOrientation is not used on the seed's case but needs to be here to adhere at the GOData's inte... |
/*实验3
by kkcckc
*/
#include<iostream>
#include<string>
#define maxnode 50//最大节点数
using namespace std;
typedef char treetype;
struct tn
{
tn *l,*r;
treetype m;
bool ltag,rtag;
};
typedef tn *tree;
tree pre,head=NULL;//线索化二叉树全局量
void create (tree &t)
{
char ch;
cin>>ch;
t = new tn;
if ... |
#include "wali/util/details/Partition.hpp"
namespace wali
{
namespace util
{
namespace details
{
template<class T>
void unordered_set_intersection(const std::unordered_set<T> &first,
const std::unordered_set<T> &second,
std::unordered_set<T> &out)
{
if (second.size() < first.size()) {
... |
//O(max(n1,n2)). Here n1 and n2 are length of the two linked lists.
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
ListNode* dummy = new ListNode();
ListNode* temp = dummy;
int carry = 0;
while(l1 != NULL || l2 != NULL || carry){
int sum = ... |
//
// Created by roy on 12/25/18.
//
#ifndef PROJECTPART1_VARCOMMAND_H
#define PROJECTPART1_VARCOMMAND_H
#include "Command.h"
#include "DataReaderServer.h"
#include "Utilities.h"
#include "SmallLexer.h"
/**
* VarCommand implements Command, therefore could be executed.
* The execution of the command will create a n... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
using namespace std;
const int n = 9;
c... |
#include "model_loader.h"
namespace sloth {
RawModel ModelLoader::loadModel(const char * path, Loader &loader)
{
ModelData *modeldata = new ModelData();
// Read file via Assimp
Assimp::Importer importer;
const aiScene *scene = importer.ReadFile(path, aiProcess_Triangulate | aiProcess_FlipUVs);
// Check f... |
/* -*- 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.
**
** Yngve Pettersen
**
*/
#ifndef _EXTERNAL_DIGEST_H_
#define _EXT... |
#include "VRJOgreDummyApp.hpp"
// system header
#include <jccl/Config/ConfigElement.h>
#include <OGRE/OgreEntity.h>
#include <OGRE/OgreResourceGroupManager.h>
#include <OGRE/OgreSceneManager.h>
#include <OGRE/OgreSceneNode.h>
// project header
#include <SkeletonMapper.hpp>
#define ENABLE_TRACE
#include <Trace.hp... |
/**
Input manager
This class implements an abstaction layer between sf::Keyboard::Key and the
game's input buttons. With this, the game logic works with 'ACCEPT' or 'START'
buttons, while the Input class translates these to the 'a' or 'Return' keys
*/
#pragma once
#include "Utils.h"
class Inputs {
public:
... |
// Copyright (C) 2004 Id Software, Inc.
//
#ifndef __MODELMANAGER_H__
#define __MODELMANAGER_H__
// RAVEN BEGIN
// Modview
#define MVJOINT_SELECTED BIT( 0 )
#define MVJOINT_HIDDEN BIT( 1 )
// RAVEN END
/*
===============================================================================
Model Manager
Temporari... |
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// 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... |
#include "InputField.h"
#include <iostream>
InputField::InputField(Vector2f position, String text){
inputCell.setPosition(position);
inputCell.setSize(Vector2f(BAR_WIDTH, CELL_HEIGHT));
inputCell.setFillColor(INPUT_COLOR);
createOutline(position);
/* TEXT STUFF */
times.loadFromFile("times.ttf");
Vector2f new... |
/*****************************************************************************************
* *
* Food on the table *
* ... |
// Author: Jakub Precht
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QString>
#include <QVector>
#include <QJsonObject>
class Settings
{
public:
bool readSettings();
int sampleRate() const;
int frameSize() const;
int hopSize() const;
float confidenceCoefficient() const;
float confidenceSh... |
//
// OCXMLElementTree.cpp
//
// Created by Wes Souza.
//
// ------------------------
// Copyright 2013 Zynga Inc.
//
// 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... |
#include<iostream>
#include<algorithm>
#include<vector>
#include<unordered_map>
using namespace std;
class Solution {
public:
int leastInterval(vector<char>& tasks, int n) {
//基本思想:贪心算法,统计tasks中字母出现次数,然后从大到小排序
//则某个字母出现频次最大为Map[0],对于该字母最少执行的时间为Map[0]+(Map[0]-1)*n
//再排序下一个任务,如果下一个任务个数和最大任务数一致... |
/**
* Peripheral Definition File
*
* GPIO - General purpose and alternate function I/Os
*
* MCUs containing this peripheral:
* - STM32F0xx
*/
#pragma once
#include <cstdint>
#include <cstddef>
#include "io/reg/stm32/_common/gpio_v2.hpp"
namespace io {
namespace base {
static const size_t GPIOA = 0x48000000;
stat... |
#include "HumanPlayer.hpp"
#include "CheckersSearch.hpp"
CheckersBoard HumanPlayer::makeMove(CheckersBoard board, player p) const
{
// Ask for keyboard input to make move.
CheckersBoard newBoard = CheckersBoard(board);
cout << "Enter index from piece to move, followed by its destinations." <<
endl;... |
////////////////////////////////////////////////////////////////////////////
// Module : base_client_classes_script.cpp
// Created : 20.12.2004
// Modified : 20.12.2004
// Author : Dmitriy Iassenev
// Description : XRay base client classes script export
////////////////////////////////////////////////////////////... |
#include "food.h"
#include <QGraphicsItem>
#include<stdlib.h> // rand() generates a really large int
#include "sbody.h"
food::food()
{
randomx = rand()%550;
randomy = rand()%550; // generate two random coordinates for the good
setPixmap(QPixmap(":/image/apple.png")); // a image for the food
setPos(r... |
class Solution {
public:
int maximalSquare(vector<vector<char>>& matrix) {
if(matrix.size() == 0 || matrix[0].size() == 0) return 0;
int r = matrix.size();
int c = matrix[0].size();
vector<vector<int> > dp(r,vector<int> (c,0));
int res = 0;
for(int i=0; i<r; ++i){
... |
#pragma once
#include "ISolidShape.h"
#include "CPoint.h"
#include <sstream>
#include <iomanip>
#include <cstdint>
#include <math.h>
#define _USE_MATH_DEFINES
class CCircle : public ISolidShape
{
public:
CCircle(CPoint center, double radius);
CCircle(CPoint center, double radius, uint32_t outlineColor);
CCircle(CPo... |
#include<stdio.h>
main()
{
FILE *sp, *tp;
char ch,nextch;
int index = 0;
sp = fopen("d:\Hello.txt","r");
tp = fopen("d:\remove.txt","w");
if(sp == NULL)
{
perror("Cannot Open Source File");
return 0;
}
while( (ch = fgetc(sp)) != EOF)
{
if(ch == 10)
{
index++;
nextch = fg... |
#include "../include/dct.h"
#include "../include/dft.h"
namespace li {
/*
Matrix_<float> dct(Image& _im){
float * cdat = new float[_im.width * _im.height];
LI_U8 * ptr_ori = _im.data;
for (int i = 0; i < _im.height; ++i) {
for (int j = 0; j < _im.width; ... |
#include <iostream>
#include <string>
int main(int argc, char** argv)
{
// Note: GoogleTest.cmake doesn't actually depend on Google Test as such;
// it only requires that we produces output in the expected format when
// invoked with --gtest_list_tests. Thus, we fake that here. This allows us
// to test the mo... |
#pragma once
#include <QWidget>
namespace Ui {
class PassedTestForm;
}
class PassedTestModel;
class ScaleStatistics;
class PassedTestForm : public QWidget {
Q_OBJECT
public:
explicit PassedTestForm(QWidget *parent = nullptr);
~PassedTestForm();
PassedTestModel *getModel() const;
void setModel(P... |
#include <fstream>
#include <string>
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
#include <utility>
#include <thread>
#include <cmath>
using namespace std;
long GetIntIP(const string& arg)
{
string ip = arg;
long res = 0;
int len = ip.length();
if(!ip.empty())
{
for(int i = 3;i >= 0... |
#include "Option.hpp"
template<typename X>
Option<X>::Option(X T, X S0, X r, X sigma, X E) : T(T), S0(S0), r(r), sigma(sigma), E(E), q(0.0) {}
template<typename X>
Option<X>::Option(X T, X S0, X r, X sigma, X E, X q) : T(T), S0(S0), r(r), sigma(sigma), E(E), q(q) {}
|
#ifndef hhAnalysis_multilepton_EvtHistManager_hh_3l_1tau_h
#define hhAnalysis_multilepton_EvtHistManager_hh_3l_1tau_h
/** \class EvtHistManager_hh_3l_1tau
*
* Book and fill histograms for event-level quantities in the 1l+3tau_h category
* of the HH->tttt, WWtt, and WWWW analysis
*
* \author Christian Veelken, T... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef QUERY_PARSER_H_
#define QUERY_PARSER_H_
#ifdef OPERA_AUTH_SUPPO... |
#include "junction_maneuvering/junction_maneuvering_ros.h"
#include <ros/console.h>
int main(int argc, char **argv)
{
if (ros::console::set_logger_level(ROSCONSOLE_DEFAULT_NAME, ros::console::levels::Debug))
{
ros::console::notifyLoggerLevelsChanged();
}
ROS_DEBUG("Starting junction maneuveri... |
#ifndef CLOUDSPAWNER_H
#define CLOUDSPAWNER_H
#include "timerlist.h"
#include "cloud.h"
#include <QTimer>
#include <QObject>
class CloudSpawner: public QObject {
Q_OBJECT
private:
TimerList *allTimers;
QTimer *timer;
Cloud *cloud;
public:
CloudSpawner();
public slots:
void setCloud();
};
... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
using namespace std;
typedef long long L... |
#include "stdafx.h"
#include "Interface.h"
bool CreateSocket(CreateSocketType type, UINT localIP, USHORT port, CreateSocketData &csd)
{
SOCKET s = INVALID_SOCKET;
if (type & CST_UDP_IOCP)
{
s = WSASocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 0, WSA_FLAG_OVERLAPPED);
}
else if (type & CST_TCP_IOCP)
{
s = WS... |
// $Id$
//
// Copyright (C) 2003-2010 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <G... |
#include "XVideoThread.h"
#include <opencv2/imgproc.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
#include "XFilter.h"
using namespace cv;
//一号视频源
static VideoCapture cap1;
static VideoCapture cap2;
static VideoWriter vw;
static bool isExit = false;
void XVideoThread::SetBeg... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.... |
/*
* cTestNetworkInterface.h
*
* Created on: 2018Äê7ÔÂ21ÈÕ
* Author: tarena
*/
#ifndef CTESTNETWORKINTERFACE_H_
#define CTESTNETWORKINTERFACE_H_
#include "cTestBase.h"
class CTestNetworkInterface:public CTestBase
{
public:
virtual int test(int fd);
CTestNetworkInterface();
~CTestNetworkInterface();
};
... |
/*
* Copyright (c) 2019-2021 Morwenn
* SPDX-License-Identifier: MIT
*/
#include <algorithm>
#include <forward_list>
#include <iterator>
#include <list>
#include <vector>
#include <catch2/catch.hpp>
#include <cpp-sort/sorters.h>
#include <testing-tools/distributions.h>
#include <testing-tools/memory_exhaustion.h>
//... |
#ifndef SKDEBUG_H
#define SKDEBUG_H
// skdebug.h
// 10/16/2011 jichi
// Macros for debug.
// Debug I/O
// - DPRINT: similar to fprintf, or KDPrint. Print to qDebug
// - DOUT: similar to std::cout. Print to qDebug
// - DERR: similar to std::cerr. Print to qWarning
#if defined(DEBUG) && !defined(SK_NO_DEBUG)
# if defi... |
#include <string>
#include <cmath>
#include <fstream>
#include <iostream>
#include <sstream>
#include <list>
#include <algorithm>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <numeric>
#include <bitset>
#include <deque>
//#include <random>
#include <string.h>
#include <stdlib.h>
#include <ve... |
#ifndef SINGLERESULTWORKER_HH
#define SINGLERESULTWORKER_HH
#include "nan.h"
#include "cpp_to_js_converters.hh"
namespace NC {
template <
typename OwnerT,
typename CommandT,
typename ResultT,
typename... Args
>
class SingleResultWorker : public Nan::AsyncWorker {
using ArgsT = std::tuple<Args...... |
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
long long gcd(long long a, long long b) {
return b ? gcd(b, a % b) : a;
}
long long calc(long long m, long long d, long long l, long long r) {
d %= m, r = min(r, m - 1);
if (d > m - d) return calc(m, m - d, m - r, m - l);
if (l > r)... |
/*
* lib_car_detect.cpp
*
* This is the class to extract car info from wheel info
*
* Author: yubocheng@live.cn
*
* Copyright (c) 2019 Jimu
* All rights reserved.
*
*/
#include "lib_car_detect.h"
#include "utils/point.h"
#include "utils/math_utilities.h"
#include <iostream>
using namespace std;
using names... |
#include "CRegisterIdMessage.h"
#include "Markup.h"
#include "CMessageEventMediator.h"
#include "NetClass.h"
CRegisterIdMessage::CRegisterIdMessage(CMessageEventMediator* pMessageEventMediator, QObject *parent)
: CMessage(pMessageEventMediator, parent)
{
}
CRegisterIdMessage::~CRegisterIdMessage()
{
}
bool CRegist... |
#include "WATCHDOG.hpp"
WATCHDOG::WATCHDOG(uint32_t timeout_us) {
WDT_ClrTimeOutFlag();
WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_RESET);
WDT_Start(timeout_us);
}
void WATCHDOG::feed() {
WDT_Feed();
}
|
void setup()
{
Serial.begin(115200);
}
char stx = char(0x02); //STX -> 0x02
char etx = char(0x03); //ETX -> 0x03
char parse1 = '#';
void loop()
{
String text = Serial.readStringUntil(etx); //ETX까지 문자 읽어들임
String arr[5];
int first = text.indexOf(parse1);
int second = text.indexOf(parse1, fi... |
#include "TCPNetworkEngine.hpp"
#include <signal.h>
#include <iostream>
#include "Logger.h"
using KernelEngine::TCPNetworkEngine;
TCPNetworkEngine networkengine;
void signalFunc(int _signal)
{
LOGGER(E_LOG_DEBUG) << "sigint event";
networkengine.closeServices();
}
int main(int argc, char *argv[])
{
if (argc ... |
#ifndef _VERTEX3D_AERO_H_
#define _VERTEX3D_AERO_H_
#include "../../Toolbox/Toolbox.h"
#include "../Color/Color.h"
#include "../../Maths/Vector/Vector2.h"
#include "../../Maths/Vector/Vector3.h"
#include <string>
#include <iostream>
namespace ae
{
/// \ingroup graphics
/// <summary>
/// Represent a 3D point that ... |
#include "header.h"
int
main(int argc, char* argv[])
{
std::ifstream inFile;
std::ofstream outFile;
std::string data;
vector<int> tasksTimes;
vector<int> workerRelationship;
inFile.open(argv[1]);
if (!inFile)
{
exit(1);
}
std::getline(inFile, data);
std::istringstream ... |
#ifndef IMAGE_HPP
#define IMAGE_HPP
#include <string.h>
#include <QtGui>
#define IMAGE_RETURN_SUCCESS true
#define IMAGE_RETURN_FAILURE false
typedef enum {
IMAGE_POINT_SAMPLING,
IMAGE_BILINEAR_SAMPLING,
IMAGE_GAUSSIAN_SAMPLING
} ImageSamplingMethod;
typedef enum {
IMAGE_RED_CHANNEL,
IMAGE_GREE... |
#include <iostream>
#include "set.h"
using namespace std;
Set :: Set(){ // constructor
setHead = new Node(); // NULL, NULL, 0, false as described in struct
setTail = setHead;
}
Set :: ~Set(){ //destructor
while(setHead){ //delete sets
Node *temp = setHead; // to delete sets
Node *temp1 = setHead->setofSet; //t... |
#pragma once
#include"Product.h"
class ConcreteProductB:public Product{
public:
ConcreteProductB();
virtual ~ConcreteProductB();
virtual void Use();
};
|
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#define PI 3.14159265
using namespace std;
struct punct
{
int x, y, eticheta;
};
struct Vector
{
int coordonata1, coordonata2;
};
vector<punct> puncte;
void Citire_Date()
{
struct punct a;
for(int i = 0 ; i <=3 ; 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>
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
using namespace std;
typedef long long L... |
#pragma once
#include "baseview.hpp"
struct AnnounceView : BaseView {
AnnounceView(struct ViewStack* vs);
virtual void render_body(Graphics& g, render_box const& pos) override;
};
|
#define F_CPU 1000000UL
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#define PIN (1<<PB2)
void init_timer1(unsigned long freq)
{
TCCR1 = 0; // stop the counter
TCNT1 = 0;
OCR1C = 0;
if(freq==0) return;
int prescale = 1;
while(freq * 256 * (1... |
#include <stdio.h>
void biggest(int arr[]);
void smallest(int arr[]);
int n=0;
int main(int argc, char const *argv[])
{
/* code */
printf("Input the size of the array you want : \n");
scanf("%d",&n);
int a[n];
printf("Input %d elements one by one correspondingly : \n",n);
for (size_t i = 0; i < n; +... |
/** Underscore
@file /.../Source/Kabuki_SDK-Impl/include/_App/WindowGroup.h
@author Cale McCollough
@copyright Copyright 2016 Cale McCollough ©
@license http://www.apache.org/licenses/LICENSE-2.0
*/
#include "_App/WindowGroup.h"
using namespace _App;
WindowGroup::WindowGroup ()
{
max... |
#include <iostream>
#include <stack>
#include <cstring>
int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
int n, visited[30][30];
double w[4], ans;
void bfs(int x, int y, int count, double p)
{
visited[x][y] = 1;
if(count == n)
{
ans += p;
visited[x][y] = 0;
return ;
}
for(i... |
#pragma once
#include <glm/glm.hpp>
namespace squareData {
// v6----- v5
// /| /|
// v1------v0|
// | | | |
// | |v7---|-|v4
// |/ |/
// v2------v3
const glm::vec3 positions[] = {
// Front v0,v1,v2,v3
glm::vec3(1, 1, 1), glm::vec3(-1, 1, 1), glm:... |
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>
#include <numeric>
typed... |
#ifndef GROUPMANAGER_H
#define GROUPMANAGER_H
#include "Entity.h"
#include "EntityManager.h"
#include "World.h"
#include "Bag.h"
#include <string>
#include <map>
class Entity;
class GroupManager
{
public:
GroupManager(World *world);
~GroupManager();
void add(Entity *entity, std::string group);
void add(int id... |
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2011 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* Allowed #if-ery: architecture identification.
*/
#ifndef POSIX_SYS_CHOICE_CHIPSET_H
... |
/***************************************************************************
* Copyright (C) 2009 by Dario Freddi *
* drf@chakra-project.org *
* *
* This pr... |
#include "TriggerEfficiency/EfficiencyPlot/interface/HistMgr.h"
using namespace std;
template<typename T>
HistMgr<T>::HistMgr(const string& tag):
_tag(tag)
{}
template<typename T>
HistMgr<T>::HistMgr():
_tag("")
{}
template<typename T>
void
HistMgr<T>::AddObj( T* obj ) {
string aliasname = MakeAlia... |
//
// Created by faris on 5/5/2020.
//
#ifndef FINALPROJECT_SHAPE_H
#define FINALPROJECT_SHAPE_H
#include <string>
#include <cinder/gl/gl.h>
using namespace cinder;
namespace myapp {
static int id = 0;
};//namespace myapp
class Shape {
public:
bool is_collided = false;
Color color;
int GetShapeType = -1;
boo... |
#include <iostream>
using namespace std;
void capphat(int**& a,int sodong,int socot)//co the sai con tro cap 3
{
//day la con tro cap 2
a=new int*[sodong];//con tro cap 2 se quan li con tro cap n-1
for(int i=0; i<sodong; i++)
{
a[i]=new int[socot];//con tro cap 1 quan li con tro cap nho hon!
... |
#include <iostream>
#include <mutex>
#include <string>
#include <vector>
using namespace std;
#include <boost/any.hpp>
#include <boost/signals2.hpp>
using namespace boost;
template <typename T>
struct INotifyPropertyChanged {
virtual ~INotifyPropertyChanged() = default;
signals2::signal<void(T&, const string&)>... |
#ifndef __SANDBOX_EXECUTE_WORKER_H__
#define __SANDBOX_EXECUTE_WORKER_H__
#include <nan.h>
#include "sandbox-wrap.h"
class SandboxExecuteWorker : public Nan::AsyncWorker {
public:
SandboxExecuteWorker(Nan::Callback *callback, SandboxWrap *sandbox, const char *code);
virtual ~SandboxExecuteWorker();
void Execu... |
#ifndef AJOUTERSTOCK_H
#define AJOUTERSTOCK_H
#include <QDialog>
namespace Ui {
class ajouterstock;
}
class ajouterstock : public QDialog
{
Q_OBJECT
public:
explicit ajouterstock(QWidget *parent = 0);
~ajouterstock();
private slots:
void on_precedentaPB_clicked();
private:
Ui::ajoute... |
#pragma once
#include "sound/sound.h"
namespace sound
{
JSObject* CreateSoundManagerObject(SoundManager* manager);
void DestroySoundManagerObject(SoundManager* manager);
} |
#pragma once
#include "aePrerequisitesGraphics.h"
#include <aePrerequisitesUtil.h>
#include <aeColor.h>
namespace aeEngineSDK
{
class aeTexture2D;
class aeBuffer;
class aeConstantBuffer;
class aeIndexBuffer;
class aeVertexBuffer;
class aeShader;
class aeVertexShader;
class aePixelShader;
class aeInputLayout;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.