linux

Better support for CURL with PHP and Linux

I'm the developer of twittertrend.net, I was wondering if there was a faster way to get headers of a URL, besides doing curl_multi? I process over 250 URLs a minute, and I need a really fast way to do this from a PHP standpoint. Either a bash script could be used and then output the headers or C appliation, anything that could be faster?...

Learning x64 on a linux system

I am looking for some good resources on x64 assembly on a linux system, in order to write code myself. I am also looking for some introductory notions like memory spaces (stack, heap, etc.). I found a good free book online, Programming From the Ground UP, the trouble is, it is targeted at x32 linux systems. I also played a lot with gcc -...

How do you make linux GUI's?

My main experience is with C && C++, so I'd prefer to remain with them. I don't want to use anything like QT, GTK, or wxWidgets or any tool kits. I'd like to learn native programming and this sort of defeats the purpose. With that in mind I'd also like to avoid Java. I understand gnome and xfce and KDE and such are all Desktop Environme...

How to set up a socket for UDP multicast with 2 network cards present?

I'm trying to get udp multicast data using sockets and c++ (c). I have a server with 2 network cards so I need to bind socket to specific interface. Currently I'm testing on another server that has only one network card. When I use INADDR_ANY I can see the udp data, when I bind to specific interface I don't see any data. Function inet_a...

How do I get gdb to ignore my shell window's size?

This is part of our unit test flow. I run gdb with the --command option to have it execute commands from a text file. The output of gdb is then directed into a file, and that file is compared to a reference file. But the problem is, gdb uses the current shell window's size to place newlines in its output. If the window is smaller, it wil...

Is there a special restriction on commands executed by cron?

I have a crontab that looks like 0 0 * * * pg_dump DB_NAME > /path/to/dumps/`date +%Y%m%d`.dmp which works fine when I run it manually, but not when cron runs it. After digging through the logs, I see Dec 12 00:00:01 localhost crond[17638]: (postgres) CMD (pg_dump DB_NAME > /path/to/dumps/`date +) It looks like a problem with perce...

Is it possible to sort numbers in a QTreeWidget column??

I have a QTreeWidget with a column filled with some numbers, how can I sort them? If I use setSortingEnabled(true); I can sort correctly only strings, so my column is sorted: 1 10 100 2 20 200 but this is not the thing I want! Suggestions? ...

Web based Software Distribution

Currently at my job, we are distributing installers for our windows base software via an apache web server on a Ubuntu server using apache authentication. When we initially started doing this we only had 3 projects to distribute and as such, 3 htpasswd files to manage. Since then, we have grown and are now distributing 8 projects as we...

In linux, how do I create/restore an image snapshot of my entire drive?

I'm too spoiled by Windows utilities that take a digital snapshot of your entire drive, which you can then restore from in the event of a drive crash. (e.g. like Time Machine for Mac OS X). Is there a similar way of doing this in Linux? ...

Oracle XE for Linux...?

Is there a Linux version of Oracle XE? I could not find any info on Oracles official site. ...

Authentication for a browser-based application dependent on the client machine

How do you make the authentication for a browser-based application dependent on the client machine? Say the admin can login only from this machine. Assumptions: There is complete control over the network and all machines (client and server) involved. I am looking for an apache/linux solution. ...

How to make a simple Wine-based installer for Windows application

My Windows application runs under Wine, but the installation is a bit of a headache for laymen, and the wrappers I've seen online (PlayOnLinux, Wine Doors) require even more packages to be installed. Is there a way to make a package that will install Wine if the user needs it to be installed, install the application and shortcuts, all wi...

Does dual booting Linux and Windows Vista require special treatment?

I'm planning to install Linux on a computer that is currently running Windows Vista. Vista needs to remain functional after the install. I've been reading and it sounds like Microsoft changed the way Vista boots compared to previous versions of Windows. Preferably, I'd like to use GRUB to do the dual booting. Is there anything in parti...

Silverlight on Linux

Hello all, did anyone try to view a Silverlight site on a Linux machine? afaik, there is something called mono on Linux which is a try to port .NET on Linux machines, but did one really try to use it? did it work? ...

libtool adding extra 'U' to .so file names

I have a project built with autotools, divided into two folders; the first one, lib, creates some libraries, and the second one, tools, links against them. The build fails because libtool renames the libraries as follows while relinking: mylib.1.0.0 -> mylib.1.0.0U After the renaming occurs, anyway, the previous name is not restored...

Network usage top/htop on Linux

Hi, is there a htop/top on Linux where I get to sort processes by network usage ? ...

How to do multiline search and replace with a script?

I'm trying to replace every multiline import inside a Python source file.. So, the source goes like from XXX import ( AAA, BBB, ) from YYY import ( CCC, DDD, EEE, ... ) ...other instructions... and I'd like to get something like from XXX import AAA, BBB from YYY import CCC, DDD, EEE, ... ...other instructions... ...

Linux benchmarking tools

I've been asked to evaluate a new vendor's computing system and management has requested that I do NOT use any of our existing software to evaluate the platform (believe it or not, they have some valid reasons). Anyways, I've started trying to read up on meaningful benchmark programs for server-grade computers but haven't been all that ...

call a function when the program is finished with ctrl c

Hello, I am working in the Linux environment, and I have a C++ program, what I want is when I cancel the program with ctrl+c I would like that the program executes a function, to close some files and print some sutff, is there any way to do this?. Thank you. ...

debug c++ program in linux

I have written simple C++ program like this: #include <iostream> using namespace std; int main() { cout << "Hello."; return 0; } now I want to debug it. so what will be the command for it so my control goes to every line. Plz help me. ...