Search Results

Search found 7801 results on 313 pages for 'lazy loading'.

Page 18/313 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Images Loading Very Slowly

    - by Vecta
    I'm currently working on optimizing my site to try to decrease load time by using Pingdom tools. I seem to be having some difficulty with long load times on images. For example, the body background for my site is a 29kb file but takes almost 500 ms to load, the majority of which is spent connecting to the server. This one seems to take the longest times but other images seem to take a lot of time as well—the majority of which seems to be spent connecting to the server. This also seems to fluctuate as I've seen the same image load in 500ms one minute and ten minutes later load in 1.5 seconds. My site is using the Modx CMS but I'm not sure if that would affect this at all. Is it more likely that this is a server issue? Is there anything that I should check or do to help alleviate these inflated 'connect' times?

    Read the article

  • How to get this wavefront .obj data onto the frustum?

    - by NoobScratcher
    I've finally figured out how to get the data from a .obj file and store the vertex positions x,y,z into a structure called Points with members x y z which are of type float. I want to know how to get this data onto the screen. Here is my attempt at doing so: //make a fileobject and store list and the index of that list in a c string ifstream file (list[index].c_str() ); std::vector<int>faces; std::vector<Point>points; points.push_back(Point()); Point p; int face[4]; while ( !file.eof() ) { char modelbuffer[10000]; //Get lines and store it in line string file.getline(modelbuffer, 10000); switch(modelbuffer[0]) { case 'v' : sscanf(modelbuffer, "v %f %f %f", &p.x, &p.y, &p.z); points.push_back(p); cout << "Getting Vertex Positions" << endl; cout << "v" << p.x << endl; cout << "v" << p.y << endl; cout << "v" << p.z << endl; break; case 'f': sscanf(modelbuffer, "f %d %d %d %d", face, face+1, face+2, face+3 ); cout << face[0] << endl; cout << face[1] << endl; cout << face[2] << endl; cout << face[3] << endl; faces.push_back(face[0]); faces.push_back(face[1]); faces.push_back(face[2]); faces.push_back(face[3]); } GLuint vertexbuffer; glGenBuffers(1, &vertexbuffer); glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer); glBufferData(GL_ARRAY_BUFFER, points.size(), points.data(), GL_STATIC_DRAW); //glBufferData(GL_ARRAY_BUFFER,sizeof(points), &(points[0]), GL_STATIC_DRAW); glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0); glVertexPointer(3, GL_FLOAT, sizeof(points),points.data()); glIndexPointer(GL_DOUBLE, 0, faces.data()); glDrawArrays(GL_QUADS, 0, points.size()); glDrawElements(GL_QUADS, faces.size(), GL_UNSIGNED_INT, faces.data()); } As you can see I've clearly failed the end part but I really don't know why its not rendering the data onto the frustum? Does anyone have a solution for this?

    Read the article

  • Loading Entities Dynamically with Entity Framework

    - by Ricardo Peres
    Sometimes we may be faced with the need to load entities dynamically, that is, knowing their Type and the value(s) for the property(ies) representing the primary key. One way to achieve this is by using the following extension methods for ObjectContext (which can be obtained from a DbContext, of course): 1: public static class ObjectContextExtensions 2: { 3: public static Object Load(this ObjectContext ctx, Type type, params Object [] ids) 4: { 5: Object p = null; 6:  7: EntityType ospaceType = ctx.MetadataWorkspace.GetItems<EntityType>(DataSpace.OSpace).SingleOrDefault(x => x.FullName == type.FullName); 8:  9: List<String> idProperties = ospaceType.KeyMembers.Select(k => k.Name).ToList(); 10:  11: List<EntityKeyMember> members = new List<EntityKeyMember>(); 12:  13: EntitySetBase collection = ctx.MetadataWorkspace.GetEntityContainer(ctx.DefaultContainerName, DataSpace.CSpace).BaseEntitySets.Where(x => x.ElementType.FullName == type.FullName).Single(); 14:  15: for (Int32 i = 0; i < ids.Length; ++i) 16: { 17: members.Add(new EntityKeyMember(idProperties[i], ids[i])); 18: } 19:  20: EntityKey key = new EntityKey(String.Concat(ctx.DefaultContainerName, ".", collection.Name), members); 21:  22: if (ctx.TryGetObjectByKey(key, out p) == true) 23: { 24: return (p); 25: } 26:  27: return (p); 28: } 29:  30: public static T Load<T>(this ObjectContext ctx, params Object[] ids) 31: { 32: return ((T)Load(ctx, typeof(T), ids)); 33: } 34: } This will work with both single-property primary keys or with multiple, but you will have to supply each of the corresponding values in the appropriate order. Hope you find this useful!

    Read the article

  • Unity Not loading after installing Nvidia proprietary drivers

    - by user108705
    I just got a new Nvidia GTX 650. The huge downside at this point is that whenever I use the open source driver, the computer is ridiculously slow. Whenever I use the proprietary drivers and restart, the desktop wallpaper will load and nothing more. I've tried restarting unity only to get a continuous rolling error. With the CCSM options, unity is enabled, yet nothing appears. Whenever I'm using proprietary drivers I get a microcode error which happens so quickly that I can't record the number.

    Read the article

  • boot loading problem after wubi installation of Ubuntu 12.04 on Win7

    - by user63085
    I was new in Ubuntu OS and I was just trying to use wubi windows installer to get a Ubuntu first for hands-on. I followed exactly the same as the instructions and after reboot win7, there is no Ubuntu selection in windows boot manager, with only Windows 7 showing there evilly -.- What I've found out was that the grub folder inside Ubuntu folder ( in my C:\ drive) was empty, either inside the ubuntu\disks\grub or ubuntu\install\grub. I thought this might be the reason why I could not load ubuntu during startup. Cause I've also looked into the EasyBCD settings, and ubuntu entry with Bootloader Path: \ubuntu\winboot\wubildr.mbr was lying there peacefully, looking perfectly fine. However it was not in boot loader actually. Is there a way to restore the grub folder with grub2, or is there any way to fix this problem so that I can find the "Ubuntu" selection at windows startup? Very appreciate your help :) Henry

    Read the article

  • Loading assets in Monogame

    - by Matebu
    I'm creating a MonoGame application on Visual Studio 2012, yet when trying to load a texture I get the following problem: Could not load Menu/btnPlay asset! I have set content directory: Content.RootDirectory = "Assets"; Also the file btnPlay.png has properties set: Build Action: Content and Copy to Output directory: Copy if newer. My constructor and LoadContent functions are totally empty, but have a look yourself: public WizardGame() { Window.Title = "Just another Wizard game"; _graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Assets"; } protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); Texture2D texture = Content.Load<Texture2D>("Menu/btnPlay"); _graphics.IsFullScreen = true; _graphics.ApplyChanges(); } How do I properly load a texture?

    Read the article

  • Loading from Multiple Data Sources with Oracle Loader for Hadoop

    - by mannamal
    Oracle Loader for Hadoop can be used to load data from multiple data sources (for example Hive, HBase), and data in multiple formats (for example Apache weblogs, JSON files).   There are two ways to do this: (1) Use an input format implementation.  Oracle Loader for Hadoop includes several input format implementations.  In addition, a user can develop their own input format implementation for proprietary data sources and formats. (2) Leverage the capabilities of Hive, and use Oracle Loader for Hadoop to load from Hive. These approaches are discussed in our Oracle Open World 2013 presentation. 

    Read the article

  • How to do pre-loading

    - by Dave
    I have a question that is confusing me with making a game. For my game launch i pre load everything for the main menu then i loop the game to display it. But lets argue player wants to launch a new game or a specific level, then you preload the relevant sounds/graphics for that level right? How ever, the player must already be running the game loop if they are at the main menu, so you can't load in the game loop or you will load every frame...but im pretty sure most big games don't preload every level when you first run the game from desktop because it would take a long time on some of these games.... How is it done :S

    Read the article

  • glTexImage2D not loading my data

    - by Clyde
    Can anyone suggest why this code doesn't work? When I draw using this texture all I get is black. If I use GLUtils.texImage2D() to load a png file, it works correctly. ByteBuffer bb = ByteBuffer.allocateDirect(128*128*4).order(ByteOrder.nativeOrder()); bb.position(0); for(int row = 0; row != 128; row++) { for(int i = 0 ; i != 128 ; i++) { bb.put((byte)0x80); bb.put((byte)0xFF); bb.put((byte)0xFF); bb.put((byte)i); } } int[] handle = new int[1]; GLES20.glEnable(GLES20.GL_TEXTURE_2D); GLES20.glGenTextures(1, handle, 0); DrawAdapter.checkGlError("Gen textures"); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, handle[0]); DrawAdapter.checkGlError("Bind textures"); bb.position(0); GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, 128, 128, 0, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, bb); DrawAdapter.checkGlError("glTexImage2D"); return handle[0];

    Read the article

  • Matrix loading problems with jbullet and lwjgl

    - by Quintin
    The following code does not load the matrix correctly from jbullet. //box is a RigidBody Transform trans = new Transform(); trans = box.getMotionState().getWorldTransform(trans); float[] matrix = new float[16]; trans.getOpenGLMatrix(matrix); // pass that matrix to OpenGL and render the cube FloatBuffer buffer = ByteBuffer.allocateDirect(4*16).asFloatBuffer().put(matrix); buffer.rewind(); glPushMatrix(); glMultMatrix(buffer); glBegin(GL_POINTS); glVertex3f(0,0,0); glEnd(); glPopMatrix(); the jbullet is configured as so: CollisionConfiguration = new DefaultCollisionConfiguration(); dispatcher = new CollisionDispatcher(collisionConfiguration); Vector3f worldAabbMin = new Vector3f(-10000,-10000,-10000); Vector3f worldAabbMax = new Vector3f(10000,10000,10000); AxisSweep3 overlappingPairCache = new AxisSweep3(worldAabbMin, worldAabbMax); SequentialImpulseConstraintSolver solver = new SequentialImpulseConstraintSolver(); dynamicWorld = new DiscreteDynamicsWorld(dispatcher, overlappingPairCache, solver, collisionConfiguration); dynamicWorld.setGravity(new Vector3f(0,-10,0)); dynamicWorld.getDispatchInfo().allowedCcdPenetration = 0f; CollisionShape groundShape = new BoxShape(new Vector3f(1000.f, 50.f, 1000.f)); Transform groundTransform = new Transform(); groundTransform.setIdentity(); groundTransform.origin.set(new Vector3f(0.f, -60.f, 0.f)); float mass = 0f; Vector3f localInertia = new Vector3f(0, 0, 0); DefaultMotionState myMotionState = new DefaultMotionState(groundTransform); RigidBodyConstructionInfo rbInfo = new RigidBodyConstructionInfo(mass, myMotionState, groundShape, localInertia); RigidBody body = new RigidBody(rbInfo); dynamicWorld.addRigidBody(body); dynamicWorld.clearForces(); Nothing is rendered on the screen. What am I doing wrong?

    Read the article

  • Server costs and back loading for mobile devices

    - by user23844
    A company approached me to design an MMO for the mobile platform and I have the perfect idea for them. My question is how much would a server for a FTP game that has both a PVE element and PVP cost? Also do you think that it would be better or is it even possible to back load the data onto the phones (trying to come up with some interesting way to back up the data in case of emergency). I don't want the game to be totally online reliant (I want to appeal to not only phone users but also iPod touch users) and for there to be an offline mode. If you can't tell this is my first game besides simple projects I've done on the side. Any help would be greatly appreciated.

    Read the article

  • ubuntu freezes right after loading

    - by toast
    new install of ubuntu 12.04 i386 desktop.iso on a toshiba satellite intel celeron m gets to the desktop screen and freezes the mouse still moves but nothing responds to it started terminal by pressing ctl+alt+f1 tried "startx" and got this(i cant copy and paste but i will do my best to avoid typos): fatal server error: server is already active for display 0 if this server is no longer running, remove /tmp/.X0-lock and start again please consult the x.org foundation support for help ddxSgiveup: closing log XIO: fatal IO error 11 (resource temporarily unavailable) on x server ":0" after 7 requests (7 known processed) with 0 events remaining. xxxxxx@aaaaaa-Satellite-a105:~$ tried "startx --:1" just took me back to the default wallpaper with nothing else mouse still moves but nothing else

    Read the article

  • Efficient Bus Loading

    - by System Down
    This is something I did for a bus travel company a long time ago, and I was never happy with the results. I was thinking about that old project recently and thought I'd revisit that problem. Problem: Bus travel company has several buses with different passenger capacities (e.g. 15 50-passenger buses, 25 30-passenger buses ... etc). They specialized in offering transportation to very large groups (300+ passengers per group). Since each group needs to travel together they needed to manage their fleet efficiently to reduce waste. For instance, 88 passengers are better served by three 30-passenger buses (2 empty seats) than by two 50-passenger buses (12 empty seats). Another example, 75 passengers would be better served by one 50-passenger bus and one 30-passenger bus, a mix of types. What's a good algorithm to do this?

    Read the article

  • Problem with loading webpage in firefox

    - by user107735
    I'm using ubuntu 12.04 and I always keep my pc up to date. For last 4 or 5 weeks, I noticed in firefox, the page displays enough data but spinner in the tab doesn't stop. Not only that, Some page load very quickly and wheel still speaning. Some are very very slow and wheel is as always speaning. Some websites (ex. google analytics) takes more than 5 minutes to load. Some websites load but slider doesnt load and wheel is speaning (ex. blenderdesh.com) I'm facing lot of problems for this. Please help me.....

    Read the article

  • Xubuntu loading slow after the session/password select

    - by Bryan
    I recently installed Xubuntu on my computer. I love the distro. Everything was fast, and then the bootup slowed down. It started taking a couple minutes for my user selected wallpaper to show and the menu to appear, basically do anything on the comp. I do not recall doing anything other than changing the swappiness. It did not affect it initially. Would that be something to affect it or are there other ideas that might have caused this sudden change.

    Read the article

  • (Phaser) Preload Future States in Create?

    - by Brian
    I'm a first time user of Phaser, been trying to make a simple point and click type game. I'm trying to keep things very modular, so I'm defining a list of levels (states) in a JSON, and then every level has its own JSON containing the objects within that level. However, I'm encountering an issue in that, when changing states, I get a black flash while the assets for the next state load (this happens whether I iterate through the JSON list or define everything manually). From what I've read, all sprites should be loaded in the preload stage, however, by doing this I'm causing that tiny but noticeable black pause. I know one way would be to simply load every asset at the start of the game, but that seems incredibly inefficient (wouldn't that fill up the memory immensely?). I would rather load a state's assets from the "parent" state. However, in my quick test (which maybe I did wrong) it seems that game.load doesn't work properly if done within the create stage? What is the best approach to doing this?

    Read the article

  • Problem Loading a DLL (4 replies)

    I'm having some issues now that I can't see what I'm doing wrong. I'm Pinvoking a non WindowsAPI DLL (I mean, not a dll provided on windows). Pinvoking LoadLibrary, I can get a IntPtr to any WindowsAPI DLL, but never I can get a pointer to my DLL. The code I'm using is very simple, like this one: [DllImport(&quot;kernel32.dll&quot;, SetLastError true)] public static extern IntPtr LoadLibrary(); static void ...

    Read the article

  • Lazy loading Javascript, object not created from IE8 cache

    - by doum-ti-di-li-doom
    Unfortunately the bug does not happen outside of my application! Scenario index.php <?php header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: '.gmdate('D, d M Y H:i:s').'GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Lazy loader</title> </head> <body> ... <script type="text/javascript" src="internal.js"></script> ... </body> </html> internal.js myApp = { timerHitIt: false, hitIt: function () { if (arguments.callee.done) { return; } arguments.callee.done = true; if (myApp.timerHitIt) { clearInterval(myApp.timerHitIt); } var elt = document.createElement("script"); elt.async = true; elt.type = "text/javascript"; elt.src = "external.js"; elt.onload = elt.onreadystatechange = function () { alert(typeof(something)); } document.body.appendChild(elt); } } if (document.addEventListener) { document.addEventListener("DOMContentLoaded", myApp.hitIt, false); } /*@cc_on @*/ /*@if (@_win32) document.write("<script id=__ie_onload defer src="+((location.protocol == "https:") ? "//:" : "javascript:void(0)")+"><\/script>"); document.getElementById("__ie_onload").onreadystatechange = function () { if (this.readyState == "complete") { myApp.hitIt(); } }; /*@end @*/ if (/WebKit/i.test(navigator.userAgent)) { timerHitIt = setInterval(function () { if (/loaded|complete/.test(document.readyState)) { myApp.hitIt(); } }, 10); } window.onload = myApp.hitIt; external.js something = {}; alert(true); Valid results are undefined - true - object (± new request) true - object (± cached javascript) But sometimes, when hitting F5, I get true - undefined Does anyone have a clue why alert(true) is executed but something is not set?

    Read the article

  • How to lazy load scripts in YUI that accompany ajax html fragments

    - by Chris Beck
    I have a web app with Tabs for Messages and Contacts (think gmail). Each Tab has a Y.on('click') event listener that retrieves an HTML fragment via Y.io() and renders the fragment via node.setContent(). However, the Contact Tab also requires contact.js to enable an Edit button in the fragment. How do I defer the cost of loading contact.js until the user clicks on the Contacts tab? How should contact.js add it's listener to the Edit button? The Complete function of my Tab's on('click') event could serialize Get.script('contact.js') after Y.io('fragment'). However, for better performance, I would prefer to download the script in parallel to downloading the HTML fragment. In that case, I would need to defer adding an event listener to the Edit button until the Edit button is available. This seems like a common RIA design pattern. What is the best way to implement this with YUI? How should I get the script? How should I defer sections of the script until elements in the fragment are available in the DOM?

    Read the article

  • JPA2 adding referential contraint to table complicates criteria query with lazy fetch, need advice

    - by Quaternion
    Following is a lot of writing for what I feel is a pretty simple issue. Root of issue is my ignorance, not looking so much for code but advice. Table: Ininvhst (Inventory-schema inventory history) column ihtran (inventory history transfer code) using an old entity mapping I have: @Basic(optional = false) @Column(name = "IHTRAN") private String ihtran; ihtran is really a foreign key to table Intrnmst ("Inventory Transfer Master" which contains a list of "transfer codes"). This was not expressed in the database so placed a referential constraint on Ininvhst re-generating JPA2 entity classes produced: @JoinColumn(name = "IHTRAN", referencedColumnName = "TMCODE", nullable = false) @ManyToOne(optional = false) private Intrnmst intrnmst; Now previously I was using JPA2 to select the records/(Ininvhst entities) from the Ininvhst table where "ihtran" was one of a set of values. I used in.value() to do this... here is a snippet: cq = cb.createQuery(Ininvhst.class); ... In in = cb.in(transactionType); //Get in expression for transacton types for (String s : transactionTypes) { //has a value in = in.value(s);//check if the strings we are looking for exist in the transfer master } predicateList.add(in); My issue is that the Ininvhst used to contain a string called ihtran but now it contains Ininvhst... So I now need a path expression: this.predicateList = new ArrayList<Predicate>(); if (transactionTypes != null && transactionTypes.size() > 0) { //list of strings has some values Path<Intrnmst> intrnmst = root.get(Ininvhst_.intrnmst); //get transfermaster from Ininvhst Path<String> transactionType = intrnmst.get(Intrnmst_.tmcode); //get transaction types from transfer master In<String> in = cb.in(transactionType); //Get in expression for transacton types for (String s : transactionTypes) { //has a value in = in.value(s);//check if the strings we are looking for exist in the transfer master } predicateList.add(in); } Can I add ihtran back into the entity along with a join column that is both references "IHTRAN"? Or should I use a projection to somehow return Ininvhst along with the ihtran string which is now part of the Intrnmst entity. Or should I use a projection to return Ininvhst and somehow limit Intrnmst just just the ihtran string. Further information: I am using the resulting list of selected Ininvhst objects in a web application, the class which contains the list of Ininvhst objects is transformed into a json object. There are probably quite a few serialization methods that would navigate the object graph the problem is that my current fetch strategy is lazy so it hits the join entity (Intrnmst intrnmst) and there is no Entity Manager available at that point. At this point I have prevented the object from serializing the join column but now I am missing a critical piece of data. I think I've said too much but not knowing enough I don't know what you JPA experts need. What I would like is my original object to have both a string object and be able to join on the same column (ihtran) and have it as a string too, but if this isn't possible or advisable I want to hear what I should do and why. Pseudo code/English is more than fine.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >