text stringlengths 8 6.88M |
|---|
#include "RelationOps.hpp"
using namespace wali::relations;
namespace std {
std::ostream& operator << (std::ostream& os, std::pair<int,int> const & p)
{
os << "(" << p.first << ", " << p.second << ")";
return os;
}
}
int main()
{
TernaryRelation<int>::iterator x;
x++;
++x;
*x;
// typedef RelationTypede... |
//============================================================================
// Name : v4l-cpp-sandbox.cpp
// Author :
// Version :
// Copyright : LEE WAS ERE
// Description : Hello World in C++, Ansi-style
//============================================================================
//Bug? wi... |
/*
* File: generator.h
*
* Description: This file contains the function declarations for the code
* generator for Simple C. Most of the function declarations
* are actually member functions provided as part of Tree.h.
*/
# ifndef GENERATOR_H
# define GENERATOR_H
# include "Scope.h"
# include "Tree.h"
void ge... |
//
// Created by YCJ on 2020/7/2.
//
//成员信息表定义
#ifndef COMPLIER_ELEMSHEET_H
#define COMPLIER_ELEMSHEET_H
#include <bits/stdc++.h>
#include "TypeSheet.h"
#include "..\type\cat.h"
using namespace std;
class ElemSheet {
int sheetLen=0;//成员表所有成员的总长度
class ElemNode{
friend ElemSheet;
string name;//... |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
struct ListNode {
int val;
ListNode* next;
};
void Init_ListNode(ListNode* head, vector<int> vec)
{
if (vec.size() == 0)
{
head = NULL;
return;
}
ListNode* p;
p = head;
p->val = vec[0];
for (int i = 1; i < vec.size(); i++)
{
L... |
#pragma once
#include <vector>
#include <string>
#include <iostream>
#include "KomputeModelML.hpp"
namespace godot {
KomputeModelML::KomputeModelML() {
std::cout << "CALLING CONSTRUCTOR" << std::endl;
this->_init();
}
void KomputeModelML::train(Array yArr, Array xIArr, Array xJArr) {
assert(yArr.size(... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
const double PI = 3.141;
struct point{
double x,y;
};
point p[1010],pa,pb;
double s;
double dis2... |
#pragma once
#ifndef FILEPROGRESS_H
#define FILEPROGRESS_H
#include "PokemonObject.h"
class FileProgress
{
public:
FileProgress();
bool CreateFileToSaveProgress(std::string fileName, pokemonObject pObj, pokemonObject pObj2, pokemonObject oObj, pokemonObject oObj2);
std::string PrintFileContent(std::string fileName, ... |
#include "circle.hpp"
#include "rectangle.hpp"
#include "picture.hpp"
#include "factory.hpp"
#include <iostream>
int main(){
std::vector<std::unique_ptr<drawable>> drawables;
std::ifstream input("factory.txt");
bool errorOccurred = false;
try {
for(;;){
drawables.push_ba... |
#include "precompiled.h"
#include "scene/scene.h"
#include "scene/scenebsp.h"
#include "scene/jsscenebsp.h"
#include "render/render.h"
#include "render/shapes.h"
#include "render/frustrum.h"
#include "render/rendergroup.h"
#include "render/hwbuffer.h"
#include "q3bsp/q3bsp.h"
#include "q3bsp/bsppatch.h"
#include "rende... |
/**
* SMuFF Firmware
* Copyright (C) 2019 Technik Gegg
*
* 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 version 3 of the License, or
* (at your option) any later version.
*
* Th... |
void nextComb(int left, int n, int k, vector<int> comb, vector<vector<int> > &ans) {
if (comb.size() == k) {
ans.push_back(comb);
return;
}
for (int i = left; i <= n; i++) {
if (comb.size() < k) {
comb.push_back(i);
nextComb(i + 1, n, k, comb, ans);
comb.pop_back();
}
}
}
vector<... |
#pragma once
#include "../vendor/entt/entt.hpp"
struct XY {
float x;
float y;
};
//Component class
struct TransfromComponent {
XY Transform;
TransfromComponent() = default;
TransfromComponent(const TransfromComponent&) = default;
TransfromComponent(const XY& transform) : Transform(transform) {... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2007 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
/* This is a copy of a part of ShObjIdl.h from the Windows SDK.... |
// Copyright PixelSpawn 2020
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Engine/TriggerVolume.h"
#include "PressurePlateDepress.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class BUILDINGESCAPE_API UPressurePlateDepress : public UActorComp... |
/// MP3 PLAYER PROJECT
/// http://educ8s.tv/arduino-mp3-player/
//////////////////////////////////////////
#include <SoftwareSerial.h>
//#include <Serial.h>
SoftwareSerial mySerial(10, 11);
# define Start_Byte 0x7E
# define Version_Byte 0xFF
# define Command_Length 0x06
# define End_Byte 0xEF
# define Ac... |
#include"STC12C5A08S2.h"
#include"串口.h"
#include"DS1302.h"
#include"LCD12864.h"
#include"zigbee.h"
//#include"key.h"
#include <stdio.h>
#define uint unsigned int
#define uchar unsigned char
sbit WaterIO=P2^0;
uint CycleTime; //循环周期,数据上传周期,这里定时10分钟
uchar LastTime; //上次的分钟数
uint Timing;
uint WaterTime; //浇灌时间
u... |
/* -*- 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.
*/
#ifndef MODULES_UDPATERS_MODULE_H
#define MODULES_UDPATERS_MODULE... |
//
// Created by fab on 22/02/2020.
//
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb/stb_image.h"
#include "stb/stb_image_write.h"
//Ugly hax
#include "glad/glad.c"
#include "glfw/glfw3.h"
#include "../headers/Engine.hpp"
int main(int argc, char **argv)
{
Engine* engine... |
class 20Rnd_B_765x17_Ball
{
weight = 0.4;
};
class 10Rnd_B_765x17_Ball
{
weight = 0.2;
};
class 30Rnd_9x19_MP5
{
weight = 0.4;
};
class 30Rnd_9x19_MP5SD
{
weight = 0.4;
};
class 64Rnd_9x19_Bizon
{
weight = 0.8;
};
class 64Rnd_9x19_SD_Bizon
{
weight = 0.8;
};
class 33Rnd_45ACP_KRISS
{
weight = 0.8;
};
class... |
//
// BadEnd.cpp
// GetFish
//
// Created by zhusu on 15/7/22.
//
//
#include "BadEnd.h"
#include "Common.h"
#include "Tools.h"
#include "GameSaveData.h"
#include "GameScene.h"
#include "Data.h"
BadEnd::BadEnd():_dead(-1)
{
}
BadEnd::~BadEnd()
{
}
bool BadEnd::init()
{
if(CCLayer::init()) {
... |
#ifndef MESH_H
#define MESH_H
#include <iostream>
#include <glm/glm.hpp>
#include <GL/glew.h>
class Vertex
{
public:
Vertex(const glm::vec3& pos, const glm::vec2& texCoord)
{
this->pos = pos;
this->texCoord = texCoord;
}
glm::vec3 GetPos() {return pos;}
glm::vec2 GetTexCoord() {re... |
#include "SimpleCollisionHandler.h"
#include <iostream>
#include <set>
typedef std::vector<std::pair<int,int> > edges;
#define MASS(id) scene.isFixed(id) ? std::numeric_limits<double>::infinity() : M[2*id]
// BEGIN STUDENT CODE //
// Detects whether two particles are overlapping (including the radii of each)
// an... |
#include <iberbar/Gui/Xml/XmlProcHelper.h>
#include <iberbar/Font/Types.h>
#include <iberbar/Utility/Xml/Base.h>
#include <iberbar/Utility/String.h>
bool iberbar::Gui::XmlProcHelper::XmlNodeReadFontDesc( Xml::CNodeA* pXmlNode, UFontDesc* pFontDesc )
{
const char* strFontFamily = pXmlNode->GetAttribute( "Family" );... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cout<<"Enter the number of elements in array : ";
cin>>n;
cout <<"Perfect squares are : " <<(sqrt(n)) - 1;
cout<<endl;
return 0;
}
|
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <functional>
using std::vector;
class TreeOrders {
int n;
vector <int> key;
vector <int> left;
vector <int> right;
public:
void read(std::istream& in) {
in >> n;
key.resize(n);
left.resize(n);
right.resize(... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
//
// Copyright (C) 2008 Opera Software AS. All rights reserved.
//
// This file is part of the Opera web browser. It may not be distributed
// under any circumstances.
//
// Adam Minchinton
//
#ifndef __LAUNCH_MANAGER_H__
#define __LAUNCH_M... |
#ifndef LEX_H
#define LEX_H
#include <iostream>
#include <vector>
#include<Tokens.hpp>
using namespace std;
struct LexPositionNode {
int posstart;
int posend;
string value;
string tokentype;
};
class Lex
{
public:
Lex();
virtual ~Lex();
std::vector<LexPositionNode> Analysis( vector<... |
/* -*- 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.
*/
#ifndef LINKS_MODEL_H
# define LINKS_MODEL_H
# include "adjunct/... |
#include<iostream>
using namespace std;
class Private {
private :
string name = "sasi";
int x_square(int x) {
return x * x ;
}
public:
int getter() {
cout<< x_square(55) << " " << "getting from private method" << endl;
... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
clear.addListener(this, &ofApp::clearPressed);
learn.addListener(this, &ofApp::learnPressed);
save.addListener(this, &ofApp::savePressed);
mode1.addListener(this, &ofApp::mode1Pressed);
mod... |
//
// Created by Lee on 2019-04-19.
//
#ifndef UBP_CLIENT_CPP_VER_PHOTOGROUP_H
#define UBP_CLIENT_CPP_VER_PHOTOGROUP_H
#include "Photo.h"
#include <vector>
#include <QString>
class PhotoGroup {
private:
long id;
QString name;
std::vector<Photo> photoList;
void init(long id, QString name);
void... |
#ifndef PRECISION_RECALL_H
#define PRECISION_RECALL_H
#include "Common.h"
//! A single point in the Precision Recall curve
typedef struct {
float precision, recall, threshold;
} PrecisionRecallPoint;
//! Precision Recall Class
/*!
This class computes and stores a precision recall curve
*/
class PrecisionRecall
... |
#include "stdafx.h"
#include "SuddenDeath.h" |
// Copyright (c) 2015 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 special ... |
#include <iostream>
#include <vector>
#include <cmath>
#include <mpi.h>
#include <omp.h>
#include <assert.h>
#include <cstdio>
using namespace std;
#ifdef INFO
void print_array(float *data, int rows, int cols, int rank) {
printf("\n***%d***\n", rank);
for(int i = 0; i < rows; i++) {
for(int j = 0; j < c... |
#include <iostream>
#include <cstdio>
#include <map>
#include <iterator>
#include <queue>
#include "include/time_leak/place.hpp"
#include "include/time_leak/transition.hpp"
#include "include/time_leak/element.hpp"
#include "include/time_leak/elementUniqueFifo.hpp"
#include "include/time_leak/net.hpp"
#include "include... |
/*
* SDEV340 Week 3 Problem 1
* Allow user to count vowels, consonants, or both in a C-string
* Benjamin Lovy
*/
#include <cstring>
#include <iostream>
// Class for counting vowels and consonants in a C-string
class LetterCounter
{
// String to count
char *cString;
// Maximum string length
static unsi... |
#ifndef FLASHDIALOG_H
#define FLASHDIALOG_H
#include <qdialog.h>
#include <QAxWidget>
class FlashDialog: public QDialog
{
Q_OBJECT
public:
FlashDialog (QWidget *parent = 0);
signals:
/* void signalNotifyFileName (QString &text);*/
public slots:
public:
void Initialise(const QString rtmp);
private:
QAxWidg... |
#include "aeGraphicsAPI.h"
namespace aeEngineSDK
{
aeVertexShader::aeVertexShader()
{
m_pData = ae_new<SHADER_DATA>();
m_pData->Blob = nullptr;
m_pData->Shader = nullptr;
}
aeVertexShader::aeVertexShader(const aeVertexShader & S)
{
*this = S;
}
aeVertexShader::~aeVertexShader()
{
ae_delete(m_pData)... |
#ifndef RECHERCHE_MOT_GUI_CHERCHER_MOT_WIDGET_ENTRAINEMENT_JAP
#define RECHERCHE_MOT_GUI_CHERCHER_MOT_WIDGET_ENTRAINEMENT_JAP
#include <mot.h>
#include <QtGui/QDialog>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QStandardItemModel>
#include <QtGui/QTreeView>
#include <string>
#include <vector>
class Chercheu... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2006 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/style/src/css_rule.h"
#i... |
#include <jni.h>
#include <string>
#include <android/log.h>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <vector>
#include <cv.hpp>
#include "opencv-eid-recognizer/recognizer.h"
using namespace std;
using namespace cv... |
/*!
* @copyright © 2017 Universidade Federal do Amazonas.
*
* @brief Implementação da API em C++ da classe mãe I2C.
*
* @file mkl_I2C.cpp
* @version 1.0
* @date 07 Dezembro 2017
*
* @section HARDWARES & SOFTWARES
* +board FRDM-KL25Z da NXP.
* +pr... |
class ItemGPS : ItemCore
{
model = "z\addons\dayz_communityassets\models\gps.p3d";
};
class ItemGPSBroken_DZE : ItemCore
{
scope = 2;
displayName = $STR_EQUIP_BROKEN_GPS;
model = "z\addons\dayz_communityassets\models\gps.p3d";
picture = "\dayz_epoch_c\icons\tools\ItemGPSBroken.paa";
descriptionShort = $STR_EQUI... |
/*
Copyright (c) 2015-2022 Xavier Leclercq
Released under the MIT License
See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt
*/
#ifndef _ISHIKO_CPP_TESTFRAMEWORK_CORE_DIRECTORIESTEARDOWNACTION_HPP_
#define _ISHIKO_CPP_TESTFRAMEWORK_CORE_DIRECTORIESTEARDOWNACTION_HPP_
#include "TestTear... |
#include "Stringable.hpp"
std::ostream& operator<<(std::ostream &os, const Stringable &s)
{
os << s.to_string();
return os;
} |
#include <stdio.h>
#include <string.h>
#include "pico/stdlib.h"
//#include "hardware/adc.h"
//#include "hardware/clocks.h"
//#include "hardware/flash.h"
#include "hardware/gpio.h"
//#include "hardware/irq.h"
//#include "hardware/pwm.h"
#include "hardware/i2c.h"
// #include "tusb.h" // if you want to use tud_cdc_connect... |
#include <stdio.h>
main()
{
int num,i, j;
printf("prime numbers:");
for(num=2;num<=20;num++)
{
j=0;
for(i=2;i<num;i++)
if(num % i== 0)
{
j=1;
printf("%d is not prime\n",num);
}
if(j==0)
printf("%d is prime\n",num);
}
} |
/**
* @brief exception handle class
* @author Shi Jiabin
* @version 1.0
* @data 2015
*/
#ifndef SIMGRAPHICS_SIMEXCEPTION_H
#define SIMGRAPHICS_SIMEXCEPTION_H
#include <exception>
#include <string>
#include "include/SimPrerequisites.h"
/*
* @brief customize exception
*/
namespace sim {
class SIM_ROOT_EXPORT Except... |
#pragma once
#include <vector>
#include <glm/glm.hpp>
class AAObject;
class AAModel;
class AAHelper
{
public:
AAHelper();
~AAHelper();
static AAObject* findObjectInListByName(char * name, std::vector<AAObject* > objs);
static glm::vec3 CalculateModelCenter(AAModel*);
};
|
#include "shader.hpp"
#include <fstream>
#include <string>
#include <sstream>
#include "glad/glad.h"
#include "glm/glm.hpp"
#include "glm/gtc/type_ptr.hpp"
#include <GLFW/glfw3.h>
astri::Shader::Shader(const std::string& vertex_path,
const std::string& fragment_path) {
std::string vertex_sou... |
#include "clientlistmodel.h"
#include <QDebug>
ClientListModel::ClientListModel(QObject * parent):
QAbstractListModel(parent),
rowC(0)
{
}
int ClientListModel::rowCount(const QModelIndex &parent) const
{
return rowC;
}
QVariant ClientListModel::data(const QModelIndex &index, int role) const
{
if (ro... |
#ifndef _INTERFACE_H_
#define _INTERFACE_H_
#include "machine.h"
#include "MillRunner.h"
#include <ncurses.h>
#include <menu.h>
#include <string>
struct menu_option{
std::string key;
std::string text;
};
enum STATES {
NORMAL,
SELECT_MACHINE,
LOAD_FILE,
RUNNING,
};
void draw_header( WINDOW *header);
MENU *... |
#include <iostream>
using namespace std;
using ll = long long;
const ll MOD = 998244353;
template <typename T, typename U>
T mypow(T b, U n) {
if (n == 0) return 1;
if (n == 1) return b % MOD;
if (n % 2 == 0) {
return mypow(b * b % MOD, n / 2);
} else {
return mypow(b, n - 1) * b % MO... |
#include<bits/stdc++.h>
using namespace std;
const int long long MOD = 1000000000000000000;
int main(){
long double A , B;
cin >> A >> B;
long double x = A * B;
cout << (long long)x << endl;
} |
/************************************************************************
* @project : $rootnamespace$
* @class : $safeitemrootname$
* @version : v1.0.0
* @description :
* @author : $username$
* @creat : $time$
* @revise : $time$
****************************************************************... |
void burnout (int day)
{
digitalWrite(shamash, HIGH);
playBlessings(day);
delay (2000);
Translator(day);
delay(2000);
playBlessings ();
for (k=1; k<172800 ; k++){
skipDay = digitalRead(dayDown);
Serial.print(k);
Serial.print(" ");
Serial.println(skipDay);
if (k > 21600)
{
Translator(0);
}
if (skipDay < 0.2)
{
k = 1728... |
#include<iostream>
using namespace std;
# define N 50
int flag = 0;
template<typename T>
struct node {
T store_data;
node* left;
node* right;
node(T initial_data, node* left, node* right) {
store_data = initial_data;
this->left = left;
this->right = right;
}//构造函数初始化数值
node(node* left, n... |
#ifndef IMPORT_PHYSX_DOM_H
#define IMPORT_PHYSX_DOM_H
namespace PHYSICS_DOM
{
class PhysicsDOMDef;
}
namespace IMPORT_PHYSX_DOM
{
class ImportPhysXDOM
{
public:
static ImportPhysXDOM *create(void);
// Imports an XML serialized asset and converts it into a standardized PhysicsDOM
virtual bool importPhysXDOM(cons... |
/* XMRig
* Copyright (c) 2015-2020 libuv project contributors.
* Copyright (c) 2020 cohcho <https://github.com/cohcho>
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free sof... |
// Node.h
// Ben Howe
// COSC 2030
// 10/24/2018
/*
Modified node class that was provided for Lab 2.
Modifications:
- converted from singly-linked to doubly-linked
- stored data type is char
This is used for character nodes of my "large number as string" solution.
Original version by:
tom bai... |
#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 <map>
typedef long long LL;
typedef unsigned long long ULL;
#define PI 3.141592653589... |
#include "OpenGLRHI.h"
#include "OpenGLES31.h"
#include "OpenGLDrvPrivate.h"
FOpenGLDynamicRHI::FOpenGLDynamicRHI()
{
}
FBoundBufferStateRHIRef FOpenGLDynamicRHI::RHICreateBoundBufferState(const FBoundBufferDesc& Desc, FRHIVertexDeclaration* VertexDeclaration)
{
shared_ptr<FOpenGLBoundBufferState> BoundBufferStat... |
#pragma once
#include "bricks/core/object.h"
#include "bricks/core/data.h"
#include "bricks/core/pointer.h"
namespace Bricks { namespace Cryptography {
class HashAlgorithm : public Object
{
public:
virtual Data Preprocess() { return Data(GetHashSize()); }
virtual Data Process(const Data& hash, const Data& data... |
#include<bits/stdc++.h>
#define rep(i,n) for (int i =0; i <(n); i++)
using namespace std;
using ll = long long;
const double PI = 3.14159265358979323846;
int main(){
string a,b;
cin >> a >> b;
int x=0;
int y = 0;
rep(i,3){
x += a.at(i) - '0';
y += b.at(i) - '0';
... |
#include <bits/stdc++.h>
#define isNum(c) ('0' <= c && c <= '9')
#define eof (-100000)
#define ine (100000)
using namespace std;
const int maxn = 100000;
int a, l = 1;
multiset < int > st;
multiset < int > ::iterator it;
int read() {
char c = getchar();
while (!isNum(c) && c != '.' && c != 'E' && c != '-')
... |
#ifndef OFXCOMMANDPROCESSOR
#define OFXCOMMANDPROCESSOR
#include <deque>
#include <iostream>
//#include <boost/ptr_container/ptr_deque.hpp>
#include <boost/shared_ptr.hpp>
class ofxCommand;
class ofxCommandProcessor {
public:
ofxCommandProcessor();
~ofxCommandProcessor();
//virtual void enqueue(boost::shared_ptr<o... |
// Created on: 1995-01-27
// Created by: Jacques GOUSSARD
// 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 G... |
//
// Created by Abiodun Quadri Adekunle on 19/10/2019.
//
#include "QuickUnion.h"
QuickUnion::QuickUnion(int N) {
for (int i = 0; i < N; i++) id[i] = i;
}
int QuickUnion::root(int i) {
while (i != id[i]) i = id[i];
return i;
}
bool QuickUnion::connected(int x, int y) {
return root(x) == root(y);
}
... |
#pragma once
#include "IP.h"
// pdf P6 P18
class ICMP :public IP
{
protected:
BYTE m_type;
BYTE m_code;
WORD m_checksum;
WORD m_id;
WORD m_seq;
BYTE m_data[64];
public:
virtual BOOL Write(BYTE *link);
virtual BOOL Read(BYTE *link);
void setType(BYTE type);
void setCode(BYTE code);
void setChecksum(WORD ch... |
class DZ_AmmoBoxRU : ReammoBox
{
scope = 2;
model = "ca\weapons\ammoboxes\proxy_ruweaponboxlow.p3d";
displayName = $STR_DAYZ_OBJ_3;
vehicleClass = "DayZ Epoch Crates";
};
class DZ_ExplosiveBoxRU : ReammoBox
{
scope = 2;
model = "ca\weapons\ammoboxes\proxy_ruexplosives.p3d";
displayName = $STR_DAYZ_OBJ_3;
v... |
#include "algo.h"
#include <cstdlib>
#include <iostream>
using namespace std;
int * construct_array(int length){
srand(time(NULL));
int * temp = new int [length];
for(int i = 0; i < length; i++){
temp[i] = rand() % 100 + 1;
}
return temp;
}
int error_handle(){
int input;
cout << "... |
/*
* @Author: shaoDong
* @Version: 1.0
* @DateTime: 2018-07-17 10:33:04
* @Description: 判断链表是否有环,创建单链表
*/
#include <cstdlib>
#include <iostream>
using namespace std;
// struct 是一个特殊的类,可以包含构造函数
struct ListNode {
int val;
ListNode *next;
// 初始化列表
ListNode(int x) : val(x), next(NULL) {}
};
List... |
#include <iostream>
using namespace std;
main(){
int arr [10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} ;
int n = 10 ; int i ; bool found;
int y = 10 ;
//Algoritma
i = 0;
for (int i = 0; i < 10; i++) {
cout << arr[i] << " " ;
}
cout << endl << "Angka yang ingin dicari adalah " << y << en... |
#pragma once
class Qso;
// Unique Bonus Stations Per Mode
class BonusStationsPerMode
{
public:
BonusStationsPerMode();
~BonusStationsPerMode();
// Return the number of bonus stations for this mode
int NumberOfBonusStations() const;
// Return the number of bonus points awareded.
// Bonus points are only awarde... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
**
** Copyright (C) 2000-2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
*/
#include "core/p... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <sequtils.h>
using namespace std;
int main(int argc, char *argv[])
{
vector<int> col1;
back_insert_iterator<vector<int> > iter(col1);
// assigning a value to iterator adds the
// element in the array
*iter = 1;
*iter... |
/********************************************************************************
** Form generated from reading UI file 'mainwindow.ui'
**
** Created by: Qt User Interface Compiler version 4.8.6
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
****************************************... |
#include <assert.h>
#include <algorithm>
#include <climits>
#include <functional>
#include <iostream>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long long
using namespace std;
int n, m = 1e6;
vector<int> frq(m + 5);
struct Solution {
int solv... |
#include<cstdio>
#include<cstring>
#include<iostream>
#include<queue>
#include<algorithm>
using namespace std;
const int maxn=100;
const int cx[]={-1,1,0,0,0,0};
const int cy[]={0,0,-1,1,0,0};
const int cz[]={0,0,0,0,1,-1};
int l,r,c;
char M[maxn][maxn][maxn];
struct Node{
int z,x,y;
int step;
... |
// Created by: DAUTRY Philippe
// Copyright (c) 1997-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 GNU Lesser General Public Li... |
#ifndef SOCKS6MSG_USRPASSWD_HH
#define SOCKS6MSG_USRPASSWD_HH
#include "messagebase.hh"
#include "string.hh"
namespace S6M
{
class UserPasswordRequest: public MessageBase<SOCKS6_USERPASSWD_VERSION, uint8_t>
{
String username;
String password;
public:
UserPasswordRequest(const std::pair<std::string_view, std::st... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: AutomaState.h
* Author: Alessio Portaro
*
* Created on 10 dicembre 2018, 18.35
*/
#ifndef AUTOMASTATE_H
#define AU... |
/*
Copyright (c) 2014 Mircea Daniel Ispas
This file is part of "Push Game Engine" released under zlib license
For conditions of distribution and use, see copyright notice in Push.hpp
*/
#include "Render/Material.hpp"
#include "Render/RenderState.hpp"
#include "Render/VertexType.hpp"
#include "Render/VertexBuffer.hpp"
... |
#include <bits/stdc++.h>
using namespace std;
#define TESTC ""
#define PROBLEM "10237"
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define N 35
int main(int argc, char const *argv[])
{
#ifdef DBG
freopen("uva" PROBLEM TESTC ".in", "r", stdin);
freopen("uva" PROBLEM ".out", "w", stdout);
#endif
... |
// Created on: 1995-01-16
// Created by: Remi LEQUETTE
// 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 GNU ... |
#pragma once
#include <string>
class Stage;
/**
* 移動させる荷物を表すクラス
*/
class Cargo {
public:
// コンストラクタ
Cargo(int x, int y) :x_(x), y_(y) {};
Cargo(const Cargo&) = default;
Cargo(Cargo&&) = delete;
// デストラクタ
~Cargo() = default;
// 代入演算子
Cargo& operator=(const Cargo&) = delete;
Cargo& oper... |
// Copyright (c) 2016-2019 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... |
/**
* @file Basic_Allocator.hpp
*
* @brief This header contains the definition for a basic allocator that
* handles allocations with malloc/free.
*
* @author Matthew Rodusek (matthew.rodusek@gmail.com)
* @date August 18, 2015
*/
#ifndef VALKNUT_MEMORY_BASIC_ALLOCATOR_HPP_
#define VALKNUT_MEMO... |
// File: iprCube.cpp
// Date: 26th September 2013
// Description: Simple program to handle a cube with the IPR
// Author: Stefania Pedrazzi
// Modifications:
#include "IPR.hpp"
#include <webots/Robot.hpp>
#include <webots/DistanceSensor.hpp>
using namespace webots;
#define OBJECT_NUMBER ... |
#include "gm.hpp"
#include "log.hpp"
#include "scene/scened.hpp"
#include "scene/recharge.hpp"
#include "scene/db_log.hpp"
#include "net/stream.hpp"
#include "utils/service_thread.hpp"
#include "utils/exception.hpp"
#include "utils/yunying.hpp"
#include "config/serverlist_ptts.hpp"
#include "config/spine_ptts.hpp"
#inc... |
//: C09:EvaluationOrder.cpp
// Kod zrodlowy pochodzacy z ksiazki
// "Thinking in C++. Edycja polska"
// (c) Bruce Eckel 2000
// Informacje o prawie autorskim znajduja sie w pliku Copyright.txt
// Kolejnosc wyliczania funkcji inline
class Forward {
int i;
public:
Forward() : i(0) {}
// Wywolanie niezad... |
#include "DescriptionText.h"
DescriptionText::DescriptionText()
{
}
DescriptionText::~DescriptionText()
{
}
void DescriptionText::Init(Vector3 Position, Vector3 Scale, std::string type, std::string text)
{
position = Position;
scale = Scale;
this->type = type;
this->text = text;
}
std::string DescriptionText:... |
#include <iostream>
#include <string>
using namespace std;
string cigar_party(int cigars, bool weekend){
if(cigars>=40&&(cigars<=60||weekend==true))
return "True";
return "False";
}
int main(){
cout<<"30 cigars, not weekend: "<<
cigar_party(30,false)<<endl<<
"70 cigars, weekend: "<<
cigar_party(70, true)<<e... |
#ifndef AKTIVESVO_H_
#define AKTIVESVO_H_
#include <string>
#include <iostream>
extern double dGlobaleZeit;
// ************* Abstract class ***************
class AktivesVO{
protected:
int p_iID;
static int p_iMaxID;
std::string p_sName;
double p_dZeit;
protected:
Aktive... |
//
// ParkedCar.cpp
// yearLong
//
// Created by Surya on 31/03/13.
//
//
#include "ParkedCar.h"
ParkedCar::ParkedCar(){
}
//TODO: Initialist variables correctly
ParkedCar::ParkedCar(ofImage _img, ofVec2f _location){
img = _img;
acceleration = ofVec2f(0,0);
velocity = ofVec2f(0,0);
locati... |
/*************************************************************************************************/
/* @file aeMath.h
/*
/* @brief Declares the mathematics class.
/*************************************************************************************************/
#pragma once
#include "aePrerequisitesUtil.h"
#if AE_PL... |
/*
* There are N children standing in a line. Each child is assigned a rating value.
*
* You are giving candies to these children subjected to the following requirements:
*
* Each child must have at least one candy.
* Children with a higher rating get more candies than their neighbors.
* What is the minimum can... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
**
** Copyright (C) 2004 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Morten Stenshorne
**
*/
/* This is the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.