Skip to content
Advertisement

Is there a library and header to use to access EWMH/NetWM functions?

I need to get similar information on the current windows and virtual desktops as that provided by the command-line app wmctrl. I s there some (C/C++) API header & lib-files that I can use? Answer Download the source code of wmctrl and study it. If you are making some free software with the same or compatible GPLv2 license you could

split for words separated with semicolon

I have some string like 1;2;3;4;5 I want to be able to iterate over this string taking each word one by one. For the first iteration to take 1 the next to take 2 and the last 5. I want to have something like this but I do not know how to fill the myvar Answer

How do I get my CUDA specs on a Linux machine?

I’m accessing a remote machine that has a good nVidia card for CUDA computing, but I can’t find a way to know which card it uses and what are the CUDA specs (version, etc.). I used the “lspci” command on the terminal, but there is no sign of a nvidia card. I’m pretty sure it has a nVidia card, and

What is the difference between NPTL and POSIX threads?

What is the basic difference between NPTL and POSIX threads? How have these two evolved? Answer POSIX threads (pthread) is not an implementation, it is a API specification (a standard, on paper, in english) of several functions whose name starts with pthread_ and which are defined in <pthread.h> header. POSIX is also a set of specifications. NPTL is now inside

wget: downloaded file name

I’m writing a script for Bash and I need to get the name of the downloaded file using wget and put the name into $string. For example, if I downloading this file below, I want to put its name, mxKL17DdgUhcr.jpg, to $string. Answer Use the basename command to extract the filename from the URL. For example:

Permanently Change Disassembly Flavor in GDB

How can I permanently change the disassembly flavor in GDB. I tried:set disassembly-flavor intel in GDB, but when I fire up GDB later it still has the att flavor. Answer gdb executes a ~/.gdbinit file when it starts, if present; you should be able to add the line to it.

Tomcat is running but 8080 port is not responding

I have installed sun jdk 1.6 x64 and tomcat in a linux x64 machine through ssh, I don’t have root privileges so I installed both in my home dir. I managed to successful run tomcat but if I try to enter mydomain.com:8080 there’s no answer from the server. With this command: I checked the port and it is LISTENING Any

Advertisement