Comment by Hasturkun on Simple TBB example where tbb::affinity_partitioner...
At a glance, it doesn't look like you're keeping the same affinity_partitioner object between loops, so you're possibly not getting any benefits from its use.
View ArticleComment by Hasturkun on How to print contents of register in c
This doesn't answer the question in any way.
View ArticleComment by Hasturkun on how can I install tensorflow for gpu use with RTX...
Please [edit] your question to specifically and clearly define the problem that you are trying to solve. Additional details — including all relevant code, error messages, and debugging logs — will help...
View ArticleComment by Hasturkun on Non-ascii email address with Java & AWS SES
AFAICT, you're probably encoding incorrectly. Only the domain name is meant to go through conversion. Your passing of the whole string through it likely corrupts the actual local name (i.e. everything...
View ArticleAnswer by Hasturkun for Perl and environment variables
Perl keeps its environment variables in %ENV. In your case, you can change your code like so:my $first_col = $ENV[$cols[0]];
View ArticleComment by Hasturkun on Is there a method for getting a keyboard input thru...
Your wait_for_keypress is also reading the keyboard data port (0x60 instead of 0x64), so might be discarding your actual input (unless this is a typo in the question).
View ArticleAnswer by Hasturkun for If the Linux kernel reassigns a PID, can this cause...
Your next attempt to lock the mutex, by whichever process or thread that tries it will succeed with EOWNERDEAD (after which that thread should call pthread_mutex_consistent).The mechanism that handles...
View ArticleComment by Hasturkun on proc_get_parent_data() Linux Kernel
In kernel 5.10 the proc_get_parent_data function is exported as GPL only. Your module likely isn't GPL, so can't access this.
View ArticleComment by Hasturkun on Linux kernel networking does not pass packet with IP...
Have you already try setting IP_ROUTER_ALERT on a userspace raw socket? (though note that would make it so the kernel doesn't forward the packet itself and it will be your responsibility to send it)
View ArticleAnswer by Hasturkun for Display two files side by side
You can use pr to do this, using the -m flag to merge the files, one per column, and -t to omit headers, eg.pr -m -t one.txt two.txtoutputs:apple The quick brown fox..pear foolonger line than the last...
View ArticleComment by Hasturkun on I need to download files from my email that contain...
The lack of proper code formatting makes it difficult for readers to help you. Please [edit] your question to format inline code properly and to use a code block for any code or error messages you have...
View ArticleComment by Hasturkun on MATLAB: Error in surface fit Why is this code not...
The lack of proper code formatting makes it difficult for readers to help you. Please [edit] your question to format inline code properly and to use a code block for any code or error messages you have...
View ArticleAnswer by Hasturkun for How to create a program to list all the USB devices...
You can adapt USBPrivateDataSample to your needs, the sample sets up a notifier, lists the currently attached devices, then waits for device attach/detach. If you do, you will want to remove the...
View ArticleComment by Hasturkun on std::jthread runs a member function from another...
@KennethCornett: It should. In any case jthread expects the passed callable to (possibly) accept an std::stop_token as its first argument (otherwise the stop token won't get passed). I don't think...
View ArticleComment by Hasturkun on Can I create a fake file handle which is implemented...
It's a bit mean/violent, but you have the option of hijacking the API with something like Detours, having it give special handling to certain HANDLEs.
View ArticleComment by Hasturkun on Is it possible to use an empty header value in...
One variation it doesn't look like you tried is "EmptyHeader01: \r\n", i.e. Having the value be a space (to be stripped) and nothing else.
View ArticleAnswer by Hasturkun for Executing sed via execvp makes other pipes blocked
For each of your sort and sed forks, the other fork is keeping file descriptors for the other's process's pipes open (as forked children inherit file descriptors).Since sort's STDIN is still open (and...
View ArticleAnswer by Hasturkun for git replace file content in history
Here's a tiny script I wrote using filter-repo to replace a single file's contents, inspired by insert-beginning from the git filter-repo contrib scripts.#!/bin/bashSRC_FILE="$1"TO_REPLACE_PATH="$2"git...
View ArticleComment by Hasturkun on Is it possible to map the same physical memory to...
Try creating a memfd with memfd_create() instead of a temporary file (on Linux).
View ArticleComment by Hasturkun on find all offsets of pcre2 matches
You might want to look at the pcre2demo source, it has an example of how to emulate Perl's /g flag, finding all matches.
View Article