- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
Remeber: FRAPS + D3D11_CREATE_DEVICE_DEBUG +
SampleDesc.Count > 1
don't mix.
我真的是 DX 的新手......就像一个星期前一样。但是这个问题很容易描述,即使我的术语和理解有限。我保持 DEBUG
层打开,因为它提供了有值(value)的反馈。但反过来又造成了一个我无法克服的问题。我花了 1 天时间一根一根地拉头发。
如果我创建一个 D3D11
设备,其中:
vSwapChainDesc.SampleDesc.Count = 4;
vSwapChainDesc.SampleDesc.Quality = 3;
...它在最后的 ->Release()
上崩溃,无论它是哪个对象。完全相同的该死的代码:
vSwapChainDesc.SampleDesc.Count = 1;
vSwapChainDesc.SampleDesc.Quality = 0;
... 顺利清理 COM 引用。更不用说这两个变体在 Release
中都工作正常,没有 DEBUG
标志。
在 Output
中,我收到一些神秘的错误提示:live children without parents
。但是我只有 5 个与 COM 包装器一起使用的 COM 对象。
所以我删除了 COM 包装器,手动为它们中的每一个执行 ->Release()
和 = nullptr
。 IMO,错误地发布某些东西是不可能的。在最后的 ->Release()
上,它说它遇到了断点。
那么...还有其他人遇到过这种行为吗?除非其他人经历过完全相同的事情,否则我认为我无法得到答案。太奇怪了...
// Uncomment this and it all works... like magic!
// #undef _DEBUG
#pragma region Includes
#include <stdio.h>
#include <conio.h>
#include <map>
#include <windows.h>
#include <d3d11.h>
#pragma comment (lib, "dxgi.lib")
#pragma comment (lib, "d3d11.lib")
#pragma endregion
#pragma region Com Helpers
// track the refcounts on ->Release() :)
std::map<std::string, int> g_ComCounter;
template <typename Interface_t>
Interface_t** ComRelease(Interface_t** aPointer, LPCSTR aName) {
if(!aPointer) {
DebugBreak();
}
if(*aPointer) {
// save refcount for debug
g_ComCounter[aName] = (*aPointer)->Release();
*aPointer = nullptr;
}
printf("Destroyed %p (%s:%d).\r\n", *aPointer, aName, g_ComCounter[aName]);
return aPointer;
}
#define COM_RELEASE(Pointer) ComRelease(&Pointer, #Pointer)
template <typename Interface_t>
Interface_t** ComPointer(Interface_t** aPointer, LPCSTR aName) {
if(!aPointer) {
DebugBreak();
}
if(*aPointer) {
// save refcount for debug
g_ComCounter[aName] = (*aPointer)->Release();
*aPointer = nullptr;
}
printf("Prepared %p (%s:%d).\r\n", *aPointer, aName, g_ComCounter[aName]);
// Object is being Acquired
return aPointer;
}
#define COM_POINTER(Pointer) ComPointer(&Pointer, #Pointer)
#pragma endregion
#pragma region Window Proc
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam) {
PAINTSTRUCT vPainStruct = { 0 };
HDC vDc(nullptr);
switch(uMessage) {
case WM_PAINT:
vDc = BeginPaint(hWnd, &vPainStruct);
EndPaint(hWnd, &vPainStruct);
return FALSE;
break;
case WM_ERASEBKGND:
// Don't erase background!
return TRUE;
break;
case WM_CLOSE:
DestroyWindow(hWnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
break;
}
return DefWindowProc(hWnd, uMessage, wParam, lParam);
}
#pragma endregion
#ifdef _CONSOLE
int wmain(int aArgc, const WCHAR* aArgv[]) {
#else
int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
#endif
#pragma region Variables
HINSTANCE vInstance = GetModuleHandle(nullptr);
HWND vHwnd = nullptr;
D3D_DRIVER_TYPE vDriverType = D3D_DRIVER_TYPE_UNKNOWN;
D3D_FEATURE_LEVEL vFeatureLevel = D3D_FEATURE_LEVEL_11_0;
IDXGIFactory *vDxgiFactory = nullptr;
IDXGIAdapter *vDxgiAdapter = nullptr;
ID3D11Device *vD3dDevice = nullptr;
ID3D11DeviceContext *vD3dContext = nullptr;
IDXGISwapChain *vSwapChain = nullptr;
ID3D11Texture2D *vBackBuffer(nullptr);
ID3D11RenderTargetView *vRenderTargetView = nullptr;
#ifdef _DEBUG
ID3D11Debug *vDebugger = nullptr;
ID3D11InfoQueue *vInfoQueue = nullptr;
#endif
#pragma endregion
#pragma region Init Window
// Register class
WNDCLASSEX vWndClass;
ZeroMemory(&vWndClass, sizeof(vWndClass));
vWndClass.cbSize = sizeof(WNDCLASSEX);
vWndClass.style = 0; // CS_HREDRAW | CS_VREDRAW (draw in loop, no need for WM_PAINT)
vWndClass.lpfnWndProc = WndProc;
vWndClass.cbClsExtra = 0;
vWndClass.cbWndExtra = 0;
vWndClass.hInstance = vInstance;
vWndClass.hIcon = 0;
vWndClass.hCursor = LoadCursor(nullptr, IDC_ARROW);
vWndClass.hbrBackground = nullptr;
vWndClass.lpszMenuName = nullptr;
vWndClass.lpszClassName = L"D3d11Window";
vWndClass.hIconSm = 0;
if(!RegisterClassEx(&vWndClass)) {
DebugBreak();
return 0;
}
// Create window
RECT vWindowRect = { 0, 0, 640, 480 };
AdjustWindowRect(&vWindowRect, WS_OVERLAPPEDWINDOW, FALSE);
vHwnd = CreateWindowEx(
0, vWndClass.lpszClassName, L"D3D11", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT,
vWindowRect.right - vWindowRect.left, vWindowRect.bottom - vWindowRect.top,
nullptr, nullptr, vInstance,
nullptr);
if(!vHwnd) {
DebugBreak();
return 0;
}
ShowWindow(vHwnd, SW_SHOWDEFAULT);
#pragma endregion
#pragma region Initialization
RECT vClientRect = { 0 };
GetClientRect(vHwnd, &vClientRect);
UINT vWidth = vClientRect.right - vClientRect.left;
UINT vHeight = vClientRect.bottom - vClientRect.top;
if(FAILED(CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)COM_POINTER(vDxgiFactory)))) {
DebugBreak();
return 0;
}
if(FAILED(vDxgiFactory->EnumAdapters(0, COM_POINTER(vDxgiAdapter)))) {
DebugBreak();
return 0;
}
D3D_FEATURE_LEVEL vRequestedFeatureLevels[] = {
D3D_FEATURE_LEVEL_11_0,
// D3D_FEATURE_LEVEL_10_1,
// D3D_FEATURE_LEVEL_10_0
};
UINT vNumFeatureLevels = ARRAYSIZE(vRequestedFeatureLevels);
UINT vDeviceFlags = 0;
#ifdef _DEBUG
vDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif
if(FAILED(D3D11CreateDevice(
vDxgiAdapter,
vDriverType,
nullptr,
vDeviceFlags,
vRequestedFeatureLevels,
vNumFeatureLevels,
D3D11_SDK_VERSION,
COM_POINTER(vD3dDevice),
&vFeatureLevel,
COM_POINTER(vD3dContext)))) {
return 0;
}
#ifdef _DEBUG
if(FAILED(vD3dDevice->QueryInterface(__uuidof(ID3D11Debug), (LPVOID*)COM_POINTER(vDebugger)))) {
return 0;
}
if(FAILED(vDebugger->QueryInterface(__uuidof(ID3D11InfoQueue), (LPVOID*)COM_POINTER(vInfoQueue)))) {
return 0;
}
vInfoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_CORRUPTION, true);
vInfoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_ERROR, true);
vDebugger->ReportLiveDeviceObjects(D3D11_RLDO_SUMMARY | D3D11_RLDO_DETAIL);
#endif
UINT vMsaaQuality = 0;
if(FAILED(vD3dDevice->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM, 4, &vMsaaQuality)) || (vMsaaQuality < 1)) {
return 0;
}
printf("MsaaQuality: %d for 4\r\n", vMsaaQuality);
DXGI_SWAP_CHAIN_DESC vSwapChainDesc;
ZeroMemory(&vSwapChainDesc, sizeof(vSwapChainDesc));
vSwapChainDesc.BufferCount = 2;
vSwapChainDesc.BufferDesc.Width = vWidth;
vSwapChainDesc.BufferDesc.Height = vHeight;
vSwapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
vSwapChainDesc.BufferDesc.RefreshRate.Numerator = 60;
vSwapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
vSwapChainDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
vSwapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_CENTERED;
vSwapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
vSwapChainDesc.SampleDesc.Count = 4; // set 1 for the code to work vSwapChainDesc.SampleDesc.Quality = vMsaaQuality - 1;
vSwapChainDesc.OutputWindow = vHwnd;
vSwapChainDesc.Windowed = true;
vSwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
vSwapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
if(FAILED(vDxgiFactory->CreateSwapChain(vD3dDevice, &vSwapChainDesc, COM_POINTER(vSwapChain)))) {
return 0;
}
if(FAILED(vSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)COM_POINTER(vBackBuffer)))) {
return 0;
}
if(FAILED(vD3dDevice->CreateRenderTargetView(vBackBuffer, nullptr, COM_POINTER(vRenderTargetView)))) {
return 0;
}
vD3dContext->OMSetRenderTargets(1, &vRenderTargetView, nullptr);
D3D11_VIEWPORT vViewport = { 0 };
vViewport.Width = static_cast<FLOAT>(vWidth);
vViewport.Height = static_cast<FLOAT>(vHeight);
vViewport.MinDepth = D3D11_MIN_DEPTH;
vViewport.MaxDepth = D3D11_MAX_DEPTH;
vViewport.TopLeftX = 0;
vViewport.TopLeftY = 0;
vD3dContext->RSSetViewports(1, &vViewport);
#pragma endregion
#pragma region Game Loop
MSG vMessage = { 0 };
while(WM_QUIT != vMessage.message) {
while(PeekMessage(&vMessage, 0, 0, 0, PM_REMOVE)) {
TranslateMessage(&vMessage);
DispatchMessage(&vMessage);
}
if(WM_QUIT == vMessage.message) {
break;
}
#pragma region Render
float vClearColor[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
vD3dContext->ClearRenderTargetView(vRenderTargetView, vClearColor);
vSwapChain->Present(true, 0); // vsync
#pragma endregion
}
#pragma endregion
#pragma region Cleanup
if(vSwapChain) {
vSwapChain->SetFullscreenState(false, nullptr);
}
if(vD3dContext) {
vD3dContext->ClearState();
}
COM_RELEASE(vRenderTargetView);
COM_RELEASE(vBackBuffer);
COM_RELEASE(vSwapChain);
COM_RELEASE(vD3dContext);
COM_RELEASE(vD3dDevice);
COM_RELEASE(vDxgiFactory);
COM_RELEASE(vDxgiAdapter);
#ifdef _DEBUG
COM_RELEASE(vDebugger);
COM_RELEASE(vInfoQueue);
#endif
printf("\r\nREF COUNTS AFTER RELEASE():\r\n");
for(const auto& vComCount : g_ComCounter) {
printf("%s:%d\r\n", vComCount.first.c_str(), vComCount.second);
}
#pragma endregion
_getch();
return (int)vMessage.wParam;
}
求助!
If you want me to comment the code to better explain the logic, I will. I get comments mentioning things that are clearly explain the question and code... Maybe I'm not clear enough.
也许某些我没有调用的对象内部有某种释放函数。也许我做错了什么或真的错了。但我是从一个信誉良好的网站上得到的。它与我目前正在阅读的书中的 Hello DirectX!
代码相匹配。
此代码段经过精简和简约。在尝试找出问题时,它是一个更复杂的版本的精简版。另外,我删除了所有 OOP,以便将它放在一个易于理解的代码块中。
Now there's a final question: Is there another way to smooth lines except this
SampleDesc
one?
PS:它是 Windows 7 x64,VS 2013 + 2014 CTP。并且该卡支持它在调试和 Release模式下工作(边缘平滑)。只有最终版本在 Debug模式下失败。
最佳答案
我不知道你的代码为什么会崩溃,但是我想根据你的代码分享我的一些DirectX编程的经验,:)
如下所示的更干净的代码,您将摆脱复杂的 COM 内容,并专注于检查崩溃的代码逻辑。
#define DEBUG
#pragma region Includes
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <d3d11.h>
#pragma comment (lib, "dxgi.lib")
#pragma comment (lib, "d3d11.lib")
#pragma endregion
// Release COM object
#define SAFE_RELEASE(P) if(P){ P->Release(); P = NULL;}
#pragma region Window Proc
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam) {
PAINTSTRUCT vPainStruct = { 0 };
HDC vDc(nullptr);
switch(uMessage) {
case WM_PAINT:
vDc = BeginPaint(hWnd, &vPainStruct);
EndPaint(hWnd, &vPainStruct);
return FALSE;
break;
case WM_ERASEBKGND:
// Don't erase background!
return TRUE;
break;
case WM_CLOSE:
DestroyWindow(hWnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
break;
}
return DefWindowProc(hWnd, uMessage, wParam, lParam);
}
#pragma endregion
int main() {
#pragma region Variables
HINSTANCE vInstance = GetModuleHandle(nullptr);
HWND vHwnd = nullptr;
D3D_DRIVER_TYPE vDriverType = D3D_DRIVER_TYPE_UNKNOWN;
D3D_FEATURE_LEVEL vFeatureLevel = D3D_FEATURE_LEVEL_11_0;
IDXGIFactory *vDxgiFactory = NULL;
IDXGIAdapter *vDxgiAdapter = nullptr;
ID3D11Device *vD3dDevice = nullptr;
ID3D11DeviceContext *vD3dContext = nullptr;
IDXGISwapChain *vSwapChain = nullptr;
ID3D11Texture2D *vBackBuffer = NULL;
ID3D11RenderTargetView *vRenderTargetView = nullptr;
#ifdef _DEBUG
ID3D11Debug *vDebugger = nullptr;
ID3D11InfoQueue *vInfoQueue = nullptr;
#endif
#pragma endregion
#pragma region Init Window
// Register class
WNDCLASSEX vWndClass;
ZeroMemory(&vWndClass, sizeof(vWndClass));
vWndClass.cbSize = sizeof(WNDCLASSEX);
vWndClass.style = 0; // CS_HREDRAW | CS_VREDRAW (draw in loop, no need for WM_PAINT)
vWndClass.lpfnWndProc = WndProc;
vWndClass.cbClsExtra = 0;
vWndClass.cbWndExtra = 0;
vWndClass.hInstance = vInstance;
vWndClass.hIcon = 0;
vWndClass.hCursor = LoadCursor(nullptr, IDC_ARROW);
vWndClass.hbrBackground = nullptr;
vWndClass.lpszMenuName = nullptr;
vWndClass.lpszClassName = L"D3d11Window";
vWndClass.hIconSm = 0;
if(!RegisterClassEx(&vWndClass)) {
DebugBreak();
return 0;
}
// Create window
RECT vWindowRect = { 0, 0, 640, 480 };
vHwnd = CreateWindowEx(
0, vWndClass.lpszClassName, L"D3D11", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT,
vWindowRect.right - vWindowRect.left, vWindowRect.bottom - vWindowRect.top,
nullptr, nullptr, vInstance,
nullptr);
if(!vHwnd) {
DebugBreak();
return 0;
}
ShowWindow(vHwnd, SW_SHOWDEFAULT);
#pragma endregion
#pragma region Initialization
RECT vClientRect = { 0 };
GetClientRect(vHwnd, &vClientRect);
UINT vWidth = vClientRect.right - vClientRect.left;
UINT vHeight = vClientRect.bottom - vClientRect.top;
if(FAILED(CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)(&vDxgiFactory)))) {
DebugBreak();
return 0;
}
if(FAILED(vDxgiFactory->EnumAdapters(0, &vDxgiAdapter))) {
DebugBreak();
return 0;
}
D3D_FEATURE_LEVEL vRequestedFeatureLevels[] = {
D3D_FEATURE_LEVEL_11_0,
// D3D_FEATURE_LEVEL_10_1,
// D3D_FEATURE_LEVEL_10_0
};
UINT vNumFeatureLevels = ARRAYSIZE(vRequestedFeatureLevels);
UINT vDeviceFlags = 0;
#ifdef _DEBUG
vDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif
if(FAILED(D3D11CreateDevice(
vDxgiAdapter,
vDriverType,
nullptr,
vDeviceFlags,
vRequestedFeatureLevels,
vNumFeatureLevels,
D3D11_SDK_VERSION,
&vD3dDevice,
&vFeatureLevel,
&vD3dContext))) {
return 0;
}
UINT vMsaaQuality = 0;
if(FAILED(vD3dDevice->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM, 4, &vMsaaQuality)) || (vMsaaQuality < 1)) {
return 0;
}
printf("MsaaQuality of max %d supported for count 4\r\n", vMsaaQuality);
DXGI_SWAP_CHAIN_DESC vSwapChainDesc;
ZeroMemory(&vSwapChainDesc, sizeof(vSwapChainDesc));
vSwapChainDesc.BufferCount = 2;
vSwapChainDesc.BufferDesc.Width = vWidth;
vSwapChainDesc.BufferDesc.Height = vHeight;
vSwapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
vSwapChainDesc.BufferDesc.RefreshRate.Numerator = 60;
vSwapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
vSwapChainDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
vSwapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_CENTERED;
vSwapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
vSwapChainDesc.SampleDesc.Count = 4; // set 1 to work
vSwapChainDesc.SampleDesc.Quality = vMsaaQuality - 1;
vSwapChainDesc.OutputWindow = vHwnd;
vSwapChainDesc.Windowed = true;
vSwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
vSwapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
if(FAILED(vDxgiFactory->CreateSwapChain(vD3dDevice, &vSwapChainDesc, &vSwapChain))) {
return 0;
}
if(FAILED(vSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&vBackBuffer))) {
return 0;
}
if(FAILED(vD3dDevice->CreateRenderTargetView(vBackBuffer, nullptr, &vRenderTargetView))) {
return 0;
}
vD3dContext->OMSetRenderTargets(1, &vRenderTargetView, nullptr);
D3D11_VIEWPORT vViewport = { 0 };
vViewport.Width = static_cast<FLOAT>(vWidth);
vViewport.Height = static_cast<FLOAT>(vHeight);
vViewport.MinDepth = D3D11_MIN_DEPTH;
vViewport.MaxDepth = D3D11_MAX_DEPTH;
vViewport.TopLeftX = 0;
vViewport.TopLeftY = 0;
vD3dContext->RSSetViewports(1, &vViewport);
#pragma endregion
#pragma region Game Loop
MSG vMessage = { 0 };
while(WM_QUIT != vMessage.message) {
while(PeekMessage(&vMessage, 0, 0, 0, PM_REMOVE)) {
TranslateMessage(&vMessage);
DispatchMessage(&vMessage);
}
if(WM_QUIT == vMessage.message) {
break;
}
#pragma region Render
float vClearColor[4] = { 1.0f, 0.0f, 0.0f, 1.0f };
vD3dContext->ClearRenderTargetView(vRenderTargetView, vClearColor);
vSwapChain->Present(true, 0); // vsync
#pragma endregion
}
#pragma endregion
#pragma region Cleanup
if(vSwapChain) {
vSwapChain->SetFullscreenState(false, nullptr);
}
if(vD3dContext) {
vD3dContext->ClearState();
}
SAFE_RELEASE(vRenderTargetView);
SAFE_RELEASE(vBackBuffer);
SAFE_RELEASE(vSwapChain);
SAFE_RELEASE(vD3dContext);
SAFE_RELEASE(vD3dDevice);
SAFE_RELEASE(vDxgiFactory);
SAFE_RELEASE(vDxgiAdapter);
#ifdef _DEBUG
SAFE_RELEASE(vDebugger);
SAFE_RELEASE(vInfoQueue);
#endif
#pragma endregion
_getch();
return (int)vMessage.wParam;
}
关于c++ - 当 SampleDesc.Count > 1 时,Direct3D11 DEBUG MODE 在最终 COM 版本上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22268892/
无法使用 Hive 版本 1.1.0 HBase 版本 0.94.8 和 hadoop 版本 2.7.0 从 hive 创建 Hbase 表 hive (default)> CREATE TABLE
我试图为 electron app 创建可执行文件但面临这个问题 Unable to determine Electron version. Please specify an Electron ve
我正在尝试让自适应阈值在 python 绑定(bind)到 opencv 中工作(swig 一个 - 无法让 opencv 2.0 工作,因为我正在使用 beagleboard 因为交叉编译还没有工作
我一直在 linux 机器上使用 JMeter,在命令行下使用了一段时间。工作正常。 今天,我在 Windows 机器(新客户端等)上尝试了它,它确实可以工作,但在控制台窗口中输出有很大不同。 Lin
在我的编码环境中,我通常使用最新版本的 Java 和 Eclipse。当我编写源代码时,我不会注意我使用的 API 方法或类是否向后兼容旧版本的 Java 或 Eclipse。在 javadoc 中存
问题是关于版本的特定组合,但更普遍。 我刚刚从 Kubuntu 12.04 升级到 14.04。现在,当我想编译 CUDA 代码(使用 CUDA 6.5)时,我得到: #error -- unsupp
我目前正在对我的一些应用程序进行沙箱处理,看来我必须删除一些功能才能满足 Mac App Store 沙箱(和其他)规则。 显然用户不会因为失去功能而感到高兴,我担心他们不会指责苹果制定了愚蠢的规则,
我用 flash 和 js 版本创建了一个动画横幅。 是否可以检测低于版本 9 的 ie 版本,然后提供 Flash 横幅,否则提供 js 横幅。 最佳答案 您可以使用条件注释来检测 IE 版本
我有一个处理不同位置的数据库的应用程序,我想检查这些数据库是否使用 Firebird 2.5 或更高版本打开。我们最近从 Firebird 2.0 迁移到了 2.5,我们有很多数据库可以响应 sele
我正在开发一个应用程序,我使用托管在我的服务器上的 Java 和 Jersey 构建了后端部分。我在服务器上使用 Tomcat7 来调用 Web 服务。 我以前有一台安装了 Ubuntu 的计算机,我
我可以使用 GetVersionEx() 函数来获取 Windows 版本,但是这个函数将返回一个数字而不是一个字符串。但是没有问题,因为我可以将数字转换为字符串,例如: if (osvi.dwMaj
我已经在我的系统中安装了 Anaconda 2 & 3。 Anaconda 2 包含 python 2.7 & Anaconda 3 包含 python 3.6。 我需要使用命令提示符运行我的 pyt
我正在尝试构建一个 Android 项目,但发生了以下错误 Error:(10, 1) A problem occurred evaluating project ':app'. > Failed t
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 4 年前。 Improve this qu
在降级我的 GCC 之前,我想知道是否有办法确定我的机器中的哪些程序/框架或依赖项会中断,以及是否有更好的方法来执行 openpose 安装? (例如,在 CMake 中更改某些内容) 有没有办法在不
我已经在终端的代码sudo apt-get install Shadowsocks-qt5中安装了Shadowsocks-Qt5,然后我可以通过搜索找到启动图标,但是它当我点击图标时打不开。然后我尝试
在网络上找到的文档说,MLLP V2(第 2 版)是用于传输 HL7 版本 3 内容的所有消息传输协议(protocol)的要求。似乎 MLLP 第 2 版主要用于 HL7 第 3 版。 我们可以/应
我正在使用带有 selinium webdriver 的 Protractor 。我的chromeDriver版本是78.0.1,chrome版本是78.0.3904.97。两个版本都匹配,应该不会有
我正在按照教程设置 mysql 数据库并做一些事情。我无法找到数据库资源管理器。我读了很多,但在 Window->show View-> Dataxxx 或右侧上部选项卡中无法正常工作。 最佳答案 从
我已经在 KDE 桌面上安装了 Anaconda 2.0.1。当我运行 python 并看到所有已安装的模块时,我收到此消息“无法将不兼容的 Qt 库(版本 0x40801)与该库(版本 0x4080
我是一名优秀的程序员,十分优秀!