Author Archives: Bhawesh Kumar

Upload image to ASP.NET Web API 2

By | October 8, 2020

Introduction This post will provide detail on uploading image from a web application (ASP.NET MVC5 web application) to a web service (ASP.NET WebAPI2). We will use Visual Studio 2012 (.NET framework 4.5) to build web application and web service. Web Application Web application is written using Microsoft ASP.NET MVC5 and Razor views. The below given… Read More »

Snippet – Palindrome using C#

By | October 27, 2015

Old simple Palindrome using C# This is just a code snippet for creating a palindrome program. Please find code below. Project Structure This is a console application built using VS 2012. IDataType Interface Integer Palindrome Implements IDataType interface. String Palindrome Implements IDataType interface PalindromeFactory class Returns right type of object depending on data type.Example StringPalindrome… Read More »

Creating RESTful Web API

By | October 20, 2015

Introduction This post is about creating a RESTful web API using Microsoft technology stack. We will be using Visual Studio 2012 to build this REST service in C#. Entity Framework will be used for persistence in SQL Server database. REST Project Structure Open Visual Studio and click on File –> New –> Project (Shortcut : Ctrl… Read More »

SQL Server Password

By | October 9, 2015

Introduction How to reset SQL Server password. This post is all about helping users to unlock, or have a backdoor access to SQL Server database when they are locked out. The post will help in resetting SA password or adding a new user with SysAdmin privileges. You can always trim down user role later but this… Read More »

Creating widget in ExtJs 6

By | October 27, 2015

Introduction This post is about creating widget in ExtJs 6. We will create a VOIP controls widget. It will have buttons for starting a Phone call, Audio, Video, Screen sharing and Terminating session. This ExtJs widget will demonstrate having multiple states icons. We will have a disabled, On/Off or Connected/disconnected states. This widget will also encapsulate functionality to… Read More »

Introduction to Model-View-Presenter

By | April 21, 2015

Introduction This is a simple MVP implementation in an ASP.NET application. I used this pattern a lot during 2007-2011 time period before ASP.NET MVC in Microsoft world started to gain popularity. MVP separates visual display logic from data procurement logic. In Model-View-Presenter, View is solely responsible for display of data. Presenter is concerned about getting the relevant… Read More »

How to reduce scanned PDF file size on Mac

By | August 19, 2018

Problem: Reducing PDF file size on Mac I scanned some of my personal documents in PDF format on Mac. The files were big sized for any email attachment and so I started looking for some application or free solution to reduce these PDF documents. The first solution that was readily available on my Macbook was to use Preview.… Read More »

ThymeLeaf – Disable control dynamically

By | April 21, 2015

We face a common scenario to display a control active or disabled on UI depending on model (Spring MVC) attributes. There are few examples to perform this in ThymeLeaf . After some googling and going through ThymeLeaf documentation we found two different ways to perform this. Make two HTML controls The code snippet below displays… Read More »