text
stringlengths
8
6.88M
#if 0 //#include <boost/test/unit_test.hpp> //#include <boost/geometry/geometry.hpp> //#include <sstream> //#include <Pointer.h> // //#include "IModel.h" //#include "../model/Box.h" // //// Procentowy dopuszcalny błąd w porównaniach doubli. //#define CLOSE 0.0000001 // //using namespace boost; //using namespace boost::...
/* -*- 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. * * @author Petter Nilsen (pettern) */ #include "core/pch.h" #if ...
#include "pch.h" #include "GameApp.h" #include "Window.h" #include "MapRepresentation/Tilemap.h" #include "GameObject.h" #include "MapRepresentation/GameObjectGridMap.h" #include "Components/Transform.h" #include "Components/SpriteRenderer.h" #include "Components/Input.h" #include "Components/Orientation.h" #include "...
#include <string> #include <vector> #include "UserLibrary.h" #include "PlaylistLibrary.h" #include "recordingLibrary.h" #include "songLibrary.h" #include "trackLibrary.h" //#include "RecordingLibrary.h" using namespace std; class Controller{ public: void receiveParse(vector<string> information); ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2006 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_UTIL_PATH_H #define MODULES_UTIL_PATH_H #ifdef U...
class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { int n = numbers.size(), i = 0, j = n - 1; while(i < j){ if(numbers[i] + numbers[j] < target){ ++i; }else if(numbers[i] + numbers[j] > target){ --j; ...
/** * @file valknut/core/internal/platform/cygwin.hpp * * @brief This header detects features for the Cygwin platform * * @note This is an internal header file, included by other library headers. * Do not attempt to use it directly. */ /* * Symbols Defined: * * VALKNUT_PLATFORM_CYGWIN ...
/**************************************************************************** Copyright (c) 2016 QuanNguyen http://quannguyen.info 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 r...
#pragma once #include "ARPG.h" #include "Engine/LevelScriptActor.h" #include "Util/ObjectPool/ObjectPool.h" #include "BaseLevelScriptActor.generated.h" UCLASS() class ARPG_API ABaseLevelScriptActor : public ALevelScriptActor { GENERATED_BODY() private: TSubclassOf<class APoolableParticle> PoolableParticleClass; ...
/******************************************************************************** ** Form generated from reading UI file 'affichestr2str.ui' ** ** Created by: Qt User Interface Compiler version 4.8.6 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ************************************...
/* * @Description: 不滤波 * @Author: Ren Qian * @Date: 2020-02-09 19:37:49 */ #ifndef LIDAR_LOCALIZATION_MODELS_CLOUD_FILTER_NO_FILTER_HPP_ #define LIDAR_LOCALIZATION_MODELS_CLOUD_FILTER_NO_FILTER_HPP_ #include "lidar_localization/models/cloud_filter/cloud_filter_interface.hpp" namespace lidar_localization { class N...
#include <iostream> #include <vector> using namespace std; bool vis[100001]; int ans = 0; int a[100001]; vector<int> d[100001]; int n, m; void dfs(int node, int count) { if(a[node] == 1) { count += 1; } else { count = 0; } if(count > m){ return ; } vis[node] = tr...
#include "not.h" #include "constant.h" #include "and.h" #include "or.h" #include "imp.h" #include "iff.h" Not::Not(const Formula &op) : UnaryConnective (op) {} std::ostream &Not::print(std::ostream &out) const { out << "~"; return operand()->print(out); } Formula Not::substitute(const Formula &what, cons...
/* ** EPITECH PROJECT, 2019 ** tek3 ** File description: ** ContactList */ #include "ContactList.hpp" namespace babel { namespace graphic { ContactList::ContactList(std::vector<DataUser> &data, std::vector<std::string> &friends, QWidget *parent) : QWidget(parent) { _selectedIndex = -1;...
// BenchmarkArrayDataStructures.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <string> #include <iostream> #include "..\TieredVector\K2TieredVector.cpp" #include "..\TieredVector\TieredVector.cpp" #include <set> #include <vector> #include <iostream> #include <fstream> #inc...
ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { if(l1 == nullptr && l2 == nullptr){ return NULL; } if(l1 == nullptr) return l2; if(l2 == nullptr) return l1; ListNode* p1 = l1; ListNode* p2 = l2; ListNode head(0); ListNode* runner = &head; while(p1 && p2 ) { if ...
//detect if there is a loop in linked list #include <iostream> using namespace std; typedef struct Node { int key; Node *next; Node(int x) { key = x; } } Node; Node *insert(Node *head, int key) { Node *temp = new Node(key); temp->next = head; return temp; } void printList(Node *...
#include <fhandle.h> #include <algorithm> // To judge if a char is number or '.' bool isNumber(const char& ch) { return ( (ch >= '0' && ch <= '9') || ch == '.'); } // To judge if a char is letter bool isLetter(const char& ch) { return ( (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ); } // To judge if...
// Created on: 1992-01-22 // Created by: GG // Copyright (c) 1992-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser Gen...
#include "stdafx.h" #include "ConstantBufferGPU.h" ConstantBufferGPU::~ConstantBufferGPU() { if (m_constantBuffer != nullptr) { m_constantBuffer->Release(); } } void ConstantBufferGPU::Create(const void* pInitData, int bufferSize) { //作成する定数バッファの情報を設定する。 D3D11_BUFFER_DESC bufferDesc; ZeroMemory(&bufferDesc, s...
#include<iostream> #include<string> using namespace std; class node { public: node(); public: string name; node *next; }; class list { public: list(); ~list(); void output(node*); void input(node*,string); void del(node*); };
//http://codeforces.com/problemset/problem/431/C #include <iostream> using namespace std; const int mod = 1e9 + 7; int main() { int n, k, d; cin >> n >> k >> d; long long dp[n + 1][2]; dp[0][0] = 1; dp[0][1] = 0; for(int tot = 1; tot <= n; tot++) { dp[tot][0] = dp[tot][1] = 0; for(int weight = 1; weight <= ...
#pragma once #include <iberbar/Renderer/Resource.h> namespace iberbar { namespace RHI { class IShader; } namespace Renderer { class __iberbarRendererApi__ CShaderProgram : public CRenderResource { public: CShaderProgram( RHI::IShader* pVS, RHI::IShader* pPS, RHI::IShader* pHS, RH...
/* merger sort algorithms imply zhou xiaoping 2013-06-05 */ #include<stdlib.h> #include<stack> //2013-10-03 #include"head_info.h" void mergeArray(int a[],int first,int middle,int last,int temp[]) { //combine two ordered arrays to the array c[] int i=first,j=middle+1,k=0; while(i<=middle && j<=last) { if( a[i...
#include <RFM69.h> #include <RFM69_ATC.h> #include <SPIFlash.h> #include <SPI.h> #include "U8glib.h" U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); #define NODEID 1 //Node ID yang digunakan, Gateway = 1 #define NETWORKID 100 //Network ID yang digunakan, rentang 2 sampai 26...
/* This file is part of FineFramework project */ #ifndef FFW_UTILS_STRING_MATH #define FFW_UTILS_STRING_MATH #include <string> #include <sstream> #include <vector> #include <algorithm> #include <stdexcept> #include <cstdint> #include "config.h" #include "third_party/utfcpp/checked.h" #include "tokenizer.h" namespace f...
#ifndef __SIGNIN_HEAD__ #define __SIGNIN_HEAD__ #include "User.h" const int Max=100; enum Error_code { success,wrongPassword,notPresent,alreadyPresent,recordOverflow,recordUnderflow }; class SignIn{ private: User* user_list; int count; protected: bool checkPresent(const User& new_user,int& posi...
#include<stdio.h> #include<conio.h> #include<malloc.h> int max(int a, int b){ if (a > b) return a; return b; } int maxSubArraySum(int a[], int size) { int max_so_far = a[0]; int curr_max = a[0]; for (int i = 1; i < size; i++) { curr_max = max(a[i], curr_max + a[i]); max_so_far = max(max_so_far, curr_max); ...
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2009-2010. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #ifndef _IOVTKGDCM_DICOMPATIENTDBREADERSERVICE_HPP_ #define _IOVTKGDCM_DIC...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; 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 ** */ #ifndef __SSLLOADTEMP_H #define __SSLL...
#include <catch2/catch.hpp> #include <LGB-methods.h> using namespace LGBm; TEST_CASE("LGB LGB()", "[]") { LGB<int> quantizer; REQUIRE(quantizer.rate > 0); REQUIRE(quantizer.nDimension > 0); REQUIRE(quantizer.threshold > 0); REQUIRE(quantizer.maxRuns > 0); REQUIRE(quantizer.maxZeroRuns > 0); } TEST_CASE("L...
// BEGIN CUT HERE // PROBLEM STATEMENT // There's a shoe store in which some models are popular, and // some are not. In order to sell more unpopular models, the // store introduced a system of discounts. Each discount // works in the following way: if you buy an unpopular model // for a cost of COST, then you can ...
#include <iostream> #include <SFML/Graphics.hpp> #include "Player.h" #include "Platform.h" void resizeView(const sf::RenderWindow &window, sf::View &view){ float aspectRatio = (float)window.getSize().x / (float)window.getSize().y; view.setSize(Player::VIEW_HEIGHT * aspectRatio, Player::VIEW_HEIGHT); } int ...
#include "dedvs.h" #include "dedvs_impl.h" #include <vector> #include <atomic> #include <thread> #include <mutex> #include <functional> #include <chrono> #include <boost/format.hpp> //OpenNI #include "OpenNI.h" //EDVSTOOLS #include "Edvs/Event.hpp" #include "Edvs/EventStream.hpp" //XTION OPENCV INTEROPERABILITY L...
// -*- 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 BT_PACKET_H #define BT_PACKET_H // ----------------------...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2010 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Author: Jan Borsodi, Anders Ruud */ #include "core/pch.h" #ifdef S...
class Solution { public: vector<vector<int>> ans; void solve(vector<int> &nums, int begin){ if(begin == nums.size()){ ans.push_back(nums); return; } for(int i = begin; i < nums.size(); i++){ swap(nums[i], nums[b...
#include <iostream> using namespace std; //Type //Name void Test () { cout << "Hello" << endl; } int Test2 () { return 50; } int Test3 (int a) { int c = a + 10; return c; } int Sum (int a, int b) { return a + b; } int main() { Test(); //cout << Test2() << endl; int a = Test2(); cout << a << en...
#pragma once #include <System.h> #include <list> namespace breakout { class ColliderComponent; class CollisionSystem : public BaseSystem { public: static EBaseSystemType GetType() { return EBaseSystemType::Collision; } CollisionSystem(); virtual...
/* * Copyright (C)2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia * Author: Marco Randazzo * email: marco.randazzo@iit.it * Permission is granted to copy, distribute, and/or modify this program * under the terms of the GNU General Public License, version 2 or any ...
#ifndef SOLITAIRE_H #define SOLITAIRE_H #include <string> #include <vector> #include <random> enum Suit { HEART = 1, DIAMOND = 2, CLUB = 3, SPADE = 4 }; enum Colour { RED, BLACK }; enum Rank { J = 11, Q = 12, K = 13, A = 1 }; enum Direction { UP, DOWN, LEFT, RIGHT }; enum Select { DEFAULT, FOUNDATION, STOCK }; const...
#ifndef RECORDINGMANAGER_H #define RECORDINGMANAGER_H #include <iostream> #include <QWidget> #include "opencv2/opencv.hpp" #include <QDir> #include <QFile> extern QString save_folder; class Camera; struct BSearchResult{ bool found; int index; qint64 empty_interval_init; qint64 empty_interval_end; };...
#ifndef __Audi_h__ #define __Audi_h__ #include "Autó.h" // class Autó; class Audi; class Audi: public Autó { private: Double _lóerő; private: Double _nyomaték; private: String _állapot; }; #endif
class Solution { public: long long int reverse(int num) { // int a[5]; long long int rev = 0; long long int x; // checking overflow if(num == INT_MIN)return 0; if(num < 0) { x = -num; } else { x = num; } ...
#include <typeinfo> #include "../2/types.hpp" #include "type_lists.hpp" typedef TypeList<int, NullType> OneTypeOnly; typedef TypeList<char, TypeList<signed char, TypeList<unsigned char, NullType>>> AllCharTypes; using SignedIntegrals = TL::Make<signed char, short int, int, long int>::type; void test0() { } ...
#include <iostream> using namespace std; int pn(int n); int main() { int m,n; cin>>m>>n; for(int i=m;i<n+1;i++) if(pn(i)!=0)cout<<pn(i)<<' '; return 0; } int pn(int n) { int sum(0); for(int i=1;i<n;i++) {if(n%i==0)sum+=i; } if(sum==n){return n;} else return 0; }
#pragma once #include "Player.h" #define _USE_MATH_DEFINES #include <math.h> #include <algorithm> #include "MeleeWeapon.h" Player::Player(sf::Vector2f pos, float movespeed, int health, std::string texturePath) { dir = UP; isMoving = false; distanceTraveled = 0; this->pos = pos; this->movespeed = movespeed; ...
#include <HX711.h> #include <ESP8266WiFi.h> #include <time.h> const char* ssid = "DataSoft_WiFi"; const char* password = "support123"; //configure TimeZone int timezone = 6 * 3600; int dst = 0; // Scale Settings const int SCALE_DOUT_PIN = D2; const int SCALE_SCK_PIN = D3; // constants won't change. They're used here...
#include<stdio.h> int main() { int i,j,a[50000],b[20],n1,n2,w=0; scanf_s("%d",&n1); for(i=0;i<n1;i++) { scanf_s("%d",&a[i]); a[i]=a[i]%1000; } scanf_s("%d",&n2); for(i=0;i<n2;i++) { scanf_s("%d",&b[i]); } for(i=0;i<n2;i++) { for(j=0;j<n1;j++) { if(b[i]==a[j]) { w++; } } } printf("%...
#ifndef INPUT_H #define INPUT_H #include <allegro5\allegro.h> class Input { public: static bool keys[256]; static float mouseX; static float mouseY; static void input(ALLEGRO_EVENT *ev); }; #endif
#include <maya/MSimple.h> #include <maya/MGlobal.h> DeclareSimpleCommand(HelloMaya, "kingmax_res@163.com | 184327932@qq.com | iJasonLee@WeChat", "2018.07.23.01"); MStatus HelloMaya::doIt(const MArgList& args) { MGlobal::displayInfo("Hello Maya, the message from my first plugin. ÄãºÃ£¡"); return MS::kSuccess; }
//====================================================================== // Name: Game_Shell.cpp // Author: Will Blades // Function: Implements Game_Shell class //====================================================================== #include "GameShell.h" // Name: Shell() // Function: Default Constructor S...
#include "gtest/gtest.h" #include <sstream> #include <string> #include <vector> #include "wali/domains/RepresentativeString.hpp" using namespace wali; using namespace wali::domains; namespace { struct RSFixture { sem_elem_t zero, eps, a, b, c, ab, abc, abc2, def; RSFixture() ...
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); _chemcontroller = new ChemController; _sysconfig = new SysConfig; _devsettings = new DevSettings; _reacSettings = new FormReacSett...
#include "stdafx.h" #include "common.h" PNtQuerySystemInformation NtQuerySystemInformation; PNtCreateKeyedEvent NtCreateKeyedEvent; PNtCreateDirectoryObject NtCreateDirectoryObject; PNtCreateSymbolicLinkObject NtCreateSymbolicLinkObject; PDbgPrintEx DbgPrintEx; void winerror(const char* prefix) { char buf[4096]; Fo...
#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...
#ifndef INPUT_HANDLER_H #define INPUT_HANDLER_H #include <display.h> #include <iostream> #include <SDL2/SDL.h> #include <camera.h> #include <core_utils.h> #include <gui_objects.h> enum ScrollValue { SCROLL_IN, SCROLL_OUT, SCROLL_NONE }; struct ClickStruct { bool m_left_held = false; bool m_right_...
#ifndef EDGECOUNTS_H #define EDGECOUNTS_H #include "common.h" #include <string> class EdgeCounts { public: TS ts; // time when two users become friends // for all models : M1, S1 and C1 // for S1, use time window of size pi // for M1, use time window of size infinity int u2v; // number of actions v followed u...
#ifndef EXCEPTIONECHECEMPRUNT_H #define EXCEPTIONECHECEMPRUNT_H #include <stdexcept> class ExceptionEchecEmprunt : public std::runtime_error { public: ExceptionEchecEmprunt(std::string phraseErreur = ""); static int obtenirValeurCompteur() {return compteur_;} private: static int compteur_; }; #endif // EX...
#include <iostream> #include <tuple> #include <vector> using namespace std; int main() { int N; cin >> N; int sum = 0, a[N + 1]; for (int v = 1; v <= N; ++v) { cin >> a[v]; sum += a[v]; } if (sum < 2 * N - 2) { cout << "NO" << endl; return 0; } vecto...
#include<bits/stdc++.h> #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) #define INF ((1LL<<62)-(1LL<<31)) /*オーバーフローしない程度に大きい数*/ #define MOD 1000000007 using namespace std; using ll = long long; using Graph = vector<vector<int>>; using pint = pair<int,int>; const double PI = 3.14159265358979323846; const int ...
#include <stdio.h> #include <iostream> #include <math.h> #include <vector> #include <iostream> #include <sstream> #include <fstream> #include <string> #include <iomanip> #include <stdexcept> #include <cstdlib> #include <stdlib.h> #include <list> using namespace std; class pageTableEntry { public: /*unsigned present ...
#include <iostream> namespace Chrono { class Date {}; bool operator==(Date const&, std::string const&) { return true; } std::string format(Date const&) { return "abcd"; } } void f(Chrono::Date d, int i) { std::string s = format(d); // below causes an error // std::string t = format(i); } na...
// Copyright (c) 2007-2021 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 <pika/async_base/launch_policy....
#ifndef PACMAN_HPP #define PACMAN_HPP //#include "pac.hpp" class Pacman { public: Pacman(); Pacman(int x, int y, int mvCas, int score, int col, char* s); ~Pacman(); Pacman(Pacman &cpy); Pacman &operator=(Pacman & cpy); /////// void move(int , int, int, std::vector<char*> ); void act(WINDOW *win); int ge...
#include <algorithm> #include <cfloat> #include <vector> #include <cmath> #include "caffe/layers/dense_loss_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { /*template <typename Dtype> Dtype Overlap(Dtype x1, Dtype w1, Dtype x2, Dtype w2) { Dtype left = std::max(x1 - w1 / 2, x2 - w2 / 2); Dt...
// // Created by demon on 18-10-13. // /* number leetcode.80@array * https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ * 删除两次以上的 */ #include <iostream> #include <vector> using namespace std; class Solution { public: int removeDuplicates(vector<int> &nums) { int j = 0; int cu...
//Rachel Ramphal //8 Queens 1D Array without goto #include <iostream> #include <cmath> using namespace std; //check function bool okay(int q[], int c){ for (int i = 0; i < c; i++){ if (q[c] == q[i] || abs(q[c] - q[i]) == c - i) return false; } return true; } //print function void printout(int q[]...
#pragma once #include "../GameData.h" class GameCursor; class StageSelect : public GameObject { private: typedef std::vector<std::string> PyFile; public: StageSelect(); ~StageSelect(); bool Start() override; void Update() override; void OnDestroy() override; void SetDungeonGameData(PyFile& files, PyFile& eneFil...
// Copyright Lionel Miele-Herndon 2020 #include "KillEmAllGameMode.h"
#include "DataController.h" #include <algorithm> std::vector<RawData> DataController::dataList;//initialize std::vector <CalculatedData> DataController::calculatedDataList;//initialize std::vector <Cycle> DataController::cycleList;//initialize std::vector <Cycle> DataController::averageCycleList;//initialize st...
#include <QDebug> // RsaToolbox includes #include "General.h" #include "VnaSweepSegment.h" #include "VnaChannel.h" #include "Vna.h" using namespace RsaToolbox; // Qt includes // #include <Qt> /*! * \class RsaToolbox::VnaSweepSegment * \ingroup VnaGroup * \brief The \c %VnaSweepSegment class * manipulates a parti...
#ifndef __MODEL_OBJPROPLIST_H #define __MODEL_OBJPROPLIST_H #include "ModelHistoryData.h" #include "IModelWindow.h" #include "ModelFilterList.h" namespace wh{ //----------------------------------------------------------------------------- //--------------------------------------------------------------------------- c...
#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; map<char,char> dir; char st[200100]; int main() { int n,m; scanf("%d%d%*...
#include <iostream> #include <vector> #include <list> #include <algorithm> #include <ctime> #include <cstdlib> using namespace std; template<int n> void test100k() { srand(time(NULL)); vector<int> vi0(n); //for_each(vi0.begin(), vi0.end(), [](int a) {return rand(); }); for (auto& x : vi0) x = rand()+1; vector<...
// Created on: 2003-10-10 // Created by: Alexander SOLOVYOV // Copyright (c) 2003-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2...
// // CryptAES.hpp for cpp_spider in sources/ssl // // Made by Benoit Hamon // Login <benoit.hamon@epitech.eu> // // Started on Mon Oct 02 16:14:04 2017 Benoit Hamon // Last update Sun Oct 08 17:44:27 2017 Benoit Hamon // #pragma once #include "ICryptAlgo.hpp" #define AES_KEYLEN 256 class CryptAES : public ICryp...
#include "FormStandardDeviation.h" #include "../../lidar-build/ui_FormStandardDeviation.h" FormStandardDeviation::FormStandardDeviation(QWidget *parent) : QWidget(parent), ui(new Ui::FormStandardDeviation) { ui->setupUi(this); connect(ui->numStandardDeviations, SIGNAL(valueChanged(double)), this, SIGNAL(numStanda...
#include "TMatrixDSym.h" #include "TVectorD.h" #include "TLorentzVector.h" #include <vector> class EventShapeVariables { public: EventShapeVariables(const std::vector<TLorentzVector>&); const double isotropy(unsigned int numberOfSteps = 1000) const; const double circularity(unsigned int numberOfSteps = 1000)...
#ifndef _window_h_ #define _window_h_ #include <string> class GLFWwindow; class Window { public: Window(); static Window& getInstance(); // Get window ID. GLFWwindow* getWindow() const; // Window information. int getWidth(); int getHeight(); // Window control. void exit(); // W...
#include "precompiled.h" #include "q3bsp/q3bsp.h" #include "q3bsp/bsppatch.h" #include "render/render.h" #include "nvtristrip.h" #include "scene/scene.h" #include "scene/scenebsp.h" using namespace q3bsp; MyBiquadraticPatch::MyBiquadraticPatch() { vertices = NULL; indices = NULL; list = NULL; } MyBiquadraticPatch...
#include <iostream> #include <string> namespace v1 { template<typename Key, typename V, bool (*cmp)(Key const&, Key const&)> class map { public: map() {} }; } bool insensitive(std::string const& x, std::string const& y) { return x>y; } namespace v2 { template<typename Key, typename V, typename Compare = s...
#pragma once #include "GameObject.h" class Player : public GameObject { public: Player(sf::Texture& playerTex); ~Player(); virtual void update(sf::Time deltaTime); };
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int tc; cin >> tc; while(tc--){ int n; cin >> n; vector<string> v; vector<int> ct; while(n--){ string input1, ...
#include "MainGameLoop.h" #include "GameManager.h" MainGameLoop::MainGameLoop() { size_t windowHnd = 0; Ogre::Root::getSingletonPtr()->getAutoCreatedWindow()->getCustomAttribute("WINDOW", &windowHnd); std::string windowHandleAsString = ""; std::ostringstream windowHndStr; windowHndStr <<windowHnd; windowHandleAs...
#include <QtWidgets/QPushButton> #include <QtWidgets/QLayout> #include "dice.h" #include "dicewindow.h" DiceWindow::DiceWindow() { QWidget * mainWidget = new QWidget( this ); setCentralWidget( mainWidget ); vDice1 = new Dice( this ); vDice2 = new Dice( this ); QPushButton * rollButton = new QPushButton( th...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ncurses.h> #include <string> using namespace std; char S1[256]; void input() { scanf("%s", &S1); } int solve() { char S2[256] = ""; for (int i = 0; i < strlen(S1); i++) S2[i] = S1[strlen(S...
#pragma once #include<vector> #include<set> #include<cmath> #include<cstdlib> #include "Edge.hpp" struct Point { //punkt na mapie bool visited = false; //czy byl odwiedzony dla algorytmu long cost = LONG_MAX/3; //koszt sumaryczny long cost_reversed = LONG_MAX/3; std::vector<Edge> edges; //talbica dostepnych punk...
#include "NConnection.h" std::vector< QString > NConnection::m_files; NConnection::NConnection(QTcpSocket * _socket) { m_socket = _socket; QObject::connect(m_socket,SIGNAL(readyRead()), this,SLOT(onSocketReadyRead())); QObject::connect(m_socket,SIGNAL(disconnected()),this,SLOT(onSocketDisconnected())); QObject...
/* * 列比行大得多 */ class Solution { public: int maxSumSubmatrix(vector<vector<int>>& matrix, int target) { if(matrix.size() == 0 || matrix[0].size() == 0 ) return 0; int res = INT_MIN; int row = matrix.size(); int col = matrix[0].size(); int sum[col]; for(int i=0; i<ro...
/* -*- 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. * * @author Marius Blomli, Michal Zajaczkowski */ #ifndef _STATUSX...
/********************************************************************** zyGrib: meteorological GRIB file viewer Copyright (C) 2008-2012 - Jacques Zaninetti - http://www.zygrib.org 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 t...
#include <iostream> using namespace std; template <class S, class T> bool isEqual(S *s, T *t,int n){ for (int i =0; i<n; i++){ if(s[i]!=t[i]) return false; } return true; } int main(){ float list1 [] ={1.2, 3.3, 9.0, 1.5, 8.7}; float list2 [] ={1.2, 3.3, 9.0, 1.5, 8.7}; bool check=isEqual(list1,list2,5)...
#pragma once #include <iostream> #include "Enemy.h" #include "Map.h" using namespace std; //--------------------------------------------------------------------------------------- class Skeleton : public Enemy { public: Skeleton(Damage damage, Position position, int hp, int cooldown); virtual void attack(Characte...
#include "TextureManager.hpp" TextureManager::TextureManager() {} TextureManager::~TextureManager() {} void TextureManager::addTexture(std::string key, std::string filePath) { Texture *texture = new Texture(filePath); texture->loadTexture(); textureDictionary.insert(std::pair<std::string, Texture *>(key,...
#include <sstream> #include <fwRuntime/ConfigurationElement.hpp> #include <fwData/String.hpp> #include <fwData/Acquisition.hpp> //#include <fwServices/helper.hpp> #include <fwServices/Base.hpp> // new #include <fwServices/IEditionService.hpp> // new #include <fwServices/macros.hpp> #include <fwServices/op/Add.hpp> #inc...
#include "Globals.h" #include "Application.h" #include "ModuleInput.h" #include "ModuleRender.h" #include "ModulePhysics.h" #include "p2Point.h" #include "math.h" #ifdef _DEBUG #pragma comment( lib, "Box2D/libx86/Debug/Box2D.lib" ) #else #pragma comment( lib, "Box2D/libx86/Release/Box2D.lib" ) #endif ModulePhysics::M...
#include "ChessboardCornerDetector.h" #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <cmath> Eigen::Array2Xd Cvl::ChessboardCornerDetector::findCorners(cv::Mat const & image, size_t const cornersPerRow, size_t const cornersPerCol, bool const highFidelity, size_t bloc...
#pragma once #include <optional> #include <vector> #include <functional> #include <ionir/misc/type_factory.h> #include <ionir/tracking/scope_anchor.h> #include "ionir/construct/pseudo/child_construct.h" #include "basic_block.h" namespace ionir { class Pass; struct FunctionBody : public ConstructWithParent<Fu...
#include <iostream> #include <string.h> using namespace std; int dp[10001]; int coins[21]; int target; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int tc; cin >> tc; while(tc--){ for (int i = 0; i < 21; i++){ coins[i] = 0; } for (int i = 0; i < 1...