Wednesday, November 09, 2016

How to: Uninstall vs2013 or vs2015 completely

When you uninstall from control panel there will be some packages do get left behind. Some are packages that do not participate in package ref-counting – often those that we do not build. Some package may be left behind because uninstalling packages in Visual Studio. If a package fails, uninstall will move on to uninstall the next package. Some are just too essential for other products to uninstall like the .NET Framework and Visual C runtimes: of the vast number of installers that chain them, too few ref-count them to rely on that feature.

Whatever the cause, having components left behind will consume disk space and may cause troubles upgrading to Visual Studio RTM.

This is how we can completely removing Visual Studio components left behind after an uninstall.

Forcibly uninstall using original installer

You do not need to have a bundle installed to forcibly uninstall packages by default. If you have the original installer – say, a previous download – you can run it directly like so:

vs_enterprise.exe /uninstall /force

Friday, November 04, 2016

Outlook: Copy email signatures to another computer

Recently i have switched my computers i could able to get outlook backup files abut not signatures. But i found a way to get all previous signatures to new computer.

Here is how you can do it, If you have created email signatures that you add to outgoing messages, these signatures can be copied to another computer. You can then use the signatures with Outlook on another computer.

Step 1: Copy email signatures from the original computer
  1. Exit Outlook.

  2. Open the folder where signatures are saved.

Because the Signatures folder is a hidden folder, the easiest way to open the folder is to use the command %APPDATA%\Microsoft\Signatures on the Start menu.

  • On Windows 7/8.1/10,  Click Start. Next to the Shut down button, in the Search programs and files box, type %APPDATA%\Microsoft\Signatures and then press Enter.

    search

  • Windows Vista    Click Start. Next to the Shut Down button, in the Search box, type %APPDATA%\Microsoft\Signatures and then press Enter.

    Windows Vista start menu with search box

  • Windows XP    Click Start, click Run, type %APPDATA%\Microsoft\Signatures and then press Enter.

    Windows XP start menu with search box

  • Copy the signature files.

    There are three files for each email signature — an HTML Document (.htm), Rich Text File (.rtf), and Text Document (.txt).
Step 2: Copy signatures to the destination computer
  1. Exit Outlook.

  2. On the destination computer, open the folder %APPDATA%\Microsoft\Signatures.

Because the Signatures folder is a hidden folder, the easiest way to open the folder is to use the command %APPDATA%\Microsoft\Signatures on the Start menu.

  • Windows 7    Click Start. Next to the Shut down button, in the Search programs and files box, type %APPDATA%\Microsoft\Signatures and then press Enter.

    search

  • Windows Vista    Click Start. Next to the Shut Down button, in the Search box, type %APPDATA%\Microsoft\Signatures and then press Enter.

    Windows Vista start menu with search box

  • Windows XP    Click Start, click Run, type %APPDATA%\Microsoft\Signatures and then press Enter.

    Windows XP start menu with search box

  • Start Outlook.

    Your stationery is now available in Outlook on the destination computer.
Step 3: Update older signatures

For signatures created in older versions of Outlook, you should update the signature files so that they use revised HTML code that uses cascading style sheets (CSS). This helps prevent potential problems when switching or deleting signatures in a message.

  1. Click the File tab.

  2. Click Options.

  3. Click Mail.

  4. Under Compose messages, click Signatures.

  5. In the Signatures and Stationery dialog box, in the Select signature to edit list, click a signature.

  6. Click in the Edit signature box, and then click Save.

Hope this helps!!!

Tuesday, October 25, 2016

How to add/concatenate string in Excel

The CONCATENATE function in Excel is designed to join different pieces of text together or combine values from several cells into one cell.

The syntax of Excel CONCATENATE is as follows:
CONCATENATE(text1, [text2], …)

Concatenating the values of several cells
The simplest CONCATENATE formula to combine the values of cells A1 and B1 is as follows:
=CONCATENATE(A1, B1)

Concatenating a text string/formulas and cell value
There is no reason for the Excel CONCATENATE function to be limited to only joining cells' values. You can also use it to concatenate various text strings and formulas to make the result more meaningful.
For example:
=CONCATENATE("Last Updated: ",TEXT(TODAY(), "mm/dd/yyyy"))

Thursday, October 20, 2016

PHP vs ASP.NET Comparison

Things that need to observe before finalize between PHP and ASP.NET on any project.

ASP.NET code executes a lot faster compared to PHP. In general most of time of pages rendering time dependent on accessing DB and querying database.

In connecting database ASP.NET is a lot better - in asp.net we typically use LINQ which translates our object queries into stored procedures in SQL server database. Also connection to database is persistent, one for one website, there is no need for reconnecting.
PHP, in comparison, can't hold SQL server connection between request, it connect, grab data from DB and destroys, when reconnecting the database is often takes 20-30% of page rendering time.

ASP.NET have two main frameworks designed for it (Web forms and MVC), installed with environment, where in PHP you must get a open-source framework. There is no standard framework in PHP like in ASP.NET.
Since PHP is open source, its popularity differs based on people usage. So every year a new framework will come up for PHP in top list.

Whereas ASP.NET language is so rich, standard library has solutions for very much common problems, for PHP its standard library very open to public and any one can override.

Regarding Costing, PHP, MySQL server, PostgreSQL server, Apache server, and Linux OS are all free and upgrades are also free. 
ASP.NET and IIS are free if you purchase Windows OS. There is a substantial licensing cost for a Microsoft Windows Server, Microsoft SQL Server and future upgrades. For example, Microsoft Server 2008 R2 Standard - 64-bit cost is about approximately $1029 and Microsoft SQL Server 2008 Standard Edition For Small Business cost approximately $1038.

For Hosting, Now a days both hosting of PHP and .NET websites are no different. Both a similar or more over same when compared Windows and Linux environments.
PHP requires LAMP (Linux, Apache, MySQL and PHP) which is popular among hosting companies. ASP.NET requires Windows hosting.

Until a few years ago, Windows hosting used to be significantly more expensive than Linux web hosting. This is hardly true today; you can easily find Windows hosts for almost the same price as Linux web hosts. When we have PaaS, Platform as a Service all hosting provides are offering Pay as you service. Ex: Azure, Amazon WS etc.,

PHP is platform independent and can run on any platform — Linux, Unix, Mac OS X, Windows.

ASP.net is built to run only on Windows platform.

There has been much debate about this subject and most of the debates have been biased and have been tailored to promote one of the programming languages instead of informing the audience.
Scalability and ease of maintenance have nothing to do with whether you select PHP or ASP.NET platform. Web Application scalability and ease of maintenance primarily depend on:

  • Programmers' experience
  • Using the best programming practices
  • Using a solid programming framework
  • Following programming guidelines and standards

In my experience ASP.NET can certainly compete and surpass PHP in terms of raw speed. My personal opinion is that a ASP.NET-MVC compiled web application would run more efficiently/faster than the same project that would be written in PHP.

And this debate goes on and on!!!
 
Thank you

Types of exception in c#

A C# exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero. Exceptions provide a way to transfer control from one part of a program to another.

C# exception handling is built upon four keywords: try, catch, finally, and throw.

  • try: A try block identifies a block of code for which particular exceptions is activated. It is followed by one or more catch blocks.

  • catch: A program catches an exception with an exception handler at the place in a program where you want to handle the problem. The catch keyword indicates the catching of an exception.

  • finally: The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown. For example, if you open a file, it must be closed whether an exception is raised or not.

  • throw: A program throws an exception when a problem shows up. This is done using a throw keyword.

Types of Exceptions in C#

Exception Class

Description

System.IO.IOException

Handles I/O errors.

System.IndexOutOfRangeException

Handles errors generated when a method refers to an array index out of range.

System.ArrayTypeMismatchException

Handles errors generated when type is mismatched with the array type.

System.NullReferenceException

Handles errors generated from deferencing a null object.

System.DivideByZeroException

Handles errors generated from dividing a dividend with zero.

System.InvalidCastException

Handles errors generated during typecasting.

System.OutOfMemoryException

Handles errors generated from insufficient free memory.

System.StackOverflowException

Handles errors generated from stack overflow.