Saturday, September 24, 2011

Algorithm Simulator - Insertion Sort, Selection Sort and Bubble Sort

For the 'Design and Analysis of Algorithms' (DAA) subject in the 2nd semester of the 2nd year at SLIIT, we had to develop an application to demonstrate the usage of some algorithms. We were given a list of algorithms and we were given freedom to choose any programming language and tool for the development. 

I chose C# since I'm familiar with .NET framework than Java and Visual Studio 2008 as the IDE. The algorithms I selected were Insertion sort, Selection Sort and Bubble sort. The user should be able to provide inputs and then the application should simulate how the sorting is done. 

I used Labels to display the elements in the array and Timers to move the Labels accordingly. 

I'd like to share the source code so that those who are new to this can learn how to develop such kind of application.

To improve the user friendliness and appearance, I used an 'Outlook bar' in the application. It was an open source project where I found the code from CodeProject

Special thanks to Professor Godfrey Muganda of the Department of Computer Science, North Central College, Naperville, IL for the support provided via emails replying to my questions related to the development of this project.

These are some screen shots of the application.

-Tharindu Edirisinghe-
-SLIIT 10'-

Saturday, September 3, 2011

Issue with DropBox

I normally use mediafire to share my files but sometimes mediafire is not working at SLIIT due to the proxy server. Therefore I wanted to find a better way to share files. Emailing is not possible because most of the time my files contain exe files and gmail is not allowing exe file attachments.

Then I moved into dropbox. It is a very good solution since it synchronizes the files in my PC so that I can access them from anywhere. Sharing is also easy because we can get a public link and share the link so that the particular file can be downloaded using the link.

This is the place where the problem encountered. When I drag a file into the public folder of dropbox in my PC, the file is uploaded to the server. I can right click on that file and get the link for public sharing.

 Suppose I have two files in my drop box called '' and 'MATCH.exe'. Now I'll get the public sharing links for those two files.
For security reasons I've indicated some part of the link as 'XXXXXXX' but in both links those are same. Now suppose I have another file called 'Hello.txt' in my public folder. Now somebody who has a public link of my drop box can download it without knowing the URL for that file. 
It can be derived as ''. So if somebody has a link of a file in my dropbox and also if he knows the file name then he can download that file like this. Or even by guessing the name of the file it might work. So when you are putting your personal files to your dropbox, be careful.

-Tharindu Edirisinghe-
-SLIIT 10'