text
stringlengths
8
6.88M
#ifndef LISP_CVEC_TEST_HPP #define LISP_CVEC_TEST_HPP #include <gtest/gtest.h> #include <cvector.h> #include <hash.h> #include <permutations.h> #include <ops.h> namespace { } #endif //LISP_CVEC_TEST_HPP
#include<iostream> #include<set> #include<map> #include<vector> #include<algorithm> using namespace std; int main() { map<long int, long int>m; map<long int, long int>::iterator it; set<long int>s; set<long int>::iterator it1; vector<long int>v; long int temp,n,t,start,i; cin>>n; while(n--) { ...
#include "flyweight.hpp" int main() { ChessFactory cf; auto wc = cf.get(COLOR::WHITE); wc->draw(0, 2); auto bc = cf.get(COLOR::BLACK); bc->draw(4, 5); auto wc2 = cf.get(COLOR::WHITE); std::cout << "wc at " << wc << std::endl; std::cout << "wc2 at " << wc2 << std::endl; }
#pragma once #include "components/ai/ai.hpp" #include <vector> struct Room; namespace hydroponics { struct HydroponicsTable; struct HydroponicsAI : ai::AIScript { virtual timer_t start(ai::AI*) override; virtual timer_t update(ai::AI* ai) override; virtual const std::string& descrip...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "examples/wm_flow/wm/frame_controller.h" #include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "mojo/converters/geo...
SYSTEMTIME lt; GetLocalTime(&lt); txtset(t,"Date: "); txtnumint(t2,lt.wYear); txtadd(t,t2); txtadd(t,"/"); txtnumint(t2,lt.wMonth); if (t2->l<2) {txtadd(t,"0");} txtadd(t,t2); txtadd(t,"/"); txtnumint(t2,lt.wDay); if (t2->l<2) {txtadd(t,"0");} txtadd(t,t2); txtadd(t," Time: "); txtnumint(t2,lt.wHour); if (t2->l<2) {t...
#ifndef Gcode_h #define Gcode_h #include <arduino.h> class Gcode { public: Gcode(String code); String get(); void solve(); void solve0(int readPos); void solve28(int readPos); private: String code; }; #endif
#include<bits/stdc++.h> using namespace std; #define PI 3.1415926535897932 int main(){ char c; int i; double d, e; printf("変数c のアドレスは%p \n",&c); printf("変数i のアドレスは%p \n",&i); printf("変数d のアドレスは%p \n",&d); printf("変数e のアドレスは%p \n",&e); return 0; }
// Node implementation. #include "cc/exercises/node.h" #include "cc/shared/common.h" #include "cc/shared/rand_utils.h" namespace cc_exercises { Node::Node(Node* parent_param) { val = 0; left = right = NULL; parent = parent_param; } void Node::free_tree() { if (left) { left->free_tree(); } if (right)...
/** * created: 2013-4-7 22:54 * filename: FKSingleton * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #pragma once //------------------------------------------------------------------------ #include "FKSyncObjLock.h" //-----------...
// // Created by nikita on 12/26/19. // #ifndef SERVER_EPOLL_H #define SERVER_EPOLL_H #include "../debug.h" #include <sys/socket.h> #include <sys/epoll.h> #include <stdexcept> #include <netinet/in.h> #include <cassert> #include <iostream> #include <list> #include "file_descriptor.h" #include "address.h" struct epoll...
/** * @file Game.hpp * @author Jan Zarsky (xzarsk03@stud.fit.vutbr.cz) * Andrei Paplauski (xpapla00@stud.fit.vutbr.cz) * @brief Declaration of Class Game, desctiption of look of all game piles */ #ifndef GAME_H #define GAME_H #include "Card.hpp" #include "Pile_Factory.hpp" #include <vector> #includ...
/*-------------------------------------------------------------------- Name: Michael Martin Date: 1/26/2020 Course: CSCE 236 Embedded Systems (Spring 2020) File: lab1.cpp HW/Lab: Lab 1, programming component Purp: Source code for Arduino board, has a few funcions that can flash RGB LED, and use photosensors to f...
/** * @author : ashwek * @date : 26/12/2018 */ #include<iostream> using namespace std; int main(){ int n; cout<<"Enter n = "; cin>>n; //Upper-Half for(int i=1; i<=n; i++){ for(int j=1; j<=i; j++) cout<<j <<" "; cout<<endl; } //Lower-Half for(int i=...
/* ----------------------------------------------------------------------------------------- Laboratory : POO2 - Laboratoire 14 File : main.cpp Author : Thomas Benjamin, Gobet Alain Date : 22.03.2018 Class : POO - A Goal : Definition of a main class that will test all the the features...
/* @lc app=leetcode.cn id=160 lang=cpp * [160] 相交链表 */ // @lc code=start /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; */ #include<iostream> #include<vector> #include<map> using namespace std; // struct ListNode { // int...
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace cv; using namespace std; /** @function main */ int main( int argc, char** argv ) { Mat src; Mat src_gray; /// Load source image and convert it to gray sr...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Engine/GameInstance.h" #include "DnE_GameInstance.generated.h" /** * */ UCLASS() class SYCHARACTER_API UDnE_GameInstance : public UGameInstance { GENERATED_BODY() public...
#ifndef SCL_MEMMGR_H #define SCL_MEMMGR_H #include <scl_export.h> /** Platform specific defines */ #if defined(__MSVC__) || defined(__BORLAND__) #define THROW_STD_BAD_ALLOC #define THROW_EMPTY #else #define THROW_STD_BAD_ALLOC throw (std::bad_alloc) #define THROW_EMPTY throw () #...
/* ** EPITECH PROJECT, 2018 ** IrrlichtDisplay ** File description: ** IrrlichtDisplay */ #include "OldIrrlichtDisplay.hpp" #define TEXTURE_BASE "../../Ress/model/wood.jpg" #define IRON_BOX "../../Ress/model/iron_box.png" #define GRASS "../../Ress/model/grass.jpg" #define PURPLE_GEM "../../Ress/model/Powe...
#include <iostream> #include <set> #include <string> using namespace std; int main() { string s1, s2, res; getline(cin, s1); getline(cin, s2); int i = 0, j; // FIXME 甩不掉最后的一串 cat while (i < s1.length()) { int complete = 0; if (s1[i] == s2[0]) { for (j = 0; j <...
// // Dataset.hpp // gradient_descent // // Created by ccchang on 2016/9/2. // Copyright © 2016年 張家銓. All rights reserved. // #ifndef Dataset_hpp #define Dataset_hpp #include <stdio.h> #include <vector> using namespace std; class DATASET { public: DATASET(); ~DATASET(); void createTrainingData(int ...
// Copyright Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ========================================================================...
#include <stdio.h> #include <iostream> using namespace std; int main(int argc, char **argv) { // array declaration as string with values int number[5] = {1, 2, 3, 4, 5}; // will print the given values using for-loop cout << "Current existing numbers are:" << endl; for(int count = 0; count < 5; count++) { ...
#include <stdio.h> #include <stdlib.h> #include <string.h> //a, b중 큰 값 돌려주는 매크로 함수 #define MAX(a,b) (((a)>(b))? (a):(b)) //MAX_DEGREE 값 매크로로 지정 #define MAX_DEGREE 101 //다항식 구조체 typedef struct { int degree; //차수 int coef[MAX_DEGREE]; //계수 }polynomial; //다항식끼리 더하는 함수 polynomial poly_add(p...
////////////////////////////////////////////////////////////////////// ///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 <iostream> #include "am_pm_clock.h" using namespace std; // Assignment №1. Assanali Sailau /* * Default constructor - initial time should be midnight */ am_pm_clock::am_pm_clock(): hours(0), minutes(0), seconds(0), am(true) { cout << "Default constructor\n"; } /* * Constructor - set...
#include "pointcloudConvertHelper.hpp" #include <algorithm> #include <math.h> #include <stdexcept> using namespace velodyne_lidar; /** * provides the look up tables for the horizontal and vertical rotation. * needs about 2,3 mb of memory. */ class RotationLUT { public: static RotationLUT* getInstance() { ...
#ifndef __com_bql_MSG_Native_H__ #define __com_bql_MSG_Native_H__ #include <android/native_window_jni.h> //ANativeWindow #include "common.h" enum NATIVE_POST_MESSAGE { MEDIA_STATUS = 0, MEDIA_PREPARED, MEDIA_SEEK_COMPLETED, MEDIA_PLAY_COMPLETED, MEDIA_SHOT_COMPLETED, MEDIA_SHOWFIRSTFRAME, MEDIA...
// Frequency of vector #include<bits/stdc++.h> using namespace std; map<int, int> vectorFrequency(vector<int> v) { map<int, int> m; for(auto &item: v) if(m.find(item)!=m.end()) m[item]++; else m[item]=1; return m; } pair<int, int> maxVectorFreqeuncy(map<int, int> ...
#ifndef TREEFACE_SHAPE_GENERATOR_H #define TREEFACE_SHAPE_GENERATOR_H #include <treecore/Identifier.h> #include <treecore/RefCountObject.h> #include <treecore/RefCountSingleton.h> #include "treeface/math/Vec2.h" #include "treeface/graphics/Utils.h" #include "treeface/base/Enums.h" class TestFramework; namespace tre...
#include <opencv2/opencv.hpp> #include "ArgsParser.h" #include "WinUtils.h" int main(int argn, char** args) { ArgsParser parser(argn, args); double fps = 29.97; double resizeScale = 1.0; int endFrame = -1; int startFrame = 0; int trimEnd = 0; std::string fourcc = "H264"; std::string filePattern = "*.png"; std...
/*In this program we will be seeing about INPUT AND OUTPUT in C++ Program*/ /*In C++ Program iostream is a standard library function which contains functions like cin , cout, cerr , c log etc...*/ /*In this program lets see about CLOG in c++ program*/ /*clog is said to be attached to the standard error device , in o...
#include <bits/stdc++.h> using namespace std; double T[102][102], P[102], AUX[102]; int n, t, k, m; double MARKOV(); int main() { double tot = 0; int cont = 1; while(scanf("%d", &n) && n) { scanf("%d %d %d", &t, &k, &m); t--; k--; for(int i=0;i<n;i++) { P[i] =...
#include <iostream> #include <vector> #include <algorithm> #include <sstream> using namespace std; using u8 = uint8_t; int main(int argc, char* argv[]){ if (argc < 3){ cout << "< 2 arguments\n"; return -1; } int rd = atoi(argv[1]); int cd = atoi(argv[2]); stringstream ss; int ...
// 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 "Robot.h" float whiteValue = 0; float blackValue = 0; Robot::Robot(): RobotBase(), ultraLeft(4, 5), ultraRight(A2, A1), ultraBack(0, 0), lightLeft(A0), lightRight(A1), gyro(0x68), ir(10, A4, A3, A5), pixy(0x54), motorA(0x08, 11, 13, 12), motorB(0x08, 5, 10, 9), motorC(0x08, 6, 7, 8), motorD(0x08...
#include <bits/stdc++.h> using namespace std; int main() { int n, as = 1, bs = 0; string s, a, b; cin>>n; cin >> a; for (int i = 0; i < n - 1; i++) { cin >> s; if (s == a) { as += 1; } else { b = s; ...
// // Created by manout on 17-8-5. // #include <string> #include <vector> #include <sstream> std::string format_number(int number) { std::stringstream ss; std::string number_string, ret; std::size_t len ; size_t hundred, deca, last, i; ss << number; ss >> number_string; len = number_strin...
#pragma once #include "scheduler.h" // generated code #include "scheduler.grpc.pb.h" #include "scheduler.pb.h" namespace sim::core { using grpc::ClientContext; using grpc::Status; using simulator_remote_scheduler::CloudStateMessage; using simulator_remote_scheduler::ResourceState; using simulator_remote_scheduler::...
#include "Aircraft.hpp" #include "Game.hpp" #include "State.hpp" Aircraft::Aircraft(Type type, State* state) : Entity(state) , mType(type) { switch (type) { case (Type::Eagle): mSprite = "Eagle"; break; case (Type::Raptor): mSprite = "Raptor"; break; default: mSprite = "Eagle"; break; } } unsigned ...
/* leetcode 46 * * * */ #include<stdio.h> #include<cstring> #include<iostream> #include<algorithm> // std::sort #include<cstring> #include<vector> #include<set> #include<string> #include<map> #include<queue> #include<stack> #include<deque> #include<unordered_set> #include<unordered_map> using namespace std; class ...
#ifndef SIM900_SHIELD_h #define SIM900_SHIELD_h #include <Arduino.h> #include <SoftwareSerial.h> /* CONSTANTS */ const byte MAX_SIM_MESSAGE_SIZE = 30; // Size of receiving messages buffer const unsigned long SIM_POWER_ON_MILLIS = 300000; // Number of milliseconds to stay powered on (5 minutes) const ...
#ifndef _GPS_RMC_TYPE_H_ #define _GPS_RMC_TYPE_H_ #include <base/time.h> namespace velodyne_lidar { enum GPSStatus { ValidPosition, ReceiverWarning, UnknownStatus }; enum SignalMode { AutonomousMode, DifferentialMode, EstimatedMode, InvalidMode, SimulatedMode, UnknownMode }; ...
/* * www.botzone.org * rules: there will be show two windows,one is for you(maybe support your program latter), another is prepare to my program.I plan to realize it with neural netwok. unlike traditional Tetris,only the first item is randomized,the subsequent items is appointed by the other party. the map ...
/* Author: Mincheul Kang */ #include <harmonious_sampling/HarmoniousParameters.h> HarmoniousParameters::HarmoniousParameters(ompl::base::RealVectorBounds &bounds): bounds_(bounds) { resolution_ = 10; prob_goal_ = 1; prob_uniform_ = 20; max_num_goal_ = 50; weights_.push_back(1.0); weights_...
#ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS //#define WIN32_LEAN_AND_MEAN #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include "zlib/zlib.h" #ifdef _WIN32 #include <conio.h> #include <Windows.h> #include <winhttp.h> #else #include <sys/types.h> #include <dirent.h> #endif #define UTF8_BOM_STR ...
#ifndef __Zengine__LoadingScreen__ #define __Zengine__LoadingScreen__ #include "cocos2d.h" USING_NS_CC; class LoadingScreen : public CCScene { public: static LoadingScreen* create(const int screenid, const std::vector<int> param); LoadingScreen(); bool init(const int screenId, const std::vector<...
// maindlg.h : interface of the CSettingsDlg class // ///////////////////////////////////////////////////////////////////////////// #include "freeSSHdHandler.h" #include "ResizablePropertySheet.h" #if !defined(AFX_MAINDLG_H__44A6BE96_E0FC_4283_A243_44C30B66EC2D__INCLUDED_) #define AFX_MAINDLG_H__44A6BE96_E0FC_4...
/* * 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. */ #pragma once #include <folly/TokenBucket.h> #include <glog/logging.h> #include <quic/QuicConstants.h> #include <deque> namespac...
// // Created by abel_ on 23-06-2022. // #include <bits/stdc++.h> using namespace std; /* * 1<= i <= N , p_i != i * |p_1-1| xor |p_2-2 | xor |p_3-3| xor ... xor |p_N-N| = 0 * then p is called good * */ int main(){ int T; cin >> T; while(T--){ int N; cin >> N; // create a 2d array...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef X11_DEBUG_H #define X11_DEBUG_H #ifdef _DEBUG #include ...
#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; int f[100000 + 10]; set<int> use; int add(int x) { if (!use.count(x)) { use.insert(x); re...
/* -*- 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" #ifdef NS4P_COMPONENT_PLUGINS #include "m...
// Created on: 1996-07-24 // Created by: Herve LOUESSARD // Copyright (c) 1996-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...
/* -*- 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. */ #ifndef SCOPE_DOCUMENT_MANAGER_H #define SCOPE_DOCUMENT_MANAGER_H #if...
/** @file Arduino library for communicating with Modbus server over Ethernet in TCP. */ /* ModbusTCP.h - Arduino library for communicating with Modbus server over Ethernet (via TCP protocol). This file is part of ModbusTCP. ModbusTCP is free software: you can redistribute it and/or modify it under the ...
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Main.h" //--------------------------------------------------------------------------- #pragma resource "*.dfm" TMainForm *MainForm; //--------------------------------------------------------...
// // Created by msagebaum on 4/2/18. // #ifndef GPSANALYSER_STATISTICS_H #define GPSANALYSER_STATISTICS_H #include <cmath> #include <ostream> #include "util.h" struct Statistics { long totalTime; double totalDistance; double totalRaiseHeight; double totalFallHeight; double totalRaiseDistance; ...
#ifndef INCLUDE_PUPPYDOG_BACKGROUND_HPP #define INCLUDE_PUPPYDOG_BACKGROUND_HPP #include <opencv2/video/background_segm.hpp> // Remove video background with BackgroundSubtractor classes. // PtrBs is cv::Ptr<cv::BackgroundSubtractorMOG> or something. // template <typename PtrBs> class BackgroundRemover { PtrBs i...
#ifndef VECTOR_H #define VECTOR_H class Vector { public: Vector(void); Vector(float*); Vector(float, float, float); Vector(Vector*); Vector(const Vector&); virtual ~Vector(void); float getX(void) const; float getY(void) const; float getZ(void) const; float getMagnitude(void) const; void getVector(float*) c...
#include "x_pch.h" #include "x/x_graphics.h" namespace x { x_Graphics::x_Graphics() { } x_Graphics::~x_Graphics() { } }
#pragma once class AI_TurnTo : public Hourglass::IAction { public: void LoadFromXML( tinyxml2::XMLElement* data ); void AI_TurnTo::Init( Hourglass::Entity* entity ); IBehavior::Result Update( Hourglass::Entity* entity ); IBehavior* MakeCopy() const; private: hg::Transform* m_Player; hg::Transform* m_BossHead;...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; -*- ** ** Copyright (C) 2002-2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifdef UPNP_SUPPORT #ifndef UPNP_UPNP_H_ #define UPNP_UPNP_H_ ...
#include "PrimaryGeneratorAction.hh" #include "G4ParticleTable.hh" #include "G4PhysicalConstants.hh" #include "Randomize.hh" PrimaryGeneratorAction::PrimaryGeneratorAction() { gun.SetNumberOfParticles(1); gun.SetParticleDefinition(G4ParticleTable::GetParticleTable()->FindParticle("gamma")); gun.SetParticle...
#pragma once #include <utility> template<typename T> class shared { public: shared(const shared &) = delete; shared() = delete; private: template<typename> friend class launch_core_access; // allows friends to construct dummy shared<T> objects struct construct_dummy_tag {}; shared(cons...
#include<bits/stdc++.h> #define n 3.14159 using namespace std; int main() { double r,a; cin>>r; a=n*r*r; cout<<"A="<<fixed<<setprecision(4)<<a<<"\n"; return 0; }
/* -*- 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. ** */ #ifndef PASSWORDIDALOG_H #define PASSWORDIDALOG_H #include "a...
//知识点: 二分答案 /* By:Luckyblock 题目要求: 给定 一个矩阵, 每个格点都有点权 求 从矩阵第一行走到最后一行 经过格点点权最大值 的 最小值 分析题意: 首先观察 答案的性质 当 ans<=i时,满足条件 则 ans>i时也可满足条件 答案满足单调性, 可以使用二分答案 二分答案枚举 经过的最大点权 之后 使用bfs进行检查 每次都将所在点 周边四个 格点中 点权 <=当前枚举量的 点加入队列 如果最后可以到达最后一行 , 那么此枚举量合法 */ #include<cstdio> #include<queue> #include<ctype.h> ...
#define AM_PM_CLOCK_H_ #ifndef AM_PM_CLOCK_H_ #include <ostream> #include <cstdio> class am_pm_clock { unsigned int hrs, mins, secs; bool am; public: /* * Default constructor - initial time should be midnight */ am_pm_clock(); /* * Constructor - sets fields to the given argument va...
/**************************************************************************** ** $Id: qt/life.h 3.3.5 edited Aug 31 12:17 $ ** ** Copyright (C) 1992-2005 Trolltech AS. All rights reserved. ** ** This file is part of an example program for Qt. This example ** program may be used, distributed and modified wit...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2005 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/src/an...
#define mod 1003 int dp[152][152][2]; int solve(string& A,int i,int j,int state) { if(i>j) return 0; if(i == j) { if(state == 1) return A[i] == 'T'; return A[i] == 'F'; } if(dp[i][j][state] != -1) return dp[i][j][state]; int ans = 0; for(int k=i+1;...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Soft...
// // recursion for Fibonacci sequence // #include <cstddef> #include <iostream> #include <vector> static uint64_t count = 0; uint64_t fib1(uint64_t n) { if (n <= 1) return n; count++; return fib1(n - 1) + fib1(n - 2); } static std::vector<uint64_t> memo; static uint64_t fib2_(uint64_t n) { if (n <= ...
#include "IpAddress.h" #include <Winsock2.h> IpAddress::IpAddress(const std::string& ipAddressWhitPort) { SetIpAddress(ipAddressWhitPort); } IpAddress::IpAddress(const std::string& ipAddress, uint16_t port) { SetIpAddress(ipAddress, port); } IpAddress::IpAddress(uint32_t address, uint16_t port) { SetIpAddress(addre...
//int ledPin1 = 7; //int ledPin2 = 2; //int ledPin3 = 3; //int ledPin4 = 4; //int ledPin5 = 5; //int ledPin6 = 6; //int ledPin7 = 8; //int ledPin8 = 9; int ledPin0 = 0; int ledPin1 = 1; int ledPin2 = 2; int ledPin3 = 3; int ledPin4 = 4; int ledPin5 = 5; int ledPin6 = 6; int ledPin7 = 7; int ledPin8 = 8; int ledPin9 = ...
// PCL lib Functions for processing point clouds #include "processPointClouds.h" #include <cmath> #include <unordered_set> //constructor: template<typename PointT> ProcessPointClouds<PointT>::ProcessPointClouds() = default; //de-constructor: template<typename PointT> ProcessPointClouds<PointT>::~ProcessPointClou...
#include "gina/driver.h" int main(int argc, char* argv[]) { if (!gina::driver::open()) { throw std::runtime_error("failed to open handle to device"); } if (!gina::driver::is_present()) { throw std::runtime_error("failed to communicate with patched device"); } return 0; }
#include <QMessageBox> #include <QFileDialog> #include <QDebug> #include "pictureshrinkerwidget.h" #include "ui_pictureshrinkerwidget.h" PictureShrinkerWidget::PictureShrinkerWidget(QWidget *parent) : QMainWindow(parent), ui(new Ui::PictureShrinkerWidget) { ui->setupUi(this); this->init(); } PictureSh...
/* -*- 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 _SSLENUM_H_ // { #define _SSLE...
// // Created by nothrax on 15.05.21. // #ifndef MONITORRECEIVETCP_STRINGFORMATTING_H #define MONITORRECEIVETCP_STRINGFORMATTING_H #include <string> #include <iomanip> #include <bitset> class StringFormatting { public: template< typename T > static std::string value_to_hex_string(T i ) { std::st...
#ifndef CHECKER_H #define CHECKER_H #include "Scope.h" Scope* openScope(); Scope* closeScope(); bool functionPreviouslyDefined(const std::string &name); void decFn( const std::string &name, const Type &type); void defFn( const std::string &name, const Type &type); void decVar( const std::string &name, co...
/* -*- mode: c++; tab-width: 4; c-basic-offset: 4 -*- */ group "layout.fallback-content"; include "modules/doc/frm_doc.h"; include "modules/layout/box/box.h"; include "modules/layout/content/content.h"; include "modules/logdoc/htm_elm.h"; html { //! <!DOCTYPE html> //! <html><body> //! <object id="elm" data="dat...
#ifndef _TYPES_H_ #define _TYPES_H_ #include <set> #include "libtinyredis/RedisFactory.h" #include "../EVWork.h" #define MSG_BUFF_SIZE 2000 #define LOG_BUFF_SIZE 2048 #define unlikely(x) __builtin_expect(!!(x), 0) enum logLevel { ERROR = 0, INFO, DEBUG }; // 每个场次的指定index进入哪些机器人 typedef struct uidIndex_s { in...
#pragma once #ifndef SLOTH_TERRAIN_H_ #define SLOTH_TERRAIN_H_ #include <sloth.h> #include "../model/raw_model.hpp" #include "../engine/loader.h" #include "terrain_texture_pack.hpp" #include "../utils/buffered_image.h" #include "../utils/maths.h" #include <vector> namespace sloth { class Terrain { private: floa...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- * * Copyright (C) 1995-2012 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * Adam Minchinton */ #include "core/p...
/* -*- Mode: c++; tab-width: 4; 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. * * Allowed #if-ery: none. * Sort order: alphabetic. */ #ifndef POSIX_SYS_CHOICE_LIBC_H...
#include "developer.h" Developer::Developer() { } void Developer::getInfo() { Developer *dev = new Developer; cout << "Name: " << dev->getName() << endl; cout << "Surname: " << dev->getSurname() << endl; cout << "Office: " << dev->getOffice() << endl; cout << "Salary:" << dev->getSal...
#include <iostream> using namespace std; typedef long long ll; #define MOD 1000000007 ll getGcd(ll a, ll b) { if (a == 0) return b; return getGcd(b % a, a); } ll findInverse(int a) { int m = MOD, m0 = m, y = 0, x = 1; if (m == 1) return 0; while (a > 1) { int q = a / m; ...
#include <iberbar/Lua/LuaCppBuilder.h> #include <iberbar/Lua/StackChecker.h> #include <iberbar/Lua/LoggingHelper.h> #include <iberbar/lua/LuaCppCommon.h> #include <iberbar/Utility/String.h> using namespace iberbar::Lua; using namespace iberbar::Lua; namespace iberbar { namespace Lua { // 设置为弱表 // k 表示table.k...
// Cfg.h: interface for the CCfg class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_CFG_H__2FD3E850_ECD1_43E1_9C27_0C638697EA61__INCLUDED_) #define AFX_CFG_H__2FD3E850_ECD1_43E1_9C27_0C638697EA61__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 clas...
#include <cstdlib> #include <cstdio> #include <iostream> #include <queue> struct UDT { int field{0}; bool operator> (const UDT& another) const { return field > another.field; } }; int main(int argc, char **argv) { std::priority_queue<UDT, std::vector<UDT>, std::greater<UDT>> heap; for (in...
#include<iostream> #include<vector> #define MAX 20 typedef int costtype; using namespace std; const int inf = 0x3f3f3f3f; int n,m,p[MAX][MAX],t[MAX][MAX]; costtype a[MAX][MAX],d[MAX][MAX],dist[MAX]; void dijk(int A) { memset(p,-1,sizeof(p)); memset(dist,0x3f,n*sizeof(costtype)); bool vis[MAX]={false};...
#pragma once //メモリへの参照をカウントする際に使用 class RefCounter { friend class BufferBase; unsigned int count; public: RefCounter():count(1){}; ~RefCounter(){}; };
#include "dialog.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); Dialog *w; w = new Dialog; GameManager *game = new GameManager(); w->connectWithGame(game); w->show(); return a.exec(); }
#ifdef USES_P036 //####################################################################################################### //#################################### Plugin 036: OLED SSD1306 display ################################# // // This is a modification to Plugin_023 with graphics library provided from squix78 gith...
// A simple program that builds a sqrt table #include <cmath> #include <fstream> #include <iostream> int main(int argc, char* argv[]) { // make sure we have enough arguments if (argc < 2) { return 1; } std::ofstream fout(argv[1], std::ios_base::out); const bool fileOpen = fout.is_open(); if (fileOpen)...
#include <iberbar/Lua/Util.h>
#pragma once #include <vector> #include <string> #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> size_t LoadTxtSpaceFile(std::string strPathName, std::vector<std::string>& vstrBuf); int WriteTxtCommaFile(std::string strPathName, pcl::PointCloud<pcl::PointXYZ>::Ptr ptrCld); bool Line2Pt3d(std::string strLin...