how to get pebble watch time is 12h or 24h use api ? - pebble-watch

I just saw it in the example project. But I removed it. I can't find it or the example.
I just want get the api for check 24h or 12h in locate.

found it in pebble official doc page "wall time"
bool clock_is_24h_style(void);
https://developer.pebble.com/docs/c/Foundation/Wall_Time/

Related

Welcome/Greeting message delay in webchat MS botframework

I was recently investigating an issue related to a delay in rendering a welcome/greeting message for the first time when webchat is launched. The very first activities network request (before showing the welcome/greeting message) is usually 2-6s long(mostly it's either 2.5s or 5-6s). We are trying to implement this using BotFramework webchat version: 4.10.1 with react (minimizable version).
What I'm trying to accomplish is to load welcome/greeting message faster than the current time and upon checking the performance profile I found that activities network request(directline.botframework.com/v3/directline.../activites) is taking either ~2.5s or ~5.5s and after that, there is some more buffer time in between before the welcome message gets rendered.
I tried to record the performance profile of both cases(2.5s/5-6s)
2.5s
https://i.imgur.com/InEyHxl.gif
5s
https://i.imgur.com/yl3l6Z8.gif
Trying to find more information on how to improve/fix this behavior and gain more insights on this. I would be really glad if anyone can share your thoughts on this issue. Please let me know if I need to provide more information.
This is probably a bug that should be solved in a more recent version of webchat
bugreport in github

Yahoo finance api chart

The following URL has been used to get chart: https://chart.finance.yahoo.com/t?s=sld&width=250&height=180. Everything was fine. But now I get error: Could not process this "GET" request. What URL should be used now?
I don't know what has happened to yahoo, I get the same response.
After reading your question I decided to update my routines to read from https://www.google.com/finance/getprices?i=60&p=15d&f=d,o,h,l,c,v&df=cpct&q=$ticker instead.
If you do go down that path make sure to take note of the epoch and intervals as mentioned here

Empty Facebook Analytics

My team has recently migrated from Parse to Facebook Analytics. We know that Facebook events are removed after 30 days so we are planning on exporting them and then storing them in our own Parse Server.
We are having problems when we are trying to export the analytics from Facebook. The problem is that every time we get the export from Facebook the file is empty. There is definitely events being logged as our product is live and we can see events occurring in the Facebook dashboard.
The exports are going to be in a cron job that is run every 2 hours and retrieves the events for the last 2 hours.
Generate request:
GENERATE_URL="https://graph.facebook.com/v2.6/"$APP_ID"/analytics_app_events_exports"
curl -sS --request POST $GENERATE_URL -F access_token=$ACCESS_TOKEN -F start_ts=$START_TS -F end_ts=$END_TS
Query request:
QUERY_URL="https://graph.facebook.com/v2.6/"$ID"?access_token="$ACCESS_TOKEN
curl -sS $QUERY_URL
Query response:
{
"start_ts": "2016-05-25T02:30:21+0000",
"end_ts": "2016-05-25T04:30:21+0000",
"status": "COMPLETED"
...
}
Download request:
DOWNLOAD_URL="https://lookaside.fbsbx.com/analytics/app_events_export/download?access_token="$ACCESS_TOKEN"&id="$ID"&filename="$FILENAME
curl -sS $DOWNLOAD_URL
Reference to FB docs:
https://developers.facebook.com/docs/analytics/export
We would appreciate any suggestion on what is going wrong.
The export API won't return any data for the current day. For example, the data for Monday will not be available until 12:00am Tuesday (UTC-8).
You may want to try making $START_TS and $END_TS one day earlier. This way, your cron job will run every 2 hours and retrieve the events for 2 hours the previous day (e.g., get all events for Monday 2:00-4:00pm on Tuesday at 4:00pm.)
Turns out the issue wasn't coming from our code but it was Facebook. If using Facebook Analytics be aware that the export jobs tend to randomly start failing every few months. Best thing to do is to look through the list of Facebook bugs and see if you can see something relevant to your issue.

Laravel log not showing system time

I seem to have a strange problem that I cant find and answer to.
When I run into any error in Laravel and I look at the log file, the time stanp shown in the log file is different from my system time.
Can someone help me fix this?
How can I update Laravel to show correct time?
Look at your app/config/app.php
There should be a field called timezone in which you could specify app-wide timezone, including your logs to match your system timezone.

"Daily save quota exceeded" after a while using Google Play Android Developer API

After discovering that the Google team upgraded the Android Developer API, I made a script to automatically update all my apps data in multiple languages at once.
However, I've noticed that, when you follow a workflow of:
Ask for Edit ID,
Do all your changes
Commit all your changes
At some point, you get a SocketTimeoutException when you try to update changes. Well, this may be due to a problem in my connection.
So, to solve that, I changed my workflow:
Ask for Edit ID,
Do one change
Commit one change
Repeat from 1 until changes finished
However, following this process, it ends with this when I try to commit after some changes:
{
"code" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "Daily save quota exceeded.",
"reason" : "publishingDailySaveQuotaExceeded"
} ],
"message" : "Daily save quota exceeded."
}
Looks weird to me, as there is no explanation about save quotas for this API.
Also, after an intense use, the current quota limit keeps frozen at 0/200k, as if I didn't do anything. I didn't use the v1 of this API, so I don't know anything about this.
Do you know if that's the correct behavior?
Unfortunately it looks like their "recommendation" in their API's usage page is the rule.
Do not publish alpha or beta updates more frequently than once a day. (Production apps should be updated even less frequently than that.) Every update costs your users time and possibly money. If you update too frequently, users will start ignoring updates, or even uninstall the product.
Seems odd to me that they hard limit it like this though. It should be explicit at the very least.
Update
To follow up, I'm actually able to publish more than once a day as long as attempted uploads aren't rejected for some reason (such as 401 unauthorized). Haven't tested to see what the upper limit is, but it does make testing this a nuisance if it does heavily rate limit after one bad attempt.
The Google Play Developer API has a default limit of 200,000 queries per day.
For the purpose of enforcing this quota, the day ends at midnight Pacific time (UTC-8 when California is on standard time, UTC-7 when California is on daylight time).
https://developers.google.com/android-publisher/quotas

Resources