text
stringlengths
8
6.88M
#pragma once #include "ByteSizeCommon.h" #include <string> namespace hvn3 { class BitSize { public: BitSize(double bytes, BytePrefix prefix = BytePrefix::Binary); BitSize(double bytes, BytePrefix prefix, ByteUnit unit); double Bits() const; double Bytes() const; double Kilobits() const; double Megabi...
#include <stdio.h> #include "stack.h" void Init(){ gStack.clear(); } bool PushData(DATA data){ OBJ temp; temp.mData = data; if(gStack.empty()){ temp.mNextMin = 0; gStack.push_back(temp); gMinIter = gStack.begin(); } else{ temp.mNextMin = gMinIter - gStack.begin(); uint curIndex = gMinIter - gStack.beg...
#ifndef __iberbar_datamap_h__ #define __iberbar_datamap_h__ #include <iberbar\Base\Platform.h> #include <iberbar\Base\data\Vector_SortDichotomy.h> #include <string> namespace iberbar { #define IBERBAR_DATAMAP_DECLARE_TYPE( type ) DataUnionType_##type #define IBERBAR_DATAMAP_VALUE_NAME( type ) data_##typ...
#include "FechaYHora.h" int main(){ FechaYHora f; f.setTiempo(23, 59, 59); f.setFecha(31,12,1999); f.imprimirUniversal(); f.tictac(); f.imprimirUniversal(); return 0; }
/** * @file GLJoe/core/mat3.h * * @brief 3x3 matrix * * @author Joachim Valente <joachim.valente@gmail.com> * @date 6/11/2013 */ #ifndef DEF_GLJOE_MAT3_H #define DEF_GLJOE_MAT3_H namespace GLJoe { template <class T> struct Mat3_ { protected: Vec3_<T> _m[3]; // 3 rows public: /** * Constructors */ M...
#ifndef MY_BUTTON_H #define MY_BUTTON_H #include <Arduino.h> class Button { private: byte pin; byte state; byte lastReading; byte pin_mode; unsigned long lastDebounceTime = 0; unsigned long debounceDelay = 50; bool isInterruptButton = false; public: Button(...
// Created on: 1998-03-16 // Created by: Pierre BARRAS // 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 GNU ...
#ifndef ELEMENT_H #define ELEMENT_H #include "Position.h" #include "xil_types.h" #include "xil_printf.h" class Arena; class Element { public: Element(); Element(uint8_t x, uint8_t y); void SetArena(Arena *arena); void SetPosition(uint8_t x, uint8_t y); void SetPosition(Position position); voi...
#include <stdio.h> #include <iostream> #include <vector> #include <queue> #include <list> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int nodes; cin >> nodes; vector<list<pair<int,int>>> graph; vector<int> packages; for(int i=0; i<nodes; i++){ //scanf("%d",packages[i]); ...
#include "Enemy.h" Enemy::Enemy(float x, float y) :MovableObject(x, y), m_health(100.0f), m_enemyNum(-1), fixedUpdateTimer(0) { init(); } Enemy::Enemy(sf::Vector2f pos) :MovableObject(pos), m_health(100.0f), m_enemyNum(-1), fixedUpdateTimer(0) { init(); } Enemy::~Enemy() { } void Enemy::init() { msprite = n...
// ListBeginLexeme.h #ifndef PARSER_PARSER_LIST_BEGIN_LEXEME_H #define PARSER_PARSER_LIST_BEGIN_LEXEME_H #include <parser/lexemes/Lexeme.h> #include <parser/utils/Utils.h> namespace parser { class ListBeginLexeme : public Lexeme { public : ListBeginLexeme( const StringConstIterator& iStart, con...
#include "Transform.h" using namespace DirectX; Transform::Transform() { // Start with an identity matrix and basic transform data XMStoreFloat4x4(&worldMatrix, XMMatrixIdentity()); XMStoreFloat4x4(&worldInverseTransposeMatrix, XMMatrixIdentity()); position = XMFLOAT3(0, 0, 0); pitchYawRoll = XMFLOAT3(0, 0, 0)...
#pragma once #include "PlayerModel.h" #include "LevelModel.h" #include "AvatarLogicCalculator.h" class PlayerLogicCalculator : public AvatarLogicCalculator { public: PlayerLogicCalculator(); ~PlayerLogicCalculator(); public: void init(LevelModel* levelModel, AvatarModel* avatarModel); void computeLogic(); private:...
// ------------------------------------------------------------------------------------------------ // File name: PdbModuleDetails.cpp // Author: Marc Ochsenmeier // Email: info@winitor.net // Web: www.winitor.net - // Date: 20.08.2011 // // Description: Implementation of the Pdb Module details. // // -------...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * 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 wit...
#pragma once #include <google/protobuf/message.h> #include <vector> using namespace std; using namespace google::protobuf; namespace nora { namespace dbcache { template <typename T> void dbcache_update(T& cached_data, const T& updated_data) { const Ref...
// Created on: 1991-03-12 // Created by: Michel CHAUVAT // Copyright (c) 1991-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...
#pragma once #include <memory> #include "App.h" class Vibration; class ExternalFileLevelStorageSource; class ServerCommandParser; class GameSession; class RakNetInstance; class RakNetPacketSender; class TerrainAtlas; class GameMode; class GameType; class Timer; class Mob; class Player; class Level; class LevelSetting...
#ifndef APPLICATION_GETCHATLASTMESSAGE_H #define APPLICATION_GETCHATLASTMESSAGE_H #include "BaseCommand.h" /* * Get chat last message command class */ class GetChatLastMessage: public BaseCommand { public: explicit GetChatLastMessage(boost::property_tree::ptree& params); ~GetChatLastMessage() override = de...
#include <iostream> #include <string> #include <unordered_map> using namespace std; /* Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Inp...
/* Exp no : 6 Dining philosopher problem S1330-R-Jayadeep 01/04/2016 */ #include <iostream> #include <pthread.h> #include <semaphore.h> #include <string> using namespace std; sem_t s; sem_t fork[5]; void *eatAndThink(void * arg){ int i=*(int*)arg; sem_wait(&s); cout<<"phil "+to_string(i)+" waiting"+"\n...
#ifndef APPLICATION_VIEWER_H #define APPLICATION_VIEWER_H #include <QApplication> #include "ui/LoginWidget/loginwidget.h" #include "ui/MainWidget/mainwidget.h" class Viewer : public QObject { Q_OBJECT public: Viewer(); void runApp(); public: std::shared_ptr<LoginWidget> loginWidget; std::shared...
// // Created by griha on 15.12.17. // #include <catch.hpp> //#include <array> #include <crypto/hsm_lib/crypto_context.hpp> #include <crypto/crypto_types.hpp> #include <misc/encoding.hpp> #include <misc/io_manip.hpp> #include <griha/tools/guard.hpp> #include <crypto_win_base.hpp> #include "common.h...
#include "test_suit1.h" #include <QDebug> #include <QString> #include <limits> #define LOG_ERRORCODE(code) (qDebug() << QString("return code: %1").arg(code1)); void TestSuit1::test_QuerySessionHistoryMsgFromServer() { YIMManager*im = YIMManager::CreateInstance(); XUINT64 i {1}; YIMErrorcode code...
/* =========================================================================== Copyright (C) 2017 waYne (CAM) =========================================================================== */ #pragma once #ifndef ELYSIUM_DATA_IDATACOMMANDBUFFER #define ELYSIUM_DATA_IDATACOMMANDBUFFER #ifndef ELYSIUM_CORE_O...
vector<int> g[MAX], gt[MAX], S; int vis[MAX], cor[MAX]; int val(int n, bool tvalue) { if(tvalue) return 2*n; return 2*n +1; } void dfs(int u) { vis[u] = 1; for(int v : g[u]) if(!vis[v]) dfs(v); S.push_back(u); } void dfst(int u, int e) { cor[u] = e; for(int v : gt[u]) if(!cor[v]) dfst(v, e); ...
#ifndef BUDGET_BUDDY_H #define BUDGET_BUDDY_H #include <iostream> using namespace std; /****************************************************** ** Program: budget_buddy.cpp ** Author: Jacob Reger ** Date: 01/13/2020 ** Description: The following program will be capable ** logging in a user based on a user database fil...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2011 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Yngve Pettersen ** */ #ifndef CONTEXT_MANAGER_H_ #define CONT...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <stdio.h> #include <string> #include "Types.h" #include "Team.h" #include "CLevelDataMap.h" #include "CLevelDataCell.h" #include "StrLib.h" //#include "CLevelDataMap.cpp" //#include "StrLib.cpp" #define null 0 using namespace std; s...
// 使用N-API编写的Addon #define NAPI_VERSION 3 #include <node_api.h> #include <iostream> #include <assert.h> #include <string.h> #include <sstream> #include <ctime> #include <chrono> #include <list> #include <boost/format.hpp> #include "ln-addon.h" namespace learning { /* #ifdef WE_ARE_HERE #undef WE...
#include <string> #include <algorithm> using std::string; bool bothAreSpaces(char ch1, char ch2); void deleteSpaces(string &str);
#pragma once #ifndef __NDT_NO_CUDA__ #include <cuda_runtime.h> #define __NDT_CUDA_HD_PREFIX__ __host__ __device__ #else #define __NDT_CUDA_HD_PREFIX__ #endif // __NDT_NO_CUDA__ #include <NDT/Internal/Slicing.h> namespace NDT { template <typename Derived> struct TensorTraits; template <typename Derived> class Tenso...
#include <cstdio> #include <vector> #include <iostream> using namespace std; #define V(x, y) (((x)*2) - ((y) == 'y')) #define NOT(x) ((((x)-1)^1)+1) vector<int> g[444]; vector<int> gr[444]; inline void add(int x, int y) { g[x].push_back(y); g[NOT(y)].push_back(NOT(x)); //cerr << x << " " << y << endl;...
#include <set> #include <cppunit/extensions/HelperMacros.h> #include "cppunit/BetterAssert.h" #include "model/ModuleType.h" using namespace std; using namespace Poco; namespace BeeeOn { class ModuleTypeTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ModuleTypeTest); CPPUNIT_TEST(testParse); CPPUNIT_TEST(...
#include "PList.h" namespace ece309{ DList::DList() { // initialize empty list head = NULL; tail = NULL; } void DList::append(Object *a) { DListNode *node = new DListNode(a,NULL,tail); if (head == NULL) { // list is empty head = node; ...
/* Copyright (c) 2016-2022 Xavier Leclercq Released under the MIT License See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt */ #ifndef _ISHIKO_TESTS_TESTS_CORE_TESTSETUPACTIONSTESTS_PROCESSACTIONTESTS_H_ #define _ISHIKO_TESTS_TESTS_CORE_TESTSETUPACTIONSTESTS_PROCESSACTIONTESTS_H_ #inc...
#pragma once #include <iosfwd> template <typename T> class Quaternion { private: T scalar; Vector3<T> Vector; public: inline Quaternion() { scalar = 0; Vector = Vector3(); }; inline Quaternion(const Vector3<T> v, const T s) { scalar = s; Vector = v; }; inline Quaternion<T> operator +(const Quaternion<...
// 오답사유 : std::endl 과 '\n' 속도차이는 어마어마하다 // 웬만하면 \n 쓰자 #include <iostream> #include <cmath> #define FOR(x,s,e) for(int (x) = (s); (x) < (e); x++) using namespace std; const int MAX_SIZE = 1000000 + 1; // void set_p_nums(int*nums); int nums[MAX_SIZE]; int main() { ios_base::sync_with_stdio(0); cin.tie(0);...
/* * Copyright 2019 Nagoya University * * 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...
/* @File: cameraParams.cpp * @Details: Functions regarding image processing */ Mat find_contour_down(Mat frame) { Mat canny; vector<vector<Point>> contours; vector<Vec4i> hierarchy; int width = 480; blur(frame, frame, Size(3, 3)); Canny(frame, canny, 100, 240, 3); //gia na min vgazei eswterika si...
/* Copyright (c) 2014 Mircea Daniel Ispas This file is part of "Push Game Engine" released under zlib license For conditions of distribution and use, see copyright notice in Push.hpp */ #pragma once #include "Core/Hash.hpp" #include "Core/CoreConfig.hpp" #include <cstring> namespace Push { enum class BundleType...
#include <arrow/api.h> #include <arrow/dataset/dataset.h> #include <arrow/dataset/discovery.h> #include <arrow/dataset/expression.h> #include <arrow/dataset/file_base.h> #include <arrow/dataset/file_parquet.h> #include <arrow/dataset/file_rados_parquet.h> #include <arrow/dataset/scanner.h> #include <arrow/filesystem/fi...
#ifndef BUFFERMANAGER_H #define BUFFERMANAGER_H #include "defination.h" #include<string> #include<time.h> using namespace std; class block{ private: bool dirty; bool pin; bool used; time_t Recenttime;//最近使用时间 public: string filename;//对应文件名 int fileoffset;//对应在文件中的第几个block int usedsize;...
#pragma once #include "Functions.h" class Character; //--------------------------------------------------------------------------------------- class IAttacking { protected: Damage damage; int cooldown; public: virtual void attack(Character &target) = 0; //virtual void shoot(Character &target) = 0; }; //-----------...
#pragma once #include "Vertex.h" #include <initializer_list> // Class for a 4 x 4 matrix object. const int ROWS = 4; const int COLS = 4; class Matrix { public: // Default constructor Matrix(); // Destructor ~Matrix(); // Constructor that initialises all elements. Matrix(std::initializer_list<float>); // Copy co...
#ifndef VENTADAO_H #define VENTADAO_H #include "venta.h" class VentaDAO { public: VentaDAO(); virtual ~VentaDAO(); void add(Venta*); void update(Venta*); bool exist(Venta*); void save(Venta*); void del(Venta*); Venta* find(int); p...
#include "ColorDetector.hpp" int main() { cv::VideoCapture cap(0); if(!cap.isOpened()) return -1; cv::Mat frame, mask; cv::namedWindow("Frame",cv::WINDOW_AUTOSIZE); while(true){ cap >> frame; cv::imshow("Frame",frame); colorDetection(frame, mask); maskBitwiseAND(frame, mask); int k = cv::waitKey(...
#ifndef __VIVADO_SYNTH__ #include <fstream> using namespace std; // Debug utility ofstream* global_debug_handle; #endif //__VIVADO_SYNTH__ #include "one_input_mag_opt_compute_units.h" #include "hw_classes.h" struct diff_d_diff_d_update_0_write0_merged_banks_1_cache { // RAM Box: {[0, 29], [0, 29]} // Capacity...
//=========================================================================== /* This file is part of the CHAI 3D visualization and haptics libraries. Copyright (C) 2003-2004 by CHAI 3D. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms o...
#include <fstream> #include <vector> #include <cstdint> #include <cstdio> #include <cstring> #include <assert.h> #include <assimp\mesh.h> #include <assimp\Importer.hpp> #include <assimp\scene.h> #include <assimp\postprocess.h> using namespace std; // swap the bytes in a float (to change big/little-endian inline floa...
#include "Ingester.h" #include <fstream> #include <iostream> #include <future> std::mutex outMtx; Ingester::Ingester() { } Ingester::Ingester(std::string fName) { std::ifstream inp(fName); if(inp.is_open()) { std::string ln; while(std::getline(inp, ln)) { auto x = par...
#include<iostream> #include<vector> #include<algorithm> #include<iterator> using namespace std; class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { //基本思想:双指针,从后往前遍历,因为nums1后面多余空闲位置,这样就不需要申请额外空间 //i从后往前指向nums1有效元素,j从后往前指向nums2有效元素,cur从m+n-1到0指向合并的元素 int i = m - 1, j = n - ...
// // Created by beans_pc on 1/29/2018. // Time Complexity: O(nlgn) ==> Quick Sort // #include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <cmath> #include <algorithm> using namespace std; const double target_x = 116.42; const double target_y = 39.84; typedef struct taxi{ string t...
#include "perf_precomp.hpp" using namespace std; using namespace cv; using namespace perf; using std::tr1::make_tuple; using std::tr1::get; CV_ENUM(ThreshType, THRESH_BINARY, THRESH_BINARY_INV, THRESH_TRUNC, THRESH_TOZERO, THRESH_TOZERO_INV) typedef std::tr1::tuple<Size, MatType, ThreshType> Size_MatType_ThreshType_...
// Copyright (c) 2007-2017 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) #include <pika/affinity/affinity_data.hpp> #include <pika/assert.hpp> #include <p...
#include <bits/stdc++.h> using namespace std; int merge(vector<int>& input,int start,int mid,int end){ int i = start; int j = mid+1; vector<int> temp; int count = 0; while(i<=mid&&j<=end){ if(input[i]>input[j]) { count+=mid-i+1; temp.push_back(input[j]); j...
#include<bits/stdc++.h> using namespace std; int main(){ char ch='A'; for(int i=1;i<=5;i++) { for(int j=5;j>=i;j--) { cout<<" "; } for(int k=1;k<=i;k++) { cout<<ch++; } ch--; for(int m=1;m<i;m++) { cout<<--ch; } cout<<endl; ch='A'; } return 0; }
#include "platforms/quix/toolkits/gtk2/GtkPrinterIntegration.cpp"
#include<iostream> using namespace std; /*int dpsolve(int arr[],int index,int sum,int n) { if(index>=n) { return sum; } if(dp[sum]!=-1 && dp[sum]>sum) return dp[sum]; if(n==0) return 0; return dp[sum]=max(dpsolve(arr,index+2,sum+arr[index],n),dpsolve(arr,index+1,sum,n)); ...
#include <stdio.h> #include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/imgcodecs.hpp> #include <cmath> #include <string> #include <fstream> using namespace cv; using namespace std; int cCount = 0; int snd = 0; ve...
//same as bitonic subsequence int minimumMountainRemovals(vector<int>& nums) { if(nums.size()==0) return 0; int maxlen = 0; vector<int> dp(nums.size(), 1); vector<int> dp2(nums.size(),1); if(nums.size() <= 1) return nums.size(); int i=0,j=0; while(i<nums.size()){ if(i==j){ ...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/NewCouponStep4Page.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_bundle.h> #include <_root.app18_FuseControlsImage_File_Property.h> #include <_root.app18_FuseControlsTextControl_Value_Property.h> ...
#include <iostream> #include <fstream> #include <sstream> #include <string> #include "setup_cl.h" using namespace std; // helper function to create and return an OpenCL context cl_context createContext() { cl_int clerr; cl_uint numPlatforms; cl_platform_id *platformArray; cl_context ...
// Tue May 3 16:52:46 EDT 2016 // Evan S Weinberg // C++ file for power iterations. // To do: // 1. Add complex. // 2. Make poweriter return largest eigenvector, as well. // 2. Template to support float, double. #include <iostream> #include <cmath> #include <string> #include <sstream> #include <complex> #includ...
// // Created by 송지원 on 2020/07/06. // #include <iostream> using namespace std; int N; int v; int cnt[205]; int main() { cin >> N; int temp; for (int i=0; i<N; i++) { cin >> temp; cnt[temp+100]++; } cin >> v; cout << cnt[v+100]; }
#include <stdio.h> #include <iostream> #include <cmath> #include <xparameters.h> #include "platform.h" #include "xtime_l.h" #include "xaxidma.h" #include "xufunc_reduce_all_f4.h" /////////////////////////////////////////////////////////////////////////////// // Definition of all supported operations. #define NONE ...
#ifndef BOOTSTRAPPER_H #define BOOTSTRAPPER_H #include <memory> #include <vector> #include "Instrument.h" #include "Curve.h" class Bootstrapper { public: Bootstrapper(std::vector<std::unique_ptr<Instrument>>& source);//swaps from the input Curve go(); private: std::vector<std::unique_ptr<Instrument>> m_source; }; ...
#include <bits/stdc++.h> using namespace std; int main(){ int a[2], b[2]; cin >> a[0] >> a[1] >> b[0] >> b[1]; bool flag = false; for(int i=0; i<2; i++){ for(int j=0; j<2; j++){ if(a[i] == b[j]) flag = true; } } if(flag) cout << "YES" << endl; else c...
#include <qpainter.h> #include <qpoint.h> #include "Histo.h" CHisto::CHisto(QWidget *parent) : QWidget(parent), m_commencer(20,20) { m_nTab = NULL; } CHisto::~CHisto(void) { delete m_nTab; } void CHisto::setHisto( int * Tab, int Maxi, int Coul) { m_nTab = new int [256]; for(int i=0; i<256; i++) m_nTab[...
#include <cstdio> #include <cstdlib> int *IntegerFactory(bool f) { int *a = new int[1024]; for (auto i = 0; i < 1024; i++) { a[i] = 0xdeadbeef; } return a; } int main(int argc, char **argv) { int *p = IntegerFactory(argc); printf("%08x\n", p[1030]); delete[] p; return 0; }
#include <chuffed/mip/simplex.h> #include <chuffed/support/misc.h> #include <algorithm> #include <cstddef> void LUFactor::multiply(long double* a) { for (int i = 0; i < vals.size(); i++) { a[r] += a[vals[i].index()] * vals[i].val(); } } void LUFactor::Tmultiply(long double* a) { if (a[r] != 0) { for (int i = ...
#include "functions.h" #include <Windows.h> #include <iostream> #include <time.h> using namespace std; char grid[80][25]; short CreatureCount = 0; int randomizeFunc(int randomize) // creates a function with a parameter that accepets an integer and has the name of randomize. { return rand() % randomize + 1; // ...
#include <iostream> #include <cmath> #include <iomanip> using namespace std; //Un punto o vector en espacio tridimensional struct Punto { float x; float y; float z; }; //Regresa el vector de punto final - inicial Punto VectorDistancia(Punto inicio, Punto fin) { Punto resultante; resultante.x = fin.x - inicio.x;...
#include "opencv2/opencv.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/videoio.hpp" #include <opencv2/highgui.hpp> #include <opencv2/video.hpp> #include <opencv2/gapi/gscalar.hpp> #include <opencv2/gapi/core.hpp> #include <opencv2/core/matx.hpp> #include <opencv2/core/types.hpp>...
/* -*- 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 EVENT_SOURCE_SUPPORT #include "mod...
#include <vector> #include <string> #include <cmath> #include <fstream> #include <iostream> #include <sstream> #include <list> #include <algorithm> #include <set> #include <map> #include <stack> #include <queue> #include <numeric> #include <bitset> #include <deque> #include <random> const long long LINF = (1e18); cons...
#pragma once #include "../controls/RollupCtrl.h" class CTerrainLightTool : public CEditTool { public: DECLARE_DYNCREATE(CTerrainLightTool) CTerrainLightTool(); ~CTerrainLightTool(); void BeginTool(); void EndTool(); void OnMouseMove(UINT nFlags, CPoint point); protected: CRollupCtrl* m_...
// Created on: 1997-05-06 // Created by: Yves FRICAUD // Copyright (c) 1997-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 L...
#include "compiler/function_manager.hpp" #include "vm/code_segment.hpp" #include <tuple> #include <cassert> namespace perseus { namespace detail { bool function_signature::operator<( const function_signature& rhs ) const { return std::tie( name, parameters ) < std::tie( rhs.name, rhs.parameters ); ...
#include<iostream> #include<string.h> using namespace std; int main() { int l,i,k=0; char input[100000][3],ans[3]; char output[1000][3]; while(1) { strcpy(ans,"+x"); cin>>l; if(l==0) break; for(i=0;i<l-1;i++) { cin>>input[i]; if(strcmp(input[i],"No")!=0) { ...
/* ** EPITECH PROJECT, 2019 ** tek3 ** File description: ** Errors */ #include "Errors.hpp" #include <iostream> namespace babel { BabelError::BabelError(std::string const &message) : _message(message) {} AudioError::AudioError(std::string const &message) : BabelError(message) {} CodecError::CodecError(...
#pragma once #include <YouMeCommon/CrossPlatformDefine/PlatformDef.h> #ifdef WIN32 #include <WinSock2.h> #include <WS2tcpip.h> #else #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/select.h> #endif #include <YouMeCommon/curl/curl.h> class CDownloadUploadManager { publ...
#include<stdio.h> #include<conio.h> #include<math.h> #include<iostream> using namespace std; //giai bac 1 bac 2 bang thu tuc ham! //bac 1 ax+b=0; trong c#tham tri va con tro!trong c++ tham tri -con tro -thamchieu //ham nhap void inport(float &n)//gia tri n truoc la gia tri rac de thay doi nen dung tham chieu { cout...
#include <Wire.h> void setup() { Serial.begin(115200); Mouse.begin(); Wire.begin(); } void loop() { int x,y,z; int c[4]; Wire.beginTransmission(0x48); Wire.write(0x42); Wire.endTransmission(); Wire.requestFrom(0x48, 2); while (Wire.available()) { c[0] = Wire.read(); c[0] = Wire.read(); } ...
#include "GreeksFadbadHelper.h" class DFunc { public: template<class T> T calculate( Func<FJet> *func, T &o_dfdS, T &o_dfdT, T &o_dfdR, T &o_dfdSigma, const T &i_S, const T &i_T, const T &i_R, const T &i...
#include<bits/stdc++.h> using namespace std; int main() { // only gravity will pull me down // Binary Array Sorting int t; long long n; cin >> t; while (t--) { cin >> n; vector<int> a(n); for(int i=0; i<n; i++) cin >> a[i]; int lo = 0, hi = n-1; ...
#include "square.h" #include <iostream> #include <stdexcept> using namespace std; Square::Square(float side) : Rectangle(side, side){ set_name("Square"); set_colour("Purple"); if(area() == 0){ throw invalid_argument("Invalid constructor argument"); } } void Square::print_shape_info(){ cou...
#pragma once #include <cmath> #include <iostream> #include <string> class Vector2d { private: double x, y; public: Vector2d(); Vector2d(double, double); Vector2d(double, double, double, double); Vector2d(const Vector2d&); ~Vector2d(); void setx(double); double getx(); void sety(double); double gety(); o...
// ========================================================================== // = Copyright (C) 2013/2015 Seagull Project - Contrato Ref: 20131034063 = // = -----------------------------------------------------------------------= // = Parceiros: // = - Critical Software - CSW // = - Força Aérea Portuguesa - FAP /...
/** * @file stream.h * @author Gerbrand De Laender * @date 24/01/2020 * @version 1.0 * * @brief E091103, Master thesis * * @section DESCRIPTION * * AXI Stream helper functions. Template parameters are: * T = Data type excluding AXI4-Stream side channels * T_SIDE = Data type including AXI4-...
#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...
//Phoenix_RK /* https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: s = "bbbb...
#ifndef HW_SYSENTRY_H #define HW_SYSENTRY_H #include <vector> using namespace std; #include "PreDefine.h" namespace HW { enum RenderStage { RS_Depth = 0x0, RS_Light, RS_PostEffect, RS_Count }; class SysEntry { public: static SysEntry * getSingletonPtr(); static SysEntry& getSingleton(); RenderS...
// Include GLFW #include <GL/glfw.h> // Include GLM #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <AntTweakBar.h> #include "controls.h" glm::mat4 ViewMatrix; glm::mat4 ProjectionMatrix; glm::mat4 getViewMatrix(){ return ViewMatrix; } glm::mat4 getProjectionMatrix(){ re...
// // C++ Interface: UdpData // // Description: // 处理接收到的UDP数据 // // Author: Jally <jallyx@163.com>, (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef UDPDATA_H #define UDPDATA_H #include "mess.h" class UdpData { public: UdpData(); ~UdpData(); static v...
// Created on: 1997-02-06 // Created by: Kernel // Copyright (c) 1997-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 ...
class Mac10_DZ: PDW_DZ { model = "\RH_smg\RH_mac10p.p3d"; picture = "\RH_smg\inv\mac10.paa"; UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa"; displayName = $STR_DZ_WPN_MAC10_NAME; drySound[] = {"Ca\sounds\Weapons\rifles\dry",0.003162,1,10}; reloadMagazineSound[] = {"\RH_smg\Sound\Mac10_reload.wss",0.056234,1,...
// // Created by keayuan on 2020/4/27. // #ifndef TEXT_OCR_UTILS_H #define TEXT_OCR_UTILS_H #include <jni.h> #include "log.h" extern JNIEnv *javaEnv; extern jobject javaObject; template<typename I> jfloatArray toFloatArray(JNIEnv *env, I *data, int len) { jfloatArray result = env->NewFloatArray(len); for (i...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Dummy definitions of requisite plug-in wrapper symbols. */ ...
#ifndef _IMAGE_H #define _IMAGE_H #include <cmath> #include <fstream> #include <iostream> #include <stdio.h> #include <stdlib.h> #include "glm/glm.hpp" class Image { public: Image() {}; Image(int w, int h); Image(int w, int h, std::string name); ~Image(); glm::vec3 **data; void ...