Software

Input validation in C

Posted on May 6, 2009. Filed under: Programming, Software | Tags: , , |

Just today I found a stable and powerful way to validate inputs in C, using regular expressions. Gnulib provides a header called regex.h and doing man regex.h will help you find more. Here’s how you use it.
First, the regular expression should be ‘compiled’ – not in the usual sense, but it’s converted to a format [...]

Read Full Post | Make a Comment ( 1 so far )

clrscr in linux!

Posted on December 6, 2008. Filed under: Software | Tags: , , , |

Along the lines of the previous post One command called ‘clear’, I wrote a small C program that does clrscr().

/* clrscr in linux! */

#include <stdio .h>

void clrscr(void)
{
char str[] = " [H [2J";
str[3] = str[0] = 27;
write(1, str, 7);
}

int main(int argc, char **argv)
{
clrscr();
printf("Hello World\n");

return 0;
}

Disclaimer : May not work!

Read Full Post | Make a Comment ( 2 so far )

One command called ‘clear’

Posted on December 5, 2008. Filed under: Fedora, Software | Tags: , , |

You must have used the command ‘clear(1)’ to clear your terminal. Well, if you haven’t, please try it out. For those who know what it is, do you know how it works ? If you do, you can stop reading. Others, continue!
Well, I wanted to find out how it works. So the first thing I [...]

Read Full Post | Make a Comment ( 3 so far )

End of September’s quota

Posted on September 14, 2008. Filed under: Fedora, Software | Tags: , , , |

I have the habit of keeping my computer on when I go out for a couple of hours. Something really, really weird happened today. A sad thing.
Back home I see that my BSNL broadband utilization stands at 3.1 GB out of 2.5 GB and its still 13th of the month. I was extremely shocked to [...]

Read Full Post | Make a Comment ( 1 so far )

Red Hat buys Qumranet

Posted on September 5, 2008. Filed under: KVM, Software, XEN | Tags: , , , , , |

After seeing another virtualization.info feed in my inbox, I was going through it leisurely just glancing through the topics and I came across a news line which read “Red Hat acquires Qumranet, suddenly becoming a key virtualization player” and I sprang to my feet with surprise. Red Hat already had adopted KVM as the main [...]

Read Full Post | Make a Comment ( None so far )

My LZ77 implementation

Posted on September 2, 2008. Filed under: Software | Tags: , , , |

I began reading about dictionary compression in Solomon, a reference book for data compression. I came across the LZ77 method and I was amazed at it! I decided to write one implementation quickly, in C. Here’s what I have come up with. I used to compress sched.c (the linux scheduler source file) from 221K to [...]

Read Full Post | Make a Comment ( 2 so far )

Fun with BSNL Modem and SNMP

Posted on August 16, 2008. Filed under: Software | Tags: , , , , , , |

When surfing my ADSL modem’s web console, I came across a page on SNMP daemon, which read
Simple Network Management Protocol (SNMP) allows a management application to retrieve statistics and status from the SNMP agent in this device.
Immediately the phrase “allows a management [...]

Read Full Post | Make a Comment ( 1 so far )

Google Translate – Very Nice..

Posted on August 11, 2008. Filed under: Software | Tags: |

Read Full Post | Make a Comment ( 1 so far )

Remote Clipboard

Posted on July 3, 2008. Filed under: Fedora, Software | Tags: , , , , , , , , |

When I was using my GNOME desktop from inside a guest running on top of KVM, suddenly an idea struck me, about a couple of hours ago – “To allow copy and paste between the guest and the host”. It would be a very valuable feature to have, I thought.
Deciding to hack a quick solution, [...]

Read Full Post | Make a Comment ( 7 so far )

init script for apcupsd

Posted on July 1, 2008. Filed under: Software | Tags: , , , , , |

Earlier I had blogged about running an APC UPS monitoring software in linux, called apcupsd. For those who wanted to run apcupsd (A daemon that monitors any APC UPSes connected to your system), you can use a script which I created for myself. Here it is. Create a file in /etc/init.d and name it apcupsd [...]

Read Full Post | Make a Comment ( None so far )

« Previous Entries
  • Feed

  • Ohloh

  • Bookmarks

  • Categories

  • Visitors


  • Hits

    • 22,277 hits

Liked it here?
Why not try sites on the blogroll...