How to create objects inside of Firebase arrays from their UI? - google-cloud-firestore

I do not have an option to select an object type from the Firebase UI. Check screenshot:
While searching stackoverflow I found this question: How to create Firestore document with array of objects in Firebase console? but he actually has the object option? I do not, how do I enable it?

Use the "map" option. It will let you create an object with named fields nested under it. The question you've linked to is very old, and apparently the console UI has changed in this respect.
You can also do this in code by providing a Map (in Java) or an object (in JavaScript).

Related

mongodb compass follow object reference

My company gave me a MongoDB database to study. I open it in Compass and discover that it is generously supplied with parent and child ID links. I try right clicking on one of those objectIDs to dereference it – expecting a menu item to go and see the referenced object in its native collection. Most obvious thing in the world, right? No such luck. Double-click? No, that gets you an opportunity to EDIT the field. Is there some decent way to do the thing that I want to do?
If not, this is a GAPING hole in the user interface design and I wonder if there is another UI that fills it.

Retrieving all the possible options in a drop-down menu (when creating a work item) through the Azure DevOps API

I'm in the process of recreating the Work Item creation UI in my web app. The UI includes a lot of drop down menus. My choice right now is either to hardcode all of the options available, or retrieve them and dynamically populate. I would like to populate them dynamically, but that would require me to retrieve the possible options for each drop down menu. Is there a way to retrieve these through the API?
There's no direct rest api for this. If you want to retrieve the possible WorkItem types in current project, you should 1.first get the processID of current project and then 2.list the WorkItem types in specific process.
If you're using rest api like your tags above: You can consider using Processes-List to get the processID and List Work Items Types to get the available WorkItem types in one project. We can't do that directly in one api, no matter rest api or client api.
Just to follow up on this:
This document answers the question:
https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work%20item%20types%20field/list?view=azure-devops-rest-5.1
We can retrieve the allowed values for our field through the API query GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields?$expand={$expand}&api-version=5.1
My issue now is that the allowed values for one of my drop-down menu depends on the value of another. For instance, if I selected X in one of my drop down menus, the allowed values for my other drop down menu changes dynamically. I'm not sure how to handle this using the API.

Word API Custom Properties

I need some help on word add-ins
I will be programmatically creating a document and as part of that I need to add custom property (Pub_Doc_ID) to the document, as in the picture below.
I am using Word Java APIs now and could not find a way to do this job. The work flow I am targeting is very simple. Create a Document, get the Pub_Doc_Id from DB which is primary Key and assign to the document. Now primary key is attached to the document, so it will be lived with document.
Some more background :
As I mentioned earlier I am using Word APIs. I am adding text, sections, images etch. Now I need to have one connector (Pub_Doc_ID) between Doc and DB. So wanted to use custom properties. If there is any better way to do it. Then let me know.
I know how to do this in VSTO. I am looking for Word Java API.
This pub_doc_id ID then I will be using to call API's and to load task pane.
Thanks, really appreciate any help on this.
*Pub_Doc_Id : Publishing Document ID.
R/W access to custom properties is something my team is working on and would be delivered towards the end of the year.
Seems that for your scenarios you don't necessarily need to store that information as a custom property and you have a couple of alternatives in the meantime:
You can add your own customXmlPart to the doc to store this information. Here is a great example on how to use this: https://github.com/OfficeDev/Word-Add-in-Work-with-custom-XML-parts/tree/master/C%23/CustomXMLAppWeb/App
You could also store it a setting of your add in. Check out the settings object and how to store and retrieve settings: https://dev.office.com/reference/add-ins/shared/document.settings
Hope this helps!!
Thanks
You cannot presently access custom properties via the JavaScript API. They are currently working on it and have put information about proposed APIs on GitHub

Can I search multiple indices using the InstantSearch Library?

My search objects in Algolia contain a field called SOURCE where I store which of our content silos I'm getting the content from.
I've used the InstantSearch library to create a nice search interface that uses the refinementList widget to let the user filter by the source system. This works well enough.
Now I realize that I'd prefer to store each silo in a unique Algolia index, but I still want a single search UI.
I'm not seeing that the instantSearch library supports this. Can it? Can anyone point me to some sample code?
One way to let your users select the source would be to use a sortBySelector which lets you select different indices.
You can find more information about it in the InstantSearch documentation.

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.