linux

In C (Linux) how will I be able to find out whether squareroot(n) = Integer

In C (linux) how will I be able to find out if the squareroot of a number is and integer or a floating point. I want to write a program using a function pointer which adds up all the Perfect squares upto the limit sepcified. ...

send data from c to perl

hi for a project i need to send some data from c program to Perl program that both in running mode (Perl program in sleep mode and c program running, and c program sends data to Perl). i know that, can write this program by socket and shared memory but i have performance problem. i think shared memory is better solution, and how can i ...

Authenticate SVN users using local Linux Groups?

Does anyone know how I can configure svn to use local linux groups to authenticate users? For example if we have: devrepo = should be accessible by groups 'dev' and 'prod' productionrepo = should be accessible by only the 'prod' group Due to security limitations of the platform concerned, we cannot use Apache so only svnserve or plai...

Linux C: interactive output

Hi folks. I'm developing some kind of mysql monitoring tool so I need interactive output like top command. Is there any lib that can be used for this? Thank you for you answers beforehand. ...

Suppress output to cout from linked library

I need to link my C++ programs against a couple shared libraries which generate way too much output to std::cout and std::cerr rendering them both useless for my uses. I have access to the C++ source code of these libraries, but cannot modify them. Is there a way to redirect their output to a different stream or suppress it when linked ...

"new" operator in multiple threads causes Segmentation Fault

This is related to an issue I have been discussing here and here, but as my investigations have led me away from the STL as the potential issue, and towards "new" as my nemisis, I thought it best to start a new thread. To reiterate, I am using an arm-linux cross compiler (version 2.95.2) supplied by the embedded platform vendor. When ...

Good Code Review Software available?

It's been 18 months since the same kind of question was asked. This is an update. I've been searching around for free Code Review Software but couldn't find a definitive answer to find a good tool that would be easy to setup for our team. My list includes: reitveld, running on Google App Engine. Review Board, from VMWare. Codestriker,...

Create linux make/build file

I am moving a C++ project from Windows to Linux and I now need to create a build/make file. I have never created a build/make file before. I also need to include Boost libraries to make it more complicated. It must also be a makefile and I need to learn how to create makefile anyway, so CMake and SCON are out. IDEs are also out because o...

Problem running Pydev

Hi everyone, I am trying Django recently in Ububtu. So started using a developement environment, which is Pydev in Eclipse. I've installed all, but while configuring window>preferences>pydev>interpreter-python there are these problems I have: What files in Linux should be selected? Every time I select a file from /usr/lib/python2.6/disk...

ptrace for ppc-linux

Hi, I have a ptrace code for a AIX machine, but want to port it to PPC-linux machine. I was able to figure out the respective ptrace requests on ppc-linux (like for reading registers PTRACE_PPC_GETREGS). However, I am unable to write to the registers, using the SETREGS call. Can there be any particular reason for this? Also, I found ...

How to find the error of G++ optimize C++ code?

Hi, Guys: Today, I encounter a strange problem. My c++ code can work under debug mode. using g++ -g to compile the code. However, when I use g++ -O to optimize the code. It will stuck somewhere. It seems there is dead looping. Does anybody know how to find this kind of error? When I debug the code with DDD debuger, it works fine. Than...

Control a USB light via software

I have a little USB-powered light. I'd like to be able to turn it on and off with software. I'll be attaching it to a Linux computer. I have an Atmel ATtiny2313 from a previous project, but I'd rather do this with a simple hack than repurpose my microcontroller. Is this possible? I suspect this can't be done as the computer won't talk t...

Process Memory Map (Linux Windows)

Can someone please point me to some documentation on the virtual memory maps used for Linux and Windows. By that I mean what virtual addresses, code, writable static data, the stack and the heap (along with other kernel bits) will normally be placed in, in a typical process? ...

Why is my man page formatted incorrectly ONLY when viewed with man?

I am writing a man page for a program, the source looks like this: .TH prog 1 "26 AUG 2010" "Version 0.1" "Center header" .NAME prog \- runs a program .SH SYNOPSIS .B prog When I use $ groff -Tascii -man source.txt | more the output is pretty much as expected. When I use: $ groff -Tascii -man source.txt > prog.1 && \ sudo cp prog...

Compiling C# + WPF on Linux in order to run on Windows

I have a C# application of which some parts are written using WPF (which is not supported by Mono). Is it possible to compile this application on Linux? Ultimately, the application will run on Windows, but it is part of a larger framework and our entire build process runs on Linux, so I would like to be able to compile the C# application...

Any tool to log the execution path of a program?

Is there any tool to log the execution path of functions that a program goes through? I know gdb can show the backtrace at a particular point. But I want to see the whole story of a program. For instance: int main(){ a(); b(); } void a(){ c(); } The tool gives out something like: a----- c------ b------ ...

Mono WCF InstanceContextMode not working

I have a service that looks like this: [ServiceContract(SessionMode = SessionMode.Required)] public interface ILabListener { [OperationContract] byte[] GetChallenge(); ... ... [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.PerSession)] class LabListener : ILabListener { ...

why crontab process run repeated auto at sometimes

sometimes, we found our server's cron process auto repeated, repeated 2 or 3 times when use ps command, I get this: server_xx14:~ # ps aux | grep cron root 2596 0.0 0.0 11188 392 ? Ss 2009 0:25 /usr/sbin/cron root 21706 0.0 0.0 20812 944 ? S 09:30 0:00 /usr/sbin/cron root 23437 0.0 0.0 ...

Nano-X (Microwindow) Programming guide ?

Hello All, I want to know some basic programming guide for Nano-X (Microwindow, Embedded GUI). I know it's windows based programming but i want some of the tutorials where i can learn it something better. I also want to display icon or images on LCD, so how it is possible in Nano-X or Microwindow ? I also want User API manual for Micro...

question on c compilation

On a linux box is it compulsory to write a program into a file and compile it cant this be done from command line localhost$gcc "include<stdio.h> int main(){printf('hello world'); return o; }" ...