Search Results

Search found 8208 results on 329 pages for 'music player daemon'.

Page 60/329 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Error when updating enumerated value?

    - by igrad
    Once upon a time, there was a Player class (simplified version) enum animState{RUNNING,JUMPING,FALLING,IDLING}; class Player { public: Player(int x, int y); void handle(); void show(); ~Player(); private: int m_x; int m_y; animState playerAnimState; } There was also a "handle" function-member, which took care of all movement and collisions for the player: #include "player.h" void Player::handle() { if(/*Player presses 'D' key*/) { m_x++; playerAnimState = RUNNING; } //Other stuff that is just there to look nice Through lots of experimentation with "//" and "/**/", I've found that I consistently get an error at "playerAnimState = RUNNING." Have I broken some enumeration rule? Does my laptop really suck that bad? I hate to post a "fix my code for me" question, but I'm not very seasoned with enums.

    Read the article

  • Media Player Problem

    - by kostas_menu
    button.setOnClickListener(new View.OnClickListener() { public void onClick(View v){ if(mp2.isPlaying()==true) {mp2.stop(); mp.start(); } else mp.start(); } }); button2.setOnClickListener(new View.OnClickListener() { public void onClick(View v){ if(mp.isPlaying()==true) {mp.stop();mp2.start();} else mp2.start(); } }); I press the first btn and the 1st song is playing.i press the second,the first stops and the second begins.But then, as i press the first btn, the second song stops but the first song is not playing...please help!!:)

    Read the article

  • I want to get title from video player

    - by farrakhov-bulat
    Hello! I want to automate service myshows.ru. People on it must manually put information about movies that watched. I want to write program on c++, that get titles of movies in video players and put it to account on service. What libraries i can use for this work? P.S Sorry for my english

    Read the article

  • Flex: cannot resize player back from Full Screen

    - by Patrick
    hi, The key event is not listened by my Flex app. Since it is really simple code, I cannot understand where the problem is... init() { stage.addEventListener(KeyboardEvent.KEY_DOWN, escHandler); } private function escHandler(event:KeyboardEvent):void { debugF.text = "ESC pressed"; } thanks

    Read the article

  • What is wrong with my Watcher (incron-like) daemon?

    - by eric01
    I have installed Watcher this way: both watcher.py and watcher.ini are located in /etc I also installed pyinotify and it does work when I use python -m pyinotify -v /var/www However, I want to use the daemon and when I start watcher.py, I get weird lines on my watcher.log (see below). I also included my watcher.ini file. Note: I have the latest version of Python. The watcher.py can be found here What is wrong with what I did? Also, do I really need pyinotify? Thanks a lot for your help watcher.ini: [DEFAULT] logfile=/var/log/watcher.log pidfile=/var/run/watcher.pid [job1] watch=/var/www events=create,delete,modify recursive=true command=mkdir /home/mockfolder ## just using this as test watcher.log: 2012-09-22 04:28:23.822029 Daemon started 2012-09-22 04:28:23.822596 job1: /var/www Traceback (most recent call last): File "/etc/watcher.py", line 359, in <module> daemon.start() File "/etc/watcher.py", line 124, in start self.run() File "/etc/watcher.py", line 256, in run autoadd = self.config.getboolean(section,'autoadd') File "/usr/lib/python2.7/ConfigParser.py", line 368, in getboolean v = self.get(section, option) File "/usr/lib/python2.7/ConfigParser.py", line 618, in get raise NoOptionError(option, section) ConfigParser.NoOptionError: No option 'autoadd' in section: 'job1'

    Read the article

  • Why is my cron daemon is being killed every few minutes?

    - by user113215
    As of about a week ago, my cron daemon refuses to stay running. I'm using Debian 6 x64 on an OpenVZ virtual machine. Running something like pgrep cron shows that the daemon isn't running. I start the service with service cron start or /etc/init.d/cron start and it launches, but it disappears from the running process list after a few minutes (varying anywhere between 1 - 30 minutes before the process is killed again). Using strace -f service cron start, I can see that the process is being killed for some reason: nanosleep({60, 0}, <unfinished ...> +++ killed by SIGKILL +++ There's nothing relevant in /var/log/syslog, /var/log/messages, /var/log/auth.log, or /var/log/kern.log to explain why the the process is dying. The system has at least 800 MB of free memory, and cat /proc/loadavg returns 0.22 0.13 0.04 so resources shouldn't be the issue. With cron running, free -m reports: total used free shared buffers cached Mem: 1024 211 812 0 0 0 -/+ buffers/cache: 211 812 Swap: 0 0 0 I also tried removing and reinstalling the cron package using apt-get. Update: I initially thought the problem was a resource issues. I erased my entire VPS and started from a fresh Debian image. There is now nothing else running on the system, but even from a clean install my cron daemon is still being killed at random. What else should I check? How do I find out what's killing my crond?

    Read the article

  • User upload file above web root with php

    - by Chris
    I have a website where local bands can have a profile page, I'm implementing an upload system so that they can add songs to their profile. I want to make sure that clever visitors to my website cannot download their songs. I was thinking about uploading them to above the folder for my domain so that they cannot be accessed directly. Is this a good idea and/or possible? If not, what do you suggest I do to try and avoid users downloading songs. I'm already using a flash player to try and prevent downloads.

    Read the article

  • Processing velocity-vectors during collision as neatly as possible

    - by DevEight
    Hello. I'm trying to create a good way to handle all possible collisions between two objects. Typically one will be moving and hitting the other, and should then "bounce" away. What I've done so far (I'm creating a typical game where you have a board and bounce a ball at bricks) is to check if the rectangles intersect and if they do, invert the Y-velocity. This is a really ugly and temporary solution that won't work in the long haul and since this is kind of processing is very common in games I'd really like to find a great way of doing this for future projects aswell. Any links or helpful info is appreciated. Below is what my collision-handling function looks like right now. protected void collision() { #region Boundaries if (bal.position.X + bal.velocity.X >= viewportRect.Width || bal.position.X + bal.velocity.X <= 0) { bal.velocity.X *= -1; } if (bal.position.Y + bal.velocity.Y <= 0) { bal.velocity.Y *= -1; } #endregion bal.rect = new Rectangle((int)bal.position.X+(int)bal.velocity.X-bal.sprite.Width/2, (int)bal.position.Y-bal.sprite.Height/2+(int)bal.velocity.Y, bal.sprite.Width, bal.sprite.Height); player.rect = new Rectangle((int)player.position.X-player.sprite.Width/2, (int)player.position.Y-player.sprite.Height/2, player.sprite.Width, player.sprite.Height); if (bal.rect.Intersects(player.rect)) { bal.position.Y = player.position.Y - player.sprite.Height / 2 - bal.sprite.Height / 2; if (player.position.X != player.prevPos.X) { bal.velocity.X -= (player.prevPos.X - player.position.X) / 2; } bal.velocity.Y *= -1; } foreach (Brick b in brickArray.list) { b.rect.X = Convert.ToInt32(b.position.X-b.sprite.Width/2); b.rect.Y = Convert.ToInt32(b.position.Y-b.sprite.Height/2); if (bal.rect.Intersects(b.rect)) { b.recieveHit(); bal.velocity.Y *= -1; } } brickArray.removeDead(); }

    Read the article

  • Looking for an appropriate design pattern

    - by user1066015
    I have a game that tracks user stats after every match, such as how far they travelled, how many times they attacked, how far they fell, etc, and my current implementations looks somewhat as follows (simplified version): Class Player{ int id; public Player(){ int id = Math.random()*100000; PlayerData.players.put(id,new PlayerData()); } public void jump(){ //Logic to make the user jump //... //call the playerManager PlayerManager.jump(this); } public void attack(Player target){ //logic to attack the player //... //call the player manager PlayerManager.attack(this,target); } } Class PlayerData{ public static HashMap<int, PlayerData> players = new HashMap<int,PlayerData>(); int id; int timesJumped; int timesAttacked; } public void incrementJumped(){ timesJumped++; } public void incrementAttacked(){ timesAttacked++; } } Class PlayerManager{ public static void jump(Player player){ players.get(player.getId()).incrementJumped(); } public void incrementAttacked(Player player, Player target){ players.get(player.getId()).incrementAttacked(); } } So I have a PlayerData class which holds all of the statistics, and brings it out of the player class because it isn't part of the player logic. Then I have PlayerManager, which would be on the server, and that controls the interactions between players (a lot of the logic that does that is excluded so I could keep this simple). I put the calls to the PlayerData class in the Manager class because sometimes you have to do certain checks between players, for instance if the attack actually hits, then you increment "attackHits". The main problem (in my opinion, correct me if I'm wrong) is that this is not very extensible. I will have to touch the PlayerData class if I want to keep track of a new stat, by adding methods and fields, and then I have to potentially add more methods to my PlayerManager, so it isn't very modulized. If there is an improvement to this that you would recommend, I would be very appreciative. Thanks.

    Read the article

  • How do I rollback capistrano tasks upon failure?

    - by dchua
    In my Capistrano deploy.rb, I have a couple of daemons like delayed_jobs and fetcher, starting and stopping depending on where they are in the deployment process. This method would create problems if a deployment fails, because the daemons wouldn't be managed properly (ie. two processes spawned instead of one, or processes were shutdown without restarting itself until the next deployment). Is there anyway to prevent this from happening like a rollback code? How is deployment of daemons normally done over capistrano?

    Read the article

  • Does Iphone supports background process or services?

    - by Fedrick
    Hi all, I am planning to develop a iphone client application to upload images from iphone gallery to amazon s3 using rest calls.so is there any library to run this application as a background process in iphone. Also is there any library to access the iphone photo gallery(Should be able access all the images,not only selected one like in UIImagePickerController) Thanks in advance for stack overflow masters for sharing their knowledge.....

    Read the article

  • Launchd agent not starting

    - by Thomi
    I'm attempting to write a launchd agent that runs a simple application for every user that logs in to the Mac OS X system. I have created a file named com.mycompany.myapp.plist and placed it in /Library/LaunchAgents. The contents of that file are: { LimitLoadToSessionType = "Aqua"; StartInterval = 10; OnDemand = NO; KeepAlive = YES; RunAtLoad = YES; Label = "com.mycompany.myapp"; Program = "/Users/thomi/myapp"; ProgramArguments = ( "/Users/thomi/myapp", "-l", "-d", ); } Initially I didn't have the StartInterval key set, since I thought the agent would start automatically. The problem is that the agent does not start unless I manually issue the following two commands: launchctl load -S Aqua -D all launchctl start com.mycompany.myapp Firther, when I run launchctl list com.mycompany.myapp I get the following output: { "Label" = "com.mycompany.myapp"; "LimitLoadToSessionType" = "System"; "OnDemand" = true; "LastExitStatus" = 0; "TimeOut" = 30; "Program" = "/Users/thomi/myapp"; ProgramArguments = ( "/Users/thomi/myapp", "-l", "-d", ); }; Notice that the LimitLoadToSessionType parameter has changed. Am I missing something here? Is there a different mechanism to start agents like this? Why has the LimitLoadToSessionType property changed?

    Read the article

  • Right way to create [self]respawning app in python

    - by grapescan
    I am using jabber bot written in python to log some MUC talks. Sometimes it drops on some network or XMPP problems. In this case I have to start it again by myself. The goal is to make it "self-respawning". I have some variants about how to do it. Bot is one process. Another process monitors its activity and starts it if bot died. Main process spawns bot subprocess and controls it. Also I think daemonizing bot process is useful here. Platform is Linux, as you could guess. What is the right way to solve this problem?

    Read the article

  • How to trace a raw (character) device stream on Unix ?

    - by Fabien
    I'm trying to trace what is transiting in a raw (character) device on an Unix system (ex: /dev/tty.baseband) for DEBUG purpose. I am thinking of creating a deamon that would: upon start rename /dev/tty.baseband to /dev/tty.baseband.old. create a raw node /dev/tty.baseband spawn two threads: Thread 1: reading /dev/tty.baseband.old writing into /dev/tty.baseband Thread 2: reading /dev/tty.baseband writing into /dev/tty.baseband.old This would work a little bit like a MITM process. I wonder if there is not a 'standard' way to do this.

    Read the article

  • Locking a file to verify a single execution of a service. How reliable?

    - by Camilo Díaz
    Hello, I am deploying a little service to an UNIX(AIX) system. I want to check if there is no active instance of that service running when starting it. How reliable is to implement that check like this? Try to acquire a lock on a file (w/ FileChannel) If succeeds, keep lock and continue execution If fails, exit and refuse to run the main body I am aware of software like the Tanuki wrapper, however, I'm longing for a simpler(maybe not portable) solution. Regarding PIDFILE(s): I want to avoid using them if possible, as I don't have administrative rights on the machine, neither knowledge in AIX's shell programming.

    Read the article

  • Ruby background service

    - by FancyDancy
    I have a TCPclient written on Ruby. I want to use it in background. Currently it has a loop: loop do end So i can run a client, and it works forever. Is there a way to run in as a service, and write a pid to file, then i'll able to kill that process by pid?

    Read the article

  • What's the correct way to stop a background process on Mac OS X?

    - by mcsheffrey
    I have an application with 2 components: a desktop application that users interact with, and a background process that can be enabled from the desktop application. Once the background process is enabled, it will run as a user launch agent independently of the desktop app. However, what I'm wondering is what to do when the user disables the background process. At this point I want to stop the background process but I'm not sure what the best approach is. The 3 options that I see are: Use the 'kill' command. Direct, but not reliable and just seems somewhat "wrong". Use an NSMachPort to send an exit request from the desktop app to the background process. This is the best approach I've thought of but I've run into an implementation problem (I'll be posting this in a separate query) and I'd like to be sure that the approach is right before going much further. Something else??? Thank you in advance for any help/insight that you can offer.

    Read the article

  • Cocoa Launch agent registering itself after installation.

    - by Unicorn
    I have created Cocoa app which is type of launch agent. To distribute this I have created package as well which installs the app and copies the launchagnet plist file in /Libraries/LaunchAgents. Now the problem is after installation i want this app to be running in user context immediately without logoff/restart. If I register this with "launchctl" from installer, using post install script, it run in root context, as installer is running in root context. Any suggestion how the agent registers itself to launchctl and runs in user context.

    Read the article

  • Can I use copyrighted images and music in my game? [duplicate]

    - by Aman Grover
    This question already has an answer here: Using modified copyrighted music in non-commercial games 3 answers I am working on my first ever project , and I have used some copyrighted images(images taken from some other well recognized games). Is it even possible that I edit the images a little bit and then use them as royalty free images? If not, then can anyone tell me some web links from where I can get royalty free images?

    Read the article

  • E3 2012 : Du nouveau pour la XBox 360 : l'application Smart Glass, Internet Explorer et XBox Music débarqueront cette année

    E3 2012 : Des nouveautés pour la XBox 360 Smart Glass, Internet Explorer et Music Smart GlassIl faut dire que pour l'instant, peu de choses ont été dévoilées à propos de Smart Glass. Sous ce nom se cache une application pour Windows 8, Windows Phone mais aussi les périphériques sous iOS afin de les utiliser comme contrôleur pour la XBox. La technologie permettra d'utiliser son PC, sa tablette ou son smartphone, pour afficher l'image mais aussi pour contrôler la XBox, donnant ainsi une meilleure interface utilisateur pour des applications comme Internet Explorer. De plus, The Verge

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >