please leave a comment so that i know what not to write about

Pages

Wednesday, March 16, 2011

Problem with Google visualization API- DataTable

One of the most widely charting API is the Google visualization API. Which enables the developers to create charts using
javascript at runtime by supplying the data in a particular format.
I had to use this API with ASP.Net. So the major problem in
front of me was how to transfer the data in my database to the client side JavaScript.
Which I could solve by using .ashx pages. I created my own class for
transforming .Net DataTable to a JSON string.
The final problem that I faced was that when I transferred the
JSON string to the client side using Jquery AJAX method though it was parsing
the JSON correctly. The Google DataTable was being formed correctly the final
AnnonatedTimeline I was trying to make with that JSON data was showing errors. So
to debug I created a Google DataTable manually and converted it into JSON using
the method it provides. The JSON string that was given out by Google’s very own
DataTable and my JSON string were exact match still, still mine was showing
errors.
After hours of looking into the problem I finally could
solve it. Because I was using Jquery AJAX method which was parsing the JSON
string into the final objects and the Google Datatable’s date format does not
go by the standards so the final field which was supposed to be of “Date” type
was actually string
v              "Date(2011,2, 10)"          String
After realizing this the solution was simple and it was to
change the JavaScript object which I was using to create Google DataTable back
to a JSON string using the code below
J
data = JSON.stringify(data);
var dataTable = new
google.visualization.DataTable(data, 0.6);


Other userfull resources
Google DataTable
.Net DataTable
Jquery AJAX
JSON - Java Script Object Notation

Thursday, February 3, 2011

your blog/website inside facebook :)

2 day while i was looking at the facebook canvas app documentation. i was thinking why not put my blog right inside a canvas so that then my blog would be directly accessible inside facebook. i tried doing it but becoz facebook posts a signed string containing i dont know what to the blogger platform i could not do it. so i searched for a free asp.net hosting provider and thankx 2 aspspider.com i could make an online app for free that can remove that post string and then redirect to my blog.
so instead of hardcoding the values to it i decided to make it as an api so that then everybdy can use it.

so here it is ladies and gentle men if you also want your blog or any other right inside facebook.
like this one http://apps.facebook.com/zippedtech

simply make a new canvas application and
put the url as
http://aspspider.org/parv0888/?pagelink=<link to your website>


example - 


http://aspspider.org/parv0888/?pagelink=http://zippedtech.blogspot.com


to make a new canvas app visit
 http://developers.facebook.com/docs/guides/canvas

Monday, January 31, 2011

integrating your website/blog with facebook

To integrate your blog or any other website with facebook just involves 2 simple steps. Thankx to facebook you. The administrator dosent need to do many things to integrate and everything is handeled by the facebook at their end.
The 2 steps that the admistrator needs to do is
1.       Add the meta tags to the blog/website in the head sectiontion so that when facebook lints your site it can compile the information that your blog/website it is showing
2.       Adding an optional like button to your blog/website so that the visitors that have an facebook account can like the page. All the likes statistics then can are shown on the facebook page and to every administrator.
A website when is added to the facebook has 3 options for showing the administrator
a.       Adding a single or multiple users of facebook as an admisnistator of a page that represents your blog on the facebook
b.      Adding an app an an admistrator
c.       Adding both
1.       Adding meta tag to the blog.
This particular process of integration is handeled by the open graph protocol by the facebook. http://developers.facebook.com/docs/opengraph
Just copy and paste the meta tags given on this page and change the values as per your needs.
After adding the meta tags go to this page http://developers.facebook.com/tools/lint/
And enter the URL of the site u have added meta tags to
This will present the information to you as the facebook reads it.
2.       Adding a like button is simple.
Add the url of the site where you want this like button to be hosted
Click on get code
You will be presented with a piece of code that is an iframe. Copy and paste this code anywhere in your website source where you want like button to be shown.

DONE. Don’t forget in the end to put updates on your facebook pageJ

Sunday, January 9, 2011

Categories and Static Pages in Blogger

1. Static pages
A recent addition to the blogger in draft is the feature that allows the blog owners to add static pages to the blog. According to the blog up to 10 static pages can be added to the blog now. This can be done inside the posting section where now a separate tab is available for adding new pages.

2. Categories
Blogger still does not allow the authors to add categories to the blog. This sometime is a must for a blog. Especially for the blogs like the one you are currently reading. This is a tech blog and because tech in itself is a vast topic to blog about categories are needed. So I devised a way to easily add categories to my blog. Prior to this I searched the internet for some solution but all the solutions I got either were too complicated for anyone to apply to their blog or were simply not the type I was searching for
The solution I devised allows you to add categories to the blog and the main stream of posts remain untouched. When the reader clicks on any of the categories link all the posts related to that very category are shown. In addition to this this is a very simple and easy to apply hack.
This is the type of categories im talking about. To experience it yourself just click on any link present in the left sidebar

So let’s start
a. First of all. For this thing to work all of your posts must be of a specific format. That is let the posts be like anything you want it to be but add a label similar to the category you want your post to be. Like the labels in this blog im using are.
#cloud
#tipsandtricks
#generalInfo
#windows7
You can make your own labels and then add them under every post you want to be added to the categories. Then publish the posts. Ex suppose have written a blog post that is related to changes in registry in windows7 then add ‘#windows7’ and ‘#tipsandtricks’ to the labels the rest of the labels can be anything you want them to be.
b. So now when all the work related to the posts is ready. Go to the design section of your dashboard and follow the presentation below.

The code reffered to as “THE CODE” in the presentation is this
<div id="categories">
<p style="height:40px">
<a
style="border:0px;margin:0px 0px 0px 0px;" href="LINK TO THE LABEL ">
NAME OF THE CATEGORY
</a>
</p>
</div>
Thanku
Please leave comments


There was an error in this gadget