Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Day: November 19, 2026

Visual Studio

Visual Studio: Fix Quick Actions Hiding Behind a Stale Squiggle

- 19.11.26 - ErcanOPAK comment on Visual Studio: Fix Quick Actions Hiding Behind a Stale Squiggle

πŸ› οΈ Fix Quick Actions Hiding Behind a Stale Squiggle The lightbulb/screwdriver Quick Actions menu (Ctrl+.) is bound to a specific diagnostic snapshot, not to whatever squiggle is currently drawn on screen. When Visual Studio’s background analysis enters its “Suspended” state β€” shown as a small icon in the status bar during a large solution load, […]

Read More
Photoshop

Photoshop: Fix a Smart Filter Resetting After You Relink It

- 19.11.26 - ErcanOPAK comment on Photoshop: Fix a Smart Filter Resetting After You Relink It

πŸ–ŒοΈ Fix a Smart Filter Resetting After You Relink It A Smart Filter’s settings are cached against the pixel dimensions and bit depth the Smart Object had at the moment the filter was applied. Relink a Smart Object to a different β€” or simply updated β€” source file, especially one with different pixel dimensions, and […]

Read More
Ajax

Ajax: Fix a Cancelled Request Still Updating Stale UI State

- 19.11.26 - ErcanOPAK comment on Ajax: Fix a Cancelled Request Still Updating Stale UI State

πŸ”„ Fix a Cancelled Request Still Updating Stale UI State Calling `AbortController.abort()` stops a fetch request and rejects its promise with an `AbortError` β€” but the far more common failure isn’t the aborted request itself, it’s the SECOND, newer request started right after the abort (say, the user typed another character into a live-search box). […]

Read More
C#

C#: Fix a Span Captured by a Lambda Throwing at Runtime

- 19.11.26 - ErcanOPAK comment on C#: Fix a Span Captured by a Lambda Throwing at Runtime

πŸ”§ Fix a Span Captured by a Lambda Throwing at Runtime `Span<T>` is a `ref struct`, which the compiler restricts from being used inside a closure because a `ref struct` can point to stack-allocated or interior memory the garbage collector doesn’t track the way it tracks heap references, while a closure’s captured variables get hoisted […]

Read More
AI

The AI Prompt That Converts a REST Endpoint Into a Typed SDK

- 19.11.26 - ErcanOPAK comment on The AI Prompt That Converts a REST Endpoint Into a Typed SDK

πŸ€– The AI Prompt That Converts a REST Endpoint Into a Typed SDK Hand-writing a typed client for a REST API you call often enough means re-deriving the same request shape, query parameters, and response type every time the API adds a field, and copy-pasted fetch calls drift out of sync with the real contract […]

Read More
Git

Git: Fix a Worktree Locking a Branch Needed Somewhere Else

- 19.11.26 - ErcanOPAK comment on Git: Fix a Worktree Locking a Branch Needed Somewhere Else

πŸ”€ Fix a Worktree Locking a Branch Needed Somewhere Else `git worktree add` checks out a branch into a second working directory while registering that checkout in the main repository’s internal worktree administration, and Git enforces a rule that the SAME branch can’t be checked out in two worktrees at once. If you later try […]

Read More
Asp.Net Core

Asp.Net Core: Fix a Background Service Leaking Scoped Dependencies

- 19.11.26 - ErcanOPAK comment on Asp.Net Core: Fix a Background Service Leaking Scoped Dependencies

βš™οΈ Fix a Background Service Leaking Scoped Dependencies A `BackgroundService` is registered as a SINGLETON by the hosting infrastructure and lives for the app’s entire lifetime, but a dependency registered as `Scoped` β€” most notably a `DbContext` β€” is meant to live for a single unit of work. Injecting a scoped service directly into a […]

Read More
SQL

SQL Server: Fix a Columnstore Index Fragmenting After Bulk Deletes

- 19.11.26 - ErcanOPAK comment on SQL Server: Fix a Columnstore Index Fragmenting After Bulk Deletes

πŸ—„οΈ Fix a Columnstore Index Fragmenting After Bulk Deletes A columnstore index stores data in large, immutable compressed row groups; a `DELETE` against rows in one doesn’t physically remove them from their row group β€” it marks them as logically deleted in an internal bitmap while the physical data stays resident on disk and in […]

Read More
Docker

Docker: Fix a Container Losing Logs After a Restart Policy

- 19.11.26 - ErcanOPAK comment on Docker: Fix a Container Losing Logs After a Restart Policy

🐳 Fix a Container Losing Logs After a Restart Policy Docker’s default json-file log driver writes a container’s stdout/stderr to a file tied to that specific container ID; a container with `restart: always` that crashes and comes back under its OWN restart policy keeps the same ID and the same log file, so history should […]

Read More
Asp.Net Core

Asp.Net Core: Fix Output Caching Serving a Stale Authorized Page

- 19.11.26 - ErcanOPAK comment on Asp.Net Core: Fix Output Caching Serving a Stale Authorized Page

βš™οΈ Fix Output Caching Serving a Stale Authorized Page The Output Caching middleware caches a response keyed, by default, on the request path and query string only β€” it does not automatically vary that key by the authenticated user unless a policy explicitly tells it to. If `[OutputCache]` or a matching cache policy is applied […]

Read More
SQL

SQL Server: Fix a Trigger Firing Twice on One Merge Statement

- 19.11.26 - ErcanOPAK comment on SQL Server: Fix a Trigger Firing Twice on One Merge Statement

πŸ—„οΈ Fix a Trigger Firing Twice on One Merge Statement An `AFTER INSERT, UPDATE` trigger on a table targeted by a `MERGE` statement fires once per statement by default, not once per row β€” but when a `MERGE`’s `WHEN MATCHED` clauses are written with multiple conditions that could each independently match the same source row […]

Read More
HTML

HTML5: Fix a Form’s required Attribute Skipped on Enter

- 19.11.26 - ErcanOPAK comment on HTML5: Fix a Form’s required Attribute Skipped on Enter

🧩 Fix a Form’s required Attribute Skipped on Enter Pressing Enter inside a text input triggers the browser’s implicit form submission, which normally runs the same constraint validation as clicking a submit button β€” but when a form has multiple buttons, or a plain `<button>` with no explicit `type` elsewhere in the markup, browsers resolve […]

Read More
Windows

Windows 11: Fix a Printer Queue Stuck After Waking From Sleep

- 19.11.26 - ErcanOPAK comment on Windows 11: Fix a Printer Queue Stuck After Waking From Sleep

πŸͺŸ Fix a Printer Queue Stuck After Waking From Sleep The Windows Print Spooler service holds a connection to a printer’s port, and if the PC resumes from sleep before the printer itself has finished its own wake cycle, the spooler’s connection attempt to that port times out and the first job in the queue […]

Read More
C#

C#: Fix a Static Constructor Deadlocking on Its Own Type

- 19.11.26 - ErcanOPAK comment on C#: Fix a Static Constructor Deadlocking on Its Own Type

πŸ”§ Fix a Static Constructor Deadlocking on Its Own Type The CLR guarantees a type’s static constructor runs exactly once before the type is first used, enforcing this with an internal per-type lock held for the constructor’s entire duration. If that static constructor’s body β€” directly, or through a method it calls β€” triggers any […]

Read More
C#

C#: Fix a Source Generator Never Firing on an Incremental Build

- 19.11.26 - ErcanOPAK comment on C#: Fix a Source Generator Never Firing on an Incremental Build

πŸ”§ Fix a Source Generator Never Firing on an Incremental Build An incremental source generator builds a pipeline of value providers, and the whole point of the incremental model is that a stage only re-runs when its inputs actually change, judged by equality comparison on the values flowing through it. A pipeline stage that produces […]

Read More
Photoshop

Photoshop: Fix the Gradient Tool Banding Across a Dark Sky

- 19.11.26 - ErcanOPAK comment on Photoshop: Fix the Gradient Tool Banding Across a Dark Sky

πŸ–ŒοΈ Fix the Gradient Tool Banding Across a Dark Sky Visible banding β€” discrete steps instead of a smooth blend β€” across a long, low-contrast gradient like a dark sky happens because Photoshop’s gradient rendering needs to dither its output to fake more tonal steps than an 8-bit-per-channel document actually has, and the Gradient tool’s […]

Read More
CSS

CSS: Fix a Sticky Header Jumping When a Scrollbar Appears

- 19.11.26 - ErcanOPAK comment on CSS: Fix a Sticky Header Jumping When a Scrollbar Appears

🎨 Fix a Sticky Header Jumping When a Scrollbar Appears `position: sticky` keeps an element pinned relative to its nearest scrolling ancestor, but when page content grows tall enough to introduce a vertical scrollbar for the FIRST time, a browser using a classic non-overlay scrollbar reduces the viewport’s available width by the scrollbar’s own width […]

Read More
JavaScript

JavaScript: Fix structuredClone Dropping a Class’s Methods

- 19.11.26 - ErcanOPAK comment on JavaScript: Fix structuredClone Dropping a Class’s Methods

⚑ Fix structuredClone Dropping a Class’s Methods `structuredClone()` implements the HTML structured clone algorithm, which deep-copies DATA β€” plain objects, arrays, Maps, Sets, Dates β€” but does not preserve a custom class’s prototype chain. Cloning an instance of a class with methods produces a plain object with the same own properties but a prototype reset […]

Read More
Windows

Windows 11: Fix a USB-C Dock Dropping Displays After Wake

- 19.11.26 - ErcanOPAK comment on Windows 11: Fix a USB-C Dock Dropping Displays After Wake

πŸͺŸ Fix a USB-C Dock Dropping Displays After Wake Many USB-C docks route video through a DisplayLink or DisplayPort Alt-Mode hub chip that needs to renegotiate its link to each monitor after the host wakes from sleep. Windows 11’s modern-standby resume can bring the USB controller back online before the dock’s own internal hub chip […]

Read More
Git

Git: Fix Rebase Autosquash Reordering Unrelated Commits

- 19.11.26 - ErcanOPAK comment on Git: Fix Rebase Autosquash Reordering Unrelated Commits

πŸ”€ Fix Rebase Autosquash Reordering Unrelated Commits `git rebase -i –autosquash` looks for commits whose message starts with `squash!` or `fixup!` followed by text matching an earlier commit’s subject line, and automatically moves that commit to sit right after the one it targets in the generated todo list. Its matching is a simple text match […]

Read More
Kubernetes

Kubernetes: Fix an Autoscaler Stuck at a Single Replica

- 19.11.26 - ErcanOPAK comment on Kubernetes: Fix an Autoscaler Stuck at a Single Replica

☸️ Fix an Autoscaler Stuck at a Single Replica A HorizontalPodAutoscaler computes its target utilization as a percentage of each pod’s declared CPU or memory `requests` value β€” if the Deployment it targets only sets `limits`, or sets neither, the HPA has no request value to compute a percentage against, and rather than guess, the […]

Read More
Wordpress

WordPress: Fix the Block Editor Pasting Hidden Formatting Marks

- 19.11.26 - ErcanOPAK comment on WordPress: Fix the Block Editor Pasting Hidden Formatting Marks

πŸ“ Fix the Block Editor Pasting Hidden Formatting Marks Pasting text from Word, Google Docs, or a PDF into the Gutenberg block editor brings along more than the visible words: non-breaking spaces, zero-width characters, smart quote glyphs, and Word’s own inline style spans can all ride along inside the clipboard HTML, because the editor’s default […]

Read More
Wordpress

WordPress: Fix Multisite Subdomain Mapping to the Wrong Blog

- 19.11.26 - ErcanOPAK comment on WordPress: Fix Multisite Subdomain Mapping to the Wrong Blog

πŸ“ Fix Multisite Subdomain Mapping to the Wrong Blog A WordPress Multisite network running subdomain installs resolves each incoming request to a blog_id through a lookup that gets cached in the “blog-lookup” object cache group. When a site’s domain mapping changes β€” a new primary domain, an updated DNS record, or a direct database edit […]

Read More
AI

The AI Prompt That Negotiates a Lower Bill With Your Internet Provider

- 19.11.26 - ErcanOPAK comment on The AI Prompt That Negotiates a Lower Bill With Your Internet Provider

πŸ€– The AI Prompt That Negotiates a Lower Bill With Your Internet Provider Retention departments at ISPs, carriers, and subscription services are trained to offer discounts, but almost never to a customer who calls without specifics β€” a vague “can you lower my bill” gets a vague “let me see what I can do” and […]

Read More
AI

The AI Prompt That Writes Property-Based Tests for a Pure Function

- 19.11.26 - ErcanOPAK comment on The AI Prompt That Writes Property-Based Tests for a Pure Function

πŸ€– The AI Prompt That Writes Property-Based Tests for a Pure Function Example-based unit tests only check the specific inputs you thought to write down, so a pure function with a subtle edge case β€” an empty collection, a boundary value, an input that’s technically valid but unusual β€” can pass every test you wrote […]

Read More
November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,058)
  • Get the User Name and Domain Name from an Email Address in SQL (983)
  • How to add default value for Entity Framework migrations for DateTime and Bool (981)
  • Get the First and Last Word from a String or Sentence in SQL (861)
  • How to select distinct rows in a datatable in C# (856)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (658)
  • Add Constraint to SQL Table to ensure email contains @ (613)
  • Average of all values in a column that are not zero in SQL (571)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (548)
  • Find numbers with more than two decimal places in SQL (477)

Recent Posts

  • Visual Studio: Fix Quick Actions Hiding Behind a Stale Squiggle
  • Photoshop: Fix a Smart Filter Resetting After You Relink It
  • Ajax: Fix a Cancelled Request Still Updating Stale UI State
  • C#: Fix a Span Captured by a Lambda Throwing at Runtime
  • The AI Prompt That Converts a REST Endpoint Into a Typed SDK
  • Git: Fix a Worktree Locking a Branch Needed Somewhere Else
  • Asp.Net Core: Fix a Background Service Leaking Scoped Dependencies
  • SQL Server: Fix a Columnstore Index Fragmenting After Bulk Deletes
  • Docker: Fix a Container Losing Logs After a Restart Policy
  • Asp.Net Core: Fix Output Caching Serving a Stale Authorized Page

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,058)
  • Get the User Name and Domain Name from an Email Address in SQL (983)
  • How to add default value for Entity Framework migrations for DateTime and Bool (981)
  • Get the First and Last Word from a String or Sentence in SQL (861)
  • How to select distinct rows in a datatable in C# (856)

Recent Posts

  • Visual Studio: Fix Quick Actions Hiding Behind a Stale Squiggle
  • Photoshop: Fix a Smart Filter Resetting After You Relink It
  • Ajax: Fix a Cancelled Request Still Updating Stale UI State
  • C#: Fix a Span Captured by a Lambda Throwing at Runtime
  • The AI Prompt That Converts a REST Endpoint Into a Typed SDK

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com