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

Assign function's output to empty list constant in python

I have found something like this in a code I'm working with: [], my_variable = my_function(a, b) where the output of my_function goes like: return some_dict, some_list This seems to work - unit tests of a system don't fail, but when I try this at…
Gwidryj
  • 915
  • 1
  • 7
  • 12
5
votes
2 answers

Is there a size limit to batch output files?

I wrote a very simple Batch file that directs output to a file. Here's the text body: DATE /T > FileTreeList.txt TIME /T >> FileTreeList.txt cd >> FileTreeList.txt tree /f /a >> FileTreeList.txt When I run the Batch File in a directory that has a…
JeffL
  • 51
  • 2
5
votes
1 answer

How to create a function that outputs a matplotlib figure?

My aim is to create a function that outputs a figure. If I try to call my function multiple times in a script, it only shows the figure from the first call. Only once I close the first figure, that the program creates the second and so on and so…
chubaz
  • 53
  • 1
  • 3
5
votes
3 answers

How to replace phpunit assertion message?

How do I replace an assertion error message? If I call $this->assertTrue(false, 'message'), it will display both the string "message" and also another message stating that false is not true. How do I get it to only output the message that I chose?…
Benubird
  • 18,551
  • 27
  • 90
  • 141
5
votes
3 answers

Unable to mute unzip output in script

I wrote a script that unzips certificates from zips and tests the certs against one of our servers: #!/bin/bash WORKINGDIR=$(pwd) if [ ! -f ./users.zip ]; then echo "users.zip not found. Exiting." exit 1 else unzip…
ColLeslieHapHapablap
  • 1,045
  • 2
  • 9
  • 12
5
votes
3 answers

how to add a list, passed from a subprocess to parent process, to an already existing list in python

I am passing a list from a subprocess to the parent process and in the parent process I want to add this to an already existing list. I did this: subprocess_script.py: def func(): list = [] list.append('1') list.append('2') …
Jason Donnald
  • 2,256
  • 9
  • 36
  • 49
5
votes
3 answers

Powershell piping to variable and write-host at the same time

Hello all and thanks for your time in advance; I'm running into a slight issue. I'm running a command and piping it into a variable so i can manipulate the output. $variable = some command this normally works fine but doesn't output what's…
Razorx
  • 53
  • 1
  • 1
  • 5
5
votes
3 answers

How to output a binary file in C without padding bits

I'd like to output a struct's data to a binary file, but without any padding bits between each variable's information. For example: struct s { int i1; short s1; char c1; }; struct s example[2]; If I use fwrite(&example, sizeof(struct…
5
votes
1 answer

Process.RedirectStandardOutput does not work

I have a problem redirecting standard output of an application. It seems like this is some kind of bug in .NET. I'm running Live555ProxyServer but I don't get any output even when console which starts does have a written output. This code works with…
Teamol
  • 733
  • 1
  • 14
  • 42
5
votes
2 answers

Java - Error-message displaying incorrectly

This isn't a major issue, but I don't understand why this happens, so I figured I'd post it here. This is my code: do{ printMenu();//method to print menu try{ user=input.nextInt(); } catch(InputMismatchException imme) { …
Yulek
  • 331
  • 3
  • 12
5
votes
2 answers

select audio output divece when using QSoundEffect

I am using QSoundEffect to play loops of some short .wav files. This class was the solution for me because it allow us to play low latency sounds. Everything was fine but now I need to select the output device but I haven’t found the way to do this…
Duddy Cool
  • 53
  • 4
5
votes
2 answers

cmp command returning EOF on my output despite exact match as far as i can tell

So I will start by saying this is for a course and I assume the professor won't really care that they are the same if cmp returns something weird. I am attempting to compare the output of my code, named uout, to the correct output, in the file…
user2763113
  • 63
  • 1
  • 2
  • 6
5
votes
2 answers

Not getting the required output using Wordnet Synset's definition method

from nltk.corpus import wordnet syn=wordnet.synsets('cookbook')[0] print syn.definition Expected Output: 'a book of recipes and cooking directions' Actual Output: bound method Synset.definition of Synset('cookbook.n.01') I am unable to…
APD
  • 159
  • 2
  • 12
5
votes
5 answers

How can I iterate over a map with a pair as key?

I have a map with a pair as key and a third integer as value. How can I iterate over the map's keys in order to print them? My example code is pasted below: #include #include #include using namespace std; int…
Andrej
  • 3,719
  • 11
  • 44
  • 73
5
votes
4 answers

How to delay output in C++?

I am doing a project that need to read data from a file. But before the file is opened i want to display Loading . . . . . I want the dots after "Loading" to get printed one by one and each after about 2-3 seconds and then i display my file's…
Fiju
  • 416
  • 1
  • 5
  • 11