text
stringlengths
8
6.88M
// Copyright (c) 2013-2019 Thomas Heller // Copyright (c) 2008 Peter Dimov // 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 ...
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen ( SIVA ) // 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 ...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* MaterialSource.cpp :+: :+: :+: ...
#include "metodosOrdenacao.h" #include <fstream> #include "Dados.h" using namespace std; MetodosOrdenacao::MetodosOrdenacao(int n) { tamanhoPreenchido = n; } MetodosOrdenacao::~MetodosOrdenacao() { } //funcao paripcao, utilizada para percorrer o vetor com o pivo, dividi-lo e organizar void Metodos...
#ifndef __ERR__ #define __ERR__ #ifdef _DEBUG const bool debug = true; #else const bool debug = false; #endif #endif
//concurrent echo server //from UNP p98 #include <iostream> #include <utility> #include <string> #include <errno.h> #include <unistd.h> #include <signal.h> #include <memory.h> #include <netinet/in.h> #include <bits/socket.h> #include <sys/socket.h> #include <sys/select.h> #include <sys/types.h> #include <arpa/inet.h> ...
#pragma once enum QsoErrorType { eUnknownError, eQsoNotFoundInLog, eQsoLoggedWrongCallsign, eDuplicateQso}; class QsoError { public: QsoError(QsoErrorType errorType = eUnknownError); virtual ~QsoError(); string m_error; QsoErrorType m_errorType; };
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; typedef long long int ll; using ii= pair<ll,ll>; #define fr(i,a,b) for(ll i=a;i<b;i++) #define all(o) (o).begin(),(o).end() #define F first #define S second #define MP make_pair #define PB push_back #define ld long double #define eps 0.00000000...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 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 WIDGET_RUNTIME_SUPPORT # ifdef WID...
#include "collisionengine.h" #include "groupcontainer.h" #include "../CollisionTester/collisiontester.h" #include "../collisionbody.h" #include "../CollisionResults/collisionresult.h" #include "../CollisionResults/resultdata.h" #include <future> #include <thread> #include <algorithm> using namespace std; namespace ...
 /* 客户端一旦连接上来,就发送一个欢迎信息: 告知版本号,是否启用通信加密,产品信息 */ #include "myClient.h" #include "LibXs.h" #include "GxProxy.h" #include "XNetBuffer.h" #include "XString/XString.h" #include "XLog.h" #include "myProxy.h" #include "uv.h" #include "myServer.h" X_IMPL_SINSTANCE(CxMyClientPool) ////////////////////...
/** * main_app function definition */ #pragma once extern void main_app();
#include "Level.hpp" Level::Level() { m_loaded = false; } Level::Level(const char* file) { m_loaded = load(file); } Level::~Level() { } bool Level::load(const char* file) { Debug& dbg = Debug::GetInstance(); dbg.Print("Loading map: %s", file); std::ifstream in(file); if (in.bad()) { ...
#include "triangulation.hpp" #include <cmath> #include <map> #include <set> #include "gmock/gmock.h" #include "gtest/gtest.h" #include "initial_triangulation.hpp" int bsd_rnd() { static unsigned int seed = 0; int a = 1103515245; int c = 12345; unsigned int m = 2147483648; return (seed = (a * seed + c) % m)...
#include <iostream> #include <map> #include <set> using namespace std; class UnionFind { public: set<int> node; map<int, int> par, diff, num; int find(int x) { if (!node.count(x)) return -1; if (par[x] == x) { return x; } else { int p = find(par[x]); ...
#include <iostream> int main() { std::cout << "Größe eines int: " << sizeof(int) << std::endl; return 0; // Aufgabe: Geben Sie analog die Größe eines float, double und char aus }
#include "MyUtility.h" #include "stdafx.h" // SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的 // ATL 项目中进行定义,并允许与该项目共享文档代码。 #ifdef _DEBUG #define new DEBUG_NEW #endif void CMyUtility::MyCreatDirectory()//新建文件夹"D://Boxing" { CString strFolderPath = CString("D://Boxing"); if (!PathIsDirectory(strFolderPath))//判断路径是否存在 { ...
/* Base class for all C++ objects. Provides fast run-time type checking and run-time instancing of objects. */ #include "../../idlib/precompiled.h" #pragma hdrstop #include "../Game_local.h" #ifdef _WIN32 #include "TypeInfo.h" #else #include "NoGameTypeInfo.h" #endif /********************************************...
#include <iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<iomanip> //输出格式 using namespace std; int pay[10005]; double ch[10005]; double j[10005];//使用二位数组标记内存超限 int n,m; double min(double a,double b) { if(a>b) return b; else return a; } double f(double a,dou...
#pragma once class GameLogicManager : public CMultiThreadSync<GameLogicManager> { public: GameLogicManager(); ~GameLogicManager(); private: vector<GameLogic* > m_GameLogicVec; public: BOOL Begin(); BOOL End(); VOID AddLogic(GameLogic* gameLogic); VOID SyncUpdate(); VOID DataUpdate(); };
// // Created by jwscoggins on 12/20/20. // #include "TraceControls.h" namespace i960 { Ordinal TraceControls::modify(Ordinal mask, Ordinal src2) noexcept { auto temp = raw_; auto intermediateTemp = (EventFlags & raw_ & mask) | (ModeBits & mask); raw_ = (intermediateTemp & src2) | (raw_...
/* =========================================================================== Copyright (C) 2017 waYne (CAM) =========================================================================== */ #pragma once #ifndef ELYSIUM_GRAPHICS_SEMAPHORE #define ELYSIUM_GRAPHICS_SEMAPHORE #endif #ifndef ELYSIUM_CORE_OBJ...
// Created on: 1991-10-04 // Created by: Remi GILET // 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 Les...
#include<bits/stdc++.h> using namespace std; int main() { // only gravity will pull me down // Element appearing once int t, n, flg, curr; cin >> t; while (t--) { cin >> n; vector<int> a(n); curr = -1; for(int i=0; i<n; i++) { cin >> a[i]; ...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> const int n = 10; const int m = 15; struct person { char first_name[30]; char last_name[30]; int judge_s_seat[10]; int award; int mark[10]; }; void end(person man[], int size_man, int size_j) { printf("\n"); for (int i = 0; i < size_man; i++) { printf("|...
#include"Mediumwall.h" #include "ball.h" #include "Play.h" #include <QList> #include <QTimer> #include <QGraphicsScene> #include <stdlib.h> #include<typeinfo> #include <QDebug> #include"Gamecontroller.h" extern Play * play; extern Gamecontroller * gamecontroller; Mediumwall::Mediumwall(int wallnum,QGra...
#include "WanderBehaviour.h" WanderBehaviour::WanderBehaviour() { } WanderBehaviour::~WanderBehaviour() { } vector2 WanderBehaviour::Update(Agent* agent, float deltaTime) { //circle center vector2 circleCenter(0,0); circleCenter = agent->GetVelocity(); circleCenter.normalise(); circleCenter = circleCenter * ...
#ifndef _USBHW_HPP #define _USBHW_HPP #include <cstdint> #include "lpc17xx_usb.h" /** convert from endpoint address to endpoint index */ #define EP2IDX(bEP) ((((bEP)&0xF)<<1)|(((bEP)&0x80)>>7)) /** convert from endpoint index to endpoint address */ #define IDX2EP(idx) ((((idx)<<7)&0x80)|(((idx)>>1)&0xF)) typedef v...
/* kamalsam */ #include<iostream> #include<vector> using namespace std; int main() { int n,m,i,j,id,k,count; vector<int> v; cin>>n; for(i=0;i<n;i++) { count=0; cin>>id; for(j=0;j<v.size();j++) { if(v[j]==id) { count=1; ...
/* -*- 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 <stdio.h> #include "platforms/ma...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 Arjan van Leeuwen (arjanl) */ #include "core/pch.h" #...
#include "valveusecase.h" ValveUsecase::ValveUsecase(QWidget *parent) : QWidget(parent) { setStyleSheet( "background-color: rgb(254, 245, 231);" "border-radius: 10px;"); img = new QLabel ("Image"); listPixmap << new QPixmap("/home/vardouin/Project/IHM_M580/Allume.png"); ...
// Created on: 1993-06-24 // Created by: Jean Yves LEBEY // 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 GN...
/* -*- 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. ** ** Peter Krefting */ /** @file ua.h * * Contains functions for...
#pragma once #include <vector> #include "SFML/Graphics.hpp" class SpriteList { public: SpriteList(); ~SpriteList(); std::map<int, sf::Texture*> textures; std::vector<sf::Sprite> sprites; void UpdateOffset(float os); float offset = 0; };
//*-- Author : Stephen A. Wood 10.02.2012 // THcParmList // // A THaVarList that holds parameters read from // the legacy ENGINE parameter file format // #define INCLUDESTR "#include" #include "TObjArray.h" #include "TObjString.h" #include "THcParmList.h" #include "THaVar.h" #include "THaFormula.h" /* #incluce <a...
#include <algorithm> #include <mqtt/publisher/publisherwrapper.h> #include <string> #include <random> std::string generateRndString(size_t length) { std::random_device rd; std::mt19937 mt(rd()); std::uniform_int_distribution<int> dist(33, 126); std::string result = ""; for (size_t i = 0; i < leng...
// Converted from the boost 1.55 wave sources (wave/src/cpplexer/re2clex/cpp.re). /*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library Copyright (c) 2001 Daniel C. Nuffer Copyright (c) 2001-2013 Hartmut Kaiser. Distributed under the ...
#include <QSpacerItem> #include <QMessageBox> #include "controlwidget.h" ControlWidget::ControlWidget(int width, QWidget *parent) : QWidget(parent) { this->setMaximumWidth(width); mainLayout = new QGridLayout(this); mainLayout->setColumnMinimumWidth(0, width / 3); for(int i = 1; i < 9; i++) m...
#include <cstdio> #include <cmath> #include <algorithm> using namespace std; bool isPrime(int decimal){ if(decimal <= 1){ return false; } int sqr = sqrt(1.0 * decimal); for(int i = 2; i <= sqr; i++){ if(decimal % i == 0){ return false; } } return true; } boo...
//---------------------------------------------------------------- // rvVehicleAI.h // // Copyright 2002-2004 Raven Software //---------------------------------------------------------------- #ifndef __GAME_VEHICLEAI_H__ #define __GAME_VEHICLEAI_H__ #ifndef __AI_H__ #include "AI.h" #endif #ifndef __GAME_VEHICLEMONSTE...
#define BLYNK_PRINT Serial #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> char auth[] = "1064310713e54679913607a1da24fbb1"; char ssid[] = "TP-LINK_2G"; char pass[] = "dai19990909"; BlynkTimer timer1; BlynkTimer timer2; BlynkTimer timer3; int target; float flow_coe; int v_internal; int v_external; float t_...
#include "gtest/gtest.h" #include "solvers/qp.hpp" using namespace qp_solver; template <typename Scalar> class SimpleQP : public QuadraticProblem<Scalar> { public: using BASE = QuadraticProblem<Scalar>; using Matrix = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>; using Vector = Eigen::Matrix<S...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2012 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_system_includes.h" #ifdef VEGA_BACKEND_OPE...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "Target.generated.h" UCLASS() class SHOOTINGGALLERY_API ATarget : public AActor { GENERATED_BODY() public: // Sets default values for this actor's proper...
// // Created by Vasili Siachko on 15.12.2019. // #ifndef UP_LAB10_PARALLELEPIPED_H #define UP_LAB10_PARALLELEPIPED_H #include <iostream> #include <string> #include "Cube.h" class Parallelepiped: public Cube { protected: double width; double height; public: Parallelepiped(): Cube(),...
#include "AIBase.h" AIBase::AIBase() { Init(); } AIBase::~AIBase() { Exit(); } void AIBase::Init() { stateHolder = new AIStateManager(); m_AITurnCostHolder = 0; m_target = 0; m_Attacker = 0; m_DamageCaused = 0; m_Attacking = false; } bool AIBase::Calculate(Skill* skillUsed) { int turncost; turncost = m...
//para utilizar cadenas #include <string> //encabezado #include "usuarios.h" using namespace std; //FUNCIONES DE CLASE //constructor por defecto usuario::usuario(void) { strcpy(datos.nombre,""); strcpy(datos.clave,""); for(unsigned short i=0; i<USU_PERMISOS; i++) for(unsigned short j=0; j<USU_CLASES; j++) datos...
#include <iostream> int main(void){ size_t a=56; std::cout<<"The value of a is : "<<a; return 0; }
#include<iostream> #include<algorithm> using namespace std; long long t, n, h, a[100000], beg, _end, mid; bool devide( long long mid){ long long count = 0; for(int j = 0; j < n; j++){ count += a[j] / mid; count += a[j] % mid > 0 ? 1 : 0; i...
#include <iostream> #include "emulator.h" using namespace std; int main() { ioEmul eml; }
#include<bits/stdc++.h> using namespace std; int main() { // only gravity will pull me down // Longest Palindrome in a String int t; cin >> t; while (t--) { string s; cin >> s; int n = s.size(), res = 0, st = 0, en = 0; for(int i=0; i<n; i++) { int l...
#include "myBook.h" myBook::myBook() : m_nPrice(0) { cout << "parent class constructor" << endl; m_sTitle = string(); m_sAuthor = string(); m_sCompany = string(); } myBook::myBook(string title, string author, string company, int price) : m_sTitle(title), m_sAuthor(author), m_sCompany(company), m_nPrice(price) {}...
#include <iostream> #include <vector> using namespace std; void solution(int* arr, int size) { if (size == 1) { printf("1"); return; } bool isIn = false; vector<int> v; v.push_back(arr[0]); for (int i = 1; i < size; i++) { isIn = false; for (int j = 0; j < v.size(); j++) { if (arr[i] <= v[j]) ...
int Solution::solve(vector < int > & A, int B, int C) { if (!C || !A.size()) return 0; vector < int > num; int c = C; while (C) { num.push_back(C % 10); C /= 10; } // B > C ka size if (B > num.size()) return 0; // B< C ka size if (B < num.size()) { if (B == 1) return A.size(); int x = A.size()...
#ifndef TANK_H #define TANK_H class Tank { public: Tank(); }; #endif // TANK_H
/* Copyright (c) 2016, Los Alamos National Security, LLC All rights reserved. Copyright 2016. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the ...
/******************************** * Author: Braeden Kilburn * Section: 1005 * Date Created: 6 May 2020 * Description: Build a colony with * different sectors having their * own improvement. Aim to build * a colony with the greatest * amount of productivity based off * of your score. ****************...
#include "SystemManager.h" SystemManager::SystemManager(World *world) { _world = world; } SystemManager::~SystemManager() { int i; for (i = 0; i < _systems.size(); i++) { if (_systems.get(i) != NULL) { delete _systems.get(i); _systems.set(i, NULL); } } } void SystemManager::processAll() { int i; ...
#pragma once #include <mutex> struct AVCodecParameters; struct SwrContext; struct AVFrame; class XResample { public: XResample(); ~XResample(); public: //输入和输出参数一致,除了采样格式的区别,输出为S16 virtual bool Open(AVCodecParameters* para, bool isClearPara); virtual void Close(); //返回重采样后大小,不管成功与否都释放indata空间 virtual int Res...
#include <bits/stdc++.h> #define PI 3.14159265 using namespace std; int main() { double H; int l, c, r1, r2; while(scanf("%d %d %d %d", &l, &c, &r1, &r2) && (l || c || r1 || r2)) { if((2*r1)<=l && (2*r1)<=c && (2*r2)<=l && (2*r2)<=c) { H = sqrt(pow(c-r1-r2, 2) + pow(l-r1-r2, ...
#include "GamePainter.h" #include "global.h" #include <QApplication> #include <QPainter> GamePainter::GamePainter(const GreedySnakeGame* game) : game(game){} GamePainter::GamePainter(){} /*void GamePainter::update(int msg) { //QPainter painter(Global::gamePage); switch (msg) { case WAITTING_FRAME: ...
// 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....
#pragma once #include "MyCmdTarget.h" class CMyWnd : public CMyCmdTarget { MY_DECLARE_DYNCREATE(CMyWnd) public: CMyWnd(); virtual ~CMyWnd(); };
/* -*- 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. */ #ifndef INDEPENDENT_WIDGETPAINTER_H #define INDEPENDENT_WIDGETPAI...
// Created on : Thu Mar 24 18:30:12 2022 // Created by: snn // Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 // Copyright (c) Open CASCADE 2022 // // 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...
#ifndef __VIEWNOTEBOOK_H #define __VIEWNOTEBOOK_H //----------------------------------------------------------------------------- #include "_pch.h" #include "IViewNotebook.h" namespace wh{ //----------------------------------------------------------------------------- class ViewNotebook : public IViewNotebook { wxAui...
/* -*- 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. */ #ifndef MODULES_DOC_DOC_MODULE_H #define MODULES_DOC_DOC_MODULE_H...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Author: Petter Nilsen */ #include "core/pch.h" #include "Spe...
#ifndef I_LAZY_LOADABLE_H #define I_LAZY_LOADABLE_H class ILazyLoadable { public: virtual ~ILazyLoadable() {} void loadAsync(); bool isLoaded() { return _isLoaded; } bool isInitialized() { return _isInitialized; } void forceLoad(); void setRogue(); void initialize(); protected: bool _isLoaded = false; bool...
#include "SG_LobbyHandler.h" #include "SG_Config.h" #include "Tools/SG_Logger.h" #include "Tools/Encryption/DesPasswordCipher.h" #include "Tools/SG_DataConverter.h" #include "Packets/Auth/LoginPackets.h" #include "Packets/Auth/LoginPacketsResponse.h" #include "Packets/MMO/MMOPacketsResponse.h" void SG_LobbyHandler::H...
#include <QTRSensors.h> #include <Serial.h> #define NUM_SENSORS 6 // number of sensors used #define NUM_SAMPLES_PER_SENSOR 4 // average 4 analog samples per sensor reading #define EMITTER_PIN 13 // emitter is controlled by digital pin 2 // sensors 0 through 5 are connected to analog inpu...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ /** * @file CryptoExternalApiManager.cpp * * Initialization and uni...
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int n; vector<unordered_set<int>> ss; vector<int> boys; vector<int> girls; vector<vector<bool>> reachable; void dfs(int from, int v, vector<bool> &used) { used[v] = true; for (auto i : ss[v]) { reachable[from][i] = tr...
#pragma once #include "Course.h" #include "RedBlackTree.h" #include "Semester.h" #include "Course.h" #include <string> #include <vector> #define MAX_CREDIT 140 class Student : public RedBlackEntry { private: char gender; int ID; int year; int current_sem; int credit; double GPA; string name; string coll; stri...
#include<bits/stdc++.h> using namespace std; int main() { // only gravity will pull me down // Distinct absolute array elements int t, n, cnt; cin >> t; while (t--) { cin >> n; vector<long long> a(n); map<long long, bool> mp; cnt = 0; for(int i=0; i<n; i...
#include <gtest/gtest.h> #include <NDT/Tensor.h> namespace { TEST(ManagedTensorTest, TestAlloc) { NDT::ManagedTensor3i tensor( { 4, 2, 6 } ); ASSERT_EQ(4, tensor.DimensionSize(0)); ASSERT_EQ(2, tensor.DimensionSize(1)); ASSERT_EQ(6, tensor.DimensionSize(2)); ASSERT_EQ(4 * 2 * 6, tensor.Count...
#include <iostream> #include <algorithm> #include <queue> #include <string> #include <tuple> #include <vector> using namespace std; const int INF = 1 << 25; const int way[2] = {2, 5}; const int dx[2] = {0, 1}; const int dy[2] = {1, 0}; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin...
/******************************************************************************** ** Form generated from reading UI file 'cadastro.ui' ** ** Created by: Qt User Interface Compiler version 5.11.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! *****************************************...
#pragma warning(disable : 4996) #ifndef SJTU_BPLUSTREE_HPP #define SJTU_BPLUSTREE_HPP #include <cstddef> #include <functional> #include <cstring> #include "exceptions.h" #include "alloc.hpp" #include "vector.hpp" #include "bufferpool.hpp" #include "tool.h" const point invalid_p = 0xdeadbeef; template<class key_t, ...
#include <iostream> #include <iomanip> #include <string> #include <fstream> #include <cmath> using namespace std; struct CarType getCarData(ifstream&); //Prototype void Lookup_Car_data(char, CarType[]); //Prototype float Modify_Car_data(float, int, CarType[]); //Prototype void Output_Car_data(CarType[], ofstream&); //...
// Created on: 2015-04-26 // Created by: Denis BOGOLEPOV // Copyright (c) 2015 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 pu...
/* Capacitive-Touch Arduino Keyboard Piano Plays piano tones through a buzzer when the user taps touch-sensitive piano "keys" Created June 17 2019 by Yunika Upadhayaya */ #include <CapacitiveSensor.h> #include "pitches.h" #define COMMON_PIN 2 // The common 'send' pin for all keys #define BUZZER...
#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 << " ";} #define showm(m) for(auto i: m){cout << m.x << " ";} typedef long long ll; typedef pair<priority_queue<int, vector<int>, greater<int>>, int> P; #def...
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2009-2010. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #include <boost/filesystem.hpp> #include <iostream> #include <time.h> //...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 "modules/widgets/OpWidget.h" #incl...
//$$---- Form HDR ---- //--------------------------------------------------------------------------- #ifndef BuildProtocolH #define BuildProtocolH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Form...
#ifndef SHAPES_H #define SHAPES_H #include <string> using namespace std; class Shape { public: Shape(); Shape(string sName, string sColor); string getName(); void setName(string); string getColor(); void setColor(string); virtual void calculateArea() = 0; virtual void display(); protected: string name; str...
#include <bits/stdc++.h> using namespace std; int main() { int t,h,w; scanf("%d",&t); while(t--) { scanf("%d%d",&h,&w); /*To insert a new column with all 0s in front and back*/ int a[h][w+2]={0}; a[0][w+1]=0; /*entering data in between the two 0 columns 0<=...
/* -*- 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. */ #ifndef GADGET_UI_CONTEXT_H #define GADGET_UI_CONTEXT_H #ifdef W...
#include "mainwindow.h" #include "ui_mainwindow.h" Mainwindow::Mainwindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Mainwindow) { ui->setupUi(this); ui->centralWidget->setFixedWidth(720); ui->centralWidget->setFixedHeight(480); } Mainwindow::~Mainwindow() { delete ui; } // Comment bo...
#pragma once #include "Module/GraphicsManager.h" #include "Vulkan/VulkanFunction.h" #include "Vulkan/VulkanDevice.h" #include "Vulkan/VulkanSwapChain.h" #include "Vulkan/VulkanPipeline.h" #include "Vulkan/VulkanFrameBuffer.h" #include "Vulkan/VulkanShader.h" #include "Vulkan/VulkanTexture.h" #include "Vulkan/VulkanUI.h...
int pwmPin = 9; void setup() { Serial.begin(9600); pinMode(pwmPin,OUTPUT); analogWrite(pwmPin, 150); delay(300); } void loop () { int potValue = analogRead(A0); int newpotValue = map(potValue, 0, 1023, 255, 0); analogWrite(pwmPin, newpotValue); Serial.println(map(newpotValue,0,255,100,0)); }...
#ifndef _TYPE_DEF_H #define _TYPE_DEF_H #include <string> #include <vector> #include <cassert> #include "Typedef.h" #define ROBOT_FLAG_OFFSET (30) #define GAME_ID_OFFSET (22) #define LEVEL_ID_OFFSET (17) #define START_ID_OFFSET (12) #define MAX_ROBOT_NUMBER (2048) #define IS_ROBOT_UID(uid) (((uid >> ROBOT_FLAG_O...
/* ID: stevenh6 TASK: crypt1 LANG: C++ */ #include <iostream> #include <fstream> #include <string> #include <stdio.h> #include <math.h> using namespace std; ofstream fout ("crypt1.out"); ifstream fin ("crypt1.in"); int N; bool verifydigit(int n, int set[]) { for (int i = 0; i < N; i++) { if (set[i] == ...
//////////////////////////// // PAlib project template // //////////////////////////// #include <PA9.h> //#include "fat.h" #include <maxmod9.h> // MaxMod include // Include the soundbank #include "soundbank_bin.h" #include "soundbank.h" #define LIBPATH C:/SVN/DS/Libraries #define LIB(x) <LIBPATH/x> /...
#include <iostream> #include <vector> #include <array> #include <math.h> #include "matrix.hpp" #include "matrixOp.cpp" using namespace std; Matrix::Matrix() { vector<double> myRow(1, 0.0); dVec.push_back(myRow); } Matrix::Matrix(int n) { vector<double> myRow(n,0); for (int i = 0; i < n; i++) ...
#include <cstdio> using namespace std; const int MAX = 100; struct matriz{ int datos[MAX][MAX]; int nFil; int nCol; }; void rellenar(matriz &m); void mostrar(matriz m); int simetrica(matriz &m); int main(){ matriz m1; matriz m2; char c1[4] = 'alo'; char c2[4] = 'ola'; if(length)) ...
/*==================================================================== Copyright(c) 2018 Adam Rankin 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 without limitati...
// Page_replacement_algorithm // // Created by Tanusree Sharma on 11/25/18. // Copyright © 2018 Tanusree Sharma. All rights reserved. // #include <iostream> #include <string> #include <vector> #include <map> #include <queue> #include <algorithm> #include <sstream> using namespace std; struct request { int pa...