Archive

Archive for the ‘Computer’ Category

Timbang-timbang format gambar

April 16, 2009 2 comments

Sebagai bloger atau webmaster, jika ingin memasukkan gambar ke blog/web, kita harus memilih tipe gambar yang akan kita pakai, apakah JPG, GIF, atau PNG. Jika format yang dipilih tidak sesuai dengan jenis gambarnya, gambar tersebut ukurannya akan lebih besar daripada yang semestinya, dan menyebabkan waktu loading blog/website kita lebih lama. Padahal, pengunjung suka terhadap blog atau web yang loadingnya cepat dan tidak boros bandwidth. Untuk itu, kita harus mengusahakan agar gambar-gambar dalam blog atau website kita memiliki ukuran sekecil mungkin. Caranya bagaimana?

Memilih tipe dan memperkecil ukuran gambar

Jika kita menyimpan gambar dengan program pengolah gambar seperti Adobe Photoshop atau Microsoft Paint, maka kita dapat memlilih format gambar yang sesuai melalui menu File -> Save As dan pilih tipe file yang kita inginkan. Khusus untuk Adobe Photoshop ada feature tambahan yang lebih baik lagi dengan menu File -> Save For Web. Dengan Adobe Photoshop ini, selain dapat memilih tipe gambar, kita juga dapat mengatur kompresi dan kualitas gambar. Berikut ini tipe-tipe gambar yang sering digunakan.

BMP (Bitmap)

Tipe file BMP umum digunakan pada sistem operasi Windows dan OS/2. Kelebihan tipe file BMP adalah dapat dibuka oleh hampir semua program pengolah gambar. Baik file BMP yang terkompresi maupun tidak terkompresi, file BMP memiliki ukuran yang jauh lebih besar daripada tipe-tipe yang lain.
File BMP cocok digunakan untuk:

* desktop background di windows.
* sebagai gambar sementara yang mau diedit ulang tanpa menurunkan kualitasnya.

File BMP tidak cocok digunakan untuk:

* web atau blog, perlu dikonversi menjadi JPG, GIF, atau PNG.
* disimpan di harddisk/flashdisk tanpa di ZIP/RAR, kecuali space tidak masalah bagi Anda.

JPG/JPEG (Joint Photographic Experts Group)

Tipe file JPG sangat sering digunakan untuk web atau blog. File JPG menggunakan teknik kompresi yang menyebabkan kualitas gambar turun (lossy compression). Setiap kali menyimpan ke tipe JPG dari tipe lain, ukuran gambar biasanya mengecil, tetapi kualitasnya turun dan tidak dapat dikembalikan lagi. Ukuran file BMP dapat turun menjadi sepersepuluhnya setelah dikonversi menjadi JPG. Meskipun dengan penurunan kualitas gambar, pada gambar-gambar tertentu (misalnya pemandangan), penurunan kualitas gambar hampir tidak terlihat mata.

File JPG cocok digunakan untuk:

* gambar yang memiliki banyak warna, misalnya foto wajah dan pemandangan.
* gambar yang memiliki gradien, misalnya perubahan warna yang perlahan-lahan dari merah ke biru.

File JPG tidak cocok digunakan untuk:

* gambar yang hanya memiliki warna sedikit seperti kartun atau komik.
* gambar yang memerlukan ketegasan garis seperti logo.

GIF (Graphics Interchange Format)

Tipe file GIF memungkinkan penambahan warna transparan dan dapat digunakan untuk membuat animasi sederhana, tetapi saat ini standar GIF hanya maksimal 256 warna saja. File ini menggunakan kompresi yang tidak menghilangkan data (lossles compression) tetapi penurunan jumlah warna menjadi 256 sering membuat gambar yang kaya warna seperti pemandangan menjadi tidak realistis. Pada program MS Paint, tidak ada fasilitas penyesuaian warna yang digunakan (color table) sehingga menyimpan file GIF di MS Paint seringkali menghasilkan gambar yang terlihat rusak atau berubah warna. Pada program pengolah gambar yang lebih baik, seperti Adobe Photoshop, color table bisa diatur otomatis atau manual sehingga gambar tidak berubah warna atau rusak.

File GIF cocok digunakan untuk:

* gambar dengan jumlah warna sedikit (dibawah 256).
* gambar yang memerlukan perbedaan warna yang tegas seperti logo tanpa gradien.
* gambar animasi sederhana seperti banner-banner iklan, header, dan sebagainya.
* print shoot (hasil dari print screen) dari program-program simple dengan jumlah warna sedikit.

File GIF tidak cocok digunakan untuk:

* gambar yang memiliki banyak warna seperti pemandangan.
* gambar yang didalamnya terdapat warna gradien atau semburat.

PNG (Portable Network Graphics)

Tipe file PNG merupakan solusi kompresi yang powerfull dengan warna yang lebih banyak (24 bit RGB + alpha). Berbeda dengan JPG yang menggunakan teknik kompresi yang menghilangkan data, file PNG menggunakan kompresi yang tidak menghilangkan data (lossles compression). Kelebihan file PNG adalah adanya warna transparan dan alpha. Warna alpha memungkinkan sebuah gambar transparan, tetapi gambar tersebut masih dapat dilihat mata seperti samar-samar atau bening. File PNG dapat diatur jumlah warnanya 64 bit (true color + alpha) sampai indexed color 1 bit. Dengan jumlah warna yang sama, kompresi file PNG lebih baik daripada GIF, tetapi memiliki ukuran file yang lebih besar daripada JPG. Kekurangan tipe PNG adalah belum populer sehingga sebagian browser tidak mendukungnya.

File PNG cocok digunakan untuk:

* gambar yang memiliki warna banyak.
* gambar yang mau diedit ulang tanpa menurunkan kualitas.

File PNG tidak cocok digunakan untuk:

* gambar yang jika dikompress dengan JPG hampir-hampir tidak terlihat penurunan kualitasnya.

Raster vs Vektor

Semua tipe file gambar yang disebutkan di atas (BMP, JPG, GIF, dan PNG) termasuk jenis gambar raster (atau disebut juga Bitmap). Gambar raster terdiri dari titik-titik pixel yang jumlahnya tetap. Jika diperbesar, baik di-zoom atau diubah ukuran gambarnya, gambar akan terlihat pecah atau tidak sebagus aslinya. Jenis gambar yang lain adalah gambar vektor. Gambar vektor terdiri dari garis, bentuk, bidang, dan warna yang dituliskan dalam instruksi-instruksi matematis. Jika diperbesar, gambar vektor kualitasnya tetap. Aplikasi pengolah gambar vektor misalnya CorelDraw (CDR) dan Adobe Ilustrator (AI). Gambar vektor saat ini tidak dapat digunakan di web atau browser.

Demikian penjelasan mengenai tipe-tipe gambar, dengan memilih tipe gambar yang sesuai, ukuran file gambar jadi lebih kecil, dan pengunjung web/blog kita tidak perlu menunggu lama pada saat loading dan menghemat bandwidth pengunjung, sehingga pengunjung akan lebih kerasan singgah di web atau blog kita. Semoga bermanfaat.

sumber : dap.comlabs.itb.ac.id

Categories: Computer Tags: ,

Nginstall Xp di macinosh pake bootcamp

February 27, 2009 Leave a comment

There’s been a lot written about Apple’s dramatic release of Boot Camp, a free download that lets you repartition your Intel-based Mac’s drive and install Windows XP as an alternative operating system, but even the magazine coverage I’ve seen doesn’t give you screen-by-screen details. So let’s see what we can do about that!

Your first step is to make sure you have an Intel-based Mac: any G4 or G5 Mac will not install Boot Camp and you won’t be able to dual boot into Windows XP. You can still run an emulator like Microsoft Virtual PC, but it’s an inferior solution and my own experience with VPC has been that it’s glacial and useless for all but the most simplistic of Windows applications. You’ll also need to be able to burn a CD during the process: make sure you have a blank, burnable CD disk on hand.

Now, download Boot Camp from the Apple site and double click on the “.dmg” disk image that’s dropped onto your desktop. Here’s what you’ll see:

Apple Boot Camp Windows XP Dual Boot Installer: Finder Folder View

Your first step, as highlighted in the “Read Before You Install” document, is to print a copy of the Boot Camp Beta Installation & Setup Guide. Trust me, you’ll want it!

Double-click on the “BootCampAssistant.pkg” icon and you’ll be able to install the Boot Camp assistant:

Apple Boot Camp Windows XP Dual Boot Installer: Installing the Assistant

As with all Mac software installs, this will require you to type in your administrative password. It’s probably the same as your default account password:

Apple Boot Camp Windows XP Dual Boot Installer: Authenticate

A few seconds of activity later, you’ll have the software successfully copied onto your computer and can quit this first installer.

Now your first challenge: finding the new installation assistant! It turns out that the program is installed on your computer in Applications –> Utilities –> Boot Camp Assistant. Launch it and it’s quite possible you’ll see the same message I did:

Apple Boot Camp Windows XP Dual Boot Installer: Update Firmware

No huge problem. Quit by clicking the “Quit” button, then go to Apple’s Support Downloads and check their Available Firmware Updates list to click directly to the firmware update for your own Intel system. For my Mini, I simply go back to the downloads page and scan down for the name of my system.

Once the correct firmware update is installed, you need to reboot, but not in the usual fashion. Instead, press and hold the power button on the Mini itself — it takes about ten seconds — until the power indicator light flashes repeatedly to begin the update. Your system will boot and you’ll see the Apple icon and a progress bar:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

That will advance, it took me about 90 seconds total, and you’ll reboot again, ready to go!

Finally, we’re ready to actually start working with Boot Camp itself. The first step is to read all of Apple’s warnings:

Apple Boot Camp Windows XP Dual Boot Installer: Warnings and Welcomes

Okay, now let’s proceed. First choice: do we want to burn a Macintosh Drivers CD, which contains important device drivers for Windows XP so it can access the various hardware parts of the Mac, or do we already have one. I don’t already have one, so I’ll choose the default of “Burn a Macintosh Drivers CD now”:

Apple Boot Camp Windows XP Dual Boot Installer: Burn Windows Drivers CDROM

I slip in the blank disk and the system tells me it’s “ready to burn”. Click “Burn” and it’ll do everything necessary to create the Windows XP drivers CD. This took a few minutes on my Mini, but it wasn’t terribly long.

Next step is much more exciting: it’s time to partition the hard disk!

Partitioning is a geeky buzzword for something that will actually make a lot of sense to you, believe it or not. The idea is that if you have a large hard disk, why not configure it to act like two small hard disks? Or three? In this way, smart system administrators can isolate accounts, minimize out-of-disk-space errors and disruptions, and so on. With Apple Boot Camp, we’ll want to partition the default disk to allow us to have one “disk” that represents the Windows XP world, and another “disk” that represents Mac OS X.

By default, Boot Camp offers up a pretty tiny partition for Windows, as you can see:

Apple Boot Camp Windows XP Dual Boot Installer: Create Second Partition

I’d recommend that you make it bigger if you’re actually going to use Windows for anything important; Microsoft recommends 10GB as the smallest reasonable and functional partition, for example. If you’re just playing, however, 5GB will probably work fine (until your first big game install). I’ll make mine 8GB to be somewhere in the middle.

Change the partition sizes by clicking and dragging on the vertical bar between the two areas until you have the size or sizes you desire. With my Mini configuration, it left me with 66GB for Mac OS X, of which 20GB is free, and 8GB for Windows XP.

Once the partitions are set up as you desire, click on “Partition” and keep your fingers crossed (there is a slight chance it’ll actually mangle everything on the disk. Not likely, but I would definitely recommend you do one good, clean backup before you start experimenting with Boot Camp).

The disk partition is what we Windows folk call non-destructive or dynamic, which means that you don’t have to reformat and then reinstall everything on both “sides” of the partition. That’s a very, very good thing. :-)

Once the partitioning is done, you’re ready to install Windows itself:

Apple Boot Camp Windows XP Dual Boot Installer: Ready to Start WinXP Install

Fortunately, I have a pristine new copy of Microsoft Windows XP Pro with SP2 included for PCs without Windows (who would have thought I’d think of my Mac as a PC without Windows?) and that’s what I’ll use. My thanks to Microsoft for sending it along…

Insert the WinXP installation DVD, wait for it to be recognized by Mac OS X (it’ll show up on your desktop with a cheery name like “VRMFPP_EN”), click on “Start Installation” and kiss Mac OS X goodbye.

After a bit, you’ll see the unfamiliar blue screen of a Windows installation:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

Press ENTER or Return on the keyboard to continue, agree to the Microsoft warnings and legal restrictions page, and you’ll finally get to the “choose partition” list:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

Take your time here to ensure that you pick the correct partition! You want to use Partition C: which should match the size you just set too: notice on my screen it’s 8407MB, which is about 8GB, as expected. Move the highlight bar down to the correct partition and press Enter to actually install WinXP.

Now you need to pick a partition formatting option. The two main choices are NTFS or FAT. NTFS is more modern and supports very large partitions, but can’t interoperate with Mac OS X. FAT, on the other hand, can’t support partitions larger than 32GB, but is compatible with the Mac. You’ll see why that’s important later. For now, select FAT and do a full, not a quick, format:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

Now some time will pass while the partition is formatted using the Windows FAT32 format. It took my system about five minutes to fill in the progress bar:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

I won’t document every single step involved in installing Windows XP as it’s pretty straightforward. Just make sure you have your product key available for the verification step of the process. It’s in the package within the Microsoft Windows XP disk, and it’s really a good idea to use a new version of the OS rather than the same key you’ve used with other PCs in your office or home. Worst case, you can skip the verification step and have 30 days of “trial period” before you have to deal with finding a valid key to enter for verification purposes.

Once you’ve finished the full Windows XP install, which can take rather quite a while, your system will reboot and you’ll want to eject the WinXP install disk and slip in the Mac drivers CD you burned earlier in the process.

With Windows, this is done by going to My Computer and right-clicking on the optical drive D: then selecting Eject. Slip in the Mac disk and everything should just automatically launch and start up. If not, look for and double click on the file Install Macintosh Drivers for Win XP.exe. Here’s what you’ll see:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

I admit, it’s kind of weird to see a Mac installation program running within Windows XP on a Mac computer, but it’s a brave new world out there.

Probably, during the installation process, you’ll learn that various components of your Intel-based Macintosh haven’t passed the Microsoft Windows compatibility test:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

Apple assures us that it’s safe to continue anyway, so I did. Three times!

Then you get to go through a few waves of “new hardware found”, and in all cases you can simply accept all the default settings for each wizard, as those guys in Redmond call ‘em, and proceed. Finally, you’ll get to the last configuration screen:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

Click “reboot now” and if the hardware compatibility Gods are smiling upon you, the Mac will reboot right into Windows and you’ll be the proud owner of a Macintosh that can run Windows natively, astonishingly enough.

One last tip: to select which OS you want to run, hold down the OPTION key when you start up the Mac and you’ll be able to see both Mac OS X and Windows XP:

Apple Boot Camp Windows XP Dual Boot Installer: Supplemental Photos

Use the arrow keys to move to the choice you desire, then press Enter or RETURN to select it and zoom into that mode.

When you do boot into Mac OS X, you’ll notice that there’s a new hard disk on your desktop too, called “NO NAME”. Click on the name, count to five, and click again, then type “Windows XP” and you’ll forevermore realize what it is. And yes, you can navigate through it and find your data files from when you’re running Windows, but I’ll talk about that in another article!

It’s a long, tricky process, but I hope this explains exactly how to install and get running with Apple Boot Camp. Also, don’t miss my tutorial on how to install Parallels to run Windows XP within Mac OS X, rather than having to reboot each time you want to switch systems.

source : http://www.askdavetaylor.com/how_do_i_install_windows_xp_on_my_mac_using_boot_camp_1.html

Categories: Computer Tags: , , ,

about sql

February 27, 2009 Leave a comment

MySQL creating users and setting permissions using phpMyAdmin

MySQL is a multi-user database, you can set up several different accounts on the same server with many varied permissions given to each user. This ability is part of what makes MySQL so powerful. You can use either MySQL console or phpMyAdmin to create users and grant permissions. This page focuses on using phpMyAdmin.

MySQL Privileges

MySQL privileges allow each of the users to access and utilize only the areas they need to perform their tasks. This prevents a user from accidentally accessing an area where he or she should not have access this adds to the security of the MySQL server.

When you connect to a MySQL server, the host from which you connect and the user name you specify determines your identity. With this information, the server then grants privileges based upon this identity.

phpMyAdmin

phpMyAdmin is an extremely powerfully MySQL database management tool you use either locally or remotely to set up your MySQL database. Uniform Server 3.3 currently uses version 2.6.4-pl4 while 3.5-Apollo uses version 2.10.2 both have the capability of multi-user authentication.

Starting phpMyAdmin

There are several ways to start phpMyAdmin:

  • From apanel: When you start the servers (using either Server_Start.bat or Disk Start.vbs) apanel starts in a browser window.
    To start phpMyAdmin click on its link from the menu c).
  • Directly: To directly start phpMyAdmin type the following into your browser: http://localhost/apanel/phpMyAdmin/
  • Remotely via the Internet: I cover this in more detail on hosting MySQL accounts page.
    For security a centeral copy of phpMyAdmin is run from the root directory.
    To start phpMyAdming they type their domain name into abrowser, for example http://their_domain.com/phpMyAdmin.
    They will be challenged for a name and password to gain access to phpMyAdmin..

Tip: You can re-run apanel by typing http://localhost/apanel/ into your browser address bar.

Note: Menu links A) and B) Start and stop the MySQL server.

Image:Uc_mysql_apanel_menu.gif

Top

phpMyAdmin – Home

If you loose your bearings in phpMyAdmin click on the home link 1) at anytime, takes you back to the index (start) page. Image:Uc_phpmyadmin_1.gif

Top

Creating a database

Creating databases with phpMyAdmin is straightforward in this example we will create three databases named mpg3_db, mpg4_db and mpg5_db. The choice of name is a mater of taste.

Starting from phpMyAdmin home page:

1) Enter mpg3_db into the create new database field.
2) Click on create this creates the database. Click Home to take you back to the index page.

Repeat the above steps create two more databases named mpg4_db and mpg5_db we will need these later.

Image:Uc_phpmyadmin_3.gif Viewing database list:

  • A drop down menu displays all databases on your MySQL server.
  • To select a database simply click on its name.
  • Number of tables in a database is shown in brackets.
Image:Uc_phpmyadmin_2.gif

Top

Deleting a database

In the above example we created a database named mpg5_db this is not required it was created to show you how to delete a database.

Uniform Server3.3

Starting from phpMyAdmin home page: – The little house image link

3) Click on databases (see above image). This opens the database page.

A) Check (tick) databases to delete.
B) Click on Drop (Delete) when challenged “Do you really want to :” Click on Yes

Note: There are several places through out this program that duplicate tasks this page is no exception. At the bottom of the page, you find an option to create a new database.

Privileges: To view privileges set for that database click the padlock icon to the right of each database name


Uniform Server 3.5-Apollo

Starting from phpMyAdmin home page: – The little house image link

3) Click on databases (see above image). This opens the database page.

A) Over your mouse pointer over the database to delete and left click this opens a new page.
B) Click on Drop (Delete) this is located top right of page.
When challenged “You are about to DESTROY a complete database..” Click on OK this takes you back to the home page.

Note: I am sure each new version of phpMyAdmin its interface will change. This change I do like because it is logical stops you from killing more than one database in one go!

Image:Uc_phpmyadmin_4.gif

Top

Setting up a new user – with global privileges

For our first example we have a user named power_mad with a password mad123 we trust! this person so we will grant all privileges. He wants access from any host.

Starting from phpMyAdmin home page: – The little house image link.

4) Click on privileges (see above image creating databases).
This opens the User overview page.

A) Click on Add a new User this displays the add new user page
Image:uc_phpmyadmin_5.gif

Add new user page:

B) Enter user name power_mad
C) From the drop down menu select Any host
  • Note: Inserts a % code.
D) Enter password mad123
E) Re-enter password mad123
  • An alternative to entering a password into D) and E) is to click on Generate Password:
  • This automatically generates a password for you and looks something like TRwAXKhwLLHfGX:G
  • Click on Copy this inserts the password into D) and E)
F) Scroll down and click on Check All selects all privileges note these are Global (never give a user this power)
G) Click GO to create user a conformation message is displayed.

Quick Check:

Starting from phpMyAdmin home page:- The little house image link.

  • Click on databases This opens the database page.
  • Click the padlock icon to the right of each database name you will find our power_mad user has access to all databases. (remember you can use your browser back button to viewthe previous page)

Note 1: This is a serious user with identical power as root think about the implication!

Image:uc_phpmyadmin_6.gif

Note 2: At step F) Click on UnCheck All this will create a user with no global privileges. You can revoke or change the global privileges at any time.

  • Letting other users to have global privileges is a recipe for disaster.
  • It is safer to un check all priveledges and set privaliges on specific databases see next section.

Note 3: After adding a new user an additional menu becomes accessible allowing you to set Database-specific privileges. This appears at the bottom of the global privileges selection form.

Top

One database per user

A user named power_mad must raise suspicions, preempt any malicious attacks remove all global privileges and restrict this user to having access to a single database in this example mpg4_db.

Starting from phpMyAdmin home page: – The little house image link.

  • Click on privileges. This opens the User overview page.
  • To the right of user power_mad click on the edit privileges icon this opens the user page. Make sure all Global Privileges are un checked if necessary click on the Uncheck All link and click Go. With all global privileges removed continue to the next step.
  • Scroll down the page to Database specific privileges form.
Image:uc_phpmyadmin_7.gif
H) From the drop down menu
I) select database mpg4_db (database you wish to assign to this user)
J) Click on Go this opens the edit privileges page for that database.
K) Select privileges to allow.
L) Click on Go to complete

Quick Check:

Starting from phpMyAdmin home page: – The little house image link.

  • Click on databases this opens the database page.
  • Click the padlock icon to the right of each database name you will find our power_mad user
    has been restricted to access only one database mpg4_db.

Note: You can repeat this process to assign another or as many databases to a user.

Image:uc_phpmyadmin_8.gif

Top

Refresh the MySQL grant tables

Information you have changed or created when executing the above statements is stored in a database called mysql. This database was automatically created during MySQL installation. It contains several tables that hold all of the information pertaining to each user, the databases they have access to, the hosts they can connect from, and the privileges allowed for each.
The only time MySQL reads data in these tables is when it first boots (runs). It does not read those tables again unless it is told to do so. Without this step, none of your newly created users or changes to existing users will take effect.
At the bottom of the User overview page

  • Click the little house image link.page
  • Click privileges
  • You will see the following statement:

“phpMyAdmin gets the users’ privileges directly from MySQL’s privilege tables. The content of these tables may differ from the privileges the server uses, if they have been changed manually. In this case, you should reload the privileges before you continue.”

Click on reload the privileges link contained in the above statement this executes the query

SQL query:
FLUSH PRIVILEGES ;

Instructing the MySQL server to take another look at the user tables and hence puts all of your new users and privileges into operation.

That extra database

Have you discovered an extra database you cannot remove! This page explains why information_schema.

Back to MySQL User Accounts MySQL user accounts

Top

Categories: Computer Tags:
Follow

Get every new post delivered to your Inbox.