Aashish Singh Negi ...... The Pro

My photo
Mumbai/Rudraprayag, Maharashtra/Uttarakhand, India
Hello Friends, This is Aashish Singh Negi from Mumbai. I natively belong to Uttarakhand. I completed my engineering in Information Technology from Sinhgad Institute,Lonavla Of Pune University. I love Programming......... I know some programming languages like C,C++,Visual Basic,C#,SQL,etc. and work upon various technologies like ASP .NET,Silverlight 3.0,Silverlight 4 Beta, Microsoft Pivot, Photosynth,Deep Zoom, Azure Cloud Computing, etc. I love techno topic very much.Love to watch videos of new technologies(softwares,hardwares,etc) launched by different companies............

Monday, July 5, 2010

My HandsOn with Microsoft Pivot ( + Silverlight Viewer )

First of all i would like to thank Twitter because a tweet on twitter about World Cup Pivot inspired and sparked me try my hands on this awesome tool/application from Microsoft - Pivot.

i would like to remind you all of the great saying "a picture speaks a 1000 words .....". My Pivot collection also contains a number of pictures so rather than discussing about what Pivot is all about, i would like you all to visit the Sample Pivot Collection which i created and uploaded to my web server.

My Hands-On ...

You need to have "Pivot Viewer" installed on your computer to view this. The Pivot Viewer is available at http://www.getpivot.com/download/. There is a Silverlight PivotViewer also that is available for download at http://www.silverlight.net/learn/pivotviewer/. To view the Pivot Collection online you just need to have Silverlight Plug-In installed on your machine.

If you have downloaded the normal Pivot Viewer then you can open the "Microsoft Live Labs Pivot" application installed on your machine. After opening the above application you can put the following url to view my Pivot Collection http://pivotapp.aashishnegi.com/Sample.cxml.

If you have Silverlight installed on your machine, you can visit the Silverlight Version of my Pivot Collection at http://slpivot.aashishnegi.com/Default.html.

Now viewing the above links you must have understood that you can view the Pivot Collection by two ways.
  1. Using the Pivot Viewer installed on your machine and getting the url of the .cxml file.
  2. Using the Silverlight Pivot Viewer. I think this is a more better way as it allows me to view the Collection directly through the Browser making use of Silverlight's capabilities.
How was your experience with the Pivot ???

How you can create this ?

Now i will focus some light onto "Pivot" and then explain the simplest steps to create your own Pivot Collection and host it online as i did it.

You can get the details about Pivot at its Official Site.

now rather than discussing the details and introduction of Pivot, i will take you through the simplest steps you can follow to build up your own Pivot Collection. There are many ways to create the Pivot Collections.
  1. Command-Line ( http://www.getpivot.com/developer-info/cmd-line-tools.aspx )
  2. Excel Plug-In ( http://www.getpivot.com/developer-info/excel-tools.aspx )
  3. Just-In Time Pivot Collections ( http://www.getpivot.com/developer-info/jit-tools.aspx )
Here i will discuss the method of developing your Pivot Collection using the "Pivot Collection Tool for Microsoft Excel". You can download the Excel Plug-In from the following link http://www.getpivot.com/developer-info/download-excel-tools.aspx. You need to be online while installing the tool. Run the setup in the Downloaded Package.

After you have installed with the Excel Tool, you can see one more additional tab in your Microsoft Excel's Ribbon Bar. There is "Pivot Collections" tab that gets added. you can see the following picture which shows the tab.

You can see i have specified the Pivot Collections tab in the above image. Click on "New Collection" button on the upper left corner. U will get a new excel book window.

Click on "Import Images" button to select multiple images which you want to upload to the Pivot Collection. The images get added to your Collection. Now what just modify the cell values "Name", "Href", "Description" and you can even insert some new "Facets" - the columns which get displayed inside the "Facet Catagories" on lower left side of the "Pivot Viewer". I added "Place", "Pic Taken By" and "Date" as you can see in following image.

Now you can see the "Quick Preview" of your Pivot by clicking the "Quick Preview" button in the ribbon bar. You wouldn't get to see the images in the "Quick Preview" but you will get see all other characteristics such as Facet Catagories, Facets, Sort DropDown, Filter Panel, Info Panel, etc as shown in following image.

If you are ok with the preview, you are ready to hit "Publish Collection". The excel tool publishes the collection and you get following screen.

After its done with the publishing, you will see your collection opened in the "Pivot Viewer" ....

I did some more changes in the collection. What if i want to add multiple values to a single column. You can do it easily. Just separate the values with "double pipe" i.e. " || ". You can see in following image i created the column named "People" containing the multiple values.

I published it and you can see in following image the "Multiple Values" shown in the "Information Window".

What happens after we Publish the collection ?

After you publish the collection and select the location many of the files get created.

  1. The .cxml file which is an important file which we point and open up in the Pivot Viewer.
  2. A folder with the collection of images and some XML files to handle the images.
If you open the images folder, you will get to see the same architecture and structure as shown by the "Microsoft DeepZoom files" as it works the same way using the "Tile collection" of the images.

The Endnote.

So friends this was my cool experience with "Microsoft Pivot". The "Pivot Collection" i have mentioned in the above example and in the images contained images of size approx "1.5 MB" each. The folder of Images which i added to the collection is about "985 MB". This size of the Images in collection was shrinked to "221 MB". But that was also big n vast in size, so i didn't uploaded this collection to my Web Server.

I created another Pivot Collection to my Web Server which you have viewed through the above links.

I would soon blog about how integrating your Pivot Collection to the Silverlight Application and deploying it to your Local IIS or the WebServer.

Thank You for visiting the Blog.

Please leave your comments to help me improve my blog.

Aashish Singh Negi

Monday, April 26, 2010

How a WebService saved my day !!!

"This is a story on how a WebService saved my day ....."

This story is related to my Final Year Engineering Project - "Common Help Desk". We are developing our project using Oracle APEX - an Application Development Environment that is installed upon Oracle Server and can be used to develop full functional applications rapidly.

We as a group of 3 - Me, Sameer Suman & Shrikant Ravekar worked very hard to work (first of all LEARN) on the totally new Development Environment. Most of the work in the project is done by Sameer "Sam" & Shrikant "Shreak". I work very very very often ...... to the end I am working really "hard" on it !!!

Now after the brief introduction 2 the TEAM, i would start with the story.

The basic motive of our Project is to provide an online Help Desk that would provide an organization a facility of an automated help desk. This would reduce the paper work and delay caused due to high load. The users just need to register their COMPLAINS through email and the complains get automatically forwarded to the appropriate person who can solve it.

Now the interesting part is "We required that our project should automatically post or send emails to the users whenever there is any change in the state of their complain." Truly speaking this was the hardest part in our project. We got a lot of problem regarding setting up the Email facility.

We tried a lot of SMTP settings for Oracle APEX but each setting resulted in some type of error or problem. Many of the time "The mail sent today were delivered after 2 days that too into the SPAM". 

The Application delivered the email messages to teh APEX Mail Queue but on sending the messages from the Queue we faced various new problems ... SMTP transient error, TLS error and sumtime no error ( mail also dont get delivered ).

Sending the email was the crucial part of our Project.

We were having our Project Exhibition at our College on 24th April but to the date "22nd April" there was no functionality of email in our application. Now it was 23rd April and i started working to solve the problem.

Now being a "DotNet GUY :-)" or a .NET GUY , i decided 2 solve this problem using .NET. I wrote a WebService to send an email .....

Did some addition of Settings to the Web.config for SMTP Settings ...

Now i was able 2 consume this service and send mail. I tested it locally in ASP .NET environment. I grabbed my friend "Rahul Desai's BSNL USB Modem" and used it 2 send the email. I was not in a mood 2 goto Reading Hall n use the WiFi so used my friends modem at my room.

Now the work became so easy and i consumed the same WebService to my APEX Environment.

and it was very easy to send email through APEX.

On 24th we were very happy as the Email sending was now working with our application but again a new problem.

Just before the Exhibition was going 2 start, we tested our email sending module using the WiFi network at our college but again PROBLEM PROBLEM PROBLEM .... certain email smtp and pop ports are blocked under our Proxy Setting of WiFi network (even we aren't able 2 configure our email accounts through Outlook ).

Now again i started thinking the solution 2 this problem and suddenly "A BLINK OF THOUGHT CAME 2 MY MIND" ..... i didn't knew whether this will solve my problem but i wanted 2 try.

I again grabbed my friend's modem and uploaded the WebService application to my domain. Again my domain control panel is blocked at the WiFi so i used the USB modem.

Now it was the final testing n i typed my WebService's url 2 my address bar n following is the result ...

So now i was able to send EMAIL through my ORACLE APEX application and that too using the WiFi network.

This is how the WebService saved my day !!!

This was an awesome and strategic experience of mine ..... so i wanted 2 share it with everyone ..

- Aashish Singh Negi

Waiting 4 comments .........

Saturday, January 9, 2010

Silverlight 4 Beta - Playing with WebCam, Printing Support

First of all i should thank a bunch of people who helped me in creating this application.

You can view the Silverlight 4 application i created at http://testing.aashishnegi.com/Default.html. You should have a WebCam on your machine and the machine should be installed with Silverlight 4 Developer Runtime. It will not work in silverlight3 plug-in nor the plug-in will get updated through the popup it displays. You should manually download and install the SL4 Runtime from Silverlight.net.
Now i will briefly discuss about the project and how you can have a little modifications and try out various new things.
Lets start with a preview of how the screen looks and the controls i placed on the screen.

  • WebCam & Mic Support: Lets start and see how we can add the webcam support to the application.
CaptureSource provides us with the methods that work with specific audio or video capture from the associated capture device.

After the CaptureSource is initialized, VideoCaptureDevice can be used to to get the default device configuration. CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice() provides it with the default configures video device. If you right click on Silverlight App and select the Silverlight Plug-in then under the WebCam/Mic tab, we can select and set the default device.

After this the CaptureSource we created above can be used to control the camera. The CaptureSource.Start() and CaptureSource.Stop() will start and stop the cam. As the use of Cam requires user intervention the methods CaptureDeviceConfiguration.AllowedDeviceAccess  and the function CaptureDeviceConfiguration.RequestDeviceAccess() provides user with following dialog box for access request.

In above code the “viewer” is a rectangle that is filled with the brush “VideoBrush” to display the captured input of device.

Clicking Of Pic is something i felt a bit difficult and i referred Vikram’s Blog for understanding this. Following is the code bit for it.

AsyncCaptureImage() can be used to click a snap from the CaptureSource. The Image img is used to add the image to the list box after it is clicked.
  • Saving the image as PNG: This section will tell how to save the image we clicked. For this you can refer the following bit of code. .NET Image Tools Library is used in following code lines. .NET Image Tools made it very easy.

  • Printing Support: Lets see how we can print something using Silverlight 4 printing support.

Here we can see that PrintDocument class provides printing capabilities for a Silverlight application. As in above code we can see i initialized the PrintDocument and initiated a EventHandler which checks for when the PrintingPage event occurs. Print() can be used to show a Print dialog box.

The PageVisual property is used to choose what elements or rather UIElements we need to print.The PrintableArea defines the area to be printed. HasMorePages represents whether there are more pages to print. Its a bool that returns true if there are more pages to print.

StartPrint can be used if we need to perform some special handling or set up before beginning the printing. The EndPrint event can be used to perform cleanup operations after printing is complete or to detect errors that occured during the printing process. EndPrintEventArgs.Error property will give out the error occured.
  • I am currently working with the other new features of Silverlight 4 Beta like Out-of-browser Network Support, Drag and Drop + ClipBoard support, WCF RIA, RightClick support, etc. I will soon blog about these too.

  • Thank You all for visiting my blog.

- Aashish Singh Negi
Twitter @aashishnegi
Phone: +919970141082