well, now i'm stucked on another one,this is kinda complicated for me =/ 3.1- Total transactions per hour
3.2- Total transactions per business hour
the date/time is the 4th field with this format : yyyy-mm-dd hh:mm:ss,MMM (M=miliseconds).
also the 'business hour' is between 09:00:00,000 ~ 18:00:00.000.
thanks in advance
EDIT³ :
already did it by myself...here the code if any1 else has the same question:
Last edited by EnioMarques; 09-19-2007 at 03:43 PM..
Reason: question added
Welcome to "The trouble with...." with your host, ZazzyBob.
Todays offering - "The trouble with letting other people host your website"
I use a certain web hosting service, who shall of course remain nameless here.
They are running PHP 4.3.10
I decide to write a script to test their PHP... (6 Replies)
Hi all,
having read lots of posts about SU I don't quiet understand this :
I'm doing regular backups of my database (u betta do) and therefore use su - username -c "sqlscript special data_base" in a unixscript which is even using cron. (yep!)
Now I need some other script, still with this... (4 Replies)
Hello guys.
Well, on this exercise i need the average "chargeAmount" per hour (for each hour).
with this code :
cat getusagesummarywrongmatch | grep -iv MOU2GRTObject | cut -d'|' -f4,14 | grep -i chargeamount | cut -d' ' -f2
http://img227.imageshack.us/img227/5889/65969235do0.jpg
i got... (2 Replies)
Hi, 'm trying to do an exercicise, and one part is:
ls -l $1 | awk '
BEGIN {
max = $5;
}
{
if ($5 > max){
max = $5;
}
}
END {
print "Tamanio mayor fichero = " max; }'
# Imprimimos ahora el menor tamaño de fichero
ls -l $1 | awk '... (4 Replies)
you are to write a program which will read in a tax rate (as a percentage) and the prices of 5 items. the program is to calculate the total price, before tax, of the items and then the tax payable on those items, and then the total amount due. the tax payable is computed by appliying the tax rate... (1 Reply)
hello everyone!:)
I have an exercise which I think is difficult for beginner like me. Here is the exercise
Create a shell script, which takes a directory as command line argument.
Script displays ten first lines from every text file in that directory. After
displaying the lines from the... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a shell script program that will input a name and a mark between 0 and 100. The program then displays the... (9 Replies)
Discussion started by: UniverseCloud
9 Replies
LEARN ABOUT PHP
collator_sort
COLLATOR_SORT(3) 1 COLLATOR_SORT(3)Collator::sort - Sort array using specified collator
Object oriented style
SYNOPSIS
public bool Collator::sort (array &$arr, [int $sort_flag])
DESCRIPTION
Procedural style
bool collator_sort (Collator $coll, array &$arr, [int $sort_flag])
This function sorts an array according to current locale rules.
Equivalent to standard PHP sort(3) .
PARAMETERS
o $coll
-Collator object.
o $arr
- Array of strings to sort.
o $sort_flag
- Optional sorting type, one of the following:
o Collator::SORT_REGULAR - compare items normally (don't change types)
o Collator::SORT_NUMERIC - compare items numerically
o Collator::SORT_STRING - compare items as strings
Default sorting type is Collator::SORT_REGULAR. It is also used if an invalid $sort_flag value has been specified.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
collator_sort(3) example
<?php
$coll = collator_create( 'en_US' );
$arr = array( 'at', 'as', 'as' );
var_export( $arr );
collator_sort( $coll, $arr );
var_export( $arr );
?>
The above example will output:
array (
0 => 'at',
1 => 'as',
2 => 'as',
)array (
0 => 'as',
1 => 'as',
2 => 'at',
)
SEE ALSO
Collator constants, collator_asort(3), collator_sort_with_sort_keys(3).
PHP Documentation Group COLLATOR_SORT(3)