This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php JHTML::_('behavior.modal'); ?> | |
<a href="index.php?option=com_users&view=registration&tmpl=component" class="modal" rel="{handler: 'ajax',size: {x: 600, y: 450}}">Register Now For Deal</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function is_subdir($parent,$sub){ | |
$parent=rtrim($parent,'/'); | |
$sub=rtrim($sub,'/'); | |
$parent=explode('/',$parent); | |
$sub=explode('/',$sub); | |
for($i=0;$i<count($parent);$i++){ | |
if($parent[$i]!=$sub[$i]){ | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /var/www/joomla -type f -exec chmod 0644 {} \; | |
find /var/www/joomla -type d -exec chmod 0755 {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install php5-curl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO mydb.test2 SELECT * FROM mydb.test | |
The above query will copy all data from test table to test2 table. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table mydb.test2 like mydb.test; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(typeof String.prototype.trim !== 'function') { | |
String.prototype.trim = function() { | |
return this.replace(/^\s+|\s+$/g, ''); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let say your username is adidac | |
$ sudo add user adidac www-data | |
$ sudo chown -R www-data:www-data /var/www/ | |
$ sudo chmod -R g+rw /var/www/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jimport( 'joomla.application.module.helper' ); | |
$module = JModuleHelper::getModule('mod_jogajog'); | |
$params = new JRegistry; | |
$params->loadString($module->params, 'JSON'); | |
echo '<pre>'; | |
print_r($params); | |
echo '</pre>'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jt.addMouseListener(new MouseAdapter() { | |
public void mouseReleased(MouseEvent e) { | |
int r = jt.rowAtPoint(e.getPoint()); | |
if (r >= 0 && r < jt.getRowCount()) { | |
jt.setRowSelectionInterval(r, r); | |
} else { | |
jt.clearSelection(); | |
} | |
int rowindex = jt.getSelectedRow(); |