Microsoft Academic Day

Sunday, January 29, 2006

Yesterday, I attended the Microsoft Academic Day at Biology Dept., Delhi University. The event started off with a keynote from Ms.Swati who is a developer at Microsoft India Development Center at Hydrabad. She introduced Microsoft's academic initiatives like www.msapp.net, Imagine Cup, msdn.microsoft.com/coding4fun etc.

Then a basic introduction to .NET technologies was given. We were given examples of coding on the Visual Studio Express. A tabbed browser was coded in C# within a few minutes. A couple of other coding examples were also shown in VB and Web Service Express.

Usenet Binaries: Anonymous downloads at DSL Speed The day also included a session by Yashwant Kanitkar and Ashwani Sharma. Yashwant Kanitkar is the author of many best-selling books on C/C++. While, Ashwani is an Academic Developer Evangelist with Microsoft India. This session was the most knowledgeable session for the day. We were introduced to many amazing possibilities of these new technologies especially, Visual C++. The basics of device driver programming were introduced. Other features introduced included game programming and graphics. Also, the part i liked the most was the integration of bluetooth devices by programming them as per our needs. This session ended with a 'thank you' typed from a smart phone (with Microsoft Windows Mobile OS) which operated as an notebook keyboard using bluetooth.

After this excellent session Microsoft had a lots of goodies to give out. They gave all students:
1. Microsoft Visual Studio 2005 Team Suite (180-Day Trial, 3-DVD Pack)
2. Technical Content (2 CD pack) - Tutorials, Videos, Presentations and Articles
3. PCQuest-Microsoft Academic Newsletter
4. Brochure Prentice Hall of India - with offer of 25%discountt on membership
They have also promised to deliver Visual Studio 2005 Express Edition to our institute because the lot was stuck at the customs.

This was really an excellent initiative from Microsoft's side and gave students as-well-as-faculty members a great opportunity to learn.



Puzzles

Sunday, January 22, 2006

I have found two very good puzzles which I would like to share with you all.

1. Find the missing word in the series: BANKS, CWM, GLYPH, VEXT, FJORD

2. What is the solution of the equation: (x-a)(x-b)(x-c)..........(x-z)


Now use your brains to solve these puzzles. If you solve both these puzzles in the next ten minutes without reading the solution, you are really a genius.

The first puzzle might make you think that the words are in some series with similar meanings. But this is not the case. Let your grey cells excersice, think what differentiates or relates these words. Now a hint, these words contain the 22 letters of the english alphabet. The completed series forms a 'pangram', ie it contains all 26 letters of the english alphabet. The answer is QUIZ (highlight the blank space to view the answer).

The second puzzle is much simpler than it seems. Look at the equation carefully. Think about all the terms of the equation from (x-a) to (x-z). A hint, one of the terms in the equation would be sufficient to give you the answer. The term is (x-x) and the answer is '0' (highlight the blank spaces to view the answer).

Preloading Images Using JavaScript

Monday, January 16, 2006

I just added the image preload script to the homepage of the website www.dlangchaps.org. The header and some other images of the website are very heavy. This made the page content load first without loading the header. This javascript sniplet would first load the images into the system cache and then display the page.

The script consists of a function which is added between the <head></head> tags.

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() {
window.status="Loading Images... Please Wait........."
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
window.status="D'LangChaps - Intelligentsia at Work";
}
//-->
</script>


The <body> tag calls this function with the help of "onLoad" attribute.

<body onLoad = "MM_preloadImages('images/dlc.png', 'images/head.png', 'images/logo.png', 'images/navhead.png', 'images/navside.png', 'images/navside1.png', 'images/navbot.png', 'images/news.png')">

This makes the images preload before the actual page is loaded.

Country Coded Top Level Domains (TLD)

Sunday, January 15, 2006

.ac
.ad
.ae
.af
.ag
.ai
.al
.am
.an
.ao
.aq
.ar
.as
.at
.au
.aw
.az
.ba
.bb
.bd
.be
.bf
.bg
.bh
.bi
.bj
.bm
.bn
.bo
.br
.bs
.bt
.bv
.bw
.by
.bz
.ca
.cc
.cd
.cf
.cg
.ch
.ci
.ck
.cl
.cm
.cn
.co
.cr
.cu
.cv
.cx
.cy
.cz
.de
.dj
.dk
.dm
.do
.dz
.ec
.ee
.eg
.eh
.er
.es
.et
.fi
.fj
.fk
.fm
.fo
.fr
.ga
.gd
.ge
.gf
.gg
.gh
.gi
.gl
.gm
.gn
.gp
.gq
.gr
.gs
.gt
.gu
.gw
.gy
.hk
.hm
.hn
.hr
.ht
.hu
.id
.ie
.il
.im
.in
.io
.iq
.ir
.is
.it
.je
.jm
.jo
.jp
.ke
.kg
.kh
.ki
.km
.kn
.kp
.kr
.kw
.ky
.kz
– Ascension Island
– Andorra
– United Arab Emirates
– Afghanistan
– Antigua and Barbuda
– Anguilla
– Albania
– Armenia
– Netherlands Antilles
– Angola
– Antartica
– Argentina
– American Samoa
– Austria
– Australia
– Aruba
– Azerbaijan
– Bosnia and Herzegovina
– Barbados
– Bangladesh
– Belgium
– Burkina Faso
– Bulgaria
– Bahrain
– Burundi
– Benin
– Bermuda
– Brunei Darussalam
– Bolivia
– Brazil
– Bahamas
– Bhutan
– Bouvet Island
– Botswana
– Belarus
– Belize
– Canada
– Cocos (Keeling) Islands
– Congo, Demo. Rep. of
– Central African Republic
– Congo, Republic of
– Switzerland
– Cote d'Ivoire
– Cook Islands
– Chile
– Cameroon
– China
– Colombia
– Costa Rica
– Cuba
– Cap Verde
– Christmas Island
– Cyprus
– Czech Republic
– Germany
– Djibouti
– Denmark
– Dominica
– Dominican Republic
– Algeria
– Ecuador
– Estonia
– Egypt
– Western Sahara
– Eritrea
– Spain
– Ethiopia
– Finland
– Fiji
– Falkland Islands (Malvina)
– Micronesia, Fed. State of
– Faroe Islands
– France
– Gabon
– Grenada
– Georgia
– French Guiana
– Guernsey
– Ghana
– Gibraltar
– Greenland
– Gambia
– Guinea
– Guadeloupe
– Equatorial Guinea
– Greece
– S.Georgia&S.Sandwich Is
– Guatemala
– Guam
– Guinea-Bissau
– Guyana
– Hong Kong
– Heard and McDonald Is.
– Honduras
– Croatia/Hrvatska
– Haiti
– Hungary
– Indonesia
– Ireland
– Israel
– Isle of Man
– India
– British Ind. Ocean Terr.
– Iraq
– Iran (Islamic Republic of)
– Iceland
– Italy
– Jersey
– Jamaica
– Jordan
– Japan
– Kenya
– Kyrgyzstan
– Cambodia
– Kiribati
– Comoros
– Saint Kitts and Nevis
– Korea, Demo. Ppl's Rep.
– Korea, Republic of
– Kuwait
– Cayman Islands
– Kazakhstan

.la
.lb
.lc
.li
.lk
.lr
.ls
.lt
.lu
.lv
.ly
.ma
.mc
.md
.mg
.mh
.mk
.ml
.mm
.mn
.mo
.mp
.mq
.mr
.ms
.mt
.mu
.mv
.mw
.mx
.my
.mz
.na
.nc
.ne
.nf
.ng
.ni
.nl
.no
.np
.nr
.nu
.nz
.om
.pa
.pe
.pf
.pg
.ph
.pk
.pl
.pm
.pn
.pr
.ps
.pt
.pw
.py
.qa
.re
.ro
.ru
.rw
.sa
.sb
.sc
.sd
.se
.sg
.sh
.si
.sj
.sk
.sl
.sm
.sn
.so
.sr
.st
.sv
.sy
.sz
.tc
.td
.tf
.tg
.th
.tj
.tk
.tm
.tn
.to
.tp
.tr
.tt
.tv
.tw
.tz
.ua
.ug
.uk
.um
.us
.uy
.uz
.va
.vc
.ve
.vg
.vi
.vn
.vu
.wf
.ws
.ye
.yt
.yu
.za
.zm
.zw
– Lao Ppl's Dem. Rep.
– Lebanon
– Saint Lucia
– Liechtenstein
– Sri Lanka
– Liberia
– Lesotho
– Lithuania
– Luxembourg
– Latvia
– Libyan Arab Jamahiriya
– Morocco
– Monaco
– Moldova, Rep. of
– Madagascar
– Marshall Islands
– Macedonia
– Mali
– Myanmar
– Mongolia
– Macau
– Northern Mariana Islands
– Martinique
– Mauritania
– Montserrat
– Malta
– Mauritius
– Maldives
– Malawi
– Mexico
– Malaysia
– Mozambique
– Namibia
– New Caledonia
– Niger
– Norfolk Island
– Nigeria
– Nicaragua
– Netherlands
– Norway
– Nepal
– Nauru
– Niue
– New Zealand
– Oman
– Panama
– Peru
– French Polynesia
– Papua New Guinea
– Philippines
– Pakistan
– Poland
– St. Pierre and Miquelon
– Pitcairn Island
– Puerto Rico
– Palestinian Territories
– Portugal
– Palau
– Paraguay
– Qatar
– Reunion Island
– Romania
– Russian Federation
– Rwanda
– Saudi Arabia
– Solomon Islands
– Seychelles
– Sudan
– Sweden
– Singapore
– St. Helena
– Slovenia
– Svalbard & Jan Mayen Is.
– Slovak Republic
– Sierra Leone
– San Marino
– Senegal
– Somalia
– Suriname
– Sao Tome and Principe
– El Salvador
– Syrian Arab Republic
– Swaziland
– Turks and Caicos Islands
– Chad
– French Southern Territories
– Togo
– Thailand
– Tajikistan
– Tokelau
– Turkmenistan
– Tunisia
– Tonga
– East Timor
– Turkey
– Trinidad and Tobago
– Tuvalu
– Taiwan
– Tanzania
– Ukraine
– Uganda
– United Kingdom
– US Minor Outlying Islands
– United States
– Uruguay
– Uzbekistan
– Holy See (City Vatican St.)
– St.Vincent&the Grenadines
– Venezuela
– Virgin Islands (British)
– Virgin Islands (USA)
– Vietnam
– Vanuatu
– Wallis and Futuna Islands
– Western Samoa
– Yemen
– Mayotte
– Yugoslavia
– South Africa
– Zambia
– Zimbabwe

A free PHP Learning Resource

Sunday, January 08, 2006

I found an excellent PHP eBook authored by Paul Hudson who is a full-time IT journalist and author of the book "PHP in a Nutshell". After going through some chapters of this book I could rate this as the best free online resource available on the internet to learn PHP.

The book can be found at: http://www.hudzilla.org/phpbook/

phpBB Mod: View Topic Title of Latest Post

Wednesday, January 04, 2006

This simple phpBB Mod enables you to view the Topic Title of the Latest Post on a forum alongwith the post date/time and poster information on the index page of your phpBB forum. To preview the result of the Mod visit DLC Forums.

To make this modification, you just have to make some changes in the 'index.php' file present in the directory in which you have your phpBB files.


Step 1:

Find the following code which selects the latest post of all the forums:

//
// Define appropriate SQL
//
switch(SQL_LAYER)
{
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id
AND u.user_id = p.poster_id
UNION (
SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
FROM " . POSTS_TABLE . " p
WHERE p.post_id = f.forum_last_post_id
)
)
ORDER BY cat_id, forum_order";
break;

case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)
ORDER BY f.cat_id, f.forum_order";
break;

default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
ORDER BY f.cat_id, f.forum_order";
break;
}


Now you have to add the selection of the field 'topic_title' from the 'TOPIC_TABLE' where 'topic_last_post_id' is equal to the 'forum_last_post_id'. The modified code is shown below:

//
// Define appropriate SQL
//
switch(SQL_LAYER)
{
case 'postgresql':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . TOPICS_TABLE . " t
WHERE p.post_id = f.forum_last_post_id
AND u.user_id = p.poster_id
AND t.topic_last_post_id = f.forum_last_post_id
UNION (
SELECT f.*, NULL, NULL, NULL, NULL
FROM " . FORUMS_TABLE . " f
WHERE NOT EXISTS (
SELECT p.post_time
FROM " . POSTS_TABLE . " p
WHERE p.post_id = f.forum_last_post_id
)
)
ORDER BY cat_id, forum_order";
break;

case 'oracle':
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title
FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . TOPICS_TABLE . " t
WHERE p.post_id = f.forum_last_post_id(+)
AND u.user_id = p.poster_id(+)
AND t.topic_last_post_id = f.forum_last_post_id(+)
ORDER BY f.cat_id, f.forum_order";
break;

default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title
FROM ((( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_last_post_id = f.forum_last_post_id )
ORDER BY f.cat_id, f.forum_order";
break;
}



Step 2
:

Make changes in the '$last_post' variable. Find the following code:
$last_post = $last_post_time . '<br />';

$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';

$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

Now, add $forum_data[$j]['topic_title'] where you would like to display the topic title in the 'Latest Post' column, linking it to the latest post. A modified code would look like:
$last_post = '<div style="font-size:8pt"><img src="images/icon.gif" border="0"> <strong><a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $lang['View_latest_post'] . '"> ' . $forum_data[$j]['topic_title'] . '</strong></a></div>';

$last_post .= '<div style="float:left">by ';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a></div> ';

$last_post .= '<div align="right">'.$last_post_time;

$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a></div>';

You can change the display format of the Latest Post topic, user and date by making appropriate changes in the above code.


NOTE: You may also need to adjust the width of the 'Latest Post' column in the file 'index_body.tpl' located in your template directory. The 'Latest Post' column displays the '$last_post' variable.


This phpBB MODification is developed by me, tested on phpBB2.0.17 and used at DLC Forums which is the forum of the literary society of my college of which I am a member. I am the webmaster/site-administrator of http://www.dlangchaps.org/, website of Literary Society, GTBIT.

DISCLAIMER: I hold no responsibilities/waranties of any sort, what-so-ever for any consequenses resulting from the use of this Mod.


Update: (January 6, 2007)
I have also implemented this modification on GTBIT Forums (forum of my college, transferred from DLC Forums). I have made this modification better by fixing the size of the topic to maximum of 30 characters. Here's the modified code for the '$last_post' variable:

$last_post = '<div style="font-size:10px;text-align:left;width:200px"><img
src="images/icon.gif" border="0"> <strong><a href="'
. append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id'])
. '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $lang['View_latest_post']
. '"> ' ;

$last_post .= (strlen($forum_data[$j]['topic_title'])<30) ? $forum_data[$j]['topic_title']
: substr($forum_data[$j]['topic_title'], 0, 25) . '...';

$last_post .= '</strong></a></div>';
$last_post .= '<div style="float:left">by ';

$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username']
!= '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) :
'<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;"
. POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username']
. '</a></div> ';

$last_post .= '<div align="right">'.$last_post_time;

$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"
. POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0"
alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post']
. '" /></a></div>';

All queries are edited as mentioned above. Also, there's no need for modification of the template files as the width of the Last Post column is defined by the div tag within this code.

Google's tribute to Louis Braille

Today on Louis Braille's birthday Google has made its logo in the Braille language. The image below shows the Google logo on January 4, 2006.



This image was linked to the search term: louis braille birthdate. These special images on some special occasions really make Google look apart from any other search engine or website on the internet. Hats-off to Google for conceptualizing these kind of logos.

Something about Louis Braille:
Louis Braille (January 4, 1809 - January 6, 1852) was the inventor of Braillee, a world wide system used by blind and visually impaired people for reading and writing. Braille is read by passing ones fingers over characters which are made up of an arrangement of one to six embossed points. It has been adapted to almost every known language.