Category Archives: Code Snippets

Short and usefull code snippets and tutorials used in day-to-day programing

Add ‘count #’ column to JTable

jtable count columnHow to add ‘count#’ column in JTable

Read More →

Your personal SMS Gateway with C#

Today I will describe simple but effective way to send sms from your computer using your mobile phone and a short C# application. I’m using Nokia 6070 but I guess any phone which has the ability to send SMS through AT commands will do. First of all you would have to have a mobile phone […]

Read More →

Windows Forms application with Splash Screen

Today I will describe how to add simple yet effective splash screen functionality using Visual Basic assembly goodness. To show exactly how to do that I will create a simple project describing step by step what you have to do to create splash screen for your win forms application. First of all, lets create a […]

Read More →

Reading XML from the web using C#

Today I will describe quick and dirty way to read xml data received as a web response. This can get very usefull if you want to send some information in a quck way without creating whole bunch of web service references etc. Lets say I want to get some data from the server in the […]

Read More →

Launch your application automatically when the system starts with C#

In this article I will describe automatic startup of your c# application on windows machine using the registry settings. This article is somehow opposite to the one posted earlier about automatic shutdown. To set the registry for your application to start up automatically you need to find the key responsible for automatic startup and set […]

Read More →

Shutting down Windows with C#

This article describes how to shut down your machine using C# code. There are a few approaches to do that in C# but I will describe the easiest one, which works on both Win XP and Vista. All you have to do is just to make sure that you don’t have any additonal threads running, […]

Read More →

Backup your MS SQL Server with C#

Today I will describe some code snippets on how to backup your MS SQL Server database to a ‘.bak’ file using C#. Later on we will zip our .bak file using open source C# zip library as bak files seems to have high compression ratio. Backing up files require us to connect to the database […]

Read More →

Linux simple backup with FTP

This is my first post under new domain ‘softwarepassion.com’. I’m planning to blog more from now on as I have loads of new things to blog about :). Today I will present you with simple backup shell script I have running on one of my servers. The script is damn easy and all it does […]

Read More →

Automatic web pages download with C# browser control

I have decided to write a short post on how to automate page download from the Visual Studio using Browser control after my long (longer than one day 🙂 ) very hard research on the internet. Couple of days ago I have decided to start my new personal project which is offline feed reader named […]

Read More →

Converting BufferedImage Into byte[ ] or maybe even String!

Profiling applications can be fun. For the last few days I’m working constantly on my final year project and one day I have decided to do quite a strange thing. As my application client (MIDP application) has to display a map and it makes heavy use of web services I have designed and implemented a […]

Read More →