text
stringlengths
8
6.88M
// Fill out your copyright notice in the Description page of Project Settings. #include "CSGameMode.h" #include "CSGameState.h" #include "CSCharacter.h" #include "CSPlayerState.h" #include "CSGameInstance.h" #include "Kismet/GameplayStatics.h" #include "GameFramework/PlayerState.h" #include "GameFramework/GameSessio...
/**************************************************************************** ** Copyright (c) 2006 - 2011, the LibQxt project. ** See the Qxt AUTHORS file for a list of authors and copyright holders. ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modificatio...
#pragma once #include "resource.h" class GGridCtrl : public CGridCtrl { DECLARE_MESSAGE_MAP() public: static CGridCtrl* CreateCtrl() { return new GGridCtrl; } public: virtual BOOL Create(const RECT& rect, CWnd* parent, UINT nID, DWORD dwStyle = WS_CHILD | WS_BORDER | WS_TABSTOP | WS_VISIBLE); virtual void I...
#ifndef __VIEW_VIEWOBJPROPLIST_H #define __VIEW_VIEWOBJPROPLIST_H //----------------------------------------------------------------------------- #include "_pch.h" #include "IViewObjPropList.h" namespace wh{ //----------------------------------------------------------------------------- class ViewObjPropList : public ...
#include <fstream> #include "gp64x64_2_opt.h" int main() { ofstream in_pix("input_pixels_regression_result_gp64x64_2_opt.txt"); ofstream fout("regression_result_gp64x64_2_opt.txt"); HWStream<hw_uint<32> > in_update_0_read; HWStream<hw_uint<16> > gp64x64_2_update_0_write; // Loading input data // cmap ...
/* * TLinesGame.h * * Created on: Apr 12, 2017 * Author: Alex */ #ifndef TLINESGAME_H_ #define TLINESGAME_H_ #include <vector> #include "TBoard.h" //#include <array> #include "TPreferenceInt.h" struct TPoint { int x; int y; int color; TPoint(int p_x, int p_y, int p_color) :x(p_x), y(p_y)...
#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; scanf("%d",&t); for (int ca = 1;ca <= t; ca++) { ...
/*************************************************************************************************** GameObjectManager.h Simple manager of game objects by David Ramos ***************************************************************************************************/ #pragma once struct IGameObject; struct IGameObj...
#ifndef ACCOUNTLOGINWIDGET_HPP #define ACCOUNTLOGINWIDGET_HPP #include <QWidget> #include <QPushButton> #include <QLabel> #include <QLineEdit> #include <QHBoxLayout> #include <QGridLayout> #include <QFormLayout> #include <QVBoxLayout> #include <QStackedLayout> class AccountLoginWidget : public QWidget ...
/*Напишите функции min, max, avg, med, процедуру swap принимающие в себя три вещественных аргумента и программу с примером из использования. min - находит минимальное из трех значений, max - максимальное, avg - среднее арифметическое, med - медианное (гуглим, что это такое). swap - переставляет значения по кругу ( ...
#include "sideload.h" #include "client.h" Client::Client(SOCKET *ClientArg, SOCKET *ListenArg) { this->ClientSocket = ClientArg; this->ListenSocket = ListenArg; printf("Socket within Client Constructer: %d\n", ClientSocket); printf("Socket supplied to Client Constructer: %d\n", ClientArg); } Client::~Client() {...
#pragma once #define _WINSOCK_DEPRECATED_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #include <WinSock2.h> #include <iostream> #include <fstream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <iomanip> #include <conio.h> #include <stack> #include <direct.h> #include <stdlib.h> #...
#pragma once #include <string> #include <vector> class Token { public: enum class Kind { Undefined, Eof, Identifier, Number, Assign, Plus, Minus, Mul, Div, Mod, LP, RP, LC, RC, Semicolon, ...
// Created on: 2002-04-23 // Created by: Alexander KARTOMIN (akm) // 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 ver...
#if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #include <Wire.h> #include "MCP4651.h" static void i2cWrite(uint8_t x) { #if ARDUINO >= 100 Wire.write(x); #else Wire.send(x); #endif } MCP4651::MCP4651(uint8_t addr) { address = addr; } void MCP4651::begin...
/// ============================================================================ /// Author : M. Ivanchenko /// Date create : 05-10-2014 /// Date update : 05-10-2014 /// Comment : /// ============================================================================ #include <QDebug> #include <QMessageBox> #include <QS...
// -*- c++ -*- /****************************************************************************** ** arenaallocimpl.h ** ** Internal implementation types of the arena allocator ** MIT license *****************************************************************************/ #ifndef _ARENA_ALLOC_IMPL_H #define _ARENA_...
#include "stdafx.h" #if (!defined __SQLWUI_UIEXTPAGENAVIGATORWND_H) #include "CUIExtPageNavigatorWnd.h" #endif #include "TeamDeveloperConstants.h" CUIExtPageNavigatorWnd::CUIExtPageNavigatorWnd(HWND messageWindow, UINT message, UINT controlID) : CExtPageNavigatorWnd(), m_hWndMessage(messageWindow), m_uiMessag...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 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 APPLICATION_CACHE_MANAGER_H_ #define APPLICATION_CACHE_MANA...
// list.cc - this code is for debugging and demo only; not needed normally #include <stdlib.h> #include "list.hh" #ifdef LIST_MAIN // compile with -DLIST_MAIN for debugging and demo // to use the List_item and List parameterized types, do something like this: // (this shows two different ways to print list) #inclu...
/* Copyright 2021 University of Manchester 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 agreed to in writing, s...
// Fill out your copyright notice in the Description page of Project Settings. #include "NewPointsGetter.h" NewPointsGetter::NewPointsGetter() { } NewPointsGetter::~NewPointsGetter() { }
#pragma once #include <cassert> #include <memory> #include <vector> #include "EverydayTools/Exception/CallAndRethrow.h" #include "FwdDecl.h" #include "Resource/Font/FreeType/FwdDecl.h" namespace keng::graphics::free_type { class Library : public core::RefCountImpl<core::IRefCountObject> { public: ...
#ifndef ATTACH_H #include "Attach.h" #endif std::string useful_funcs::TheTime() { // Implementation of a function returning the current time as a string // This is just a neater way of ensuring that the time can be correctly and easily accessed // without being hassled about whether or not you've remembered to use ...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * Espen Sand */ #include "core/pch.h" #include "platforms/quix/printing/PrinterPars...
#include<iostream> #include<cstdio> #include<cstring> #include<vector> using namespace std; struct word{ int sum; int next[26]; }; vector<word> trie; string st; int area() { word one; one.sum = 0; memset(one.next,0,sizeof(one.next)); trie.push_back(one); return trie.size()-1; } void build(int ...
#include "../inc/SEOpenGLLight.h" // inicialização de mapa estático de índices utilizados SEOpenGLLight::tGlobalIx SEOpenGLLight::globalIx = SEOpenGLLight::initGlobalIx();
#include "Lamp.h" #include "Math.h" #include "SweepPath.h" #include "Sweep.h" namespace T3D { Lamp::Lamp(T3DApplication *app) :GameObject(app) { setMesh(new Cylinder(.1, .01, 16)); getTransform()->name = "Lamp"; //small cylinder that is the arm attachment point. base = new GameObject(app); // note the use of...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <queue> #include <set> using namespace std; long long fact(int n){ if(n==1||n==0){ return 1; } return n*fact(n-1); } int findRightSmall(string S, int i){ int res = 0; for(int j ...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "118" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) class Robot{ private: vector <int> Danger_X; vector <int> Danger_Y; vector <char> Danger_Face; int start_X,start_Y; int X,Y; char face; public: void Set(int x,int ...
/* * NIST Data Probe Class Library * clprobe-ui/stepentdescriptor.cc * April 1997 * David Sauder * Development of this software was funded by the United States Government, * and is not subject to copyright. */ /* $Id: stepentdescriptor.cc,v 3.0.1.4 1997/11/05 23:01:12 sauderd DP3.1 $ */ #include <stdlib.h> #include...
/* -*- 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. */ #include "core/pch.h" #ifdef MDEFONT_MODULE #ifdef MDF_FREETYPE_...
// // server.hpp // ~~~~~~~~~~ /* * 2013+ Copyright (c) Ruslan Nigatullin <euroelessar@yandex.ru> * All rights reserved. * * 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 version 2 ...
#include"pch.h" #include "phrasetable.h" void Data_output(phrasetable phtb) { int n_count = n; phrase *p; cout<<"characters: "<<count_char<<endl; cout<<"words: "<<count_words<<endl; cout<<"lines: "<<count_lines<<endl; while(n_count>0 && !phtb.empty()) { p = phtb.max_count(); cout<<"<"<< p->content<<">: "<< p...
/* Tree node structure used in the program struct Node { int data; Node* left; Node* right; }; */ /* Computes the number of nodes in a tree. */ int getSize(Node* node) { // only gravity will pull me down // Size of Binary Tree if(!node) return 0; return 1 + getSize(node-...
#pragma once #include "fooking.h" #include "EventLoop.h" #include "Socket.h" NS_BEGIN class Server: public Object { public: Server(EventLoop *loop, int fd = INVALID_SOCKET); ~Server(); public: int createTcpServer(int port); int createUnixServer(const char *path); void start(); void stop(); void ...
/* * @lc app=leetcode.cn id=3 lang=cpp * * [3] 无重复字符的最长子串 */ // @lc code=start #include<iostream> #include<string> #include<algorithm> #include<map> using namespace std; class Solution { public: int lengthOfLongestSubstring(string s) { int left =0, right = 0; map<char, int> window; int...
namespace valknut{ //--------------------------------------------------------------------------- // Constructors //--------------------------------------------------------------------------- template<class T, class Allocator> STL_Allocator<T,Allocator>::STL_Allocator( Allocator& alloc ) VALKNUT_NOEXCEPT: ...
//内联函数与内联方法 inline SpreadsheetCell::getValue() const { mNumAccess++; return (mValue); } inline SpreadsheetCell::getString() const { mNumAccess++; return (mString); } //直接将内联方法放置在类定义中 class SpreadsheetCell { public: SpreadsheetCell(); ~SpreadsheetCell(); ...
#include <iostream> using namespace std; int solve(int n, int a) { int answer = 0; for (int i=0; i < n; i++) { for (int j=0; j < n; j++) { for (int k=0; k < n; k++) { int len = a[i] + a[j] + a[k]; int most = max(a[i], max(a[j], a[k])); int rest = len - most; if (rest > most) { answer = m...
/* IBM_PROLOG_BEGIN_TAG */ /* * Copyright 2003,2016 IBM International Business Machines Corp. * * 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/LIC...
/**************************************************************************/ /*! @file readMifare.pde @author Adafruit Industries @license BSD (see license.txt) This example will wait for any ISO14443A card or tag, and depending on the size of the UID will attempt to read from it. If the c...
/** * @file messagedecodertest.cpp * * @brief File contains an example message decoder. * @version 0.1 * @date 2021-07-30 * * @copyright Copyright (c) 2021 * */ #include "messagedecoderbase.h" #ifndef MESSAGEDECODERTEST_H #define MESSAGEDECODERTEST_H class ExampleDecoder : public MessageD...
#include<iostream> #include<vector> #include<algorithm> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(NULL) {} }; void Init_ListNode(ListNode* head, vector<int> vec) { ListNode* p; p = head; p->val = vec[0]; for (int i = 1; i < vec.size(); i++) { ListNode* q = ...
#pragma once #include <core/data/Array.h> namespace launcher { struct Config { struct Window { bool bypass_window_manager_hint; int column_count; bool ignore_close_event; core::data::Array<int> position; core::data::Array<int> size; bool translucent_background; ...
#include <bits/stdc++.h> using namespace std; #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) #define MAXN 1000000 int table[MAXN+10]; int main(int argc, char const *argv[]) { int kase; scanf("%d",&kase); int CASE = 1; int N,M,K; int check[105]; while( kase-- ){ printf("Case %d: ",CASE++);...
#include <iostream> #include "Model.h" int main() { srand(time(NULL)); Model a; try { a.uploadTheModel("input.txt"); } catch (std::ifstream::failure &ex) { std::cout << ex.what() << '\n' << ex.code(); } catch (Model::ModelException &ex) { std::cout << ex.what() << s...
// Copyright (c) 2013 Nick Porcino, All rights reserved. // License is MIT: http://opensource.org/licenses/MIT #include "LandruStd/TimeVarObj.h" #include "LandruVM/Engine.h" #include "LandruVM/Fiber.h" #include "LandruVM/Stack.h" #include "LandruVM/VarObjStackUtil.h" #include <float.h> namespace Landru { ...
#ifndef EXECL_H #define EXECL_H #include <QAxObject> #include <QDebug> #include <unistd.h> #include <QFileDialog> #include <QString> #include <time.h> #define SHEET1 "电压报表" #define SHEET2 "电流报表" #define SHEET3 "电能质量报表" #define TITLE1 "电能质量统计报表(电压)" #define TITLE2 "电能质量统计报表(电流)" #define TITLE3 "电能质量统计报表" //现场工作状态记录结构图...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // // Copyright (C) 2006-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" #include "modules/webfeeds/src/webfeedutil....
#ifndef DOMINIOS_H #define DOMINIOS_H #include <iostream> using namespace std; string cpf; string senha; #endif // DOMINIOS_H
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 ** */ #include "core/pch.h" #include "modules...
#include <iostream> using namespace std; // Reversing a linked list class Node { public: int data; Node *next; Node(int value) { data = value; } }; void Insertatend(Node *&head, int value) { Node *n = new Node(value); if (!head) { head = n; return; } Nod...
/* -*- 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 JABBER_BACKEND_H #define JABBER_BACKEND_H #include "a...
#ifndef GAST_LOADER_H #define GAST_LOADER_H #include <core/Godot.hpp> #include <core/String.hpp> #include <gen/Reference.hpp> namespace gast { namespace { using namespace godot; } // namespace // Loader for GastManager. The 'initialize()' method must be invoked for // GastManager to be properly setup. class GastLo...
#pragma once #include "..//ACTEffect.h" #include "../../../GameData.h" class Monster; class IAct { public: void RotateToTarget(Monster* me, Monster* target) { CVector3 v = target->Getpos() - me->Getpos(); float cta = atan2f(v.x, v.z); CQuaternion rot; rot.SetRotation(CVector3::AxisY(), cta); me->SetRotation...
#include<iostream> using namespace std; int main() { string a ; cout<<"Enter the name: "; getline(cin, a); // it ignores white space while getting inut cout<< a << endl; return 0; }
#pragma once #include <pqxx/pqxx> #include <string> #include "SQLRequests.hpp" #include "user.hpp" #include <vector> #include "menuItem.hpp" class App { private: pqxx::connection C; std::string numEmp; std::string mdp; char choixExterne; char choixInterne; char choixMenuType; SQLRequests *...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #if !defined(QSORT_COMP_FUNC_LEADING_ARGS) || !defined(QSORT_COMP_FUN...
// Copyright (c) 2012-2017 The Cryptonote developers // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <cstddef> #include <cstdint> #include <fstream> #include...
#ifndef CUDERENDERER_H #define CUDERENDERER_H #include "math/glm.h" #include "render/model/texturemodel3d.h" #include "shader/basicshader.h" #include "texture/textureatlas.h" #include <vector> class Camera; class CubeRenderer { public: friend class RenderManager; void add(const Vector3 &pos); void rend...
#pragma once #include <array> #include <cassert> #include <iostream> #include <map> #include <memory> #include <random> #include <set> #include <sstream> #include <tuple> #include <unordered_map> #include <unordered_set> #include <variant> #include <immintrin.h> #include <sys/resource.h> #include <gmpxx.h> using n...
/* A simple method to check for key presses from the user this method is used extensively in menus in my other apps see "finalClock" app or "newBankApp" for more details */ using namespace std; #include <iostream> #include <stdio.h> #include <conio.h> #include <windows.h> int main() { cout << "Hello World!\n"; ch...
#pragma once #include <list> #include <string> #include <Poco/SharedPtr.h> #include <Poco/Timespan.h> #include <Poco/JSON/Object.h> #include "gwmessage/GWRequest.h" #include "model/DeviceDescription.h" #include "model/DeviceID.h" #include "model/ModuleType.h" namespace BeeeOn { /** * @brief Represents a message s...
#include<iostream> #include<cstdio> #include<cstring> using namespace std; #define ull unsigned long long int #define MOD 1000000000 #define MAX_SIZE 20 void display(ull a[MAX_SIZE][MAX_SIZE],int k) { for(int i=0;i<k;i++) { for(int j=0;j<k;j++) { printf("%lld ",a[i][j]); } printf("\n"); } } void matrix_mu...
/* * 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. */ #include <quic/state/stream/StreamSendHandlers.h> #include <quic/flowcontrol/QuicFlowController.h> #include <quic/state/QuicStre...
//--------------------------------------------------------------------------- #ifndef TypedListH #define TypedListH #include <classes.hpp> //--------------------------------------------------------------------------- template <class T> class TTypedList : public TList { private: bool bAutoDelete; protected: T* ...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Softwar...
#ifndef _BASE_MATRIX_4 #define _BASE_MATRIX_4 #ifdef _PSP_VER #include <libgum.h> #else #include <D3dx9math.h> #endif class BaseMatrix4 { // constructor and destructor protected: BaseMatrix4(void) {} public: virtual ~BaseMatrix4(void) {} public: #ifdef _PSP_VER ScePspFMatrix4& GetMatrix(void) { ...
/*************************************************************************** * Copyright (c) 2021, Thorsten Beier * * * Copyright (c) 2021, QuantStack * * ...
#include <vector> #include <iostream> #include <algorithm> static int total_pages(const int& n) { return (n + 2) / 2; } int main() { int n,p; std::cin >> n >> p; int entire_book = total_pages(n); int from_front = total_pages(p) - 1; int from_back = entire_book - ...
// BEGIN CUT HERE // PROBLEM STATEMENT // Tablature is a popular way of notating songs played on // fretted string instruments. Each line represents a // string, and numbers written on the lines tell you which // frets to press down when playing those strings. Here is // an example: // // // ------------ // -3-...
#ifndef NETWORK_H #define NETWORK_H #include <QtNetwork> #include <QNetworkAccessManager> class QNetworkReply; class QNetworkAccessManager; class NetworkUtil : public QObject { Q_OBJECT public: NetworkUtil(); void startRequest(); private: void setup(); private slots: void httpReady(); void htt...
#ifndef DEFAULT_CONFIGURATION_HPP #define DEFAULT_CONFIGURATION_HPP #include <memory> #include "Configuration.hpp" #include "DefaultKeyTapListener.hpp" #include "DefaultScreenTapListener.hpp" #include "DefaultSwipeListener.hpp" /* * Default implementation of Application's Configuration interface. * This class uses ...
#include <iostream> void test(std::string &str) { str = "1232"; } int main() { std::string str; test(str); std::cout << "str:" << str << std::endl; }
#include <iostream> #include <vector> #include "ltr\data\data_set.h" #include "ltr\data\object.h" #include "ltr\learners\linear_learner\linear_learner.h" #include "ltr\scorers\linear_scorer.h" using std::cout; using std::vector; using std::endl; using ltr::DataSet; using ltr::Object; int main() { ltr::Log log; ...
// // KTypes.hpp <Keepi> // // Made by Julien Fortin // contact <julien.fortin.it@gmail.com> // #include "DEBUG.h" #include <ostream> #include "KTypes.hpp" std::ostream& operator<<(std::ostream& os, KInteger* obj) { os << obj->toString(); return os; } std::ostream& operator<<(std::ostream& os, KString* obj) ...
#include <iostream> #include "NecromancerState.h" NecromancerState::NecromancerState(const std::string& name, int health, int damage, int mana, bool isUndead) : SpellCasterState(name, health, damage, mana, isUndead) { std::cout << " creating NecromancerState " << std::endl; } NecromancerState::~NecromancerState()...
#include<bits/stdc++.h> using namespace std; int main(){ int x,y; scanf("%d%d",&x,&y); int cnt=0; while(x>0&&y>0){ if(x==1&&y==1){ break; } if(x>y){ x-=2; y+=1; } else{ y-=2; x+=1; ...
#include<bits/stdc++.h> using namespace std; typedef long long ll; char str[100010]; main() { ll n; while(cin>>n) { ll ip, len, a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0; ll o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0, cnt=0; getchar(); cin>>str; len...
#include "SelectionSort.h" void SelectionSort::sort(Container * c){ for(int i = 0; i < c->size()-1; ++i){ int minIndex = i; for(int j = i + 1; j < c->size();++j){ if(c->at(j)->evaluate() < c->at(minIndex)->evaluate()){ minIndex = j; } } c->swap(i,minIndex); } }
#include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <vector> #include <queue> #include <string> #include <functional> #include <algorithm> #include <iterator> #include <cassert> #include <cmath> #include <cstring> using namespace std; // Named constants for numerical attribute types s...
#include <string> class { protected: int ID; string _name; int texture; public: Tile(int id, string name); static: int Tiles[]; }
/***************************************************************** * Copyright (C) 2017-2018 Robert Valler - All rights reserved. * * This file is part of the project: DevPlatformAppCMake. * * This project can not be copied and/or distributed * without the express permission of the copyright holder ******...
#include<bits/stdc++.h> using namespace std; int main(){ int *p,a[]={20, 40, 80, 100}; p=a; for (int i=0;i<4;++i) { printf("&a[%d]=%p, (p+%d)=%p, (a+%d)=%p\n",i, &a[i], i, p+i, i, a+i); } }
#pragma once #include "Keng/Core/IGlobalSystem.h" #include "Keng/FileSystem/FwdDecl.h" namespace keng::filesystem { class IFileSystem : public core::IGlobalSystem { public: static const char* SystemName() { return "KengFileSystem"; } virtual IFilePtr GetFile(const char* filename, const Ope...
//==================================================================================== // @Title: ANIMATION //------------------------------------------------------------------------------------ // @Location: /prolix/common/include/cAnimation.cpp // @Author: Kevin Chen // @Rights: Copyright(c) 2011 ...
#ifndef FLOOR_H #define FLOOR_H #include "Decorator.h" class Floor: public Decorator { public: Floor(); Floor(Base* c): Decorator(c){}; double evaluate(); }; #endif
#pragma once #include <iostream> #include <sstream> using namespace std; template <class T> class Lista { private: template <class T> struct Nodo { T* value; struct Nodo<T>* next; struct Nodo<T>* prev; Nodo(T* v, Nodo<T>* p = nullptr, Nodo<T>* n = nullptr) : value{ v }, prev{ p }, next{ n } {} }; Nodo<...
#include "gtest/gtest.h" #include "../header/rectangle.hpp" TEST(ConstructorTest, StandardConstruct){ Rectangle* rect = new Rectangle(3,4); ASSERT_EQ(rect->get_w(), 3); ASSERT_EQ(rect->get_h(), 4); delete rect; } TEST(ConstructorTest, ZeroConstruct){ Rectangle* rect = new Rectangle(0,0); ASSERT_EQ(rect->get_w()...
#include "NFA.h" #include <cassert> #include <iostream> using namespace std; using namespace my_regex; int main(int argc, char **argv) { my_string reg = "a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)+", str = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; NFA nfa(reg); size_t matc...
#include<iostream> #include<conio.h> #include<map> #include<string> using namespace std; int main() { char *s = "hi hi hi naren naren naren"; char delim[] = " "; char *str1 = new char[strlen(s)+1]; strcpy(str1,s); map<string,int> mhash; char *token = strtok(str1,delim); while(...
/* * MyString.cpp * * Created on: May 30, 2016 * Author: g33z */ #include "MyString.h" using namespace std; MyString::MyString() { c_pointer = (char*)malloc(sizeof(char));//init with only 1 byte copystring = c_pointer; strlength = length(c_pointer); max_length = capacity(c_pointer); } MyString::MyStri...
// Created on: 1995-12-01 // Created by: EXPRESS->CDL V0.2 Translator // Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the te...
#include "msgpack/msgpack.hpp" #include <string> #include <iostream> #include <assert.h> struct myclass { int num; std::string str; myclass() : num(616), str("the string") {} MSGPACK_DEFINE(num, str); friend std::ostream &operator << (std::ostream &o, const myclass &m) { o << "num: " << ...
#include<iostream> #include<cstdio> using namespace std; #define ull unsigned long long ull d_sum = 0; ull digit_sum(ull n) { ull s = 0; while (n != 0) { s += n % 10; n /= 10; } return s; } int main() { ios_base::sync_with_stdio(false); /* d_sum = 0; ull count = 0; for (ull i = 1;...
// Copyright 2011 Yandex #include <gtest/gtest.h> #include "ltr/data/data_set.h" #include "ltr/data/object.h" #include "ltr/data/feature_info.h" #include "ltr/utility/numerical.h" #include "ltr/learners/composition_learner/data_set_weights_updater.h" #include "ltr/learners/composition_learner/composition_scorer_weig...
#pragma once #include"Conversation.h" #include "afxcmn.h" // CFileRecv 对话框 class CFileRecv : public CDialogEx { DECLARE_DYNAMIC(CFileRecv) public: CFileRecv(CWnd* pParent = NULL); // 标准构造函数 virtual ~CFileRecv(); // 对话框数据 enum { IDD = IDD_RECVDLG }; protected: virtual void DoDataExchange(CDataExchange* pDX)...
#pragma once #include "ExampleBase.h" class MultiInstance : public ExampleBase { GLuint vao; Shader *shader; public: void initGLData() { const char *className = typeid(*this).name() + 6; shader = new Shader(className); glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT); GLfloat positions[] = { -0.05f, 0.0...
//***************************************************************************** // purpose: CSE 4713 / 6713 Assignment 1: Lexical Analyzer // created: 8-25-2015 // author: Corey Henry cah835 //***************************************************************************** #include "lexer.h" #include <ctype.h> #include <...