Python, installing clarifai –> VS14.0 link.exe failed with exit status 1158

I had a similar problem today, and I solved it referring to Visual Studio can’t build due to rc.exe. To fix the issue, do next steps: Add this to your PATH environment variables: C:\Program Files (x86)\Windows Kits\10\bin\x64 Copy these files rc.exe & rcdll.dll from C:\Program Files (x86)\Windows Kits\8.1\bin\x86 to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin … Read more

How to kill process inside container? Docker top command

When I reproduce your situation I see different PIDs between docker top <container> and docker exec -it <container> ps -aux. When you do docker exec the command is executed inside the container => should use container’s pid. Otherwise you could do the kill without docker straight from the host, in your case: sudo kill -9 … Read more

CMake command line for C++ #define

I managed to do it this way now: I was able to convince everybody to add the following lines to the common CMakeLists.txt: IF (NOT DEFINED _MYDEFINE) SET(_MYDEFINE <default value>) ENDIF() ADD_DEFINITIONS(-D_MYDEFINE=${_MYDEFINE}) (No it is not really called “MYDEFINE”, and <default value> is just a placeholder, I just replaced all that for this example) This … Read more

How to determine if Python script was run via command line?

If you’re running it without a terminal, as when you click on “Run” in Nautilus, you can just check if it’s attached to a tty: import sys if sys.stdin and sys.stdin.isatty(): # running interactively print(“running interactively”) else: with open(‘output’,’w’) as f: f.write(“running in the background!\n”) But, as ThomasK points out, you seem to be referring … Read more

How to stop/start IIS 7 application through command line?

http://www.windowsnetworking.com/articles_tutorials/Configuring-IIS-7-command-line-Appcmdexe-Part1.html Put this into a file with .bat extension. @echo off appcmd start sites “site1” appcmd stop sites “site2” Update Just ensure that appcmd is available anywhere by adding %windir%\system32\inetsrv\ to the PATH environment variable of your system. Alternatively, you can use the full path to appcmd.exe in the batch file.

Spring console application configured using annotations

Take a look at the Spring Reference, 3.2.2 Instantiating a container. In order to use Spring in console application you need to create an instance of ApplicationContext and obtain Spring-managed beans from it. Creating a context using XML config is described in the Reference. For completely annotation-based approach, you can do someting like this: @Component … Read more