In this case if a list item is clicked, we get the index of the element in relation to it's parent container.
$("ul > li").click(function () {
var index = $(this).prevAll().length;
});
$("ul > li").click(function () {
var index = $(this).prevAll().length;
});
CREATE TABLE `NEW_TABLE` LIKE `OLD_TABLE`To duplicate an existing table and it's contents you can use:
CREATE TABLE `NEW_TABLE` SELECT * FROM `OLD_TABLE`
php –w input.php > output.php
function isAjax()
{
return (isset($_SERVER['HTTP_X_REQUESTED_WITH'])
&& ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')); }
This article shows how to find duplicated rows in a database table. This is a very common beginner question. The basic technique is straightforward. I’ll also show some variations, such as how to find “duplicates in two columns”http://www.xaprb.com/blog/2006/10/09/how-to-find-duplicate-rows-with-sql/
if ($result = mysql_query("SHOW COLUMNS FROM {$table} LIKE '{$column}'))
{
$enum = mysql_fetch_object($result);
preg_match_all("/'([\w ]*)'/", $enum->Type, $values);
}
find /path -size +10M -exec du -h {} \;