Non Repeatable Slices with Prismic Slice Machine - content-management-system

I have a slice named 'Header'. It contains a background image and a title. So, the user is able to add multiple Headers in a page. I want to prevent that. Please suggest possible ways.

Related

Crystal Reports issue with Dynamic images from a web service

I have a report with two dynamic images defined by database fields.
One is a location on our intranet :
ex: \<folder>\image.JPG
the second is being pulled from a web service :
https:////TraverseImage.ashx?parcel=312531800000010860&card=1
I followed this excellent walkthrough :
http://www.cogniza.com/wordpress/2010/03/15/crystal-reports-dynamic-images/
which suggests "set the formula’s text to the name of the formula or parameter field that will contain the image’s URL"
during design time both images display perfectly. When running the report or when changing parameters, the first one from the hard drive works perfectly, but the second one from the web service does not update. The only way to update it is to delete the image, and start over. I have put a hyperlink on the one from the webservice, and it correctly links to the image I want to display.
I am needing this to stay as a native .rpt and not embedded with VS.
I appreciate any suggestions, or comments.
Mark
Crystal dynamic image paths don't support https. Don't blame me; I'm just the messenger.
But you can solve this by using one of the 3rd-party UFLs listed here.
One of these UFLs allows you to use the graphic location expression for the image in Crystal to on-the-fly download an image from a given url, save it to a local file, and return the path to that file.
As added advantage, it can also resize the image to avoid a known memory consumption issue when Crystal is forced to resize images.
Is the path http or https?
If https you can use a UFL to solve this.

How to store custom emojis inside text in mongodb

In a web application, a first idea of storing a text message that contains a custom emoji is to save the link of the emoji within the text.
For example if the Messages collection has a content field, that field would contain the following when an emoji is saved within the text:
I am an example content with an emoji icon <img src='assets/emojis/custom-emoji.png'/>
I am not sure if this is the best way, and I would like to know what are the recommendations for this kind of situation.
I would recommend storing them in some symbolic way e.g. {emoji:smileyface}. This will allow you to update image paths without doing any data migration in the future. It will also allow you to do things like theming.
You can do the mapping in a variable on the client or server and at the point of retrieving data map symbol -> path.

Automation of clicks on webpage using Matlab

So I'm looking for a way to systematically access data from a website. This data is updated every 15 minutes or so, and is generated through a datamart system that makes custom reports following several input parameters: the desired date interval, the specific dataset.
All these parameters require me to click on some specific buttons; I was wondering if it would be possible to automate these click inputs using Matlab (or something else if need be), to retrieve the data and treat it automatically.
Thanks in advance!
I suggest you take a look at http://www.autohotkey.com/. This is a great tool which allows for the automatic clicking on any window (including a browser page) under Windows. It even will let you "search" your screen for pixel images and then click on those images. This would allow you to make a very small bmp file of the link you would like to click on, and then your script can search your page and click directly on the link.
As far as getting data into matlab I'm not exactly sure of the best way to do this, but you might consider saving the html of the page, and then parsing that from matlab.

How to avoid picture from being copied

I am onto a photo project. Dynamically added a watermark in the large picture preview. But someone with general idea can manipulate the link and get the original picture. Disabling Right button seems to be useless. In this case what can be the appropriate solution?
Disable any access to original pictures. Make server script that receives picture's ID (or name) and sets watermark before picture will be shown. And make your application such way that this script only can access images by users. If manipulation with link allows users to have unauthorized access, then it looks like you have problems with architecture of project.

QGIS - Composer

My question concerns the general purpose of the composer in qgis. My first idea was that with the composer you can "save" different layer combinations with different style to gain the possibility the have different "views" on the same data. However I realized when I change the map in QGIS, the information in the composer is also refreshed. To clarify my intent I want to give a small example:
Assume you have the gas stations of different companies for a country and you want to produce a map with all companies and maps containing only the gas stations of a certain company. So in the beginning I though I just create different composers to gain different maps but I somehow fail.
If I understand your question, you can use the composer as you wish.
When you have finished a composer, click on the map and, in the object properties, just check "lock layers for this map."
It should no longer be updated, even if you hide or display layers.
Regards.
Vincent
For large projects with a large number of composers, it's better to use layer presets and the "Follow visibility preset" option within the composer.
This is because when using "lock layers" and "lock layer styles", it saves all of the layers and their styles and properties. When it does this for each composer, it can quickly balloon the size of the QGIS file. This can make it take an extremely long time to open a project, cause a lot of performance issues, and inevitably will corrupt your QGIS file. Following a visibility preset simply references the style for the layer rather than duplicates it.
E.g. I had an employee whose QGIS file got corrupted and I had him send it and the backup files to me. On review, the primary QGIS file was empty, and the backup file was an exceptional 65mb. The markup behind the QGIS file was nearly a million lines long. It was corrupted because it got cut off, so I'm not even sure how long it might have been in it's entirety. This was a result of him having about 30 layers and over 100 composers that each had the layers locked. It also explained why he was the only one who was constantly complaining about his laptop being too slow for the work :)
in answer to your statement “My question concerns the general purpose of the composer in qgis”
For me and as In understand the purpose of the print composer in qgis is more to provide an output for GIS project in a cartographic format .and it is very Cleary detailed in the qgis documentation “The Print Composer provides growing layout and printing capabilities. It allows you to add elements such as the QGIS map canvas, text labels, images, legends, scale bars, basic shapes, arrows, attribute tables and HTML frames “(see the link bellow)
If you need more information about how to use it please visit this link
https://docs.qgis.org/2.2/en/docs/user_manual/print_composer/print_composer.html?highlight=qgis%20composer
Best Regard,