text
stringlengths
8
6.88M
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional>...
#pragma once #include <vector> #include <list> using namespace std; class Viruss { public: Viruss(); Viruss(char *dna, int resistance); virtual ~Viruss(); Viruss(const Viruss *viruss); void LoadADNInformation(); int ReduceResistance(int medicine_resistance); int GetResistance(); public: char *m_dna; int m_r...
#include <bits/stdc++.h> using namespace std; int N,acciones,buenas,malas,porto; string nombre; char c; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> N; for(int i=0;i<N;i++){ cin >> nombre >> acciones; buenas = 0; malas = 0; for (int j=0;j<acciones;j++){ ...
#include<bits/stdc++.h> #include <string> using namespace std; int tab[100][100]; int dx[] = {-1, 1, 0, 0}; int dy[] = {0, 0 -1, 1}; string moves[] = {"UP", "DOWN", "LEFT", "RIGHT"}; bool inBoard(int x, int y, int n) { if (x < 0 || x >=n || y < 0 || y >= n) return false; return true; } bool colision(int x,...
#ifndef _DECODER_H #define _DECODER_H #include "CDLSocketHandler.h" #include "CDLStreamDecoder.h" #include "Packet.h" #include "Typedef.h" class DLDecoder : public CDLStreamDecoder { Singleton(DLDecoder); protected: virtual inline int GetHeadLen(const char * data, int len) { ret...
#pragma once class IScene { public: IScene(){ } virtual ~IScene() { } virtual void Update() = 0; virtual void Draw() = 0; }; extern IScene* currentScene;
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2008 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. ** It may not be distributed under any circumstances. ** ** Yngve Pettersen */ #ifndef LIBSSL_SIGHASH_H #define LIBSSL_SIG...
#include <memory> #include <pybind11/pybind11.h> #include <pybind11/eigen.h> #include <pybind11/stl.h> #include <SkeletonExtraction/SkeletonEngine.h> namespace py = pybind11; using namespace PyMesh; void init_SkeletonExtraction(py::module& m) { py::class_<SkeletonEngine, std::shared_ptr<SkeletonEngine> >( ...
// Project 14 - Multicolor light display int redPin = 9; int greenPin = 10; int bluePin = 11; int aPin = 2; int bPin = 4; int buttonPin = 3; boolean isOn = true; int color = 0; long colors[48]= { 0xFF2000, 0xFF4000, 0xFF6000, 0xFF8000, 0xFFA000, 0xFFC000, 0xFFE000, 0xFFFF00, 0xE0FF00, 0xC0FF00, 0xA0FF00, 0x80FF...
#include <iostream> #include <algorithm> typedef long long ll; using namespace std; int main() { int t, n, a[100000], count; cin >> t; for (int i = 0; i < t; i++) { cin >> n; for (int j = 0; j < n; j++) cin >> a[j]; sort(a, a + n); count = 0; ...
// // Created by Yevhenii Natalenko on 5/2/17. // #include "Kosaraju.h" #include "GenerateGraph.h" #include <iostream> using namespace std; vector<vector<int> > convert(const GraphFormat& graph){ vector<vector<int> > result; vector<int> neighbour_list; int node; for (int i = 0; i < graph.getGraph().s...
#include<bits/stdc++.h> using namespace std; char s1[100],s2[100],s[100],ans[100]; bool f[100]; int h[100],flag=0,tot=0; void readit(){ scanf("%s%s%s",s1,s2,s); } void writeit(){ if (flag) printf("Failed"); else printf("%s\n",ans); } void work(){ if (strlen(s1)!=strlen(s2)){ flag=1; return; } ...
#pragma once namespace aeEngineSDK { class AE_GRAPHICS_EXPORT aeVertexShader : public aeShader { protected: aeVertexShader(); friend class aeGraphicsAPI; friend class aeRenderer; public: aeVertexShader(const aeVertexShader& S); virtual ~aeVertexShader(); void Release(); }; }
#ifndef __VIVADO_SYNTH__ #include <fstream> using namespace std; // Debug utility ofstream* global_debug_handle; #endif //__VIVADO_SYNTH__ #include "blur_xy_16_unrolled_16_opt_compute_units.h" #include "hw_classes.h" struct blurx_blurx_update_0_write0_merged_banks_2_cache { // RAM Box: {[0, 1920], [0, 1079]} ...
#ifndef __NET_H_ #define __NET_H_ #include "socket.h" #include <sys/resource.h> #include <sys/times.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/epoll.h> #include <sys/ioctl.h> #include <arpa/inet.h> #include <netinet/in.h> #include <errno.h> #include <fcntl.h> #include <unistd.h> #include <stdint....
class Chainsaw { weight = 4.5; }; class ChainSawB { weight = 4.5; }; class ChainsawG { weight = 4.5; }; class ChainsawP { weight = 4.5; }; class ChainsawR { weight = 4.5; }; class ChainSawBroken { weight = 4.5; }; class ChainSawBBroken { weight = 4.5; }; class ChainSawGBroken { weight = 4.5; }...
#pragma once #include "Bindable.h" template<typename C> class ConstantBuffer : public Bindable { public: ConstantBuffer(VeritasEngine& gfx, const C& consts, UINT slot = 0u) :slot(slot) { VBUFFER_DESC cbd = {}; cbd.BindFlags = VBIND_FLAG::CONSTANT_BUFFER; cbd.ByteWidth = sizeof(consts); cbd.StructureByteStr...
#pragma once /* * Lanq(Lan Quick) * Solodov A. N. (hotSAN) * 2016 * LqPtdTbl (LanQ ProTecteD TaBLe) - Multithread hash table. */ #include "LqOs.h" #include "LqAlloc.hpp" #include "LqShdPtr.hpp" #include <vector> #include <type_traits> #pragma pack(push) #pragma pack(LQSTRUCT_ALIGN_MEM) template<typename TypeVal...
#pragma once #include "Input_Mouse.h" #include "Input_Keyboard.h" class Input { private: Keyboard m_Keyboard; Mouse m_Mouse; bool m_cursorEnabled; public: Input(); LRESULT handleMessages(HWND hwnd, UINT& uMsg, WPARAM& wParam, LPARAM& lParam); void readBuffers(); MouseEvent getMouseEvent(); Keyboard* getKeybo...
#include "gtest\gtest.h" #include "siren\utils\file_utils.h" #include "siren\utils\rand_utils.h" #include "siren\utils\task_scheduler.h" int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } TEST(FileUtils,lnk) { EXPECT_TRUE(sr::CreateLnkFile(L"c:\\1.lnk", L"c:\...
#pragma once #include <Engine/Engine.h> #include <memory> namespace sf { class RenderWindow; class Event; } namespace LaiEngine { class IPhysicsAnimation : public NonMovable, public NonCopyable { public: void Update(const float dt); protected: IPhysicsAnimation() = default; virtual ~IPhysicsAnimation...
#include <chuffed/core/propagator.h> #include <iostream> #include <list> #include <queue> #include <set> using namespace std; #define CUMUVERB 0 // Data types for the Chuffed solver #define CUMU_ARR_INTVAR vec<IntVar*> #define CUMU_MATRIX_INT vec<vec<int> > #define CUMU_ARR_INT vec<int> #define CUMU_INTVAR IntVar* ...
#pragma once #include "Grid.h" #include "rectangularvectors.h" //C# TO C++ CONVERTER NOTE: Forward class declarations: namespace WinTetris { class Grid; } namespace WinTetris { class Tetris; } namespace WinTetris { class Screen : public Grid { public: Screen(); void AddBlock(Grid *ocupp); v...
#include <stdio.h> int main(int argc,char** argv) { if(!initGL(argc, argv)) return 0; glutMainLoop(); return 0; } /* * GLUT main initialization function */ bool initGL(int argc, char** argv) { //Initialize GLUT glutInit(&argc, argv); glutInitContextVersion(3, 3); glutInitContextFlag...
#ifndef H_StockInputException #define H_StockInputException #include "stdafx.h" class StockInputException: public exception { public: StockInputException(string inmessage = ""); string what(); private: string message; }; #endif
#include <iostream> #include <camera.h> Camera::Camera(const glm::vec3& pos, int type, Display* window) { m_camType=type; m_window = window; m_zoom = 1.0f; m_maxzoom = 5.0f; m_zoomspeed = 0.04f; float windowAspect = m_window->GetWindowAspect(); if (type==1) m_perspective = glm::...
#ifndef HEADER_CURL_STRTOOFFT_H #define HEADER_CURL_STRTOOFFT_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
#pragma once // Lives struct struct Lives { public: // c-tor Lives(int lives); // d-tor ~Lives() = default; //functions int get_lives(); void decrese(); private: int m_number_of_live; };
// Created on: 1992-11-13 // Created by: GG // 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 GNU Lesser Gene...
/* This is the main file that is called to run the quadrotor simulation. It acts as an intermediary between the trajectory generation node and the controller node. Separating the nodes allows for modularity in the design. Various controllers and trajectory design techniques can be tested and simulated with this approac...
#include<iostream> using namespace std; void PrintArr(int a[], int n) { int i = 0; for (; i < n; i++) { cout << a[i]; if (i < n - 1) cout << ' '; } cout << endl; } int sort(int a[], int n) { int temp; int i, j; for (i = 0; i < n; i++)//控制遍历次数 { for (j = 0; j < n - i - 1; j++)//控制比较的循环 { if (a...
#include<iostream> #include<vector> #include<fstream> #include<iomanip> #include<cstdlib> using namespace std; class Node { public: friend class List; friend void walk_through(Node *root , string encode); Node(long int Freq , int Ch) { freq=Freq; ...
#include "../../idlib/precompiled.h" #pragma hdrstop #include "../Game_local.h" #include "AI.h" #ifndef __GAME_PROJECTILE_H__ #include "../Projectile.h" #endif #include "AI_Manager.h" #include "../vehicle/Vehicle.h" #include "../spawner.h" #define idAI_EVENT( eventname, inparms, outparm) \ const idEventDef ...
#ifndef _SPATIAL_MATH_RECT_INL_ #define _SPATIAL_MATH_RECT_INL_ #include <limits> #include <algorithm> namespace sm { template <typename T> Rect<T>::Rect() { MakeEmpty(); } template <typename T> Rect<T>::Rect(T width, T height) { Build(width, height); } template <typename T> Rect<T>::Rect(const Vector2<T>& cente...
/** * (C) Copyright Projet SECRET, INRIA, Rocquencourt * (C) Bhaskar Biswas and Nicolas Sendrier * * (C) 2014 cryptosource GmbH * (C) 2014 Falko Strenzke fstrenzke@cryptosource.de * * Botan is released under the Simplified BSD License (see license.txt) * */ #include <botan/internal/binary_matrix.h> namespac...
#include<iostream> using namespace std; string a,b; void f(int l1,int r1,int l2,int r2) { int n=b.find(a[l1]);//找到中序中前序中的第一个元素,即根 if(n>l2) f(l1+1,l1+n-l2,l2,n-1);//将两序列二分为左右子树 if(n<r2) f(l1+n-l2+1,r1,n+1,r2); cout<<a[l1];//后序输出根 } int main() { cin>>b>>a; f(0,a.length()-1,0,b.length()-1); //递归 re...
#include "mail_merger.hpp" #include "prepare.hpp" #include "utils/log.hpp" #include "utils/assert.hpp" #include "config/mail_ptts.hpp" #include "config/utils.hpp" #include "utils/gid.hpp" namespace nora { void mail_merger::start() { ASSERT(st_); st_->async_call( ...
#include <iostream> #include <cmath> #include <stdlib.h> using namespace std; double f1(double x); double f2(double x); double secant(double start,double end,double precision, double (*function)(double)); int it = 0; double precision = 0.000001; int main() { cout << "Ecuatia a):\n"; cout << "Solutia este : " << sec...
#include"FileIOService.h" #include"Set.h" #include"TransitionFunction.h" #include"Tape.h" #include"CommonMethods.h" #include<iostream> #include<fstream> #include<string> using namespace std; FileIOService::FileIOService(string inputFile, string outputFile) { this->inputFile = inputFile; this->outputFile = outputFile...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 2010 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef SELFTEST_ASYNCTEST_H #define SELFTEST_ASYNCTEST_H #include "modules/selftest/testu...
#include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include <sstream> #include <set> #include <cmath> #include <map> #include <stack> #include <queue> #include <stdio.h> #include <string.h> #include <numeric> #define L_INF (1) #define INF ...
#ifndef DICTIONARY_H #define DICTIONARY_H #include <vector> #include <string> #include <iostream> #include <algorithm> using namespace std; #include "../model/TrieTree.h" namespace model { class Dictionary { private: TrieTree wordTree; public: // // Holds the words in a tree for easy lookups //...
#pragma once #include "Point3D.h" #include <vector> #include "appConsts.h" #include "color.h" #include "resourceManager.h" #include "bitmap.h" #include <string> #include <unordered_map> class Mesh; struct RenderConfig { Mesh *mesh; AppConsts *appConsts; Point3D<float> lightPosition; Color lightColor; flo...
//Vectors and dynamically allocated memory #include <iostream> using namespace std; class vector { int sz; // The size double* elem; // Pointer to the first element (of type double) public: vector(int s) : // Constructor sz{ s }, // sz member initialization ...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; int main() { int t,s,q; scanf("%d%d%d",&t,&s,&q); int ans = 1; w...
#include <iostream> using namespace std; void wait() { cout << endl; system("pause"); } // двусвязный список struct element { int data; element* next; // указатель на след. элемент element* prew; // указатель на пред. элемент }; struct list { element* head; // указатель на начало списка element element* tai...
#include <iostream> #include <array> #include <vector> #include <algorithm> #include "print.cpp" // #include "binarystep.cpp" // #include "sigmoid.cpp" // #include "gaussian.cpp" // #include "identity.cpp" // #include "relu.cpp" // #include "selu.cpp" // #include "leakyrelu.cpp" #include "mish.cpp" using namespace st...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <string> #include <vector> #include <deque> int const Letters = 4; int const NA = -1; struct Node { int next[Letters]; int startPosition; Node() :startPosition(NA) { std::fill(next, next + Letters, NA); } bool isLeaf() co...
// Created on: 1997-10-13 // Created by: Roman BORISOV // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU ...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * Allowed #if-ery: O/S, __cplusplus. */ #ifndef POSIX_SYS_INCLUDE_LATE_H #define POSIX...
/* * Scythe Statistical Library Copyright (C) 2000-2002 Andrew D. Martin * and Kevin M. Quinn; 2002-present Andrew D. Martin, Kevin M. Quinn, * and Daniel Pemstein. All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify under the terms of the GNU General Public License a...
#pragma once #include "std_lib_facilities.h" constexpr char quit = 'q'; constexpr char print = ';'; constexpr char number = '8'; constexpr char name = 'a'; constexpr char let = '#'; constexpr char help = 'h'; constexpr int k = 1000; const string prompt = "> "; const string result = "= "; const string declkey = "let...
#include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> #include "linkedlist.h" void main() { system("color F0"); Stack *head=NULL; char str[20]; printf("infix: "); gets(str); printf("postfix: "); for(int i=0;i<strlen(str);i++) { //basta operand kay i display if(str[i...
#include "image_renderer.h" namespace sloth { RawModel ImageRenderer::quad = RawModel(); void ImageRenderer::renderQuad() { glBindVertexArray(quad.getVaoID()); glEnableVertexAttribArray(0); glDisable(GL_DEPTH_TEST); glClear(GL_COLOR_BUFFER_BIT); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glEnable(GL_DEP...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define showmap(is, js, x) {rep(i, is){rep(j, js){cout << x[i][j] << " ";}cout << endl;}} #define show(x) {for(auto i: x){cout << i << " ";} cout...
#pragma once #include"Productos.h" #include"Lista.h" #include "Pila.h" #include "Matriz.h" #include"Lista_Enlazada.h" #include"Pila_Informacion.h" #include"Informacion.h" namespace Proyecto02KarlaLopez1059420 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; usi...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2005 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Peter Karlsson */ #if !defined OPCONSOLELOGGER_H && defined OPERA_C...
// 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 VENDING_MACHINE_MICROSERVICES_BeveragePreferenceHANDLER_H #define VENDING_MACHINE_MICROSERVICES_BeveragePreferenceHANDLER_H #include <iostream> #include <string> #include <regex> #include <future> #include "../../gen-cpp/BeveragePreferenceService.h" #include "../ClientPool.h" #include "../ThriftCl...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*- ** ** Copyright (C) 2009-2010 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef DOM_WW_BASE_H #define DOM...
// // C++ Implementation: LogSystem // // Description: // 实时写入日志信息 // // Author: Jally <jallyx@163.com>, (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include "LogSystem.h" #include "ProgramData.h" #include "utils.h" extern ProgramData progdt; #define LOG_START_HEADER "===========...
// Created on: 2002-12-12 // Created by: data exchange team // Copyright (c) 2002-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...
#include "../inc/ubigint_t.h" #include <iostream> #include <algorithm> namespace crypto { const char *InvalidData::msg() const throw() { return "Digit in input data is not a number!!!"; }; ubigint_t::ubigint_t() { if (!validatedata()) throw InvalidData(); cutze...
#ifndef AJOUTERCLIENT_H #define AJOUTERCLIENT_H #include <QDialog> #include "clientaj.h" namespace Ui { class ajouterclient; } class ajouterclient : public QDialog { Q_OBJECT public: explicit ajouterclient(QWidget *parent = 0); ~ajouterclient(); private slots: void on_AJCprecedentPB_clicked(...
#ifndef BOS_HH #define BOS_HH const int nbcs = 700000; extern "C" struct { int junk[5]; int iw[nbcs]; } bcs_; //Macros for operating on the BOS data: #define IW (bcs_.iw) #define RW ((float*) bcs_.iw) #endif
// // Created by heyhey on 20/03/2018. // #include "StructureWHILE.h" StructureWHILE::StructureWHILE() {} Bloc *StructureWHILE::getBloc() const { return bloc; } void StructureWHILE::setBloc(Bloc *bloc) { StructureWHILE::bloc = bloc; } ostream &operator<<(ostream &os, const StructureWHILE &aWhile) { os ...
#include <iostream> #include <string> #include <cstdio> #include <memory.h> #include <string.h> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <functional> #include <climits> typedef long long LL; type...
#ifndef RD_H #define RD_H #include "interp.hpp" #include "integrate.hpp" #include "models.hpp" #include "data.hpp" #include <boost/math/special_functions/bessel.hpp> #include <boost/math/special_functions/bessel_prime.hpp> #include <vector> #include <cmath> #include <sstream> #include <string> #include <iostream> #...
#pragma once #include <vector> #include <SDL2/SDL.h> #include "fwd.hpp" #include "engine/graphics/LTexture.hpp" #include "engine/GameEngine.hpp" #include "engine/audio/AudioSource.hpp" extern GameEngine* gEngine; class LButton { public: //Initializes internal variables LButton(); LButton(ButtonType button_t...
#include<cstdio> #include<iostream> using namespace std; int main() { long long n; while(scanf("%lld", &n)==1){ printf("%lld\n", (n/2+2) * (n/2+1)/2); } return 0; }
// ========================================================================== // $Id: g_PEdge.h 3829 2013-04-09 08:38:58Z jlang $ // Wrapper code to interface g_plane // ========================================================================== // (C)opyright: // // Jochen Lang // SITE, University of Ottawa // 80...
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "Berardi.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Berardi, "Berardi" ); DEFINE_LOG_CATEGORY(LogBerardi)
#include "Mesh.h" void CreateDefaultMesh(Mesh *mesh) { std::vector<float> points; points.push_back(-1.f); // x points.push_back(-1.f); // y points.push_back(0.f); // z points.push_back(1.f); // x points.push_back(-1.f); // y points.push_back(0.f); // z points.push_back(1.f); // x points.push_back(1.f); ...
/* * @lc app=leetcode.cn id=111 lang=cpp * * [111] 二叉树的最小深度 */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ #include<iostream> #include<algorithm>...
#include "StdAfx.h" #include "MinMaxSearcher.h" #include <algorithm> using namespace std; MinMaxSearcher::MinMaxSearcher(int width, int height, int length): width(width) { rootBoard = new Board(width, height, length); } MinMaxSearcher::~MinMaxSearcher(void) { delete rootBoard; } action MinMaxSearcher::findBestMo...
#include "glew.h" #include "startercode.h" using namespace std; #include <QtGui/QApplication> char* filename; char* raytraceconfig; int main(int argc, char *argv[]) { if (argc < 3) { std::cout << "Error: Invalid number of arguments. Exiting.\n" << std::endl; exit(-1); } QApplication a(argc, argv); StarterCo...
#ifndef COMMON_SRC_CONFIGURATIONREADERIMPL_H #define COMMON_SRC_CONFIGURATIONREADERIMPL_H #include <QVariant> namespace common { namespace util { template<typename T> static T convertToType(const QString& value, bool* ok) { //If value is empty return true because that means it exists but has no value //it ca...
// msghandler.cc // 4/27/2014 jichi #include "config.h" #include "util/location.h" #include "util/msghandler.h" #include <QtCore/QCoreApplication> #include <QtCore/QDir> #include <QtCore/QDateTime> #include <QtCore/QFile> #include <QtCore/QTextCodec> #include <QtCore/QTextStream> #define DEBUG_FILE VNRAGENT_DEBU...
#include <iostream> #include <cstring> #include <algorithm> using namespace std; int flag = 0; string sub(string s1, string s2){ for(int i = s1.length() - 1, j = s2.length() - 1; j >= 0; i--, j--){ if(s1[i] >= s2[j]){ s1[i] = s1[i] - s2[j] + '0'; } else{ int k = i; ...
/*! \file */ //Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #ifndef PHY_PERIPH_HPP_ #define PHY_PERIPH_HPP_ #include <iface/link.h> #include <fcntl.h> #include <cstdlib> #include <cstring> #include <signal.h> #include <stratify/stratify.h> #include "Dev.hpp" namespace hal { /*! \brief Peripheral Class ...
#include "Constants.h" #include <yaml-cpp/yaml.h> const YAML::Node constants = YAML::LoadFile("scripts/constants.yml"); // World const auto SEED = constants["seed"].as<unsigned long long>(); // Camera const double FOV = constants["fov"].as<double>(); const double NEAR_CLIP = constants["near clip"].as<double>(); con...
#ifndef ROOT_TRACER #define ROOT_TRACER #include <set> #include <mutex> namespace tensorflow { //T1 is Tensor //T2 is TensorBuffer template <typename T1, typename T2> class RootTracer{ public: //class method members RootTracer(); // copy constructor RootTracer(const RootTracer<T1, T2> &tmp); //clean a...
class USEC_ch53_E; class CH53_DZE : USEC_ch53_E { scope = 2; displayname = "$STR_VEH_NAME_CH53"; vehicleClass = "DayZ Epoch Vehicles"; destrType = "DestructWreck"; weapons[] = {"CMFlareLauncher"}; magazines[] = {"120Rnd_CMFlareMagazine"}; supplyRadius = 1.3; enablemanualfire = 0; crew = ""; soundGetIn[] = {"\...
#include<stdio.h> #include<conio.h> using namespace std; void quickSort(int a[], int si, int ei); bool haspair(int arr[],int num,int size) { quickSort(arr,0,size-1); int l=0,r=size-1; while(l<r) { if(arr[l]+arr[r] == num) return true; e...
#include<bits/stdc++.h> using namespace std; int MAX = 1000; void addArr(int a[], int b[], int c[]){ int carry = 0; for(int i = MAX - 1; i >= 0; i--){ c[i] = (a[i] + b[i])%10 + carry; carry = (a[i] + b[i])/10; } } void replaceArr(int a[], int b[], int c[]){ for(int i ...
/* * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved * * 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 ...
#include "YAMLStream.hpp" YAMLStream::YAMLStream() : m_IsOpen{ false }, m_Emitter{ std::make_unique<YAML::Emitter>() } {} YAMLStream::YAMLStream(std::string_view filepath, Type flag) : m_Emitter{ std::make_unique<YAML::Emitter>() } { open(filepath, flag); } YAMLStream& YAMLStream::operator<<(const std::pai...
// Created on: 1993-09-20 // Created by: Modelistation // 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 GNU ...
#include "VehicleData.h" #include<cmath> #include <iostream> using std::cout; using std::endl; VehicleData::VehicleData(int id, double velocity, double xPosition, int lane, double acceleration, int lnChg, double desiredVelocity, int desiredLane) : id(id) , velocity(velocity) , xPosition(xPosition) , lane(lane) ,...
#ifndef BASE_FILTER_H #define BASE_FILTER_H #include <map> #include <string> #include <functional> #include <algorithm> #include "image_data.h" namespace filter { class base { public: /* ATTENTION * these vars are DIVISORS excepted 0 * so if u see top = 5 it means that top is 1 / 5 of width * BUT ...
#include <irrlicht.h> #include "event.h" CEvent::CEvent() { (void)memset(KeyIsDown, false, sizeof(KeyIsDown)); (void)memset(ButtonIsDown, false, sizeof(ButtonIsDown)); (void)memset(ButtonClickPosition, false, sizeof(ButtonClickPosition)); LastWheelMovement = 0.f; MousePosition = position2di(); } bool...
#ifndef TIMELAPSER_LOGGING_H #define TIMELAPSER_LOGGING_H #include <sstream> #include <ostream> #include <vector> #include <memory> #define STRINGIFY2(X) #X #define STRINGIFY(X) STRINGIFY2(X) #ifdef _DEBUG #define LOG_CONTEXT(name) static Log::LocalContext log_ctx_(name) #define LOG_DEBUG Log::Log(Log::LocalContext(...
// kumaran_14 #include <bits/stdc++.h> using namespace std; #define f first #define s second #define p push #define mp make_pair #define pb push_back #define foi(i, a, n) for (i = (a); i < (n); ++i) #define foii(i, a, n) for (i = (a); i <= (n); ++i) #define fod(i, a, n) for (i = (a); i > (n); --i) #define fodd(i, a, n...
#include <Ogre.h> #include <OIS/OIS.h> #include "StartState.h" #include "PlayState.h" #include "GameManager.h" using namespace Ogre; using namespace OIS; StartState StartState::mStartState; void StartState::enter() { //mGUI = new BetaGUI::GUI("Font/Magic36", 50); //mGUI ->injectMouse(<pointer x>, <pointer y>, tr...
#include"team.hpp" //string vector and player header file using namespace std; Team::Team() { totalRunsScored = 0; wicketsLost = 0; TotalBallsPlayed = 0; }
#pragma once #include <_/Deploy.hpp> #ifdef NANA_ENABLE_AUDIO #include <_Audio/BufferPreparation.h> #include <vector> #if defined(NANA_WINDOWS) #include <windows.h> #elif defined(NANA_LINUX) #include <alsa/asoundlib.h> #endif namespace Audio { class AudioDevice { public: AudioDevice(); ~AudioDevice(); ...
// This is a sample code that constructs general kinetic terms! #include <iostream> #include <iomanip> // to set output precision. #include <cmath> #include <string> #include <sstream> #include <complex> #include <random> #include "generic_inverters.h" #include "generic_inverters_precond.h" #include "generic_vector.h...
#ifndef COMPLEX_H #define COMPLEX_H #include <string> // Комплексное число class Complex { float re, im; public: static const short ZeroDiv = -1; //Конструктор по умолчанию Complex(); //Конструктор преобразования Complex(float r, float i); //На комплексное.. Complex operator + ( const Complex& b) const; C...
#include "Gauss.h" double Method_Of_Gauss::Arg_min(int n_var, bool method) { n_var == 0 ? F_1 = bind(F_2, _1, Xk[1]) : F_1 = bind(F_2, Xk[0], _1); pair<double, double> Interval; Interval = n_var == 0 ? Find_Interval(Xk[0]) : Find_Interval(Xk[1]); //Для барьерных if (method) Check_Interval(Interval, n_var); ...
// Copyright 2012 Yandex #ifndef LTR_UTILITY_EIGEN_CONVERTERS_H_ #define LTR_UTILITY_EIGEN_CONVERTERS_H_ #include <Eigen/Dense> #include <vector> #include "ltr/data/object.h"; using std::vector; using Eigen::VectorXd; using Eigen::MatrixXd; namespace ltr { namespace utility { /** * Function converts std::vector ...