Search Results

Search found 340 results on 14 pages for 'adrian lopez'.

Page 1/14 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to create a folder for each item in a directory?

    - by Adrian Andronic
    I'm having trouble making folders that I create go where I want them to go. For each file in a given folder, I want to create a new folder, then put that file in the new folder. My problem is that the new folders I create are being put in the parent directory, not the one I want. My example: def createFolder(): dir_name = 'C:\\Users\\Adrian\\Entertainment\\Coding\\Test Folder' files = os.listdir(dir_name) for i in files: os.mkdir(i) Let's say that my files in that directory are Hello.txt and Goodbye.txt. When I run the script, it makes new folders for these files, but puts them one level above, in 'C:\Users\Adrian\Entertainment\Coding. How do I make it so they are created in the same place as the files, AKA 'C:\Users\Adrian\Entertainment\Coding\Test Folder'?

    Read the article

  • Generate webservice proxy using oracle ant tasks

    - by adrian.muraru
    Proxy generation tends to be very slow when done using jdeveloper wizard and even more this time increases when jdeveloper is started over a remote desktop connection. So here's step-by-step howto that can be used to generate webservice proxy from your *nix shell Create a dir in your scratch area : e.g. /tmp/<username>/genproxy Get build.xml file attached, save it in the dir above and change the properties defined in it to match your ws endpoint. More specifically you need to edit: proxy.wsdl - the path (either locally or URL) where WSDL file can be accessed from proxy.handler - the handler class proxy.package - the class package where the proxy will be generated Start a new shell session (out of the ADE view if you're using one) and set the environment needed for proxy generation using ant and Oracle WebServicesAssembler genProxy [1] $ setenv ORACLE_HOME /opt/jdev_local/10.1.3/ $ setenv PATH $ORACLE_HOME/ant/bin:$PATH Note that the above env setup is needed even if you already have ORACLE_HOME set and ant utiliy available in your PATH. That way you'll be sure the proxy will be generated using the same libraries your jdeveloper is using in its wizard Generate proxy $ cd /tmp/<username>/genproxy $ ant genproxy And voila, the proxy files should be available in ./src directory. Notes: [1] More information about genProxy can be found at : http://download.oracle.com/docs/cd/B32110_01/web.1013/b28974/wsassemble.htm#CHDJJIEI [2] In my case this method is much faster then using the jdeveloper wizard (15secs compared to 25minutes) [3] There is one minor drawback though, the jdeveloper .proxy configuration file is not generated. -Adrian

    Read the article

  • Looking for a webhost to support SSRS Hosting with SQL Azure

    - by Adrian Grigore
    Since SQL Azure does not currently support SSRS, the only possible workaround is to host my own SSRS server and have it point to my SQL Azure instance for data retrieval. Now, for me it would be total overkill to rent a dedicated server with SQL server on it just for hosting SSRS. Are there any (shared) web hosters that offer SSRS hosting with third party SQL servers? I've already asked discountasp.net, but they don't allow this. Thanks, Adrian

    Read the article

  • How common are power supply failures in comparison to hard disk failures?

    - by Adrian Grigore
    Hi, My webhost offers two different types of high availability options for dedicated servers: Redundant hard disks (RAID1) Redundant hard disks (RAID1) plus redundant power supply How common is a power supply failure in comparison to hard disk failure? I know it's not possible to know the exact figures without knowing the exact hardware, but ballpark figures are good enough for me at the moment. Thanks, Adrian

    Read the article

  • C++ virtual functions.Problem with vtable

    - by adivasile
    I'm doing a little project in C++ and I've come into some problems regarding virtual functions. I have a base class with some virtual functions: #ifndef COLLISIONSHAPE_H_ #define COLLISIONSHAPE_H_ namespace domino { class CollisionShape : public DominoItem { public: // CONSTRUCTOR //------------------------------------------------- // SETTERS //------------------------------------------------- // GETTERS //------------------------------------------------- virtual void GetRadius() = 0; virtual void GetPosition() = 0; virtual void GetGrowth(CollisionShape* other) = 0; virtual void GetSceneNode(); // OTHER //------------------------------------------------- virtual bool overlaps(CollisionShape* shape) = 0; }; } #endif /* COLLISIONSHAPE_H_ */ and a SphereShape class which extends CollisionShape and implements the methods above /* SphereShape.h */ #ifndef SPHERESHAPE_H_ #define SPHERESHAPE_H_ #include "CollisionShape.h" namespace domino { class SphereShape : public CollisionShape { public: // CONSTRUCTOR //------------------------------------------------- SphereShape(); SphereShape(CollisionShape* shape1, CollisionShape* shape2); // DESTRUCTOR //------------------------------------------------- ~SphereShape(); // SETTERS //------------------------------------------------- void SetPosition(); void SetRadius(); // GETTERS //------------------------------------------------- cl_float GetRadius(); cl_float3 GetPosition(); SceneNode* GetSceneNode(); cl_float GetGrowth(CollisionShape* other); // OTHER //------------------------------------------------- bool overlaps(CollisionShape* shape); }; } #endif /* SPHERESHAPE_H_ */ and the .cpp file: /*SphereShape.cpp*/ #include "SphereShape.h" #define max(a,b) (a>b?a:b) namespace domino { // CONSTRUCTOR //------------------------------------------------- SphereShape::SphereShape(CollisionShape* shape1, CollisionShape* shape2) { } // DESTRUCTOR //------------------------------------------------- SphereShape::~SphereShape() { } // SETTERS //------------------------------------------------- void SphereShape::SetPosition() { } void SphereShape::SetRadius() { } // GETTERS //------------------------------------------------- void SphereShape::GetRadius() { } void SphereShape::GetPosition() { } void SphereShape::GetSceneNode() { } void SphereShape::GetGrowth(CollisionShape* other) { } // OTHER //------------------------------------------------- bool SphereShape::overlaps(CollisionShape* shape) { return true; } } These classes, along some other get compiled into a shared library. Building libdomino.so g++ -m32 -lpthread -ldl -L/usr/X11R6/lib -lglut -lGLU -lGL -shared -lSDKUtil -lglut -lGLEW -lOpenCL -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86 -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/TempSDKUtil/lib/x86 -L"/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86" -lSDKUtil -lglut -lGLEW -lOpenCL -o build/debug/x86/libdomino.so build/debug/x86//Material.o build/debug/x86//Body.o build/debug/x86//SphereShape.o build/debug/x86//World.o build/debug/x86//Engine.o build/debug/x86//BVHNode.o When I compile the code that uses this library I get the following error: ../../../lib/x86//libdomino.so: undefined reference to `vtable for domino::CollisionShape' ../../../lib/x86//libdomino.so: undefined reference to `typeinfo for domino::CollisionShape' Command used to compile the demo that uses the library: g++ -o build/debug/x86/startdemo build/debug/x86//CMesh.o build/debug/x86//CSceneNode.o build/debug/x86//OFF.o build/debug/x86//Light.o build/debug/x86//main.o build/debug/x86//Camera.o -m32 -lpthread -ldl -L/usr/X11R6/lib -lglut -lGLU -lGL -lSDKUtil -lglut -lGLEW -ldomino -lSDKUtil -lOpenCL -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86 -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/TempSDKUtil/lib/x86 -L../../../lib/x86/ -L"/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86" (the -ldomino flag) And when I run the demo, I manually tell it about the library: LD_LIBRARY_PATH=../../lib/x86/:$AMDAPPSDKROOT/lib/x86:$LD_LIBRARY_PATH bin/x86/startdemo After reading a bit about virtual functions and virtual tables I understood that virtual tables are handled by the compiler and I shouldn't worry about it, so I'm a little bit confused on how to handle this issue. I'm using gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC) Later edit: I'm really sorry, but I wrote the code by hand directly here. I have defined the return types in the code. I apologize to the 2 people that answered below. I have to mention that I am a beginner at using more complex project layouts in C++.By this I mean more complex makefiles, shared libraries, stuff like that.

    Read the article

  • RUN 2012 Buenos Aires - Desarrollando para dispositivos móviles con HTML5 y ASP.NET

    - by MarianoS
    El próximo Viernes 23 de Marzo a las 8:30 hs en la Universidad Católica Argentina se realizará una nueva edición del Run en Buenos Aires, el evento Microsoft más importante del año. Particularmente, voy a estar junto con Rodolfo Finochietti e Ignacio Lopez presentando nuestra charla “Desarrollando para dispositivos móviles con HTML5 y ASP.NET” donde voy a presentar algunas novedades de ASP.NET MVC 4. Esta es la agenda completa de sesiones para Desarrolladores: Keynote: Un mundo de dispositivos conectados. Aplicaciones al alcance de tu mano: Windows Phone – Ariel Schapiro, Miguel Saez. Desarrollando para dispositivos móviles con HTML5 y ASP.NET – Ignacio Lopez, Rodolfo Finochietti, Mariano Sánchez. Servicios en la Nube con Windows Azure – Matias Woloski, Johnny Halife. Desarrollo Estilo Metro en Windows 8 – Martin Salias, Miguel Saez, Adrian Eidelman, Rubén Altman, Damian Martinez Gelabert. El evento es gratuito, con registro previo: http://bit.ly/registracionrunargdev

    Read the article

  • Missing functions in ruby 1.8

    - by Adrian
    I have a ruby gem that I developed with ruby 1.9, and it works. With ruby 1.8, though, it says this when I try to run it: dyld: lazy symbol binding failed: Symbol not found: _RBIGNUM_SIGN Referenced from: /Users/Adrian/Desktop/num_to_bytes/ext/num_to_bytes/num_to_bytes.bundle Expected in: flat namespace dyld: Symbol not found: _RBIGNUM_SIGN Referenced from: /Users/Adrian/Desktop/num_to_bytes/ext/num_to_bytes/num_to_bytes.bundle Expected in: flat namespace Trace/BPT trap If I comment out the line that uses RBIGNUM_SIGN, it complains about other functions like rb_big_modulo. Some things work, like NUM2LONG. Here are some things I have tried: In http://github.com/ruby/ruby/blob/ruby_1_8_7/ruby.h, RBIGNUM_SIGN is defined. But in all versions of ruby I have tried, it is not there. I guessed that maybe it was defined in a different .h file. Knowing that Hpricot works with 1.8, I looked at http://github.com/hpricot/hpricot/blob/master/ext/hpricot_scan/hpricot_scan.h. It doesn't include any other files that #define it. Putting things like extern VALUE rb_big_modulo(VALUE x); at the beginning of my extension don't help. Using a brand new Ubuntu installation, I apt-getted ruby, tried to install the gem, and it didn't work either. Putting have_library 'ruby', 'rb_big_modulo' in my extconf.rb didn't work. As you can probably see, I am getting desperate (after weeks of trying things!). So, how can I get this to work? Here is the gem: http://rubygems.org/gems/num_to_bytes Here is the source: http://gist.github.com/404584

    Read the article

  • Remote Desktop fails without error message

    - by Adrian Grigore
    Hi, After rebooting my server Windows 2008 R2 server, I can't log into the remote desktop anymore. When I try to connect, the remote desktop zooms through different status messages, the last of them being "Configuring remote session" and then reverts to the initial Connection dialog again without giving me any error message. The server is seems to be up, since it's still deliverying web pages. Also, it does seem to be accepting my credentials. Is there any way to see why the connection fails? I've browsed through my system's even logs, but could not find anything related to remote desktop. Perhaps there's some hidden troubleshooting mode? Thanks, Adrian Edit: In the meantime the server has come back online. I'm not sure if it did so on it's own or if tech support did because I have not heard from them so far, but the problem is solved for the moment. It's a bit disappointing not to know the cause of thep problem though.

    Read the article

  • Backing up Windows Server 2008 R2 to FTP server

    - by Adrian Grigore
    Hi, I'm looking for an inexpensive way of backing up my Windows 2008 R2 dedicated server to an FTP server. To be any useful, the software should also be able to restore the server by using a bootable CD and the backup set stored on the FTP server. So Windows server backup seems to be out of the question. Can anyone recommend any suitable products? Preferably some you have actually tried yourself? Thanks, Adrian Edit: Just to clarify, by inexpensive I mean something that costs 250 EUR or less...

    Read the article

  • What's the maximum safe temperature for a HD Radeon 6870?

    - by Adrian Grigore
    I'm running a passively cooled HD Radeon 6870 in my PC. While using 3D Acceleration, the temperature climbs up to 95 degrees Celsius according to SpeedFan. It seems a bit hot, but on the other hand I've seen other GPUs being specified to run up to 120 Degrees Celsius. The system is very stable, but Battlefield 3 crashes every few hours or so. On the other hand it might be the game's fault and not related to the GPU temperature at all. Does anyone know where I can find some manufacturer specs on the maximum allowed temperature for this GPU? Thanks, Adrian

    Read the article

  • How can I grant read-only access to my SQL Server 2008 database?

    - by Adrian Grigore
    Hi, I'm trying to grant read-only access (in other words: select queries only) to a user account on my SQL Server 2008 R2 database. Which rights do I have to grant to the user to make this work? I've tried several kinds of combinations of permissions on the server and the database itself, but in all cases the user could still run update queries or he could not run any queries (not even select) at all. The error message I always got was The server principal "foo" is not able to access the database "bar" under the current security context. Thanks for your help, Adrian

    Read the article

  • What would happen in a Software Raid 1 of one HDD and one SSD?

    - by Adrian Grigore
    Hi, I'm running my Windows 7 installation and all of my apps from an SSD for performance reasons. Since SSD's can instantly die at any moment, I'm looking for some kind of data backup strategy. Right Now I regularly backing up the drive image on a hard disk, but that only happens once per day, which is not enough for my taste. So I got an idea: What if I created a software raid 1 of the SSD and partition on my Hard disk? All data would be mirrored on both drives, making this a lot safer. But what about performance? Will Windows 7 detect that the SSD is faster than the hard drive and always read from the SSD? Or will it randomly read from both, thus reducing read performance? Thanks, Adrian Edit: I just found this article which basically answers my question. Feel free to close this post.

    Read the article

  • Msys cd .. command takes me to home directory instead of parent

    - by Adrian
    I'm using Msys on Windows 7 with what I believe to be a Bash shell. I want to navigate the following directory structure: Drive (M:) +--- Coding +--- CPP +--- projects +--- other_folder_1 +--- other_folder_2 My fstab file contains the following line: M:/Coding/CPP/projects/ /home/Adrian/ ... which makes the projects folder my starting directory when opening the shell. Unfortunately when I try to cd .. out of projects, I end up in /home instead of CPP. I imagine this might be related to what I did in the fstab file. Is there any way for me to retain the projects folder as my starting directory while being able to cd into its parent directories?

    Read the article

  • XNA 3D model collision is inaccurate

    - by Daniel Lopez
    I am creating a classic game in 3d that deals with asteriods and you have to shoot them and avoid being hit from them. I can generate the asteroids just fine and the ship can shoot bullets just fine. But the asteroids always hit the ship even it doesn't look they are even close. I know 2D collision very well but not 3D so can someone please shed some light to my problem. Thanks in advance. Code For ModelRenderer: using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace _3D_Asteroids { class ModelRenderer { private float aspectratio; private Model model; private Vector3 camerapos; private Vector3 modelpos; private Matrix rotationy; float radiansy = 0; private bool isalive; public ModelRenderer(Model m, float AspectRatio, Vector3 initial_pos, Vector3 initialcamerapos) { isalive = true; model = m; if (model.Meshes.Count == 0) { throw new Exception("Invalid model because it contains zero meshes!"); } modelpos = initial_pos; camerapos = initialcamerapos; aspectratio = AspectRatio; return; } public float RadiusOfSphere { get { return model.Meshes[0].BoundingSphere.Radius; } } public BoundingBox BoxBounds { get { return BoundingBox.CreateFromSphere(model.Meshes[0].BoundingSphere); } } public BoundingSphere SphereBounds { get { return model.Meshes[0].BoundingSphere; } } public Vector3 CameraPosition { set { camerapos = value; } get { return camerapos; } } public bool IsAlive { get { return isalive; } } public Vector3 ModelPosition { set { modelpos = value; } get { return modelpos; } } public void RotateY(float radians) { radiansy += radians; rotationy = Matrix.CreateRotationY(radiansy); } public Matrix RotationY { set { rotationy = value; } get { return rotationy; } } public float AspectRatio { set { aspectratio = value; } get { return aspectratio; } } public void Kill() { isalive = false; } public void Draw(float scale) { Matrix world; if (rotationy == new Matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) { world = Matrix.CreateScale(scale) * Matrix.CreateTranslation(modelpos); } else { world = rotationy * Matrix.CreateScale(scale) * Matrix.CreateTranslation(modelpos); } Matrix view = Matrix.CreateLookAt(camerapos, Vector3.Zero, Vector3.Up); Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), this.AspectRatio, 1f, 100000f); foreach (ModelMesh mesh in model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.World = world; effect.View = view; effect.Projection = projection; } mesh.Draw(); } } public void Draw() { Matrix world; if (rotationy == new Matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) { world = Matrix.CreateTranslation(modelpos); } else { world = rotationy * Matrix.CreateTranslation(modelpos); } Matrix view = Matrix.CreateLookAt(camerapos, Vector3.Zero, Vector3.Up); Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), this.AspectRatio, 1f, 100000f); foreach (ModelMesh mesh in model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.World = world; effect.View = view; effect.Projection = projection; } mesh.Draw(); } } } Code For Game1: using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace _3D_Asteroids { /// <summary> /// This is the main type for your game /// </summary> public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; int score = 0, lives = 5; SpriteBatch spriteBatch; GameState gstate = GameState.OnMenuScreen; Menu menu = new Menu(Color.Yellow, Color.White); SpriteFont font; Texture2D background; ModelRenderer ship; Model b, a; List<ModelRenderer> bullets = new List<ModelRenderer>(); List<ModelRenderer> asteriods = new List<ModelRenderer>(); float time = 0.0f; int framecount = 0; SoundEffect effect; public Game1() { graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferWidth = 1280; graphics.PreferredBackBufferHeight = 796; graphics.ApplyChanges(); Content.RootDirectory = "Content"; } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); } /// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); font = Content.Load<SpriteFont>("Fonts\\Lucida Console"); background = Content.Load<Texture2D>("Textures\\B1_stars"); Model p1 = Content.Load<Model>("Models\\p1_wedge"); b = Content.Load<Model>("Models\\pea_proj"); a = Content.Load<Model>("Models\\asteroid1"); effect = Content.Load<SoundEffect>("Audio\\tx0_fire1"); ship = new ModelRenderer(p1, GraphicsDevice.Viewport.AspectRatio, new Vector3(0, 0, 0), new Vector3(0, 0, 9000)); } /// <summary> /// UnloadContent will be called once per game and is the place to unload /// all content. /// </summary> protected override void UnloadContent() { } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { KeyboardState state = Keyboard.GetState(PlayerIndex.One); switch (gstate) { case GameState.OnMenuScreen: { if (state.IsKeyDown(Keys.Enter)) { switch (menu.SelectedChoice) { case MenuChoices.Play: { gstate = GameState.GameStarted; break; } case MenuChoices.Exit: { this.Exit(); break; } } } if (state.IsKeyDown(Keys.Down)) { menu.MoveSelectedMenuChoiceDown(gameTime); } else if(state.IsKeyDown(Keys.Up)) { menu.MoveSelectedMenuChoiceUp(gameTime); } else { menu.KeysReleased(); } break; } case GameState.GameStarted: { foreach (ModelRenderer bullet in bullets) { if (bullet.ModelPosition.X < (ship.ModelPosition.X + 4000) && bullet.ModelPosition.Z < (ship.ModelPosition.X + 4000) && bullet.ModelPosition.X > (ship.ModelPosition.Z - 4000) && bullet.ModelPosition.Z > (ship.ModelPosition.Z - 4000)) { bullet.ModelPosition += (bullet.RotationY.Forward * 120); } else if (collidedwithasteriod(bullet)) { bullet.Kill(); } else { bullet.Kill(); } } foreach (ModelRenderer asteroid in asteriods) { if (ship.SphereBounds.Intersects(asteroid.BoxBounds)) { lives -= 1; asteroid.Kill(); // This always hits no matter where the ship goes. } else { asteroid.ModelPosition -= (asteroid.RotationY.Forward * 50); } } for (int index = 0; index < asteriods.Count; index++) { if (asteriods[index].IsAlive == false) { asteriods.RemoveAt(index); } } for (int index = 0; index < bullets.Count; index++) { if (bullets[index].IsAlive == false) { bullets.RemoveAt(index); } } if (state.IsKeyDown(Keys.Left)) { ship.RotateY(0.1f); if (state.IsKeyDown(Keys.Space)) { if (time < 17) { firebullet(); //effect.Play(); } } else { time = 0; } } else if (state.IsKeyDown(Keys.Right)) { ship.RotateY(-0.1f); if (state.IsKeyDown(Keys.Space)) { if (time < 17) { firebullet(); //effect.Play(); } } else { time = 0; } } else if (state.IsKeyDown(Keys.Up)) { ship.ModelPosition += (ship.RotationY.Forward * 50); if (state.IsKeyDown(Keys.Space)) { if (time < 17) { firebullet(); //effect.Play(); } } else { time = 0; } } else if (state.IsKeyDown(Keys.Space)) { time += gameTime.ElapsedGameTime.Milliseconds; if (time < 17) { firebullet(); //effect.Play(); } } else { time = 0.0f; } if ((framecount % 60) == 0) { createasteroid(); framecount = 0; } framecount++; break; } } base.Update(gameTime); } void firebullet() { if (bullets.Count < 3) { ModelRenderer bullet = new ModelRenderer(b, GraphicsDevice.Viewport.AspectRatio, ship.ModelPosition, new Vector3(0, 0, 9000)); bullet.RotationY = ship.RotationY; bullets.Add(bullet); } } void createasteroid() { if (asteriods.Count < 2) { Random random = new Random(); float z = random.Next(-13000, -11000); float x = random.Next(-9000, -8000); Random random2 = new Random(); int degrees = random.Next(0, 45); float radians = MathHelper.ToRadians(degrees); ModelRenderer asteroid = new ModelRenderer(a, GraphicsDevice.Viewport.AspectRatio, new Vector3(x, 0, z), new Vector3(0,0, 9000)); asteroid.RotateY(radians); asteriods.Add(asteroid); } } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); switch (gstate) { case GameState.OnMenuScreen: { spriteBatch.Begin(); spriteBatch.Draw(background, Vector2.Zero, Color.White); menu.DrawMenu(ref spriteBatch, font, new Vector2(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2) - new Vector2(50f), 100f); spriteBatch.End(); break; } case GameState.GameStarted: { spriteBatch.Begin(); spriteBatch.Draw(background, Vector2.Zero, Color.White); spriteBatch.DrawString(font, "Score: " + score.ToString() + "\nLives: " + lives.ToString(), Vector2.Zero, Color.White); spriteBatch.End(); ship.Draw(); foreach (ModelRenderer bullet in bullets) { bullet.Draw(); } foreach (ModelRenderer asteroid in asteriods) { asteroid.Draw(0.1f); } break; } } base.Draw(gameTime); } bool collidedwithasteriod(ModelRenderer bullet) { foreach (ModelRenderer asteroid in asteriods) { if (bullet.SphereBounds.Intersects(asteroid.BoxBounds)) { score += 10; asteroid.Kill(); return true; } } return false; } } } }

    Read the article

  • Thumbnailers of text and ogg files

    - by David López
    I use ubuntu 12.04 and I can see in nautilus thumbnailers of ogg (with embedded artwork) and text files, just like in figure It's a nice feature. I have a slow machine and I've installed Arch with LXDE and pcmanfm. I would like the same thumbnailers, but I can only see a few of them like in the figure I've installed nautilus, thunar, spacefm... and lots of different thumbnailers in my Arch machine, but I haven't be able to see the thumbnailers of text and ogg files. I think that maybe ubuntu uses a patched nautilus version with extended capabilities or something like this. Any idea? Thanks.

    Read the article

  • How do I get same scrollbar style for gtk-2.0 and gtk-3.0 apps?

    - by David López
    Sorry for my English mistakes, I'm Spanish. I'm using Ubuntu 11.10 in a tablet. I've removed overlay-scrollbars and I have increased the scrollbars size to use them with fingers. In /usr/share/themes/Ambiance/gtk-2.0/gtkrc I've changed: GtkScrollbar::slider-width = 23 GtkScrollbar::min-slider-length = 51 and added: GtkScrollbar::has-backward-stepper = 0 GtkScrollbar::has-forward-stepper = 0 In /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css I've changed: GtkScrollbar-min-slider-length: 51; GtkRange-slider-width: 23; (in .scrollbar item) Now my scrollbars are usable with fingers, but they seem different for gtk-2.0 and gtk-3.0 apps. In the picture the left scrollbar is a gtk-2.0 app and the right one is a gtk-3.0 I want to setup gtk2.0 bar to be exactly the same as gtk3.0, that is Make upper and lower extremes empty (oranges circles in the picture) Reduce the length of the 3 horizontal lines (black ellipse) Can somebody help me? Thanks. Hola. Uso ubuntu 11.10 en una tableta; he quitado overlay-scrollbars y he incrementado el tamaño de las barras para poder usarlas con los dedos. Concretamente en /usr/share/themes/Ambiance/gtk-2.0/gtkrc be cambiado GtkScrollbar::slider-width = 23 GtkScrollbar::min-slider-length = 51 y añadido GtkScrollbar::has-backward-stepper = 0 GtkScrollbar::has-forward-stepper = 0 En /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css he cambiado GtkScrollbar-min-slider-length: 51; GtkRange-slider-width: 23; (en el apartado.scrollbar) Mis barras son manejables con dedos, pero se ven muy distintas para aplicaciones gtk-2.0 y gtk-3.0. La barra de la izquierda de la imagen es 2.0 y la de la derecha es 3.0 Quiero configurar las barras 2.0 exactamente como las 3.0, para lo que necesito Vaciar los extremos de la barra (círculos naranjas en la imagen) Reducir la longitud de las 3 líneas horizontales (elipses negras en la imagen) ¿Alguna idea? Gracias.

    Read the article

  • Model won't render in my XNA game

    - by Daniel Lopez
    I am trying to create a simple 3D game but things aren't working out as they should. For instance, the mode will not display. I created a class that does the rendering so I think that is where the problem lies. P.S I am using models from the MSDN website so I know the models are compatible with XNA. Code: class ModelRenderer { private float aspectratio; private Model model; private Vector3 camerapos; private Vector3 modelpos; private Matrix rotationy; float radiansy = 0; public ModelRenderer(Model m, float AspectRatio, Vector3 initial_pos, Vector3 initialcamerapos) { model = m; if (model.Meshes.Count == 0) { throw new Exception("Invalid model because it contains zero meshes!"); } modelpos = initial_pos; camerapos = initialcamerapos; aspectratio = AspectRatio; return; } public Vector3 CameraPosition { set { camerapos = value; } get { return camerapos; } } public Vector3 ModelPosition { set { modelpos = value; } get { return modelpos; } } public void RotateY(float radians) { radiansy += radians; rotationy = Matrix.CreateRotationY(radiansy); } public float AspectRatio { set { aspectratio = value; } get { return aspectratio; } } public void Draw() { Matrix world = Matrix.CreateTranslation(modelpos) * rotationy; Matrix view = Matrix.CreateLookAt(this.CameraPosition, this.ModelPosition, Vector3.Up); Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), this.AspectRatio, 1.0f, 10000f); model.Draw(world, view, projection); } } If you need more code just make a comment.

    Read the article

  • Wireless not working, no driver showing in the Additional Drivers window

    - by edit lopez
    I am a new user of Ubuntu. I have a Asus Q501L laptop that came preinstalled with Windows 8, but I wanted to move from Windows and try something new, so I just decided to install Ubuntu without thinking to much about it. The problem I have is that I can't install the additional drivers. When I go to to Additional Drivers nothing appears, it just says: no proprietary drivers are in use and in small letters continues: a proprietary driver has private code that Ubuntu developers can't review and improve. security and others updates are dependent on drivers vendor.. I can't even use the wireless connection. I really don't know what to do. I tried to download the drivers from Asus, but when I tried to install them it said: an error occurred while loading the archive. Also I don't know the model of the PC wireless card. If there is something I can do to find out that please tell me. Thanks!

    Read the article

  • Cufon text z-index (IE6 and IE7 stylish select box bug)

    - by Adrian
    Hello, I'm replacing some text with cufon on my page and I'm using jquery stylish select box plugin (http://www.scottdarby.com/plugins/stylish-select/0.4/) to style select boxes. The problem is that, in IE6 and IE7, select box goes under the cufonized text. (the select box is actually an <ul>). Anyone had this issue before? Thanks, Adrian

    Read the article

  • Authorization and authenthication for WinForm application

    - by Adrian
    Hi! I'm starting to develop windows application and I've been looking around for some authenthication and authorization solution available, but no luck so far. I have to be able to allow admin create users and roles, assign users to roles and define access to controls on form for specified roles (button enabled/disabled etc). Is there any solution out there or maybe someone could give me short description of solution he's using? Adrian

    Read the article

  • Selenium: Can I combine several commands into one command to be referenced by other tests without co

    - by Adrian Grigore
    Hi, I'm currently evaluating Selenium and I can imagine that I will have to perform certain steps in my tests over and over again. Is there any way to wrap several steps from a selenium test into one single step which can be referenced by other tests? It seems that this can be done with with custom coding as mentioned at in the UI-Element documentation, but I'd prefer to use the IDE if possible. Thanks, Adrian

    Read the article

  • SQL Server 2008 R2 CTP Installer crashes instantly after starting it

    - by Adrian Grigore
    Hi, I'm trying to update my existing SQL server 2008 SP1 installation with SQL Server 2008 R2 (November CTP). I started the setup and chose the upgrade option and after some time the installer told me to reboot. As soon as I confirmed with OK, it crashed. After rebooting I can't even run the setup file anymore. it crashes instantly without an error message. What's the recommended way of troubleshooting this? Thanks, Adrian

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >