I've written an application in C++ that takes a complex binary file format and translates it into human-readable text. Having edited the text you can recompile it back into the binary file format.
This would be more useful if the application's internal object model was scriptable. On Windows I'd expose the objects using COM or .Net bu...
what is the best way to do this?
...
I'm working with a shell account in a shared system and I would like to use some version control software for my bash scripts and config files.
It must works on Linux with no dependencies, just unpack it in my home dir. I don't need remote checkout, branching or other fancy tricks. I want to be able to commit my changes and restore them...
What pixel format (RGBA, ARBG, BGRA) does the X server use? If any specific format at all.
Update: I'm specifically looking for information about the color component order and bit patterns.
...
I'm writing a program to be run from the Linux user space which spawns another process. How can it determine which files were modified by the spawned process after it completes?
...
I have a daemon app written in C and is currently running with no known issues on a Solaris 10 machine. I am in the process of porting it over to Linux. I have had to make minimal changes. During testing it passes all test cases. There are no issues with its functionality. However, when I view its CPU usage when 'idle' on my Solaris mach...
I'm trying to use strace to monitor all file accesses by g++ but it only seems to catch read accesses. Why isn't the file access for the output file shown?
...
Hi,
I'm trying to make a little console application that is able to deal with keystrokes as events. What I need is mostly the ability to get the keystrokes and be able to do something with them without dealing with the typical stdin reading functions.
I tried to check the code of programs like mplayer, which implement this (for stoppin...
Hello
Why is this script executing the string in the if statement:
#!/bin/bash
FILES="*"
STRING=''
for f in $FILES
do
if ["$STRING" = ""]
then
echo first
STRING='hello'
else
STRING="$STRING hello"
fi
done
echo $STRING
when run it with sh script.sh outputs:
first
lesscd.sh: line 7: [hello: command not found
le...
I'm looking for resources on writing software to do WAN optimization. I've googled this and searched SO, but there doesn't seem to be much around. The only things I've found are high-level articles in tech magazines, and info for network admins on how to make use of existing WAN optimization products.
I'm looking for something on the te...
Using my c++ program how can I find out what group the current user running my program belongs to? So my program need to figure out a couple of things :
The current username of the user
The group the user belongs to
How can do the above 2 using c++ on a RedHat / Linux machine?
...
Does Android MediaPlayer can only work with file sources? I would like play media (video) from a network stream, but the stream comes in a non-standard protocol, so I have to somehow feed Android MediaPlayer with the data only.
Is there anyway to do that? I found a few web pages suggesting using a temporary file for the buffered me...
Hi,
I have the following c program which launches a Gtk Program on ubuntu:
#include <unistd.h>
int main( int argc, const char* argv[] )
{
char *args[2] = { "testarg", 0 };
char *envp[1] = { 0 };
execve("/home/michael/MyGtkApp",args,envp);
}
I get "Gtk-WARNING **: cannot open display: " and my program is not launched.
I ...
I've installed the sphinx binaries and libraries and am now trying to install the PECL sphinx module.
My system is running OS X 10.6 with MAMP 1.8.2 installed. I try to install sphinx using the following command:
sudo pecl install sphinx
The PECL command outputs the following:
running: phpize
Configuring for:
PHP Api Version: ...
I downloaded lastest version of flex open source sdk. I wanted to compile some samples specifically explorer example. At first build.sh gave me weird error and with little search I nailed it by converting all bash files and mxml files with dos2unix. It is file type error. However now I get this error
./build.sh
Error: Could not resolve...
When I try to install/update any plugin from Help -> Install New Software I receive error messages like this:
No repository found at http://download.eclipse.org/releases/galileo.
or
Unable to connect to repository http://pydev.org/updates/site.xml
Invalid argument
This happens with all Eclipse versions.
I use Eclipse on Debian Sid...
I have a C/ncurses program that I'm debugging/maintaining. This program does ripoffline twice: first, to put a title bar and the second time to put a menu bar on the top of the page.
I need to dropdown some menus so I save the screen before I drop down the menus. In the InitMenu function, I have the following code:
savewin = newwin (0...
I have a class:
public class ANote extends JDialog{...}
In GNOME(Linux) it shows an entry in the gnome-panel. I want it to show nothing (under Windows the instances of JDialog show nothing in the Windows taskbar), because there may be present several instances of the class simultaneously, and this overcrowds the gnome-panel.
How do I ...
I want to find the physical address of a variable defined in a user-space process? Is there any way to do it using root privileges?
...
Changing a Linux C++ program which gives the user limited file access. Thus the program chroots itself to a sandbox with the files the user can get at. All worked well.
Now, however, the program needs to access some files for its own needs (not the user's) but they are outside the sandbox. I know chroot allows access to files opened ...