Archive | Scripts RSS feed for this section

4 June 2009 View Comments

jQuery TOOLS

jQuery TOOLS

jQuery TOOLS

jQuery Tools provides some UI addons to the basic jQuery Library. You can create Tabs, Accordions, Tooltips, Overlays and more using this library. The whole library fits in less than 6Kb, so you can replace all the separate libraries you are using for these functionalities by using this library.

The library has an easy to use API, which both beginners and advanced developers can use to integrate. To show you how easy it is to setup tabs in this library, here’s an example from their site. The HTML code looks like this:

<!-- the tabs -->
<ul>
	<li><a href="#">Tab 1</a></li>
	<li><a href="#">Tab 2</a></li>
	<li><a href="#">Tab 3</a></li>
</ul>
<!-- tab "panes" -->
<div class="panes">
<div>pane 1 content</div>
<div>pane 2 content</div>
<div>pane 3 content</div>
</div>

The Javascript which powers the tabs is simply :

// setup ul.tabs to work as tabs for each div directly under div.panes
$("ul.tabs").tabs("div.panes &gt; div");

To see this in action and more information on the code, check this link out:
http://flowplayer.org/tools/tabs.html

You can also check out the other functionalities which this library provides :

Learn more about jQuery Tools over at: http://flowplayer.org/tools/index.html

Reblog this post [with Zemanta]

12 May 2009 View Comments

PHP Quick Profiler – Profile your Code

PHP Quick Pofiler

PHP Quick Pofiler

Here’s a good looking and functional profiler you can plug into your projects. PQP (PHP Quick Profiler) allows you to profile your code and get information about how much time your script took to execute, the amount of memory used, the files which have been included, errors in your code, queries and any other debug information you would like to show up.

With minor changes to your code, it’s easy to get information on the console, memory and file utilizations. Getting information about your queries and load times, you’ll have to follow the instructions over at:  http://particletree.com/features/php-quick-profiler/.You can also send your exceptions, variable dumps and custom messages sent to the console.

See a demo of PHP Quick Profiler at - http://particletree.com/examples/pqp/

Get more information and download PHP Quick Profiler at: http://particletree.com/features/php-quick-profiler/

Reblog this post [with Zemanta]

31 March 2009 View Comments

Scienta Zend Framework Debug Bar

Scienta Debug Bar

Scienta Debug Bar

Scienta ZF Debugbar is a useful tool to add to your sites running on Zend Framework to get server side information of the page being accessed. It’s quite simple to use – just download the code, place it in your PHP include path and use the following code in your bootstrap file to get the debug bar to appear at the end of your page:

$options = array(
   'database_adapter' =>  $dbAdapter, // or array of adapters
   'memory_usage' =>      TRUE, // default value shown
   'collect_view_vars' => TRUE,
   'sort_view_vars' =>    TRUE,
   'show_exceptions' =>   TRUE,
   'handle_errors' =>     FALSE
);
 
$scBar = new Scienta_Controller_Plugin_Debug($options);
$frontController = Zend_Controller_Front::getInstance();
$frontController->registerPlugin($scBar);

The debug bar also gives you quick access to:

  • the variables used in the page
  • errors generated in that page
  • Database queries and time taken (if you’re using the Zend DB libraries)
  • the time taken to execute the script and more.

Get more information on this at the project site: http://jokke.dk/software/scientadebugbar

Reblog this post [with Zemanta]

10 February 2009 View Comments

Generate data for Database testing

An Example form –  generatedata.com
(My)SQL geek
Image by lilit via Flickr

How often have you tested your application on your local machine and had it run properly, but when you deploy it and the database starts getting filled up, you start noticing performance problems?
Here’s something you can use to test out your application with databases which are not empty – generatedata.com allows you to define your table structure and the type of data to fill it with. You can export the generated data as SQL (MySQL and Oracle are supported currently)  insert statements or csv which you can import into your databases. The online version allows you to export 200 rows of generated data. If you want larger datasets to be generated, you can download the datagenerator script and run it on your own server.

The best part of the script is instead of generating totally random string or numeric data, you some some semi-realistic data which can be used for testing.

Here’s a sample form I created on the site (click on the image to enlarge):

An Example form -  generatedata.com

The SQL generated from this form:

CREATE TABLE myTable (
  id mediumint(8) unsigned NOT NULL auto_increment,
  id MEDIUMINT default NULL,
  name varchar(255) default NULL,
  city varchar(50) default NULL,
  country varchar(50) default NULL,
  dateofjoining varchar(50) default NULL,
  PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1;
 
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('1','Inez','Muncie','Grenada','2009-04-19 12:55:49');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('2','Reese','Washington','Suriname','2009-10-17 01:28:15');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('3','Hope','Edina','Guyana','2008-02-22 10:17:55');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('4','Cameron','Sister Bay','Malaysia','2008-02-21 01:38:18');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('5','Zephr','Lebanon','Syrian Arab Republic','2008-12-09 21:40:04');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('6','Byron','Indio','Afghanistan','2009-03-15 08:50:17');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('7','Carol','Bay St. Louis','British Indian Ocean Territory','2009-04-16 04:57:43');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('8','Latifah','Geneva','Albania','2009-08-25 00:14:26');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('9','Nina','Fall River','Solomon Islands','2009-01-03 21:45:51');
INSERT INTO myTable (id,name,city,country,dateofjoining) VALUES ('10','Jorden','Ardmore','Latvia','2009-01-20 19:31:36');

Get more information at: generatedata.com

generatedata.com

Reblog this post [with Zemanta]

Tags: ,