Search Results

Search found 6433 results on 258 pages for 'trouble shooting'.

Page 33/258 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • Monkey Hunter algorithm - Interview question [closed]

    - by Estefany Velez
    Question asked in an Interview: You are a hunter in the forest. A monkey is in the trees, but you don't know where and you can't see it. You can shoot at the trees, you have unlimited ammunition. Immediately after you shoot at a tree, if the monkey was in the tree, he falls and you win. If the monkey was not in the tree, he jumps (randomly) to an adjacent tree (he has to). Find an algorithm to get the monkey in the fewest shots possible. SOLUTION: The correct answer according to me was in the comments, credit to @rtperson: You could eliminate this possibility by shooting each tree twice as you sweep left, giving you a worst case of O(2n). EDIT: ...that is, a worst case of O(2n-1). You don't need to shoot the last tree twice.

    Read the article

  • Do you think code is self documenting?

    - by Desolate Planet
    This is a question that was put to me many years ago as a gradute in a job interview and it's kind of picked at my brain now and again and I've never really found a good answer that satisfies me. The interviewer in question was looking for a black and white answer, there was no middle ground. I never got the chance to ask about the rationale behind the question, but I'm curious why that question would be put to a developer and what you would learn from a yes or no answer? From my own point of view, I can read Java, Python, Delphi etc, but if my manager comes up to me and asks me how far along in a project I am and I say "The code is 80% complete" (and before you start shooting me down, I've heard this uttered in a couple of offices by developers), how exactly is that self documenting? Apologies if this question seems strange, but I'd rather ask and get some opinions on it to gain a better understanding of why it would be put to someone in an interview.

    Read the article

  • Can't start webcam for google video services

    - by wisemonkey
    I've got Ubuntu 11.10 64 bit and have installed the google video chat plugin. However webcam doesn't seem to work (black screen -- no video at all). For cheese it works but shows really bad (black and white kinda) image. Following some link I installed guvcview if I start it then image looks neat. Any suggestions on how can it be fixed? If it helps I've tried the solution: $ sudo mv /opt/google/talkplugin/GoogleTalkPlugin /opt/google/talkplugin/GoogleTalkPlugin.old $ sudo gedit /opt/google/talkplugin/GoogleTalkPlugin and putting following lines in: #!/bin/sh LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /opt/google/talkplugin/GoogleTalkPlugin.old OR #!/bin/sh LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so /opt/google/talkplugin/GoogleTalkPlugin.old Cause I've both files. Finally $sudo chmod +x /opt/google/talkplugin/GoogleTalkPlugin.old I closed and reopened chrome then started gmail tried video call -- black screen :-/ Ok so today finally google+ provided me with trouble shoot link and advised me: The plug-in won't install If you're having trouble installing the plug-in, or are receiving a message asking you to reinstall it, you should check to make sure your configuration is right. To do so simply: Check to make sure the Google Talk Plugin Video Accelerator and Google Talk NPAPI Plugin are enabled. If you're using Chrome you can type about:plugins in your browser to display your plug-ins. Make sure you're not using Internet Explorer 64-bit (this is a browser version that is 64 bit as opposed to 32 bit). Ensure that you don't have any "click to run" extensions enabled. If you're still experiencing this issue after checking your configuration you can follow these steps: Refresh the browser page. Close any running Google Talk plug-in processes. Close all open and running browser processes. Restart your computer. Uninstall and then reinstall the plug-in. Try a different browser such as Google Chrome or Mozilla Firefox. I looked in about:plugins for chrome and firefox: I don't have Google Talk NPAPI Plugin, does that matter? and I thought its installed with google talk plugin or no?

    Read the article

  • DPKG errors after upgrade to 12.10

    - by James Wulfe
    So I was doing fine then i upgraded my system to 12.10 and now i cant get my system to update all of its packages properly. no matter what i do, cleaning apt cache, manual install using dpkg, etc, i just cant get them to install. what is happening here and how do i fix this. if i would have thought 12.10 would be this much of a hassle i would have never upgraded..... here is a sampling of the code that returns from "apt-get -f install" Preparing to replace usb-modeswitch-data 20120120-0ubuntu1 (using .../usb-modeswitch-data_20120815-1_all.deb) ... /var/lib/dpkg/info/usb-modeswitch-data.prerm: 4: /var/lib/dpkg/info/usb-modeswitch-data.prerm: dpkg-maintscript-helper: Input/output error dpkg: warning: subprocess old pre-removal script returned error exit status 2 dpkg: trying script from the new package instead ... /var/lib/dpkg/tmp.ci/prerm: 4: /var/lib/dpkg/tmp.ci/prerm: dpkg-maintscript-helper: Input/output error dpkg: error processing /var/cache/apt/archives/usb-modeswitch-data_20120815-1_all.deb (--unpack): subprocess new pre-removal script returned error exit status 2 /var/lib/dpkg/info/usb-modeswitch-data.postinst: 7: /var/lib/dpkg/info/usb-modeswitch-data.postinst: dpkg-maintscript-helper: Input/output error dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/network-manager_0.9.6.0-0ubuntu7_i386.deb /var/cache/apt/archives/pcmciautils_018-8_i386.deb /var/cache/apt/archives/unity-common_6.10.0-0ubuntu2_all.deb /var/cache/apt/archives/whoopsie_0.2.7_i386.deb /var/cache/apt/archives/usb-modeswitch_1.2.3+repack0-1ubuntu3_i386.deb /var/cache/apt/archives/usb-modeswitch-data_20120815-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) It is also just these 6 packages only. no other packages have given me this kind of trouble. well i should say as of now. It was just 5, but them i got an update for unity, and now unity-common is added to the trouble makers. which prevents me from further upgrading the actual unity package as this package is a dependancy.....

    Read the article

  • Tell me why I should bother using Linux if it's all about problems getting the OS to install or work properly? [closed]

    - by Vilhjalmur Magnussin
    Why should I spend day's trying to get Ubuntu to either install and/or work properly? I'm using an Acer Timeline X laptop and if I install 10.04 the wireless doesn't work, and if I try installing 11.04 it either won't install, or if it installs it's full of bugs causing my computer to freeze all the time. So please, I'm all open ears. Someone give me one or two good reasons to continue wasting time (in hope it eventually works) before I decide to focus my time on other things like productivity (using Windows like I've been doing successfully the last 10 years). This is the second time I give Ubuntu a try, the first time was in 2010 using Ubuntu Studio and Ubuntu Desktop, and it ended with me shifting back to Windows since I had spent more time getting everything to work than actually working while trying Ubuntu. I really don't understand why it needs to be like this. Why go on trying when all I see is forums full of discussions about problems which people are having difficulties fixing. Or maybe there is just one special type of computer which works well with Linux? Would very much like to know which computer that is. SO please, if it's not to much trouble I really want to here from someone who has something good to say about going through all this trouble just to get a working environment up and running since I already have a working environment up and running called Windows. Thanks, Villi.

    Read the article

  • Entity Framework and distributed Systems

    - by Dirk Beckmann
    I need some help or maybe only a hint for the right direction. I've got a system that is sperated into two applications. An existing VB.NET desktop client using Entity Framework 5 with code first approach and a asp.net Web Api client in C# that will be refactored right yet. It should be possible to deliver OData. The system and the datamodel is still involving and so migrations will happen in undefined intervalls. So I'm now struggling how to manage my database access on the web api system. So my favourd approch would be us Entity Framework on both systems but I'm running into trouble while creating new migrations. Two solutions I've thought about: Shared Data Access dll The first idea was to separate the data access layer to a seperate project an reference from each of the systems. The context would be the same as long as the dll is up to date in each system. This way both soulutions would be able to make a migration. The main problem ist that it is much more complicate to update a web api system than it is with the client Click Once Update Solution and not every migration is important for the web api. This would couse more update trouble and out of sync libraries Database First on Web Api The second idea was just to use the database first approch an on web api side. But it seems that all annotations will be lost by each model update. Other solutions with stored procedures have been discarded because of missing OData support and maintainability. Does anyone run into same conflicts or has any advices how such a problem can be solved!

    Read the article

  • Script / App to unRAR files, and only delete the archives which were sucessfully expanded.

    - by Jeremy
    I have a cron job which runs a script to unrar all files in a certain directory (/rared for argument's sake) and place the expanded files in /unrared. I would like to change this script so that it deletes the original rar archives from /rared only if they successfully extracted. This does not mean that unrar has reported that they have been fully extracted, because I have had data corruption during decompression before. Ideally (pie-in-the-sky, just to give you an idea of what I'm shooting for,) the unrar program would include this functionality, comparing an expected md5sum value with the actual md5sum value and only deleting the archive if they match. I don't mind scripting this entire process if I have to, but there must be a better way than unraring twice and comparing md5sums.

    Read the article

  • 20 to 40 seconds pause during the boot on 12.04

    - by Vilmantas Baranauskas
    I've just installed new ASRock B75M-ITX Mainboard and fresh Ubuntu 12.04 on it. During the boot, there is a 20 to 40 seconds pause when goa-daemon is starting (/var/log/syslog): Jul 7 11:13:28 sirius goa[1933]: goa-daemon version 3.4.0 starting [main.c:112, main()] Jul 7 11:13:51 sirius kernel: [ 102.771893] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen Any ideas what is wrong and how should I proceed trouble-shooting this? EDIT: Thank you for the tip regarding ATA. I've found following in the logs: Jul 8 10:54:20 sirius kernel: [ 6.007532] ata1: link is slow to respond, please be patient (ready=0) Jul 8 10:54:20 sirius kernel: [ 10.648618] ata1: COMRESET failed (errno=-16) The problem vanished when I've reconnected the Intel G1 SSD from SATA3 to SATA2 connector.

    Read the article

  • Do you think code is self documenting?

    - by Desolate Planet
    This is a question that was put to me many years ago as a gradute in a job interview and it's nagged at my brain now and again and I've never really found a good answer that satisfied me. The interviewer in question was looking for a black and white answer, there was no middle ground. I never got the chance to ask about the rationale behind the question, but I'm curious why that question would be put to a developer and what you would learn from a yes or no answer? From my own point of view, I can read Java, Python, Delphi etc, but if my manager comes up to me and asks me how far along in a project I am and I say "The code is 80% complete" (and before you start shooting me down, I've heard this uttered in a couple of offices by developers), how exactly is that self documenting? Apologies if this question seems strange, but I'd rather ask and get some opinions on it to gain a better understanding of why it would be put to someone in an interview.

    Read the article

  • How are trajectories calculated and transmitted to other players in Multi-Player ?

    - by giulio
    I play alot of COD4. And can see tracers for gunfire, missles, care packages fall from helicopters etc. There is alot of activity. I am curious to know the algorithm (at a high level) that manages all this action when you have 20 people on a map shooting each other to death ? This question touches on the subject but doesn't ask for a more in-depth answer as to how you the developers go about calculating and transmitting movement and collision detection for projectiles, be it missles/bullets or any other object that is flying through the air in real-time.

    Read the article

  • State changes in entities or components

    - by GriffinHeart
    I'm having some trouble figuring how to deal with state management in my entities. I don't have trouble with Game state management, like pause and menus, since these are not handled as an entity component system; just with state in entities/components. Drawing from Orcs Must Die as an example, I have my MainCharacter and Trap entities which only have their components like PositionComponent, RenderComponent, PhysicsComponent. On each update the Entity will call update on its components. I also have a generic EventManager with listeners for different event types. Now I need to be able to place the traps: first select the trap and trap position then place the trap. When placing a trap it should appear in front of the MainCharacter, rendered in a different way and following it around. When placed it should just respond to collisions and be rendered in the normal way. How is this usually handled in component based systems? (This example is specific but can help figure out the general way to deal with entities states.)

    Read the article

  • Is it bad practice to use the same name for arguments and members?

    - by stijn
    Sometimes I write constructor code like class X { public: X( const int numberOfThingsToDo ) : numberOfThingsToDo( numberOfThingsToDo ) { } private: int numberOfThingsToDo; }; or in C# class X { public X( int numberOfThingsToDo ) { this.numberOfThingsToDo = numberOfThingsToDo; } private int numberOfThingsToDo; } I think the main reason is that when I come up with a suitable member name, I see no reason to use a different one for the argument initializing it, and since I'm also no fan of using underscores the easiest is just to pick the same name. After all it's suitable. Is this considered bad practice however? Any drawbacks (apart from shooting yourself in the foot when forgetting the this in C#)?

    Read the article

  • Quicker alternative to gnome-screenshot? (no animation!, quick!, no frills)

    - by humanityANDpeace
    I want to take screenshots in Ubuntu. This is normally no big problem with the standard gnome-screenshot program is working good. But just now I ran into trouble because I need to take a screenshot of some window which appears only for about 0.5 seconds. The Problem is that the gnome-screenshot is using a (from me at least disappreciated animation when used... this fancy thing kind of delays all and I really cannot manage to take the picture..) So what I need is a "no frills" "down to the ground" alternative to the gnome-screenshot. I really disklike the animation - now because it makes me so much trouble. I also hate it that there appears to be no way to disable it after all. Everybody is forced to accept this animation that looks like "a flash light is going on". I am not against being fancy... but this animation in gnome-screenshot is impacting/reducing its functionality. Indeed in my case the shortly appearing window hides when loosing focus. The animaiton -as I assume- triggers the "loosing of focus". So because of the animation I cannot take the screenshot. Anyhow I have looked for "less frills" alternatives and I have found that shutter is a programme that commes with quite some baggage.. But maybe somebody knows a very light-weight programm that serves the very sinple (do nothing else) purpose of just taking a screenshot...

    Read the article

  • Lag compensation with networked 2D games

    - by Milo
    I want to make a 2D game that is basically a physics driven sandbox / activity game. There is something I really do not understand though. From research, it seems like updates from the server should only be about every 100ms. I can see how this works for a player since they can just concurrently simulate physics and do lag compensation through interpolation. What I do not understand is how this works for updates from other players. If clients only get notified of player positions every 100ms, I do not see how that works because a lot can happen in 100ms. The player could have changed direction twice or so in that time. I was wondering if anyone would have some insight on this issue. Basically how does this work for shooting and stuff like that? Thanks

    Read the article

  • 3rd Annual South Florida SQL Saturday - August 13th!

    - by ScottKlein
    The 3rd annual South Florida SQL Saturday event will be help August 13th, 2011 at Nova Southeastern University in Davie, FL. This is a change in venue from last year as DeVry is in the middle of a major remodling project. We has almost 450 last year, and we expect to have over 500 this year with great speakers such as Andy Warren, Herve Roggero, and more! As always, we our goal is to feed you well, so we are shooting for some hot lunch food this year. We are working on that now and will update you as soon as we firm it up. One of the things we will be trying this year is 90-100 minute sessions on a couple of tracks. We strongly feel that several topics are just getting warmed up in 45 minutes, so we are going to experiment with 90-100 minute sessions on some of the BI topics. We would love to see you there!

    Read the article

  • Not enough space left in the hard drive. How to proceed?

    - by jimbobjgr
    Where do I begin... I can hardly do anything on Ubuntu 12.04. I am very close to removing and returning to Windows. First I could not load it because the graphics appeared to be running low but somehow that stopped happening and I could log on. Now I can not download anything or I get this message Cannot write: No space left on device. I tried trouble shooting this issue but every time I try and fix the problem I am blocked by this message E: Write error - write (28: No space left on device) E: Can't mmap an empty file E: Failed to truncate file - ftruncate (9: Bad file descriptor) E: The package lists or status file could not be parsed or opened. $ OLD=$(ls -tr /boot/vmlinuz-* | head -n -2 | cut -d- -f2- | awk '{print "linux-image-" $0}') Ubuntu is also running incredibly slow and I cant get anything done! Please help this is driving me mad!

    Read the article

  • Playing a death anim on an enemy that I want to remove

    - by Max
    I've been trying to find a tutorial on how to best make animations in Android. I already have some animations for my enemies and my character that are controlled by rectangles and changing rectangleframe between updates using a picture like this: When I'm shooting my enemies they lose HP, and when their HP == 0 they get removed. As long as I'm using an arrayList (which I do for all enemies and bullets) I'm fine, since I can just use list.remove(i). But when I'm on a boss-level and the Boss's HP == 0, I want to remove him and play an animation of an explosion of stars before the "End-screen". Is there a preferred way to do temporary animations like this? If you can give me an example or redirect me to a tutorial, I'd be really grateful!

    Read the article

  • How to display a projectile trajectory in c++? [on hold]

    - by sana
    I am trying to make a game of Gorillas in c++ whose specification is somewhat like....... is : "In this game both players should select their position on a level scaled ground. Scale of the ground should be from 0 to 20 divisions, each division corresponding to 10 meters. Each player will enter an angle and initial velocity (limits of both should be defined) and the player will hurl a stone with this velocity at given angle. Stone will make a projectile and if it hits the other player then shooting player wins. A random effect of air should also be incorporated. Air will support one player and resist other. Velocity of air should be generated randomly, within some limits, and subtracted or added in the horizontal velocity of the stone. An arrow of suitable length shall represent air direction and velocity. The player who hits first wins." How do I display the trajectory of the stone????

    Read the article

  • Actionscript - Dropping Multiple Objects Using an Array?

    - by Eratosthenes
    I'm trying to get these fireBalls to drop more often, im not sure if im using Math.random correctly also, for some reason I'm getting a null reference because I think the fireBalls array waits for one to leave the stage before dropping another one? this is the relevant code: var sun:Sun=new Sun var fireBalls:Array=new Array() var left:Boolean; function onEnterFrame(event:Event){ if (left) { sun.x = sun.x - 15; }else{ sun.x = sun.x + 15; } if (fireBalls.length>0&&fireBalls[0].y>stage.stageHeight){ // Fireballs exit stage removeChild(fireBalls[0]); fireBalls.shift(); } for (var j:int=0; j<fireBalls.length; j++){ fireBalls[j].y=fireBalls[j].y+15; if (fireBalls[j].y>stage.stageHeight-fireBall.width/2){ } } if (Math.random()<.2){ // Fireballs shooting from Sun var fireBall:FireBall=new FireBall; fireBall.x=sun.x; addChild(fireBall); fireBalls.push(fireBall); } }

    Read the article

  • What exactly does an installer do and why might I need one?

    - by Jan
    this is probably the noob-question of the day: So I've written this game. Now there's the .exe file that does the work, a folder with my beautiful, beautiful assets and a bunch of .dll files and other stuff that I probably shouldn't touch. To run the game, I copy the whole lot to the desired computer, double-click the .exe file and start shooting some dudes. Yay! But what exactly is the difference between that and using an installer? What else does an installer do besides copying files and looking more professional than a .zip-file? Is there generally a lot of patching/configuring involved when trying to make a game run on a different computer? I tested my game on all windows computers I could get my greedy fingers on and it works great. Thanks for your time.

    Read the article

  • Bitmap & Object Collision Help

    - by MarkEz
    Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the sprite disappears, this is in the Sprite class: public boolean isCollision(Bitmap other) { // TODO Auto-generated method stub if(other.getWidth() > x && other.getWidth() < x + width && >other.getHeight() > y && other.getHeight() < y + height); return true; }

    Read the article

  • Bitmap & Object Collision Help

    - by MarkEz
    Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the sprite disappears, this is in the Sprite class: public boolean isCollision(Bitmap other) { if(other.getWidth() > x && other.getWidth() < x + width && >other.getHeight() > y && other.getHeight() < y + height); return true; }

    Read the article

  • Windows Phone 7 Networked Game

    - by Craig
    Im creating a multiplayer asteroids type game for the Windows Phone 7, 2 players can challenge each other over who will get the highest score. On each players phone the opponent is displayed and both go about shooting asteroids and enemies. In an assignment I have due I would like to talk about the packet design, what would be the least amount of info that I can send over the connection? Instead of constantly having to send each players position, asteroid position, bullet position and enemy position etc. Or would all that data constantly need to be sent?

    Read the article

  • Temporary animations

    - by Max
    I've been trying to find a tutorial on how to best make animations in Android. I already have some animations for my enemies and my character that are controlled by rectangles and changing rectangleframe between updates using a picture like this: When I'm shooting my enemies they lose HP, and when their HP == 0 they get removed. aslong as im using an arrayList (which I do for all enemies and bullets) I'm fine, since I can just use list.remove(i). But when I'm on a boss-level and the Boss's HP == 0, I want to remove him and play an animation of an explosion of stars before the "End-screen". Is there a preferred way to do temporary animations like this? If you can give me an example or redirect me to a tutorial, I'd be really grateful!

    Read the article

  • what is the best way to add avoidance behaviour to an AI framework?

    - by SirYakalot
    I have a small AI framework for a shooting based game. Although this is rarely needed, as when agents are close to each other they are usually fighting, I would none the less like some way of implementing avoidance behaviour. For example, if in the future I wanted to take away their weapons and have many of them wonder around in a crowd, how would I make them not hit / pass through each other, but instead avoid each other? two ideas I had would be to add steering behaviour and allow that to deviate from their path, or to use a dynamic pathfinding technique. Are there better ways? What is the more respected practice?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >