The -u parameter is the mysql user you use to connect to your MySQL server.
The -p parameter is the password for the MySQL user. In case your password has special characters ( like $%@&! ) you can enter the password between double quotes: -p"password%!$@#"

In case you need more explanations the database name in the command is the name of the MySQL database you use and databasebackup.sql is the name of the file/SQL backup you want to import.

]]>http://savasplace.com/2015/07/plyr-a-simple-html5-media-player-with-custom-controls-and-webvtt-captions/feed/0A Great Way To Show Off Your Sponsors Or Friends On Your Websitehttp://savasplace.com/2011/02/a-great-way-to-show-off-your-sponsors-or-friends-on-your-website/
http://savasplace.com/2011/02/a-great-way-to-show-off-your-sponsors-or-friends-on-your-website/#respondFri, 11 Feb 2011 08:21:19 +0000http://savasplace.com/?p=6089Everybody has a link list, a blog roll, a links page etc. on their website. Here’s a great way to show off your friends, sponsors or websites you like with the jQuery Sponsor Flip Wall.

jQuery Sponsor Flip Wall

No … it’s not a table. It’s a jQuery animated wall. It does it like this:

jQuery Sponsor Flip Wall - Animation

What’s great is that you can easily modify your sponsors/friends because it takes the data from a simple array:

$sponsors = array(
array('facebook','The biggest social..','http://www.facebook.com/'),
array('adobe','The leading software de..','http://www.adobe.com/'),
array('microsoft','One of the top software c..','http://www.microsoft.com/'),
array('sony','A global multibillion electronics..','http://www.sony.com/'),
array('dell','One of the biggest computer develo..','http://www.dell.com/'),
array('ebay','The biggest online auction and..','http://www.ebay.com/'),
array('digg','One of the most popular web 2.0..','http://www.digg.com/'),
array('google','The company that redefined w..','http://www.google.com/'),
array('ea','The biggest computer game manufacturer.','http://www.ea.com/'),
array('mysql','The most popular open source dat..','http://www.mysql.com/'),
array('hp','One of the biggest computer manufacturers.','http://www.hp.com/'),
array('yahoo','The most popular network of so..','http://www.yahoo.com/'),
array('cisco','The biggest networking and co..','http://www.cisco.com/'),
array('vimeo','A popular video-centric social n..','http://www.vimeo.com/'),
array('canon','Imaging and optical technology ma..','http://www.canon.com/')
);
shuffle($sponsors);

You can read the whole tutorial, view a demo or download it on TutorialZine

]]>http://savasplace.com/2011/02/a-great-way-to-show-off-your-sponsors-or-friends-on-your-website/feed/0Multiple CSS Style Session Flash’es in CakePHPhttp://savasplace.com/2009/08/multiple-css-style-session-flashes-in-cakephp/
http://savasplace.com/2009/08/multiple-css-style-session-flashes-in-cakephp/#commentsThu, 27 Aug 2009 08:34:08 +0000http://savasplace.com/?p=3904Session->setFlash('Random message that appears only once'); ?> We can style this message the way we want but what about having these kind of messages that are style differently […]]]>We all know that CakePHP has the Session component that allows us to login and logout users and to show them messages that appear only once:

We can style this message the way we want but what about having these kind of messages that are style differently depending on what kind of messages we show (error, success, warning or general messages ).

The easy way to do it is to create our own helper. So let’s go to app/views/helpers folder and create the helper. Create a new file and rename it to flash.php and put the following code in it:

As you can see the show() function read the messages stored in the session. Each read message is written back inside a <li> tag that has a different class $type.

Now go ahead and edit your app_controller.php file located in the app folder.
If you already have the helpers array written in it then add the Flash helper to the array. If not then put this code in the file:

Of course that this can change depending on the languages you are using and their number. You’re a smart boy so you’ll figure it out.

Now all you have left is to create the language files. Go to app/locale and create 2 folders: rum and en. In each of these folders create another folder called LC_MESSAGES. In the LC_MESSAGES folders you will now store the language files. Language files can be divided so it’s easier for you to store the translations ( .po files ).

For example, you can create a login.po, register.po, account.po and default.po.

In the language files you have to set the message id and message string.

English
msgid "hello"
msgstr "Hello"

Romanian
msgid "hello"
msgstr "Buna ziua"

And now to echo these strings on your website you have to remember the string id and the name of the language file (.po) it is stored in. Example:

<?
__d('default', 'hello', true);
?>

This will take the string with the id “hello” from the default.po file and echo it. And true means that it will echo the string.
Good luck

]]>http://savasplace.com/2009/08/multilingual-website-with-cakephp/feed/13Multiple Databases in CakePHPhttp://savasplace.com/2009/05/multiple-databases-in-cakephp/
http://savasplace.com/2009/05/multiple-databases-in-cakephp/#commentsMon, 04 May 2009 16:59:39 +0000http://savasplace.com/?p=2543There comes a time in life when you need to use multiple databases for a website you have to build .
I came across this “problem” when I was working on a portal website and I had to make sure that users can login with the same details on any website that company owned.

So I had to create a common database in which to store the users. Since all the websites were built in CakePHP I had to find a way to make it connect to other databases besides the default one.

If you are familiar with CakePHP you know that the database details are kept in app/config/database.php.

Dennis MacAlistair Ritchie (born September 9, 1941) is an American computer scientist notable for his influence on C and other programming languages, and on operating systems such as Multics and Unix. He received the Turing Award in 1983 and the National Medal of Technology in 1998. Ritchie was the head of Lucent Technologies System Software Research Department when he retired in 2007.

PHP

Rasmus Lerdorf (born on November 22nd, 1968 in Qeqertarsuaq, Greenland) is a Danish-Greenlandic programmer and is most notable as the creator of the PHP programming language. He authored the first two versions.

Java

James Gosling – In 1977, James Gosling received a B.Sc in Computer Science from the University of Calgary. In 1983, he earned a Ph.D in Computer Science from Carnegie Mellon University, and his doctoral thesis was titled “The Algebraic Manipulation of Constraints”. While working towards his doctorate, he wrote a version of emacs (gosmacs), and before joining Sun Microsystems he built a multi-processor version of Unix while at Carnegie Mellon University, as well as several compilers and mail systems.

Since 1984, Gosling has been with Sun Microsystems, and is generally known best as the father of the Java programming language.

Javascript

Brendan Eich (born 1961) is a computer programmer and creator of the JavaScript programming language. He is the Chief Technology Officer at the Mozilla Corporation.

Perl

Larry Wall (born September 27, 1954) is a programmer and author, most widely known for his creation of the Perl programming language in 1987.

Ruby

Yukihiro Matsumoto (Matsumoto Yukihiro, a.k.a. Matz, born 14 April 1965) is a Japanese computer scientist and software programmer best known as the chief designer of the Ruby programming language and its reference implementation, Matz’s Ruby Interpreter (MRI). He was born in Osaka Prefecture, in western Honshū. According to an interview conducted by Japan Inc., he was a self-taught programmer until the end of high school. He graduated with an information science degree from Tsukuba University, where he associated himself with research departments dealing with programming languages and compilers.

Ruby on Rails (Not a Programming Language | Added As Bonus)

David Heinemeier Hansson is a Danish programmer and the creator of the popular Ruby on Rails web development framework and the Instiki wiki. He is also a partner at the web-based software development firm 37signals.

Python

Guido van Rossum is a Dutch computer programmer who is best known as the author of the Python programming language. In the Python community, Van Rossum is known as a “Benevolent Dictator for Life” (BDFL), meaning that he continues to oversee the Python development process, making decisions where necessary. He is currently employed by Google, where he spends half his time working on Python development.

Pascal

Niklaus Emil Wirth (born February 15, 1934) is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. In 1984 he won the Turing Award for developing a sequence of innovative computer languages.

The <abbr> and <acronym> tag describes abbreviations and acronyms. By marking up abbreviations you can give useful information to your visitors by showing tooltips when they hover the mouse over the element.

Example:

HTML

<q>

The <q> tag defines a short quotation. It tells the browser to insert quotation marks around the marked element. Most of us use the &quot; entity to display a quote but it’s easier with q

Example:

This is an example quote

<bdo>

The <bdo> stands bidirectional override that allows you to specify the text direction and override the bidirectional algorithm. Use it with the value rtl (right to left) and you will get the entire text reversed in direction.

Example:

Can you read this ?

The bdo tag can be easily be used to show your email address on webpages and not worry about spam ;).