I’m trying to generate some MD5 hashes with openssl for use with chpasswd Ex. CSV file: Script I created: However, if I take any MD5 generated from this script and try to use it with chpasswd it does not work. This password will fail If I try to do this without the script by hand it works: Answer Your C…
CPU and HDD information
I searched but I found nothing for my problem. I would like to have in Linux command line the information about the CPU usage and the local HDDs with formatting text like exactly as the examples below for my program. These examples are command line outputs on MS-Windows. I hope it is possible on Linux, too. T…
Compile Linux project in Visual Studio 2008 [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 years ago. Improve this question I have a project in Linux, but it’s cross platform code. How can I c…
MacOS Create a Process in suspended state
Use-case Create a new process ( running an arbitrary application ) in suspended mode ( using eg. exec ) Process created ( MachO loaded ) but no single line of code executed Do some stuff w/ the suspended process memory Resume the process On windows, once can use CreateProcess in conjunction with the “CR…
After update linux to version 4.2, Java write “Failed to write core dump”?
I work on one programm, that need to java 7. But when I update archlinux to 4.2 (from 4.1) ,when I start the programm, java write me: Java not update!! What happend with java and what do I need? EDIT: I found, when start the programm, he added keys -J-XX:PermSize=200m -J-XX:MaxPermSize=256m. When I delete th…
Linux – Get the start and end of the stack memory for a thread
I am trying to port something to Linux. My original code (for a RTOS) looks like: Later the stack and stackSize are used by the garbage collector and to get some thread statistics. Now, how do I convert the above code to Linux? Answer You should use Pthread: http://www.manpagez.com/man/3/pthread_attr/ http://…
Using a shell commands in c++
Here’s a terminal command: Here’s my code: The above code, when run, returns this message: How can I place the ‘/’ symbol, for this command to work correctly? Answer Your problem is not in C++. You are invoking your command with popen, and popen runs your command in sh shell, that does…
Platform specific code in Eclipse
We’re developing a java desktop/Eclipse RCP application with a graph-layout component. We faced issues with the GUI scaling on newer(8, 8.1, 10) versions on windows, it appeared that one can only retrieve the scaling factor through win32 api calls, so we added a little DLL that does this and call it thr…
Sed replace all matches after some patterns
I want to replace all B after ‘=’. The expected result should be But I got this result: Only the last matched pattern be replaced. How to resolve it? Answer Use this sed: Test:
Linux SDL2 application no transparency outside Code::Blocks IDE
I have some strange problem, origins of which I don’t understand. I have an SDL2 application built and working on Windows, and now I’m trying to build a Linux version. I am using Code::Blocks on both systems. After I set up all the paths and libraries in Code::Blocks on Linux, it builds and runs n…