Thursday, March 29, 2007

Dataset JSON Serialization

There definitely seems to be some problem serializing dataset in the latest 'RELEASE' version of ASP.NET

It keeps on giving some 'Circular Reference Error' while deserializing a ASP.NET dataset.

After lot of researching on the web , this is how I solved it

1. Downloaded ASP.NET ATLAS JAN CTP from here:

2. Added reference to Microsoft.Web.Preview.dll

3.Added following lines to web.config

<converters>
<add name="DataSetConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataSetConverter, Microsoft.Web.Preview"/>
<add name="DataRowConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataRowConverter, Microsoft.Web.Preview"/>
<add name="DataTableConverter" type="Microsoft.Web.Preview.Script.Serialization.Converters.DataTableConverter, Microsoft.Web.Preview"/>
</converters>


4. My web service returns a typed dataset with ID and Name columns.

Now these javascript lines work:

result.tables[0].rows[0].ID
result.tables[0].rows[0].Name

Monday, March 26, 2007

Planning to write a game!

Couldn’t think of better way of learning a new language. I am seriously thinking of writing a game using Ruby and SDL. I know ruby is not the best language to do this, but
I just want to get exposed to the field.

Here is the list of things I need to learn for making my first game:

1] SDL (Simple Device Layer)
2] Sprites (I find the concept very interesting)
3] Collision detection (I guess will be complex)
4] Free music and sounds (Yes! They are very important)
5] Game loop (Is that what is it called?)


Right now I am desperate to find more information on above stuff. My first game would be very simple, maybe car racing or shooting.

Hmmmm ....some real interesting time ahead.
My 'First Game'!!

Thursday, March 15, 2007

AJAX Bar Graph with ASP.NET



Just posted script, demos and article for creating AJAX Bar Graph with ASP.NET(2.0). Using my script you can create AJAX Bar Graphs using only HTML and ASP.NET. They can be used to show real time information like cricket scores, stock quotes, temperature or any numeric data streaming form a web server.

Download the code and run it from your local machine. Here is the link http://ashishware.com/AJAXGraph.shtml

I am also working on page that demonstrates how to use the script with any server side programing language. Once it is ready , you will find it on my website !


Technorati Profile

Saturday, March 03, 2007

Started Learning Ruby!

'But why?' Is the first question people ask.

I heard of Ruby long ago. That time I only knew that it was invented and pretty popular in Japan. But then came ‘Ruby On Rails’. Being a web developer, I couldn’t overlook its popularity.

So one fine day, I decided to try ‘Rails’ myself. But I soon realized, I needed to learn ‘Ruby’ first. Seemed logical. (You need to learn C++, before you can do anything with MFC).

So, I am learning Ruby. I would have preferred learning Python, but I found learning Ruby (and Ruby on Rails) could be more beneficial to my professional. That doesn’t mean I am giving up ASP.NET.

This is a common problem, which I see with people. When they see someone learning something not ‘directly’ related to his/her work, they think he/she is looking for a switch. Many of us (at least here in India) grow up learning ‘C’ like languages. Our (including myself) conception of a programming language is something very close to ‘C’. This is the reason I am very comfortable with languages like C\C++\Java\C#\Javascript etc. Anything different becomes hard to digest as a programming language. It is in no way a reason to worry because I can solve the problem which I am supposed to!

This is not a question of ‘my language is better than yours’. Learning new languages teaches valuable lessons on programming style, concepts and elegance. Performance and utility are entirely different topics. Every language has its strong points and ways of writing elegant code. There can be no single language that can have all the best features.

I am reading the book ‘Programming Ruby’ by Dave Thomas and Andy Hunt, and believe me just skimming thorough the book has exposed me to scores of different programming concepts, constructs and strategies. Imagine how much will I gain when I actually start working on Rails!!

So next time when I code at work, I’ll probably ask myself ‘why I can’t do something like that in this language’ and the answer will surely help me understand the language and programming better.

Wednesday, January 31, 2007

AJAX tooltip for ASP.NET

Recently uploaded an AJAX tooltip example for the ASP.NET DataGrid. The sample code demonstrates how to add a cool AJAX tooltip to an ASP.NET DataGrid (DataGridView to be specific).

It uses my javascript based tooltip script along with the prototype.js(for AJAX).With minor modifications, I am sure that the code can be made to work with ASP.Net 1.x.

Tuesday, January 16, 2007

Clipboard Image Archiver - Revisited !

Ever saved images and forgot where you saved them !
That happens with me quite often.

If you face same problem the 'Clipboard Image Archiver' is for you !

Uploaded binaries for my older program. It allows you to simply paste any image copied to clipboard to a single location.

The coolest thing about it is it helps you to store all such images in a single location. It stores them in a compressed format so it takes less space. The program has been written in C# and uses SharpZipLib for compression.

Great for:

1. Taking and saving screen shots.

2. Saving images while browsing.

3. Saving those cute images in emails.

Download the program here: http://ashishware.com/Clip.shtml

Saturday, December 30, 2006

DHTML Tooltip

Today, I uploaded a small tooltip javascript on my wesite. I made it such that can display any HTML content including images. By using some tricks it is also possible to create translucent tooltips. Well thats not all , it can even animate itself while showing. The tooltip grows from a small point to its specified size, when shown on screen.

Check out:

Information on the Tooltip.js and using it. Find more examples here.
http://ashishware.com/Tooltip.shtml

Cool translucent, animated javascript tooltip with background image:
http://ashishware.com/TransTT2.shtml

I plan to use it with AJAX and in my next writeup on AJAX tooltip for ASP.NET Datagrid. There are some issues with proper initialization of the tooltip in IE. Though I have a fix for time being, I would like a more elegant solution.

Sunday, November 19, 2006

Video Streaming and some code !

Added a couple of articles on my website.

A small write up on handling 'fscommand' with Javascript and JScript. This method does not involve use of 'document.write' and in my opinion is much cleaner.
http://ashishware.com/fscommand.shtml

I found about this amazing piece of software called VLC Player. It can convert video from one format to another. Also it has a streaming server built-into it. It means you can stream your video over network.
http://ashishware.com/Video.shtml

Finished reading the famous book 'Man Eaters of Kumaon'. Really impressed by Jim Corbett. Especially by his knowledge about tigers and Indians. Great man, great book.
http://en.wikipedia.org/wiki/Jim_Corbet

Monday, October 23, 2006

Kodak's 6.1MP camera with 10x optical zoom !

I am not an expert on digital cameras but I get lot of requests to give my 'comments' on them. One of the most exciting cameras which are easily available in India, is the Kodak EasyShare V610. It is a 6.1MP camera, with 10x optical zoom !

And yes, there is no movement of lens outside the cameras body. That’s really great I think. You can see images of this camera here.

To add to it, it also has Bluetooth , which means you can transfer your images wirelessly. It uses Kodak's Li-Ion batteries. I mean those similar to mobile phone ones and not the normal AA size one.

Price in India is around Rs.23000. Add a couple of thousands more to it for memory card. But the same camera is available in US for around $325, which means ... :-)

Here are some reviews you may want to read before going to your nearest shop to see one:

http://www.pcmag.com/article2/0,1895,1963866,00.asp
http://www.dpreview.com/news/0604/06042502kodakv610.asp

Comments and more information are always welcomed.


[Believe this information at your own risk. These are my personal views about the product and may not necessarily be correct]

Sunday, September 10, 2006

'Porok' : Xbox 360 in India

I have seen the 'Porok' advertisement on MTV a couple of times. It is really mind-blowing. Unfortunately people don’t understand it, because many still don’t know what Xbox 360 is!

Xbox 360
is a game console from Microsoft. To make it simple, it is a video game system that connects to your TV. It has a DVD drive, where you insert game DVDs and play. What makes Xbox so special is the realistic quality of graphics, smooth game play and some awesome games. Internally it is a powerful computer designed just for playing 3D games. You can also watch movies and listen to music on Xbox.

You can find out more from official site here: www.xbox.com/hi-IN/
You can find videos and screenshots of how the games look like here: xbox360.ign.com


Impressed!... So what’s the price?

The price in India to the best of knowledge is around Rs.20-23,000. Games could cost in thousands too!!

Are you thinking : Why the hell spend so much for 'GAMES' ? ....then think again.

People spend thousands on buying stylish mobile phones ...so why not Xbox 360! You should definitely try it out at some store or showroom; it's worth the money I bet!

About the advertisement:

I and my brother have kind of nicknamed Xbox 360 as 'Porok'.
The advertisements is really cool because:

1] It is very Indian (desi)
2] Shows games and gaming are very popular in every section of society, every age.
3] How people become crazy about certain games and start thinking of them all the time.
4] Tries to show that games are integral part of our life, kind of necessity.
5] Universal spirit of gaming share by a person playing on a costly game console and a villager
playing ‘Porok’.

Good luck MTV and Microsoft.

If you have any links, information on games for Xbox360 in India or advertisements to show on this page, drop in a comment.


Site Meter