text
stringlengths
8
6.88M
#include "Lumigraph.h" bool paircomp (pair<int,double> p, pair<int,double> q) { return (p.second < q.second); } Lumigraph::Lumigraph(void) : uv_count(0) , t_width(0) , s_height(0) , ImgDataSeq(NULL) , kth(0) , proxyWidth(0) { } Lumigraph::~Lumigraph(void) { } Lumigraph::Lumigraph(string filename) { string ...
#include <iostream> #include "memory_view.hpp" namespace memory_view { const uint8_t &v1::operator[](size_t pos) const noexcept { return *(this->m_data + pos); } }
#include "task.h" #include <SDL.h> #include <SDL_opengl.h> #include <GL/gl.h> // Header File For The OpenGL32 Library #include <GL/glu.h> // Header File For The GLu32 Library #include "vector.h" #include "printer.h" // text printing (ie- font rendering) #ifndef __GRAPHICS__H__ #define __GRAPHICS__H__ c...
#include "init.h" #include "ui_init.h" #include "dimensionement.h" #include "ui_dimensionement.h" #include "dirigeable.h" init::init(QWidget *parent) : QWidget(parent), ui(new Ui::init) { ui->setupUi(this); } init::~init() { delete ui; } void init::on_pushButton_clicked() { nextLayer->showMaximiz...
#ifndef GROUND_H #define GROUND_H #include "terrain.h" class Ground : public Terrain { Q_OBJECT public: Ground(QObject *parent = nullptr); Ground(int x, int y, int width, int height, const QString& img...
#include "DataStructure.h" #include <iostream> #include <string> #include "travel.h" #include "droute.h" #include <time.h> #include<process.h> #include<stdio.h> #include<stdlib.h> #include<string.h> extern struct passenger passer; extern struct city graph; extern int currenttime; extern struct order *com...
#include "reportwidget.h" ReportDialog::ReportDialog(QWidget *parent) :QDialog(parent) { }
/* ** EPITECH PROJECT, 2018 ** cpp_indie_studio ** File description: ** Point.cpp */ #include "Point.hpp" #include "Direction.hpp" #include <cmath> Point::Point() : Point(0, 0) {} Point::Point(int x, int y) : _x(x), _y(y) {} std::array<int, 2> Point::operator*() const noexcept { return getArray(); } bool Point...
#include <stdio.h> #include "pico/stdlib.h" #include "hardware/gpio.h" #include "hardware/adc.h" #include "hardware/i2c.h" #include "pico/binary_info.h" #include "pico_display.hpp" #include "MLX90640_API.h" #include <sstream> #include <iomanip> #include <cmath> #include <cfloat> using namespace pimoroni; #define CA...
#ifndef TOOLS_H #define TOOLS_H #include <QObject> #include <QJsonDocument> #include <QAbstractListModel> class Tools : public QObject { Q_OBJECT public: explicit Tools(QObject *parent = 0); Q_INVOKABLE void saveJson(const QString& title, int maxCount, ...
// MainFrm.cpp : CMainFrame #include "stdafx.h" #include "KEGIES.h" #include "KEGIESDoc.h" #include "MainFrm.h" #include "Dialog.h" #include "SkeletonWindow.h" #include "InputMeshWindow.h" #include "AnimationWindow.h" #include "SuggestionsView.h" #include <iostream> #ifdef _DEBUG #define new DEBUG_NEW #endif IMPLEM...
/* * cTestAD.cpp * * Created on: 2018年7月19日 * Author: tarena */ #include "cTestAD.h" static const char *s_addev = "/dev/ttyS5"; //不需要数据 static unsigned char crc_array[256] = { 0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 0xc2, 0x9c, 0x7e, 0x20, 0xa3, 0xfd, 0x1f, 0x41, 0x9d, 0xc3, 0x21, 0x7f, 0xfc, 0xa2,...
// // proj09_main.cpp // // Created by Kristjan von Bulow. // Copyright © 2018 Kristjan von Bulow. All rights reserved. // #include<iostream> using std::cout; using std::endl; #include<vector> using std::vector; #include<string> using std::string; #include<sstream> using std::ostringstream; #include<iterator> using...
#include "client.h" using namespace std; Client::Client() : m_sock(0), m_sockMusique(0), m_port(0), m_portMusique(0), m_ipServeur(0), m_pseudo(0), m_message(0), m_pseudoServeur(0), m_buffer(0), m_bufferMusique(0), m_resultat(0), m_erreur(0) { m_erreur = new int; m_resultat = new int; m_bufferMusique = new char[NO...
// File: globSample.cpp // Library: SimpleOpt // Author: Brodie Thiesfield <code@jellycan.com> // Source: http://code.jellycan.com/simpleopt/ // // MIT LICENCE // =========== // The licence text below is the boilerplate "MIT Licence" used from: // http://www.opensource.org/licenses/mit-license.php // // ...
#include <iostream> #include <vector> #include <unordered_map> using namespace std; // Given an array of integers, return indices of the two numbers such that they add up to a specific target. // You may assume that each input would have exactly one solution, and you may not use the same element twice. /*Given nums ...
// // Skybox.h // Odin.MacOSX // // Created by Daniel on 27/10/15. // Copyright (c) 2015 DG. All rights reserved. // #ifndef __Odin_MacOSX__Skybox__ #define __Odin_MacOSX__Skybox__ #include "CubeMap.h" #include "BoxShape.h" #include "Shader.h" #include "RenderStates.h" namespace odin { namespace render ...
// Copyright 2012 Yandex #ifndef LTR_LEARNERS_DECISION_TREE_SPLITTING_QUALITY_H_ #define LTR_LEARNERS_DECISION_TREE_SPLITTING_QUALITY_H_ #include <vector> #include "ltr/data/data_set.h" #include "ltr/interfaces/parameterized.h" #include "ltr/utility/shared_ptr.h" using ltr::DataSet; namespace ltr { namespace dec...
//------------------------------------------------------------------------------ /* 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 ...
class Solution { public: int NumberOf1Between1AndN_Solution(int n) { if(n <= 0){ return 0; } int count = 0; for(int i=1; i<=n; i*=10){ int a = n/i; int b = n%i; count += (a+8)/10*i + (a%10 == 1)*(b+1); } return count...
#include "ColorTextureProgram.hpp" #include "gl_compile_program.hpp" #include "gl_errors.hpp" Load< ColorTextureProgram > color_texture_program(LoadTagEarly); ColorTextureProgram::ColorTextureProgram() { //Compile vertex and fragment shaders using the convenient 'gl_compile_program' helper function: program = gl_c...
#include"Object.h" Object::Object (const string& nom) : _nom(nom) // registerObject { _pool.insert(this); cout << "enregistrer " << _nom << endl; } static void Object::viderPool() { // vider Pool set<Object*>::iterator it; while ( (it = _pool.begin()) != _pool.end() ) del...
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
#include<bits/stdc++.h> using namespace std; int main() { // only gravity will pull me down // Replace the Bit int t, n, k; cin >> t; while (t--) { cin >> n >> k; int tmp=n, cnt=0; while(tmp) { cnt++; tmp=tmp>>1; } int p = pow(2, ...
#pragma once class View : public CView { public: View(); ~View(); // Mouse left/right click flags bool LEFT_DOWN; bool RIGHT_DOWN; // Mouse position vec3d m_MousePos; vec3d m_PreMousePos; vec3d m_DMousePos; // Mouse functions afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnLButtonU...
#include "M3_Timer.h" namespace M3 { // Start time getters and setters. unsigned long Timer::getStartTime() const { return m_startTime; } bool Timer::setStartTime(unsigned long startTime) { m_startTime = startTime; return true; } // Duration getters and setters. un...
/* ID: dhyanes1 LANG: C++ PROG: bones */ #include <cstdio> #include <algorithm> #include <map> #include <queue> using namespace std; int arr[101]; int main(void) { FILE *fin,*fout; fin=fopen("bones.in","r"); fout = fopen("bones.out","w"); int s[3]; fscanf(fin, "%d %d %d", &s[0], &s[1], &s[2]); /* memset(...
#include "pch.h" float Math::RNG::Range(float min_value, float max_value) { if(min_value > max_value) std::swap(min_value, max_value); return (float)rand()/RAND_MAX * (max_value - min_value) + min_value; } int Math::RNG::Range( int min_value, int max_value ) { if (min_value > max_value) std::swap( min_value, ...
// // Component.hpp // closedFrameworks // // Created by William Meaton on 12/05/2016. // Copyright © 2016 WillMeaton.uk. All rights reserved. // #ifndef Component_hpp #define Component_hpp #include <stdio.h> #include "Math.h" class Component{ protected: Component(); virtual void update(); }; #endif /* C...
// // Created by fab on 12/03/2020. // #include "../../headers/utils/BetterNoise.hpp" BetterNoise::BetterNoise() : PerlinNoise() { zDecayZMax = (float)width; zDecayCut = 1; freq = 1; doPenaltyBottom = true; doPenaltyMiddle = true; doPenaltySky = true; } float BetterNoise::sample(float xBase, ...
#include <conio.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <string.h> #include <math.h> #include <locale.h> #include <ctype.h> float graus,far; int x=0; int main() { printf("\n Insira o valor da temperatura em Graus Celsius: \n"); scanf("%f",&graus); far=(graus...
void fireCheck() { if ((gasValue >= gasTrigger) || ((temperatureValue >= temperatureTrigger) || (humidityValue <= humidityTrigger))) { fireValue == 1; } else { fireValue == 0; } }
// Created on: 1994-02-28 // Created by: Bruno DUMORTIER // Copyright (c) 1994-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...
#include <bits/stdc++.h> using namespace std; long long n, a[1010], b[1010], ans = 0, sum = 0; bool cmp(int x, int y) { return a[x] < a[y]; } int main() { cin >> n; for (int i = 1; i <= n; i++) scanf("%d", &a[i]), b[i] = i; sort(b + 1, b + n + 1, cmp); for (int i = 1; i <= n; i++) ans += sum, sum += a[b[i]]; for ...
#include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include <sstream> #include <set> #include <cmath> #define INF (1<<20) #define MAX 101 using namespace std; class MagicalGirlLevelTwoDivTwo { public: string isReachable(vector <int> jum...
#include <QCoreApplication> #include <QDebug> #include <exception> using namespace std; class Cat { public: Cat() { qInfo() << "Call constructor"; } ~Cat() { qInfo() << "Call destructor"; } int GetAge() { return mAge; } private: int mAge = 10; }; ...
#pragma once #include <stdint.h> #include "Devices/Actuators/Relays/Factory.h" namespace Codingfield { namespace Brew { class Configuration { public: const uint8_t OneWireTemperaturePin() const { return oneWireTemperaturePin; } const uint8_t HeaterRelayPin() const { return heaterRelayPin; } ...
#include <iostream> int main (){ int number; int numberReverse; int res; int mem; std::cin >> number; mem = number; while (number > 0) { res = number % 10; numberReverse = numberReverse * 10 + res; number /= 10; } if(mem == numberReverse) { std::cout << "ayo simetrik e" << std...
#pragma once #include <cstddef> template<std::size_t...> struct sum_template_parameters; template<std::size_t i, std::size_t... integers> struct sum_template_parameters<i,integers...> { static const std::size_t value = i + sum_template_parameters<integers...>::value; }; template<> struct sum_template_paramete...
// Watched.h #ifndef WATCHED_H #define WATCHED_H #include <string> class Watched { std::string _name; public: Watched(const std::string& name); const std::string& name(); }; #endif //WATCHED_H
/* BEGIN LICENSE */ /***************************************************************************** * SKCore : the SK core library * Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr> * $Id: integerlist.cpp,v 1.13.2.5 2005/02/17 15:29:20 krys Exp $ * * Authors: Arnaud de Bossoreille de Ribou <debossoreille @...
/** * Copyright (c) 2021, Timothy Stack * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of condi...
#ifndef NO_ASSIGNMENT_POSSIBLE_H #define NO_ASSIGNMENT_POSSIBLE_H #include <exception> class No_Assignment_Possible : public std::exception { public: No_Assignment_Possible() noexcept {} No_Assignment_Possible(const No_Assignment_Possible&) noexcept = default; No_Assignment_Possible& operator=(const No_A...
// $Id$ // // Copyright (C) 2004-2012 Greg Landrum and Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <i...
#ifndef TRANSLATED_TRIANGLE_HPP_ #define TRANSLATED_TRIANGLE_HPP_ #include <string> namespace translated_triangle { extern const std::string module_name; int run(int argc, char **argv); } #endif // TRANSLATED_TRIANGLE_HPP_
#include "Profile.h" Profile::Profile(){ ploidy = 0; } Profile::Profile(json &individual){ // cout << "Profile - Inicio\n"; ParsingUtils utils; setPloidy( individual["Plody"] ); // cout << "Profile - Cargando Marcadores\n"; for( json &marker : individual["Markers"] ){ // cout << "Profile - marker: " << marker <<...
// Created on: 1997-02-18 // Created by: Stagiaire Francois DUMONT // 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...
/*========================================================================= Program: Visualization Toolkit Module: vtkOpenVRRenderWindowInteractor.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ...
/* XMRig * Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> * C...
#pragma once namespace Assert { struct test_passed { static constexpr bool passed = true; }; struct test_failed { static constexpr bool passed = false; }; template <bool pass> struct check_true : test_failed {}; template <> struct check_true<true> : test_passed {}; #pragma GCC diagnostic...
/* -*- 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 WEB_HANDLER_PERMISSION_CONTROLLER_H #define WEB_HANDLER_...
#include <cstring> #include "value.h" #include "basicValues.h" #include "arrayValue.h" #include "objectValue.h" #include "array.h" #include "object.h" #include "parser.h" #include "serializer.h" #include "binary.h" #include "stringValue.h" #include "fnv.h" #include "binjson.tcc" #include "path.h" #include "operations.h...
// 问题的描述:二叉树的序列化和反序列化 // 序列化:二叉树被记录成文件的过程 // 反序列化:从文件重建二叉树的过程 // 测试用例有3组: // 1、空子树 // 输入:string seq = "" // 输出为: // 前序遍历:#! // 层序遍历:#! // 2、左(右)斜子树 // 输入:string seq = "1!2!#!3!#!#!#!" // 输出为: // 前序遍历:1!2!3!#!#!#!#! // 层序遍历:1!2!#!3!#!#!#! // 3、正常二叉树 // 输入:string seq = "1!2!3!#...
// Copyright (c) 2020 The Orbit Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ORBIT_LINUX_TRACING_FUNCTION_H_ #define ORBIT_LINUX_TRACING_FUNCTION_H_ #include <cstdint> #include <string> namespace LinuxTracing { class Fun...
// I will test your BinTree class using either this main or // a very similar one, and this buildTree. // You will want to do thorough testing on your own, // which is done by altering the data. // Windows and unix store files slightly differently. Windows does not // always store an end-of-line char on the last line,...
#include <iostream> class Base { public: ~Base() { std::cout << __PRETTY_FUNCTION__ << std::endl; } void func() {} }; class Child : public Base { public: ~Child() { std::cout << __PRETTY_FUNCTION__ << std::endl; } void func() {} }; class BaseV { public: virtual ~BaseV() { std::cout << __PRETTY_...
#ifndef __CellCoord_h__ #define __CellCoord_h__ #include <math.h> class Cell; #include "Cell.h" #include "Wall.h" #include "glPoint.h" class CellCoord { public: int x, y, z; CellCoord(int a=0, int b=0, int c=0) { x = a, y = b, z = c; }; inline boolean operator ==(CellCoord &nc) { return (x == nc.x...
#include <cstdio> #include <iostream> using namespace std; int singleNumber2(int A[],int n){ int digit[32] = {0}; int res = 0; for(int i=0; i<32;i++){ for(int j=0;j<n;j++){ digit[i] += (A[j]>>i)&1; //AND in digit i } res |= (digit[i]%3)<<i; // OR in digit i } return res; } int main(){ int a[11] ...
#ifndef SD_STREAM_H #define SD_STREAM_H #include <SdStream.h> #include <IPAddress.h> class MacAddress { public: MacAddress() { memset( b, 0, sizeof( b )); } MacAddress( uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5, uint8_t b6 ) { b[0] = b1; b[1] = b2; b[2] = b3; b[3] = b4; b[4] = b5; b[5...
#include "mapwindow.h" #include "ui_mapwindow.h" mapWindow::mapWindow(QString dsn, QString db, const QStringList &fields, const QSqlQueryModel *mod, QWidget *parent) : QMainWindow(parent), ui(new Ui::mapWindow) { ui->setupUi(this); //set this window to modal this->setWindowModality(Qt::ApplicationModal); ...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 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...
#ifndef OINEUS_OINEUS_PERSISTENCE_BINDINGS_H #define OINEUS_OINEUS_PERSISTENCE_BINDINGS_H #include <iostream> #include <vector> #include <sstream> #include <variant> #include <functional> #include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <pybind11/numpy.h> namespace py = pybind11; #include <oineus/t...
/* * 题目:198. 打家劫舍 * 链接:https://leetcode-cn.com/problems/house-robber/ * 知识点:动态规划 */ class Solution { public: int rob(vector<int>& nums) { if (nums.empty()) { return 0; } int n = nums.size(); if (n == 1) { return nums[0]; } // dp[i] = max(dp...
#include "triangle.h" #include "gtest/gtest.h" class TriangleTest : public testing::Test{ protected: //virtual void Setup(); //virtual void TearDown(); }; TEST_F(TriangleTest, BoundaryValueTesting) { EXPECT_EQ(IsTriangle(1,1,1),"Equilateral"); EXPECT_EQ(IsTriangle(0,1,1),"Not a Triangle"); EXPECT_EQ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-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 PIXEL_SCALE_RENDERING_SUPPORT #incl...
#include<iostream> #define mutqagrel_zangvats int size = 0; std::cout << "Input the size of the Array : " ; std::cin >> size; int array [ size ]; std::cout << "Input the elements " << std::endl; for ( int index = 0; index < size; ++ index ) { std::cin >> array [ index ]; } #define hashvel_zangvatsi_mecaguyn_arjeq...
#include "pch.h" #include "Common.h" using namespace std; const string WHITESPACE = " \n\r\t\f\v"; string ltrim(const string& s) { size_t start = s.find_first_not_of(WHITESPACE); return (start == string::npos) ? "" : s.substr(start); } string rtrim(const string& s) { size_t end = s.find_last_not_of(WHITESPACE); ...
/* ID: andonov921 TASK: lamps LANG: C++ */ #include <iostream> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <string> #include <algorithm> #include <sstream> #include <climits> #include <fstream> #include <c...
#include <iostream> #include <vector> #include <queue> using namespace std; int main() { priority_queue< vector<int> > pq; pq.push( {1,200} ); pq.push( {1,2,3,4,5} ); pq.push( {1,2,3,4,5,6} ); pq.push( {1,2,3,4} ); pq.push( {1,2,3,5} ); pq.push( {-2,3} ); pq.push( {4,1} ); while (!pq.empty() ) { ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** 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. ** */ #ifndef WINDOWS_DESKTOP_GLOBAL_APPL...
// Copyright (c) 2021 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 ...
#ifndef CLIENTSOCKET_H #define CLIENTSOCKET_H #include "platform/types.h" #include "IFileManager.h" #include "IFileMP2.h" #include "framework.h" #include "isessionmanager.h" #include "wbaseobject.h" #include "wmsgqueue.h" #include "wthread.h" #include "IWMultiWhiteBoard.h" #include "MultiWBMsgProcessor.h" #include "...
/* * Copyright (c) 2018-2021 Morwenn * SPDX-License-Identifier: MIT */ #include <algorithm> #include <functional> #include <type_traits> #include <utility> #include <vector> #include <catch2/catch.hpp> #include <cpp-sort/sorter_facade.h> #include <cpp-sort/sorter_traits.h> #include <cpp-sort/sorters/selection_sorter...
#include<bits/stdc++.h> using namespace std; int as[100000]; main() { int n, k; while(cin>>n>>k) { int i, d, c=0; for(i=1; i<=n; i++) { cin>>d; if(d+k<=5)c++; } cout<<c/3<<endl; } return 0; }
#include "Log.h" #include "Misc.h" #include "ResourcesManager.h" std::ostream& log( const LogType &t ) { switch( t ) { case LOG_DEBUG: std::cout << "[DBG] "; break; case LOG_WARNING: std::cout << "[WRN] "; break; case LOG_ERROR: std::cout << "[ERR] "; break; case LOG_FATAL: std::cou...
#ifndef VENTA_H #define VENTA_H #include <mysql_connection.h> #include <cppconn/driver.h> #include <cppconn/exception.h> #include <cppconn/resultset.h> #include <cppconn/statement.h> using namespace std; class Venta { public: Venta(); Venta(sql::ResultSet*); virtual ~Venta(); ...
// // Copyright (C) BlockWorks Consulting Ltd - All Rights Reserved. // Unauthorized copying of this file, via any medium is strictly prohibited. // Proprietary and confidential. // Written by Steve Tickle <Steve@BlockWorks.co>, September 2014. // #ifndef __UARTRECEIVER8N1_HPP__ #define __UARTRECEIVER8N1_HPP__ #inc...
#ifndef RESOURCEMANAGER_CPP #define RESOURCEMANAGER_CPP #include "ResourceManager.h" #include "Interface.cpp" ResourceManager::ResourceManager() {//the constructor. not much to construct. just need to initalize the local variables. IDc = 1; freeCount = 1; //assign the interface to UID 1. leases.push_back(new Leas...
#ifndef CODEGEN_H #define CODEGEN_H #include <list> #include <map> #include <vector> #include <string> #include "symbol_table.h" using namespace std; enum machine_function{ MF_ADD_I, MF_ADD_F, MF_MULT_I, MF_MULT_F, MF_DIV_I, MF_DIV_F, MF_COMP_I, MF_COMP_F, MF_J, MF_JE, MF_JNE, MF_JL, MF_JLE, MF_JG, MF_J...
#include "mini/RandomChance/randomchance.h" #include "ui_randomchance.h" #include <stdlib.h> /**************** * Do not modify ****************/ RandomChance::RandomChance(QWidget *parent) : QDialog(parent, Qt::CustomizeWindowHint | Qt::WindowTitleHint ), Minigame(), ui(new Ui::RandomChance) { ui->s...
#include "Game.h" Game* g_game = 0; const int FPS = 60; const int DELAY_TIME = 1000.0f / FPS; int main(int argc, char* args[]) { /* g_game = new Game(); g_game->init("Game Class", 100, 100, 640, 480, 0); while(g_game->running()) { g_game->handleEvents(); g_game->update(); g_game->render(); SDL_...
// Scintilla source code edit control /** @file LexNull.cxx ** Lexer for no language. Used for plain text and unrecognized files. **/ // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org> // The License.txt file describes the conditions under which this software may be distributed. #include <string.h> ...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; vector<char> a; bool cmp(char a,char b) { return a > b; } int main() { int n,k; while (scanf...
// // Created by Cristian Marastoni on 24/04/15. // #include "NetAcceptor.h" #include "NetReactor.h" #include "../Socket.h" net::Status Acceptor::listen() { if(mSocket.open() != net::Ok) { return net::Error; } mSocket.setBlocking(false); mSocket.setReuseAddr(true); if(mSocket.bind(mAddress...
#include "Interpolation.hpp" #include <algorithm> #include <stdexcept> #include <limits> #include <cmath> Interpolation::Interpolation(const std::vector<double>& x, const std::vector<double>& y) : x_(x), y_(y){ if (x.size() != y.size()){ throw std::runtime_error("Interpolation: differing input sizes"); } if ...
#ifndef exceptions_H_INCLUDE #define exceptions_H_INCLUDE #include<iostream> #include<fstream> #include<string> #include<sstream> #include<unordered_map> using std::istream; using std::ostream; using std::string; using std::unordered_map; using std::make_pair; using std::move; using std::getline; using namespace std;...
/* -*- 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_INSTALLER_CONTEXT_H #define GADGET_INSTALLER_CONT...
#pragma once /** * @file This File contains a template for an integration function as well * as a variety of numerical integration methods. To add additional * integration methods, one simply has to add additional methods * classes below. * source: rosettacode.org/wiki/Numerical_integration#C.2B.2B */ /** * T...
#include <iostream> #include <vector> #include <map> #include <string> #include <bitset> #include <queue> #include <algorithm> #include <functional> #include <cmath> #include <cstdio> #include <sstream> #include <stack> #include <istream> using namespace std; class TwiceString { public: string getShortest(string s)...
// Created on: 1995-12-01 // Created by: EXPRESS->CDL V0.2 Translator // Copyright (c) 1995-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 te...
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
#ifndef APPLICATION_CONTROLLER_H #define APPLICATION_CONTROLLER_H #include <stdlib.h> #include <functional> #include <optional> #include "ChatObjects/ChatUpdates.h" #include "Commands/CmdCreator/Commands.h" #include "Client/Client.h" #include "Commands/CmdCreator/CommandCreator.h" #include "UserOptions/BaseUserOption...
#include <iostream> #include <cstring> #include <queue> #include <algorithm> const int INF = 1e9; struct qn{ int x, y, d, k; }; std::string map[1000]; int N, M, K; int dist[11][1000][1000]; std::queue<qn> q; int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, -1, 0, 1}; int main() { std::cin.sync_with_stdio(false); st...
#ifndef VARIABLESTABLE_H #define VARIABLESTABLE_H #include <vector> #include <string> #include <iostream> using namespace std; class Variable { private: string name = ""; string type = ""; bool isField = false; bool isMethod = false; public: Variable(string name, string type, bool isField, bool ...
#include <iostream> #include <windows.h> // Faster harcoded version, click and run int main() { // Hide console ShowWindow(GetConsoleWindow(), SW_HIDE); // Change the route and the android device for what ever you want to use system("D: && cd D:\\Programas\\android-sdk\\emulator && emulator -avd Nexus_5_API_30"...
#include "TestNetwork.h" #include <event.h> #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "TestNetwork", __VA_ARGS__)) #define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "TestNetwork", __VA_ARGS__)) extern "C" { /*此简单函数返回平台 ABI,此动态本地库为此平台 ABI 进行编译。*/ const char * TestNetwork::getPlatf...
/* Copyright (c) 2014-present PlatformIO <contact@platformio.org> 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 ...
#include "../../headers.h" #include "../render/CubeMap.h" #include "../render/GLWrappers.h" #include "Sky.h" //------------------------------------------------------------------------------------------------- Sky::Sky() { } //------------------------------------------------------------------------------------------...
#include <iostream> #include <vector> #include <boost/heap/fibonacci_heap.hpp> #include "value.hpp" using namespace std; using namespace boost::heap; /** * Classe utile a fornire oggetti capaci di gestire un parametro di tipo T in un heap di fibonacci. */ template<typename T> class FibonacciHeapHandler { publi...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: QueueFactory.cpp * Author: ssridhar * * Created on October 31, 2017, 1:06 PM */ #include "QueueFactory...