UISearchController filter using two strings [closed] - ios

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I have been following the tutorial for creating a UISearchController using https://www.raywenderlich.com/113772/uisearchcontroller-tutorial
Everything is set up and working perfectly. I have two categories in my dataArray: Borough and Neighborhood. I set up my searchBar to only look into the values for Neighborhood. I created buttons for the different boroughs and what i'm hoping to achieve is when the button is pressed it will show all the possible values for that borough, but I can't seem to find anything to do this

I believe what you are saying is that you want to search for a text value entered via the search bar in the Neighbourhood values and to specifically look for the Neighbourhood in a given Borough. Correct?
If that is the case, all you'd have to do is modify your search condition. If your search condition is currently something like (to borrow from the rw.com tutorial):
return row.neighbourhood.lowercaseString.containsString(searchText.lowercaseString)
Then you'd have to modify the condition to include a check for the Borough name too - and here, we'll assume the borough variable contains the Borough name that you selected via button press:
return row.neighbourhood.lowercaseString.containsString(searchText.lowercaseString) && row.borough == borough
That should return only array values which have the specified Neighbourhood name and are in the given Borough. If that is not what you wanted, then you might want to provide a bit more detail such as the structure of the data array, how the Neighbourhoods and Boroughs are linked, and perhaps even a screenshot of the UI so that we can see how you select a Borough in the UI.

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.

Exclude unmatched postal codes in Tableau [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have two tables First is called "All postal codes" and 2nd is called the "Office_Location_Postal_Codes". How do I use these tables to get Postal Codes from First Table which are not in 2nd table?
I tried to leave join, but I think it won't get the correct result. What should I do to get the unmatched postal codes from "All postal codes" Table.
Note : My first table is in SQL server and 2nd one is in Excel File
I have resolved the issue by taking Right join with office postalcodes and filter out offices = Null
Step 1 Right Join
You can also use left join depending on the Master Table. My Master table is in right thats why i take right join
Step 2 Filter Where Office = Null
Put office field (or the field where postal code is located) on filter shelf and select 'NULL' only

iOS / Xcode: saving datalist ipad [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
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.

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.

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