Skip to content

emka.web.id

Menu
  • Home
  • Indeks Artikel
  • Tutorial
  • Tentang Kami
Menu

Apa itu Mock Data Randomizer?

Posted on March 26, 2012 by Syauqi Wiryahasana
Adalah Mike Wilcox yang menulis sebuah tool kecil yang digunakan untuk mengetest sebuah kode javascript. Dinamakan sebagai Mock Data Randomizer. Misalnya diberi masukan: [code lang="javascript"] rand.sentences(6,7,7,9); // # of words in sentences rand.real = true; rand.sentences(6,7,7,9); [/code] akan menghasilkan output kata-kata berikut:
Whut koop mida miins knew eftor kind. Deys evin thaaght has plecu uthur melos. Eftor shaeld ha lift hend wath ets unto big. Huwovir till lergi wa kind olsa con bofare. Yaor sentonca sean cemu man in whoch man. Mi sentonca nught get fund very onswar tui plecu. Shew en geed liva knew poiplu childrun ilung gat. Far night very land room for then we. First kind turned out is own usually back much. Read sometimes since does answer himself into much. Live not for large hand important they. People another sea across across even world. Water could things young by white own only very.
atau coba masukan seperti ini: [code lang="javascript"] rand.date(); rand.date({seconds:true}); rand.date({delimiter:"/", yearRange:-5}); rand.date({delimiter:"/"}); rand.date({min:new Date('11/20/1964'), max:"4/19/1969", delimiter:"-"}); [/code] akan menghasilkan output yang luar biasa seperti ini:
Mon Feb 14 2011 14:13:17 GMT-0800 (PST) 1296270214154 08/04/2005 10/10/2010 02-05-1967

Referensi Live demo Mock Data Randomizer : http://clubajax.org/files/rand.html Source code : http://code.google.com/p/clubajax/source/browse/trunk/lang/rand.js
Seedbacklink

Recent Posts

TENTANG EMKA.WEB>ID

EMKA.WEB.ID adalah blog seputar teknologi informasi, edukasi dan ke-NU-an yang hadir sejak tahun 2011. Kontak: kontak@emka.web.id.

©2024 emka.web.id Proudly powered by wpStatically