Cfimage and dynamically naming the "name" portion of the cfimage tag - coldfusion

I have a page that displays a series of available items for the public to purchase. Each of these items displays the image for the related product. My cfimage code is made to scale-to-fit the stored image.
Normally the displayed results will all show different products and their corresponding images. However, when I use the code all of my products show the same image, instead of showing the images that are linked to each product via a file path stored in the database. Is there a way to set the "name="myImage" dynamically so that each image will display and scale properly?

Related

Is there a way to display an imagery timeline in an rmarkdown leaflet html widgit?

I have an R markdown html document with a leaflet map. The base layer for the leaflet map is ESRI.WorldImagery. This base layer doesn't indicate anywhere the date upon which the imagery (e.g. aerial photograph or satellite) was acquired. It's possible that different imagery tiles represent different snap shots in time.
I would like to at least be able to tell my users the date or year in which the imagery they are viewing was acquired. Better yet would be to show an interactive timeline slider, analogous to the historical imagery timeline slider in google earth.
Does anyone know if this is possible in R leaflet?

setAutoScroll with QTreeView and custom model does not work

I have made a QTreeView to display a very large and continuous data set. Since the data set is continuous, I delete initial rows when the total number of rows is greater than a specified amount.
I have used a custom model for this purpose
The whole system is working correctly and displaying data.
But I want it to autoscroll to the bottom to display latest data. If i use scrollToBottom at row addition it completely slows down the entire view-model. But If i use m_pTreeView->setAutoScroll at the start, it has not effect.
Moreover if i click on the view, it completely slows down.
I am using Qt 4.7.1
How should I auto scroll to the bottom without compromising on performance?
And show I remove the lag/drastic performance hit when I click on the view?
the whole code is available at this repo:
https://github.com/daniyalyasin93/qt_qtreeview_hugedata/

How can you display rows in 'dynamic' sizes using tableview of Corona SDK

I am using tableview to display a list of items
e.g.
list =
[
{name='bob',
description='really long description that can be multiple rows',
image='an image from my server',
},
...
]
the above is just an example. I got my data from my server, including images of variable sizes. My question is how do I display the correct row size(height) once I got image from the server. I understand that I can wait until all data and image has been downloaded from server. Then precompute the height. But I want to be able to display the text first (as texts are more likely to be firstly downloaded), then once there is an image in it, I download it again. After the image is downloaded, I want to resize the row height. How can I do that?
Create a multi-line display.newText() of the width you expect to put in the table view. When the object is created, grab it's height and then remove the object. Use that height + some padding for the row height. There may be performance issues with this, so as an alternate, keep the text object and pass it in as a parameter when you create the row.

Django custom image field that can have crop information

I am trying to find a way to create a custom image field that can take extra crop information.
A custom image field that creates two db columns one for image path the other is for image's crop information (it will be dynamic top, left, width, height informations that user can set via a js component ).
Can a model field be customized to create and validate two db columns? Or is this a wrong way to go?
Django model fields can only map to one database column, so until they provide an easy solution it's not possible.
You can take a look at this workaround.
Anyway what you can do is override the model save method and use PIL for example to crop the image and set it equal to the cropped image field.
To override an model field, it's pretty simple and easy and you can pass extra parameter. Check the documentation everything is well explained.

Facebook Open graph image does not scale correctly

I have added an open graph image to my site but in the news feed it is not scaled correctly. The image is clipped both at the top and at the bottom. The image itself is a png with the size of 1500x1500px.
Looking at my profile page where the image is placed to the left of the text it scales correctly.
I have specified the following meta tags: og:title, og:type, og:image, og:url, and og:description.
I use the ShareThis API for the actual share button (if that can have anything to do with this).
Has anyone had this problem as well?