text
stringlengths
8
6.88M
/** * @file np_lib_trigonometric_f4_hyperbolic_sw.cc * @author Gerbrand De Laender * @date 19/04/2021 * @version 1.0 * * @brief E091103, Master thesis * * @section DESCRIPTION * * Single precision (f4) implementation. * */ #include <hls_math.h> #include "np_lib_trigonometric_hyperbolic_f4....
/* * SmartPhone.cpp * * Created on: Jun 7, 2016 * Author: g33z */ #include "SmartPhone.h" SmartPhone::~SmartPhone() { // TODO Auto-generated destructor stub } void SmartPhone::sendtoairplanemode(){ cout << "Mobilfunkverbindung und WLAN wird deaktiviert." << endl; }
/** * @file hash_function.hpp * @brief * @author kevin20x2@gmail.com * @version 1.0 * @date 2018-12-18 */ #ifndef KVFS_HASH_FUNCTION_HPP #define KVFS_HASH_FUNCTION_HPP #include <stdint.h> namespace kvfs{ // extern uint32_t crc32(const void * key ,int len ); extern uint64_t murmur64(const void * key , ...
// 0921_8.cpp : 定义控制台应用程序的入口点。 //数据的交换输出 //输入数据有多组,每组占一行,每行的开始是一个整数n,表示这个测试实例的数值的个数,跟着就是n个整数。n=0表示输入的结束,不做处理。 #include <iostream> #include<algorithm> using namespace std; int main() { int n; const int size = 100; while (cin >> n) { if (n == 0) break; int i, pos; int a[size], b[size]; for (i = 0; i < n...
//parsing xml files //-I/usr/include/libxml2 -lxml2 #pragma once #include <libxml/tree.h> #include "xr_log.h" #include "xr_util.h" namespace xr { struct xml_t { public: xmlDocPtr doc_ptr; //定义解析文档指针 xmlNodePtr node_ptr; //定义结点指针(你需要它为了在各个结点间移动) typedef std::ios_base &(&manip_t)(std::ios_base &); public: xml...
#include "opennwa/query/returns.hpp" #include "opennwa/query/calls.hpp" #include "opennwa/query/internals.hpp" #include "opennwa/query/PathVisitor.hpp" namespace opennwa { namespace query { using namespace wali; bool PathVisitor::visitRule( witness::WitnessRule * w ) { // There are four kinds of W...
class Category_529 { class HandGrenade_west { type = "trade_items"; buy[] = {4,"ItemGoldBar"}; sell[] = {2,"ItemGoldBar"}; }; class HandGrenade_east { type = "trade_items"; buy[] = {4,"ItemGoldBar"}; sell[] = {2,"ItemGoldBar"}; }; class 1Rnd_HE_M203 { type = "trade_items"; buy[] = {4,"ItemGoldBar"}...
#pragma once // MainGame대신 돌아갈꺼 #define BOX_MAX 4 #define BOX2_MAX 29 #define BOX3_MAX 4 #define COIN_MAX 5 class Program { private: class Camera* mainCamera; class Rect* mario; class BackGround* bg; class Box* box[BOX_MAX]; class Box* box2[BOX2_MAX]; class Box* box3[BOX3_MAX]; class Coin* coin[COIN_MAX]; P...
#include <iostream> #include <vector> using namespace std; #define int long long #define pb push_back #define endl '\n' const int N = 1e5 + 5; vector <int> Graph[N]; int vis[N]; int out[N]; int entry[N]; int timer = 1; vector <int> components; int n, m; void dfs(int src) { entry[src] = timer++; vis[src] = 1; com...
/* Date: 21-06-20 Name : Aman Jain */ #include<bits/stdc++.h> using namespace std; void dfs( int start, int visited[], vector<int> &order, vector<int> Graph []){ visited[start]=1; for(auto itr = Graph[start].begin() ;itr!=Graph[start].end() ;itr++){ if(!visited[*itr]) dfs(*itr,visited,order,...
class Category_491 { class LandRover_CZ_EP1 { type = "trade_any_vehicle"; buy[] = {2,"ItemGoldBar10oz"}; sell[] = {1,"ItemGoldBar10oz"}; }; class LandRover_TK_CIV_EP1 { type = "trade_any_vehicle"; buy[] = {2,"ItemGoldBar10oz"}; sell[] = {1,"ItemGoldBar10oz"}; }; class HMMWV_M1035_DES_EP1 { type = "tr...
#include <iostream> using namespace std; int n, m; int dp[1001][1001]; int matrix[1001][1001]; const int dir_i[3] = {0, -1, -1}; const int dir_j[3] = {-1, -1, 0}; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> n >> m; for (int i = 1; i <= n; i++) { for (int j = 1; j <=...
class Solution { public: string shortestPalindrome(string s) { string r = s; reverse(r.begin(),r.end()); string pattern = s+"#"+r; vector<int> next = getNextArray(pattern); return r.substr(0,s.size()-next.back())+s; } /* * 此处next数组多求最后一位 */ vector<int> g...
////////////////////////////////////////////////////////////////////// ///Copyright (C) 2011-2012 Benjamin Quach // //This file is part of the "Lost Horizons" video game demo // //"Lost Horizons" is free software: you can redistribute it and/or modify //it under the terms of the GNU General Public License as published ...
#include <string> #include <cstring> #include <math.h> #include <stdlib.h> #include <stdio.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #include <netdb.h> #include <queue> #include <cstdio> #include <sys/time.h> #include "platform.h" class SicarioClient { public: SicarioClient(...
#include "Crypt.h" #include <tclap/CmdLine.h> int main(int argc, char *argv[]) { auto args = parseCMD(argc, argv); CImg<PTYPE> secret(args["secret0"].c_str()); CImg<PTYPE> apparent(args["apparent"].c_str()); if (args["resize"] == "true") { enum class Interpolation { NoneRawMem = -1, NoneBoundaryCondition, Nea...
/** * Copyright (C) 2011, 2012 Michael Caisse, Object Modeling Designs * consultomd.com * Copyright (C) 2017 Zach Laine * * 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) */ #ifndef AST_VALUE_IMPL_HPP ...
class BTR60_TK_EP1: BRDM2_Base { class Turrets; // External class reference class MainTurret; // External class reference }; class BTR60_TK_EP1_DZ: BTR60_TK_EP1 { scope = 2; displayName = "$STR_VEH_NAME_BTR60_WOOD"; vehicleClass = "DayZ Epoch Vehicles"; commanderCanSee = 2+16+32; gunnerCanSee = 2+16+32; drive...
#include <iostream> int main() { int var; std::cout << "Enter your number between 1 and 100: "; std::cin >> var; std::cout << "Awesome, you gave me a " << var << std::endl << "Really!!! " << std::endl; return 0; }
//=========================================================================== //! @file ibl.cpp //! @brief IBL管理 //=========================================================================== //--------------------------------------------------------------------------- //! 初期化 //----------------------------------------...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch.h" #if defined(_MACINTOSH_) #include "pla...
#include <iostream> #include <fstream> #include <cstring> #include <cstdlib> #include <set> #include <bitset> #define BUG '#' #define MTY '.' using namespace std; ifstream fin("input.txt"); typedef pair<int, int> coord; const coord directions[] = { {-1,0}, //0 up {1, 0}, //1 down {0, -1}, //2 left {0, 1} //...
#include <string> #include <fstream> #include <iostream> #include <cstdlib> // for exit() #include <array> #include <map> #include "weight.h" using namespace std; // this function scores a single word created on an existing board //the word parameter must include all the letters of the word formed by the length of th...
// // channeltest.hpp // AutoCaller // // Created by Micheal Chen on 2017/7/18. // // #ifndef channeltest_hpp #define channeltest_hpp #include "cocos2d.h" #include "testbase/BaseTest.h" DEFINE_TEST_SUITE(ChannelTests); class LoginTest : public TestCase { public: LoginTest(); ~LoginTest(); CREATE_FUN...
//--------------------------------------------------------- // // Project: dada // Module: geometry // File: Vector3fUtils.h // Author: Viacheslav Pryshchepa // // Description: Utilities for three-element vector of floats // //--------------------------------------------------------- #if...
#include "LobyState.h" #include "PlayState.h" #include "Play2State.h" #include "Play3State.h" #include "TitleState.h" #include "OptionState.h" using namespace Ogre; LobyState LobyState::mLobyState; void LobyState::enter(void) { iCount1 = 0; iCount2 = 0; iCount3 = 0; mRoot = Root::getSingletonPtr(); mRoot->getA...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2011-2012 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" #include "modules/network/op_request.h" #i...
#ifndef QUEUE_HPP #define QUEUE_HPP #include <iostream> class Queue { public: Queue(); Queue(const int size); void push(const int value); void pop(); void print(); ~Queue(); private: int* arr; int size; int count; }; #endif
#include "core.h" template<typename Type> Type EntElement(Type T) { Type num; while (true) { cin >> num; if (cin.fail()) { cin.clear(); cin.ignore(32767, '\n'); cout << "Entered value is not number. Please, repeat your last response: "; } ...
#pragma once #include <QWidget> #include <QScopedPointer> #include "Entities/Key/PartOfKey/PartOfKey.h" class AddPartOfKeyForm : public QWidget { Q_OBJECT public: explicit AddPartOfKeyForm(QWidget *parent = nullptr); virtual ~AddPartOfKeyForm() noexcept = default; virtual void setPartOfKey(const PartOfKey &p...
#include<iostream> using namespace std; int hammingDistance(string first_word, string second_word) { int count = 0; if (first_word.size() != second_word.size()) { return -1; } for (int i = 0; i < first_word.size(); i++) { if (first_word[i] != second_word[i]) { count++; ...
#ifndef UAD_WIN32FRAMEWORK_H #define UAD_WIN32FRAMEWORK_H #include "Core.h" #include "BaseDriver.h" #include <memory> #include "InputsInfo.h" #ifdef USING_OGL #include <SFML\Graphics.hpp> #include <GL\glew.h> #else #include <SDL/SDL.h> #endif class Win32Framework : public RootFramework { public: Win32Framework( App...
#include "OtherUnderscore.hpp" #include "OtherUnderscoreExtra.hpp" #include "OtherUnderscore_p.hpp" class OtherUnderscoreLocal : public QObject { Q_OBJECT public: OtherUnderscoreLocal(); ~OtherUnderscoreLocal(); }; OtherUnderscoreLocal::OtherUnderscoreLocal() { } OtherUnderscoreLocal::~OtherUnderscoreLocal() ...
#include "Q04.h" void merge_sort(int *data, int start, int end, int *result) { if(0 == end - start) // 只有一个元素 return; else if(1 == end - start) // 有两个元素 { if(data[end] < data[start]) { int temp = data[end]; data[end] = data[start]; data[start]...
#include "mumuserver.h" #include <iostream> #include <QDir> #include <QTcpSocket> MumuServer* MumuServer::instance = NULL; MumuServer* MumuServer::getInstance(int port, QObject * parent) { if(instance == NULL){ instance = new MumuServer(port, parent); } return instance; } /** Constructor */ MumuServer::MumuS...
#pragma once #include "libOTe/config.h" #if defined(ENABLE_MRR) || defined(ENABLE_MRR_TWIST) #include <cryptoTools/Common/Defines.h> #include <cryptoTools/Crypto/PRNG.h> #include <cryptoTools/Crypto/RandomOracle.h> namespace osuCrypto { class FeistelMulPopf { public: struct PopfFunc { ...
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #include "gtdocrange.h" #include "gtdocmessage.pb.h" #include "gtdocpage.h" #include "gtserialize.h" #include <QtCore/QDebug> GT_BEGIN_NAMESPACE QPoint GtDocRange::intersectedText(GtDocPage *page) const { GtDocument *document = page->document(); int ...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <quic/client/handshake/ClientHandshake.h> #include <quic/client/handshake/ClientTransportParametersExtension.h> #includ...
#include "test_precomp.hpp" CV_TEST_MAIN("cv")
#include <bits/stdc++.h> using namespace std; vector<vector<int> > adys(100007); stack<int> pila; vector<bool> inStack(100007); vector<bool> visit(100007); long long int costos[100007]; unsigned long long int total,posis=1; int discTempo[100007]; int minTempo[100007]; int minimos; int cuantos; int N,M,u...
/* XMRig * Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> * C...
/* * File: PoseOperationTest.cpp * Author: azamat * * Created on Jan 24, 2013, 2:05:58 PM */ #include "poseOperationTest.hpp" CPPUNIT_TEST_SUITE_REGISTRATION(PoseOperationTest); PoseOperationTest::PoseOperationTest() { } PoseOperationTest::~PoseOperationTest() { } void PoseOperationTest::setUp() { ...
#include "floorgrass.h" FloorGrass::FloorGrass(QObject *parent) : Ground(parent) {} FloorGrass::FloorGrass(int x, int y, int width, int height, QObject *parent) : Ground(x, y, width, height, ":/images/terrain/ground/images/terrain/ground/floorGrass.png...
// // Tenta.hpp // final_sketch2 // // Created by Kris Li on 12/1/16. // // #pragma once #include "ofMain.h" class Tenta { public: Tenta(); void init(ofPoint pos); void update(); void draw(); ofPolyline hand; ofPolyline handS; ofPoint pos; private: int size;...
#include <iostream> #include <cstring> #include <cmath> using namespace std; char infix[55], pseudoinfix[55], postfix[55]; double integers[26]; double result = 0; struct Result // To calculate result { double x; Result *next; } *Topr = NULL; struct Stack // to convert infix to pseudoinfix { char Operator; S...
#pragma once #include <string> #include <vector> #include <sstream> using namespace std; struct Element { virtual ~Element() = default; virtual void printHTML(ostringstream& oss) const = 0; // If you want extend it to e.g. markdown printing you need a separate method, // Violates the Open-Closed Principle: ...
// // Error.h // Lab6Progr // // Created by Дмитрий Богомолов on 14.11.14. // Copyright (c) 2014 Дмитрий Богомолов. All rights reserved. // #ifndef Lab6Progr_Error_h #define Lab6Progr_Error_h class Error { public: class MemoryAllocError{}; class IOError{}; class OutOfBounds{}; class Null...
/*********************************************************\ * 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...
#include <stdio.h> #include "heapfileLib.h" int main(int argc, char *argv[]) { if (argc < 3) { printf("Usage: scan <heapfile> <page_size>\n"); return 0; } Heapfile *heapFile; Record heapRecord; FILE* dataFile = fopen(argv[1], "r+"); int pageSize = atoi(argv[2]); heapFile = (Heapfile *) malloc(sizeof(Hea...
#include <iberbar/Utility/Xml/RapidXml.h> #include <iberbar/Utility/String.h> #include <iostream> #include <rapidxml.hpp> #include <rapidxml_print.hpp> #include <rapidxml_utils.hpp> namespace iberbar { namespace Xml { typedef rapidxml::xml_node< char > RapidNodeContextA; typedef rapidxml::file< char > ...
#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>...
#pragma once #ifndef AVL_GL_API_H #define AVL_GL_API_H #include "glfw_app.hpp" #include "file_io.hpp" #include "stb/stb_image.h" // Todo: supported extensions // Todo: glMultiDrawElementsIndirect // Todo: occlusionQuery // Todo: timerQuery // Todo: computeShaders (glDispatchCompute) // Todo: blit/multisample? // Tod...
// Copyright 2016 Google Inc. All Rights Reserved. // // 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 applicabl...
#include "TTrie.h" TNode::TNode() : suffLink(nullptr), exitLink(nullptr), leaf(false) {} void addPattern(TNode* root, vector<uint32_t>& pat, size_t patSize) { TNode* curNode = root; for (auto it : pat) { if (curNode->child.find(it) == curNode->child.end()) curNode->child.insert(mak...
#include "PropFactory.h" #include "Base.h" #include "Health.h" using namespace uth; using namespace pmath; uth::GameObject* PropFactory::CreateBase() { GameObject* go = new GameObject(); go->AddTags({ "Props", "Base" }); go->AddComponent(new Health(0, 100)); go->AddComponent(new uth::Sprite("Base.png")); go->Add...
/* * Copyright (c) 2009 Joel de Vahl * 2009 Markus Ålind * see LICENSE file for more info */ #ifndef INC_SIMD_IMPLEMENTATION_HPP #define INC_SIMD_IMPLEMENTATION_HPP #include "intrinsics.hpp" /*-----------------------------------------------------------------*\ | Complex bit and byte twiddling \*---...
#ifndef DATA_MANAGER_HPP #define DATA_MANAGER_HPP #include "../Common/Configuration.hpp" #include "../Common/Math.hpp" #include "../Common/Vector2.hpp" #include "../Services/Input.hpp" #include "../Services/Window.hpp" #include "../Services/ImmediateRenderer2D.hpp" #include <Box2D/Box2D.h> #include <tuple> #include...
#include "CSceneGame.h" //OpenGL #include "glut.h" // #include "CCamera.h" // #include "CText.h" // #include "CRes.h" //スマートポインタの生成 std::shared_ptr<CTexture> TextureExp(new CTexture()); CSceneGame::~CSceneGame() { } void CSceneGame::Init() { //3Dモデルファイルの読み込み CRes::sModelX.Load(MODEL_FILE); ...
// Fill out your copyright notice in the Description page of Project Settings. #include "InteractableActor.h" #include "Components/BoxComponent.h" // Sets default values AInteractableActor::AInteractableActor() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don...
#pragma once class BinkManager { public: static void Render(); static void Close(); };
#include "GameController.h" #include <iostream> #include <fstream> #include <vector> #include <random> #include <algorithm> #define STATUS_OK 0 #define STATUS_INVALID 1 #define STATUS_QUIT 2 #define STATUS_TERMINATE 3 Game::Game() : m_nRows(6) , m_nCols(6) , m_nCurrentPlayer(0) { } Game::~Game() { } void...
#pragma once #include "ofMain.h" class Stones { public: Stones(); ~Stones(); void init(); void render( std::vector< ofPolyline > closedLines, std::vector< float > transparencies, ofPoint centered ); ofFbo getBuffer(); private: ofFbo buffer; };
#include "stdafx.h" #include <iostream> #include "LT.h" #include "Error.h" namespace LT { LexTable Create(int size) //Создать ТЛ { LexTable* tabl = new LexTable; if (size > LT_MAXSIZE)///4096 { throw ERROR_THROW(113); ///Заданное количество строк в ТЛ > 4096 } tabl->maxsize = size; t...
#pragma once #include<iostream> using namespace std; #define MAXSIZE 128 //字符串的最大长度 class Astring { public: Astring(); Astring(const char* init); Astring(const Astring& ob); //复制构造函数 ~Astring(); int Length()const; //返回字符串的长度 Astring operator()(int pos, int len); //指出从pos-1开始到pos+len-1的字符串 int opera...
#ifndef WALI_WFA_DETERMINIZE_WEIGHT_GEN_HPP #define WALI_WFA_DETERMINIZE_WEIGHT_GEN_HPP #include "wali/Key.hpp" #include "wali/SemElem.hpp" #include <set> #include <map> namespace wali { namespace wfa { class WFA; class ITrans; class DeterminizeWeightGen { public: typedef std::map<Key, ...
// SPOJ HIST2 #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define oo 1000000000 int A[16]; int DP[16][1<<16]; int cnt[16][1<<16]; int n; int solve(int c, int mask) { if(DP[c][mask]!=-1)return DP[c][mask]; int res = 0; int ways = 1; for(int i=0; i<n; i++) ...
#include <iostream> #include <GL/glut.h> #include "Ising_simulator.hpp" #include "spin.hpp" #include "Ising_simulator_traits.hpp" #include "Ising_window_traits.hpp" #include "Ising_draw_func.hpp" #include "Ising_model_parameters.hpp" #include "Ising_global_variable.hpp" int main(int argc, char *argv[]){ Ising_simu...
#include <stdio.h> #include <iostream> #include "Chaine.hpp" void annexe(const Chaine &s) { std::cout << s.taille() << std::endl; //std::printf("%d\n", s.taille()); } Chaine print(Chaine s){ s.debug(); return s; } void main1(){ Chaine chaine("Une petite"); chaine.debug(); annexe(chaine); } void main...
#include <QWidget> #include <CXYVals.h> class CQXYValsTest; class CQXYValsCanvas : public QWidget { Q_OBJECT public: CQXYValsCanvas(CQXYValsTest *text); private: void paintEvent(QPaintEvent *); void mousePressEvent (QMouseEvent *me); void mouseMoveEvent (QMouseEvent *me); void mouseReleaseEvent(QM...
#include <iostream> using namespace std; unsigned int odd_bits = 0; unsigned int even_bits = 0; void init() { for (int i = 0; i < 32; i++) { if ((i % 2) == 0) { even_bits |= (1 << i); } else { odd_bits |= (1 << i); } } } int pairwise_swap(int n) { return ...
#include <maker_robot/robot_hardware_interface.h> #include <std_msgs/UInt16.h> //namesapce i2c_ros ROBOTHardwareInterface::ROBOTHardwareInterface(ros::NodeHandle& nh) : nh_(nh),linear_(1),angular_(2) { init(); // joy nh_.param("axis_linear", linear_, linear_); nh_.param("axis_angular", angular_, ang...
#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 <numeric> #include <sstream> typ...
#ifndef LOGISTIC_LAYER_H_ #define LOGISTIC_LAYER_H_ #include "Layer.h" class Logistic_layer: public Layer { public: Logistic_layer(int dimension); virtual ~Logistic_layer(); protected: virtual MatrixXd act_func(MatrixXd input); virtual MatrixXd act_func_g(MatrixXd input); }; #endif
/* -*- 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 ACCESSIBILITY_TREE_ROOT_NODE_H #define ACCESSIBILITY_TREE...
using ll = long long; //n^kをmで割ったあまりを求める繰り返し二乗法 ll pow_mod(ll n, ll k, ll m){ ll r = 1; //kの下の桁から処理。右シフトで処理し終わった桁を追い出す。 //ゼロになるまでやる for(;k>0; k >>= 1){ if(k & 1) r = (r * n) % m; //kの一番下の桁のフラグが立っていたらnをかける n = (n * n) % m; //次の桁の処理にむけてnを自乗しておく } return r; }
#include "myclass.h" #include <QThread> #include <qpushbutton.h> #include <pugixml.hpp> MyClass::MyClass(QWidget *parent) : QMainWindow(parent), snapIndex(0) { ui.setupUi(this); m_emHandler = new DR::EMHandler(this); m_emHandler->connect(); m_leapHandler = new LeapHander(); m_leapHandler->moveToThread(&leapThre...
/* -*- 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. ** */ #ifndef MAC_PLUGIN_CRASHLOG_H #define MAC_PLUGIN_CRASHLOG_H /** @...
#ifndef MENU_H #define MENU_H #include <Windows.h> #include <vector> #include <string> #include "MenuItem.h" class Menu : public MenuItem { public: Menu(std::string itemName, bool popupMenu = false); virtual ~Menu(); bool takeChild(MenuItem* child, UINT index); MenuItem* giveChi...
#include <iostream> #include <vector> #include <dirent.h> #include "vocabulary_creator.h" #include "fbow.h" #include "Database.h" #include <opencv2/opencv.hpp> #include <opencv2/features2d/features2d.hpp> using namespace fbow; using namespace std; vector<string> readImageFolder(string folderPath){ DIR *dir; ...
#ifndef BATTLE_HPP #define BATTLE_HPP #include <string> #include <iostream> #include <vector> #include "Engimon.hpp" #include "Player.hpp" #include "SkillItem.hpp" using namespace std; class Battle { private: Player player; Engimon engimonPlayer; Engimon engimonWild; int levelEngimonPlayer; //...
#pragma once #include "../../Toolbox/Toolbox.h" #include "Texture.h" namespace ae { class FramebufferAttachement; /// \ingroup graphics /// <summary> /// 3D samplable data that can be link to a shader to be rendered. /// </summary> class AERO_CORE_EXPORT Texture3D : public Texture { public: /// <summary>Cr...
/* -*- 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. */ #include "core/pch.h" #include "modules/style/src/css_conditiona...
/*! @file LogVol_SegmentedCrystal_Box.hh @brief Defines mandatory user class LogVol_SegmentedCrystal_Box. @date September, 2015 @author Flechas (D. C. Flechas dcflechasg@unal.edu.co) @version 2.0 In this header file, the 'physical' setup is defined: materials, geometries and positions. This class define...
#ifndef LETNODE_H #define LETNODE_H #include <vector> #include <string> #include <iostream> #include "Node.hpp" #include "VariablesTable.hpp" #include "ClassNode.hpp" using namespace std; class LetNode : public Node { private: string objectId; string type; Node *expr = nullptr; Node *assign = nullptr...
#ifndef __CGET_NOTICE_H_ #define __CGET_NOTICE_H_ #include <string> #include "CHttpRequestHandler.h" class CGetNotice : public CHttpRequestHandler { public: CGetNotice(){} ~CGetNotice(){} virtual int do_request(const Json::Value& root, char *client_ip, HttpResult& out); private: bool GetNotice(int ...
#include<bits/stdc++.h> using namespace std; const int X[4] = {1,2,2,1}, Y[4] = {-2,-1,1,2}; int a[100][100]; int m, n; int s; void input(){ cin >> m >> n; for (int i = 0; i < m; ++i) for (int j = 0; j < n; j++) cin >> a[i][j]; } bool isInside(int x, int y){ return (x >= 0 && x < m && y >=...
#pragma once #include "global.h" class CItem { public: CItem(void); ~CItem(void); void create_item(int xx,int yy,int ttt); void init_item(); void move(); bool live; float x,y; int timer; };
#include "game/LoadingScreen.hpp" LoadingScreen::LoadingScreen(){ gLoadTextTexture = new LTexture(); loadIcon = new LTexture(); background = new LTexture(); timer = new LTimer(); timer->start(); connecting_to_server = false; } LoadingScreen::~LoadingScreen(){ delete(timer); loadIcon->fr...
// IStrokeContainer.h #pragma once /* Copyright © 2006, Drollic All rights reserved. http://www.drollic.com Redistribution of this software in source or binary forms, with or without modification, is expressly prohibited. You may not reverse-assemble, reverse-compile, or otherwise reverse-engineer this so...
#include "stdafx.h" #include "Object.h" Jaraffe::Object::Object() { } Jaraffe::Object::~Object() { }
/** * created: 2013-4-8 13:29 * filename: FKFrameAllocator * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include "../Include/STLTemplate/FKFrameAllocator.h" //--------------------------------------------------------------------...
#pragma once #include "plbase/PluginBase.h" #include "CAtomicModelInfo.h" class PLUGIN_API CTimeModelInfo : public CAtomicModelInfo { public: tTimeInfo m_timeInfo; void FindOtherTimeModel(char *modelName); }; VALIDATE_SIZE(CTimeModelInfo, 0x24);
#include "OrthoBuilder.h" SolInfo::SolInfo() { o.resize( EQ_NUM * EQ_NUM, 0.0 ); z1.resize( EQ_NUM ); z2.resize( EQ_NUM ); z3.resize( EQ_NUM ); z4.resize( EQ_NUM ); z5.resize( EQ_NUM ); C.resize( EQ_NUM / 2 ); } void SolInfo::flushO() { for( int i = 0; i < o.size(); ++i ) { o[i] = 0.0; } } SolInfo::~Sol...
#ifndef MASTERS_PROJECT_EUROBINOMIALMETHODVERSION2_H #define MASTERS_PROJECT_EUROBINOMIALMETHODVERSION2_H #include "EuroBinomialMethod.hpp" template<typename X> class EuroBinomialMethod2 : public EuroBinomialMethod<X> { public: EuroBinomialMethod2(Case<X> *_aCase); protected: void build_asset_price_tree() ov...
#include <Arduino.h> using namespace std; #ifndef __OneLiner_H__ #define __OneLiner_H__ struct OneLinerMessage{ float data; int msgType; char* topic; char* msg; }; class OneLiner { /* OneLiner is a simple class for arduino that makes writing messages to rofous_ros clean and easy. These messages a...
/* 朴素的实现方法,时间复杂度为O(n^4)——需要找O(n)次增广路,每次增广最多需要修改O(n)次顶标, 每次修改顶标时由于要枚举边来求min值,复杂度为O(n^2)。实际上KM算法的复杂度是可以做到O(n^3)的。 我们给每个Y顶点一个“松弛量”函数slack,每次开始找增广路时初始化为无穷大。 在寻找增广路的过程中,检查边(i,j)时,如果它不在相等子图中, 则让slack[j]变成原值与lx[i]+ly[j]-g[i][j]的较小值。 这样,在修改顶标时,取所有不在交错树中的Y顶点的slack值中的最小值作为d值即可。 但还要注意一点:由于修改顶标后,所有在交错树中的lx[i]都减d,因此要把所有的slac...
#include <iostream> #include <list> #include <algorithm> #include <iterator> using namespace std; void print_list(const list<int> &l1, const list<int> &l2) { cout << "list 1 : " ; copy(l1.begin(), l1.end(), ostream_iterator<int>(cout, " ")); cout << endl << "list 2 : "; copy(l2.begin(), l2.end(), ostream_ite...
/* * File: main.cpp * Author: Elijah De Vera * Created on January 14, 2021, 12:29 PM * Purpose: Calculating sums of pos and neg integers */ //System Libraries #include <iostream> //Input/Output Library #include <iomanip> using namespace std; //User Libraries //Global Constants, no Global Vari...
/*==================================================================== Copyright(c) 2018 Adam Rankin 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 limitat...
// Module2.cpp : This file contains the 'main' function. Program execution begins and ends there. #include <iostream> using namespace std; int main() { // Get the variables for this module // Joe paid his stockbroker a commission that amounted to 2 percent of the amount he paid for the stock. const float ...