Praveen’s Journal

September 30, 2006

Emacs font problems in Ubuntu 6.10 (edgy) beta

Filed under: Ubuntu — Praveen Kumar @ 5:29 pm

I have installed Ubuntu 6.10 beta today. After installing emacs21 and emacs-snapshot-gtk, I saw that the font faces are totally messed up. After some search on the Internet, I have found that they have changed the font path in edgy from /usr/share/X11/fonts to /usr/share/fonts/X11. By editing the /etc/X11/xorg.conf file, replacing all occurrences of /usr/share/X11/fonts with /usr/share/fonts/X11 and restarting the X server solved the problem for me. The details about this bug can be found on launchpad.

September 29, 2006

‘axel’ed Ubuntu 6.10 beta @ 30 Mbps

Filed under: General — Praveen Kumar @ 9:16 pm
<praveen@aphrodite> (Fri Sep 29 21:11:28) [/store/ubuntu]
$ axel -a -n 64 http://us.releases.ubuntu.com/6.10/ubuntu-6.10-beta-desktop-i386.iso
Initializing download: http://us.releases.ubuntu.com/6.10/ubuntu-6.10-beta-desktop-i386.iso
File size: 716517376 bytes
Opening output file ubuntu-6.10-beta-desktop-i386.iso
Starting download

[ 73%] [0123456789:;< =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno] [3831.9KB/s] [00:48]

September 13, 2006

இது கூட தெரியாதா?

Filed under: Humor, Tamil (தமிழ்) — Praveen Kumar @ 3:40 pm

நேற்று ஒரு தொலைக்காட்சி நிகழ்ச்சியில்…

நிகழ்ச்சி தொகுப்பாளர்: “தலைக்காவிரி” எந்த மாநிலத்தில இருக்கு?
நேயர்: ம்ம்ம்… ஒரு clue கொடுங்க.
(நான்: அட பாவி!)
நிகழ்ச்சி தொகுப்பாளர்: அது தமிழ்நாட்டுக்கு மேல இருக்கு.
நேயர்: ம்ம்ம்… இன்னும் ஒரு clue கொடுங்க, please.
(நான்: கிழிழ்சது போ!)
நிகழ்ச்சி தொகுப்பாளர்: OK. இது தான் last clue. அது “K”ல ஆரம்பிக்கும்
நேயர்: கண்ணுபிடிச்சிட்டேன்! கேரளா.
(நான்: இது தேறவே தேறாது!)
நிகழ்ச்சி தொகுப்பாளர்: தப்பான பதில் சொல்லறிங்க. இன்னும் ஒரு chance தரேன்.
(நான்: இன்னும் ஒரு பத்து chance குடுங்களேன்.)
நேயர்: ம்ம்ம்… கர்நாடகா???
நிகழ்ச்சி தொகுப்பாளர்: சரியா சொல்லிடிங்க. உங்களுக்கு XYZ வழங்கற ஒரு gift coupon.
(நான்: போங்கடா நீங்களும் உங்க programம்!)

Fixing comments count in Wordpress

Filed under: Web Publishing, wordpress — Praveen Kumar @ 3:10 pm

For some reason, after upgrading to Wordpress 2 I face some problems with the comments count. Googling showed that there was some problem with the SpamKarma plugin. But I don’t have SpamKarma installed. My comment count won’t decrement if I delete some spam trackbacks through the admin interface. The wrong comment count will continue to be there forever. Here is a small script to fix this issue.

<?
if (!file_exists('../wp-config.php'))
    die("There doesn't seem to be a wp-config.php file. Double check that you updated \\
 wp-config-sample.php with the proper database connection information and renamed it \\
to wp-config.php.");
require('../wp-config.php');

function fixit(){
        global $wpdb;

        $query = "UPDATE wp_posts SET comment_count = (SELECT COUNT(comment_post_id) FROM \\
wp_comments WHERE wp_posts.id = wp_comments.comment_post_id)";

        $comments = $wpdb->query($query);
}

fixit();
?>

Save this script in a file in the wp-admin directory of your Wordpress install and invoke it through the browser or PHP command line. This will fix the comment count. Once your purpose is solved, delete the file.

Status of Gnome 2.16 in Debian

Filed under: Debian, Gnome — Praveen Kumar @ 11:59 am

As we all know Gnome 2.16 is out. I always have a question after each Gnome release. When will it be available in Debian SID? This page helps you to track the status of Gnome 2.16 in Debian.

September 4, 2006

C and C++ puzzles

Filed under: Lateral Thinking, Puzzles, programming — Praveen Kumar @ 9:24 pm

I always have an interest towards interview questions and puzzles, especially the programming ones. Here are some of the trivial C and C++ puzzles that I have come across. Please note that the solutions that I have given are tested, but no guarentee that they are the most efficient ones. There may exist more efficient version of the solutions.

Write a “Hello World” program in C without using a semicolon.

1
2
3
4
5
6
7
#include <stdio .h>
 
void
main()
{
  if( printf( "Hello, world!\n" ) ) {}
}

(more…)

The crocodile hunter is hunted by stingray

Filed under: General — Praveen Kumar @ 2:09 pm

Stew Irwin nicknamed “The crocodile hunter” died today of an attack by stingray while he was making an underwater documentary. There were a lot of controvasies surrounding Steve. But he is one of the person who had the best in class skills on presentation and moving with wild animals. His death will be great loss to the Wildlife activists.

Powered by WordPress