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
6
votes
2 answers

Why does io.WriterTo's WriteTo method return an int64 rather than an int?

Most of the output methods in Go's io package return (int, error), for example io.Writer's Write([]byte) method and the io.WriteString(io.Writer, string) function. However, a few of the output methods, such as io.WriterTo's WriteTo method, return…
Matt
  • 21,026
  • 18
  • 63
  • 115
6
votes
1 answer

Weird result with std::chrono::duration_cast for 1 second and 2 second

I am running a simple program where, I take a time_point with system_clock::now then this_thread::sleep_for(seconds(1)) and again a time_point with system_clock::now. Now if I add some extra duration to the 1st time_point, it gives exactly the same…
iammilind
  • 68,093
  • 33
  • 169
  • 336
6
votes
1 answer

How to configure 8051 pins as input/output?

In pic microcontroller TRIS register determines whether port would act as input or output and PORT register would determine the content, what should be written (in case of output) or read (in case of input). But in 8051 there isn't any such kind of…
6
votes
3 answers

How do I replace NOT EXISTS with JOIN?

I've got the following query: select distinct a.id, a.name from Employee a join Dependencies b on a.id = b.eid where not exists ( select * from Dependencies d where b.id = d.id and d.name = 'Apple' ) and exists ( …
YelizavetaYR
  • 1,611
  • 6
  • 21
  • 37
6
votes
2 answers

Python output on file and terminal

There are times when I want my program to write something on the terminal for immediate inspection and on a file for later use, so I write something like: print "output" file.write("output") #the same output as the previous line Is it possible,…
mattiav27
  • 655
  • 2
  • 9
  • 27
6
votes
2 answers

Powershell Compare-Object Format Output

Here is the script that I wrote: function Compare { $file1 = Read-Host "Please enter the path of the first file you would like to compare" $file2 = Read-Host "Please enter the path of the second file you would like to compare" $outFile…
BRBT
  • 1,467
  • 8
  • 28
  • 48
6
votes
1 answer

Haskell - putStr vs putStrLn and instruction order

Let's say we have a short haskell programm: main = do putStr "2 + 2 = " x <- readLn if x == 4 then putStrLn "Correct" else putStrLn "Wrong" What output does it produce? 4 2 + 2 = Correct Now let's…
User1291
  • 7,664
  • 8
  • 51
  • 108
6
votes
3 answers

Difference Between Debugger and Target Output in Xcode

When I run my app in Xcode, the output area often becomes cluttered by warnings, in my case especially from iAds. Since I'm only interested in my own debug statements, is there a way to specifically output what I want to see? I notice there's an…
Alex
  • 676
  • 9
  • 20
6
votes
1 answer

No stdout.txt with SDL

I'm working on a little game using C++ with SDL2 using Code::Blocks 12.11 under Windows 7. I'm using the mingw32-gcc compiler and downloaded the standard precompiled Windows distribution of SDL2 (2.0.1 now) and use the i686-w64-mingw32 version. So…
Khris
  • 3,132
  • 3
  • 34
  • 54
6
votes
1 answer

Does the "usage" notice get printed to stderr?

When the user executes a program with incorrect arguments, and the program prints a 'usage' instruction to the user, should this be printed to stderr?
jsj
  • 9,019
  • 17
  • 58
  • 103
6
votes
1 answer

In PHP, where does the output buffer print to? What things print to it?

PHP has many different ways to print things, and I don't understand the difference between them. There are at least the following: stdout and stderr. These can be denoted as php://stdout and php://stderr. There are also constants STDOUT and STDERR,…
jameshfisher
  • 34,029
  • 31
  • 121
  • 167
6
votes
1 answer

Use xtable to produce a Latex table with significance stars (***)

I am currently using xtable to generate Latex tables from R. It works fine, but in one of the tables I have significance stars to some of the numbers. Something like this dataframe X: 1 2 3 4 5 Test1 Test2 Test3 a "1.34" "0.43" "-0.26" "0.13"…
user3032689
  • 627
  • 1
  • 10
  • 23
6
votes
1 answer

Parsing pexpect output

I'm trying to parse in real time the output of a program block-buffered, which means that output is not available until the process ends. What I need is just to parse line by line, filter and manage data from the output, as it could run for…
peluzza
  • 329
  • 2
  • 4
  • 11
6
votes
1 answer

Can output file directory be specified via command-line?

I have an .nsi file which I call via command-line to output the installer, like this: makensis fullPathToNsiScript This creates the installer in the folder where my nsi script is. I need to output it to a specific folder, say desktop. Is it…
nawfal
  • 70,104
  • 56
  • 326
  • 368
6
votes
3 answers

How to suppress correlation table in LME?

In the standard example of the lme() function in the nlme package of R: fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1) summary(fm2) there appears a correlation table: Correlation: (Intr) age age -0.813 …
Jens
  • 2,363
  • 3
  • 28
  • 44