Wednesday, May 25, 2016

About-VisualStudio2015-Extensions

VS2015 Update 2

It is better to have the latest visual studio with its companion extension for web development

VS2015 Extensions

Web Extension Pack The easiest way to set up Visual Studio for the ultimate web development experience.
Web Essentials Web Essentials is very well-named, it's essential, there is a whole host of features that Web Essential adds to Visual Studio, from Browser Link to its amazing addition to CSS intellisense and zen coding and more.
Bootstrap Snippet Pack The same thing as jQuery snippet, but this time it's for Bootstrap, it makes your life a lot easier and you don't have to look for examples on the web anymore, just type "<bs-Something" and you're good to go.
CssCop I'm not much of a CSS guru and I mostly rely on CssCop to point out my CSS mistakes, CssCop can check your Css based on set of rules and make sure you are following the best practices and avoid nasty mistakes.
jQuery Code Snippets This one is pretty self explanatory, it extends the Visual Studio jQuery snippets, and you don't need to spend your time typing $.ajax and what comes after it, it makes your jQuery coding speed a lot faster.
Node.js Tools for Visual Studio-NTVS NTVS is a free, open source plugin that turns Visual Studio into a Node.js IDE. It is designed, developed, and supported by Microsoft and the community.
ASP.NET MVC Boilerplate Are you sick and tired of adding must use packages and tools like elmah, glimpse, etc. to your project every time you want to start a project? Well, ASP.NET MVC Boilerplate addresses this issue, it is a template with all the packages and components that we use in every project, but it is not in default Visual Studio template.
SideWaffle Template Pack Another amazing extension, it adds tons of templates to the Visual Studio template, from templates for creating jQuery plugin to Angularjs Project template, it also makes creating custom templates a whole lot easier.
JSLint.NET JsLint is a code quality and validation tool for JavaScript, but this particular extension is a wrapper for Douglas Crockford's JSLint that bring this amazing tool to .NET.
JavaScript Map Parser Extension for Visual Studio that shows a map for JavaScript code in a separate panel.
Copy As HTML Copy selected code in HTML format while preserving syntax highlighting, indentation, background colour and font. Options: Max Height, Title Block, Alternating Lines, Line Numbers, Wrap Lines, Un-indent, Background Colour, Class Names. Converts RTF, outputted by VS, into HTML.
Image Optimizer Uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. Can do both lossy and lossless optimization.
Developer Assistant Searching for code sample couldn't be any easier with this extension, you can see and use sample code right from your code as you are typing.
Ref12 Ref12 is a pretty simple but necessary extension, it gives you the ability to navigate to the actual source code of the .NET Framework rather than just meta data.
Code Cracker for C# In the past, only big companies like JetBrain (Creator of Resharper) could build a code analysis feature and tooling for Visual Studio, because doing so was not an easy task and required a lot of work and money, but with release of Roslyn compiler and set of API that it provides for querying and working with compiler, it is easier to build a code analysis tool for C# and VB.
Refactoring Essentials Another code analyzer for C# and VB.NET is Refactoring Essential, it is available as both extension and Nuget package that you can use on project by project bases. https://www.nuget.org/packages/RefactoringEssentials/ Install-Package RefactoringEssentials
ResXManager Manage localization of all ResX-Based resources in one place. Shows all resources of a solution and let's you edit the strings and their localizations in a well-arranged data grid.
Visual Studio Spell Checker This extension spellchecks your comments, strings, and plain text, it's pretty non-intrusive and doesn't get in the way of your actual code and doesn't mix itself with error highlighting.
Productivity Power Tools A lot of native Visual Studio capability that we see today was originally available as an addition in this extension and eventually got integrated in Visual Studio, but this extension still has a lot of great features.
Snippet Designer Typing repetitive stuff pretty much bores me to death, I often create snippets for these kind of codes, snippet designer helps you do it easily and painlessly.
Chutzpah Test Adapter for the Test Explorer Chutzpah adapter for the Visual Studio Unit Test Explorer. Chutzpah is an open source JavaScript test runner which enables you to run JavaScript unit tests from the command line and from inside of Visual Studio.
Chutzpah Test Runner Context Menu Extension Chutzpah is an open source JavaScript test runner which helps you integrate JavaScript unit testing into your website. It enables you to run JavaScript unit tests from the command line and from inside of Visual Studio.
CodeMaid CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
VSColorOutput Color output for build and debug windows.

Thursday, May 19, 2016

CSharp_BitCountAlgorithm


Bitcount algorithm in C#

In this article, we will learn:

  • Sparsh bitcount algorithm
  • Iterated bitcount algorithm
  • Precomputed bitcount algorithm
Bit counting is useful when using compact data structures in memory with bits. In this article, we will discuss various ways of counting total no of bits.

Sparsh bitcount algorithm:

This is a simple and fast algorithm that walks through all the bits that are set to one. It is static. It does not rely on saving state.

Output:

Sparsh_bitcount

Iterated bitcount algorithm:

This bit count is slow,simple and reliable.

Output:

Sparsh_bitcount

Precomputed bitcount algorithm:

This program demonstrates the use of a precomputed bitcount lookup table. The InitializeBitcounts method uses a logical method to precompute the bits in the table based on how the binary representation changes.

Output:

Sparsh_bitcount

SPECIAL THANKS TO CSHARPSTAR