Combining ExpressionEngine Matrix Fields - plugins

Is there anyway to combine rows inside of two separate Matrix fields?
I have a gallery where I have pictures and videos. Right now I have two matrix fields, photo and video with a file cell type and a text cell type. My gallery displays photos first, than videos. Is there any way to combine these field types so the order of the photos and videos are combined?

Your best bet is to use a single Matrix field for both photo and video. You could label the columns as "Upload an image" for the first column, then "OR Paste-in a video link" for the second.
Commingling the two fields during the template rendering would require either doing bunch of PHP in your template, or doing some custom queries with the Query module.

Related

Query large list of metadate in weaviate

I have 100.000 images, each of them have 500 orb vectors, and each image has a unique tag.
My general issue is, when I insert a new image (i.e. 500 new vectors), how can I know if the image's tag is already in the database ?
What I do is to attache to each vector a metadata "tag". In can retrieve the inserted tags with
result = client.query.get('orb_vector', ['tag'])\
.with_limit(200)\
.do()
This provides more or less 200 tags among the 100.000 existing.
Accordingly to the documentation, that way of doing is not scalable.
How do I do ?
Context:
My database is not very dynamic; apart of the initial big insertion (100.000+ images), there will be few insertions each day. So I'm okay with a request taking 5 minutes and keeping the result in memory in a non-dynamic way. Plain python list is okay.
Clarification: each image has one tag, but 500 vectors. So each tag is present 500 times in the database.
I'm using python.
What I can do:
Writing the list of tags in a json/mongo/other and reading/updating it each time I insert new images.
I prefer to avoid this solution since the synchronization between the weaviate database and the json will just be a nightmare.
Have you considered creating a separate class for the tags and using query filters?
For example, define a schema for a class named Tag where:
it has a property called "name" to store the tag's name e.g. outdoors, indoors, etc
it has a property called "images" to store the cross references to the images that are tagged with "outdoors".
Then, when you want to insert an image with tag "car", for example, you do a WHERE filter on the Tag class where the name name is Equal to "car".
If the result is empty, then that tag does not exist.

Can I mark text in Word such that I can filter it?

so I'm writing a project in Word. Throughout the document I'll be referring to different topics e.g. finances, people etc.
Is there any way that I could mark the text such that when the project is complete I can view all the sections discussing finances or specific people? Sort of like using the filter function in excel.
Thanks
No. The nearest Word has for that are the Table of Contents, which links to individual headings, or an Index, which lists the page(s) on which a tagged entry appears. Unlike a Table of Contents, though, Index entries don't link to the tagged content.

Parsing json to Nattable

I have to parse a Json file and show it into a Nattable.
Using this tutorial i am able to parse json and display in Nattable.
But as shown in screenshot for cat column its showing list values as it is .
Is there a way from which i can show list values as Dropdown.
A dropdown in NatTable is intended for editing. I suppose you don't want to support editing but only showing values right? For that you can try to use the TableCellPainter for that column. That painter tries to render the data as subcells in case the data structure is an array or a Collection.

FileMaker Pro 13: Relationship between a text field and a container field

I'm new to Filemaker.
I want to create a database for my library.
Lets say we have a text field for the title of each book (book_title) and a container field for the cover photo (cover_photo).
I'd like to help me write a script that would allow me to copy the photo (that is, the content of "cover_photo") from one record to the other if the field "book_title" is identical within two records.
For example: lets say I have 5 copies of a book in my library. For the first copy I'll create a new record and I'll write the title in "book_title" field and I'll insert a photo in "cover_photo" field. But for the second/third/... copy I'd like to write only the title and, since it will match with the title of the first record, enter automatically the photo in the first "cover_photo" field without inserting it again.
I'd appreciate any help.
Thank you.
IMHO, it would be much better to use two tables, say Titles and Exemplars, with a one-to-many relationship between them. The cover photo would be stored in a field in Titles, and all the child exemplars could display it without you having to duplicate it.
This is assuming you have something unique to record about each exemplar - otherwise you could simply have a field for Quantity in the Titles table.

Fill-in-the-blank Story Generator

I'm interested in creating a fill-in-the-blank story generator for kids. I want to create a form where they can put in the names of characters and other things and have that data populate a pre made story. After they hit SUBMIT they would be taken to a follow up page with their input and the story in plain text. I'm pretty new to this but very eager to learn. What would be the best way to go about creating this form that generates stories?
It seems you would need two database tables - one for storing the original story templates and another one for storing the generated texts.
The challenging part with the template database is signifying the parts where there can be user input. One idea - place a special format code inside the text in the following manner:
Once upon a time, in a forest far away, lived ::00001::.
Assuming you are loading that template as it is in an element inside a form (I would avoid textfields for this purpose and just place the text).
After the text is loaded into the web page (javascript onload), replace your markers with input fields (I'd use jquery for that). You can use jquery to search an elements text/innerHtml and replace it with another html element. Here is an idea how to do that. The replacement of markers with inputs can be done in a javascript while loop, as long as there is "::" in the text of the element.
Then your ::00001:: could be replaced for example with:
< input type='text' id='input00001' name='input[00001]'/>
Then, when the user submits the form, you can get the values for each field and store them to a second database with the given ids. This way, you will be able to reload them later (same process, only instead of inputs, you would replace the codes with their corresponding values).
This way, in the second database table you only save the input values and not the whole text, to save up memory. Probably in the second table you would like to store the id of the field, the value, perhaps a template id (so that you know for which story template it corresponds) and a user id or at least a timestamp, in case you can have many generated stories for the same template.
Hope this helps!