text
stringlengths
8
6.88M
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2010 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef SCOPE_CORE_H #define SCOPE_CORE_H #ifdef SCOPE_CORE #include...
#ifndef ACTION_LISTENER_H #define ACTION_LISTENER_H #include <mqtt/async_client.h> #include <iostream> extern void log(std::string msg); class action_listener : public virtual mqtt::iaction_listener { std::string name_; protected: virtual void on_failure(const mqtt::itoken &tok); virtual void on_success(...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-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 DOM2_TRAVERSAL #include "module...
/** * @file payload.cpp */ /* * The following license applies to the code in this file: * * ************************************************************************** * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organization *...
\context Staff = "violín" << \set Staff.instrumentName = "Violín" \set Staff.shortInstrumentName = "V." \set Score.skipBars = ##t \set Staff.printKeyCancellation = ##f \new Voice \global \new Voice \globalTempo \context Voice = "voice 1" { \override Voice.TextScript #'padding = #2.0 \override MultiMeasureRe...
#include <iostream> #include "sha1.h" using namespace std; int main(int argc, char *argv[]) { cout<<"This is the fourth extra-class assignment of the course CE2103 of Tecnologico de Costa Rica, \nWhich consists of investigating and implementing the SHA1 algorithm for information preservation. \nThe example provid...
#include <Adafruit_NeoPixel.h> #include "BouncingAnimation.h" BouncingAnimation::BouncingAnimation(void) { } void BouncingAnimation::reset(variables_t *vars) { Serial.println("changing to bounce"); int i; boolean j = true; for(i = 0; i < vars->objectCount; i++) { vars->color_store[i] = Adafruit_NeoPixel::...
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <fstream> #include <boost/lexical_cast.hpp> using namespace std; using namespace boost; enum class Color {red, green, blue}; enum class Size {small, medium, large}; struct Product { string name; Color color; Size size; }; ...
#include <iostream> #include <memory> #include <string> #include <vector> using namespace std; int main() { vector<string> names{"john", "jane", "jill", "jack"}; vector<string>::iterator it = names.begin(); // or begin(names) cout << "first name is " << *it << "\n"; ++it; // advance the iterator it->app...
#include <iostream> #include <vector> using namespace std; int maxFreqInRange(int l[],int r[],int n){ vector<int> arr[1000]; //max constraint on values in l[],r[]. for(int i=0;i<n;i++){ arr[l[i]]+=1; arr[r[i]+1]-=1; } int maxm=arr[0],res=0; for(int i=1;i<1000;i++){ arr[i]+=arr[i-1]; if(maxm<a...
#pragma once #include <nclgl\OGLRenderer.h> #include <nclgl\Matrix4.h> #include <ncltech\Object.h> #include <cuda_runtime.h> #include <cuda_gl_interop.h> #include <vector> #include "XPBDConstraints.h" #include "XPBD_ConstraintLayer.h" class XPBD : public Object { friend class XPBD_ConstraintLayer; friend class...
#include<iostream> using namespace std; class A{ int i; public: A(int x) : i(x) { } A() {} friend A operator++ (A a); friend A operator++ (A a,int); friend A operator+ (A p,A q); friend void display (A a); }; A operator++ (A a) { cout<< "pre-increament ++a"<<a.i<<endl; A temp; ++a.i; return *this; } A ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2007 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef SVG_ANIMATION_TIME_H #define SVG_ANIMATION_TIME_H #if...
//use the following command //mex libport_ss.cpp SerialPort.cpp SerialStream.cc SerialStreamBuf.cc PosixSignalDispatcher.cpp -lpthread #include "SerialStream.h" #include <iostream> #include <unistd.h> #include <cstdlib> #include <sstream> #include <string> #include <iomanip> #include "mex.h" using name...
#include <iostream> #include <vector> using namespace std; const int N = 100000; const int M = 18; // log2(N) => log2(100000) ~ 17 struct sparseTable { vector<int> lg; vector<vector<int> > sp; // for find min value in segment vector<vector<int> > tp; // for find max value in segment sparseTable(int n...
#pragma once // CIPNotFound 对话框 class CIPNotFound : public CDialogEx { DECLARE_DYNAMIC(CIPNotFound) public: CIPNotFound(CWnd* pParent = NULL); // 标准构造函数 virtual ~CIPNotFound(); protected: virtual BOOL OnInitDialog(); virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 HICON m_hIcon; DECLAR...
// Created on: 1997-11-21 // Created by: Mister rmi // Copyright (c) 1997-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 Les...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2002-2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Peter Krefting */ #if defined LOC_LNGFILELANGMAN && !defined ...
#include "ECore.h" #include "CoreSystems.h" #include "Render2DSystem.h" #include "EMovementSystem.h" #include "EJobManager.h" #include "ETableManager.h" #include "MutiThreading.h" DEFINITION_SINGLE(ECore) bool ECore::m_bLoop = true; ECore::ECore() { // _CRTDBG_ALLOC_MEM_DF : DF(define) 할당하는 메모리를 체크함. ...
#include "TFile.h" #include "TChain.h" #include "TStopwatch.h" #include <iostream> #include "TTH/Plotting/interface/Event.h" #include "TTH/Plotting/interface/categories.h" using namespace std; const Configuration parseArgs(int argc, const char** argv) { if (argc != 2) { cerr << "Usage: ./melooper conf.js...
/* * Mowcatl.cpp * Mowcatl * * Created by UNK, Sherri Harms, harmssk@unk.edu Wed Feb 09 2005. * Copyright (c) 2004 __MyCompanyName__. All rights reserved. * */ #include <iostream> #include "mowcatl.h" #include "xmlintface.h" using namespace std; string Mowcatl::getMowcatlResults( string inputXML ) { XMLIn...
#ifndef _DX11_TEXTURE_H_ #define _DX11_TEXTURE_H_ #include "d3d11.h" #include "Texture.h" #include "MyString.h" namespace HW{ class RenderSystem; class DX11RenderSystem; // The Texture Resource for DX11 // Only support texture2D now // D3D11_USAGE_DEFAULT now class DX11Texture : public Texture{ public: DX11T...
// Carl Borillo // CECS 282-01 // Prog 1- Solitaire Prime // Due- February 8,2021 #include "Card.h" #include <iomanip> Card::Card() {}; Card::Card(char r, char s) { rank = r; suit = s; faceUp = false; } char Card::getRank() { return rank; } char Card::getSuit() { return suit; } bool Card::isFaceUp() { return ...
#include <math.h> #include <iostream> #include "mass_index.h" namespace BMI { <<<<<<< HEAD //Тут есть изменения ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы) ======= //ssssssssssssssssssssssssssssssssss >>>>>>> develop float Mass_Index(float w, float h) { return w / pow(h, 2); } }
////////////////////////////// // Filename: LightClass.h ////////////////////////////// #pragma once #include <D3DX10math.h> class LightClass { private: D3DXVECTOR4 m_ambientColor; D3DXVECTOR4 m_diffuseColor; D3DXVECTOR3 m_direction; public: LightClass(); LightClass(const LightClass&); ~LightClass(); void Set...
// Siva Sankar Kannan - 267605 - siva.kannan@student.tut.fi #include <iostream> #include <string> #include "stack.hh" using namespace std; // Constructor Stack::Stack() { // Initialize the first and last pointers along with the stack size. first_ptr = nullptr; last_ptr = nullptr; list_size = 0; ...
#include "NanoGui.h" #include <glm/glm.hpp> #include <nanogui/nanogui.h> #include "../Core/Engine.h" #include "../Display/Window.h" using namespace nanogui; NanoGui::NanoGui(Engine* engine) { nanogui::init(); Screen *screen = new Screen(); screen->initialize(engine->getWindow()->getInstance(), false); ...
#pragma once #include <unordered_map> #include "IDataBase.hpp" class MapDB : public IDataBase { public: virtual void insert(std::string const &collection, ptree const &doc); virtual ptree findOne(std::string const &collection, ptree const &query); virtual std::vector<ptree> find(std::string const &coll...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2006 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 "OpAccountDrop...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 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 DOM_JIL_API_SUPPORT #include "mod...
/// /// @author Florian Feuerstein /// /// @date 02/2017 /// /// @class IntrinsicCameraCalibration /// /// @brief /// #pragma once #include <ComputerVisionLib/CameraModel/CameraModel.h> #include <ComputerVisionLib/Common/Match.h> #include <ComputerVisionLib/Common/EigenFunctorBase.h> #include <Eigen/Core> #i...
#include<bits/stdc++.h> using namespace std; #define eps 1e-8 const int maxn=50010; int prime[maxn],primesize,phi[maxn]; bool isprime[maxn]; void getlist(int listsize) { memset(isprime,1,sizeof(isprime)); isprime[1]=false; for(int i=2; i<=listsize; i++) { if(isprime[i])prime[++primesize]...
( English:'Dutch'; Native:'Nederlands'; LangFile:''; DicFile:'hollands.dic'; FlagID:'nl'; Letters:'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z'; LetterCount:'6,2,2,5,18,2,3,2,4,2,3,3,3,10,6,2,1,5,5,5,3,2,2,1,1,2'; LetterValue:'1,3,5,2,1,4,3,4,1,4,3,3,3,1,1,3,10,2,2,2,4,4,5,8,8,4'; NumberOfJokers...
#include "stdafx.h" #include <iostream> #include "BelmannFordListAlgorithm.h" BelmannFordListAlgorithm::BelmannFordListAlgorithm(Graph & graph) :BelmannFordMatrixAlgorithm(graph) { } BelmannFordListAlgorithm::~BelmannFordListAlgorithm() { } void BelmannFordListAlgorithm::startAlgorithm() { for (int i = 0; i <= nu...
#include <iostream> #include <queue> #include <vector> #include <functional> #include <algorithm> using namespace std; class MedianFinder { public: /** initialize your data structure here. */ priority_queue<int> smallQ, bigQ; void addNum(int num) { if(smallQ.empty() || num <= smallQ.top()){ ...
#ifndef NEURAL_NETWORK_CONFIGURATION_H #define NEURAL_NETWORK_CONFIGURATION_H #include <string> #include "utility/Matrix.h" #include "utility/types.h" class TiXmlElement; struct NeuralNodeGroupConfiguration { Id id; int nodeCount; float excitationOffset; float excitationMultiplier; float excitationThreshold; ...
#ifndef FINANCE_H #define FINANCE_H #include"QString" #include"QDebug" #include "connection.h" #include "QSqlQueryModel" #include <QDebug> #include <QPalette> #include <QDesktopWidget> #include <QtGui> class facture { protected : QString Nom; QString Adresse ; QString Num_Tel; QString courriel ; int...
#include <thread> #include <condition_variable> #include <cassert> #include <algorithm> #include "atomic.hh" #include "coroutine.hh" #include "logging.hh" #include "task.hh" #include "descriptors.hh" #include <cxxabi.h> #include <execinfo.h> #include <iostream> namespace hack { // hack to avoid redefinition of ucontex...
#include<bits/stdc++.h> using namespace std; typedef struct Point{ int x; int y; Point(int xx=0,int yy=0){ x=xx; y=yy; } }point; int x0,y0,n; vector<point> v,r,h,c; point g; bool mp[15][15]; int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1}; int hdx[]={1,-1,-2,-2,-1,1,2,2}; int...
#pragma once #include "bitset.hpp" static const int DefaultMaxGraphSize = 4096; template <int N> class Graph { public: static_assert(N > 0, "The maximum number of elements in Graph must be positive"); static const int ParamN = N; typedef BitSet<bitSetParam(N)> B; Graph() : size_(0) { } Graph...
#include<iostream> #include<algorithm> #include<vector> using namespace std; class Solution { public: bool isPowerOfFour(int n) { while(n>1) { if(n%4!=0) return false; n/=4; } return n==1; } }; class Solution1 { public boolean isPowerOf...
#include<cstdio> #include<cmath> using namespace std; int n; double po[25][2]; double l[20][20]; bool use[20]; double ans=10000000; void dfs(int,double,int); int main() { scanf("%d",&n); for(int i=1;i<=n;i++) { double x,y; scanf("%lf%lf",&x,&y); po[i][0]=x; po[i][1]=y; } for(...
//=========================================================================== //! @file camera_tps.cpp //! @brief 三人称カメラ //=========================================================================== //--------------------------------------------------------------------------- //! デフォルトコンストラクタ //-----------------------...
#include "roitable.h" RoiTableModel::RoiTableModel(QObject *parent) : QStandardItemModel(parent) { //clear(); setHorizontalHeaderItem(ROI_NAME_COL_ID,new QStandardItem("ROI name")); setHorizontalHeaderItem(ROI_STATUS_COL_ID,new QStandardItem("Status")); setHorizontalHeaderItem(ROI_CLASS_COL_ID,new QStandardI...
/* * Copyright 2016 Freeman Zhang <zhanggyb@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 License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
#pragma once #include <GLFW/glfw3.h> #include <chrono> #include <thread> //#include <Windows.h> // Prosty timer class Timer { private : // Aktualny Czas double World_Time; // Czas włączenia double Start_Time; // Liczba akutalizacji ( klatek) int updates; // Czy działa bool running; public : Timer(...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Blueprint/UserWidget.h" #include "MMOUserWidget.generated.h" /** * */ UCLASS() class MMOPROJECT_API UMMOUserWidget : public UUserWidget { GENERATED_BODY() public: //The actor that this...
#include <iostream> using namespace std; char *oddOrden="Never odd or even"; char *nthCharPtr; int main() { char*nthCharPtr=&oddOrEven[5]; }
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- // // Copyright (C) 1995-2003 Opera Software ASA. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. // // Espen Sand // #ifndef __APPLICATIO...
#include "SimExamples/voronoi/ExmVoronoiPattern.h" #include "SimExamples/SimFramework.h" #include "include/SimException.h" VoronoiPattern::VoronoiPattern(FEATURE_PATTERN type, float depth, int slice, const std::vector<D3DXVECTOR3>& pos_set): vertex_buffer_(NULL), index_buffer_(NULL), pattern_type_(type), depth_(dept...
#include<cstdlib> #include<string> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N = 300; void Test(){ char line[N]; FILE *fp; string stin; cout << "model name: " << endl; cin >> stin; string cmd; cmd = "python ../third_party/free...
// // Activity.cpp // projekt_programowanie_obiektowe // // Created by Phillip on 08/06/2018. // Copyright © 2018 Phillip. All rights reserved. // #include "Activity.hpp" #include <iostream> #include <string> #include <iomanip> #include <fstream> #include "timer.hpp" #include <chrono> using namespace std; Activi...
#include "stdafx.h" #include "PlayerController.h" PlayerController::PlayerController() { _camera = make_shared<Camera>(); isMouseLock = false; Mouse::State mouseState = Mouse::Get().GetState(); _prevMousePos = XMVectorSet(mouseState.x, mouseState.y, 0.0f, 0.0f); } shared_ptr<Camera> PlayerController::GetCamera(...
#include<iostream> #include"workerManger.h" #include"worker.h" #include"employee.h" #include"manger.h" #include"boss.h" using namespace std; int main(){ cout << "project beginning!" << endl; // 实例化管理者对象 WorkerManger test; int choice = 0; // 调用展示菜单成员函数 test.show_Menu(); while(true) ...
#include "MahjongTable.h" #include "MahjongPlayer.h" #include "AllocSvrConnect.h" #include "Logger.h" #ifndef _WIN32 #define __min(a,b) (((a) < (b)) ? (a) : (b)) #endif static std::string CardDataToString(uint8_t* cards, size_t len) { std::string tmp; for (size_t i = 0; i < len; i++) { tmp += TOHEX(cards[i]); ...
class Category_541 { class ItemAntibiotic { type = "trade_items"; buy[] = {1,"ItemGoldBar"}; sell[] = {2,"ItemSilverBar10oz"}; }; class ItemBandage { type = "trade_items"; buy[] = {2,"ItemSilverBar"}; sell[] = {1,"ItemSilverBar"}; }; class ItemAntibacterialWipe { type = "trade_items"; buy[] = {2,"I...
#include <iostream> #include "sale.h" int main() { using std::cin; using namespace SALES; Sales ar[2]; double arr[4] = { 1,2,3,4}; setSales(ar[0], arr, 3); setSales(ar[1]); showSales(ar[0]); showSales(ar[1]); while (cin.get() != 'q') ; return 0; }
#include <stdio.h> void nine(int x){ int sum=0; int a,b,c,d; for(int i=1;i<=x;i++){ a=i%10; b=(i/10)%10; c=((i/10)/10)%10; d=(((i/10)/10))%10; if(a==9 || b==9 || c==9 || d==9) sum++; } printf("%d",sum); } int main(){ int n=2019; // int sum=0; // int a,b,c,d; nine(n); // printf("%d",sum); return 0; }...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include "hal/Usb.hpp" using namespace hal; Usb::Usb(port_t port) : Periph(CORE_PERIPH_USB, port){} int Usb::get_attr(usb_attr_t & attr){ return ioctl(I_USB_GETATTR, &attr); } int Usb::set_attr(const usb_attr_t & attr){ return ioctl(I_USB_SETATTR, &attr); ...
#pragma once #include <pthread.h> #include <memory.h> namespace iberbar { namespace OS { template <int tEventCount > class TMultiEventWaiter { public: TMultiEventWaiter(); ~TMultiEventWaiter(); int Wait(); int MsgWait(); bool Active( int nId ); private: pthread_cond_t m_Condition; ...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define show(x) {for(auto i: x){cout << i << " ";} cout<<endl;} #define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;} typedef long l...
#include "InputListener.h" namespace WGF { InputListener::InputListener() { //ctor } InputListener::~InputListener() { //dtor } } // namespace WGF
#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; myfile ifstream; enum CarMake{ Audi, Chrysler, Honda, Ford, Porche, Nissan, Lexus, Volvo, Mercedes}; struct Date { int day; int month; int year; }; struct Car { string fname; string lname; do...
// Helena Ruiz Ramirez // A01282531 // Enero 11, 2018 // Strings: Ejercicio 1 // Programa que checa si una frase es palindromo o no #include <iostream> #include <string> #include <locale> using namespace std; int main() { long l,s; bool estado=true; string frase; cout<<"Frase: "; getlin...
#pragma once #include "Scene/SceneComponentDef.h" #include "Utils/Hashing.h" #include <typeindex> namespace Rocket { Interface SceneComponent { public: SceneComponent(); SceneComponent(SceneComponent&& other) = default; virtual ~SceneComponent() = default; virtual std::type_index GetType() = 0; const ui...
#include "qscenegraph.h" namespace qEngine { qSceneGraph::qSceneGraph(void) : is2D(false) { m_spViewport.reset(new qViewport()); } qSceneGraph::~qSceneGraph(void) { } bool qSceneGraph::init(boost::shared_ptr<qConfigManager> spCM) { //Viewport Setup m_spViewport->getValuesFromCM(spCM); return true; ...
#include "Node.h" template <class T> Node<T>::Node() { } template <class T> Node<T>::Node(const T* item, Node<T>* ptrNext = nullptr) :data(item), next(ptrNext) { } template <class T> void Node<T>::InsertAfter(Node<T>* p) { p->next = this.next; this.next = p; } template <class T> Node<T>* Node<T>::Delete(...
#include <iostream> #include<string.h> using namespace std; /*Bài 2: Viết hàm nhận vào một chuỗi và trả về chuỗi tương ứng (giữ nguyên chuỗi đầu vào): Các ký tự thành ký tự thường (giống strlwr). Các ký tự thành ký tự hoa (giống strupr). Các ký tự đầu tiên mỗi từ thành ký tự hoa. Chuẩn hóa chuỗi (xóa khoảng trắng thừa)...
// Created on: 2016-04-19 // 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...
#define BLYNK_PRINT Serial // command to print serial #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> //#include <LiquidCrystal.h> //LiquidCrystal lcd(D0, D1, D2, D3, D4, D5); //char auth[] = "71d6ec249b964833bb5026428bc8f5a8";////add token here SME char auth[] = "lw4FeajDCd3gUAlkQIGjeW059EQkD065"; // ...
#include "Menu.h" Menu::Menu() { Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024); soundtrack = Mix_LoadMUS("../../res/au/Pac-Man-Theme-Song.mp3"); Mix_VolumeMusic(MIX_MAX_VOLUME/10); Mix_PlayMusic(soundtrack, -1); playButton = Button(PLAY_BUTTON::ID, PLAY_BUTTON::HOVER_ID, PLAY_BUTTON::X...
// 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....
#ifndef LISTENER_H #define LISTENER_H #include <QDataStream> #include <QFile> #include <QObject> #include <QThread> #include <cstdint> #define BASE_DELAY 2 namespace Engine { class Listener; } /** * @brief The Engine::Listener class */ class Engine::Listener : public QObject { Q_OBJECT public: enum class Li...
// // Created by Stephen Clyde on 1/19/17. // #include <iostream> #include <iomanip> #include "FormattedTable.hpp" FormattedTable::FormattedTable(int maxRows, int maxColumns) : m_maxRows(maxRows), m_maxColumns(maxColumns) { m_columns = new ColumnDefinition*[m_maxColumns]; m_rows = new FormattedRow*[m_...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/icon.Map.g.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Animations.IResize.h> #include <Fuse.Binding.h> #include <Fuse.Controls.Text.h> #include <Fuse.IActualPlacement.h> #include <Fuse.INoti...
//#include<iostream> #include<stdio.h> //using namespace std; const int maxn=10000+5; long long int a[maxn]; int main() { a[1]=1; a[2]=2; int n; while(~scanf("%d",&n)){ for(int i=3;i<53;i++){ a[i]=a[i-1]+a[i-2]; //printf("%d",a[n]); } printf("%lld\n",a[n]); } return 0; }
#include "eff.h" void setcolors(vector<TH1F*> v_hist, vector<TH1F*> v_hist_pos, vector<TH1F*> v_hist_neg) { int size = v_hist_pos.size(); for(int i = 0; i < size; ++i) { v_hist_pos.at(i)->SetLineColor(kRed); v_hist_neg.at(i)->SetLineColor(kAzure); v_hist.at(i)->SetLineColor(kGreen); } } void set...
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll maxn = 10; ll a[maxn], m[maxn], n; ll d; ll exgcd(ll a,ll b,ll &x,ll &y) { if(b==0) { x=1; y=0; return a; } ll r=exgcd(b,a%b,x,y); ll t=x; x=y; y=t-a/b*y; return r; } // ...
// Super Reduced String // https://www.hackerrank.com/challenges/reduced-string/problem #include<bits/stdc++.h> using namespace std; string superReducedString(string s) { bool flag=true; string str=""; int i; for(i=0; i<s.length(); i++) { if(i!=0 && s[i]==str.back()) { ...
#include "ObjectListIterator.h" #include "Ledger.h" #include "logging.h" namespace credb { namespace trusted { ObjectListIterator::ObjectListIterator(const OpContext &op_context, const std::string &collection, const json::Document &predicat...
#include "GamePch.h" #include "PowerUpShield.h" #include "GameMessage.h" uint32_t PowerUpShield::s_TypeID = hg::ComponentFactory::GetGameComponentID(); void PowerUpShield::Start() { m_timer = 0; } void PowerUpShield::Update() { if (m_timer >= m_duration) { PowerUpMessage msg(PowerUpType::kPowerUp_End | PowerUpT...
#include<bits/stdc++.h> #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) #define INF ((1LL<<62)-(1LL<<31)) /*オーバーフローしない程度に大きい数*/ #define MOD 1000000007 using namespace std; using ll = long long; using Graph = vector<vector<int>>; using pint = pair<int,int>; const double PI = 3.14159265358979323846; ...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without * restriction, including wit...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*- * * Copyright (C) 2010-2012 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 MEDIA_...
#include <iberbar/Gui/Element/ElemStateLabel.h> #include <iberbar/Gui/Engine.h> #include <iberbar/Renderer/RendererSprite.h> #include <iberbar/Renderer/Font.h> #include <iberbar/Utility/String.h> #include <codecvt> iberbar::Gui::CElementStateLabel::CElementStateLabel( void ) : CRenderElement() , m_pFont( nullptr...
// Copyright (c) 2018 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/init.hpp> #include <pika/runtime.hpp> #include <pika/testing.hpp> #inc...
/****************************************************************************** * This file is part of the Geometric harmonization project * * * * (C) 2014 Azamat Shakhimardanov *...
/* ***** 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 ****** */ #include <cmath> // fwComEd #include <fwComEd/fieldHelper/MedicalImageHel...
// // YMRenderTexture.cpp // YouMeVideoDemo // // Created by fire on 2017/4/1. // // #include "YMRenderTexture.h" #include "IYouMeVoiceEngine.h" #include <memory> USING_NS_CC; #define CLAMP(i) (((i) < 0) ? 0 : (((i) > 255) ? 255 : (i))) YMRenderTexture::YMRenderTexture() { // TODO } YMRenderTexture::~YM...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2009 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 HAS_SET_HTTP_DATA #include "modules...
#ifndef WIDGET_H #define WIDGET_H #include <QWidget> #include <QPushButton> #include <QLineEdit> #include <QObject> #include "myqlineedit.h" class Widget : public QWidget { Q_OBJECT public: Widget(QWidget *parent = 0); ~Widget(); private: QPushButton *b1; QPushButton *b2; QPushButton *b3; ...
#pragma once #include "Vehicle.hpp" #include "Messages.hpp" class remote_vehicle : public Vehicle { public: remote_vehicle(); void draw(); };
#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 typedef long long LL; int main(int argc, char const *argv[]) { int n,m,c; int kase = 1; int table[MAXN]; bool turn[MAXN]; while( ~sca...
#include "TestCPU.h" #include "Memory.h" #include <iostream> int main(int argc, char** argv) { using namespace test; memoryInterface *mem = new RAMImpl(8); cpu device(mem); CPUtestbench tester(&device); tester.storeReg(1, 177); tester.constructInstruction(COP2, 4, 1, gte::VXY0, 0,...
#include "StdAfx.h" #include "MsgList.h" CMsgList::CMsgList(CPaintManagerUI& paint_manager) : paint_manager_(paint_manager) { root_node_ = new Node; root_node_->data().list_elment_ = NULL; } CMsgList::~CMsgList(void) { RemoveAll(); if (root_node_) delete root_node_; root_node_ = NULL; } void DuiLib::CMsgLi...
#include <iostream> #include <vector> #include <cmath> using namespace std; typedef unsigned __int64 int64; struct Palindrome { int left = 0; int right = 0; int64 product = 0L; }; void findEratosthenesPrimeNumbers(int lowerLimit, int upperLimit, vector<int>& primes) { vector<bool> sieve(...
class Category_643 { duplicate = 621; }; class Category_609 { duplicate = 621; };
// // This file contains the C++ code from Program 5.19 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.pads.uwaterloo.ca/Bruno.Preiss/books/opus4/programs...
/***************************************************************************************************************** * File Name : FindTwoNumbersOddOccurence.h * File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\sites\geeksforgeeks\arrays\page04\FindTwoNumbersOddOccurence.h * Created on : Jan 8,...
#include <iostream> #include <vector> #include "dirgraph.h" #include "depth_first_order.h" using namespace std; class KosarajuSCC { private: vector<bool> marked; // 已访问过的节点 vector<int> id; // 强连通分量的标识符 int count; // 强连通分量的数量 private: void dfs(Digraph &G,int v) { marked[v] = true; ...