Sunday, November 14, 2010

PHP :: Using the scope resolution operator



The scope resolution operator is a pair of colons (::). The name of the class goes on
the left side of the operator, and the name of the method or property goes on the right
like this:

ClassName::methodOrPropertyName

PHP doesn't object if you put whitespace on either side of the scope resolution operator,
but the normal convention is to write everything as a single entity.

The scope resolution operator has the following uses:

  • It gives access to overridden properties or methods of a parent class.
  • It is used to call the static methods and properties of a class (this is covered in "Creating static properties and methods" later in this chapter).
  • It gives access to class constants (see "Using class constants for properties" later in the chapter).
  • It is the conventional way of referring to a class method or property in documentation. For example, instead of referring to "the getPageCount() method of the Ch2_Book class," this is shortened to Ch2_Book::getPageCount().
However, PHP provides two handy keywords that work with the scope resolution operator,
namely:
parent: This refers to the parent or any ancestor of the current class.
self: This refers to the current class. Although this sounds the same as $this,
which you met earlier, self refers to the class in general, whereas $this refers to
the current instance of the class (in other words, an object created from the class).

The advantage of the parent and self keywords is that you don't need to change them if
you rename any of the classes to which they refer

Double Dot Means what :: - PHP answers

Double Dot Means what :: - PHP answers:

You could think of it as, just calling that function w/o instantiating
the class that it's in

Saturday, October 23, 2010

SCRUM and XP

SCRUM - How the project is organized and planned
XP - How to work with programming

Everything is Agile. yeay! \(^_^)/.

Sunday, August 08, 2010

Software Engineering Eh?




  • Requirements Engineering
  • Software Architecture
  • Software Development Methods
  • Software Testing, Verification and Validation
  • Program Analysis and Understanding
  • Software Maintenance and Evolution
  • Software Metrics and Measurement
  • Software Processes and Quality
  • Software Performance Engineering
  • Software Security, Safety and Reliability
  • Agile Software Development Methods
  • Software Engineering Environments and Tools
  • Empirical Software Engineering
  • Model Driven Architectures
  • Service Oriented Architectures

  • Object and Component Based Software Engineering
  • Cloud Based Software Systems
  • Software Reuse
  • Product Line Engineering
  • Formal Methods
  • Agent-Based Software Engineering
  • Web-Based Software Engineering
  • Distributed and Parallel Software Engineering
  • Embedded and Real-Time Software Systems
  • Mobile and Ubiquitous Software Systems
  • Context-aware and Adaptive Software Systems
  • Software Project Management
  • Standards and Legal Issues
  • Software Engineering Education

Sunday, July 04, 2010

Gangguan Makhluk Halus

baca ayat nih nak elak nak musnah kan santau atau org yg cuba menyihir,
dari tanya lah ustaz hari ini .. insyallah.



Furqan:23

سورة الفرقان:23


25:23
Sahih International
And We will regard what they have done of deeds and make them as dust dispersed.
Malay
Dan Kami tujukan perbicaraan kepada apa yang mereka telah kerjakan dari jenis amal (yang mereka pandang baik), lalu Kami jadikan dia terbuang sebagai debu yang berterbangan.


Baca surah Al-Falaq- benteng dari kena sihir.

Pagar Rumah - Ayat Kursi
-----------
Lepas Solat
Bacal al-Ikhlas - Al-Falaq - An-Nass
An-A'am :61

سورة الأنعام:61

6:61
Sahih International
And He is the subjugator over His servants, and He sends over you guardian-angels until, when death comes to one of you, Our messengers take him, and they do not fail [in their duties].
Malay
Dan Dia lah yang berkuasa atas sekalian hambaNya; dan Ia mengutuskan kepada kamu pengawal-pengawal (malaikat yang menjaga dan menulis segala yang kamu lakukan), sehingga apabila sampai ajal maut kepada salah seorang di antara kamu, lalu diambil (nyawanya) oleh utusan-utusan Kami (malaikat); sedang mereka pula (malaikat itu) tidak cuai (dalam menjalankan tugasnya).

Kuar Rumah/Benteng - Pukau/Santau etc.
Bacal al-Ikhlas - Al-Falaq - An-Nass
yaasin : 9

سورة يس :9

36:9
Sahih International
And We have put before them a barrier and behind them a barrier and covered them, so they do not see.
Malay
Dan Kami jadikan (sifat tamak dan gila mereka kepada harta benda dan pangkat itu sebagai) sekatan (yang menghalang mereka daripada memandang kepada keburukan dan kesingkatan masa dunia yang ada) di hadapan mereka, dan sekatan (yang menghalang mereka daripada memikirkan azab yang ada) di belakang mereka (pada hari kiamat). lalu Kami tutup pandangan mereka; maka dengan itu, mereka tidak dapat melihat (jalan yang benar).



Sunday, June 20, 2010

Fresh Graduate IT position question

Here is the answer (^_^):


/* C code */
#include
int main() {
int x = 10; int y = 35;
// x = x * y;
y/=x;
printf("The current value of x is: %i\n", y);
return 0;

}



/* C code */
#include
int main() {
int m=10; int n=5;
int x,y,z;
x=(--m == n++)?--m:++n;
y=m++;
z=n;
printf("The current value of x,y,z is: %i %i %i\n", x,y,z);
return 0;

}


/* C code */
#include
int main() {
int a=1;
int b=10;
do{
b-=a;
a++;
}while(b--<0);
printf("The current value of a,b is: %i %i \n", a,b);


return 0;

}


#include
int main() {
int y,x;
for(y=1, x=1; y<=50; y++)
{if(x>=10) break;
if(x%2==1)
{x+=5;
continue;
}
x-=3;
}
printf("The current value of x,y is: %i %i \n", x,y);

return 0;

}


#include
int main() {
int i,y,x,z;
for(i=0;i<=5;i++) {printf("%d",i);}
//printf("The current value of x,y is: %i %i \n", x,y);

printf("\n");
for(y=0;y<=5;++y) {printf("%d",y);}

printf("\n");
x=5;
x++;
printf("%i \n",x);

//x=5;
++x;
printf("%i \n",x);

return 0;

}

Saturday, February 27, 2010

SAP the new journey begins

Now i'm in the SAP industry, specialized in SAP programming world, know as ABAP or ABAPERS that what they called for SAP programmers. Oh! ABAP stand for Advance Business Programming or in German word its called Allgemeiner Berichts-Aufbereitungs-Prozessor