Heroku Dyno Free Hours Reset Monthly? - heroku

I have still 981hours for today's month what if I will not consume this hours. In the following month does this 981 hours will reset to 1000 hours ?
Thank you in advance.

Yes. If you don't use some hours at the end of the month, your quota goes back to the base value.
You cannot keep unused dyno hours month over month.

Related

How to get last day of current month via Ni-Fi expression language?

As far as I understood there's only now() function available in ni-fi expression language to get time. I can easily get 1st day of each month since it is a constant, but how can I get last day of a current month since it varies from month to month?
Thank you beforehand!
${now():format("yyyy-MM-32"):toDate("yyyy-MM-dd"):format("yyyy-MM"):toDate("yyyy-MM"):minus(86400000)}
//^now ^next month ^to date ^1st of next month ^minus 1 day
nifi should provide a function for that...

Time quanta for Mixpanel custom alerts

When creating custom alerts, how is the time quanta used for the alerts determined? e.g. events per minute vs per hour vs per 24hrs etc..
Could not find anything that addresses this in the Mixpanel docs.
Arthur here from Mixpanel. I've spoken with our product team to clarify our docs, and we'll be making updates to them soon.
To answer your question - the time quanta for our Insights report, 'Line' graph setting, depends on the time unit you've selected in the saved Insights report as indicated by the blue annotation box in this screenshot, i.e.
Minute
Hour
Day
Week
Month
Quarter
Once selected, you will then have the option to be alerted based on a 'relative' or 'absolute' threshold option, and we will alert you at most once an hour, day or week.
'Absolute' - if and when the past minute, hour, day, week, month or quarter exceeds the value you've specified, we will alert you.
'Relative' - if and when the past minute, hour, day, week, month or quarter is higher or lower than that of the previous time-period, we will alert you.
Let me know if you have any follow-up questions!

dhtmlx scheduler custom timeline

Currently i'm working on a project where i need to use dhtmlxSchedular whats new to me.
i'm struggling to change the timeline header view. For example this timeline: http://docs.dhtmlx.com/scheduler/samples/06_timeline/08_time_scale.html
Here you can see a timeline with a second time scale for one day
timescale 1: minutes
timescale 2: hours
What i want is a view for a week and one day has 10 hours. For example
Monday 12 dec till Sunday 18 dec
Where every day has 10 cells from 00:00 till 10:00.
So shortly saying, one day consists of 10 hours to be planned.
Is this possible with scheduler timeline.
Yes, it is possible. To hide hours in the scale you need to use scheduler.ignore_timeline property.
More info how to change the default time interval
Demo with Timeline scale you want to implement

Get timestamp for the next hour

How can I get the timestamp of the next hour?
Example: Something expires in 1 hours, so it would be time.Now() plus one hour
How can I do this?
Thanks!
time.Now().Add(time.Hour)
playground

Calulate duration in seconds from current time to coming monday 8:29 am in Ruby to Set Expiration Time for a Redis key

I am setting a redis key with a value which would be there not more than a week. And expiration time set to key will automatically expire the key in first monday morning 8:29 am.
For above result, I have to calculate the expiration time in seconds for current time to coming monday 8:29 +0545.
Ex. if today is Feb 24, Fri 10:00 am then it should calculate time difference from today to coming Monday 8:29 am.
I have done some coding and conditions are ready. The time difference only occurs on time objects. Shall I make the coming Monday 8:29 am a Time object with no date on it and make the operation with current Time object?
Any kind of suggestions and help would be appreciated. Thanks in advance. I have also tried to use time_diff gem but it gives difference on time objects only.
http://api.rubyonrails.org/classes/Time.html#method-i-next_week
To get 8:29 AM of next Monday you could do:
monday = Time.now.next_week + 8.hours + 29.minutes
monday.to_i - Time.now.to_i would then give you the number of seconds from now until that time.

Resources