Questions tagged [output]

The externally observable consequences of calling a program on some input

The output of a program is the set of externally observable consequences of running a program on the given input.

A program's output can be manifested in several forms:

  1. What is printed to and/or
  2. What is written to an external file
  3. What changes are made to the inputs, which are then used in other functions or programs
9797 questions
31
votes
4 answers

Intellij Idea, how persist console output to file programmatically?

Is there a way to tell IntelliJ where to store the output info?
Leonardo Eras
  • 313
  • 1
  • 3
  • 5
30
votes
2 answers

How to show output in console when writing an RMarkdown notebook?

I have a simple question, and I think I'm just not looking in the right place, or RStudio is not acting as expected. I'd like to know if there is an option to output the results of all my markdown code chunks to go to the plots window or the…
Nova
  • 5,423
  • 2
  • 42
  • 62
30
votes
3 answers

Is this undefined behaviour in C ? If not predict the output logically

Code 1 #include int f(int *a, int b) { b = b - 1; if(b == 0) return 1; else { *a = *a+1; return *a + f(a, b); } } int main() { int X = 5; printf("%d\n",f(&X, X)); } Consider this C code. The question here is to…
user5863049
30
votes
5 answers

How do I print an integer in Assembly Level Programming without printf from the c library? (itoa, integer to decimal ASCII string)

Can anyone tell me the purely assembly code for displaying the value in a register in decimal format? Please don't suggest using the printf hack and then compile with gcc. Description: Well, I did some research and some experimentation with NASM and…
Kaustav Majumder
  • 341
  • 1
  • 4
  • 8
29
votes
1 answer

Doxygen @param direction arguments [in],[out],[in,out] example output

The optional direction argument for the @param command is documented here as one of the following: @param[in] @param[out] @param[in,out] I do not see in any of the example sites how this information appears in the output. Is there an example of how…
ThomasMcLeod
  • 7,603
  • 4
  • 42
  • 80
29
votes
1 answer

list comprehension replace for loop in 2D matrix

I try to use list comprehension to replace the for loop. original file is 2 3 4 5 6 3 1 2 2 4 5 5 1 2 2 2 2 4 for loop line_number = 0 for line in file: line_data = line.split() Cordi[line_number, :5] = line_data line_number +=…
rankthefirst
  • 1,370
  • 2
  • 14
  • 26
28
votes
2 answers

How to plot a large ctree() to avoid overlapping nodes

When I plotted the decision tree result from ctree() from party package, the font was too big and the box was also too big. They are overlapping other nodes. Is there a way to customize the output from plot() so that the box and the font would be…
JPC
  • 5,063
  • 20
  • 71
  • 100
28
votes
6 answers

Java: println with char array gives gibberish

Here's the problem. This code: String a = "0000"; System.out.println(a); char[] b = a.toCharArray(); System.out.println(b); returns 0000 0000 But this code: String a = "0000"; System.out.println("String a: " + a); char[] b = a.toCharArray(); …
stephenwade
  • 1,057
  • 2
  • 20
  • 37
27
votes
2 answers

jupyter notebook double output

I have a problem with double output! It irritates me. It happens with every output. Please help!
Elks
  • 381
  • 1
  • 3
  • 5
27
votes
4 answers

PHP cli script does not output anything

So I have a php script which I execute using the following command: php -f my_script.php myArguments The script is under version control using svn. I just updated it, pasted the command to run it into a terminal, and executed it. However, there is…
MirroredFate
  • 12,396
  • 14
  • 68
  • 100
27
votes
3 answers

How to pipe all output of .exe execution in Powershell?

In Powershell I am running psftp.exe which is PuTTy's homepage. I am doing this: $cmd = "psftp.exe" $args = '"username@ssh"@ftp.domain.com -b psftp.txt'; $output = & $cmd $args This works; and I am printing out $output. But it only catches some…
JBurace
  • 5,123
  • 17
  • 51
  • 76
23
votes
8 answers

How to know query generated by Fluent NHibernate

I am using linq to Nhibernate to fire some select query to data base. My question is, how do I know, the query generated by Fluent NHibernate?
Rahul Somwanshi
  • 455
  • 2
  • 5
  • 19
23
votes
6 answers

Is checking the return value of printf important?

In one of my University Projects, I got points off and feedback from my professor saying I didn't handle printf errors. In English --> / * ### FB: Error handling printf () is missing * /     /* ### FB: Fehlerbehandlung printf() fehlt */ …
Seek Addo
  • 1,871
  • 2
  • 18
  • 30
23
votes
5 answers

Why do fields seem to be initialized before constructor?

public class Dog { public static Dog dog = new Dog(); static final int val1 = -5; static int val2 = 3; public int val3; public Dog() { val3 = val1 + val2; } public static void main(String[] args) { …
Chao
  • 865
  • 8
  • 21
23
votes
5 answers

How to see the compiler output when running javac through an Ant task?

Is there any clearly explained and simple way to see the compiler output when running javac through an Ant task? Here is my javac Ant tag: Here is the only…
sp00m
  • 47,968
  • 31
  • 142
  • 252