Saturday, July 4, 2009

jQuery: Display Image in a Popup Box

I have been playing with jQuery and I have been using it in some of my web projects.

I’m trying to figure out how can I make an image popup on a web site when a user selects it. I did some Googling and found this web site, it’s a plugin called jQuery lightBox plugin.

Right now I am experimenting with it, it seems to be very easy to use.

Tuesday, May 19, 2009

Objective C: Method with parameters

One thing I was confused with Objective C methods are the multiple parameters. See blow the two methods I was confused with but I will explain the differences.

1) - (void) MethodName: (int) a :(int) b;

Code in sample (1) shows two parameters, which means that when you call this method you are required to pass values to each one of them.

2) - (void) MethodName: (int) a andWithThis (int) b;

Code in sample (2) show two parameters, but the second parameter andWithThis is an optional parameter. It’s like the default parameters in C++.

Sunday, May 10, 2009

Objective C: Hello, World!

If you come from a C, C++ and Java programming background then you won’t have any problems understanding the Objective C language. Below is a simple code that will display “Hello, World!” string.

#import <stdio.h>

int main(void)
{
    printf("Hello, World!\n");
    return 0;
}

Save this file as hello.m not hello.c, the next thing you will need to do is create a make file for your project.

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = HelloTest
HelloTest_OBJC_FILES = hello.m
include $(GNUSTEP_MAKEFILES)/tool.make

Save this file as GNUmakefile in the same project folder.

To build your project you need to go to your command prompt enter make and press enter to continue. Make sure you are in the project folder.

To  run the executable all you have to do is enter this on your command line: ./obj/HelloTest

Hope this is simple and informative. Please let me know if it doesn’t work for you.

Download the source code:

HelloWorld.tar

Objective C: Introduction

A couple of days ago I bought my self a new Apple Mac Mini because I wanted to develop iPhone applications. The programming language that they use is Objective C and the Cocoa framework.

I so programming on the Mac is a whole new thing for me, so started some research on the Internet and Apple’s web site and found myself some basic tutorials on Objective C and Cocoa programming.

Objective C for Beginners

Learn Cocoa

One thing about Objective C I have noticed is it’s like a cross between C and C++. Well as the name describes Objective C (Object Oriented Programming with C). But there is a slight difference because defining and instantiating objects are different compared to C++.

If you are Mac developer your Mac OS X already comes with IDE (Integrated Development Environment) called XCode. If you are a Microsoft Windows developer you will need to set you self up with GNUstep.

If you want to get started with some Objective C programming check out the Objective C for Beginners web site. It contains instruction on how to prepare your development environment for Windows, Mac and Linux.

The next post I will try to prepare some basic Objective C code.

Saturday, May 9, 2009

Raise A Flag Everytime you Get Gmail: Microcontrollers 101

Wednesday, April 22, 2009

Linux and Mac .NET Development

If anyone out there planning to move away from Windows to Linux or Mac operating systems and still want to develop in .NET, well Mono is the solution!

Mono is an open source implementation of the Microsoft .NET Framework. This allows the developer to create cross platform applications.

You can download Mono from their their web site, and if you are using Linux there is an IDE called MonoDevelop.

Tuesday, April 21, 2009

.NET Rookie

It has been about a year and 4 months I have been developing in the .NET Framework 2.0 at work. I am slowly picking up new things as I go and I have been working on winform and webform projects, programming in C#.

I originally came from a C++ programming background for 6 years developing commercial financial software, but .NET seems to be the popular development tool these days.