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

Console output filtering in xcode or appcode

Is it possible in XCode or AppCode to filter the output of the console like its implemented in IntelliJ? Or at least in some way?
Martin Mlostek
  • 2,755
  • 1
  • 28
  • 57
9
votes
3 answers

Pandas python .describe() formatting/output

I am trying to get the .describe() function to output in a reformatted way. Here is the csv data (testProp.csv) 'name','prop' A,1 A,2 B, 4 A, 3 B, 5 B, 2 when I type in the following: from pandas import * data = read_csv('testProp.csv') temp…
Mike
  • 227
  • 1
  • 3
  • 17
9
votes
3 answers

Heroku Rails Console Write to Local File

I want to pull some information from my database into a text file. What's a good way to do that? I originally thought of running my heroku bash and rails console as I only need to do a simple loop to get the info I need. But I don't know the proper…
Clam
  • 935
  • 1
  • 12
  • 24
9
votes
4 answers

Colored output in netbeans console with ansicodes

I am trying to get a colored output in my Netbeans output window. Ansi-Output in Linux and Windows console works perfectly fine. However not in the IDE. Is there a way to make this work in Netbeans' output window? According to…
Mitch Haraldsson
  • 151
  • 2
  • 10
9
votes
2 answers

Redirect console output for just one method

I have here a bunch of unit tests. One of them expects the code to do nothing because the arguments parsing should not work. Unfortunately, the arguments parsing library I'm using forces Console.Write() in this case, and now my unit tests output is…
thomasb
  • 5,816
  • 10
  • 57
  • 92
9
votes
2 answers

How can I do an atomic write to stdout in python?

I've read in some sources that the print command is not thread-safe and the workaround is to use sys.stdout.write command instead, but still it doesn't work for me and the writing to the STDOUT isn't atomic. Here's a short example (called this file…
Tal Barda
  • 623
  • 1
  • 9
  • 14
9
votes
1 answer

Why in Gradle can't declare property as output?

If my task change some property and when execute it twice incremental build can not be accomplished. And every time this task has to be executed again. Can I use upToDateWhen() method to do some check for the property? Is there some purpose that…
Xelian
  • 16,680
  • 25
  • 99
  • 152
9
votes
5 answers

PHP: How to delete all array elements after an index

Is it possible to delete all array elements after an index? $myArrayInit = array(1=>red, 30=>orange, 25=>velvet, 45=>pink); now some "magic" $myArray = delIndex(30, $myArrayInit); to get $myArray = array(1=>red, 30=>orange); due to the keys in…
Viktor
  • 623
  • 4
  • 10
  • 25
9
votes
4 answers

Show persistent status message on console

I am working on a program that sends a lot of output to stdout, but I want to be able to easily tell what the program is doing. I've seen some programs show the output of a script or program, yet the last line on the console is "reserved", meaning…
Caleb Xu
  • 310
  • 3
  • 9
9
votes
2 answers

bash sequence: wait for output, then start next program

In my case I have to run openvpn before ssh'ing into a server, and the openvpn command echos out "Initialization Sequence Completed". So, I want my script to setup the openvpn and then ssh in. My question is: How do you execute a command in bash in…
stilliard
  • 762
  • 8
  • 27
9
votes
2 answers

Function as an output argument

I want to create a subroutine that gives back a function as an output. How can I do that? I'll put an example of how I think it should be (I know it's badly written) module fun_out contains subroutine exponential(F,a) interface,…
9
votes
1 answer

R and Shiny: Pass inputs from sliders to reactive function to compute output

I have 6 parameters that the user can change values for. These are our 6 inputs. I want to create an output value that takes those 6 inputs and computes our value of interest given a number of related equations in a function. Here is what I have in…
Chloe
  • 91
  • 1
  • 1
  • 2
9
votes
2 answers

Is there a "null" printf code that doesn't print anything, used to skip a parameter?

If I want a program to have multiple text output formats, I could do something like this: const char *fmtDefault = "%u x %s ($%.2f each)\n"; const char *fmtMultiLine = "Qty: %3u\nItem: %s\nPrice per item: $%.2f\n\n"; const char *fmtCSV =…
flarn2006
  • 1,787
  • 15
  • 37
9
votes
2 answers

Capture the output of an external program in JAVA

I'm trying to capture output of an external program using java but I can't. I have the code to show it, but not to put it into a variable. I will use, for example, sqlplus to execute my oracle code "into exec.sql" system/orcl@orcl :…
AHmedRef
  • 2,555
  • 12
  • 43
  • 75
9
votes
3 answers

Low level disk operations in Linux for C++

What kind of methods exists in linux for low level disk operations in C++? I am attempting to write my own manager of data on a disk. For example, I would like to create a C++ program in the Linux environment that allocated a certain amount…
Matthew
  • 3,886
  • 7
  • 47
  • 84