Skip to main content

Posts

Profiling with SQL Server Management Studio

On the Query menu, click on ‘Include Advance Execution Plan’ or click the toolbar button. Now open a new query window, type the following queries and execute them. use Northwind ; set statistics io on ; set statistics time on ;  Select top 5 * from Customers   You should be now able to see additional information in the message tab and execution plan tab (along with result tab in lower window pane)

Using the InvariantCulture Property

It is associated with the English language but not with a country or region.    The   CultureInfo.InvariantCulture   property is neither a neutral nor a specific culture. It is a third type of culture that is culture-insensitive. You can use   InvariantCulture   in almost any method in the   System.Globalization   namespace that requires a culture.  When should we use it? You should use the invariant culture only for processes that require culture-independent results, such as system services. In other cases, it produces results that might be linguistically incorrect or culturally inappropriate. You should also use   InvariantCulture   when a security decision will be made based on the result of a string comparison or case change.  The default implementations of methods such as   String.Compare ,   String.ToUpper , and   String.ToLower   use the   CultureInfo.CurrentCult...

Requirements file in Python

Requirements files in Python is used to get and install all python dependencies packages across user PCs. Here is how to create and use the requirements file using pip package manager (pip comes built in with Python 3.4 and higher. For previous versions, download and run get-pip.py) 1. Save your project dependencies in requirements.txt. It also includes correct package versions. pip freeze>requirements.txt 2. Install all packages listed in requirements.txt pip install -r requirements.txt

How to implement Wait Cursor in C#

public class WaitCursor : IDisposable {      private Cursor _previousCursor;        public WaitCursor()      {          _previousCursor = Mouse .OverrideCursor;            Mouse .OverrideCursor = Cursors .Wait;      }        #region IDisposable Members        public void Dispose()      {          Mouse .OverrideCursor = _previousCursor;      }        #endregion }

Threading tutorials from Microsoft

Do you know what’s lurking in the deepest, darkest parts of your thread pool? Take control of that monster and keep your applications responsive by becoming a threading expert with this free 5-part course. Advanced .NET Threading , Part 1: Thread fundamentals Advanced .NET Threading , Part 2: Compute-bound async operations Advanced .NET Threading , Part 3: I/O-bound async operations Advanced .NET Threading , Part 4: Thread synchronization primitives Advanced .NET Threading , Part 5: Thread synchronization locks

C# application - Sending email from Gmail with SMTP authentication

If you are getting the below error - “The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required” 1. Check if you have received an email notification - We recently blocked a sign-in attempt to your Google Account Sign-in attempt details Date & Time: Location: 2. Check this link and acknoledge the sign in attempt as yours - https://security.google.com/ settings/security/activity 3. Go to this link and enable access to less secure applications https://www.google.com/ settings/security/ lesssecureapps

A journey to remember

After my Diwali vacation in India, I was heading back to Helsinki by Finnair flight on 21st November to resume my work in Finland. The weather during the flight was extraordinarly good and for the first three hours we overflew North India and Afghanistan with tremendous views. Southern Afghanistan North India from 35ooo feet Arriving at Helsinki, outside temperature was at -3 degrees – a hefty change from the 28 degrees in Delhi – and it was snowing heavily. I thought of taking a yellow taxi from airport, but that didn't arrive even after waiting for 15 min. I was too tired to wait anymore, so just boarded a Finnair shuttle to city center. Though, my home is walkable distance from there, but the snow, chilled wind and my luggage made me queueing at the taxi stand and finally I reached home at around 4 pm. Welcome back to home !