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
1 answer

redirecting console output to a file in unix

I have been trying to search for a file in my ftp server using find command find ./* -iname "MyLog.log" I am getting very large amount of output. I am trying to redirect this output into a file using the below commands. find ./* -iname "MyLog.log" …
Prathap
  • 93
  • 2
  • 2
  • 9
5
votes
1 answer

Stata -- extract regression output for 3500 regressions run in a loop

I am using a forval loop to run 3,500 regressions, one for each group. I then need to summarize the results. Typically, when I use loops to run regressions I use the estimates store function followed by estout. Below is a sample code. But I…
user1542743
  • 105
  • 1
  • 10
5
votes
1 answer

Special characters appearing as question marks

Using the Python programming language, I'm having trouble outputting characters such as å, ä and ö. The following code gives me a question mark (?) as output, not an å: #coding: iso-8859-1 input = "å" print input The following code lets you input…
Måns Nilsson
  • 431
  • 1
  • 4
  • 16
5
votes
1 answer

Make object created inside one reactive object available to another in shiny

I have a shiny app in which I define an object based on sliders and create a data.frame from it. This gets used to create a plot, below which I'd like to include a summary table. My issue is that the plot must be defined inside of a reactive object…
Hendy
  • 10,182
  • 15
  • 65
  • 71
5
votes
3 answers

How can two alternating characters be output efficiently or without a loop?

It's a bit tricky to explain the question, but suppose two alternating chars must be shown: for(int n=0; n<20; n++) { cout<<(n%2==0 ? 'X' : 'Y'); } Is there a one-liner or more efficient way to accomplish the task above? (i.e. using something…
ayane_m
  • 962
  • 2
  • 10
  • 26
5
votes
3 answers

R programming, naming output file using variable

I would like to direct output to a file, using a write.csv statement. I am wanting to write 16 different output files, labeling each one with the extension 1 through 16. Example as written now: trackfilenums=1:16 for (i in trackfilenums){ …
kimmyjo221
  • 685
  • 4
  • 10
  • 17
5
votes
3 answers

Using OutputRaw in Java Tapestry

I have a web application running Java Tapestry, with a lot of user-inputted content. The only formatting that users may input is linebreaks. I call a text string from a database, and output it into a template. The string contains line breaks as /r,…
Ila
  • 3,528
  • 8
  • 48
  • 76
5
votes
1 answer

C++ How do I print a .txt file verbatim?

I have a file that I am trying to print to the screen, but all it returns is "0x28fe88", when the file itself is 13 columns by a couple hundred rows. #include #include #include #include #include…
Tilt-Shifted
  • 61
  • 1
  • 4
5
votes
7 answers

Java printing a string containing multiple integers

Just starting learning java today and can't seem to figure this out. I am following the tutorial on learnjavaonline.org which teaches you a few things and then asks you to write a code to do a specific thing, it then checks the output to see if its…
user2650243
  • 73
  • 1
  • 1
  • 4
5
votes
1 answer

Clojure write to file map vs doseq

I need to write some stuff to a file based on elements of a Clojure collection, which I can do--but I ran into something that confuses me. It's probably because I don't fully understand the time macro, but when I do the following: => (def nums (take…
jimmyc
  • 115
  • 4
5
votes
4 answers

Usage of FilterOutputStream

What is practical usage of FilterOutputStream in Java? From javadocs: This class is the superclass of all classes that filter output streams. These streams sit on top of an already existing output stream (the underlying output stream) which it…
user35443
  • 6,309
  • 12
  • 52
  • 75
5
votes
6 answers

Determines if the array list is sorted

I need to estimate if the array list is sorted (don't sort). When Strings are sorted, they are in alphabetical order. I try to use compareTo() method to determine which string comes first And return true if the array list is sorted, else…
catch23
  • 17,519
  • 42
  • 144
  • 217
5
votes
3 answers

Windows Batch to read file and parse lines into tokens and variables

I've made a good deal of headway by searching this site and learning the ridiculous language that is Windows batch scripting, but I'm now at a point where I'm stuck. I have a text file with a variable number of lines, each of which looks something…
SonicGoose
  • 53
  • 1
  • 1
  • 3
5
votes
1 answer

Subscripting text in matplotlib labels

this is my first question and I am a noob at python. So probably more to follow... I would like to create a figure with matplotlib. In the labels, I would like to include a chemical formula, which involves subscripts (I think the same would work for…
SKchem
  • 51
  • 1
  • 2
5
votes
2 answers

PHP output to file for download without creating file on the server

I would like to output my data to a file for the user to download without actually creating the file physically on the server. The data of the file is simply array that I'm converting into a CSV format for the user to download. Here's my code: $fh =…
Andrew
  • 2,691
  • 6
  • 31
  • 47