I have created an ASP.NET application that connects to microsoft sql database and needs a password for that. When running the application under Windows it takes the password from secrets.json file located in C:Users<user>AppDataRoamingMicrosoftUserSecrets<UserSecretsId> When running under Docker I am unable to find out where I should put the secrets.json file. I tried /root/.microsoft/usersecrets/ as it seemed to work for
Tag: c++
clear a Pipe in C
I’m sending data from one process to another pipe and I want to clear the pipe after reading. Is there a function in C that can do this ? Answer Yes. It’s just the read function offered by the stdio library. You have to invoke it as many times as you need in order to be sure the pipe will
C++ + linux handle SIGPIPE signal
Yes, I understand this issue has been discussed many times. And yes, I’ve seen and read these and other discussions: 1 2 3 and I still can’t fix my code myself. I am writing my own web server. In the next cycle, it listens on a socket, connects each new client and writes it to a vector. Into my class
Usage of getc with a file
To print the contents of a file one can use getc: How efficient is the getc function? That is, how frequently does it actually do operating system calls or something that would take a non-trivial amount of time? For example, let’s say I had a 10TB file — would calling this function trillions of times be a poor way to
issues using waitpid() with large number of child process
I have a c program to create a TCP socket and keep waiting for a connection in an infinite loop. Each time a client connected to the program, I would spawn a new child process to handle the client request. My program could only exit with signal interrupt (e.g. ctrl+c). I don’t want the parent process hanging there and wait
Text-cursor position handling in C (under Linux)
I’m trying to reposition the text-cursor to top left corner of the console each frame, so the resulted square rendered at the same position I found that this is possible in windows by including <windows.h>: How can I do that in Ubuntu? Answer [update] Oops, sorry, I didn’t notice the “[C]” tag and my answer was only referring to shell
Read a file that’s constantly updated (C++)
Let me start with saying that I’m around 3 days old in C++. Ok to the main question, I have a file that spans multiple lines, and I’m trying to print one specific line repeatedly, which is subject to change arbitrarily by some other process. Example file : I’m trying to print the middle line (one that starts with somevar).
How can I cause a “initscr” break with ncurses?
I know this is a weird question, but I want to get the “initscr” function error mentioned by the doc (getting invalid pointer and an error message on stderr) to test if a wrapper works properly. But I don’t find any information about that. I’m currently working with ncurses 6.2. After few research, I have found that the invalid pointer
OpenCV 2.4.11 Compilation For ROS ORB_SLAM2 Fails
I am trying to get orb_slam2_ros to compile and it needed an OpenCV version higher than 2.3. I have 4.2.0 but it doesn’t work but according to ROS, it has been tested to work on 2.4.11. Here is what I did: Download the source zip file. Extract it. Go into the directory and create a build folder. Go into the
dlopen Segmentation fault error when get a instance from shared library’s exported function
I have been stuck in a problem for several days when using dlopen/dlsym to deal with the shared object. I desperately need your help! There are three headers/source files: Animal.h, Animal.cpp and test.cpp, and two products: libanimal.so and a.out. Here is the source code: Animal.h: Animal.cpp and the last one test.cpp which contained the main entry of the application: First,