Home 2017-01-14T17:15:04+00:00

Excel find duplicate cells except first one

Uses the countif function in excel to find duplicate cells except first one. The formula is =COUNTIF(A$1:A1,A1)>1 If the countif function returns a number greater than one then it means the value is duplicate and the value of the cell will be set to true.     If you want to highlight the cells that contain the duplicate values you can use conditional formatting and apply the same formula. Go to Home tab and click on Conditional Formatting and then to select New Rule. Select Use a formula to determine which cells to format Add the formula after adjusting it [...]

May 10th, 2017|Categories: Excel|0 Comments

Using iTextsharp to edit PDF

iTextSharp is a free open source PDF library that can enable your applications to, generate documents and reports, split or merge PDF documents, fill out forms and generally manipulate PDF documents such as password protecting a document or changing the permissions. Below I describe the process I follow when I have PDF forms that are flattened and I need to fill them out but no acrofields are present. The only way I can do it without buying any tool is to either add acrobat fields to the document or save myself time and add directly the text I need to [...]

May 8th, 2017|Categories: C#|0 Comments

Split string in SQL

Split is used to break a delimited string into multiple rows. The below user defined function udf_Split accepts 2 parameters Input the string that you want to split into multiple rows. Delimiter the delimiter based on which the seperation will be performed.

January 10th, 2017|Categories: SQL, SQL Server|0 Comments

PadLeft number in SQL

PadLeft accepts 3 parameters and returns a string that right aligns the characters. Value: an integer number PadChar: the character that will be used for the padding Length: the length of the output

January 10th, 2017|Categories: SQL, SQL Server|0 Comments

Remove time from datetime in SQL

There are two ways to remove the time from the datetime datatype. The first method is using the dateadd and datediff system functions and the second method is to convert from datetime to characters. --First Method SELECT DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0) --Second Method SELECT CONVERT(CHAR(11), GETDATE(), 113) The second method converting the date time to characters is subject to date format issues. For SQL Server 2008 and later you can simply cast the field to date data type to remove the time from the datetime. Be careful, if you are going to add a function or casting [...]

January 10th, 2017|Categories: SQL, SQL Server|0 Comments

Convert time to seconds in javascript

In my projects I often have to reuse the same code over and over again. When it comes to back end programming I have lots of libraries ready, which I simply reference to my projects and save time and frustration of having to write the same code. But when it comes to javascript development, I didn't have the need so far to concentrate into a single location some useful functions and methods that I often use. Some of these methods are time related and converting it to seconds, milliseconds and vice versa converting seconds, and milliseconds back to time. After [...]

January 9th, 2017|Categories: javascript|0 Comments

Recent Posts