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 21, 2026

AI

The AI Prompt That Audits a Function for Thread-Safety Gaps

- 21.11.26 - ErcanOPAK comment on The AI Prompt That Audits a Function for Thread-Safety Gaps

🤖 The AI Prompt That Audits a Function for Thread-Safety Gaps Asking an AI assistant whether a function is thread-safe tends to get a confident yes-or-no answer with little to actually act on. A prompt that asks it to reason line by line about shared state, and to separate what’s definitely unsafe from what’s only […]

Read More
Ajax

Ajax: Fix a Fetch Request Caching a Response Despite No-Store

- 21.11.26 - ErcanOPAK comment on Ajax: Fix a Fetch Request Caching a Response Despite No-Store

🔄 Ajax: Fix a Fetch Request Caching a Response Despite No-Store Setting cache: ‘no-store’ on a fetch() call controls how that request interacts with the browser’s HTTP cache, but it has no effect on a registered Service Worker’s own fetch event handler. If the Service Worker intercepts the request and serves a cached response from […]

Read More
Wordpress

WordPress: Fix a Navigation Block Losing Submenu Items After Sync

- 21.11.26 - ErcanOPAK comment on WordPress: Fix a Navigation Block Losing Submenu Items After Sync

📝 WordPress: Fix a Navigation Block Losing Submenu Items After Sync The core Navigation block can either store its menu directly inside the block (as nested list-item blocks) or link to a classic menu synced in through Appearance > Manage Menus. When that sync runs again, it pulls its items strictly from the classic menu’s […]

Read More
Visual Studio

Visual Studio: Fix CodeLens Reference Counts Stuck at Stale Numbers

- 21.11.26 - ErcanOPAK comment on Visual Studio: Fix CodeLens Reference Counts Stuck at Stale Numbers

🛠️ Visual Studio: Fix CodeLens Reference Counts Stuck at Stale Numbers CodeLens reference counts come from a background indexer tied to the workspace’s own source database, and that index updates incrementally from whatever edits it has actually processed so far. After a large cross-project rename or refactor, Visual Studio doesn’t always force a full re-index […]

Read More
C#

C#: Fix a UTF-8 String Literal Behaving Differently in a Switch

- 21.11.26 - ErcanOPAK comment on C#: Fix a UTF-8 String Literal Behaving Differently in a Switch

🔧 C#: Fix a UTF-8 String Literal Behaving Differently in a Switch C# 11’s u8 suffix produces a ReadOnlySpan<byte> UTF-8 literal, and pattern matching on spans in a switch expression compares byte sequences directly. If one case literal was typed with a visually-identical but differently-encoded Unicode sequence — a lookalike character, or a precomposed accented […]

Read More
Photoshop

Photoshop: Fix a Liquify Mesh Snapping Back on a Smart Object

- 21.11.26 - ErcanOPAK comment on Photoshop: Fix a Liquify Mesh Snapping Back on a Smart Object

🖌️ Photoshop: Fix a Liquify Mesh Snapping Back on a Smart Object Running Filter > Liquify on a Smart Object applies it as a Smart Filter, and that filter’s warp mesh is stored relative to the Smart Object’s pixel grid at the moment you created it. If you transform the Smart Object afterward — scaling […]

Read More
AI

The AI Prompt That Turns a Crash Dump Into a Short Repro Script

- 21.11.26 - ErcanOPAK comment on The AI Prompt That Turns a Crash Dump Into a Short Repro Script

🤖 The AI Prompt That Turns a Crash Dump Into a Short Repro Script A raw crash dump or an unhandled-exception stack trace is usually too much undifferentiated detail for an AI assistant to act on directly — hundreds of frames and memory addresses bury the handful of facts that actually matter. Asking it to […]

Read More
Docker

Docker: Fix a Healthcheck Passing While the DB Is Unreachable

- 21.11.26 - ErcanOPAK comment on Docker: Fix a Healthcheck Passing While the DB Is Unreachable

🐳 Docker: Fix a Healthcheck Passing While the DB Is Unreachable A HEALTHCHECK that only calls the app’s own /health endpoint is exactly as deep as whatever that endpoint actually verifies. If it was written as a cheap liveness probe that just confirms the web server thread is responding, the container shows up healthy in […]

Read More
Git

Git: Fix a Cherry-Pick Dropping a Rename Across Two Branches

- 21.11.26 - ErcanOPAK comment on Git: Fix a Cherry-Pick Dropping a Rename Across Two Branches

🔀 Git: Fix a Cherry-Pick Dropping a Rename Across Two Branches git cherry-pick replays a commit’s diff against the current branch using a three-way merge against that commit’s parent. If a file was renamed on the target branch after the two branches diverged, Git’s rename detection during the cherry-pick’s internal merge can fail to connect […]

Read More
HTML

HTML5: Fix a Dialog Element Trapping Focus Outside Its Own Content

- 21.11.26 - ErcanOPAK comment on HTML5: Fix a Dialog Element Trapping Focus Outside Its Own Content

🧩 HTML5: Fix a Dialog Element Trapping Focus Outside Its Own Content Calling showModal() on a native <dialog> sets up a browser-managed focus trap, but some browsers’ default implementation computes the tab order from the light DOM only and doesn’t descend into a nested web component’s shadow root to find focusable elements there — so […]

Read More
JavaScript

JavaScript: Fix a WeakRef Target Being Collected Too Early

- 21.11.26 - ErcanOPAK comment on JavaScript: Fix a WeakRef Target Being Collected Too Early

⚡ JavaScript: Fix a WeakRef Target Being Collected Too Early A WeakRef doesn’t keep its target alive — if nothing else in the program holds a strong reference to the object it points to, the garbage collector is free to collect it at any point, including almost immediately, even though you just created the WeakRef […]

Read More
Asp.Net Core

Asp.Net Core: Fix SignalR Reconnects Losing Group Membership

- 21.11.26 - ErcanOPAK comment on Asp.Net Core: Fix SignalR Reconnects Losing Group Membership

⚙️ Asp.Net Core: Fix SignalR Reconnects Losing Group Membership SignalR’s automatic reconnect transparently re-establishes the transport connection, but a reconnect creates a logically new connection with a new ConnectionId on the server. Group membership is keyed per-ConnectionId by default, so any earlier Groups.AddToGroupAsync calls don’t carry over — unless the application explicitly re-adds the new […]

Read More
Windows

Windows 11: Fix Snap Layouts Forgetting a Custom Grid After Sleep

- 21.11.26 - ErcanOPAK comment on Windows 11: Fix Snap Layouts Forgetting a Custom Grid After Sleep

🪟 Windows 11: Fix Snap Layouts Forgetting a Custom Grid After Sleep Snap Layouts remembers a custom grid per detected display configuration. Waking from sleep on a laptop connected to an external monitor or dock that takes a moment to re-initialize can register as a display-configuration change, even though the same monitors are still physically […]

Read More
SQL

SQL Server: Fix a Columnstore Archive Compression Job Stalling

- 21.11.26 - ErcanOPAK comment on SQL Server: Fix a Columnstore Archive Compression Job Stalling

🗄️ SQL Server: Fix a Columnstore Archive Compression Job Stalling ALTER INDEX … REORGANIZE WITH (DATA_COMPRESSION = COLUMNSTORE_ARCHIVE) compresses closed row groups further for cold data, but it can only fully archive-compress a row group once it’s already in a COMPRESSED state. If background tuple-mover activity keeps merging row groups concurrently — common on a […]

Read More
Photoshop

Photoshop: Fix a Pattern Preview Mode Not Tiling at the Canvas Edge

- 21.11.26 - ErcanOPAK comment on Photoshop: Fix a Pattern Preview Mode Not Tiling at the Canvas Edge

🖌️ Photoshop: Fix a Pattern Preview Mode Not Tiling at the Canvas Edge Pattern Preview (View > Pattern Preview) renders a live tiled preview around your canvas from a snapshot of the document taken at the moment you entered the mode. Layers added or revealed after that point aren’t automatically folded into the surrounding tiles […]

Read More
CSS

CSS: Fix a Scroll-Driven Animation Running Only on First Load

- 21.11.26 - ErcanOPAK comment on CSS: Fix a Scroll-Driven Animation Running Only on First Load

🎨 CSS: Fix a Scroll-Driven Animation Running Only on First Load A CSS scroll-driven animation using animation-timeline: scroll() computes its timeline range from the scroller’s content size at the moment the timeline attaches to an element. If content is added later — images lazy-loading in, or a list populated after an API response — the […]

Read More
C#

C#: Fix an Interceptor Silently Skipping an Overloaded Call

- 21.11.26 - ErcanOPAK comment on C#: Fix an Interceptor Silently Skipping an Overloaded Call

🔧 C#: Fix an Interceptor Silently Skipping an Overloaded Call C# interceptors attach to a call site by its exact file path, line, and column, and an InterceptsLocation attribute targets one specific call expression with an exact method signature. If the intercepted method has multiple overloads and a refactor changes which overload a call site […]

Read More
Git

Git: Fix a Submodule Pointing to a Commit That No Longer Exists

- 21.11.26 - ErcanOPAK comment on Git: Fix a Submodule Pointing to a Commit That No Longer Exists

🔀 Git: Fix a Submodule Pointing to a Commit That No Longer Exists A Git submodule reference stores a specific commit SHA, not a branch. If that commit is later removed from the submodule’s own remote history — a force-push that rewrites history, a branch deleted after a squash-merge, or the submodule repository being migrated […]

Read More
Windows

Windows 11: Fix File Explorer Tabs Forgetting Their Pinned Order

- 21.11.26 - ErcanOPAK comment on Windows 11: Fix File Explorer Tabs Forgetting Their Pinned Order

🪟 Windows 11: Fix File Explorer Tabs Forgetting Their Pinned Order File Explorer lets you pin a tab so it reopens across sessions, but the pinned tab order only gets flushed to its settings store when Explorer closes down cleanly. If explorer.exe crashes or is force-restarted before that flush happens, the next launch restores whatever […]

Read More
SQL

SQL Server: Fix a Graph Table Query Returning Duplicate Edges

- 21.11.26 - ErcanOPAK comment on SQL Server: Fix a Graph Table Query Returning Duplicate Edges

🗄️ SQL Server: Fix a Graph Table Query Returning Duplicate Edges SQL Server’s graph database features let you traverse relationships with a MATCH clause, but a pattern that checks for a relationship in both directions using two separate MATCH clauses joined with OR can match the same underlying edge row twice — once satisfying each […]

Read More
Asp.Net Core

Asp.Net Core: Fix gRPC Streaming Hanging After a Client Cancels

- 21.11.26 - ErcanOPAK comment on Asp.Net Core: Fix gRPC Streaming Hanging After a Client Cancels

⚙️ Asp.Net Core: Fix gRPC Streaming Hanging After a Client Cancels When a gRPC client cancels a server-streaming or bidirectional call, ASP.NET Core surfaces that through ServerCallContext.CancellationToken. If the streaming method’s loop awaits an inner async operation — a database query, a downstream HTTP call — without passing that same token through, the inner operation […]

Read More
C#

C#: Fix a ConfigureAwait(false) Call Deadlocking a UI Callback

- 21.11.26 - ErcanOPAK comment on C#: Fix a ConfigureAwait(false) Call Deadlocking a UI Callback

🔧 C#: Fix a ConfigureAwait(false) Call Deadlocking a UI Callback ConfigureAwait(false) tells the awaiter not to resume on the original SynchronizationContext — standard advice for library code. But if that method is later awaited from a UI event handler and a refactor adds a UI update to what used to be a pure background operation, […]

Read More
Wordpress

WordPress: Fix a Scheduled Post Publishing in the Wrong Timezone

- 21.11.26 - ErcanOPAK comment on WordPress: Fix a Scheduled Post Publishing in the Wrong Timezone

📝 WordPress: Fix a Scheduled Post Publishing in the Wrong Timezone WordPress stores a scheduled post’s time both in the site’s local timezone (post_date) and in UTC (post_date_gmt), and the actual background job that fires publication is scheduled against the UTC value. If the site’s timezone setting under Settings > General changes after a post […]

Read More
AI

The AI Prompt That Turns a Parking Ticket Into an Appeal Letter Draft

- 21.11.26 - ErcanOPAK comment on The AI Prompt That Turns a Parking Ticket Into an Appeal Letter Draft

🤖 The AI Prompt That Turns a Parking Ticket Into an Appeal Letter Draft A parking or camera-issued ticket usually lists a code, a date and time, and a brief note, but turning that into an actual appeal argument takes knowing which defenses apply to the specific facts — a prompt that just says “write […]

Read More
Kubernetes

Kubernetes: Fix a PDB Blocking Node Drains During Maintenance

- 21.11.26 - ErcanOPAK comment on Kubernetes: Fix a PDB Blocking Node Drains During Maintenance

☸️ Kubernetes: Fix a PDB Blocking Node Drains During Maintenance A PodDisruptionBudget with minAvailable set equal to (or very close to) a Deployment’s total replica count leaves zero disruption budget for the Eviction API to actually work with. kubectl drain calls that API for every pod on the node, and the API server rejects any […]

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,068)
  • Get the User Name and Domain Name from an Email Address in SQL (990)
  • How to add default value for Entity Framework migrations for DateTime and Bool (986)
  • Get the First and Last Word from a String or Sentence in SQL (865)
  • How to select distinct rows in a datatable in C# (859)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (661)
  • Add Constraint to SQL Table to ensure email contains @ (619)
  • Average of all values in a column that are not zero in SQL (577)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (553)
  • Find numbers with more than two decimal places in SQL (481)

Recent Posts

  • Network Speed Monitor Windows Application v2.5.1
  • Ağ Hızı İzleyici Windows Uygulaması v2.5.1
  • How to make theater mode the default for Youtube
  • The AI Prompt That Audits a Function for Thread-Safety Gaps
  • Ajax: Fix a Fetch Request Caching a Response Despite No-Store
  • WordPress: Fix a Navigation Block Losing Submenu Items After Sync
  • Visual Studio: Fix CodeLens Reference Counts Stuck at Stale Numbers
  • C#: Fix a UTF-8 String Literal Behaving Differently in a Switch
  • Photoshop: Fix a Liquify Mesh Snapping Back on a Smart Object
  • The AI Prompt That Turns a Crash Dump Into a Short Repro Script

Most Viewed Posts

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

Recent Posts

  • Network Speed Monitor Windows Application v2.5.1
  • Ağ Hızı İzleyici Windows Uygulaması v2.5.1
  • How to make theater mode the default for Youtube
  • The AI Prompt That Audits a Function for Thread-Safety Gaps
  • Ajax: Fix a Fetch Request Caching a Response Despite No-Store

Social

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