loading

Dynamic loading of images in WPF

I have a strange issue with WPF, I was loading images from the disk at runtime and adding them to a StackView container. However, the images were not displayed. After some debugging I found the trick, but it really doesn't make any sense. I've made a small demo app to identify the problem: Create a new WPF project, and paste code as ...

open resource with relative path in java

In my java app I need to get some files and dirs. This is the program structure `./main.java ./package1/guiclass.java ./package1/resources/resourcesloader.java ./package1/resources/repository/modules/ -> this is the dir I need to get ./package1/resources/repository/SSL-Key/cert.jks -> this is the file I need to get` gui class lo...

Flash, accessing totalBytes before actually loading the file

Im looking for a simple way to find the file sizes of the files i planning on loading without loading them yet. I'm basically making a batch of files that needs to be loaded and it would be very useful if I could determine on beforehand how big the total load is going to be. the Loader object in flash has a totalBytes property, but that...

How do I properly load a BufferedImage in java?

Okay, so I've been trying to load a BufferedImage using this code: URL url = this.getClass().getResource("test.png"); BufferedImage img = (BufferedImage) Toolkit.getDefaultToolkit().getImage(url); This gives me a type cast error when I run it though, so how do I properly load a BufferedImage? ...

Lazy Loading on a Collection of Objects

i have a sql query that can bring back a large number of rows via a DataReader. Just now I query the DB transform the result set into a List(of ) and data bind the Grid to the List. This can result occasionally in a timeout due to the size of Dataset. I currently have a three teir setup where by the UI is acting on the List of object...

Nested selection loading time in mysql

I have one table packets packets contains 2 fields id and total they are both bigint length 20 and primary keys only id is auto increment in every record total = id i got 10000 records let's say id = 1 - 10000 and total = 1 - 10000 i got 2 almost identical queries 1 results in a very very long loading time and one completes almost...

c# closing progam from Main contructor

after alot of head scathing i think I have made some progress. I am not 100% sure but Can you exit an application before the constructor is finsihed and the main form loaded? constuctor { thread t = new thread(open loading screen); } I do the exact same thing with a exit screen using a variable between the main for and another one. and...

Regarding HotSpot optimization in Java

I've done some HotSpot optimization in Java. However, I'm now concerned about space in relation to loading classes (ie. only need one method in a class, don't want to load others). How would I go about doing so? ...

Dynamic Loading of Python Modules

I'm trying to dynamically load modules I've created. Right now this works properly: import structures.index But if I try the same thing by importing it dynamically, it fails. struct = __import__("structures.index") Error supplied is: Error ('No module named structures.index',) Any ideas why? Edit: When using full scope (it s...

[Flash] Loading image in several passes

I know it is possible. I have seen it a couple of times, but it always struck me with: "how did they pull this off?". Those images that build up while loading, it's some kind of progressive image loading. It starts out with a low res version, and then a slightly higher res, and then slightly higher until full quality is loaded. Would any...

Blackberry - Loading/Wait screen with animation

Is there a way to show "Loading" screen with animation in blackberry? Options: PME animation content multithreading + set of images + timer/counter standard rim api some other way Any of this? Thanks! ...

Load .wav file for OpenAL in Cocoa

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, t...

How can I know when ajax loaded content finish the images loading?

Hi, I'm loading html from an ajax request, and some img tags in it. I need to know when the images loaded in the ajax are fully loaded to resize the container. I don't know how many images are in the result, so I can't simply check the .complete value. Do you know a solution for this? Thank you! Leandro ...

performance questions on dynamically loading Javascript Objects

Which is faster, Using an XMLHTTP Get request and than using eval() for the reponsetext Using the JSONP technique for loading a script and then evaling the innerHtml of the script. Dynamically adding a script tag to the head of a document where the javascript object is being assigned to a variable? My gut tells me this should be opt...

Browser continues 'loading' after ajax request finishes.

You've seen this - on an ajax-heavy page, like meebo.com, the browser never stops 'spinning', it never indicates that it's finished loading. What causes this, and is there any way to consistently tell the browser (whatever browser it may be), that loading has completed? EDIT: Sorry, I should've specified that I'm a developer here. I've ...

Loading Images in J2ME?

I'm not so new to the concepts present on J2ME, but I'm sort of lazy in ways I shouldn't: Lately my app has been loading images into memory as they were candy... Sprite example = new Sprite(Image.createImage("/images/example.png"), w, h); and I'm not really sure it's the best way, but it worked fine in my Motorola Z6, until last night...

preventing JS running when the page is not loaded

I have encountered a problem. When I use jQuery to load a page that contains heavy javascript, the page freezes. I believe it is because the js executes before the page loads as my local site does not freeze. However, $(document).ready(function(){}); seems not working with dynamically loaded pages? is that true? or anything i could do to...

Stop the browser "throbber of doom" while loading comet/server push iframe

When using Comet, or Ajax Long Pull techniques - an iframe is usually used. And while that iframe is waiting for the long connection to close, the browser is spinning its throbber (the progress/loading indicator). Some websites, for example etherpad.com, managed to make it stop. How do they do it? ...

Graceful Page Loading / Controlling File Loading

Hi folks, I am a scriptmonkey working with a lot of graphic designers who know not a thing about the web. Despite my objections I frequently find myself with problems such as a 100Kb background image, several textual items they have made into glossy images, and 3 separate lengthy FLVs loading into a page etc etc. I would really like t...

Should loading/startup dialogs be locked on top?

Introduction I have been so annoyed by applications that have a startup dialog which is Always on Top configured. By start dialog I mean the annoying box that tells you what program you just opened (and probably opened on purpose so useless information), who the program is registered to (most likely you, more uselessness), and some oth...