XP下采用DirectShow采集摄像头

2023-11-06

 

转载请标明是引用于 http://blog.csdn.net/chenyujing1234 

欢迎大家提出意见,一起讨论!

需要示例源码的请独自联系我.

前提: 摄像头能正常工作、摄像头有创建directshow filter

 

大家可以对比我的另一篇文章学习:    wince系统下DirectShow采集摄像头

一、初始化工作

1、DirctShow环境初始化
bool
uEye_DirectShow_Demo_Dlg::DirectShow_Init()
{
    // initialize the COM library on the current thread
    HRESULT err= CoInitialize(NULL);

    if( FAILED(err))
    {
        MessageBoxEx( NULL, "Initializing COM library failed!", __FUNCTION__, MB_ICONERROR, 0);
    }

    return err == S_OK;
}

2、搜索Video源

如果没有设备接入,那么CreateClassEnumerator会返回失败

bool
uEye_DirectShow_Demo_Dlg::VideoSourcesList_Fill()
{
    HRESULT status= S_OK;

    // create System Device Enumerator
    ICreateDevEnum *pSystemDeviceEnumerator= NULL;
    status= CoCreateInstance(  CLSID_SystemDeviceEnum,
                                NULL,
                                CLSCTX_INPROC,
                                IID_ICreateDevEnum,
                                (void**)&pSystemDeviceEnumerator);
    if( FAILED(status))
    {
        MessageBoxEx( NULL, "Creating System Device Enumerator failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

    // create Class Enumerator that lists alls video input devices among the system devices
    IEnumMoniker *pVideoInputDeviceEnumerator= NULL;
    status= pSystemDeviceEnumerator->CreateClassEnumerator( CLSID_VideoInputDeviceCategory,
                                                            &pVideoInputDeviceEnumerator,
                                                            0);

    // release the System Device Enumerator which is not needed anymore
    pSystemDeviceEnumerator->Release();
    pSystemDeviceEnumerator= NULL;

    if( status != S_OK)
    {
        MessageBoxEx( NULL, "Creating Class Enumerator failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

    // add entry '[no device selected]' to list
    m_comboVideoSources.AddString( "[no device selected]");
    m_comboVideoSources.SetItemDataPtr( 0, NULL);

    // for each enumerated video input device: add it to the list
    IMoniker *pMoniker= NULL;
    while( pVideoInputDeviceEnumerator->Next( 1, &pMoniker, NULL) == S_OK )
    {
        VARIANT var;
        VariantInit(&var);

        // make filters properties accessible
        IPropertyBag *pPropBag= NULL;
        status= pMoniker->BindToStorage( 0, 0, IID_IPropertyBag, (void**)&pPropBag);
        if( FAILED(status))
        {
            pPropBag= NULL;
            MessageBoxEx( NULL, "Accessing filter properties failed!", __FUNCTION__, MB_ICONERROR, 0);
            // continue with the next filter
        }
        else
        {
            // add a reference to the storage object
            pPropBag->AddRef();

            // get the name of this filter
            status= pPropBag->Read( L"FriendlyName", &var, 0);
            if( FAILED(status))
            {
                MessageBoxEx( NULL, "Reading filter name failed!", __FUNCTION__, MB_ICONERROR, 0);
                // continue with the next filter
            }
            else
            {
                // if uEye Capture Device:
                // add filtername to the list and link the moniker pointer to the list entry
                CString sTemp(var.bstrVal);
#if (0) /* jma [04/08/2010] add devices named UI... too */
                if( sTemp.Find( "uEye Capture Device", 0) != -1)
#endif
                if ((sTemp.Find( "uEye Capture Device", 0) != -1) || (sTemp.Find( "UI", 0) != -1))
                {
                    int index = m_comboVideoSources.AddString( sTemp);
                    // dont forget to release the moniker later!
                    m_comboVideoSources.SetItemDataPtr( index, pMoniker);
                }
                else
                {
                    pMoniker->Release();
                    pMoniker= NULL;
                }
            }

            // release the reference to the storage object
            pPropBag->Release();
            pPropBag= NULL;
        }

        VariantClear(&var);
    }

    // release the class enumerator
    pVideoInputDeviceEnumerator->Release();
    pVideoInputDeviceEnumerator= NULL;

    // select first list entry
    m_comboVideoSources.SetCurSel( 0);

    return false;
}


二、选择某个摄像设备

1、先停止原有的Media
bool
uEye_DirectShow_Demo_Dlg::FilterGraph_Stop()
{
    Invalidate();

    // proceed only if filter graph manager object present
    if( m_pActiveFilterGraphManager == NULL)
    {
        return true;
    }

    HRESULT status= S_OK;

    // get the MediaControl interface of the graph
    IMediaControl* pMediaControl= NULL;
    status= m_pActiveFilterGraphManager->QueryInterface( IID_IMediaControl, (void**)&pMediaControl);
    if( FAILED(status) || pMediaControl == NULL)
    {
        MessageBoxEx( NULL, "Querying MediaControl interface of the filter graph manager failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

     check for graph to be executing before allowing to stop

    //OAFilterState filterState= 0;   // OAFilterState is actually a long
    //status= pMediaControl->GetState( 100, &filterState);
    //if( FAILED(status))
    //{
    //    // cleanup

    //    // release the MediaControl interface object
    //    pMediaControl->Release();
    //    pMediaControl= NULL;

    //    MessageBoxEx( NULL, "Querying graph state failed!", __FUNCTION__, MB_ICONERROR, 0);
    //    return false;
    //}

    //if( filterState != State_Stopped)
    {
        // stop the execution of the graph
        status= pMediaControl->Stop();
        if( FAILED(status))
        {
            // cleanup

            // release the MediaControl interface object
            pMediaControl->Release();
            pMediaControl= NULL;

            MessageBoxEx( NULL, "Stopping the graph failed!", __FUNCTION__, MB_ICONERROR, 0);
            return false;
        }

        // update the graph state view
        UpdateGraphState( State_Stopped);
    }

    // release the MediaControl interface object
    pMediaControl->Release();
    pMediaControl= NULL;

    return true;
}


2、删除Graph
bool
uEye_DirectShow_Demo_Dlg::FilterGraph_Destroy()
{
    // proceed only if filter graph manager object present
    if( m_pActiveFilterGraphManager == NULL)
    {
        return true;
    }

    if( !FilterGraph_Stop())
    {
        return false;
    }

    // disable 'dump graph' button as long as no graph present
    m_bnDumpGraph.EnableWindow( FALSE);

    // delete the capture filter
    m_pActiveVideoSource->Release();
    m_pActiveVideoSource= NULL;

    // delete the graph
    m_pActiveFilterGraphManager->Release();
    m_pActiveFilterGraphManager= NULL;

    // update the graph state view
    UpdateGraphState( -1);

    return true;
}


 

3、根据选择的设备的moniker来创建Graph

分为:

(1)为选择的设备创建capture filter

 status= pMoniker->BindToObject( 0, 0, IID_IBaseFilter, (void**)&m_pActiveVideoSource);

(2) 创建一个capture Graph Builder对象

ICaptureGraphBuilder2* pCaptureGraphBuilder= NULL;
    status= CoCreateInstance(   CLSID_CaptureGraphBuilder2,
                                NULL,
                                CLSCTX_INPROC,
                                IID_ICaptureGraphBuilder2,
                                (void**)&pCaptureGraphBuilder);

(3) 创建 Filter Graph Manager

  // create the Filter Graph Manager
    status= CoCreateInstance(   CLSID_FilterGraph,
                                NULL,
                                CLSCTX_INPROC,
                                IID_IGraphBuilder,
                                (void **)&m_pActiveFilterGraphManager);

(4) 初始化Capture Graph Builder 对象,把graph和builder 连接起来

   status= pCaptureGraphBuilder->SetFiltergraph( m_pActiveFilterGraphManager);

(5) 增加Capture到graph中

  status= m_pActiveFilterGraphManager->AddFilter( m_pActiveVideoSource, L"Video Capture");

(6) render 视频的capture pin, 把caputre filter和render连接起来

  status= pCaptureGraphBuilder->RenderStream( &PIN_CATEGORY_CAPTURE,
                                                &MEDIATYPE_Video,
                                                m_pActiveVideoSource,
                                                NULL,
                                                NULL);

(7) 查询filter graph manager的VideoWindow接口

 IVideoWindow* pVideoWindow= NULL;
    status= m_pActiveFilterGraphManager->QueryInterface( IID_IVideoWindow, (void**)&pVideoWindow);

(8) 把video view连接到graph

 // connect the dialogs video view to the graph
    CWnd* pwnd= GetDlgItem( IDC_STATIC_VIDEOVIEW);
    pVideoWindow->put_Owner( (OAHWND)pwnd->m_hWnd);  // put_Owner always returns NOERROR

// we dont want a title bar on our video view
    long pWindowStyle = 0;
    pVideoWindow->get_WindowStyle(&pWindowStyle);
    pWindowStyle &= ~WS_CAPTION;
    pVideoWindow->put_WindowStyle(pWindowStyle);

    // adjust graphs video geometry
    CRect rc( 0, 0, 0, 0);
    pwnd->GetClientRect( &rc);
    pVideoWindow->SetWindowPosition( rc.left, rc.top, rc.Width(), rc.Height());

    // release the VideoWindow interface object, we do not need it anymore
    pVideoWindow->Release();

四、  开始播放

bool
uEye_DirectShow_Demo_Dlg::FilterGraph_Start()
{
    // proceed only if filter graph manager object present
    if( m_pActiveFilterGraphManager == NULL)
    {
        return true;
    }

    HRESULT status= S_OK;

    // get the MediaControl interface of the graph
    IMediaControl* pMediaControl= NULL;
    status= m_pActiveFilterGraphManager->QueryInterface( IID_IMediaControl, (void**)&pMediaControl);
    if( FAILED(status) || pMediaControl == NULL)
    {
        MessageBoxEx( NULL, "Querying MediaControl interface of the filter graph manager failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

     check for graph to be stopped before allowing to start

    //OAFilterState filterState= 0;   // OAFilterState is actually a long
    //status= pMediaControl->GetState( 100, &filterState);
    //if( FAILED(status))
    //{
    //    // cleanup

    //    // release the MediaControl interface object
    //    pMediaControl->Release();
    //    pMediaControl= NULL;

    //    MessageBoxEx( NULL, "Querying graph state failed!", __FUNCTION__, MB_ICONERROR, 0);
    //    return false;
    //}

    //if( filterState == State_Stopped)
    {
        // start the execution of the graph
        status= pMediaControl->Run();
        if( FAILED(status))
        {
            // cleanup

            // release the MediaControl interface object
            pMediaControl->Release();
            pMediaControl= NULL;

            MessageBoxEx( NULL, "Starting the graph failed!", __FUNCTION__, MB_ICONERROR, 0);
            return false;
        }

        // update the graph state view
        UpdateGraphState( State_Running);
    }

    // release the MediaControl interface object
    pMediaControl->Release();
    pMediaControl= NULL;

    return true;
}


五、 pin 特征的查看

如果pin里有自己的查看特征接口, 那么就直接调用接口

bool
uEye_DirectShow_Demo_Dlg::ShowPinProperties()
{
    // proceed only if video source object present
    if( m_pActiveVideoSource == NULL)
    {
        return true;
    }

    HRESULT status= S_OK;

    IPin* pPin= GetPin( m_pActiveVideoSource, PINDIR_OUTPUT, &MEDIATYPE_Video, &PIN_CATEGORY_CAPTURE);
    if( pPin == NULL)
    {
        MessageBoxEx( NULL, "Pin not available!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

    IUnknown* pFilterUnk= NULL;
    status= pPin->QueryInterface( IID_IUnknown, (void**)&pFilterUnk);
    if( FAILED(status))
    {
        // cleanup

        pPin->Release();
        pPin= NULL;

        MessageBoxEx( NULL, "Querying pin's IAMStreamConfig interface failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

    ISpecifyPropertyPages* pSpecifyPropertyPages= NULL;
    status= pFilterUnk->QueryInterface( IID_ISpecifyPropertyPages, (void**)&pSpecifyPropertyPages);
    if( FAILED(status))
    {
        // cleanup

        pFilterUnk->Release();
        pFilterUnk= NULL;

        pPin->Release();
        pPin= NULL;

        MessageBoxEx( NULL, "Querying pin's ISpecifyPropertyPages interface failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

    CAUUID cauuid= { 0, NULL};
    status= pSpecifyPropertyPages->GetPages( &cauuid);
    if( FAILED(status))
    {
        // cleanup

        pSpecifyPropertyPages->Release();
        pSpecifyPropertyPages->Release();
        pSpecifyPropertyPages= NULL;

        pFilterUnk->Release();
        pFilterUnk= NULL;

        pPin->Release();
        pPin= NULL;

        MessageBoxEx( NULL, "Querying pin's ISpecifyPropertyPages interface failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }
    pSpecifyPropertyPages->Release();
    pSpecifyPropertyPages->Release();
    pSpecifyPropertyPages= NULL;

    status= OleCreatePropertyFrame( GetSafeHwnd(),//*this,
                                    0,
                                    0,
                                    OLESTR("uEye Capture Device Pin"),
                                    1,
                                    (IUnknown**)&pFilterUnk,
                                    cauuid.cElems,
                                    (GUID*)cauuid.pElems,
                                    0,
                                    0,
                                    NULL);

    if( FAILED(status))
    {
        // cleanup

        CoTaskMemFree( cauuid.pElems);
        cauuid.pElems= NULL;
        cauuid.cElems= 0;

        pFilterUnk->Release();
        pFilterUnk= NULL;

        pPin->Release();
        pPin= NULL;

        MessageBoxEx( NULL, "OleCreatePropertyFrame failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

    // cleanup

    CoTaskMemFree( cauuid.pElems);
    cauuid.pElems= NULL;
    cauuid.cElems= 0;

    pFilterUnk->Release();
    pFilterUnk= NULL;

    pPin->Release();
    pPin= NULL;

    return true;
}


六、 查询包含的 filter信息

bool
uEye_DirectShow_Demo_Dlg::EnumerateFilters() 
{
    // proceed only if filter graph builder object present
    if( m_pActiveFilterGraphManager == NULL)
    {
        return false;
    }

    IEnumFilters *pEnum = NULL;
    IBaseFilter *pFilter;
    ULONG cFetched;

    HRESULT hr = m_pActiveFilterGraphManager->EnumFilters(&pEnum);
    if (FAILED(hr))
    {
        MessageBoxEx( NULL, "Enumerating filters failed!", __FUNCTION__, MB_ICONERROR, 0);
        return false;
    }

    CString sInfo( "Filters in the Graph:\n\n");
    int i= 0;

    while(pEnum->Next(1, &pFilter, &cFetched) == S_OK)
    {
        i++;

        FILTER_INFO FilterInfo;
        hr = pFilter->QueryFilterInfo(&FilterInfo);
        if (FAILED(hr))
        {
            MessageBoxEx( NULL, "Could not get the filter info", __FUNCTION__, MB_ICONERROR, 0);
            continue;  // Maybe the next one will work.
        }

        LPWSTR pVendorInfo= NULL;
        hr= pFilter->QueryVendorInfo( &pVendorInfo);
        if( FAILED(hr))
        {
            pVendorInfo= NULL;
        }


        if( pVendorInfo != NULL)
        {
            sInfo.AppendFormat( "%d: %S (by %S)\n", i, FilterInfo.achName, pVendorInfo);
            CoTaskMemFree( pVendorInfo);
            pVendorInfo= NULL;
        }
        else
        {
            sInfo.AppendFormat( "%d: %S\n", i, FilterInfo.achName);
        }

        // The FILTER_INFO structure holds a pointer to the Filter Graph
        // Manager, with a reference count that must be released.
        if (FilterInfo.pGraph != NULL)
        {
            FilterInfo.pGraph->Release();
        }
        pFilter->Release();
    }

    pEnum->Release();

    MessageBoxEx( NULL, sInfo.GetBuffer(), __FUNCTION__, MB_OK, 0);

    return true;
}


 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

XP下采用DirectShow采集摄像头 的相关文章

  • boost::property_map 在 boost 中是如何实现的以及如何更改它

    我想知道属性映射是如何在提升图中实现的 例如 我的顶点和边属性定义如下 vertex property gt struct NodeInfo int a b c actual bundled property struct NodeInfo
  • 如何根据列表中的先前值过滤Haskell中的列表元素?

    我正在努力在 Haskell 中创建一个函数 该函数根据列表中前一个元素的条件过滤列表的数字 Example 前一个数字是 2 的倍数 myFunction 1 2 5 6 3 expected output 5 3 我知道如何申请filt
  • 使用 d3 在两个节点之间绘制多条边

    我一直在关注 Mike Bostock 的代码这个例子 http bl ocks org 1153292学习如何在 d3 中绘制有向图 并且想知道如何构建代码 以便可以在图中的两个节点之间添加多个边 例如 如果上例中的数据集定义为 var
  • C 中的 NULL 是否需要/定义为零?

    在我的 GCC 测试程序中 NULL 似乎为零 但维基百科说NULL只需要指向不可寻址的内存 有编译器做吗NULL非零 我很好奇是否if ptr NULL 是比更好的练习if ptr NULL is guaranteed to be zer
  • Visual Studio 项目的依赖关系图

    我目前正在将一个大型解决方案 约 70 个项目 从 VS 2005 NET 2 0 迁移到 VS 2008 NET 3 5 目前我有 VS 2008 NET 2 0 问题是我需要将项目一一移动到新的 NET 框架 确保没有 NET 2 0
  • 确定非空列表条目是否“连续”的 Pythonic 方法

    我正在寻找一种方法来轻松确定列表中所有非 None 项目是否出现在单个连续切片中 我将使用整数作为非 None 项目的示例 例如 列表 None None 1 2 3 None None 满足我对连续整数条目的要求 相比之下 1 2 Non
  • 如何在matplotlib_venn中将维恩图保存为PNG图

    使用以下代码我尝试创建维恩图 然后另存为文件 import matplotlib from matplotlib venn import venn2 set1 set A B C D set2 set B C D E plt venn2 s
  • R - 过滤器坐标

    我是 R 新手 我有一个简单的问题 据我看来 但到目前为止我还没有找到解决方案 我有一组 长 2D x y 坐标 只是 2D 空间中的点 如下所示 ID x y 1 1758 56 1179 26 2 775 67 1197 14 3 29
  • 将 dataGridView 绑定到绑定列表并按文本框过滤行

    我正在开发一个 Winforms 应用程序 并且有一个已经绑定到 dataGridView 的对象的 BindingList 我还有一个 过滤器 文本框 如果它们与文本框文本不匹配 我想从 datagridview 行中过滤掉行 我想以某种
  • 如何显示 matplotlib 饼图中的实际值

    我有一个饼图 绘制从 CSV 文件中提取的值 当前显示值的比例 百分比显示为 autopct 1 1f 有没有办法显示每个切片的数据集中表示的实际值 Pie for Life Expectancy in Boroughs import pa
  • Floyd-Warshall 算法:获取最短路径

    假设一个图由一个表示n x n维数邻接矩阵 我知道如何获得所有对的最短路径矩阵 但我想知道有没有办法追踪所有最短路径 Blow是python代码实现 v len graph for k in range 0 v for i in range
  • 块执行后变量返回 null

    我正在调度一个队列来在单独的线程上下载一些 flickr 照片 在 viewWillAppear 中 当我记录块内数组的内容时 它完美地显示了所有内容 dispatch queue t photoDowonload dispatch que
  • 参数映射不能用于 MERGE 模式

    我收到错误参数映射不能在合并模式中使用 我如何解决此错误 我正在使用下面的代码 我非常感谢任何帮助 提前致谢 MERGE u Person names RETURN u and data2 names name Keanu Reeves1
  • R中一张图中的多个条形图

    我是 R 初学者 我需要创建一个像这样的图表 https i stack imgur com az56z jpg https i stack imgur com az56z jpg 我不知道如何生成整个数据集 基本思想是某个外显子 ID 会
  • 如何从该 Voronoi 图数据中获取单元格字典?

    使用找到的voronoi delaunay图生成库在这个节目中 http sourceforge net projects mapmanager 这是基于 财富 最初的实施他的算法 http en wikipedia org wiki Fo
  • 如何删除非空约束?

    假设创建了一个表 如下所示 create table testTable colA int not null 您将如何删除非空约束 我正在寻找类似的东西 ALTER TABLE testTable ALTER COLUMN colA DRO
  • 如何在Matlab中绘制网络?

    我有一个矩阵AMatlab中的维数mx2每行包含两个节点的标签 显示网络中的直接链接 例如 如果网络有4矩阵的节点A可能A 1 2 1 3 2 1 2 4 3 2 4 1 4 2 其中第一行表示有一个链接来自1 to 2 第二行表示有一个链
  • 原则 2 OneToMany 级联 SET NULL

    错误 无法删除或更新父行 外键约束失败 课程 class Teacher ORM OneToMany targetEntity publication mappedBy teacher protected publications clas
  • 找到一条穿过任意节点序列的最短路径?

    In 这个先前的问题 https stackoverflow com questions 7314333 find shortest path from vertex u to v passing through a vertex wOP询
  • 如何计算 Postgres 上图表中所有连接的节点(行)?

    我的桌子有account id and device id One account id可以有多个device ids 反之亦然 我正在尝试计算每个连接的多对多关系的深度 Ex account id device id 1 10 1 11

随机推荐

  • 【Qt】d_ptr指针、p_ptr指针详解

    此文章可以参考 Pimpl技术的基本应用 PImpl机制以及Qt的D Pointer实现 Qt的d ptr本质上使用了pimp技术 D指针 保持一个库中的所有公有类的大小恒定的问题可以通过单独的私有指针给予解决 这个指针指向一个包含所有数据
  • Terrain Splatting

    Terrain Splatting 标签 网格优化2010 2011 05 16 16 17 1157人阅读 评论 0 收藏 举报 分类 OGRE 541 图形图像 746 游戏引擎 1651 图形引擎 1594 技术理论 1005 引擎开
  • Windows git 命令行通过token进行验证

    背景 从8月13日开始 github不再支持密码方式的身份验证 要求使用基于令牌的身份验证方式 现象 获取 token 后 需要改变原有的账号密码验证 所以需要使用生成的 token 进行更新凭证 但 git 官网针对的 mac 的操作up
  • pid是滞后超前校正_超前校正,滞后校正,超前滞后校正三种校正方法的比较

    展开全部 1 超前校正的目的是改善系统的动态性能 实现62616964757a686964616fe59b9ee7ad9431333431353332在系统静态性能不受损的前提下 提高系统的动态性能 通过加入超前校正环节 利用其相位超前特性
  • VuePress

    sidebar auto VuePress Vue 驱动的静态网站生成器 1 4 目录结构 VuePress 遵循 约定优于配置 的原则 推荐的目录结构如下 docs vuepress 可选的 components 可选的 theme 可选
  • 微信小程序之实名认证人脸识别接口-wx.startFacialRecognitionVerify

    小程序前端使用人脸识别功能 绑定用户 开始实名认证的方法 调用摄像头 facialRecognitionVerify function userName userIdCard wx startFacialRecognitionVerify
  • Visual Studio 2017,C++MFC免注册调用大漠插件图文教程,详细版

    Visual Studio 2017 C MFC免注册调用大漠插件图文教程 详细版 前言 提示 这里可以添加本文要记录的大概内容 有很多人都在问C MFC怎么免注册调用 其实这些都有参考但是对于新手来说 编译器对新手的不友好 很多编程新手就
  • ElementUI按需引入各种组件

    ElementUI按需引入各种组件 一 首先按需引入前奏 安装element ui npm i element ui S 安装按需引入必要插件 npm install babel plugin component D 二 修改 babelr
  • VSCode汉化设置中文

    http efonfighting imwork net 欢迎关注微信公众号 一番码客 获取免费下载服务与源码 并及时接收最新文章推送 在VSCode中按下快捷键 Ctrl Shift P 显示命令面板 Show Command Palet
  • SQL Server辅助插件——SQL Prompt

    前言 当我们对某个程序进行维护或者完善时 必不可少的就是跟数据库或者以前开发人员写的sql语句打交道 当我们 对数据库表的结构不熟悉时 修改或者编写sql语句将是一件很痛苦的时间 而且sql server有没有像vs等软件可以提供 强大的智
  • 如何使用 wget 下载一个目录下的所有文件

    今天想要下载编译原理的 虎书 上的资料 使用wget但只是下载了一个index html 如下 于是我就参考资料 写此博客以记录 方法如下 wget r np nH R index html http url including files
  • npm和cnpm下载安装及VUE的创建

    npm和cnpm下载安装及VUE的创建 1 node js下载 node js官网 http nodejs cn download 下载安装后cmd输入以下命令查看版本 2 配置npm 打开node js的安装目录 我这里是D nodejs
  • 毕设-仓库管理的设计与实现

    package com ken wms common controller import com ken wms common service Interface CustomerManageService import com ken w
  • 用js来实现自定义弹框

    前言 个人作业上传 大家可参考但不可转载 实现将弹框的样式统一封装在一个对象中方便后续的修改
  • 开关电源环路稳定性分析(05)-传递函数

    大家好 这里是大话硬件 经过前面4篇文章的梳理 估计很多人已经等不及了 什么时候可以开始环路的分析 为了尽快进入到大家关心的部分 这一讲我们正式进入环路分析的第一部分 传递函数 传递函数 简单的理解就是输入和输出之间的关系 为了方便我们仅仅
  • 【linux】linux 基础正则表达式、字符串截取、比较、分支、while循环

    1 概述 正则表达式用来在文件中匹配符合条件的字符串 正则是包含匹配 grep awk sed等命令可以支持正则表达式 通配符用来匹配符合条件的文件名 通配符是完全匹配 ls find cp这些命令不支持正则表达式 所以只能使用shell自
  • IDEA中设置vue vue3+ts项目的@跳转

    网上基本都是这个方法但是试了对我不适用 idea vue项目通过 跳转 vue设置完 映射路径之后在IDEA中无法跳转 兜兜转转原来只需 在tsconfig json中加入如下配置就行 compilerOptions baseUrl pat
  • leetcode 5749. 邻位交换的最小次数

    邻位交换的最小次数 给你一个表示大整数的字符串 num 和一个整数 k 如果某个整数是 num 中各位数字的一个 排列 且它的 值大于 num 则称这个整数为 妙数 可能存在很多妙数 但是只需要关注 值最小 的那些 例如 num 54893
  • 使用stylecop 规范C#编码

    可直接在VS操作完成 简单易懂 第一步 打开VS 第二步 安装软件 第三步 规则修改 第四步 规则生效 stylecop 是代码静态检查分析的一大利器 可以自定义检查规则 安装操作使用方便 相信很多写C 的朋友都会使用的到 下面详细介绍安装
  • XP下采用DirectShow采集摄像头

    转载请标明是引用于 http blog csdn net chenyujing1234 欢迎大家提出意见 一起讨论 需要示例源码的请独自联系我 前提 摄像头能正常工作 摄像头有创建directshow filter 即 大家可以对比我的另一