Tag Archives: c#

Iterating over a custom ‘Jagged Array’ in Python

A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an "array of arrays." C# natively differentiates between a jagged and a multidimensional array. To iterate over a every single element of a Jagged Array in […]

0  

Convert vowels to uppercase in a string

Given a string – say “hello world”, I was interested in capitalizing the vowels in it – IN A CLEAN & EFFICIENT WAY! In the first approach, I use a StringBuilder object to hold the intermediate String while in the second approach, I’m using a C# feature – Linq. In the second approach, there is […]

0  

Serializing Objects in JSON format

Serializing data/objects using XML is quite a standard way over the Web. But, XML has it’s own set of disadvantages owing to which I tried serializing objects in JSON format. It seems .NET has in-built support for doing the same. One simply needs to use the JavaScriptSerializer class available within ‘System.Web.Script.Serialization’ namespace. using System; using […]

0  

How the overflow arises!

I looked up scripting languages and saw the unlimited precision capability of the integer format. It immediately made me think how overflows are handled in C! C language uses 16 bit to represent variable type int. Most significant bit is used to represent the sign  If the most significant bit is zero then the value […]

0  

Diff : File Comparer (Version 1)

I was interested in building a program to DIFF files similar to BeyondCompare, WinMerge, diff app inside Tortoise & other subversion utilities. So, I came up with the following simple application which takes in 2 folders and performs a recursive Diff throughout and lists the files which are content-wise different or not present in either […]

0