loading

jsf/primefaces load indicator during init of the bean

你说的曾经没有我的故事 提交于 2019-12-06 07:10:42
问题 In my JSF/Primefaces project, I have a lot of data loading in the init (postconstruct) method of my beans. That's why I would like to show an gif indicator during the bean load. I tried with primefaces and the Ajax status (programmatic version of the showcase) http://www.primefaces.org/showcase/ui/ajaxStatusScript.jsf So I added this to the template of my project <p:dialog modal="true" widgetVar="loadWidget" header="Status" draggable="false" closable="false"> <p:graphicImage value="../images

Images filled in the shapes are not loading with loadFromJSON in FabricJS

扶醉桌前 提交于 2019-12-06 06:12:32
I have JSON data with fabric Rect object. When I try to load this JSON data on to fabric canvas with LoadFromJSON , Shapes are loading perfectly but patterns filled in the shapes are not rendering. The patterns are rendered only after clicking on shape. I have copied my code in fabric Kitchen sink execute module and i tried to execute it. But it is also not working as expected. My Code: var jsonD = '{"objects":[{"type":"rect","originX":"center","originY":"center","left":222.92,"top":237,"width":100,"height":100,"fill":{"source":"http://www.convertingquarterly.com/Portals/1/images/industry-news

windows phone 7 - loading a big xml file

孤人 提交于 2019-12-06 06:02:51
问题 I am trying to load a xml file to my app and show it on a ListBox. The problem is that the xml file is about 5 MB, and it takes about 40 seconds on the phone to load. and when the phone locks the screen and returns back it takes another 40 seconds. I tried to use the isolatedstorage to store the data on it but it didn't improve performance. This is my code to load the data: XDocument loadedData = XDocument.Load("BigFile.xml"); var data = from query in loadedData.Descendants("w") orderby

Javascript + HTML - load image in the background (asynchronously?)

北城以北 提交于 2019-12-06 05:56:15
问题 I've found many topics describing javascript image loading but not exactly what I am searching for. I am currently loading images in html the normal way, like <img src="images/big-image.jpg"> This results in a webpage where you have empty spaces that are filled with the loading image from top to bottom. In addition I always have to watch the filesize of the image. What I want to achieve is that when the page loads, a downscaled version of every image (around 10kb) is shown. When the page is

Android googlemaps v2 finish loading event or callback

无人久伴 提交于 2019-12-06 05:08:54
I want to do something after the google maps has loaded(maptiles have been filled) is there anyway to achieve that? Alexander Pacha As noted by qubz , the ViewTreeObserver can be used to achieve a callback after the loading of the map has completed, so the user will get e.g. the correct location right after start-up: @Override public void onCreate(Bundle savedInstanceState) { // This is a small hack to enable a onMapLoadingCompleted-functionality to the user. final View mapView = getSupportFragmentManager().findFragmentById(R.id.google_map_fragment).getView(); if (mapView.getViewTreeObserver()

Failover loading of .js from sequence of servers?

别说谁变了你拦得住时间么 提交于 2019-12-06 04:10:14
问题 Let's imagine a web page page needing to load a javascript file (i.e. my.js ). Is it possible to organize the following fail-over loading sequence? If server A is up, load my.js from server A. Else, if server B is up, load my.js from server B. Else, if server C is up, load my.js from server C. ... If yes, how to proceed? Thanks. P.S.: I have just found yepnopejs. Does anyone recommend it? 回答1: I have seen this technique to allow a fallback if a CDN is down. If your js file has some testable

Fancybox: Show loading animation while loading iframe content

和自甴很熟 提交于 2019-12-06 01:57:09
问题 When using jQuery and fancybox for showing another page inside an iframe I want to show the loading animation while the page inside the iframe is loading. This is possible when using ajax to load content but I want the same thing when using iframe. Is it possible from the api to also get the loading animation while the content in the iframe is loading? This is the code for showing the iframe in the fancybox: var $fancybox = $("#openPopup").fancybox({ 'type': 'iframe', 'href': "Test.php" });

How can the delay before displaying meteor collections be best addressed?

笑着哭i 提交于 2019-12-06 01:26:59
Before displaying the items from a collection, meteor seems to do some processing that leaves the client window without updates. You can see this live if you surf to http://madewith.meteor.com on a reasonable machine. My 2.6GHz 4GB RAM laptop takes about 5 seconds to render the items in the list, during which there is no indication of progress and a new user in a hurry could reasonably believe the page has finished loading. Is there a way to incrementally display items from a collection, such that the server pushes to the client the first items of data on the wire, and the browser renders them

Is the class loaded when it's reference is declared?

拜拜、爱过 提交于 2019-12-06 00:53:01
Does creating a reference to an object of a class cause the class to be loaded ? Static variables are initialized when the class is loaded, so considering the following code the answer is no, am I right? class A{ static int f(){ System.out.println("initializing!"); return 0; } static final int i = f(); } public class Main { public static void main(String[] args) { A a; } } The code gives no output. Yes. Static initializers are called when a class method is called or an instance is instantiated. From your example you can do one of the following: 1. Create New Instance public static void main

Load .wav file for OpenAL in Cocoa

拜拜、爱过 提交于 2019-12-06 00:29:12
I need to load sound files to a Cocoa-based OpenAL app. Progress: The OpenAL utility function alutLoadWAVFile has been deprecated; the alut header is no longer included in Mac OS X SDKs. According to the TechNotes, the actual code is still there for binary compatibility. However, if I attempt to add a declaration for the function, the code will compile but the linker will abort, complaining that the symbol for alutLoadWAVFile could not be found. (I am linking to the OpenAL.framework). Yet, Apple OpenAL sample code still uses this symbol. When I Clean the sample code project, it compiles and