Why are Mapkit locations not plotted? - core-data

I have an app that fetches data from Parse.com and writes it to disk. I can see it being written in the xcode log. Into core data. Then it creates a query from CD and fills an array to display locations in a table view in one tab of a tabbarcontroller and another query to fetch those locations from cd and annotate (pins) on a mapkit.
For some reason the app doesnt plot any pins the first time i run it. I have to close it (background it) and then reopen it for the pins to show up.
If the data is being gotten from the web and into CD, which I can see happening (its only 2 points) and after all that data has been written to disk (CD), i proceed to tap the button that plots those points on a map kit...why would they not plot the first time?

I was getting the data from CD in the viewDidLoad method, which immediately populated my array of locations. When I tried plotting them, the array was empty because the view loads faster than the CD fetch populates the array :) I had to use NSNotification to repopulate the array.

Related

xPath Namemapping for several dropdowns

I have a button that is dynamic in several webscreens using TestComplete.
I have a buttonKeep object that is successfully implemented in the first screen it goes through the first screen and selects a Word and Excel document copies data up and then I paste it to the website
//div[(contains(#style,'display: block'))]//button[#id='Keep']
OR //div[not(contains(#style,"display:none'))]//button[contains(#class, 'fr-keep-word')]
OR //button[contains(#class, 'fr-keep-word')]
OR //div[2]/div/div/button[2]
OR //div[contains(#style,'display: block')]
Now I will select a screen that will move me on to a series of dropdowns where I will do the same thing in one of the drop downs. The system wants to add a different buttonKeep object everytime I run the test rather than recognized that the item had been mapped correctly earlier. Or even when I selected the first time I run the test.
Any suggestions would be very helpful.
I imagine this issue is due to a dynamic element in the page object. With the page objects being different, that cause the same object to be mapped again.
I would recommend investigating the page objects, and if they are the same page, but with a dynamic section, add wildcard values to account for the dynamic nodes.
To make mapping settings independent of dynamic changes in web page URLs, you can use the asterisk () wildcard in place of the values -- http://www.example.com/index.asp?act=12312&sid=, or in place of the entire query string -- http://www.example.com/index.asp.

Is it possible to add row data via a callback to tabulator

I need a table that shows about 2.5 million rows from an array that is already created in memory. When I create the table and add the array to the 'data' property, the browser engine runs out of memory after some (significant) time. I assume that tabulator not only creates objects for the current virtual DOM part, but for each entry in the array in advance.
So my question: is it possible to not provide the entire array, but only the the count of rows, and let tabulator ask for the content of each row via a callback only when needed for rendering. Of course it only makes sense if tabulator does not keep any data of rows that are gone out of view.
I know that this might be in conflict with some column calculation features or others, but this would be fine for my use case.
The same use case is working with canvas-datagrid, which I have tried before.
If you can use Ajax to get the data there is the Progressive Ajax Loading that will help you to load data using the pagination module to make a series of requests for part of the data set, one at a time, appending it to the table as the data arrives.
Doc is here: http://tabulator.info/docs/4.3/data#ajax-alter
Progressive loading is an option, but you still are going to run into the issue that you will have two copies of the data in memory. It will either happen automatically if in 'load' mode or manually in 'scroll' mode as you scroll through the table. The best option would seem to be to have code via say a button that loads the data using either setData() or replaceData(). Then the user could fetch either the next or previous set of data in batches.

ArangoDb Web Graph visualization - Select node attributes

I'm using ArangoDb Graph web interface.
I have created a graph with nodes from different collections.
As each node collection has its own attribute set, is there any way to choose different labels to be shown?
there currently is no way to select the label attribute per vertex collection.
You may want to open a feature request via github, or take a look at https://github.com/arangodb/arangodb/blob/devel/js/apps/system/_admin/aardvark/APP/frontend/js/views/graphViewer.js#L693 - However, the used Sigma.js library has to support it in first place.
I was having the same problem before. But, after setting the start node, the labels appear correctly.
Otherwise, the arrows, as you can see in the picture, do not appear. I set documents and edges. I tried changing colors, types, label, and nothing.
The worst problem is that I can save the properties one thousand times and, if I close the graph open it again, it loses the changes. I tried to find a Python code to set the label, but nothing till now.
Maybe the number of edges (1,435,022)?

UIA - AutomationElement doesn't return correct name when list view changes

I'm trying to read the contents of a "list view" using automation. The first time I navigate to it, I'm able to go from item to item, getting the correct text for each list item. However, when I display a different screen (which is apparently reusing this display object), the text on the screen is different, but automation gets the same text as the first set. From then on I can only get the text for the first view I looked at. It's like the text is being cached and I'm only able to look at the cached view. UISpy, however, seems to grab the right values every time, and if I use it while my automation is paused, I end up getting the right values.
In my automation, I use Find to grab the header, and walk the tree to the List View and get the text for each element. I thought if you used the Current property, you got the live data. Apparently I was mistaken. How do I either refresh the tree or get the REAL data?
Yes, the Current property on a certain AutomationElement will return its current, 'live', value. UIA will not cache anything automatically, you'll have to declare it yourself and explicitly access the Cached properties.
What's probably happening is that the new tree items you're seeing after selecting a different screen, are actually re-created (and that actually makes sense, UI-wise), not just updated. You could easily determine if this is the problem by selecting the first screen and writing down the tree items' RuntimeId property (you can see it in UI Spy). Then, select the second screen and check if the RuntimeId has changed. If it has, then it's just not the same object instance.
If this is the case, all you need to do is get the items again. It'll be easier to do this using AutomationElement.FindAll with a ClassName property condition.

When core data is changed, how to update the table view data?

Using NSXMLParser to get data from an xml file on internet with an update button to get update database and store it by using xcode template core data.
However, when I updated all core data, console can only show right data until I quited the app and run it again.
Any way to update all data correctly without quiting the app?
Thanks for that answer.
With using Xcode template (Navigation-based Application with core data), fetchedResultsController and managedObjectContext and so on are all included. Yet, every time I changed xml file and run parser to store data again, both my table view and nslog messege come up with a list of wrong data, eg, list of numbers only while my data contains lots of strings.
Display comes back to normal only I killed and rerun app again.
Any ideas?
Using CoreData the simplest thing to do is to use a NSFetchedResultsController. You can set your view controller to be the delegate for the NSFetchedResultsController, which will give you notifications when your data changes. You can then update your table appropriately.
This tutorial might help: http://www.raywenderlich.com/999/core-data-tutorial-how-to-use-nsfetchedresultscontrolleY

Resources