text
stringlengths
8
6.88M
#define ERROR 0x01 #define SUCCESS 0x00 namespace TWI { void TWIInit(void); void TWIStart(void); void TWIStop(void); void TWIWrite(uint8_t u8data); uint8_t TWIReadACK(void); uint8_t TWIReadNACK(void); uint8_t WriteByte(uint8_t u8device_addr, uint8_t u8register_addr, uint8_t u8data); uint8_t ReadByte(uint8_t u8...
/* -*- 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. * * @author Manuela Hutter (manuelah) */ #include "core/pch.h" #i...
// // Created by Felix Winter on 08.04.2019. // #ifndef CHUFFED_EDEXPLFINDER_H #define CHUFFED_EDEXPLFINDER_H #include <chuffed/core/propagator.h> #include <chuffed/support/vec.h> #include <queue> #include <vector> /** * Class that will help to find variable inequalities used to explain propagation of lcs bounds ...
#include<test> main() { int a; int b; int c; double d; c=a+b; d=c; d=a-b; new c - b; }
/*#include "perf_precomp.hpp" #include "distransform.cpp" using namespace std; using namespace cv; using namespace perf; typedef perf::TestBaseWithParam<Size> Size_DistanceTransform; PERF_TEST_P(Size_DistanceTransform, icvTrueDistTrans, testing::Values(TYPICAL_MAT_SIZES)) { Size size = GetParam(); Mat src(si...
#ifndef LASER_MACHINE_H #define LASER_MACHINE_H #include <QObject> #include "vector" #include "opencv2/core/core.hpp" #include <QDebug> using namespace std; class Laser_Machine : public QObject { Q_OBJECT // Structures: enum StateLaserMachine { WAIT, WORK, }; struct DotCoordinat...
#ifndef GRADDESC_H #define GRADDESC_H #include <vector> #include <utility> #include <memory> class Network; class Node { friend class Network; public: Node(Network* net); virtual ~Node(); double GetValue() { return value; } double GetPartial() { return dcost; } protected: virtual void Eval() = 0; vir...
#include "gtest/gtest.h" #include "../../../../options/OptionCall.hpp" #include "../../../../binomial_method/case/Case.hpp" #include "../../../../binomial_method/case/Wilmott2Case.hpp" #include "../../../../binomial_method/method/regular/euro/EuroBinomialMethod.hpp" double dividend_euro_call_Wilmott2(int iT, int iM) {...
#include <iostream> using namespace std; int main() { // your code goes here long long t; cin>>t; while(t--) { long long n,a,b,n1=0,n2=0; cin>>n>>a>>b; while(n--) { string s; cin>>s; if (s[0]=='E'||s[0]=='Q'||s[0]=='U'||s[0]=='I'||s[0]=='N'||s[0]=='O'||s[0]=='X') n1 += a; ...
// Created on: 1999-08-11 // Created by: Roman LYGIN // Copyright (c) 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 ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2000 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef _WML_H_ #define _WML_H_ #ifdef _WML_SUPPORT_ #include "...
#ifndef MINISERVER_CONNECTION_H #define MINISERVER_CONNECTION_H #include <string> #include "buffer.h" namespace miniserver{ class Connection { public: Connection(); virtual ~Connection(); // for prototype static Connection* newInstace(); static void initRootDir(const std::string &root_dir); ...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> #include <sstream> typ...
/************************************************************************/ /* File name : Decrypt.cpp */ /************************************************************************/ /* Contents : 復号化処理 (コールバック関数) */ /* ...
#include <iostream> #include <string> #include <windows.h> #include <mmsystem.h> #include <GL/glew.h> #include <GL/glut.h> #include <FreeImage.h> #include "GestioneModelli3d.h" #include "Palla.h" #include "Pavimento.h" #include "Camera.h" #include "GestioneTexture.h" #include "GestioneModelli3d.h" #include...
#pragma once #include <iberbar/Paper2d/Component.h> #include <iberbar/Paper2d/Component_Updatable.h> #include <iberbar/Paper2d/Component_HandleMouseInput.h> #include <iberbar/Paper2d/Component_HandleKeyboardInput.h> namespace iberbar { namespace Paper2d { template < typename TComponent > class TComponentSyst...
#include "ETableManager.h" #include "EEntityTable.h" #include "ERender2DComponentTable.h" DEFINITION_SINGLE(ETableManager) ETableManager::ETableManager() : SystemBase() { } ETableManager::~ETableManager() { } // Job = 0, // Entity = 1, // Input = 2, // Movement = 3, // Network = 4, // Ren...
#include <iostream> #include <vector> #include <list> #include <queue> #include <algorithm> #include <iomanip> #include <map> #include <string> #include <cstdio> #include <cstring> #include <climits> using namespace std; int perfect, minSend = INT_MAX, minBack = INT_MAX; struct Edge { int from, to, time; Edge(in...
#include <chuffed/core/propagator.h> // y = |ub(x) - lb(y) + 1| class RangeSize : public Propagator { public: IntVar* x; IntVar* y; RangeSize(IntVar* _x, IntVar* _y) : x(_x), y(_y) { priority = 1; x->attach(this, 0, EVENT_LU); } bool propagate() override { if (y->getMin() < 1) { setDom((*y), setMin, 1,...
#include <bitset> #include <iostream> #include <map> #include <string> std::bitset<21> bit; void add() { int x; std::cin >> x; bit.set(x); } void remove() { int x; std::cin >> x; bit.reset(x); } void check() { int x; std::cin >> x; std::cout << bit.test(x) << '\n'; } void tog...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php....
#include <string.h> #include <QString> #include <QMap> #include <QFormLayout> #include <QLineEdit> #include <QVariant> #include <QCheckBox> #include <QComboBox> #include <QDataStream> #include <QDebug> #include <QSizePolicy> #include "FormWidget.h" #include "FileChooserButton.h" FormWidget::FormWidget(QWidget* parent)...
// // Physics.h // NeheGL // // Created by Andong Li on 10/27/13. // Copyright (c) 2013 Andong Li. All rights reserved. // #ifndef NeheGL_Physics_h #define NeheGL_Physics_h #include <math.h> class Vector3D_PHY{ public: float x; float y; float z; Vector3D_PHY(){ x = 0; y = 0; z = 0; } Vector3D_PHY...
#pragma once #include <aePrerequisitesUtil.h> namespace aeEngineSDK { typedef enum AEG_FORMAT { AEG_FORMAT_UNKNOWN = 0, AEG_FORMAT_R32G32B32A32_TYPELESS = 1, AEG_FORMAT_R32G32B32A32_FLOAT = 2, AEG_FORMAT_R32G32B32A32_UINT = 3, AEG_FORMAT_R32G32B32A32_SINT = 4, AEG_FORMAT_R32G32B32_TYPELESS = 5, AEG_FOR...
#include "../../idlib/precompiled.h" #pragma hdrstop #include "../Game_local.h" /* ================ idDebugGraph::idDebugGraph ================ */ idDebugGraph::idDebugGraph() { index = 0; } /* ================ idDebugGraph::SetNumSamples ================ */ void idDebugGraph::SetNumSamples( int num ) { index = 0;...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <quic/QuicConstants.h> namespace quic { struct QuicStreamGroupRetransmissionPolicy { // Params control...
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2012-2013. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #ifndef _GDCMIO_DICOMSURFACE_HPP_ #define _GDCMIO_DICOMSURFACE_HPP_ #incl...
#ifndef METHODS_HPP #define METHODS_HPP #include <string> class methods { private: template <typename Type> Type get_num(); /* It gets the number from the std input stream */ long long int fact(int number); /* This function calculates the factorial of the _number_ */...
#include <vector> #include <string> class Node { public: std::string val; Node* left; Node* right; Node(std::string initialVal) { val = initialVal; left = nullptr; right = nullptr; } }; std::vector<std::string> leafList(Node* root, std::vector<std::string> &leafs) { ...
// Nama : Naufal Dean Anugrah // NIM : 13518123 // Tanggal : 13 Februari 2020 // Topik : Inheritance, Polymorphism, Abstract Base Class #include "WarungNasgor.hpp" // Masukan: Jumlah uang, nasi, telur, dan kecap WarungNasgor::WarungNasgor(int uang, int nasi, int telur, int kecap) : Warun...
/* -*- 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 CLEAR_PRIVATE_DATA_CONTROLLER_H #define CLEAR_PRIVATE_DAT...
/* -*- 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. */ #include "core/pch.h" #include "platforms/mac/util/macutils.h" #...
#include "card.h" #include <cstdlib> using namespace std; string card::get_card_suit(){ return suit; } int card::get_card_rank(){ return rank; } void card::set_card_suit(string card_suit){ suit = card_suit; } void card::set_card_rank(int card_rank){ rank = card_rank; }
/* -*- 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. ** */ /** @file user.cpp * Misc userinterface functions. * (inte...
// Copyright (c) 2013 Nick Porcino, All rights reserved. // License is MIT: http://opensource.org/licenses/MIT #include "LandruCompiler/AST.h" #include "LandruCompiler/lcRaiseError.h" #include <string> #include <map> #include <set> namespace Landru { int ASTNode::inParamList = 0; ASTNode::~ASTNode() { for (AS...
class Solution { public: bool isPerfectSquare(int num) { for (long int i=1; i*i <= num; i++) { if ((num > 0 ) && (num % i == 0) && (num/i == i)) { return true; } } return false; // long int i =1; // for( ; i*i<num; i++); // retu...
#include "eventplanner.h" #include "ui_eventplanner.h" EventPlanner::EventPlanner(QWidget *parent) : QMainWindow(parent), ui(new Ui::EventPlanner) { ui->setupUi(this); setWindowTitle("EventPlanner"); } EventPlanner::~EventPlanner() { delete ui; } void EventPlanner::on_pushB...
/* -*- coding: utf-8 -*- !@time: 2019-09-16 15:00 !@author: superMC @email: 18758266469@163.com !@fileName: environment.h */ #ifndef SELF_LEETCODE_ENVIROMENT_H #define SELF_LEETCODE_ENVIROMENT_H #include <algorithm> #include <iostream> #include <utility> #include <vector> #include <unordered_map> ...
#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 ColorfulRabbits { pub...
// Author: Miles Meacham // Course: CS-1410-X01-deBry-Fall 2015 // Instructor: Professor deBry // File: Driver.cpp // Date: 9/10/2015 // Contents: lab03 Assignment Rectangle Class Driver File // I delcare that the following source code was written solely by me, or provided by the instructor. // I understand that copy...
#include <cppunit/extensions/HelperMacros.h> #include "util/ThreadWrapperAsyncWork.h" using namespace Poco; using namespace std; namespace BeeeOn { class ThreadWrapperAsyncWorkTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ThreadWrapperAsyncWorkTest); CPPUNIT_TEST(testJoin); CPPUNIT_TEST(testCancel); C...
#include<iostream> using namespace std; typedef struct node { int a; struct node *next; }Node; node *head, *end1; void create(){ node *temp = new Node; cin>>temp->a; temp->next=NULL; if(head == NULL) { head = temp; end1 = temp; } else { end1->next =...
#include "SubmitWidget.h" #include "MainWindow.h" #include <QMessageBox> SubmitWidget::SubmitWidget(QMainWindow *parent, Json::Value &loginResponse, SocketManager *socketManager) : QWidget(), parentWindow(parent), loginResponse(loginResponse), socketManager(socketManager) { setGUI(); //TODO : make thread ...
// Created on: 1993-06-22 // Created by: Martine LANGLOIS // 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 G...
/* * window_manager.cpp * * * */ #include "window_manager.h" /* * private defines * */ /* * private variables * */ /* * constructor * */ window_manager::window_manager(uLCD_4DLibrary* p_lcd) : win_1(p_lcd), win_2(p_lcd), win_3(p_lcd), button_wi...
// Created by: NW,JPB,CAL // Copyright (c) 1991-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 License...
/* -*-C++-*- */ /* * Copyright 2016 EU Project ASAP 619706. * * 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 appl...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <folly/io/async/EventBase.h> #include <folly/io/async/EventBaseBackendBase.h> #include <quic/server/QuicServer.h> names...
// -*- c++ -*- /* * Copyright 2016 EU Project ASAP 619706. * * 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 appli...
#ifndef EIGENHEADERS_H #define EIGENHEADERS_H // include eigen libraries #include "/usr/include/eigen3/Eigen/*.h" #include "/usr/include/eigen3/Eigen/src/Core/*.h" #include "/usr/include/eigen3/Eigen/src/Cholesky/*.h" #i...
#include "global.h" #include "siet.h" #include <iomanip> float X,Y; float Xn,Yn,Zn; //poloha bodu kam sa siri vlna v ciarkovanej sustave x AB, y CD Approximation app = Approximation(); bool sir_na_z(const short& i,const short &j,const short &k,const short &smer,const Bod &z) { Bod b(smer,i,j,k); b.sir2(z.i,z.j,...
#ifndef MATH_IS_POWER_OF_TEN_HPP #define MATH_IS_POWER_OF_TEN_HPP #include <sstream> #include <string> namespace Math { template <typename T> static bool isPowerOfTen(T num) { std::stringstream ss; std::string numVal; ss << num; ss >> numVal; if(numVal[0] != '1')...
#pragma once #include <cutil_inline.h> #include <cutil_math.h> #include "MatrixConversion.h" #include "VoxelUtilHashSDF.h" #include "DepthCameraUtil.h" #include "CUDAScan.h" #include "GlobalAppState.h" #include "TimingLog.h" #include "Profiler.h" extern "C" void resetCUDA(VoxelHashData& voxelHashData, const HashPar...
#include<bits/stdc++.h> using namespace std; int main(){ int arr[]={1,2,3,4,5,6,7}; int n=sizeof(arr)/sizeof(arr[0]); int temp[n]; int ls=n-2,j=0; for(int i=ls;i<n;i++) { temp[j++]=arr[i]; } for(int i=0;i<ls;i++) { temp[j++]=arr[i]; } for(int i=0;i<n;i++) { cout<<temp[i]; } }
#include <fstream> #include <string> #include <iostream> #include "Hashbook.h" #include "password.h" using namespace std; Hashbook::Hashbook() { fstream hashbook; string line; string password; string compname; int line_location = 0; } void Hashbook::write_to_hashbook(string password, string company_name) { has...
/** * Created by K. Suwatchai (Mobizt) * * Email: k_suwatchai@hotmail.com * * Github: https://github.com/mobizt/Firebase-ESP8266 * * Copyright (c) 2023 mobizt * */ /** This example will show how to authenticate as user using * the hard coded Service Account to create the custom token to sign in...
// ---------------------------------------------------------------------------- // nexus | LiquidArgonProperties.cc // // This class collects the relevant physical properties of liquid xenon. // // The NEXT Collaboration // ---------------------------------------------------------------------------- #ifndef XENON_LIQU...
//********************************************************** // PROJECT VIDEO LIBRARY //********************************************************** //********************************************************** // INCLUDED HEADER FILES //********************************************************** #include...
/** * @file mini_sdp/mini_sdp.h * @brief * @version 0.1 * @date 2021-01-14 * * @copyright Copyright (c) 2021 Tencent. All rights reserved. * */ #ifndef MINI_SDP_MINI_SDP_H_ #define MINI_SDP_MINI_SDP_H_ #include <string> #include <vector> #include "sdp.h" namespace mini_sdp { /** * @brief Return Code * ...
// Wed Aug 24 15:46:50 EDT 2016 // Evan S Weinberg // Include file for CG-M #ifndef ESW_INVERTER_CG_M #define ESW_INVERTER_CG_M #include <string> #include <complex> using std::complex; #include "inverter_struct.h" #include "verbosity.h" // Multishift CG defined in http://arxiv.org/pdf/hep-lat/9612014.pdf inversion_...
#include<stdio.h> #include<stdlib.h> typedef struct _SYSTEMTIME { WORD wYear; WORD wMonth; WORD wDay; WORD wHour; WORD wMinute; WORD wSecond; }; main() { int price,c; float n; SYSTEMTIME str_t; GetSystemTime(&str_t); printf("1:Rice(kg) 2:salt(500g) 3:sugar(pkt) 4:tomatoes(kg) 5:potatoes(kg) "); printf("6...
#ifndef VULKANLAB_CLOCK_H #define VULKANLAB_CLOCK_H #include <GLFW/glfw3.h> class Clock { public: Clock() {} ~Clock() {} /** * Return the time in milliseconds from the GLFW get time function. * - TODO Improve it with a more precise timer. * @return */ inline double getTime() { ...
// // Created by silvman on 3/3/19. // #ifndef EESKORKA_TYPES_H #define EESKORKA_TYPES_H #include <functional> enum connectionAction { rearmConnection = 100, closeConnection, waitUntillReaded, }; typedef std::function<void(int, connectionAction)> loopCallbackType; typedef std::function<int(int, loopCall...
TurnManager::TurnManager(QObject *parent) : QObject(parent) { } QVector<Move*> TurnManager::sort(const QVector<Move*> &array) { //Do something return array; }
/* 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...
// Problem: Swastika // Author: babang #include <algorithm> #include <iostream> #include <map> #include <set> #include <vector> #include <math.h> #define forn(i, n) for(int i = 0; i < n; i++) #define rofn(i, n) for(int i = n-1; i >= 0; i--) #define foran(i, a, n) for(int i = a; i < n; i++) #define rofan(i, a, n) for(...
#pragma once #include <Tanker/Network/AConnection.hpp> #include <Tanker/Network/SdkInfo.hpp> #include <optional> namespace Tanker { namespace Network { struct ConnectionFactory { static ConnectionPtr create(std::string url, std::optional<SdkInfo> info); }; } }
#include <initializer_list> #include <algorithm> class vector2 { int sz; double* elem; public: vector2(int); vector2(const vector2&); vector2(std::initializer_list<double>); vector2(vector2&&); vector2& operator=(const vector2&); vector2& operator=(vector2&&); double operator[](int) const; double& operator[...
#include "Node.h" void Node::SetLeft(Node *temp) { m_left = temp; } void Node::SetRight(Node *temp) { m_right = temp; } void Node::SetParent(Node *temp) { m_parent = temp; } Node *Node::GetLeft() { return m_left; } Node *Node::GetRight() { return m_right; } Node *Node::GetParent() { return m_parent; } void Node:...
// // Created by user on 2017/4/6. // #ifndef DD_GAMES_ROOMCARDUTIL_H #define DD_GAMES_ROOMCARDUTIL_H #include <stdint.h> #include "RedisAccess.h" namespace RoomCardUtil { int randomTableID(int gameID, int min = 1000, int max = 9999); int getOwnerUidByTableId(int gameId, int tid); bool getRemainMoney(...
#include "../includes/monom.h" using namespace std; bool operator < (const link& x, const link& y) { if (x.deg_x < y.deg_x) return true; if (x.deg_x == y.deg_x) { if (x.deg_y < y.deg_y) return true; if (x.deg_y == y.deg_y) { if (x.deg_z < y.deg_z) return true; } } return fa...
#include "dialog.h" #include "ui_dialog.h" #include <algorithm> Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); } Dialog::~Dialog(){ delete ui; } int Dialog::getDimX(){ return ui->horizontalSliderX->value(); } int Dialog::getDimY(){ ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2002 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 ECMASCRIPT_REMOTE_DEBUGGER #include ...
// // AcidAudioBufferSource.cpp // SRXvert // // Created by Dennis Lapchenko on 04/05/2016. // // #include "AcidAudioBufferSource.h" using namespace AcidR; /* This class allows for AudioBuffer playback/real-time resampling using Juce's AudioSource classes. Was initially written for this project to use AudioSou...
#pragma once #include <iberbar/RHI/Resource.h> #include <iberbar/Utility/Result.h> namespace iberbar { namespace RHI { class IDevice; class IShaderReflection; class __iberbarRHIApi__ IShader : public IResource { public: IShader( EShaderType eShaderType ) : IResource( UResourceType::Shader ) ...
// // Created by HHPP on 2020/5/2. // #ifndef ACM032_POINT_H #define ACM032_POINT_H class Point { friend class Vector; friend class PointStack; private: double x,y; int depth; int index; public: Point(); Point(double, double); void set(double, double); void setDepth(int); void...
/* * Created by Peng Qixiang on 2018/8/14. */ /* * 左旋转字符串 * 对于一个给定的字符序列S,请你把其循环左移K位后的序列输出。 * 例如,字符序列S=”abcXYZdef”,要求输出循环左移3位后的结果,即“XYZdefabc”。 * */ # include <iostream> # include <string> # include <queue> using namespace std; class Solution { public: string LeftRotateString(string str, int n) { ...
// // EndingScene.h // BaseGame02 // // Created by P on 2014/07/17. // // #ifndef __BaseGame02__EndingScene__ #define __BaseGame02__EndingScene__ #include "cocos2d.h" // エンディングクラス class EndingScene : public cocos2d::Layer { public: // シーン生成静的関数 //(この関数名がcreateだとCREATE_FUNCで生成される関数名とかぶってエラーになるっぽい) stat...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional>...
#pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <deque> #include <iostream> #include <iterator> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; void abhisheknaiidu()...
/* * File: Waypoint.h * Author: mohammedheader * * Created on November 24, 2014, 2:22 PM */ #ifndef WAYPOINT_H #define WAYPOINT_H #include "cocos2d.h" class HelloWorld; class Waypoint : public cocos2d::Node{ public: static Waypoint* create(HelloWorld* game, cocos2d::Vec2 location); virtual void draw(c...
#pragma once #include "component/component.h" #include "entity/interfaces.h" #include "component/poscomponent.h" namespace component { struct CameraComponentDesc : public ComponentDesc { string transform; }; class CameraComponent : public Component, public ICamera { public: // typedefs t...
#include<bits/stdc++.h> using namespace std; int main(){ int e,a = 0,b = 0; vector<vector<int>>v; for (int i = 0; i < 5 ; i++) { vector<int>v1; for (int j = 0; j < 5; j++) { cin>>e; if(e == 1){ a += i; b += ...
/* XMRig * Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> * C...
//知识点:搜索 /* By:Luckyblock 题目中 , 棋子可以向空格子移动 那么可以进行转换 , 将棋子移动,变为空格子移动. 使用记忆化dfs , 记录 [空格子坐标],[目标棋子坐标] 状态 所需要的最小步数 使用dfs进行更新, 当目标棋子坐标 = 目标位置坐标时,记录最小答案即可. 可以拿到45分的好成绩(大雾 */ #include<cstdio> #include<cstring> #include<ctype.h> #define min(a,b) a<b?a:b const int INF = 1e9+7; const int cx[5] = {114514...
/** * created: 2013-4-8 15:40 * filename: FKThread * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include <process.h> #include <wchar.h> #include "../Include/FKThread.h" #include "../Include/STLTemplate/FKFrameAllocator.h" #incl...
#include <iostream> #include "AccountArray.h" using namespace std; AccountArray::AccountArray(int len) :arrlen(len) { arr = new ACCOUNT_PTR[len]; } ACCOUNT_PTR& AccountArray::operator[](int idx) { if (idx < 0 || arrlen <= idx) { cout << "Array index out of bound exception" << endl; exit(1); } return arr[idx]; ...
#ifndef CSVPARSER_H #define CSVPARSER_H #include <iostream> #include <sstream> #include <string> #include <fstream> using namespace std; using Column = pair<string,vector<string>>; class CsvParser { // Class used to read csv files and store column information std::pairs (pair having string for column name and vect...
#ifndef _CHUNK_TERRAIN_H_ #define _CHUNK_TERRAIN_H_ #include <vector> #include <memory> #include <d3d11.h> #include "Chunk.h" #include "../Engine/Shader.h" #include "../Engine/Texture.h" #include "../Engine/Shape.h" #include "../Engine/Camera.h" #pragma once class ChunkTerrain { public: ChunkTerrain(); ~ChunkTerra...
#ifndef __INCLUDE_TS_FILE_READER_H__ #define __INCLUDE_TS_FILE_READER_H__ #include "Def.h" #include <stdio.h> #include "TsParser.h" class CTsFileReader { public: CTsFileReader(); ~CTsFileReader(); public: int Init( const char* filename ); int GetFileRange(); bool SeekByTime( uint64_t sec ); int GetTsPkt( char* ...
#include <bits/stdc++.h> using namespace std; #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) #define MAXN 100 #define INF 0x3f3f3f3f #define DEVIATION 0.00000005 int main(int argc, char const *argv[]) { int kase; scanf("%d",&kase); double x,y,r; while( kase-- ){ scanf("%lf %lf %lf", &x, &y, &r)...
#ifndef CABAL_TOKEN_H #define CABAL_TOKEN_H #include <string> #include <utility> class Token { private: std::string type; std::string val; public: Token() = default; Token(std::string type, std::string val); ~Token() = default; const std::string &getType() const; void setType(const s...
#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...
/* * Copyright (c) 2015-2021 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_DETAIL_SORTING_NETWORK_SORT25_H_ #define CPPSORT_DETAIL_SORTING_NETWORK_SORT25_H_ namespace cppsort { namespace detail { template<> struct sorting_network_sorter_impl<25u> { template< typename Rand...
// Created on: 1999-11-26 // Created by: Andrey BETENEV // Copyright (c) 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 Less...
#include "platforms/quix/toolkits/gtk2/GtkToolkitUiSettings.cpp"
#include "common/protobuf/utility.h" #include "include/sqlparser/SQLParser.h" namespace Envoy { namespace Extensions { namespace Common { namespace SQLUtils { class SQLUtils { public: /** * Method parses SQL query string and writes output to metadata. * @param query supplies SQL statement. * @param metada...
#pragma once #ifndef Component_H #define Component_H #include <memory> #include <SDL2/SDL.h> #include <GL/glew.h> #include <exception> class Object; class Input; class World; class Core; class Screen; class GUI; //! The Component class to add features to an Object /*! Components are to add a feature or components to...
#define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> #ifdef _DEBUG #ifndef DBG_NEW #define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ ) #define new DBG_NEW #endif #endif // _DEBUG #include "Core.h" #include "ModuleRegistry.h" using namespace ServerEngine; void main() { _CrtSetDbgFlag(_CRTDBG_A...
/* * ===================================================================================== * * Filename: test.cpp * * Description: * * Version: 1.0 * Created: 01/22/2014 19:06:46 * Revision: none * Compiler: gcc * * Author: YOUR NAME (), * Organization:...