47,545 questions
2
votes
1
answer
198
views
Is there a way to determine IP address family contained in `std::string`?
I've got a class UdpPeer with setters:
class UdpPeer {
struct sockaddr_storage addr;
socklen_t;
public:
void setAddr(struct sockaddr_storage const& addr, const socklen_t addrlen);
...
0
votes
1
answer
72
views
csh script calling some .sql scripts but not others
I have a csh script set up to run multiple .sql scripts within SQLPLUS.
It is running some scripts, but not others.
The scripts all work as expected when run individually in SQLPLUS, so I know the ...
Best practices
4
votes
0
replies
135
views
What are best practices for using AI tools in production without over-relying on them?
I’ve been integrating AI tools (mainly large language models) into parts of our workflow things like content drafting, code suggestions, and internal automation
While the productivity boost is real, I’...
5
votes
1
answer
168
views
How do I set redirected pipes to be non-buffered so I can use system() multiple times?
TLDR: I need to make unix pipes non-buffered so one subprocess can run multiple execs.
Hello, this is for a school assignment on UNIX pipes that I am having trouble with.
We are asked to make a 3 ...
3
votes
1
answer
107
views
Are contents within parentheses executed last?
I came across this line in my homework:
(cat "$@" 2>&1 >&3 | tr a-z A-Z >&2) 3>&1
Is the 3>&1 executed first to create a file descriptor 3 pointing to ...
Advice
0
votes
11
replies
79
views
How do you use files with spaces in a (Linux)for?
I use Cygwin under Windows. Under windows I have created files with spaces in them. I would like to remove the spaces. There are enough files so that doing them individually is impracticable. I have ...
0
votes
0
answers
62
views
RPC communications in Mattermost plugins and Apache-APISIX plugins, Is RPC only for Golang - Golang?
I’m trying to understand how plugin systems differ between Mattermost and Apache APISIX, specifically in how they use RPC for external plugins.
Mattermost plugins must be written in Go. The server ...
0
votes
1
answer
202
views
Deploying chaincode failed, socket is broken
We are running a Fabric test network on an Ubuntu virtual machine. The test network starts up fine using:
./network.sh up createChannel -ca
However, it fails when deploying chaincode. The chaincode ...
1
vote
0
answers
73
views
Resource colors for XmContainer and XmScrolledWindow
I have the following structure:
XmScrolledWindow -> XmContainer
I am struggling to identify which resources control:
a) the border that surrounds the XmContainer when scroll bars are required. ...
2
votes
0
answers
78
views
How to display a label as message window in Motif MainWindow
I want to use the Motif MainWindow using:
A container as work region
A label as message window.
But the label is not shown.
My expectation is that it would be shown below the container (work region)....
2
votes
5
answers
225
views
Using a function to format any list of PATHs
I have this alias to format $PATH into one line per path:
alias path='sed ''s/:/\\n/g'' <<< "$PATH"'
I tried to specify the env var to list, like path $MANPATH but still with a ...
4
votes
1
answer
120
views
How to copy sparse files in Python so that both source and destination have identical size?
The following example script does the following:
Uses truncate to create a 200MB sparse file in /tmp/example/1/sparse.
Uses shutil.copy2 to copy the newly created file to /tmp/example/2/sparse.
Uses ...
0
votes
1
answer
78
views
Error while replacing a variable with a logic in UNIX
I am running below in UNIX,
UOW="20251013115437"
echo ${UOW}
UOW_STR=${UOW:0:4}"-"${UOW:4:2}"-"${UOW:6:2}" "${UOW:8:2}":"${UOW:10:2}":"${UOW:...
4
votes
1
answer
163
views
Is futex essentially an unique integer? any way to expose it by user space code?
So I once learned that UNIX futex is in essence an unique integer, is this statement correct and complete?
If that is true, can I somehow take advantage of it to help avoid deadlock by always locking ...
0
votes
1
answer
52
views
Generic/multi-FS alternative to the XFS_IOC_RESVSP64 ioctl?
The XFS filesystem has (or used to have) a IOCTL named XFS_IOC_RESVSP64 for reserving space: You called it with a given file descriptor, and the XFS driver reserved an amount of space use by for your ...