Sunday, February 27, 2011

Digital Watch With Microcontrol

A complete range of Digital Clock is shown in Figure 1, equipped with 4 pieces of 7 segment LED display to display the time, consists of dozens of hours numbers, hours, tens of minutes and unit minutes. SW1 and SW2 button is used to set the display time, when SW1 is pressed on the display clock rate will increase every second, while SW2 is used to adjust the display digit minutes in the same way.

12 MHz crystal and capacitors C1 and C2 form a series of working frequency oscillator generating AT89C2051, this series is a series of raw, meaning that form the oscillator circuit is always like this for all series AT89C51, except for purposes other crystal values are probably different.

Monday, February 14, 2011

Syarat dan ketentuan Google Adsense

Syarat dan Ketentuan Standar Google AdSenseTM Online
BACA DENGAN CERMAT SYARAT DAN KETENTUAN SERTA BAGIAN TANYA JAWAB BERIKUT SEBELUM MENDAFTAR KE PROGRAM GOOGLE ADSENSE ONLINE. PARTISIPASI DALAM PROGRAM GOOGLE ADSENSE ONLINE MENUNJUKKAN BAHWA ANDA MENYETUJUI SYARAT DAN KETENTUAN INI. JIKA ANDA TIDAK MENYETUJUI SYARAT DAN KETENTUAN INI, JANGAN MENDAFTAR ATAU BERPARTISIPASI DALAM PROGRAM GOOGLE ADSENSE ONLINE.
 
Pendahuluan. Perjanjian ("Perjanjian") antara Anda dan Google Inc. ("Google") ini berisi Syarat dan Ketentuan Standar ("Syarat dan Ketentuan") Program Google AdSense Online. Keterangan mengenai Program tersebut, yang secara umum diberikan Google, tersedia di URL Tanya Jawab ("Tanya Jawab") Program yang terdapat di https://www.google.com/adsense/faq, atau URL lain yang mungkin disediakan Google dari waktu ke waktu. "Anda" atau "Penayang" adalah setiap entitas yang tercantum pada formulir pendaftaran yang dikirim oleh entitas tersebut atau pihak terafiliasi, dan/atau agensi maupun jaringan yang bertindak atas namanya, yang terikat oleh syarat-syarat Perjanjian ini.
1.      Partisipasi Dalam Program. Partisipasi dalam Program harus memperoleh persetujuan sebelumnya dari Google dan Anda harus selalu mematuhi Kebijakan Program ("Kebijakan Program") yang terdapat di https://www.google.com/adsense/policies, dan/atau URL lain yang mungkin disediakan Google dari waktu ke waktu. Google setiap saat berhak menolak partisipasi dari pihak pemohon atau peserta manapun atas kebijaksanaannya sendiri. Dengan mendaftar ke Program ini, Anda menyatakan telah berusia minimal 18 tahun dan menyetujui bahwa Google dapat menampilkan (a) iklan pihak ketiga dan/atau Google dan/atau konten lain (iklan pihak ketiga, iklan Google, dan konten lain secara keseluruhan disebut "Iklan") namun dengan ketentuan bahwa jika Google menampilkan konten

Sunday, February 13, 2011

Running and Startting Threads

When you construct an object derived from Thread, the run method is not auto matically called.
Ball b = new Ball ( ... ) ; // wont't run yet
you should call the start method in your object to actually start a thread .
b.start ( );

* Note *
do not call the run method directly - start will call it when the thread is set up and ready to go. Calling the run method directly merely executes its contents in the same thread - no new thread is started .
* Note *

In the java programming language , a thread needs to tell the other threads when it is idle, so the other threads can grab the chance to execute the code in their run procedures. The usual way to do this is through the static sleep method . The run method of the Ball class uses the call to sleep ( 5 ) to indicate that the thread will be idle for the next 5 millisecond . After 5 millisecond , it will start up again , but in the meantime , other threads have a chance ti get work done .

Friday, February 11, 2011

Using Threads to Give Other Task a Chance

In our next program , we use two threads ; one for the bouncing ball and another for the main thread that take care of the user interface. Because each thread gets a chance to run , the main thread has the opportunity to notice when you click on the " close " button while the ball is bouncing . It can then process the " close " action. 

There is a simple procedure for running code in a separate thread: place the code into the run method of a class derived from Thread.
To make our bouncing - ball program into a separate thread , we need only derive ball from Thread and rename the bounce method run , as in the following code :

Thursday, February 10, 2011

What Are Threads ?

What Are Threads ?

Let us start by looking at a program that does not use multiple threads and that , as a consequence, makes it difficult for the user to perform several task with that program . after we dissect it we will then show you how easy it is to have this program run separate thereads. this program animates a bounching ball by continually moving the ball, finding out if it bounces against a wall, and then redrawing it ( see figure 1 - 1 )

As soon as you clik on the " start " button , the program launches a bll from the upper - left corner of the screen and the ball begins bouncing , The handler of the " start" button calls the method bounce ( ) of the ball class, which contains a loop running through 1, 000 move . After each move , we call the static sleep method of the Thread calss to pause the ball for 5 millisecond