Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am integrating health kit in one of my watch application. I wanted to fetch step count using HealthKit in realtime in a time interval. But after reading and understanding, I came to know that realtime is not possible.
My actual goal was to get step counts using health kit in a time period.
What you should do is use CMPedometer data for displaying real time step count and HealthKit to display a more accurate history of step counts. You could run a HKStatisticsQuery or HKStatisticsCollectionQuery to get the aggregated pedometer count (it contains both the steps counted on the user's iPhone and Watch) let's say every hour or maybe just once a day depending on how precise you want to be and only use CMPedometer data between HealthKit queries.
Using this approach, you will be able to show real time step count to your user, but you will also be able to show a more precise historical summary.
For more information and sample code, see the official documentation of HKStatisticsQuery.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
First of all, this may be a very immature question, but I need some solution!
I have an application in Swift language where multiple users can login and access the features.
There is a requirement to get a total number of users logged in at a particular instance. I know this could be achieved using Google Analytics. But is there any easy way do this?
Install Crashlytics in which you see the errors and also daily active users and many more things.
https://fabric.io/kits/ios/crashlytics/
Use google analytics framework.
https://developers.google.com/analytics/devguides/collection/ios/v3/
Either you can use an analytics solution as you mentioned or if you can configure your own service to collect ping information from your app.
The app (considering it works always online) can ping the service in intervals of every 5 - 10 mins. Any user that hasn't pinged in that duration can be considered offline or is not running the app.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have Users table in Firebase. However, users can change our scores, etc. How can i handle this situation ?
Thanks
In general I recommend storing the actual moves that a user has made in the game, in addition to the score they achieved. At the very least you can then replay those moves to see if the score is correct or manipulated. But you can also further analyze the moves to see if they were made by the player or seem synthesized.
You can use Firebase's security rules to validate the moves of certain games. But depending on the game this may be beyond what you're willing to write security rules for. In that case, you should write the (move and score) validation into a back-end process that runs in a trusted environment. This may be a an app server you control, but it also be as simple as a process you periodically run on your own machine.
Some links that cover the same/a similar topic:
Firebase complex validation
Firesafe: Add Complex Security Logic to Your Firebase App
can Firebase be used to backend Unity MMOs?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i am new to data mining,i just want to know which feature selection is easy and best for time series data.
as my project is share market prediction...these are the following parameters available and i have to select best 5 features for constructing my model.can anyone help me which one to use and how to do it..
Features available are
symbol,series,date,prev close,open price,high price,low price,last price,close price,average price,total traded quantity,turnover in lacs, deliverable qty,% deliv qty to to traded qty
you can see those features in this link
click on it to see the data in nse website to know how data represents
Here I will not do your home work to select the features(attributes) but I can help you so that you can also select features:-
You can use Minimum-redundancy-maximum-relevance.
Do by choosing that features which are less repeating and giving giving high co-relation with output.You must google for more information about mRMR algorithm.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have an app which allows users to redeem voucher codes, however I want to limit it so they can only claim one every 30 minutes.
So I somehow need to store the time they last redeemed a voucher, and if they try to redeem another, the app would check the last time and only give them a new voucher if the last one was over half an hour ago.
Would I store data in user prefs or is there a better way?
Storing a timestamp of when the last voucher was redeemed in NSUserDefaults is probably fine for a simple solution.
But how secure do you need this to be? As a general rule, and especially if this needs to be strictly enforced for financial reasons, never trust the client. Meaning that you should have a server to verify the codes, and enforce usage restrictions.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm looking for a way to pull some metrics from a replay, but after doing some research I think this might be more difficult than I originally thought. From what I've found, the SC2 Replay is mostly events (and some info about the replay and players), those events by themselves don't provide the information I was hoping to pull, because the replay and the game engine are highly tied together (of course).
So, I'm wondering if anyone has a solution on how to pull metrics from a replay? I was looking for these kinds of things:
Current Army Value
Current Floating Resources
Current Building Production
...
Basically every 30seconds or something.
Any ideas?
ggtracker uses sc2reader to get something close to the current army value -- it computes the "active army" size. active army is based on player selection actions. a unit joins the "active army" the first time it is selected, and leaves the "active army" after the last time it is selected.
you may also be interested in the stats contained within the s2gs file, which are displayed in the post-game stats display. for example it contains the army size graph and income graph data. s2gs files can be parsed by sc2reader. this teamliquid thread has more details about how you can obtain s2gs files: http://www.teamliquid.net/forum/viewmessage.php?topic_id=330926. basically, you can manually cause the s2gs files to appear on your computer by clicking in the SC2 client.