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.

BottomSheetFlatList Overflows and doesn't Scroll

14 December 2025 @ 10:44 pm

I'm using the @gorhom/bottom-sheet BottomSheetModal and trying to fit in a (BottomSheet)FlatList. The content overflows at the bottom and the FlatList is not scrollable. I have tried the recommendations in other questions to use flex: 1 in all components within the hierarchy but it didn't change the behaviour. I've also tried to use pure react-native Stylesheet instead of nativewind, but this didn't help either. The BottomSheetModal is within a reusable component like this: export const BottomSheetModalWrapper = forwardRef<Ref, ModalWrapperProps>( ({ children, snapPoints = [] }, ref) => { const renderBackdrop = useCallback( (props: BottomSheetBackdropProps) => ( <BottomSheetBackdrop {...props} disappearsOnIndex={-1} /> ), [] ); const insets = useSafeAreaInsets(); return ( <BottomSheetModal ref={ref} snapPoints={snapPoints} backdropComponent={rend

Debugging a c# xunit project with netcoredbg in neovim is skipping the breakpoints

14 December 2025 @ 10:36 pm

I'm using netcoredbg to debug xunit tests for a c# project in neovim. I'm getting this warning: "You are debugging a Release build of MIcrosoft.TestPlatform.Build.dll. Using Just My Code with Release builds using compiler optimizations ...... breakpoints will not be hit.... For some reason netcoredbg is using the actual dll's from the testing platform as if its part of my code and therefore doesn't hit the break points. I tried building the tests specifically using -c Debug. I treid dbugging with justMyCode set to true and to false. I'm using neovim on an arch distro. Here is my dap config: { "mfussenegger/nvim-dap", config = function() local dap = require("dap") dap.adapters.debugpy = { type = "executable", command = "/hom

acme.sh fails with "The domain EXAMPLE.COM is not a cert name" and "Cannot find path"

14 December 2025 @ 10:32 pm

I'm trying to issue a certificate, using the webroot challenge, and installing it to a custom location, and add a reload. I'm running the following command, where every directory mentioned is created already. DOMAIN=my.example.com acme.sh \ --issue --domain $DOMAIN --webroot /path/to/my/httpchallenge \ --install-cert --reloadcmd /path/to/my/reload.sh/$DOMAIN \ --cert-file /path/to/my/crt/$DOMAIN/cert \ --fullchain-file /path/to/my/$DOMAIN/fullchain \ --key-file /path/to/my/$DOMAIN/key But it errors with: [...] The domain 'my.example.com' is not a cert name. You must use the cert name to specify the cert to install. [...] Cannot find path: '/root/.acme.sh/my.example.com' Why?

How to remove breadcrum in my wordpress page?

14 December 2025 @ 10:30 pm

I would like to remove the breadcrumb (Home) at the top of the following page. I'm unsure if it is a WordPress setting or a specific theme (Salient) setting. I would love to avoid breadcrumbs on this page because it is not useful for navigation. I have the main content below the breadcrumb and it is there to stay.The image shows a breadcrumb at the top I would like to remove.

Google Sheets QUERY using sql to compare two date columns across sheets

14 December 2025 @ 10:28 pm

I'm trying to use QUERY sql to simplify a sheet of complex data in Google Sheets, and having trouble selecting by a date. This will require some explaining. The "raw-data" sheet has 2 rows for each billing cycle; one for gas and electric. I'm trying to flatten those into a single row on my "analysis" sheet using a QUERY to select the units consumed (T) by the billing date (G) and a static value of K. "raw-data" sheet: image of csv data, sorry I cannot translate it for screen readers In my "analysis" sheet, I've populated my A column with all of the unique values of the billing date (G) from the other sheet using =UNIQUE('raw-data'!G2:G) and this looks to be working as intended - I get a list of all the unique billing dates. "analysis" sheet

Mock not called by subprocess

14 December 2025 @ 8:05 pm

An instance of class A starts a sub-process that calls a method of an instance of class B. It works as expected in real-life, but unit tests fail because the mock object replacing the object of class B does not report being called. Minimal code: from multiprocessing import Process class Main: def __init__(self, mock): self._mock = mock process = Process(target=self.task) process.start() process.join() def task(self): self._mock.method() Tests: from unittest.mock import Mock from MinimalCode import Main mock = Mock(unsafe=True) def test_process(): main = Main(mock) mock.method.assert_called() Pytest result: _____________________________________________________________ ERROR collecting test_Process.py ______________________________________________________________ test_Process.py:9: in <module>

Parsing colons using macros in C++ without needing to write a parser DSL

14 December 2025 @ 5:27 pm

Im trying to make a language for a book library, and want to achieve this syntax. CREATE BOOK { NAME: "b1", AUTHOR: "me", } How can I use cpp and macros so when this is written in a c++ file then it translates to a c++ constructor that initializes a book? The problem i have seen is the colon, because macros can't pick it up.

How to elegantly handle datetime serialization in JSON

14 December 2025 @ 2:34 pm

How to handle  datetime object serialization in JSON (avoiding  TypeError: Object of type datetime is not JSON serializable )?

understanding debugger output stm32nucleof401re

14 December 2025 @ 2:21 pm

I am getting the following error (debugger output) when i try to do "ST_LINK: attach to application" in vscode. I have no idea what is going on. Any help is greatly appreciated. I use WSL ubuntu 22.04. My version of vscode is1.107.0 (user setup). Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage "configuration": { "name": "ST-Link: Attach to Application", "cwd": "/home/federico/bare-metal-series/app", "executable": "/home/federico/bare-metal-series/app/firmware.elf", "servertype": "stutil", "request": "attach", "type": "cortex-debug", "device": "STM32F401RE", "runToEntryPoint": "main", "interface": "swd", "showDevDebugOutput": "ra

Blazor - running method in program.cs throws an error "An unhandled error occurred"

14 December 2025 @ 10:22 am

I'm trying to create my first Blazor app for personal purposes, and I'm struggling with an error An unhandled error occurred that appears at the bottom of the page. I'm using Visual Studio 2022 and the Blazor WebAssembly standalone app template. Here is what causes this error to appear, but I don't understand why. In Program.cs, I want to create an object that I will add as a singleton so I can inject it later into pages that need access to it. The code shown here works fine: public static async Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add<App>("#app"); builder.RootComponents.Add<HeadOutlet>("head::after"); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); List<Portfolio> Portfel =