location issues for the custom roms like Miui,Oppo,Vivo etc - location

Guys i am facing an issue regading the location updates on Custom Roms like Miui,Oppo etc,
These Roms are taking too much time for location update and in background it do not trigger the listner, and in foreground it takes about 1-2 minutes to get fine location,
i want to minimize this time to 5-10 seconds, Please let me know what can be done.
By the way thanks in advance

Related

Program to identify if a file is not written

Firstly, I'm not a programmer so please excuse me if my question lacks technical accuracy.
Basically I have a situation where I have a camera recording a timelapse, taking a photograph at predetermined intervals (in this case 60 seconds) and then saving the image to a Dropbox folder.
I regularly monitor the Dropbox folder to ensure the images are being captured, but there have been situations where the camera has failed and I've not been aware for 24hours or so.
Ideally what I am looking for is a small program that can monitor the Dropbox folder and report back (perhaps by email) to say if an image capture has failed.
There are two parameters that I'd need to set; the interval (in this case every 60 seconds) and the period over which the camera is running (in this case 6am - 6pm).
I've managed to find several different programs that will monitor if a file is written to a folder, but not a program to determine if a file has NOT been written.
Just wanted to ask the community if this would be possible and whether anybody would be able to help?
Many thanks in advance for your advice.
Jamie
The only way to do this is to read the memory addresses and find if there is anything with the extension .temp. Other than that, you'd have to be on Linux.
Looping through memory, especially in this day and age with 32GB-64GB of RAM becoming commonplace, it is highly inefficient to do this.
Essentially, no, I don't believe there is any way to practically do this.

Is there a file updated always in the windows system, which update includes the time information?

I am programming a 30-Day-trial application, I need to make sure if the user changes the system time it will not harm my application and the 30-day-trial will still be calculated, or at least I will be able to figure he did something wrong.
The best way I found is to check for a system file which its contents updated and every update contains the time with its data, so I can find out if the user changes the date or not, by comparing the dates with each other ...
I know it is not certain way, but it is kind of make it harder and shrink the area of who can crack it.
I found about Event log
windows7 log files
it can help..
Any solution proposed can be hacked. But it sounds like you only want to ward off the casual pirate, not the determined hacker.
Instead of trusting the system clock, how about just making a network request back to your own website or time server to get the current date and time?
Another idea is to just limit the number of times the application can be launched instead of limiting it to a specific amount of time.

Why is codeigniter $this->load->view rendering so slow?

I have been using codeigniter for quite sometimes and i really love it. But for some reason i am not sure why but rendering a view in 1 of my application takes 18-23 whole seconds. Well i really wonder why as such time is to be taken for rendering the output.
I am sure about this as i measured the time from it reaching the Index Page till the data collection / preparation from the system. All took not less then a second. Just this rendering of the view page screwed up - taking 19 / 23 random seconds.
I really want to understand why as so and will like to get a proper through solution to work around on the same.
As for now i am caching the output and storing it and playing around with it but i too know it is not so full proof solution. There must be a way to analyze as where and why the rendering takes so much time on the server. If anyone knows anything about the same, please please do update / share on the same.
Have you tried using XDebug? There are a lot of online resources for how to use it in profiling your PHP apps, such as this one by Eric Hogue.
But if you included some sample code of what is happening in your controller and view then perhaps we could offer some specific guidance in this instance.
Removing a call to $this->carabiner->empty_cache(); speeds up our views quite a bit.

How to prevent time-based cheats on a time-based simulation game?

In the iphone game "Tiny Tower", I'm guessing it uses some kind of simulation based on the time spent between the last play and the current time, because you can set the current time forward and you will get the benefit from the fake elapsed time span.
Is there an algorithm that I can use to prevent this sort of thing? (Or at least make it difficult enough for the average user to pull off!)
Edit: thanks, I understand that, despite my wording, there's no way to prevent things you store on the client side, but I want to make it at least more difficult than "changing the time" to hack it!
The gamecube had a way to do this so it must be possible.
Is there an event triggered when the iphone time is set ? In that case you can react that.
Another solution is to require to be online when the game is launched, this way you can check time on a remote server.
You could has well check if you got an event on the phone login or wake up react to it, saving the time at that moment in your DB. You would have the last non modified time.
A last possible trick is to check for a file you know is going to be modified by an action prior to time change (such as login), and check the 'last modification' date.
You can investigate in the GPS direction as well. A GPS need to be synchronised with the satellite it contact, so it must keep track of time in some way, and maybe there is an API for that.
Unfortunatly you are on an iphone, which mean your possibilities are limited since applications got very few rights and are sandboxed.
EDIT:
Just though about it but, can you create event in the iphone calendar ? And check if it has been trigered ? Cause you could set a fake meeting or something for every day. Not clean, but creative.
EDIT 2: can you set a timer as a code for IOS to execute in 60 minutes ? If you can, set this timer, pass the time expected to be when this code run, then when the code run, compare and inform your program.
One way to prevent it is to monitor time passing by checking timestamps for their logins in a database. It doesn't matter if the client's iPhone's time is off; the database on your end will still know how long it's been since the last login.
I think if you have internet access you can take the time from a server.
A second solution : You can record the "datetime" and every time you see a "BIG" difference between the record datetime and the running datetime you know there might be a problem.
but this is not elegant, i know.
You can also record a small ammount of datetimes that the application started and check the diffrence with the running datetime.
Also you can use "Activity"->"Datetime" so the "Updates" (levels etc) can't be retaken.
Because the system Datetime can be changed by user, there is potential for "hack".
call a web service to get the time, rather than rely on the phone. There are several places you could get time from, google is your friend i'm sure, or create one yourself, and use the local time of the machine the service runs on for the time.
You could also use the Network Time Protocol (NTP) servers to get a consistent time

SSIS Pipeline performance counters

I am trying to log the performance counters for my SSIS Pipeline, for things like Buffer memory, Buffers in use, Buffers spooled, etc.
I created a new log and added all those counters to it. Things are beeing logged, at every 15 seconds to the file, but all it's beeing logged are values of 0 - no matter the time of execution or the element beeing counted.
Something is wrong, but I don't know what... and google-ing it, I could find just a couple of people having this problem also, but no actual solution to it.
Any ideea is apreciated.
Thanks!
Have you applied all the latest service packs?

Resources