problem about home-Collection of common programming errors


  • kure
    linux makefile install home
    I’m making a simple game for Ubuntu and to update the highscore list, it needs a single file at runtime, called ‘highscores.bin’.I wish to put this file at/home/(USER)/.game_nameI’ve researched a little and found that from inside a Makefile i can get the environment variable $USER. So in the Makefile, at the ‘install’ target, i’ve added:mkdir -p $(DESTDIR)home/$$USER/.game_nameBut when i run ‘sudo make install’, the Makefile installs it as:/home/root/.game_nameHow can i get the (non-root) user n

  • opiop65
    java runtime folder home
    I have no idea if I can just run this code and it will work but here:public void actionPerformed(ActionEvent e) {try{Runtime rt = Runtime.getRuntime();Process p = rt.exec(“c:\\Users\\Toby\\AppData\\Roaming\\.minecraft\\minecraft.exe”);}catch(Exception a){}}This is linked to a button, and it launches the minecraft launcher. If I want to give it to my friends, what do I have to do so that it doesn’t look for the user ‘Toby’, but instead looks for their home folder? Sorry if its confusing!

  • dythe
    android service home
    I am trying to prevent the HOME button KeyPress when a Service is runningprotected void onPause (){if (isMyServiceRunning()){Intent Act2Intent = new Intent(PhysicalTheftDialog.this, PhysicalTheftDialog.class); startActivity(Act2Intent);}else {}}private boolean isMyServiceRunning() {ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {if (“nyp.android.project.MyService”.equals(

  • cmerrell
    android children replacement home
    I’ve developed and app that is a slide show of pictures which each play a sound when you tap them. It’s like a picture book for ages 2-4.The problem is, since android won’t let you capture a home button press and essentially disable it, when parents give the phone to their child to play with unattended (brave parent), the child can inadvertenly exit the app and then make calls or otherwise tweak the phone.There are two other apps that currently have a psuedo fix for this issue. The apps are Todd

  • Droid
    java grails groovy home
    I have tried to install Grails framework and command “grails” in terminal everytime crashes. Iam using Debian Squeeze and I set in /etc/profileand ~/.profile this: export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22 export GRAILS_HOME=”/home/snitch/grails” export PATH=${PATH}:${GRAILS_HOME}/binWhat is wrong? Iam really going to get mad..

  • The Learner
    animation background cocos2d stop home
    I have an animation that I would like to keep running when the home button is pushed.I see the applicationDidEnterBackground which has stopAnimation.I’ve tried commenting it out, but the animation still stops. Is it possible to keep the animations running after the home button is pushed?Thanks.

  • Ganapathy
    android super home illegalstateexception
    I have a problem with my application and I would love some help.When I press the Home button, the app should be paused, save all state and work fine 🙂 instead i get this error:Below some code from my app. java.lang.RuntimeException: Unable topause activity{be.test.tester/be.test.tester.DataScreen}:java.lang.IllegalStateException:Derived class did not callsuper.onSaveInstanceState() atandroid.app.ActivityThread.performPauseActivity(ActivityThread.java:3641)atandroid.app.ActivityThread.performPau

  • user1769078
    android timer progress-bar countdown home
    My CountdownTimer causes a crash of the operating system Android, when I push the home button and leave my app. It does not happen with every cell phone and with every version of android. There is no Exception shown in Logcat. Here is my code:ProgressBar progressbar = (ProgressBar) findViewById(R.id.progressbar1);progressbar.setMax(100000); /* ————- BEGINNING: CountDown */final TextView myCounter = (TextView)findViewById(R.id.mycounter);counter = new CountDownTimer(100000, 1000) { @Ov

  • user1344659
    iphone crash simulator home terminate
    My simulator crashes when I try to terminate my app from the recent-apps bar.When I hit the home button and then my app, the app goes back to where it was, just like it should. But when i hit the home button, and then the home button twice, and then holding my app and press the (-). The simulator goes in the background and xcode says it crashes. When I hit my app on the simulator now, the simulators screen goes black and won’t load anything, and xcode is coming up with a crash message again.. an

  • schmru
    android crash restart home
    i’m having a problem with restarting my game after clicking home or return button on android.I’ve found partial solution in thread:Android crash when app is closed and reopened, but the game after restarting dosen’t work properly. It only shows images/sprites which also moves, but dosen’t read touches.//this is in game viewpublic void surfaceChanged(SurfaceHolder holder, int format, int width,int height) { // ce se spremeni zaslon}public void surfaceCreated(SurfaceHolder holder) {createSprites()

  • GameBug
    android button crash home
    I’ve searched over and over in this forum & google about this issue, maybe it has to do something with my thread or the way how the game is starting. This is the skeleton of the game application, please tell me what I’m doing wrong.Thanks in advance!This is what I’m doing in thread; public class GameThread extends Thread { static final long FPS = 30; private GameView view; private boolean running = false; private SurfaceHolder surfaceHolder; public boolean isSurfaceCreated = false;privat

Web site is in building