
Breakdown:

When using Windows Subsystem for Linux 2, we access our Linux file system using Windows Explorer. When we copying and pasting files, might notice addition files like ‘xxx Zone.Identifier
‘.
The ‘Zone.Identifier
‘ file is a Windows Attachment Manager feature that stores security information about files. However, since WSL2 uses an ext4 file system, Windows cannot store ADS natively. Instead, it creates a visible ‘Zone.Identifier
‘ file in the same directory.
If you already have ‘Zone.Identifier
‘ files in your WSL2 directories, use one of the following methods to remove them.
find ~/[Your Path] -name "*:Zone.Identifier" -delete
BashZone.Identifier
’If you frequently access WSL2 files from Windows and want to permanently stop Windows from attaching ‘Zone.Identifier
’, you can disable this feature via Group Policy or Registry Editor.
Press Win + R, type gpedit.msc
, and hit Enter.
Configuration → Administrative Templates → Windows Components → Attachment Manager
用户配置 → 管理模板 → Windows 组件 → 附件管理器(In Chinese)
Enable “Do not preserve zone information in file attachments”
Given an integer $n$ , return the number of trailing zeros in $n!$ (n factorial).
Factorial is defined as:
$$
n! = n \times (n – 1) \times (n – 2) \times \dots \times 3 \times 2 \times 1
$$
Example 1:
Input: n = 3
Output: 0
Explanation: 3! = 6
, which has no trailing zeros.
Example 2:
Input: n = 5
Output: 1
Explanation: 5! = 120
, which has one trailing zero.
Example 3:
Input: n = 0
Output: 0
class Solution {
public:
int trailingZeroes(int n) {
int count;
while(n >= 5){
n = n / 5;
count += n;
}
return count;
}
};
/*
## Counting 5 as a factor.
We Need To Determine how many times "10" appears as a factor in the product.
10 is formed by multiplying 2 & 5, we can only count 5 as a factor.
eg:
- 3! = 3*2*1 = 6 -> +0
- 5! = 5*4*3*2*1 = 120 -> +1
- 10! = 10*9*...*3*2*1 = 3628800 -> +2
*/
C++Typst就是个半成品。。
To enable copy-paste between a VMware virtual machine and the host system, follow these steps:
Install the necessary tools:
sudo apt install open-vm-tools
sudo apt install open-vm-tools-desktop
BashGo to: VMware > Virtual Machine > Settings > Options > Guest Isolation
Enable the Copy and Paste feature.
Then, Restart your system.
sudo reboot
Bashlink to: https://github.com/microsoft/WSL/releases/tag/2.0.0
Windows 11 24H2
1. Open or create the wsl configuration file (located at %USERPROFILE%\.wslconfig
), and enter the following content:
[experimental]
autoMemoryReclaim=gradual | dropcache | disabled
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
Bash2. Open the command prompt and execute wsl --shutdown
link same issue: https://github.com/mmp/pbrt-v4/issues/467
My Env:
- Win11 24H2
- AMD Ryzen 9 5900X 12-Core Processor
- Microsoft Visual Studio Community 2022 17.12.3
- VisualStudio.17.Release/17.12.3+35527.113
- Microsoft .NET Framework 4.8.09032
- Visual C++ 2022 00482-90000-00000-AA244
- Microsoft Visual C++ 2022
Log:
1> [CMake] CMake Error: install(EXPORT “Ptex” …) includes target “Ptex_static” which requires target “zlibstatic” that is not in any export set.
1> [CMake] — Generating done (0.2s)
1> [CMake] CMake Generate step failed. Build files cannot be regenerated correctly.
Place the following file to pbrt4 dir and double click to compile.
Then cd ./build/pbrt4deploy
-> ./pbrt
Log:
PS G:\pbrt\pbrt-v4\pbrt-v4\build\pbrt4deploy\bin> ./pbrt
pbrt version 4 (built Jan 6 2025 at 21:39:19)
Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys.
The source code to pbrt (but not the book contents) is covered by the Apache 2.0 License.
See the file LICENSE.txt for the conditions of the license.
Then maybe you will get the following Warnning:
link to: https://www.janwalter.org/rnd/blog/rnd-pbrt-v4-002/
Log:
Found CUDA but PBRT_OPTIX7_PATH is not set. Disabling GPU compilation
Make sure that the SDK Path is correct. (-DPBRT_OPTIX7_PATH)