h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

VS 2010 Theme Support

VS 2010 Theme Support


  • By Default you will get the following themes
  • Windows XP Silver
  • Windows Classic
  • Windows XP Emerald
  • Windows XP Autumn
  • Windows XP Olive
  • Windows XP Blue
  • Windows Aero
  • Windows XP Blue
  • Default Visual Studio 2010 Theme

XPS To PDF File in VB.Net

Select .Net 3.5 Framework

Private Sub XPSToPDF(ByVal xpsFile As String, ByVal PDFFile As String)
        PdfSharp.Xps.XpsConverter.Convert(xpsFile, PDFFile, 0)
End Sub

Add Reference
PDFSharp.Xps  (search on Google)

Performance improvement in SQL Server

Performance improvement 

  • Use shortest data type possible
  • Make sure the data types of the columns participating in a JOIN are of same type
  • Use Calculated columns instead of on the fly complex calculations 
  • Consider using RCSI (read committed snapshot isolation) to preclude readers from blocking writers (writers will still block other writes but this is much graceful than using NOLOCK hints)
  • Partition Alignment (64K or 1024k) and block size (or cluster size) of 64KB
  • Keep the transactions as short as possible to preclude blocking/deadlocking/TLog  bloating issues
  • If they need to trace, use server side trace
  • If it is Ad hoc workload, consider turning on the "Optimize the Adhoc Workload" option
  • Teach them how to figure out missing indexes from DMVs but add them only necessary - tweak the existing indexes first (make them composite and include columns)
  • Minimize queries that use text searches, rather use full-text indexes on those columns
  • Familiarize themselves with In-Memory OLTP feature
  • Avoid float data types if you need accuracy
  • Avoid nested views
  • Familiarize with different granular levels of compilation
  • Pitfalls of using HEAPS
  • Revisiting the index configuration every few months
  • Familiarize themselves with Blocked Process Report
  • Using SET NOCOUNT ON, avoiding sp prefix, etc
  • Parameter Sniffing 
  • Using triggers sparingly
  • Use of sp_executesql instead of EXEC
  • Pros and cons of using natural keys vs surrogate keys
  • Data growth and its adverse effects on query time and ways to mitigate them
  • Avoiding all hints unless absolutely necessary
  • No user prompts within explicit transactions
  • Peer review and unit test the code before submission
  • Caching rarely changing lookup table data on the client side to mitigate network chatter

Refer from

Asynchronous Programming with Async and Await

Asynchronous Programming with Async and Await


  • Asynchronous Programming is introduced in VS 2012.
  • It's support .NET FRAMEWORK 4.5 and Windows Runtime.
  • application retains a logical structure that resembles synchronous code.
  • Asynchronous is essential for activities that are potentially blocking, such as when your application accesses the web.
  • In an asynchronous process, the application can continue with other work that doesn't depend on the web resource until the potentially blocking task finishes.
  • The Async and Await keywords in Visual Basic 
  • By using those two keywords, you can use resources in the .NET Framework or the Windows Runtime to create an asynchronous method almost as easily as you create a synchronous method.
  • Asynchronous methods that you define by using async and await are referred to as async methods.
  • Async methods are intended to be non-blocking operations.
  • An await expression in an async method doesn't block the current thread while the awaited task is running.
  • Instead, the expression signs up the rest of the method as a continuation and returns control to the caller of the async method.