Skip to main content
Filter by
Sorted by
Tagged with
Best practices
1 vote
1 replies
91 views

Basically given the following context, what is the best practice? signal<MyCustomType | null>(null) signal<MyCustomType | undefined>(undefined) According to Null vs. Undefined : ...
dorian.naa's user avatar
Advice
1 vote
6 replies
183 views

I am writing a C program where I have many tasks to perform periodically (every second). There can be less CPU threads available than the number of tasks. I can just create a separate thread for each ...
Programmer_2147483647's user avatar
0 votes
1 answer
170 views

Multiple pages on the Internet, including answers to this SO question and this page from a training company, say that you should handle Ctrl-C in python with code similar to: import signal import sys ...
Michael Firth's user avatar
Best practices
0 votes
4 replies
128 views

Currently, we need to migrate all Reactive Forms forms in the project to the new Angular 21+ Signal Forms. The form is very complex, multi-level, with FormGroups within FormGroups, etc. Therefore, we'...
ZeiramMe's user avatar
1 vote
2 answers
174 views

I modified my previous question in order to more focus. I am investigating a race condition in a legacy multi-threaded application and would like to understand if our findings point to the root cause. ...
lavi regev's user avatar
0 votes
2 answers
146 views

Just learning signal forms and I'm trying to extend the functionality of the new FormField directive in angular 21 to add some custom classes to show valid/invalid states on my input. So, here's what ...
Drunken Daddy's user avatar
0 votes
2 answers
103 views

I have a moderately sized angular app with an edit control (edit, save, cancel) used throughout the app that controls permissions, view state/etc. There can be multiple instances of this component in ...
Shawn's user avatar
  • 2,382
Best practices
0 votes
2 replies
65 views

I’m working on a project using Angular 17+ Signals and I’m looking for some advice on the best way to expose data from a service to multiple different forms. I have an API that returns a settings ...
user2288270's user avatar
0 votes
0 answers
77 views

Maybe I'll rewrite this to python as I understand the error handling in there a bit better but I'm curious why the behavior is different when it's running as a pipeline vs not: function args.or.stdin ...
jaksco's user avatar
  • 588
0 votes
1 answer
109 views

According to the Python documentation, the signal.signal call can only be called from the main thread, and signal handlers will run in the main thread. to my understanding, unless the signal handler ...
petersohn's user avatar
  • 11.9k
3 votes
1 answer
121 views

Complete error : effect() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with runInInjectionContext I have a simple ...
davood beheshti's user avatar
-1 votes
1 answer
88 views

I am implementing a modern state management pattern in Angular (version 16+) where a dedicated service acts as a state facade, integrating traditional RxJS asynchronous operations with the new Signals ...
michelemalagnini's user avatar
2 votes
2 answers
96 views

Given volatile int stopping = 0; void handler(int) { stopping = 1; } int main(int, char **) { pthread_sigmask(BLOCK, [INT], ...); pthread_create(); pthread_sigmask(UNBLOCK, [INT], ......
Simon Richter's user avatar
0 votes
1 answer
80 views

I'm using prctl(PR_SET_SYSCALL_USER_DISPATCH, ...) to enable Syscall User Dispatch with a SIGSYS handler that gets called when the application issues any syscall. The prctl() call also marks the code ...
patraulea's user avatar
  • 1,014
-1 votes
1 answer
116 views

I have a 10 second signal of a pure 50 Hz sine wave sampled at 40.96 kSa/s (409,600 samples). I apply a Hanning window and the magnitude plot of my (numpy) FFT shows (ignoring negative image ...
Maxim's user avatar
  • 1
1 vote
0 answers
60 views

My app uses a facade service (singleton injectable) with signals for state management and RxJS for API calls. I'm experiencing an inconsistent UI update problem with a table after a successful create ...
Devcat's user avatar
  • 11
0 votes
1 answer
143 views

I'm having troubles understanding the behaviour of the following application. There are 3 threads: worker thread with an infinite loop which locks the mutex, modifies a global variable but in the end ...
Sterpu Mihai's user avatar
0 votes
1 answer
174 views

I have some signals that are generated through logic within my indicator. They are plotted as “dots, triangles, or arrows” or other shapes. What I wanted was a way to “monitor” the indicator signals. ...
Stonks's user avatar
  • 21
1 vote
1 answer
120 views

Take this simple program in Haskell {-# LANGUAGE OverloadedStrings #-} import Control.Exception (finally) import Control.Monad (forever) import Xmobar (tenthSeconds) import DBus.Client startServer' :...
Enlico's user avatar
  • 30.8k
1 vote
1 answer
123 views

I'm creating a Gtk4 app in python 3 and I want to trigger a state change when the user mouses over the ApplicationWindow but I'm banging my head against a wall trying to figure out what signal string ...
Ardemus's user avatar
  • 41
5 votes
1 answer
93 views

Kindly consider the following dockerfile that uses bash image and runs a bash to trap QUIT and then shows that QUIT trap. It should show the string "something". ARG VERSION=latest FROM bash:$...
KamilCuk's user avatar
  • 147k
1 vote
1 answer
166 views

So I am trying to understand if I am missing anything about calling futex_wait inside a signal handler for a SIGSEGV access violation. Ostensibly, it is not on the list of async-signal-safe calls, ...
Spiff's user avatar
  • 35
0 votes
1 answer
156 views

I have a computed in my signal store, which should react on a value change but it just fires 1 time at creating and not when signal values are changing const initialData = { gridItems: [] as ...
andy's user avatar
  • 53
2 votes
1 answer
130 views

I have multiple threads performing sigwait on the same signal, and the main thread will wake specific thread up via pthread_kill. On Linux the program runs fine, but on MacOS the wrong thread will be ...
Guest0x0's user avatar
  • 306
5 votes
2 answers
292 views

I'm trying to revive Hemlock, which now appears abandoned (original author has been absent for some time now). Mostly this has been a straightforward process of clearing out the bit rot, but I'm now ...
CL-USER's user avatar
  • 848
0 votes
0 answers
28 views

I have a problem with add_basemap from contextily. (I'm new to this to be honest) I use fastapi in docker with workers=4, and contextily to make images. In random time it die add_basemap (I don't know ...
Nick's user avatar
  • 1
1 vote
0 answers
110 views

I'm attempting to build the libsignal project using wasm-pack to target WebAssembly for a frontend integration. Specifically, I'm trying to build the libsignal-protocol crate individually rather than ...
Viral Parmar's user avatar
0 votes
1 answer
60 views

I have a client server app where things can happen asynchron, including the server disconnecting and reconnecting. The app has a LED indicator (label with green/red icon) that shows the server ...
Goswin von Brederlow's user avatar
1 vote
1 answer
88 views

My main file for a pyqt application looks like this: #!/usr/bin/env python3 from PyQt5.QtWidgets import QApplication import signal import sys from main_window import MainWindow if __name__ == "...
spraff's user avatar
  • 33.8k
5 votes
1 answer
159 views

Context : I am making my own cloud save manager for my non steam games, I am in the process of implementing a wrapper that launches games but also loads file from the cloud before opening and when you ...
Tima_ben's user avatar
3 votes
0 answers
311 views

I want to make a redirect after executing API request (on success) in signal store method. I have 3 "solutions": Use callback, but I don't feel it. Use rxMethod, patch state within ...
Tomasz Piątek's user avatar
1 vote
1 answer
548 views

Our use case: in a component, we compute queries for data that should be fetched based on some config. I tried creating rxResource() within a compute to get the data - but also loading status and ...
Peter T.'s user avatar
  • 3,523
3 votes
1 answer
80 views

The signal handler passed in sa_sigaction to sigaction receives an int signal id as parameter, but the context info received as second parameter contains the signal id as field again. Is there a good ...
feldentm's user avatar
  • 206
2 votes
1 answer
116 views

I'm testing Unix signal behavior in C and noticed something odd. When I press Ctrl+C (sending SIGINT) multiple times quickly while the handler is still running (it sleeps for 3 seconds), only two ...
soufiane Lasfar's user avatar
1 vote
1 answer
300 views

I'm using a signal store as follows. It works as supposed to, except for the error handling. The initial load works correctly and communicates the error to the consuming component. However, there ...
Konrad Viltersten's user avatar
1 vote
1 answer
179 views

In Vega or Vega lite, I want to create a stacked area chart where I can change the field used to color the visualization. Here is an example visualization. In this example, I would like to be able ...
Jay Askren's user avatar
  • 10.5k
0 votes
1 answer
305 views

I have a DataHandler service that calls a database service and returns the value to the calling component. The database service returns an observable of an array, while I'd like the data handler to ...
Otto Abnormalverbraucher's user avatar
0 votes
2 answers
287 views

I am working on a python3 script that handles signals (e.g. signal.SIGWINCH) by putting them in a queue. A separate thread puts user input into that same queue, which is all processed by my program's ...
ShawnM's user avatar
  • 3
0 votes
1 answer
58 views

I'm defining a Qt signal in a separate class derived from QObject for use in a QRunnable worker. The signal is emitted once by the worker as it completes. When creating two workers, the signal is ...
mins's user avatar
  • 7,858
1 vote
1 answer
60 views

I'm trying to handle a QML/JavaScript situation where the user presses the delete key. For some reason, Keys.onDeletePressed: {} is not firing. I am getting the signal for onEscapePressed, ...
briansc's user avatar
  • 25
0 votes
1 answer
298 views

I am working with NgRx Signal Store in an Angular project, and I need to make one store DashboardStore reactively call a method when a property in another store FilterSelectionStore updates. Use Case: ...
RAHUL KUNDU's user avatar
  • 1,097
4 votes
0 answers
100 views

There is a limited number of functions that POSIX defines as async-signal safe. See here. This includes some fundamental functions such as write. Since this is really a C standard (since unix is built ...
Daniel's user avatar
  • 391
1 vote
1 answer
523 views

I have this decorator in python 3.11 that sends a signal encoding the arguments to a function call that it decorates, here: def register_action(signal=None): def decorator(func): def ...
KBriggs's user avatar
  • 1,498
2 votes
2 answers
294 views

In my store feature, if I define a method in the withMethods, then in the later defined withComputed, I can't seem to call one of these methods from a computed value. Is this supported?
Ethan SK's user avatar
  • 895
0 votes
0 answers
111 views

I have an application where I need to print a some things to stdout and stderr inside a signal handler. The only safe way I can do this is with the write system call (I am on Linux). However, I am ...
hsimpson1357's user avatar
1 vote
0 answers
192 views

Angular Signal Store state resets to initial values when navigating between components, despite being provided in 'root'. I'm using patchState to update the store. Why isn't the state persisting ...
Rebai Ahmed's user avatar
  • 1,630
0 votes
1 answer
75 views

I have a task to simulate a sequence of rectangular pulses. As a result, I wrote Python code, but the end results are not encouraging. #!/bin/python import numpy as np from numpy.fft import fft ...
Varga's user avatar
  • 49
2 votes
1 answer
59 views

I'm working on a self-guided exercise to learn about JS signals. I'm following this blog post, but I'm trying to rewrite the code in TypeScript to better understand it. While I've managed to get the ...
Jumscrafteur's user avatar
0 votes
0 answers
56 views

Description: I have a process that consumes a large amount of memory (+100GB RSS). There's a usage by huge pages, but most of the memory is allocated in a naive way via malloc(). When this process ...
dimba's user avatar
  • 27.9k
2 votes
1 answer
608 views

To specify a timeout of a fetch request, we can use a AbortSignal.timeout() signal: await fetch(url, { signal: AbortSignal.timeout(10 * 1000), }); But this is just a standalone signal, not a ...
Alex's user avatar
  • 66.7k

1
2 3 4 5
153