iOS / Xcode: saving datalist ipad [closed] - ios

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
im new to iOS/xcode app and have a question.
If i make a form with "name" "age" "date now" how/where is it saving the info and how do i make new items ?
Have tried to search google for "xcode saving item to list" but its not what im looking for.
Can someone help me with a link to a tutorial or the name function that i need to look at.
So i can read/learn about
- save function
- show the saved items in a list.
- get one or more saved items to another page/view in the app.

First you need to deal with getting notified when the text in each field changes. This is done by using the delegate methods of the text fields (<UITextFieldDelegate>). In particular, textFieldDidEndEditing: will allow you to grab the text when the edit is complete.
Once you have the text, you need to store it somewhere. This could be in a dictionary, or, if you want to display in a list, it could be in an array.
A dictionary is easier if each of the text fields means something different. Then the keys of the dictionary represent the meaning.
An array is easier if it's just a list of arbitrary text. The issue here is how to know that you haven't got duplicates. In this case it can be better to have a submit button which loops over all of the text fields in order and adds the text from each to the array.
Once you have the text in an array or dictionary you can save it to disk (writeToFile:atomically:) or use that as the source data for a table view.

Related

Scrape from website and save into different columns in a spreadsheet [closed]

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 11 months ago.
Improve this question
Suppose there's a website that has a list of details of some companies, for example, name, HQ area, turnover, etc. How do I scrape that data and fill it into different columns (like name, turnover) with each row having the details of a separate company?
Google Sheets allow you to import html tables or list with the IMPORTHTML(url, query, index) function.
For example, using the Wikipedia page List of largest companies by revenue as an example.
We want the data from the main table, so the first thing that we have to do, is to know what index it occupies in the page. To do this, we can use document.querySelectorAll('table') or $$('table'), as you can see from the result, the table that we want is in the position 5 of the array, so inside our google sheet we can use:
=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue","table",5)
From here, you should change the query parameter to list and find what index it occupies within the page using the method described above. In any case, you could always use IMPORTXML(url, xpath_query), and knowing the XPath of the information, you could come up with a similar solution.

VLOOKUP on continuous form [closed]

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 9 years ago.
Improve this question
On K250 cell I've this put a formula so that when user submit data via form formula will work.
=VLOOKUP(F250,Available!$C$1:$E$72,3,false))
But problem is when someone submit a form, row K250 is getting down as K251 & submitted form taking palce K250. I've found some other guys are talking about using Array. I've tried this one but didn't work.
=arrayformula(VLOOKUP(F250,Available!$C$1:$E$72,3,false))
Whats the solution?
If i understood your problem correctly then do this:
Instead of giving a fixed range , use name ranges to avoid this problem.
To access name ranges you can use F3 key while typing vlookup.
Following are some screenshots to help you out.
It should work even your cells shift towards down, if the shifting is happening towards right then you might want to select the entire sheet to avoid confusion.
Hope this helps to solve your problem.
When a form submission is made in Google Sheets, a new row is inserted in the sheet receiving the form submissions, and yes, this will "push down" any formulae that were previously in that row.
And yes, one solution is to use an array formula. Something like this could be entered in row 1:
=ArrayFormula(IF(ROW(F:F)=1;"Column Header";IFERROR(VLOOKUP(F:F;Available!$C$1:$E$72;3*SIGN(ROW(F:F));0)))
Multivalue Parallel Lookup Solution
Note: if this answer is in the right ballpark, I will try and edit your question and tags accordingly.

How can you map IDs even when duplicates are eliminated? [closed]

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 8 years ago.
Improve this question
I currently have a large set of objects in SAS (>100000) each with about 60 columns of data, including an ID number. There are many duplicate ID numbers in this set of data. My goal is to convert the ID numbers that I currently have into another form of ID number using a piece of software that I have. The problem is that when I input the ID numbers into the software, the converted output comes back without the duplicates, which I need. Is there any way to use the output ID numbers to somehow create a list of output IDs except with the duplicates that the original set of data had. Any language or piece of software would be fine.
Here is a illustration of what I described above.
Original IDs: 086516 677240 449370 677240 941053 449370
Output: 147244 147947 147957 148021
Preferred Output: 147244 147947 147957 147947 148021 147957
You can merge on the ID using a MERGE statement, and it will append the value to each of the records with the same ID value.
data want;
merge have(in=a) newIDs(in=b);
by id;
if a and b;
run;

iOS: Getting JSON cell value [closed]

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
So I am loading information via JSON to a table view in my iOS app. When you click on one of the table cells, I need to get the "id" of the story in the database, from the cell clicked.
I haven't tried anything yet, because I don't know where to start.
If you don't know where to start, start at the beginning. How 'bout a tutorial on using JSON in iOS? The Ray Wenderlich website has great tutorials. http://www.raywenderlich.com/5492/working-with-json-in-ios-5
OS 5 has some new built-in APIs to make it really easy to read and
write JSON.
If you don’t know what JSON is, it’s a simple human readable format
that is often used to send data over a network connection.
For example, if you have an array of three strings, the JSON
representation would simply be:
["test1", "test2", "test3"]
If you have a Pet object with member variables name, breed, and age,
the JSON representation would simply be:
{"name" : "Dusty", "breed": "Poodle", "age": 7}
It’s that simple, which is why it’s so easy and popular to use. For
the full spec, which can be read in just a couple minutes, check out
www.json.org.
You must be feeding the table with data from somewhere, so let's assume that that's an NSArray of Story objects.
When you select a row in a tableView, the didSelectRowAtIndexPath: delegate method will be called. The tableView supplies the indexPath of the selected row.
An NSIndexPath has two properties - section and row. The indexPath.row value of the selected cell will correspond to the index of the element of the NSArray from which the cell got the Story object. So if you want to retrieve the Story for the tapped row, you'd use [theArray objectAtIndex:indexPath.row]

Saving and displaying user answers from multiple choice form

I have a list field which contains questions in the first screen and I am passing the selected index of the list to the second screen I am parsing JSON according to the question id. I am parsing the answers for the questions. The question will be 2 types such as single answer and multiple answer. I am displaying an array of Radio button field for single answers and a array of Checkbox field for multiple answers.
If the user selects the answer, I need to store it temporarily and I should show him the answer which he selected when he selects the same question. I don't have idea in this. Can any one guide me in this? I need to do it using sqlite?
you can use Persistent object in BlackBerry. Here is a code sample demonstrates the example to use the persistent-object-in-blackberry

Resources