purpose of life is joy


How to : Copy a file from local machine to Hadoop remote server using putty?

Currently, Im working on Big data and Hadoop. I was trying to connect and test with Hadoop server using putty instead of VM. very basic challenge I faced was copying from local to remote Hadoop server using putty.But there is no direct option to upload from putty GUI user interface. hence I stuck in the middle of copying files to Hadoop server. then after a long find, I got one simple solution to upload files using putty command line which is working absolutely fine. Please follow the below simple steps Download Putty : Download putty from http://www.putty.org/ website for windows. Install Putty in your windows OS Go to run and type cmd to open command prompt. Run the below command with parameters pscp [localpathfilename] [loginname]@[servernameIP]:[serverpath] you can check the copied file by login to the server using putty again.

How to : remove .SVC extension from WCF service URL

By default, WCF service URL runs with .svc extension. sometimes, I felt that .svc extension is not useful when we reference or share the service URL to application or public. There is a very simple way I found to remove this extension and run as very plain URL with out any major coding. Normally, URL looks like below http://domainname/WCFServiceName.svc/MethodName?parameter We need to change the above URL to below one. Looks simple and neat right? http://domainname/WCFServiceName/MethodName?parameter Simple solution is to implement it at web.config level using URL re-writing which is very very simple. Other methods like writing custom URL Re writing module, configure at server level are little complex than compared to web.config changes.We have to apply changes under system.webserver as below below WCFServiceName names alone we need to change according to your service name. try now with removing with .svc URL. Share your feedback!!! <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> <rewrite> <rules> <rule name="WCFServiceName" stopProcessing="true"> <match url="^WCFServiceName/(.*)$"/> <action type="Rewrite" url="WCFServiceName.svc/{R:1}" /> </rule> </rules> </rewrite> </system.webServer>

How to : rename the existing page under blogger in 5 steps?

There is no option to rename a blogger page as like any file name in OS... But then ..how? There is a simple trick to do that.. By default, blogger takes the name of the page from first line of the content. So.. here, technically, we aren't renaming the file rather we are creating new page with file name by following the below steps. Step 1: Create a new page under blogger. Step 2: Type a desired name on the first row that you want to name the page. ( Important step) Step 3: Save and Publish Step 4: Copy the content from old file and paste it in new page. if you want, you can  delete the name that you have added in Step 2. Step 5: Delete the old file. That's it. your new page is ready. I have done it for one of my blog. Implement and share your feedback.

How to : Clear/Delete History in Browsers?

Very Simple steps to clear or delete history in browsers. sometimes, it may differ from OS to OS. but you can follow the below ground rules. Firefox 3.7 & Above : Click on Menus : History>Show All History>Under Library Click on the period you want to delete. > Right click on item and choose delete. Chrome Browser : Click on wrench icon>choose History item>Click on Edit item on right top>Clear all browsing data. Internet Explorer: Click on Internet Options from Menu>Click on delete under Browsing History Panel. Happy Surfing and cleaning

How to : edit an exisiting blog post in Widows Live Writer thru blogengine.net?

With the Windows Live Writer (WLW) you can create or open local draft version of a post. but Windows Live writer don't have a feature of editing the existing posted blogs. But I found one plugin which is very useful to edit the existing blog. When I search for the edit an existing blog post in google, I came across with the below nice plugin. Download the below plugin and install it on your machine. http://aovestdipaperino.com/pages/wlw-post-download-plugin-instructions.aspx Syntax to open an existing blog post is wlw://www.yourdomain.com/?postid=[postid]. Here http should be replaced with wlw. when you hit above link with your domain information and post id, existing post will open in Windows Live Writer. Edit existing post thru BlogEngine blog Under the PostView.ascx user control, add below code where ever you would like to show the "Edit in WLW" link.   <asp:LoginView runat="server" ID="LoginView1"><LoggedInTemplate> <a href="<%=Utils.AbsoluteWebRoot.ToString().Replace("http","wlw") + "?postid=" + Post.Id%>" rel="bookmark">Edit in WLW</a> </LoggedInTemplate></asp:LoginView>  

How to : Add app_code custom control into aspx page

Some time back, I was struggling to include the custom control to a page which I have created under the app_code folder to aspx page. Manually, I have done this with tags and so on. But I couldn't register it to the page. I felt I stuck here and there is no option to do that so. But I have noticed that many places of sample application, They referred the simple custom control in their pages. Below is that simple option to refer the custom controls to your asp.net pages.1.      Go to the aspx page design mode.2.      Register your control with the below template<%@ Register Assembly="__code" TagPrefix="[TagPrefix]" Namespace="Your.Namespace" %>3.      And use the control with the below syntax<[TagPrefix]: [TagPrefix] id=”” runat=server></<[TagPrefix]>Now you can easily compile and referrer the custom control under app_code folder.

How to : get content data type inside a string in C#?

By default, .NET have the features of identifying the data type inside a string. Everybody using this feature already in our day-to-day development activity. i.e. none other than TryParse. This TryParse method will help us in identifying the right type from the string. [More]

How to : convert a string content to native data type in C#

Most of the .NET data type having the TryParse method. This method will take input of the string and try to convert the value to the base type if it is successful, it ll return the converted value into out parameter and returns boolean value. This method will be helpful at the time of converting a string to a specific data type. [More]

How to : Use conditional WHERE clause using CASE statement in MS SQL Query

Adding case statement in where clause sometime we may not get the exact output we required. some solution suggested to add or condition instead of using case statement which again not giving desired results. but one solution I have found using case statement in where clause in reverse way. [More]

How to : fix SQL timeout error from ASP.NET (Parameter Sniffing)?

Recently, I have faced an issue while developing an application using MS SQL 2008 and ASP.NET. I have created a SP which is running fine in from SQL Server Management Studio. But, When I execute it thru the asp.net application, it is timing out. i tried debugging and doing R&D. but in vein. later on i found the reason in the web saying parameter sniffing. Parameter sniffing? Oh yes. this is new to me. what is this by the way? [More]
Protected by Copyscape Web Plagiarism Check