text
stringlengths
8
6.88M
#ifndef NOFOCUSDELEGATE_H #define NOFOCUSDELEGATE_H #include <QPainter> #include <QStyle> #include <QStyledItemDelegate> #include <QStyleOptionViewItem> #include <QModelIndex> class NoFocusDelegate : public QStyledItemDelegate { public: virtual void paint(QPainter * painter, const QStyleOptionViewItem...
 #pragma once #if defined(_WIN32) #define GLEW_STATIC #include <GL/glew.h> #endif #if defined(__APPLE__) #include <OpenGL/gl3.h> #endif #include "../ar.BaseInternal.h" #include "../ar.ImageHelper.h" static std::vector<GLenum> GLCheckError_Impl(const char *file, const int line) { std::vector<GLenum> codes; GLenum...
#include <cstdio> using namespace std; /*/4 int main() { const int N = 20; typedef int vetor[N]; int aux; vetor v; for(int i=0;i<N;i++){ v[i] = i; printf("\nnumero: %d", i); } printf("\n\n"); for(int i=N-1;i>-1;i--){ printf("\nnumero: %d", v[i]); } ...
// Created on: 1992-06-04 // Created by: Jacques GOUSSARD // 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 G...
#include "GameCmd.h" #include "CDLReactor.h" #include "Despatch.h" #include "BackConnect.h" #include "Logger.h" #include "Configure.h" static std::map<int, BackNodes*> _nodes_map; static InputPacket pPacket; //=================ConnectHandler========================= ConnectHandler::ConnectHandler( Connector* connector...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define show(x) for(auto i: x){cout << i << " ";} typedef long long ll; int main() { ll n; cin >> n; ll ans = 0; ll div10 = 10; if (n%2 != 1){ while(n/div10 > 0){ ...
// RAVEN BEGIN // ddynerman: note that this file is no longer merged with Doom3 updates // // MERGE_DATE 09/30/2004 #ifndef __MULTIPLAYERGAME_H__ #define __MULTIPLAYERGAME_H__ /* =============================================================================== Quake IV multiplayer ===================================...
// Fill out your copyright notice in the Description page of Project Settings. #include "Button1.h" #include "ButtonInteractorComponent.h" #include "Button1ActionComponent.h" AButton1::AButton1() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. Pr...
#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int main() { for(int i=1000;i<10000;i++){ int a,b,c,d; a=i/1000; b=i/100%10; c=i/10%10; d=i%10; if(a==d&&b==c){ printf("%d\n",i); } } return 0; } ...
#ifndef __VIVADO_SYNTH__ #include <fstream> using namespace std; // Debug utility ofstream* global_debug_handle; #endif //__VIVADO_SYNTH__ #include "blur_xy_16_unrolled_8_opt_compute_units.h" #include "hw_classes.h" struct blurx_blurx_update_0_write0_merged_banks_2_cache { // RAM Box: {[0, 1920], [0, 1079]} /...
#pragma once #include "MainHeader.h" #include "tiny_obj_loader.h" #include "Gizmos.h" #include "Input.h" #include "Camera.h" #include "FlyCam.h" #include "Entity.h" #include "Application.h" #include "ParticleEmitter.h" #include <imgui.h> #include "GPUParticleEmitter.h" #include "Shader.h" class Application3D : public ...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "167" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) vector <int> table[8]; int column[8],Left[15],Right[15]; int tmp[8]; void Queen(int k){ if( k == 8 ){ for(int j = 0 ; j < 8 ; j++){ table[j].push_back(tmp[j]); ...
#pragma once #include "Fornitual.h" class Bed : virtual public Fornitual { public: Bed(float l, float w, float h); void sleep(); };
#ifndef CSHAPE_H #define CSHAPE_H // system includes #include <iostream> #include <map> // project includes #include "xmlParser.h" // forward declaration class CShape; // typedef typedef CShape* (*CreateFromXmlType )( XMLNode& ) ; class CShape { public: CShape () : mVisible(true) { gTotalS...
#include "util.h" std::vector<std::string> util::tokenize(std::string s, std::string del) { std::vector<std::string> ret; int start = 0; int end = s.find(del); while (end != std::string::npos) { ret.push_back(s.substr(start, end - start)); start = end + del.size(); end...
#pragma once #include "ErrorCode.h" namespace arithmetic_parser { struct ErrorData { ErrorCode m_error_code; int m_error_start_index; int m_error_end_index; //string description of the error ErrorData() = default; ErrorData(const ErrorData&) = default; ErrorData(ErrorCode error_code, int error_start_...
#ifndef FILENETWORKMANAGER_H #define FILENETWORKMANAGER_H #include <QtCore> #include <QtNetwork> #include <QNetworkAccessManager> #include <QProgressBar> #include "commons.h" class FileNetworkManager : public QNetworkAccessManager { Q_OBJECT public: explicit FileNetworkManager(QString address, QP...
// // Created by Lee on 2019-04-23. // #include "PhotoThumbnailForUpload.h" #include <QDebug> #include <QUrl> #include <QStandardPaths> #include <QFileDialog> #include <QProcess> #include <src/image/ImagePool.h> #include <src/util/ThumbnailMaker.h> #include <src/util/ImageFileManager.h> #include <src/util/ImageDownl...
#include <iostream> int main() { int p, q; std::cin >> p >> q; if (p == q ) { std::cout << 0; } else { std::cout << 1; } return 0; }
#include "BlackScholesDiscreteDivPut.h" BlackScholesDiscreteDivPut::BlackScholesDiscreteDivPut(double _S0, double _E, double _r, double _sigma, double _T, int dividend_number, Dividend<double> **dividends) : BlackScholesMertonPut(_S0, _E, _r, _sigma, _T), dividend_number(dividend_number), dividends(dividends) ...
#include "SystemTimer.h" #ifndef __SystemTimer_H #error [E030] Не определен заголовочный файл SystemTimer.h #endif uint64_t SystemTimer::ticks = 0; //-----------public---------------------------- void SystemTimer::init10msInterrupt() { OCR2 = 158-1; // Записываю регист...
// Copyright (c) 2013 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 version 2.1 as published // by the Free Software Foundation, with special ...
#pragma once #include <math/hitable.h> /* Holds all the shapes in the scene. */ class ShapeList { public: __device__ ShapeList() = default; __device__ ShapeList(Hitable** objs, int count) : object_list(objs), object_count(count) {} __device__ ~ShapeList() = default; /* Casts a ray and returns if it hit any obje...
// // Created by abel_ on 03-09-2022. // #include <bits/stdc++.h> using namespace std; void printDuplicates(int arr[],int n){ unordered_set<int> intSet; unordered_set<int> duplicateSet; for(int i=0;i<n;i++){ if(intSet.find(arr[i]) != intSet.end()) { intSet.insert(arr[i]); }else...
/*In this lets see about INHERITANCE in C++ Program.*/ /*The most important features of OOPs is INHERITANCE.*/ /*Inheritance make easy to create and maintain an application.*/ /*Inheritance are mainly used for Code Reuseability and fast implementation of time*/ /*The process of using the data member of a class whic...
#ifndef IS_PRIME_HPP #define IS_PRIME_HPP #include <cmath> namespace Extra::Math { static bool isPrime(size_t num) { const size_t boundary = static_cast<size_t>(sqrt(num)); for (size_t i = 2; i <= boundary; ++i) if (num % i == 0) return false; return num >=...
#pragma once // includes system #include <cstdlib> #include <string> // includes project #include "integrator.h" #include "nbody.h" #include "parameter.h" #include "red_type.h" using namespace std; class options { public: options(int argc, const char** argv); ~options(); nbody* create_nbody(...
#include "kg/util/log.hh" #include <iostream> kg::log::~log() { std::clog << _stream.str() << std::endl; }
#include<iostream> using namespace std; const int SIZE = 26; struct node { node* next[SIZE]; int strings; node() { for (int i = 0; i < SIZE; i++) { next[i] = nullptr; } strings = 0; } }; void add(struct node* root, string key) { struct node* cur_v = root...
#include <iostream> #include <config.hpp> #include <generic_handler.hpp> namespace util { config::config(std::string bind_hostname, int bind_port, int thread_pool_size) { bind_hostname_ = bind_hostname; bind_port_ = bind_port; thread_pool_size_ = thread_pool_size; } config::config() {} void con...
/* * ===================================================================================== * * Filename: exercise3.cc * * Description: the exercise 3 of chapter 3 function objects * * Version: 1.0 * Created: 05/24/2014 18:16:53 * Revision: none * Compiler: gcc * * ...
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <stdlib.h> #include <stdio.h> #include <algorithm> #include<vector> //Masoud QashQaei 9150022 using namespace std; struct Building { int left; // x coordinate of left side int ht; // height int right; // x coordinate of right si...
#ifndef euclidean_h #define euclidean_h #include <vector> #include <tr1/array> #include <tr1/memory> #include "Manifold.h" #include <Eigen/Dense> using Eigen::Matrix3d; using Eigen::Vector3d; class R2xS1 : public Manifold { public: class PointOfReference; class Point : public Manifold::Point { public: R2x...
#include "clientele.h" #include "personne.h" #include "QSqlQueryModel" Clientele::Clientele() { } Clientele::Clientele(QString Prenom,QString Nom,QString Num_Tel,QString CIN,QString Adresse,int ID,QString courriel,int ID_client,int Age,QString Date_N,QString Date_D,QString Date_F,QString Taille,QString Poids,int Numbe...
#include <ros.h> #include <std_msgs/Int8.h> #include <beginner_tutorials/Num.h> #include <custom_messages/driveMessage.h> #include <std_msgs/UInt8.h> /** * This tutorial demonstrates simple receipt of messages over the ROS system. */ //void chatterCallback(const std_msgs::String::ConstPtr& msg) //{ // ROS_INFO("I ...
// // BlendMode.h // Odin.MacOSX // // Created by Daniel on 25/10/15. // Copyright (c) 2015 DG. All rights reserved. // #ifndef __Odin_MacOSX__BlendMode__ #define __Odin_MacOSX__BlendMode__ namespace odin { namespace render { class BlendMode { public: enum Factor ...
#include "screen.h" #include "Camera.h" #include "ShaderProgram.h" #include "texture.h" #include "cubeData.h" #include "planeData.h" #include "Model.h" #include "Mesh.h" #include "Light.h" #include "utils.h" #include <stdio.h> #include <stdlib.h> #include <memory> #include <string> #include <vector> #include <glad\gl...
//看讨论区 找到一个感觉很厉害的 98% //128 ms 84.62 % 测了好多次 最高就是前面 最低16% 这个系统无敌了 class Solution { public: vector<int> findDuplicates(vector<int>& nums) { vector<int> result; nums.push_back(nums.size()+1); for(int i = 0; i < nums.size()-1;++i){ nums[abs(nums[i])] = -nums[abs(nums[i])];...
#ifndef PRODUCTWIDGET_H #define PRODUCTWIDGET_H #include <QMainWindow> #include <QDebug> #include "product.h" namespace Ui { class ProductWidget; } class ProductWidget : public QMainWindow { Q_OBJECT public: explicit ProductWidget(QWidget *parent = nullptr); ~ProductWidget(); void addInformation(cons...
#pragma once class Vector2 { public: double X; double Y; Vector2(double x, double y) : X(x), Y(y) {} double Distance(Vector2 a, Vector2 b) { Vector2 result = a - b; return result.X + result.Y; } Vector2& operator+=(const Vector2& a) { this->X += a.X; this->Y += a.Y; return *this; } Vector2& op...
/* Copyright (c) 2017 u-blox * * 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 w...
// MainToolView.cpp : 实现文件 // #include "stdafx.h" #include "OgreEditor.h" #include "MainToolView.h" #include "ObjectDialog.h" #include "TerrainDialog.h" #include "DisplayDialog.h" #include "LayerDialog.h" // CMainToolView IMPLEMENT_DYNCREATE(CMainToolView, CXTTabView) CMainToolView::CMainToolView() ...
/* * 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/portability/GTest.h> #include <quic/codec/QuicPacketBuilder.h> #include <quic/codec/QuicPacketRebuilder.h> #incl...
#ifndef RPC_SOCKET_HPP #define RPC_SOCKET_HPP #include <vector> #include <cstddef> #include "tcb/span.hpp" #include "uvw.hpp" #include "common/async.hpp" namespace rpc { class generic_socket { protected: bool _is_open; bool _is_connected; bool _handshake_finished; size_t next_message_id; std::vector<s...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * @author Patryk Obara (pobara) */ #include "core/pch.h" #include "platforms/quix/de...
//算法:暴力枚举 //暴力三层循环枚举所有情况 //然后判断是否合法 #include<cstdio> using namespace std; int n,ans; int a,b,c,d,e,f; int abs(int x) { return x<0?x*(-1):x; } int main() { scanf("%d%d%d%d%d%d%d",&n,&a,&b,&c,&d,&e,&f); for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) for(int k=1;k<=n;k++) if(((abs(i-a)<=2...
/* Crayfish - A collection of tools for TUFLOW and other hydraulic modelling packages Copyright (C) 2016 Lutra Consulting info at lutraconsulting dot co dot uk Lutra Consulting 23 Chestnut Close Burgess Hill West Sussex RH15 8HN This program is free software; you can redistribute it and/or modify it under the terms o...
#ifndef HEAP_H_ #define HEAP_H_ #include "DBFile.h" class Heap: public DBFile { public: Heap(); ~Heap(); int Close (); void Add (Record& me); void MoveFirst(); int GetNext (Record &fetchme, CNF &cnf, Record &literal); protected: void readMode(); }; inline void Heap::readMode() { if (mode == read) retu...
#ifndef PLAYER_H #define PLAYER_H #include "Object.h" class Vector; class Player : public Object { public: explicit Player(const char*); Player(const Player&); virtual void update(void); char whichClass(void); protected: void decelerate(void); void autoMove(void); private: Vector* route; short routeNum; ...
#pragma once class CMath { public: static const float PI; static float DegToRad(float deg) { return deg * (PI / 180.0f); } static float RadToDeg(float rad) { return rad / (PI / 180.0f); } static inline float Lerp(float rate, float t0, float t1) { return t0 + (t1 - t0)*rate; } };
#include <ostream> #include "knock.h" void toggle_am_pm(){ if(am == 1){ am = 0; } else if(am == 0){ am = 1; } } /* * Resets the time to midnight */ void reset(){ hours = 12; minutes = 0; seconds = 0; am = 1; } /* * Advances the time of the clock by one second */ ...
#include <SFML/Graphics.hpp> #include "Player.h" #include "TileMap.h" #include "Enemy.h" #include <iostream> int main() { sf::Clock clock; std::vector<std::vector<int>> level = { { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 0, 0, 1, 0, 0, 0, 2, 0, 4 }, { 4, 0, 0, 1, 1, 1, 0, 0, 0, 4 }, { 4, 0, 0, 0, 0, 1, 1, 1, 1,...
//=========================================================================== //! @file shadow_map.h //! @brief シャドウマップ管理 //=========================================================================== #pragma once //=========================================================================== //! @class ShadowMap //=====...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 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/windows/WindowsShortcut.h" #include "adjun...
#ifndef _POOL_H_ #define _POOL_H_ #include <map> #include <vector> #include <random> #include <assert.h> #include "Profile.h" using namespace std; class Pool{ private: // vector< map<unsigned int, unsigned int> > mutations_map; // Version con vector posicionale en lugar de mapa // Aqui el id del alelo es dir...
#ifndef ECCEZIONI_H #define ECCEZIONI_H #include <string> using std::string; class eccezioni { private: string error; protected: eccezioni(string a): error(a) {} public: string to_string_error() const; }; class input_error : public eccezioni{ public : input_error(string a = "Errore input." ) : ecce...
#include <iostream> #include <fstream> #include <Windows.h> #include <sstream> #include <string> #include <cerrno> #include <WinUser.h> #include "ArgumentsParsing.h" #include "ErrorCode.h" #include "Utils.h" #include "Version.h" #include "resource.h" namespace arithmetic_parser { bool FindOption(const std::map<CmdOp...
/* Copyright (c) 2006-2022 Xavier Leclercq Released under the MIT License See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt */ #include "Test.hpp" #include "TestSequence.hpp" #include "DebugHeap.hpp" #include <boost/filesystem/operations.hpp> #include <boost/range/algorithm.hpp> using...
int motor_one1=9; int motor_one2=10; int motor_two1=5; int motor_two2=3; char command; void setup() { Serial.begin(9600);// put your setup code here, to run once: pinMode(9,OUTPUT); pinMode(10,OUTPUT); pinMode(5,OUTPUT); pinMode(3,OUTPUT); } void loop() { while(Serial.available()>0){ command=Serial.read(); if(com...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2007-2008 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ /** \file * * \brief Implement callstack handeling functionali...
#include <DXLib.h> #include "WindowInformation.h" #include "GameManager.h" int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdshow ) { SetWindowText( "闇音" ); Sounder::Set3DSoundOneMetre( 0.2f ); ChangeWindowMode( TRUE ); SetAlwaysRunFlag( TRUE ); //別のウィンドウに切り替えても処理が継続さ...
#ifndef TIMBER_H #define TIMBER_H #include <string> using namespace std; class Timber { private: float pricePerMeter; int width; int length; int totalWoodMeters; public: Timber(); Timber(int width, int length, float pricePerMeter, int totalWoodMeters); ~Timber(); void setPricePerMeter(float price...
#pragma once #include "..\Entity\GameSystem.h" #include "..\..\SDL2_mixer-2.0.0\SDL_mixer.h" #include "AssetManager.h" class SoundSystem : public GameSystem { public: SoundSystem(void); virtual ~SoundSystem(void); virtual void Init(); virtual void Update(); void PlaySound(const wchar_t* name); void PlaySound(...
#include <chuffed/branching/branching.h> #include <chuffed/core/engine.h> #include <chuffed/core/propagator.h> #include <chuffed/globals/mddglobals.h> #include <cassert> #include <cstdio> #include <iostream> static void skipComments(std::istream& i) { assert(i.peek() == '#'); while (i.peek() != '\n' && i.peek() !=...
/* * Heuristic.h * * Created on: 17 Jun 2015 * Author: Jack */ #ifndef HEURISTIC_H_ #define HEURISTIC_H_ #include "DraughtsModule.h" #include "BinConvert.h" #include "Utils.h" #include <sstream> enum HeuristicParameter { PARAM_MEN, PARAM_KINGS, PARAM_ENEMY_MEN, PARAM_ENEMY_KINGS, PARAM_SAFE_MEN, PAR...
#include "Session.h" Session::Session(unsigned int sessionKey, NetManager * cnet) : m_sessionKey(sessionKey), m_cnet(cnet) { } Session::~Session() { } void Session::AddHost(const HostID & hid) { if(!m_hosts.contains(hid)) { m_hosts.append(hid); } } void Session::SendToAll(...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Soft...
#include <iostream> using namespace std; int main() { // 1. Initialize a stack stack<int> s; // 2. Push new element s.push(5); s.push(13); s.push(8); s.push(6); // 3. Check if stack is empty if(s.empty()) { cout << "Stack is empty!" << endl; return 0; } // 4. Pop an element s.pop(); /...
#include<iostream> #include<vector> #include<algorithm> #include<unordered_map> using namespace std; class Solution { public: bool isAnagram(string s, string t) { //基本思想:排序 sort(s.begin(), s.end()); sort(t.begin(), t.end()); return s == t; } }; class Solution1 { public: bool isAnagram(string s, string t) { ...
// This file is part of the xxxxxxxxx project. // This Source Code Form is subject to the terms of the Mozilla Public License, // v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at https://mozilla.org/MPL/2.0/. /* * File: uncertainty.h * Author: xxxxxxxxx xxxxxxxxx * * Crea...
#include <iostream> #include <algorithm> using namespace std; template<typename T> auto reduce(T ar[], int n) { T* pt = unique(ar, ar + n); sort(ar, pt); return distance(ar, pt); } int main() { cout << "How many numbers in total?"; int n; cin >> n; long* arr = new long[n]; for (int i = 0; i < n; ++i) { cou...
#pragma once #include <dynamic_reconfigure/server.h> #include <ros/forwards.h> #include <tf2_ros/transform_broadcaster.h> #include <tf2_ros/transform_listener.h> #include <nav_msgs/Path.h> #include <Eigen/Eigen> #include <Eigen/Dense> #include "road_map/RoadMap.hpp" #include <random> #include <cv_bridge/cv_bridge.h> #...
/* * MIT License * * Copyright (c) 2016, 2017 by S. Yingchareonthawornchai and J. Daly at Michigan State University * * 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 res...
/* ** EPITECH PROJECT, 2019 ** tek3 ** File description: ** ContactList */ #ifndef CONTACTLIST_HPP_ #define CONTACTLIST_HPP_ #include <QtWidgets> #include <QApplication> #include <vector> #include <iostream> #include "Contact.hpp" namespace babel { namespace graphic { class ContactList : public QWidget ...
#ifndef _ThrowCardProc_H_ #define _ThrowCardProc_H_ #include "BaseProcess.h" class Table; class Player; class ThrowCardProc : public BaseProcess { public: ThrowCardProc(); virtual ~ThrowCardProc(); int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket, Context* pt); int doResponse(CDLSocketHan...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef STDLIB_DOUBLE_FORMAT_H #define STDLIB_DOUBLE_FORMAT_H c...
// Fill out your copyright notice in the Description page of Project Settings. #include "CSPowerUpBase.h" #include "CSCharacter.h" #include "Net/UnrealNetwork.h" // Sets default values ACSPowerUpBase::ACSPowerUpBase() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 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 "modules...
#include <iostream> #include <string> #include <sstream> #include <cstddef> // std::size_t #include "Contact.class.hpp" Contact::Contact() : index(0) { Contact::_count += 1; return ; } Contact::~Contact(){ Contact::_count -= 1; return ; } size_t Contact::getNbInst(){ return Contact::_count; } voi...
// 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...
#ifndef GAME_GAME_H #define GAME_GAME_H #include"basecnst/glpack.h" class Game { public: Game(); void init_all(); void start(); }; #endif
#pragma once #include "../Entity/Entity.h" #include <vector> #include "../Components/BoxCollider.h" #include "../Core/DFCman.h" static const int MAX_OBJS_PER_SCENE = 99999; class dfScene : public Entity { public: dfScene(void); virtual ~dfScene(void); virtual void Init(); virtual void Update(); void (*setupFu...
#include<iostream> using namespace std; int main() { int t; cin>>t; int n; int a[100000]; while(t) { int mod2=0; int mod4=0; cin>>n; for(int i=0;i<n;i++) { cin>>a[i]; } for(int i=0;i<n;i++) { if(a[i]%4==0) mod4++; else if(a[i]%2==0) mod2++; } if(mod4>=(n-mod2-mod4)) cout<<"Yes"<<endl; else cout<<"No"<<endl; t--; } }
#include "test_compiler_detection.h" #define PREFIX TEST #include "compile_tests.h" #ifdef TEST_COMPILER_C_STATIC_ASSERT # error Expect no C features defined #endif TEST_STATIC_ASSERT(true); TEST_STATIC_ASSERT_MSG(true, "msg"); int main() { return 0; }
#include "odb/server/cli-client-handler.hh" #include <cassert> #include <cstdio> #include <iostream> #include <signal.h> #include <unistd.h> #include "odb/server/db-client-impl-vmside.hh" #include "odb/server/server-app.hh" namespace odb { namespace { bool g_sig_stop = false; bool g_manual_stop = false; void sigi...
#include <bits/stdc++.h> using namespace std; string decimal_to_binary(int n) { string ans; while(n>0){ int current_bit = n&1; ans+=current_bit+'0'; n>>=1; } reverse(ans.begin(),ans.end()); return ans; } int main() { string binary = decimal_to_binary(244); cout << binary << ...
#include "bricks/imaging/videocodec.h" #include "bricks/imaging/bitmap.h" namespace Bricks { namespace Imaging { VideoCodec::VideoCodec() : framesPerSecond(0), frameCount(0), frameWidth(0), frameHeight(0), position(0) { } void VideoCodec::Seek(s64 frame) { position = frame; } ReturnPointer<BitmapImage> V...
#include <iostream> #include <sstream> #include <cctype> #include <set> #include <algorithm> #include "util.h" using namespace std; std::string convToLower(std::string src) { std::transform(src.begin(), src.end(), src.begin(), ::tolower); return src; } void parseHelper(string word, set<std::string>& wordList) { ...
#include "core.h" #include "engine_platform.h" #include "asset.h" #include "math.h" #include "mesh.h" static_func void EngineViewCreateGrid(void *buffer, u64 &offset, asset *asset) { asset->type = ASSET_TYPE_MESH; asset->header = buffer; mesh_header *m = (mesh_header *)asset->header; m->vertexSize = sizeof(vec3);...
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
#ifndef INSTANCEDMESH_H #define INSTANCEDMESH_H #include <list> #include "core/glmcfg.h" #include "core/pbutil.h" #include "geometry.h" #include "instanceattribsmgr.h" namespace pb { template < typename f32_layout, typename uint32_layout > class InstancedGeometry : public IInstancedGeometry { /* struct transfor...
#ifndef SUBJECT_H #define SUBJECT_H #include<list> #include<string> class Observer; class OBSubject { public: virtual ~OBSubject(); virtual void Attach(Observer *obv); virtual void Detach(Observer *obv); virtual void Notify(); virtual void SetState(const std::string &st) = 0; virtual std::string GetState() = 0; p...
#include"konto.h" #include"person.h" #include"bank.h" #include<iostream> using namespace std; #include<vector> #include<memory> Bank::Bank(){ this->bankname="Bank Austria"; } Bank::Bank(string bankname){ this->bankname=bankname; } vector<shared_ptr<Person>> Bank::getKunden() const{ return kunden; } void Bank::kue...
#include "Generator.hpp" #include <assert.h> #include <iostream> std::vector<uint8_t> TerrainGen::compress( const std::vector<uint8_t>& input, size_t inp_size, size_t pixels_to_compress, size_t out_size, size_t patch_offset_x, size_t patch_offset_y ) { assert( pixels_to_compress && "Compression must be l...
#pragma once #include <string> #include <ionir/construct/type.h> #include <ionir/construct/inst_yield.h> #include <ionir/construct/inst.h> namespace ionir { class BasicBlock; struct AllocaInstOpts : InstYieldOpts { ionshared::Ptr<Type> type; }; struct AllocaInst : Inst, InstYield { i...
#include "Header/print.cpp" using namespace std; class BST { private: node *root; public: BST() { root=0; } void addNode(int info) { node *n=root; node *p=0; while(n) { ...
#include "Nodo.h" #include <iostream> Nodo::Nodo() { nhijos = 0; padre = 0; } Nodo* Nodo::agregarHijo() { this->hijo.push_back(new Nodo); this->hijo[nhijos]->padre = this; return this->hijo[nhijos++]; } void Nodo::setInfo(ListaFichas _fichas) { fichas.copiaDesde(_fichas); } ListaFichas Nodo::getInfo() { retu...
// 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 version 2.1 as published ...
#include "Button.h" Button::Button(byte pin) { this->pin = pin; this->pin_mode = INPUT; // Assume INPUT if not specified // Using INPUT_PULLUP, so everything is flipped. //lastReading = LOW; lastReading = HIGH; init(); } Button::Button(byte pin, byte pin_mode, bool isInterruptButton, long d...
#include <iostream> #include <fstream> #include <iomanip> using namespace std; int main(int argc, char** argv){ ifstream input; input.open("chairs.in", ios::in); int a, b, c; input>>a>>b>>c; input.close(); double ans; cout<<fixed<<showpoint; cout<<setprecision(30); ans = ((dou...