Upan

原因:

  这是因为将文件夹加上了系统属性后,隐藏属性默认锁定了。

  解决方案:

  确保病毒已经杀掉后,可以用下面的方法来恢复文件夹属性

  方法一:手动使用attrib命令修改

  1、开始菜单--选择“运行”--输入 “cmd”

  2、在dos状态下输入命令:attrib c:\"windows" -s -h (以c盘下windows文件夹为例,这里的c:\"windows"改为你要修改文件夹的路径即可)

  3、运行此命令即可把文件夹的隐藏属性去掉。

  但是我们可能会发现,所有的文件夹都被隐藏了,这样一个一个的改,麻烦就大了。

  上面的方式适合修改单个文件夹,批量的简单修改方法即使用通配符*匹配文件夹,格式如下:

  1、假设c盘下的所有根文件夹都被隐藏了

  attrib c:\"*" -s -h /s /d

  即可把c盘下所以的文件夹隐藏属性去掉

  2、假设d盘假设c盘下的所有根文件夹都被隐藏了

  attrib d:\"*" -s -h /s /d

  其他的以此类推


new 发布于 2025-5-8 22:43

记住这个正则,非常好用 各种技巧

replaceAll("(.{4})(?!$)", "$1-");

标签: java 字符串

new 发布于 2025-3-13 03:22

Android Studio is not supported JCEF 安卓应用开发

All the products on all the supported platforms already have 64-bit JetBrains Runtime 21 bundled and it will be used by default to run the IDE. If you need to change the runtime to a different version, see below. Please note that all the current IDE versions require at least Java 17 version to run. Our IDEs will not run on the older Java versions like Java 8 or 11.

All platforms: download and install JetBrains Runtime via Choose Boot Java Runtime for the IDE action
Start the IDE, use Help | Find Action (Ctrl+Shift+A or Cmd+Shift+A on Mac), type "Choose Boot Java Runtime for the IDE", press Enter.
Select the version to install, the higher the number after b, the more recent is the version. It makes sense to install the most recent version or the version you were asked to try by JetBrains staff. Installing old runtime versions may render your IDE unusable or introduce new issues.
Click the OK button and wait until the file with JetBrains Runtime is downloaded and configured.
Restart the IDE to try the new runtime.
Verify via About dialog that the new runtime is used. Notice the vendor (should be JetBrains s.r.o) and the release number (should correspond to the number after b in the file you've downloaded).
If the JDK version in the About dialog doesn't match or didn't change, see below. Most likely, you have an environment variable configured which has the priority over the .jdk file. Remove any environment variables affecting IDE runtime selection and restart.
All platforms: Add Custom Runtime
Follow the steps from the section above to open the Choose Boot Java Runtime for the IDE dialog.
Use the Add Custom Runtime option
Select one of the already installed JDK 21 options or click Add JDK
To add a new JDK specify the home folder of the Java 21 installation on your disk
This option is useful to check if the issue you might have is specific to JetBrains Runtime or is common to this Java version from all the vendors. It helps to isolate and fix issues with JetBrains Runtime or workaround problems as you can continue working until the issue is resolved.


new 发布于 2025-2-26 03:11

Android 各版本对应的SDK版本号 安卓应用开发

Android 各版本对应的SDK版本号
Android版本号 SDK版本号 版本号名称
9 28 Build.VERSION_CODES.P
8.1 27 Build.VERSION_CODES.O_MR1
8.0 26 Build.VERSION_CODES.O
7.1 25 Build.VERSION_CODES.N_MR1
7.0 24 Build.VERSION_CODES.N
6.0 23 Build.VERSION_CODES.M
5.1 22 Build.VERSION_CODES.LOLLIPOP_MR1
5.0 21 Build.VERSION_CODES.LOLLIPOP
4.4 19 Build.VERSION_CODES.KITKAT
4.3 18 Build.VERSION_CODES.JELLY_BEAN_MR2
4.2.x 17 Build.VERSION_CODES.JELLY_BEAN_MR1
4.1.x 16 Build.VERSION_CODES.JELLY_BEAN
4.0.3 -
4.0.4 15 Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1
2.3.3 -
2.3.7 10 Build.VERSION_CODES.GINGERBREAD_MR1


new 发布于 2024-8-21 02:17

PowerShell无法运行node解决方案 各种技巧

允许运行签名脚本
首次在计算机上启动 Windows PowerShell 时,现用执行策略很可能是 Restricted(默认设置)。

Restricted 策略不允许任何脚本运行。

若要了解计算机上的现用执行策略,请键入
get-executionpolicy
若要在本地计算机上运行您编写的未签名脚本和来自其他用户的签名脚本,请使用以下命令将计算机上的
执行策略更改为 RemoteSigned:
set-executionpolicy remotesigned


new 发布于 2024-8-14 01:45

Android 权限 安卓应用开发

Android 权限

标签: 权限

new 发布于 2024-4-23 04:17

新版本Android Studio中logcat无设备问题 安卓应用开发

升级sdk platform-tools以升级adb版本

标签: adb logcat

new 发布于 2024-2-2 06:01

route Linux

增加一个默认路由(网卡需要开启网关配置)

route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.8.2

route add default gw 192.168.8.2

route add -host 192.168.1.12 gw 192.168.8.2 添加主机不需要添加掩码

查看路由表条目

route -n

删除静态路由条目

route del -net 192.168.3.0/24

方法二:

ip route add 192.168.15.0/24 via 192.168.80.2 [dev ens33]

12------永久添加路由(重启network服务生效)

方法一:

vi /etc/sysconfig/static-routes

any net 192.168.3.0/24 gw 192.168.80.2 dev ens33

any net 10.0.0.0 netmask 255.0.0.0 gw 192.168.80.2

any host 192.168.100.100 gw 192.168.80.2

标签: route

new 发布于 2023-9-26 05:55

What is Chrome(Electron) default cache size limit? 其他

According to Chromium source, it uses kDefaultCacheSize = 80 * 1024 * 1024 Bytes --> 80MiB and applies the first matching rule of the following to determine the actual (disk, HTTP) cache size

默认缓存空间大小KD=80MB,匹配下列第一条符合的规则

  • 80% of the available space if there is not enough space to use kDefaultCacheSize
  • 如果可用磁盘空间(A) < KD  则缓存空间为A*80%
  • kDefaultCacheSize if it uses 10% to 80% of the available space
  • 如果使用了可用空间的10%到80%,则缓存空间大小为KD
  • 10% of the available space if the target size (2.5 * kDefaultCacheSize) is more than 10%
  • 如果KD*2.5 > A*10%,则缓存空间大小为A*10%
  • the target size (2.5 * kDefaultCacheSize) if it uses 10% to 1% of the available space
  • 如果使用了可用空间的10%到1%,则缓存空间大小为2.5*KD
  • 1% of the available space
  • 可用空间的1%

So that should be 1% of the available disk space at startup in the common case, with a moderately filled HDD.


Chromium使用LRU(Least RecentUsed)最近最少使用算法来回收表项。因为磁盘存储的空间是优先的,不能无限的增长下去,所以对于很少使用到的表项,回收这一部分磁盘空间。

const MAX_CACHE_SIZE = 31457280 * 8

app.commandLine.appendSwitch('disk-cache-size', MAX_CACHE_SIZE)

    mainWindow.webContents.session.clearCache()

    console.log('size------')
    mainWindow.webContents.session.getCacheSize().then(res => {
        console.log(res)
        console.log(res / 1024 + ' K')
        if (res > MAX_CACHE_SIZE * 0.8) {
            console.log('---------clearCache-------')
            mainWindow.webContents.session.clearCache()
            mainWindow.webContents.session.clearStorageData()
        }

    })
    console.log('-----storagePath:' + mainWindow.webContents.session.storagePath)


标签: electron

new 发布于 2023-2-23 07:21

RemoteServiceException: Bad notification for startForeground: 安卓应用开发

检查manifest里application标签的android:icon="@mipmap/ic_launcher",设置一个icon


new 发布于 2022-11-4 00:44