Azuracast listener statistics shows decimals values, what does that mean? - radio

I want to see the amount of listeners of my radio station over the time. But the graphic shows values like "0.67 listeners" instead something like "12 listeners". I don't get how to read the y axis. Some clues?
thanks

The listener count shown in the statistics is the average listener count across the entire day, as a sum total of each measurement point (15 seconds or less apart from each other) added together and averaged.
(From a GitHub issue)

Related

AS3 - Massive Numbers/Integers, Beyond MAX_VALUE

Can anyone help me write a class, e.g. BigNumber.as (or BigInt.as) which will:
Allow for really really big numbers/integers.
Include a method to express a number in format "1.54 Million", "1.98 Vigintillion" and so on...
Allow the maximum number to stop only at the last number word (e.g. Million, Vigintillion, etc) in the defined list. (e.g. list built from here: https://en.wikipedia.org/wiki/Names_of_large_numbers under Standard dictionary numbers [Short scale])
I had an idea to have a class which contains 2 Number values ("value" and "timesMaxedOut"). When "value" >= Number.MAX_VALUE, it would then increment "timesMaxedOut" by 1 and reset "value" back to the difference that the value went over by.
The problem? It seems if you hit or surpass "MAX_VALUE" then the Number will reset to 0. I'm also sure it would then be difficult to properly multiply or divide numbers with this approach, as it would need to take into account "timesMaxedOut" just for the calculations to work correctly.
My goal is to write a game which would allow players to reach really big numbers, and play indefinitely essentially, but AS3 lacks very large number support it seems.

Getting correct sampling frequency, how to?

I am trying to fully understand the sampling frequency concept. I got a useful answer from PaxRomana99 (I need help setting up the correct frequency vector) and it seems like the way to get the correct frequency vector is when you set up the time interval to be related to fs:
t = 0:1/fs:10; % 10 seconds of data sampled at fs
y = sin(2*pi*100.*t);
However, in my case, I have no control on how my time interval is set up, I am given 2 arrays, one is the time interval and one is the sinusoidal wave resulting from that time interval. So should I got through the time array and extract fs? which should be the spacing between the time steps? am I in the wrong path here?
Thanks for any hints and any help!
Yes, as you suggest, you get the sampling frequency from the time array. It's just 1/(time sample interval).

Zabbix trigger expression - detect a drop and stay in problem state

I have this trigger that fires upon a match of the rule below:
{monitoring:test.item.change(0)}<-100
When my graph goes down by over 100 units, an event gets created. The event should switch to OK status when the graph goes back up. The graph has different average values at different times of day and besides, the item is a trapper value, which does not support flexible intervals. My problem is this; when the graph falls by over 100 units, let's say from 300 to 10, a PROBLEM situation is created. At the next interval, if the value is still low (e.g 13), Zabbix creates an OK event, because although the value is still low, the expression does not return true because the graph hasn't gone down by a further 100 units. Any ideas on how I could fix this? I have been trying to use
{{monitoring:test.item.avg(1800)}-{monitoring:test.item.last(0)}>100}
but Zabbix wouldn't take that expression. This is supposed to compare the last value of test.item to the average value of the past 30 minutes and raise an alert when the difference exceeds 100.
This, I believe, would sort out my problem situation of a false OK status when the graph remains at a low value.
EDIT: I think I have cracked it. Zabbix has accepted the below expression:
{monitoring:test.item.avg(1800)}-{monitoring:test.item.last(0)}>100
I think you'll soon realize that expression won't solve your targeted behavior and will keep on flapping between PROBLEM and OK.
You have just shifted the 'did a -100 change occurred' check between 'the last and previous last' values
to 'the last and the average of the last half an hour'.
Checking if either there was an abrupt change OR
if the value is still too low will probably better mimic your expected scenario,
{monitoring:test.item.last(0)}>100 | {monitoring:test.item.max(#2)}<20
max(#2)<20 checks if the maximum of the last 2 values is bellow 20.
EDIT: After reading your comment maybe this approach (after some tweaking for your expected values) will better serve you,
({monitoring:test.item.avg(1800)}<10 & {monitoring:test.item.avg(1800)}-{monitoring:test.item.last(0)}>20) | ({monitoring:test.item.avg(1800)}>100 & {monitoring:test.item.avg(1800)}-{monitoring:test.item.last(0)}>100)
This way, you'll better fit your trigger for the different volumes during the day.

Move along polyline based on time

I am busy with building a kind of 'track' player for GPS Tracks.
I have in my database all the positions of a certain track (latitude, longitude, altitude, time).
I am able to display the whole track on a map and move the marker along that track (see http://89.188.9.68/nl/gebruikers/track/trackid/101/#.T5AbauxNs1Y). At the left you have somewher 'starten!!!!'. If you hit that he will move along the track but based on distance.
My goal is that I could move based on time. Final goal is that I have 2 markers, 2 tracks and that I could play it and see the difference between the 2 markers. If i use distance it will be for both the same, but I would see where person 1 (track 1) was and where person 2 was at that moment.
Anyone any idea how i could make this work? Or any idea how this is possible? One of my ideas is that I ask for every movement the position of a certain person (asking it to the database), but isn't that too heavy?
Currently I use v3, but if you think v2 is better for this, i could always switch ;)
Thanks!
I can only think of setInterval actually counting time ticks, as shown here
http://jsfiddle.net/KSp4j/
You mentioned querying a database, yet in your example all the points are in the source. What I show needs the data already loaded in the HTML file. I use a format:
[
[time 1st pt. arrived, lat, lng]
[time 2nd pt. arrived, lat, lng]
[time 3rd pt. arrived, lat, lng]
...
]
and check the elapsed time with array's time.

Generate random variable in real-time without state

I want a function which takes, as input, the number of seconds elapsed since the last time it was called, and returns true or false for whether an event should have happened in that time period. I want it such that it will fire, on average, once per X time passed, say 5 seconds. I also am interested if it's possible to do without any state, which the answer from this question used.
I guess to be fully accurate it would have to return an integer for the number of events that should've happened, in the case of it being called once every 10*X times or something like that, so bonus points for that!
It sounds like you're describing a Poisson process, with the mean number of events in a given time interval is given by the Poisson distribution with parameter lambda=1/X.
The way to use the expression on the latter page is as follows, for a given value of lambda, and the parameter value of t:
Calculate a random number between zero and one; call this p
Calculate Pr(k=0) (ie, exp(-lambda*t) * (lambda*t)**0 / factorial(0))
If this number is bigger than p, then the number of simulated events is 0. END
Otherwise, calculate Pr(k=1) and add it to Pr(k=0).
If this number is bigger than p, then the answer is 1. END
...and so on.
Note that, yes, this can end up with more than one event in a time period, if t is large compared with 1/lambda (ie X). If t is always going to be small compared to 1/lambda, then you are very unlikely to get more than one event in the period, and so the algorithm is simplified considerably (if p < exp(-lambda*t), then 0, else 1).
Note 2: there is no guarantee that you will get at least one event per interval X. It's just that it'll average out to that.
(the above is rather off the top of my head; test your implementation carefully)
Asssume some event type happens on average once per 10 seconds, and you want to print a simulated list of timestamps on which the events happened.
A good method would be to generate a random integer in the range [0,9] each 1 second. If it is 0 - fire the event for this second. Of course you can control the resolution: You can generate a random integer in the range [0,99] each 0.1 second, and if it comes 0 - fire the event for this DeciSecond.
Assuming there is no dependency between events, there is no need to keep state.
To find out how many times the event happens in a given timeslice - just generate enough random integers - according to the required resolution.
Edit
You should use high resolution (at least 20 randoms per period of one event) for the simulation to be valid.