text
stringlengths
8
6.88M
#include <vector> class VT100Client; class VT100 { public: VT100(VT100Client*); void parseBuffer(const char* start, const char* end); private: VT100Client* m_client; int cs; int unsignedValue; std::vector<int> numberStack; };
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
#include "path_utils.hxx" #include <algorithm> using namespace std::placeholders; PathNode::PathNode(Vec2 coordinates_, PathNode* parent_) { parent = parent_; coordinates = coordinates_; G = H = 0; } uint PathNode::getScore() { return G + H; } Generator::Generator() { setDiagonalMovement(false); setHeuris...
/* * This file is left empty on purpose * It provides CMake the knowledge of * What langue it is compiling */
#include <iostream> #include "hypertext.hpp" // print top of html page void printPageTop(const std::string& header) { std::cout << "<!DOCTYPE HTML>\n"; std::cout << "<html>\n"; std::cout << "<head>\n"; std::cout << "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n"; std::cout...
#include "gtest/gtest.h" #include "wali/wfa/WFA.hpp" #include "wali/LongestSaturatingPathSemiring.hpp" #include "wali/domains/binrel/ProgramBddContext.hpp" #include "wali/domains/binrel/BinRel.hpp" #include "fixtures.hpp" #include "fixtures/SimpleWeights.hpp" namespace sh_distance = testing::ShortestPathWeights; na...
#pragma once #include "BaseService/BaseService.h" class GroupCorrelations; class CorrelationsService : public BaseService { Q_OBJECT public: explicit CorrelationsService(QObject *parent = nullptr); public slots: void getDefaultGroupsCorrelations(int testId, int scaleId) const; signals: void default...
// Created on: 2016-07-07 // Copyright (c) 2016 OPEN CASCADE SAS // Created by: Oleg AGASHIN // // 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 publi...
#pragma once #include "main.h" class setCompression { public: typedef void(*callbackFunc)(const bool result, void *data); private: const struct workdata { Persistent<Object> self; Persistent<Function> func; }; const struct workdata2 { callbackFunc callback; void *data; HANDLE hnd; }; pub...
#include <vector> #include <string> #include <iostream> #include <map> #include <set> #include <fstream> #include <sstream> using namespace std; template<class T> class MyHeap { vector<pair<int, T> > array; map<T, int> positions; int parent_id(int i) { return (i - 1) / 2; } int get_...
#include<iostream> #include<cstdio> #include<queue> #include<stack> #include<cstring> #define MAX_SIZE 20001 #define ull unsigned long long int using namespace std; struct object { ull number; int remainder; int d; }; void display(object temp) { stack<bool> s; while(temp.d) { s.push(temp.number&1); temp.numbe...
#include <Arduino.h> #include <ESPReactWifiManager.h> #include <ESPAsyncWebServer.h> namespace { AsyncWebServer *server = nullptr; ESPReactWifiManager *wifiManager = nullptr; } // namespace void setup() { delay(1000); Serial.begin(115200); Serial.println(F("\nHappy debugging!")); Serial.flush(); ...
#include<iostream> using namespace std; int main() { int input[5],i,j,count1,count2,temp,sol,flag; while(1) { count1=0;count2=0; for(i=0;i<5;i++) cin>>input[i]; if(input[0]==0) break; for(i=0;i<3;i++) { for(j=i+1;j<3;j++) if(input[i]>input[j]) { temp=input[i]; i...
#include "predictor.h" #include <stdint.h> #include <math.h> ///////////////////////////////////////////////////////////// // 2bitsat ///////////////////////////////////////////////////////////// #define BIMODAL_PREDICTION_TABLE_SIZE 4096 uint8_t bimodal_saturating_counter[BIMODAL_PREDICTION_TABLE_SIZE]; int GetTabl...
// Created on: 1992-04-06 // Created by: Christophe MARION // Copyright (c) 1992-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 ...
#include "../inc/SEOpenGLRenderObject.h" #include "../inc/SEDebugTools.h" #include <iostream> USEDUMPFLAG; void SEOpenGLRenderObject::applyTransformation(const SERenderServiceInternals<GLfloat> &rs) const { DUMPONCE("===SEOpenGLRenderObject::applyTransformation()==="); //glMatrixMode(GL_MODELVIEW); //DUM...
#include "../include/Table.h" //Constructor Table::Table(int capacity):capacity(capacity), open(false), customersList(), orderList(){ //customer and order list are initliazed by default constructor as empty containers } // End Constructor //Copy Constructor Table::Table(const Table &t):capacity(),open(), custo...
#include "loginscreen.h" #include "ui_loginscreen.h" #include <QDebug> LoginScreen::LoginScreen(QWidget *parent) : QDialog(parent), ui(new Ui::LoginScreen) { ui->setupUi(this); } LoginScreen::~LoginScreen() { delete ui; } void LoginScreen::on_pushButton_login_clicked() { QString...
// 정적으로 많은 수의 배열을 잡을 때 동적으로 잡아주기! #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> using namespace std; int N, M; int nArray[500020]; int mArray[500020]; int mCount[500020] = { 0 }; int nCount[20000010] = { 0 }; void findBinarySearch(int i); int main() { cin >> N; //scanf("%d", &N); for ...
#include <iostream> #include <cstdio> using namespace std; struct Node { char ch; int priority; struct Node *child[26]; bool isWord; int childPriority; struct Node *next; }; void addToTrie(Node *root, string str, int priority) { int l = str.length(); struct Node *parent; for(int i=0; i<l; ++i) { int idx =...
#pragma once #include "creature.h" class RandomWalker : public Creature { public: RandomWalker(void); ~RandomWalker(void); void step(); private: int counter; };
#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> #endif #define LED_PIN 6 #define LED_COUNT 8 Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); void setup() { // put your setup code here, to run once: strip.begin(); strip.show(); strip.setBrightness(25); random...
#include <iostream> #include <algorithm> using namespace std; int main(){ int a{}, b{}; int len1{}, len2{}; while(cin >> a >> b && !(a == -1 && b == -1)){ len1 = a - b; len1 = (len1 < 0) ? len1 + 100 : len1; len2 = b - a; len2 = (len2 < 0) ? len2 + 100 : len2; ...
#ifndef SERVER_CHATMANAGER_H #define SERVER_CHATMANAGER_H #include "BaseManager.h" #include <boost/property_tree/ptree.hpp> #include "src/server/lib/Connection/BaseConnection.h" class ChatManager: public BaseManager { public: ~ChatManager() override = default; boost::property_tree::ptree sendMessage(boost::p...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int l, r, lmod, rmod, ldiv, rdiv; cin >> l >> r; lmod = l % 2019; rmod = r % 2019; ldiv = l / 2019; rdiv = r / 2019; int ans = 2019; if (lmod < rmod && ldiv == rdiv){ for (int i = lmod; i < rmod +...
#include <stdlib.h> #include <string.h> #include <map> #include "GameCmd.h" #include "PlayerManager.h" #include "Logger.h" #include "Configure.h" #include "HallHandler.h" #include "CoinConf.h" #include "NamePool.h" #include "Util.h" #include "Protocol.h" using namespace std; static PlayerManager* instance = NULL; Play...
// // main.cpp // firstxodeproject.cpp // // Created by Wallace Obey on 2/6/16. // Copyright © 2016 Wallace Obey. All rights reserved. // #include <iostream> #include <cstdlib> #include <cstring> using namespace std; void reverseString(char word[], int length); // Prototype reverse function int main(){ ...
pair<int,int> ex_gcd(int a, int b){ if(a%b==0) return make_pair(0,1); pair<int, int> prev = ex_gcd(b, a%b); return make_pair(prev.second, prev.first + prev.second * (a/b) ) ; }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2005 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch.h" #include "modules/forms/formvaluelist.h...
#include "cpptest.h" CPPTEST_CONTEXT("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadPoolManager.cpp"); CPPTEST_TEST_SUITE_INCLUDED_TO("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadPoolManager.cpp"); class TestSuite_run_4d52f4e9 : public ...
#include<stdio.h> #include<conio.h> #include<stdlib.h> using namespace std; struct node { int data; struct node *next; }; void push(struct node **root,int a) { struct node *n = (struct node *)malloc(sizeof(struct node)); n->data = a; n->next = (*root); (*root) = ...
#pragma once #include "stdafx.h" #include <QDialog> #include "ItemDAO.h" class NewTable : public QDialog { Q_OBJECT public: NewTable(QWidget* parent); ~NewTable(); public slots: void validatePressed(); signals: void transfertNewTable(QString name, QString password); private: QLabel* errorMessage; QLi...
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int tc; cin >> tc; while (tc--) { int n, m, minCount = 0; int cSpeed = 0; cin >> n >> m; int dist = m - n; while (dist) { int maxDist =...
#include <assert.h> #include <stdlib.h> #include <stdio.h> #if defined(DM_PLATFORM_IOS) || defined(DM_PLATFORM_OSX) || defined(DM_PLATFORM_ANDROID) #include <unistd.h> #endif #define EXTENSION_NAME Vibrate #define LIB_NAME "Vibrate" #define MODULE_NAME "vibrate" // Defold SDK #define DLIB_LOG_DOMAIN LIB_NAME #includ...
#include "worldsinglethread.h" worldsinglethread::worldsinglethread(btScalar averageFPS,btScalar lowestFPS):WorldBase(averageFPS, lowestFPS) { } void worldsinglethread::init(btVector3 & gravity) { broadphase = new btDbvtBroadphase(); collisionConfiguration = new btDefaultCollisionConfiguration(); dispatc...
// // ICMPPacket.cpp // // $Id: //poco/1.4/Net/src/ICMPPacket.cpp#2 $ // // Library: Net // Package: ICMP // Module: ICMPPacket // // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #include "_Net/ICMPPacket.h" #include "_Net/ICMPv4Pac...
#pragma once #include "integrator.h" #include "pp_disk.h" #include "red_type.h" class rungekutta4 : public integrator { public: static var_t a[]; static var_t b[]; static var_t bh[]; static ttt_t c[]; rungekutta4(pp_disk *ppd, ttt_t dt, bool adaptive, var_t tolerance, computing_device_t comp_dev); ~r...
/* * Copyright (c) 2015-2017 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_DETAIL_SELECTION_SORT_H_ #define CPPSORT_DETAIL_SELECTION_SORT_H_ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <cpp-sort/utility/ite...
// Created on: 1998-07-16 // Created by: CAL // Copyright (c) 1998-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 Gen...
#include "stdafx.h" #include "CLRIQMeasure.h" #include "windows.h" #include "stdio.h" void OutputDebugPrintf(const char* strOutputString, ...) { char strBuffer[4096] = { 0 }; va_list vlArgs; va_start(vlArgs, strOutputString); _vsnprintf(strBuffer, sizeof(strBuffer) - 1, strOutputString, vlArgs); //vsprintf(strBuf...
#include<bits/stdc++.h> using namespace std; main() { char s1[200]; while(cin>>s1) { int i, co=0; int len = strlen(s1); for(i=1; i<len; i++) { if(s1[i]<'a') co++; } if(co==(len-1)) { for(i=0; i<len; i++) ...
#include <iostream> #include <mpi.h> #include <unistd.h> #include <stdlib.h> #define MCW MPI_COMM_WORLD using namespace std; void printBoard(int arr[], const int ROW_SIZE) { cout << " Grid:\n"; for(int i = 0; i < ROW_SIZE; ++i) { for(int j = 0; j < ROW_SIZE; ++j) { if(arr[ROW_SIZE * i + j]) cou...
#ifndef _BERLEKAMP_MASSEY_ #define _BERLEKAMP_MASSEY_ #include <vector> namespace BM { const int mod = 1e9+7; long long add(long long a, long long b) { return ((a+b)%mod+mod)%mod; } long long powmod(long long a, long long b) { long long ret = 1; while(b) { if(b&1ll) ret*=a, ret%=mod; a*=a; a%=mod; ...
#include "opencv2/core/core.hpp" #include "opencv2/calib3d/calib3d.hpp" #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include "opencv2/contrib/contrib.hpp" #include <stdio.h> #include <string.h> #include <iostream> using namespace cv; using namespace std; void expand(int value) { ...
#pragma once #include "KEGIESDoc.h" class View2 : public CView { protected: // serialization View2(); DECLARE_DYNCREATE(View2) public: bool m_displayMode[10]; CKEGIESDoc* GetDocument() const; // function public: //Initialize void InitGL(); //Drawing void DrawView(); void SetupView(); void UpdateView(); ...
#pragma once #include "List2w.h" using namespace std; template< typename T > struct MyQueue { List2W<T> list; }; template< typename T > MyQueue<T> CreateEmptyQueue() { MyQueue<T> st; st.list = CreateEmptyList2W<T>(); return st; } template< typename T > void Push(MyQueue<T> &st, T k) { AddLast(st.list, k); } ...
#include <sfwdraw.h> #include "Defines.h" #include "AssetLib.h" #include "GameState.h" #include "GameLevel.h" bool Level::loaded = false; // We set up a static instance of GameState so that we may access the gamestate after it's initialized. Game *& Level::game() { static Game *gs; return gs; } // Set our texture...
#include "ChasingEnemy.h" #include "../CSC8503Common//StateTransition.h" #include "../CSC8503Common/StateMachine.h" #include "../CSC8503Common//State.h" #include "../GameTech/TutorialGame.h" #include "../CSC8503Common/NavigationPath.h" #include "../CSC8503Common/GameWorld.h" using namespace NCL; using namespace CSC850...
#include <cstdio> int main(){ int n; int ans = 1; scanf("%d", &n); for (int i = 0; i < n; ++i) ans *= 2; printf("2^%d = %d\n", n, ans); return 0; }
#include <graphicsim.h> using namespace std; int main(){ // Always call initCanvas() after main function // initCanvas() initialises all data structures and opens a window // Key Checker Program - Title of the window. You can change that. initCanvas("Key Checker Program"); char *keyname; // Pointer to str...
/*! * \file memoryvariable.cpp * \author Simon Coakley * \date 2012 * \copyright Copyright (c) 2012 University of Sheffield * \brief Implementation of memory variable */ #include "./memoryvariable.h" MemoryVariable::MemoryVariable(QString n, QString d, ADT t, int s) { myName = n; myDesc = d; myType =...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup" -*- * * Copyright (C) 1995-2005 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef XMLFRAGMENT_H #define XMLFRAGMENT_H #ifdef XM...
#include <dmp_lib/DMP/DMP_.h> #include <dmp_lib/trainMethods/LeastSquares.h> #include <dmp_lib/trainMethods/LWR.h> #include <dmp_lib/io/io.h> #include <dmp_lib/DMP/DMP.h> #include <dmp_lib/DMP/DMP_bio.h> namespace as64_ { namespace dmp_ { DMP_::DMP_(int N_kernels, double a_z, double b_z, std::shared_ptr<CanonicalCl...
#include "global.h" clock_t time_start() { return std::clock(); } void time(clock_t c_start) { if (!SHOW_INFO) return; std::clock_t c_end = std::clock(); std::cout << "CPU time used: " << 1000.0 * (c_end-c_start) / CLOCKS_PER_SEC << " ms\n"; } void INFO(const char *s) { INFO(s,...
#ifndef HTTP_TO_TAP_LOOP_HPP #define HTTP_TO_TAP_LOOP_HPP #include <boost/asio/posix/stream_descriptor.hpp> #include <boost/function.hpp> #include <boost/shared_ptr.hpp> #include "socket.hpp" #include "loop_stop.hpp" #include "http_parser.hpp" namespace sp { typedef boost::function<bool(const http_parser*)> headers_...
#pragma once #include <UtH/UtHEngine.hpp> struct EnemyFactory { static uth::GameObject* CreateEnemy(uth::PhysicsWorld& pworld, const std::string& texture, const pmath::Vec2& position); };
/* -*- coding: utf-8 -*- !@time: 2020/3/4 21:42 !@author: superMC @email: 18758266469@163.com !@fileName: 0046_children_s_games.cpp */ #include <environment.h> class Solution { public: int findLastNumber(int n, int m) { if (n < 1 || m < 1) return -1; int array[n]; int i = -1, step = ...
#include "..\coordtrans.h" int main() { return 0; }
#include <queue> #include <moveit/move_group_interface/move_group_interface.h> #include <moveit/planning_scene_interface/planning_scene_interface.h> #include <std_msgs/Int16.h> #include "panda_status.h" //////////////////////////////////////////////////////////////////////////////// static std::queue<geometry_msgs::P...
/* This file is part of the VRender library. Copyright (C) 2005 Cyril Soler (Cyril.Soler@imag.fr) Version 1.0.0, released on June 27, 2005. http://artis.imag.fr/Members/Cyril.Soler/VRender VRender is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
#include "stdafx.h" #include "ReturnButton.h" #include "../GameCursor.h" ReturnButton::ReturnButton() { m_fade = FindGO<Fade>("fade"); m_button = NewGO<SpriteRender>(2, "sp"); m_buttonSize.x /= 2; m_buttonSize.y /= 2; m_button->Init(L"Assets/sprite/returnButton.dds", m_buttonSize.x, m_buttonSize.y,true); m_bu...
#include <Tanker/ReceiveKey.hpp> #include <Tanker/ResourceKeyAccessor.hpp> #include <Tanker/Serialization/Serialization.hpp> #include <Tanker/Trustchain/Actions/KeyPublish.hpp> #include <Tanker/Trustchain/Block.hpp> namespace Tanker { ResourceKeyAccessor::ResourceKeyAccessor( Client* client, TrustchainVerifier...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2002 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef XMLPARSER_XMLBUFFER_H #define XMLPARSER_XMLBUFFER_H #include "mo...
// // Game.cpp // #include "pch.h" #include <DirectXMath.h> #include <sstream> #include "Game.h" extern void ExitGame(); using namespace DirectX; using Microsoft::WRL::ComPtr; Game::Game() noexcept : m_window(nullptr), m_outputWidth(1280), m_outputHeight(720) { } // Initialize the Direct3D resources r...
#ifndef RECT_H #define RECT_H namespace ld { struct Rect { Rect(int x_, int y_, int w_, int h_) : x(x_), y(y_), w(w_), h(h_) {} int x, y; int w, h; }; } #endif /* RECT_H */
#include <bits/stdc++.h> using namespace std; int main(){ int n, k; cin >> n >> k; vector<char> v(k); for(int i=0; i<k; i++) cin >> v[i]; for(int i=n; i<1000000; i++){ string s = to_string(i); bool flag = false; for(int j=0; j<s.size(); j++){ for(in...
byte chessdata[10][18]; void CbaiwinllkDlg::OnBnClickedReadchessdata() { //获取窗口句柄 HWND gameh = ::FindWindow(NULL,"无标题-记事本"); //获取窗口进程ID DWORD processid; ::GetWindowThreadProcessId(gameh,&processid); //打开指定进程 HANDLE processh=::OpenProcess(PROCESS_ALL_ACCESS,false,processid); //读取进程内存数据 DWORD byread; DWORD t...
#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()...
#include <iomanip> #include "CHAR.hpp" CHAR::CHAR() { } CHAR::CHAR(char x) { this->x = x; } string CHAR::concatenar(char c, char c2) { string respuesta; respuesta += c; respuesta += c2; return respuesta; }
// Created on: 1991-08-09 // Created by: Jean Claude VAUTHIER // 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 t...
#include<bits/stdc++.h> using namespace std; int main(){ int array[] = {6, -1, -3, 4, -2, 2, 4, 6, -12, -7}; int n = 10; for (int i = 0; i < n; i++){ int sum = 0; for (int j = i; j < n; j++){ sum += array[j]; if (sum == 0) { cout<< i << "..." <<j<<end...
#ifndef CFG_OTHER # error "This source should only be compiled in a non-Debug configuration." #endif #ifdef CFG_DEBUG # error "This source should not be compiled in a Debug configuration." #endif #include "iface.h" int main(int argc, char** argv) { return iface_src() + iface_other(); }
#ifndef _GUEST_LOGIN_H_ #define _GUEST_LOGIN_H_ #pragma once #include "CHttpRequestHandler.h" #include <string> class CAccountLogin : public CHttpRequestHandler { public: CAccountLogin(){} ~CAccountLogin(){} bool IsForbidLogin(std::string& ip, std::string& device_no,std::string& openudid); bool IsForbidLog...
/// Executare operatiilor de comunicare, comparatie si calcul apartin propietatii de: // realizabilitate /// Algoritmul care rezolva orice equatie de gradul intai se numeste: // algoritm universal
#ifndef OTROS_H_INCLUDED #define OTROS_H_INCLUDED #include <string> using namespace std; enum tipopalabra{ cand= 0, dic= 1 }; #endif
#ifndef ApplicationManager_h__ #define ApplicationManager_h__ #include <Windows.h> #include "../../middleware/includes/gl/glew.h" #include "../../middleware/includes/gl/glfw3.h" #include <memory> #include "../Renderer.h" class ApplicationManager { int mOpenGLMajorVersion; int mOpenGLMinorVersion; double mTime; GLFW...
// 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....
/* -*- 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. * * @author Arjan van Leeuwen (arjanl) */ #ifndef POP_AUTHENTICATI...
#ifndef DELIVERY_ACTION_LISTENER_H #define DELIVERY_ACTION_LISTENER_H #include <mqtt/publisher/pub_action_listener.h> class delivery_action_listener : public pub_action_listener { bool done_; virtual void on_failure(const mqtt::itoken &tok); virtual void on_success(const mqtt::itoken &tok); public: de...
//Created by: Mark Marsala, Marshall Farris, and Johnathon Franco Sosa //Date: 5/4/2021 //Header file for stereo8.cpp #ifndef STEREO8_H #define STEREO8_H #include "waveHeader.h" #include "iFileIO.h" /** * Manages stereo8. * Reads and writes stereo8, as well as allocates and reallocates memory. * Uses iFileIo as an...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2009-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 GadgetSignatureVerifier.h * * Gadget signature ver...
#pragma once #include <FreeListObjectPool.h> #include <variant> namespace breakout { template<class containerStruct> class FreeListPoolElement { public: FreeListPoolElement(); ~FreeListPoolElement() = default; bool IsActive() const; void SetContainer(const containerStruct& container); containerStru...
#include <stdio.h> /* printf */ #include <stdlib.h> /* system, NULL, EXIT_FAILURE */ #ifdef _WIN32 #include <Windows.h> #define GetCurrentDir _getcwd #else #include<unistd.h> #endif #include "VideoFaceDetector.h" #include"InitProc.h" #include "LQP_main.h" #include "SessionTraining.h" stri...
// Lexer for C, C++, C#, Java, Rescouce Script, Asymptote, D, Objective C/C++, PHP // JavaScript, JScript, ActionScript, haXe, Groovy, Scala, Jamfile, AWK, IDL/ODL/AIDL #include <string.h> #include <assert.h> #include <ctype.h> #include <string> #include <vector> #include <map> #include <algorithm> #incl...
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> // GJCNativeShare struct GJCNativeShare_t1694253608; // System.String struct String_t; // System.Object ...
//intersection of 2 sorted arrays #include<iostream> using namespace std; void intersectionOfSorted(int a[],int b[],int n1,int n2){ int i=0,j=0; while(i<n1 && j<n2){ if(i>0 && a[i]==a[i-1]){ i++; continue; } if(a[i]<b[j]) i++; else if(a[i]>b[j]) j++; else{ std::cou...
// #include <iostream> #include <Windows.h> #include <ctime> #include <sstream> #include <string> #include <set> /** * Интерфейс Субъекта объявляет общие операции как для Реального Субъекта, так и * для Заместителя. Пока клиент работает с Реальным Субъектом, используя этот * интерфейс, вы сможете передать ему замес...
#include <iostream> #include <chrono> #include <thread> void sleep_for() { std::cout << "Hello waiter" << std::endl; std::chrono::milliseconds dura( 200 ); std::this_thread::sleep_for( dura ); std::cout << "Waited 200 ms\n"; } void sleep_until() { auto days = std::chrono::system_clock::now() + std::c...
/* * Flute.h * * Created on: Jun 16, 2016 * Author: g33z */ #ifndef FLUTE_H_ #define FLUTE_H_ #include "Woodwind.h" class Flute : public Woodwind { public: Flute(string n,int adj):Woodwind(n,adj){} void play(Enote n); }; #endif /* FLUTE_H_ */
// Hello World! for the TextLCD #include "mbed.h" #include "TextLCD.h" TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7 int main() { lcd.printf("Hello World!\n"); }
#include "Intersection2d.h" #include <Eigen/Core> using Eigen::Vector2d; Intersection2d::Intersection2d(double position, double rotation, Vector2d vector) { this->position = position; this->rotation = rotation; this->vector = vector; } double Intersection2d::getPosition() { return position; } double Intersection...
#include<bits/stdc++.h> using namespace std; int sum(int n){ if (n == 0) return 0; return (n % 10 + sum(n / 10)); } int main(){ int num; cout<<"Enter the digits : "; cin>>num; int add = sum(num); cout << "Sum of digits \""<<num<<"\" is "<<add<<endl; return 0; }
//Enunt: // calculeaza perimetrul, aria si diagonala unui patrat #include <iostream> #include <windows.h> #include <cmath> class Patrat { private: int latura; public: Patrat() {} Patrat(const int &latura) { this->latura = latura; } void setLatura(const int &latura) { this->latura = latura; } void setLatur...
#include<bits/stdc++.h> using namespace std; int toInt(string s){ stringstream convert(s); int n; convert >> n; return n; } int main(){ freopen("TINHTONG.inp", "r", stdin); freopen("TINHTONG.out", "w", stdout); int acc = 0; int i = 0; string s; getline(cin, s); while(i...
#include <iostream> #include <vector> #include <algorithm> #include <string> void Swap(int &a, int &b, std::vector<int> &elements) { int temp = 0; temp = a; a = b; b = temp; } std::vector<int> Sort(std::vector<int> elements) { // Sorting algorithm. for(int i = 0; i < elements.size(); i++){ for (int j ...
#include <stdio.h> #include <omp.h> #include <iostream> #include <climits> #include <vector> #include <string> #include <sstream> void client(omp_lock_t& read_lock, omp_lock_t& write_lock, std::string& input, const std::vector<std::string>& task); void server(omp_lock_t& read_lock, omp_lock_t& write_lock, std::string&...
#pragma once class DropEgg; class MonsterDrop : public GameObject { public: MonsterDrop(); ~MonsterDrop(); bool Start() override; void Update() override; void OnDestroy() override; void setDungeonNum(int n) { m_stage = n; } private: void InitUI(); void InitCamera(); void Notifications(); void InitModels(...
/* * LSST Data Management System * Copyright 2014-2015 AURA/LSST. * * This product includes software developed by the * LSST Project (http://www.lsst.org/). * * 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...
/* -*- Mode: c++; tab-width: 4; 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. * * Arjan van Leeuwen (arjanl) */ #include "core/pch.h" #ifdef M2_SUPPORT #include "a...
#include "data.h" void loadZ(double *z){ } double *loadZ(){ double *ret = (double *)malloc(sizeof(double)*N*N); for (int i=0; i<N*N; ++i) ret[i] = rand()%256; return ret; } double *loadX(double **X, int idx){ return X[idx]; } void strToDouble(char *buf, double *x){ int len = strlen(buf); int num = 0; int ...