Random snippets of all sorts of code, mixed with a selection of help and advice.
Nested Scrolling of Lists within a Carousel erratically working on iOS26.2 physical devices
30 January 2026 @ 3:09 pm
I was using with satisfaction the snippet by @ChrisR from his post Carousel SwiftUI until I upgraded my iPhone and iPad to iOS26.2
In Chris' example I substituted the Coloured Rounded rectangles with scrollable list views. And to me, that has done fine for a while. Also it is doing quite OK on simulators.
But after upgrading to iOS26.2 the functioning has become erratic on physical devices. It seems there is conflict of gesture detection between the carousel and the list. Is this specific to iOS26.2 or I just did not notice before ?
Is there another way to achieve the same ?
Here is the amended snippet from @ChrisR (thanks to him):
import SwiftUI
import Combine
struct Item: Identifiable {
var id: Int
var objList: [String]
}
class Store: ObservableObject {
@Published var items: [Item]
init() {
i
Witness memory reordering in thread
30 January 2026 @ 3:04 pm
I was reading about Rust's memory ordering model. According to their example, the piece of code below could produce 0 20 as output.
static X: AtomicI32 = AtomicI32::new(0);
static Y: AtomicI32 = AtomicI32::new(0);
fn a() {
X.store(10, Relaxed);
Y.store(20, Relaxed);
}
fn b() {
let y = Y.load(Relaxed);
let x = X.load(Relaxed);
println!("{x} {y}");
}
So I tried looping over it on my mac m1 but I cannot get it to show 0 20. Is there another experiment I can put in place to witness the type of memory reordering that could happen here?
use std::thread;
use std::sync::atomic::{AtomicI32, Ordering::Relaxed};
use std::sync::Arc;
fn main() {
static X: AtomicI32 = AtomicI32::new(0);
static Y: AtomicI32 = AtomicI32::new(0);
let iterations = 10_000_000;
for _ in 0..iterations {
X.store(0,
Sale-ended item still in cart — update price on quantity change or on cart fetch?
30 January 2026 @ 3:01 pm
I’m building a cart service for an e-commerce system and I’m confused about handling a sale-end edge case.
A user adds an item to the cart during a sale at a discounted price. The sale later ends while the item is still in the cart. When the user later increases or decreases the quantity, I’m unsure how pricing should be handled.
Should the unit price be updated during quantity changes, or should the cart GET API always refresh prices to the latest product price and quantity mutations only change quantity?
Azure Devops Query to Show Created vs Completed User Stories in a Bar Chart
30 January 2026 @ 3:00 pm
I have to create one chart in our project dashboard that should display total number of user stories created and completed for a specific period. I have created below query in ADO
This chart output should look like
The issue is in the Bar Chart Configuration, Whatever field i choose in Group By, that field is displayed on the X axis of the chart. So i get the output something like this.
Further I also tried fetching the straightforward count of expected result using WIQL query editor but that also did not work because aggregate functions are not available to use in WIQL.
I am not sure how to get the chart output as mentioned above. I have researched a lot but no luck. Any help would be h
This chart output should look like
The issue is in the Bar Chart Configuration, Whatever field i choose in Group By, that field is displayed on the X axis of the chart. So i get the output something like this.
Further I also tried fetching the straightforward count of expected result using WIQL query editor but that also did not work because aggregate functions are not available to use in WIQL.
I am not sure how to get the chart output as mentioned above. I have researched a lot but no luck. Any help would be hCasting in a collection iteration?
30 January 2026 @ 2:57 pm
I'm not sure what these things are called in groovy, so please forgive the awkward phrasing . . .
I have a HashMap of HashMaps that I want to iterate over:
def h1 = ['one': ['first': 'foist', 'second': 'segundo']]
def h2 = ['two': ['here': 'where?', 'there': 'right there']]
def h3 = ['three': ['foo': 'bar', 'baz': 'boo']]
def ffMap = [:]
ffMap["h1"] = h1
ffMap["h2"] = h2
ffMap["h3"] = h3
println("ffMap: ${ffMap.getClass()}")
ffMap.keySet().collect { host ->
println("ffMap[${host}] is a ${ffMap[host].getClass()}")
ffMap[host].keySet().collect { ff -> // **** HERE!!
println("ffMap[${host}][${ff}] is a ${ffMap[host][ff].getClass()}")
}
}
First of all, is there a generic term for collect, each, find, etc? Iterators?
Second, is there a word for host as it's used here?
Anyw
How to localize and examine stack memory in QNX OS on ARM64?
30 January 2026 @ 2:54 pm
I would like to display the contents of the stack memory of an application. That would help me both, understand the memory management of the system and determine stack fill rates (potentially for optimizations).
This simple program creates a thread that has an array as local variable (on its stack):
#include <thread>
int main()
{
std::thread thread{[=]() {
int test[128];
for (int i = 0; i < 128; i++)
{
test[i] = i;
}
while (true)
{
}
}};
thread.join();
return 0;
}
The array is filled with consecutive numbers and I hope that I can find them when examining the stack memory. Now I run the program and dump the memory with dumper (https://www.qnx.com/developers/docs/6.5.0S
How to serialize a series of state changes in ReactJs app?
30 January 2026 @ 2:47 pm
I implemented Commands Pattern in my app, the flow is :
user modified data -> record commands -> submit button clicked -> merge commands -> submit merged commands one by one.
here is the core code:
export default function submitCommandsMiddleware({ getState, dispatch }) {
return next => action => {
if (action.type !== SUBMIT_COMMANDS) return next(action);
if (getState().isSubmitting) return;
const state = getState();
const { commands } = state;
if (!commands?.length) return;
next({ type: flow.START_SUBMITTING });
queueMicrotask(() => {
// merge commands first
const mergedCommands = mergeCommands(getState().commands);
const mergedCommandIds = mergedCommands.map(a => a.id);
dispatch(fa.applyCommands(mergedCommands)); // checkpoint 1
// submit commands one by one
(async () =>
How to use MICR font in RDLC (C#) for bank check printing?
30 January 2026 @ 2:46 pm
I am using RDLC reports in a C# (.NET) application to print bank checks, and I need to print the MICR line using a MICR font as per banking standards.
I installed a MICR font on my machine and set it on an RDLC textbox, but when exporting to PDF using:
byte[] bytes = reportViewer.LocalReport.Render("PDF");
Confusion about which MICR font is officially acceptable for bank checks
Questions:
Where can I get a valid, bank-compliant MICR font?
Does RDLC support embedding MICR fonts in PDF output, or must the
font be installed on the server/client?
Are there any specific RDLC or ReportViewer settings required for
MICR fonts?
Are there known limitations of RDLC for MICR/check printing?
Any guidance or best practices would be appreciated.
Firebase Cloud Function fails to send notifications in flutter App - UNAUTHENTICATED
30 January 2026 @ 2:43 pm
I have setup my cloud function to send notifications to my app. However, I stuck on an issue that returns the error below:
Failed to send message to dkmC6rNuCE...: Request is missing required
authentication credential. Expected OAuth 2 access token, login cookie
or other valid authentication credential. See
https://developers.google.com/identity/sign-in/web/devconsole-project.
FCM token dkmC6rNuCE... failed with error: UNAUTHENTICATED - Request
is missing required authentication credential. Expected OAuth 2 access
token, login cookie or other valid authentication credential. See
https://developers.google.com/identity/sign-in/web/devconsole-project.
my function (Python 1.13) for the notifications is this one:
Why does my keydown event using addEventListener on a hidden input not work?
30 January 2026 @ 2:39 pm
Why this doesn't work? When I hit the "c" on my keyboard, nothing is logged to the console.
<input type="hidden" id="keyDetector">
<script>
const keyDetector = document.getElementById("keyDetector")
keyDetector.addEventListener("keydown", function(event) {
if (event.key == "c") {
console.log("C pressed.")
}
console.log("Pressed key: ", event.key)
})
</script>