基于OpenDDS開發發布訂閱HelloMsg程序的過程(Windows)

基于OpenDDS的應用開發,主要分兩個部分的工作:

(1)定義自己的IDL文件,并編譯成消息數據類型通訊動態庫;

(2)分別編寫pub和sub程序,運行

具體步驟,有以下幾個:

  1. 定義idl文件,如HelloMsg.ild
  2. 運行腳本,產生相應的消息類型符號導出頭文件HelloMsgCommon_Export.h
  3. 編寫mwc、mpc工作臺和項目文件,如HelloMsg.mwc、HelloMsg.mpc
  4. 編譯mpc文件,產生解決方案和工程,如HelloMsg.sln、HelloMsgCommon.vcxproj、HelloMsgPub.vcxproj、HelloMsgSub.vcxproj
  5. 編寫HelloMsgPub.cpp和HelloMsgSub.cpp代碼;
  6. 編譯工程,產生動態庫HelloMsgCommon.dll、HelloMsgPub.exe、HelloMsgSub.exe
  7. 運行發布和訂閱程序,查看運行結果

下面,展開來看。。。

步驟一、定義HelloMsg.idl


module Hello
{#pragma DCPS_DATA_TYPE "Hello::HelloMsg"#pragma DCPS_DATA_KEY "Hello::HelloMsg msg"struct HelloMsg{string msg;};
};

步驟二、制作HelloMsg消息導出符號頭文件HelloMsgCommon_Export.h

perl %ACE_ROOT%/bin/generate_export_file.pl HelloMsgCommon > HelloMsgCommon_Export.h

步驟三、定義HelloMsg.mwc、HelloMsg.mpc

workspace {// the -relative and -include cmdlines make it so this workspace // does not have to be in the $DDS_ROOT directory tree.// tell MPC to substitute our DDS_ROOT environment variables for relative pathscmdline += -relative DDS_ROOT=$DDS_ROOT// tell the projects where to find the DDS base projects (*.mpb)cmdline += -include $DDS_ROOT/MPC/config}
project(*Common) : dcps {sharedname     = HelloMsgCommondynamicflags   = HELLOMSGCOMMON_BUILD_DLLlibout         = .requires += tao_orbsvcsrequires += no_opendds_safety_profileafter    += Svc_Utilsincludes      += $(TAO_ROOT)/orbsvcsidlflags      += -I$(TAO_ROOT)/orbsvcs \-Wb,export_macro=HelloMsgCommon_Export \-Wb,export_include=HelloMsgCommon_Export.hdcps_ts_flags += -Wb,export_macro=HelloMsgCommon_ExportTypeSupport_Files {HelloMsg.idl}IDL_Files {HelloMsgTypeSupport.idlHelloMsg.idl}// We only want the generated filesHeader_Files {}// We only want the generated filesSource_Files {}
}project(HelloMsgPub) : dcpsexe, dcps_tcp, svc_utils {after    += *Commonexename   = HelloMsgPubrequires += tao_orbsvcsrequires += no_opendds_safety_profileincludes += $(TAO_ROOT)/orbsvcslibs     += HelloMsgCommonIDL_Files {}TypeSupport_Files {}Header_Files {}Source_Files {HelloMsgPub.cpp}Documentation_Files {dds_tcp_conf.inidds_udp_conf.ini}
}project(HelloMsgSub) : dcpsexe, dcps_tcp {after    += *Commonexename   = HelloMsgSubrequires += tao_orbsvcsrequires += no_opendds_safety_profileincludes += $(TAO_ROOT)/orbsvcslibs     += HelloMsgCommonTypeSupport_Files {}IDL_Files {}Header_Files {}Source_Files {HelloMsgSub.cpp}Documentation_Files {dds_tcp_conf.inidds_udp_conf.ini}
}

步驟四,產生vs2010的工程文件

    perl %ACE_ROOT%/bin/mwc.pl -type vc10 HelloMsg.mwc產生HelloMsg.sln、HelloMsg_Common.vcxproj、HelloMsgPub.vcxproj和HelloMsgSub.vcxproj

步驟五、編寫HelloMsgPub.cpp和HelloMsgSub.cpp代碼

HelloMsgPub.cpp

/******************************************************************  file:  HelloMsgPub.cpp*  desc:  Provides a simple C++ 'hello world' DDS publisher.*         This publishing application will send data*         to the example 'hello world' subscribing *         application (hello_sub).*  ****************************************************************/
#include <dds/DCPS/Service_Participant.h>
#include <dds/DCPS/Marked_Default_Qos.h>
#include <dds/DCPS/PublisherImpl.h>
#include "dds/DCPS/StaticIncludes.h"
#include <ace/streams.h>
#include <orbsvcs/Time_Utilities.h>#include <stdio.h>
#include <string.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include "HelloMsgTypeSupportImpl.h"/***************************************************************** main()** Perform OpenDDS setup activities:*   - create a Domain Participant*   - create a Publisher*   - register the StringMsg data type*   - create a Topic*   - create a DataWriter * Write data****************************************************************/int main(int argc, char * argv[])
{DDS::DomainParticipant  * domain;DDS::Publisher          * publisher;DDS::Topic              * topic;DDS::DataWriter         * dw;Hello::StringMsg          stringMsg;DDS::ReturnCode_t       retval;DDS::DomainParticipantFactory *dpf = TheParticipantFactoryWithArgs(argc, argv);
if ( dpf == NULL )
{
printf("ERROR initializing domainParticipantFactory.\n");
return -1;
}    /* create a DomainParticipant */domain = dpf->create_participant( 2, PARTICIPANT_QOS_DEFAULT, NULL, 0 );if ( domain == NULL ){printf("ERROR creating domain participant.\n");return -1;}/* create a Publisher */publisher = domain->create_publisher(PUBLISHER_QOS_DEFAULT, NULL, 0 );if ( publisher == NULL ){printf("ERROR creating publisher.\n");return -1;}/* Register the data type with the OpenDDS middleware. * This is required before creating a Topic with* this data type. */Hello::StringMsgTypeSupport *stringMsgTS = new Hello::StringMsgTypeSupportImpl();;retval = stringMsgTS->register_type( domain, "StringMsg" );if (retval != DDS::RETCODE_OK){printf("ERROR registering type: %s\n", "DDS_error(retval)");return -1;}/* Create a DDS Topic with the StringMsg data type. */topic = domain->create_topic("helloTopic", "StringMsg", TOPIC_QOS_DEFAULT, NULL, 0 );if ( topic == NULL ){printf("ERROR creating topic.\n");return -1;}/* Create a DataWriter on the hello topic, with* default QoS settings and no listeners.*/dw = publisher->create_datawriter( topic, DATAWRITER_QOS_DEFAULT, NULL, 0 );if (dw == NULL){printf("ERROR creating data writer\n");return -1;}/* Initialize the data to send.  The StringMsg data type* has just one string member.* Note: Alwyas initialize a string member with* allocated memory -- the destructor will free * all string members.  */stringMsg.msg = new char[1024];strcpy((char*)stringMsg.msg.in(), "Hello World from C++!");int counter = 1;Hello::StringMsgDataWriter* sm_dw = Hello::StringMsgDataWriter::_narrow(dw);while ( 1 ){sprintf((char*)stringMsg.msg.in(), "Hello World from OpenDDS C++! index=%d", counter);DDS::ReturnCode_t ret = sm_dw->write ( stringMsg, DDS::HANDLE_NIL ); printf("OpenDDS wrote a sample, index=%d\n", counter);fflush(stdout);if ( ret != DDS::RETCODE_OK)
{printf("ERROR writing sample\n");return -1;
}
#ifdef _WIN32Sleep(1000);
#elsesleep(1);
#endifcounter++;}/* Cleanup */retval = domain -> delete_contained_entities();if ( retval != DDS::RETCODE_OK )printf("ERROR (%s): Unable to cleanup DDS entities\n","DDS_error(retval)");dpf->delete_participant(domain);
TheServiceParticipant->shutdown();return 0;
}

HelloMsgSub.cpp

/******************************************************************  file:  HelloMsgSub.cpp*  desc:  Provides a simple C++ 'Hello World' DDS subscriber.*         This subscribing application will receive data*         from the example 'hello world' publishing *         application (hello_pub).*  ****************************************************************/
#include <dds/DCPS/Service_Participant.h>
#include <dds/DCPS/Marked_Default_Qos.h>
#include <dds/DCPS/PublisherImpl.h>
#include <ace/streams.h>
#include <orbsvcs/Time_Utilities.h>#include "dds/DCPS/StaticIncludes.h"#include <stdio.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include "HelloMsgTypeSupportImpl.h"#ifdef _WIN32
#  define SLEEP(a)    Sleep(a*1000)
#else
#  define SLEEP(a)    sleep(a);
#endifint all_done = 0;/***************************************************************** Construct a DataReaderListener and override the * on_data_available() method with our own.  All other* listener methods will be default (no-op) functions.****************************************************************/
class SubListener : public DDS::DataReaderListener
{
public:void on_data_available( DDS::DataReader * dr );void on_requested_deadline_missed (DDS::DataReader_ptr reader,const DDS::RequestedDeadlineMissedStatus & status);void on_requested_incompatible_qos (DDS::DataReader_ptr reader,const DDS::RequestedIncompatibleQosStatus & status);void on_liveliness_changed (DDS::DataReader_ptr reader,const DDS::LivelinessChangedStatus & status);virtual void on_subscription_matched (DDS::DataReader_ptr reader,const DDS::SubscriptionMatchedStatus & status);void on_sample_rejected(DDS::DataReader_ptr reader,const DDS::SampleRejectedStatus& status);void on_sample_lost(DDS::DataReader_ptr reader,const DDS::SampleLostStatus& status);
};/***************************************************************** DataReader Listener Method: on_data_avail()** This listener method is called when data is available to* be read on this DataReader.****************************************************************/
void SubListener::on_data_available( DDS::DataReader * dr)
{Hello::StringMsgSeq   samples;DDS::SampleInfoSeq    samples_info;DDS::ReturnCode_t      retval;DDS::SampleStateMask   ss = DDS::ANY_SAMPLE_STATE;DDS::ViewStateMask     vs = DDS::ANY_VIEW_STATE;DDS::InstanceStateMask is = DDS::ANY_INSTANCE_STATE;/* Convert to our type-specific DataReader */Hello::StringMsgDataReader* reader = Hello::StringMsgDataReader::_narrow( dr );/* Take any and all available samples.  The take() operation* will remove the samples from the DataReader so they* won't be available on subsequent read() or take() calls.*/retval = reader->take( samples, samples_info, 
DDS::LENGTH_UNLIMITED, 
ss, 
vs, 
is );if ( retval == DDS::RETCODE_OK ){/* iterrate through the samples */
for ( unsigned int i = 0;i < samples.length(); i++)
{/* If this sample does not contain valid data,* it is a dispose or other non-data command,* and, accessing any member from this sample * would be invalid.*/if ( samples_info[i].valid_data)printf("OpenDDS received a sample, No=%d/%d, [%s]\n", i, samples.length(), samples[i].msg.in());
}fflush(stdout);/* read() and take() always "loan" the data, we need to* return it so OpenDDS can release resources associated* with it.  */reader->return_loan( samples, samples_info );}else{printf("ERROR (%s) taking samples from DataReader\n","DDS_error(retval)");}
}void SubListener::on_requested_deadline_missed (
DDS::DataReader_ptr reader,
const DDS::RequestedDeadlineMissedStatus & status)
{printf("ERROR (%s) on_requested_deadline_missed\n","DDS_error(retval)");
}void SubListener::on_requested_incompatible_qos (
DDS::DataReader_ptr reader,
const DDS::RequestedIncompatibleQosStatus & status)
{
printf("ERROR (%s) on_requested_incompatible_qos\n",
"DDS_error(retval)");
}void SubListener::on_liveliness_changed (
DDS::DataReader_ptr reader,
const DDS::LivelinessChangedStatus & status)
{
printf("ERROR (%s) on_liveliness_changed\n",
"DDS_error(retval)");
}void SubListener::on_subscription_matched (
DDS::DataReader_ptr reader,
const DDS::SubscriptionMatchedStatus & status
)
{
printf("ERROR (%s) on_subscription_matched\n",
"DDS_error(retval)");
}void SubListener::on_sample_rejected(
DDS::DataReader_ptr reader,
const DDS::SampleRejectedStatus& status
)
{
printf("ERROR (%s) on_sample_rejected\n",
"DDS_error(retval)");
}void SubListener::on_sample_lost(
DDS::DataReader_ptr reader,
const DDS::SampleLostStatus& status
)
{
printf("ERROR (%s) on_sample_lost\n",
"DDS_error(retval)");
}/***************************************************************** main()** Perform OpenDDS setup activities:*   - create a Domain Participant*   - create a Subscriber*   - register the StringMsg data type*   - create a Topic*   - create a DataReader and attach the listener created above* And wait for data****************************************************************/#if defined(__vxworks) && !defined(__RTP__)
int hello_sub(char * args)
#else
int main(int argc, char * argv[])
#endif
{DDS::DomainParticipant  *  domain;DDS::Subscriber         *  subscriber;DDS::Topic              *  topic;DDS::DataReader         *  dr;SubListener   drListener;DDS::ReturnCode_t          retval;/* Get an instance of the DDS DomainPartiticpantFactory -- * we will use this to create a DomainParticipant.*/DDS::DomainParticipantFactory *dpf = TheParticipantFactoryWithArgs(argc, argv);
if ( dpf == NULL )
{
printf("ERROR initializing domainParticipantFactory.\n");
return -1;
}     /* create a DomainParticipant */domain = dpf->create_participant( 2, PARTICIPANT_QOS_DEFAULT, NULL, 0 );if ( domain == NULL ){printf("ERROR creating domain participant.\n");return -1;}/* create a Subscriber */subscriber = domain->create_subscriber(SUBSCRIBER_QOS_DEFAULT,
NULL,
0 );if ( subscriber == NULL ){printf("ERROR creating subscriber\n");return -1;}/* Register the data type with the OpenDDS middleware. * This is required before creating a Topic with* this data type. */Hello::StringMsgTypeSupport *stringMsgTS = new Hello::StringMsgTypeSupportImpl();;retval = stringMsgTS->register_type( domain, "StringMsg" );if (retval != DDS::RETCODE_OK){printf("ERROR registering type: %s\n", "DDS_error(retval)");return -1;}/* create a DDS Topic with the StringMsg data type. */topic = domain->create_topic( "helloTopic", 
"StringMsg", 
TOPIC_QOS_DEFAULT, 
NULL, 
0 );if ( ! topic ){printf("ERROR creating topic\n");return -1;}/* create a DDS_DataReader on the hello topic (notice* the TopicDescription is used) with default QoS settings, * and attach our listener with our on_data_available method.*/dr = subscriber->create_datareader( (DDS::TopicDescription*)topic, DATAREADER_QOS_DEFAULT,&drListener, DDS::DATA_AVAILABLE_STATUS );if ( ! dr ){printf("ERROR creating data reader\n");return -1;}/* Wait forever.  When data arrives at our DataReader, * our dr_on_data_avilalbe method will be invoked.*/while ( !all_done )SLEEP(30);/* Cleanup */retval = domain -> delete_contained_entities();if ( retval != DDS::RETCODE_OK )printf("ERROR (%s): Unable to cleanup DDS entities\n","DDS_error(retval)");dpf->delete_participant(domain);
TheServiceParticipant->shutdown();return 0;
}

步驟六、編譯工程

打開HelloMsg.sln,產生動態庫HelloMsg_Common.dll(.lib)和發布訂閱程序HelloMsgPub.exe和HelloMsgSub.exe

步驟七、運行發布訂閱程序

HelloMsgPub -ORBDebugLevel 0 -DCPSDebugLevel 0 -DCPSTransportDebugLevel 0 -DCPSConfigFile ../../etc/dds_udp_conf.ini -ORBLogFile publisher.log
OpenDDS wrote a sample, index=1
OpenDDS wrote a sample, index=2
OpenDDS wrote a sample, index=3
OpenDDS wrote a sample, index=4
OpenDDS wrote a sample, index=5
OpenDDS wrote a sample, index=6
OpenDDS wrote a sample, index=7
OpenDDS wrote a sample, index=8
OpenDDS wrote a sample, index=9
OpenDDS wrote a sample, index=10
HelloMsgSub -ORBDebugLevel 0 -DCPSDebugLevel 0 -DCPSTransportDebugLevel 0 -DCPSConfigFile ../../etc/dds_udp_conf.ini -ORBLogFile subscriber.log

OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=1]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=2]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=3]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=4]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=5]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=6]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=7]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=8]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=9]
OpenDDS received a sample, No=0/1, [Hello World from OpenDDS C++! index=10]

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/448267.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/448267.shtml
英文地址,請注明出處:http://en.pswp.cn/news/448267.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

面試后的總結

面試中的收獲&#xff1a; 優點&#xff1a; 1. 設計用例考慮較為全面。 2. 自動化&#xff0c;性能都有涉獵&#xff0c;但不深入。 3. 對業務理解較深入。 缺點&#xff1a; 1. 接口自動化停留在初級階段。 2. UI自動化了解較少。 3. 性能壓測缺少數據清洗等步驟。 4. 算法還…

怎樣正確使用車燈?

當我們被對面來車明晃晃的遠光燈照得意識模糊時&#xff0c;當你快速接近一輛摩托車卻發現那是一輛壞了一盞尾燈的卡車時&#xff0c;或是當你前方的小車忽然亮起倒車燈卻在往前行駛&#xff0c;最后意識到那只是因為剎車燈與倒車燈線路顛倒時&#xff0c;你就會發現在人們都認…

如何配置DDS以使用多個網絡接口?How do I configure DDS to work with multiple network interfaces?

最近在使用OpenDDS的時候遇到一個問題&#xff1a;存在多個虛擬網卡時&#xff0c;發布&#xff08;訂閱&#xff09;端重新連接時會阻塞幾分鐘&#xff0c;在外網找到一篇與此相關的文章。 You cannot specify which NICs DDS will use to send data. You can restrict the NI…

oracle賦予一個用戶查詢另一個用戶中所有表

說明&#xff1a;讓用戶selame能夠查詢用戶ame中的所有表&#xff08;不能添加和刪除&#xff09;1.創建用戶selamecreate user selame identified by Password;2.設置用戶selame系統權限grant connect,resource to selame; 3.設置用戶selame對象權限 grant select any table t…

使用可靠多播與OPENDDS進行數據分發

介紹 也許應用程序設計人員在創建分布式系統時面臨的最關鍵決策之一是如何在感興趣的各方之間交換數據。通常&#xff0c;這涉及選擇一個或多個通信協議并確定向每個端點分派數據的最有效手段。實現較低級別的通信軟件可能是耗時的&#xff0c;昂貴的并且容易出錯。很多時候&a…

考試 駕校

您的孩子在車里安全么&#xff1f;兒童座椅那點事兒 兒童安全座椅用最最普通的話來解釋就是一種系于汽車座位上,供小童乘坐,有束縛設備,并能在發生車禍時,束縛著小童以保障小童安全的座椅。 兒童安全座椅在歐美發達國家已經得到了普遍使用&#xff0c;這些國家基本上都制定了相…

margin為負值的幾種情況

1、margin-top為負值像素 margin-top為負值像素&#xff0c;偏移值相對于自身&#xff0c;其后元素受影響&#xff0c;見如下代碼&#xff1a; 1 <!DOCTYPE html>2 <html lang"zh">3 <head>4 <meta charset"UTF-8" />5 &l…

事件EVENT,WaitForSingleObject(),WaitForMultipleObjecct()和SignalObjectAndWait() 的使用(上)

用戶模式的線程同步機制效率高&#xff0c;如果需要考慮線程同步問題&#xff0c;應該首先考慮用戶模式的線程同步方法。但是&#xff0c;用戶模式的線程同步有限制&#xff0c;對于多個進程之間的線程同步&#xff0c;用戶模式的線程同步方法無能為力。這時&#xff0c;只能考…

axios 中文文檔、使用說明

以下內容全文轉自 Axios 文檔&#xff1a;https://www.kancloud.cn/yunye/axios/234845 ##Axios Axios 是一個基于 promise 的 HTTP 庫&#xff0c;可以用在瀏覽器和 node.js 中。 Features 從瀏覽器中創建 XMLHttpRequests從 node.js 創建 http 請求支持 Promise API攔截請…

汽車熄火是什么原因?

汽車熄火是什么原因&#xff1f; 近來看見很多車主被車子熄火所困擾&#xff0c;駕校一點通幫助您從以下也許可以找出原因。 1、自動檔車型&#xff1a; 自動檔的車型不會輕易出現熄火的現象&#xff0c;而手動檔的車型由于駕駛水平不高&#xff0c;可能會經常出現熄火的現象。…

數據庫 -- 02

引擎介紹 1.什么是引擎 MySQL中的數據用各種不同的技術存儲在文件&#xff08;或者內存&#xff09;中。這些技術中的每一種技術都使用不同的存儲機制、索引技巧、鎖定水平并且最終提供廣泛的不同的功能和能力。通過選擇不同的技術&…

事件EVENT,WaitForSingleObject(),WaitForMultipleObjecct()和SignalObjectAndWait() 的使用(下)

注意&#xff1a;當WaitForMultipleObjects等待多個內核對象的時候&#xff0c;如果它的bWaitAll 參數設置為false。其返回值減去WAIT_OBJECT_0 就是參數lpHandles數組的序號。如果同時有多個內核對象被觸發&#xff0c;這個函數返回的只是其中序號最小的那個。 如果bWaitAll …

設置 shell 腳本中 echo 顯示內容帶顏色

前些天發現了一個巨牛的人工智能學習網站&#xff0c;通俗易懂&#xff0c;風趣幽默&#xff0c;忍不住分享一下給大家。點擊跳轉到教程。 shell腳本中echo顯示內容帶顏色顯示,echo顯示帶顏色&#xff0c;需要使用參數 -e 格式如下&#xff1a; echo -e "\033[字背景顏…

Visual C++ 編譯器選項 /MD、/ML、/MT、/LD

前段時間編譯一個引用自己寫的靜態庫的程序時老是出現鏈接時的多個重定義的錯誤&#xff0c;而自己的代碼明明沒有重定義這些東西&#xff0c;譬如&#xff1a; LIBCMT.lib(_file.obj) : error LNK2005: ___initstdio already defined in libc.lib(_file.obj) LIBCMT.lib(_fi…

Delphi面向對象編程的20條規則

Delphi面向對象編程的20條規則 作者簡介 Marco Cantu是一個知名的Delphi專家&#xff0c;他曾出版過《精通Delphi》系列叢書&#xff0c;《Delphi開發手冊》以及電子書《精通Pascal》(該電子書可在網上免費獲得)。他講授的課題是Delphi基礎和高級開發技巧。你可以通過他…

制動失靈怎么辦?

定義 制動過程中&#xff0c;由于制動器某些零部件的損壞或發生故障&#xff0c;使運動部件(或運動機械)不能保持停止狀態或不能按要求停止運動的現象。 制動失靈的原因 制動失靈的關鍵在于制動系統無法對汽車施加足夠的制動力&#xff0c;包括制動液管路液位不足或進入空氣、制…

OpenDDS用idl生成自定義數據類型時遇到的一個問題

問題&#xff1a;這里會提示LNK2005重復定義的錯誤 解決方案&#xff1a; 解決后&#xff1a;

解決:Connect to xx.xx.xxx.xx :8081 [/xx.xx.xx.xx] failed: Connection refu sed: connect -> [H

前些天發現了一個巨牛的人工智能學習網站&#xff0c;通俗易懂&#xff0c;風趣幽默&#xff0c;忍不住分享一下給大家。點擊跳轉到教程。 1. 自行啟動了個 Nenux 服務。想把本地工程推送到 個人私服&#xff0c;執行命令&#xff1a;mvn deploy 報錯&#xff1a; Failed to…

ADOQuery 查詢 刪除 修改 插入

//利用combobox組件查詢數據庫表procedure TForm1.Button1Click(Sender: TObject);beginADOQuery1.Close;ADOQuery1.SQL.Clear;ADOQuery1.SQL.Add(select * from trim(ComboBox2.Text));ADOQuery1.Active:true;end&#xff1b; //查詢記錄procedure TForm1.Button1Click(Sender…

防爆胎,有妙招

對于大多數人來說&#xff0c;買車難,養車更難。許多人擁有了新車&#xff0c;卻沒有足夠的知識去好好保養汽車&#xff0c;這實在是非常可惜。如何做好汽車的保養工作,讓我們的愛車更好的為我們工作&#xff1f;夏天熾熱的天氣&#xff0c;是否讓你為爆胎煩惱不已&#xff1f;…