Ngoprek
Understanding Foreach in PHP
by Abu Aisyah on Feb.05, 2010, under Ngoprek, PHP, my notes
This tutorial is an easy way to understand the foreach. Yes, this is for the newbie confused with foreach. Foreach usually used in the variable loops which it has an array value. Array values are such as result from a database, or array value like this.
$ array = array ( ‘January’, ‘February’, ‘March’, ‘April’, ‘April’, ‘June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’, ‘ December ‘);
How do these values can occupy each row in a table? Of course the easiest is to use foreach. Although could also use while. But I prefer to use foreach, because the value of the array can we count on. In addition, more cut script when using foreach. (continue reading…)
Viewing Blog Traffic with Google Analytics
by Abu Aisyah on Feb.04, 2010, under Ngoprek, my notes
Google is a popular search engine and yahoo is the main competitor. Google also has grown rapidly since a few years after the operation, from an ordinary search engines that the company now occupies can not be underestimated. Of an ordinary idea into an extraordinary result. It is also not separated from those who were behind google themselves, they are Larry Page and Sergey Brin. Now, besides the google search engine, also has penetrated into the email, browsers, chats, blogs, photos, social networking and so on. Even I did not know what else google products emerging now, after just yesterday issued googlewave. This time I will discuss the features provided by google for us as users of the weblog, one of them is google analytics.
My blog is using wordpress engine, for me wordpress is very powerful. Excellence wordpress is open source, of course, that could be easily customized. There can also easily edit the CSS, plugins there, and even set up widgets that blogs will be as you wish. You can see the various patches that I made. This all is the ease of wordpress. I’ve tried to multiply, I’ve tried to blogspot, but I have never felt better when I use wordpress. Until now I have not found a better engine than wordpress. (continue reading…)
How to Create Bot Plurk with PHP
by Abu Aisyah on Feb.02, 2010, under Catatanku, Ngoprek, Open Source, PHP, Programming
On my last post about Plurk, I write about Plurk’s API. Now, as my promise I want to show you an easy way to use them. Please note, I will only use php script. Because I eat from this script. First, you can download the plurk’s API script and get API code by accessing this URL. Here we go. (continue reading…)
Fast Tutorial About YQL Select Query
by Abu Aisyah on Jan.26, 2010, under Catatanku, Ngoprek, PHP
YQL or Yahoo Query Language, a new API from yahoo that makes it easier to extract data from an existing HTML information on the Internet. You can INSERT, UPDATE, DELETE, SELECT from an HTML page dynamically data recorded in the HTML page. I made this short tutorial is only for Open Data, for example you want to create RSS from a specific web page for example. As an example we take from a site in Indonesia’s largest infotainment. For example we want to find out the latest news there, either movie reviews or celebrity news, we can create a simple RSS. Well the following steps: (continue reading…)
Sekilas Tentang Writer’s World Maker (wwmkr)
by Abu Aisyah on Jan.08, 2010, under Catatanku, Linux, Ngoprek, Open Source
Anda seorang penulis novel atau penulis buku? Tentunya anda setiap saat menggunakan software Office Word atau mungkin sekedar notepad atau bahkan mungkin menulis dengan menggunakan vi
. Hebat dong menulis novel pakai vi
. just joke.
Di ubuntu setelah saya ngubek-ngubek selama beberapa bulan ini, dan juga baca-baca literatur yang pernah saya temui di internet, ternyata ada software yang sangat berguna bagi seorang penulis. Ya, nama software itu adalah Writer’s World Maker atau di singkat wwmkr. Yang saya punya adalah versi 2.0.2, cara downloadnya sangat mudah, anda cuma ngetik sudo apt-get install wwmkr dan secara otomatis langsung download dan terinstall di komputer anda, tentunya dengan menggunakan kemudahan yang diberikan oleh OS linux Ubuntu. (continue reading…)
Inkscape Vector Graphic Editor – Alternative Software Open Source Vector Graphics.
by Abu Aisyah on Nov.13, 2009, under Catatanku, Ngoprek
Inkscape, that’s his name. Simple shape, small and lightweight. This software is a solution for those who used to work with vector graphics software uses, but can not afford to buy a license to the millions. One more open source offers an alternative, the Inkscape.
If you are using the Ubuntu linux OS, then you can get it with the command sudo apt-get install inkscape. Small size, of course, you do not have to download it for long. See this Screenshoot.
I was the person who just know the image by using the path or vector. First time using it with the help of a tutorial site on the internet, I can learn little by little. The future Insha Allah I will insert my work a bit to be placed in each of my writing. Just wait!!
Schedule Your Post
by Abu Aisyah on Nov.10, 2009, under Aktual, Catatanku, Ngoprek
Kurang lebih sudah sejak tahun 2002 aku mengenal yang namanya blog. Pertama kali itu pun dikenalkan oleh si Silentwind. Dulu kalau tidak salah blogku bernama adn.silentwind.com, sekarang dah nggak ada. Dan semenjak aku join di milis junker terbesar di dunia (id-gmail), pengalamanku ngeblog makin bertambah. Karena di sana walaupun obrolannya junker, tapi isinya bukan junker biasa.
Dari sana mulai kenal blognya Enda, Priyadi dan juga yang lain. Entah dari dua orang ini mana yang bisa disebut sebagai orang nomor satu di dunia blogger. Sebab tulisan mereka sudah banyak kala itu. Dan sering juga opini-opini yang ditulis di blog mereka membuat kita berpikir. Tapi si Enda, udah jarang nulis, dan diganti oleh Priyadi. Sempat juga dikatakan Bapak Blogger kala itu sudah berganti kepada Priyadi
. Namun ternyata setelah beberapa waktu berlalu, ternyata Priyadi jarang ngeblog juga. Lantaran ketularan Facebook, Plurk, dan Twitter.
Akhirnya orang-orang yang jarang ngeblog disebut mempunyai sebuah penyakit, namanya Priyadingitis. Namun ternyata sekarang ada solusi biar kita tetap konsisten ngeblog. Yaitu Schedule. Sebenarnya fitur ini sudah lama ada di wordpress, atapun di blogspot. Cuma mungkin kita jarang menggunakannya. Saya juga pernah mencoba, misalnya saya bikin blog baru tapi date-nya saya ubah di tahun 2004. Biar dianggap orang sudah lama. Ternyata bisa juga. Dan tidak terbatas tanggalnya sampai berapa dan waktunya pula sampai berapa.
Ketika anda posting (asumsi anda memakai wordpress versi 2.8.xx), di atas tombol Publish, ada option Publish immediately. Di sanalah anda bisa mensetting tanggal kapan posting anda akan publish. Jadi kalau misalnya andabiar dianggap tiap hari posting di blognya, aktif terus. Maka inilah cara yang bagus untuk tetap eksis ngeblog. Ya…cara ini tidak efektif kalau misalnya anda mau menulis sesuatu yang uptodate. Tapi paling tidak ini sangat membantu kalau-kalau anda mau menuliskan sesuatu secara periodik. Yang penting kita bisa mengucapkan selamat tinggal pada penyakit Priyadingitis ![]()
Cara Setting Nulis Arab di Linux Ubuntu
by Abu Aisyah on Nov.09, 2009, under Catatanku, Linux, Ngoprek, Open Source
Semua orang kepingin bisa nulis arabic, terutama mereka yang memang pekerjaan atau hobinya berhubungan dengan ini. Di linux bisa!! Sengaja tutorial ini pake bahasa indonesia, biar mudah dimengerti bagi mereka yang memang tidak bisa bahasa inggris dan biar mudah aja
Berikut langkah-langkahnya:
1. OK pertama-tama, saya coba ini di Linux Ubuntu 9.04, software Open Office 3.0. Setelah anda menginstall linux ubuntu, sudah pasti anda langsung bisa mengakses Open Office. Buka Open Office!!
2. Seperti inilah kira-kira pertama kali tampilan open Office. Kalau anda ingin menulis Arabic, harusnya di sebelah pengaturan model paragraf akan muncul tombol untuk mengatur tulisan left-to-right dan right-to-left. Untuk bisa memunculkannya, pilih Tools -> Options -> Language Settings, pilih Enchanced Language Support, dan centang Enabled for Asian Languages dan Enabled for complex layout (CTL).
Apabila berhasil maka akan muncul tombol left-to-right dan right-to-left seperti gambar berikut
3. Langkah berikutnya masuk ke menu utama System -> Preferences -> Keyboard. Kemudian pilih tab Layouts. Tambahkan Layout Arabic sesuai bahasa, lihat gambar berikut:
4. Berikutnya pilih short cut untuk mengubah Layout. Pada Keyboard Preferences pada gambar di atas, klik tombol Layout Options, maka akan muncul seperti gambar berikut:
Kalau saya lebih memilih untuk merubahnya pakai Alt + Shift, terserah sih milihnya. Sudah gitu aja.
5. Testing. Untuk ngetes, kembali ke Open Office. Pilih right-to-left, ganti layout dengan Alt + Shift, dan et voila, Anda bisa nulis arabic
Panduan ini tidak jaminan 100%. Kalau ada pertanyaan seputar ini silakan berikan komentar!
Another Freak Query
by Abu Aisyah on Oct.23, 2009, under Catatanku, Ngoprek
Yes true, I’m facing a crazy query once again. Actually, I could have done with a PHP script, but it did not really help me if I need dynamic data in the database. While I knew I could not work 100% in PHP scripts.
“TRUE POINT … +125 blåa blåa blaaa … … PIN = 34,234″
For the record, I just need a “TRUE POINT +125″, with the assumption that the number 125 is dynamic, such as 100, 10, 12,314, 7,723,423, and so on.
So I was really dizzy for 15 minutes
to look for. And finally I found a way, though I think I know there are other ways. But please know my friend, this is what I can and I find.
FROM tabel_string;
Once out of here I can know that there is a gap between the numbers and says thereafter. Quite right, space. That way I’ll be able to remove the value of the space, by looking for numbers in which the first space in the Instr. After that stay I love the functions left to cut it to only display + number only. : D
Then I just add concat function. Et voila, success. CMIIW.
Query in Mysql
by Abu Aisyah on Oct.15, 2009, under Catatanku, Ngoprek
I just found something, but perhaps already published on the web or in blogs on the internet. It turned out that mysql has a unique behavior for the query. And let us not carelessly in doing query command.
If we query the table which we have had millions of rows, then of course what we do should have to be careful. Computer resources can be exhausted due to our queries, so to run another process that will be felt slowly and I mean berat.Query also not query the ribet, fairly query like this.
“SELECT * FROM TABLE WHERE 1 AND CONDITION AND CONDITION AND CONDITION”.
The assumption is that we have a table where the line very much. Or maybe we’re using Query Join.
“SELECT * FROM TABLE A LEFT JOIN B ON A. TABLEB FIELD = B. FIELD WHERE 1 AND CONDITION AND CONDITION AND CONDITION”
I found it astonishing. Use WHERE number 1 after it has meaning. Number 1 in a query on the entire intention is to display the existing row in the table, and then carry out further conditions. As a result, if we have 1 million rows, then we query the above model, whereas we can estimate the time to 3 minutes, then we will lose time for 3 minutes just a query, then query again with the following conditions hold, until the conditions can not be found anymore. Very heavy especially in our computer resources are limited.
My advice, do not be too often use WHERE 1. Use of certain conditions only. But most importantly in terms of searching query index is always used when we are MyISAM tables, because the index will make it easier for us to do searching or JOIN and does not make us long in finding something on the table.
Use of Sub-Sub-Query is essentially the same as sub query, but differ only in the nested sub-queries. Examples are
“SELECT name FROM (
SELECT name FROM TABLE_STUDENT WHERE ID NOT IN (
SELECT ID FROM WHERE TABLE_GRADE GRADE IN ( ‘E’, ‘F’)
)
) U.S. TABLE_X ”
We can see that the use of sub queries above is very heavy when we get row is very hard processing, even more so as there are in the sub JOIN query. So the best solution is that we find a sub-sub-query. Because the model of the sub query is to create a temporary table, then the temporary table query with the conditions we want, so that what appears is the result of a temporary table instead of the table we query. It is suitable if you need a job that requires a lot of sub-queries.
















