Daily Archives

Articles indexed Tuesday September 18 2012

Page 16/17 | < Previous Page | 12 13 14 15 16 17  | Next Page >

  • Unattended grub configuration after kernel upgrade

    - by bouke
    Today I have been working on automatic deployment of an ubuntu server. I got stuck on automatic updating of the server using apt-get upgrade trying to upgrade to a new kernel. The log looks like this: Setting up linux-image-3.2.0-24-generic (3.2.0-24.39) ... Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst (...) Then a question is presented: Package configuration +---------------------------------¦ +---------------------------------+ ¦ A new version of /boot/grub/menu.lst is available, but the version ¦ ¦ installed currently has been locally modified. ¦ ¦ ¦ ¦ What would you like to do about menu.lst? ¦ ¦ ¦ ¦ install the package maintainer's version ¦ ¦ keep the local version currently installed ¦ ¦ show the differences between the versions ¦ ¦ show a side-by-side difference between the versions ¦ ¦ show a 3-way difference between available versions ¦ ¦ do a 3-way merge between available versions (experimental) ¦ ¦ start a new shell to examine the situation ¦ ¦ ¦ ¦ ¦ ¦ <Ok> ¦ ¦ ¦ +----------------------------------------------------------------------+ The desired outcome would be to select the first option and to continue: Replacing config file /run/grub/menu.lst with new version Updating /boot/grub/menu.lst ... done After running the upgrade by hand, I used debconf-get-selections to inspect the correct answer for the question (see other settings). It seems like update_grub_changeprompt_threeway is the question that should be answered. However, setting this using debconf-set-selections presented me with the same question: debconf-set-selections <<< "grub grub/update_grub_changeprompt_threeway select install_new" apt-get -y dist-upgrade How can this question be automated?

    Read the article

  • display port on x230 not working

    - by Aaron
    having problems with my new lenovo x230 - using dual montiors, only vga registers anything. This has the Intel graphics controller : 00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09) TO get it to even boot, had to add the nomodeset parameter to the kernel. Otherwise will not even start up X Ive upgraded my kernel to the latest 3.6 with no difference. The display section reads the monitor as the only display and labels it as laptop. Cant seem to get it to work! Any help would be greatly appreciated.

    Read the article

  • NetworkManager doesn't detect my broadband device

    - by Joril
    I have a Huawei K3765 (USB ID 12D1:1520) and I'm trying to use it with Ubuntu 10.04 Lucid. I have usb-modeswitch installed, so when I plug the device I can see that it gets switched from storage-mode to modem-mode. My problem is that when I try to create a broadband mobile connection for it, NetworkManager doesn't detect the modem... I tried this on two different laptops. /var/log/daemon.log doesn't show anything of interest, AFAIKT... What could I try?

    Read the article

  • Why are my file selection dialogs so big? How do I make them smaller?

    - by Amanda
    When I use an external monitor, my file selection dialog boxes seem to be huge -- wider than my larger screen. I assume it is a nautilus issue since it happens whether I'm trying to open a file to upload (in firefox) or attach (in thunderbird) or just open it in LibreOffice. See screenshot: The browser window fills my left-hand monitor, the "open" dialog is wider than one screen, and wider than the window that spawned it. It's huge. It didn't used to be huge. Is there some way to force dialog windows to be smaller by default? Whenever I try to open/attach/upload a file I have to re-size the finder dialog before I can see what I'm looking at. I don't understand why it is defaulting to such a huge window.

    Read the article

  • SEO when loading items through AJAX

    - by Qmal
    Let's say I have standard scenario of commerce site that has categories on the left and items on the right. What I would like to do is that when user clicks on category it will pass it's ID to js, js will get all items from API by using that id and load them very prettily to my content. It looks all cool and pro but what is the situation from SEO point of view? AFAIK google bot enters my site, sees I have span with categories and that's all?

    Read the article

  • Increasing SEO and Google adsense earnings [closed]

    - by swat_mag
    Possible Duplicate: How can I increase the traffic to my site? I have a website ( http://www.special-ops.org ) it is quite old but new site... Old in that that i written it in another language and on other domain, now i registered new domain and have plan to translate everything to english... I stuck on first step... How to improve my SEO and get traffic? I think i'm doing good on site seo, but my content are one of millions... How to improve it? Examples of my articles: http://www.special-ops.org/navy-seals-most-elite-unit-in-united-states-forces/

    Read the article

  • Facebook Connect with CodeIgniter login problems

    - by Alastair Dewar
    Im having a problem using Facebook Connect on my latest website. Im running it using the CodeIgniter framework and Elliot Haughin's library (http://www.haughin.com/code/facebook/). Everything is setup okay, when the user goes to login, the request is sent to Facebook okay and returns with the code (which i presume identifies the session?). However, it doesnt seem to update the library, and after doing all this still thinks that the user is not logged in. It makes me think its a bug in the library itself, but I can't see anyone else with this problem. I have tried dumping the error log from the library but it doesnt find any problems. If someone could shed any light I would be so grateful!

    Read the article

  • Questions about an Engine Java

    - by CJ Sculti
    so I am going to start developing Java games (3D) but I have a few questions. So I dont know if I should use an engine or make my own. I feel like I am "cheating" if I use an engine to make my game. Is it frowned upon in the game developing world? What are some advantages and disadvantages to using an engine for my game and is it really that much harder to make my own engine? I know that engines have built in models and textures with easy drag and drop interfaces, would I have any of that if I were to code my own engine? Thanks guys.

    Read the article

  • Rotate sphere in Javascript / three.js while moving on x/z axes

    - by kaipr
    I have a sphere/ball in three.js which I want to "roll" arround on a x/z axis. For the z axe I could simply do this no matter what the current x and y rotation is: sphere.roll_z = function(distance) { sphere.position.z += distance; sphere.rotation.x += distance > 0 ? 0.05 : -0.05; } But how can I roll it along the x axe? And how could I properly do the roll_z? I've found a lot about quateration and matrixes, but I can't figure out how to use them properly to achieve my (rather simple) goal. I'm aware that I have to update multiple rotations and that I have to calculate how far to rotate the sphere to match the distance, but the "how" is the question. It's probably just lack of mathematical skills which I should train, but a working example/short explanation would help alot to start with.

    Read the article

  • Bullet Physics - Casting a ray straight down from a rigid body (first person camera)

    - by Hydrocity
    I've implemented a first person camera using Bullet--it's a rigid body with a capsule shape. I've only been using Bullet for a few days and physics engines are new to me. I use btRigidBody::setLinearVelocity() to move it and it collides perfectly with the world. The only problem is the Y-value moves freely, which I temporarily solved by setting the Y-value of the translation vector to zero before the body is moved. This works for all cases except when falling from a height. When the body drops off a tall object, you can still glide around since the translate vector's Y-value is being set to zero, until you stop moving and fall to the ground (the velocity is only set when moving). So to solve this I would like to try casting a ray down from the body to determine the Y-value of the world, and checking the difference between that value and the Y-value of the camera body, and disable or slow down movement if the difference is large enough. I'm a bit stuck on simply casting a ray and determining the Y-value of the world where it struck. I've implemented this callback: struct AllRayResultCallback : public btCollisionWorld::RayResultCallback{ AllRayResultCallback(const btVector3& rayFromWorld, const btVector3& rayToWorld) : m_rayFromWorld(rayFromWorld), m_rayToWorld(rayToWorld), m_closestHitFraction(1.0){} btVector3 m_rayFromWorld; btVector3 m_rayToWorld; btVector3 m_hitNormalWorld; btVector3 m_hitPointWorld; float m_closestHitFraction; virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) { if(rayResult.m_hitFraction < m_closestHitFraction) m_closestHitFraction = rayResult.m_hitFraction; m_collisionObject = rayResult.m_collisionObject; if(normalInWorldSpace){ m_hitNormalWorld = rayResult.m_hitNormalLocal; } else{ m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis() * rayResult.m_hitNormalLocal; } m_hitPointWorld.setInterpolate3(m_rayFromWorld, m_rayToWorld, m_closestHitFraction); return 1.0f; } }; And in the movement function, I have this code: btVector3 from(pos.x, pos.y + 1000, pos.z); // pos is the camera's rigid body position btVector3 to(pos.x, 0, pos.z); // not sure if 0 is correct for Y AllRayResultCallback callback(from, to); Base::getSingletonPtr()->m_btWorld->rayTest(from, to, callback); So I have the callback.m_hitPointWorld vector, which seems to just show the position of the camera each frame. I've searched Google for examples of casting rays, as well as the Bullet documentation, and it's been hard to just find an example. An example is really all I need. Or perhaps there is some method in Bullet to keep the rigid body on the ground? I'm using Ogre3D as a rendering engine, and casting a ray down is quite straightforward with that, however I want to keep all the ray casting within Bullet for simplicity. Could anyone point me in the right direction? Thanks.

    Read the article

  • How do I drag my widgets without dragging other widgets?

    - by Cypher
    I have a bunch of drag-able widgets on screen. When I am dragging one of the widgets around, if I drag the mouse over another widget, that widget then gets "snagged" and is also dragged around. While this is kind of a neat thing and I can think of a few game ideas based on that alone, that was not intended. :-P Background Info I have a Widget class that is the basis for my user interface controls. It has a bunch of properties that define it's size, position, image information, etc. It also defines some events, OnMouseOver, OnMouseOut, OnMouseClick, etc. All of the event handler functions are virtual, so that child objects can override them and make use of their implementation without duplicating code. Widgets are not aware of each other. They cannot tell each other, "Hey, I'm dragging so bugger off!" Source Code Here's where the widget gets updated (every frame): public virtual void Update( MouseComponent mouse, KeyboardComponent keyboard ) { // update position if the widget is being dragged if ( this.IsDragging ) { this.Left -= (int)( mouse.LastPosition.X - mouse.Position.X ); this.Top -= (int)( mouse.LastPosition.Y - mouse.Position.Y ); } ... // define and throw other events if ( !this.WasMouseOver && this.IsMouseOver && mouse.IsButtonDown( MouseButton.Left ) ) { this.IsMouseDown = true; this.MouseDown( mouse, new EventArgs() ); } ... // define and throw other events } And here's the OnMouseDown event where the IsDraggable property gets set: public virtual void OnMouseDown( object sender, EventArgs args ) { if ( this.IsDraggable ) { this.IsDragging = true; } } Problem Looking at the source code, it's obvious why this is happening. The OnMouseDown event gets fired whenever the mouse is hovered over the Widget and when the left mouse button is "down" (but not necessarily in that order!). That means that even if I hold the mouse down somewhere else on screen, and simply move it over anything that IsDraggable, it will "hook" onto the mouse and go for a ride. So, now that it's obvious that I'm Doing It Wrong™, how do I do this correctly?

    Read the article

  • Performance tracking/monitoring in games

    - by vitaliy kotik
    Let's say I have an online game with a downloadable client / browser plugin. I want to track performance of my software and automatically send summary to the server. Let it be fps, latency, load time, physics step calc. time, whatever... I also want tools to perform data analysis: per session stats, per hardware stats, avgs, totals, diagrams, etc. So that I could see what are the real world hotspots / bottlenecks. Is there any common out-of-the-box / SaS solution?

    Read the article

  • Threading iPhone

    - by bobobobo
    Say I have a group of large meshes that I have to intersect rays against. Assume also, for whatever reason, I cannot further simplify/reduce poly check count by spatial subdivisioning. I can do this in parallel: bool intersects( list of meshes ) // a mesh is a group of triangles { create n threads foreach mesh in meshes assign to a thread in threads wait until ( threads.run() ) ; // run asynchronously // when they're all done // pull out intersected triangles // from per-thread context data } Can you do this in ios for games? Or is the overhead of thread creation and mutex waiting going to beat-out the benefit of multithreading?

    Read the article

  • returning correct multiTouch id

    - by Max
    I've spent countless hours on reading tutorials and looking at every question related to multiTouch from here and Stackoverflow. But I just cannot figure out how to do this correctly. I use a loop to get my pointerId, I dont see alot of people doing this but its the only way I've managed to get it somewhat working. I have two joysticks on my screen, one for moving and one for controlling my sprites rotation and the angle he shoots, like in Monster Shooter. Both these work fine. My problem is that when I Move my sprite at the same time as Im shooting, my touchingPoint for my movement is set to the touchingPoint of my shooting, since the x and y is higher on the touchingPoint of my shooting (moving-stick on left side of screen, shooting-stick on right side), my sprite speeds up, this creates an unwanted change in speed for my sprite. I will post my entire onTouch method here with some variable-changes to make it more understandable. Since I do not know where Im going wrong. public void update(MotionEvent event) { if (event == null && lastEvent == null) { return; } else if (event == null && lastEvent != null) { event = lastEvent; } else { lastEvent = event; } int pointerCount = event.getPointerCount(); for (int i = 0; i < pointerCount; i++) { int x = (int) event.getX(i); int y = (int) event.getY(i); int id = event.getPointerId(i); int action = event.getActionMasked(); int actionIndex = event.getActionIndex(); String actionString; switch (action) { case MotionEvent.ACTION_DOWN: actionString = "DOWN"; break; case MotionEvent.ACTION_UP: shooting=false; // when shooting is true, it shoots dragging=false; // when dragging is true, it moves actionString = "UP"; break; case MotionEvent.ACTION_POINTER_DOWN: actionString = "PNTR DOWN"; break; case MotionEvent.ACTION_POINTER_UP: shooting=false; dragging=false; actionString = "PNTR UP"; break; case MotionEvent.ACTION_CANCEL: shooting=false; dragging=false; actionString = "CANCEL"; break; case MotionEvent.ACTION_MOVE: try{ if((int) event.getX(id) > 0 && (int) event.getX(id) < touchingBox && (int) event.getY(id) > touchingBox && (int) event.getY(id) < view.getHeight()){ movingPoint.x = (int) event.getX(id); movingPoint.y = (int) event.getY(id); dragging = true; } else if((int) event.getX(id) > touchingBox && (int) event.getX(id) < view.getWidth() && (int) event.getY(id) > touchingBox && (int) event.getY(id) < view.getHeight()){ shootingPoint.x = (int) event.getX(id); shootingPoint.y = (int) event.getY(id); shooting=true; }else{ shooting=false; dragging=false; } }catch(Exception e){ } actionString = "MOVE"; break; default: actionString = ""; } Wouldnt post this much code if I wasnt at an absolute loss of what I'm doing wrong. I simply can not get a good understanding of how multiTouching works. basicly movingPoint changes for both my first and second finger. I bind it to a box, but aslong as I hold one finger within this box, it changes its value based on where my second finger touches. It moves in the right direction and nothing gives an error, the problem is the speed-change, its almost like it adds up the two touchingPoints.

    Read the article

  • Triangle Line-Segment Intersection - detecting near misses

    - by Will
    A ray is a very poor approximation of a player! I think approximating a player with a sphere traveling a straight line each game tick will solve my problems of the player intersecting edges of scenery because their line segment missed it yet their own model is not infinitely thin... I have a 3D triangle and a line segment. I have the normal triangle-line-segment intersection code which I admit I have only a woolly grasp of. To model movement and compute collisions of the player I have to determine if a line passes within sphere-radius of a triangle. But I can find no convenient line near-miss intersection code! Here's the classic triangle intersection ### commented ### code with my starting assumptions: function triangle_ray_intersection(a,b,c,ray_origin,ray_dir,ray_radius) { // http://softsurfer.com/Archive/algorithm_0105/algorithm_0105.htm#intersect_RayTriangle%28%29 // get triangle edge vectors and plane normal var u = vec3_sub(b,a); var v = vec3_sub(c,a); var n = vec3_cross(u,v); if(n[0]==0 && n[1]==0 && n[2]==0) return null; // triangle is degenerate var w0 = vec3_sub(ray_origin,a); var j = vec3_dot(n,ray_dir); if(Math.abs(j) < 0.00000001) { //### if parallel, might still pass within ray_radius of it return null; // parallel, disjoint or on plane } var i = -vec3_dot(n,w0); // get intersect point of ray with triangle plane var k = i / j; if(k < 0.0) return null; // ray goes away from triangle //### as its a line segment, k > 1+ray_radius means no intersect var hit = vec3_add(ray_origin,vec3_scale(ray_dir,k)); // intersect point of ray and plane // is I inside T? //### here I'm a bit lost; this is presumably computing barycentric coordinates? var uu = vec3_dot(u,u); var uv = vec3_dot(u,v); var vv = vec3_dot(v,v); var w = vec3_sub(hit,a); var wu = vec3_dot(w,u); var wv = vec3_dot(w,v); var D = uv * uv - uu * vv; var s = (uv * wv - vv * wu) / D; //### therefore, compute if its within ray_radius scaled to the 0..1 of barycentric coordinates? if(s<0.0 || s>1.0) return null; // I is outside T var t = (uv * wu - uu * wv) / D; if(t<0.0 || (s+t)>1.0) return null; // I is outside T //### finally, if it passses a barycentric test it might still be too far //### to a point; must check that its distance from a corner is within ray_radius too if more than one barycentric coord is >1 //### so we have rounded corners... return [hit,n]; // I is in T } Given the distance between the point of plane intersection and each corner, I ought to be able to determine distance at world scale of how far beyond the edge - beyond 1.0 in barycentric coordinates for each axis - that point is... At this point my head explodes! Is this the right track? What's the actual code? UPDATE: you can earn 100 pts on SO if you answer this question there...! How can you determine if a line segment passes within some distance of a triangle?

    Read the article

< Previous Page | 12 13 14 15 16 17  | Next Page >