FAQ Database Discussion Community


Slow start-up of large programs

windows,optimization,loading
The following program #include <stdio.h> int main() { static char a[1 << 28] = {1}; printf("%d\n", a[0]); return 0; } Compiles on Windows 7 x64 to this executable 19/06/2015 21:57 268,519,936 a.exe Which takes 5.6 seconds to run, even when run several times in succession to make sure it's cached...

Display progressbar until the next activity starts

android,android-activity,loading,android-progressbar
I have two activities. Actvity1 and Activity2. Activity2 contains heavy components therefore it takes some time open up the Activity2 after user giving instructions to go Activity2 from Activity1. In the current implementation ( actually no special code there. Only startActivity(intent) is used to lauch the next activity) Activity1 keep...

How to add a custom UIView as a loading screen

ios,objective-c,asynchronous,block,loading
I have tried to search and check many questions on this site but I still cannot find the answer for my question. Maybe there are some similar questions can solve my problem but I don't have enough experience to know about this, please forgive me. I'm working on an application...

Loading resource files within a jar

java,jar,io,loading
What's the best way to load resources (Sounds, images, xml data), that also works from inside a distributed jar file? I need to load some sounds, images, and xml data, for use in my program. Using AudioInputStream ais = AudioSystem.getAudioInputStream(new File("~/src/com/example/package/name/assets/TestSound.wav")); does not work in the jar, for obvious reasons,...

How to load *part* of a multifeature geojson file in R?

r,loading,geojson
I have a geojson that is a FeatureCollection containing 2 geographic data types: a LineString and a waypoint - see the raw file here - this is how it looks on GitHub: I want to load only only the LineString, so this is what I do: library(RCurl) obj <- getURL("https://raw.githubusercontent.com/Robinlovelace/stplanr/master/inst/extdata/route_data.geojson")...

Adding a gif image as an android loading icon? [closed]

android,design,icons,loading,gif
I am currently trying to take an animated gif image and use it as an android loading icon. In other words, I am trying to take a gif and use it when I am waiting for a different screen to load. I realize I am able to do this with...

how to apply Music Radio loading in UIAlertController?

swift,loading,uialertcontroller
I want to create this loading style in my project,i really dont know how.I am really a beginner to swift ui components.I want to add this loading style in my alert view and after getting the results i want to dismiss.So,i want to know about how to make it and...

Transferring Data between view controllers. While loading data from Parse. Data is transferred before Parse Query Populates the data

ios,parse.com,loading,presentviewcontroller
I know how to transfer data between view controllers, but the data is being transferred before I am able to complete a parse query therefore the data is missing when the data is transferred between view controllers. The code I am using is as follows. with the first part related...

How do i show a simple loading message on the screen while my page fetches data from server?

c#,jquery,html,loading
How do i display a simple loading message on a masked screen while my webpage loads. I have a product comparison page which gets called with a button click. Now the comparison page takes approx 4 secs to load. This is because the Stored Procedure take about 3.5 secs to...

Loading external resources

java,android,libgdx,loading
I'm loading all of my resources in a Loading Screen with the LibGDX AssetManager. The problem I'm having is that the AssetManager only manages internal resources, and most of my resources are external (pictures stored the user's phone), so I have to load them aside (just like that : texture...

Show loading image if Brightcove video is taking time to load on the page

jquery,loading,brightcove
I am using Brightcove video but its take a few seconds to appear/display on the screen. So in the meantime I want want to display the loading.gif image while the video is not loaded and once it loaded then hide loading.gif. How to check if a Brightcove video is displaying...

MySQL,PhP, and Flash As3 Data is not loading properly?

php,mysql,actionscript-3,flash,loading
For some reason the PHP variables are loading very improperly. So this is what happens: In my PHP code I have: <?php include_once "connect.php"; $username = $_POST['username']; $password = $_POST['password']; if ($_POST['systemCall'] == "checkLogin") { $sql = "SELECT * FROM users WHERE username='$username' AND password='$password'"; $query = mysql_query($sql); $login_counter =...

When i make a pygame game and hover over it, the cursor turns into the loading thing

python,pygame,loading
When i make a pygame game and hover over it, the cursor turns into the loading thing, that means I can't resize the window, or if i were to make buttons i wouldn't be able to use them... Help? Here's my code. import pygame import random import time import os...

Pull working PHP file (with scripts) into div using JavaScript without iframes

javascript,jquery,html,loading
Working within system constraints, I needed a way to put working code from a local .php or .html into a target div without additional libraries, jfiddle, iframes, etc. (jquery was fine) Here are my failed attempts. First part of file <a href="#" id="fruit"> This is some page!</a> <script>$("#fruit").click(function(){Expand01("fruit.php"); return false;});</script>...

Laravel 5 Eager Loading not working

php,loading,laravel-5,eager
I look at many search results with this trouble but i can`t get it to work. The User Model: <?php namespace Module\Core\Models; class User extends Model { (...) protected function Person() { return $this->belongsTo( 'Module\Core\Models\Person', 'person_id' ); } (...) And the Person Model: <?php namespace Module\Core\Models; class Person extends Model...

How to set loading icon for transition between pages?

javascript,php,jquery,html,loading
$(window).load(function() { $('#loading').hide(); $('#container').show(); }); In all my php file, I have above mentioned code for displaying loading icon till the page loads. For example : If I execute index.php, loading icon will be shown till index.php gets fully loaded.If it is redirected to example.php when redirecting, no loading icon...

images from database not getting loaded in Jssor Slider

javascript,image,slider,loading,jssor
Hi I am working on integrating JSSOR slider with my database images. I added code in my index.html. <div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 600px; height: 327px; background: #fff; overflow: hidden; "> <!-- Slides Container --> <div u="slides" style="cursor: move; position: absolute; left:50px; right:20px; top: 50px; width:...

How to detect all imges loading finished in AngularJS

angularjs,loading,document-ready
I want to use ng-repeat to show more then 100 images in a page. Those images are taking significant time in loading and i don't want to show them getting loaded to the users. So, I only want show them after all of them are loaded in the browser. Is...

Meteor show spinner on method call

javascript,jquery,meteor,loading,publish-subscribe
I have a button that calls a method. When the method is called, I would like to have the button change and show a spinner (inside the button itself). I have made the button itself and the css for it. However, I am lost in how I could hook this...

Loading Texture2D Inconsistently Fails

c#,xna,loading,texture2d
Sometimes (not always, most times it works flawlessly), I catch the exception I provided when it fails to load a Texture2D. public static class Extras { public static class Load { private static Dictionary<string, Texture2D> Textures; public static Texture2D Texture(string Path) { if (Textures == null) Textures = new Dictionary<string,...

Loading delay extjs

javascript,extjs,panel,loading,mask
I have a panel within which I have two more panels. When you click on panel1 then information in panel2 is loaded. Since the information is quite huge there is some delay when its being loaded. During this interim period I wish to add a loading mask which intimates the...

Bootstrap: overlay loading screen + toggle jumbotron

javascript,html,css,overlay,loading
Ok so, I've gone through maybe 20 different stackexchange answers to each of these problems, and I still can't solve it, so it's about time I ask and hopefully somebody can point me out of these woods: I am making a simple website, and I wanted to make like an...

Direct X 11 Problems

parsing,model,loading,directx-11,.obj
So I am making a game engine in DX11 and this is a strange problem I have been having for a while. http://gfycat.com/MerryLikableGreyhounddog I thought it was the back facing normals but that doesn't make a difference. I tried the culling modes. No luck The thing to look at in...

Tkinter button callback missing an argument that it contains [duplicate]

python,tkinter,loading,typeerror
This question already has an answer here: How to pass arguments to a Button command in Tkinter? 4 answers In an attempt to make a program that takes a username and password given by the user and then loads that document, I've encountered an odd error load_user() missing 1...

Meteor: iron-router => waitOn without subscribe

meteor,loading,iron-router
i want a loading template to appear before the site has all data to be rendered. And after the serverside Method gives me the Data(from an API [async]) via Meteor.call i want to load the correct layout. I tried many ways found on Google which describe similar but not exatcly...

How do I properly register a Rust compiler plugin?

plugins,compiler-construction,loading,rust
I've been pulling my hair out over trying to get a Rust compiler plugin to register properly. I have a separate crate called rust_to_glsl that is in a subdirectory of my main code. Inside the rust_to_glsl/src/lib.rs file I have the following #![feature(plugin_registrar)] #![feature(rustc_private)] #![crate_type="dylib"] extern crate rustc; extern crate syntax;...

Splash screen in iOS games

ios,sprite-kit,loading,startup,splash-screen
I know there is a HIG about launch images, and the primary (and only) purpose of an launch image is to give users the impression that app is fast and responsive. But this is more usual for applications (weather application for example), not for the games. Every game almost always...

Determinate finish loading website in webView with Swift in Xcode

ios,xcode,swift,webview,loading
i'm trying to create a webapp with swift in xcode, this is my current code: IBOutlet var webView: UIWebView! var theBool: Bool = false var myTimer = NSTimer() @IBOutlet var progressBar: UIProgressView! override func viewDidLoad() { super.viewDidLoad() let url = NSURL(string: "http://stackoverflow.com") let request = NSURLRequest(URL: url) webView.loadRequest(request) } I've...

c++ Getting a portion of a file

c++,save,loading
How can I skip parts of a file, then ifstream until a certain character is reached? For example, in a text file, this is written: 'SaveNameExample' variableExample = 5; How would I get only the SaveNameExample without the 's , store that as a std::string variable, and then only get...

Windows: Loading Haskell-Source-Code into ghci

haskell,loading,interpreter,ghci
I am a newbie to Haskell and my problem is probably very trivial, yet I do not know how to solve it. I created a minimal source code (for faculty, as in the tutorial) with the Editor in Windows 7, then saved it as "test.hs" . Now if I try...

How to load a large amount of images through jQuery ImagesLoaded

jquery,image,loading,preload,imagesloaded
I have a page that loads approx 150+ images into a page. The structure for the image is this: HTML CODE <table class="form-table"> <input type="hidden" name="bgtype" id="bgtype" value="pattern"/> <tr class="wpbp-field-patternbg"> <th style="width:20%"><label for="patternbg">Pattern</label></th> <td><div id="wpbp-pattern-select"> <div class="description">Select a pattern you would like to be applied as the background. Click on...

Three.js skybox not loading completely or at all

image,three.js,loading,skybox
I inserted a skybox in my Three.js canvas like this: // SkyBox var urls = [ themePath + 'assets/img/sky/pos-x.jpg', themePath + 'assets/img/sky/neg-x.jpg', themePath + 'assets/img/sky/pos-y.jpg', themePath + 'assets/img/sky/neg-y.jpg', themePath + 'assets/img/sky/pos-z.jpg', themePath + 'assets/img/sky/neg-z.jpg' ] window.cubemap = THREE.ImageUtils.loadTextureCube(urls); cubemap.format = THREE.RGBFormat; window.shader = THREE.ShaderLib['cube']; shader.uniforms['tCube'].value = cubemap; window.skyBoxMaterial = new...

Google Tag Manager - what about scripts in the footer?

javascript,performance,asynchronous,loading,google-tag-manager
On our site we have script tags for third-party services like Lotame, Peer39 and Google Analytics in the footer just before the closing body tag, to avoid blocking the page render. We make scripts defer or async wherever possible, but some of the services don't work with asynchronous loading and...

“InvalidCastException: Cannot cast from source type to destination type.” when loading serialized data

c#,serialization,save,loading
I'd sincerely appreciate if you looked through some of my code as I can't seem to be able to fix it myself, and this will also hopefully help others understand serialization better. I have four pieces of related code here, with anything seemingly irrelevant cut out. I'm trying to create...

How to add custom global javascript to mediawiki

javascript,loading,wikimedia
How can I add a custom javascript file (let's say custom.js) to a mediawiki installation? For instance, if I put custom.js under the folder resources/lib/, how do I get that to be loaded on every page? I am not trying to do this as part of an extension, and I...

Loading txt file into verilog testbench

memory,loading,verilog
I would like to load a few data from .txt file into the testbench as input in order to run the simulation, but the data I wish to load in are real numbers. For example: 0.00537667139546100 0.0182905843325460 -0.0218392122072903 0.00794853052089004 I found that $readmemh, or $readmemb are meant for hex or...

How to load an external html file in clicking button

php,html,loading
I need to load the blog.html file when I click the button, but I'm not getting any error in the console. What is the mistake I made and how can I fix it? Code : <script type="text/javascript" language="javascript"> $(document).ready(function() { $("#driver").click(function(event){ $('#stage').load('/blog.html'); }); }); </script> <p>Click on the button to...

Why is data loading to voltdb slow?

database,load,loading,voltdb
What is the fastest way to load data into voltdb. I'm using the recommended command: csvloader in the form: $ csvloader helloworld -f languages.csv but the loading time is very long. Why is it slow? ...

CSS File doesn't get loaded

html,css,nginx,loading
I have the following file, head.inc.php which I include in other files: <?php include 'database.inc.php'; define("DB_HOST", "localhost"); define("DB_USER", "dani"); define("DB_PASS", "Reichenschwand5"); define("DB_NAME", "cocktails"); $database = new Database(); ?> <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://necolas.github.io/normalize.css/3.0.2/normalize.css" type="text/css"> <link rel="stylesheet" href="css/style.css" type="text/css"> </head> <body> The First File...

swift tableview displays json data very slow

json,performance,swift,tableview,loading
I have a page that loops JSON data and show in a tableview. I get the correct correctly but when it shows on the page, it is very slow. I tried to println the json to see how fast it retrieves the json data and it was very fast. One...