Search Results

Search found 8588 results on 344 pages for 'thread abort'.

Page 151/344 | < Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >

  • OpenSSH connection trouble

    - by gnostical
    Hi, I'm trying to use Putty 0.60 to log in to an OpenSSH 5.3 server. Connections with openssh from another Linux server are possible, but Putty fails. Putty's event log tells me "software caused connection abort" right after the DH key exchange, the server log doesn't report anything (set to INFO). I analyzed the traffic with Wireshark and got a whole bunch of "TCP retransmission" and "TCP DUP ACK" after said key exchange. Sometimes I was able to log in, but at some point (usually < 2 min.) the connection froze without any logged messages. Sadly, I didn't capture a trace. The server is my own (Funtoo with genkernel and gentoo-sources 2.6.34), so I may tweak it, but I'd still like to know what causes the error. Any suggestions? Thank you!

    Read the article

  • Branching and remote heads in Mercurial

    - by hekevintran
    I created a new branch using this command: hg branch new_branch After the first commit to the new branch, the default branch becomes inactive. If this is pushed the central repository will have only one head which belongs to the new branch. When my colleague pushes his commits on the default branch, he will get this error: pushing to ssh://... searching for changes abort: push creates new remote heads! (did you forget to merge? use push -f to force) Is there anything bad about forcing the push? Why are remote heads bad? How do you work remotely on separate branches and push to one repository?

    Read the article

  • IE 8 prompts user on "slow" jQuery script

    - by Jason
    I have a form with over 100 list items that I must reorder on submit. The following code works to reorder my list without any apparent problems in Firefox; however, IE prompts with the message "A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?" If the user clicks 'No', the script will work as expected. var listitems = $(form).find('li').get(); listitems.sort(function(a, b) { var compA = $(a).attr('id'); var compB = $(b).attr('id'); return (compA - compB); }); Any ideas on how to make this more efficient?

    Read the article

  • How to abandon a hg merge?

    - by Grumdrig
    I'm new to collaborating with Mercurial. My situation: Another programmer changed rev 1 of a file to replace 4-space indents with 2-space indent. (I.e. changed every line.) Call that rev 2, pushed to the remote repo. I've committed substantive changes rev 1 with various code changes in my local workspace. Call that rev 3. I've hg pulled and hg merged without a clear idea of what was going on. The conflicts are myriad and not really substantive. So I really wish I'd changed my local repo to 2-space indents before merging; then the merge will be trivial (i'm supposing). But I can't seem to back up. I think I need to hg update -r 3 but it says abort: outstanding uncommitted merges. How can I undo the merge, changes spacing in my local repo, and remerge?

    Read the article

  • Merging branches in tortoiseHg does not seem to work

    - by Spock
    In a project, I have a default branch and another named branch. After a merging both branches and committing it, the graph in TortoiseHg shows that both branches have been merged. However, pushing to a remote repository (which is at the stage before branching, it only has the default branch), I get the message "abort: push creates new remote branches". If I'm not mistaken, I'm left with one branch after merging, so why this error message? Note: the graph still shows that I have 2 heads, is it in anyway related to this?

    Read the article

  • AS3 / Java - Socket Connection from live Flash to local java

    - by PitchBlackCat
    Hey guys, I'm trying to get a live flash that lives on a webserver to talk to a local java server, that will live on the clients PC. I'm trying to achieve this with a socket connection. (port 6000) Now, at first flash was able to connect, but it just sends <policy-file-request/>. After this nothing happens. Now, some people at Kirupa suggested to send an cross-domain-policy xml as soon as any connection is established from the java side. http://www.kirupa.com/forum/showthread.php?t=301625 However, my java server just throws the following: End Exception: java.net.SocketException: Software caused connection abort: recv failed I've already spend a great amount of time on this subject, and was wondering if anyone here knows what to do?

    Read the article

  • Java: stopping long HTTP operations

    - by kilonet
    I'm using Apache Common library for HTTP operations: HttpClient client = getClient(); PutMethod put = new PutMethod(url); FileRequestEntity countingFileRequestEntity = new FileRequestEntity(file, "application/octet-stream"); put.setRequestEntity(countingFileRequestEntity); client.executeMethod(put); put.releaseConnection(); I wonder how can safely interrup long HTTP operation. Running it in new thread and stopping it seems to be wrong way. HttpMethodBase has abort() method, but I can't understand how to use it because client.executeMethod blocks execution until it complets

    Read the article

  • Qt/C++ event loop exception handling

    - by Georg
    I am having an application heavily based on QT and on a lot of third party libs. THese happen to throw some exceptions in several cases. In a native Qt App this causes the application to abort or terminate. Often the main data model is still intact as I am keeping it in pure Qt with no external data. So I am thinking that I could also just recover by telling the user that there has occured an error in this an that process and he should save now or even decide to continue working on the main model. Currently the program jsut silently exits without even telling a story. Please help.

    Read the article

  • Simple user control for conditionally rendering nested HTML

    - by Goyuix
    What I would like to do, is be able to pass two attributes to a user control, a ListName and a Permission, like so: <uc:check id="uc" List="Shared Documents" Permission="OpenItems" runat="server"> <!-- have some HTML content here that is rendered if the permission is true --> </uc:check> Then in the actual check user control, have something similar to: <%@ Control language="C#" ClassName="check" %> <% // determine permission magic placeholder if (DoesUserHavePermissions(perm)) { // render nested HTML content } else { // abort rendering as to not show nested HTML content } %> I have read the page on creating a templated control on MSDN, and while that would work - it really seems to be a bit overkill for what I am trying to do. Is there a control that already renders content based on a boolean expression or a simpler template example? http://msdn.microsoft.com/en-us/library/36574bf6.aspx

    Read the article

  • Performance issues in android game

    - by user1446632
    I am making an android game, but however, the game is functioning like it should, but i am experiencing some performance issues. I think it has something to do with the sound. Cause each time i touch the screen, it makes a sound. I am using the standard MediaPlayer. The method is onTouchEvent() and onPlaySound1(). Could you please help me with an alternate solution for playing the sound? Thank you so much in advance! It would be nice if you also came up with some suggestions on how i can improve my code. Take a look at my code here: package com.mycompany.mygame; import java.util.ArrayList; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.media.MediaPlayer; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.webkit.WebView; import android.widget.TextView; import android.widget.Toast; public class ExampleView extends SurfaceView implements SurfaceHolder.Callback { class ExampleThread extends Thread { private ArrayList<Parachuter> parachuters; private Bitmap parachuter; private Bitmap background; private Paint black; private boolean running; private SurfaceHolder mSurfaceHolder; private Context mContext; private Context mContext1; private Handler mHandler; private Handler mHandler1; private GameScreenActivity mActivity; private long frameRate; private boolean loading; public float x; public float y; public float x1; public float y1; public MediaPlayer mp1; public MediaPlayer mp2; public int parachuterIndexToResetAndDelete; public int canvasGetWidth; public int canvasGetWidth1; public int canvasGetHeight; public int livesLeftValue; public int levelValue = 1; public int levelValue1; public int parachutersDown; public int difficultySet; public boolean isSpecialAttackAvailible; public ExampleThread(SurfaceHolder sHolder, Context context, Handler handler) { mSurfaceHolder = sHolder; mHandler = handler; mHandler1 = handler; mContext = context; mActivity = (GameScreenActivity) context; parachuters = new ArrayList<Parachuter>(); parachuter = BitmapFactory.decodeResource(getResources(), R.drawable.parachuteman); black = new Paint(); black.setStyle(Paint.Style.FILL); black.setColor(Color.GRAY); background = BitmapFactory.decodeResource(getResources(), R.drawable.gamescreenbackground); running = true; // This equates to 26 frames per second. frameRate = (long) (1000 / 26); loading = true; mp1 = MediaPlayer.create(getContext(), R.raw.bombsound); } @Override public void run() { while (running) { Canvas c = null; try { c = mSurfaceHolder.lockCanvas(); synchronized (mSurfaceHolder) { long start = System.currentTimeMillis(); doDraw(c); long diff = System.currentTimeMillis() - start; if (diff < frameRate) Thread.sleep(frameRate - diff); } } catch (InterruptedException e) { } finally { if (c != null) { mSurfaceHolder.unlockCanvasAndPost(c); } } } } protected void doDraw(Canvas canvas) { canvas.drawRect(0, 0, canvas.getWidth(), canvas.getHeight(), black); //Draw for (int i = 0; i < parachuters.size(); i++) { canvas.drawBitmap(parachuter, parachuters.get(i).getX(), parachuters.get(i).getY(), null); parachuters.get(i).tick(); } //Remove for (int i = 0; i < parachuters.size(); i++) { if (parachuters.get(i).getY() > canvas.getHeight()) { parachuters.remove(i); onPlaySound(); checkLivesLeftValue(); checkAmountOfParachuters(); } else if(parachuters.get(i).isTouched()) { parachuters.remove(i); } else{ //Do nothing } } } public void loadBackground(Canvas canvas) { //Load background canvas.drawBitmap(background, 0, 0, black); } public void checkAmountOfParachuters() { mHandler.post(new Runnable() { @Override public void run() { if(parachuters.isEmpty()) { levelValue = levelValue + 1; Toast.makeText(getContext(), "New level! " + levelValue, 15).show(); if (levelValue == 3) { drawParachutersGroup1(); drawParachutersGroup2(); drawParachutersGroup3(); drawParachutersGroup4(); } else if (levelValue == 5) { drawParachutersGroup1(); drawParachutersGroup2(); drawParachutersGroup3(); drawParachutersGroup4(); drawParachutersGroup5(); } else if (levelValue == 7) { drawParachutersGroup1(); drawParachutersGroup2(); drawParachutersGroup3(); drawParachutersGroup4(); drawParachutersGroup5(); drawParachutersGroup6(); } else if (levelValue == 9) { //Draw 7 groups of parachuters drawParachutersGroup1(); drawParachutersGroup2(); drawParachutersGroup3(); drawParachutersGroup4(); drawParachutersGroup5(); drawParachutersGroup6(); drawParachutersGroup1(); } else if (levelValue > 9) { //Draw 7 groups of parachuters drawParachutersGroup1(); drawParachutersGroup2(); drawParachutersGroup3(); drawParachutersGroup4(); drawParachutersGroup5(); drawParachutersGroup6(); drawParachutersGroup1(); } else { //Draw normal 3 groups of parachuters drawParachutersGroup1(); drawParachutersGroup2(); drawParachutersGroup3(); } } else { //Do nothing } } }); } private void checkLivesLeftValue() { mHandler.post(new Runnable() { @Override public void run() { Log.d("checkLivesLeftValue", "lives = " + livesLeftValue); // TODO Auto-generated method stub if (livesLeftValue == 3) { //Message to display: "You lost! Log.d("checkLivesLeftValue", "calling onMethod now"); parachuters.removeAll(parachuters); onMethod(); } else if (livesLeftValue == 2) { Toast.makeText(getContext(), "Lives left=1", 15).show(); livesLeftValue = livesLeftValue + 1; Log.d("checkLivesLeftValue", "increased lives to " + livesLeftValue); } else if (livesLeftValue == 1) { Toast.makeText(getContext(), "Lives left=2", 15).show(); livesLeftValue = livesLeftValue + 1; Log.d("checkLivesLeftValue", "increased lives to " + livesLeftValue); } else { //Set livesLeftValueText 3 Toast.makeText(getContext(), "Lives left=3", 15).show(); livesLeftValue = livesLeftValue + 1; Log.d("checkLivesLeftValue", "increased lives to " + livesLeftValue); } } }); } public void onMethod() { mHandler.post(new Runnable() { @Override public void run() { try { Toast.makeText(getContext(), "You lost!", 15).show(); livesLeftValue = 0; //Tell the user that he lost: android.content.Context ctx = mContext; Intent i = new Intent(ctx, playerLostMessageActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.putExtra("KEY","You got to level " + levelValue + " And you shot down " + parachutersDown + " parachuters"); i.putExtra("levelValue", levelValue); ctx.startActivity(i); System.exit(0); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); //Exit activity and start playerLostMessageActivity Toast.makeText(getContext(), "You lost!", 15).show(); livesLeftValue = 0; //Tell the user that he lost: android.content.Context ctx = mContext; Intent i = new Intent(ctx, playerLostMessageActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.putExtra("KEY","You got to level " + levelValue + " And you shot down " + parachutersDown + " parachuters"); i.putExtra("levelValue", levelValue); System.exit(0); ctx.startActivity(i); System.exit(0); } } }); } public void onPlaySound() { try { mp1.start(); } catch (Exception e) { e.printStackTrace(); mp1.release(); } } public void onDestroy() { try { parachuters.removeAll(parachuters); mp1.stop(); mp1.release(); } catch (Exception e) { e.printStackTrace(); } } public void onPlaySound1() { try { mp2 = MediaPlayer.create(getContext(), R.raw.airriflesoundeffect); mp2.start(); } catch (Exception e) { e.printStackTrace(); mp2.release(); } } public boolean onTouchEvent(MotionEvent event) { if (event.getAction() != MotionEvent.ACTION_DOWN) releaseMediaPlayer(); x1 = event.getX(); y1 = event.getY(); checkAmountOfParachuters(); removeParachuter(); return false; } public void releaseMediaPlayer() { try { mp1.release(); } catch (Exception e) { e.printStackTrace(); } } public void removeParachuter() { try { for (Parachuter p: parachuters) { if (x1 > p.getX() && x1 < p.getX() + parachuter.getWidth() && y1 > p.getY() && y1 < p.getY() + parachuter.getHeight()) { p.setTouched(true); onPlaySound1(); parachutersDown = parachutersDown + 1; p.setTouched(false); } } } catch (Exception e) { e.printStackTrace(); } } public void initiateDrawParachuters() { drawParachutersGroup1(); } public void drawParachutersGroup1() { // TODO Auto-generated method stub //Parachuter group nr. 1 //Parachuter nr. 2 x = 75; y = 77; Parachuter p1 = new Parachuter(x, y); parachuters.add(p1); //Parachuter nr.1 x = 14; y = 28; Parachuter p = new Parachuter(x, y); parachuters.add(p); //Parachuter nr. 3 x = 250; y = 94; Parachuter p3 = new Parachuter(x, y); parachuters.add(p3); //Parachuter nr. 3 x = 275; y = 80; Parachuter p2 = new Parachuter(x, y); parachuters.add(p2); //Parachuter nr. 5 x = 280; y = 163; Parachuter p5 = new Parachuter(x, y); parachuters.add(p5); x = 125; y = 118; Parachuter p4 = new Parachuter(x, y); parachuters.add(p4); //Parachuter nr. 7 x = 126; y = 247; Parachuter p7 = new Parachuter(x, y); parachuters.add(p7); //Parachuter nr. 6 x = 123; y = 77; Parachuter p6 = new Parachuter(x, y); parachuters.add(p6); } public void drawParachutersGroup2() { // TODO Auto-generated method stub //Parachuter group nr. 2 //Parachuter nr. 5 x = 153; y = 166; Parachuter p5 = new Parachuter(x, y); parachuters.add(p5); x = 133; y = 123; Parachuter p4 = new Parachuter(x, y); parachuters.add(p4); //Parachuter nr. 7 x = 170; y = 213; Parachuter p7 = new Parachuter(x, y); parachuters.add(p7); //Parachuter nr. 6 x = 190; y = 121; Parachuter p6 = new Parachuter(x, y); parachuters.add(p6); } public void drawParachutersGroup3() { // TODO Auto-generated method stub //Parachuter group nr. 3 //Parachuter nr. 2 x = 267; y = 115; Parachuter p1 = new Parachuter(x, y); parachuters.add(p1); //Parachuter nr.1 x = 255; y = 183; Parachuter p = new Parachuter(x, y); parachuters.add(p); //Parachuter nr. 3 x = 170; y = 280; Parachuter p3 = new Parachuter(x, y); parachuters.add(p3); //Parachuter nr. 3 x = 116; y = 80; Parachuter p2 = new Parachuter(x, y); parachuters.add(p2); //Parachuter nr. 5 x = 67; y = 112; Parachuter p5 = new Parachuter(x, y); parachuters.add(p5); x = 260; y = 89; Parachuter p4 = new Parachuter(x, y); parachuters.add(p4); //Parachuter nr. 7 x = 260; y = 113; Parachuter p7 = new Parachuter(x, y); parachuters.add(p7); //Parachuter nr. 6 x = 178; y = 25; Parachuter p6 = new Parachuter(x, y); parachuters.add(p6); } public void drawParachutersGroup4() { // TODO Auto-generated method stub //Parachuter group nr. 1 //Parachuter nr. 2 x = 75; y = 166; Parachuter p1 = new Parachuter(x, y); parachuters.add(p1); //Parachuter nr.1 x = 118; y = 94; Parachuter p = new Parachuter(x, y); parachuters.add(p); //Parachuter nr. 3 x = 38; y = 55; Parachuter p3 = new Parachuter(x, y); parachuters.add(p3); //Parachuter nr. 3 x = 57; y = 18; Parachuter p2 = new Parachuter(x, y); parachuters.add(p2); //Parachuter nr. 5 x = 67; y = 119; Parachuter p5 = new Parachuter(x, y); parachuters.add(p5); x = 217; y = 113; Parachuter p4 = new Parachuter(x, y); parachuters.add(p4); //Parachuter nr. 7 x = 245; y = 234; Parachuter p7 = new Parachuter(x, y); parachuters.add(p7); //Parachuter nr. 6 x = 239; y = 44; Parachuter p6 = new Parachuter(x, y); parachuters.add(p6); } public void drawParachutersGroup5() { // TODO Auto-generated method stub //Parachuter group nr. 1 //Parachuter nr. 2 x = 59; y = 120; Parachuter p1 = new Parachuter(x, y); parachuters.add(p1); //Parachuter nr.1 x = 210; y = 169; Parachuter p = new Parachuter(x, y); parachuters.add(p); //Parachuter nr. 3 x = 199; y = 138; Parachuter p3 = new Parachuter(x, y); parachuters.add(p3); //Parachuter nr. 3 x = 22; y = 307; Parachuter p2 = new Parachuter(x, y); parachuters.add(p2); //Parachuter nr. 5 x = 195; y = 22; Parachuter p5 = new Parachuter(x, y); parachuters.add(p5); x = 157; y = 132; Parachuter p4 = new Parachuter(x, y); parachuters.add(p4); //Parachuter nr. 7 x = 150; y = 183; Parachuter p7 = new Parachuter(x, y); parachuters.add(p7); //Parachuter nr. 6 x = 130; y = 20; Parachuter p6 = new Parachuter(x, y); parachuters.add(p6); } public void drawParachutersGroup6() { // TODO Auto-generated method stub //Parachuter group nr. 1 //Parachuter nr. 2 x = 10; y = 10; Parachuter p1 = new Parachuter(x, y); parachuters.add(p1); //Parachuter nr.1 x = 20; y = 20; Parachuter p = new Parachuter(x, y); parachuters.add(p); //Parachuter nr. 3 x = 30; y = 30; Parachuter p3 = new Parachuter(x, y); parachuters.add(p3); //Parachuter nr. 3 x = 60; y = 60; Parachuter p2 = new Parachuter(x, y); parachuters.add(p2); //Parachuter nr. 5 x = 90; y = 90; Parachuter p5 = new Parachuter(x, y); parachuters.add(p5); x = 120; y = 120; Parachuter p4 = new Parachuter(x, y); parachuters.add(p4); //Parachuter nr. 7 x = 150; y = 150; Parachuter p7 = new Parachuter(x, y); parachuters.add(p7); //Parachuter nr. 6 x = 180; y = 180; Parachuter p6 = new Parachuter(x, y); parachuters.add(p6); } public void drawParachuters() { Parachuter p = new Parachuter(x, y); parachuters.add(p); Toast.makeText(getContext(), "x=" + x + " y=" + y, 15).show(); } public void setRunning(boolean bRun) { running = bRun; } public boolean getRunning() { return running; } } /** Handle to the application context, used to e.g. fetch Drawables. */ private Context mContext; /** Pointer to the text view to display "Paused.." etc. */ private TextView mStatusText; /** The thread that actually draws the animation */ private ExampleThread eThread; public ExampleView(Context context) { super(context); // register our interest in hearing about changes to our surface SurfaceHolder holder = getHolder(); holder.addCallback(this); // create thread only; it's started in surfaceCreated() eThread = new ExampleThread(holder, context, new Handler() { @Override public void handleMessage(Message m) { // mStatusText.setVisibility(m.getData().getInt("viz")); // mStatusText.setText(m.getData().getString("text")); } }); setFocusable(true); } @Override public boolean onTouchEvent(MotionEvent event) { return eThread.onTouchEvent(event); } public ExampleThread getThread() { return eThread; } @Override public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) { // TODO Auto-generated method stub } public void surfaceCreated(SurfaceHolder holder) { if (eThread.getState() == Thread.State.TERMINATED) { eThread = new ExampleThread(getHolder(), getContext(), getHandler()); eThread.start(); } else { eThread.start(); } } @Override public void surfaceDestroyed(SurfaceHolder holder) { boolean retry = true; eThread.setRunning(false); while (retry) { try { eThread.join(); retry = false; } catch (InterruptedException e) { } } } }

    Read the article

  • Javascript XMLHttpRequests in Loop?

    - by usurper
    Hi, I am trying to save an array of records into a mysql database but I always get the abort message in firebug except for the last save. How do I save the records using a loop for XMLHttpRequest? Here is my code: function savingContent() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } var rowindex = 0; for (x in globalObj.AddedRows) { var rowData = "?q=" + globalObj.AddedRows[rowindex]; xmlhttp.open("POST", "insertRowData.php"+rowData, true); xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-Length",rowData.length); xmlhttp.send(null); rowindex += 1; }

    Read the article

  • TortoiseHg : Can commit by command line but not with contextual menu

    - by nicon
    I just installed TortoiseHg (and I'm new to mercurial). I haven't been able to execute any commit with the contextual menu from Tortoise. Every time I try, I get the following error : Commit : Abort : The system cannot find the specified file. I get the error no matter the changes in my repository : new files, modifications to existing files. I also took the time to configure tortoise as shown here : http://tortoisehg.bitbucket.org/manual/1.0/quick.html (section 3.1) The strange thing is, everything is working well when I'm doing my commit from the command line. What should I look for ?

    Read the article

  • What to do if exec() fails?

    - by Grigory
    Let's suppose we have a code doing something like this: int pipes[2]; pipe(pipes); pid_t p = fork(); if(0 == p) { dup2(pipes[1], STDOUT_FILENO); execv("/path/to/my/program", NULL); ... } else { //... parent process stuff } As you can see, it's creating a pipe, forking and using the pipe to read the child's output (I can't use popen here, because I also need the PID of the child process for other purposes). Question is, what should happen if in the above code, execv fails? Should I call exit() or abort()? As far as I know, those functions close the open file descriptors. Since fork-ed process inherits the parent's file descriptors, does it mean that the file descriptors used by the parent process will become unusable?

    Read the article

  • jQuery jqXHR - cancel chained calls, trigger error chain

    - by m0sa
    I am creating a ajax utility for interfacing with my server methods. I would like to leverage jQuery 1.5+ deferred methods from the object returned from the jQuery.ajax() call. The situation is following. The serverside method always returns a JSON object: { success: true|false, data: ... } The client-side utility initiates the ajax call like this var jqxhr = $.ajax({ ... }); And the problem area: jqxhr.success(function(data, textStatus, xhr) { if(!data || !data.success) { ???? // abort processing, trigger error } }); return jqxhr; // return to caller so he can attach his own handlers So the question is how to cancel invocation of all the callers appended success callbacks an trigger his error handler in the place mentioned with ???? ? The documentation says the deferred function invocation lists are FIFO, so my success handler is definitely the first one.

    Read the article

  • How can I remove my last commit in my local git repository

    - by michael
    Hi, This is the output of my 'git log'. But when I do a 'git pull' , the top commit causes conflict. So I did a 'git rebase -abort' commit 7826b25db424b95bae9105027edb7dcbf94d6e65 commit 5d1970105e8fd2c7b30c232661b93f1bcd00bc96 But my question is Can I 'save' my commit to a patch and then do a git pull? Just like I want to emulate * I did not do a git commit, but I did a 'git stash' instead * Do a git pull so that I should not get any merge error So I need to somehow 'turn back the clock'. Is that possible in git?

    Read the article

  • Ruby Koans 202: Why does the correct answer give a syntax error?

    - by hlh
    I'm working through the about_classes.rb file in the Ruby Koans, and have hit a brick wall with the "inside_a_method_self_refers_to_the_containing_object" test. Here's the code: class Dog7 attr_reader :name def initialize(initial_name) @name = initial_name end def get_self self end def to_s __ end def inspect "<Dog named '#{name}'>" end end def test_inside_a_method_self_refers_to_the_containing_object fido = Dog7.new("Fido") fidos_self = fido.get_self assert_equal <Dog named 'Fido'>, fidos_self end So, I'm trying to make the first half of the assert_equal evaluate to the second half (fidos_self). When I work it out in irb, fidos_self returns <Dog named 'Fido'>, but I keep receiving a syntax error for that answer. I've seen this similar post: Ruby Koans: Where are the quotes in this return value?, but his solution (putting fido instead of <Dog named 'Fido'>) causes my rake to abort, saying the stack level is too deep. This is driving me nuts. What am I missing here?

    Read the article

  • How does unbundle work

    - by Ashithraj
    Before explaining my problem let me tell you the Mercurial setup, We have the following repos, RELEASE DEVELOPMENT BUGFIX All the above repo are running on a central server using IIS and hgwebdir.cgi Now coming to the problem, I clone a local repo from DEVELOPMENT repo. I make changes to the clone and commit (Not push). I make a bundle from the clone and pass the bundle to QA who has cloned the RELEASE repo. Now I try to apply the bundle to the RELEASE repo clone using hg unbundle I get an error, abort: error: ftp error: no host given What am I doing wrong? Can you give solution to the above problem keeping a Windows setup in mind?

    Read the article

  • How to limit a request execution time of WCF service?

    - by Kamarey
    Is there something in WCF configuration that defines a timeout for executing a request at service side? E.g. WCF service will stop executing request after some time period. I have a service which make some work depending on client input. In some cases a such call may take too much time. I want to limit the execution time of such requests on service side, not client one using SendTimeout. I know about OperationTimeout property, but it doesn't abort the service request, it just tells a client that the request is timed out.

    Read the article

  • Detect if an instance is running with kernel32::CreateMutexA

    - by moz
    Hello. I'm working on an NSIS installer, and trying to check if a certain application is running before uninstalling. So, I use kernel32::CreateMutexA call. Here is the chunk: System::Call 'kernel32::CreateMutexA(i 0, i 0, t "cmd.exe") i .r1 ?e' Pop $R0 StrCmp $R0 0 +3 MessageBox MB_USERICON "The application is already running." Abort I put it into un.onInit. Trouble is, the process (cmd.exe here) is never detected. Did I miss something? Tx.

    Read the article

  • Mericural "no username supplied" error on Mac

    - by theDuncs
    I've just installed Mercurial on my Mountain Lion Max (10.8) and on my first commit I'm getting the error: abort: no username supplied (see "hg help config") I've seen a load of answers which suggest I need to create or copy a file form a certain location and paste it into another location and add my username and email to the document. If that is the right thing to do: Where is the file I need to copy (or what is the file called that I need to create) Where do I put that file Do I just need to add the following two lines to the file? [ui] username = Your Name Thanks guys.

    Read the article

  • Python: How to quit CLI when stuck in blocking raw_input?

    - by christianschluchter
    I have a GUI program which should also be controllable via CLI (for monitoring). The CLI is implemented in a while loop using raw_input. If I quit the program via a GUI close button, it hangs in raw_input and does not quit until it gets an input. How can I immediately abort raw_input without entering an input? I run it on WinXP but I want it to be platform independent, it should also work within Eclipse since it is a developer tool. Python version is 2.6. I searched stackoverflow for hours and I know there are many answers to that topic, but is there really no platform independent solution to have a non-blocking CLI reader? If not, what would be the best way to overcome this problem? Thanks

    Read the article

  • MySQL transaction conundrum

    - by David Faitelson
    I need to perform several inserts in a single atomic transaction. For example: start transaction; insert ... insert ... commit; However when MySQL encounters an error it aborts only the particular statement that caused the error. For example, if there is an error in the second insert statement the commit will still take place and the first insert statement will be recorded. Thus, when errors occur a MySQL transaction is not really a transaction. To overcome this problem I have used an error exit handler where I rollback the transaction. Now the transaction is silently aborted but I don't know what was the problem. So here is the conundrum for you: How can I both make MySQL abort a transaction when it encounters an error, and pass the error code on to the caller?

    Read the article

  • Adding Timestamp to Java's GC messages in Tomcat 6

    - by ripper234
    I turned on Java's GC log options -XX:+PrintGC -XX:+PrintGCTimeStamps -XX:+PrintGCDetails Which print out these messages to standard output (catalina.out): 314.884: [CMS-concurrent-mark-start] 315.014: [CMS-concurrent-mark: 0.129/0.129 secs] [Times: user=0.14 sys=0.00, real=0.13 secs] 315.014: [CMS-concurrent-preclean-start] 315.016: [CMS-concurrent-preclean: 0.003/0.003 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] 315.016: [CMS-concurrent-abortable-preclean-start] 332.055: [GC 332.055: [ParNew: 17128K->84K(19136K), 0.0017700 secs] 88000K->70956K(522176K) icms_dc=4 , 0.0018660 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] CMS: abort preclean due to time 352.253: [CMS-concurrent-abortable-preclean: 0.023/37.237 secs] [Times: user=0.78 sys=0.02, real=37.23 secs] How can I make these log lines appear with an actual timestamp (including date) instead of these numbers, which presumably mean "time since JVM started" ?

    Read the article

  • How to manually close connection in BaseHTTPServer?

    - by user1657188
    I have a script that sends a request to an HTTP server. HTTP server script (snippet): ... class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(sa): pdict = cgi.parse_header(sa.headers.getheader('referer')) q = pdict[0] q = urllib.unquote(q) if q == "enternetixplorer" # basically just ignore this, doesn't have to do with the question sa.wfile.write("blah blah blah") # now restart server httpd.server_close() python = sys.executable os.execl(python, python, * sys.argv) ... The "blah blah blah" is sent back, but the connection does not seem to close, and my script is waiting forever until I abort the server. (My thought is BaseHTTPServer automatically closes connection when the last part in "do_GET()" is computed, but I prevent this by restarting the script.) If I'm right, how do I close the connection? If not, what else might be the problem? Edit: The server script HAS to restart the entire program.

    Read the article

  • SGML Parser in Python

    - by afg102
    I am completely new to Python. I have the following code: class ExtractTitle(sgmllib.SGMLParser): def __init__(self, verbose=0): sgmllib.SGMLParser.__init__(self, verbose) self.title = self.data = None def handle_data(self, data): if self.data is not None: self.data.append(data) def start_title(self, attrs): self.data = [] def end_title(self): self.title = string.join(self.data, "") raise FoundTitle # abort parsing! which extracts the title element from SGML, however it only works for a single title. I know I have to overload the unknown_starttag and unknown_endtag in order to get all titles but I keep getting it wrong. Help me please!!!

    Read the article

< Previous Page | 147 148 149 150 151 152 153 154 155 156 157 158  | Next Page >