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

Round numbers in output to show small near-zero quantities as zero

I would like the output of my R console to look readable. To this end, I would like R to round all my numbers to the nearest N decimal places. I have some success but it doesn't work completely: > options(scipen=100, digits=4) > .000000001 [1]…
Alex
  • 19,533
  • 37
  • 126
  • 195
5
votes
4 answers

Creating nice looking output

I've been working on quite an ambitious function, which I hope can be used by people other than me once I am finished. When it's just me using the function I can live with the output being kind of lame, but what if I want some nice looking output?…
hejseb
  • 2,064
  • 3
  • 18
  • 28
5
votes
1 answer

GraphViz set page width

I'm using GraphViz to determine the controls location in my C# application. But i'm not being able to give the graphViz dot generator the width of the output. This are the paremeters of the dot file that im using Digraph x { autosize=false; …
guanabara
  • 590
  • 1
  • 9
  • 22
5
votes
1 answer

Finding out that the output of my program is redirected into a file

I want to know if it is posible in linux and C to find out that my programs output is redirected to a file. I want to format the output human readable when it is printed on stdout $ ./myprogram and like csv when it is redirected to a file $…
microo8
  • 3,568
  • 5
  • 37
  • 67
5
votes
2 answers

Cyrillic encoding output in R

Encoding is always a pain for me, and again it's impossible to write file with russian text. What should I do for this? >test = c("привет","пока") >test [1] "\320\277\321\200\320\270\320\262\320\265\321\202" "\320\277\320\276\320\272\320\260" …
alperovich
  • 854
  • 1
  • 9
  • 14
5
votes
1 answer

APC is corrupting output

I've recently switched my web server to Centos 6.3, with apache 2.2.15, PHP 5.4.11 and APC 3.1.14. I started receiving complaints from customers from time to time, that a page is not working, or strange errors appear. I saw that the affected pages…
Jacket
  • 844
  • 10
  • 18
5
votes
2 answers

java display changing progress on command line

I have written a Java program that loads data from a file and I am displaying the progress of the load on the command line, by printing a message to the screen after every n records, which looks like this: $> processed 100 records. $> processed 200…
AHL
  • 738
  • 3
  • 11
  • 35
5
votes
5 answers

VB newline escape char?

In C I use "1st line 1\n2nd line" for a newline, but what about VB? I know "1st line" & VbCrLf & "2nd line" but its too verbose, what is the escape char for a newline in VB? I want to print 1st line 2nd line I tried using \n but it always outputs…
user1931083
5
votes
2 answers

While (( c = getc(file)) != EOF) loop won't stop executing

I can't figure out why my while loop won't work. The code works fine without it... The purpose of the code is to find a secret message in a bin file. So I got the code to find the letters, but now when I try to get it to loop until the end of the…
user1695758
  • 173
  • 1
  • 3
  • 14
5
votes
2 answers

Send a text string containing double quotes to function

I'm having a problem with using double quotes while formatting text strings being sent to functions in R. Consider an example function code: foo <- function( numarg = 5, textarg = "** Default text **" ){ print (textarg) val <- numarg^2 +…
Khaloymes
  • 759
  • 2
  • 6
  • 9
5
votes
3 answers

Most efficient way to write a string to a file

Possible Duplicate: How do I save a String to a text file using Java? I want to add a reading from a machine to a file (Java). The reading will be in the form of a string that I have formatted. The file is just a text file. At the moment I am…
DavyGravy
  • 311
  • 1
  • 4
  • 14
5
votes
2 answers

How to cancel long output in the terminal?

How to exit from the long output of a terminal command or a git command like git log or git branch -a? How to avoid that I have to press enter untill the output of the command is complete?
Remover
  • 1,616
  • 1
  • 17
  • 27
4
votes
3 answers

Regular Expressions + Including one space in pattern

I'm trying to figure out how to write a pattern to match to the following: "3Z 5Z". The numbers in this can vary, but the Z's are constant. The issue I'm having is trying to include the white space... Currently I have this as my pattern pattern =…
keynesiancross
  • 3,441
  • 15
  • 47
  • 87
4
votes
2 answers

Is it possible to write a strictly conforming C program that outputs to the display?

According to ISO/IEC 9899:2017: A strictly conforming program shall use only those features of the language and library specified in this document. It shall not produce output dependent on any unspecified, undefined, or implementation-defined…
4
votes
1 answer

Why am I not seeing the printf buffer flush?

I have a simple program (working example): #include #include int main() { pid_t my_pid = getpid(); char str[30]; sprintf(str, "/proc/%d/fd", my_pid); printf("hello, I am gonna print out: %s", str); execvp( "ls",…
user129393192
  • 797
  • 1
  • 8