Directshow … No longer available?

I use Directshow quite a bit in my work, and quite like the way it works. Anyway since the November, Directshow headers, samples and include files are no longer shipped as a part of DirectX SDK. It turns out that Directshow has been moved to the Extras portion of the SDK. So in case any of you use Directshow and wanna grab a copy, you can do so by downloading the DirectX SDK extras. Also Mike Wasson provides some further information. Looks like directshow is being moved into Platform SDK. So I guess in the future you will be able to download it from here

Technorati tags:  ,  ,  

W3C XHTML Compliance Woes

As you might have noticed almost all pages in my website are valid XHTML 1.0 Transitional. However there is a catch in this compliance. I have total control over my posts. In fact, I went so far as to edit all my previous posts (I know there are not too many, but 32 is still quite a big number), just to make sure they meet the XHTML standards. However I have comments on my website, over which I have little control. As in all I can do with the comments is delete / add. Now almost all these comments have a <BR> instead of a <br>, which is not valid XHTML. So unfortunately almost all my pages with comments on them are not valid XHTML. So I have decided that I am not going to bother with those. I will continue to take pains to ensure that all my posts are valid XHTML. But for things beyond my control, I shall not care :).

Technorati tags:  ,  

Combo Boxes in Safari and Firefox

Hmm I was seeing how my website renders on different browsers, namely

  • Safari
  • Firefox on Mac
  • Firefox on Windows
  • Opera on Mac
  • Opera on Windows
  • Internet Explorer on Windows

I really like the combo-boxes produced by Safari. I think it uses the native Aqua UI to produce those, and do they look nice. Opera does produce native UI on the Mac, but Firefox doesn’t. It would be really nice if we could get similar looking web UI on other platforms too.
Here is an image of a combo box on different browsers and platforms.


Combo boxes on various browsers and platforms
Combo boxes on various browsers and platforms

Technorati tags:  ,  

Site search up

Yeah, I got a site search running. I know you think it is a small thing, and you might say that I should have used Google site search right? Well trust me, it is not a small matter, and I too wanted to use Google but decided not to. Let me explain why. I looked at the services that Google provided. I wanted a solution that would return the search results in my own template. As in the resulting page should be hosted on my website and not on someone else’s. Google did seem to have a solution, however my guess is the service is down. According to the description, I should be able to customize Google for my site. However, when I tried to do so, I got an error that my website had not been indexed by Google yet. I found this kinda odd, coz I get a lot of hits from people who are directed to me via Google. So then I checked if ASU was indexed, and guess what Google said it wasn’t. Same result with Stanford, Google and Yahoo. Here is a sample error message.

Google site search error

So this ruled Google out of the picture. I surely didn’t want to use the normal search because the results were displayed on Google’s webpage and hence I had no control over the format. So I looked up the internet and hit upon this porject called phpDig. Nice php and MySql based application. It runs a spider on your website and is HIGHLY customizable. So I jumped at the opportunity and incorporated it into my website. So the search you see running is powered by phpDig. Thanks you guys!! I will make a donation to the project tomorrow, I promise.
Now phpDig works fine, but another issue is running the spider at regular intervals. If I did have root access on the server, it would have worked out fine. Unfortunately the server is not owned by me and hence I cannot schedule a cron job. This is where fake-cron stepped in. Quoting from their document

Fake Cron is a script which has been designed to simulate the cron process on webservers. It is useful where cron is not permitted or where you would like an easy admin interface to control your various cron activated scripts.

So I got that too installed and wrote a small shell script that runs my spider and voila I am good to go. Customizing the search page took a while, but now I am quite happy with the way it looks. So thats my saga of the search. If anyone needs any help setting up a similar setup, lemme know.

Technorati tags:  ,  ,  ,  

Access Keys in HTML

I adapted the current template for my website from the great guys at CSSZenGarden. Now CSSZenGarden ensures that their page is accessible by people who use screen readers. One of the things they use in their HTML markup is access keys. The purpose of these access keys is to allow people who use a screen reader to navigate between links with more ease. Hence I thought it would be a pretty smart idea to include the same in my markup and I initially did. However it was pointed out by Anantha that by enabling these keys, I killed the Alt+D shortcut (Open Location or go to address bar) on windows, since the modifier for access keys on windows is the Alt key, and I had assigned the D key to my photogallery. This was something I had not taken into account while using these keys. Anyway I was reading this article and the author mentions that people using screen readers often hit the same roadblock since almost all keyboard shortcuts are already used by their screen-readers (Jaws etc.). Quoting from the website

Disappointingly, our research discovered that all but 3 keys were previously “claimed” by one technology or the other:

AccessKey / (slash)
AccessKey (backslash)
AccessKey ] (right square bracket)

At that point it was then pointed out that even these keys would be inaccessible to users not using a North American Standard (QWERTY) keyboard. So while it seems that Accesskeys is a great idea in principle, implementation brings with it the possibility that it either will not be available to all users, or that the keystroke combination encoded within the web page may conflict with a reserved keystroke combination in an adaptive technology or future user agent.

So in conclusion, it seems there is really no point using access keys on a website. Hence I have now done away with all access keys. I do plan to make my website accessible and will work that out sometime soon.

Technorati tags:  ,  ,  

Adding RSS/ATOM feed autodetection to your website

For all you people who use Firefox, you might have noticed that Firefox automatically detects RSS / ATOM feeds. When you are on a site that is syndicated via a news feed, Firefox shows a small orange icon on the bottom right corner. Now almost all blogging services automatically produce these feeds, but unfortunately there is not too much information out there on how to make a browser automatically detect these feeds. Anyway long story short, it is just a matter of adding a small little line in your HTML head.

<link rel=”alternate” type=”application/rss+xml” title=”Atom feed” href=”link+to+your+feed”/>

That’s about it, Firefox, Opera all will now auto-discover your feed.

Technorati tags:  ,  ,  

My Calendar using iWebCal and iCalFtp

I got my Calendar running too, thanks to a couple of really nice open source solutions. First and foremost, I use iWebCal to convert my .ics files into a nice looking html page. However there is a caveat here. The source code doesn’t work out of the box. There seem to be a few errors in the source code. However these are pretty easy to fix. Here are the changes you need to make

index.php, line 68:
modify path i.e: “../data/tagada.ics”

iwcMain.php, lines 104, 105, 106
modify with:
include “Property.php”;
include “CalItem.php”;
include “Calendar.php”;

iWebCal.php, line 35
modify with:
$ical_LOCAL_PATH = “”;

iWebCal.php, line 42
modify with:
$iWebCal_URL_PATH = “iWebCal”;

iWebCal.php, line 137
modify with:
include “iwcMain.php”;

Once this is done, it works like a charm. Then in order to publish my ics to my website, I use iCalFtp. Nifty piece of software, though all it does is publish an ics file via ftp. This is needed since iCal supports only webdav folders and my hosting service charges me for that. So that’s it. I am wondering whether to make my calendar public though, maybe I should password protect it. I will make a decision sometime soon.

Technorati tags:  ,  ,  ,  

Image Resize on Mouse Over via css

I have been looking for ways and means to resize images on mouse over. The reason? If you look at this post, you will notice that the numbers of interest are not visible at all on the image at the current resolution. However if the images are displayed at full-size, it overflows the container and makes the entire page look quite ugly.

I found quite a few solutions, however none served my purpose, since almost all of them used javascript and that broke my XHTML compliance. So I wrote this fully css hack. It resizes the image on hover. The code as such is VERY simple. I just defined a class called img_resize.

.img_resize{
width:50%;
}

.img_resize:hover{
width: 200%;
}

That’s about it. I just use this class, when I define my image tags,. Works in all browsers but (guess which one) yeah IE. Well, I don’t care too much about that. If you are an IE user and want to see these images the right size, well you can open them in a new window, or even better move to a decent browser.

EDIT: Anil pointed out that the css would work much better if I changed the settings for the hover image to auto. I agree, so I guess the updated css should be

.img_resize:hover{
width: auto;
}

Here normally the image takes the width specified in the img tag. On hover, the image is shown at the true size, which is the desired behavior

EDIT 2:
Well I got this fixed for IE too. But I hate the fact that I need to put in hacks for a browser. Imagine the amount of pain guys at google or any other web based company need to go through to make sure their stuff works with all the stupid browser quirks. Anyway the hack is based on the post by Peter Nederlof. For detaiils please visit the link. I shall not pretend to know how the hack works. Anyway all you need to do is download this htc file and put it somewhere where your page can access it. Now add these lines in the header of your html

<!–[if IE]>
<style type=”text/css” media=”screen”>
body{behavior:url(https://ierr.dev/Media/Data/csshover.htc);
}
</style>
<![endif]–>

If you have a doubt, have a look at the source of the current page. Anyway thats about it. The hover link now works in IE too.
Here is a test image using the above mentioned hover

Sample image

Technorati tags:  ,  

Love Linux? Let’s see you install it on a badger

So you love Linux and swear by it. Then let’s see you install it on a dead badger. Yeah, you heard me right, a dead badger. Well turns out someone thought of it and posted detailed instructions for the same. Amazing!
Quoting from the website …
Minimum Installation Requirements:

  • one (1) pocketknife
  • one (1) screwdriver, flathead, to install Duppy card (see item 4. below)
  • computer with:
    • CD drive
    • USB, Ethernet, or a free slot for wireless networking card
    • Telnet or SSH client installed
    • cyberspiritual controller program such as FleshGolem (Mac OS X and Linux), Phranken (Windows 98, ME, 2000), or ItzaLive (Mac OS 8.1-9.x and Amiga)
  • one (1) Duppy card (available in CardBus and PCI models) or SpiritInTheSky external adapter (available in ethernet and USB models)
  • VüDü Linux (available from Twisted Faces Software)
  • minimum 3′ x 3′ (1m x 1m) fireproof surface, in secure, ventilated area
  • privacy
  • one (1) dead badger, good condition

Technorati tags:  ,  ,