Selenium Based Scraping with .NET
Selenium Based Scraping with .NET

Script that I wrote when for scraping some agents info for a project from Life Happens. Scraping was done for different zip codes. Used C# .NET and Selenium on the project.   [crayon-5dd1587a491d3685076798/]  

Visual Studio Ignore Bin, Obj Folders From GIT Repo
Visual Studio Ignore Bin, Obj Folders From GIT Repo

Found a very useful template file to exclude folders like bin and obj. The template is available at the following github location: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore Just create a “.gitignore” file inside your project where you have setup your git repository and copy and paste the content from the link above to this file. Get rid of bins!

Upload Image and Create Thumbnail
Upload Image and Create Thumbnail

In this post, I will show an implementation of uploading image to server and creating a thumbnail version of the uploaded image. Creating a thumbnail is useful as it reduces image size and dimensions and improves application’s performance. In your ASP.NET Controller’s HttpPost Action, you can get the uploaded image file as HttpPostedFileBase as: HttpPostedFileBase... » read more

Implementing Inbox Messaging System in ASP.NET
Implementing Inbox Messaging System in ASP.NET

In this post, I would like to write about creating a simple Messaging System for your application. Almost all user based applications require some form of messaging system. Mainly the messaging system is needed so that users within the application can send messages to one another and also, it is needed to show any form... » read more

Get Random Date From A Date Range
Get Random Date From A Date Range

This is a quick trick to generate a random date between two date ranges. First, create a function that generates a random number between two given values: private static int RandomNumBetween(int smallNum, int bigNum) { Random rnd = new Random(); int randomValue = rnd.Next(smallNum, bigNum + 1); return randomValue; } Now, use this function to... » read more

C# : Write DataTable To CSV
C# : Write DataTable To CSV

Here’s a quick code to write data from database to a CSV format file in C# .NET. I find this function really useful as I frequently come across this scenario where I have to create a report for the client. Once our data is loaded into a DataTable, this function can be used. public static... » read more

Reducing Cyclomatic Complexity Using Delegates
Reducing Cyclomatic Complexity Using Delegates

In the previous post we looked at what Cyclomatic Complexity is and why it is important to write programs with low Cyclomatic Complexity. Here I would like to show an example of reducing Cyclomatic Complexity with the use of Delegates. This post is going to be extremely code intensive so buckle up guys! Let’s start.... » read more

Cyclomatic Complexity
Cyclomatic Complexity

Cyclomatic Complexity is a software metric used to calculate the complexity of a program. It is a measure of number of possible use case flows for a given program’s source code and is directly dependent upon the number of control flow statements (if/else statements and switch cases) within the code. For example, a method with... » read more

Notes on Spring.NET DAO Code Configuration
Notes on Spring.NET DAO Code Configuration

In this short article, we will look at how Dependency Injection for Data Access Objects can be implemented using Spring.NET. “Data Access support in Spring is aimed at making it easy to work with data access technologies like ADO.NET and Nhibernate in a standardized way.”- Spring.NET First an interface that exposes the methods that can... » read more