text stringlengths 8 6.88M |
|---|
#include<iostream>
#include<cstring>
using namespace std;
class Customer
{ private:
char Customer_Name[20], E_mail[30];
int Customer_ID;
long int Telephone_Number;
char Address[50], NIC_NO[25];
public:
void Add_New_Customer(int id);
void Add_New_Customer( int id,char name[20],char email[30],l... |
// Copyright (c) 2018 Mikael Simberg
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <pika/future.hpp>
#include <pika/init.hpp>
#include <iostream>
#include <ran... |
#pragma once
#include<string>
#include<sstream>
#include<json/json.h>
#include<iostream>
#include<memory>
#include <unordered_map>
#include<unistd.h>
#include"speech.h"
#include"base/http.h"
#define SPEECH_FILE "temp_file/demo.wav"
#define PLAY_FILE "temp_file/play.mp3"
#define CMD_ETC "command.etc"
using namespace... |
#include<iostream>
#include<cstdio>
#include<map>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std;
const int INF = 1 << 30;
int a[100],fin,n,rec,len,use[100],ans[100];
void dfs(int k)
{
cout << k << endl;
if (fin) return;
if (k == rec+1)
... |
//Sentencias Logicas
|
#include "dds_uuid.h"
#include "hoist_request_publisher.h"
CHoistRequestPublisher::CHoistRequestPublisher()
{
}
CHoistRequestPublisher::~CHoistRequestPublisher()
{
DDS_String_free(m_pDataInstance->id);
}
bool CHoistRequestPublisher::Initialize()
{
CDdsUuid uuid;
uuid.GenerateUuid();
m_pDataInstance-... |
#include "header.cpp"
ll factorial(int n){ //O(n)
ll ans=1;
fr(i,1,n+1) ans=(ans*i)%INF;
return ans;
}
ll zeros(int n, int f){ //O(log(n))
ll ans=0, d=f;
while(d<=n){
ans+=n/d;
d*=f;
}
return ans;
}
ll fibonacci(int n){ //O(log(n))
ll a=0, b=1, x=1, y=0, k;
... |
/*********************************************************\
* Copyright (c) 2012-2018 The Unrimp Team
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without
* restriction, including wit... |
#include "mutiplex/EventLoop.h"
#include "mutiplex/InetAddress.h"
#include "mutiplex/Connection.h"
#include "mutiplex/ByteBuffer.h"
#include "EventSource.h"
#include "mutiplex/Timestamp.h"
#include <sys/eventfd.h>
#include <unistd.h>
#include "Debug.h"
namespace muti
{
EventLoop::EventLoop()
: pthread_id_(pthread... |
#ifndef TEXTURE_H
#define TEXTURE_H
class Scene;
#include <string>
#include "PhotonBox/core/ManagedResource.h"
#include "PhotonBox/core/ILazyLoadable.h"
#include "PhotonBox/core/OpenGL.h"
class Texture : public ManagedResource, public ILazyLoadable
{
public:
//Texture(bool generateMipMaps, bool hdr = false);
Text... |
int inited = 0;
void fase2() {
//Phase 2
switch (Cstate)
{
/* Start state
send #1 and change state
*/
case READY:
serial_write(MOV_2);
Cstate = MOVEMENT;
delay(500);
break;
/* Movement state
Move head while waiting for the END_MOV
*/
case MOVEMENT:
... |
//
// Texture.h
// Odin.MacOSX
//
// Created by Daniel on 30/09/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#ifndef __Odin_MacOSX__Texture__
#define __Odin_MacOSX__Texture__
#include <string>
#include "Vector4.h"
namespace odin
{
namespace resource
{
class Texture
{
pub... |
#pragma once
#include "llvm/IR/User.h"
#include "Value.h"
namespace LLVM
{
ref class Value;
ref class Use;
public ref class User
: public Value
{
internal:
llvm::User *base;
protected:
User(llvm::User *base);
internal:
static inline User ^_wrap(llvm::User *base);
public:
!User();
virtual ~User();
//
// vo... |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
int m,n;
typedef struct node{
int l;
int r;
int Long;
}node;
node Tu[10000];
int Distance[105];
//int P[105];
int Solu(int a,int b)
{
int i;
for(i=1;i<=n;i++)
{
... |
#include "stdafx.h"
#include "root.h"
Root* Root::ourInstance = NULL;
Root::Root()
{
myStateController = NULL;
}
Root::~Root()
{
}
void Root::Create()
{
if( ourInstance == NULL )
{
ourInstance = new Root();
}
}
void Root::Destroy()
{
SAFE_DELETE( ourInstance );
}
Root* Root::GetInstance()
{
return ourInstanc... |
#pragma once
class GameCursor;
class AIEditNodeOrder;
class AIEditLine;
class AIEditNodeProcess;
class AIEditNodeTechnique;
class AIEditNodeDeleteKey : public GameObject
{
public:
~AIEditNodeDeleteKey();
void OnDestroy();
bool Start();
void Update();
void deleteclick();
void SetOrder(AIEditNodeOrder* a);
pri... |
#ifndef TRAYICON_H
#define TRAYICON_H
#include <QSystemTrayIcon>
class MainWindow;
class QMenu;
class TrayIcon : public QSystemTrayIcon
{
Q_OBJECT
public:
TrayIcon(QObject *parent = nullptr);
~TrayIcon();
void quitApp();
private:
MainWindow *m_window{nullptr};
QMenu *m_traymenu{nullptr};
};
#... |
#pragma once
#include <string>
#include "PticaGovorunCore.h" // PG_EXPORTS
namespace PticaGovorun
{
PG_EXPORTS int phoneNameToPhoneId(const std::string& phoneName);
// Also used for drawing phones grid.
PG_EXPORTS void phoneIdToByPhoneName(int phoneId, std::string& phoneName);
extern "C" PG_EXPORTS int phoneMono... |
#include "stringVector.hpp"
void creatVector(std::vector<std::string>& strVec) {
std::string buffer = "";
std::cout << "Mutqagrel Vectori stringner@. Avarti hamar mutqagrel 0\n\n";
do{
std::getline(std::cin, buffer);
strVec.push_back(buffer);
} while(buffer != "0");
}
void removeSimbol... |
#include "observable.h"
Observable::Observable(int state)
: Stateful(state)
{
}
Observable::~Observable(void)
{
observers.clear();
}
void Observable::addObserver(Observer * observer)
{
observers.push_back(observer);
}
void Observable::remObserver(Observer * observer)
{
for (std::vector<Observer *>::... |
// Copyright (c) 2007-2021 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <pika/config.hpp>
#include <pika/testing.hpp>
#if defined(PIKA_HAVE_THR... |
#ifndef __CURSES_VESATERM_HPP_INCLUDED__
#define __CURSES_VESATERM_HPP_INCLUDED__
#include "basic_terminal_spec.hpp"
#define CRS_SINLE_TOP_LEFT 0xDA
#define CRS_SINLE_TOP_RIGHT 0xBF
#define CRS_SINLE_BOTTOM_LEFT 0xC0
#define CRS_SINLE_BOTTOM_RIGHT 0xD9
#define CRS_SINLE_HORIZONTAL 0xC4
#define CRS_SINLE_VERTICAL 0xB... |
/*
* Draughts AI implementation
*/
#include "DraughtsAI.h"
#include <iostream>
AI::AI() {
}
AI::AI(cellState playercolour) {
colour = playercolour;
if(colour == M_WHITE) {
direction = 1;
} else {
direction = -1;
}
searchDepth = 0;
for(int i=0; i<PARAM_TOTAL; i++) {
heuristic.setValue(HeuristicParamet... |
// SettingDlg.cpp : implementation file
//
#include "stdafx.h"
#include "BHMonitor.h"
#include "SettingDlg.h"
#include "BHMonitorDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
///////////////////////////////////////////////////////////////////////... |
#include "stdafx.h"
#include "CustomReportManager.h"
#include "CustomReport.h"
#include "TextFile.h"
#include "CategoryMgr.h"
#include "Category.h"
#include "Station.h"
CustomReportManager::CustomReportManager()
{
}
CustomReportManager::~CustomReportManager()
{
for (auto pReport : m_customReports)
{
delete pRepo... |
#include "RaseProcess.h"
#include "HallHandler.h"
#include "Logger.h"
#include "Configure.h"
#include "GameServerConnect.h"
#include "PlayerManager.h"
#include "GameCmd.h"
#include "RobotDefine.h"
#include "ProcessManager.h"
#include <string>
using namespace std;
RaseProcess::RaseProcess()
{
this->name = "RaseProcess... |
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <map>
#include <string>
#include <cstdio>
#include <cstring>
#include <climits>
using namespace std;
struct station {
double price;
int d;
bool operator< (const station& rhs... |
#include <iostream>
int func(){
int a = 1;
int b = 2;
std::cout << a << b;
std::cout << a+b << std::endl;
}
|
#include <iostream>
#include <stack>
#include <queue>
using namespace std;
#define OK 1
#define ERROR 0
struct Treenode
{
int m_data;
Treenode* m_lchild;
Treenode* m_rchild;
};
int InitialBitree(Treenode*& T);
void CreatBitree(Treenode*& T, int value);
void Preorder(Treenode* T);
void Preo... |
//
// nehe01.cpp
// NeheGL
//
// Created by Andong Li on 8/31/13.
// Copyright (c) 2013 Andong Li. All rights reserved.
//
#include "nehe01.h"
const char* NEHE01::TITLE = "NEHE01";
GLvoid NEHE01::ReSizeGLScene(GLsizei width, GLsizei height){
// Prevent A Divide By Zero By
if(height==0)
{
heigh... |
#include <fstream>
#include <stdlib.h>
#include <vector>
#include <cmath>
#include <iostream>
#include <sstream>
#include <vector>
#include <opencv2/opencv.hpp>
#include <opencv2/core/cuda.hpp>
#include <opencv2/cudaimgproc.hpp>
using namespace cv;
using namespace std;
double Reciprocal(const double &);
Mat Reciproca... |
#include "stdafx.h"
#include "MonsterActionManeger.h"
#include "MonsterAction.h"
#include "../GameData.h"
#include "Action/Act_Chase.h"
#include "Action/Act_Atack.h"
#include "Action/Act_Leave.h"
#include "Action/Act_Defense.h"
#include "Action/Act_Fire.h"
#include "Action/Act_Tackle.h"
#include "Action/Act_Guardian.h... |
#include <iostream>
#include <complex>
#include <type_traits>
template<bool B, typename T>
using Enable_if = typename std::enable_if<B, T>::type;
template<typename T>
constexpr
bool is_class() {
return std::is_class<T>::value;
}
template<typename T>
class smart_pointer {
public:
T &operator*();
template<... |
// Copyright 2011 Yandex
#ifndef LTR_SCORERS_COMPOSITION_SCORERS_MEDIAN_COMPOSITION_SCORER_H_
#define LTR_SCORERS_COMPOSITION_SCORERS_MEDIAN_COMPOSITION_SCORER_H_
#include <string>
#include "ltr/scorers/composition_scorers/order_statistic_composition_scorer.h"
using std::string;
namespace ltr {
namespace compositi... |
#include <GL/glut.h>
#include <cmath>
#include "point.h"
#include "line.h"
#include "circle.h"
#include "rectangle.h"
#include "triangle.h"
bool circle::overlaps(const point p) const {
return this->center.distance(p) <= this->radius;
}
bool circle::overlaps(const segment s) const {
return this->center.distance(s.... |
#include <FastLED.h>
#define LED_COUNT 32
#define LED_TYPE WS2812B
#define LED_FORMAT RGB
#define LED_DATA_PIN 8
#define GAMESTATE_BOOT 0
#define GAMESTATE_INTRO 1
#define GAMESTATE_PLAYING 2
#define GAMERULES_SET1 1
#define GAMERULES_SET2 2
#define PLAYER_1_PIN 2
#define PLAYER_2_PIN 3
#define RULE_... |
/*
Copyright 2021 University of Manchester
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 by applicable law or agreed to in writing, s... |
/****************************************
Zerus97
*****************************************/
#include <bits/stdc++.h>
#define loop(i,s,e) for(int i = s;i<=e;i++) //including end point
#define pb(a) push_back(a)
#define sqr(x) ((x)*(x))
#define CIN ios_base::sync_with_stdio(0); cin.tie(0);
#define... |
#pragma once
#include "ipc_medium.h"
#include "message.h"
#include <queue>
#include <memory>
namespace Petunia {
class IPCInternalMedium;
class IPCMediumNanomsg : public IPCMedium
{
public:
IPCMediumNanomsg(std::string &channel, ConnectionRole connection_role = ConnectionRole::Auto);
~IPCMediumNanomsg... |
#pragma once
#include "../../Graphics/Shader/ShaderParameter/ShaderParameterInt.h"
#include "../../UI/Dependencies/IncludeImGui.h"
namespace ae
{
namespace priv
{
namespace ui
{
inline void ShaderParameterIntToEditor( ShaderParameterInt& _ShaderParameterInt )
{
Int32 Value = _ShaderParameterInt.GetVal... |
#include "utils/gid.hpp"
#include <cppunit/extensions/HelperMacros.h>
#include <set>
#include <thread>
using namespace std;
namespace nora {
namespace test {
class gid_test : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(gid_test);
CPPUNIT_TE... |
#include "CharacterClassInfo.h"
|
#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#define INT_MAX 0x7fffffff
#define INT_MIN 0x80000000
using namespace std;
struct TreeLinkNode{
int val;
TreeLinkNode *left, *right, *next;
TreeLinkNode(... |
//analog inputs will be on Arudino Uno
//variables for measuring voltage
int batMonPin_12 = A4; //input for the voltage divider, needs to be analog, can be changed to other analog input
int batMonPin_24 = A5;
int vatVal = 0; //variable for the A/D value (still figuring out what this does)
float pinVoltage = 0; /... |
/**
* @file
* @author Aapo Kyrola <akyrola@cs.cmu.edu>
* @version 1.0
*
* @section LICENSE
*
* Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with... |
#include<bits/stdc++.h>
using namespace std;
#define MAX 110005
typedef pair<long long int,long long int>pa;
#define pb push_back
long long int INF=1e17;
vector<pa>adj[MAX]; // Graph
vector<pa>adjr[MAX]; // Reversed Graph
long long int v_for[MAX]; //virtual function for forward/main Graph
long long int v_ba... |
#include <chuffed/core/engine.h>
#include <chuffed/core/options.h>
#include <chuffed/core/propagator.h>
#include <chuffed/core/sat.h>
#include <chuffed/mip/mip.h>
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <sstream>
#define PRINT_ANALYSIS 0
SAT sat;
std... |
#include "record.hpp"
#include <cstring>
namespace elog
{
# ifdef ELOG_STATIC_RECORD
RecordBuf::RecordBuf()
{
std::memset(buffer_, 0, ELOG_RECORD_LEN);
if (ELOG_RECORD_LEN <= 0)
{
buffer_[0] = 0;
return;
}
buffer_[ELOG_RECORD_LEN - 1] = 0;
setp(buffer_, buffe... |
#include "Hw264Encoder.h"
CLASS_LOG_IMPLEMENT(CHw264Encoder, "CEncoder[264.hw]");
////////////////////////////////////////////////////////////////////////////////
CHw264Encoder::CHw264Encoder(AVCodecContext *videoctx, int fmt, CHwMediaEncoder *pEncode)
: CMediaEncoder(videoctx), m_pEncode(pEncode), m_pScales(0)
{
T... |
// Created on: 2001-12-13
// Created by: Peter KURNEV
// Copyright (c) 2001-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 ... |
#pragma once
#include "iframeprocessor.h"
#include <memory>
#include "Point2D.h"
namespace cvf
{
class ISingleFeatureTrackerWSecondaryPt;
};
namespace cvfn {
public ref class SingleFeatureTrackerWSecondaryPt : public IFrameProcessor
{
std::weak_ptr<cvf::ISingleFeatureTrackerWSecondaryPt> *mptrUnmanaged;
public:... |
// Created on: 1996-12-20
// Created by: Robert COUBLANC
// Copyright (c) 1996-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 GN... |
/*
* 替换句子中的空格为%20
*/
#include <bits/stdc++.h>
using namespace std;
class Solution{
public:
string replace_space(string str,int length){
int spaceNum = 0;
for(int i=0; i<length; ++i){
if(str[i] == ' '){
spaceNum++;
}
}
int newLength = length... |
/*
* Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
*
* Author: kirigaya <kirigaya@mkacg.com>
* 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... |
#include <Tanker/User.hpp>
#include <tuple>
namespace Tanker
{
bool operator==(User const& l, User const& r)
{
return std::tie(l.id, l.userKey, l.devices) ==
std::tie(r.id, r.userKey, r.devices);
}
bool operator!=(User const& l, User const& r)
{
return !(l == r);
}
}
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
char last, a;
cin >> last;
int ans = 1, max = 1;
while (cin >> a) {
if (a == last) {
ans ++;
} else {
ans = 1;
}
last = a;
if (ans > max)... |
#include<iostream>
#include<map>
#include<vector>
using namespace std;
typedef char EdgeData;
class EdgeNode {
public:
int adjvex;
EdgeData data;
EdgeNode * next;
EdgeNode(int adjvex, EdgeData data, EdgeNode * next) :
adjvex(adjvex), data(data), next(next) {
}
EdgeNode() :next(NULL) {
}
};
ty... |
#include <iostream>
using namespace std;
int main()
{
int n1=0,n2=1,n3,i,numbers=50;
cout<<n1<<", "<<n2<<", ";
for(i=2;i<numbers;++i)
{
n3=n1+n2;
cout<<n3<<", ";
n1=n2;
n2=n3;
}
return 0;
}
|
/* leetcode 189
*
*
*
*/
class Solution {
public:
void rotate(vector<int>& nums, int k) {
if (nums.empty() || k <= 0) {
return;
}
int len = nums.size();
k = k % len;
int start = 0;
int tmp = 0;
for (int cnt = 0; cnt < len; start++) {
... |
#pragma once
#include "merger_base.hpp"
#include "proto/data_guanpin.pb.h"
#include "utils/service_thread.hpp"
#include <memory>
using namespace std;
namespace pd = proto::data;
namespace nora {
class guanpin_merger : public merger_base {
public:
static guanpin_merger& instance() {
... |
#include <iostream>
void fillCordinates(int& x, int& y);
|
#include "font_shader.h"
namespace sloth {
std::shared_ptr<FontShader> FontShader::m_Inst(nullptr);
FontShader::FontShader()
: Shader(FONT_SHADER_VERTEX_FILE, FONT_SHADER_FRAGMENT_FILE)
{
getAllUniformLocation();
}
std::shared_ptr<FontShader> FontShader::inst()
{
if (m_Inst == nullptr)
m_Inst = FontS... |
#ifndef HAVE_PACK1
# error Expected HAVE_PACK1
#endif
#ifndef HAVE_PACK2
# error Expected HAVE_PACK2
#endif
#ifndef HAVE_PACK3
# error Expected HAVE_PACK3
#endif
#ifndef HAVE_PACK4
# error Expected HAVE_PACK4
#endif
#ifndef HAVE_PACK5
# error Expected HAVE_PACK5
#endif
#ifndef HAVE_PACK6
# error Expected HA... |
// Created on: 1993-06-23
// Created by: Jean Yves LEBEY
// 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
// the terms of the GN... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Engine/LevelScriptActor.h"
#include "SpherobotBaseLevelScriptActor.generated.h"
/**
*
*/
UCLASS()
class SPHEROBOT_API ASpherobotBaseLevelScriptActor : public ALevelScriptActor
{
GENERATED_BODY()
public:
/** S... |
#include <iostream>
#include <fstream>
using namespace std;
int main() {
ifstream infile;
infile.open("input/sum.in");
int t;
infile >> t;
int n;
cout << t << endl;
for (int i = 0; i < t; i++) {
infile >> n;
float sum = 0;
for (int j = 1; j <= n*n; j += n+1) {
... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QWidget>
#include <QGridLayout>
#include <QLCDNumber>
#include <QDebug>
#include <iostream>
#include <stdlib.h>
#include <string>
int infixToPostfix:: pres(char ope)
{
if(ope=='&')
return 0;
else if(ope=='(')
return 1;
else if(ope... |
/*
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(12, LOW);
an
delay(1000); // wai... |
// Created on: 1996-01-16
// Created by: Jean-Pierre COMBE
// Copyright (c) 1996-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 ... |
/*====================================================================
Copyright(c) 2018 Adam Rankin
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files(the "Software"),
to deal in the Software without restriction, including without limitati... |
#include <iostream>
#include <vector>
#include <unordered_map>
#include <set>
/*
* `track` runs O(n) and `get_rank_of_number` runs O(1)
*
* instead `track` could run O(1) and `get_rank_of_number` could run O(n)
*
* The book provides a solution where `track` runs in O(log(n))
* and `get_rank_of_number` runs in O... |
#pragma once
#include <stdexcept>
#include <winerror.h>
#include <string>
namespace WPD {
class WPDException : public std::runtime_error {
HRESULT c;
public:
WPDException(HRESULT code, const char *str);
WPDException(HRESULT code, const std::string &str);
HRESULT code() const;
... |
#include <QApplication>
#include <QPixmap>
#include "gamecontroller.h"
GameController *game;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//GameController is started!
game = new GameController();
game->Start();
game->mainmenuScreen->wallpaper();
//MainMenu w;
//w.show... |
#include<cstring>
#include<cstdio>
#include<iostream>
using namespace std;
const BASE=1000000;
char a[1010]
{int b;
while (cin >> a >> b)
{int len = strlen(a),ans = 1;
int n = (len - 1)/6 +1
for (int i = 1;i >= ; i++)
sscanf()
}
return 0;
}
|
#include <iostream>
#include "BLOCKCHAIN.h"
int main()
{
BlockChain Chain = BlockChain();
std::cout<<"Mining first block...."<<std::endl;
Chain.AddBlock(Block(1,"Block 1"));
std::cout<<"Mining second block...."<<std::endl;
Chain.AddBlock(Block(2,"Block 2"));
std::cout<<"Mining third block....... |
#include <iostream>
#include <cstring>
using namespace std;
struct xinxi
{
char name[20];
int yu,shu,wai,sum,ci;
};
int main()
{
int n,i,j,t,q;
xinxi stu[1024];
cin >> n;
for(i=0;i<n;i++)
{
cin >> stu[i].name >> stu[i].yu >> stu[i].shu >> stu[i].wai;
stu[i].sum=stu[i].yu+stu[... |
#ifndef SECURE_SOCKET_HPP
#define SECURE_SOCKET_HPP
#include <boost/asio/ssl/stream.hpp>
#include <boost/asio/ssl/context.hpp>
#include "socket.hpp"
namespace sp
{
class secure_socket: public socket
{
public:
secure_socket(boost::asio::io_service& ios);
virtual void async_connect(const acceptor::endpoint_type& ... |
#ifndef _TAG_POSITIONS_H_
#define _TAG_POSITIONS_H_
#include "server/rfidPositionerHeader.h"
#include <map>
#include <vector>
#include <math.h>
const int TAG_ID_MAX_SIZE = 16; //the maximum length of the tag id string
const double PI = 3.14159265358979323846;
const double PROBABILITY_OUTSIDE_MODEL = 0;
//ANTENN... |
#include <stdio.h>
#include <iostream>
using namespace std;
int main(void)
{
int ways = 0;
int coin_size = 200;
int a, b, c, d, e, f, g;
for (a = 0; a <= coin_size; a += 200)
for (b = 0; b <= coin_size; b += 100)
for (c = 0; c <= coin_size; c += 50)
for (d = 0; d <... |
#include "stdafx.h"
#include "MonsterBox.h"
#include "../GameData.h"
#include <memory>
#include <fstream>
#include <cmath>
bool MonsterBox::isGot(MonsterID id) {
LoadMyBox();
if (m_monsters[id])
return true;
else
return false;
//if(m_monsters % id == 0)
/*int flagnum[enNumMonster];
int mons = m_monsters;
f... |
#include "leftlpiece.h"
namespace
{
std::vector<TetrisCoordinate> buildCoordinates(
const TetrisCoordinate& centerCoordinate, int orientation)
{
switch (orientation)
{
case 0:
return { centerCoordinate, centerCoordinate.plusRows(1),
centerCoordinate.plusRows(2), centerCoor... |
#include <fstream>
#include "mp23_1_opt.h"
int main() {
ofstream in_pix("input_pixels_regression_result_mp23_1_opt.txt");
ofstream fout("regression_result_mp23_1_opt.txt");
HWStream<hw_uint<32> > in_update_0_read;
HWStream<hw_uint<32> > mp23_1_update_0_write;
// Loading input data
// cmap : { in_updat... |
// Created on: 1993-06-17
// Created by: Jean Yves LEBEY
// 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
// the terms of the GN... |
#include "comn.h"
#include "afxdao.h"
#pragma warning( disable : 4995 )
using namespace std;
//将实况插入数据库
bool insertDB(const char *dbname,const char * table, COleDateTime datet,vector<double> &vals)
{
CDaoDatabase daoDb;
COleVariant OleV1,OleV2 ;//日期和数值字段
try
{
daoDb.Open(dbname,0,0,";PWD=... |
#include <engine/vox.h>
#include <core/platform.h>
u32 vox_default_palette[256] = {
0x00000000, 0xffffffff, 0xffccffff, 0xff99ffff, 0xff66ffff, 0xff33ffff, 0xff00ffff, 0xffffccff, 0xffccccff, 0xff99ccff, 0xff66ccff, 0xff33ccff, 0xff00ccff, 0xffff99ff, 0xffcc99ff, 0xff9999ff,
0xff6699ff, 0xff3399ff, 0xff0099ff, 0xfff... |
#pragma once
#include "GlutHeader.h"
class Point2
{
public:
float axis[2];
Point2(float, float);
Point2(float*);
Point2();
~Point2();
float Distance(Point2);
float operator * (Point2);
Point2 operator * (float);
Point2 operator + (Point2);
bool operator == (Point2);
Point2 operator - (Point2... |
#ifndef _ZONEMANAGER_H_
#define _ZONEMANAGER_H_
#include <map>
#include "Zone.h"
#ifdef BOT_LOGIC_DEBUG_MAP
#define BOT_LOGIC_ZONE_LOG(logger, text, autoEndLine) logger.Log(text, autoEndLine)
#else
#define BOT_LOGIC_ZONE_LOG(logger, text, autoEndLine) 0
#endif
class ZoneManager
{
public:
ZoneManager(const ZoneM... |
#include "l10n/LocaleManager.h"
using namespace BeeeOn;
LocaleManager::~LocaleManager()
{
}
|
/********************************************************
CS200 Lab 4
Draw-Graph Implementation File
Writen by : Denise Byrnes
Modified by: Khoa Ngyuen, Eifu Tomita, Avi Vajpeyi
Purpose : Here we imlement the various functions that
are required to create the graphs, and the functions that
... |
#include <gtest/gtest.h>
#include "huobi_futures/linear_swap/restful/OrderClient.hpp"
typedef huobi_futures::linear_swap::restful::OrderClient OrderClient;
#include "config.hpp"
TEST(OrderClient, SwitchLeverRate)
{
extern map<string, string> config;
init_config();
OrderClient odClient(config["AccessKey"]... |
#include "function_call.h"
#include "expression.h"
#include "visitor.h"
Parameter_list::Parameter_list() {}
void Parameter_list::Accept(AbstractDispatcher& dispatcher) {
dispatcher.Dispatch(*this);
}
void Parameter_list::add_parameter(Expression* p) {
parameters.push_front(p);
}
Parameter_list::~Parameter_lis... |
#include "bricks/threading/taskqueue.h"
#include "bricks/threading/conditionlock.h"
#include "bricks/threading/mutexlock.h"
#include "bricks/threading/thread.h"
#include "bricks/threading/task.h"
#include "bricks/collections/autoarray.h"
#include "bricks/collections/queue.h"
namespace Bricks { namespace Threading {
T... |
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <set>
#include <stack>
#include <cstdio>
#include <cstring>
#include <climits>
#include <cstdlib>
... |
#include <iostream>
using namespace std;
struct BiNode
{
int value;
BiNode *ptr1, *ptr2;
BiNode(int v): value(v){}
};
void convert(BiNode *root, BiNode* &head, BiNode * &tail)
{
if(root == NULL)
{
head = tail = NULL;
return;
}
BiNode *lefthead, *lefttail;
BiNode *righthead, *righttail;
convert(root->pt... |
#ifndef _STATE_MANAGER_H_
#define _STATE_MANAGER_H_
#include <SFML/Graphics.hpp>
#include <list>
#include "Entity.h"
#include "Transition.h"
class State;
class StateManager : public Entity
{
public:
StateManager();
~StateManager();
void init(State * s);
void close() { m_isRunning = false;... |
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int maxn = 100 + 8;
//结构体
struct node {
int d;
int l;
int r;
}q[maxn];
int n, a;
int ans = 0;
void inorder(int k) {
if(q[k].l)
inorder(q[k].l);
ans++;
if(q[k].d == a) {
cout << ans << endl;
exit(0);
}
if(q[k]... |
//
// Created by 钟奇龙 on 2019-05-10.
//
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int minDistance(vector<string> strs,string s1,string s2){
if(strs.size() == 0) return -1;
if(s1 == s2) return 0;
int last1 = -1;
int last2 = -1;
int minDis = INT_MAX;
for(int i=0;... |
#pragma once
#include "MoveIncludes.h"
#include "Vec2.h"
#include "EyeImage.h"
#include "MoveBall.h"
namespace Move
{
class BallFitAlgorithm
{
private:
EyeImage* img;
public:
BallFitAlgorithm(EyeImage* img);
~BallFitAlgorithm();
void fitCircle(MoveBall* ball);
private:
std::ve... |
/****************************************************************************
** CopyRight(c) 2014,
** All rights reserved
**
** 文件名称: CSystemTrayIcon.h
** 摘要: 系统托盘类,需要根据服务器状态切换图标
**
** 当前版本: 1.0.0.0
** 作者: 宋斌斌
**
** 完成日期: 2014-11-23
**
** 历史修改记录:
** 作者 描述 修改时间 ... |
/* -*- 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.
*/
/**
* @file OCSPRequest_impl.h
*
* OpenSSL-based OCSP request conta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.