大漠插件(二、Qt使用插件时注意事项)

本章目的

        在上篇已经注册完毕大漠,那么怎么使用大漠来制作脚本,我选择了我最熟悉的Qt来开发,毕竟只是小软件,用脚本或者c++都差不了多少。本章就是开发途中的一些坑。

        本人开发环境是 win11 64、Qt 5.15.2安装了5.10.0的msvc2015 32开发套件、vs2022安装了v143开发套件。

开发的坑

一 、使用32位开发套件

64位是不行的,必须使用32位开发套件 。否则会报错失败。我的32位环境就是上面的那些。

二、Qt使用ActiveX时的设置

在工程的pro文件中的 QT+=  后面加上 axcontainer,否则会报错“找不到 qaxobject.h” 

三、生成dm的头文件和cpp文件 

在Qt路径下,根据你的开发套件版本找 dumpcpp.exe。我装的是 5.10.0 的 msvc2015 32。所以我的路径是“C:\all\Qt\5.10.0\msvc2015\bin”。

在 dumpcpp.exe 目录下运行 cmd 。

dumpcpp.exe C:\all\freeDM3.1233\dm.dll

将路径换成你的dm.dll 路径。运行此命令后,在 dumpcpp.exe 目录下会生成 dm.h、dm.cpp 两个文件。我们开发时就需要使用这两个文件。

四、C3615 constexpr 函数“qCountLeadingZeroBits”不能生成常量表达式

我们需要修改 qalgorithms.h 。 此处参考了别人的文章。

因为我用的是 Qt 的msvc2015 开发套件,所以我的路径是 “C:\all\Qt\5.10.0\msvc2015\include\QtCore ”。在这里找到 qalgorithms.h。

加入两行代码,修改四处即可。

Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW
{return __builtin_popcount(v);
}
#define QALGORITHMS_USE_BUILTIN_POPCOUNTLL
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
{return __builtin_popcountll(v);
}
#elif defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM)
#define QT_POPCOUNT_CONSTEXPR
#define QT_POPCOUNT_RELAXED_CONSTEXPR   //增加的
#define QT_HAS_BUILTIN_CTZ
Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val)
{unsigned long result;_BitScanForward(&result, val);return result;
}
#define QT_HAS_BUILTIN_CLZ
Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
{unsigned long result;_BitScanReverse(&result, val);
#if Q_PROCESSOR_WORDSIZE == 8
#define QALGORITHMS_USE_BUILTIN_POPCOUNTLL
Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
{return __popcnt64(v);
}
#endif // MSVC 64bit
#endif // __AVX__ || __SSE4_2__ || __POPCNT__#endif // MSVC
#endif // QT_HAS_CONSTEXPR_BUILTINS#ifndef QT_POPCOUNT_CONSTEXPR
#define QT_POPCOUNT_CONSTEXPR Q_DECL_CONSTEXPR
#define QT_POPCOUNT_RELAXED_CONSTEXPR Q_DECL_RELAXED_CONSTEXPR    //增加的
#endif} //namespace QAlgorithmsPrivateQ_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW
{
#ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTreturn QAlgorithmsPrivate::qt_builtin_popcount(v);
#else// See http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallelreturn(((v      ) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +
Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint64 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CTZLL)return v ? QAlgorithmsPrivate::qt_builtin_ctzll(v) : 64;
#elsequint32 x = static_cast<quint32>(v);return x ? qCountTrailingZeroBits(x): 32 + qCountTrailingZeroBits(static_cast<quint32>(v >> 32));
#endif
}Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(unsigned long v) Q_DECL_NOTHROW
{return qCountTrailingZeroBits(QIntegerForSizeof<long>::Unsigned(v));
}Q_DECL_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint32 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZ)return v ? QAlgorithmsPrivate::qt_builtin_clz(v) : 32U;
#else// Hacker's Delight, 2nd ed. Fig 5-16, p. 102v = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);v = v | (v >> 8);v = v | (v >> 16);return qPopulationCount(~v);
#endif
}//改为 QT_POPCOUNT_RELAXED_CONSTEXPR 
QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint8 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZ)return v ? QAlgorithmsPrivate::qt_builtin_clz(v)-24U : 8U;
#elsev = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);return qPopulationCount(static_cast<quint8>(~v));
#endif
}//改为 QT_POPCOUNT_RELAXED_CONSTEXPR 
QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint16 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZS)return v ? QAlgorithmsPrivate::qt_builtin_clzs(v) : 16U;
#elsev = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);v = v | (v >> 8);return qPopulationCount(static_cast<quint16>(~v));
#endif
}//改为 QT_POPCOUNT_RELAXED_CONSTEXPR 
QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint64 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZLL)return v ? QAlgorithmsPrivate::qt_builtin_clzll(v) : 64U;
#elsev = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);v = v | (v >> 8);v = v | (v >> 16);v = v | (v >> 32);return qPopulationCount(~v);
#endif
}//改为 QT_POPCOUNT_RELAXED_CONSTEXPR 
QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(unsigned long v) Q_DECL_NOTHROW
{return qCountLeadingZeroBits(QIntegerForSizeof<long>::Unsigned(v));
}QT_WARNING_POP
QT_END_NAMESPACE#endif // QALGORITHMS_H

修改完后的文件

/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/#ifndef QALGORITHMS_H
#define QALGORITHMS_H#include <QtCore/qglobal.h>#if defined(Q_CC_MSVC) && _MSC_VER > 1500
#include <intrin.h>
#endifQT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED/*Warning: The contents of QAlgorithmsPrivate is not a part of the public Qt APIand may be changed from version to version or even be completely removed.
*/
namespace QAlgorithmsPrivate {#if QT_DEPRECATED_SINCE(5, 2)
template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::sort") Q_OUTOFLINE_TEMPLATE void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
template <typename RandomAccessIterator, typename T>
QT_DEPRECATED_X("Use std::sort") inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy);template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::stable_sort") Q_OUTOFLINE_TEMPLATE void qStableSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
template <typename RandomAccessIterator, typename T>
QT_DEPRECATED_X("Use std::stable_sort") inline void qStableSortHelper(RandomAccessIterator, RandomAccessIterator, const T &);template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::lower_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::upper_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::binary_search") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
#endif // QT_DEPRECATED_SINCE(5, 2)}#if QT_DEPRECATED_SINCE(5, 2)
template <typename InputIterator, typename OutputIterator>
QT_DEPRECATED_X("Use std::copy") inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
{while (begin != end)*dest++ = *begin++;return dest;
}template <typename BiIterator1, typename BiIterator2>
QT_DEPRECATED_X("Use std::copy_backward") inline BiIterator2 qCopyBackward(BiIterator1 begin, BiIterator1 end, BiIterator2 dest)
{while (begin != end)*--dest = *--end;return dest;
}template <typename InputIterator1, typename InputIterator2>
QT_DEPRECATED_X("Use std::equal") inline bool qEqual(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
{for (; first1 != last1; ++first1, ++first2)if (!(*first1 == *first2))return false;return true;
}template <typename ForwardIterator, typename T>
QT_DEPRECATED_X("Use std::fill") inline void qFill(ForwardIterator first, ForwardIterator last, const T &val)
{for (; first != last; ++first)*first = val;
}template <typename Container, typename T>
QT_DEPRECATED_X("Use std::fill") inline void qFill(Container &container, const T &val)
{qFill(container.begin(), container.end(), val);
}template <typename InputIterator, typename T>
QT_DEPRECATED_X("Use std::find") inline InputIterator qFind(InputIterator first, InputIterator last, const T &val)
{while (first != last && !(*first == val))++first;return first;
}template <typename Container, typename T>
QT_DEPRECATED_X("Use std::find") inline typename Container::const_iterator qFind(const Container &container, const T &val)
{return qFind(container.constBegin(), container.constEnd(), val);
}template <typename InputIterator, typename T, typename Size>
QT_DEPRECATED_X("Use std::count") inline void qCount(InputIterator first, InputIterator last, const T &value, Size &n)
{for (; first != last; ++first)if (*first == value)++n;
}template <typename Container, typename T, typename Size>
QT_DEPRECATED_X("Use std::count") inline void qCount(const Container &container, const T &value, Size &n)
{qCount(container.constBegin(), container.constEnd(), value, n);
}#ifdef Q_QDOC
typedef void* LessThan;
template <typename T> LessThan qLess();
template <typename T> LessThan qGreater();
#else
template <typename T>
class QT_DEPRECATED_X("Use std::less") qLess
{
public:inline bool operator()(const T &t1, const T &t2) const{return (t1 < t2);}
};template <typename T>
class QT_DEPRECATED_X("Use std::greater") qGreater
{
public:inline bool operator()(const T &t1, const T &t2) const{return (t2 < t1);}
};
#endiftemplate <typename RandomAccessIterator>
QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end)
{if (start != end)QAlgorithmsPrivate::qSortHelper(start, end, *start);
}template <typename RandomAccessIterator, typename LessThan>
QT_DEPRECATED_X("Use std::sort") inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
{if (start != end)QAlgorithmsPrivate::qSortHelper(start, end, *start, lessThan);
}template<typename Container>
QT_DEPRECATED_X("Use std::sort") inline void qSort(Container &c)
{
#ifdef Q_CC_BOR// Work around Borland 5.5 optimizer bugc.detach();
#endifif (!c.empty())QAlgorithmsPrivate::qSortHelper(c.begin(), c.end(), *c.begin());
}template <typename RandomAccessIterator>
QT_DEPRECATED_X("Use std::stable_sort") inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end)
{if (start != end)QAlgorithmsPrivate::qStableSortHelper(start, end, *start);
}template <typename RandomAccessIterator, typename LessThan>
QT_DEPRECATED_X("Use std::stable_sort") inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
{if (start != end)QAlgorithmsPrivate::qStableSortHelper(start, end, *start, lessThan);
}template<typename Container>
QT_DEPRECATED_X("Use std::stable_sort") inline void qStableSort(Container &c)
{
#ifdef Q_CC_BOR// Work around Borland 5.5 optimizer bugc.detach();
#endifif (!c.empty())QAlgorithmsPrivate::qStableSortHelper(c.begin(), c.end(), *c.begin());
}template <typename RandomAccessIterator, typename T>
QT_DEPRECATED_X("Use std::lower_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
{// Implementation is duplicated from QAlgorithmsPrivate to keep existing code// compiling. We have to allow using *begin and value with different types,// and then implementing operator< for those types.RandomAccessIterator middle;int n = end - begin;int half;while (n > 0) {half = n >> 1;middle = begin + half;if (*middle < value) {begin = middle + 1;n -= half + 1;} else {n = half;}}return begin;
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::lower_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
{return QAlgorithmsPrivate::qLowerBoundHelper(begin, end, value, lessThan);
}template <typename Container, typename T>
QT_DEPRECATED_X("Use std::lower_bound") Q_OUTOFLINE_TEMPLATE typename Container::const_iterator qLowerBound(const Container &container, const T &value)
{return QAlgorithmsPrivate::qLowerBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
}template <typename RandomAccessIterator, typename T>
QT_DEPRECATED_X("Use std::upper_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
{// Implementation is duplicated from QAlgorithmsPrivate.RandomAccessIterator middle;int n = end - begin;int half;while (n > 0) {half = n >> 1;middle = begin + half;if (value < *middle) {n = half;} else {begin = middle + 1;n -= half + 1;}}return begin;
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::upper_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
{return QAlgorithmsPrivate::qUpperBoundHelper(begin, end, value, lessThan);
}template <typename Container, typename T>
QT_DEPRECATED_X("Use std::upper_bound") Q_OUTOFLINE_TEMPLATE typename Container::const_iterator qUpperBound(const Container &container, const T &value)
{return QAlgorithmsPrivate::qUpperBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
}template <typename RandomAccessIterator, typename T>
QT_DEPRECATED_X("Use std::binary_search") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
{// Implementation is duplicated from QAlgorithmsPrivate.RandomAccessIterator it = qLowerBound(begin, end, value);if (it == end || value < *it)return end;return it;
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::binary_search") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
{return QAlgorithmsPrivate::qBinaryFindHelper(begin, end, value, lessThan);
}template <typename Container, typename T>
QT_DEPRECATED_X("Use std::binary_search") Q_OUTOFLINE_TEMPLATE typename Container::const_iterator qBinaryFind(const Container &container, const T &value)
{return QAlgorithmsPrivate::qBinaryFindHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
}
#endif // QT_DEPRECATED_SINCE(5, 2)template <typename ForwardIterator>
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
{while (begin != end) {delete *begin;++begin;}
}template <typename Container>
inline void qDeleteAll(const Container &c)
{qDeleteAll(c.begin(), c.end());
}/*Warning: The contents of QAlgorithmsPrivate is not a part of the public Qt APIand may be changed from version to version or even be completely removed.
*/
namespace QAlgorithmsPrivate {#if QT_DEPRECATED_SINCE(5, 2)template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::sort") Q_OUTOFLINE_TEMPLATE void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan)
{
top:int span = int(end - start);if (span < 2)return;--end;RandomAccessIterator low = start, high = end - 1;RandomAccessIterator pivot = start + span / 2;if (lessThan(*end, *start))qSwap(*end, *start);if (span == 2)return;if (lessThan(*pivot, *start))qSwap(*pivot, *start);if (lessThan(*end, *pivot))qSwap(*end, *pivot);if (span == 3)return;qSwap(*pivot, *end);while (low < high) {while (low < high && lessThan(*low, *end))++low;while (high > low && lessThan(*end, *high))--high;if (low < high) {qSwap(*low, *high);++low;--high;} else {break;}}if (lessThan(*low, *end))++low;qSwap(*end, *low);qSortHelper(start, low, t, lessThan);start = low + 1;++end;goto top;
}template <typename RandomAccessIterator, typename T>
QT_DEPRECATED_X("Use std::sort") inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
{qSortHelper(begin, end, dummy, qLess<T>());
}template <typename RandomAccessIterator>
QT_DEPRECATED_X("Use std::reverse") Q_OUTOFLINE_TEMPLATE void qReverse(RandomAccessIterator begin, RandomAccessIterator end)
{--end;while (begin < end)qSwap(*begin++, *end--);
}template <typename RandomAccessIterator>
QT_DEPRECATED_X("Use std::rotate") Q_OUTOFLINE_TEMPLATE void qRotate(RandomAccessIterator begin, RandomAccessIterator middle, RandomAccessIterator end)
{qReverse(begin, middle);qReverse(middle, end);qReverse(begin, end);
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::merge") Q_OUTOFLINE_TEMPLATE void qMerge(RandomAccessIterator begin, RandomAccessIterator pivot, RandomAccessIterator end, T &t, LessThan lessThan)
{const int len1 = pivot - begin;const int len2 = end - pivot;if (len1 == 0 || len2 == 0)return;if (len1 + len2 == 2) {if (lessThan(*(begin + 1), *(begin)))qSwap(*begin, *(begin + 1));return;}RandomAccessIterator firstCut;RandomAccessIterator secondCut;int len2Half;if (len1 > len2) {const int len1Half = len1 / 2;firstCut = begin + len1Half;secondCut = qLowerBound(pivot, end, *firstCut, lessThan);len2Half = secondCut - pivot;} else {len2Half = len2 / 2;secondCut = pivot + len2Half;firstCut = qUpperBound(begin, pivot, *secondCut, lessThan);}qRotate(firstCut, pivot, secondCut);const RandomAccessIterator newPivot = firstCut + len2Half;qMerge(begin, firstCut, newPivot, t, lessThan);qMerge(newPivot, secondCut, end, t, lessThan);
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::stable_sort") Q_OUTOFLINE_TEMPLATE void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan)
{const int span = end - begin;if (span < 2)return;const RandomAccessIterator middle = begin + span / 2;qStableSortHelper(begin, middle, t, lessThan);qStableSortHelper(middle, end, t, lessThan);qMerge(begin, middle, end, t, lessThan);
}template <typename RandomAccessIterator, typename T>
QT_DEPRECATED_X("Use std::stable_sort") inline void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
{qStableSortHelper(begin, end, dummy, qLess<T>());
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::lower_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
{RandomAccessIterator middle;int n = int(end - begin);int half;while (n > 0) {half = n >> 1;middle = begin + half;if (lessThan(*middle, value)) {begin = middle + 1;n -= half + 1;} else {n = half;}}return begin;
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::upper_bound") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
{RandomAccessIterator middle;int n = end - begin;int half;while (n > 0) {half = n >> 1;middle = begin + half;if (lessThan(value, *middle)) {n = half;} else {begin = middle + 1;n -= half + 1;}}return begin;
}template <typename RandomAccessIterator, typename T, typename LessThan>
QT_DEPRECATED_X("Use std::binary_search") Q_OUTOFLINE_TEMPLATE RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
{RandomAccessIterator it = qLowerBoundHelper(begin, end, value, lessThan);if (it == end || lessThan(value, *it))return end;return it;
}#endif // QT_DEPRECATED_SINCE(5, 2)#ifdef Q_CC_CLANG
// Clang had a bug where __builtin_ctz/clz/popcount were not marked as constexpr.
#  if (defined __apple_build_version__ &&  __clang_major__ >= 7) || (Q_CC_CLANG >= 307)
#    define QT_HAS_CONSTEXPR_BUILTINS
#  endif
#elif defined(Q_CC_MSVC) && !defined(Q_CC_INTEL) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM)
#  define QT_HAS_CONSTEXPR_BUILTINS
#elif defined(Q_CC_GNU)
#  define QT_HAS_CONSTEXPR_BUILTINS
#endif#if defined QT_HAS_CONSTEXPR_BUILTINS
#if defined(Q_CC_GNU) || defined(Q_CC_CLANG)
#  define QT_HAS_BUILTIN_CTZS
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW
{
#  if QT_HAS_BUILTIN(__builtin_ctzs)return __builtin_ctzs(v);
#  elsereturn __builtin_ctz(v);
#  endif
}
#define QT_HAS_BUILTIN_CLZS
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW
{
#  if QT_HAS_BUILTIN(__builtin_clzs)return __builtin_clzs(v);
#  elsereturn __builtin_clz(v) - 16U;
#  endif
}
#define QT_HAS_BUILTIN_CTZ
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_ctz(quint32 v) Q_DECL_NOTHROW
{return __builtin_ctz(v);
}
#define QT_HAS_BUILTIN_CLZ
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_clz(quint32 v) Q_DECL_NOTHROW
{return __builtin_clz(v);
}
#define QT_HAS_BUILTIN_CTZLL
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_ctzll(quint64 v) Q_DECL_NOTHROW
{return __builtin_ctzll(v);
}
#define QT_HAS_BUILTIN_CLZLL
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_clzll(quint64 v) Q_DECL_NOTHROW
{return __builtin_clzll(v);
}
#define QALGORITHMS_USE_BUILTIN_POPCOUNT
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW
{return __builtin_popcount(v);
}
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW
{return __builtin_popcount(v);
}
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW
{return __builtin_popcount(v);
}
#define QALGORITHMS_USE_BUILTIN_POPCOUNTLL
Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
{return __builtin_popcountll(v);
}
#elif defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM)
#define QT_POPCOUNT_CONSTEXPR
#define QT_POPCOUNT_RELAXED_CONSTEXPR
#define QT_HAS_BUILTIN_CTZ
Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val)
{unsigned long result;_BitScanForward(&result, val);return result;
}
#define QT_HAS_BUILTIN_CLZ
Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val)
{unsigned long result;_BitScanReverse(&result, val);// Now Invert the result: clz will count *down* from the msb to the lsb, so the msb index is 31// and the lsb index is 0. The result for the index when counting up: msb index is 0 (because it// starts there), and the lsb index is 31.result ^= sizeof(quint32) * 8 - 1;return result;
}
#if Q_PROCESSOR_WORDSIZE == 8
// These are only defined for 64bit builds.
#define QT_HAS_BUILTIN_CTZLL
Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val)
{unsigned long result;_BitScanForward64(&result, val);return result;
}
// MSVC calls it _BitScanReverse and returns the carry flag, which we don't need
#define QT_HAS_BUILTIN_CLZLL
Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val)
{unsigned long result;_BitScanReverse64(&result, val);// see qt_builtin_clzresult ^= sizeof(quint64) * 8 - 1;return result;
}
#endif // MSVC 64bit
#  define QT_HAS_BUILTIN_CTZS
Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW
{return qt_builtin_ctz(v);
}
#define QT_HAS_BUILTIN_CLZS
Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW
{return qt_builtin_clz(v) - 16U;
}// Neither MSVC nor the Intel compiler define a macro for the POPCNT processor
// feature, so we're using either the SSE4.2 or the AVX macro as a proxy (Clang
// does define the macro). It's incorrect for two reasons:
// 1. It's a separate bit in CPUID, so a processor could implement SSE4.2 and
//    not POPCNT, but that's unlikely to happen.
// 2. There are processors that support POPCNT but not AVX (Intel Nehalem
//    architecture), but unlike the other compilers, MSVC has no option
//    to generate code for those processors.
// So it's an acceptable compromise.
#if defined(__AVX__) || defined(__SSE4_2__) || defined(__POPCNT__)
#define QALGORITHMS_USE_BUILTIN_POPCOUNT
Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW
{return __popcnt(v);
}
Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW
{return __popcnt16(v);
}
Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW
{return __popcnt16(v);
}
#if Q_PROCESSOR_WORDSIZE == 8
#define QALGORITHMS_USE_BUILTIN_POPCOUNTLL
Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW
{return __popcnt64(v);
}
#endif // MSVC 64bit
#endif // __AVX__ || __SSE4_2__ || __POPCNT__#endif // MSVC
#endif // QT_HAS_CONSTEXPR_BUILTINS#ifndef QT_POPCOUNT_CONSTEXPR
#define QT_POPCOUNT_CONSTEXPR Q_DECL_CONSTEXPR
#define QT_POPCOUNT_RELAXED_CONSTEXPR Q_DECL_RELAXED_CONSTEXPR
#endif} //namespace QAlgorithmsPrivateQ_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW
{
#ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTreturn QAlgorithmsPrivate::qt_builtin_popcount(v);
#else// See http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallelreturn(((v      ) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 12) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 24) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f;
#endif
}Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW
{
#ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTreturn QAlgorithmsPrivate::qt_builtin_popcount(v);
#elsereturn(((v      ) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f;
#endif
}Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW
{
#ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTreturn QAlgorithmsPrivate::qt_builtin_popcount(v);
#elsereturn(((v      ) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 12) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f;
#endif
}Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW
{
#ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTLLreturn QAlgorithmsPrivate::qt_builtin_popcountll(v);
#elsereturn(((v      ) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 12) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 24) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 36) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 48) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f +(((v >> 60) & 0xfff)    * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f;
#endif
}Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW
{return qPopulationCount(static_cast<quint64>(v));
}#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG)
#undef QALGORITHMS_USE_BUILTIN_POPCOUNT
#endif
#undef QT_POPCOUNT_CONSTEXPRQ_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint32 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CTZ)return v ? QAlgorithmsPrivate::qt_builtin_ctz(v) : 32U;
#else// see http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightParallelunsigned int c = 32; // c will be the number of zero bits on the rightv &= -signed(v);if (v) c--;if (v & 0x0000FFFF) c -= 16;if (v & 0x00FF00FF) c -= 8;if (v & 0x0F0F0F0F) c -= 4;if (v & 0x33333333) c -= 2;if (v & 0x55555555) c -= 1;return c;
#endif
}Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint8 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CTZ)return v ? QAlgorithmsPrivate::qt_builtin_ctz(v) : 8U;
#elseunsigned int c = 8; // c will be the number of zero bits on the rightv &= -signed(v);if (v) c--;if (v & 0x0000000F) c -= 4;if (v & 0x00000033) c -= 2;if (v & 0x00000055) c -= 1;return c;
#endif
}Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint16 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CTZS)return v ? QAlgorithmsPrivate::qt_builtin_ctzs(v) : 16U;
#elseunsigned int c = 16; // c will be the number of zero bits on the rightv &= -signed(v);if (v) c--;if (v & 0x000000FF) c -= 8;if (v & 0x00000F0F) c -= 4;if (v & 0x00003333) c -= 2;if (v & 0x00005555) c -= 1;return c;
#endif
}Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint64 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CTZLL)return v ? QAlgorithmsPrivate::qt_builtin_ctzll(v) : 64;
#elsequint32 x = static_cast<quint32>(v);return x ? qCountTrailingZeroBits(x): 32 + qCountTrailingZeroBits(static_cast<quint32>(v >> 32));
#endif
}Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(unsigned long v) Q_DECL_NOTHROW
{return qCountTrailingZeroBits(QIntegerForSizeof<long>::Unsigned(v));
}Q_DECL_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint32 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZ)return v ? QAlgorithmsPrivate::qt_builtin_clz(v) : 32U;
#else// Hacker's Delight, 2nd ed. Fig 5-16, p. 102v = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);v = v | (v >> 8);v = v | (v >> 16);return qPopulationCount(~v);
#endif
}QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint8 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZ)return v ? QAlgorithmsPrivate::qt_builtin_clz(v)-24U : 8U;
#elsev = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);return qPopulationCount(static_cast<quint8>(~v));
#endif
}QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint16 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZS)return v ? QAlgorithmsPrivate::qt_builtin_clzs(v) : 16U;
#elsev = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);v = v | (v >> 8);return qPopulationCount(static_cast<quint16>(~v));
#endif
}QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(quint64 v) Q_DECL_NOTHROW
{
#if defined(QT_HAS_BUILTIN_CLZLL)return v ? QAlgorithmsPrivate::qt_builtin_clzll(v) : 64U;
#elsev = v | (v >> 1);v = v | (v >> 2);v = v | (v >> 4);v = v | (v >> 8);v = v | (v >> 16);v = v | (v >> 32);return qPopulationCount(~v);
#endif
}QT_POPCOUNT_RELAXED_CONSTEXPR inline uint qCountLeadingZeroBits(unsigned long v) Q_DECL_NOTHROW
{return qCountLeadingZeroBits(QIntegerForSizeof<long>::Unsigned(v));
}QT_WARNING_POP
QT_END_NAMESPACE#endif // QALGORITHMS_H

dm使用

//MainWindow.h#ifndef MAINWINDOW_H
#define MAINWINDOW_H#include <QMainWindow>
#include <dm/dm.h>QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACEclass MainWindow : public QMainWindow
{Q_OBJECTpublic:MainWindow(QWidget *parent = nullptr);~MainWindow();private:Ui::MainWindow *ui;Dm::Idmsoft dm;
};
#endif // MAINWINDOW_H

 

//mainwindow.cpp#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow)
{ui->setupUi(this);if(dm.setControl("dm.dmsoft"))//初始化COM对象{qDebug() << QStringLiteral("大漠测试,大漠版本:")<< dm.Ver();}
}MainWindow::~MainWindow()
{delete ui;
}

不管是debug 还是 release 。都能成功运行。运行后打印

这就代表大漠已经成功调通,接下来就可以正常开发了 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/138526.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux - 基础IO(Linux 当中的文件,文件系统调用接口,文件描述符)- 上篇

前言 首先&#xff0c;关于文件我们最先要理解的是&#xff0c;文件不仅仅存储的是数据&#xff0c;一个文件包括 内容 数据。内容好理解&#xff0c;就是我们先要这文件存储哪一些数据&#xff0c;这些数据就是文件的内容。 但是&#xff0c;在计算机当中&#xff0c;有两种…

【数据结构】树与二叉树(十):二叉树的先序遍历(非递归算法NPO)

文章目录 5.2.1 二叉树二叉树性质引理5.1&#xff1a;二叉树中层数为i的结点至多有 2 i 2^i 2i个&#xff0c;其中 i ≥ 0 i \geq 0 i≥0。引理5.2&#xff1a;高度为k的二叉树中至多有 2 k 1 − 1 2^{k1}-1 2k1−1个结点&#xff0c;其中 k ≥ 0 k \geq 0 k≥0。引理5.3&…

WAF入侵防御系统标准检查表

软件开发全文档获取&#xff1a;进主页

GitHub Copilot Chat将于12月全面推出;DeepLearning.AI免费新课

&#x1f989; AI新闻 &#x1f680; GitHub Copilot Chat将于12月全面推出&#xff0c;提升开发者的生产力 摘要&#xff1a;GitHub宣布将于12月全面推出GitHub Copilot Chat&#xff0c;这是GitHub Copilot的一个新功能&#xff0c;旨在帮助开发者编写代码。它能够集成到开…

【Linux】语言层面缓冲区的刷新问题以及简易模拟实现

文章目录 前言一、缓冲区刷新方法分类a.无缓冲--直接刷新b.行缓冲--不刷新&#xff0c;直到碰到\n才刷新c.全缓冲--缓冲区满了才刷新 二、 缓冲区的常见刷新问题1.问题2.刷新本质 三、模拟实现1.Mystdio.h2.Mystdio.c3.main.c 前言 我们接下来要谈论的是我们语言层面的缓冲区&…

No source control providers registered

使用vscode时碰到这个问题 git扩展没启动

centos 7.9系统安装老版本jenkins,并解决插件问题

1.初衷 因为jenkins随着时间推移&#xff0c;其版本也越来越新&#xff0c;支持它运行的JDK也越来越新。基于不折腾的目标&#xff0c;我们安装一个老的固定版本就行。以前安装新版本&#xff0c;经常碰到的问题就是插件安装不兼容的问题。现在这个问题&#xff0c;可以把以前…

Sprint Boot 学习路线 4

微服务 Spring Microservices是一个框架&#xff0c;它使用Spring框架更容易地构建和管理基于微服务的应用程序。微服务是一种架构风格&#xff0c;其中一个大型应用程序被构建为一组小型、独立可部署的服务。每个服务具有明确定义的职责&#xff0c;并通过API与其他服务通信。…

解析html生成Word文档

内容&#xff1a;读取html文件中的文本内容&#xff0c;然后生成Word文档导出。 事例场景&#xff1a;需求开发完成之后需要写文档&#xff08;代码修改清单&#xff09;&#xff0c;文档内容就是这次需求修改/新增的所有代码&#xff0c;需要列出修改的文件路径以及代码片段&…

Python实战:绘制直方图的示例代码,数据可视化获取样本分布特征

文章目录 一、初步二、参数三、绘图类型四、多组数据直方图对比Python技术资源分享1、Python所有方向的学习路线2、学习软件3、精品书籍4、入门学习视频5、实战案例6、清华编程大佬出品《漫画看学Python》7、Python副业兼职与全职路线 一、初步 对于大量样本来说&#xff0c;如…

systemctl enable docker.service报错“Failed to execute operation: Bad message“

将docker加入到开机自启&#xff0c;报错&#xff1a; 解决&#xff1a; 重新粘贴复制&#xff1a; [Unit] DescriptionDocker Application Container Engine Documentationhttps://docs.docker.com Afternetwork-online.target firewalld.service Wantsnetwork-online.target…

VS c++多文件编译

前言&#xff1a;记录下我这个菜鸡学习的过程&#xff0c;如有错误恳请指出&#xff0c;不胜感激&#xff01; 1.简单多文件编译调试 文件目录&#xff1a; 编译&#xff1a; -g选项是告诉编译器生成调试信息&#xff0c;这样可以在程序崩溃或出现错误时更容易地进行调试。这…

Windows下安装Anaconda5.3.1+Python3.8+TensorFlow2.13.0-CPU版本总结

Python3.8安装可以参考博文https://janus.blog.csdn.net/article/details/55274849 进行安装即可。 【1】Anaconda 清华的开源软件镜像站&#xff1a;https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/下载&#xff0c;这里选择的是5.3.1版本。 然后正常安装就可以&am…

华为ensp:交换机接口划分vlan

现在要把 e0/0/1 接口放入vlan1 e0/0/2 接口放入vlan2 e0/0/3 接口放入vlan3 默认所有接口都在vlan1所以 e0/0/0 接口不用动 1.创建vlan 进入系统视图模式 直接输入 vlan 编号 即可创建对应vlan vlan 编号 vlan 2 创建vlan2 vlan 3 创建vlan3 2.将接口进入vlan…

HALSTM32通用定时器+EXTI实现单击/双击/长按功能

HALSTM32通用定时器EXTI实现单击/双击/长按功能 ✨在使用USB功率计的时候&#xff0c;发现上面的一个按键实现多画面功能切换&#xff0c;于是探索了一下是如何实现的&#xff0c;将其实现的基本思路以及综合网上收集的相关实现方法&#xff0c;粗陋的整理了一下&#xff0c;将…

用趋动云GPU部署自己的Stable Diffusion

注&#xff1a;本文内容来自于对DataWhale的开源学习项目——免费GPU线上跑AI项目实践的学习&#xff0c;参见&#xff1a;Docs&#xff0c;引用了多处DataWhale给出的教程。 1.创建项目 1&#xff09;进入趋动云用户工作台&#xff0c;在当前空间处选择注册时系统自动生成的…

开发知识点-NodeJs-npm/Pnpm/Vite/Yarn包管理器

包管理器 vue-cli-service 不是内部或外部命令&#xff0c;也不是可运行的程序npm 全局变量pnpmPnpm介绍ViteYarn ‘vue-cli-service’ 不是内部或外部命令&#xff0c;也不是可运行的程序 yarn yarn add vue-amap yarn add vue-amap ant-design-vue npm 全局变量 换主机 新…

tomcat下载与使用教程

1. tomcat下载 官网&#xff1a;https://tomcat.apache.org/ 镜像地址&#xff1a;https://mirrors.huaweicloud.com/apache/tomcat/ 1、选择一个版本下载&#xff0c;官网下载速度缓慢&#xff0c;推荐镜像 2、对压缩包进行解压&#xff0c;无需进行安装&#xff0c;解压放…

Verilog 之 initial 模块与always 模块的用法与差异

文章目录 initial语法和用法特点和注意事项用途 always语法和用法特点和注意事项用途 二者差异 initial 在 Verilog 中&#xff0c;initial 块是用来在模拟开始时执行一次性初始化操作的一种建模方式。它通常用于模拟初始条件或进行一次性的初始化设置&#xff0c;而且只会在模…

经典OJ题:奇偶链表

目录 题目&#xff1a; 示例&#xff1a; 解题思路&#xff1a; 方法一&#xff1a;双链表链接法 图例&#xff1a; 代码演示&#xff1a; 解题效果&#xff1a; 方法二&#xff1a;奇偶指针 图例&#xff1a; 代码演示&#xff1a; 题目&#xff1a; 给定单链表…