text
stringlengths
8
6.88M
// Fill out your copyright notice in the Description page of Project Settings. #include "Hypoxia.h" #include "Flashlight.h" #include "Runtime/Engine/Classes/Components/TextRenderComponent.h" #include "MotionControllerComponent.h" #include "EngineUtils.h" #include "Engine/StaticMeshActor.h" #include "Runtime/Engine/Cla...
#pragma once #include "vect.h" #include "comn.h" #define RAND_SEQ #define SNAP_ON class Par_2 { public: Par_2(int s, int x, int y): spin(s), pos(x, y) {} template <typename TRan> Par_2(TRan &myran, const Vec_2<int> &l); template <typename TRan> Par_2(TRan &myran, const Vec_2<int> &l, int s, const V...
#include <QCoreApplication> #include "AutoTest.h" #include "easylogging++.h" INITIALIZE_EASYLOGGINGPP //Initialize logging int main(int argc, char** argv) { QCoreApplication application(argc, argv); Q_UNUSED(application); return AutoTest::run(argc, argv); }
/******************************** * Reef-Life Aquarium Controller * * Versión 3.0.0 - 201506 * * Declaraciones * ********************************/ /******************************** * Includes - Libraries * ********************************/ #include <Adafruit_GFX.h> #include <Adafruit_TF...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; 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 CHAT_NETWORKS_H #define CHAT_NETWORKS_H # include "module...
#ifndef DIALOG_RES_HPP_ #define DIALOG_RES_HPP_ #include <windows.h> #include <vector> #include "id_string.hpp" #include "ByteStream.hpp" #include "ConstantsDB.hpp" #include <pshpack2.h> // the header of RT_DIALOG (DIALOGEX) typedef struct DLGTEMPLATEEXHEAD { WORD dlgVer; WORD signature;...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #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> #inc...
/** * Copyright (c) 2013, 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...
#pragma once #include "pch.h" #include "common.h" #include "ray.h" #include <algorithm> #include <iostream> struct AABB { Vec3 start, end; AABB(Vec3 start, Vec3 end) : start(start), end(end) {} AABB() {} inline bool parallel(float dir) const { return abs(dir) < 1e-9; } inline void swapmin(float & a, floa...
/* -*- 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 SVG_SUPPORT #include "modules/svg/s...
// // Created by faris on 5/5/2020. // #include "mylibrary/Shape.h"
// -*- Mode: C++ -*- // mccparser.cc // Copyright � 2000-04, 07 Laboratoire de Biologie Informatique et Th�orique. // Author : Martin Larose // Created On : Fri Aug 25 16:28:36 2000 // $Revision$ // $Id$ // cmake generated defines #include <config.h> #include <math.h> #i...
#include "gtest/gtest.h" #include "../header/rectangle.hpp" TEST(AreaTest, AreaStandard){ Rectangle* rect = new Rectangle(3,4); EXPECT_EQ(rect->area(),12); delete rect; } TEST(AreaTest, AreaZero){ Rectangle* rect = new Rectangle(0,0); EXPECT_EQ(rect->area(),0); delete rect; } TEST(AreaTest, AreaNeg){ Rectangl...
#include<iostream> #include<queue> #include<stack> #include<vector> #include<stdio.h> #include<algorithm> #include<string> #include<string.h> #include<sstream> #include<math.h> #include<iomanip> #include<map> using namespace std; #define N 1005 int t[N], year[N], dp[N]; char sign[N]; int n,cnt,mm, dd, HH, MM,cur,start...
// Copyright (c) 2017 Mozart Alexander Louis. All rights reserved. // Includes #include "base_scene.hxx" #include "utils/archive/archive_utils.hxx" BaseScene::BaseScene(const ValueMap& params, BackgroundLayer* bg) : sprite_manager_(nullptr), menu_manager_(nullptr), text_manager_(nullptr), params...
// Created on: 1999-06-10 // Created by: Vladislav ROMASHKO // Copyright (c) 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 ...
#ifndef WINDOWOPENTEXTFILE_HH_ #define WINDOWOPENTEXTFILE_HH_ #include "WindowOpenFile.hh" #include "str.hh" /** A pop-up window to open a text file. */ class WindowOpenTextFile : public WindowOpenFile { public: WindowOpenTextFile(const PG_Widget *parent, std::string &content) : WindowOpenFile(parent, "O...
#ifndef RGB_H #define RGB_H #include <Arduino.h> class RGB { private: byte _r; byte _g; byte _b; byte _l; int _hue; int _stu; int _lua; public: RGB(); RGB(byte *); RGB(byte, byte, byte); RGB(byte, byte, byte, byte); RGB hex2rgb(uint32_t); RGB hsl2rgb(uint16_t, uint8_t, uint8_t); uint8_t h...
#pragma once #include "Texture.h" class Texture2D : public Texture { public: Texture2D(std::string filename, bool mipmapped = false, bool flipVertically = true); /* Internal -GL_R32F -GL_R32I -GL_RGBUI -GL_RGBA32F Format -GL_RED -GL_RED_INTEGER -GL_RGB_INTEGER -GL_RGBA Type -GL_UNSIGNED_BYTE -GL_FL...
// LexemesList.h #ifndef PARSER_PARSER_LEXEMES_LIST_H #define PARSER_PARSER_LEXEMES_LIST_H #include <vector> #include <parser/lexemes/Lexeme.h> namespace parser { class LexemesList { private : typedef std::vector< Lexeme::SharedPointer > LexemesVector; public : explicit LexemesList( cons...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> #include <map> using namespace std; typedef long long ll; #define INF 10e17 // 4倍しても(4回足しても)long longを溢れない #de...
#include "color_cvt.hpp" #include <imgui.h> #include "../slots/mat.hpp" namespace dt::df::plugin::opencv { ColorCvtNode::ColorCvtNode(IGraphManager &graph_manager) : BaseNode{graph_manager, kKey, kName, Slots{CreateInputs(graph_manager)}, Slots{CreateOutputs(graph_manager)}} { initSlots(); } ColorCvtNode::Colo...
/* -*- 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 DOM_EXTENSIONS_BROWSERWINDOWS_H #define DOM_EXTENSIONS_BROW...
// Copyright (c) 2021 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 "pch.hpp" #include "assert.hpp" #include <iostream> void yama::detail::assertion_handler( char const* condition , char const* file , int line , char const* function ) { std::cout << condition << file << line << function << std::endl; }
// // Piece.hpp // MirrorChess // // Created by Sergio Colado on 22.04.20. // Copyright © 2020 Sergio Colado. All rights reserved. // #ifndef Piece_hpp #define Piece_hpp #include <stdio.h> #include <SFML/Graphics.hpp> using namespace std; using namespace sf; class Piece { private: string type; // TODO: ...
#include <bits/stdc++.h> #define N 8 using namespace std; int row[N] = {0, 1, 2, 3, 4, 5, 6, 7}; pair<int,int>solve[92][8]; bool can(); int main() { int TC, a, b, cont = 0, ct2 = 1; do { if(can()) { for(int i=0;i<N;i++) solve[cont][i].first = i, solve[cont][i].sec...
/* * BearLibTerminal * Copyright (C) 2013-2017 Cfyz * * 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, modif...
// Standard Includes #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/select.h> #include <unistd.h> // Mutha-fuckin, OpenGL, bitches! #include <GL/glew.h> #include <GLFW/glfw3.h> GLFWwindow * window; #include <glm/glm.hpp> // C++ shit that I don't really understand. #include <string> #incl...
#include <iostream> using namespace std; int i,j; /** Triangle V1**/ int RightTrianle(int number){ for(i=0;i<number;i++){ for( j=i;j<number;j++) { cout<<"*"; } cout<<endl; } return 0; } /** Triangle...
//#include <iostream> //#include <vector> //using namespace std; // //#define MAX_AIM 5000 //#define MAX_SIZE 5000 // //// todo 下标越界 //class Solve { //public: // static int gan(vector<int>& arr, int aim) { // if (arr.size() == 0 || aim == 0) return 0; // int n = arr.size(); // // vector<vector<int>> dp(n, vector<in...
#ifndef H_ACCEL #define H_ACCEL #define SMOOTH_WINDOW_SIZE 10 #include "MPU6050.h" #include "vector.h" class AccelSensor { public: virtual void initialize() = 0; virtual void get_accel(Vector *accel) = 0; virtual void get_accel_gyro(Vector *accel, Vector *gyro) = 0; }; class SimpleAccelSensor : public AccelSe...
/////////////////////////////////////////////////////////////////////// // Wendy - a simple game engine // Copyright (c) 2007 Camilla Berglund <elmindreda@elmindreda.org> // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any // damages a...
#pragma once #include "BaseProcess.h" class OperateCardProc :public BaseProcess { public: OperateCardProc(); virtual ~OperateCardProc(); virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket, Context* pt); virtual int doResponse(CDLSocketHandler* clientHandler, InputPacket* inputPacket...
#ifndef AWS_EXCEPTION_H #define AWS_EXCEPTION_H /* * aws/exception.h * AwesomeScript Exception * Author: Dominykas Djacenka * Email: Chaosteil@gmail.com */ #include <string> namespace AwS{ //! Used for throwing errors of the Tokenizer, Parser and Translator. /*! * Each error has its own error code used to d...
// // split.cpp // Test // // Created by Mikołaj Semeniuk on 03/08/2020. // Copyright © 2020 Mikołaj Semeniuk. All rights reserved. // #include "split.hpp" #include <iostream> #include <vector> #include <string> std::vector<std::string> split (std::string stringToSplit, std::string patternToSearchFor) { std::...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // // Программа для запоминания английских слов // V 1.0 beta // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- // #include<iostream> #include<string> #include<cstdlib> // Библиотека таймера #include<ctime> // Преобр...
// 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 <iostream> #include<conio.h> #include<stdio.h> using namespace std; int main() { //Phan doc du lieu File Tu file da cho truoc //Khai bao FILE *FileIn; //Mo file FileIn=fopen("INPUT.txt","r"); //Dong file int a; int b; fscanf(FileIn,"%d",&a); fscanf(FileIn,"%d",&b); ...
#include <cassert> #include "CommentRecord.h" #include <fstream> #include "StreamUtilities.h" using namespace std; using namespace OpenFlight; //------------------------------------------------------------------------- CommentRecord::CommentRecord(PrimaryRecord* ipParent) : AncillaryRecord(ipParent) {} //-----------...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #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> #inc...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; struct dat{ int x,y; }; const int INF = 1e7; dat a[500100]; int f[500100]; bool cmp(dat a,dat b)...
#include "gtest/gtest.h" #include "../../black_scholes/BlackScholesMertonPut.hpp" TEST(BlackScholesRegPut, S0) { BlackScholesMertonPut bs(0.00, 10., 0.05, 0.2, 6. / 12); EXPECT_NEAR(bs.calculate(0.0), 9.7531, 0.0001); } TEST(BlackScholesRegPut, S1) { BlackScholesMertonPut bs(4.00, 10., 0.05, 0.2, 6. / 12)...
// // Created by jan on 08.10.20. // #ifndef SOLUTION_KOMPLEXNUMBERCALCULATOR_H #define SOLUTION_KOMPLEXNUMBERCALCULATOR_H #include "../Entity/ComplexNumber.h" class KomplexNumberCalculator { public: ComplexNumber plus(ComplexNumber a, ComplexNumber b); ComplexNumber minus(ComplexNumber a, ComplexNumber b);...
#include "Dfa.h" Dfa::Dfa() { } Dfa::Dfa(Nfa& NfaGraph) { } DfaStatusBase* Dfa::NfaStatusBaseToDfa(NfaStatusBase* Object) { DfaStatus NewDfaStatus; NewDfaStatus.New(); NewDfaStatus.Data->Data.Add(Object->Data.StatusNumber); if (Object->FinalStatus) NewDfaStatus.Data->FinalStatus=1; return New...
// // Created by OLD MAN on 2020/1/6. // //#include<bits/stdc++.h> #include <iostream> using namespace std; int main(){ int n,m; cin>>n>>m; bool a[n]; int w=1; for(int i=0;i<n;i++){ a[i]=true; } for(int i=1;i<=m;i++){ if(i==1){ for(int j=0;j<n;j++){ ...
#ifndef CHAYITUTIQUDIALOG_H #define CHAYITUTIQUDIALOG_H #include <QDialog> namespace Ui { class ChayitutiquDialog; } class ChayitutiquDialog : public QDialog { Q_OBJECT public: explicit ChayitutiquDialog(QWidget *parent = 0); ~ChayitutiquDialog(); private: Ui::ChayitutiquDialog *ui; }; #endif // C...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
// Cpp20Features.cpp : This file contains the 'main' function. Program execution begins and ends there. // //#include <vld.h> #include <iostream> #include <ranges> #include <future> #include <coroutine> #include <thread> #include <chrono> #include <random> #include <exception> #include <memory_resource> #include <queu...
#include<iostream> #include<string.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int t, q, x, y, n_length, m_length; string n, m; bool table[1001][1001]; cin >> t; for(int i = 0;i < t; i++) { cin >> m >> n; n_length = n.length(); ...
/* vim: set ai noet ts=4 sw=4 tw=115: */ // // Copyright (c) 2014 Nikolay Zapolnov (zapolnov@gmail.com). // // 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 w...
#include <iostream> #include <vector> using namespace std; int main(void){ int N; cin >> N; vector<int> A(N); for(int i=0; i<N; i++){ cin >> A[i]; } vector<int> ans(N); for (int i=0; i<N; i++){ ans[A[i] - 1] = i + 1; } for(int i=0; i<N; i++){ cout << ans[i];...
#ifndef SPEECH_HH_ # define SPEECH_HH_ #include "utils.hh" class SpeechTab { public: void createSpeechTab (GtkWidget *p_notebook_); static SpeechTab *instance (); static string speechText; static GtkWidget *speech_edit; static GtkWidget *button_speech; static string speech_lang_; private: static SpeechTab *S...
/************************************************************************************** * File Name : LevelSystem.h * Project Name : Keyboard Warriors * Primary Author : Doyeong Yi * Secondary Author : * Copyright Information : * "All content 2019 DigiPen (USA) Corporation, all rights reser...
// // Created by Zakhar on 16/03/2017. // #pragma once #include <string> #include <fstream> #include <vector> #include <armadillo> namespace MathIO { class MatrixReader { private: std::ifstream file; std::string buffer; std::vector<double> rowContainer; char separator; bool fileopen; publ...
#ifndef __TEST_GAMESERVER_H__ #define __TEST_GAMESERVER_H__ #include <iostream> #include "servant/Application.h" using namespace taf; class TestGameServer:public Application { public: TestGameServer(); ~TestGameServer(); virtual void initialize(); virtual void destroyApp(); }; extern TestGameServer g_a...
#ifndef VECTOR_H #define VECTOR_H #include <iostream> #define DEFAULT_SIZE 3 #define MAX_SIZE 100000 using namespace std; // The class declaration must have doxygen comments – put these in template <class T> class Vector{ public: Vector(int length = DEFAULT_SIZE); ~Vector(); // basic int Size() { return len; }...
#include "am_pm_clock.h" // Default constructor: sets time 12.00.00 am am_pm_clock::am_pm_clock() : hours(12), minutes(0), seconds(0), am(1) {} // Constructor: sets time to the assigned values // throws exception, if the values are unacceptable: hrs>12, mins<0, & etc. am_pm_clock::am_pm_clock(unsigned int hrs, uns...
#include <SparkFun_ADXL345.h> // SparkFun ADXL345 Library ADXL345 adxl = ADXL345(); // USE FOR I2C COMMUNICATION void setup(){ Serial.begin(9600); // Start the serial terminal Serial.println("SparkFun ADXL345 Accelerometer Hook Up Guide Example"); Serial.println(); adx...
#ifndef _PushDefineLackProc_H_ #define _PushDefineLackProc_H_ #include "BaseProcess.h" class PushDefineLackProc :public BaseProcess { public: PushDefineLackProc(); virtual ~PushDefineLackProc(); virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context* pt) ; virtual int doResp...
#include "waitForTouchSensorGenerator.h" using namespace qReal; using namespace robots::generator; void WaitForTouchSensorGenerator::generateBodyWithoutNextElementCall() { int const port = mNxtGen->mApi->stringProperty(mElementId, "Port").toInt(); mNxtGen->mGeneratedStrings.append(SmartLine( "while (!ecrobot_g...
#include<iostream> int main () { int skizbJam; int skizbRope; int verjJam; int verjRope; char a; /* a-n ':' simvoln e */ std::cout<<"Nermucvac jamanakahatvacy petq e lini 1:0 -ic minchev 12:59 intervalum\n"; std::cout<<"Nermuceq skzbnakan jamanaky m:s formatov "; std::cin>>skizbJam>>a...
#include "kompute/Tensor.hpp" namespace kp { Tensor::Tensor() { SPDLOG_DEBUG("Kompute Tensor base constructor"); this->mTensorType = TensorTypes::eDevice; } Tensor::Tensor(const std::vector<float>& data, TensorTypes tensorType) { #if DEBUG SPDLOG_DEBUG("Kompute Tensor constructor data length: {}, and ty...
#include <bits/stdc++.h> using namespace std; int main() { int n, num, k, lim; unsigned long long int fat; char s[23]; scanf("%d", &n); while(n--) { fat = 1; scanf("%d%s", &num, s); k = strlen(s); lim = (num-1)/k; for(int i=0;i<=lim;i++) fat*=n...
#ifndef DRONE_H #define DRONE_H #include <UtH/UtHEngine.hpp> #include "Stat.h" class Drone : public uth::Component { uth::GameObject* m_target = nullptr; uth::Timer m_clock; Stat<float> m_Reload{ 0, 100 }; float m_ReloadSpeed = 75.0f; float m_maxRange = 250.0f; float m_FiringAngleTolerance = 10.0f; float m_...
#pragma once #include <NDT/Tensor.h> #include <NDT/Util.h> namespace NDT { namespace internal { inline std::mt19937 & Generator() { static std::random_device randomDevice; static std::mt19937 generator(randomDevice()); return generator; } } // namespace internal template <uint D, typename Scalar> inli...
// // Created by tudom on 2019-12-31. // #pragma once // std headers #include <string> #include <vector> #include <optional> // project headers #include "_api.hpp" #include "FunctionTypes.hpp" namespace info::dynamite { struct INFO_DYNAMITE_API DynamicFunction; struct INFO_DYNAMITE_API DynamicLibrary { /...
#include <iostream> #include <fstream> #include <string> #include <cstring> using namespace std; class space; class cmd{ public: int rows; int cols; string cmds; int col_pos; }; class blocks{ public: friend space; blocks(){ height=0; heigh...
#pragma once #include"Builder.h" class Director{ public: Director(); virtual ~Director(); Product* Construct(); void SetBuilder(Builder* builder); private: Builder* m_pBuilder; };
// // Created by manout on 17-12-22. // #include <iostream> #include <string> using std::cin; using std::cout; using std::string; const char* hex_char_to_bin(char c) { switch(toupper(c)) { case '0': return "0000"; case '1': return "0001"; case '2': return "0010"; case '3': return "0011"; case '4': return...
#include<iostream> #include "omp.h" using namespace std; int main(){ int nthreads; int tid; #pragma omp parallel private(tid) { tid = omp_get_thread_num(); printf("hello %d\n", tid); #pragma omp for for(int i=0; i<100; i++){ cout << "haha" << tid << " " << endl; } } }
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Вычисление значения функции у = –2,7x3 + 0,23x2 – 1,4 // V 1.0 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// #include <iostream> #include <cmath> int main() { double oneNum { -2.7 }; double twoNum { 0.23 }; double threeNum...
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved. #include "Capstone.h" #include "Modules/ModuleManager.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Capstone, "Capstone" );
// STLAlgorithmsDlg.h : header file // #pragma once #include "Manager.h" // CSTLAlgorithmsDlg dialog class CSTLAlgorithmsDlg : public CDialogEx { private: void initalizeCatalogs(); void UpdateOperationsList(int selIndex); // Construction public: CSTLAlgorithmsDlg(CWnd* pParent = nullptr); // standard constructo...
 #pragma once #include <string> #include <vector> #include <map> class RedisAccess; struct GameServerInfo; namespace RedisLogic { // offline redis bool setPlayerOffline(RedisAccess* redis, int uid, int gameid, int level, int winscore, const std::string& overtime); std::string getPlayerOffline(RedisAccess* redis...
#include "Numero.h" #include <iostream> using namespace std; void Numero::verificaDatos(void){ if(a<0 || a>2147483647){ a = 0; } this->calculaBinario(); } Numero::Numero(void){ a = 0; } Numero::Numero(int a){ this->a = a; this->verificaDatos(); } void Numero::muestraTusDatos(void){ cout << "Decimal: " << a <...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> int n; std::vector<int> columns; int dfs(int col) { int ans{}; if (col == n) { return 1; } for (int i = 0; i < n; ++i) { bool flag = false; for (int j = 0; j < col; ++j) ...
#include "InputSystem.h" #include "UserInput.h" #include "Key.h" #include "Player.h" #include "GLFW/glfw3.h" const float c_threshold = 0.8f; const float tilt_threshold = 0.1f; const float smash_threshold = 0.9f; void update_input_system(Player* player) { update_gamepad_state(player->ID); InputComponent& input = p...
#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 10e17 // 4倍しても(4回足しても)long longを溢れない #define rep(i,n) f...
//------------------------------------------------------------------------------ /* 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...
#include "bits/stdc++.h" using namespace std; int main() { int T; cin>>T; while(T--){ string avg; cin>>avg; int size=avg.size(); auto pos=avg.find("."); int count=0; string decavg=""; if(pos!=string::npos){ count=(size-1)-pos; decavg+=avg...
/* -*- 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. */ #ifndef __URL_REL_REP_H__ #define __URL_REL_REP_H__ class DataFi...
// Created on: 1992-05-06 // Created by: Laurent BUCHARD // 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 GN...
#include <loam_velodyne/laserOdometryLib.h> #include <pcl/filters/filter.h> void LaserOdometry::run(LaserOdometry::Inputs &inputs, LaserOdometry::Outputs &outputs) { std::vector<int> pointSearchInd; std::vector<float> pointSearchSqDis; cv::Mat matP(6, 6, CV_32F, cv::Scalar::all(0)); if(laserCloudCornerLast->...
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), le...
#include <iostream> #include <functional> #include <type_traits> #include <utility> struct X { int foo() {return 0;} }; int bar(int x) { return x + 1; } int main() { std::cout << std::boolalpha; std::cout << std::is_function_v<X> << std::endl; std::cout << std::is_function_v<int()> << std::endl; ...
#ifdef USES_C002 // ####################################################################################################### // ########################### Controller Plugin 002: Domoticz MQTT ###################################### // #####################################################################################...
// // Created by OLD MAN on 2020/1/6. // //小蒜蒜最近学习了菲波那契数列。 // //菲波那契数列是指这样的数列:数列的第一个和第二个数都为 1,接下来每个数都等于前面 2 个数之和。 // //给出一个正整数 k,要求菲波那契数列中第 k 个数是多少。 // //输入格式 // 输入一行,包含一个正整数 k。(1 ≤ k ≤ 46) // //输出格式 // 输出一行,包含一个正整数,表示菲波那契数列中的第 k 个数。 /* * 此方法运行超时 */ //#include <iostream> //using namespace std; // //in...
/* leetcode 379 * * * */ #include <vector> #include <deque> #include <algorithm> #include <list> using namespace std; class PhoneDirectory { public: /** Initialize your data structure here @param maxNumbers - The maximum numbers that can be stored in the phone directory. */ PhoneDirectory(int maxNu...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define show(x) for(auto i: x){cout << i << " ";} #define showm(m) for(auto i: m){cout << m.x << " ";} typedef long long ll; typedef pair<int, int> P; int main() { int n, k; cin >> n >> k; ...
#ifndef _BOX_H #define _BOX_H #include "geom/geometry.h" class Box : public Geometry { public: Box(); Box(float _size); ~Box() {}; float dist(glm::vec3 *pt, glm::vec3 *dir = NULL); void debug(); private: float size; }; #endif
/* -*- 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. ** */ #ifndef DOM_DOCTYPE_H #define DOM_DOCTYPE_H #include "modules...
class Tree { public: Tree(); void insert(int val); void remove(int val); int getMin(); int getMax(); int getCount(int val); void dump(); private: class Node { public: //Constructor Node(int val); int data; int count; Node* left; Node* right; }; void dumpTree(Node* p); Node* insert(Nod...
/* Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of each month, such as June or July, and the amount of rain (in inches) that fell each month. The program should display a message similar to the following: The average rainfall for June, July, ...
// // Created by xukexin on 2019/4/15. // #ifndef CLOSESTPOINTS_POINT_H #define CLOSESTPOINTS_POINT_H class Point { int x, y; public: Point(); Point(int x_v, int y_v); int getX(); int getY(); void setXY(int x_v, int y_v); double getDisTo(Point &p); }; class PGroup { int n; Point ...
#ifndef PYTHIA_WRAPPER_H #define PYTHIA_WRAPPER_H #include "simpleLogger.h" #include "Pythia8/Pythia.h" #include "workflow.h" #include <sstream> #include "predefine.h" #include "random.h" using namespace Pythia8; class PGunWShower{ public: PGunWShower(std::string f_pythia, std::string f_trento, ...
/* * to dump the class layout: * clang++ -cc1 -fdump-record-layouts main0.cpp */ #include <iostream> #include <vector> #include <string> #include <array> #define println(x)\ std::cout << #x " = " << x << std::endl struct Readout { int value; char seq, hour; }; struct Address { std::string name; ...
#include <QCoreApplication> #include <QString> #include <iostream> /** * Test code to get a environment variable in Windows */ int main(int argc, char* argv[]) { QCoreApplication app(argc, argv); const QString envVar = "path"; // the name of the evnironment variable for which we want the value char* pEnvVarVal =...
#include "stdafx.h" #include "WinThread.h" WinThread::WinThread(const tstring &csThreadName) : m_csThreadName(csThreadName) , m_bStarted(false) , m_bStopping(false) , m_dwThreadID(0) , m_hThreadHandle(NULL) { } WinThread::WinThread(const tstring &csThreadName, const Options &options) : m_Options(option...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Components/ActorComponent.h" #include "MMOTypes.h" #include "MMOActionComponent.generated.h" UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent), blueprintable, blueprintType ) ...