How can I read system information in Python on Windows?

Following from this OS-agnostic question, specifically this response, similar to data available from the likes of /proc/meminfo on Linux, how can I read system information from Windows using...

OS detecting makefile

I routinely work on several different computers and several different operating systems, which are Mac OS X, Linux, or Solaris. For the project I'm working on, I pull my code from a remote git...

Command line batch image cropping tool

is there any lightweight command line batch image cropping tool(Linux or Windows) which can handle a variety of the formats ?

Alternative to File.exists() in Java

I never thought it would happen to me, but I ran into my first bug in Java: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5003595 I'm pretty much in the same exact situation as described in...

How to decode a Windows CE call stack?

Desktop Windows OSs have a "StackWalk64" function, upon which Jochen Kalmbach made a library for decoding the call stack into something human-readable. I need a similar tool, but for Windows CE....

Library for cross-platform mapping of MIME types to file extensions and vice versa

TL;DR: The question is: Do you know of a cross-platform library that I can use from C++ to map MIME type(s) <-> file extension(s)? My application is supposed to handle image and video files...

Python append multiple files in given order to one big file

I have up to 8 seperate Python processes creating temp files in a shared folder. Then I'd like the controlling process to append all the temp files in a certain order into one big file. What's...

How do you convert an entire directory with ffmpeg?

How do you convert an entire directory/folder with ffmpeg via command line or with a batch script?

How can I find programatically where iexplore.exe is?

I need to run myApp.exe that in turn will launch iexplore.exe. What is the most robust, generic way (OS bit version agnostic) to do so? Can you point me to the right registry key /env var/other...

escaping special characters using sqlalchemy

I'm storing filenames and filepaths in mySQL. Retrieving them from the database using the LIKE expression requires that I escape all allowed filename chars that collide with mysql special chars. ...

PHP directory separators, forcing forward slash; non-intrusive

Whenever I work with PHP (often) I typically work on a Windows box, however I (try to) develop platform agnostic applications; one major point of issue being the use of directory separators. As...

Is it possible to find other nearby phones?

I'm writing an Android app that I would like to eventually port to iOS and Windows Mobile (though I know absolutely nothing about them right now). I'd like my app to be able to find other phones...

How to enable alignment exceptions for my process on x64?

I'm curious to see if my 64-bit application suffers from alignment faults. From Windows Data Alignment on IPF, x86, and x64 archive: In Windows, an application program that generates an alignment...

Is it possible to permanently set environment variables?

I need a way to set an environment variable permanently. I could get away with having this only work in Windows for now, but ideally i'd like a solution that is OS agnostic. From what I can tell...

Does dotenv contradict the Twelve-Factor App?

I have read about the Twelve Factor App's Config - Section III and searched for a way to do it in NodeJS. It seems that most people recommend dotenv to store configs in environment...

How processes share virtual mem (Linux)

I'm not sure if my question is a Linux one, or OS-agnostic. If I had three processes running (let's call them P0, P1 and P2), and they appear to the user to be running concurrently, how do they...

How to access Google Datastore API with credentials without using environment variables?

Currently I'm getting access to the API though the GOOGLE_APPLICATION_CREDENTIALS environment variable. I created and downloaded a service account key as a .json file and set the environment...

CMAKE_SYSTEM_PROCESSOR seems to be empty. What's the best strategy for OS agnostic way to set this?

I'm trying to set a bunch of CXX flags based on processor type. IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DAMD64") ELSE() STRING(FIND...

Hash from different files is always the same

I'm building an API which has a method that accepts a file via POST request. Based on that file, i need to create a hash on the file itself (not the name), check if the hash already exists and do...

How are MMIO, IO and PCI configuration request routed and handled by the OS in a NUMA system?

TL;DR How are MMIO, IO and PCI configuration requests routed to the right node in a NUMA system? Each node has a "routing table" but I'm under the impression that the OS is supposed to be unaware...

Generic Node.js $INIT_CWD for Windows and *nix

How can I replace $INIT_CWD in a Node.js run script with something "generic" that also works on Windows? package.json in root { "name": "foo", "version": "2.0.0", ... "scripts": { ...

Docker python3.8 alpine python-ldab installation fails missing lber.h

I am trying to pip install python-ldap in Docker but am missing lber.h. I need python-ldap because I am trying to implement an OS agnostic SSO for my application, following this for now and hoping...

Disable only warning D9024 (unrecognised file type; object file assumed)

I have an OS-agnostic makefile (ugh, I know) which supports both GNU and MSVC compilers (among others). It always generates .o object files when compiling, even when compiling for MSVC (which...

Using Webviews in Flutter

I have a very complex Cordova app on Android that I have developed over a period of over a year. The app uses one custom, i.e written by me, Cordova plugin. A I consider a port of the app to iOS...

OS-agnostic relative path using pathlib

I have a string variable dirname, that contains path with correct slashes ('/' if on Linux, '' if on Windows). And I have a relative filename string that may contain wrong slashes. How do I join...

StringIO for directories: How to create in-memory directory in Python

How can I create an in-memory directory in python, like how StringIO creates in-memory files? I'm trying to verify the signature of a file using python-gnupg. I want to create a gnupghome...

Realtime yolov5 detection with Desktop screen as input

I have a script that grabs an application's screenshot and displays it. it works quite nicely on my machine like a video with around 60FPS. import os os.getcwd() from PIL import ImageGrab import...

How do I add custom emmet snippets in VSCode?

As per october 2020 changelog it's possible to add custom snippets for VSCode. Let's say I have snippets.json located in workspace\configs\emmet with the content like this: { "html": { ...

Is using C++20's std::popcount with vector optimization is equivalent to popcnt intristic?

C++20 introduces many new functions such as std::popcount, I use the same functionality using an Intel Intrinsic. I compiled both options - can be seen in Compiler Explorer code: Using Intel's...

Are the C++ Standard Library File stream operations crippled in Microsoft?

I'm asking this question because I have been working on a project that requires collecting a lot of data REALLY fast, depending on the scenario. 5.7GBytes with a capital BYTE per second or...