Martin Hung's Gravatar avatar

Martin‘s Physics Club

Physics, programming, and exploration

Why Is It So Hard to Skip Microsoft Account Sign-In During Windows Setup?

I recently reset an old laptop running Windows 10 22H2. During setup, Windows kept insisting that I sign in with a Microsoft account before I could continue. Cortana also made an unwelcome appearance. All I wanted was a local account, because I was preparing the laptop for sale. I tried several workarounds, including nothankyou, without success. What eventually worked was creating a local user from the command prompt and restarting the computer. ...

2026-10-11 · 3 min · 576 words

Moving from pfSense to OPNsense: First Impressions

For years, pfSense CE 2.7.x was the main router for my private network. Recently, it became less reliable for me. An upgrade to 2.8 failed, so I decided to try a fresh installation from a CE image. Getting that image proved harder than I expected: I struggled to find a download path on the pfSense site and eventually used a browser script to get through the checkout flow(Becauser Idk why the drop down didn’t show up). The netgate-installer-v1.2-RELEASE-amd64.iso image I downloaded then required a network connection during installation, and each attempt failed in my environment. ...

2026-10-02 · 2 min · 393 words

I Built a Simple Optical Simulation Tool

LightDraw began with a simple goal: make optics easier to teach, explore, and understand. I built this lightweight 2D simulator around real classroom needs, then extended it to visualize electrostatic and magnetostatic fields alongside optics. Built with .NET, Avalonia, and SkiaSharp, LightDraw makes abstract physics easier to see and explore. Try LightDraw Best experience: Download the desktop client from the Microsoft Store. Quick preview: Run LightDraw in your browser. Source code: Explore LightDraw on GitHub. About the online version: It runs in Avalonia’s WebAssembly (WASM) mode, where performance is significantly limited. Please use it for an initial evaluation or when you urgently need access. For regular use and the best experience, choose the desktop client. ...

2026-08-28 · 1 min · 171 words

I choose WPF as my first Windows-based App Framework in 2025

Windows Presentation Foundation (WPF) was born in November 21, 2006. At that time i was a “child” who only know use VB.NET to creat old fashion GUI Application. At that time I prefer find a app than creat one by my-996-self.Not crazy about coding. The Beginning The meaningful time is about 2016.Microsoft released Universal Windows Platform(UWP) Framework,coder can code one sample to publish in Windows 10 destop/Windows 10 mobile/XBoxOne. I was so attracted to learn UWP by Channel 9’s video.I learned how to use XAML to design an interface/space and studied .NET syntax. From compiling a simple calculator to run on my Windows 10 PC and my Lumia phone, to flashing Windows 10 IoT on a Raspberry Pi and running my self-built local network media server—those were wonderful times.Back then, in China, platforms like NetEase Cloud Music were among the first to support the UWP framework, bringing countless surprises to users. Unfortunately, we, the 1%, still lost in market. ...

2025-03-20 · 2 min · 407 words

Why Is It So Hard for Chinese Students to Learn Physics and Coding Effectively

Recently, my former teacher asked his third-year students in a Laser Principles course (who had already studied electromagnetism/electrodynamics) to write Maxwell’s equations on the blackboard from memory. Whoever could do so would earn full marks for their participation grade.But no one could. It’s worth mentioning that this university is an average institution in mainland China, and the students are mid-level undergraduates. The program is in the field of physics education. ...

2024-09-17 · 4 min · 686 words

Troubleshooting Property Update Issues in WPF DataGridCheckBoxColumn Bindings

Why does the CheckBox state change in WPF DataGridCheckBoxColumn not automatically update the bound property? Situation: My code has correctly implemented the binding relationship using the MVVM library, but I am unable to filter data using the checkbox in the DataGrid. //model public class SpectralPeakDataItem { public bool IsUserFor { get; set; } public double Wavelength { get; set; } public int PixelPosition { get; set; } public double InstensityPercentage { get; set; } } //ViewModel [ObservableProperty] private ObservableCollection<SpectralPeakDataItem> _mercuryArgonSpectralPeakDataItems = []; <ui:DataGrid Grid.Column="0" Margin="5" AutoGenerateColumns="False" ItemsSource="{Binding MercuryArgonSpectralPeakDataItems, Mode=TwoWay}"> <DataGrid.Columns> <DataGridCheckBoxColumn Binding="{Binding IsUserFor, Mode=TwoWay}" Header="IsUserFor" /> <DataGridTextColumn Binding="{Binding Wavelength, Mode=TwoWay}" Header="Wavelength" /> <DataGridTextColumn Binding="{Binding PixelPosition, Mode=TwoWay}" Header="PixelPosition" /> <DataGridTextColumn Binding="{Binding InstensityPercentage, Mode=TwoWay}" Header="Percentage" /> </DataGrid.Columns> </ui:DataGrid> However, in the usual event-driven code design, it works fine.So, I think this is an issue with MVVM’s data binding, as it doesn’t seem to achieve data synchronization.So next, I discovered that:In a WPF DataGridCheckBoxColumn, the reason why changes in the CheckBox’s checked state do not automatically trigger property updates is primarily because the DataGridCheckBoxColumn uses a binding context that may not directly reflect changes in the CheckBox state. This often involves the following issues: ...

2024-09-03 · 2 min · 363 words