How to Restore Files Deleted by Windows Defender on Windows 10 and Windows 11?

For Windows 10:
1.Open Windows Security Center
2.Go to Virus & threat protection
3.Navigate to Threat history
4.Check the Detected threats
5.Select Restore

For Windows 11:
1.Open Windows Security Center
2.Go to Virus & threat protection
3.Navigate to Protection history
4.Check the Quarantined threats
5.Select Restore

Important Note
Restoring quarantined files requires administrative privileges on your Windows system.

Windows10和Windows11如何还原被Windows Defender删除的文件?

对于Windows10:

打开Windows安全中心->病毒和威胁防护->威胁历史记录->检查出的威胁->还原

对于Windows11:

打开Windows安全中心->病毒和威胁防护->保护历史记录->已隔离威胁->还原

注意事项

在还原被隔离的文件时,需要你有Windows系统的管理员权限。

Windows11更新后闪屏问题的解决方法

今天我更新Windows11系统并重启后,电脑屏幕出现了闪烁问题。

我检查显卡驱动,无论是Nvidia显卡驱动还是Intel显卡驱动都是最新的。那么问题出在哪里?

我猜测是因为我的操作系统是从Windows10升级而来,之前Windows10下某些Intel显卡驱动的隐藏设置(配置)在Windows11下与新版本的显卡驱动不兼容所致。

因此,我使用Display Driver Uninstaller (DDU)彻底卸载Intel显卡驱动后,再重装最新版本的Intel显卡驱动,就解决了电脑屏幕闪烁问题!

注意,安装最新版本的Intel显卡驱动程序时需要以管理员身份运行安装程序。

最新版Intel显卡驱动官网下载地址:

https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

最新版DDU官网下载地址:

https://www.wagnardsoft.com/display-driver-uninstaller-ddu-

参考

https://bbs.pcbeta.com/viewthread-1944975-1-1.html

How to Fix Screen Flickering Issue After Windows 11 Update

Today, after updating my Windows 11 system and rebooting, I encountered a screen flickering problem.

I checked both my Nvidia and Intel graphics drivers, and they were up to date. So where was the issue?

I suspected that the problem arose because my system had been upgraded from Windows 10 to Windows 11. Some hidden settings or configurations from the older Intel graphics drivers on Windows 10 might have been incompatible with the newer drivers on Windows 11.

To resolve the issue, I used Display Driver Uninstaller (DDU) to completely remove the Intel graphics driver. Afterward, I reinstalled the latest version of the Intel graphics driver, and the screen flickering problem was fixed!

Note: When installing the latest Intel graphics driver, make sure to run the installer as an administrator.

Download the latest Intel graphics driver here: https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

Download the latest DDU here: https://www.wagnardsoft.com/display-driver-uninstaller-ddu-

Reference
https://bbs.pcbeta.com/viewthread-1944975-1-1.html

VirtualBox Linux虚拟机与Windows宿主机的共享文件夹里面无法创建符号链接的解决方法

我的软件环境:

VirtualBox虚拟机:Ubuntu 22

宿主机:Windows 10

在Ubuntu 22虚拟机中创建符号链接时,可能的报错有以下几种:

第一种,在运行npm install esbuild时报错:

Error: EPERM: operation not permitted, symlink '../esbuild/bin/esbuild' -> '/var/www/reverb.test/node_modules/.bin/esbuild'

第二种,执行PHP代码创建符号链接时报错:

symlink(): Operation not permitted

第三种,运行ln命令时报错:

ln: failed to create symbolic link 'xxx.so.0': Read-only file system

第四种,运行cp命令时报错:

cannot create symbolic link `xxxx':Read-only file system

第五种,运行cp命令时报错:

cannot create symbolic link `xxxx': Protocol error

原因是VirtualBox从安全角度出发,限制了软链接(符号链接)的创建。如果想正常使用符号链接,需要对虚拟机设置 VBoxInternal2/SharedFoldersEnableSymlinksCreate/<share_folder_name> 这个 extradata。这里顺带一提,对于 vagrant,这个选项只要你运行 vagrant up之后这个选项便会自动设置好。可以使用 VboxManage设置这个 extradata ,这个工具在 Windows 下是和 VirtualBox 图形界面在一个相同目录的。以下是详细步骤:

1 关闭 VirtualBox。

2 以管理员身份打开命令行窗口,cd到VirtualBox安装目录(例如cd C:\Programs\Oracle\VirtualBox),执行如下命令:

VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1

其中:

YOURVMNAME填写ubuntu 虚拟机系统的名称

YOURSHAREFOLDERNAME填写共享文件夹的名称,注意这个共享文件夹名称是你在 VirtualBox 中设置共享时对应的“共享文件夹名称”一栏的内容,不是共享文件夹的路径或者文件夹名称。

3 以管理员身份运行VirtualBox

参考

https://blog.csdn.net/tekenuo/article/details/82386552

https://tty.moe/blog/virtualbox-symlink-windows

composer安装Laravel 11报错:laravel/framework[v11.9.0, …, v11.23.3] require fruitcake/php-cors ^1.3 -> found fruitcake/php-cors[dev-feat-setOptions, dev-master, dev-maincomposer…

我在使用composer安装Laravel 11的时候,遇到如下错误:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework[v11.9.0, ..., v11.23.3] require fruitcake/php-cors ^1.3 -> found fruitcake/php-cors[dev-feat-setOptions, dev-master, dev-main, dev-test-8.2, v0.1.0, v0.1.1, v0.1.2, v1.0-alpha1, ..., 1.2.x-dev (alias of dev-master)] but it does not match the constraint.
    - Root composer.json requires laravel/framework ^11.9 -> satisfiable by laravel/framework[v11.9.0, ..., v11.23.3].

原因是阿里云composer镜像源中没有fruitcake/php-cors包的最新版。

解决方法是,切换回默认的composer镜像源:

composer config -g --unset repos.packagist

执行composer install就安装成功了,不再报错。

参考

https://github.com/laravel/framework/issues/51201

升级PHP版本导致WordPress无法显示文章,而是显示“有点尴尬诶!该页无法显示。”的解决方法

我的WordPress版本是5.4.15,当我把服务器系统里的PHP 7.2升级到PHP 8.2后,通过浏览器访问WordPress网站,无法显示文章,而是显示“有点尴尬诶!该页无法显示。”这句话。

经测试,PHP可以正常连接到MySQL数据库。

原因应该是WordPress 5.4.15用到的某些PHP函数在PHP 8.2过时了。

升级WordPress到最新版本解决了这个问题。

PHP Warning: Module ‘curl‘ already loaded in Unknown on line 0警告的解决方法

我的软件环境是:Ubuntu 22操作系统,使用apt安装的PHP 8.2。

如果在执行PHP相关命令时,看到一条警告消息:

PHP Warning: Module ‘curl‘ already loaded in Unknown on line 0

那是由于curl模块被重复启用。如果在/etc/php/8.2/fpm/php.ini和/etc/php/8.2/fpm/conf.d/20-curl.ini两处配置文件里都启用了curl扩展,就会报这个警告。

解决方法是在/etc/php/8.2/fpm/conf.d/20-curl.ini配置文件中启用curl扩展即可,而在其他配置文件中都不启用curl扩展。

/etc/php/8.2/fpm/conf.d/里的配置文件其实都是/etc/php/8.2/mods-available/里的配置文件的符号链接,这些配置文件中的扩展是被PHP默认启用的。

修改了配置文件记得重启php-fpm服务。最后只要在php -m命令的输出中或者通过浏览器访问phpinfo函数的PHP脚本的输出中看到curl了,就说明已启用curl扩展。

多个Elasticsearch节点无法组成集群,报错master_not_discovered_exception或NotMasterException的原因和解决方法

多个Elasticsearch节点无法自动组成集群,查看日志发现错误信息:“master_not_discovered_exception”。

原因是运维人员通过克隆虚拟机来获得多台Elasticsearch服务器,这样每个Elasticsearch节点都具有相同的节点ID,因此在组成集群时,无法选举出master节点。

这可以通过以下命令进行验证,列出所有节点ID:

GET /_cat/nodes?v&h=id,ip,name&full_id=true

请注意,由于Elasticsearch集群尚未形成,因此需要单独查询每个节点,即: 

curl 192.168.110.111:9200/_cat/nodes?v&h=id,ip,name&full_id=true
curl 192.168.110.112:9200/_cat/nodes?v&h=id,ip,name&full_id=true
......

Elasticsearch节点ID必须是唯一的。要解决这个问题,我们需要删除每个节点上的索引(RPM方式安装的Elasticsearch的索引数据默认位于/var/lib/elasticsearch)。重启Elasticsearch就会重置节点ID。 

参考

https://www.656463.com/wenda/jdbhjrjqNotMasterExceptionqgddxc_359