I am currently reading the Linux Module Programming Guide and I have stumbled onto two terms that have confused a bit – device files and device driver. Upon goggling these terms I have come across the following- A device driver is a piece of software that operates or controls a particular type of device…
Tag: linux
Build Qt application for Linux in Windows using Qt Creator
I want to run a Qt application in Linux which is compiled on Windows using Qt Creator. I tried googling but I did not get any answers regarding Qt creator. I found for Visual studio. Can anyone please let me know if this can be done in Qt Creator in Windows7 ? Do I need to install any other compilers
F_SETPIPE_SZ undeclared
I have included following headers: I have also tried to use before #include <unistd.h>, but it also does not help. I try to use fcntl and pass it F_SETPIPE_SZ as second argument, but I keep getting this error message: error: ‘F_SETPIPE_SZ’ undeclared (first use in this function) I actually found out tha…
Crontab not starting command on reboot
I need a command to run at reboot. This command is called script.sh This command pipes input to a python program I wrote called test.py. The problem is the program is not running when I check the processes.The syslog file states that it started the command on reboot, but it is not running. my crontab entry lo…
0 NATIVE_LIBRARY_NAME cannot be resolved or is not a field with Linux + Eclipse + Java
I get an error on Core.NATIVE_LIBRARY_NAME like so: Stacktrace: I had settled the NativLibrary path at the following location. /home/…/OpenCV/opencv-2.4.5/build/lib I had followed the instruction on https://www.openshift.com/blogs/day-12-opencv-face-detection-for-java-developers but it doesn’t cre…
Plot .tif GDAL raster using matplotlib Basemap
I have a bit of code from here that I am using for plotting a geotiff image (Landsat): But, it fails at ct.TransformPoints(xy_source.reshape(2, size).T)) and I’m not sure why. The error it gives me: TypeError: in method ‘CoordinateTransformation_TransformPoints’, argument 1 of type ‘OS…
Potential issues of chmod 777 on a directory?
Assuming that I have this directory structure: /tmp/mysockets/appname/ What are the security drawbacks to doing chmod 777 on /tmp/mysockets/? Could another user delete or mess with the reference to the appname/ directory? What I want to do is allow other users to add their own directories to /tmp/mysockets/ b…
How to slow all time measurements of a process?
I’d like to make an application believe that time is going faster/slower than real time. I.e. I need to make all the time measurement APIs return t0+dt*s with user-defined s when t0+dt is real time. This would affect anything like gettimeofday() as well as timer_gettime() and all related functions and m…
How to use atomic variables in C?
I need to use an atomic variable in C as this variable is accessed across different threads. Don’t want a race condition. My code is running on CentOS. What are my options? Answer If you are using GCC on your CentOS platform, then you can use the __atomic built-in functions. Of particular interest might…
System commands in c#
Does C# have an equivalent to the system command in C? for example, how would I do this in c#?. I’m using Mono on Linux. Answer No problem I got it. Tested and working on Ubuntu 13.10