Membuat Program Luas Segitiga dengan PHP

"Om Swastiastu"

Setelah mempelajari cara membuat form PHP, sekarang kita akan mempelajari cara membuat program luas segitiga dengan PHP. Tentu saja kita akan menggunakan form sebagai sarana untuk memberikan inputan untuk alas dan tinggi segitiga. Ini adalah program yang sangat mudah untuk dikerjakan. Sebagai langkah pertama, kita buat dulu sebuah form untuk memasukkan alas dan tinggi segitiga. Buatlah form  baru, sintaksnya sebagai berikut:

<html>
<head>
<title>Luas Segitiga.php</title>
</head>

<body>
<form name="form1" method="post" action="luasSegitigaProses.php">
ALAS: <input type="text" name="alas" id="textfield"> <br/>
TINGGI: <input type="text" name="tinggi" id="textfield2"> <br/>
<input type="submit" name="button" id="button" value="Hitung">
</form>
</body>
</html>
Continue Reading »

Gmail's Context-Sensitive Help Link

If you click on Gmail's "Help" link at the top of the page, you'll be sent to an appropriate section from the Gmail Help Center. Instead of always linking to the help center's homepage, Gmail links to the priority inbox section if you're using Gmail's smarter inbox, it shows the articles about filters if you're trying to create a filter and the articles about contacts if you're using Gmail's contact manager.



It's a small change that makes it easy to find useful information about the Gmail feature you're currently without having to type a query. Hopefully, Google will add this feature to other services, just like the interactive bug reporting tool, which is now available in Gmail, YouTube and AdSense.

Pengenalan PHP - Memulai Membuat Form dengan PHP

"Om Swastiastu"

Beberapa artikel dasar-dasar PHP telah saya berikan, kali ini kita akan melanjutkan pengenalan PHP. Tutorial kali ini, kita akan membahas mengenai cara membuat form sebagai media input data dalam PHP. Karena, ketika kalian membuat suatu program berbasis web, dalam program tersebut tidak hanya terdapat link saja. Tetapi juga terdapat form sebagai sarana untuk menginputkan data. Disini kita akan mempelajari cara membaca nilai yang dimasukkan kedalam form.

Kita membuat form dengan menggunakan perintah HTML, tetapi format tipe file tetaplah harus .php. Format dasar pembuatan form adalah sebagai berikut:

<form action="" method="post">
Nama: <input type="text" name="nama" /><br>
Alamat: <input type="text" name="alamat" /><br>
<input type="submit" />
</form>
Continue Reading »

Keyboard Shortcuts for Google Instant Previews

You don't need to use your mouse to enable Google's visual previews for search results. Just press the right arrow key to show a small screenshot for the currently selected search result. You can navigate using the up/down arrow keys to highlight a different result and use the left arrow key to hide the previews.


Google Instant Previews can't be disabled from the settings page and, despite having a similar name, it's not related to Google Instant. If you disable Google Instant, you'll still see the magnifying glasses next to the search results, but the keyboard shortcuts are no longer available.

This feature is not yet available to everyone, but you can try it using this special page or by adding &esrch=instantpreviews to the URL of a search results page.

Google Promotes Data Portability by Adding Restrictions to the Contacts API

Google found a strange way to show to the world that Facebook is a walled garden that traps your data: by blocking Facebook's access to the Google Contacts API. A Google spokesperson said that "users often aren't aware that once they have imported their contacts into sites like Facebook they are effectively trapped. We hope that reciprocity will be an important step towards creating a world of true data liberation—and that this move will encourage other websites to allow users to automate the export of their contacts as well."

Facebook users can still export their Gmail contacts and manually upload the file to Facebook, but Google Contacts API made this much easier. Facebook even found a direct URL that lets you export your contacts, so you don't have to visit Gmail.


Google may have good intentions, but that's a terrible way to treat users. After all, it's their data and it should be their choice to use services like Facebook.

To show that Facebook is not the only target, Google Contacts API includes some new terms of use: "Google supports data portability. By accessing Content through the Contacts Data API or Portable Contacts API for use in your service or application, you are agreeing to enable your users to export their contacts data to other services or applications of their choice in a way that's substantially as fast and easy as exporting such data from Google Contacts, subject to applicable laws."

That's like trying to make the web faster by asking developers that use the Google Analytics tracking code to make their sites as fast as Google Analytics.

Update: Danny Sullivan quotes a Facebook engineer who says that "the most important principle for Facebook is that every person owns and controls her information. Each person owns her friends list, but not her friends' information. A person has no more right to mass export all of her friends' private email addresses than she does to mass export all of her friends' private photo albums".

But that's not always the case, since Facebook allows Yahoo and Microsoft to build services that import your Facebook friends, while Google can't get that data. Danny concludes that "Facebook simply doesn't want you to mass export them into Google — not unless, I suppose, it gets a business deal with Google. And if it doesn't want to do a deal, then those emails don't get to go. They aren't yours. They belong to Facebook, and can only be exported to the business partners that Facebook agrees with."

Update 2: Google redirects users that want to download their address book directly from Facebook to a page titled "Trap my data now":

"Hold on a second. Are you super sure you want to import your contact information for your friends into a service that won’t let you get it out? Here's the not-so-fine print. You have been directed to this page from a site that doesn't allow you to re-export your data to other services, essentially locking up your contact data about your friends. So once you import your data there, you won't be able to get it out. We think this is an important thing for you to know before you import your data there. Although we strongly disagree with this data protectionism, the choice is yours. Because, after all, you should have control over your data."

Upload HD Videos to Picasa Web Albums

One of the benefits of switching to YouTube's player in Picasa Web Albums was the support for higher quality videos. Now you can even upload HD videos to Picasa Web Albums.

"We're happy to now support uploading high-definition (HD) videos, up to 720p, from Picasa to Picasa Web Albums. Whereas before you could upload, store, and share videos shot in 240 or 360p, now you can do the same for your 480p and 720p (HD) videos too."

Here's an example of HD video uploaded to Picasa Web Albums. It's less than 3 minutes long and it uses almost half of the free storage quota.


Unfortunately, Picasa Web's new feature would be much more useful if you could upload videos from your browser. Right now, you can only upload videos from Picasa.


While YouTube lets you upload videos up to 2 GB, Picasa Web's free storage quota for all your photos and videos is 1 GB. Of course, YouTube lets you upload videos without installing an additional software.

Another issue is that Picasa Web Albums doesn't offer per-file permissions, so you can't share a video without sharing the entire album.

These are just some of the reasons why YouTube is a much better service for sharing videos than Picasa Web Albums.

Google Instant Previews

One of the most popular features available in web search add-ons is showing thumbnails next to search results. Google added this feature last year, but you need to click on "page previews" in the sidebar to enable it.

Google found some clever ways to make thumbnails more useful and more discoverable. To enable the new instant previews, click on the magnifying glass or on the snippet to see a visual preview of a search result. Google shows a large screenshot of the page and highlights the text that's included in the snippet so you can quickly find it when you visit the page. After enabling previews, you no longer have to click on the magnifying glass: Google shows the screenshots when you mouse over a search result.


Google says that visual previews are actually useful. "In our testing, we've found that people who use Instant Previews are about 5% more likely to be satisfied with the results they click. The previews provide new ways to evaluate search results, making you more likely to find what you're looking for on the pages you visit."

I'm not sure that screenshots can help you pick the most relevant search results, but they're useful if you're looking for pages that include many pictures or videos, long articles or detailed guides. Unfortunately, you might ignore a site that has a poor design, even if the content is useful.

Google Instant Previews will be rolled out in the coming days, but you can try it using this URL.

Pengenalan PHP - Membuat Konstanta dalam PHP

"Om Swastiastu"

Dalam beberapa bahasa pemrograman, kita perlu mendeklarasikan konstanta untuk membuat sebuah program. Konstanta adalah sebuah variabel yang nilainya tetap dan tidak bisa dirubah lagi. Biasanya, konstanta ini diletakkan diawal program. Salah satu program yang biasanya selalu menggunakan konstanta adalah mencari luas lingkaran. Karena disini kita perlu mendefinisikan sebuah nilai yang tetap, yaitu phi. Phi merupakan sebuah variabel yang memiliki nilai yang tetap dan tidak bisa diubah lagi. Nilai dari phi itu sendiri adalah 3,14 atau sama dengan 22 / 7.

Dalam mendeklarasikan konstanta, cara yang kita gunakan sama dengan cara mendeklarasikan variabel biasa lainnya. Hanya disini kita perlu menambahkan satu perintah define diawal variabel. Formatnya sebagai berikut:

define ("variabel", nilai_variabel_integer);
atau
define ("variabel", "nilaiVariabelString");

Continue Reading »

Tutorial Bahasa Pemrograman PHP

"Om Swastiastu"

Setelah berhasil memberi beberapa artikel mengenai pemrograman PHP, maka seperti biasa, saya akan membuat artikel dengan judul seperti ini. Tujuannya, memberitahukan kepada teman-teman sekalian bahwa disini telah terdapat tutorial pemrograman PHP. Dan tentu saja tutorial ini akan terus berlanjut. Setidaknya bisa membantu kalian menguasai dasar-dasar dari pemrograman PHP.

Seperti tutorial lainnya, pemrograman PHP ini saya sediakan tutorialnya dari yang paling sederhana, pengenalan PHP, hingga nantinya sampai pada tingkat menengah. Akan saya berikan juga beberapa contoh program sederhana dari PHP. Sehingga bisa membantu teman-teman dalam memahami pemrograman PHP. Karena menurut saya, PHP ini sangat mudah untuk dipahami.

Continue Reading »

Pengenalan PHP - Variabel Global, Lokal dan Static dalam PHP

"Om Swastiastu"

Setelah sebelumnya saya memberi tahu mengenai cara mendeklarasikan variabel dalam PHP, sekarang saya akan membahas lebih lanjut mengenal apa itu variabel. Dalam PHP terdapat 3 buah tipe variabel yang dapat digunakan berdasarkan ruang lingkupnya. Variabel global, variabel lokal dan variabel statik. Kita akan membahas satu per satu mengenai ketiga variabel tersebut. Dan seiring pembahasan kita juga akan mempelajari sedikit mengenai fungsi dalam PHP.

Variabel Global
Variabel global adalah variabel yang ruang lingkupnya sangat luas, dapat dipakai dan digunakan oleh semua script dalam PHP. Biasanya variabel global letaknya diluar suatu fungsi, dan jika variabel tersebut terletak didalam fungsi, kalian harus mendeklarasikan variabel tersebut sebagai variabel global. Untuk lebih lengkapnya, silahkan lihat contoh berikut ini:

Continue Reading »

Labels

Web Search Gmail Google Docs Mobile YouTube Google Maps Google Chrome User interface Tips iGoogle Social Google Reader Traffic Making Devices cpp programming Ads Image Search Google Calendar tips dan trik Google Video Google Translate web programming Picasa Web Albums Blogger Google News Google Earth Yahoo Android Google Talk Google Plus Greasemonkey Security software download info Firefox extensions Google Toolbar Software OneBox Google Apps Google Suggest SEO Traffic tips Book Search API Acquisitions InOut Visualization Web Design Method for Getting Ultimate Traffic Webmasters Google Desktop How to Blogging Music Nostalgia orkut Google Chrome OS Google Contacts Google Notebook SQL programming Google Local Make Money Windows Live GDrive Google Gears April Fools Day Google Analytics Google Co-op visual basic Knowledge java programming Google Checkout Google Instant Google Bookmarks Google Phone Google Trends Web History mp3 download Easter Egg Google Profiles Blog Search Google Buzz Google Services Site Map for Ur Site game download games trick Google Pack Spam cerita hidup Picasa Product's Marketing Universal Search FeedBurner Google Groups Month in review Twitter Traffic AJAX Search Google Dictionary Google Sites Google Update Page Creator Game Google Finance Google Goggles Google Music file download Annoyances Froogle Google Base Google Latitude Google Voice Google Wave Google Health Google Scholar PlusBox SearchMash teknologi unik video download windows Facebook Traffic Social Media Marketing Yahoo Pipes Google Play Google Promos Google TV SketchUp WEB Domain WWW World Wide Service chord Improve Adsence Earning jurnalistik sistem operasi AdWords Traffic App Designing Tips and Tricks WEB Hosting linux How to Get Hosting Linux Kernel WEB Errors Writing Content award business communication ubuntu unik