Daily Archives

Articles indexed Sunday April 15 2012

Page 14/15 | < Previous Page | 10 11 12 13 14 15  | Next Page >

  • What could be the reason for my resolution to be right running 11.10 on VirtualBox and not on machine?

    - by Hadrian de Oliveira
    When I install Ubuntu 11.10 on my VirtualBox (running on Windows 7) and update the packages, it recognizes the display as the VirtualBox display, and gives me the options of various resolutions, one of them being right for my display, all works well. But then, when i install it on my machine (like was Windows 7) it doesn't give me the resolution options, even with the system updated and the openchrome graphics driver installed (which was also when running on Virtualbox). What could be the reason for this happening? (Could the VB guest software influence on this?)

    Read the article

  • How to create a bootable system with a squashfs root

    - by cldfzn
    My goal is to be able to take a customized root file system loaded with the software I want. So far I've created a squashed filesystem using debootstrap and chroot to install the software I want on the system. The problem I am now running in to.. whenever I boot in to the system, my user accounts that were set up in the chroot do not work. First boot everything works out, second boot I can't log in. That is baffling to me. Any one know a reason or a place to start looking? Update To get a working system with a squashfs filesystem: sudo apt-get install live-boot live-boot-initramfs-tools extlinux sudo update-initramfs -u Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available. https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on. Format the target drive with ext2/3/4 and enable the bootable flag. Create the folder layout on the target drive and install extlinux: mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live extlinux -i ${TARGET}/boot/extlinux dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd cp filesystem.squashfs ${TARGET}/live Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents: DEFAULT Live LABEL Live KERNEL /boot/vmlinuz APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs TIMEOUT 10 PROMPT 0 Now you should be able to boot from the target drive in to your squashed system.

    Read the article

  • Is hiding content with JavaScript or "text-indent: -9999px" bad for SEO?

    - by Samuel
    So apparently hiding content using "display: none" is bad for SEO and seen by googlebot as being deceptive. This according to a lot of the posts I read online and questions even on this site. But what if I hide keyword rich text using javascript? A jquery example: $(function() { $('#keywordRichTextContainer').hide(); }); or using visibility hidden: $(function() { $('#keywordRichTextContainer').css({ visibility: 'hidden', position: 'absolute' }); }); Would any of these techniques cause my site to be penalized? If googlebot can't read javascript then if I'm hiding through js it shouldn't know right? What about using "text-indent: -9999px"?

    Read the article

  • Incorporating XNA into an existing project

    - by Boreal
    My game as-is is using IrrlichtLime, which I'm beginning to dislike because it hides a lot of implementation and makes adding your own implementation incredibly complex. I don't really need the scene manager for anything and the only animation I need is manual (i.e. transforming the bones programmatically). However, I've only ever used XNA in the past as a starting point with the templates. How would I take my current project and add XNA to it?

    Read the article

  • std::vector::size with glDrawElements crashes?

    - by NoobScratcher
    ( win32 / OpenGL 3.3 / GLSL 330 ) I decided after a long time of trying to do a graphical user interface using just opengl graphics to go back to a gui toolkit and so in the process have had to port alot of my code to win32. But I have a problem with my glDrawElement function. my program compiles and runs fine until it gets to glDrawElements then crashes.. which is rather annoying right. so I was trying to figure out why and I found out its std::vector::size member not returning the correct amount of faces in the unsigned interger vector eg, "vector<unsigned int>faces; " so when I use cout << faces.size() << endl; I got 68 elements???? instead of 24 as you can see here in this .obj file: # Blender v2.61 (sub 0) OBJ File: '' # www.blender.org v 1.000000 -1.000000 -1.000000 v 1.000000 -1.000000 1.000000 v -1.000000 -1.000000 1.000000 v -1.000000 -1.000000 -1.000000 v 1.000000 1.000000 -0.999999 v 0.999999 1.000000 1.000001 v -1.000000 1.000000 1.000000 v -1.000000 1.000000 -1.000000 s off f 1 2 3 4 f 5 8 7 6 f 1 5 6 2 f 2 6 7 3 <--- 24 Faces not 68? f 3 7 8 4 f 5 1 4 8 I'm using a parser I created to get the faces/vertexes in my .obj file: char modelbuffer [20000]; int MAX_BUFF = 20000; unsigned int face[3]; FILE * pfile; pfile = fopen(szFileName, "rw"); while(fgets(modelbuffer, MAX_BUFF, pfile) != NULL) { if('v') { Point p; sscanf(modelbuffer, "v %f %f %f", &p.x, &p.y, &p.z); points.push_back(p); cout << " p.x = " << p.x << " p.y = " << p.y << " p.z = " << p.x << endl; } if('f') { sscanf(modelbuffer, "f %d %d %d %d", &face[0], &face[1], &face[2], &face[3]); cout << "face[0] = " << face[0] << " face[1] = " << face[1] << " face[2] = " << face[2] << " face[3] = " << face[3] << "\n"; faces.push_back(face[0] - 1); faces.push_back(face[1] - 1); faces.push_back(face[2] - 1); faces.push_back(face[3] - 1); cout << face[0] - 1 << face[1] - 1 << face[2] - 1 << face[3] - 1 << endl; } } using this struct to store the x,y,z positions also this vector was used with Point: vector<Point>points; struct Point { float x, y, z; }; If someone could tell me why its not working and how to fix it that would be awesome I also provide a pastebin to the full source code if you want a closer look. http://pastebin.com/gznYLVw7

    Read the article

  • Unable to find good parameters for behavior of a puck in Farseer

    - by Krumelur
    EDIT: I have tried all kinds of variations now. The last one was to adjust the linear velocity in each step: newVel = oldVel * 0.9f - all of this including your proposals kind of work, however in the end if the velocity is little enough, the puck sticks to the wall and slides either vertically or horizontally. I can't get rid of this behavior. I want it to bounce, no matter how slow it is. Retitution is 1 for all objects, Friction is 0 for all. There is no gravity. What am I possibly doing wrong? In my battle to learn and understand Farseer I'm trying to setup a simple Air Hockey like table with a puck on it. The table's border body is made up from: Vertices aBorders = new Vertices( 4 ); aBorders.Add( new Vector2( -fHalfWidth, fHalfHeight ) ); aBorders.Add( new Vector2( fHalfWidth, fHalfHeight ) ); aBorders.Add( new Vector2( fHalfWidth, -fHalfHeight ) ); aBorders.Add( new Vector2( -fHalfWidth, -fHalfHeight ) ); FixtureFactory.AttachLoopShape( aBorders, this ); this.CollisionCategories = Category.All; this.CollidesWith = Category.All; this.Position = Vector2.Zero; this.Restitution = 1f; this.Friction = 0f; The puck body is defined with: FixtureFactory.AttachCircle( DIAMETER_PHYSIC_UNITS / 2f, 0.5f, this ); this.Restitution = 0.1f; this.Friction = 0.5f; this.BodyType = FarseerPhysics.Dynamics.BodyType.Dynamic; this.LinearDamping = 0.5f; this.Mass = 0.2f; I'm applying a linear force to the puck: this.oPuck.ApplyLinearImpulse( new Vector2( 1f, 1f ) ); The problem is that the puck and the walls appear to be sticky. This means that the puck's velocity drops to zero to quickly below a certain velocity. The puck gets reflected by the walls a couple of times and then just sticks to the left wall and continues sliding downwards the left wall. This looks very unrealistic. What I'm really looking for is that a puck-wall-collision does slow down the puck only a tiny little bit. After tweaking all values left and right I was wondering if I'm doing something wrong. Maybe some expert can comment on the parameters?

    Read the article

  • HedgeWar code confusion

    - by BluFire
    I looked at an open source project(HedgeWars) that was built using many programming languages such as C++ and Java. While I was looking through the code, I couldn't help noticing that all the math and physics were gone from the Java code. HedgeWars I imported the project file called "SDL-android-project" which was a sub folder to "android build" and project files. My question is where is all the math and physics inside the code? Do I have to look at the C++ code in order to see it? I think Hedgewars was originally programmed in C++ but the files are confusing be because of its size and the fact that it has several programming languages inside.

    Read the article

  • In some games, we just let the main() loop be the Player object or Table object?

    - by ????
    I was thinking that let's say if there is a game of Blackjack or MasterMind, then we should have a class called Dealer or ComputerPal, which is how the computer interact with us (as a dealer for Blackjack or as the person giving hints for MasterMind). And then there should be a Player object, and the way to play one game is aPlayer.playGame but I noticed that a book was just using the main() loop to act as the player (or as the Controller of the game), calling the Dealer methods to dealer the cards, ask for player's action, etc... 1) Is this just a lazy way to model all the proper objects? 2) If more objects are to be added, who should call the aDealer.dealCards and then ask for aPlayer.askForAction? (because it is strange to let the Player handle all the logical steps). Should there be a Table object that handle all these logic and then to play one round of game, use aTable.playGame? What is a good object design for such game?

    Read the article

  • XNA - How do I change the texture of a 2D object?

    - by Adorjan
    I am on to make a table game, I successfully figured out how to make the arraw and to move the cursor on it (by tiles). Now I wanna find out how to make that if I hit the Enter key the tile's texture change to another. I tryed like this: if (input.KeyPressed(Keys.Enter)) { cell[X,Y].Cell_texture = tile_texture; } but it doesn't really work. Hope you can help. :) Thanks!

    Read the article

  • HTML5 clicking objects in canvas

    - by Dave
    I have a function in my JS that gets the user's mouse click on the canvas. Now lets say I have a random shape on my canvas (really its a PNG image which is rectangular) but i don't want to include any alpha space. My issue lies with lets say i click some where and it involves a pixel of one of the images. The first issue is how do you work out the pixel location is an object on the map (and not the grass tiles behind). Secondly if i clicked said image, if each image contains its own unique information how do you process the click to load the correct data. Note I don't use libraries I personally prefer the raw method. Relying on libraries doesn't teach me much I find.

    Read the article

< Previous Page | 10 11 12 13 14 15  | Next Page >