[C++]监控特定文件夹的事件:三种解决方法汇总

news/2024/5/19 4:09:45

监控特定文件夹的事件:三种解决方法汇总

 

LDBIVR程序中要监视特定文件夹的文件落地或者删除事件,本来要用SHELL中的事件通知机制,后来因为要考虑到各种意外事件,如服务意外退出、服务器崩溃等,遂作罢。

对于目录事件异步通知,大致有三个方法:

调用Windowsapi函数ReadDirectoryChanges监视指定目录中文件(推荐使用),这个使用异步IO

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/readdirectorychangesw.asp

The ReadDirectoryChangesW function retrieves information that describes the changes within a directory.

To track changes on a volume, see change journals.

BOOL ReadDirectoryChangesW(

  HANDLE hDirectory,

  LPVOID lpBuffer,

  DWORD nBufferLength,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter,

  LPDWORD lpBytesReturned,

  LPOVERLAPPED lpOverlapped,

  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine

);

 

 

或者用SHChangeNotifyRegisterSHChangeNotifyDeregister来注册事件SHChangeNotify

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp

 

SHChangeNotify Function


Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.

Syntax

void SHChangeNotify(      
    LONG wEventId,

    UINT uFlags,

    LPCVOID dwItem1,

    LPCVOID dwItem2

);

这个SHELL事件,有人这么介绍(http://qk.5nx.com/article_view.asp?id=11)。

 

或者调用API函数-FindFirstChangeNotification FindCloseChangeNotificationFindNextChangeNotification WaitForSingleObject

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp

FindFirstChangeNotification

The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. However, the function does not indicate the change that satisfied the wait condition.

To retrieve information about the specific change as part of the notification, use the ReadDirectoryChangesW function.

HANDLE FindFirstChangeNotification(

  LPCTSTR lpPathName,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter

);


著名的FileMon工具用的是虚拟驱动。 

 

相关资源:

1:《监视程序的编制》;

2:《Win32中的目录监控》;

3:《change journals》;

4:《CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up》;

5:《监测目录活动》;

6:《请问如何监视系统对文件的访问?》。

Disclaimers

Programmer’s Blog List

博客堂

 

博客园

 

Don Box's Blog

Eric.Weblog()

 

Blogs@asp.net

 

本文档仅供参考。本文档所包含的信息代表了在发布之日,zhengyun_ustc对所讨论问题的当前看法,zhengyun_ustc不保证所给信息在发布之日以后的准确性。

用户应清楚本文档的准确性及其使用可能带来的全部风险。可以复制和传播本文档,但须遵守以下条款:

  1. 复制时不得修改原文,复制内容须包含所有页
  2. 所有副本均须含有 zhengyun_ustc的版权声明以及所提供的其它声明
  3. 不得以赢利为目的对本文档进行传播

 




监控特定文件夹的事件:三种解决方法汇总

 

LDBIVR程序中要监视特定文件夹的文件落地或者删除事件,本来要用SHELL中的事件通知机制,后来因为要考虑到各种意外事件,如服务意外退出、服务器崩溃等,遂作罢。

对于目录事件异步通知,大致有三个方法:

调用Windowsapi函数ReadDirectoryChanges监视指定目录中文件(推荐使用),这个使用异步IO

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/readdirectorychangesw.asp

The ReadDirectoryChangesW function retrieves information that describes the changes within a directory.

To track changes on a volume, see change journals.

BOOL ReadDirectoryChangesW(

  HANDLE hDirectory,

  LPVOID lpBuffer,

  DWORD nBufferLength,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter,

  LPDWORD lpBytesReturned,

  LPOVERLAPPED lpOverlapped,

  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine

);

 

 

或者用SHChangeNotifyRegisterSHChangeNotifyDeregister来注册事件SHChangeNotify

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp

 

SHChangeNotify Function


Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.

Syntax

void SHChangeNotify(      
    LONG wEventId,

    UINT uFlags,

    LPCVOID dwItem1,

    LPCVOID dwItem2

);

这个SHELL事件,有人这么介绍(http://qk.5nx.com/article_view.asp?id=11)。

 

或者调用API函数-FindFirstChangeNotification FindCloseChangeNotificationFindNextChangeNotification WaitForSingleObject

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp

FindFirstChangeNotification

The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. However, the function does not indicate the change that satisfied the wait condition.

To retrieve information about the specific change as part of the notification, use the ReadDirectoryChangesW function.

HANDLE FindFirstChangeNotification(

  LPCTSTR lpPathName,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter

);


著名的FileMon工具用的是虚拟驱动。 

 

相关资源:

1:《监视程序的编制》;

2:《Win32中的目录监控》;

3:《change journals》;

4:《CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up》;

5:《监测目录活动》;

6:《请问如何监视系统对文件的访问?》。

Disclaimers

Programmer’s Blog List

博客堂

 

博客园

 

Don Box's Blog

Eric.Weblog()

 

Blogs@asp.net

 

本文档仅供参考。本文档所包含的信息代表了在发布之日,zhengyun_ustc对所讨论问题的当前看法,zhengyun_ustc不保证所给信息在发布之日以后的准确性。

用户应清楚本文档的准确性及其使用可能带来的全部风险。可以复制和传播本文档,但须遵守以下条款:

  1. 复制时不得修改原文,复制内容须包含所有页
  2. 所有副本均须含有 zhengyun_ustc的版权声明以及所提供的其它声明
  3. 不得以赢利为目的对本文档进行传播

 




监控特定文件夹的事件:三种解决方法汇总

 

LDBIVR程序中要监视特定文件夹的文件落地或者删除事件,本来要用SHELL中的事件通知机制,后来因为要考虑到各种意外事件,如服务意外退出、服务器崩溃等,遂作罢。

对于目录事件异步通知,大致有三个方法:

调用Windowsapi函数ReadDirectoryChanges监视指定目录中文件(推荐使用),这个使用异步IO

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/readdirectorychangesw.asp

The ReadDirectoryChangesW function retrieves information that describes the changes within a directory.

To track changes on a volume, see change journals.

BOOL ReadDirectoryChangesW(

  HANDLE hDirectory,

  LPVOID lpBuffer,

  DWORD nBufferLength,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter,

  LPDWORD lpBytesReturned,

  LPOVERLAPPED lpOverlapped,

  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine

);

 

 

或者用SHChangeNotifyRegisterSHChangeNotifyDeregister来注册事件SHChangeNotify

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp

 

SHChangeNotify Function


Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.

Syntax

void SHChangeNotify(      
    LONG wEventId,

    UINT uFlags,

    LPCVOID dwItem1,

    LPCVOID dwItem2

);

这个SHELL事件,有人这么介绍(http://qk.5nx.com/article_view.asp?id=11)。

 

或者调用API函数-FindFirstChangeNotification FindCloseChangeNotificationFindNextChangeNotification WaitForSingleObject

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp

FindFirstChangeNotification

The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. However, the function does not indicate the change that satisfied the wait condition.

To retrieve information about the specific change as part of the notification, use the ReadDirectoryChangesW function.

HANDLE FindFirstChangeNotification(

  LPCTSTR lpPathName,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter

);


著名的FileMon工具用的是虚拟驱动。 

 

相关资源:

1:《监视程序的编制》;

2:《Win32中的目录监控》;

3:《change journals》;

4:《CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up》;

5:《监测目录活动》;

6:《请问如何监视系统对文件的访问?》。

Disclaimers

Programmer’s Blog List

博客堂

 

博客园

 

Don Box's Blog

Eric.Weblog()

 

Blogs@asp.net

 

本文档仅供参考。本文档所包含的信息代表了在发布之日,zhengyun_ustc对所讨论问题的当前看法,zhengyun_ustc不保证所给信息在发布之日以后的准确性。

用户应清楚本文档的准确性及其使用可能带来的全部风险。可以复制和传播本文档,但须遵守以下条款:

  1. 复制时不得修改原文,复制内容须包含所有页
  2. 所有副本均须含有 zhengyun_ustc的版权声明以及所提供的其它声明
  3. 不得以赢利为目的对本文档进行传播

 




监控特定文件夹的事件:三种解决方法汇总

 

LDBIVR程序中要监视特定文件夹的文件落地或者删除事件,本来要用SHELL中的事件通知机制,后来因为要考虑到各种意外事件,如服务意外退出、服务器崩溃等,遂作罢。

对于目录事件异步通知,大致有三个方法:

调用Windowsapi函数ReadDirectoryChanges监视指定目录中文件(推荐使用),这个使用异步IO

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/readdirectorychangesw.asp

The ReadDirectoryChangesW function retrieves information that describes the changes within a directory.

To track changes on a volume, see change journals.

BOOL ReadDirectoryChangesW(

  HANDLE hDirectory,

  LPVOID lpBuffer,

  DWORD nBufferLength,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter,

  LPDWORD lpBytesReturned,

  LPOVERLAPPED lpOverlapped,

  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine

);

 

 

或者用SHChangeNotifyRegisterSHChangeNotifyDeregister来注册事件SHChangeNotify

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp

 

SHChangeNotify Function


Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.

Syntax

void SHChangeNotify(      
    LONG wEventId,

    UINT uFlags,

    LPCVOID dwItem1,

    LPCVOID dwItem2

);

这个SHELL事件,有人这么介绍(http://qk.5nx.com/article_view.asp?id=11)。

 

或者调用API函数-FindFirstChangeNotification FindCloseChangeNotificationFindNextChangeNotification WaitForSingleObject

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp

FindFirstChangeNotification

The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. However, the function does not indicate the change that satisfied the wait condition.

To retrieve information about the specific change as part of the notification, use the ReadDirectoryChangesW function.

HANDLE FindFirstChangeNotification(

  LPCTSTR lpPathName,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter

);


著名的FileMon工具用的是虚拟驱动。 

 

相关资源:

1:《监视程序的编制》;

2:《Win32中的目录监控》;

3:《change journals》;

4:《CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up》;

5:《监测目录活动》;

6:《请问如何监视系统对文件的访问?》。

Disclaimers

Programmer’s Blog List

博客堂

 

博客园

 

Don Box's Blog

Eric.Weblog()

 

Blogs@asp.net

 

本文档仅供参考。本文档所包含的信息代表了在发布之日,zhengyun_ustc对所讨论问题的当前看法,zhengyun_ustc不保证所给信息在发布之日以后的准确性。

用户应清楚本文档的准确性及其使用可能带来的全部风险。可以复制和传播本文档,但须遵守以下条款:

  1. 复制时不得修改原文,复制内容须包含所有页
  2. 所有副本均须含有 zhengyun_ustc的版权声明以及所提供的其它声明
  3. 不得以赢利为目的对本文档进行传播

 




监控特定文件夹的事件:三种解决方法汇总

 

LDBIVR程序中要监视特定文件夹的文件落地或者删除事件,本来要用SHELL中的事件通知机制,后来因为要考虑到各种意外事件,如服务意外退出、服务器崩溃等,遂作罢。

对于目录事件异步通知,大致有三个方法:

调用Windowsapi函数ReadDirectoryChanges监视指定目录中文件(推荐使用),这个使用异步IO

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/readdirectorychangesw.asp

The ReadDirectoryChangesW function retrieves information that describes the changes within a directory.

To track changes on a volume, see change journals.

BOOL ReadDirectoryChangesW(

  HANDLE hDirectory,

  LPVOID lpBuffer,

  DWORD nBufferLength,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter,

  LPDWORD lpBytesReturned,

  LPOVERLAPPED lpOverlapped,

  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine

);

 

 

或者用SHChangeNotifyRegisterSHChangeNotifyDeregister来注册事件SHChangeNotify

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp

 

SHChangeNotify Function


Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.

Syntax

void SHChangeNotify(      
    LONG wEventId,

    UINT uFlags,

    LPCVOID dwItem1,

    LPCVOID dwItem2

);

这个SHELL事件,有人这么介绍(http://qk.5nx.com/article_view.asp?id=11)。

 

或者调用API函数-FindFirstChangeNotification FindCloseChangeNotificationFindNextChangeNotification WaitForSingleObject

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp

FindFirstChangeNotification

The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. However, the function does not indicate the change that satisfied the wait condition.

To retrieve information about the specific change as part of the notification, use the ReadDirectoryChangesW function.

HANDLE FindFirstChangeNotification(

  LPCTSTR lpPathName,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter

);


著名的FileMon工具用的是虚拟驱动。 

 

相关资源:

1:《监视程序的编制》;

2:《Win32中的目录监控》;

3:《change journals》;

4:《CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up》;

5:《监测目录活动》;

6:《请问如何监视系统对文件的访问?》。

Disclaimers

Programmer’s Blog List

博客堂

 

博客园

 

Don Box's Blog

Eric.Weblog()

 

Blogs@asp.net

 

本文档仅供参考。本文档所包含的信息代表了在发布之日,zhengyun_ustc对所讨论问题的当前看法,zhengyun_ustc不保证所给信息在发布之日以后的准确性。

用户应清楚本文档的准确性及其使用可能带来的全部风险。可以复制和传播本文档,但须遵守以下条款:

  1. 复制时不得修改原文,复制内容须包含所有页
  2. 所有副本均须含有 zhengyun_ustc的版权声明以及所提供的其它声明
  3. 不得以赢利为目的对本文档进行传播

 




监控特定文件夹的事件:三种解决方法汇总

 

LDBIVR程序中要监视特定文件夹的文件落地或者删除事件,本来要用SHELL中的事件通知机制,后来因为要考虑到各种意外事件,如服务意外退出、服务器崩溃等,遂作罢。

对于目录事件异步通知,大致有三个方法:

调用Windowsapi函数ReadDirectoryChanges监视指定目录中文件(推荐使用),这个使用异步IO

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/readdirectorychangesw.asp

The ReadDirectoryChangesW function retrieves information that describes the changes within a directory.

To track changes on a volume, see change journals.

BOOL ReadDirectoryChangesW(

  HANDLE hDirectory,

  LPVOID lpBuffer,

  DWORD nBufferLength,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter,

  LPDWORD lpBytesReturned,

  LPOVERLAPPED lpOverlapped,

  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine

);

 

 

或者用SHChangeNotifyRegisterSHChangeNotifyDeregister来注册事件SHChangeNotify

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp

 

SHChangeNotify Function


Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.

Syntax

void SHChangeNotify(      
    LONG wEventId,

    UINT uFlags,

    LPCVOID dwItem1,

    LPCVOID dwItem2

);

这个SHELL事件,有人这么介绍(http://qk.5nx.com/article_view.asp?id=11)。

 

或者调用API函数-FindFirstChangeNotification FindCloseChangeNotificationFindNextChangeNotification WaitForSingleObject

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp

FindFirstChangeNotification

The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. However, the function does not indicate the change that satisfied the wait condition.

To retrieve information about the specific change as part of the notification, use the ReadDirectoryChangesW function.

HANDLE FindFirstChangeNotification(

  LPCTSTR lpPathName,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter

);


著名的FileMon工具用的是虚拟驱动。 

 

相关资源:

1:《监视程序的编制》;

2:《Win32中的目录监控》;

3:《change journals》;

4:《CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up》;

5:《监测目录活动》;

6:《请问如何监视系统对文件的访问?》。

Disclaimers

Programmer’s Blog List

博客堂

 

博客园

 

Don Box's Blog

Eric.Weblog()

 

Blogs@asp.net

 

本文档仅供参考。本文档所包含的信息代表了在发布之日,zhengyun_ustc对所讨论问题的当前看法,zhengyun_ustc不保证所给信息在发布之日以后的准确性。

用户应清楚本文档的准确性及其使用可能带来的全部风险。可以复制和传播本文档,但须遵守以下条款:

  1. 复制时不得修改原文,复制内容须包含所有页
  2. 所有副本均须含有 zhengyun_ustc的版权声明以及所提供的其它声明
  3. 不得以赢利为目的对本文档进行传播

 




监控特定文件夹的事件:三种解决方法汇总

 

LDBIVR程序中要监视特定文件夹的文件落地或者删除事件,本来要用SHELL中的事件通知机制,后来因为要考虑到各种意外事件,如服务意外退出、服务器崩溃等,遂作罢。

对于目录事件异步通知,大致有三个方法:

调用Windowsapi函数ReadDirectoryChanges监视指定目录中文件(推荐使用),这个使用异步IO

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/readdirectorychangesw.asp

The ReadDirectoryChangesW function retrieves information that describes the changes within a directory.

To track changes on a volume, see change journals.

BOOL ReadDirectoryChangesW(

  HANDLE hDirectory,

  LPVOID lpBuffer,

  DWORD nBufferLength,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter,

  LPDWORD lpBytesReturned,

  LPOVERLAPPED lpOverlapped,

  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine

);

 

 

或者用SHChangeNotifyRegisterSHChangeNotifyDeregister来注册事件SHChangeNotify

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp

 

SHChangeNotify Function


Notifies the system of an event that an application has performed. An application should use this function if it performs an action that may affect the Shell.

Syntax

void SHChangeNotify(      
    LONG wEventId,

    UINT uFlags,

    LPCVOID dwItem1,

    LPCVOID dwItem2

);

这个SHELL事件,有人这么介绍(http://qk.5nx.com/article_view.asp?id=11)。

 

或者调用API函数-FindFirstChangeNotification FindCloseChangeNotificationFindNextChangeNotification WaitForSingleObject

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/findfirstchangenotification.asp

FindFirstChangeNotification

The FindFirstChangeNotification function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified directory or subtree. However, the function does not indicate the change that satisfied the wait condition.

To retrieve information about the specific change as part of the notification, use the ReadDirectoryChangesW function.

HANDLE FindFirstChangeNotification(

  LPCTSTR lpPathName,

  BOOL bWatchSubtree,

  DWORD dwNotifyFilter

);


著名的FileMon工具用的是虚拟驱动。 

 

相关资源:

1:《监视程序的编制》;

2:《Win32中的目录监控》;

3:《change journals》;

4:《CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up》;

5:《监测目录活动》;

6:《请问如何监视系统对文件的访问?》。

Disclaimers

Programmer’s Blog List

博客堂

 

博客园

 

Don Box's Blog

Eric.Weblog()

 

Blogs@asp.net

 

本文档仅供参考。本文档所包含的信息代表了在发布之日,zhengyun_ustc对所讨论问题的当前看法,zhengyun_ustc不保证所给信息在发布之日以后的准确性。

用户应清楚本文档的准确性及其使用可能带来的全部风险。可以复制和传播本文档,但须遵守以下条款:

  1. 复制时不得修改原文,复制内容须包含所有页
  2. 所有副本均须含有 zhengyun_ustc的版权声明以及所提供的其它声明
  3. 不得以赢利为目的对本文档进行传播

 





http://www.niftyadmin.cn/n/3649149.html

相关文章

git搭建服务器

一、gitblit 搭建 git 服务器 首先需要下载gitblit 然后运行gitblit.cmd 会有个端口号,我的端口号是9090,输入http://localhost:9090/,会有个默认的账号和密码,两个都是admin 点击创建版本库,输入名字即可 会生成一个服…

Android 中文 API —— AbsListView详述

AbsListView 译者署名&#xff1a; cnmahj 译者链接&#xff1a; http://android.toolib.net/blog/ 版本&#xff1a;Android 2.3 r1 结构 继承关系 public abstract class AbsListView extends AdapterView <T extends Adapter> implements TextWatcher ViewTreeObserve…

如何使用Laravel表单请求实施密码验证

介绍 (Introduction) Laravel form requests are special classes that extend the functionality of regular request classes, enabling advanced validation features. Form requests also help to keep your controller actions a lot cleaner, because you can move all y…

Dagger2的简单使用

解耦和方式 1、利用配置文件&#xff0c;使用反射获取到需要加载的对象。 2、设计模式&#xff1a;单例、工厂、观察者…… Dagger2简介 1、什么是Dagger2&#xff1f; Dagger是为Android和Java平台提供的在编译时进行依赖注入的框架。 编译时&#xff1a;编辑时生成代码&#…

[收藏]“白发”,已经成为IT人的特征之一

2004年中国IT渠道的“七种”颜色作者&#xff1a; 《计算机产品与流通》白发一次采访中&#xff0c;不经意间瞥到了被访者的鬓角&#xff0c;发现这位还不到40岁的总经理&#xff0c;居然已经是两鬓班白。更令人惊奇的是&#xff0c;坐在旁边的副总经理也已白发满头。自此&…

react hooks使用_使用React Hooks将React类组件转换为功能组件的五种方法

react hooks使用The latest alpha release of React introduced a new concept called Hooks. Hooks were introduced to React to solve common problems; however, they primarily serve as an alternative for classes. With Hooks, you can create functional components t…

Genymotion安卓模拟器常见问题汇总

Genymotion模拟器在安装好多由于电脑设备的关系可能出现兼容性、网络连接等问题&#xff0c;这里带来它们的解决方法。 1、关于兼容性的关键 下载完把这个zip文件&#xff08;点我下载&#xff09;直接拖到手机虚拟屏幕上就会提示安装&#xff0c;安装完了就会要求重启手机&…

Ubuntu 12.04下LAMP安装配置(转)

想要安装一台 Ubuntu 12.04版的Linux服务器&#xff0c;用这台服务器上的LAMP套件来运行我自己的个人网站。LAMP套件就是“LinuxApacheMysqlPHP这四款软件组成了一个可以使网站运行的套装工具软件。”通过安装尝试&#xff0c;我获得了一些成功的安装配置经验&#xff0c;通过本…