Text Size
Sunday, May 20, 2012

Joomla Web Developer Blog and Joomla Web Designer Blog

Linux

Linux

Last Updated on Wednesday, 04 April 2012 06:10

save time to hardware clock hwclock linux centos

BY: Mike Zriel

To save current time to hardware clock ( hwclock ) in linux to the following:

First set the current time the format is : MMDDhhmmCCYY

  • MM: Month in 2 characters: 04
  • DD: Day in 2 characters: 23
  • hh: hours in 2 characters: 06
  • mm: month in 2 characters: 04 ( April )
  • CC: Century for 2012 it would be "20"
  • YY: Year for 2012 it would be "12"

the command is date (space) and the MMDDhhmmCCYY format.

Example: date 042306512012

Second save the current time to Centos Linux Server Hardware Clock ( hwclock )

hwclock --systohc

To check the hardware clock ( hwclock ) that you have actually saved the time do this:

hwclock --show

 
LAMP

LAMP

Last Updated on Tuesday, 03 April 2012 11:16

Sort array by value in a field

BY: Mike Zriel

Sort array by value in a field

/*
* Function to sort an array by value in a field
*
* @version	12.04.03 April 3, 2012
* @author	Mike Zriel
* 
* @params
* &$array	The array of fields to be sorted (passed by reference)
* $field	The name of the field to sort the array by
* $order	The order to sort the array in 
*/
function sortArrayByField( &$array, $field, $order = "ASC" ){
	/*
	* Build the comparison function depending on the
	* order specified. The function calls a strcmp
	* on two array element fields
	*/
	if ($order === "DESC")
		$comparison = "return -strcmp(\$a['{$field}'],\$b['{$field}']);";
	else
		$comparison = "return strcmp(\$a['{$field}'],\$b['{$field}']);";
	
	// Run the sort 
	usort($array, create_function('$a,$b', $comparison)); 
}
 
Linux

Linux

Last Updated on Monday, 02 April 2012 10:04

ZendServer 5.6.0 linux

BY: Mike Zriel

Zend Server CE Download for linux

Zend Server Community Edition (CE) is the free edition of Zend Server, our production-ready Web Application Server.

ZendServer-5.6.0-RepositoryInstaller-linux.tar.gz

This is a pain to find, here is a download link

 

Just Watch These Easy-To-Follow Video Tutorials And You Too Can Start Creating Beautiful Joomla Websites Under 7 Hours... Guaranteed!
Now Including Sample Joomla Site Built From Scratch. One Of The Most Informative Joomla Video Tutorials Out There Right Now.

How to create iPhone apps with no experience

Discover how to create iPhone apps easily with no programming experienced required. Learn from some of the top iPhone app developers to get your app created today.

Latest comments

  • Test message in BASE64
  • So this code we shud do what exactly? I mean first...
  • #3 is actually FALSE. Since the Nike Swoosh and Ad...
  • Thanks mate, this is what I was looking for
  • i need non mvc base pagionation for module is it p...
Copyright © 2012 by Mike Zriel - Zriel.com