Sunday, November 23, 2014

KM Player tidak memaparkan video semasa video dimainkan


Adakah semasa anda memainkan video di kmplayer ,tidak memaparkan video tetapi hanya suara.
ini penyelesaiannya.




atau
Go to kmp and right-click -> Video advanced -> Video renderer and select VMR9 Renderless, EVR or EVR C/A. Go to kmp and Preferences (F2) -> Video processing -> General tab and select Condition -> Always use.



Monday, March 10, 2014

Java Operators



Java Arithmetic Operators


The Java programming language has includes five simple arithmetic operators like are + (addition), - (subtraction), * (multiplication), / (division), and % (modulo).The following table summarizes the binary arithmetic operators in the Java programming language.

The relation operators in Java are: ==, !=, <, >, <=, and >=. The meanings of these operators are:
Use Returns true if
op1 + op2 ( op1 added to op2)
op1 - op2 (op2 subtracted from op1)
op1 * op2(  op1 multiplied with op2)
op1 / op2 (op1 divided by op2)
op1 % op2 (Computes the remainder of dividing op1 by op2)


The following java program, ArithmeticProg , defines two integers and two double-precision floating-point numbers and uses the five arithmetic operators to perform different arithmetic operations. This program also uses + to concatenate strings.

The arithmetic operations are shown in boldface.

public class ArithmeticProg { 
 public static void main(String[] args) { 
 //a few numbers 
 int i = 10; int j = 20; double x = 10.5; double y = 20.5;
 //adding numbers 
 System.out.println("Adding"); System.out.println(" i + j = " + (i + j));
 System.out.println(" x + y = " + (x + y));
 //subtracting numbers 
 System.out.println("Subtracting"); System.out.println(" i - j = " + (i - j)); 
 System.out.println(" x - y = " + (x - y)); 
 //multiplying numbers
 System.out.println("Multiplying"); 
 System.out.println(" i * j = " + (i * j));
 System.out.println(" x * y = " + (x * y)); 
 //dividing numbers System.out.println("Dividing");
 System.out.println(" i / j = " + (i / j)); 
 System.out.println(" x / y = " + (x / y)); 
 //computing the remainder resulting
 //from dividing numbers
 System.out.println("Modulus");
 System.out.println(" i % j = " + (i % j)); 
 System.out.println(" x % y = " + (x % y)); } } 

source:http://www.freejavaguide.com/corejava2.htm

********************************************************************************

Java Assignment Operators

It's very common to see statement like the following, where you're adding something to a variable. Java Variables are assigned, or given, values using one of the assignment operators. The variable are always on the left-hand side of the assignment operator and the value to be assigned is always on the right-hand side of the assignment operator. The assignment operator is evaluated from right to left, so a = b = c = 0; would assign 0 to c, then c to b then b to a.

i = i + 2;

Here we say that we are assigning i's value to the new value which is i+2.

A shortcut way to write assignments like this is to use the += operator. It's one operator symbol so don't put blanks between the + and =.
i += 2; // Same as "i = i + 2"

The shortcut assignment operator can be used for all Arithmetic Operators i.e. You can use this style with all arithmetic operators (+, -, *, /, and even %).

Here are some examples of assignments:

//assign 1 to
//variable a
int a = 1;

//assign the result
//of 2 + 2 to b
int b = 2 + 2;

//assign the literal
//"Hello" to str
String str = new String("Hello");

//assign b to a, then assign a
//to d; results in d, a, and b being equal
int d = a = b;


***********************************************************************


There are 2 Increment or decrement operators -> ++ and --. These two operators are unique in that they can be written both before the operand they are applied to, called prefix increment/decrement, or after, called postfix increment/decrement. The meaning is different in each case.

Example

x = 1;
y = ++x;
System.out.println(y);

prints 2, but

x = 1;
y = x++;
System.out.println(y);

prints 1

Source Code

//Count to ten

class UptoTen {

public static void main (String args[]) {
int i;
for (i=1; i <=10; i++) {
System.out.println(i);
}
}

}When we write i++ we're using shorthand for i = i + 1. When we say i-- we're using shorthand for i = i - 1. Adding and subtracting one from a number are such common operations that these special increment and decrement operators have been added to the language. T

There's another short hand for the general add and assign operation, +=. We would normally write this as i += 15. Thus if we wanted to count from 0 to 20 by two's we'd write:



Source Code

class CountToTwenty {

public static void main (String args[]) {
int i;
for (i=0; i <=20; i += 2) { //Note Increment Operator by 2
System.out.println(i);
}

} //main ends here

}As you might guess there is a corresponding -= operator. If we wanted to count down from twenty to zero by twos we could write: -=

class CountToZero {

public static void main (String args[]) {
int i;
for (i=20; i >= 0; i -= 2) { //Note Decrement Operator by 2
System.out.println(i);
}
}

}

source:http://www.freejavaguide.com/increment_decrement_operators.htm
*******************************************************************************



Java Relational Operators

A relational operator compares two values and determines the relationship between them. For example, != returns true if its two operands are unequal. Relational operators are used to test whether two values are equal, whether one value is greater than another, and so forth. The relation operators in Java are: ==, !=, <, >, <=, and>=. The meanings of these operators are:









Variables only exist within the structure in which they are defined. For example, if a variable is created within a method, it cannot be accessed outside the method. In addition, a different method can create a variable of the same name which will not conflict with the other variable. A java variable can be thought of

The main use for the above relational operators are in CONDITIONAL phrases The following java program is an example, RelationalProg, that defines three integer numbers and uses the relational operators to compare them.

 public class RelationalProg {

 public static void main(String[] args) {
 //a few numbers int i = 37; int j = 42; int k = 42;
 //greater than 
 System.out.println("Greater than...");
 System.out.println(" i > j = " + (i > j));//false
 System.out.println(" j > i = " + (j > i)); //true
 System.out.println(" k > j = " + (k > j)); //false
 //(they are equal) 

//greater than or equal to
  System.out.println("Greater than or equal to..."); 
System.out.println(" i >= j = " + (i >= j)); //false
 System.out.println(" j >= i = " + (j >= i)); //true
 System.out.println(" k >= j = " + (k >= j)); //true

 //less than
 System.out.println("Less than...");
 System.out.println(" i < j = " + (i < j)); //true 
System.out.println(" j < i = " + (j < i)); //false
 System.out.println(" k < j = " + (k < j)); //false

 //less than or equal to
 System.out.println("Less than or equal to...");
 System.out.println(" i <= j = " + (i <= j)); //true 
System.out.println(" j <= i = " + (j <= i)); //false 
System.out.println(" k <= j = " + (k <= j)); //true 
 
//equal to
 System.out.println("Equal to...");
 System.out.println(" i == j = " + (i == j)); //false
 System.out.println(" k == j = " + (k == j)); //true

 //not equal to
  System.out.println("Not equal to..."); 
 System.out.println(" i != j = " + (i != j)); //true
 System.out.println(" k != j = " + (k != j)); //false } 
}

Java tutorial



Java Hello World Program


Our first application will be extremely simple - the obligatory "Hello World". The following is the Hello World Application as written in Java. Type it into a text file or copy it out of your web browser, and save it as a file named HelloWorld.java. This program demonstrates the text output function of the Java programming language by displaying the message "Hello world!". Java compilers expect the filename to match the class name.

A java program is defined by a public class that takes the form: public class program-name { optional variable declarations and methods public static void main(String[] args) { statements } optional variable declarations and methods }

Source Code


In your favorite editor, create a file called HelloWorld.java with the following contents:


/** Comment

* Displays "Hello World!" to the standard output.

*/

class HelloWorld {

public static void main (String args[]) {

System.out.println("Hello World!"); //Displays the enclosed String on the Screen Console

}

}

To compile Java code, we need to use the 'javac' tool. From a command line, the command to compile this program is:
javac HelloWorld.java
For this to work, the javac must be in your shell's path or you must explicitly specify the path to the program (such as c:\j2se\bin\javac HelloWork.java). If the compilation is successful, javac will quietly end and return you to a command prompt. If you look in the directory, there will now be a HelloWorld.class file. This file is the compiled version of your program. Once your program is in this form, its ready to run. Check to see that a class file has been created. If not, or you receive an error message, check for typographical errors in your source code.

You're ready to run your first Java application. To run the program, you just run it with the java command:

java HelloWorld

Sample Run

Hello world!

The source file above should be saved as myfirstjavaprog.java, using any standard text editor capable of saving as ASCII (eg - Notepad, Vi). As an alternative, you can download the source for this tutorial.


HelloWorld.java

Note: It is important to note that you use the full name with extension when compiling (javac HelloWorld.java) but only the class name when running (java HelloWorld).

You've just written your first Java program! Congratulations!!


source:http://www.freejavaguide.com/corejava1.htm

Entity Relationship Model








Download Pass year UTHM (Muat turun soalan yang lepas UTHM)

Adakah anda memerlukan soalan-soalan yang lepas.Anda boleh lah muat turun  di link yang terdapat di bawah ini

http://ent.uthm.edu.my/client/main/search/




Cara:1.masukkan nama subjek .contohnya spt gambar di bawah.

2.Click Search boleh click link "UW,,," untuk muat turun






Friday, February 21, 2014

Problem of chrome profile cannot open correctly










Do you have get this that message(upper picture)from chrome during you open Google chrome.
Below of solution that the problem.


Mac OSX
1. Quit  Google Chrome.
2. Open Terminal.
 3. Change directory (cd) t o /Users/{user}/Library/Application Support /Google/Chrome/Default
 4. Delete Web Data and History files:  rm -rf History*; rm -rf Web\ Data;
 5. Start  Google Chrome and t he error should be gone.


Windows 7

1. Quit  Google Chrome.
2. Open Computer. 3. Navigate t o C:\Users\{username}\AppData\Local\Google\Chrome\User Data\Default \
4. Delete t he file named “Web Data”
5. Start  Google Chrome and the error should be gone.



Surat tawaran uthm

Surat tawaran link->Sila klik di sini

Sunday, February 16, 2014

Pengkalan Data (Database)

Note Download Here


CHAPTER 1

DATABASE-SICS(SHARED,INTEGRATED COMPUTER STRUCTURE)

END-USER DATA-RAW FACT OF INTEREST TO END USER
METADATA(DATA ABOUT DATA)
·         ->PROVIDE DESC OF DATA CHAR AND RELATIONSHIP
·         ->COMPLEMENT AND EXPAND VALUES OF DATA

DBMS(COLLECTION OF PROGRAMS)
->MANAGES STRUCTURE AND CONTROL ACCESS DATA

ROLES AND ADVANTAGES OF THE DBMS
ROLES
DBMS
·         -INTERMEDIARY BETWEEN USER  & DB.
                 DB STORE AS –FILE COLLECTION
·         -ENABLES DATA TO BE SHARED
·         -INTEGRATED MANY USER

ADVANTAGES OF DBMS

·       -  IMPROVED-DATA SHARING,DATA SECURITY,DATA ACCESS,DECISION MAKING
·        - BETTER DATA INTEGRATION,MINIMIZE DATA INCONSISTENCY
·         -INCREASE END-USER PRODUCTIVITY.



TYPES OF DATABASE
NAME
 DESC
 SINGLE-USER DB  

SUPPORT ONLY 1 USER (DEKSTOP DB)
MULTIUSER DB    
-SUPPORT MULTIPLE USER (WORKGROUP AND ENTERPRISE)

CENTRALIZED DB
DATA LOCATED IN SINGLE SITE

DISTRIBUTED DB
DATA DISTRIBUTED ACROSS SEVERAL DIFF SITES
DATA WAREHOUSE

STORES DATA USED FOR TACTICAL/STRATEGIC DECISIONS
UNSTRUCTURED DATA

EXIST IN THEIR ORIGINAL STATE
STRUCTURED DATA
RESULT FROM FORMATTING
SEMISTRUCTURED DATA
HAVE BEEN PROCESS TO SOME EXTENT
XML
REPRESENT DATA ELEMENTS IN TEXTUAL FORMAT

WHY DATABASE DESIGN IMPORTANT

DB DESIGN-FOCUS ON THEIR DB STRUCTURE
 WELL DESIGN DB
POOR DESIGN

FACILITATE DATA MANAGEMENT
GENERATE ACCURATE AND VALUABLE

CAUSE DIFFICULT TO TRACE ERROR



Sunday, January 5, 2014

Saturday, January 4, 2014

Sate Penyebab Kanser







Sate, kambing golek, kepak panggang dan semua macam panggang merupakan antara makanan kegemaran rakyat Malaysia! Dipanggang diatas arang yang sangat panas, menghasilkan daging yang berjus dan rangup. Tapi tahukah anda, memanggang boleh meningkatkan risiko kanser kolon?!

Pada tahun 2008, World Health Organisation (WHO) melaporkan bahawa satu daripada 33 rakyat Malaysia berisiko tinggi untuk mendapat kanser ini.








kolon = usus besar


Kanser kolon ialah kanser di bahagian usus besar. Ia juga boleh dikenali sebagai kanser kolorektal sekiranya pesakit turut mendapat kanser di bahagian rektum (beberapa inci terakhir usus besar sebelum bersambung dengan dubur). Ia bermula dengan ketumbuhan gumpalan kecil di dinding usus; polip. Sekiranya tiada langkah pencegahan dan rawatan diambil, ketumbuhan menjadi tidak terkawal dan membawa kepada kanser kolon. Kanser ini akan menyebabkan usus tersekat, berdarah dan mengganggu proses pembuangan najis. Ia juga boleh merebak ke organ lain dan menyebakan kanser yang lain pula jika tidak dirawat.




ketumbuhan polip yang berbentuk seperti cendawan

Sebenarnya, bukan sahaja daging yang dipanggang boleh meningkatkan risiko kanser. Sebarang daging seperti ayam, lembu, kambing, ikan dan juga kerang yang dibakar sehingga kehitaman akan menghasilkan sejenis bahan kimia yang boleh menyebabkan kanser. Bahagian hitam yang hangus itulah yang menjadi sumber bahan kimia tersebut. Setelah dimakan, ia akan meresap ke dalam sel badan, merosakkan DNA di dalam sel nukleus dan boleh membawa kepada kanser.







dibakar sehingga hangus kehitaman




Apabila protein pada daging atau kerang dimasak sehingga hangus kehitaman, sejenis kimia iaitu heterocyclic amines (HCA) terbentuk – inilah bahan karsinogen yang boleh menyebabkan kanser. Pada suhu yang sangat tinggi, asid amino yang semula jadinya terdapat di dalam protein akan bergerak balas dengan sejenis bahan kimia di dalam daging – creatine lalu membentuk HCA. Bukan sahaja kaedah memanggang; menggoreng juga boleh menyebabkan daging menghasilkan HCA. HCA boleh merosakkan DNA pada sel dan menyebabkan kanser kolon.













api meluap


Selain itu, lemak dan minyak yang terhasil daripada daging yang dipanggang akan jatuh ke dalam arang dan menghasilkan api yang tinggi meluap. Tindak balas ini akan menyebabkanPolycyclic aromatic hydrocarbons (PAHs) terbentuk – sejenis bahan karsinogen yang turut menyebabkan kanser. Asap yang dihasilkan daripada api yang meluap mengandungi PAHs dan akan menyelaputi makanan yang dipanggang. PAHs turut terdapat pada kehangusan yang terbentuk di atas daging selepas dipanggang. Risiko kanser perut akan meningkat sekiranya terdedah dengan PAHs.

Bagaimana caranya untuk mengurangkan risiko ini?




  • Paling mudah, sudah tentu mengurangkan pengambilan daging panggang atau,membuang bahagian yang hangus kehitaman itu semasa santapan
  • Menukar cara memasak daripada memanggang dan menggoreng kepada; penyediaan sup, stim, atau memasak dengan suhu yang sederhana tanpa hangus.
  • Perap daging/kerang dengan lebih lama akan mengurangkan HCA dan PCAs yang terhasil.
  • Pastikan anda sapu minyak pada grill untuk mengelakkan daging melekat dan hangus
  • Pastikan grill sentiasa bersih dan buang segala sisa hangus dan arang untuk mengelakkan bahan kimia yang terdapat padanya tidak berpindah kepada makanan baru yang hendak dimasak
  • Elakkan memasak di bahagian yang sudah hangus kehitaman
  • Potong daging nipis dan kecil agar ia cepat masak supaya kurang terdedah dengan asap berbahaya
  • Buang segala lemak yang terdapat pada daging sebelum memanggang untuk mengurangkan minyak yang menghasilkan api yang meluap
  • Buang kulit pada ayam
  • Jangan panggang bersentuhan dengan arang, pastikan jarak grill dengan arang tidak terlalu dekat untuk mengelakkan banyak kehitaman terbentuk
  • Pastikan api tidak bersentuhan dengan makanan
  • Terus pindahkan daging yang telah masak dari grill supaya tidak terdedah lama dengan arang
  • Gunakan ‘drip tray’ untuk mengumpul minyak yang terhasil daripada daging
  • Makan lebih banyak sayur dan buah (contohnya timun) sebagai antioksida yang melawan kanser






drip tray

Untuk pengetahuan anda, sayur atau buah yang dibakar seperti jagung bakar tidak akan menghasilkan bahan kimia yang menyebabkan kanser. Oleh itu, pangganglah jagung, tempeh, brokoli dan sayur lain yang semestinya lebih berkhasiat!













source:http://ubatpensil.blogspot.com/2013/07/sate-penyebab-kanser.html



Object oriented Programming



Note Download

Note |Answer Test 1 | Example Inherit | Answer Quiz 1(Reff)
|Pass year|






While loop


A while loop statement repeatedly executes a target statement as long as a given condition is true.
Syntax:


The syntax of a while loop in C++ is:while(condition) { statement(s); }



Here, statement(s) may be a single statement or a block of statements. The condition may be any expression, and true is any non-zero value. The loop iterates while the condition is true.


When the condition becomes false, program control passes to the line immediately following the loop.


Flow Diagram:



















Here, key point of the while loop is that the loop might not ever run. When the condition is tested and the result is false, the loop body will be skipped and the first statement after the while loop will be executed.





















source: http://www.tutorialspoint.com/cplusplus/cpp_do_while_loop.htm


******************************************************************************


Do while loop




A do...while loop is similar to a while loop, except that a do...while loop is guaranteed to execute at least one time.
Syntax:


The syntax of a do...while loop in C++ is:do { statement(s); }while( condition );



Notice that the conditional expression appears at the end of the loop, so the statement(s) in the loop execute once before the condition is tested.


If the condition is true, the flow of control jumps back up to do, and the statement(s) in the loop execute again. This process repeats until the given condition becomes false.
Flow Diagram:





source:http://www.tutorialspoint.com/cplusplus/cpp_do_while_loop.htm