2011,Dec

‘S’ will represent the starting line.
‘F’ will represent the finishing line.
‘#’ will represent an obstacle/wall.
‘ ‘ will represent free space.

The maze will be stored into a two dimensional array maze[MAZE_HEIGHT][MAZE_WIDTH].

2D Maze

2D Maze

Tagged with:  
2011,Sep
F8 Lite theme

F8 Lite theme

F8 Lite is a popular photoblog theme provided by WordPress originaly created by Thad Allender. You can do some awesome WordPress blogs using F8 Lite, check out my latest creation artissus.com.

One of the major problems in F8 Lite was the image squashing/stretching in the post thumbnails.

To fix this issue you can do one of the following:

Modify the media settings

Log in to your WordPress account, go to Settings > Media.

Edit Thumbnail size to: 310 x 150
Edit Medium size to: 590 x 0
Edit Large size to: 950 x 0

Tagged with:  
2011,Aug

In this tutorial you will learn how to detect the total number of online users in your website and store the data in a database.

This script is very important to study the performance of your web server. Having more than 2,000 online users on a shared hosting server is sign that it’s time to upgrade your server to a full dedicated (supporting around 25,000 online users or more).

Start by creating a Global.asax file in your root directory of your ASP.Net application. This file is also known as ASP.Net application file, it will contain code for responding to application top-level events raised by ASP.Net or HttpModules.

Tagged with:  
2011,Aug

Fade smoothly any HTML object without using jQuery.

function fadeInOut(obj, startValue, endValue) {
    var t = (startValue < endValue) ? 0 : 1;
    var fps = window.setInterval(function() {
        if (startValue < endValue) {
            if (t < endValue) {
                obj.style.opacity = t;
                obj.style.filter = "alpha(opacity = " + (t * 100) + ")";
                t += 0.05;
            } else {
                window.clearInterval(fps);
            }
        } else {
            if (t >= endValue) {
                obj.style.opacity = t;
                obj.style.filter = "alpha(opacity = " + (t * 100) + ")";
                t -= 0.05;
            } else {
                t = 1;
                window.clearInterval(fps);
            }
        }
    }, 8);
}
Tagged with:  
2011,Mar
You can connect to MySQL database from GoDaddy® using ObdcConnection.
Dim myConnection  As New OdbcConnection( _
"DRIVER={MySQL ODBC 3.51 Driver}; _
 SERVER=[Database Server's IP Address]; _
 DATABASE=[Database_Name]; _
 UID=[Database_Name]; _
 PASSWORD=[Database_Password]; _
 option=1")
OdbcConnection myConnection = new OdbcConnection (
"DRIVER={MySQL ODBC 3.51 Driver};
 SERVER=[Database Server's IP Address];
 DATABASE=[Database_Name];
 PASSWORD=[Database_Password];
 UID=[Database_Name];
 option=1"
);

That’s it :) easy cheesy.

Tagged with:  
2011,Feb
Motorola Logo

View Source Code

HTML5 and CSS3 Logo Design are becoming increasingly more and more popular due of their incredible ability to reduce size without loosing any graphical qualities.

In this article I will show you the basis to create an HTML5 logo using canvas and JavaScript only. You can also read how to create an HTML logo using only CSS3.  Remember that not all the browsers support HTML5 and CSS3 (yet).

Let’s start by having a deep look at the original Motorola logo (on the left). Take a moment and try to decompose each different shape in the logo into one individual element.

Tagged with:  
2011,Feb
Motorola Logo

View Source Code

HTML5 and CSS3 Logo Design are becoming increasingly more and more popular due of their incredible ability to reduce size without loosing any graphical qualities.

In this article I will show you the basis to create an HTML logo using CSS3 only. You can also read how to create the Motorola Logo in HTML5 using the canvas tag. Remember that not all the browsers support HTML5 and CSS3 (yet).

Let’s start by having a deep look at the original Motorola logo (on the left). Take a moment and try to decompose each different shape in the logo into one individual element.

Tagged with:  
2011,Feb

Business cards are important marketing tools, they are the least expensive and most cost-effective way for anyone who wants to build a business. So put some though into it.

I like the concept introduced by Chris Colhoun, I like it so much that I even changed my entire blog design. In this article I will show you how to create your own in Adobe Photoshop CS3+.

Cool Business Card Design

Cool Business Card Design

Step 1 – Business Card Dimensions

There are different Business Card sizes; in this article I will use the most popular size of 3.5″ x 2″ (8.9cm x 5.1cm).

Tagged with:  
2011,Jan

Non-Recursive version of the Factorial procedure that uses a loop.

TITLE Factorial Procedure
INCLUDE Irvine32.inc
;----------------------------------------------------
.data
     MSG_iNumber     BYTE  "Enter a number N:", 0
     MSG_oNumber     BYTE  "N! = ", 0
;----------------------------------------------------
.code
main PROC
     ;// Ask the user to input a number N
     MOV edx, OFFSET MSG_iNumber
     CALL WRITESTRING
     CALL CRLF
     CALL READINT ;// N is stored in eax

     ;// Calculate the factorial of N
     CALL Factorial

     ;// Output the result on the screen
     MOV edx, OFFSET MSG_oNumber
     CALL WRITESTRING
     CALL WRITEINT

     ;// Exit the program
     EXIT  
main ENDP
;----------------------------------------------------
Factorial PROC
     ;// The value of N is already stored in eax
     PUSH eax
     DEC eax
     MOV ecx, eax ;// Loop (N - 1) times
     POP eax
     MOV ebx, 1 ;// Set the initial value of ebx to 1.

     L1:
          MUL ebx ;// eax = eax * ebx
          INC ebx

          ;// This loop will eventually create the following function:
          ;// eax = eax * (eax - 1) * (eax - 2) * ... * (eax – eax + 1)
     LOOP L1
     ret
Factorial ENDP

END main
Tagged with:  
2010,Dec

Testing assembly program was pretty hard for me and my colleague in the Assembly Courses. It might be a bit complicated to execute an assembly program, but I’m sure that you will get used to it. Assembly is a very important language, it’s the mother of all other languages. Ok now, enough about talking, here is how:

1) Install software MASM 6.15 on your PC.

2) Use notepad as text editor.

3) Type your assembly code on the text editor and save it in the \BIN directory of the working environment with file extension *.asm. For example, type copy the following code and save it as C:\MASM615\BIN\test.asm.

Tagged with: