linux

Where can I find programs for practicing C and assembler(IA32)?

Guys I'm a novice. I have learnt C and Assembly(IA32) on Linux and I will also be learning a few more languages this year. I want to make my fundamentals strong and for that I need some tips from you guys as in, where will I find programs for practice? so that I solve them and get more and more experience. Any good web links that would...

Using .NET/Mono on Linux to serve a high volume web service, a good idea?

We have a web service that does a fairly high volume of traffic that helps you figure out what are your preferred contacts based on the e-mails you receive. This service was initially implemented in C# /.NET in order to leverage some code we already have running on Windows hosts. This service does not uses ASP.NET but it's a simple C...

How do I get started writing a daemon process in a Unix-like operating system, like Linux?

I am doing a tool in PHP for my personal use. But PHP is very slow and the task I need to do is takes much time, so I'll make a daemon in c++ and keep it in the background (It will run in a VPS). PHP would connect to the daemon througt a simple tcp socket (I'll try to design/use a simple IPC protocol) in order to submit the task. The d...

Making entered commands bold at the prompt

This is my current PS1 prompt definition from by .bashrc: PS1='\[\033[01;33m\]★ \[\033[01;30m\]\w \[\033[32m\]\$ \[\033[m\]' My command prompt works great and I love it, but I would like to add one more little thing. I would really like to be able to have the text I enter (commands at the prompt) bold. I know I could change the last ...

Want to Join K&R Study Group?

Hello All, Someday I want to be a computer scientist. Right now I'm looking for a few good men, women, girls, boys, cats, dogs, fish ... anybody ... anybody? I've completed all the exercises in Chapter 1 of Kernighan & Ritchie's "The C Programming Language - ANSI C" (more or less independently) and wish to work through the rest of the ...

Directory last modified date

Hello, Am wondering when the directory last modified date is changed. I modified a file inside a particular directory (via FTP), but the directory's LMD did not change. How is it suppose to function? Thank you for your time. ...

Publish/subscribe with large files as message payloads

We have an existing system that processes a lot of files on an ongoing basis. Roughly speaking, about 3 million files a day that can range in size from a few kilobytes to in excess of 50 MB. These files go through a few different stages of processing from the time they are received to when they are finished being consumed, depending on...

Deadlocked when allocating an std::string

Hi, I have an application with several threads running. I have 2 threads that seem deadlocked when trying to allocate an std::string. Inspecting the backtrace of both threads suggest that at some point one has tried to allocate an std::string, and got a bad_alloc exception. In its catch block, another string is created in an attempt to ...

Git makes all checked out files' end of line CRLF

I am programming on mac, and I don't really understand what Git does with the end of line of my files : I created a repository with some files in Unix format (LF end of line). When I clone the repository that I created, all my end of lines are CRLF. Shouldn't it detect automatically that I need LF end of line ? I have autoclrf set to ...

Linux app using C++ and visual studio

I want to write an app in visual studio that will work in linux. It's main function will be to monitor multiple linux systems and provide health and status to the GUI... I.e disk usage, bad drives, network throughput, mysql reads/inserts, ect... Can I cross compile with visual studio 2010? Should I even bother using visual studio? Or ...

A way to "listen" for changes to a file system from Python on Linux?

I want to be able to detect whenever new files are created or existing files are modified or deleted within a given directory tree (or set of trees). The brute force way to do this would be to just rescan the tree looking for changes, but I'm looking for a more "interrupt driven" solution where the file system tells my code what changed ...

My drupal only runs when I'm online

Hey, I'm using ubuntu 10.04, and when I try to run online on localhost without being connected on internet, it doesn't run. It only runs when I'm connected on internet. Everything is installed right, mysql, apache, bla bla bla, etc. help! ...

Is it that hard to port an application to 64 bits?

I was surprised to read that Adobe discontinued the 64 bits version of Flash for Linux. While there is a new 32 bits version, and Adobe advises users to use the 32 bits version of Firefox instead. Was wondering, as I didn't have to do that yet, is it that hard to port an application to 64 bits? Besides the libraries changes and the reco...

How to test browser Compatibility in Linux

I used Microsoft XP as operation system for web design and development for 1 year. But now I am switching to Ubuntu (linux). For Windows OS we have Microsoft’s SuperPreview for testing compatibility in different versions of IE. Please specify the list of such utilities or tools which provide such support in Linux, specifically for Ubu...

Blocking recv doesn't exit when closing socket from another thread?

In Linux if we call blocking recv from one thread and close for the same socket from another thread, recv doesn't exit. Why? ...

help with setitimer / signal issue

I have the following code which I'd hope would wait 2 seconds then wait 5 seconds in a loop. There is a reason why I'm not using the it_interval to refire the timer. #include <stdio.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <signal.h> #include <time.h> #include <sys/time.h> #include <semaphore.h> sem_t se...

Why can't certain USB Mass Storage Devices be detected by some hardware?

I am trying to modify a mass storage driver using the composite usb framework to allow an embedded mass storage device to be visible on my Xbox 360. I have confirmed that this is not a simple VendorID/ProductID block. I would like to understand what specifically prevents some devices, say the Xbox 360, from seeing certain mass storage ...

Is it possible to install eclipse without jdk in linux

I want to install eclipse in linux, Is it possible to install eclipse without jdk in linux. How to install eclipse in linux. Im using Federo 10. Please give the suggession. ...

Time Delay (Linux)/(Windows)

I have written a source code with a time delay.In unix I have used the #include <unistd.h> header file and usleep function. What is the equivalent to this on windows? What library and function should I use if I write the same code on windows. ...

how to link shared library against other shared library in linux ?

My application dynamically loads liba.so (with dlopen). liba.so uses libb.so so I want to link liba.so against libb.so. How to do this in Linux? Thanks in advance. ...