Skip to content


jQuery Table Plug-in Review – jqGrid

After going through a lot of options to select the best jQuery table/grid plug-in, I’ve finally chosen jqGrid.

It has a lot of flexibility and built-in options for most of the common requirements, such as.

  • Sorting
  • Pagination
  • Search (on both client and server)
  • Filters
  • In-line editing
  • Live syncing with server
  • Categories within tables (grouping into sub-tables)
  • and much more…

You can view a live demo of the jQuery table plug-in here. It’s free, open-source and actively maintained. It uses jQuery UI, so you can change the theme easily to match with the rest of your application.

Here is the project home page where you can get downloads, documentation and updates.

 

Posted in Programming, Technical.


MAMP MySQL Won’t Start? – How to Fix the MySQL Server Issue in MAMP

If you get the message “Error: Could not connect to MySQL server!” or if you have trouble starting up or restarting the MAMP Server with MySQL, you can try the following solution.

  1. Quit MAMP
  2. Open Terminal window
  3. Type “killall -9 mysqld” and press enter
  4. Start MAMP
  5. Start servers

This fixed the issue I was having with the MySQL server starting up on MAMP.

http://www.shaneperera.com/blog/

Posted in Technical.


Installing CodeIgniter 2 with Doctrine 2.0

I was struggling for few hours on installing Doctrine 2 with the new version of CodeIgniter. Then I found this excellent tutorial by Joseph on how to install and configure Doctrine 2 with CodeIgniter 2.

If you’re still struggling, here you can download a pre-configured installation with CI2 & D2.
(Please note that there may be new versions out there by now – This will only help you to get the file structure and configuration right.)

Posted in PHP.


WAMP Server – How To Setup Multiple Root Folders

If you have a WAMP Server installation, maybe you’re run into the need of creating multiple roots for different sites.

Here’s how to do it.

1. Open the httpd.conf file. (WAMP Icon > Apache > httpd.conf)

2. Find the line which says ‘Listen 80′

3. Change it to the following

Listen 80
Listen 81
Listen 82

NameVirtualHost 127.0.0.1:81

	ServerName localhost
	DocumentRoot "e:\wamp\www\ci"
	
		Options Indexes FollowSymLinks Includes
        AllowOverride All
		Order deny,allow
		Deny from all
		Allow from 127.0.0.1
	


NameVirtualHost 127.0.0.1:82

	ServerName localhost
	DocumentRoot "e:\wamp\www\micro"
	
		Options Indexes FollowSymLinks Includes
        AllowOverride All
		Order deny,allow
		Deny from all
		Allow from 127.0.0.1
	

You have to change the DocumentRoot and directory paths (within the www folder)

4. Save the file and restart the server. (WAMP > Apache > Service > Restart Service)

This will now create 3 differant root directories in your localhost.
They are accessible via,

http://localhost:80/

http://localhost:81/

http://localhost:82/

This can be taken another step further by assigning the IP addresses in your host file. See here for more info.

So you can end up with something like,

http://localhost/

http://mysite/

http://phpsite/

Posted in PHP.

Tagged with , , .


How to Link Multiple Analytics Domains to AdSense Account

I had some trouble linking many domains to the same AdSense account.

Here’s how to do it.

Google Analytics code (before closing HEAD tag or BODY tag)

<script type="text/javascript">
window.google_analytics_uacct = "UA-YOUR-ANALYTICS-ID";</script>

And then insert your regular AdSense Code

<script type="text/javascript"><!--
google_ad_client = "pub-
YOUR-ADSENSE-PUBLISHER-ID";
google_ad_slot = "";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>

Finally, your Analytics tracking code.

<script type="text/javascript">
var analyticsFileTypes = [''];
var analyticsEventTracking = 'enabled';
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-YOUR-ANALYTICS-ACCOUNT-ID']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

Currently, Google doesn’t allow you to link multiple analytics accounts to one AdSense account.
If you want to track AdSense data over multiple domains, you have to create individual profiles for each domain, within your main linked account.

Posted in Analytics.

Tagged with , , .