Saturday, January 17, 2009

CircuitCity short-circuited

I just came to know about this... very very sad :(
http://www.circuitcity.com/closed.html

Wednesday, December 24, 2008

Opera... you too?

Today is a bad day.. really really bad day.. I didn't expect this from Opera.. at least.. if Google does it.. it is in their nature... but Opera you too?
Microsoft has done the same thing in early 90s but they changed and they paid a lot of money for what they did earlier.
What happened is, I got an "There is a new version of Opera available for download." message, and as a die hard fan of Opera, I immediately click on Download and once it downloaded, I started installation. I love my existing settings and customizations in Opera, so I always upgrade rather than clean install. And as usual I was about to click on Next when I noticed a small, pre-checked check box at bottom of the installer. And my instincts told me.... HEY!!!! STOP!!!... and I looked at it.. the check box read ... Make Opera Default Browser..and I was like : Oh my lord.. did Microsoft(Old days) took over or what? or it is Google now? Well.. for those who didn't get it.. that check box will make Opera my default browser.. and yes.. I am no idiot who doesn't understand flexibility of IE.. most of the sites I look at looks the BEST on IE.. and most of the good sites works fine.. with IE.. no problem so far...while Opera.. is the best browser.. for the sites which normal users might not want to give a look.. for me it works.. but Opera as my default browser.. NO NO.. BIG NO!!!... anyways.. I survived the attack(This is a kindda browser replacement attack.. aahh I coined a new term... :P)
This was definitely a dirty move.. and well thought and.. yes.. I can tell it was no accident.. Opera did the same the Microsoft was used to do earlier. But that was a different time.. but now? NO NO!!!! Opera.. 5 cents down.. you guys are.. so next time you install Opera..just be careful.. they are not as good as they were used to be.. anymore..

Google.. does it again...

I dunno what kind of idiot some one has to be to push an update to a product.. which just changes the version number... I wish I could be that idiot.. and then.. google would have hired me as a Product Manager(Phew.. thank god.. I am smart.. and I won't have to be that guy..)
According to this blog as well as few other trusted resources I just came to know, Google pushed a product update on iPhone that changes the version number... YA... just the version number.. that's it..

Wednesday, December 17, 2008

Killing a Process running on Remote Computer(The batch file way..)

This morning when I came to office, I had a set of tasks which needed to be completed ASAP. My current engagement requires me to work on customer server via RDP. Now RDP has an interesting behavior, in certain cases if the server has a limited resources, it will simply refuse to allow RDP access. And unfortunately, it happened to me today. One of my colleague ran a time-consuming, resource-hungry custom code over the weekend so we can work smoothly during the weekdays, however the application could not complete its work during the weekend and was still running and consuming whatever resources were available and in turn caused a DoS (Denial Of Service). I thought to use VBScript/WMI to kill the remote process as I had the name of the process to be killed and have had used it in past effectively. I started working with the script but, I felt it will take too much time to figure out the script that will help me so I decided to search on my favorite search engine for easier and faster options. Within a few minutes I got the pointers to use tasklist.exe and taskkill.exe. I killed the process manually and easily got my access restored. However at end of the day, spending some time one this and making a batch file will come handy as we run into this situation more often. So I spent few minutes in notepad and here is the batch file that I got. This batch file is not polished but should get the job done in time of needs. And as usual I don't take any responsibility of any kind if you use this script and get into some trouble. So use it at your own risk...

@ECHO OFF
@ECHO WARNING : This script will forcefully kill the process and will not ask for confirmation before killing the process.

SET MESSAGE=
SET SYSTEMNAME=
SET USERNAME=
SET PASSWORD=
SET PID=

SET /P MESSAGE=Press any key to continue...

SET /P SYSTEMNAME=Enter target computer name or IP :
SET /P USERNAME=Enter User Name (domain\username) :
SET /P PASSWORD=Enter Password :

@ECHO Please wait while we get the list of processes...

TASKLIST.EXE /S %SYSTEMNAME% /U %USERNAME% /P %PASSWORD%

SET /P PID=Enter PID(Process ID) of the process you want to kill :

TASKKILL.EXE /F /S %SYSTEMNAME% /U %USERNAME% /P %PASSWORD% /PID %PID%

SET /P MESSAGE=Press any key to continue...

Generic Serializer-Deserializer

Around one and half year back, I was handling an interesting situation. There were few different systems sending in XML messages, and my component had to accept the message, interpret it and take appropriate actions.

It was easy till I came to know about XML message and its elements and alternate messages. The possibilities were unlimited, and it sounded stupid to hand code/hard code XML elements. Rather than that the solution was designed so that we converted XML -> XSD -> CS. After few changes made here and there to fine tune the CS files with XML, we faced another challenge, we had to serialize/deserialize incoming/outgoing messages. After few minutes of R&D I could pull out this. I've listed the method signature and minor code implementation. It is so simple that you can easily get it working in few minutes.

public static string Serialize<T>(
T data
)
{

//Create the Serializer

XmlSerializer xmlSerializer = new XmlSerializer(typeof(T));

//Use the serializer we have just created and serialize the object.

}

the same goes with the Deserializer

public static T Deserialize<T>(
string serializedData
)
{

//check whether the incoming data is not a null string
if (string.IsNullOrEmpty(serializedData))
return default(T); //This can be controversial, so handle with care and as per your requirements, in certain cases you can return null as well, kindly let me know if you have anything that can improvise this code

//create a serializer
XmlSerializer xmlSerializer = new XmlSerializer(typeof(T));

//Use the deserializer we have just created and deserialize the object.

}

I must thank my friend Sidhartha http://IamJunk.spaces.live.com, as he helped me a lot to enhance the code. I've not published the whole code, in case you need it, drop me an email/comment. I will be more than happy to help you out.

All In One Entity for CRM 4.0

Sometimes back I was doing a research on a script(It is coming soon.. just wait and watch...) and that script required me to try all the CRM datatypes one by one on the form. And trust me, it was a pretty boring job to create the element on a CRM form and then check compatibility of that script with it. Anyway, I thought I can help out my friends out there just in case they face the similar situation. So here is a SkyDrive link :

https://cid-b6a90e5b5092759c.skydrive.live.com/self.aspx/BlogStore/AllInOneEntity.zip
If you find that I've missed out something, kindly drop me a note. Thanks in advance.

Friday, November 21, 2008

Google Launches Themes for Gmail

Well.. Google's flagship beta(err... hmm.. ya.. for a while..or forever?) product has just got another feature(well.. you can add 31 features a month and remove 17 of them if you are in beta.. ain't it?). It is themes...(Oh and I was thinking they will get me free land line/cell calling from Gmail browser interface :D). Anyways.. I tried.. one and it looks good.. :D.. check out the screenshot below..

My Gmail Inbox...after applying Terminal theme

Wednesday, November 19, 2008

Download Yahoo! messenger 9 setup from Yahoo!

I wanted to install Y!'s new messenger.. version 9... (oh it is beautiful I must say.. check out the screenshot..) on one of the Virtual PC... and I didn't want to connect to Internet for the sake of installing Y!.. so .. after looking here and there.. somewhere... I found that Y! keeps its installation images under http://download.yimg.com/ycs/msg/dl/msgr9/, This path doesn't have directory browsing enabled so you will not find anything there... however if you want to do an offline installation .. all you have to do is.. to click here

New UI of Y! Messenger 9. Click on the image to see the larger version.

Tuesday, November 18, 2008

You have seen Notepad... XmlPad.. and now... LINQpad..

This one has been resting in my To-Blog list for a long time. It was not that I didn't want to but since last 40 days for some reasons I was away from work and I could not post this one. We all know how important role LINQ has been playing for .Net developers who deal with SQL as well as other Data Query Interfaces. LINQ is not one stop shop for all(as of now) but it has its advantages. Anyways, this post is not to sing fan-song about LINQ but to make you guys aware of a very handy tool that can help you to be the big boss when it comes to LINQ Development.
LINQpad is a little software and more importantly free one(No.. its not open source you freetard..). It supports LINQ to SQL, LINQ to Objects and LINQ to XML. And yes it also works as a code snippet IDE. It can execute any C# 3.0 or VB9 expression or statement block. One more feature for lazy people out there is LINQpad doesn't need to be installed.. it is "Portable' by design..so what are you waiting for go.. ahead... and download it from here.

Wednesday, November 12, 2008

Voice or Video Chat? Sign in to Gmail

Gmail's official blog has this announcement shouting it loud that Gmail now has Voice and Video chat(http://gmailblog.blogspot.com/2008/11/say-hello-to-gmail-voice-and-video-chat.html).

They are providing Voice and Video chat from within Gmail. I was thinking they would have made a breakthrough Flash Web Application as Flash natively supports webcam and audio/video streaming. However Google has done something odd(at least.. it looks odd to me.. seems the innovation drive is slowing down here). Last year Google acquired a Sweden based company : Marratech. Marratech was an e-meeting startup and now Google has come up with the plugin that seems the direct result of take over(source : http://www.techcrunch.com/2008/11/11/google-adds-voice-and-video-chat-to-gmail/).

So instead of a flash application, this one is a .Net Clickonce application(PLEASE CORRECT ME, IF I AM WRONG). I detest running any application on my laptop/desktop that comes from Google so I didn't allow it to run. But when it was being downloaded, the dialogbox was the famous.. clickonce installer dialogbox. anyways..sooner or later some one from my circle will install it and I will come to know what it is all about.

Google has been pretty quick when it comes to rolling out features to its userbase lately, as a result you can see the voice and video option in menu in the screenshot below.
Also as amazing as it sounds and looks, I am not sure how well it will do in India sub-continent. Though bandwidth is comparatively better than previous years and we have decent processing power as well RAM to handle the overhead, I wonder will it be sufficient for this kind of usage or not?... only time will tell.. till then... bbbyye...

Don't be shocked if you see something like this instead of this blog


I've been getting messages from friends that they are not able to access my blog. Instead of my blog they are getting some biblecollegeonline shit. I am trying to figure it out what is wrong but as of now I am helpless. It looks like DNS Cache Poisoning or something else.. I apologize for any inconvenience caused and all I can ask is to bear with it while blogger staff is working on it.

Tuesday, November 11, 2008

Windows 7 for Developers

This guide describes features and includes vivid screenshots from the pre-Beta version released at PDC. Build applications on a solid foundation, enable richer application experiences, and integrate the best of Windows and Web services.

Recorded sessions of PDC 2008 available for download

I know how important it is to be at a PDC.. however...it is expensive... and not everybody here can attend. No worries..though.. all the recorded sessions and PPTXs are here. Download high quality videos to see what they mean by PDC...

Microsoft Virtual TechDays is back!

Microsoft Virtual TechDays provides an opportunity to the IT Pro community to dive deep into the latest offerings from Microsoft - SQL Server 2008, Microsoft System Center, Windows Vista, Internet Explorer 8, Essential Business Server, Visio & Microsoft Office communication server. During the 2-day event, Microsoft Experts will conduct 17 LIVE training sessions on how to harness the power and possibilities of these products.
Register today! for the Virtual TechDays to be held on November 25th & 26th, 2008.

You will be asked for your live id and also once you are logged in you can download recorded sessions and presentations... go ahead... Enjoy!!!

Sunday, November 09, 2008

Visual Studio 2010 and .Net Framework 4.0

One of my friend has been constantly bugging me about Visual Studio 2010.. all I've to say to him till date ..was.. dude.. I don't know when they are gonna release it.. but anyways.. few days back I ran into this newsletter... which clearly mentioned that a CTP of VS2010 is available on Microsoft Downloads.
So... here it goes...
Just check it out.. I am damn sure.. most of you will not dare to download it.. but.. hey.. this is meant for developers who love to stay ahead in the game..so... where do you stand?

Tuesday, November 04, 2008

Microsoft Announces DreamSpark India

Here comes a really GREAT NEWS for Indian Students... I mean.. those Indian Students who loves Microsoft Technologies. Do you remember earlier this year, there was a post on Skynet about Microsoft's new initiative called Microsoft DreamSpark? It was limited to some 11 countries initially, and I was wondering when Indian students will get the benefits and now the wait is over, Microsoft launched DreamSparkIndia.com.

As described by Microsoft, Microsoft DreamSpark™ is a program that provides no-cost access to Microsoft designer and development tools for verified students around the world, to support and advance their learning and skills through technical design, technology, math, science and engineering activities. This program equips tomorrow's developers with the professional tools to inspire and create today.

I suggest to go through the site once, and if you read this on or before 5th November, 2008 02.00 PM IST then you might like to watch the live broadcast of Bill Gates speech from New Delhi, India. Click Here to register.

There is a lot more to DreamSpark but we will check it out ... laterz... till then.. bbye...

Monday, September 08, 2008

Microsoft Dynamics CRM 4.0 SDK Update - v4.0.6 is out

Only difference in the description of this kit is, it doesn't mention that Report Writers Guide will be released with next update so you can hope that this one already includes one.

Friday, September 05, 2008

Embed Image in CRM 4.0 templates

In my current engagement, there was a requirement to embed images in email template. Now, as it is very well known that you can easily achieve it by copy pasting the HTML to CRM's Rich Text Editor. Most of the times it works fine. But then if it goes normal all the times I won't have to blog about it right? so.. here it goes..

In our case, we had a sample word document which had an image on top and some formatted text. As soon as this came to me, I fired up CRM's web UI and created a blank template. I created an HTML file out of word document. After opening the html file and copying/pasting, it worked fine and template got saved without any issue. Once the template was in place, I tried to apply it to an email activity. It worked fine, I could see the formatted text, the image on top and the layout was also preserved. Happily I clicked on Save button and.... whoooooshhh... it was gone.. the image was gone, everything else was there, but the image was gone. So there I was, the only thing I needed to close today to have a nice weekend was this email template fix. Also one of my colleague was working on this and he did a lot of research eliminating many other possibilities why it won't work. After few more minutes, I made a blank html page, added a nice Windows Live Logo and repeated the copy/paste on the same email template. Once it was done, I applied to the same email and voila.. it worked. So it was pretty clear that it was all due to the HTML that we were using for the template.

I always keep IE Dev Toolbar available, so I fired it up, and clicked on Validate -> HTML. The online HTML validator showed me there were some minor issues with the HTML. I corrected them and removed word HTML tags in which my IMG tag was wrapped. After this I followed the process copy/paste and test and .. there it was a .. working email template with an image.

Also it was very clear that we will have to find out a structured process to do it as there will be more templates coming soon. I might come up with an automation process, if you are interested keep watching this blog or drop me an email, if you need it urgently.
Update : This trick also works with KB Article. Just copy and paste from any Web Page to get images in your KB Article. However, it doesn't work with notes. Notes doesn't have Rich Text capabilities.

Saturday, August 30, 2008

CRM 3.0 - Hiding the Delete Button Hack

My day to day job revolves around supported solutions on CRM 4.0 and Microsoft .Net however as we all know customers some times are demanding and asks for features which doesn't come under umbrella of supportability. And as a solution provider we have to meet it by hook or crook.

In this case, I came across a mail on one of our WW Community. The problem statement was pretty clear : The customer wanted to hide delete button that appears on the CRM GridView for each and every entity(maybe selected entities too). Now they wanted the users to have rights to delete CRM records so we can't just take away their rights(Yeah.. that's the first thing that came to my mind...). But they wanted to do it via some custom applications not from the CRM Web UI. After doing some R&D I found that it can be achieved via the steps mentioned in next paragraph. I would like to declare that this code/method is NOT AT ALL supported by CRM Product group. This is just to demo that certain feature can be disabled in CRM without affecting roles.

1. Locate and back up loader.aspx from CRMWeb folder.
2. Open loader.aspx in Visual Studio or any text editor of your choice.
3. At the closure of the first script tag, copy-paste the following code

<!--/******Disable Delete Button Hack BEGIN*********/-->
<script language="JavaScript" type="text/javascript">
function HideDeleteButton()
{
//Check whether the iframe is completely loaded or not
if(document.getElementById("stage").readyState == "complete")
{
try
{
//Those menu items are part of mnuBar1 span, so we will get the reference of mnuBar1 first
//and then all the SPAN elements(represents individual menu items)
var spanElements = document.frames[2].document.getElementById("mnuBar1").getElementsByTagName("SPAN");

//iterate through the menu items and check whether the title is Delete or not
//if yes, this is the one we are looking for, set its display to none and break the loop
for(var i = 0; i <= spanElements.length; i++)
{
try
{
if(spanElements[i].title == "Delete")
{
spanElements[i].style.display = "none";
break;
}
}
catch(e){continue;}//continue in case of error
}
}
catch(e){}//ignore any other error
}
}
</script>
<!--/******Disable Delete Button Hack END*********/-->

4. There are frameset definitions at the end of the page, change
<frame name="stage" scrolling="yes" src="<%HttpUtility.HtmlAttributeEncode(homePageUrl, Response.Output);%>"></frame>
to
<frame name="stage" scrolling="yes" src="<%HttpUtility.HtmlAttributeEncode(homePageUrl, Response.Output);%>" onreadystatechange="HideDeleteButton()"></frame>
5. Test by opening up the workplace.

This script might have other side effects which I've not fully explored yet so use it at your own risk.


Friday, August 22, 2008

Microsoft Releases Photosynth

I just got this mail from one of my colleague mentioning Microsoft Photosynth has just got released http://photosynth.net/default.aspx..

About Photosynth
Imagine being able to share the places and things you love using the cinematic quality of a movie, the control of a video game, and the mind-blowing detail of the real world. With nothing more than a bunch of photos, Photosynth creates an amazing new experience.


I found it ... really... sexy.. have a look... and dont ask me about the requirements.