StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Expo Router: Is there a way to specify swipe direction when navigating to a new screen

15 January 2026 @ 6:08 pm

I want to be able to navigate to a new screen that is not yet in the history stack while still having it appear as if the screen is being navigated back to (i.e. swiping from left to right) the way it does when calling router.back() Ideally I would want something like this: router.dismissTo('/myScreenPath', { swipeDirection: 'leftToRight'}) There seems to be no way to configure this behavior from what I could find in the expo router and react navigation docs. They seem to reserve control over the swiping behavior to the use of the specific navigation methods themselves. Am I missing something here? This feels like a fair ask for applications that have fixed step-driven navigation logic. For example, an app where you can jump to the intermediary step in an activity, but still want to allow users to navigate "back" to the previous step in that flow even though that screen is not yet in the history stack

Access violation code when starting a debugging session of a Visual Studio Add-in for Office

15 January 2026 @ 6:08 pm

I have installed: Visual Studio 2026 Office Developer Tools for Visual Studio 18.0.36609.00 Microsoft 365 Apps for business Excel Version 2512 (Build 19530.20144) An access violation occurs when starting a debug session of personal add-in I've built. The program '[42780] excel.exe' has exited with code 3221225477 (0xc0000005) 'Access violation'. Placing a breakpoint after the successful build and before the add-in is invoked by Excel does not trip, so the problem doesn't appear to be my code. I can install the add-in thru the debug folder using the .vsto file and it will operate normally. Am I missing some configuration or need to reinstall office?

Shadow rendering issue on Liquid Glass iOS 26.0 system UI elements

15 January 2026 @ 6:00 pm

On white backgrounds (at least this is when it's most clear) all ui elements that use Liquid Glass, system or custom using UIGlassEffectView, have a glitchy shadow effect for a half second when the VC they are in appears on screen when switching between tabs. I made a short sample project to showcase this issue with a video of the issue in the readme, but the code is basically just doing this while running iOS 26.x. let button = UIBarButtonItem(image: UIImage(systemName: self.barButtonSystemName)) navigationItem.setRightBarButton(button, animated: true) // and let effect = UIGlassEffect(style: .regular/.clear) let glassEffectView = UIVisualEffectView(effect: effect) view.addSubview(glassEffectView) first frames as view appears

Is it possible to use an HTML canvas as a CSS mask?

15 January 2026 @ 5:42 pm

I am working on a website, and I want to make the headings have an underline with an animated fog mask so random parts gradually fade in and out. Below is a mock-up of what I want to achieve: Animated GIF of a line with the effects described above. I was able to get pretty close to the effect I want using SVG feTurbulence filters as CSS masks, but it absolutely tanks the performance of the webpage. While looking for more performant options for creating animated image noise I found jwagner's simplex-noise.js project, which seems to be substantially more efficient than SVG filters as well as much more flexible. However, it uses the HTML <canvas> element, and I can't figure out how to make that element act as the CSS mask.

9920043 Message from SilverLake ACHFileInq field ValidConsmName

15 January 2026 @ 5:35 pm

Docs: https://jackhenry.dev/jxchange-soap/api-reference/core-services/achfileinq/ I'm sending the Consumer Name I was given but I'm getting an error about it being too long. <ACHFileInq> <MsgRqHdr> <jXchangeHdr> ... <Ver_5/> <ValidConsmName>TrialExxxxSxxxxxxxx</ValidConsmName> ... <MsgRec> <ErrCode>9920043</ErrCode> <ErrCat>Warning</ErrCat> <ErrDesc>The element's value is greater than the provider allows. Element was truncated.</ErrDesc> <ErrElem>MsgRqHdr.jXchangeHdr.ValidConsmName</ErrElem> <ErrElemVal>TrialExxxxSxxxxxxxx/TrialExxxxSxxxx</ErrElemVal> <ErrLoc>SetProviderValue</ErrLoc> <Ver_1></Ver_1> </MsgRec> I don't

Why partial sums doesn't improve performance on M2?

15 January 2026 @ 5:08 pm

I have a loop that counts the newlines in a string. I played with the loop unrolling and I saw an improvement in performance. Then I thought that the CPU won't be able to utilize its pipelining because I use the same register to count the new lines in every condition. So I tried to use 4 registers (x9-x12) to accumulate into them separately. And at the end I'd sum up the 4 register. But this resulted in 15% reduction in performance. Does M2 somehow figure out it can do partial sums w/o us explicitly doing it? Still, why the drop in performance? At least it should be the same. Here's the unrolled loop with the partial sums: .global _main .data line: .asciz "\nHlo\n world\n\n" lineEnd: msg: .asciz "Number of newlines: %lu\n" .text _main: mov w0, 0 ; int newLines = 0 mov x9, 0 mov x10, 0 mov x11, 0 mov x12, 0 mov x1, 1 lsl x1, x1, 30 start_repeat: ; repeat it ~1 billion times

How to read array size from over-allocated memory block?

15 January 2026 @ 4:25 pm

I am trying to understand how delete[] arr knows the size of arr. And read here about over allocation. When testing this char* a = new char[24]; char* b = new char; printf("a = %p\n", a); printf("b = %p\n", b); size_t n = *(size_t*)(a-8); printf("%zu\n", n); // also tried different format specifier, output is always 33 it shows that additional 8 bytes where allocated, but the value read from (a-WORDSIZE) does not make any sense to me. a = 0x7d7c2c0 b = 0x7d7c2e0 33 So my question is how can I read the number of elements in array/memory block from the pointer (if over-allocation is used)? Edit: As others pointed out, it is not guaranteed t

Need help regarding open source contribution as a beginner

15 January 2026 @ 3:51 pm

I am in a phase where I select a repo that is perfect for me. A problem arises when I pick an issue from the repo, then I go blank on how to approach it. So my main question is how to solve that issue, how to take help from AI, and how to break it down. Because my main fear is the flow, what if I break some critical flow that might break the whole app? And how do I understand the flow, such as whether the issue might be connected to several folders/files? I hope I am clear with my problem.

Suggest optimization for apache camel cartridge code

15 January 2026 @ 11:41 am

CartridgeException.java package com.example.transformation.cartridge; public class CartridgeException extends RuntimeException { public CartridgeException(String message) { super(message); } public CartridgeException(String message, Throwable cause) { super(message, cause); } } CartridgeYamlRouteRegistrar.java package com.example.transformation.cartridge; import java.io.InputStream; import org.apache.camel.CamelContext; import org.apache.camel.RoutesBuilder; import org.apache.camel.dsl.yaml.YamlRoutesBuilderLoader; import org.apache.camel.support.ResourceHelper; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.stereotype.Component; /** * Ensures cartridge YAML routes are loaded at runtime. *

provisioning-profile invisible devices, no add device [closed]

15 January 2026 @ 11:15 am

I am a beginner apple developer, I need help building my profile. I used to use Xamarin for development. When creating the provisioning-profile I can't add a device, probably because of xcode, because it says the device already exists. How can I unbind the device?