banner

CEX.io

bulan

Bulan adalah satu-satunya satelit alami Bumi, dan merupakan satelit alami terbesar ke-5 di Tata Surya. Bulan tidak mempunyai sumber cahaya sendiri dan cahaya Bulan sebenarnya berasal dari pantulan cahaya Matahari.

Jarak rata-rata Bumi-Bulan dari pusat ke pusat adalah 384.403 km, sekitar 30 kali diameter Bumi. Diameter Bulan adalah 3.474 km,[1] sedikit lebih kecil dari seperempat diameter Bumi. Ini berarti volume Bulan hanya sekitar 2 persen volume Bumi dan tarikan gravitasi di permukaannya sekitar 17 persen daripada tarikan gravitasi Bumi. Bulan beredar mengelilingi Bumi sekali setiap 27,3 hari (periode orbit), dan variasi periodik dalam sistem Bumi-Bulan-Matahari bertanggungjawab atas terjadinya fase-fase Bulan yang berulang setiap 29,5 hari (periode sinodik).

Massa jenis Bulan (3,4 g/cm³) adalah lebih ringan dibanding massa jenis Bumi (5,5 g/cm³), sedangkan massa Bulan hanya 0,012 massa Bumi.

Bulan yang ditarik oleh gaya gravitasi Bumi tidak jatuh ke Bumi disebabkan oleh gaya sentrifugal yang timbul dari orbit Bulan mengelilingi bumi. Besarnya gaya sentrifugal Bulan adalah sedikit lebih besar dari gaya tarik menarik antara gravitasi Bumi dan Bulan. Hal ini menyebabkan Bulan semakin menjauh dari bumi dengan kecepatan sekitar 3,8cm/tahun.

Bulan berada dalam orbit sinkron dengan Bumi, hal ini menyebabkan hanya satu sisi permukaan Bulan saja yang dapat diamati dari Bumi. Orbit sinkron menyebabkan kala rotasi sama dengan kala revolusinya.

Di bulan tidak terdapat udara ataupun air. Banyak kawah yang terhasil di permukaan bulan disebabkan oleh hantaman komet atau asteroid. Ketiadaan udara dan air di bulan menyebabkan tidak adanya pengikisan yang menyebabkan banyak kawah di bulan yang berusia jutaan tahun dan masih utuh. Di antara kawah terbesar adalah Clavius dengan diameter 230 kilometer dan sedalam 3,6 kilometer. Ketidakadaan udara juga menyebabkan tidak ada bunyi dapat terdengar di Bulan.

Bulan adalah satu-satunya benda langit yang pernah didatangi dan didarati manusia. Obyek buatan pertama yang melintas dekat Bulan adalah wahana antariksa milik Uni Sovyet, Luna 1, obyek buatan pertama yang membentur permukaan Bulan adalah Luna 2, dan foto pertama sisi jauh bulan yang tak pernah terlihat dari Bumi, diambil oleh Luna 3, kesemua misi dilakukan pada 1959. Wahana antariksa pertama yang berhasil melakukan pendaratan adalah Luna 9, dan yang berhasil mengorbit Bulan adalah Luna 10, keduanya dilakukan pada tahun 1966.[1] Program Apollo milik Amerika Serikat adalah satu-satunya misi berawak hingga kini, yang melakukan enam pendaratan berawak antara 1969 dan 1972.

Bulan sebagai penanda waktu

Bulan purnama adalah keadaan ketika Bulan nampak bulat sempurna dari Bumi. Pada saat itu, Bumi terletak hampir segaris di antara Matahari dan Bulan, sehingga seluruh permukaan Bulan yang diterangi Matahari terlihat jelas dari arah Bumi.

Kebalikannya adalah saat bulan mati, yaitu saat Bulan terletak pada hampir segaris di antara Matahari dan Bumi, sehingga yang 'terlihat' dari Bumi adalah sisi belakang Bulan yang gelap, alias tidak nampak apa-apa.

Di antara kedua waktu itu terdapat keadaan bulan separuh dan bulan sabit, yakni pada saat posisi Bulan terhadap Bumi membentuk sudut tertentu terhadap garis Bumi - Matahari. Pada saat itu, hanya sebagian permukaan Bulan yang disinari Matahari yang terlihat dari Bumi.








bulan sabit
bulan purnama
bulan mati
bulan sabit

Asal usul

Asal - usul bulan tidak diketahui secara pasti, tetapi ilmuan menemukan bukti besar bahwa Bulan berasal dari tubrukan bumi dengan planet kecil yang bernama theira sekitar 3 milyar tahun yang lalu, dan menghasilkan debu yang berjumlah sangat banyak dan mengorbit di sekeliling bumi dan akhirnya debu mengumpul menjadi bulan. Pada awalnya jarak bulan pada pertama kali hanya sekitar 30.000 mil atau 15 kali lebih dekat dari jarak Bulan dengan Bumi sekarang. Dari hasil penelitian Bulan menjauh sekitar 3,8 cm per tahunnya.

sumber : http://id.wikipedia.org

READ MORE - bulan

Bumi

Bumi adalah planet ketiga dari delapan planet dalam Tata Surya. Diperkirakan usianya mencapai 4,6 milyar tahun. Jarak antara Bumi dengan matahari adalah 149.6 juta kilometer atau 1 AU (ing: astronomical unit). Bumi mempunyai lapisan udara (atmosfer) dan medan magnet yang disebut (magnetosfer) yang melindung permukaan Bumi dari angin matahari, sinar ultraungu, dan radiasi dari luar angkasa. Lapisan udara ini menyelimuti bumi hingga ketinggian sekitar 700 kilometer. Lapisan udara ini dibagi menjadi Troposfer, Stratosfer, Mesosfer, Termosfer, dan Eksosfer.

Lapisan ozon, setinggi 50 kilometer, berada di lapisan stratosfer dan mesosfer dan melindungi bumi dari sinar ultraungu. Perbedaan suhu permukaan bumi adalah antara -70°C hingga 55°C bergantung pada iklim setempat. Sehari di dibagi menjadi 24 jam dan setahun di bumi sama dengan 365,2425 hari. Bumi mempunyai massa seberat 59.760 milyar ton, dengan luas permukaan 510 juta kilometer persegi. Berat jenis Bumi (sekitar 5.500 kilogram per meter kubik) digunakan sebagai unit perbandingan berat jenis planet yang lain, dengan berat jenis Bumi dipatok sebagai 1.

Bumi mempunyai diameter sepanjang 12.756 kilometer. Gravitasi Bumi diukur sebagai 10 N kg-1 dijadikan unit ukuran gravitasi planet lain, dengan gravitasi Bumi dipatok sebagai 1. Bumi mempunyai 1 satelit alami yaitu Bulan. 70,8% permukaan bumi diliputi air. Udara Bumi terdiri dari 78% nitrogen, 21% oksigen, dan 1% uap air, karbondioksida, dan gas lain.

Bumi diperkirakan tersusun atas inti dalam bumi yang terdiri dari besi nikel beku setebal 1.370 kilometer dengan suhu 4.500°C, diselimuti pula oleh inti luar yang bersifat cair setebal 2.100 kilometer, lalu diselimuti pula oleh mantel silika setebal 2.800 kilometer membentuk 83% isi bumi, dan akhirnya sekali diselimuti oleh kerak bumi setebal kurang lebih 85 kilometer.

Kerak bumi lebih tipis di dasar laut yaitu sekitar 5 kilometer. Kerak bumi terbagi kepada beberapa bagian dan bergerak melalui pergerakan tektonik lempeng (teori Continental Drift) yang menghasilkan gempa bumi.

Titik tertinggi di permukaan bumi adalah gunung Everest setinggi 8.848 meter, dan titik terdalam adalah palung Mariana di samudra Pasifik dengan kedalaman 10.924 meter. Danau terdalam adalah Danau Baikal dengan kedalaman 1.637 meter, sedangkan danau terbesar adalah Laut Kaspia dengan luas 394.299 km2.

sumber: http://id.wikipedia.org

READ MORE - Bumi

PALAPACIPA

PT. PALAPA CIPTA PERSADA adalah perusahaan berbasis jaringan dan teknologi informasi yang membuat gerakan cepat, tepat, spektakuler. Dengan mengembangkan system jaringan mengajak semua kalangan untuk menjalankan usaha penjualan gelang/kalung magnet untuk kesehatan secara member get member sehingga setiap orang selain sehat juga akan mendapatkan penghasilan tambahan serta dapat menikmati kehidupan yang lebih layak.

Segara daftarkan diri anda di sini atau hubungi 085647008393 administrasi cuma Rp 10.000,00
Kesaksian mereka yang telah menggunakan produk kami
READ MORE - PALAPACIPA

tukeran link yuk !!!

buat teman yang mau tukeran link tersedia di bawah masukkan url kamu gratis silahkan daftar disini





READ MORE - tukeran link yuk !!!

Overcoming condense Glass Tips



Downpours of rain are very comfortable with the driving. Moreover, if the car AC dikendarai problems or death, so complete has been 'suffering' the driver.

When the rain, we will automatically close the window the car our meetings. Well, if we do not car AC works well when the rain, the glass window dew often, due to air pressure differences. As a result, the distance of approach to the future will run uninterrupted, because the glass front of the dew.

Mudik so that travel is not hampered due to this problem, can do some tricks to eliminate emergency fog in front of the glass. We can implement a way that is often made by public transport drivers, ie, by using hair shampoo, which of course we are very easy to find.

How is the smear liquid shampoo to the entire surface of the glass in secukupnya, because even if most can disrupt the vision. Also be mixed with water, because the surface of the glass that will be oiled run clear again.

Liquid shampoo containing chemical elements that can be flush sediment moisture, so that moisture due to heat in the cabin temperature can not stick to the glass surface that has been be oiled hair shampoo line. (automotive / bun)

READ MORE - Overcoming condense Glass Tips

Tips Mengatasi Kaca Berembun


Hujan yang deras memang sangat mengganggu kenyamanan berkendara. Apalagi jika AC mobil yang dikendarai bermasalah atau mati, maka lengkap sudah 'penderitaan' sang sopir.

Saat diguyur hujan, otomatis kita akan menutup jendela mobil kita rapat-rapat. Nah, jika AC mobil kita tak berfungsi dengan baik saat hujan, maka kaca jendela sering berembun, akibat adanya perbedaan tekanan udara. Akibatnya, jarak pandang ke arah depan kelamaan bakal terganggu, lantaran kaca depan berembun tersebut.

Supaya perjalanan mudik tak terhambat akibat masalah ini, bisa dilakukan beberapa kiat darurat untuk menghilangkan kabut di kaca depan. Kita bisa menerapkan cara yang seringkali dilakukan oleh sopir angkutan umum, yakni dengan menggunakan shampoo rambut, yang pastinya sangat mudah kita temukan.

Caranya adalah dengan mengolesi cairan shampoo ke seluruh permukaan kaca bagian dalam secukupnya, karena kalau kebanyakan malah bisa mengganggu penglihatan. Juga jangan dicampur air, karena permukaan kaca yang diolesi kelamaan akan bening lagi.

Cairan shampoo mengandung unsur kimia yang dapat menghalau endapan uap air, sehingga embun akibat suhu panas di kabin tak dapat menempel ke permukaan kaca yang telah diolesi shampoo rambut tadi. (otomotif/bun)

READ MORE - Tips Mengatasi Kaca Berembun

waduk gajahmungkur wonogiri








READ MORE - waduk gajahmungkur wonogiri

pantai kute bali





READ MORE - pantai kute bali

parangtritis






READ MORE - parangtritis

mouse





READ MORE - mouse

dog





READ MORE - dog

duckling





READ MORE - duckling

chicken






READ MORE - chicken

cat


This is a cat




READ MORE - cat

trio tiger





READ MORE - trio tiger

cow





READ MORE - cow

Horror stories

Sengon tree is posted on the home tetanggaku grow very large and dense, high reached more than 15 meters, when didekati very creepy because root stick up and cracked skin, cracked not known, the age is very old, seen from beneath the stem on the already rotten.

Although very quiet, but no children who dare to play underneath because the elders they are haunted. Have many children who are directly or body temperature even possessed after playing underneath.

The owner of the house, of course, very concerned about and try to chop down trees, some trees are tebang carpenters, apparently they do not dare to declare, that brave and tried to chop off guling-rolled and then sick. So finally the owner's house with the tree pasrah it.



One son home owners who often come to practice meditation kerumahku and it bathin often complain that the coffee digelas who have not lived diminumnya was reduced slightly, he thought that his son may meminumnya. Akan but their children reject the claim that copies of his father. So he and his wife is very upset with this. Who has often kopiku this drink? ...........

Subject bathin meditation and then achieve it ketingkat meneropong kealam magical, starting with meneropong house and the surrounding circumstances. Son tetanggaku surprised to see this one that looks old is being haunted sengon dangle in trees and stare kearahnya. A black shirt terkancing not show the breast area, wear pants subordinates sarung linear sapphire .........



Watchman the haunted tree sengon

Membathin it in the heart: "Inikah watchman may sengon the famous tree is haunted?", Lined face visible because parents-wrinkle and looks hideous.

Akan but visible being that smile to him, and came near and said: "Do not be afraid, I just do not have this family as possible", and then going dialogue with the soul and confess Kong named Alim (*) from the Tanah Abang, he used to landowner the patriarch in the area of Rubber Tanah Abang, died some forty years ago to become a lost soul and it's up to the tree gentayangan sengon this.

(*) In the Betawi Engkong express grandfather is very old or people.



Increased dialogue is warm, and because of the start why he lost to gentayangan, making them highly visible terpekur and regret in the deeds, the water will be seen that dipipinya eye wrinkles and then said: "I used to be a champion in the Tanah Abang, so often Imam and dimasjid-mosque sermon, preaching all the time to give people very impressed pembahasanku up on the verses of the holy and kumunculkan, but it is not all teak myself, because I am fluent knowledge of the call leluhurku (nyurup science), I read not so clever Al-Qur'an, and only a little knowledge of religion. "



GENTAYANGAN the Jaman currish FOR CONDUCT

"The membuatku like this is a dastardly perbuatanku first, that is to kill people with the Dutch way of the pit stop and memancungnya bridge from behind, then take the property, should kulakukan face to face with the male, perbuatanku is incompatible with the teachings of my religion."

Back to regret in a very diwajahnya menyemburat is in between his eyes and wrinkles terpejam hold out longer airmata. Before this kuakhiri Dialogue, said he had to give tahuku that is home to the descendants of the family close ..........



Jump into this warm and also the discussion turns to answer questions on who indeed are often digelas coffee drink water every day .......

Akan tetanggaku but said that with the single-minded that he is willing make one extra glass for coffee every morning Kong Alim. I was impressed with keikhlasannya .......

Some time passed and the feeling rinduku those arising tuaku and Kuingin menjumpainya, then with his wife and daughters, akupun go to the people tuaku with the question dikepalaku Kong Alim who is ?......



Alim OF KONG Tanah Abang

Of course both very happy people tuaku see kedatanganku carry-grandchildren and grandchildren who disayanginya is warm and welcoming, especially to the more humorous sikecil-lucunya.

After the nostalgia and take pride in the kamipun chat-chat and relax kulontarkan question that since the wedge dihatiku: "Ma, Mama know what the Kong Rubber Alim's Tanah Abang?" My mother looks surprised to start this up a little outside the context of speech, and look mengerutkan keningnya try keep in mind.

Then he said slowly, "remembers Mama, Alim Kong is far from a brother and grandfather Mama very first as a wealthy landowner in Rubber. Until now many descendants still in there, Rubber, koq actually have what you ask."



With a bit doubtful fear My mother does not believe, kututurkan experience meneropong faerie who kulakukan with tetanggaku it. Glued mother heard a strange story kututurkan to him and then said: "Kasihan Kong Alim, who will think that he is still only rudimentary gentayangan and death, all people think he is a pious and religious."

Then the mother menyuruhku ask him how and requirements to be able to refine his death. My mother is willing to refine his brother still feel as though far away from Her grandfather. Menganggukan I understand the sign, and demand will do that.



HOW how to improve DEATH

In the meditation and it bathin we call again the next spirit Kong Alim watchman Tree sengon the mother to meet the demand ......

After prayers and a little courtesy, kulontarkan direct question to him: "Kong Alim, mother was to improve the kematianmu, how and what terms can I be?", Terpana Kong Alim start it up and try to see the seriousness heart.

After some time and then Kong Alim said: "Thank you kuucapkan up your mother's attention terhadapku and this is happening to me after kematianku "..........



Fetish, ISIM, implant, SCIENCE-SCIENCE difficult coming DEATH

Eleven days before I had finally ajal menjemputku, itupun after kulepaskan all the charm, and izim implant and occult sciences ditubuhku the nest, which had been tie down rohku remain world. I saw my family mourn jasadku the longitudinal rigid, is a scrawny kutinggalkan which has been, and I am running kealam mortal sin and the reward is done.



I saw some people who sholeh after some time running the perishable nature, and then cross over to the natural light on the glitter over it. I tried to jump cross but drop, kucoba again many times still drop again until the end perishable kealam I feel tired and pasrah accept fate.



PEOPLE ARE SHOLEH easily cross

I am very envious of those who sholeh that easily because they fly on kealam ride. Other and with the dead person's other very difficult and can not cross over to nature on a beautiful and fun. I am with the other forced to hang around and even disrupt gentayangan and seduce the human-human faith less firm.

So finally I decided to stay in the big tree sengon Menurutku that is suitable for me. The old anger and, of course, would not only expelled so go and give place to me, finally there were the fierce contention memperebutkan spots.

Because during my life I am a jawara, it can also end kukalahkan and kuusir previous watchman and kuancam that do not come back. I then bertahta inhabit Tree sengon replace it with a satisfied feeling.



KUNGANGGU THE PEOPLE THROUGH

Kuganggu people under the tree with melemparinya, or face appeared horrific deeds and other ignorant. Because the spirits of it do evil things like that to people for menakut-nakuti them. We call a man with a devil, demit, gandaruwo, Kuntilanak, wewe bat, and others mention the creepy, actually precisely, we are soul-do spirit.

Many also of our worship and ask for blessings for wealth, power, science and other pelet, which will cause them to be our janitor later when they die, without they realize, because the purpose of our search for such friends as much as possible to keep our mortal suffering dialam / Life.



Hear the story that started it repeatedly, kupotong with the requirements and ask how to cross over to the hold.

Alim Kong stupefied moment and then said: "I have dipotongkan two male goats for 'Aqiqahku with the terms of the goat must tanduknya long curve." Alim Kong and then tells why ask the animal goat ....



THE spirit BANYAK NAIK cross goats, cows, camels

I saw many spirits that cross over to the climbing goats, cows, camels and other. They are comfortable in animal-animal and fly kealam hold. Therefore kuminta animal goat that tanduknya long so easy I hold on to natural mengendarainya there. Alim Kong and then end the story.

"Okay Kong will kusampaikan to the mother to be implemented. Is there any other messages for the mother," I said to him.

Menerawang After thinking a moment, and then Kong Alim said: "Return to your mother, to protect the knowledge of families, homes and property as follows."



SCIENCE sophisticated fences coming

When science is applied, then if there are sneak into the house then he will feel as if fell into the water and will swim all night, wake up to the owner's house and menyadarkannya, but after realizing it was picklock stand posted on the house above ground. Or it will spin inside the house looking for the door, the exit is not found until the morning hours. And will also be able to protect his family from danger, danger.

Bacaannya of al-Ikhlas and paragraph Qursi course, read the mind memutari home 7x, or imagine that their families will be protected. Of course, with the ritual requirements that is fast and does not eat animal meat on certain days.



Kuterima science is to kusampaikan to the mother and deliver requirements. My mother apparently did not object to 'cut Aqiqah animal tails for the two goats Kong Alim who may be forgotten, so that death can be improved, and propose next week will be held in the home health Sukabumi.

Afternoon before Meditation bathin we do it again, mother's long-Sukabumi and said that cutting animals' Aqiqah was implemented well, accompanied by prayers from the jama'ah dimasjid (Tahlilan) for Alim Kong to be calm in kuburnya.



AFTER cross soul NOT to be contacted

Nighttime kamipun as previous attempts to contact the spirit through meditation Alim Kong to deliver a good news that the requirements have been met. Tried many times was also not successful until we finally give up and then decided to end our meditation .......

We wonder in the heart, what is happening, why we can not menjumpainya, where he is at this time, so that we can not menjumpainya. Suddenly my hand moved by itself as if I said this question, take a ball-point pen, and write the words "I have been across the bridge Sirotol Mustaqim and can not be found again, thank you for everything and ----------- ---- ", then only the visible and long tercoret ball-point-drop any of my hands ........



Alhamdulillah KONG HAVE BERHASIL cross Alim

Evening in the spirit mimpiku Kong Alim states to receive love, especially to our mother who has helped free from gentayangan dialam temporal and cross over to nature on the beautiful and brilliant, this time he is quiet and get a good place and good there. Of course the next day, mother and kutelepon convey this happy news, including all speech received a very sincere love.

Not that kuduga watchman sengon the tree house was also the last successful and has been quiet in kuburnya.

Back to the tree that was rotten sengon to dikuatirkan down because if the parents can menjatuhi home disebelahnya, after the incident with the tree at home easy tetanggaku that ditebang can occur without any issues as well, finally finished with the average land ........ .
READ MORE - Horror stories

Talaga Warna


Re-told by Renny Yaniar

Days of old, there was a kingdom in West Java. The country led by a king. Prabu, so people called it. He is the king of the good and wise. Not surprisingly, when the country was prosperous and peaceful. There are no hungry people in the country.

All very exciting. Unfortunately, Prabu and his wife do not have a child. That pairing is very sad kingdom. Prabu advisors suggest, to raise their children. But Prabu and the Queen does not agree. "Make our children uterus is better than the foster child," they respond.

Children that grow into adults, a high major. Therefore he is called by the name of Kebo Iwa, which means uncle buffalo.

Queen of wistful and often crying. Prabu was sad to see his wife participate .. Prabu Then go to the forest to be imprisoned. There are Prabu continues to pray, so that children are endowed with. Several months later, their desire terkabul. The queen was pregnant start. All the people in the kingdom is happy once. They overwhelm the palace with the prize.

Nine months later, the Queen delivered a daughter. Population of any small daughter back to send the various prizes. Babies grow into children that are funny. Dozen years later, he has become a beautiful teenager.

Kebo Iwa was all great. Reach legs very wide, so that he can travel quickly. If he wanted to drink, stay Kebo Iwa telunjuknya thrust to the ground. Well there were so small that removing the water.

Prabu and Queen dote daughter. Their daughter to give him any wish. But that makes it a spoiled girl. If it desires not met, the girls will be angry. He often said, even coarse. However, parents and people in the kingdom mencintainya.

Day pass, daughter grow into any girls tercantik across the country. In a few days, daughter will be 17 years old. So the population in the country to go to the palace. They bring a variety of gifts that are very beautiful. Prabu collected the gifts that very much, and save room in the palace. At times, he could use it for the sake of the people.

Prabu only took a little gold and jewel. He took him to the jewelry experts. "Please, make a very beautiful necklace for putriku," said Prabu. "It's my pleasure, Yang Mulia," respond jewelry experts. He then worked as may be d, with a vengeance. She wanted to create the most beautiful necklace in the world, because he dote Putri.

Birthdays also arrived. Residents gather in the country square palace. When Prabu and Queen came, held with the people happy. Rave the sound, when the daughter is beautiful graceful appear before all people. All the people admire the beauty.

Prabu ago rose from kursinya. The beautiful necklace is dipegangnya. "Putriku beloved, today I give this necklace for you. Necklet is the provision of people from across the country. They are very mencintaimu. They present this gift, because they grow so happy melihatmu adults. Wear this necklace, Nak," said Prabu.

Daughter to receive the necklace. Then he saw the necklace, at a glance. "I do not want to use. Necklet this ugly!" Putri exciting. Then he put the necklace. The beautiful necklace was broken. Gold and permatanya spread on the floor.

That's very surprising. No one shall presume, daughter will like that. No one shall speak. Tranquil atmosphere. Suddenly the Queen heard weeping. Tangisannya followed by all people.

Suddenly appear out of the water palace page. At first a small pond. Then the palace began to flood. Palace was filled with water like lakes. Then the lake and drown the big palace.

Now, the lake is called Talaga Warna. Lake is located in the area of the peak. On a sunny day, we can see the lake is full of beautiful colors and amazing. The color comes from the shadowy forest, plants, flowers, and sky around the lake. But people say, colors that come from the daughter necklace is in the bottom of pond.

READ MORE - Talaga Warna

materi jeni class timer


J.E.N.I.
Bab 1
Class Timer
1.1 Tujuan
Setelah mempelajari bab ini, siswa di harapkan :
• Memahami dan menggunakan class Timer dan TimerTask
• Mengolah waktu dengan Timer dan TimerTask
• Menentukan waktu yang sesuai untuk penjadwalan
• Dapat membuat animasi dari Timer dan TimerTask
1.2 Pengantar
Class Timer merupakan salah satu pengembangan dari versi Java 1.3, dalam lingkup J2SE
berupa pembentukan class-class yang mempermudah pengaturan penjadwalan proses agar
dapat dieksekusi melalui pengaksesan fungsi dasar thread. Pembaharuan diatas juga dapat
dimanfaatkan oleh pengembang pemrograman berbasis mobile (J2ME) karena class baru
diatas juga telah menjadi bagian dalam MIDP (Mobile Information Device Profile).
1.3 Memanfaatkan class Timer
Proses didefinisikan dan dijadwalkan menggunakan dua class yaitu :
• java.util.TimerTask
• java.util.Timer
Class TimerTask merupakan class abstract yang berfungsi sebagai class dasar untuk
semua penjadwalan proses. Sedangkan class Timer membuat dan mengatur thread dimana
proses dieksekusi.
Untuk mendefinisikan sebuah proses, buatlah sebuah subclass dari TimerTask yang mengimplements
method run, sebagai contoh :

J.E.N.I.
import java.util. TimerTask;
public class MyTask extends TimerTask {
public void run() {
System.out.println("Menjalankan Task");
}
}
Jika method run tergolong cukup dikenal, hal ini dikarenakan TimerTask meng-implements
interface java.lang.Runnable. Class Timer menjalankan method run untuk menjalankan proses.
Method seharusnya menampilkan proses dan keluar secepatnya karena hanya satu proses untuk setiap
object Timer dapat dieksekusi kapanpun.
Setelah mendefinisikan sebuah proses, anda dapat menjadwalkannya dengan cara menciptakan sebuah
instance dari Timer dan menjalankan method penjadwalan, seperti dapat dilihat sebagai berikut :
import java.util.TimerTask;
import java.util.Timer;
Timer timer = new Timer();
TimerTask task = new MyTask();
// tunggu 10 detik untuk menjalankan aplikasi
timer.schedule( task, 10000 );
// tunggu 5 detik sebelum di eksekusi, maka
// mengeksekudi setiap 5 detik
timer.schedule( task, 5000, 10000 );
terdapat empat versi method penjadwalan, setiap penjadwalan proses dilakukan pada suatu
waktu tertentu (khususnya menggunakan sebuah object Date) atau setelah suatu
delay(tunda waktu) tertentu (dalam miliseconds). Anda dapat menjadwalkan proses untuk
dijalankan sekali atau diulang terus menerus pada jangka waktu tertentu. Terdapat juga
suatu method scheduleAtFixedRate yang menjadwalkan proses untuk dieksekusi secara
berulang dalam interval relative terhadap waktu eksekusi yang telah dijadwalkan terhadap
eksekusi pertama. Jika proses eksekusi ditunda (untuk kasus garbage collection), dua atau
lebih sub urutan eksekusi dijadwalkan dalam interval yang lebih pendek untuk “ditangkap”

J.E.N.I.
Setiap object Timer menciptakan dan mengatur sebuah fungsi thread tunggal. Sebuah
timer tunggal biasanya mewakili kebutuhan semua aplikasi tunggal, akan tetapi disini tidak
ada batasan berapa-pun jumlah timer yang dapat Anda dibuat. Anda dapat menghentikan
sebuah timer kapanpun dan melakukan terminasi bagian threadnya dengan memanggil
method cancel timer. Dengan catatan jika timer dihentikan sekali, timer tersebut tidak
dapat di restart – Anda harus membuat sebuah object Timer dan menjadwalkan kembali
proses yang ingin Anda eksekusi. Object Timer menyimpan fungsi thread, disini tidak perlu
menampilkan beberapa sinkronisasi nyata jika Anda memanggil sebuah object pada thread
yang berbeda.
Setelah Anda menjadwalkan sebuah proses, Anda dapat menghentikan eksekusinya dengan
memanggil method cancelnya. Hal ini sering terjadi dalam method run dari sebuah proses.
Panggil method cancel bersama dengan method run menjamin bahwa eksekusi dari proses
tersebut adalah proses yang paling akhir. Dalam hal ini juga memungkinkan method dapat
dipanggil pada point manapun, asalkan sebelumnya, proses dijadwalkan untuk dieksekusi
pertama kali.
Berikut ini adalah contoh sederhana dari suatu MIDlet yang menggunakan timer untuk
menampilkan splash screen sederhana dari sebuah gambar ke sebuah teks.
import java.util.Timer;
import java.util.TimerTask;
...
public class MidletSplashTimer extends MIDlet {
...
private Timer timer;
private TimerTask timerTask;
protected void startApp() {
...
display.setCurrent(ttCanvas);
}
void stopTimer() {
timer.cancel();
timerTask.cancel();
}

J.E.N.I.
void startTimer() {
timer = new Timer();
timerTask = new TimerTask() {
public void run() {
display.setCurrent(new SuccesCanvas());
}
};
timer.schedule(timerTask, 3000);
}
};
import javax.microedition.lcdui.*;
public class SplashTimerCanvas extends Canvas {
private MidletSplashTimer midletTT;
...
public SplashTimerCanvas(MidletSplashTimer midlet) {
...
}
protected void paint(Graphics g) {
...
// splash screen
}
class SuccesCanvas extends Canvas {
protected void paint(Graphics g) {
...
}
}
MIDlet MidletSplashTimer menggunakan sebuah object Timer, timer, untuk menjadwalkan
eksekusi dari subclass TimerTask, FieldMover, setiap 3000 milidetik. paint pada
class SplashTimerCanvas menggambarkan splash screen yang akan ditampilkandan paint pada class
SuccesCanvas menggambarkan teks yang akan ditampilkan sesudah splash screen ditampilkan.


READ MORE - materi jeni class timer

artis

READ MORE - artis