大漠插件(二、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.rhkb.cn/news/184699.html

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

相关文章

SpringDataJpa(三)

七、Specifications动态查询 有时我们在查询某个实体的时候&#xff0c;给定的条件是不固定的&#xff0c;这时就需要动态构建相应的查询语句&#xff0c;在Spring Data JPA中可以通过JpaSpecificationExecutor接口查询。相比JPQL,其优势是类型安全,更加的面向对象。 import …

ClickHouse主键索引最佳实践

在本文中&#xff0c;我们将深入研究ClickHouse索引。我们将对此进行详细说明和讨论&#xff1a; ClickHouse的索引与传统的关系数据库有何不同ClickHouse是怎样构建和使用主键稀疏索引的ClickHouse索引的最佳实践 您可以选择在自己的机器上执行本文给出的所有Clickhouse SQL…

宝马——使用人工智能制造和驾驶汽车

德国汽车制造商宝马(BMW)每年在全球制造和销售250万台汽车&#xff0c;其品牌包括宝马、MINI和劳斯莱斯。 宝马汽车以其卓越的性能和对新技术的应用而著名&#xff0c;它是道路上最精致的汽车之一&#xff0c;并且和其竞争对手戴姆勒(Daimler)一样&#xff0c;在将自动驾驶汽车…

​软考-高级-信息系统项目管理师教程 第四版【第23章-组织通用管理-思维导图】​

软考-高级-信息系统项目管理师教程 第四版【第23章-组织通用管理-思维导图】 课本里章节里所有蓝色字体的思维导图

案例 | 3D可视化工具HOOPS助力SolidWorks edrawings成功引入AR/VR技术

HOOPS中文网慧都科技是HOOPS全套产品中国地区指定授权经销商&#xff0c;提供3D软件开发工具HOOPS售卖、试用、中文试用指导服务、中文技术支持。http://techsoft3d.evget.com/达索系统SolidWorks面临的挑战 达索系统SolidWorks公司开发和销售三维CAD设计软件、分析软件和产品…

【机器学习2】模型评估

模型评估主要分为离线评估和在线评估两个阶段。 针对分类、 排序、 回归、序列预测等不同类型的机器学习问题&#xff0c; 评估指标的选择也有所不同。 1 评估指标 1.1准确率 准确率是指分类正确的样本占总样本个数的比例 但是准确率存在明显的问题&#xff0c;比如当负样本…

class类默认导出,header字段在请求中的位置

这是封装好的&#xff0c;没封装的如下 如果没有用uni.post那么就是如下的结构 let header {Content-Type: application/x-www-form-urlencoded,tenant: MDAwMA, } request({url:/sal/formula/validFormula,method:post,data:{},header })

用循环结构程序自动化计算——计数循环

用循环结构程序自动化计算——计数循环 低阶目标&#xff1a; 利用for循环结构来完成已知次数的自动化处理&#xff0c;掌握计数循环结构应用方法 高阶目标&#xff1a; 学会利用for循环解决生活中的实际问题 用循环结构程序自动化计算——计数循环 用循环结构程序自动化计算…

ElasticSearch与Lucene是什么关系?Lucene又是什么?

一. ElasticSearch 与 Lucene 的关系 Elasticsearch&#xff08;ES&#xff09;和Apache Lucene之间有密切的关系&#xff0c;可以总结如下&#xff1a; Elasticsearch构建于Lucene之上&#xff1a;Elasticsearch实际上是一个分布式的、实时的搜索和分析引擎&#xff0c;它构建…

案例 - 拖拽上传文件,生成缩略图

直接看效果 实现代码 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>拖拽上传文件</title>&l…

Ecal基于wifi下跨机通讯

4. Network configuration — Eclipse eCAL™ UDP无法通信&#xff0c;改成TCP配置可以通信&#xff0c;但是没有重连。 Ecal版本&#xff1a;5.12稳定 WIFI连接eCAL Cloud Configuration Not Sending/Receiving Data Correctly Issue #650 eclipse-ecal/ecal GitHub 一开始…

Spring笔记(四)(黑马)(web层解决方案-SpringMVC)

01、Spring MVC 简介 1.1 SpringMVC概述 SpringMVC是一个基于Spring开发的MVC轻量级框架&#xff0c;Spring3.0后发布的组件&#xff0c;SpringMVC和Spring可以无 缝整合&#xff0c;使用DispatcherServlet作为前端控制器&#xff0c;且内部提供了处理器映射器、处理器适配器…

RflySim | 滤波器设计实验二

本讲是关于无人机滤波器&#xff0c;其中包括无人机滤波器简介、测量原理、线性互补滤波器设计、线性互补滤波器参数分析、卡尔曼滤波器设计等。 滤波器设计实验2 卡尔曼滤波器是一种递推线性最小方差估计算法&#xff0c;它的最优估计需满足以下三个条件&#xff1a; 1&#…

LCD充气桨板冲浪板充气泵方案——pcba/芯片方案

LCD充气桨板冲浪板充气泵规格书 一、主要功能介绍&#xff1a; 1、开机默认显示上次设定气压值&#xff0c; 2、测量范围&#xff1a;0~22psi、测量精度&#xff1a;0.5PSI 3、分辨率&#xff1a;0.01 PSI 4、温度范围&#xff1a;-10至50度摄氏 5、5个按键&#xff1a;PSI键、…

python自动化测试(十一):写入、读取、修改Excel表格的数据

目录 一、写入 1.1 安装 xlwt 1.2 增加sheet页 1.2.1 新建sheet页 1.2.2 sheet页写入数据 1.2.3 excel保存 1.2.4 完整代码 1.2.5 同一坐标&#xff0c;重复写入 二、读取 2.1 安装读取模块 2.2 读取sheet页 2.2.1 序号读取shee页 2.2.2 通过sheet页的名称读取she…

快来看看如何拿下7+干湿结合生信思路。赶紧拿起笔记本

今天给同学们分享一篇生信文章“CENPF/CDK1 signaling pathway enhances the progression of adrenocortical carcinoma by regulating the G2/M-phase cell cycle”&#xff0c;这篇文章发表在J Transl Med期刊上&#xff0c;影响因子为7.4。 结果解读&#xff1a; CENPF在AC…

易云维®工厂能耗管理平台系统方案,保证运营质量,推动广东制造企业节能减排

我国《关于完整准确全面贯彻新发展理念推进碳达峰碳中和工作的实施意见》出台&#xff0c;提出了推进碳达峰碳中和工作的总体目标。到2025年&#xff0c;广东具备条件的地区、行业和企业率先实现碳达峰&#xff0c;为全省实现碳达峰、碳中和奠定坚实基础&#xff1b;2030年前实…

Java算法(二):数组元素求和(元素个位和十位不能是 7 ,且只能是偶数)

java算法&#xff08;二&#xff09; 需求&#xff1a; ​ 有这样一个数组&#xff1a; 元素是&#xff1a;{68, 27, 95, 88, 171, 996, 51, 210} ​ 求出该数组中满足要求的元素和 ​ 要求是&#xff1a; 求和的元素各位和十位都不能是 7 &#xff0c;并且只能是偶数 packa…

Android 深色模式切换适配

在Android11上测试 1&#xff0c;把需要适配的资源文件复制一份后缀加上-night&#xff0c;里面就放置变主题后的资源 2&#xff0c;两个主题一个白&#xff0c;一个黑&#xff0c;分别放置在对应的valuse-styles.xml中 <style name"Theme.LaserMachPor" parent&…

【delphi】中 TNetHTTPClient 注意事项

一、TNetHTTPClient 是什么&#xff1f; 用于管理 HTTP 客户端的组件。相当于indy中的TidHTTP控件&#xff0c;是实现HTTP请求的客户端控件。 二、TNetHTTPClient 需要注意什么&#xff1f; 需要注意的是几个Timeout&#xff0c;因为我们使用TNetHTTPClient控件的时候&#x…