I have a program written in C++ which uses dlopen to load a dynamic library (Linux, i386, .so). When the library file is subsequently modified, my program tends to crash. This is understandable, since presumably the file is simply mapped into memory.
My question is: other than simply creating myself a copy of the file and dlopening th...
Hi folks,
I was recently elected programming team lead for my community college's engineering club. We're going to put a solar panel on a roof. The programming part involves
Controlling servos to adjust the orientation of the panel
Sending data on the electricity collected by the panel to a server (we haven't decided whether we want...
We have a number of servers running various different LAMP setups. One thing that seems to be different depending on who set the server up is the way PHP is configured. Some are set up to use the Apache DSO module, others are setup to use CGI. Some have suEXEC turned on, other servers its turned off. We are always trying to tweak our app...
Hi.
I'm trying to use OpenGL on Android using C. I'm following this excellent tutorial, but I've hit a wall.
I'm using an ARM compiler (arm-none-linux-gnueabi-ld) on Linux Mint 7 (Ubuntu 9.04 branch).
I can copy the compiled binary to the Android emulator just fine, it runs. But when I try to make it myself, I get the following error:...
Hello,
I have started freelancing and a client has asked for an invoice.
Do you have a favorite tool for generating invoices? I am after something that I can use from Linux (either a desktop tool or web solution) and generates well formatted Pdf's.
thanks
...
I'm using Bash. I used ulimit -c unlimited but the program still doesn't generate a core file. It may be due to the GUI debugger kicking in. I get the option to save the crash info to a file, but I really want a core file.
Edit: I just wrote a small non-gui program meant to crash, and it produced a core dump.
...
Wow, this one has really got me. Gonna need some tricky sed skill here I think. Here is the output value of command text I'm trying to replace:
...
fast
n : abstaining from food
The value I'd like to replace it with, is:
...
Noun
: abstaining from food
This turns out to be tricker that I thought. Because 'fast' is listed a...
Hi there,
I want to provide my colleagues with an interface (using Windows Forms or WPF) to control the states of virtual machines (KVM based) on a linux host. On the command line of this server, I'm using a tool, called libvirt, which provides python bindings to access its functionality.
What whould be the best pratice to remotely acce...
I've got a function that does (in short):
my $file = IO::File->new("| some_command >> /dev/null 2>&1")
or die "cannot open some_command for writing: $!\n";
...
undef $file;
Right now I'm not even writing anything to $file. Currently there are no other operations on $file at all. When I run the program, it doesn't exit properly. I...
I have a bash shell script that unzips a zip file, and manipulates the resulting files. Because of the process, I expect all the content I am interested to be within a single folder like so:
file.zip
/file
/contentFolder1
/contentFolder2
stuff1.txt
stuff2.txt
...
I've noticed users on Windows typically don't ...
I've googled and googled and I can't find the docs for writing extensions to Nautilus.
...
What files and where do I need to drop those in the filsystem hierarchy in order to add an application to Ubuntu or Fedora?
I am creating a .deb package and I would like it to appear in the "Other" menu. How do I achieve this?
...
Is there a way to programmatically add hosts to the local name resolver under Linux?
I would rather avoid fiddling with /etc/hosts dynamically...
Example: add the name foo and bind it to the local port 127.1.2.3
Use Case: I have an application installed locally accessible through a web browser. I'd like the application to be accessib...
I'm getting an error when I try to install: wxWidgets-gl-compat-2.8.10.1-1.pm.1.2.i586.rpm
in SUSE 10.
error: Failed dependencies:
libgio-2.0.so.0 is needed by wxWidgets-gl-compat-2.8.10.1-1.pm.1.2.i586
rpmlib(PayloadIsLzma) <= 4.4.2-1 is needed by wxWidgets-gl-compat-2.8.10.1-1.pm.1.2.i586
Any ideas?
Thanks!
...
I have an output:
--
out1
--
out2
--
out3
I want to get the output:
out1
out2
out3
I thought of using:
tr '--' ''
but it doesn't recognize '--' to be the first string I want to substitute. How do I solve this?
...
Hello--here's another question about splice(). I'm hoping to use it to copy files, and am trying to use two splice calls joined by a pipe like the example on splice's Wikipedia page. I wrote a simple test case which only tries to read the first 32K bytes from one file and write them to another:
#define _GNU_SOURCE
#include <fcntl.h>
#in...
where is the specification for Network Manager's DBus interface?
I've been googling like crazy.
...
Hi all, I am trying the google performance tool for CPU time profiling. However, I had encountered some problem that I cannot read the shared library file "libprofiler.so.0"
I had read the README of google performace tool, there are 3 steps in the manual:
Compile my program with -lprofiler. I had done this part without any problem.
Ru...
I have a patched gdb 6.8, but I can't get any debugging to work. Given this test file:
import std.stdio;
void main()
{
float f = 3.0;
int i = 1;
writeln(f, " ", i);
f += cast(float)(i / 10.0);
writeln(f, " ", i);
i++;
f += cast(float)(i / 10.0);
writeln(f, " ", i);
i += 2;
f += cast(float)(i / 5....
I have several large files, each of which I want to chunk/split it in to
predefined number of parts.
Is there an efficient way to do it in Unix (e.g. via awk/sed/perl)?
Also each file can have varied number of lines.
File1.txt 20,300,055 lines
File2.txt 10,033,221 lines
etc...
...