Long paths in Python on Windows

Well it seems that, as always, I’ve found the answer to what’s been bugging me for a week twenty minutes after I seriously ask somebody about it. So I’ve found that I need to make sure two things are done correctly: The path can contain only backslashes, no forward slashes. If I want to do … Read more

How to start psql.exe

You don’t run some psql.exe file, but the file C:\Program Files\PostgreSQL\10\scripts\runpsql.bat , for example programmatically, e.g. from AHK: run, “C:\Program Files\PostgreSQL\10\scripts\runpsql.bat” Then you get a generic Windows command window which asks you the right questions (see above) and, when answered correctly, gives you the psql command prompt.

Passing around multi-line strings

You can create directly multiline strings with the caret (one empty line is required). setlocal EnableDelayedExpansion set multiLine=This is a ^ multiline text^ line3 echo !multiLine! Or you can create first a newline character. setlocal EnableDelayedExpansion set LF=^ rem Two empty lines are required set multiLine=This is a!LF!multiline text!LF!line3 echo !multiLine! An explanation how this … Read more

Windows 7 Taskbar Progress Bar in Java

I found out that this feature is included in Java 9. It is part of AWT and it is quity simple too use. Here is short example: import java.awt.Taskbar; import java.awt.Taskbar.State; import javax.swing.JFrame; import javax.swing.WindowConstants; /** * @author fxl */ public class TaskbarSample { public static void main(String[] args) { // JavaDoc: // https://docs.oracle.com/javase/9/docs/api/java/awt/Taskbar.html // … Read more

Invalid syntax with setx

Your path to the Ogre SDK has a space character in it, which is interpreted as a delimiter to another argument. Surround your path with ” to keep it as one single argument to setx: setx OGRE_HOME “D:\Program Files\OgreSDK” To see the current value of the OGRE_HOME environment variable: echo %OGRE_HOME% You may have to … Read more

How to make Windows key the IntelliJ IDEA Command/Meta key under Windows?

Here’s a workaround that works partly. In IDEA do the following: Help -> Edit Custom Properties… In the file that opens, add this on a new line: keymap.windows.as.meta=true Choose your Mac keymap under File -> Settings… -> Keymap. For example, “Mac OS X 10.5+”. If you use a Windows keyboard and you want the same … Read more