How to list all subdirectories in a given directory in C?
Is there a way to list all subdirectories in a given directory path in C? I was hoping I would be able to do it with the stat() function but it only works on files. ...
Is there a way to list all subdirectories in a given directory path in C? I was hoping I would be able to do it with the stat() function but it only works on files. ...
What compiler should be installed in order to compile SR (Synchronizing Resources) Language? Or is this language still in use? Thanks!!! ...
I need to build a simple app that takes (click only) input from 4 USB mice connected in addition to the built-in touchpad on a notebook. My preferred operating system for this setup would be Linux. Any idea how I might be able to discern in an application which mouse a click came from? I'm open to C programming or whatever it takes. It'...
I'm having issues with a site on my server loading and was running 'top' and saw this: Dozens of ruby processes...and I have no idea what that means or if that's normal. :) ...
Hello all, i'm running on a Dedicated server and i have two IPs Is it possible to block some ports for just one of the IPs via CSF firewall? What i mean is that i have two domains configured to two IPs let's say example1.com is on ip 1.1.1.1 and example2.com is on 1.1.1.2 how can i block some ports for IP 1.1.1.2 and still have the...
I am having an issue printing to a specified printer in java. I receive a message and it contains information that allows me to lookup the printer (from over 500). This works 99%+ of the time.. but from time to time, it just starts returning no printers. Here is this code.. private void printOrder(OrderPrint orderPrint, String temp...
I am a Linux noob and I would like to debug a unit test. If I run my test in MonoDevelop it goes green but if I try to debug everything freeze and I have to stop the debugger. My breakpoint on first line of code is never hit. There is no stack trace or information of what could have failed. Edit 1: Should I install OpenSuse (since it i...
I'm doing a course on operating systems and we work in Linux Red Hat 8.0 AS part of an assignment I had to change sys close and sys open. Changes to sys close passed without an incident, but when I introduce the changes to sys close suddenly the OS encounters an error during booting, claiming it cannot mount root fs, and invokes panic. E...
We have a monitoring application built on swt and running on linux. we have few buttons and a dynamic part that changes as we click on these buttons. The problem is that if some ones click too rapidly the cpu could reach 100% and hanging forever. We observed this rapid cpu spikes only on Ubuntu Linux where as windows it runs without on i...
I need a tiny standalone library in C on linux platform that will return "Friday" when provided with (2009, 11, 13) for example. I would like it to be locale aware, meaning, returning day and month names in language set by the user. Any suggestions? ...
How I can get hardware information from a Linux / Unix machine. Is there a set of APIs? I am trying to get information like: OS name. OS version. available network adapters. information on network adapters. all the installed software. I am looking for an application which collects this information and show it in a nice format. I ha...
I wrote simple "hello, world" in fasm, and its works, but how i can generate debug info for gdb and edb (Evan's Debugger)? Fasm compiler could only produce debugging symbols in its specific format - "fas", which of course gbd couldn't understood. ...
How can i get process id of the current process's parent? In general given a process id how can I get its parent process id? e.g. os.getpid() can be used to get the proccess id, and os.getppid() for the parent, how do I get grandparent, My target is linux(ubuntu) so platform specific answers are ok. ...
Hi, I'm writing an application in Python with Postgresql 8.3 which runs on several machines on a local network. All machines 1) fetch huge amount of data from the database server ( lets say database gets 100 different queries from a machine with in 2 seconds time) and there are about 10 or 11 machines doing that. 2) After processing ...
According to the list of API changes in the 2.6 kernel series on LWN the .owner field of struct proc_dir_entry was removed in the 2.6.30 Kernel. So here's a couple of questions: Was it really ever necessary or useful to set this field? Has the field just been moved somewhere else, or permanently deleted? I ask the first question bec...
Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/k12/ #svn log --revision "HEAD" /var/www/code/ | head -2 | tail -1 | awk '{print $1}' > /var/www/path/version.txt # upload the files rsync ...
Hi, i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service writen in pascal. The 'not so' big picture: I´m trying to write a php to emulate a SOAP Midas packets to ClientDataSets in delphi, but ...
I am using Fedora 10, I have created an rpm file for my software. It removes all the files from the installed directory. If i use yum remove command or rpm -e command. but after installation my application automatically creates some extra folders in home directory. If I uninstall my application then file from home directories do not get ...
Update: I have now written a PHP extension called php_ssdeep for the ssdeep C API to facilitate fuzzy hashing and hash comparisons in PHP natively. More information can be found over at my blog. I hope this is helpful to people. I am involved in writing a custom document management application in PHP on a Linux box that will store vario...
How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks ...