text
stringlengths
8
6.88M
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <cstddef> #include <cstdint> namespace quic { using PacketNum = uint64_t; /** * Returns a decoded pack...
/*! * @author Nicholas Kidd */ #include "wali/wpds/LinkedTrans.hpp" #include "wali/wpds/Config.hpp" namespace wali { namespace wpds { LinkedTrans::LinkedTrans( wali_key_t from, wali_key_t stack, wali_key_t to, const sem_elem_t & se, Config *config_ ) : Trans(from,sta...
template <typename T,int n> struct Mat{ T a[n][n]; Mat(){memset(a,0,sizeof(a));} void unit(){ for(int i=0;i<n;i++)a[i][i]=1; } Mat& operator*=(const Mat<T,n>&b){ Mat<T,n> t; for(int i=0;i<n;i++) for(int k=0;k<n;k++) if(a[i][k])for(int j=0;j<n;j++)...
/* Crayfish - A collection of tools for TUFLOW and other hydraulic modelling packages Copyright (C) 2016 Lutra Consulting info at lutraconsulting dot co dot uk Lutra Consulting 23 Chestnut Close Burgess Hill West Sussex RH15 8HN This program is free software; you can redistribute it and/or modify it under the terms o...
/* -*- 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 DOM_SVGELEM_H #define DOM_SVGELEM_H #ifdef SVG_DOM #...
// Outreachy: ceph - radosgw-admin application // Boost::program_options demo #include <boost/program_options.hpp> #include <iostream> #include "commands.h" namespace po = boost::program_options; int main( int argc, char** argv ) { po::options_description desc("options"); int user_id; std::string email; std...
// Created on: 1992-02-20 // Created by: Remy GILET // 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 Les...
#include<iostream> #include<string> #include<fstream> using namespace std; string readFile( void ); int lenMessage; int * matchCharToIndex(string s,string alphabet); string matchIndexToChar(int *encryptMessage, string alphabet); int * memoryAllocation( int len ); string cleanString( string alphabet ); void writeF( st...
#include "VertexBuffer.h" #include "Debug.h" #include <iostream> VertexBuffer::VertexBuffer(const void* data, unsigned int size){ GLCall(glGenBuffers(1, &m_RendererID)); GLCall(glBindBuffer(GL_ARRAY_BUFFER, m_RendererID)); GLCall(glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW)); } VertexBuffer::Verte...
#include <iostream> #include <cstdio> #include <cstring> #include <math.h> #define pi acos(-1.0) using namespace std; const int maxn = 10000 + 5; int main() { int t,n,f; cin >> t; while(t --) { cin >> n >> f; f ++; int r; double a[maxn]; double mid; double max = 0, s = 0; for(int i ...
//https://projecteuler.net/problem=3 //https://www.tutorialspoint.com/c-program-for-find-the-largest-prime-factor-of-a-number #include <iostream> using namespace std; int largestPrimeFactor(long int n) { long int div=3, ans = 0, maxFact; while(n!=0) { if(n % div !=0) div = div + 2; else { ...
#pragma once #include "..\Common\Pch.h" #include "..\Graphic\Direct3D.h" #pragma region D3D11_INPUT_ELEMENT_DESC 커스터마이징 구조체 정의 namespace inputlayout { typedef struct INPUT_LAYOUT_TYPE_0 { D3DXVECTOR3 Pos; static const D3D11_INPUT_ELEMENT_DESC sElementDesc[]; static const UINT sElementCount; } IL_Pos; type...
#include <bits/stdc++.h> using namespace std; struct elephant{ int weight; int IQ; int ID; }Eloa[1005]; bool compare(elephant e1,elephant e2) { return e1.weight < e2.weight ; } int lis[1005]; vector<int>sol_set; int LIS_N_2(int n) { for(int a=0;a<n;a++) { lis[a] = 1; } int mx = 0; for(int ...
#include "GlobalStats.h" int GlobalStats::wallWidth = 1; int GlobalStats::gridStep = 1; int GlobalStats::connRadius = 4; int GlobalStats::oldPanelIndex = 1; int GlobalStats::propertyPanelIndex = 3; bool GlobalStats::isShowingConnections = false; UtilitiesGrid* GlobalStats::propertyPanelHolder=nullptr; QGraphicsScene* ...
#include <iostream> #include <vector> #include <utility> #include <cmath> #include <algorithm> #include <iomanip> #define MAX 1001 using namespace std; int n, m; double minCost = 0; pair<int, int> planet[MAX]; class Tunnel{ public: int i, j; double weight; Tunnel(int i, int j, double w) :i(i), j(j), we...
#include<iostream> using namespace std; int main() { int test, m, n, i; cin>>test; for(i=0; i<test; i++) { cin>>m>>n; if(m>n) cout<<"1\n"; else { if(n%m==0) cout<<(n/m)*4-1<<endl; else cout<<(n/m+1)*4-1<<endl; ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #define MAX_ARGUMENTS 256 #ifndef NULL #define NULL 0 #endif #define FREE(X) if(X) free((void*)X) //static int variable for exit status of proccess static int status = 0; //a struct for commands typedef struct cmdLine { char * const argu...
// Created by: Julia GERASIMOVA // Copyright (c) 2015 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free So...
#include <iostream> #include <chrono> #include <vector> #include "opencv2/opencv.hpp" #include "package_bgs/lb/LBMixtureOfGaussians.h" using namespace std; using namespace cv; using namespace std::chrono; typedef high_resolution_clock clk; int main(int argc, char **argv) { VideoCapture cap("../peds/video.avi"); if...
//http://bailian.openjudge.cn/practice/2002/ #include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; struct Point { int x; int y; Point(int tempX, int tempY) :x(tempX), y(tempY) { } }; bool operator < (Point q, Point w) { if (q.x != w.x) return q.x > w.x; else return q.y >...
/***************************************************************************** * * * OpenNI 2.x Alpha * * Copyright (C) 2012 PrimeSense Ltd. * * ...
#include<iostream> using namespace std; const int MAX=10; class queue { private: int arr[MAX]; int front, rear; public: queue(); void add(int item); int del(); }; queue::queue() { front=rear=-1; } void queue::add(int item) { if(rear==MAX-1) { cout<<"\nQueue is full"; ...
#include "uishader.h" UiShader::UiShader(const std::string &vertexFile, const std::string &fragmentFile) : AbstractShader(vertexFile, fragmentFile) { getUniforms(); } void UiShader::loadProjectionMatrix(const Matrix4 &matrix) { loadMatrix(_locationProjectionMatrix, matrix); } void UiShader::getUniforms()...
#include "machine.h" Machine::Machine( std::string name, Vector dim ){ this->name = name; this->dimensions = dim; } void Machine::set_tool_position( const Vector &pos ){ this->position = pos; } Vector Machine::get_tool_position( ){ return this->position; } Vector Machine::get_dimensions(){ } std::string& Ma...
#include<bits/stdc++.h> using namespace std; class Student{ public: int rno; private: int age; public: int getAgeRno(){ return age; } void setAgeRno(int a,int b){ age = a; rno = b; } void display(){ cout << age << " " << rno << endl; } }; int main(){ Student s1; Student* s2 = new Stud...
//Gameboard.h #include"Grid.h" template <typename T> class Gameboard : public Grid<T> { public: Gameboard(int inWidth=Grid<T>::kDefaultWidth,int inHeight=Grid<T>::kDefaultHeight); void move(int xSrc,int ySrc,int xDest,int yDest); } ; template <typename T> Gameboard<T>::Gameboard(int inWidth,int ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- * * Copyright (C) 1995-2010 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Anders Karlsson (pugo) */ ...
// Created on: 1995-03-06 // Created by: Laurent PAINNOT // 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 terms of the GN...
/* -*- 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. */ #ifndef SVG_FILTER_TRAVERSAL_OBJECT_H #define SVG_FILTER_TRAVERSAL_OBJE...
#pragma once #include <iostream> #include <string> #include <fstream> class CodeWriter { public: CodeWriter(); void setFileName(std::string fileName); std::string outputFileName; std::string fileName; std::string functionName; std::ofstream outputFile; int labelNum; int start; void writeInit()...
#include<cstdio> using namespace std; int n,m; int a[1000010]; int b[1000010]; int c[1000010]; int lowbit(int x) { return x&(-x); } void add(int x,int y,int n) { for(int i=x;i<=n;i+=lowbit(i)) c[i]+=y; } int find(int x) { int sum=0; for(int i=x;i>0;i-=lowbit(i)) sum+=c[i]; return sum; } ...
//============================================================================ // Name : String.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include<io...
// Created on: 2015-08-10 // Created by: Irina KRYLOVA // Copyright (c) 2015 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as publ...
#include "shaderprogram.h" #include <fstream> #include <sstream> #include <iostream> using std::cerr; using std::endl; namespace PLUGraphicsLib { ShaderProgram::ShaderProgram() : programID(0), linked(false) { } ShaderProgram::~ShaderProgram() { if(programID == 0) return; // Query the number of attached shaders ...
#ifndef _GAME_SCENE_ #define _GAME_SCENE_ #include "cocos2d.h" #include "extensions/cocos-ext.h" #include "cocostudio/CocoStudio.h" #include "ui/CocosGUI.h" #include "AppGlobal.h" #include "Ball.h" #include "Player.h" #include "FootBallCommon.h" #include "HomePlayer.h" #include "CustomPlayer.h" #include "PlayGround...
// Created on: 1991-09-05 // Created by: NW,JPB,CAL // Copyright (c) 1991-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Les...
//算法:模拟 //按照题目要求模拟即可 //详见注释 #include<cstdio> #include<map> using namespace std; int n,m; int a[100010]; map <int,int> s;//map存获得的奖数 int main() { scanf("%d%d",&n,&m); for(int i=1;i<=n;i++)//输入获得第一种奖的人 { scanf("%d",&a[i]); s[a[i]]++;//累加 } for(int j=1;j<=m;j++)// 输入获得第二种奖的人 { ...
#ifndef VORTICITY_H #define VORTICITY_H #include <algorithm> #include "interpolation.h" #include "lsm.h" #include "defs.h" #include "geometry.h" struct line_index { int begin; int end; line_index() : begin(0), end(0) {} line_index(int a, int b) : begin(a), end(b) {} }; struct vorticity_result { scut cut; in...
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2012-2013. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #include <boost/foreach.hpp> // fwComEd #include <fwComEd/Dictionary.hpp>...
#pragma once #include"Behaviour.h" #include"Agent.h" class EvadeBehaviour : public Behaviour { public: EvadeBehaviour(); virtual ~EvadeBehaviour(); virtual vector2 Update(Agent* agent, float deltaTime); virtual float GetWeight() { return weight; }; void SetTarget(Agent* agent) { m_target = agent; } private: Agen...
/** * A Lpf2Hub basic example to connect a hub, set the led color and the name of the hub * * (c) Copyright 2019 - Cornelius Munz * Released under MIT License * */ #include "Lpf2Hub.h" #define GREEN_LED_PIN 13 #define RED_LED_PIN 12 // create a hub instance Lpf2Hub myHub; bool isLedOn=false; void buttonNot...
// Wire Slave Receiver // by Nicholas Zambetti <http://www.zambetti.com> // Demonstrates use of the Wire library // Receives data as an I2C/TWI slave device // Refer to the "Wire Master Writer" example for use with this // Created 29 March 2006 // This example code is in the public domain. #include <Wire.h> int lastC...
/** * Copyright (c) 2015, 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...
/*************************************************************************** * Copyright (c) 2021, Thorsten Beier * * * Copyright (c) 2021, QuantStack * * ...
// // Persona.cpp // Tarea5Ejercicio4 // // Created by Daniel on 13/11/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #include "Persona.h" Persona::Persona(){ nombre =apellidoM = apellidoP = sexo = "vacio"; edad = fechaFallecido = 0; muerto = true; } Persona::Persona(int i){ std::cout<...
#pragma once #include "proto/processor.hpp" #include "proto/ss_base.pb.h" #include "net/client.hpp" #include "net/conn.hpp" namespace ps = proto::ss; namespace nora { template <typename T, typename U = net::CONN> class server_process : public proto::processor<server_process<T, U>, ps::base>, ...
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. #include "FPSpaceInvaders.h" #include "FPSpaceInvadersGameMode.h" #include "FPSpaceInvadersHUD.h" AFPSpaceInvadersGameMode::AFPSpaceInvadersGameMode(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) { // set default pawn class to our Blu...
// // Bench_CIFAR100.hpp // GA // // Created by Tom den Ottelander on 29/01/2020. // Copyright © 2020 Tom den Ottelander. All rights reserved. // #ifndef Bench_CIFAR100_hpp #define Bench_CIFAR100_hpp #include <stdio.h> #include "Bench_CIFAR_base.hpp" #include <algorithm> class Bench_CIFAR100 : public Bench_CIFAR...
/* * 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: Config.cpp * Author: frankiezafe * * Created on June 12, 2016, 11:18 PM */ #include "Config.h" static Config * _...
#include <ros/ros.h> #include <laser_assembler/AssembleScans2.h> #include <pcl/PCLPointCloud2.h> #include <pcl/common/common.h> #include <pcl/common/io.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl_conversions/pcl_conversions.h> #include <pcl_ros/point_cloud.h> #include <sensor_msgs/Point...
#include "opencv2/opencv.hpp" #include <iostream> #include <fstream> using namespace std; using namespace cv; int main(int argc, char** argv){ VideoCapture cap("video0.avi"); if(!cap.isOpened()){ cout << "Cannot open the camera!" << endl; return -1; } Mat frame; while(true){ cap >> frame; if(frame.rows ...
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> #include <ss...
/** * @author Felix Stegmaier */ #ifndef DEBUG_H #define DEBUG_H #define ENABLE_DEBUG #ifdef ENABLE_DEBUG #include <iostream> #define DEBUG(x) std::cerr << "DEBUG: " << x << std::endl; #else #define DEBUG(x) #endif #endif
#define F_CPU 3200000 #include <stdio.h> #include <avr/io.h> #include <avr/interrupt.h> #include <util/delay.h> #include "USART_Debug.h" #include "USART.h" #include "TWI.h" #define HT16K33_BLINK_CMD 0x80 #define HT16K33_BLINK_DISPLAYON 0x01 #define HT16K33_BLINK_OFF 0 #define HT16K33_BLINK_2HZ 1 #define HT16K33_BL...
// Created on: 1993-05-27 // Created by: Yves FRICAUD // 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 L...
// // Created by 钟奇龙 on 2019-04-15. // #include <iostream> using namespace std; class Node{ public: int data; Node *next; Node(int x):data(x),next(NULL){ } }; Node* reverseList(Node *head){ Node *pre = NULL; while(head){ Node *next = head->next; head->next = pre; pre =...
// // Created by griha on 10.12.17. // #pragma once #ifndef MIKRONSST_HSM_IO_MANIP_HPP #define MIKRONSST_HSM_IO_MANIP_HPP #include <iostream> #include <iomanip> #include <windows.h> #include <crypto/cipher.hpp> namespace griha { namespace hsm { struct _GLE { DWORD last_error; }; inline _GL...
// 톱니바퀴 #include <iostream> #include <vector> #include <queue> using namespace std; struct location { int x, y; }; queue<location> q; int r_wheel[10][100] = { 0 }; int wheel[10][10]; location list[110]; int check[4] = { 1,1,1,1 }; int K; void rotate(int n); void BFS(int n); int main() { char temp[5][10]; for...
#ifndef GNGAMESTATE_H #define GNGAMESTATE_H #define DEFAULT_SCALE 0.7f class GnGameState { private: static GnGameState mSingleton; float mGameScale; float mGameWidth; float mGameHeight; public: static GnGameState* GetSingleton(); inline float GetGameScale() { return mGameScale; } in...
/* * Author: Elijah De Vera * Created on January 23,2021 * Purpose: average */ //System Libraries #include <iostream> #include <math.h> #include <iomanip> using namespace std; //User Libraries //Global Constants - Math/Physics Constants, Conversions, // 2-D Array Dimensions /...
#include<iostream> #include<sstream> #include<algorithm> #include<vector> #include<string> using namespace std; class Solution { public: int compareVersion(string version1, string version2) { //基本思想:用istrigstream做 istringstream nums1(version1); istringstream nums2(version2); char c; int v1, v2; //while里面判断...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- // // Copyright (C) 2003-2007 Opera Software AS. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. // // Julien Picalausa // #include "core/pch.h" #include "platforms...
#include <memory> #include <vector> #include "gmock/gmock.h" #include "bsgs.h" #include "perm.h" #include "perm_group.h" #include "perm_set.h" #include "schreier_structure.h" #include "test_main.cc" using cgtl::BSGS; using cgtl::Perm; using cgtl::PermGroup; using cgtl::PermSet; TEST(DISABLED_BSGSSolveTest, CanSolv...
#ifndef TABWIDGETS #define TABWIDGETS #include <QTabWidget> class RequestWidget; class ActionsTestWidget; class YoumeTabWidget : public QTabWidget { Q_OBJECT public: explicit YoumeTabWidget(QWidget *parent= 0); private: RequestWidget *m_requestWidget; ActionsTestWidget *m_actionsWidget...
#include <bits/stdc++.h> using namespace std; int goodNum() { int n, temp; cout<<"Enter the number : "; cin>>n; temp=n; n--; queue<string> q; q.push("1"); q.push("2"); while(n--){ string str = q.front(); q.pop(); q.push(str+"1"); q.push(str+"2"); ...
/* Name: Graham Atlee Course: csc1720 Date: 10/24/19 Location of program: ~/csc1720/Labs/lab9 This file contains prototypes methods for the unorderedArrayListType. This class derives from arrayListType. */ #ifndef H_unorderedArrayListType #define H_unorderedArrayListType #include "arrayListTy...
#ifndef BARTENDING_MOVEIT_SERVICE #define BARTENDING_MOVEIT_SERVICE #include <ros/ros.h> #include <moveit/move_group_interface/move_group_interface.h> #include <moveit/planning_scene_interface/planning_scene_interface.h> #include <moveit/robot_state/robot_state.h> #include <moveit/planning_interface/planning_interfac...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // // Copyright (C) 2005-2011 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 WEBFEEDS_BACKEND_SUPPORT #include ...
#ifndef _DIAGRAMS_C_H #define _DIAGRAMS_C_H #include "diagrams_a.hpp" #include <memory> class D; class C : public A { public: std::unique_ptr<D> m_d; }; #endif
// File: table.h // Written by Joshua Green #ifndef TABLE_H #define TABLE_H //-----------------------------------------------------// // Define DB_PROMPT to prompt user at runtime before // // optimizing table file. // // // ...
/* Petar 'PetarV' Velickovic Algorithm: Knuth-Morris-Pratt */ #include <stdio.h> #include <math.h> #include <string.h> #include <iostream> #include <vector> #include <list> #include <string> #include <algorithm> #include <queue> #include <stack> #include <set> #include <map> #include <complex> #define MAX_N 1000001 ...
/* warriors.cpp Purpose: Main executable for whatever this Warriors thing is. Controls setup /teardown of game as well as game loop. @author Jeremy Elkayam */ #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <iostream> #include <memory> #include "human_view.hpp" #include "logic.hpp" #include ...
#pragma once #include "GameNode.h" class MainGame23 : public GameNode { private: bool isDebug; char str[128]; public: MainGame23(); ~MainGame23(); HRESULT Init() override; void Release() override; void Update() override; void Render() override; };
// Spiral Oder Matrix Traversal /* @ row_start + 1 @ column_end -1 @ row_end - 1 @ column_start + 1 # row_start <= row_end # column_start <= colunm_end */ #include<iostream> using namespace std; int main(){ int n,m; cout<<"Please enter numbers of rows: "; cin>>n; cout<<"Please enter number of co...
// Created on: 1993-01-13 // Created by: CKY / Contract Toubro-Larsen ( Deepak PRABHU ) // 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 ...
/* -*- Mode: c++; tab-width: 4; 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. * * @author Patricia Aas (psmaas) */ #include "core/pch.h" #include "platforms/viewix/...
// // main.cpp // EX05_05 // // Created by Eben Schumann on 11/1/16. // Copyright © 2016 Eben Schumann. All rights reserved. // #include <iostream> #include <string> #include <vector> #include "Account.hpp" #include "Transaction.hpp" using namespace std; int main() { Account A1; Transaction T1; vector...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2007 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ // -------------------------------------------------------------...
#include <math.h> #include "matrix_utils.h" #include "dct.h" int main() { //srand(10); //byte* bm = generate_byte_matrix(16,16); //double* dm = generate_double_matrix(16,16); //print_matrix_generic(16,16,1,6,8,bm,print_byte); //print_matrix_generic(16,16,sizeof(double),10,4,(byte*)dm,print_double);...
#include "qtestutility.h" namespace qEngine { qTestUtility::qTestUtility(void) { } qTestUtility::qTestUtility(boost::shared_ptr< qConsole > spConsole) : m_spConsole(spConsole) { ZeroMemory(&lf, sizeof(LOGFONT)); strcpy(lf.lfFaceName, "Times New Roman"); lf.lfHeight = -12; if(FAILED(D3DXCreateFontIndirect...
class GameEventManager //Never disposed { public: enum EventEnum { None = 0, OnHit = 1, }; GameEventManager(); void OnHitByPlayer(); }; void CreateGameEventHook();
/* * GameServer.cpp * * Created on: Jun 24, 2017 * Author: root */ #include <iostream> #include "ServiceMain.h" #include "util.h" using namespace std; using namespace CommBaseOut; int main() { #ifndef TEST CUtil::InitDaemon(); #endif #ifdef USE_MEMORY_LEAKS MemoryLeaks::GetInstance()->Init(120); #endif ...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "11494" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) int main(int argc, char const *argv[]) { #ifdef DBG freopen("uva" PROBLEM TESTC ".in", "r", stdin); freopen("uva" PROBLEM ".out", "w", stdout); #endif int x,y,x2,...
/** * created: 2013-4-7 22:05 * filename: FKIocp * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #pragma once //------------------------------------------------------------------------ #include "FKAsynSocket.h" #include "../STLTem...
#include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> #include <fstream> #include <iomanip> #include <stdlib.h> #include <string> #include <stdio.h> #define alpha_max 100 using namespace cv; using namespace std; string filename1("archie.jpg");...
#include "character.h" Character::Character(int str, int dex, int inte) { _str = str; _dex = dex; _int = inte; } Character::Character() { } Character::~Character() {} int Character::getStrength() { return _str; } int Character::getDexterity() { return _dex; } int Character::getIntelligence() { return _int; } ...
// Copyright (c) 1991-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published ...
/* * Copyright (c) 2015-2020 Morwenn * SPDX-License-Identifier: MIT */ #include <functional> #include <iterator> #include <vector> #include <catch2/catch.hpp> #include <cpp-sort/adapters/hybrid_adapter.h> #include <cpp-sort/sorter_facade.h> namespace { enum struct sorter_type { ascending, de...
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen ( Kiran ) // 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...
// Alfred Shaker // counting_observer.cpp // cs33901 #include "counting_observer.h" #include <iostream> #include <string> #include <vector> using std::cin; using std::cout; using std::string; using std::vector; void CountingObserver::update(Observable*) { // keep track of the upper case letters ...
#ifndef __SNAPSHOT_H__ #define __SNAPSHOT_H__ #include <string> #include "com_bql_MSG_Native.h" #include "SwsScale.h" //////////////////////////////////////////////////////////////////////////////// class CSnapshot : public CWriter { public: CSnapshot(JNIStreamerContext *pParams, CSwsScale *pScales, const char *file...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-1999 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch.h" #include "modules/dom/src/domcore/domst...
#pragma once #include "object\Player.h" class Result { Player *player; bool scoreAdded; int clearBonus; int point; int graze; int player; int bomb; double rank; int total; public: Result() = delete; Result(Player *player); void Update(); void Draw() const; };
#include "ports.h" #include <ctime> int get_valid_port() { std::srand(std::time(0)); return std::rand() % RANGE_PORT + MIN_PORT; }
#include "PacketInfo.hpp" PacketInfo::PacketInfo(char* sourceIp, char* destinationIp){ this->sourceIp = new IpAddr(sourceIp); // TODO: exchange with smart pointers this->destinationIp = new IpAddr(destinationIp); } PacketInfo::PacketInfo(std::string& sourceIp, std::string& destinationIp){ // this->sourceIp = /...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <map> #include <vector> #include <algorithm> #include <math.h> #define pb push_back using namespace std; int a, b; int main() { freopen("labiec1c.inp", "r", stdin); scanf("%d %d", &a, &b); for (int ...
// Created on: 1998-06-03 // Created by: data exchange team // Copyright (c) 1998-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...
#include <QDebug> #include "MasterPlaylist.h" namespace hls { MasterPlaylist::MasterPlaylist() { } MasterPlaylist::~MasterPlaylist() { } QList<StreamInf> MasterPlaylist::variantStreams() { return mVariantStreams; } QList<Media> MasterPlaylist::medias() const { return mMedias; } void MasterPlaylist::setVari...
#include "msg_0x1e_entity_stc.h" namespace MC { namespace Protocol { namespace Msg { Entity::Entity() { _pf_packetId = static_cast<int8_t>(0x1E); _pf_initialized = false; } Entity::Entity(int32_t _entityId) : _pf_entityId(_entityId) { _pf_packetId = static_cast<int8_t>(0x1E); _pf_initialized = true; } size_t ...