How is Matomo counting visit_total_time? - matomo

I’am digging in the code to get how is piwik calculating the Time on Page.
I think it is not a simple visit_first_action_time minus visit_last_action_time.
I can’t find the proper code for that.
I searched for “ping” and the fieldnames but i do not find anything useful.
Where is the ping treated? The PingRequestProcessor is not very helpful.
Thanks for any hint in advance.

Related

Coinbase API - Conversion Endpoint /conversions

After plenty of late nights and head scratching I have navigated the murky world of the 'Coinbase Pro API' and integrated it with a new trading app I have made. I have hit a snag however and am baffled as to why. Had a snoop around all the usual 'Google' hotspots and I can find similar questions but no answers. I hope someone can help?!
Simply put I want to do a conversion, see the seemingly simple endpoint to do so:
https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postconversion
https://api.exchange.coinbase.com/conversions
Now; it's not an authentication issue etc. As mentioned, I have the API fully working in my app, accounts, orders, ticker etc, all no problem. Just conversions I have an issue with. I am posting the relevant variables as suggested:
Example:
{"to":"ETH","amount":"50.00","from":"BTC","profile_id":"my_profile_id"}
No matter what currencies I try, the response is always the same:
{"message":"Cannot convert BTC to ETH"}
With different coin ID's of course.
Full on drawing a blank here! Kind of a useless output from Coinbase?
I'd love to know if anyone has cracked this?
Thanks
Pete
Understood and thank you. After some back and forth with Coinbase support I found while conversion is possible in app, fee free, in API it’s an order with the relevant fees. A little frustrating but hopefully they will allow API conversion fee free soon 👍😊
"You can’t do a conversion unless their values are linked, such as USDC-USD. What you are looking to do is a market buy of some type, I would suggest a limit order as you can specify price options."
https://forums.coinbasecloud.dev/t/unable-to-successfully-convert-crypto-to-another-crypto/289
"You can’t do a conversion unless their values are linked, such as USDC-USD. How to determine if a conversion is linked, I'm not following this answer.
Is this what you mean?
{"to":"ETH-USD","amount":"50.00","from":"BTC-USD","profile_id":"my_profile_id"}

How to change the default return amount - MailChimp API Json

I am having trouble. Trouble which i am sure is but a moments thought to resolve for our resident experts but, i must learn...
I am returning lists and as I understand it the default return is 25. I have a total of 93.
Below is what i am using (minus our API Key)
http://us1.api.mailchimp.com/1.3/?method=lists&apikey=
I believe that i need a piece of code [limit]=100 as MailChimp suggests but there are numerous pieces of advice on the website and after trying all i am still without my desired output.
If you could advise the way to do this I would be very grateful.
Thanks
Will. :)
Limit should work:
http://us1.api.mailchimp.com/1.3/?method=lists&apikey=YOUR_KEY&limit=100
It was working perfectly fine for me. Check if you are in the right region (in my case I was in us13).

Rotate a node so it points to a specific position in SceneKit

I have a node and I want it's peak point to a specific position (coordinates). How can I do that? So far, I have tried noting because I have no clue how can I do that. Any suggestions?
What you want to SCNConstraint, and more specifically SCNLookAtConstraint.
There are a few similar questions on StackOverflow and examples in both SceneKit WWDC demos.
Next time you ask a question here, make sure you have a specific problem, and do as much research as you can. Show you did all of that, and you won't get downvoted!
If you encounters problems with the constraints, make sure to check if it has been asked here first. Good luck!

Permutation of given set of numbers

I have spent a considerable amount of time in trying to find an algorithms which solves this problem.Most of the sites display the use of a recursive function to solve this problem.I am still relatively new to programming and not really able to understand the logic involved in the problems.It would totally be nice if someone tool time to completely elaborate and explain it.
Thanks in advance.
Please read this post
Understanding Recursion to generate permutations
hopefully it will helpful ...

Does anyone here use the make-cdf & stats.pl program?

I came across this page: Plotting Tools
where I found a set of tools with the name stats.pl and make-cdf. I can write my own but don't want to spend too much time when someone else has already done that. Does anyone have these tools or at least point me to a similar set of tools somewhere?
I do not know who Dave, Binju, Vijay and Dan are and I did not see a way of figuring out what stats.pl and make-cdf contain.
There are a number of excellent statistics related modules on CPAN including Statistics::Descriptive, Statistics::KernelEstimation and Math::GSL::CDF to name but a few that might be relevant given the names of the scripts you mention.
However, if you want to do serious statistics, I would recommend you consider using R which you can control using Statistics::R. AFAIK, the R tag on StackOverflow is pretty active.

Resources