linux

Looking for a nice linux program debugger

I have been compiling my programs using GCC via the terminal, and im looking for a debugger with more detail thanks ...

Proper way to set PHP include path for *Nix and Windows

Is this the proper way to define an include path for both *nix and Windows? define( 'INCPATH', realpath( dirname( __FILE__ ) ) . '/' ); Note the trailing forward-slash I included above. Is the forward-slash for includes/requires the same for both OS's, as well? EDIT (UPDATED WITH ANSWER): From what I can gather, my code below is the...

Boost Filesystem createdirectories on Linux replacing "/" with "\"

When using Boost Filesystem's createdirectory (and createdirectories) function in the following example, "/" is being replaced with "\". boost::filesystem::path path ("/data/configSet"); boost::filesystem::create_directory(path); This code snipped produces a directory called "data\configSet", instead of creating a subdirectory of "con...

How can I determine the space/size of my drive programatically? Both in LInux and on Windows.

That is : How can I check the drive size which is not formatted... Don't consider the formatted drives...just unformatted drive. ...

Eclipse with Remote Unit Tests

I'm working on a Mac. My dev server is linux. My directory is mounted over SSH using FUSE. How can I execute my ant script on the remote server within Eclipse? Right now I'm just switching to a terminal and running ant manually. Please, no suggestions that I run the tests locally. ...

MySQL Backup: Can I copying individual MyISAM table files to another server with different MySQL version and different OS?

I means copying individual MyISAM table files is: (shut down mysqld and copy the .frm, .myd, and .myi files from one database folder to another) Question: (a) can I use this way to backup MySQL database folder from one server to another server with different MySQL version? (b) can this backup files moved to different OS? (example: debian...

User management API

Hi, I am developing an application suite where users will need to connect to a server and depending on their account type they will be given some services. The server will run Linux. Can you please suggest me some user management API which I can use to develop the server program? By user management I mean user authentication and other r...

Php accessing Home directories

I have a script and i d like to access to home directories of users in a Linux Environment. Web root : /var/www/html/ And there are user directories such as : /home/john /home/david etc. There are files in users home directories. The permissions of user homes belong to the users. eg: /home/david/file.txt user: david group: david Is i...

std::vector reserve method fails to allocate enough memory

Hi, I have a buffer class in my C++ application as follows: class Buffer { public: Buffer(size_t res): _rpos(0), _wpos(0) { _storage.reserve(res); } protected: size_t _rpos, _wpos; std::vector<uint8> _storage; } Sometimes using the constructor fails because its unable to allocate the required memory ...

Windows/Linux for real time systems (timing)

I am doing a research about real time capabilities of non-real time systems. I am particularly interested in the timing constraints of Windows (any version except CE) and Linux (except the real time ones). Especially my research is concentrating on the accuracy of timing on these platforms and requirements of the system to overcome the ...

Linux/Xorg: setting color brightness

Hi all. Is there any command (or API) to set X.Org/Linux color brightness? In other words, I need something as handy as the xgamma command but for changing RGB brightness real-time. Is this possibile? Thanks in advance. ...

What is the best multi-platform SVN GUI client?

Looking for something on Mac Os and Linux mostly, and GUI, not just the command line tool. Anybody has experience using Syncro SVN Client http://www.syncrosvnclient.com/ ? ...

"short read" from filesystem, when can it happen?

It is obvious that in general the read(2) system call can return less bytes than what was asked to be read. However, quite a few programs assume that when working with a local files, read(2) never returns less than what was asked (unless the file is shorter, of course). So, my question is: on Linux, in which cases can read(2) return les...

How to properly create an SVN repository that is accessible via http? (inside public_html)?

Here's the situation: subversion is already installed in the server and I have access to one of the shared accounts in the server (not the root), and this shared hosting account has SSH access. I want to create a repository where I can commit the PHP files i'm working on, and when I commit it should be viewable in a browser that is why...

How to create executable coff file from a C source

Hi, I am trying to do a simulate with Simcore Alpha/Functional Simulator and I need to create an image file but it is giving an error like "This is not Coff Executable" how can I create an Executable Coff file from a C source in linux? ...

Why does my process counting script give false positives?

I have the following bash script, that lists the current number of httpd processes, and if it is over 60, it should email me. This works 80% of the time but for some reason sometimes it emails me anyways when it is not over 60. Any ideas? #!/bin/bash lines=`ps -ef|grep httpd| wc -l` if [ "$lines" -gt "60" ] then mailx -s "Over 6...

set directory of tmpfile() on Linux

A program I use is failing when it uses tmpfile() for large files. The problem seems to be I don't have permission to create large files in /tmp, which this function uses by default. So is there a way, perhaps with an environmental variable, that I can make tmpfile() write to a different location? Edit: the program in question is sox, w...

Compile programs on multicore or distributed system

Is there any software available in linux which compiles a source code containing large number of files parallely on either multicore or distributed systems. Libraries like gcc or xserver takes very time for compilation on unicore/dual machine and most of the times it is frustrating when you need lot of recompilation. Is there any techniq...

Implementing symlinks in a virtual file system

I'm working on a virtual file system which isn't disk based, kind of like /proc. Now I want to create a symlink within it to a target on a ext3 file system. I haven't found any standard documentation on ways to achieve this. What I've guessed so far is that I have to write a function to put in for symlink in struct inode_operations. But ...

How can you use a font file in GTK

I'm writing an open source program (key-train) in Python and GTK (with Cairo) and I would like to use some more attractive fonts. I was hoping that it would be possible to load a ttf font from within the program and just use it (instead of installing it), but I haven't been able to figure out how to do this. ...