linux

linux-Ruby - run a ruby application as a command

Hi, I want to run a lib of ruby files from the command prompt from anywhere in a command line. I have the Main.rb program which instantiates classes from other ruby files. I store the class path of my lib in the .zshrc. Then I run the Main.rb but it is not able to load the required ruby files (files in my lib folder) and throws this er...

Run FreeBSD static binary on Linux ?

Would a very small/simple command line program, programmed in standards compliant C99, and statically compiled on FreeBSD work if executed on Linux ? (I would test this myself but I do not currently have a separate HDD to test on Linux.) ...

pyqt installation question

Im planing to do some GUI development using pyqt4 pykde and python3.1 on Kubuntu 10.4. In the research I did I found out that most of the things are available as packages in repositories and some of the packages are preinstalled. Only thing is I'm not able to figure out what to install and what not to. Can someone please give me a list o...

confused about stdin, stdout and stderr?

Hi, I am rather confused with the purpose of these three files. If my understanding is correct, stdin is the file in which a program writes into its requests to run a task in the process. stdout is the file into which the kernel writes its output and the process requesting it accesses the information from and stderr is the file into whi...

Regarding access time unix

I want to know what is access time . searched in web but get the same definition (read- gets changed). I know with touch we can change it. Could any one explain me more about it with an example how it is changed. Also is there any way file creating date/time be found in unix? ...

Query and modify advanced information about interfaces

I need to do following tasks: List the interfaces Set/remove/list IPv6 address Add/remove routing entries AFAIK I cannot use ioctl I need to use netlink. The problem is that I couldn't find good description how to use it (most netlink tutorials concentrate on how to create connection). strace also didn't prove useful. ...

gcov does not generate coverage files

I am cross compiliing my executable for coverage using -fprofile-arcs -ftest-coverage flags on a 32 bit machine . And the resulting executable I am running it on target machine which is 64-bit. When I run the executable it does not generate .bb .bbg and .da files. What can be the reason for it. ...

how efficient is iphone development with xmlvm

Hi, I am going to make some practice of mobile development and I guess iphone development is the hottest area for this. Since I am using linux, I am not able to work with Apple iphone SDK. After making some research I found xmlvm which seems so cool for me. It enables us to develop with Java then convert it to native iphone application....

spawn terminal reading its stdin

Hi all, I'm writing (under linux or windows+cygwin) a java program that needs to run a command (process P1) and read its stdout (which is mostly binary data useful to my program). This is easy to do, and already done. The problem is that P1 also prints some status informations on stderr, and I would like to spawn a terminal (like xter...

Embedded cue in Flac file not working

Hi, I have ripped a CD in EAC into 1 single flac file with an embedded cue sheet file. As for as i can see mpd supports this, but i cant get it to read it. If i use foobar2000 i can see that they are there but mpd see's it as a single large file. Any ideas? ...

rdtsc accuracy across CPU cores

I am sending network packets from one thread and receiving replies on a 2nd thread that runs on a different CPU core. My process measures the time between send & receive of each packet (similar to ping). I am using rdtsc for getting high-resolution, low-overhead timing, which is needed by my implementation. All measurments looks relia...

Maven PHP project compile = "Execution of php failed. Maybe the php.exe is not in path"

Trying to create a Maven PHP project (just test) for Sonar Generated empty project with mvn archetype:generate -DarchetypeGroupId=org.phpmaven -DarchetypeArtifactId=php5-web-archetype -DarchetypeVersion=1.0 -DgroupId=org.sample -Dartifact=my-app Then trying to compile empty test project with mvn clean compile -e And get...

Apache mod_expires question

Hi Folks, I'm really confused by all that caching stuff. I'm trying to setup mod_expires to reduce the number of HTTP Requests from my website to the server. I did well so far, I installed mod_expires and wrote a little .conf file from the instructions on http://httpd.apache.org/docs/2.0/mod/mod_expires.html. Now, for instance, all my...

How to get the IPv6 address of an interface under linux

Hi there, Do you know how I could get one of the IPv6 adress of one of my interface in python2.6. I tried something with the socket module which lead me nowhere. Thanks. ...

tar --files-from complains "Cannot stat: No such file or directory"

When I type " tar -cvf ~/changeset.tar --files-from ~/changeset.txt", It responds with this output: http://pastie.org/1071080. Here is the contents of ~/changeset.txt: http://pastie.org/1071084 . In other words, a bunch of relative paths. As a sanity check, $ ls admin/memberinformation.php admin/memberinformation.php Why can't tar find...

Getting Started with Reddit open-source, Configuration/Installation

It is always better to learn from other developers experiences. I would like to clone Reddit at my workplace on an intranet basis. Though the documentation is great at http://code.reddit.com/#GettingStarted , I have not developed or used Linux before, so I am not familiar with using the terminal and Linux commands. What OS should I inst...

optimize a program with inotify

hello everybody i write a program by inotify to check file change in loop for grab any changes to that. but i think this can be done better. can anybody write this code better? #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #include <linux/inotify.h> #include <sys/select.h> #define EVENT_SIZE ( sizeof ...

Register(/bind/match) a device with a driver

Hello, I am writing a usb driver (for a gamepad) on linux, and when I plug it in, ti loads usbhid. How can I make it so it loads my driver (gp_driver)? I did the unbind usbhid and bind to my driver trick, but I don't want to do it every single time. Should I have my driver already loaded? Should I code something in my driver? I have the...

PHP ZipArchive what do status values mean?

I am right at the start of trying to write some PHP code to run on a Linux box on an EC2 server that will read files from my S3 bucket, zip them then write the zip file back to the bucket. I have instantly run in to problems with even creating a simple zip archive from some images on the local disk of the EC2 instance, I am using a scri...

C++ XQuery engine - zorba or XQilla or another

I have been using zorba for a little while and it seems to generally work. But it seems to leak memory here and there and I am having to look at other options. Has anyone had luck with any other XQuery engines in linux environment? ...