dynamic-content

Load dynamic content in Owl Carousel 2

拟墨画扇 提交于 2019-12-30 12:13:09
问题 I have a webpage with 2 carousels in which I have to show different items depending on user actions. The new data comes from the internet, I use fetch, parse the json into an array, all good. Only problem is I can't have the new items replace the old ones in the carousel. For a simple example I have tried var carousel = $jq("#owl-genres"); for(...) { carousel.owlCarousel() .trigger('add.owl.carousel', [$jq('<div class="item">' + genres[i] + '</div>')]) .trigger('refresh.owl.carousel'); } but

Create Multiple apps of the same project

自闭症网瘾萝莉.ら 提交于 2019-12-23 06:30:06
问题 I have been searching a lot for the best practice for my problem and didn't find anything useful so far. My problem is: I have platform that create E-commerce apps for the user and than we publish it for the users on the play store. NOTE: each app have different name and maybe different google account. Every time there's bug fix or new feature, we need to copy paste the same code in every project and then upload them again to the store. My question is: Is there's smarter way to deal with this

HTML, CSS sticky footer (growing content)

旧时模样 提交于 2019-12-21 05:36:22
问题 I'm trying to get a sticky footer at the bottom of a div that has dynamic height (growing content). The div needs to float in the middle of the page (same distance from left and right). I have the following HTML (stripped of irrelevant stuff): <html> <body> <div class="bodybackground"> <div class="container"><!-- floats in the middle --> <div class="mainContainer"><!-- different color etc --> <!-- content with dynamic height --> </div> <footer class="pagefooter"></footer> </div> </div> </body

WARNING: JSF1091: No mime type could be found for file dynamiccontent

不羁岁月 提交于 2019-12-21 01:05:31
问题 I get the following warning under eclipse : WARNING: JSF1091: No mime type could be found for file dynamiccontent. To resolve this, add a mime-type mapping to the applications web.xml This error is caused when I post a picture below primefaces composant : <p:graphicImage value="#{bean.image}"/> Java Bean : private StreamedContent image; // Getter public StreamedContent getImage() { try { JFreeChart jfreechart = ChartFactory.createPieChart3D("", createDataset(), true, true, false); PiePlot3D

Angular2 loading dynamic content/html in for loop

时间秒杀一切 提交于 2019-12-18 10:56:21
问题 I have a json array which can contain either the component or the html selector for the component i want to load. I am trying to load this data inside a for loop. When I try to interpolate the value {{d.html}} it appears as plan text. When I use the innerHTML approach below and inspect the dom I see the html there but it does not behave as a custom component (the dom will just contain instead of initializing it and replacing it with the components template. I have look at the dynamic content

imagettftext(): calculate font size to ensure text fits image width

扶醉桌前 提交于 2019-12-17 19:54:21
问题 I'm using imagettftext() to write dynamic text on an image and I want it to fit my image width. How can I calculate the font size by the text lenght? 回答1: You can calculate the bounding box of TTF text before outputting it with the imagettfbbox function. Unfortunately there is no direct way of scaling to fit a width, so you'll have to do it yourself. One way of doing it is to pass the text with a default font size of, say 20, to imagettfbbox and retrieve the width from it. You can then

Display database blob images in <p:graphicImage> inside <ui:repeat>

北城以北 提交于 2019-12-17 02:22:22
问题 I'm using PrimeFaces 3.2 on JBoss 7.1.1. I am trying to display an image which is stored in a BLOB in a MySQL database in <ui:repeat> . The image is stored in a byte[] and then converted to a StreamedContent as follows: InputStream stream = new ByteArrayInputStream(ingredient.getImage()); ingredient.setJsfImage(new DefaultStreamedContent(stream, "image/jpg")); Then I am trying to display it in a Facelet as follows: <ui:repeat var="ingredient" value="#{formBean.ingredientResultSet}"> <p:panel

Event handler not working on dynamic content [duplicate]

谁都会走 提交于 2019-12-16 18:15:22
问题 This question already has answers here : Event binding on dynamically created elements? (23 answers) Closed 5 years ago . I have a tag A in which when clicked on, it appends another tag B to perform an action B on click. So when I click on tag B, action B is performed. However, the .on method does not seems to be working on the dynamically created tag B. My html and jquery for tag A is as below: <a id="address" class="add_address btn btn-inverse btn-medium pull-right push-top">Add Shipping

Parsing web page containing dynamic javascript objects

霸气de小男生 提交于 2019-12-13 00:23:32
问题 Currently I'm using python and its urllib2, urllib to retrieve a simple static web page. Everything was smooth until web-page developers added java scripts. Now the most interesting information is hidden behind the scripts: <a href="javascript://" class="event-more-view" id="view-moreid-12311" onclick="Markets.applyView(this);return false;" treeid="1291266" eventstate ="false" > add table </a> Browser preloads data and shows it when the "a href" link is clicked. The results of my short

Search engine visibility and jquery load function

流过昼夜 提交于 2019-12-12 03:08:08
问题 Since the title can be a little bit cryptical, I'll go straightly to the point: I developed a web site which structurally provides a menu where, once you click, instead of redirecting you, the page contents are imported whithin a specific container (a div #container), using the function jquery $(#container).load(content_page.php). Thus, I have an index.php page with the structure of the whole web site and many other php pages with the contents that can be loaded whithin the index.php page