text
stringlengths
8
6.88M
/** * @file * @copyright defined in EOTS/LICENSE.txt */ #include <eotio/utilities/tempdir.hpp> #include <cstdlib> namespace eotio { namespace utilities { fc::path temp_directory_path() { const char* eot_tempdir = getenv("eot_TEMPDIR"); if( eot_tempdir != nullptr ) return fc::path( eot_tempdir ); ...
#ifndef ATTRACTOR_H #define ATTRACTOR_H #include <vector> #include "xfm.h" #include "hitmap.h" #define MAP_DEGREE 3 #define SEARCH_DIM_X 100 #define SEARCH_DIM_Y 100 #define SEARCH_VMIN -2.0 #define SEARCH_VMAX 2.0 #define MIN_FILL 0.15 #define SEARCH_ITERS 10000 class Attractor { public: Attractor(); const xfm&...
// Created on: 1992-02-03 // Created by: Christian CAILLET // 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 ...
#ifndef C_ACTION_HH_ # define C_ACTION_HH_ // #include <yarp/os/all.h> #include <yarp/sig/all.h> #include <yarp/dev/all.h> // #include <gtk/gtk.h> // #include <macsi/modHelp/modHelp.h> #include <macsi/objects/objects.h> // #include <string> #include <vector> #include <iostream> #include <deque> #include <list> #inclu...
/* * This file is part of OctoMap - An Efficient Probabilistic 3D Mapping * Framework Based on Octrees * http://octomap.github.io * * Copyright (c) 2009-2014, K.M. Wurm and A. Hornung, University of Freiburg * All rights reserved. License for the viewer octovis: GNU GPL v2 * http://www.gnu.org/licenses/old-licen...
#ifndef GROUPMODEL_H #define GROUPMODEL_H #include <QAbstractListModel> #include <functional> #include <memory> #include <ChatObjects/ChatItem.h> #include "ui/Views/Models/ChatModel/chatmodel.h" class GroupView : public ChatItem { public: GroupView() = default; GroupView(ChatItem &item) :ChatItem(st...
#ifndef INIT_H #define INIT_H #include <cstring> #include <cstdlib> #include <vector> #include <map> #include <string> #include <cstdio> #include <float.h> #include <cmath> #include <ctime> using namespace std; int num_threads = 8; int trainTimes = 100; float alpha = 0.1; float reduce = 0.98; int dimensionC = 1000; i...
#include "pch.h" #include "CppUnitTest.h" #include "../Library/Asset.h" using namespace std; using namespace Microsoft::VisualStudio::CppUnitTestFramework; TEST_CLASS(AssetTest) { public: TEST_METHOD(CtorTest) { auto cash = 1000.0; auto expected = cash; Asset sut(cash); auto actual = sut.cash(); Assert:...
#include <iostream> #include <set> #include <vector> using namespace std; vector<vector<int>> ss; vector<pair<int, int>> result; vector<int> stack; vector<bool> used; void dfs(int v) { used[v] = true; if (!stack.empty()) { result.emplace_back(stack.back(), v); for (size_t j = 0; j < stack.siz...
#include <iostream> #include <cstdlib> #include "osoba.h" #include "car.h" using namespace std; Car::Car() : marka("") , model("") , rocznik(0) , przebieg(0) , ileosob(0) {}
#ifndef TREEFACE_SCENE_GUTS_UTILS_H #define TREEFACE_SCENE_GUTS_UTILS_H #include "treeface/misc/UniversalValue.h" #include <treecore/HashMap.h> #include <treecore/Identifier.h> namespace treeface { typedef std::pair<GLint, UniversalValue> UniformKV; typedef treecore::HashMap<treecore::Identifier, UniversalVa...
// Copyright (c) 2020 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 ...
#include <algorithm> #include <functional> #include <iostream> #include <numeric> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long using namespace std; int n; vector<int> nums; struct Solution { ll solve() { ll res = 0; for (int i = 0; i != n; ++i)...
//--------------------------------------------------------------------------- #pragma hdrstop #include "ParseFileData.h" //--------------------------------------------------------------------------- #pragma package(smart_init) FileStruct::FileStruct() { m_DataStream = new TMemoryStream; } FileStruct::~FileStruc...
#include "Globals.h" #include "Application.h" #include "ModuleRender.h" #include "ModuleSceneIntro.h" #include "ModuleInput.h" #include "ModuleTextures.h" #include "ModuleAudio.h" #include "ModulePhysics.h" #include "ModuleFadeToBlack.h" #include "Colliders.h" #include "Pinball.h" #include "ModulePlayer.h" ModuleScene...
#pragma once #include "elog/record.hpp" namespace elog { class Formatter { public: virtual ~Formatter(); virtual std::string format(const Record& record) = 0; virtual std::string operator()(const Record& record); }; }
#include "ObjectEventHandle.h" namespace credb { namespace trusted { ObjectEventHandle::ObjectEventHandle() = default; ObjectEventHandle::ObjectEventHandle(ObjectEventHandle &&other) noexcept : m_content(std::move(other.m_content)) { } ObjectEventHandle::ObjectEventHandle(json::Document &&doc) : m_content(s...
#include <cstdio> int main(void) { int a[10]; printf("%d\n", a[20]); return 0; }
#include <algorithm> #include <math.h> #include "env.hpp" #include "fire.hpp" #include "iteration.hpp" #include "maths.hpp" #include "particle.hpp" int main() { // VARIABLE DEFINITION // random number generator int seed = getEnvInt("SEED", 1); // random seed // simulation double dt = getEnvDouble("DT", 1...
/* -*- 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. * * Tomasz Kupczyk tkupczyk@opera.com */ #ifndef RUNTIME_GADGET_MA...
#include <stdlib.h> #include <string> #include <math.h> #include <bitset> #include <iostream> #include "hashtable.hpp" double hashtable::get_load_factor() { return (double)num_entries / (double)table_size; } int hashtable::get_num_collisions() { return num_collisions; } hashtable::hashtable(int size)...
#pragma once #include "core/GameCore.h" namespace Game { class Application { public: Application(); virtual ~Application(); void start(); }; }
#include <iostream> using namespace std; int main() { //traditional way int array[5] = {2, 6, 7,89, 90}; //designated way int array[5] = {[3]=3}; int array[5] = 5; int array[] = {2, 6, 7,89, 90}; int array[][5]; cout << "Hello world!" << endl; return 0; ...
// 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 Software Foundation, with special ...
#include<iostream> #include<math.h> using namespace std; class shape { public: int *y; int *x; //hiisver function zarlah static int count; shape(){ count++; cout<<count<<" Object uuslee"<<endl; } ~shape(){ count--; cout<<count<<" Object uldlee"<<endl; ...
#include "abstractElementGenerator.h" using namespace qReal; using namespace robots::generator; int AbstractElementGenerator::mElementCounter = 0; QString AbstractElementGenerator::nextMethodName() { QString result = "func" + mElementId.element() + QString::number(mElementCounter); mElementCounter++; return resul...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "11984" #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 kase; ...
/* * Copyright (c) 2016-2018 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_DETAIL_RAW_CHECKERS_H_ #define CPPSORT_DETAIL_RAW_CHECKERS_H_ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <type_traits> #include "a...
template<typename T> bool less(T a, T b) { return a < b; } template<> bool less<char const*>(char const* a, char const* b) { //bool less<>(char const* a, char const* b) { //bool less(char const* a, char const* b) { return strcmp(a, b) < 0; } template<typename T> void sort(Vector<T> &v) { size_t const n = ...
#ifdef IS_LIB # ifdef _WIN32 __declspec(dllexport) # endif int internal_subdir_empty_1() { return 0; } #else # ifdef _WIN32 __declspec(dllexport) # endif int subdir_empty_1() { return 0; } #endif
#pragma once #include <cstdint> // because static_cast<uint32_t>(t) is fucking long template <typename T> uint32_t to_ui32(T t) { return static_cast<uint32_t>(t); } template <typename T> int32_t to_i32(T t) { return static_cast<int32_t>(t); }
#ifndef BRISCOLA_HPP #define BRISCOLA_HPP #include <iostream> // std::cout #include <string> // std::string #include "Game.hpp" #include "DeckItaliennes.hpp" class Briscola : public Game { private : // CHAMPS ======================================================= // // hérités /* std::vector<Team...
/* * Sphere.cpp * * Created on: Nov 5, 2017 * Author: ryanw */ #include "Sphere.hpp" Sphere::Sphere(bool solid, GLfloat r, GLfloat g, GLfloat b) { this->solid = solid; this->r = r; this->g = g; this->b = b; useTexture = false; texName = 0; } Sphere::Sphere(std::string texture, int un...
#include "stdafx.h" #include <algorithm> #include "sprite.h" #include "rom_file.h" SpriteTile::SpriteTile() { SetRect(&base_, 0, 0, 0, 0); width_ = 0, height_ = 0; } SpriteTile::~SpriteTile() { } bool Sprite_Draw16x16Tile() { return true; } bool SpriteTile::Load(CartFile& cart, HDC ...
/* kamalsam */ #include<iostream> using namespace std; int rev(int a) { int s=0,r; while(a!=0) { r=a%10; s=s*10; s=s+r; a=a/10; } return s; } int main() { int n,i; int a,b,s,r,c; cin>>n; for(i=0;i<n;i++) { cin>>a>>b; s=rev(a); r=rev(b); c=s+r; cout<<rev(c)<<endl; } return 0; }
#ifndef GAME_CONTAINER_HPP #define GAME_CONTAINER_HPP #ifdef KP2_CLIENT #include <QObject> #endif #include <vector> #include <algorithm> #include "json/json.h" #include "objectfactory.hpp" namespace Game { #ifdef KP2_CLIENT class ContainerSignalsAndSlots : public QObject { Q_OBJECT signals: void added(int in...
#pragma once #include "Neuron.h" #include "vector" #include "Link.h" #include <iostream> //the basic layer of the network class NetworkLayer { public: //create the layer with the _width amount of neurons of type NetworkLayer(int _width = 0, int type = EXPONENTIAL); ~NetworkLayer(); //process all the links and neu...
// Name: Zehua Liu // ID: 001086969 #include<iostream> #include <random> using namespace std; void PrX(int A[], int n) { for (int i = 0; i < n - 1; i++) { for (int j = n - 1; j >= i; j--) { if (A[j] < A[j - 1]) { int k = 0; k = A[j]; A[j] = A[j - 1]; A[j - 1] = k; } } } } int main()...
#include <stdio.h> #include <iostream> using namespace std; int main() { // array declaration as string with values int tenth[10] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; //for-loop for the output for(int count = 0; count < 10; count++) { cout << tenth[count] << endl; } system("pause"); return 0; }...
#include "KalmanLocalizer.h" #include "Maths.h" #include "Util.h" #include "armadillo" #include <string> #include <sstream> KalmanLocalizer::KalmanLocalizer() : filter(NULL) { x = Config::fieldWidth / 2.0f; y = Config::fieldHeight / 2.0f; orientation = 0.0f; lastInputOrientation = 0.0f; rotationCounter = 0; jso...
#include <string> #include <cstdio> #include <chrono> #include <iostream> #include <algorithm> #include <vector> // http://www.cplusplus.com/reference/vector/vector/ #include <queue> #include <ctgmath> using namespace std; //grafo struct Arista{ int nodo_a; int nodo_b; int peso; }; vector<Arista> aristas...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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. * */ #include "core/pch.h" #ifdef DOM3_LOAD #include "modules/dom...
#include <iostream> #include <unordered_set> #include <ctime> using namespace std; int main() { long long tmp; std::unordered_set<long long> hashset; long long x = ((long long)(1 << 30)) * 4 * 1024 * 1024, y = x; for (int i = 0; i < 50000; ++i) { hashset.insert(y); y += x; } cer...
#include "Graphics.hpp" namespace Graphics2D { Sprite::Sprite(void) { mLoaded = false; mTexture = 0; mFrame = -1; mCropW = 0; mCropH = 0; } Sprite::Sprite(const char* file) { mLoaded = load(file); mFrame = -1; } Sprite::~Sprite(void) { free(); } bool Sprite::load(const c...
// // nehe21.cpp // NeheGL // // Created by Andong Li on 9/28/13. // Copyright (c) 2013 Andong Li. All rights reserved. // #include "nehe21.h" const char* NEHE21::TITLE = "NEHE21"; GLfloat NEHE21::sleepTime = 0.0f; int NEHE21::frameCounter = 0; int NEHE21::currentTime = 0; int NEHE21::lastTime = 0; char NEHE21:...
#pragma once #include<vector> #include "recording_api.h" #include <memory> #include<queue> #include "PredicateConstructor.h" #include "TransitionGenerator.h" #include <condition_variable> #include<mutex> class DataManager; class PredicateConstructor; class SituationCondenser; class VehicleData; class TransitionGenera...
// blinks every second using interrupts #define LED PB8 HardwareTimer timer(2); void setup() { pinMode(LED, OUTPUT); timer.pause(); timer.setPeriod(125); // in microseconds. 125us equates to 8000Hz timer.setChannel1Mode(TIMER_OUTPUT_COMPARE); timer.setCompare(TIMER_CH1, 1); // Interrupt 1 count after each...
#include <GLGraphics/GLHeader.h> #include <QDebug> #include <QPixmap> #include <iostream> #include <CGLA/Vec2i.h> #include <CGLA/Vec2f.h> #include <Mesh/Texmap.h> using namespace std; using namespace CGLA; namespace Mesh { bool Texmap::load(const std::string& _name) { name = _name; QImage ...
#pragma once #include "CoreMinimal.h" namespace ECommandLog { enum Type : uint8 { Log_Default, Log_Warning, Log_Error }; }
#ifdef DO_GNU_TESTS # ifndef TEST_OPTION # error Expected TEST_OPTION # endif #endif int main(void) { return 0; }
#ifndef VIGENERE_H_ #define VUGENERE_H_ #include <iostream> using namespace std; static int lenAlphabetAffine, lenKeyAffine, lenMessageAffine; int validateKey(int *); int gcd(int,int); int modInverse(int, int); int euclideanAlgorithm(int,int,int *,int *); int* generateKeyAffine(string,string); int * encryptAffine(in...
// Created on: 1998-07-29 // Created by: Christian CAILLET // 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 <iostream> #include <thread> // Function to be executed in the separate thread void threadFunction() { std::cout << "This is a separate thread." << std::endl; } int main() { // Create a thread and execute the threadFunction std::thread t(threadFunction); // Wait for the thread to finish exec...
class Land_Ind_Oil_Pump_EP1_DZE : House { scope = 1; model = "\ca\Structures_E\Ind\Ind_Oil_Mine\Ind_Oil_Pump_EP1"; vehicleClass = "Test"; ladders[] = {{"start", "end"}}; class DestructionEffects : DestructionEffects { class Ruin1 { simulation = "ruin"; type = "\Ca\Structures_E\Ind_Oil_Pump:\verHistory\A...
/************************************************************************/ /* Write a C Program to Find the Maximum Depth or Height of a Tree */ /************************************************************************/ struct Node{ int nVal; Node *pLeft; Node *pRight; Node(int nValue) : nVal(nValue) , p...
#include "Runtime.hpp" #include "Debug.hpp" void Runtime::dbg(int addr, std::string msg) { Debug::print(">> " + std::to_string(addr) + ": " + msg); } void Runtime::dbg(std::string msg) { Debug::print(">> " + msg); } Runtime::Runtime() : stackPtr(0), returnPtr(0), nextInstructionPtr(0), currentInstructionPtr(0) { ...
// Copyright (c) 2021 ICHIRO ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, di...
#include "QuakeConsole.h" #include "shaders.h" #include "../__trash.h" #include "TextDefs.h" QuakeConsole::QuakeConsole() : _enabled{false} { _pos = {-1.0f, 1.0f, 2.0f, 1.0f}; // x y width height /// Shader program _bsp = glCreateProgram(); compileShaderProgramm(&_bsp, ".\\billboard.vert", ".\\billboard....
#include "Field.h" void Field::Update(){ if (!moving) { spawnFigure(); } else { moveFigure(); Render(); } CheckFilledLines(); } void Field::Render() { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (currentTetramino->GetShape(i, j, OldRotation) == 1) { field[OldYloc + i][OldXl...
// // 238. Product of Array Except Self.cpp // leetcode // // Created by xujian chen on 6/1/20. // Copyright © 2020 xujian chen. All rights reserved. // /* 238. Product of Array Except Self Medium 4567 395 Add to List Share Given an array nums of n integers where n > 1, return an array output such that ...
#ifndef _PROFILE_MARKER_H_ #define _PROFILE_MARKER_H_ #include <stdio.h> #include <iostream> #include <fstream> #include <string.h> #include <assert.h> #include <vector> using namespace std; enum MarkerType { MARKER_ERROR=0, MARKER_SEQUENCE=1 , MARKER_MS=2 }; enum MutationType { MUTATION_ERROR=0, MUTATION_BASIC=1 }...
#define BOOST_SP_DISABLE_THREADS #include "PointLocator.h" #include <iostream> #include <iomanip> #include <dax/cont/ArrayHandleConstant.h> #include "BinPoints.h" #include "Offset2CountFunctor.h" #include "Explicit2ImplicitIndex.h" #include "MapPointToBucket.h" typedef dax::cont::internal::DeviceAdapterAlgorithm<D...
//Program to check if a number is palindromic using recursion #include <iostream> using namespace std; //declaring function to return the reverse of digits int palin(int i,int j) { if (i==0) return j; j=(j*10)+(i%10); return palin(i/10,j);//recursion } //declaring main function int main() { //de...
#ifndef K_KMainView_VIEW_H___ #define K_KMainView_VIEW_H___ #include "KViewGroup.h" #include "KTextDrawable.h" #include "KImageDrawable.h" #include "KShapeDrawable.h" class KMainView : public KViewGroup { public: KMainView(void); virtual ~KMainView(void); void init(); protected: CAnimationThread m_ani_thread; };...
#include "util/AnyAsyncWork.h" using namespace BeeeOn; AnyAsyncWork::~AnyAsyncWork() { }
// // Created by Guillaume Doucet on 2020-10-07. // #ifndef EX2_CTROPERATIONMODE_H #define EX2_CTROPERATIONMODE_H #include "Base/OperationModeBase.h" class CTROperationMode : protected OperationModeBase { public: std::string encrypt(const std::string& text, const std::string& key, const std::string& iv); s...
#include <iostream> using namespace std; #define MAX 100 class Deque { int arr[MAX]; int front, rear, size; public: Deque(int); void enQueFront(int); void enQueRear(int); void deQueFront(); void deQueRear(); bool isFull() { return ((front == 0 && rear == size - 1) || fro...
#include<iostream> class stack { int n; int size; char *p; public: stack (int ssize = 1000); void push (char x); char pop (); };
#include "TaskerUIMainWindowQWidget.h" #include "ui_TaskerUIMainWindowQWidget.h" #include <QDebug> #include <User.h> #include <mainui.h> #include <stdio.h> #include <stdlib.h> #define TASKTER_TITLE "Tasker" /** * @brief TaskerUIMainWindowQWidget::TaskerUIMainWindowQWidget * @param parent */ TaskerUIMainWindowQWid...
#include<stdio.h> int main(){ long long fn[100]; int i; fn[1]=fn[2]=1; for(i=3;;i++){ fn[i]=fn[i-2]+fn[i-1]; if(fn[i]<0) break; } printf("%lld\n",fn[i-1]); return 0; }
#ifndef SPELLCASTERSTATE_H #define SPELLCASTERSTATE_H #include <iostream> #include <string> #include "UnitState.h" class SpellCasterState : public UnitState { private: int mana; int maxMana; // int magicDmg; // int treatment; public: SpellCasterState(const std...
#pragma once namespace fa { namespace gui { namespace glo { auto constexpr winWidth = 1200; auto constexpr winHeight = 800; auto constexpr margin = 0.01f; // space between elements auto constexpr totalSize= 1.0f; // total size (relative bounds) ...
//============================================================================ // Name : Queue.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <io...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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. */ #ifndef SECURITY_GADGET_REPRESENTATION_H #define SECURITY_GADGET_...
//使用するヘッダーファイル #include"GameL\DrawTexture.h" #include"GameL\WinInputs.h" #include"GameL\SceneManager.h" #include"GameL\HitBoxManager.h" #include "GameL\DrawTexture.h" #include "GameL\DrawFont.h" #include"GameHead.h" #include"CObjHero.h" #include"GameL\Audio.h" #include "UtilityModule.h" //使用するネームスペース using namespace...
//------------------------------------------------------------------------------ /* This file is part of Beast: https://github.com/vinniefalco/Beast Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without f...
class CameraParams{ private: WbDeviceTag camera; int width; int height; double hor_FOV; double ver_FOV; double blindspot; Mat intrinsic = Mat(3, 3, CV_32FC1); Mat distCoeffs; float focal_x; float center_x; float center_y; Mat img; // for vi...
#include <cstdio> #include <iostream> #include <memory> #include <vector> using namespace std; #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics.hpp> using namespace boost::accumulators; // 2 + (3+4) struct Expression { virtual double eval() = 0; virtual void...
#include "odb/server/server-app.hh" #include <cassert> #include <cstdlib> #include <cstring> #include <thread> #include "odb/server/client-handler.hh" #include "odb/server/debugger.hh" #include "odb/mess/db-client-impl.hh" #include "odb/server/multi-client-handler.hh" namespace odb { namespace { const ServerConfig ...
#pragma once #using <mscorlib.dll> #include "llvm/Support/PrettyStackTrace.h" namespace LLVM { public ref class PrettyStackTraceEntry { internal: llvm::PrettyStackTraceEntry *base; protected: PrettyStackTraceEntry(llvm::PrettyStackTraceEntry *base); internal: static inline PrettyStackTraceEntry ^_wrap(llvm::Pret...
/* * Node.cpp * * Created on: 27-mai-2009 * Author: mythrys */ #include "Node.h" #include <cstdlib> template <class T> Node<T>::Node(T* element) { this->element = element; this->next = NULL; } template <class T> Node<T>::Node(T* element, Node* next) { this->element = element; this->next = next; } t...
#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...
/** * Copyright (c) 2017 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #include "pngLoader.h" #include <png.h> #include <cstring> // for memcpy #include <assert.h> #include <iostream> namespace PNG{ using uchar = unsigned char; //================================...
/************************************************************************ * @project : sloth * @class : ParticleShader * @version : v1.0.0 * @description : 粒子着色器操作类 * @author : Oscar Shen * @creat : 2017年3月6日11:18:52 * @revise : *****************************************************************...
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #include "gtdocument_p.h" #include "gtabstractdocument.h" #include "gtbookmark.h" #include "gtdocpage_p.h" #include <QtCore/QCryptographicHash> #include <QtCore/QDebug> GT_BEGIN_NAMESPACE GtDocumentPrivate::GtDocumentPrivate(GtAbstractDocument *a, ...
#include "rvbb8.h" RVBB8::RVBB8(): RVModel("/home/bonnet/Documents/cours-si5/RV/semaine7/final/tuto7/BB8/bb8.obj") { }
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
/* * Algorithm Programming Assignment #2 * Professor : 정균락 교수님 * class : 알고리즘 분석 - 1 * Student No : B354025 * Name : 정근화 */ #include <iostream> #include <fstream> #include <vector> #include <ctime> #include <cstdlib> using namespace std; /* 소트 종류 */ enum { EXCHANGE, MERGE, QUICK }; void exchangeSort(ve...
#include<bits/stdc++.h> using namespace std; char *moveHash(char str[],int n) { char str1[100],str2[100]; int i,j=0,k=0; for(i=0;str[i];i++) { if(str[i]=='#') str1[j++]=str[i]; else str2[k++]=str[i]; } str1[j]='\0'; str2[k]='\0'; strcat(str1,str2); cout<<str...
/* * 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 <folly/Expected.h> #include <folly/Optional.h> #include <folly/io/IOBuf.h> #include <folly/io/async/AsyncT...
#include "GetMemberProc.h" #include "Logger.h" #include "HallManager.h" #include "BackConnect.h" #include "Configure.h" #include "ErrorMsg.h" #include "ServerManager.h" static time_t now = 0; static time_t cach_time = 0; static int cach_member[512]={0}; static int games[512]={0}; static int g_count = 0; GetMemberProc...
#include "GameObject.h" #include <iostream> GameObject::GameObject(float x, float y, conf::Dir dir_, float animation_speed_, int frame_amount_, float speed_, conf::ObjectType type_) : position(x, y), speed(speed_), diag_speed(0.7f * speed), dir(dir_), animation_speed(animatio...
<<<<<<< HEAD:test/ut_menuiterator.h #ifndef UT_MENUITERATOR_H #define UT_MENUITERATOR_H #include "../src/base_menu.h" #include "../src/menu.h" #include "../src/menu_item.h" #include "../src/iterator.h" class MenuIteratorTest : public ::testing::Test{ protected: BaseMenu* hamburger; BaseMenu* pizz...
#include<bits/stdc++.h> #define ll long long using namespace std; ll bigmod(ll num, ll power) { ll ans; if(power==0)return 1; ans = bigmod(num, power/2); ans = (ans*ans)%1000003; if(power%2==1) ans = (ans*num)%1000003; return ans; } main() { char as[10000]; cin>>as; strin...
/* ID: washirv1 PROG: castle LANG: C++ */ #include <iostream> #include <fstream> #include <vector> using namespace std; #define INFILE "castle.in" #define OUTFILE "castle.out" typedef vector<vector<int> > Castle; typedef vector<vector<bool> > Visited; const int WEST = 1, NORTH = 2, EAST = 4, SOUTH = 8; int roomSize(...
#include <bits/stdc++.h> using namespace std; int n,d[17][17]; int isPrime(int x) { for(int i=2; i<x; i++) if(x%i==0) return 0; return 1; } void dfs(int at, int cont, int ver[], int ans[]) { if(cont == n-1) { for(int i=2; i<=n; i++) if(d[at][i] && isPrime(i+1) && ver[i]==0) { ans[cont] = i; dfs(...
#include <iostream> #include "diccionario.h" /***************************************************************************************/ void eliminardato(palabra * &palabraAeliminar) { delete palabraAeliminar; } /***************************************************************************************/ ch...
class CMailConfigurationDlg : public CDialog { public: CMailConfigurationDlg(CWnd* pParent = NULL); // standard constructor //{{AFX_DATA(CMailConfigurationDlg) enum { IDD = IDD_CONFIGURATION }; CString m_sPassword; CString m_sProfile; //}}AFX_DATA //{{AFX_VIRTUAL(CMailConfigurationDlg) virtual void DoDataEx...
#include "gamecreator.h" void GameCreator::createGame(std::vector<std::vector<GameCell *> > &gameBoard, int numBombs, int seed) { srand(seed); int rows = gameBoard.size(); int columns = gameBoard[0].size(); std::vector<GameCell*> bombs; GameCell *currentCell; while (numBombs--) { i...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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. ** ** Anders Oredsson */ #include "core/pch.h" #ifdef SELFTEST #i...