text
stringlengths
8
6.88M
#include "dfParticleSystem.h" #include "../Entity/Entity.h" dfParticleSystem::dfParticleSystem(void) { sInfo.useSpawnRect = false; sInfo.spawnRect = Rect(); sInfo.spawnPoint = vec2(0.f,0.f); sInfo.minVeloc = 0.f; sInfo.maxVeloc = 0.f; sInfo.minLifespan = 0.f; sInfo.maxLifespan = 0.f; sInfo.minAcc = 0.f; sInfo...
/* 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...
#include <gtest/gtest.h> #include <QApplication> // HACK: this definition resolves MSVC linkage error about undefined g_linked_ptr_mutex namespace testing { namespace internal { GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex); } } int main(int ac, char* av[]) { QApplication app(ac, av); // for QApplica...
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) #define for1(i,n) for(int i=1;i<=n;i++) #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define FORD(i,a,b) for(int i=(a);i>=(b);i--) const int INF = 1<<29; const int MOD=1073741824; #define pp pair<ll,ll> typedef long long int ll; bool...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2008 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef EXTERNALSSL_DISPLAYCONTEXT_H_ #define EXTERNALSSL_D...
#define WSIZE 8 #if WSIZE == 4 typedef unsigned int word; typedef int number; #elif WSIZE == 8 typedef unsigned long word; typedef long number; #endif typedef char byte; typedef word* oop; typedef int bytecode; class Process; typedef int (*prim_function_t) (Process*); #define DEFAULT_STACK_SIZE 10 * 1024 ...
#include <Windows.h> #include <include/cef_app.h> int mainImpl(CefMainArgs & args); int wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, INT) { CefMainArgs args { hInstance }; CefEnableHighDPISupport(); return mainImpl(args); }
#include <iostream> #include <vector> #include <string> #define println(x) \ std::cout << #x " = " << x << std::endl void test_array_passing(double arg[10]) { for (int i=0; i<10; i++) arg[i] += 99; } std::string return_string() { return std::string("somethin"); } void test_string_ref() { std...
#include "GraphicsInstance.hpp" Elysium::Graphics::GraphicsInstance::GraphicsInstance(IWrappedGraphicsInstance * WrappedGraphicsInstance) : Elysium::Core::Object(), _WrappedGraphicsInstance(WrappedGraphicsInstance) { List<IWrappedGraphicsDevice*>* WrappedGraphicsDevices = _WrappedGraphicsInstance->GetWrappedG...
#include <iostream> using namespace std; const int N = 7; int Value[N] = {1, 2, 5, 10, 20, 50, 100}; //钱币的价值 int Count[N] = {3, 0, 2, 1, 0, 3, 5}; //对应钱币价值的张数 int solve(int money) { int sum = 0; //最少需要花多少张钱币数 for(int i = N - 1; i >= 0; i--) { int a = min(money/Value[i], Count[i]...
#include <iostream> using namespace std; int f(int n){ cout << n << endl; if(n == 1) return 1; return f(n-1) + n; } int main(){ int n; cin >> n; cout << f(n); return 0; }
#ifndef VERTEXARRAY_H #define VERTEXARRAY_H #include <Common.h> class CVertexArray final { public: CVertexArray(); ~CVertexArray(); void bind() const; void unbind() const; private: GLuint _vao; }; #endif // VERTEXARRAY_H
#include <iostream> #include <vector> using namespace std; class LangtonsAnt{ public: LangtonsAnt(): matrix(vector<vector<bool>>(INT_MAX, vector<bool>(INT_MAX, true))), pos(pair<int, int>(0, 0)), dir(0) {} void printMoves(int k){ for(int i = 0; i < k; i++){ bool isWhite = matr...
#include<bits/stdc++.h> using namespace std; #define PI 3.1415926535897932 int main(){ float a = 10.0; int b[10]; double c = 100.0; printf("a = %lf, c = %lf\n",a,c); b[-1] = 50; b[15] = 25; printf("a = %lf, c = %lf\n",a,c); return 0; }
// Path.h: interface for the CPath class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_PATH_H__21B793D8_036A_4F2C_8A28_2A766324FF3E__INCLUDED_) #define AFX_PATH_H__21B793D8_036A_4F2C_8A28_2A766324FF3E__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #...
//知识点:模拟 /* By:Luckyblock 容易发现一个简单的性质: 1.当暗文ci <= 密钥ki 时: 明文mi = ci - ki; 2.当暗文ci > 密钥ki 时: 明文mi = ci + 26 - ki 有了上述性质 , 就可以在明文暗文之间 简单地相互转换 注意处理密钥与暗文之间的大小写关系: 要使密钥的大小写 与 暗文的大小写相同; */ #include<cstdio> #include<cstring> const int MARX = 1010; //======================================================...
#pragma once #include "DynamicObjectView.h" #include "DynamicObjectModel.h" class DynamicObjectMagicRayView : public DynamicObjectView { public: void initView(DynamicObjectModel* dynamicObjectModel); void draw(); private: int counter; };
#pragma once #include <iberbar\Utility\Unknown.h> #include <string> #include <list> namespace iberbar { class CTimeline; class CTimer; IBERBAR_UNKNOWN_PTR_DECLARE( CTimeline ); IBERBAR_UNKNOWN_PTR_DECLARE( CTimer ); typedef PTR_CTimer Timer; typedef PTR_CTimeline Timeline; typedef void (CRef::*PTimerPro...
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; int k; long long F; struct Q { int l; int r; int id; Q(int l, int r, int id) : l(l), r(r), id(id) {} }; bool comp(Q &a, Q &b) { return a.l / k != b.l / k ? a.l < b.l : a.r < b.r; } void add(int value...
#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; const int MAXN = 2e4 + 100; const int MAXM = 1e5 + 100; struct Edge { int p,n...
#include "UrlParser.h" const int MAX_PORT = 65535; const int MIN_PORT = 1; const int HTTP_PORT = 80; const int HTTPS_PORT = 443; const int FTP_PORT = 21; bool ParseURL(string const& url, Protocol& protocol, int& port, string& host, string& document) { string copyUrl = url; transform(copyUrl.begin(), copyUrl.end(), ...
// // BetterCarryingEachOther 2016.03.12 // enemy class // #include <GL/glew.h> #include <GL/freeglut.h> #include <iostream> #include <cstdlib> #include "object.h" #include "enemy.h" #include "view.h" #include "deco.h" #include "shader.h" #include "resource.h" #include "game.h" Enemy::Enemy(float cbWidth, float cbHe...
// // cut_rod.hpp // rod-cut // // Created by mndx on 26/10/2021. // #ifndef cut_rod_hpp #define cut_rod_hpp #include <stdio.h> int get_optimum_solution(int n, int A[], bool *r, int *cut_counter); #endif /* cut_rod_hpp */
//Write a program to read three numbers from keyboard and print out the largest of them without using if statement. #include<iostream> using namespace std; int main() { int a,b,c,largest; cout<<"Enter three numbers:"<<endl; cin>>a>>b>>c; largest=c > (a > b ? a : b) ? c : (a > b ? a : b); cout<<"The ...
/* -*- 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. */ #ifndef MODULES_NS4PLUGINS_NS4PLUGINS_MODULE_H #define MODULES_NS...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
#include <stdio.h> #include <math.h> int main() { int a, b; float x; printf("Digite o valor de a: "); scanf("%d", &a); printf("Digite o valor de b: "); scanf("%d", &b); x = -b / a; printf("Sua raiz e: %.2f", x); }
#pragma once #include "Utils/ArrayView.hpp" #include "VariableNode.hpp" template<class Type> struct VariableBufferNode : VariableNode<Type> { VariableBufferNode(ArrayView<Type> values, ArrayView<Type> deltas) : m_values(values) , m_deltas(deltas) { assert(values.size() == deltas.size())...
// ---------------------------------------------------------------------------- // Copyright (C) 2002-2007 Marcin Kalicinski // Copyright (C) 2007 Alexey Baskakov // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE...
#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { float tcompras,tfactura,tdescuento; cout <<"Digite el valor total de compras en dolares US$"; cin >>tcompras; tfactura=tcompras*1.12; cout ...
/* 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...
#ifndef _MSG_0XCE_SCOREBOARDOBJECTIVE_STC_H_ #define _MSG_0XCE_SCOREBOARDOBJECTIVE_STC_H_ #include "mcprotocol_base.h" namespace MC { namespace Protocol { namespace Msg { class ScoreboardObjective : public BaseMessage { public: ScoreboardObjective(); ScoreboardObjective(const String16& _objectiveName, const String...
// Copyright (c) 2016 David Pfander // // 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) #include <pika/algorithm.hpp> #include <pika/init.hpp> #include <pika/modules/iterator_...
#include "ExceptionEchecEmprunt.h" int ExceptionEchecEmprunt::compteur_ = 0; ExceptionEchecEmprunt::ExceptionEchecEmprunt(std::string phraseErreur) : runtime_error(phraseErreur) { compteur_++; }
#ifndef PERSON_H #define PERSON_H #include <string> struct Person { std::string name; std::string address; std::string getName() const { return name; } std::string getAddr() const { return address; } }; #endif
// Fill out your copyright notice in the Description page of Project Settings. #include "BTService_CheckTargetInRange.h" #include "BehaviorTree/BlackboardComponent.h" #include "Boss.h" #include "BossAIController.h" UBTService_CheckTargetInRange::UBTService_CheckTargetInRange() : Super() { } void UBTService_CheckTa...
#include <iostream> using namespace std; int getNumberOf2(int num) { int power = 1, count = 1; while(num / power >= 10) { power *= 10; count++; } int sum = 0; int prev = 0; while(count > 0) { int digit = num/power; if(digit > 2) sum += (prev+1)*power; else if(digit == 2) sum += (prev*power ...
// // Dough.cpp // TEST // // Created by ruby on 2017. 10. 13.. // Copyright © 2017년 ruby. All rights reserved. // #include "Dough.hpp"
//__BEGIN_LICENSE__ // Copyright (c) 2017, United States Government, as represented by the // Administrator of the National Aeronautics and Space Administration. // All rights reserved. // // The GeoRef platform is licensed under the Apache License, Version 2.0 // (the "License"); you may not use this file except in co...
#include "Stage.h" void printMenu(void); int runMenu(void); int main (void) { CStage firstStage; int menuChoice = 0; bool launchStage = true; while(launchStage){ printMenu(); menuChoice = runMenu(); if (menuChoice == 1){ firstStage.caclulateThrustCoefficient(); firstStage.printCoeff...
#ifndef BLOCSUCCESS_H #define BLOCSUCCESS_H #include "BlocDecorator.h" namespace BehaviourTree { /* Decorator bloc. Bloc that executes its child and always returns success. Whatever the result of its child is */ class BlocSuccess : public BlocDecorator { public: BlocSuccess(BaseBlo...
#include<iostream> #include<algorithm> #include<vector> #include<cstdio> using namespace std; struct cmpr{ bool operator()(pair<int,int> l, pair<int,int> r){ return l.second < r.second; } }cmp; int main(){ int n,s,e,res; res = 1; vector<pair<int,int> > activity; scanf("%d",&n); for(int i = 0;i<n;i++){ scanf("%d %d",&...
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct node { bool isinlist[250]; int count; vector<int> list1; node() { for(int i=0;i<250;i++) { isinlist[i]=false; } count=0; } }; int main() { std::ios::sync_with_stdio(false); int T,N,a,b,p,q; node *player; vector<...
#pragma once /// GraphicsTown2006 // written by Michael - originally written Fall, 2000 // updated Fall, 2005 // updated Fall, 2006 - new texture manager, improvements for behaviors // simple example behaviors - something to learn from #include "../Behavior.H" #include "../Examples/plane.cpp" ////////////////////...
#ifndef CONFIGWINDOW_H #define CONFIGWINDOW_H #include <QWidget> namespace Ui { class ConfigWindow; } class ConfigWindow : public QWidget { Q_OBJECT public: explicit ConfigWindow(QWidget *parent = 0); ~ConfigWindow(); private: Ui::ConfigWindow *ui; }; #endif // CONFIGWINDOW_H
/* -*- 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. * * George Refseth (rfz), Manuela Hutter (manuelah) */ #include "co...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
/* InitCtrls.cpp Source file for file InitCtrls.h @author: Martin Terneborg */ #include "InitCtrls.h" #include <CommCtrl.h> /* Creates a static control with text. @param hWndParent: A handle to the parent window @param text: The text of the control. @param x: The horizontal position of the control. @param...
/* NHB_AD7794.h - Library for using the AD7794 ADC Original created by Jaimy Juliano, December 28, 2010 This file is part of the NHB_AD7794 library. MIT License Copyright (C) 2010,2019 Jaimy Juliano, NHBSystems Permission is hereby granted, free of charge, to any person obtaining a copy of this softw...
#include "aeGraphicsAPI.h" namespace aeEngineSDK { aeConstantBuffer::aeConstantBuffer() { } aeConstantBuffer::aeConstantBuffer(const aeConstantBuffer & B) { *this = B; } aeConstantBuffer::~aeConstantBuffer() { } }
// Created on: 2002-04-15 // 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...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <map> typedef long long LL; typedef unsigned long long ULL; #define PI 3.141592653589...
// Copyright (c) 2007-2015 Hartmut Kaiser // // 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/config.hpp> #include <type_traits> #include <utilit...
/* -*- 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. ** ** Yngve Pettersen ** */ #ifndef _MIMETNEF_H_ #define _MIMETNEF_H...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2007 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * */ #ifndef WANDSECURITYWRAPPER_H #define WANDSECURITYWRAPPER_H ...
// // uzytkownik.cpp // serialowabaza // // Created by Julia on 06.11.2018. // Copyright © 2018 Julia. All rights reserved. // #include <stdio.h> #include <fstream> #include "uzytkownik.h" #include <string> void uzytkownik::changehours(){ std::cout<<"Wprowadź ilość wolnych godzin od poniedziałku do niedzieli...
// // Created by Nikita Kruk on 02.08.18. // #ifndef SPRAPPROXIMATEBAYESIANCOMPUTATION_SPRSYSTEMWITHARBITRARYSTATIONARYVELOCITY_HPP #define SPRAPPROXIMATEBAYESIANCOMPUTATION_SPRSYSTEMWITHARBITRARYSTATIONARYVELOCITY_HPP #include "../Definitions.hpp" #include "SprSystemWithUnitVelocity.hpp" #include "../ParameterSets/A...
/** * @file sum_of_squares_variable_test.cc * @author Gerbrand De Laender * @date 18/02/2021 * @version 1.0 * * @brief E091103, Master thesis, HLS testing * * @section DESCRIPTION * * Test bench for 'sum_of_squares.cc'. * */ #include <stdio.h> #include <stdint.h> #include <hls_stream.h> #in...
#ifndef _ASSETS_FACTORY_H_ #define _ASSETS_FACTORY_H_ #include <memory> #include <string> #include "Enums.h" class PrimitiveBase; class CText; class CAssetsFactory { public: static std::shared_ptr<CText> CreateFont( Fonts::E font ); static std::shared_ptr<PrimitiveBase> CreateModel( Models::E model ); static std:...
#include <iostream> #include <string> #include "stdlib.h" using namespace std; int main() { string commande = ""; while(commande != "exit") { cout << "Tapez un message pour l'afficher ; ou exit pour quitter l'application : " << endl; getline(cin, commande); string commandeComplete = "...
#pragma once #include "IInteractable.h" /* Seed defines what Items it can interact with and what that interaction will be */ class Seed : public IInteractable { public: Seed(); ~Seed() { printf("destroyed seed\n"); } protected: void PopulateInteractables() override; private: void InteractWithHoe(GameObject* a...
// small_eigenvalues_generic.cpp // M. Lujan // Nov 2012 #include "small_eigenvalues_generic.h" #include "small_eigenvalues_generic_template.h" #include "chebyshev_generic.h" #include "cpu_vector.h" #include "vec_eigen_pair.h" namespace qcd { template int HermEigensysCheby(double dError, int iMaxIterations, int ...
#include <fstream> #include "gp_2_opt.h" int main() { ofstream in_pix("input_pixels_regression_result_gp_2_opt.txt"); ofstream fout("regression_result_gp_2_opt.txt"); HWStream<hw_uint<32> > in_update_0_read; HWStream<hw_uint<16> > gp_2_update_0_write; // Loading input data // cmap : { in_update_0[root...
// Created on : Sat May 02 12:41:15 2020 // Created by: Irina KRYLOVA // Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 // Copyright (c) Open CASCADE 2020 // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it un...
#pragma once #include <iberbar/GameEngine/Headers.h> #include <iberbar/Utility/Result.h> namespace iberbar { namespace Paper2d { class CAnimationController; class CGridTerrain; } namespace Game { class __iberbarGameEngineApi__ CPaper2dLoader { public: CPaper2dLoader(); ~CPaper2dLoader(); p...
// // Created by Данил Козловский on 2019-03-27. // #include "triangle.h" Vec2I a; Vec2I b; Vec2I c; triangle::triangle(){ a.setTo(1, 1); b.setTo(1, 3); c.setTo(3, 1); } triangle::triangle(Vec2I aG, Vec2I bG, Vec2I cG){ a = aG; b = bG; c = cG; } Vec2I triangle::getA(){ return a; } Vec2...
#include "wignerSymbols.h" #include <mpi.h> #include <iostream> #include <complex> #include <cmath> #include <map> #include <ctime> #include <chrono> #include "Log.hpp" #include "Model_MPI.hpp" #include "Analysis_MPI.hpp" #include "iniReader.hpp" #include "Bispectrum_MPI.hpp" #include "LISW_MPI.hpp" #include "ODEs.hpp...
#pragma once #include "ListaFichas.h" #include "Ficha.h" #include "Mouse.h" #include "ETSIDI.h" #define M 8 //dimensión del tablero //dimension tablero #define PX_X 800 #define PX_Y 800 using namespace std; class Tablero { private: ListaFichas fichas; public: bool estado_inicial = true; bool inStateHUMAN = fal...
// Copyright 2018 Benjamin Bader // // 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 agree...
#include <cassert> #include <iostream> #include <cmath> #include <cstdlib> #include <string> #include <fstream> #include <sstream> #include <cassert> #include "jacobiMethod.h" using namespace std; double off_diagonal_sum(double** A, int n){ /* Return the root of the square sum of all off-diagonal ele...
/************************************************************************ * @description : 后处理类,包含多种后处理效果 * @author : Oscar Shen * @creat : 2017年4月9日22:47:19 ************************************************************************ * Copyright @ OscarShen 2017. All rights reserved. *************************...
// Author: WangZhan -> wangzhan.1985@gmail.com #pragma once #include <vector> #include "MessagePumpObserver.h" class MessagePump { public: class Delegate { public: virtual ~Delegate() {} virtual bool DoWork() = 0; virtual bool DoDelayedWork(DWORD *pDelayedWork...
#pragma once #include "events.h" #include <functional> namespace sge { namespace events { class EventDispatcher { private: Event& m_Event; public: EventDispatcher(Event& event): m_Event(event) { } template<typename T> void dispatch(std::function<bool(T&)> func) { if ((unsigned int)m_Event.getType() ==...
#pragma once #include "MemoryModule.h" class CMemFunctions { public: CMemFunctions(); ~CMemFunctions(); typedef enum _MEMORY_INFORMATION_CLASS { MemoryBasicInformation }MEMORY_INFORMATION_CLASS, *PMEMORY_INFORMATION_CLASS; typedef struct _CLIENT_ID { PVOID UniqueProcess; PVOID UniqueT...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2011-12 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef UNIX_OPPLUGINTRANSLATOR_H_ #define UNIX_OPPLUGINTRANSLATOR...
#pragma once #include "ray.h" #include "intersectable.h" class sphere : public intersectable { public: sphere(vector3 center, double radius, std::shared_ptr<::material> material); auto intersection_distance(const ray& ray) const -> boost::optional<double> override; auto surface_normal(const vector3& hit_point) co...
#pragma once #include <nclgl\Mesh.h> #include <ncltech\Scene.h> #include <libsim/XPBD.h> class ClothScene1 : public Scene { public: ClothScene1(const std::string& friendly_name); virtual ~ClothScene1(); virtual void OnInitializeScene() override; virtual void OnCleanupScene() override; virtual void OnUpdateS...
/** * @file sensor_base_class.h * * @copyright 2017 3081 Staff, All rights reserved. * * @author Zijing Mo <zijingmo888@gmail.com> */ #ifndef SRC_SENSOR_BASE_CLASS_H_ #define SRC_SENSOR_BASE_CLASS_H_ /******************************************************************************* * Includes ***************...
#include "session.h" #include <iostream> #include <fstream> #include "dbmanager.h" const int FRAME_WIDTH = 350; const int FRAME_HEIGHT = 200; const int BALL_RADIUS = 30; Session::Session(QObject *parent) : worker_(FRAME_WIDTH - 2 * BALL_RADIUS, FRAME_HEIGHT - 2 * BALL_RADIUS), render_(FRAME_WIDTH, FRAME_HEIGHT, B...
#include<bits/stdc++.h> using namespace std; using ll=long long; #define maxn 5005 int n; string op; int numop; int ind=0; int atop=-1; map<int,int> mp; map<int,int> mpind; typedef struct node { int u; ll w; node(int uu=0) { u=uu; w=0; } } node; node gf[maxn]; ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2004 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef MACINTOSH_SYSTEM_H #define MACINTOSH_SYSTEM_H /* wcstomb...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** 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. ** */ #ifndef MODULES_HARDCORE_BASE_OP_P...
export module media; namespace media { export class Correspondence // Buffer, Transaction, Operation, shader { public: virtual ~Correspondence() = default; }; export class View // File, screen, image, .... { public: virtual ~View() = default; }; /...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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. */ #ifndef _SYNC_ST_TRANSPORT_H_INCLUDED_ #define _SYNC_ST_TRANSPORT_...
#ifndef COMPTE_H #define COMPTE_H #include "utilisateur.h" /** @brief La classe Compte. ** ** Elle contient un constructeur, le login et le mot de passe de l'utilisateur associé. ** ** @version 1 ** ** @author P. Marty, M. Labalette, A. Larcher **/ class Compte { private: std::string login; std::strin...
#include <iostream> #include <cstdio> #include <cstdlib> #include <vector> #include <deque> using namespace std; vector<int> S; deque<int> T; int main() { int n,m; int i; scanf("%d%d",&n,&m); if(m==1) { for(i=1;i<=n;i++) printf("%d ",i); return 0; } S.push_back(1); for(i=2;i<=n;i...
class RandomizedCollection { private: vector<int> numbers; unordered_map<int, unordered_set<int> > numToIndices; public: /** Initialize your data structure here. */ RandomizedCollection() { } /** Inserts a value to the collection. Returns true if the collection did not already ...
class DeleteDuplication { public: void deleteAll(ListNode* from, ListNode* to) { } ListNode* deleteV2(ListNode* pHead) { map<int, int> s{}; ListNode* pCur = pHead; for (; pCur != nullptr; pCur = pCur->next) { if (s.count(pCur->val) == 0) s[pCur->val] = 1; else s[pCur->val]++; } ListNode* res =...
#include <iostream> #define MAX 100 using namespace std; int matrix[MAX][MAX]; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int tc; cin >> tc; while(tc--){ int n, m, targ; cin >> n >> m >> targ; int cnt = 0; bool flag = false; for(int i = 1; i <...
#include "ground.h" Ground::Ground(XY pos, XY size, GameManager *game) : Element(pos, size, 1, game) { } void Ground::getHurt(int damage) { //nie otrzymuje obrazen } bool Ground::isInContactWithMe(Element *e) { return false; } void Ground::updateElement() { //nic nie rob }
#include "Inputs.h" const sf::Keyboard::Key Inputs::_keyMap[NUM_KEYS] = { sf::Keyboard::Up, sf::Keyboard::Down, sf::Keyboard::Left, sf::Keyboard::Right, sf::Keyboard::Z, sf::Keyboard::X, sf::Keyboard::Return, sf::Keyboard::BackSpace }; Inputs::Key Inputs::SfmlToGameKey(sf::Keyboard::Key key) { unsigned int ...
#include<iostream> using namespace std; int n,h[10000]; int main(){ cin >> n; for(int i = 0;i < n; i++){ cin >> h[i]; } int temp = 0; int t = 0; for(int i = 0 ;i < n; i++){ for(int j =i+1; j < n ;j+=n){ if(h[i] > h[j]){ temp++; t += temp; } } } cout << t <<endl; return 0; }
// Created on: 1993-06-03 // Created by: Jacques GOUSSARD // 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 G...
#pragma once #include "Player.h" #include "Camera.h" #include "Model.h" #include "Platform.h" #include "CheckpointHandler.h" #include "ViewLayer.h" #include "Lever.h" #include "Portal.h" #include "TemplateRoom.h" #include "finalRoom.h" #include "PyramidRoom.h" #include "KevinsRoom.h" #include "EdvinsRoom.h" #include "T...
// Copyright (c) 2020 The Orbit Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "Path.h" #include <filesystem> #include <string> #include "CoreUtils.h" #include "OrbitBase/SafeStrerror.h" #include "absl/flags/flag.h" #ifd...
#ifndef __SERVER_COMMUNICATING_TCP_SOCKET_H_INCLUDED__ #define __SERVER_COMMUNICATING_TCP_SOCKET_H_INCLUDED__ #include <generic_socket.hpp> namespace server { namespace net { class communicating_tcp_socket : public generic_socket { public: explicit communicating_tcp_socket(int); int recv(char* buff...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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. * * @file * @author Owner: Karianne Ekern (karie) * @author Co...
#ifndef __WPP__QT__ADDRESS_BOOK_CONTACT_EMAIL_H__ #define __WPP__QT__ADDRESS_BOOK_CONTACT_EMAIL_H__ #include <QObject> #include <QString> #include <QLocale> namespace wpp { namespace qt { class AddressBookContactEmail : public QObject { Q_OBJECT Q_PROPERTY(int type READ getType WRITE setType NOTIFY typeChanged) Q...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional>...
#include "_pch.h" #include "BtnProperty.h" /// BtnStringEditor class BtnStringEditor : public wxPGTextCtrlEditor { public: DECLARE_DYNAMIC_CLASS(BtnStringEditor) typedef std::function<bool(wxPGProperty*)> OnBtnFunc; BtnStringEditor(){} virtual ~BtnStringEditor() {} virtual wxPGWindowList CreateControls(wxProp...