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

JavaScript

JavaScript: Fix an Intl.NumberFormat Call Rounding a Currency Value Differently Than the Database’s Own Rule Because the Default Rounding Mode Isn’t halfEven

- 12.11.26 - ErcanOPAK comment on JavaScript: Fix an Intl.NumberFormat Call Rounding a Currency Value Differently Than the Database’s Own Rule Because the Default Rounding Mode Isn’t halfEven

⚑ JavaScript: Fix an Intl.NumberFormat Call Rounding a Currency Value Differently Than the Database’s Own Rule Because the Default Rounding Mode Isn’t halfEven `Intl.NumberFormat`’s currency formatting defaults to a `roundingMode` of `halfExpand` (round half away from zero) unless you explicitly specify otherwise, which is a perfectly reasonable default for display purposes β€” but many financial […]

Read More
Windows

Windows 11: Fix a USB Drive Showing the Wrong Free Space in File Explorer Because the Volume’s Cached Size Info Never Refreshed After a Reformat

- 12.11.26 - ErcanOPAK comment on Windows 11: Fix a USB Drive Showing the Wrong Free Space in File Explorer Because the Volume’s Cached Size Info Never Refreshed After a Reformat

πŸͺŸ Windows 11: Fix a USB Drive Showing the Wrong Free Space in File Explorer Because the Volume’s Cached Size Info Never Refreshed After a Reformat File Explorer caches a removable drive’s used/free space figures so it doesn’t have to recalculate them every time you open the drive or hover over its icon β€” a […]

Read More
AI

The AI Prompt That Replays a Database Migration Script Against Last Month’s Schema Snapshot and Flags Every Statement That Would Fail on an Older Environment

- 12.11.26 - ErcanOPAK comment on The AI Prompt That Replays a Database Migration Script Against Last Month’s Schema Snapshot and Flags Every Statement That Would Fail on an Older Environment

πŸ€– The AI Prompt That Replays a Database Migration Script Against Last Month’s Schema Snapshot and Flags Every Statement That Would Fail on an Older Environment Migration scripts are usually written and tested against whatever the schema looks like right now, which quietly assumes every environment that will ever run them is already caught up […]

Read More
CSS

CSS: Fix a position: sticky Element Refusing to Stick Because an Ancestor Has overflow: hidden Set Somewhere You Didn’t Expect

- 12.11.26 - ErcanOPAK comment on CSS: Fix a position: sticky Element Refusing to Stick Because an Ancestor Has overflow: hidden Set Somewhere You Didn’t Expect

🎨 CSS: Fix a position: sticky Element Refusing to Stick Because an Ancestor Has overflow: hidden Set Somewhere You Didn’t Expect A `position: sticky` element sticks relative to its nearest scrolling ancestor, not necessarily the viewport β€” and any ancestor between the sticky element and that scroll container with `overflow` set to anything other than […]

Read More
Ajax

Ajax: Fix a Long-Polling Request Silently Stopping After an Hour Because a Reverse Proxy’s Idle Timeout Closes the Connection Before the Server Ever Responds

- 12.11.26 - ErcanOPAK comment on Ajax: Fix a Long-Polling Request Silently Stopping After an Hour Because a Reverse Proxy’s Idle Timeout Closes the Connection Before the Server Ever Responds

πŸ”„ Ajax: Fix a Long-Polling Request Silently Stopping After an Hour Because a Reverse Proxy’s Idle Timeout Closes the Connection Before the Server Ever Responds Long polling deliberately holds an HTTP request open on the server for an extended period, responding only once new data is actually available (or a shorter internal timeout elapses first) […]

Read More
Asp.Net Core

Asp.Net Core: Fix Model Binding Silently Ignoring a Query String Parameter Because Its Name Only Differs From the Property by Case Under a Case-Sensitive Culture

- 12.11.26 - ErcanOPAK comment on Asp.Net Core: Fix Model Binding Silently Ignoring a Query String Parameter Because Its Name Only Differs From the Property by Case Under a Case-Sensitive Culture

βš™οΈ Asp.Net Core: Fix Model Binding Silently Ignoring a Query String Parameter Because Its Name Only Differs From the Property by Case Under a Case-Sensitive Culture ASP.NET Core’s default model binder matches query string keys to model properties using an ordinal, case-insensitive comparison, which is why `?PageSize=20` and `?pagesize=20` both bind correctly to a `PageSize` […]

Read More
C#

C#: Fix a using Declaration Disposing an Object Earlier Than Expected Because It Was Declared Inside a Loop Instead of Before It Started

- 12.11.26 - ErcanOPAK comment on C#: Fix a using Declaration Disposing an Object Earlier Than Expected Because It Was Declared Inside a Loop Instead of Before It Started

πŸ”§ C#: Fix a using Declaration Disposing an Object Earlier Than Expected Because It Was Declared Inside a Loop Instead of Before It Started A `using` declaration (the statement-less `using var resource = …;` form introduced in C# 8) ties the resource’s disposal to the end of the *enclosing block*, not to some separate explicit […]

Read More
Docker

Docker: Fix a Container’s Health Check Reporting Healthy Immediately After Start Because the Check Command Succeeds Before the Entrypoint Script Finishes Its Own Setup

- 12.11.26 - ErcanOPAK comment on Docker: Fix a Container’s Health Check Reporting Healthy Immediately After Start Because the Check Command Succeeds Before the Entrypoint Script Finishes Its Own Setup

🐳 Docker: Fix a Container’s Health Check Reporting Healthy Immediately After Start Because the Check Command Succeeds Before the Entrypoint Script Finishes Its Own Setup A Dockerfile’s `HEALTHCHECK` instruction runs its own command on a fixed interval starting the moment the container’s main process exists β€” not the moment that process has actually finished whatever […]

Read More
Asp.Net Core

Asp.Net Core: Fix Antiforgery Tokens Failing Validation Right After Scaling Out to a Second Instance Because Each Instance Generated Its Own Data Protection Keys Instead of Sharing One Key Ring

- 12.11.26 - ErcanOPAK comment on Asp.Net Core: Fix Antiforgery Tokens Failing Validation Right After Scaling Out to a Second Instance Because Each Instance Generated Its Own Data Protection Keys Instead of Sharing One Key Ring

βš™οΈ Asp.Net Core: Fix Antiforgery Tokens Failing Validation Right After Scaling Out to a Second Instance Because Each Instance Generated Its Own Data Protection Keys Instead of Sharing One Key Ring ASP.NET Core’s Data Protection system encrypts antiforgery tokens, authentication cookies, and TempData using a key ring that, by default with no explicit configuration, each […]

Read More
HTML

HTML5: Fix a Native input type=date Picker Displaying a Different Format Than What You’re Actually Submitting Because the Shown Format Follows the Browser’s Locale, Not Your Markup

- 12.11.26 - ErcanOPAK comment on HTML5: Fix a Native input type=date Picker Displaying a Different Format Than What You’re Actually Submitting Because the Shown Format Follows the Browser’s Locale, Not Your Markup

🧩 HTML5: Fix a Native input type=date Picker Displaying a Different Format Than What You’re Actually Submitting Because the Shown Format Follows the Browser’s Locale, Not Your Markup A native `<input type=”date”>` always submits and stores its value in the ISO 8601 `YYYY-MM-DD` format regardless of what the user sees β€” the *displayed* format in […]

Read More
Wordpress

WordPress: Fix Featured Images Disappearing From the Site’s RSS Feed Because a Caching Plugin Serves a Feed Snapshot Cached Before the Image Was Ever Set

- 12.11.26 - ErcanOPAK comment on WordPress: Fix Featured Images Disappearing From the Site’s RSS Feed Because a Caching Plugin Serves a Feed Snapshot Cached Before the Image Was Ever Set

πŸ“ WordPress: Fix Featured Images Disappearing From the Site’s RSS Feed Because a Caching Plugin Serves a Feed Snapshot Cached Before the Image Was Ever Set WordPress’s default RSS feed template pulls each post’s featured image at the moment the feed XML is generated, which normally happens on the very first request after the post […]

Read More
C#

C#: Fix an IAsyncEnumerable foreach Loop Hanging Forever Because the Underlying Channel Reader Was Never Completed on the Producer Side

- 12.11.26 - ErcanOPAK comment on C#: Fix an IAsyncEnumerable foreach Loop Hanging Forever Because the Underlying Channel Reader Was Never Completed on the Producer Side

πŸ”§ C#: Fix an IAsyncEnumerable foreach Loop Hanging Forever Because the Underlying Channel Reader Was Never Completed on the Producer Side An `IAsyncEnumerable<T>` built on top of a `System.Threading.Channels.Channel<T>` β€” a common pattern for turning a producer/consumer queue into an async stream β€” relies entirely on the producer calling `channel.Writer.Complete()` once it’s genuinely done writing. […]

Read More
Kubernetes

Kubernetes: Fix a CronJob Silently Stopping After a Few Successful Runs Because startingDeadlineSeconds Was Too Short for the Cluster’s Own Scheduling Jitter

- 12.11.26 - ErcanOPAK comment on Kubernetes: Fix a CronJob Silently Stopping After a Few Successful Runs Because startingDeadlineSeconds Was Too Short for the Cluster’s Own Scheduling Jitter

☸️ Kubernetes: Fix a CronJob Silently Stopping After a Few Successful Runs Because startingDeadlineSeconds Was Too Short for the Cluster’s Own Scheduling Jitter A CronJob’s `startingDeadlineSeconds` sets the latest moment after a scheduled time that the controller is still allowed to start a late job β€” miss that window and the run is recorded as […]

Read More
Photoshop

Photoshop: Fix a Linked Smart Object Printing at Low Resolution Because the Embedded Preview Thumbnail Was Never Regenerated at Full Size

- 12.11.26 - ErcanOPAK comment on Photoshop: Fix a Linked Smart Object Printing at Low Resolution Because the Embedded Preview Thumbnail Was Never Regenerated at Full Size

πŸ–ŒοΈ Photoshop: Fix a Linked Smart Object Printing at Low Resolution Because the Embedded Preview Thumbnail Was Never Regenerated at Full Size A linked Smart Object stores two separate things: a path to the external source file, and a cached preview thumbnail Photoshop uses so the canvas can render instantly without re-decoding the source on […]

Read More
SQL

SQL Server: Fix a MERGE Statement Deadlocking Against Itself Under Concurrent Runs Because It Takes Update Locks in a Different Order Than a Plain UPDATE Would

- 12.11.26 - ErcanOPAK comment on SQL Server: Fix a MERGE Statement Deadlocking Against Itself Under Concurrent Runs Because It Takes Update Locks in a Different Order Than a Plain UPDATE Would

πŸ—„οΈ SQL Server: Fix a MERGE Statement Deadlocking Against Itself Under Concurrent Runs Because It Takes Update Locks in a Different Order Than a Plain UPDATE Would `MERGE` is commonly reached for specifically to implement an atomic upsert β€” insert if the row doesn’t exist, update if it does β€” and that convenience hides a […]

Read More
AI

The AI Prompt That Reads a Stack Trace Logged in Three Different Formats at Once and Lines Up the Same Request Across All Three Automatically

- 12.11.26 - ErcanOPAK comment on The AI Prompt That Reads a Stack Trace Logged in Three Different Formats at Once and Lines Up the Same Request Across All Three Automatically

πŸ€– The AI Prompt That Reads a Stack Trace Logged in Three Different Formats at Once and Lines Up the Same Request Across All Three Automatically A single failing request in a system that’s grown organically often leaves its trail across logs that were never designed to be read together: an application log with its […]

Read More
Windows

Windows 11: Fix Night Light Turning Itself Back Off After Every Sleep Because Location Services Keeps Resetting the Sunset Schedule It Depends On

- 12.11.26 - ErcanOPAK comment on Windows 11: Fix Night Light Turning Itself Back Off After Every Sleep Because Location Services Keeps Resetting the Sunset Schedule It Depends On

πŸͺŸ Windows 11: Fix Night Light Turning Itself Back Off After Every Sleep Because Location Services Keeps Resetting the Sunset Schedule It Depends On Night Light’s “Schedule based on sunset and sunrise” option needs an actual sunrise/sunset calculation, which Windows derives from your current location β€” either a precise GPS-based fix or a coarser IP-address […]

Read More
Photoshop

Photoshop: Fix the Pen Tool’s Curve Handles Jumping to the Wrong Anchor Point Because Caps Lock Silently Toggled Precise Cursor Mode Off

- 12.11.26 - ErcanOPAK comment on Photoshop: Fix the Pen Tool’s Curve Handles Jumping to the Wrong Anchor Point Because Caps Lock Silently Toggled Precise Cursor Mode Off

πŸ–ŒοΈ Photoshop: Fix the Pen Tool’s Curve Handles Jumping to the Wrong Anchor Point Because Caps Lock Silently Toggled Precise Cursor Mode Off Photoshop’s Pen tool has a dedicated Precise Cursors mode that swaps the thick default pen icon for a crosshair centered exactly on the point you’re about to place β€” and for decades, […]

Read More
C#

C#: Fix a String-Keyed Dictionary Lookup Failing for a Key That Looks Identical Onscreen Because One Copy Has a Non-Breaking Space Instead of a Regular Space

- 12.11.26 - ErcanOPAK comment on C#: Fix a String-Keyed Dictionary Lookup Failing for a Key That Looks Identical Onscreen Because One Copy Has a Non-Breaking Space Instead of a Regular Space

πŸ”§ C#: Fix a String-Keyed Dictionary Lookup Failing for a Key That Looks Identical Onscreen Because One Copy Has a Non-Breaking Space Instead of a Regular Space A `Dictionary<string, T>` with the default string comparer uses ordinal equality, which compares strings character by character with no normalization β€” two strings that render visually identically in […]

Read More
AI

The AI Prompt That Reads Your Car’s Tire Sidewall and Tells You Exactly Which Replacement Sizes Are Actually Safe, Not Just the One Printed on the Tire

- 12.11.26 - ErcanOPAK comment on The AI Prompt That Reads Your Car’s Tire Sidewall and Tells You Exactly Which Replacement Sizes Are Actually Safe, Not Just the One Printed on the Tire

πŸ€– The AI Prompt That Reads Your Car’s Tire Sidewall and Tells You Exactly Which Replacement Sizes Are Actually Safe, Not Just the One Printed on the Tire A tire’s sidewall carries a dense code β€” something like 225/45R17 91V β€” that packs the tire’s width, aspect ratio, wheel diameter, load index, and speed rating […]

Read More
Wordpress

WordPress: Fix the Classic Editor Plugin Showing a Blank Screen for One Custom Post Type Because a Block-Only Meta Box Was Registered Without a Classic Fallback

- 12.11.26 - ErcanOPAK comment on WordPress: Fix the Classic Editor Plugin Showing a Blank Screen for One Custom Post Type Because a Block-Only Meta Box Was Registered Without a Classic Fallback

πŸ“ WordPress: Fix the Classic Editor Plugin Showing a Blank Screen for One Custom Post Type Because a Block-Only Meta Box Was Registered Without a Classic Fallback The Classic Editor plugin restores the old TinyMCE screen site-wide, but any meta box a theme or plugin registered specifically through `register_post_meta()` with `show_in_rest` targeting the block editor’s […]

Read More
SQL

SQL Server: Fix an INSERT INTO … SELECT Deadlocking With a Concurrent Reader Because the Target Table Has No Clustered Index to Order the Lock Acquisition

- 12.11.26 - ErcanOPAK comment on SQL Server: Fix an INSERT INTO … SELECT Deadlocking With a Concurrent Reader Because the Target Table Has No Clustered Index to Order the Lock Acquisition

πŸ—„οΈ SQL Server: Fix an INSERT INTO … SELECT Deadlocking With a Concurrent Reader Because the Target Table Has No Clustered Index to Order the Lock Acquisition A heap table β€” one with no clustered index β€” stores rows in whatever physical order they happened to be inserted, with no guaranteed ordering for SQL Server […]

Read More
Git

Git: Fix a git rebase -i Dropping a Commit You Never Deleted Because an Earlier ‘squash’ Line Silently Absorbed It Into the Commit Above

- 12.11.26 - ErcanOPAK comment on Git: Fix a git rebase -i Dropping a Commit You Never Deleted Because an Earlier ‘squash’ Line Silently Absorbed It Into the Commit Above

πŸ”€ Git: Fix a git rebase -i Dropping a Commit You Never Deleted Because an Earlier ‘squash’ Line Silently Absorbed It Into the Commit Above In an interactive rebase’s todo list, `squash` (or its shorter alias `s`) doesn’t delete a commit β€” it merges that commit’s changes and message into the commit immediately above it […]

Read More
Visual Studio

Visual Studio: Fix the Live Unit Testing Icon Staying Gray on a Test Project Forever Because the Project Targets a Framework Live Unit Testing Doesn’t Support

- 12.11.26 - ErcanOPAK comment on Visual Studio: Fix the Live Unit Testing Icon Staying Gray on a Test Project Forever Because the Project Targets a Framework Live Unit Testing Doesn’t Support

πŸ› οΈ Visual Studio: Fix the Live Unit Testing Icon Staying Gray on a Test Project Forever Because the Project Targets a Framework Live Unit Testing Doesn’t Support Live Unit Testing runs your test suite continuously in the background and paints a green check or a red cross directly next to each covered line as you […]

Read More
Git

Git: Fix git clean -fd Deleting a File You Still Need Because It Matched .gitignore Before You Ever Added and Committed It

- 12.11.26 - ErcanOPAK comment on Git: Fix git clean -fd Deleting a File You Still Need Because It Matched .gitignore Before You Ever Added and Committed It

πŸ”€ Git: Fix git clean -fd Deleting a File You Still Need Because It Matched .gitignore Before You Ever Added and Committed It `git clean -fd` removes every untracked file and directory from the working tree β€” and critically, “untracked” includes any file that matches a `.gitignore` pattern, regardless of whether that pattern was written […]

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

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit
  • SQL Server: Fix ROW_NUMBER Ties Reordering Between Identical Runs
  • C#: Fix an Enum HasFlag Returning True for the Zero Value
  • WordPress: Fix Featured Images Vanishing After a CDN Migration
  • Photoshop: Fix Content-Aware Fill Smearing a Repeating Pattern
  • Asp.Net Core: Fix Antiforgery Tokens Rejected Behind a Reverse Proxy

Most Viewed Posts

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

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit

Social

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