Questions tagged [termination]

is used in its general meaning, but it is bounded by the programming scope.

351 questions
0
votes
2 answers

how to keep my background service active when android system kills my app?

I have a background service which runs in background to track screen on and off events. its started as below : Intent intentService = new Intent(context, UnlockdService.class); context.startService(intentService); And it is returning…
Kruti Mevada
  • 517
  • 5
  • 7
  • 21
0
votes
1 answer

While loop error with Netwon-Raphson Method

I am trying to find use to Newton-Raphson method to find the roots. It does this by making a guess and then improving the guess after each iteration until you get one of the zeros. Because the Newton-Raphson method quickly finds the zeros, it gives…
0
votes
2 answers

How to close the console window after the program?

I'm trying to make a program which will close the console window after execution. But it outputs this instead: (the program output) -------------------------------- Process exited after 15.7973 seconds with return value 0 Press any key to continue .…
0
votes
1 answer

Termination checking for product types

The following function definition is accepted by Isabelle, so the termination checker is happy with it: datatype 'a List = N | C 'a "'a List" fun dequeue' :: "'a List × 'a List ⇒ ('a option × 'a queue)" where "dequeue' (N, N) = (None, AQueue N…
Joachim Breitner
  • 25,395
  • 6
  • 78
  • 139
0
votes
0 answers

Improving Time Hackerrank [terminated due to timeout]

I've created code that based of the information that was given to me below. "The first line will have an integer N denoting the number of entries in the phone book. Each entry consists of two lines: a name(either first-name or first-name last-name)…
0
votes
1 answer

how to stop commandline process in android

Help me please, i have to use ffmpeg cmdline in my application. I built the ffmpeg binary and now i'm able to start using ffmpeg as follows: public class FfmpegCmd { ... public ProcessRunnable create(){ final List cmd = new…
borune
  • 548
  • 5
  • 21
0
votes
1 answer

Read low pointer bit in way that could *probably* work on as many systems as possible

It seems that the low bit of pointers being 0 is more-or-less pretty portable (where portable obviously does not mean "standard", but that people get away with it and can use it to some advantage in some cases, hopefully disable-able with a compile…
0
votes
1 answer

TLS Termination: reencrypt using a destinationCACertificate

I have created an application with a route to it using OpenShift Origin. Now I want to make that route secure using TLS: I've already created routes with edge and passthrough. But now I want to create a route which is using Reencrypt. Therefore I…
lvthillo
  • 28,263
  • 13
  • 94
  • 127
0
votes
0 answers

Running Python script, closes when CSV file contains decimal values

I am running a python script that opens a simple CSV file and pulls data from two columns, like: ABC 6 DEF 7 GHI 12 Running my script with these values works as expected. But when I change the CSV file to include decimals, the script doesn't…
JSmooth
  • 317
  • 1
  • 2
  • 13
0
votes
2 answers

isabelle termination with distance of real numbers

maybe someone can help me with a termination proof in Isabelle. I am trying to construct from the list A a new sub-list B. For constructing B, I read again and again of the whole A. Take out elements and use the result for the search for the next…
best wish
  • 55
  • 5
0
votes
2 answers

How do you prove termination of a recursive list length?

Suppose we have a list: List = nil | Cons(car cdr:List). Note that I am talking about modifiable lists! And a trivial recursive length function: recursive Length(List l) = match l with | nil => 0 | Cons(car cdr) => 1 + Length…
Necto
  • 2,594
  • 1
  • 20
  • 45
0
votes
1 answer

What's the easiest way to prevent null chars from terminating my string?

I'm currently working on some C code to forward CAN messages via bluetooth and vice versa (µC stuff). The problem is that my paired bluetooth device uses '00' as a command and my bluetooth library is using a char[] to buffer the string when…
0
votes
7 answers

How does the while loop work here?

The following code I came across though I have basic idea of C. I still get the logic of below code. How does the loop terminate and when does the loop terminate — at what condition? At last counter becomes zero, but why doesn't the loop continue…
hash
  • 3
  • 4
0
votes
1 answer

ant build file terminating tag error

I am trying to run an ant build file for a java jar. For some reason, whenever I try to run ant run, it comes back and says, "Element of type target must be terminated by the matching tag" This seems strange because I see that I do have…
John
  • 139
  • 1
  • 12
0
votes
1 answer

How to run a javascript when browser process is killed?

I hav onUnload="cleanup()" defined in my html body tag. The cleanup() method in javascript is function cleanup() {--clean up session--}. But when the browser is terminated by killing the process using task manager, I want…
Ashwin
  • 847
  • 1
  • 6
  • 5