Friday, May 20, 2011

Import/Export Large MYSQL Databases


When working with MYSQL I often use phpMyAdmin, which is a nice GUI way to manipulate my database. But some operations won't work in phpMyAdmin when the database is too large. In particular, you can't import or export really large databases using phpMyAdmin. So sometimes you need to do things on the command line.
So I thought I'd document some of the command line snippets we use frequently. In the following, replace [USERNAME] with your mysql username, [DBNAME] with your database name, [/path_to_file/DBNAME] with the path and name of the file used for the database dump, and [/path_to_mysql/] with the path to mysql bin (like /Applications/MAMP/Library/bin/).

Copy/Export a Large Database

MYSQL has no 'Copy' function. You create a copy by dumping the database with mysqldump.
To dump the database and gzip it at the same time, use the following. This will prompt you for your password.


mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz 

Source Link:

Thursday, May 19, 2011

php codeigniter Eclipse


  1. Download XAMPP and unzip it to your C drive. (If you use Windows Vista, you will need to unzip it one directory down. Common practice is to create a folder title "XAMPP" and unzip there.)
  2. Download CodeIgniter and unzip it to your C drive in a folder named "CodeIgniter".
  3. Open the CodeIgniter folder. There will be a subfolder named "CodeIgniter[version number]". Create a second copy of that subfolder within the CodeIgniter folder (Copy_of_CodeIgniter).
  4. Open Eclipse and set the workspace to any folder other than XAMPP/htdocs (or in Windows Vista, XAMPP/xampp/htdocs).
  5. In eclipse, select File/New/Create New Project/PHP Project
  6. Select the option to "Create from Existing Source", and using the browse button, navigate to C:/CodeIgniter/Copy_of_CodeIgniter". Name the project something meaningful and save.
  7. Switch Eclipse's workspace the htdocs folder withn your XAMPP directory.
  8. From the menu in Eclipse, select File/Import/General/"Import existing projects into workspace".
  9. Browse to C:/CodeIgniter and select Copy_of_CodeIgniter. The project you created should appear in the list of projects and it should be automatically selected for copying.
  10. IMPORTANT! Check the option "copy files into workspace" before finishing the project import.
  11. Now the project will be in htdocs, the default XAMPP web directory. To verify, in your browser typehttp://localhost/PROJECT_NAME and you should see the CodeIgniter welcome page. Your project is ready for editing.
These steps will assist you in setting up the original project. Future projects can be created by starting at step 8.


Download Eclipse:
eclipse-php-helios-SR1-win32.zip
http://www.eclipse.org/pdt/downloads/ 

--------------------------------------------
for integrating codeigniter with eclipse see this video

http://www.youtube.com/watch?v=MzvSA0hq3Ts

very good link--
http://www.associatedcontent.com/article/2378460/setting_up_a_codeigniter_project_in_pg2.html?cat=15


Wednesday, April 27, 2011

Publish facebook page status or wall post automatically


Facebook page is now very popular. Many companies and people create facebook page for their own publicity. Suppose your company has 100 products and they want to maintain 100 facebook pages, then isn’t it very difficult to update status all of the pages manually?

In this article, I’ll show and discuss about 2 facebook api, using that you can easily update your facebook page status or publish wall post on that page automatically
I assume that you know how to set cron from hosting admin panel, I also assume that you have intermediate knowledge of facebook application development and their api usage.

fb_page



At first you’ve to setup a new facebook application. In the application setting look Authentication and in the Authentication setting must tick Facebook Pages

fb_app_setting

Now save the api and secret key either in your database or config file.
Update Status or Publish in Wall of your facebook page:
Source Link: http://thinkdiff.net/facebook/update-facebook-page-status-automatically/

Monday, April 18, 2011

Create Informative Textboxes

http://blog.jbstrickler.com/2010/06/create-informative-textboxes/comment-page-1/Create more informative textboxes by placing descriptive information, or “infotips”, about the textbox directly inside of it. This is particularly useful when it is not always desired to place labels next to textboxes such as in a small log in form. Example, Facebook’s log-in page places text inside its fields rather than using labels. When one of the textboxes receives focus, the text disappears; on blur, if nothing is entered then the infotip is placed back.

or another way is-
onFocus="if(this.value == 'location') {this.value = '';}" 
onBlur="if (this.value == '') {this.value = 'location';}"


Source: http://blog.jbstrickler.com/2010/06/create-informative-textboxes/comment-page-1/


Facebook Log in Snapshot

Sunday, March 27, 2011

Anatomy of a WordPress Plugin & Widget Tutorials


WordPress is well known for its amazing collection of free plugins. There is one for almost every need
you can think of, from backing up your WordPress installation to asking for a cup of coffee
or fighting spam.
But there are times when none of the available plugins seem to quite do the trick you are looking for. To help you in moments like
that, this tutorial will guide you through every step of building a simple, widgetized WordPress plugin with settings.



Link with source code:
http://net.tutsplus.com/tutorials/wordpress/anatomy-of-a-wordpress-plugin/

Monday, March 7, 2011

All Google APIs & Developer Tools In One Plac


Google is providing lots of tools for web designers/developers and almost all of them have their APIs for easier integration with 3rd party services.
If you're a frequent user of these resources and want to reach them easier, Google has a web page specifically for you: Google APIs & Developer Products.
Google APIs & Developer Tools
The page lists all development-related resources of Google with their logos and highlights the ones according to their categories.

First source: http://www.webresourcesdepot.com/all-google-apis-developers-in-one-place/
Second source: http://code.google.com/more/table/