devadutta.net
Welcome to devadutta.net!

bash emulation using Mootools

We recently posted our 500th question on Boiledbeans and to celebrate, we conducted a Live Quiz Contest.

I built a neat bash like interface for the quiz using Mootools ( and of course, Javascript and HTML ) and people really liked it!

Take a look at it here!

Screenshot:
bbterm

I am planning to make the code public in a while. Since the quiz is still alive, I cannot release it immideately.

Featured Content
Words Quiz
Birthday Reminder
Greasemonkey Scripts
Older Posts

Happy New Year!

Wish you a very happy and prosperous new year!

I was at my friend’s place yesterday for new year celebrations and we needed a random number generator to play bingo. Instead of writing numbers on chits and picking them up, I hacked together a random number generator using Javascript in about 15 minutes, which looked like this:

bingobaby

I used a simple hash to see that numbers did not repeat and It actually worked pretty well.  I was delighted at Javascript’s utility at non geek parties!

Here is the code:

<!-- Devadutta Ghat, last piece of code written in 2008 ;) -->
<html>
	<head>
		<title>Bingo Baby!</title>
<script type="text/javascript">
var gblHash=new Array();	
function getNewRand()
{
	return (Math.floor(Math.random()*99)+1);
}
function getRand()
{
	var ilm=getNewRand();
	var i=0;
	while(gblHash[ilm]==1)
	{
		i++;
		ilm=getNewRand();
		if(i>=100)
		{
			alert("All numbers done!");
			return;
		}
	}
	gblHash[ilm]=1;
	document.getElementById('randomNumber').innerHTML=ilm;
	document.getElementById('drawnNumbers').innerHTML
		+=(" "+ilm);
}
</script>
</head>
<body>
	<div id="randomNumber" style="font-size: 150pt;">-1</div>
	<input type="button" onClick="getRand();" value="Clicky!">
	<div id="drawnNumbers"></div>
</body>
</html>

And here is a demo

Enjoy 2009!

Site under maintainence

underconstruction

I have started to move the site’s backend to a new version and god! it is as hard as moving out of a house you have stayed in for years. I was hopeful that this process will end smoothly in just one shot, but it looks like all the hacks I have put in is not sufficient.

So, you will be finding glitches here and there, please bear with me. Also, you will realize that some pages have vanished and some look ugly. It is all part of the painful plastic surgery which the backend is going thru.

Please feel free to report any bugs, broken links, horrible spellings etc to devadutta@devadutta.net.

I have mirrored my old site here, in case you want something there.

Movie Goer

Keeping track of all movies I watch has been something that I wanted to do for a long time now.
Finally, I got enough time to get a widget up and running for my blog which does exactly this. I call it quot;Movie Goerquot;.

The back end of this app took a while to complete because of all the ajax I put in :)

Gallery Update v0.4

I made some significant changes to the Gallery back-end and I am loving the performance boost!
Checkout the Gallery section for the latest version.

Changes in this version

  • Version 0.4
  • Gallery album display order changed from quot;Arbitraryquot; to quot;Album creation timequot;
  • Anti-aliasing support
  • Bandwidth requirements reduced significantly because of new JIT image delivery technique.

There is a long way to go to reach v1.00 when I will make the code public. Until then, please send in any feedback to devadutta@devadutta.net

 Continue reading >>
 
Windows ge crash a?