Xamarin Google Play Services - xamarin

I use google play services and try to make a daily Leaderboard. But, using the method "Submit score ()", the record is written to all tables (Daily, All_Time, Weekly). How can I record a user's score only in the Daily Leaderboard?

Daily leaderboards reset at midnight PST every day, and weekly leaderboards reset at Saturday midnight PST.
The scores that you post automatically will update Daily, Weekly and All Time leaderboards. During the first day of posting the first score that score in turn is the highest for all three boards. As time progresses the scores posted are bucketed based upon the reset times for each board.
https://developers.google.com/games/services/common/concepts/leaderboards

Related

Hot to force MS Outlook to show future hours in calendar?

When I open MS Outlook calendar view (Ctrl+2 hotkey) it shows me a time period starting from my first working hour. So, if I work from 8:00 till 17:00, and open a calendar at 16:00, I see my schedule from 8:00 till 14:00. As a consequence, I don't see a schedule from 14:00 and further, having to scroll calendar down.
Is there a way to show working hours starting from current moment, not the beginning of the work day? As alternative, by default show the period ending at last work hour?

How can I prevent a CA7 job with two schedule IDs from conflicting when they run on the same day?

I have a single job with two schedule ID’s. One runs the job the last day of the month and the other schid runs the last Sunday of the month. The problem I’m trying to correct arises when the last day of the month falls on a Sunday which causes a conflict between the two schedules.
My first thought was to split the two schids into two separate job names, while making one job a requirement for the other so they can’t run at the same time. The problem is this scenario would only apply on the rare days they both run and on all other days the requirement wouldn’t be met.
I’m not extremely familiar with ca7 so thought I’d look for some input. Can a schid be created with a conditional statement?
I think two schids will be needed. The options assume a calendar that specifies all days as processing days.
Option 1
Schid=1 schedules the job on the last Sunday of the month UNLESS that Sunday falls on the last day of the month.
Schid=2 schedules the job on the last day of the month.
ID=001 ROLL=N INDEX=+000
SCAL= DOTM=2000 LEADTM=0010 STARTM=1950
MONTHLY DAY=SUN WEEK=-00 MONTH=ALL
MONTHLY NRDAY=-00 MONTH=ALL
ID=002 ROLL=N INDEX=+000
SCAL= DOTM=2000 LEADTM=0010 STARTM=1950
MONTHLY RDAY=-00 MONTH=ALL
Option 2
Schid=1 runs the last day of the month unless that day falls on a Sunday.
Schid=2 runs on the last Sunday of the month.
ID=001 ROLL=D INDEX=+000
SCAL= DOTM=1300 LEADTM=0030 STARTM=1230
MONTHLY NDAY=SUN WEEK=-00 MONTH=ALL
MONTHLY RDAY=-00 MONTH=ALL
ID=002 ROLL=D INDEX=+000
SCAL= DOTM=1300 LEADTM=0030 STARTM=1230
MONTHLY DAY=SUN WEEK=-00 MONTH=ALL
Another approach is to define a separate calendar with precisely the days I want the job to run so the schedule definition is pretty simple.

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!

Query that discards duplicate keys with parse.com SDK?

I'm researching how to implement leaderboards for my game with the parse.com SDK, my plan is to submit a score for the user every time they finish a level, attached to a "parent" leaderboard. I need to submit all scores because I need to retrieve leaderboards within time ranges (eg "all time", "last week", "last month", etc). The problem is, there'll be multiple scores for each user on the same leaderboard, and I only need to highest one. Is there a way to drop duplicate keys from a query? Is this the correct strategy? Everything else (sorting, paging, etc) seems to be in place.
Thanks.
You just need a table with 'User_id', 'Score', 'Level', and 'Date' (or whatever you need). Each time that a player finishes a level, you put the score into the table.
Then you have to calculate each (all time, last week, etc) in the query.
E.g.
10 Highs of the day:
SELECT TOP 10 User_id, Score, Date FROM Scores
WHERE Date = getdate()
ORDER BY Score DESC
I don't know if I understood the question. Let me know if I didn't.
Hope it helps.
As far as I understand from your question you want to retrieve data from Parse class. At the same time you want to eliminate the duplicate entry because user has multiple scores in different days. So to get the highest one, you have to query the class via query (based on SDK Android,iOS) and order by descending(based on your criteria), then obtain the first item in the result.
Or you can get the user all scores and create a structure where you can store the user scores as array list day by day. Based on day you can get the latest max or min scores. I hope I understand your question.
Hope this helps.Regards

Design pattern: Generating daily and weekly tasks based on specifications

I am working on a project that has some inputs like task type and frequency.
For example
if task type = Daily and frequency =2 then create 5 task every alternate day.
if task type = Daily and frequency =3 then create 5 task on today and 3rd and sixth days.
If task type = Weekly and frequency =2 then create 2 tasks every alternate week.
More over I have a calendar table so I need to check working day, if that is a weekend, that task should be generated on next working day. I have calendar_Holidays table as well so check and skin that date as well.
Can I use design pattern for this problem? can somebody show me how?
You might be interested in a paper about recurring events in calendars by Martin Fowler. It describes few very interesting techniques and patterns to use while dealing with scheduling events.
You are trying to apply design patterns too early in your implementation. Design patterns help when you have identified important classes and want to adjust their relationships, for example to reduce coupling and enable extension.
Here you have not yet identified any classes, and I would say that you haven't even got your requirements completely clear. On which days will weekly tasks be generated? What will you do for alternate days when you have a long weekend - in UK we could have Friday as public holiday, Sat, Sun as weekend, and Monday as public holiday - what's your rule now. Can you have monthly events? what other intervals? Again in UK we pay council tax monthly, but not in February and March, do you have cases like that?
So I'd recommend firs getting very clear the corner cases of your requirements. Then produce a natural OO design, and then look to see what patterns may help.

Resources