Is the value of your Zend_Dojo_Form_Element_DateTextBox form element set to 11/30/1899?
The code speaks for itself.
If you are using MVC components of Zend Framework, you will come across situations where you will have to disable view and layout. To do so you use the viewRenderer and layout action helpers and call the setNoRenderer() and disableLayout() methods respectively.
How to disable the view?
In your controller action
This one's a quick how-to about mounting Windows drives from Linux(Fedora 7).
From the Fdisk manual pages:
"Hard disks can be divided into one or more logical disks called partitions. This division is described in the partition table found in sector 0 of the disk. There may be reasons of security, ease of administration and backup, or testing, to use more than the minimum number of partitions".
For the impatient: Demo is here
Before: Traditional HTML form with input field
Visit the above link and take a look at the HTML only form fields that collect date information from the user. If you don't use a server side scripting language to generate the form fields you have to type a lot of select options to make it easier for the user. Populating the select fields with the desired option, especially in the case of failed validation, takes a bit more server side code. Most of you would agree that the user hates these kind of forms.
I have had the opportunity to use Tata Indicom data card to connect to Internet using Fedora Linux. It is fairly simple to connect. You will need wvdial dialer software.
From the wvdial man page:
wvdial - PPP dialer with built-in intelligence.
wvdial is an intelligent PPP dialer, which means that it dials a modem and starts PPP in order to connect to the Internet.
Install it using your existing Internet connection. From the terminal as root type:
yum install wvdial
So, you've got a tarball and want to know how to extract it, huh?
Some background info about tar : In the olden days, people primarily used tape devices to store and retrieve data. Tape drives still exist and folks use them to archive data. The name tar is derived from from tape archive. The name of the program that creates and extracts tar files also has the same name - tar. Tarball refers to the archive file. They usually have the extension filename.tar.gz.
Extracting tar files with extension .tar.gz: To extract a tar.gz file use the below command. Assuming you have a tarball by name archived-file.tar.gz:
tar -zxvf archived-file.tar.gz
In the above command the options have the following meaning.
- z - filter the archive through gzip. gzip aka GNU Zip is a program used to compress files. When you use -z option, gzip will be used in tandem with tar.
- x - extract files from an archive. Pretty self explanatory, huh?
- v - verbosely list files processed. The -v option prints information on the screen when the files are being extracted from the archive. If you do not use this option, tar still extracts files silently.
- f - use archive file. This option tells tar to extract from a file. The -f switch is required.
Moving MySQL Database To A Different Computer AKA Backup And Restore
Many popular web applications are written in PHP and use MySQL database. In this post I will describe, how you can move your database to a different computer. Almost all web applications store database and files system information in configuration files. You can actually move your web application to a different server without much hassle by editing few lines in these configuration files. I will write more about the configuration files of web applications in a different post. In this post I will walk you through the steps to move your MySQL database to a different server. The commands will help you move both data and schema.
What do you need to know before moving a database? On both the computers you will require the
- MySQL database name
- MySQL username that has access to the database
- Password for the username that has access to database
You can take a backup of your database in the form of SQL dump and restore it on another server quickly from the Shell. Later in the post we will discuss how you can import and export MySQL databases using a graphical tool.
Launch the terminal. If the server is accessible remotely using SSH you can execute these commands on the secure shell.
Command 1 to generate the backup
mysqldump -u mydatabaseuser -p mydatabase > backup.sql
If you want to quickly learn how to install, remove or update software packages on Fedora or CentOS, here is the short and sweet guide. To use yum you will require an Internet connection and the root password of your system.
Yum stands for Yellow dog Updater, Modified. Yum is currently maintained as part of Duke University's Linux@DUKE project. Using yum you can easily install, remove or update the software packages on your RPM based system. Fedora, CentOS and many other GNU/Linux distributions are based on RPM.
Yum is a command line utility. You will need to open the terminal and become root to use yum. On Fedora 8, click Applications on the gnone-panel, select System Tools and click on Terminal from the drop down menu. On the terminal, ie command line, type
su - Type the root password
If you see the # symbol on the command line you are ready to go.
Updating all software packages
The first thing I do after installing Fedora is update the system. Free and open source software projects are updated rapidly. To keep your system current you have to update packages installed on your computer from time to time. Fedora maintains many software repositories and their mirrors. Whenever software packages are developed or updated, they would be stored on these repositories. When you update your system using yum, you download the latest packages from these repositories and install them on your computer. To perform a full update of your system type the below command in the terminal:
Yes, it's just a two word command. Isn't it easy to remember? After you type yum update and hit enter in the terminal, yum checks how many packages needs to be updated. Once it gathers the required information, it displays the name, architecture, version and size of the package. Yum also tells you the name of the repository in which the updates are available. It also gives you the transaction summary and the total download size. After promptly displaying all the above information, yum asks for your approval. If everything is ok, you type y and hit enter. Yum updates all the packages on your computer.
Everybody has their own personal preferences in all walks of life. Desktop computer is no different. Every time I install Fedora, I immediately change few settings. The default settings in some applications may not appeal to every body. They certainly don't, for me at least. I will not discuss configuring network, Internet, printer, audio and video drivers in this post because they are more of necessity than personal preferences. Here goes the list.