Install WMware Player on Fedora 16

  1. download vmware player from http://www.vmware.com
  2. give the .bundle file executable privileges:
    chmod +x VMware-Player*.bundle
  3. install:
    bash ./VMware-Player*.bundle
Advertisements

Hello World using Assembly language

; @author Azeem Michael
PAGE 66,80
TITLE – Sample PROGRAM – .EXE
STACKSG SEGMENT PARA STACK ‘STACK’
DB 1024 DUP (0FFH) ; 1K stack space
STACKSG ENDS

DATASG SEGMENT PARA PUBLIC ‘DATA’

msg db “Hello World!”

DATASG ENDS

CODESG SEGMENT PARA PUBLIC ‘CODE’
MAIN PROC FAR
ASSUME CS:CODESG,DS:DATASG,SS:STACKSG,ES:DATASG
MOV AX,DATASG
MOV DS,AX
MOV ES,AX
; opcode operands

; display a string terminated with ‘!’
mov si,offset msg ; starting address of msg in si
top: mov al,[si]
mov ah,0eh ; subfunction number
mov bx,0
int 10h ;BIOS video interrupt
add si,1 ;advance the pointer
cmp al,’!’ ;Does al have a !?
jne top ;no — repeat, else fall through

MOV AH,4CH
INT 21H ; exit to DOS
MAIN ENDP
CODESG ENDS
END MAIN

String Tokenizer Class Using PHP5

Package: String Object Summary: Perform several string manipulation operations Groups: Data types , PHP 5 , Text processing Author: Azeem Michael Description: This package can perform several string manipulation operations… Read more at http://www.phpclasses.org/package/6993-PHP-Perform-several-string-manipulation-operations.html


<?php

/**
* The string tokenizer class allows an application to break a string into tokens.
*
* @author Azeem Michael
* @example The following is one example of the use of the tokenizer. The code:
*
* countTokens().'
';
* while ($st->hasMoreTokens()) {
* echo $st->nextToken() . '
';
* }
* prints the following output:
* Total tokens: 4
* this
* is
* a
* test
* ?>
*

*/
class StringTokenizer {

/** @var string
*/
private $string;

/** @var string
*/
private $token;

/** @var string
*/
private $delim;

/**
* Constructs a string tokenizer for the specified string.
* @param string $str String to tokenize
* @param string $delim The set of delimiters (the characters that separate tokens)
* specified at creation time, default to " \n\r\t"
*/
public function __construct($str, $delim=" \n\r\t") {
$this->string = $str;
$this->delim = $delim;
$this->token = strtok($str, $delim);
}

/**
* Destructor to prevent memory leaks
*/
public function __destruct() {
unset($this);
}

/**
* Calculates the number of times that this tokenizer's nextToken method can
* be called before it generates an exception
* @return int - number of tokens
*/
public function countTokens() {
$counter = 0;
while($this->hasMoreTokens()) {
$counter++;
$this->nextToken();
}
$this->token = strtok($this->string, $this->delim);
return $counter;
}

/**
* Tests if there are more tokens available from this tokenizer's string. It
* does not move the internal pointer in any way. To move the internal pointer
* to the next element call nextToken()
* @return boolean - true if has more tokens, false otherwise
*/
public function hasMoreTokens() {
return ($this->token !== false);
}

/**
* Returns the next token from this string tokenizer and advances the internal
* pointer by one.
* @return string - next element in the tokenized string
*/
public function nextToken() {
$hold = $this->token; //hold current pointer value
$this->token = strtok($this->delim); //increment pointer
return $hold; //return current pointer value
}
}
?>

OOP Naming Conventions

When programming object-oriented programming (OOP) a standard naming scheme for classes, objects, variables, and methods is important. Here are two naming schemes I know of:

Naming Scheme 1:

  1. Class name: concatenated words, each word should start with uppercase.
    – E.g:  Database, Person, BankAccount, MyLinkedList etc…
  2. Objects, variables, methods: concatenated words, first word all lowercase, subsequent words should start with uppercase.
    – E.g (objects): $array = new Array(), $myAccount  = new Account();
    – E.g (variables): $i, $nodeList, $myCounter;
    – E.g (methods): deposit(), getName(), setName(), getAccountNumber();
Naming Scheme 2:
  1. Class name: concatenated words, each word should start with uppercase.
    – E.g: Database, Person, BankAccount, MyLinkedList etc…
  2. Methods: concatenated words, first word all lowercase, subsequent words should start with uppercase.
    – E.g: deposit(), getName(), setName(), connectDatabase();
  3. Objects, variables: all lowercase concatenated words separated by underscores.
  4. Constant variables: all uppercase concatenated words separated by underscores.
    – E.g: $PI = 3.14, $GRAVITY = 9.8, $ARRAY_SIZE = 50, etc…

Hello!

Hello — my name is Azeem Michael. I’m a a computer science graduate — currently working as a back-end developer. I am well versed in PHP, C++, Java/J2EE, JavaScript, XUL and SQL. I love building Rich Internet Applications with API’s,RESTAJAX and jQuery coupled with the MVC Style of Engineering. Some of my favorite platforms and to work with are SymfonyApache and MySQL.

regards,

Azeem Michael