Author Topic: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]  (Read 13425 times)

0 Members and 1 Guest are viewing this topic.

Offline allniche

  • Full Member
  • ***
  • Posts: 110
    • View Profile
$Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« on: October 22, 2011, 08:02:54 AM »
Sorry to trouble you both again.  No rush on this question as I see you are getting slammed with other questions but any input would help me immensely.

Quote
$Hin_hours[insert_hour!]   *Array of hourly raw IN [0-23]
$Hout_hours[insert_hour!]   *Array of hourly raw OUT [0-23]
$Hclick_hours[insert_hour!]   *Array of hourly raw CLICK [0-23]
$Huin_hours[insert_hour!]   *Array of hourly unique IN [0-23]
$Huout_hours[insert_hour!]   *Array of hourly unique OUT [0-23]
$Huclick_hours[insert_hour!]   *Array of hourly unique CLICK [0-23]

Are all of the above variables still fully operational and able to be relied upon?  I've been experimenting with them and putting in debugging watches to see the values assigned via P2, P3 variables in the stats layout and I have been noticing some strange values that I can't make sense of.

$Hclick_hours[0]

^ Is this:

1. The last 60 minutes from this exact moment (to the minute).
2. The last hour based on server time - i.e. "hour:xx"
3. The hour 0 based upon server time (i.e. the midnight hour - midnight to 1 am)
4. Last N hours, so $Hclick_hours[3] would be the last 3 or 4 hours?
5. The last clicks from 1-0 hours ago, so $Hclick_hours[3] would be the last 4-3 hours ago - as the progress documentation suggests?
6. ???

Just to show that I've been trying to figure this out my own I read the old progress documentation here thinking it could be similar in TP:

http://www.progress-tm.com/algorithm.html

And like I said I placed this code on a site and then watched it in the stats page after enabling $P2 and $P3 in layout display.

Code: [Select]
$P2=$Hclick_hours[0];
$P3=$Hclick_hours[1];

But the numbers I am seeing have me puzzled.  Even if modifiers are in place such as for the countries and the anti cheat it seems to make no sense.  Please clarify and confirm that the values in these arrays can be used and trusted?  It would be pretty nifty to have use of this data in a custom algorithm. :)

Thanks!  Also I hope you feel better ip0li....

Offline ip0li

  • mgSearkGD
  • Administrator
  • Hero Member
  • *****
  • Posts: 1963
    • View Profile
    • Pretty Girls from your city for night
Re: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« Reply #1 on: October 22, 2011, 08:04:35 AM »
waiting for KD on monday to answer this. cheers

Offline allniche

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Re: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« Reply #2 on: October 22, 2011, 01:42:08 PM »
waiting for KD on monday to answer this. cheers

Thank you.  :)

I've been experimenting more and I think it might be:

"2. The last hour based on server time - i.e. "hour:xx""

But with a catch.  The current hour doesn't seem to match the value given by the normal variables like $Hclick (or those shown in the stats display).  I think maybe "$Hclick_hours[current hour here]" goes by "hour:xx" but perhaps $Hclick goes by the last 60 minutes from the current minute thus the discrepancy?

But there seems to be another catch.  It doesn't look like "$Hclick_hours[current hour here]" gets updated with today's values until that hour is actually over.  Until then it uses yesterday's value.  So if I use $Hclick_hours[current hour here] it seems that I am actually getting yesterday's value.  Unless I am mistaken?

Please let me know if I have it right.  ;)'

edit:  And if I am right how do you recommend specifying the current hour or (current_hour - 1)?  It seems it will not let me use date() or several other functions. 
« Last Edit: October 22, 2011, 02:10:08 PM by allniche »

Offline allniche

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Re: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« Reply #3 on: November 22, 2011, 12:46:06 PM »
Hello not to be a PITA but I was just wondering if there is any info about this?  I have some things that I would like to experiment with where this could be useful.

Offline ip0li

  • mgSearkGD
  • Administrator
  • Hero Member
  • *****
  • Posts: 1963
    • View Profile
    • Pretty Girls from your city for night
Re: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« Reply #4 on: November 24, 2011, 03:43:16 AM »
looks like KD forgot about this will send him reminder!

Offline Kildoozer

  • Administrator
  • Sr. Member
  • *****
  • Posts: 420
    • View Profile
Re: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« Reply #5 on: November 30, 2011, 02:13:48 AM »
Sorry for delay.
The answer is
Quote
3. The hour 0 based upon server time (i.e. the midnight hour - midnight to 1 am)
, multiplied on traffic quality weight.

Offline allniche

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Re: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« Reply #6 on: November 30, 2011, 10:19:23 AM »
Sorry for delay.
The answer is
Quote
3. The hour 0 based upon server time (i.e. the midnight hour - midnight to 1 am)
, multiplied on traffic quality weight.

Thank you.  :)  I've been experimenting with this here: http://www.askdamagex.com/f2/why-shouldnt-trade-script-mainly-use-effect-50368/index2.html#post455190

Is there any way to get the current hour and use it within the algo ?  date() does not seem available nor the other things I could think of.  Sorry to bother you again but I thought you might know something I'm not considering.  Maybe there is some variable with the current hour in it which I can reference?

Offline allniche

  • Full Member
  • ***
  • Posts: 110
    • View Profile
Re: $Hclick_hours[insert_hour!] -*Array of hourly raw CLICK [0-23]
« Reply #7 on: December 02, 2011, 07:03:48 PM »

Is there any way to get the current hour and use it within the algo ?

Nevermind on this.  I figured out a way to get it after some thought.  :)