Does Google Play Service Leaderboard allow for negative numbers where negative is better? - google-play-services

The Google Play Services Leaderboard documentation here:
https://developers.google.com/games/services/common/concepts/leaderboards
does not provide an answer to if you can have negative numbers whereby:
-1.76% is a better score than -0.3% or 1.2%
Anyone know the answer?
For reference:
You can set numbers to be better when smaller:
I can add percentage sign
But i'm just not sure if negative is possible considering:
"A score of 314159, for example, would be displayed as 3.14159, 3141.59, or 314159, depending on the decimal place you specified."
Would i put in -176? for example?

The answer is yes.
I fired up Google play services and got a test leaderboard set up to try it out.
If you want -0.35 for example, you would ensure your leader board has 2 floating points
and you would pass it -35. This will create -0.35
If you wanted -3.45 you would pass it -335

Related

Google Map Directions API Optimize Waypoint and Force Waypoint Order

I am having difficulty in overcoming the situation I am facing. I have a route as follow:
StartPoint
WayPoint A-1 <--- Pickup
WayPoint A-2 <--- Dropoff
WayPoint B-1 <--- Pickup
WayPoint B-2 <--- Dropoff
WayPoint C-1 <--- Pickup
WayPoint C-2 <--- Dropoff
EndPoint
A bus is starting to drive from Start Point and it is supposed to pick 3 passengers up (A, B, C) and drop them off in different locations. The locations are not static and it changes based on passenger.
If I pass all these to google map directions api and set the OptimizeWaypoint option to true the issue that occurs is sometimes the dropoff waypoint occurs before pickup waypoint for a passenger due to route optimization.
Does anyone know a solution to force google map api route optimization to always have pickup before the dropoff for each passenger please?
I appreciate all your help in advance guys.
I have found a solution to my problem after 3 days of research. The solution is not through Google Map API and it's using a third party API called RouteXL. They are providing an API which does such this thing I am looking for. Here is the link to documentation although their documentation is not clearly documented but it has helped me to work it out.
https://www.routexl.nl/blog/api/?lang=en#post-tour
The function which I needed was the Tour Post and that does what I exactly needed.
If anyone needs any help on this I am happy to help.
I hope this helps everyone else.
Thank you all for the help.
The waypoint optimization feature in Google Maps is limited to basic travelling salesmen scenarios in which all the waypoints are re-ordered to find the optimal route. What you are looking to do falls under the category of Vehicle Routing problem, more precisely the Vehicle Routing Problem with pickup and delivery. Google doesn't provide a service for this. However, there are some open source algorithm available for this. Here are a few:
https://github.com/pgRouting/pgrouting/wiki/VRP%20Pickup%20Delivery%20Problem
https://github.com/graphhopper/jsprit
https://github.com/mck-/Open-VRP
Most of these use straight line distances to generate a distance matrix between your locations which are then used within the algorithm. For better accuracy you may want to use a distance matrix service that based on travel time. For even more accuracy you may want to take a look at the Bing Maps distance matrix service which also provides the option to generate a distance matrix over a period of time intervals for a day which would fluctuate based on predictive traffic conditions.

youtube API v3 - rate (like/dislike) comment/commentThread?

Quick question - as stated in the title. Is that possible? I thought the following endpoint would be my best shot: https://developers.google.com/youtube/v3/docs/comments/update, but can't find anything that resembles api call for rating a video, nor did I find any documentation on that for v3
If it is, please point me to the http endpoint.
Partially Yes, You can use that endpoint and specify a value for snippet.viewerRating but as of now it only allows you to specify two values like and none.
The rating the viewer has given to this comment. Note that this property does not currently identify dislike ratings, though this behavior is subject to change. In the meantime, the property value is like if the viewer has rated the comment positively. The value is none in all other cases, including the user having given the comment a negative rating or not having rated the comment.

Cache strategy for google places api nearby result.

Im trying to figure out how i would go about caching the result i get back from a nearby search. So i can get upto 60 places based upon my current long lat position.
So im thinking that if user1 ask google for nearby places within a radius of 1km from position long: xxx lat: xxx. And i get a result back with places. And then user2 is asking for nearby places 500m away from user1. Then i would like to be able to use the cached data that user1 already fetched from google.
Any suggestion on how i would go about implement this kind of functionality?
Or should i just cache each place by their long,lat and implement my own geosearch?
I'm not aware of any built in google maps library that allows you to do radius search without calling the server. Best bet would be to make your own geosearch on the fetched points or use an open source library to help you.
If you do use cached data but remember that there's no guarantee how much of the 60 places fetched in a 1km radius are also within the 500m radius. If you did another query for 60 places within a 500m radius you'd get more accurate information.
Disclaimer: Google has certain rules in place about caching data. 10.5 d) https://developers.google.com/maps/terms#section_10

LinkedIn r_basicprofile only returns current position, not past positions

While it would seem to be a bug, it's always been true that LinkedIn's r_basicprofile API permission only returns the user's current positions, while r_fullprofile returns current and past positions. But with today's announcement that r_fullprofile will require enrollment in LinkedIn's partnership integration program, this difference has a real consequence: Many LinkedIn-integrated sites will no longer be able to get past positions.
My question is to LinkedIn API folks: Is it deliberate that past positions are not returned for r_basicprofile requests? Hopefully not, and hopefully this could be fixed. Alternatively, three_past_positions could be enabled for r_basicprofile... That'd give us something to work with.
If everything is working as intended, and no changes will be forthcoming, how difficult will it be to join the partnership program? Do you foresee many companies and start-ups being able to join?
Thanks!
I think that #JoseR answer was extremely close... the part that was missed was that of within the 'field' description it states:
positions -> An object representing the member's current position
https://developer.linkedin.com/docs/fields/basic-profile
so, if the member has ten 'current' positions, it will return ten, but if they only have one, then just one is returned... so, to get the r_fullprofile is your next best option (with application of course)
As we can see in https://developer.linkedin.com/docs/fields/basic-profile is supposed that now in the basic profile we are going to get all the positions, at least it does not say anything about any restriction to the current ones.
But please I'm +1 in this question. It would be good to have some confirmation from the linkedIn staff that, when accessing the new API, we are going to get all the positions.
Thank you.

Calculate actual distance between two points using Google Directions API

In my iphone application i am creating a route between two points and using the google directions api to show the html instructions, step distance for each turn in text format.
When using the Directions API i had observed that when the user moves from location A to location D and there is a turn at location B, then the user is notified regarding the turn (i.e in the step of the json response from the direction api ) at point A' (consider A' between A and B). Now the distance of this step should be till location B, but i had found that it is till location B' (which appears after B), now again if i have a turn at location C
then the start location of step should start from location B, instead it starts from B'.
So my question is how would the user know the actual length of the step. Kindly help.
Thanks in advance
This doesn't really answer your question, but I thought I should mention it anyway.
Once iOS 6 rolls out in a few months, you won't be able to use Google's services to do this. Not for any technical reason, but in their TOS, they explicitly state that if you use their mapping services, they must be used in conjunction with their maps. Since Apple is using a different map provider come iOS 6, you would be in violation of their terms.
I had solved the issue related to calculate the actual length of the step.
Actually i was simulating the current location by taking fake locations and testing it.
In live mode (i.e while testing the application on the road) it works perfectly fine.