Trouble Configuring a .plist for an iPhone App - iphone

I am new to iphone development and I could use a little help in setting up my .plist file. I seem to be confused as to how to actually set it up. I have an app that will have a Frequently Asked Question (FAQ) page or view. As of right now, I am putting the questions in a property List file (.plist) configured like this: http://img16.yfrog.com/img16/6225/picture1zrf.png
I am not sure where to use a dictionary type or an array type. There are a lot of FAQs and would like to have them searched and indexed. As of now there are 8 groups of FAQs and each group of FAQs can have several sections and under each section, the actual questions and its answers are provided. Am I on the right track with this? Please help. Any help is welcomed.

It would seem you are on the right track. In general an array is a sequence of items (each value has a corresponding index used for lookup), where a dictionary is an associative container (each value has a corresponding key used for lookup).
The one thing I would change, however, is to make the keys for the faq dictionaries be a little simpler to index. You have the questions in the faq's dictionaries already so the key itself does not need to contain it. Instead it would appear the faq id would be a good value to use as a key.

Related

Swift - Problems following & unfollowing users when searched via UISearchController [Parse]

Good Afternoon,
Today I am having some issues with parse.
I have created a UISearchController, loaded my users from parse so I can search for individual ones and I have added a following and unfollowing feature.
My Problem is when I search for a specific user and try to follow him: So I search for a specific user say "test" it shows up as it should, but when I click follow and then go back to parse to see if "I" have followed test I can a different result.
It says I have followed for example "tester" which was the first user created. Its seeming to follow the Cell and now the userId...
After that I manged to get the users in alphabetical order, but same problem here except it follows the first user in alphabetical order for example if I have a username that begins with an "A"!
I'm not sure how to fix this issue, so I'm hoping someone here does..I accept and appreciate all kind of tips and answers!
You need to check if the UISearchController is active inside of didSelectRowAtIndexPath. Right now you are only selecting from the users array instead of from the searchResults array.
I also highly recommend refactoring your code away from using objectIds and use pointers. It is much easier to query against and work with pointers rather than directly accessing their objectIds.
Here's a link to another question that I've previously answered where I give a complete example of using a UISearchController to search by usernames in Parse.. Hope this helps!

Repeatable data content in umbraco

I am just wondering is there any plugin to create dynamic content for a page i.e something similar to a data repeaters in .net. To make it simple it should be a section that should contains 5 to 6 fields/property like
heading
heading 2
image
content - rich text editor
info
This must be in repeatable control so that the editor can add any number of these section a page and all these should be displayed in a single page.
Is there a plugin for the above functionality or what is the best way to achieve this.Any help would be greatly appreciated.
Thanks
Aneesh
You can achieve this without any plugins.
Create your repeatable section (containing the relevant fields) as a document type, and then use the multi-node picker in another document type to select one or many of the sections.
So for example, I could have a FAQs page (which uses a document type called "FAQs Page"), and I want to be able to add multiple question and answers to this page. I could set up a document type called "Question". This will contain two fields: Question and Answer.
On the "FAQs Page" document type, I would add a multi-node picker field called "Questions". This way, an author could select multiple "Question" nodes to appear on the FAQs page.
You would obviously need the code to output this, and also you would create a data type that inherited from multi-node picker, so that you could limit the selection to only Question nodes.
There is also the Repeatable Custom Content datatype which works well but does not support all data types. But it does support all the ones you need for your stated purpose (textstring, media picker, richtext area, etc).
You can find it here: http://our.umbraco.org/projects/backoffice-extensions/repeatable-custom-content I've used it a few times and it works really well in certain situations (e.g. where the items will not be shared across different pages of your site).
If you are sharing content components across multiple pages then #Digbyswift's solution is perfect.
I've always Digbyswifts method, but whilst looking for an alternate solution tonight I found this plugin, which is excellent for those situations where creating lots of widget nodes feels like overkill. It's licensed but the free older version is also available.
http://inaboxdesign.dk/blog/widget-builder-for-umbraco/

creating interface for adding n number of products to a category using umbraco

I know this question has been asked many times i went through all of them but couldn't find the right solution hence writing my problem here may be again...
I want to create CMS for category-Products solution..i think the name itself is quite explanatory..
Every category can have n number of products in to it.
but i couldnt get how can i do this via umbraco.
i know, i can access child not via inline razor macro but how to access child node contents ...or may be some other right way!!
Please dont give me links to Run away modules..i have already visited them ...and could understand very little...
Any suggestion will be helpful.
Create (if you haven't already) two different document types; one called Category, the other called Product. (You'll also want to add the appropriate properties.) In the Structure tab of Category, be sure to allow Product (and don't forget to allow Category under whatever type it will live). From here, you should be able to create Category nodes, and then beneath each of them, Product nodes.

Core Data Recipes Question

This is just a quick question I have about Apple's core data "Recipes" project, so I don't need elaborate answers. When you edit a recipe you can also edit the type. When the type cell is pressed it presents the user with a table view populated by multiple types. How exactly were those types created? I can't seem to find an explanation in the project code or in the .xcdatamodel (I've checked everywhere, and searched it) Also, why does "RecipeType" have to be it's own entity? Why can't it just be part of the "Recipe" entity? Does that have anything do with it?
In this case RecipeType doesn't necessarily have to be its own type, but it is common practice. Using an association like this has many benefits. Say if you wanted to add more metadata per type, you could add it to the RecipeType instead of duplicating a bunch of data throughout your recipes.
It appears that these recipe types are already inserted into the SQLite database Recipes.sqlite. It doesn't appear that they used any of the code in the project to populate this database. It was most likely done using Terminal or some other GUI SQLite editor.

Checking for empty radio buttons in Perl

I new to Perl and had a question. I have a simple page which allows users to respond to survey questions. There are various question and each has 4 choices. My question is that how do I verify that the user has answered all the question. The radio-group names are populate from the database using an incremental id which is what's confusing me. So say question's choices have the radio-group name "1" and another questions radio-group name is maybe "4". I'm not using the CGI.pm module. Any help will be appreciated. Thank you.
Add a hidden field with a list of question identifiers.
It is generally a bad idea to trust the client for a list of questions.
Just reuse the code you implemented to display the survey. You'll know how you generated the names of the form input fields. Then cycle through all these names and check whether you have a respective HTTP POST field.
For any further questions you need to supply more detailed information on what is your problem.