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
9
votes
3 answers

Which is preferable - printf or fprintf

I know that both of the functions can be used to output to the console. I read that question, but no one didn't tell which is prefered to be used when outputing to the console. So which function is better, are there any major differences?
Lior
  • 5,841
  • 9
  • 32
  • 46
9
votes
2 answers

How do I putStrLn a Data.ByteString.Internal.ByteString?

I'm learning haskell and decided to try writing some small test programs to get use to Haskell code and using modules. Currently I'm trying to use the first argument to create a password hash using the Cypto.PasswordStore. To test out my program I'm…
NerdGGuy
  • 139
  • 1
  • 6
8
votes
1 answer

PowerShell Out-File outputs extra spaces in between characters

I'm using a simple script that outputs current directory's path inside a log file: (Get-Item .).FullName | out-file "C:\windows\system32\rcwm\rc.log" -append This works most of the time. However, seemingly at random, appending will result in added…
GChuf
  • 1,135
  • 1
  • 17
  • 28
8
votes
1 answer

JQ - How to define filter to remove brackets, quotes and commas from output array

I need to convert an output array to lines without brackets, quotes and commas, so that it can be used to create git clones. This is my original query curl -s http://bitbucketlocalserver:7990/rest/api/1.0/projects/PROJECT_NAME/repos?per_page=20 ^ -u…
adbdkb
  • 1,897
  • 6
  • 37
  • 66
8
votes
1 answer

How can I display a large matrix without the word "Columns" appearing?

I want to display a large matrix, but I don't like the words "Columns x to y" to show. How can I do this?
Yebac
  • 179
  • 1
  • 2
  • 3
8
votes
3 answers

How to print key-value pairs of a dict as an aligned table?

Student_Name = {"Mathematics": 90, "Computer Science": 100, "Chemistry": 90, "Physics": 97, "English": 95} for key,value in Student_Name.items(): print(key,value) I want to…
Silver fang
  • 109
  • 1
  • 3
8
votes
1 answer

How to get list of all output elements in R Shiny

How the get a list of reactive output elements? what works without problems is: observe(print(reactiveValuesToList(input)) ) what doesn't work for reasons i don't understand is: observe( print(reactiveValuesToList(output)) ) For a large complex…
Mark
  • 2,789
  • 1
  • 26
  • 66
8
votes
1 answer

Python tqdm and print weird printout order

I have the following Python 3 code: from tqdm import tqdm print("Before") for _ in tqdm(range(10)): pass print("After") I expect to get the following output to terminal: Before 100%|##########| 10/10 [00:00
HelloGoodbye
  • 3,624
  • 8
  • 42
  • 57
8
votes
2 answers

c++ unit testing check output is correct

If I want to write my own test.cpp that checks if another .cpp file is outputting the way I want it to output, is there anyway to do it without explicitly printing it? In other words, is there anything such as assert(output_of_file_being_tested,…
bananamuffin
  • 301
  • 1
  • 5
  • 10
8
votes
3 answers

python3: Don't show full directory path on error message

Is there a way to show only the important directory paths when executing a python program? Currently I get this: python3 foo.py Traceback (most recent call last): File "foo.py", line 60, in foo…
Natjo
  • 2,005
  • 29
  • 75
8
votes
5 answers

How to get the python Counter output ordered by order of inputs?

I have been working on getting the count(frequency) and then making the graph representation of it. I am using Counter class from collections using python. I want the output of the Counter in the order of the first come object. for…
8
votes
2 answers

Get output colored text with Popen

I'm using popen to make a plugin, this plugin used a external program who shows some colored text in the output. The output is something like this: avr-g++ -o .pioenvs\uno\FrameworkArduino\HardwareSerial.o -c -std=gnu++11 -fno-exceptions…
GEPD
  • 198
  • 2
  • 16
8
votes
1 answer

Prevent string being printed python

I'm using some library and I can't edit its source. There is a function in the library that I have to call, and when I call it, it makes this file that I want; however, at the same time, it prints this warning to the screen hundreds of times. The…
Jean-Luc
  • 3,563
  • 8
  • 40
  • 78
8
votes
3 answers

Program which source code is exactly the same as its output

The more I try to understand this perplexed enigma the more I want to give up. char *s = "char *s = %c%s%c; main(){printf(s,34,s,34);}"; main(){printf(s,34,s,34);} How is happening for this one-line source code to generate exactly the same output…
Imobilis
  • 1,475
  • 8
  • 29
8
votes
1 answer

Suppress output of stationarity test that is printed to screen

How do I get the stationarity test from the fractal package in R to not print any output to the screen. For example, with the shapiro.wilk test when setting the result as a variable it does not give any output as follows lg.day.ret.vec <-…
Vik
  • 469
  • 2
  • 6
  • 18