text stringlengths 8 6.88M |
|---|
#include <bidirectionallist.h>
#include <iostream>
#include <string>
#include <sstream>
#include <variant>
int main()
{
//1. Зацикливание
BidirectionalList list1;
list1.push_back(1);
std::cout << "list1: " << list1;
//2. Зацикливание
BidirectionalList list2;
list2.push_front(1.1f);
... |
#include <BinomialQueue.h>
#include <stdexcept>
//
// This file contains the C++ code from Program 11.15 of
// "Data Structures and Algorithms
// with Object-Oriented Design Patterns in C++"
// by Bruno R. Preiss.
//
// Copyright (c) 1998 by Bruno R. Preiss, P.Eng. All rights reserved.
//
// http://www.... |
#pragma once
#include "matched_filter.hpp"
namespace ugsdr {
class IppMatchedFilter : public MatchedFilter<IppMatchedFilter> {
protected:
friend class MatchedFilter<IppMatchedFilter>;
template <typename UnderlyingType, typename T>
static void Process(std::vector<std::complex<UnderlyingType>>& src_dst, cons... |
struct ListNode {
int val;
ListNode* next;
ListNode(int x) : val(x), next(nullptr) {}
};
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
ListNode* head = nullptr;
bool l1_finished = false;
bool l2_finished = false;
int carry = 0;
ListNode* p1 = l1;
ListNode* p2 = l2;
ListNode* p3 = nullptr;
while (... |
#include <iostream>
//Функция расчёта рас-ия меж 2-мя точками
//Функция сравнения 3-ёх чисел на равность хотя бы 2-ух их них
int main()
{
std::cout << "Hello World!\n";
}
|
//======include header======
#include "Lives.h"
//===============C-TORS===============
Lives::Lives(int lives) : m_number_of_live(lives) {};
//----------------------------------------------------------------------------
//===============Helpers===============
// decreases the lives
void Lives::decrese() { m_number_o... |
#include <stdio.h>
#include <iostream>
#include <string>
#include <math.h>
#include <cmath>
#include "repast_hpc/Utilities.h"
#include "repast_hpc/Properties.h"
#include <fstream>
#include <sstream>
using namespace std;
int main(void){
// open calibration output file
std::ofstream calibration_write;
std::cout ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef MODULES_HARDCORE_LOGGING_OPMESSAGELOGGER_H
#define MODULES_HAR... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2011 Opera Software ASA. 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 NS4P_COMPONENT_PLUGINS
#include "mo... |
#include <iostream>
#include <typeinfo>
#include <vector>
using namespace std;
class geshenk {
public:
virtual void rozpakuj() {
cout << "ta daaa" << endl;
}
virtual void typ() {
cout << typeid(*this).name() << endl;
}
};
class schlapmyca : public geshenk {
public:
void zaloz() {
cout << "jest ciepla" ... |
/*
这里包括交换排序的算法
1.冒泡排序
2.快速排序
*/
#include "iostream"
using namespace std;
#define MAXSIZE 10
typedef int KeyType;
typedef struct{
KeyType key;
}RedType;
typedef struct{
RedType r[MAXSIZE+1];
int length;
}SqList;
void InitSqList(SqList &L)
{
L.length =0;
}
void CreateSqList(SqList &L)
{
int i=0;
for(i=1... |
//
// Created by manout on 17-6-29.
//
#ifndef PRACTICE_FOR_CODING_ALL_INCLUDE_H
#define PRACTICE_FOR_CODING_ALL_INCLUDE_H
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <iterator>
//STL容器
us... |
/*
* Control.cpp
*
* Created on: Jan 21, 2018
* Author: robert
*/
#include "../inc/Control.h"
Control::Control() {
// TODO Auto-generated constructor stub
this->blue=0;
this->red=0;
this->fan=0;
this->crio=0;
}
Control::~Control() {
// TODO Auto-generated destructor stub
}
void Control::SetParams(i... |
/*
@lc app=leetcode.cn id=337 lang=cpp
*
[337] 打家劫舍 III
*/
// @lc code=start
/**
Definition for a binary tree node. */
#include<iostream>
#include<algorithm>
#include<map>
#include<vector>
using namespace std;
// struct TreeNode {
// int val;
// TreeNode *left;
// TreeNode *right;
// TreeNode(i... |
#include <iostream>
#include <fstream>
#include "JackTokenizer.h"
#include "CompilationEngine.h"
int main(int argc, char* argv[]){
if(argc == 0){
std::cout << "Usage: JackCompiler file1.jack file2.jack ..." << std::endl;
return 1;
}
std::string fileName;
for(int i = 1; i < argc; i++){
... |
#include "rdtsc_benchmark.h"
#include "ut.hpp"
#include <iostream>
#include <random>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <immintrin.h>
#include "compute_jacobians.h"
#include "linalg.h"
using namespace boost::ut; // provides `expect`, `""_test`, etc
using namespac... |
#include "pch.h"
#include "Quicksort.h"
#include "Swap.h"
#include <vector>
#include <chrono>
Quicksort::Quicksort() {}
Quicksort::~Quicksort() {}
int Quicksort::partition(std::vector<int> &vec, int low, int high) {
Swap sp;
int pivot = vec[high]; //pivot, the last value gave best results
int i = (... |
#include "../include/PlayerBody.h"
#include "../include/Lib.h"
namespace gnGame {
namespace {
// プレイヤーのパラメータ
const ActorParameter MaxPlayerParameter{100.0f, 120.0f, 5.0f, 5.0f, 10.0f};
}
// テスト用のコンストラクタ
PlayerBody::PlayerBody()
: PlayerBody({100.0f, 100.f, 10.0f, 10.0f, 10.0f})
{
}
PlayerBody::PlayerBo... |
#include<iostream>
#include<cstdio>
#define getint(n) scanf("%d",&n)
#define getd(a) scanf("%lf",&a)
using namespace std;
struct object {
int m;
double r;
int c;
}arr[100];
int main() {
int t,n,m,c,u,index = 0;;
double d,r,best;
getint(t);
while(t--) {
getd(d);
getint(u);
getint(n);
index = 0;
for(int ... |
// subsurf - main program for Subdivision Surface editor
//
// Zoran Popovic, Mar 1996 first incarnation as GerbilPole test prog.
// Paul Heckbert, Feb 1998 modified for 15-463 assignment P2 "surfed"
// Andrew Bernard, Feb 1999 modified for 15-463 assignment P2 "cellview"
// Paul Heckbert, Mar 1999 modified for 15-463... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowTitle("Compute");
this->pgen = new ProblemGenerator();
this->p = this->pgen->nextProblem();
this->updateDisplay()... |
// Copyright (c) 2012-2017 The Cryptonote developers
// 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.
#pragma once
#include <vector>
#include <unordered_map>
#includ... |
#include <iostream>
#include <vector>
#include <map>
#include <string>
using namespace std;
class BlackAndWhiteSolitaire {
public:
int minimumTurns(string cardFront)
{
int bcnt = 0;
char f = 'B';
for (int i=1; i<cardFront.size(); i+=2) {
if (f == cardFront.at(i)) {
++bcnt;
}
}
for (int i=0; i<ca... |
#ifndef __CHSSHA1_H__
#define __CHSSHA1_H__
#include "CHSSHABASE.h"
class CHSSHA1 : public CHSSHABASE
{
private:
static const unsigned __int32 DefaultMessageDijest[5];
unsigned __int32 MessageDijest[5];
unsigned __int32 Rotate(unsigned __int32,int);
unsigned __int32 GetConstData(int);
unsigned __int32 Logica... |
#include "DPolygon.h"
// **************** Constructor ***************************
DPolygon::DPolygon():
open(false)
{
}
// **************** set ***********************************
/*
void DPolygon::set(ClipInfo& clip, SDL_Point& _pos)
{
SDL_Rect rect = clip.clip;
pos = _pos;
focus = clip.focus;
origi... |
#pragma once
#include "ChangeMesh.h"
#include "Vertex.h"
#include <vector>
using std::vector;
struct Apples
{
typedef enum ApplesStates
{
SPAWNING,
SPAWNED,
ROTTING,
DECAYED,
};
ApplesStates appleStates;
ChangeMesh *appleMesh;
Vector3 position;
float timer;
bool spawned;
Vector3 newPosition;
flo... |
// SamplesS.h : main header file for the SAMPLESS application
//
#if !defined(AFX_SAMPLESS_H__F1F04740_CD06_456F_A97C_BA992D125C6C__INCLUDED_)
#define AFX_SAMPLESS_H__F1F04740_CD06_456F_A97C_BA992D125C6C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error inc... |
#include <iostream>
#include <cstring>
#define endl "\n"
#define MAX 30 + 1
using namespace std;
int N, M;
int dp[MAX][MAX];
void Initialize()
{
memset(dp, 0, sizeof(dp));
}
void Input() {
//scanf("%d %d", &n, &m);
cin>>N>>M;
}
// Solution int -> void 로 했더니 runtime error 해결됨ㅠㅠ
void Solution() {
f... |
// ----------------------------------------------------------------------------
// nexus | OpticalMaterialProperties.cc
//
// Optical properties of relevant materials.
//
// The NEXT Collaboration
// ----------------------------------------------------------------------------
#include "OpticalMaterialProperties.h"
#in... |
#include "BluetoothSerial.h"
#include <M5Core2.h>
#include "Spark.h"
#include "SparkIO.h"
#include "SparkComms.h"
SparkIO spark_io(false); // do NOT do passthru as only one device here, no serial to the app
SparkComms spark_comms;
unsigned int cmdsub;
SparkMessage msg;
SparkPreset preset;
SparkPreset ... |
/*
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 "Core/Log.hpp"
#include "Core/Stream.hpp"
#include "Core/Settings.hpp"
#include <cstdio>
namespace Push
{
bool GetReso... |
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#include "loop.hh"
#include <stdexcept>
#include "net/http_response_parser.hh"
#include "net/protobuf_stream_parser.hh"
#include "thunk/ggutils.hh"
#include "util/exception.hh"
#include "util/optional.hh"
#include "protobufs/gg.pb.h"
usin... |
/**
* created: 2013-4-9 16:51
* filename: FKDBSvrWorkThread
* author: FreeKnight
* Copyright (C):
* purpose:
*/
//------------------------------------------------------------------------
#include "FKDBSvr.h"
//------------------------------------------------------------------------
unsigned int __stdcall DBS... |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Gael Guennebaud <g.gael@free.fr>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Found... |
#ifndef _NIHTTPD_HTTP_H
#define _NIHTTPD_HTTP_H 1
#include <nihttpd/socket.h>
#include <map>
#include <vector>
#include <string>
#include <exception>
namespace nihttpd {
typedef std::map<std::string, std::string> key_val_t;
enum http_status_nums {
HTTP_200_OK = 200,
HTTP_400_BAD_REQUEST = 400... |
#pragma once
#include <algorithm>
#include <atomic>
#include <exception>
#include <functional>
#include <future>
#include <iomanip>
#include <iostream>
#include <memory>
#include <shared_mutex>
#include <unordered_map>
#include "IAsyncDictionary.hpp"
#include "tools.hpp"
#define SIZE 26
class AsyncNode
{
public:
... |
#define GLEW_STATIC
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#include <stdio.h>
#include "CL/cl.h"
#include "CL/cl_gl.h"
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <GL/glx.h>
#include <iostream>
#include <stdio.h>
#include <vector>
cl_context context;
cl_command_queue queue;
cl_uint num_of_platforms=0;
cl_... |
#include <iostream>
using namespace std;
void selectionSort(int arr[])
{
for (int i = 0; i < 5 - 1; i++)
{
int min = i;
for (int j = i + 1; j < 5; j++)
{
if (arr[j] < arr[min])
{
min = j;
}
}
if (min != i)
{
... |
/******************************************************************************
* Given a positive integer n, generate a square matrix filled with elements
* from 1 to n2 in spiral order.
******************************************************************************/
vector<vector<int>> generateMatrix(int n) {
vec... |
#define CATCH_CONFIG_MAIN
#include "../external/catch2/catch.hpp"
#include "../src/math/pair_prod.hpp"
#include <unordered_map>
#include <vector>
template <typename T, typename U>
struct TestStruct
{
std::vector<T> num1;
std::vector<U> num2;
std::unordered_map<T, U> actual;
TestStruct(
std:... |
//
// Copyright (C) BlockWorks Consulting Ltd - All Rights Reserved.
// Unauthorized copying of this file, via any medium is strictly prohibited.
// Proprietary and confidential.
// Written by Steve Tickle <Steve@BlockWorks.co>, September 2014.
//
#ifndef __SCHEDULER_HPP__
#define __SCHEDULER_HPP__
#include <cstdin... |
#ifndef CONTROLLER_H
#define CONTROLLER_H
#include <QTimer>
#include <rep_Controller_source.h>
class Controller : public ControllerSimpleSource
{
Q_OBJECT
public:
Controller(QObject *parent = nullptr);
~Controller();
bool currentState() const;
void setCurrentState(bool currentState);
virtual... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2019 The TurtleCoin developers
// Copyright (c) 2016-2020 The Karbo developers
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software... |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
bool cmp(pair<int, int> a, pair<int, int> b){
return a.first > b.first;
}
class Solution {
public:
ListNode* mergeKLists(vec... |
//#include "stdafx.h"
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include "header.h"
#include <fstream>
//TIMINT returns time step based on the CFL limit and the number of time steps needed to reach TTERM
//---------------------OUTPUT VARIABLES---------------------//
struct TIMINTstruct TIMINT(double L... |
/* -*- 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 VIS_DEV_LISTENERS_H
#define VIS_DEV_LISTENERS_H
#include... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/freeglut.h>
#endif
#include "instructions.h"
//Globals
Instructions ins;
bool isDrawPoint = true;... |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using u8 = uint8_t;
// const u8 ALPHA_SIZE = 128;
// u8 dist[ALPHA_SIZE];
int main(){
//vector<int> input;
int goodCount = 0;
while(!(cin.eof())){
// memset(dist, 0, ALPHA_SIZE*sizeof(u8));
unsigned int low, ... |
/* -*- 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.
*/
#ifndef MODULES_LIBVEGA_LIBVEGA_MODULE_H
#define MODULES_LIBVEGA_... |
// ChatSocket.cpp : implementation file
//
#include "stdafx.h"
#include "Chat.h"
#include "ChatSocket.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CWnd* CChatSocket::pWndMsgProc = NULL;
/////////////////////////////////////////////////////////////... |
/* -*- Mode: c++; tab-width: 4; 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.
*/
#include "core/pch.h"
#ifdef M2_SUPPORT
#include "rssmodule.h"
#include "adjunct/m2/s... |
#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
string a;
cout<<"Enter String: ";
cin>>a;
cout<<"Enter frame size: ";
int n;
cin>>n;
char f[n];
int j = 0;
int miss = 0;
int hit = 0;
for(int i = 0; i < a.length(); i++)
{
if(f[j] =... |
// Created on: 1994-03-09
// Created by: Isabelle GRIGNON
// Copyright (c) 1994-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... |
#include "engine.h"
std::vector<Color*> Color::table = (std::vector<Color*>)0;
std::vector<Color*> Color::ntable = (std::vector<Color*>)0;
double Color::max_mass = 5.0;
double Color::min_mass = 1.0;
static void grav_exit()
{
if (g_render->ren)
SDL_DestroyRenderer(g_render->ren);
if (g_render->win)
SDL_Destro... |
#include "gongdou_ptts.hpp"
#include "title_ptts.hpp"
#include "utils.hpp"
#include "mail_ptts.hpp"
#include "chat_ptts.hpp"
namespace nora {
namespace config {
gongdou_ptts& gongdou_ptts_instance() {
static gongdou_ptts inst;
return inst;
... |
#include "Stage.h"
#include <string>
#include <iostream>
#include <fstream>
#include "Game.h"
Stage::Stage(const std::string& init_data) {
//-------------------------
// ステージ幅,高さの取得
//-------------------------
width_ = init_data.find('\n');
height_ = 0;
auto w = width_;
while (w != -1) {
data_ +... |
#include <stack>
#include <iostream>
using namespace std;
void HeightOfCylinder(int *h,stack<int> s[]) {//to calculate the height of towers
for(int i=0;i<3;i++) {
int sum=0;
stack<int> temp=s[i];//temporary stack
while(!temp.empty()) {
sum+=temp.top();
temp.pop();
}
*(h+i)=sum;//assigning the cal... |
#pragma once
#include "cocos2d.h"
USING_NS_CC;
class SelectScene : public Scene {
public:
static SelectScene* createScene();
bool init() override;
CREATE_FUNC(SelectScene);
};
|
#include "stdafx.h"
#include <wrl/client.h>
#include "ApplicationMetadata.h"
#include "ziparchive.h"
#include "helper.h"
using doo::metrodriver::ApplicationMetadata;
using Windows::Data::Xml::Dom::XmlDocument;
using Windows::Data::Xml::Dom::XmlLoadSettings;
// instantiate Metadata from an extracted manifest on th... |
#include "receiver.h"
#include <QDebug>
Receiver::Receiver(QObject *parent) :
QObject(parent)
{
}
void Receiver::receiveFromQml(QString longi, QString lat) {
qDebug() << "Received in C++ from QML:" << longi <<" " <<lat;
}
|
#ifndef MENUCHECKBOX_H
#define MENUCHECKBOX_H
#include "MenuCaller.h"
class MenuCheckbox : public MenuCaller<void, bool>
{
public:
MenuCheckbox(std::string text, bool checked, Caller<void, bool>* calLOnClick = 0, UINT id = 0);
virtual ~MenuCheckbox();
void onClick();
bool insertC... |
#include "X11/Xlib.h"
#include "X11/Xutil.h"
#include "X11/Xos.h"
#include "stdlib.h"
#include "stdio.h"
Display *dis;
int screen;
Window win;
GC gc;
void init_x() {
/* get the colors black and white (see section for details) */
unsigned long black,white;
/* use the information from the environment variable DISP... |
#include<iostream>
#include<stdlib.h>
#include<pthread.h>
#include <time.h>
#include <fcntl.h> /* For O_* constants */
#include <sys/stat.h> /* For mode constants */
#include <semaphore.h>
#include <unistd.h>
#include <signal.h>
using namespace std ;
#define SHARED 0
#define BUFSIZE 20
int terminateth... |
#include "VeritasEngine.h"
#include "Drawable.h"
#include "ConstantBuffers.h"
std::unique_ptr<VertexConstantBuffer<TransformCbuf::Transforms>> TransformCbuf::pVcbuf;
TransformCbuf::TransformCbuf(VeritasEngine& gfx, const Drawable& parent, UINT slot)
{
pParent = &parent;
if (!pVcbuf)
{
pVcbuf = std::make_unique... |
// Copyright PixelSpawn 2020
#include "PressurePlateDepress.h"
#include "Components/AudioComponent.h"
#include "Components/StaticMeshComponent.h"
#include "GameFramework/Actor.h"
// Sets default values for this component's properties
UPressurePlateDepress::UPressurePlateDepress()
{
// Set this component to be initi... |
#include "Estoque.hpp"
#ifndef ESTOQUECAMISETAS_HPP_
#define ESTOQUECAMISETAS_HPP_
class EstoqueCamisetas: public Estoque{
public:
//Construtor
EstoqueCamisetas();
//Destrutor
~EstoqueCamisetas();
//Funções para manutenção do estoque.
void registraProduto(int qntd, char nome[50], float preco); //Exemplo Polimo... |
#include "CCDirector.h"
#include "CCGreePlatform.h"
#include "CCGreeUser.h"
#include "jni/Java_org_cocos2dx_lib_Cocos2dxGreePlatform.h"
#include "jni/Java_org_cocos2dx_lib_Cocos2dxGreeUser.h"
#include "jni/JniHelper.h"
#define JAVAVM cocos2d::JniHelper::getJavaVM()
using namespace cocos2d;
NS_CC_GREE_EXT_BEGIN
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2011-2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef MODULES_OTL_RANGE_H
#define MODULES_OTL_RANGE_H
/**
* ... |
#pragma once
#include "Keng/Core/IRefCountObject.h"
#include "Keng/GraphicsCommon/FwdDecl.h"
namespace keng::graphics::gpu
{
class ISampler : public core::IRefCountObject
{
public:
virtual void AssignToPipeline(const ShaderType& shaderType, size_t index) = 0;
};
}
|
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <list>
#include <algorithm>
#include <sstream>
#include <set>
#include <cmath>
#include <map>
#include <stack>
#include <queue>
#include <stdio.h>
#include <string.h>
using namespace std;
class PermutationSignature ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2006 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#include "core/pch.h"
#if defined(SVG_SUPPORT) && defined(SVG... |
//
// Created by litalfel@wincs.cs.bgu.ac.il on 16/01/2020.
//
#include <thread>
#include "../include/connectionHandler.h"
#include "../include/StompProtocol.h"
#include "../include/User.h"
#include <iostream>
vector<string> make_vector(string basicString);
using namespace std;
//login 127.0.0.1:6666 lital fel
// lo... |
#ifndef HEADER_CURL_SIGPIPE_H
#define HEADER_CURL_SIGPIPE_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* |... |
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <set>
#include <cstring>
using namespace std;
/*ϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕϕ*/
//#define int long long int
#define ld long double
#define F first
#define... |
#include <ESP8266WiFi.h>
#include "DHT.h"
#define DHTPIN D1 //Pin to attach the DHT
#define DHTTYPE DHT11 //type of DTH
const char* ssid = "your ssid";
const char* password = "your password";
//const int sleepTimeS = 1; //18000 for Half hour, 300 for 5 minutes etc.
///... |
#include <vector>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
#define MAX 1000000
class DengklekTryingToSleep {
public:
int minDucks(vector <int> ducks)
{
int mx = 0;
int mn = MAX;
for (int i=0; i<ducks.size(); ++i) {
mx = max(mx,ducks.at(i));
mn = min(mn,ducks.at(i)... |
#include "stitchTower.h"
void stitchNeighbors(size_t stitchType, Tower inA, Tower inB, Tower &outA, Tower &outB) {
#pragma HLS PIPELINE II=9
#pragma HLS INLINE
bool etaStitch = (stitchType == stitch_in_eta &&
inA.peak_eta() == inB.peak_eta() &&
inA.peak_phi() == 4 &&
inB.peak_ph... |
//
// Created by manout on 17-8-12.
//
#include <iostream>
#include <sstream>
#include <string>
#include <climits>
using std::string;
using std::stringstream;
using std::cout;
int reverse(int x)
{
int flag;
long num;
stringstream ss;
string num_str, re_str;
flag = x >= 0 ? 1 : -1;
ss << x;
... |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
//Definition for binary tree
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
TreeNode* reConstructBinaryTree(vector<int> pre, ve... |
#include ".\building.h"
#include "library.h"
#include "terrain.h"
#include "graphics.h"
#include "Camera.h"
#include "variables.h"
#include "input.h"
#include "timer.h"
extern Timer * timer;
extern gamevars *vars;
extern Camera *camera;
extern Library *library;
extern Terrain *terrain;
extern Graphics *r... |
/*
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... |
#include <Servo.h>
#include <HCSR04.h>
UltraSonicDistanceSensor Torre (13,12);
Servo Servo1;
float valor[10];
int angulo=-180;
int LED1 = 9;
int gambiarra = 0;
void setup (){
Serial.begin(9600);
Servo1.attach(3);
pinMode(9,OUTPUT);
digitalWrite(9,LOW);
}
void loop (){
Watch();
}
int Watch (){
int i=0;
f... |
#ifndef __HallHandler_H__
#define __HallHandler_H__
#include <map>
#include "CDLSocketHandler.h"
#include "Packet.h"
#include "DLDecoder.h"
#ifdef CRYPT
#include "CryptDecoder.h"
#endif
class HallHandler :public CDLSocketHandler, public CDLSocketHandler::PacketListener
{
public:
HallHandler();
virtual ~HallHandler... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2000-2012 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/pch.h"
#ifdef _MIME_SUPPOR... |
#ifndef PLAYER_H
#define PLAYER_H
#include<iostream>
#include<SFML/Graphics.hpp>
#include<../debugging_tolls.h>
#include<string>
/*!
* \brief Player class - pointers to player have a lot of usage in program.
* All Squares have pointer to player which were marked by
* pointers to players are also used by Engine clas... |
// 3.23实验View.cpp: CMy323实验View 类的实现
//
#include "pch.h"
#include "framework.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "3.23实验.h"
#endif
#include "3.23实验Doc.h"
#include "3.23实验View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMy323实验View
IMPLE... |
#include "ModelManager.h"
ModelManager::ModelManager(void)
{
}
ModelManager::~ModelManager(void)
{
}
ResourceHandle ModelManager::LoadResource(std::string filename)
{
auto iter = models.find(filename);
if(iter != models.end())
{
return iter->first;
}
}
ResourceHandle ModelManager::LoadCubeModel()
{
auto i... |
// Copyright (c) 2020 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/execution.hpp>
#include <pika/init.hpp>
#include <pika/testing.hpp>
#i... |
#include "dataflow.h"
using namespace std;
using namespace TENET;
Dataflow::Dataflow(Statement &&st, PEArray &&pe, Mapping &&mp):
_st(move(st)),
_pe(move(pe)),
_mp(move(mp))
{}
isl_union_map*
Dataflow::GetSpaceMap()
{
isl_union_map *space_map = _mp.GetSpaceMap();
space_map = isl_union_map_intersect_domain(space... |
#include "search-condition.h"
#include "wx/valgen.h"
#include "wx/valtext.h"
BEGIN_EVENT_TABLE(DisasterSearchDlg, wxDialog)
EVT_BUTTON(wxID_OK, DisasterSearchDlg::OnOk)
END_EVENT_TABLE()
DisasterSearchDlg::DisasterSearchDlg(const wxString& title)
:wxDialog(NULL,-1,title,wxDefaultPosition, wxSize(400,340))
{
new w... |
#pragma once
#include <iberbar/Utility/Platform.h>
#include <xmemory>
namespace iberbar
{
// 游戏命令基类
// 用于处理一些回调内部
class __iberbarUtilityApi__ CBaseCommand abstract
{
public:
virtual ~CBaseCommand() {}
virtual void Execute() = 0;
};
struct UCommandQueueOptions
{
bool bSync;
};
class __iberbarUtilityA... |
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without f... |
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;
#define MAX_N 100000
int n, e[MAX_N], m[MAX_N];
int heat()
{
// pair 두 객체를 하나의 객체로 취급
vector<pair<int,int>> order;
for (int i = 0;i< n; ++i)
{
// make_pair 변수1,2 가 들어간 pair 만들기
order.push_b... |
#pragma once
#include <string>
#include <d3d11.h>
#include <DirectXMath.h>
class Device;
class VertexShader {
public:
// コンストラクタ
VertexShader() = default;
VertexShader(const VertexShader&) = default;
VertexShader(VertexShader&&) = default;
// デストラクタ
~VertexShader() = default;
// 代入演算子
V... |
/****************************************************************
* TianGong RenderLab *
* Copyright (c) Gaiyitp9. All rights reserved. *
* This code is licensed under the MIT License (MIT). *
*****************************************************************/
#pragma once
namespace TG::Math
{
template... |
/*
This file is part of SMonitor.
Copyright 2015~2016 by: rayx email rayx.cn@gmail.com
SMonitor 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 ver... |
#ifndef ImWrapper_H
#define ImWrapper_H
#include "YIM.h"
class ImWrapper : public IYIMChatRoomCallback,
public IYIMContactCallback,
public IYIMDownloadCallback,
public IYIMLoginCallback,
public IYIMMessageCallback,
public IYIMNoticeCallback
{
public:
ImWrapper(... |
// Plot BSM Z' Monte-Carlo kinematics.
//
// Created by Samvel Khalatyan, Apr 14, 2011
// Copyright 2011, All rights reserved
#include <boost/logic/tribool.hpp>
#include <TH1D.h>
#include <TLorentzVector.h>
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FW... |
#include<iostream>
#include<fstream>
#include <map>
#include<string>
using namespace std;
struct Hash_Map {
typedef long long datatype;
struct node {
datatype data = 0;
node *next = NULL;
node(datatype data, node *next) :data(data), next(next) {}
node() {}
};
long long search(const long lon... |
/*
Copyright (c) 2021-2022 Xavier Leclercq
Released under the MIT License
See https://github.com/ishiko-cpp/tests/blob/main/LICENSE.txt
*/
#ifndef _ISHIKO_CPP_TESTS_HPP_
#define _ISHIKO_CPP_TESTS_HPP_
#include "TestFramework/Core.hpp"
#if 0 // TODO
#ifdef _DEBUG
#pragma comment(lib, "IshikoTestFramework-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.