text stringlengths 8 6.88M |
|---|
#pragma once
#include <fstream>
#include <iostream>
#include "figure.hpp"
class Hexagon: public Figure {
private:
std::pair<double,double> center;
double side;
public:
Hexagon() = default;
Hexagon(std::pair<double, double> ¢er, double l) : center(center), side(l) {}
double Square() override {... |
class Solution {
public:
vector<vector<int>> generate(int numRows) {
int i = 0;
vector<vector<int>> ret;
while(i < numRows) {
vector<int> element;
int j = 1;
element.push_back(1);
while(j < i) {
element.push_back(ret[i - 1][j - ... |
#ifndef __QUADNODO_H__
#define __QUADNODO_H__
#include <iostream>
#include <string>
#include <list>
template< class T >
class QuadNodo {
protected:
T dato;
QuadNodo<T>* hijoIzq;
QuadNodo<T>* hijoDer;
QuadNodo<T>* hijoExtrIzq;
QuadNodo<T>* hijoExtrDer;
public:
QuadNodo();
... |
#pragma once
#include<bits/stdc++.h>
#include"HEAD.h"
using namespace std;
class Hotel
{
public:
friend class Data;
friend class Room;
public:
bool insert_room(const string &s);
bool delete_room(const int & n);
Hotel(const string & s,Data * d);
~Hotel();
const int & get_num() const;
const string & get_name()... |
/***********************************************************************
created: Sun Jan 11 2009
author: Paul D Turner
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - 2009 Pa... |
#ifndef __SCRIPT_PRAGMAS__
#define __SCRIPT_PRAGMAS__
#include "Common.h"
#include "Entity.h"
#include "angelscript.h"
#include "preprocessor.h"
#include <set>
#include <string>
#define PRAGMA_UNKNOWN ( 0 )
#define PRAGMA_SERVER ( 1 )
#define PRAGMA_CLIENT ( 2 )
#define PRAGMA_MAPPER ( 3 )... |
/*************************************************************
* > File Name : P1525.cpp
* > Author : Tony
* > Created Time : 2019/08/09 15:52:04
* > Algorithm : UFS
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
inline... |
/*
** Copyright (c) 2016, Xin YUAN, courses of Zhejiang University
** All rights reserved.
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the 2-Clause BSD License.
**
** Author contact information:
** yxxinyuan@zju.edu.cn
**
*/
/*
This file contains ... |
#pragma once
#include "../manager/EntityManager.h"
#include "../manager/LevelManager.h"
#include "../pathfinding/pathfinder.h"
namespace Task
{
class Action
{
protected:
Entity *entity, *target;
GridBool *grid;
bool result;
public:
std::string entityName, targetName;
static EntityManager* entityManager;
... |
#pragma once
#include "resource.h"
#include "tpScanTable.h"
// CAppViewerDlg dialog
#include "..\include\holdem\Common\SitHoldem.h"
#include <vector>
class CAppViewerDlg : public CDialogEx
{
DECLARE_DYNAMIC(CAppViewerDlg)
public:
CAppViewerDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CAppViewerDl... |
#include <iostream>
#include <ctime>
#include <Windows.h>
#include <string>
using namespace std;
class Time
{
public:
Time();
Time::Time(int h, int m, int s, clock_t St,int,int);
Time::Time(int);
~Time();
void goTime(clock_t start)
{
clock_t stop;
int i = getSec();
while (true)
{
stop = clock();
... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* whatever.hpp :+: :+: :+: ... |
// This file is subject to the terms and conditions defined in 'LICENSE' included in the source code package
#include "gui/components.h"
#include <imgui.h>
#include "core/convert.h"
#include "game/input/mouse_selection.h"
#include "game/logistic/inventory.h"
#include "gui/colors.h"
#include "gui/context.h"
#include ... |
/*
* File: MarkovChain.cpp
* Author: donerkebab
*
* Created on March 12, 2014, 5:11 AM
*/
#include "MarkovChain.h"
#include <cstdio>
#include <memory>
#include <queue>
#include <string>
#include "ChainFlushError.h"
#include "Point.h"
namespace Mcmc {
MarkovChain::MarkovChain(std::shared_ptr<Mcmc:... |
#include "PhysBody3D.h"
#include "glmath.h"
#include "Bullet/include/btBulletDynamicsCommon.h"
#include "ModulePhysics3D.h"
// =================================================
PhysBody3D::PhysBody3D(btRigidBody* body) : body(body)
{
body->setUserPointer(this);
}
// --------------------------------------------------... |
#ifndef FOGCASESTATEMENT_HXX
#define FOGCASESTATEMENT_HXX
class FogCaseStatement : public FogStatement
{
typedef FogStatement Super;
typedef FogCaseStatement This;
TYPEDECL_SINGLE(This, Super)
FOGTOKEN_MEMBER_DECLS
FOGTOKEN_LEAF_DECLS
private:
FogExprRef _case; // nil for de... |
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#ifndef JACTORIO_INCLUDE_PROTO_TRANSPORT_BELT_H
#define JACTORIO_INCLUDE_PROTO_TRANSPORT_BELT_H
#pragma once
#include "proto/abstract/conveyor.h"
namespace jactorio::proto
{
class TransportBelt final : public Conv... |
#ifndef SINGLY_LINKED_LIST_H
#define SINGLY_LINKED_LIST_H
#include "Container.hpp"
/**
* A minimal singly-linked list with front insertion.
*
* @tparam U is the type of element stored in the list
*/
template<class U>
class SinglyLinkedList : public Container<U> {
struct node {
U data;
node *ne... |
#ifndef _shpchunk_hpp
#define _shpchunk_hpp 1
#include "chunk.hpp"
#include "chnktype.hpp"
#include "mishchnk.hpp"
// shape flags
#define SHAPE_FLAG_PALETTISED 0x0000100
#define SHAPE_FLAG_USEZSP 0x0000200
#define SHAPE_FLAG_USEAUGZS 0x0000400
#define SHAPE_FLAG_USEAUGZSL 0x0000800
#define SHAP... |
//
// Created by vybirto1 on 16.3.18.
//
#include "CException.h"
|
#include "genetics.h"
const double Neuron::ACTIVATION_RESPONSE = 1.0;
|
// Copyright (c) 2014-2019 winking324
//
#include "view/video_widget.h"
namespace avc {
VideoWidget::VideoWidget(QWidget *parent)
: QWidget(parent) {
}
int VideoWidget::SetViewProperties(int zOrder, float left, float top, float right, float bottom)
{
}
int VideoWidget::DeliverFrame(const agora::media::IVideo... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#ifndef WIZAPI_H
#define WIZAPI_H
#include "wizdef.h"
#include "wizXmlRpcServer.h"
#include "wizobject.h"
#include "wizDatabase.h"
#define WIZ_API_VERSION "3"
#define WIZ_API_URL "http://service.wiz.cn/wizkm/xmlrpc"
#define WIZAPI_TRUNK_SIZE 512*1024
#define WIZAPI_PAGE_MAX 80
#define WIZAPI_RETURN_SUCCES... |
/*
Copyright (c) 2017, Matthew Toews
All rights reserved.
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install, copy or use the software.
Redistribution and use in source and binary forms, with or without
modific... |
// MFCSingleScrollDoc.cpp : implementation of the CMFCSingleScrollDoc class
//
#include "stdafx.h"
// SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail
// and search filter handlers and allows sharing of document code with that project.
#ifndef SHARED_HANDLERS
#include "MFCSingleScroll.... |
#include "Number.h"
Number::Number(std::string input) {
this->number = input;
}
std::string Number::calculate() {
return this->number;
} |
#ifndef _GLSLSHADER_H
#define _GLSLSHADER_H
//#include <windows.h>
#include <gl/glew.h>
#include <string>
#include <iostream>
using namespace std;
/*
定义一些全局函数,用来测试显卡对GL扩展的支持
*/
static bool g_bUseGLSL = false;
static bool g_bInitGLExtension = false;
bool CheckGLSL(void);
bool CheckGL2(void);
//初始化glew
boo... |
#include <stdio.h>
#include <string.h>
int main(void)
{
char *str1 = "Borland International", *str2 = "national !";
char *result;
result = strstr(str1, str2);
if (result)
printf("The substring is: %s\n", result);
else
printf("Not found the substring");
return 0;
} |
#include "EchoServer.h"
#include "TcpConnection.h"
#include "../../include/WebPageQuery.h"
#include "../../include/configuration.h"
#include "../../include/loadFile.h"
#include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;
void onConnection(const TcpConnectionPtr & conn)
{
cout... |
// forword linklist
#include<iostream>
using namespace std;
struct link{
int data;
link* next;
};
class linklist{
private:
link* first,*ptr;
public:
//link* ptr;
linklist(){
first = NULL;
//ptr = NULL;
link* test = new link;
cout<< " enter first data"<< endl;
cin>> test -> data;
firs... |
/**
* Copyright 2017
*
* This file is part of On-line POMDP Planning Toolkit (OPPT).
* OPPT is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License published by the Free Software Foundation,
* either version 2 of the License, or (at your option) any later ver... |
// Led5kSDKDemo.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "Led5kSDKDemo.h"
#include "Led5kSDKDemoDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CLed5kSDKDemoApp
BEGIN_MESSAGE_MAP(CLed5kSDKDemoApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CLed5kSDKDemoApp 构造
CLed5kSDKDe... |
#include "BranchAndBoundQueue.h"
#include <iostream>
#include <sstream>
using namespace std;
BranchAndBoundQueue::BranchAndBoundQueue()
{
length = 0;
first = NULL;
}
BranchAndBoundQueue::~BranchAndBoundQueue()
{
BBElemQueue * pointer;
pointer = first;
while (first)
{
pointer = first->next;
delete[] first->... |
#include <cstdio>
#include <vector>
#include <queue>
using namespace std;
const int MAXN = 1010;
const int MAXT = 2010;
const int INF = 0x3fffffff;
struct node
{
int v;
int weight;
};
int N, T;
vector<node> graph[MAXT];
int d[MAXT];
bool inq[MAXT];
void spfa()
{
fill(d, d + MAXT, INF);
fill(inq, inq... |
#ifndef __WHISKEY_Core_Verbose_HPP
#define __WHISKEY_Core_Verbose_HPP
#include <ostream>
#define W_VERBOSE_PATH_MAXLEN 256
#ifdef W_ENABLE_VERBOSE
#define W_VERBOSE(desc) { \
if (::whiskey::verbose) { \
::whiskey::printVerbosePrefix(__FILE__, __LINE__, __FUNCTION__); \
::whiskey::getVerboseOStream() << desc; \
... |
/* Idesk -- Action.h
*
* Copyright (c) 2002, Chris (nikon) (nikon@sc.rr.com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above ... |
#include<bits/stdc++.h>
using namespace std;
//The above problem can be easily solved if O(n) extra space is allowed. It becomes interesting due to the limitations that O(1) extra space and order of appearances.
//The idea is to process array from left to right. While processing, find the first out of place element i... |
#ifndef STORERFORELLIPSE_H_
#define STORERFORELLIPSE_H_
#include "Storer.h"
class StorerForEllipse : public Storer {
public:
void save(Graph* g, ofstream& f);
Graph* load(int id, ifstream& f);
};
#endif // !StorerFORCIRCLE_H_
#pragma once
|
/*
* @lc app=leetcode.cn id=224 lang=cpp
*
* [224] 基本计算器
*
* https://leetcode-cn.com/problems/basic-calculator/description/
*
* algorithms
* Hard (36.88%)
* Likes: 158
* Dislikes: 0
* Total Accepted: 11.2K
* Total Submissions: 30.3K
* Testcase Example: '"1 + 1"'
*
* 实现一个基本的计算器来计算一个简单的字符串表达式的值。
* ... |
class Solution {
public:
void rotate(vector<int>& nums, int k) {
int new_k = k % int(nums.size());
if(new_k == 0) return;
reverse(nums.begin(), nums.end());
// second parameter should be the begin() + length of the target array
reverse(nums.begin(), nums.begin() + new_k);
... |
//===--- MandatoryOptUtils.cpp --------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
// This file has been generated by Py++.
#ifndef OpenGLTextureTarget_hpp__pyplusplus_wrapper
#define OpenGLTextureTarget_hpp__pyplusplus_wrapper
void register_OpenGLTextureTarget_class();
#endif//OpenGLTextureTarget_hpp__pyplusplus_wrapper
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
double meal;
cin >> meal;
int tip;
cin >> tip;
int tax;
cin >> tax;
cout << round(meal * (1 + (tip + tax) * 0.01)) << endl;
return 0;
}
|
/*NodeStoreAsyncTest.cpp
NodeStoreAsync
copyright Vixac Ltd. All Rights Reserved
*/
#include "NodeStoreAsync.h"
#include "Node.h"
#include "NodeGenAsync.h"
#include "LocalNodeStore.h"
#include <gtest/gtest.h>
#include <functional>
namespace VI = vixac;
namespace IA = VI::ina;
namespace IN = vixac::inout;
namesp... |
#include "Model.h"
Model::Model(std::vector<Mesh> meshes) {
this->meshes = meshes;
} |
#include <iostream>
using namespace std;
struct Item
{
char fullname[35];
double payment;
};
class Stack
{
private:
enum {MAX = 10}; // constant specific to class
Item items[MAX]; // holds stack items
int top; // index for top stack item
public:
Stack();
bool isempty() const;
bool isfull() const;
//... |
#ifndef _HO_EFFECT_
#define _HO_EFFECT_
//Effect Object들의 기본 클래스..
#define CLASS_NONE 10000
#define CLASS_PRIMITIVE_BILLBOARD 20000
#define CLASS_PAT 30000
#define CLASS_ID_PARTICLE_DEST 40000
class HoEffectObject
{
protected:
float WorldX, WorldY, WorldZ;
float LocalX, LocalY, LocalZ;
int Sta... |
#include <iostream>
#include "SavingsManager.h"
using namespace std;
int main() {
char choice;
SavingsManager savingsManager("users.xml", "incomes.xml", "expenses.xml");
while (true) {
if (!savingsManager.checkIfUserIsLoggedIn()) {
choice = savingsManager.choseOptionFromMainMenu();... |
//
// ShadowAssault.h
// Boids
//
// Created by chenyanjie on 7/14/15.
//
//
#ifndef __Boids__ShadowAssault__
#define __Boids__ShadowAssault__
#include "SkillNode.h"
class ShadowAssault : public SkillNode {
private:
float _damage;
public:
ShadowAssault();
virtual ~ShadowAssault();
static... |
#ifndef SARIBBONPANNELOPTIONBUTTON_H
#define SARIBBONPANNELOPTIONBUTTON_H
#include <QToolButton>
#include "SARibbonGlobal.h"
class QAction;
/**
* @brief Pannel右下角的操作按钮
*
* 此按钮和一个action关联,使用@ref SARibbonPannel::addOptionAction 函数用于生成此按钮,正常来说
* 用户并不需要直接操作此类,仅仅用于样式设计
* 如果一定要重载此按钮,可以通过重载@ref SARibbonElementCreateDel... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "../base.h"
#include "Windows.Devices.SerialCommunication.0.h"
#include "Windows.Foundation.0.h"
#include "Windows.Storage.Streams.0.h"
#include "Windows.Foundation.1.h"
WINRT_EXPORT ... |
#include <iostream>
#include <math.h>
#include <fstream>
using namespace std;
// function to perform one step of the explicit method
double* explstep(double xn[2], double dt, double zw){
zw = xn[0];
xn[0] += dt*xn[1];
xn[1] -= dt*zw;
return xn;
}
// function to perform one step in the implicit ... |
//
// sceneManager.hpp
// led_matrix
//
// Created by Alex on 17.11.15.
//
//
#ifndef sceneManager_h
#define sceneManager_h
#include "scenes.h"
class sceneManager : public ofBaseApp{
public:
vector < scene * > scenes;
sceneIntro intro;
sceneMirror mirror;
ofColor pixelMatrixBlen... |
#include <cassert>
#include <iomanip>
#include <iostream>
#include "json.hpp"
#include "CCloudGCP.hpp"
#include "CLinkSelector.hpp"
#include "SFile.hpp"
namespace gcp
{
CBucket::CBucket(std::string&& name, CRegion* region)
: CStorageElement(std::move(name), region),
mRegion(region)
{}
... |
#include "studentsummation.h"
//Tevékenység: Meghatározza az adott neptunkódhoz tartozó átlagot.
//Bemenet:Student
//Kimenet:Student
void StudentSummation::Add(const Student &x)
{
result->neptun = student.neptun;
result->summark += x.summark; //jegyek summázása
result->pcs += 1; //azonos neptun kód hánysz... |
/* Copyright 2017-2018 All Rights Reserved.
* Gyeonghwan Hong (redcarrottt@gmail.com)
*
* [Contact]
* Gyeonghwan Hong (redcarrottt@gmail.com)
*
* 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 Lic... |
/*
* Copyright (c) 2006-2016 RDA Microelectronics, 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... |
#ifndef KDTREE_H
#define KDTREE_H
#include "kdtree_c.h"
namespace location
{
struct xyz_coords
{
double x, y, z;
double distance(xyz_coords const& r)
{
return sqrt(pow(x-r.x,2)
+ pow(y-r.y,2)
+ pow(z-r.z,2));
}
};
class KDTree
{
kdtree* self_;
... |
#ifndef _SAGEFUNCTORS_H
#define _SAGEFUNCTORS_H
/// \file sageFunctors.h
/// This file implements utility functors for using sage containers
/// with STL functions:
/// - ScopeSetter, VarRefBuilder, InitNameCloner, and SageInserter
/// (a generic inserter for sage containers).
/// \email pet... |
/**
* **** Code generated by the RIDL Compiler ****
* RIDL has been developed by:
* Remedy IT
* Westervoort, GLD
* The Netherlands
* http://www.remedy.nl
*/
#ifndef __RIDL_TESTC_H_HHACBDCA_INCLUDED__
#define __RIDL_TESTC_H_HHACBDCA_INCLUDED__
#pragma once
#include /**/ "ace/pre.h"... |
#include <vector>
#include <string>
#include "Player.h"
class Card { // abstract class
string name;
int cost;
string description;
Player *Owner;
public:
virtual ~Card();
enum cardType {Minion = 0, Spell, Enchantment, Ritual}
virtual cardType getType()=0;
};
std::ostream &operator<<(std::ostream &out, cons... |
#include <iostream>
#include "abstractfactory.hpp"
using std::cout;
using std::endl;
FigureFactory::FigureFactory() {
}
FigureFactory::~FigureFactory() {
}
RoundFactory::RoundFactory() {
cout<<"Init RoundFactory"<<endl;
}
RoundFactory::~RoundFactory() {
}
MaskARound* RoundFactory::CreateFigureA() {
return ... |
#ifndef MAINWINDOWPAINTER_H
#define MAINWINDOWPAINTER_H
#include <QMainWindow>
#include <QtGui/QPainter>
#include <stdio.h>
namespace Ui {
class MainWindowPainter;
}
class MainWindowPainter : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindowPainter(QWidget *parent = 0);
~MainWindowPainter();
pri... |
//
/// \file
/// \brief ublas storage array compatible with numpy
/// \ingroup python
//
#ifndef __NUMPY_ARRAY_UBLAS_HPP__
#define __NUMPY_ARRAY_UBLAS_HPP__
#include <cstdlib>
#include <numeric>
#include <complex>
#include <jflib/python/helpers.hpp>
#include <boost/assert.hpp>
#include <boost/numeric/ubla... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#include<time.h>
clock_t cstart, cend;
double cpu_time_used;
using namespace std;
struct AvlNode
{
AvlNode* left;
AvlNode* right;
int data;
int height;
int count;
};
void trav_... |
#include "api_v1_String.h"
using namespace api::v1;
using namespace std;
//add definition of your processing function here
void String::split_string(
const HttpRequestPtr& req,
function<void (const HttpResponsePtr &)> &&callback,
string str,
string delimiter
) const {
size_t last = 0;
size_t next = 0;
Js... |
/*
* Copyright 2016-2017 Flatiron Institute, Simons Foundation
*
* 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 ... |
/***************************************************************************
* Filename : ImGuiBuild.cpp
* Name : Ori Lazar
* Date : 29/10/2019
* Description : Build version file includes and defines for imgui layer to function
with the multi-window branch.
.---.
.'_:___".
|__ --=... |
/*
* Copyright (c) 2006-2016 RDA Microelectronics, 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... |
#ifndef WORKER_H
#define WORKER_H
#include "employee.h"
#include <qfile.h>
#include <qtextstream.h>
#include <qlist.h>
/**
* @brief Класс Рабочий
*/
class Worker : public Employee
{
public:
/**
* @brief Конструктор класса Worker
* @param fio фамилия и инициалы рабочего
* @param uniqueNumber идент... |
#include<bits/stdc++.h>
using namespace std;
char str[100005];
int main() {
gets(str);
int len = strlen(str);
for(int i = len - 1; i >= 0; i--) {
if(str[i] == ' ') {
for(int j = i + 1; j < len && str[j] != ' '; j++)
cout << str[j];
cout << ' ';
} el... |
#include "mgtools_Motion.hpp"
#include <tuple>
#include <numeric>
#include <fstream>
#include <iostream>
#include "cpptools_Files.hpp"
#include "cpptools_Logger.hpp"
#include "cpptools_Strings.hpp"
#include "cpptools_Timer.hpp"
#include "gltools_Loader.hpp"
#include "Settings.hpp"
namespace imog {
// * Helpers
//... |
#include <iostream>
#include<time.h>
using namespace std;
int prime(int n)
{
if (n <= 1)
return 0;
else if (n <= 3)
return 1;
else if (n % 2 == 0 || n % 3 == 0)
return 0;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return 0;
... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Graphics::Printing3D {
struct Printing3DBufferDescription;
}
namespace Windows::Graphics::Printing3D {
using Printing3DBufferDescrip... |
#ifndef CONTINUITYMANAGER_H
#define CONTINUITYMANAGER_H
#include "enumController.h"
#include "Blogpost.h"
struct Date{unsigned short int day;
monthsEnum month;
unsigned short int year;};
struct DailyArticleGroup{articles art1;
articles art2;
... |
/****************************************************************************
**
** Copyright (C) 2009 Du Hui.
**
****************************************************************************/
#ifndef COMCONFIGDIALOG_H
#define COMCONFIGDIALOG_H
#include <QtGui/QDialog>
#include "qserialcomm.h"
namespace... |
#ifndef KLASA_LISTAPRZEDMIOTOW_HPP
#define KLASA_LISTAPRZEDMIOTOW_HPP
/*Plik Klasa_ListaPrzedmiotow.h zawiera:
- deklaracja klasy ListaPrzedmiotow*/
//Import plikow naglowkowych
//Import bibliotek
//#include <iostream>
//#include <string>
//#include <vector>
//#include <fstream>
//using std::cout;
//using std::cin;
... |
#include "kmp.h"
KMP::KMP(std::string haystack_, std::string needle_){
needle = needle_;
haystack = haystack_;
}
std::vector<size_t> KMP::knuthMorrisPrattTable(){
std::vector<size_t> initTable(needle.size() + 1, -1);
for(size_t index = 1; index <= needle.size(); index++){
size_t position = ini... |
#include <Arduino.h>
//DS18B20 probe libraries
#include <OneWire.h>
#include <DallasTemperature.h>
//TFT screen libraries
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <XPT2046_Touchscreen.h>
#include <WiFi.h>
//Webserver libraries
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
float targe... |
#include <algorithm>
#include <array>
#include <iostream>
#include <iterator>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define ll long long
using namespace std;
typedef tuple<ll, ll, ll> tp;
typedef pair<ll, ll> pr;
const ll MOD = 1000000007;
const ll INF = 1e... |
#ifndef __FGPlayerWheel_H__
#define __FGPlayerWheel_H__
class FGPlayer;
class FGPlayerWheel : public LivingObject
{
protected:
FGPlayer* m_pPlayer;
public:
FGPlayerWheel();
virtual ~FGPlayerWheel();
virtual void Update(double TimePassed);
void SetAttachedPlayer(FGPlayer* aPlayer);
virtual... |
/**
*
* @file MultipleIK.hpp
* @author Naoki Takahashi
*
**/
#pragma once
#include "InverseProblemSolverBase.hpp"
#include "../Parameters.hpp"
#include "../ControlPointMap.hpp"
namespace Kinematics {
namespace InverseProblemSolvers {
template <typename Scalar>
class MultipleIK : public InverseProble... |
#include "physics\Singularity.Physics.h"
namespace Singularity
{
namespace Extensions
{
class CharacterController : public Singularity::Physics::Collider
{
DECLARE_OBJECT_TYPE;
private:
#pragma region Variables
Vector3 m_kVelocity;
Vector3 m_kSize;
Vector3 m_kCenter;
... |
/**
* // This is the MountainArray's API interface.
* // You should not implement it, or speculate about its implementation
* class MountainArray {
* public:
* int get(int index);
* int length();
* };
*/
class Solution {
public:
int findInMountainArray(int target, MountainArray &mountainArr) {
... |
#include <card.h>
#include <vector>
#include <stdlib.h>
#include <ctime>
using namespace std;
class Deck{
public:
Deck(bool type, int jokers, int many){
if(type){ //merges organized decks together
for(int i = 0; i < many; i++){
for(int j = 0; j < 4; j++){
for(int k = 0; k < 13; k++){
deck.push_back... |
//-----------------------------------------------------------------------------
// Perimeter Map Compiler
// Copyright (c) 2005, Don Reba
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
bool f = 1, f1 = 0;
for(int i=a.length()-1; i>=0; i--)
{
if(a[i]>='a' && a[i]<='z')
{
if(!i)
{
f1 = 1;
break;
}
f = 0;
break;
}
}
if(f)
{
for(int i=0; i<a.length(); i++)
{
if(a[i]>='A' && a[i]<='Z'... |
//具体类
class BinarySplitter:public ISplitter
{
};
class TxtSplitter:public ISplitter
{
};
class PictureSplitter:public ISplitter
{
};
class VideoSplitter:public ISplitter
{
};
//具体工厂
class BinarySplitterFactory:public SplitterFactory
{
public:
virtual ISplitter* createSplitter()
{
return new Bina... |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, init, n) for(int i = (int)(init); i < (int)(n); i++)
#define vi vector<int>
#define vl vector<long>
#define vvi vector<vector<int>>
#define vvl vector<vector<long>>
#define pint pair<int, int>
#define plong pair<long, long>
int main() {
int N, M, X;
... |
/* In questo codice si prova a capire quando
* viene chiata una funzione costante in caso
* di overload */
#include <iostream>
namespace N{
class C{
public:
C(int x = 0);
//funzione non costante
int& get();
//funzione costante
//funzioni costanti hanno senso se si ritorna un riferimento (o ... |
/**
* @author Levi Armstrong
* @date January 1, 2016
*
* @copyright Copyright (c) 2016, Southwest Research Institute
*
* @license Software License Agreement (Apache License)\n
* \n
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licens... |
#include <iostream>
#include<bitset>
#include<vector>
using namespace std;
int main() {
// your code goes here
unsigned int n,m;
cin>>n;
cin>>m;
vector<bitset<501>> v;
for(int i=0;i<n;i++)
{
string str;
cin>>str;
bitset<501> b(str);
v.push_back(b);
}
unsigned int max=0,ct=0;
for(int i=0;i<n-1;i++)
{... |
/// \file fake_turtle.cpp
/// \brief A kinematics simulation of a differential drive robot using DiffDrive class
/// Publisher: joint_states (sensor_msgs/JointStates): Publish joint states message
///
/// Subscriber: cmd_vel (geometry_msgs/Twist): Subscribe to cmd_vel and get Twist message
#include<ros/ros.h>
#includ... |
/*Generic SVGA handling*/
/*This is intended to be used by another SVGA driver, and not as a card in it's own right*/
#include <stdlib.h>
#include "ibm.h"
#include "mem.h"
#include "video.h"
#include "vid_svga.h"
#include "vid_svga_render.h"
#include "io.h"
#include "timer.h"
#define svga_output 0
void svga_doblit(in... |
#pragma once
namespace Dialogs
{
void Monpac();
void FilterHistory();
void QuickFilter();
void Stages();
}
|
#ifndef SRC_PT_EQ_H
#define SRC_PT_EQ_H
/// @file src/pt/Eq.h
/// @brief Eq のヘッダファイル
/// @author Yusuke Matsunaga (松永 裕介)
///
/// Copyright (C) 2005-2011 Yusuke Matsunaga
/// All rights reserved.
#include "Constr.h"
BEGIN_NAMESPACE_YM_BB
//////////////////////////////////////////////////////////////////////
/// ... |
#include <characters/wise_man.h>
using namespace lab3::characters;
Wise_Man::Wise_Man(const std::string &name, Place *place)
: Human(name, TYPE_HUMAN, place),
will_tell_about_wizard_(false),
knowledge_(0)
{
this->talk_msgs_ =
{
"The princess is trapped in the Kings Castle."
"Yo... |
#include <bits/stdc++.h>
#define ll long long
#define rep(i, x, y) for(int i = x; i <= y; i ++)
#define rrep(i, x, y) for(int i = x; i >= y; i --)
using namespace std;
char s[1000010];
int main()
{
scanf("%s", s + 1);
int len = strlen(s + 1);
ll sum = 0, num = 0;
rrep(i, len, 1)
if(s[i] == '1') sum += (len - num ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.