text
stringlengths
8
6.88M
#pragma once #include "utils/ptts.hpp" #include "proto/config_gongdou.pb.h" using namespace std; namespace pc = proto::config; namespace nora { namespace config { using gongdou_ptts = ptts<pc::gongdou>; gongdou_ptts& gongdou_ptts_instance(); void gongdou_ptts_...
#include<bits/stdc++.h> using namespace std; void print(int n){ //Base case if(n == 0){ return; } //Recursion print(n-1); // 1 2 3 4 ......... n-1 cout<<n<<endl; } void print1(int n){ //Base case if(n == 0){ return; } cout<<n<<endl; //Recursion print1(n-1); // n-1.........4 3 2 1 } ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef __MIME_LIB_H__ #define __MIME_LIB_H__ #ifndef _MIME_SE...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <sstream> #include <string.h> #include <queue> #include <vector> #include <set> #include <map> typedef long long LL; typedef unsigned long long ULL; #defin...
#include <iostream> using namespace std; long long ncr(int n,int r,long long prev) { long long res; res=prev*(n-r+2)*(n-r+1)/((n+1)*r); return res; } int main() { std::ios::sync_with_stdio(false); int T,n; long long p,q,x,y,temp,M; cin>>T; while(T>0) { cin>>n; cin>>M; //f(n)=fibo(n+1) fibonacci number w...
#pragma once #include "ExampleBase.h" #include "Camera.h" #include <set> #include <map> using namespace std; using namespace glm; class BlendColor : public ExampleBase { private: GLuint vao; GLuint textures[2]; mat4 model, view, projection; GLfloat lastX, lastY; GLfloat lastTime; set<int> dirPress; Camera...
#include "DetectorConstruction.hh" #include "PrimaryGeneratorAction.hh" #include "SteppingVerbose.hh" #include "PhysicsList.hh" #include<G4RunManager.hh> #include<G4UImanager.hh> #include<G4UIterminal.hh> #include<G4VisExecutive.hh> #include<G4Material.hh> #include<G4UserRunAction.hh> #include<G4Run.hh> #include <QGSP_...
#include <bits/stdc++.h> using namespace std; const int maxn = 100010; long long n, m, q, u, v, t, tmp, d = 0; struct queue { long long l = 1, r = 0, v[maxn]; inline void push(int x) { v[++r] = x; } inline int pop() { return v[l++]; } inline int front() { return v[l]; } void print() { for (int i = l; ...
#pragma once #include<iostream> #include<iomanip> #include<vector> #include<queue> #include"tools.h" using namespace std; template<class dataType> class adjMaxtrix { public: //构造函数,初始图 adjMaxtrix(); //在图G中插入n个顶点信息V和e条边信息E void CreatGraph(dataType V[], int n, RowColWeight E[], int e); //输出邻接矩阵 void print(); /...
#include <iostream> using namespace std; // recursive function to determine Greatest Common divisor of 2 numbers // it is very fast to work long long GreatestCommondivisor(long long FirstNum, long long SecondNum) { if (SecondNum==0) { return FirstNum; } else { if (First...
// Copyright (c) 2014 Agustin Berge // // 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) #pragma once #include <pika/futures/traits/is_future.hpp> #include <pika/type_support/...
#include "OpenFlight/DotExporter.h" #include "OpenFlight/OpenFlightReader.h" #include <iostream> #include <sstream> #include <string> #include <set> #include <vector> using namespace std; struct Options { Options() : mDebug(false), mExportToDot(false), mVertexDataSkipped(false), m...
#ifndef CANTRANSCEIVER_MOCK_H_ #define CANTRANSCEIVER_MOCK_H_ #include "can/ICANTransceiver.h" #include "busId/BusId.h" namespace can { class CanTransceiverMock : public ICANTransceiver { public: CanTransceiverMock() {} virtual ErrorCode init() { return CAN_ERR_OK; } virtual void shutdown() {} virtual Erro...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#include<stdio.h> int main() { char a[20][21]; //假设这里的地图不超过20*20 int i, j, sum, map = 0, p, q, x, y, n, m; //读入n和m,n表示有多少行字符,m表示有多少列 scanf("%d %d", &n, &m); //读入n行字符 for(i = 0; i <= n-1; i++) scanf("%s", a[i]); //用两重循环枚举地图中的每一个点 for(i = 0; i <= n-1; i++) { for(j = 0; j <= m-1; j++) { //首先判断这个点是不是平地,...
#include <ctype.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <stdint.h> #include <list.h> #include <node.h> #include <context.h> #include <ll.h> #include <reader.h> /* SNode::SNode() : Node((void*)NULL, 0) { } SNode::SNode(char* str) : Node((void*)NULL, 0) { t...
#include <SCC.h> scc::scc() { // initialise register masks data_reg[INDX].setMask(0x80003F00); data_reg[RAND].setMask(0x00003F00); //TODO: rand register: this may be done differently data_reg[RAND].readOnly(); data_reg[TLBL].setMask(0xFFFFFF00); data_reg[CTXT].setMask(0xFFFFFFFC); data_reg[CTXT].readOnly(); da...
/* -*- 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. */ #include <core/pch.h> #ifdef DOM_EXTENSIONS_CONTEXT_MENU_API_SUPP...
#pragma once #include <glad/glad.h> class TimeQuery { public: TimeQuery(); ~TimeQuery(); void start(); void stop(); //milliseconds double getDeltaTime(); double getFPS(); private: double _deltaTime; unsigned int _queryID[2]; GLuint64 _startTime; GLuint64 _stopTime; };
#include "Cell.h" #include <string> Cell::Cell(std::string Type, int x, int y) : LandScapeT(Type), x(x), y(y) { } std::string Cell::getCellType() const { return LandScapeT; } int Cell::getCellPositionx() const { return y; } int Cell::getCellPositiony() const { return x; } std::string Cell::getOllDa...
#ifndef CHROME_BROWSER_EXTENSIONS_API_BROWSER_TRANSFORM_API_H_ #define CHROME_BROWSER_EXTENSIONS_API_BROWSER_TRANSFORM_API_H_ #include "chrome/common/extensions/api/transform.h" #include "chrome/browser/extensions/chrome_extension_function.h" #include "extensions/common/extension.h" #include "extensions/browser/event_...
#include <cstdio> #include <iostream> #include <vector> #include <string> #include <stack> #include <unordered_map> #include <unordered_set> #include <queue> #include <algorithm> #define INT_MAX 0x7fffffff #define INT_MIN 0x80000000 using namespace std; vector<string> anagrams(vector<string> &strs){ unordered_map<s...
#include <chuffed/branching/branching.h> #include <chuffed/core/engine.h> #include <chuffed/core/propagator.h> #include <chuffed/vars/modelling.h> #include <cassert> #include <cstdio> int csplib_capacities[] = {12, 14, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 32, 35, 39, 42, 43, 44}; int csplib_o...
#include "mutiplex/ServerSocket.h" #include "mutiplex/InetAddress.h" #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <stdexcept> #include "Debug.h" namespace muti { ServerSocket::ServerSocket() : fd_(socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, ...
//============================================================================ // Name : NewRedGreenYellow.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ ...
#ifndef TERRAIN_H #define TERRAIN_H #include <cstdlib> #include <cstring> #include <vector> #include <GL/gl.h> #include "../mat.h" #define ALG_PERLIN 0 #define ALG_DIAMOND 1 class Terrain { friend class Scene; public: Terrain(double stride, char htsgen); virtual ~Terrain(); protected: private: int w,...
#pragma once #include "LayerNode.hpp" #include "Nodes/VariableNode.hpp" #include "Utils/NotNull.hpp" #include "Utils/Math.hpp" #include <algorithm> using MatrixMultiplyFunction = void(ArrayView<float const> inputVector, ArrayView<float const> weightsMatrix, ...
// #include "c-flo.h" // #include "c-flo-workaround.h" // #include "ota.h" #include "1dpong.h" OneDimensionalPong _pongGame; // Cflow _cflo("mainhall", "espong", "espong"); const char* mqtt_server = "c-beam.cbrp3.c-base.org"; void onGameStart() { // _cflo.sendGameStartMsg(); } void onBallHit(int pos, String direc...
#pragma once #include <iostream> #include <memory> #include <type_traits>
// This is generated file. Do not modify directly. // Path to the code generator: /home/avakimov_am/flex_typeclass_plugin/codegen/cxtpl/typeclass/typeclass_gen_hpp.cxtpl. #pragma once #include "type_erasure_common.hpp" #include <array> #include <functional> #include <memory> #include <stdexcept> #include <utility> ...
#pragma once #include <chrono> #include <iostream> #include "Config.h" #include "Encoder.h" #include "Helpers.h" class Orientation { public: typedef typename Encoder<uint16_t, double> EncType; struct Position { Point p; double& x, & y; double theta = 0; double vx = 0, vy = 0, omega = 0, v = 0; void print(...
/* * AUTHOR : Sayanatan Pal * DATE : 03.01.2020 * Prime number check (Primality Test Method [sqrt(n)]) --> O(sqrt(n)) * Link : https://www.geeksforgeeks.org/primality-test-set-1-introduction-and-school-method/ */ /* Note : Always use <bits/stdc++.h> instead of iostream */ #include <bits/stdc++.h> using namespace...
/* EXECUTE THE CIRCULAR MANEUVER */ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //HEADER FILES #include "maneuvers/circle_maneuver.h" ///////////////////////////////////////////////////////////...
#include <cassert> #include "OpenFlight/DotExporter.h" #include "OpenFlight/OpenFlightReader.h" #include <iostream> #include <fstream> #include <string> #include "OpenFlight/StreamUtilities.h" using namespace std; namespace { //--------------------------------------------------------------------- #define CH...
#pragma once typedef int LinkID; class User { public: User(LinkID linkID); virtual ~User(); LinkID& GetLinkID() { return mLinkID; }; public: int mUserID; int mUserType; private: LinkID mLinkID; bool mFlvSeqHeaderFlag; };
#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> using namespace std; #define INF (1<<20) #define...
#include "SFML/Graphics.hpp" #include <vector> #include "MacroValues.h" #include "TileMap.h" #include <boost/serialization/serialization.hpp> #include "Handler.h" #include "GameEngine.h" #include "Button.h" #include <functional> GameEngine* engine; void SetupButtons(GameEngine* engine); int mapTemp[32][40]; ...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> using namespace std; typedef long long ll; #define INF 10e10 #define rep(i,n) for(int i=0; i<n; i++) #define r...
#include "Game.h" #include <string> Game* Game::m_gamePtr{nullptr}; Game::Game() : m_window{ sf::VideoMode{ 1000, 800, 32 }, "Tag" }, m_exitGame{ false }, m_client(nullptr), m_server(nullptr) { Game::m_gamePtr = this; m_client = new Client("127.0.0.1", 1111);// , this); if (!m_client->Connect()) { // You'r...
/* \ | Name & Surname : Halil Emin Çalışkan | | School Number : 1306180055 | | Date : 22/12/2019 | | Development Environment : Visual Studio 2019 | \ */ // I import important library in this area. #include <iostream> #include <vector> #include <string> usi...
#include <bits/stdc++.h> using namespace std; class Solution { public: void moveZeroes(vector<int>& nums) { int n = nums.size(); if (n > 0) { int s = -1; int e = -1; for (int i = 0; i < n; ++i) { if (nums[i] == 0) { if (s == -1...
using namespace std; #include <iostream> #include <math.h> #include <plib.h> double factrl(int n) { static int ntop=4; static double a[33]={1.0,1.0,2.0,6.0,24.0}; int j; if (n < 0) cerr << "Negative factorial in routine FACTRL" << endl; if (n > 32) return exp(gammln(n+1.0)); ...
/* -*- 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. ** */ #ifndef VEGAD3D10FBO_H #define VEGAD3D10FBO_H #ifdef VEGA_BAC...
#include <iostream> #include "sales_data.h" // reads several transactions and counts how many transactions occur for each ISBN int main() { Sales_data bookIn, currentBook; int count=0; std::cin >> currentBook.bookId >> currentBook.unitsSold >> currentBook.revenue; count++; while (std::cin >> boo...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2002 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef XMLPARSER_XMLSTSUPPORT_H #define XMLPARSER_XMLSTSUPPORT_H #ifdef...
#include "opennwa/Nwa.hpp" #include "opennwa/NestedWord.hpp" #include "opennwa/construct/intersect.hpp" #include "opennwa/construct/complement.hpp" #include "opennwa/query/language.hpp" namespace opennwa { namespace query { bool languageContains(Nwa const & nwa, NestedWord const & word) { return ...
/* * Copyright (c) 2016, GNSS Sensor Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
// // main.cpp // MirrorChess // // Created by Sergio Colado on 20.04.20. // Copyright © 2020 Sergio Colado. All rights reserved. // #include "Game.hpp" int main() { Game game; game.init(); }
/************************************************************************/ /* X10 Rx/Tx library for the XM10/TW7223/TW523 interface, v1.4. */ /* */ /* This library is free software: you can redistribute it and/or modify */ /* it under the ...
#include "igContext.h" #include <iostream> static igIdent nullId = GEN_NULL_ID; void sysSetCliboardString(std::string str); std::string sysGetCliboardString(); using namespace igSizing; int gfxCharAt(int x, int y, const char* text, int style, int mouseX); igContext::igContext() { hotItem = nullId; activeItem = ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** 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. */ /** * @file GadgetSignatureVerifier.cpp * * Gadget signature v...
// 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 ...
// Created on: 2004-11-23 // Created by: Pavel TELKOV // Copyright (c) 2004-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as ...
/* -*- 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" #ifdef AUTO_UPDATE_SUPPORT #ifdef AUTOUPDA...
#include <ros/ros.h> #include <ros/package.h> #include <vector> #include <string> #include <cstdlib> #include <geometry_msgs/Pose.h> #include <moveit_msgs/RobotState.h> #include <moveit/move_group_interface/move_group.h> #include <moveit/planning_scene_interface/planning_scene_interface.h> #include <moveit/robot_sta...
/* Analog input, analog output, serial output Reads an analog input pin, maps the result to a range from 0 to 255 and uses the result to set the pulsewidth modulation (PWM) of an output pin. Also prints the results to the serial monitor. The circuit: * potentiometer connected to analog pin 0. Cente...
#pragma once namespace qp { class CMultipleChoiceQuestion; typedef std::shared_ptr<CMultipleChoiceQuestion> CMultipleChoiceQuestionPtr; typedef std::shared_ptr<const CMultipleChoiceQuestion> CConstMultipleChoiceQuestionPtr; }
#include "../idlib/precompiled.h" #pragma hdrstop #include "Game_local.h" // RAVEN BEGIN // bdube: client entities #include "client/ClientEffect.h" // shouchard: ban list support #define BANLIST_FILENAME "banlist.txt" // RAVEN END /* =============================================================================== C...
#include "Arduino.h" #define SWM_ACOMP_I2 1 void analogDetach(uint8_t pin) { SCT.detach(pin); } void analogWrite(uint8_t pin, uint8_t val) { SCT.attach(pin, val / 255.f); } #define ACOMP_VOLTAGE_LADDER_STEPS 32 #define ACOMP_VOLTAGE_LADDER_SETTLE_TIME 100 // Arduino takes about 100 usec to read an analog inpu...
/* -*- 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. */ #ifndef COCOA_OPERA_LISTENER_H #define COCOA_OPERA_LISTENER_H #i...
#include <iostream> using std::cerr; using std::endl; using std::to_string; #include "player.h" int main() { logger *l = new logger(); player *p = new player(1, l); bool sts = false; int rv = 0; int errors = 0; p->dump_resources(); rv = p->add_resource(wood); l->debug("returned " + ...
#include <iostream> #include <string> #include "src/Utility.h" #include "src/ResourceManager.h" #include "src/Input.h" #include "src/Time.h" #include "src/Scene.h" #include "App.h" int screenWidth = 1280; int screenHeight = 720; std::unique_ptr<App> app; void Draw() { app->Draw(); } void ...
#ifndef _esgui_canvas_intf_h_ #define _esgui_canvas_intf_h_ class ESE_ABSTRACT EsguiCanvasIntf { public: /// @brief Return true if context was initialized /// @return true, if context instance was initialized, false otherwise /// virtual bool isInitialized() const ESE_NOTHROW = 0; /// Lockable ...
#include <iberbar/RHI/D3D9/Device.h> #include <iberbar/RHI/D3D9/Buffer.h> #include <iberbar/RHI/D3D9/CommandContext.h> #include <iberbar/RHI/D3D9/Shader.h> #include <iberbar/RHI/D3D9/VertexDeclaration.h> #include <iberbar/RHI/D3D9/ShaderState.h> #include <iberbar/RHI/D3D9/ShaderVariables.h> #include <iberbar/RHI/D3D9/...
#include<bits/stdc++.h> #define rep(i,n) for (int i =0; i <(n); i++) using namespace std; using ll = long long; int check_digit(int a){ int ret = 0; while(a){ a /= 10; ret++; } return ret; } int main(){ int N; cin >> N; int ans = 0; for(int i = 1...
//Using KMP. Time-0.000s #include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<ll> #define ld long double char T[1005], P[1005]; // T = text, P = pattern int b[1005], n, m; // b = back table, n = length of T, m = length of P void kmpPreprocess() { // call this before calling kmpSearc...
#include <SDL2/SDL.h> #include <stdlib.h> #include <time.h> #include <array> #define DEBUG #define WIDTH 300 #define HEIGHT 352 #define TILE_SIZE 22 #define TETRIS_W 10 #define TETRIS_H 16 bool running; SDL_Renderer *renderer; SDL_Window *window; int frameCount, timerFPS, lastFrame, fps; bool left, right, up, do...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 SVG_CHILD_ITERATOR_H #define SVG_CHILD_ITERATOR_H #ifdef SVG_S...
/* * ADCMainTest.cpp * * Adaption of the SAG C example for ADABAS calls * - provides wrapper classes for Sessions, ACBX and/or ACB * * Created on: 08.04.2015 * Author: Fraxinus Ash * * Version 0.8.01 */ #include <iostream> #include <stdio.h> #if defined(_WIN32) || defined(_WIN64) #i...
//堆 #include<iostream> #include<map> #define Type int //定义对节点数据类型 #define MIN_HEAP //定义最大最小堆 #define EXTREME -1 //关于大小堆的极端值定义,在删除操作中要用到 using namespace std; class heap { private: struct HeapNode { Type d; //节点值 map<Type,int>::iterator pos; //指向map中以该节点值为关键字的那...
#include <iostream> //stive using namespace std; /* 1. Să se implementeze cu alocare dinamică o stivă de numere întregi, cu următoarele operatii: (a) void push (a, stiva) care adaugă elementul a în vârful stivei; (b) int pop (stiva) care scoate elementul din vârful stivei şi îl intoarce ca rezultat al funcţiei; (c) int...
#pragma once #pragma once #include "../../Graphics/Light/PointLight/PointLight.h" #include "../../UI/Dependencies/IncludeImGui.h" namespace ae { namespace priv { namespace ui { inline void PointLightToEditor( PointLight& _PointLight ) { float Radius = _...
//#include <string> #include <iostream> #include <fstream> #include <direct.h> #include <math.h> #include <sys/stat.h> #include <sys/types.h> #include <windows.h> #include <conio.h> #include <stdio.h> #include <dirent.h> #include <direct.h> #include "VirtualMachine.h" #include "createSolver.h" using n...
#pragma once #include "pch.h" #include <fbxsdk.h> #include <iostream> #include <string> #include "Animation\Channel.h" #include <fbxsdk.h> class FbxUtil { public: enum FbxType { kAnimation, kMesh }; static const Vector4 epsilon; static bool IsEqual( float lhs, float rhs ); static bool IsEqual( const XMFL...
/* -*- 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 OPGLRENDERER_H #define OPGLRENDERER_H #ifdef CANVAS3D_SU...
#include "StaffManage.h" //定义全局变量 StaffManage SM; StaffManage::StaffManage() { count = 0; } StaffManage::~StaffManage() { if (count == 0) { delete (head); delete (current); } else { while (head->next != nullptr) { BaseStaff *headPtr = head; head = head->ne...
// // Created by sergo on 12/27/19. // #include <iostream> #include <chrono> #include <vector> #include <omp.h> #include <random> #include "matrix.hpp" #include "task_4_lib.cpp" using namespace std; int main() { uint64_t size = 1000; Matrix<uint64_t> A(size); randomizeMatrix(A); Matrix<uint64_t> B(...
#include <iberbar/RHI/D3D11/VertexDeclaration.h> #include <iberbar/RHI/D3D11/Types.h> void iberbar::RHI::D3D11::CVertexDeclaration::BuildD3DInputElementDescritions( D3D11_INPUT_ELEMENT_DESC* pRefArray ) { const UVertexElement* pRHIElement = nullptr; memset( pRefArray, 0, sizeof( D3D11_INPUT_ELEMENT_DESC ) * 16 ); ...
#pragma once #include "aeGOAddOn.h" #include "aeTransform.h" #include "aeModel.h" namespace aeEngineSDK { class AE_ENGINE_EXPORT aeRendererAddOn : public aeGOAddOn { friend class aeGOFactory; public: aeRendererAddOn(); aeRendererAddOn(const aeRendererAddOn& AO); ~aeRendererAddOn(); public: AE_RESULT Ini...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 2007-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 POSIX_UA_COMPONENT_MANAGER_H # define POSIX_UA_COMPONENT_MANAGER_H __FILE__ #...
//-------------------------------------------------------------------- // CS215-401 LAB 1 //-------------------------------------------------------------------- // Author: Andrew Cassidy // Date: 9/5/2019 // Description: My first C++ program. It does arithmetic on two numbers. //-----------------...
#pragma once #include "Tool.h" #include <cmath> namespace CAE { class MoveView : public Tool { private: sf::View& viewToMove; bool keyPress; bool ImGuiDisabled; float zoom = 1; void assetUpdated() override {} public: MoveView(EMHolder& m, const sf::Texture& t, sf::RenderWindow& window, sf::View& v) : ...
#include "watchedFlow.h" #include "watchedObj.h" #include "redisClient.h" #include <algorithm> watchedFlow::watchedFlow(){} watchedFlow::~watchedFlow(){} void print(queue<string> Queue) { queue<string> q = Queue; int count = q.size(); for (int i = 0; i < count; i++) { cout << q.front() << " ;"; ...
// Lexer for Configuration Files. #include <string.h> #include <assert.h> #include <ctype.h> #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "CharacterSet.h" #include "LexerModule.h" using namespace Scinti...
#include <iostream> #include <vector> using namespace std; int main(int argc, const char *argv[]) { vector< int > iv; int i; while(cin >> i) { iv.push_back(i); } vector< int >::iterator iter = iv.begin(); while(iter != iv.end()) { cout << *iter++ << endl; } return 0; }
#include<iostream> #include<algorithm> #include<vector> #include<unordered_map> #include<unordered_set> using namespace std; class Node { public: int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Node*>(); } Node(int _val, v...
#pragma once #include "Tree.h" #include <windows.h> #include <d3d11.h> #include <d3dx11.h> #include <d3dcompiler.h> #include <xnamath.h> #include <D3DX10math.h> #include "resource.h" #include <dxerr.h> #include "Structures.h" #include "GameObject.h" #include "Camera.h" #include "OBJLoader.h" #include "Car.h" struct V...
/* -*- 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. * * @author Arjan van Leeuwen (arjanl) */ #ifndef NON_BROWSER_APPLICATION_H #define NON...
#pragma once namespace qp { class CMatchingQuestion; typedef std::shared_ptr<CMatchingQuestion> CMatchingQuestionPtr; typedef std::shared_ptr<const CMatchingQuestion> CConstMatchingQuestionPtr; }
#include <iostream> #include <vector> #include <algorithm> #include <string> int d(int n) { int sum = n; while (n) { sum += n % 10; n /= 10; } return sum; } int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0); std::vector<bool> ch...
#pragma once namespace Hourglass { enum RenderPassType { kRenderPass_Opaque, kRenderPass_OpaqueSkinned, kRenderPass_Transparent, kRenderPass_Effect, kRenderPassCount, }; }
#include <string> #include <vector> #include <map> using namespace std; int solution(vector<vector<string>> clothes) { int answer = 1; map<string, int> m; for(int i=0, len=clothes.size(); i<len; i++){ //의상종류(key)가 같은 것을 map에서 찾아 iterator 저장 map<string, int>::iterator it = m.find...
#ifndef __BASEGAMEENTITY_H_ #define __BASEGAMEENTITY_H_ class Event; class BaseGameEntity { public: BaseGameEntity(int id) { SetID(id); } virtual ~BaseGameEntity() {} private: int m_ID; void SetID(int); public: virtual void Update() = 0; int ID()const { return m_ID; } virtual bool HandleEvent(const Ev...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "Item.h" #include "Engine/StaticMeshActor.h" #include "Door.generated.h" /** * */ UENUM(BlueprintType) enum class EDoorDirection : uint8 { DD_North UMETA(DisplayName = "North"), //-Y DD_South UMETA(DisplayNam...
#include <string.h> #include "pipe_tally_subscriber.h" //---------------------------------------------- // Singleton Instance //---------------------------------------------- CPipeTallyStateSubscriber *CPipeTallyStateSubscriber::m_pInstance = nullptr; std::mutex CPipeTallyStateSubscriber::m_mutex; CPipeTallyStateSubs...
#include <boost/bind.hpp> #include <boost/asio/placeholders.hpp> #include "secure_socket.hpp" #include "logging.hpp" namespace asio = boost::asio; namespace sp { secure_socket::secure_socket(boost::asio::io_service& ios) : ctxt_(asio::ssl::context::sslv23) , ssl_strm_(ios, ctxt_) { // @TODO: decide tls stuff /...
// // Created by jean_j on 21.01.17. // #include <sstream> #include "Parser.hh" Parser::Parser(const std::string &filename, PhysicsEngine &physics) : physicsEngine(physics), file(rapidxml::file<>(filename.c_str())) { try { rapidxml::xml_document<> doc; doc.parse<0>(file.data()); root_node = doc.first_node("m...
#pragma once #include "Transform.h" class Camera : public Transform { private: Matrix matView; Matrix matProjection; Matrix matViewProjection; public: Camera(); ~Camera(); void UpdateMatrix(); // Device에 view랑 matrix 세팅, 카메라 메인화면에 띄우겠다. void UpdateCamToDevice(); Matrix GetViewMatrix() { return matView; } ...
#include "stdafx.h" #include "Texture.h" Texture::Texture(string name) { regex texName(name + "_(.+)\\.tga"); OutputDebugStringA(("\n\n" + name + "\n\n").c_str()); for (auto& p : std::experimental::filesystem::directory_iterator("./Texture")) { string s = p.path().filename().generic_string(); smatch strMatch;...
/** @see "data.hh" for detailed documentation of each function. * (I wish I knew which file to put function documentation in. * Hate repeating myself. Maybe I should have defined all my * functions in the header to avoid this confusion.) * @author Daniel "3ICE" Berezvai * @student_id 262849 * @email daniel....