text
stringlengths
8
6.88M
#include <bits/stdc++.h> using namespace std; void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } void selectionSort(int arr[], int n) { int i,j, min_idx; //One by one move boundary of unsorted subarray for(i=0;i < n-1;i++) { //Find the minmum element int uns...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "base.h" WINRT_WARNING_PUSH #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Gaming.UI.3.h" WINRT_EXPORT namespace winrt { namespace impl { template <typename ...
void salidas(uint8_t pin1, uint8_t pin2) { analogWrite(pin1, brillo); if (vBat > 0 && vBat < VBAT_MIN) digitalWrite(pin2, HIGH); } //-------------------------------------------------------------
#include "task_15.h" string task::getMatrix(int m, int n) { static int counter = 0, arr[100][100]; bool isBreak = false; int round = 0; while (true) { for (int j = round; j != n - round; ++j) if (arr[round][j] != 0) { isBreak = true; brea...
#ifndef __SHAPE_H__ #define __SHAPE_H__ #include "base.h" template <int dimension> struct Shape { enum { kDimension = dimension, kSubdim = dimension - 1, }; inline Shape(void) {} inline Shape(const Shape<kDimension> &s) { for (int i = 0; i < kDimension; i++) { shape_[i] = s[i]; } } ...
#pragma once #include <string> #include "ParseTree.h" #include <vector> #include <set> class Parser { public: Parser(); Parser(std::vector<std::string> tokens, std::string filename); ParseTree* parse(); private: //Pre parse functions void scrapeClassIdentifiers(); //Parse fucntions ParseTree* ...
 /// @file ImpAnd.cc /// @brief ImpAnd の実装ファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2005-2012 Yusuke Matsunaga /// All rights reserved. #include "ImpAnd.h" #include "ImpMgr.h" #define DEBUG_CHANGE_VALUE 0 BEGIN_NAMESPACE_YM_NETWORKS //////////////////////////////////////////////////////////...
/*************************************************************************** Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. 2010-2020 DADI ORISTAR TECHNOLOGY DEVELOPMENT(BEIJING)CO.,LTD FileName: QTSServerInterface.h Description: define an interface for getting and setting...
/*********************************************************************** created: Sat Dec 26 2009 author: Paul D Turner <paul@cegui.org.uk> *************************************************************************/ /*************************************************************************** * Copyrigh...
#include <cstdio> #include <cstdlib> #include <string.h> #include "gkfn.h" #define SELET 1 #define SPOTS 25 #define MAX_BUF 1024 #define DATAS 17520 #define DAYS 730 #define VER1 0 #define VER2 1 #if VER2 #define DAY 1 #define HOUR 0 #endif #if 0 #define TRATE_MIN 0.7f #define TRATE_MAX 0.9f #...
#include<Keypad.h> const byte ROWS = 4; const byte COLS = 4; char keys[ROWS][COLS] = {{'F', 'B', '7', '3'}, {'E', 'A', '6', '2'}, {'D', '9', '5', '1'}, {'C', '8', '4', '0'}}; byte rowPins[ROWS] = {8,9,10,11}; byte colPins[COLS] = {12,13,14,15}; Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS...
#include <iostream> #include <tuple> #include <vector> using namespace std; // ----- ReadGraph ----- // Referring to ymatsux-san's source code: https://atcoder.jp/contests/abc138/submissions/7016619 struct Edge { int src, dst, id; // ll cost; Edge() {} Edge(int src, int dst, int id) : src{src}, dst{dst}, id{i...
#include "cskin.h" #include "base/style_box.h" #define SET_STYLEBOX( m_which , m_style )\ set_stylebox_name(m_which,#m_which);\ set_stylebox(m_which,m_style); #define SET_CONSTANT( m_which , m_constant )\ set_constant_name(m_which,#m_which);\ set_constant(m_which,m_constant); #define SET_FONT( m_which , m_font )\ s...
#ifndef __ENTITYMANAGER_H__ #define __ENTITYMANAGER_H__ #include <unordered_map> #include <unordered_set> #include <string> #include <memory> #include <sstream> #include <cassert> #include <typeinfo> #include <typeindex> #include <set> #include <type_traits> #include <yanecos/IData.h> #include <yanecos/Data.h> #incl...
//************************************************************************** //** //** See jlquake.txt for copyright info. //** //** This program is free software; you can redistribute it and/or //** modify it under the terms of the GNU General Public License //** as published by the Free Software Foundation; either ...
// // Created by wiktor on 15.03.18. // #include "XorCypherBreaker.h" int main() { return 0; }
#include "american_option.h" #include "plainvanilla_payoff.h" #include "plainvanilla_option.h" #include "u_math.h" #include <cmath> #include <iostream> #include <algorithm> /* Constructor */ AmericanOption::AmericanOption(double strike, double maturity, OptionType type) :Option(strike, maturity, type) { payoff...
#ifndef __GENERATOR_H__ #define __GENERATOR_H__ #include "VehicleBase.h" #include <random> using namespace std; class Generator { private: double prob_new_vehicle_northbound; double prob_new_vehicle_southbound; double prob_new_vehicle_eastbound; double prob_new_vehicle_westbound; double propo...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { vector<int> all; vector<int>::iterator it1, it2; if (nums1.size() + nums2.size() == 0) return 0; it1 = nums1.begin(); it2 = nums2.begin(); while (it1 !=...
/** Filename: interface.hpp * Description: contains declarations of methods used to interact with the user (i.e., get, clean up, and validate input from the user) * Author: Khoa Tran */ #ifndef INTERFACE_HPP #define INTERFACE_HPP #include <vector> #include <string> #include <iostream> #include <vector...
#include "aulibdefs.h" #include "auplcdrive.h" #include <aulib.h> #include <QObject> AuPlcDrive::~AuPlcDrive() { }
// // Copyright (c) 2003--2009 // Toon Knapen, Karl Meerbergen, Kresimir Fresl, // Thomas Klimpel and Rutger ter Borg // // 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) // // THIS FILE IS AUTOMATICALLY GENERATED ...
// // Hrocker.cpp // CatchGirl // // Created by xin on 16/4/6. // // #include "Hrocker.hpp" #define PI 3.141596 HRocker * HRocker::createHRocker(const char * rockerImageName,const char * rockerBGImage ,Vec2 posisition){ HRocker * layer = HRocker::create(); if (layer) { layer->rockInit(rockerIm...
/* Copyright (C) 2014 Digipen Institute of Technology */ #include "LowPassFilter.h" LowPassFilter::LowPassFilter(int sampleSize): counter(0) // constructor { if(sampleSize < 0) { sampleSize = 0; } _data = new float[sampleSize-1]; } LowPassFilter::~LowPassFilter() // destructor { delete [] _data; } bool LowPa...
/* * SPDX-FileCopyrightText: 2020 Rolf Eike Beer <eike@sf-mail.de> * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include <osm.h> #include <QAbstractTableModel> #include <QScopedPointer> enum { MEMBER_COL_TYPE = 0, MEMBER_COL_ID, MEMBER_COL_NAME, MEMBER_COL_ROLE, MEMBER_NUM_COLS }; cl...
// // Copyright (c) 2003--2009 // Toon Knapen, Karl Meerbergen, Kresimir Fresl, // Thomas Klimpel and Rutger ter Borg // // 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) // // THIS FILE IS AUTOMATICALLY GENERATED ...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cassert> using namespace std; int main(void) { //static_assert(常量表达式条件, "提示的字符串") static_assert(sizeof(void *) == 4, "64位系统不支持"); cout << "hello C++\n"; system("pause"); return 0; } int main01(void) { bool flag = false; //运行...
//! Bismillahi-Rahamanirahim. /** ========================================** ** @Author: Md. Abu Farhad ( RUET, CSE'15) ** @Category: /** ========================================**/ #include<bits/stdc++.h> #include<stdio.h> using namespace std; #define ll long long #define fr(i,n) for (ll...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
/* Self-service bike station notifier ESP-8266 that connects to a WiFi network and chats with an MQTT server (publish & subscribe) Antoine de Chassey. */ #include <ArduinoJson.h> #include <ESP8266WiFi.h> #include <PubSubClient.h> #include <DNSServer.h> //Local DNS Server used for redirecting all re...
#include "HeaderHandler.h" #include "Registry.h" #include <iostream> using RegistryeHandlerRegistry = Registry<std::string, IHandler>; template<>template<> bool RegistryeHandlerRegistry::SelfRegister<HeaderHandler>::_registered = RegistryeHandlerRegistry::SelfRegister<HeaderHandler>::selfRegister(); HeaderHandl...
#ifndef ORDERUI_H #define ORDERUI_H class OrderUI { public: OrderUI(); void start_orderUI(); private: }; #endif // ORDERUI_H
// This file has been generated by Py++. #ifndef ListboxTextItem_hpp__pyplusplus_wrapper #define ListboxTextItem_hpp__pyplusplus_wrapper void register_ListboxTextItem_class(); #endif//ListboxTextItem_hpp__pyplusplus_wrapper
/* This file is part of the ArduinoBLE library. Copyright (c) 2018 Arduino SA. All rights reserved. This library 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 Software Foundation; either version 2.1 of the Licens...
#include "difference_of_squares.h" int squares::square_of_sum(int number) { int sum = 0; for (int i = 1; i <= number; i++) sum += i; return pow(sum, 2); } int squares::sum_of_squares(int number) { if (number > 1) return pow(number, 2) + sum_of_squares(number - 1); else return 1; } int squares::difference...
#include <cstdio> #include <algorithm> using namespace std; const int MAX_N = 100; const int MAX_W = 10000; int n,W; int w[MAX_N],v[MAX_N]; int dp[MAX_W +1]; void read(); void solve(); int main(){ read(); solve(); return 0; } void read(){ scanf("%d\n", &n); for(int i=0; i<n; i++){ scanf("%d %d", &...
#ifndef _CHARACTER_HEADER #define _CHARACTER_HEADER #include "smPacket.h" #define PLAYBUFF_SIZE 256 #define PLAYBUFF_MASK 255 //초당 프로그램 진행 카운터 #define PLAYCOUNT_PER_SECOND 70 /* #define DIST_TRANSLEVEL_NEAR 0x12000 //((64*3)^2)*2 #define DIST_TRANSLEVEL_HIGH 0xC8000 //((64*8)^2)*2 #define DIST_TRANSLEVE...
#include <iostream> using namespace std; struct node { int data; node* left, *right; node(){ left = right = NULL; } node (int _data) : data(_data){ left = right = NULL; } }; void preOrder(node*); void showNodes(node*); int levelOfTree(node*); void insertData(int, node**);...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#include "cpptools_Logger.hpp" #include <mutex> namespace imog { // ====================================================================== // // ====================================================================== // // Define loggers // ====================================================================== // _L...
#pragma once #include <Urho3D/Engine/Application.h> #include <Urho3D/UI/Text.h> #include "Level.h" using namespace Urho3D; class Demo : public Application { URHO3D_OBJECT(Demo, Application); SharedPtr<Viewport> viewport_; SharedPtr<Scene> mainScene_; SharedPtr<DebugRenderer> debugRenderer_; S...
#include "RangeColor.h" RangeColor::RangeColor(void) { Min = SDL_Color(); Max = SDL_Color(); } RangeColor::RangeColor(SDL_Color color) { Min = color; Max = color; } RangeColor::RangeColor(SDL_Color min, SDL_Color max) { Min = min; Max = max; } RangeColor::~RangeColor(void) { }
/* @brief askValues.c * This program get contents of the files and * save it in a variable */ #include <bits/stdc++.h> using namespace std; extern string nameMessage; void obtainContent( string nameFile, string *vartoSave, string *nameWithoutExtension ){ ifstream filetoOpen; int txtPosicion; file...
#ifndef MENU_H #define MENU_H #include <allegro.h> #include "Instrucoes.h" class Menu { private: BITMAP* buffer; BITMAP* bmp; BITMAP* bmp_instrucoes; BITMAP* bmp_selection; int pos_x; int pos_y; int select; bool jogo; public: Menu(); virtual ~Menu()...
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { vector<int> res; // multiset: ascending sort by default, allow duplicates multiset<int, greater<int>> ms; // descending order for (int i = 0; i < (int)nums.size(); ++i) { if (i >= k) ms.eras...
//Problem link:-https://www.hackerrank.com/challenges/maxsubarray #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { int t;int n,i; scanf("%d",&t); while(t--) { scanf("%d",&n); int arr[n];int temp=0,max=0,sum=0; for(i=0;i<n;i++) ...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#include <iostream> #include <vector> using namespace std; vector<int> difs; int valores[200000] = {0}; vector<int> cur_solution; int cont_max = 1, cont = 1; int main(int argc, char *argv[]) { int n, a; cin >> n; for(int i = 0; i < n; i++){ cin >> a; difs.push_back(a); } for(int i = 0; i < n-1; i++){ ...
#include <iostream> #include <stdio.h> #include <queue> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n,k; cin >> n >> k; queue<int> q; vector<int> v; for (int i=0; i<n; i++) { q.push(i+1); } int...
/* XBFOG.H FOG CLASS (c) g0at3r FOG MODES:.. D3DFOG_LINEAR D3DFOG_EXP (USED AS DEFAULT - BEST IMO) D3DFOG_EXP2 */ #ifndef __FOGHELPER_H__ #define __FOGHELPER_H__ #include <xtl.h> #include "XbUtil.h" class CXBFog { private: D3DXMATRIX m_matWorld, m_matView, m_matProj; FLOAT m_fFogStar...
#include <iostream> using namespace std; int main() { double n, r; cin >> n; r = n / 2 / 3.14; cout << (int)((r*r*3.14) + 0.5); }
/****************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt PDF Module. ** ** $QT_BEGIN_LICENSE:COMM$ ** ** Commercial License Usage ** Licensees holding valid commercial Qt license...
#include "TextureArray.h" #include "Player.h" #include "Chunk.h" #include "ChunkManager.h" #include "VertexBuffer.h" #include "Globals.h" #include "VertexArray.h" #include "Rectangle.h" #include "SkyBox.h" #include "glm/gtc/noise.hpp" #include "glm/gtc/matrix_transform.hpp" #include "ShaderHandler.h" #include "Frustum....
#include "efecto_colision_recogedor.h" using namespace App_Juego_Logica; Efecto_colision_recogedor::Efecto_colision_recogedor(App_Juego_Sistemas::Contador_tiempo& t, App_Juego::Jugador& j) :salida_nivel(false), tiempo(t), jugador(j) { } bool Efecto_colision_recogedor::puede_recoger_salud() { return jugador.puede_...
class ValidWordAbbr { public: ValidWordAbbr(vector<string>& dictionary) { for (string s : dictionary) { string abbr = s; if (s.size() > 2) abbr = s[0] + to_string(s.size() -2) + s.back(); m[abbr].insert(s); } } bool isUnique(string word) { str...
#pragma once #include <iostream> #include "bubble.h" #include "quick.h" #include "insert.h" #include "select.h"
/************************************************************* * > File Name : P3372_2.cpp * > Author : Tony * > Created Time : 2019/05/29 15:08:58 * > Algorithm : [DataStructure]SegmentTree **************************************************************/ #include <bits/stdc++.h> usi...
/*题目:给定一个整数数组,返回所有数对之间的第 k 个最小距离。一对 (A, B) 的距离被定义为 A 和 B 之间的绝对差值。*/ /*先对原数组排序,则收尾相减即为最大差值初始值high,最小差值初始值为low; 每次取最大差值和最小差值的中值mid,判断小于中值的个数count: 若count小于k,则mid = (mid + 1 + r) / 2; 若count大于k,则mid = (l + mid) / 2; 依次取中值,比较k和n,直到l<=r */ #include<stdio.h> #include<math.h> int main() { int k; int temp; int ...
/* =================================================================== ! REPITION PROBLEM on DNA You are given a DNA sequence: a string consisting of characters A, C, G, and T. Your task is to find the longest repetition in the sequence. This is a maximum-length substring containing only one type of character. Inp...
/* * SPDX-FileCopyrightText: (C) 2013-2022 Daniel Nicoletti <dantti12@gmail.com> * SPDX-License-Identifier: BSD-3-Clause */ #ifndef CUTELYST_ACTION_P_H #define CUTELYST_ACTION_P_H #include "action.h" #include "component_p.h" namespace Cutelyst { class ActionPrivate : public ComponentPrivate { public: virtual ...
#include "FileSpecificParameters.h" #include "../EngineLayer/MetaMorpheusException.h" #include "../EngineLayer/CommonParameters.h" using namespace EngineLayer; using namespace MzLibUtil; using namespace Proteomics::ProteolyticDigestion; using namespace MassSpectrometry; namespace TaskLayer { FileSpecific...
#include <algorithm> #include <iostream> int main() { int a = 2; int b = 50; std::cout << "a = " << a << '\n' << "b = " << b << '\n' << '\n'; std::swap(a, b); std::cout << "a = " << a << '\n' << "b = " << b << '\n'; return 0; }
/************************************************************* Author : qmeng MailTo : qmeng1128@163.com QQ : 1163306125 Blog : http://blog.csdn.net/Mq_Go/ Create : 2018-03-14 14:45:37 Version: 1.0 **************************************************************/ #include <cstdio> #include <iostream> #include <vec...
#ifndef WEBXX_HTTP_SERVER #define WEBXX_HTTP_SERVER #define BOOST_ALL_DYN_LINK #include "../log.hh" #include <iostream> #include <fstream> #include <functional> #include <vector> #include <algorithm> #include <boost/asio.hpp> #include <boost/filesystem.hpp> #include <boost/algorithm/string.hpp> #include <boost/log/e...
// // SMFontColor.cpp // SMFrameWork // // Created by KimSteve on 2016. 11. 14.. // // #include "SMFontColor.h" #include "../Util/ViewUtil.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID const char* SMFontConst::SystemFontRegular = "Arial"; const char* SMFontConst::SystemFontBold = "Arial-medium"; const char* SMF...
/* Polynomial addition in C++ program */ #include <iostream> class Polynomial { double a, b, c; public: Polynomial() {} Polynomial(const Polynomial &poly) { a = poly.a; b = poly.b; c = poly.c; } Polynomial(double d1, double d2, double d3) { a = d1...
/* "Minimal" sketch to demonstrate emonLibCM This sketch assumes that the default values for the emonTx V3.4 are applicable, that no input calibration is required, mains frequency is 50 Hz and data logging period interval is 10 s, pulse counting and temperature monitoring are not required, and that 4 'standard' 1...
#ifndef __ItemFinalPoint_H__ #define __ItemFinalPoint_H__ #include "Item.h" class ItemFinalPoint : public Item { public: static ItemFinalPoint* create(CCDictionary* dict); bool init(CCDictionary* dict); void collision(); }; #endif
#include <stdio.h> #include <string.h> #include <stdlib.h> const int MAX_ELEMENT = 10; struct node { char name[255]; node *next; // buat Friends kalau di project Study Network // node *up; // buat post kalau di project Study Network }*head[MAX_ELEMENT], *tail[MAX_ELEMENT]; // hash angka -- simplenya ang...
#include <bits/stdc++.h> using namespace std; int main() { int N; bool xx = false; while (cin >> N, N) { if (xx) cout << endl; xx = true; string id[100001]; priority_queue<int, vector<int>, greater<int>> ordem; while (N--) { st...
#include "graphicscontroller.h" #include "options.h" #include <random> GraphicsController::GraphicsController() { d3dClass = 0; m_camera = 0; m_lights = 0; shaderManager = 0; models = 0; m_Frustum = 0; } GraphicsController::GraphicsController(const GraphicsController&) { } GraphicsController:...
#include <iostream> #include <string> #include <vector> #include <unordered_map> using namespace std; typedef unordered_map<string, int> stringmap; int main(int argc, char *argv[]) { vector<string> answers; stringmap hash; stringmap::const_iterator got; int n; string request; cin >> n; for(int i = 0; i <...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* AWeapon.hpp :+: :+: :+: ...
#include "../../include/Entities/Powerup.hpp" namespace Dungeon { namespace Entities { Powerup::Powerup(PowerupType type, int x, int y, int cost, std::function<void(Player*)> powerUpEffect) : Collectable(x, y) { this->cost = cost; this->powerUpEffect = powerUpEffect; this->type...
// // Created by Sweet Acid on 02.05.2021. // #pragma once #include <pch.h> #include <Snow/GUI/GUI.h> namespace Snow { class GUIWindow { friend class GUI; private: bool begin() { return ImGui::Begin(name.c_str(), &collapsed, window_flags); } static void end() { ...
// This program doesn't need any description. #include<iostream> using namespace std; int main() { int x; cout<<"Enter a Number : "; cin>>x; if (x%2==0) cout<<x<<" is even Number.\n"; else cout<<x<<" is odd Number.\n"; return 0; }
#include "Application.h" #include "EnemyNinja.h" #include "ModuleEnemies.h" #include "ModuleCollision.h" EnemyNinja::EnemyNinja(int x, int y) :Enemy(x, y, time) { air.PushBack({ 19, 113, 30, 42 }); recharging.PushBack({ 414, 65, 22, 34 }); shoot.PushBack({ 458, 64, 41, 37 }); raise.PushBack({ 159, 113, 30, 42 }...
/* * UAE - The Un*x Amiga Emulator * * Custom chip emulation * * (c) 1995 Bernd Schmidt, Alessandro Bissacco * (c) 2002 - 2021 Toni Wilen */ #define SPEEDUP 1 #define BLITTER_DEBUG 0 #include "sysconfig.h" #include "sysdeps.h" #include "options.h" #include "uae.h" #include "memory.h" #include "custom.h" #include "ev...
#include "Atom.h" #include <SFML/Graphics.hpp> Atom::Atom(Atom* location) { //ctor } Atom::Atom(unsigned long _x, unsigned long _y, unsigned long _z, unsigned short _region) { } Atom::~Atom() { //dtor }
//uva 231 //Undefined_Error //Dept. ICE, NSTU-11 Batch #include<bits/stdc++.h> using namespace std; #define INF 1<<28 #define ll long long #define SZ 100005 #define MX 100000000 #define sfint(a) scanf("%d",&a) #define sfint2(a,b) scanf("%d%d",&a,&b) #define sfint3(a,b,c) scanf("%d%d%d",&a,&b,&c) #define forlp0(i,n) fo...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Nicolas Jinchereau. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *------------------------------------------------------------------...
#include "stdafx.h" #include "NormalRules.h" NormalRules::NormalRules() { } std::vector<bool*> NormalRules::applyRules(std::vector<bool*> field, int fieldWidth, int fieldHeight) { std::vector<bool*> tempField; for (size_t i = 0; i < field.size(); i++) { tempField.push_back(new bool(*field[i])); } for (int...
/* ------------------------------------------------------------------------ */ /* LHa for UNIX */ /* lharc.c -- append to archive */ /* */ /* Copyright (C) MCMLXXXIX Yooichi.Tagawa */ /* Modified Nobutaka Watazaki */ /* Thanks to H.Yoshizaki....
#include <iostream> #include <queue> using namespace std; void printBFS(int **edges, int n, int startVertex, bool *visited){ queue<int> pendingVertices; pendingVertices.push(startVertex); visited[startVertex] = true; while(!pendingVertices.empty()){ int currVertex = pendingVertices.front(); ...
/******************************** ITSP 2K15 TEAM ID 148 PROJECT SURVEILLANCE BOT MICROCONTROLLER CODE ********************************/ #include<VarSpeedServo.h> VarSpeedServo servo_x,servo_y,servo_gun_x,servo_gun_y,gun_trigger; long int err_sum_x=0; long int err_sum_y=0; int last_err_x=0; int last_err_y=0; int diff...
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include "pdmatrix.h" #include "wyarray.h" #include "inout.h" using namespace std; /* * G x = g * G'G x = G'g * A x = b * * where G is ny x nx matrix */ PDMatrix::PDMatrix (d...
#include <unistd.h> #include <fcntl.h> #include <stdio.h> #include <string.h> class StdCapture { public: StdCapture(): m_capturing(false), m_init(false), m_oldStdOut(0), m_oldStdErr(0); ~StdCapture(); void BeginCapture(); bool EndCapture(); std::string GetCapture() const; private: enum PIPES {...
#pragma once #include <chrono> #include <string> #define PROF_ENABLED 1 namespace TProfiler { // // profiler timer // using ProfilerTicks = int64_t; ProfilerTicks GetTime(); double ToSeconds(ProfilerTicks ticks); // // profiler section // struct Section; using SectionPtr = Section *; Sec...
#pragma once #include <memory> #include <spdlog/spdlog.h> #include <spdlog/sinks/stdout_color_sinks.h> namespace imog { typedef std::shared_ptr<spdlog::logger> _LogType; class Logger { #define PATTERN_PRINT "%v" #define PATTERN_ALERT "%t %@ : %^%v%$" private: // Patterns static const char* m_patternPrints; ...
/* Copyright (c) 2013-2014 Sam Hardeman 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 limitation the rights to use, copy, modify, merge, publish, dist...
#include "GraphicLoader.h" #include "Log.h" #include "Testing.h" #include "Timer.h" #include "3dAnimation.h" #include "StringUtils.h" #include "Timer.h" #include "SpriteManager.h" #include "ResourceManager.h" #include "Crypt.h" #include "GraphicStructures.h" #include "Version_Include.h" StrVec GraphicLoa...
#pragma once #include "nginx.h" class NgxDatetime final { public: NgxDatetime() = default; ~NgxDatetime() = default; public: static std::time_t since() { return ngx_time(); } static ngx_str_t today() { ngx_tm_t tm; ngx_localtime(since(), &tm); static u_ch...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "base.h" WINRT_WARNING_PUSH #include "internal/Windows.Graphics.DirectX.3.h" #include "internal/Windows.Storage.Streams.3.h" #include "internal/Windows.Perception.Spatial.3.h" #includ...
/////////////////////////////////////////////////////////////////// //Copyright 2019-2020 Perekupenko Stanislav. All Rights Reserved.// //@Author Perekupenko Stanislav (stanislavperekupenko@gmail.com) // /////////////////////////////////////////////////////////////////// #pragma once #include "CoreMinimal.h" #include ...
#ifndef RENDERVIEWTEST_H #define RENDERVIEWTEST_H #include <QtTest/QTest> #include <QtCore/QObject> #include <QRegularExpression> #include "coverageobject.h" #include <Cutelyst/application.h> #include <Cutelyst/controller.h> #include <Cutelyst/View> #include <Cutelyst/Plugins/View/JSON/viewjson.h> using namespace C...
#ifndef ROSE_MemoryMap_H #define ROSE_MemoryMap_H #include <boost/shared_ptr.hpp> /* Increase ADDR if necessary to make it a multiple of ALMNT */ #define ALIGN_UP(ADDR,ALMNT) ((((ADDR)+(ALMNT)-1)/(ALMNT))*(ALMNT)) /* Decrease ADDR if necessary to make it a multiple of ALMNT */ #define ALIGN_DN(ADDR,ALMNT) ...
#include "app/ServerApp.hpp" #include <utils/Config.hpp> #include <logger/Logger.hpp> namespace app { ServerApp::ServerApp() : m_configPath{ "AppConfig.json" } { utils::AppConfig::Instance().ReadConfig(m_configPath); InitLogger(); lg::LOG(lg::Severity::info) << "Server configuration: " << "\n\t Host: " ...