Wednesday, March 31, 2010

outputting all attributes except one in xsl

In order to avoid outputting one attribute among all the attributes of a tag, following xpath can be used

Friday, December 18, 2009

Javascript menu goes behind Flash video

If you are using Javascript which goes on top of a video and it doesn't show properly since it goes behind it. Fortunately there is a very easy fix for this. You have to add two things to the object tag of your video and it should take care of it.

please visit adobe's site here

Wednesday, November 18, 2009

Deleting Rows in DataTable - .Net

A colleague asked me about deleting rows from DataTable. He was having an issue when removing the rows of the datatable because he was using method DataTable.Rows.Remove(index).

When you are looping through any collection using for each loop, you cannot modify the collection. In order to Delete the rows, the best way is to use the Delete method of the particular row(s) and once you are done with the loop, method accept changes of DataTable will remove the rows from DataTable. Code example is

' Loop though the table

For Each dr As DataRow In ds.Tables(0).Rows

If (dr("Name") = "ABC" Then

dr.Delete()

End If

Next

ds.Tables(0).AcceptChanges() ' this remains outside of the loop


Wednesday, October 21, 2009

How to avoid SQL cursors

Good article on sqlbook.com about how to avoid cursors. In short, there are two ways which the article suggests

1. Using temporary table with auto generated ID column and loop it through a while loop
2. Use SQL functions when possible to do calculation on a column

Read it here

I saw different articles on sites about the performance comparison between cursors and using while loop. Some places it made sense to use a cursor but the drawback is that it locks the table where while loops using temporary tables won't.

Due to its syntax and de-allocation procedure, I have never really tried using cursors which, not using them seems like a good practice according to some SQL experts. Read today on a site that one interviewer would ask people the syntax of using cursors and if they knew then he would consider it as negative since he wouldn't want people on his team to use them and knowing the syntax means that you use them :)

Monday, October 19, 2009

Querying SharePoint List Items using jQuery

Very good article by Jan Tielen about using jQuery in Sharepoint. He uses a web content editor webpart in conjunction with jQuery to load Tasks from Task list. This example queries list webservices from client side and loads task in a unordered list. Easy to use code, sort of plug-in play!

jQuery Plugins

  • Growl: Popup messages like messenger style in a browser
  • Growl use in SharePoint: using Growl to show open tasks in SharePoint. Calling webservices from client side using jQuery.

Friday, October 16, 2009

Productivity

Tools

  • ToDoList (Free) - The best to do list software I have come across. Its a great replacement for doing quick project plans and using it as a permanent clipboard where you can organize items in hierarchy
  • Winsplit Revolution (Free) - Very good tool for laptops where you want to mimic two monitors on one. Allows you arrange windows with keyboard shortcuts
  • ZScreen : Screen capture (open source) - a great tool for anyone who needs to capture screenshots. You can associate program to open whenever you hit Print screen key.
  • AVG Antivirus (Free) - lightweight free anti virus software
  • PrimoPDF (Free) - A great tool to print anything as PDF. Sometimes when you don't have a printer available, this tool makes perfect sense to be able to make it PDF and print it later when you are connected.
  • Foxit Reader (Free) - A must have pdf reader, can't even compare this to bulky adobe reader. It provides alot of features for free such as Commenting, attaching files, bookmarking etc. In short makes pdf experience great.
  • PDFill - A very good free tool as a replacement to Adobe Writer. Can merge, create/edit forms etc.
  • FireFox (Free) - When talking about great free software products, how can you avoid not mentioning the excellent browser which revolutionized browser innovation
  • CDBurnerXP (Free) - Hands down the best lightweight CD/DVD burner product. Can make iso and burn them to a media
  • Virtual Clone Drive (Free) - Great tool to map iso as a drive. No need to burn DVDs, just save it as a iso and use it as a drive whenever you need it!
  • Crimson Editor (Free) - A great replacement to lame notepad. Highlights text for known formats. You can work with multiple files at the same time. A lot of text editing great features
  • CamStudio (Free) - Free screen recording software. Lets you make a avi file for the recording.
Visual Studio

Methods

  1. TBD