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

IPython Notebook display every line output without print

I would like IPython Notebook to display every line output without explicitly using the print command. Example: a, b, c = 1, 2, 4 a b c would only display 4 in the output cell, but I would like it to display 1 2 4 Is there a way to do this? I…
B6ka
  • 71
  • 1
  • 3
7
votes
2 answers

How search the output only `-` in any DOM using PHP script?

How search the output only - if any DOM as below?

-

-

etc. Currently I just use the codes as below to find this output - : $input = `

-

`; if($input == `

-

`): return true; else: …
Nere
  • 4,097
  • 5
  • 31
  • 71
7
votes
1 answer

Strange symbols when using byte-based FileOutputStream, char-based FileWriter is OK

Task : Write a Java application that creates a file on your local file system which contains 10000 randomly generated integer values between 0 and 100000. Try this first using a byte-based stream and then instead by using a char-based stream.…
Ciprian
  • 83
  • 6
7
votes
3 answers

Removing punctuation and capitalizing in C

I'm writing a program for school that asks to read text from a file, capitalizes everything, and removes the punctuation and spaces. The file "Congress.txt" contains (Congress shall make no law respecting an establishment of religion, or…
7
votes
4 answers

Line Breaks not working in Textarea Output

line breaks or pharagraph not working in textarea output? for example i am using enter for pharagraph in textarea but not working in output? How can i do that? $("#submit-code").click(function() { …
ercan
  • 101
  • 1
  • 1
  • 7
7
votes
1 answer

Why can't I see console log output when testing node apps with jest

I am new to testing with jest and I cannot seem to be able to see the console output from modules I want to test. my-module.js: var _ = require('underscore'); exports.filter = function(data) { if(_.isArray(data)) { console.log("Data…
Andrei
  • 2,282
  • 26
  • 35
7
votes
2 answers

How to change the output color of gulp-debug?

Due to a crash with Gulp, I could not debug what's happening behind. So I installed gulp-debug. I think it's throwing some lines of errors but with unreadable condition in my Windows system due to the output color. Is it possible to change this…
Mithun Shreevatsa
  • 3,588
  • 9
  • 50
  • 95
7
votes
1 answer

How to redirect grep output to a variable?

I have some pipe. For example, I have this pipe: user@user:~$ cal | head -1 | grep -oP "[A-Za-z]+" For this pipe I get this result: September I want to store this result to a variable. I write the following commands: user@user:~$ cal | head -1 |…
Denis
  • 3,595
  • 12
  • 52
  • 86
7
votes
3 answers

How to get Google-glog output in console?

I am using a framework for convolutional neural networks called caffe and its output in console is provided by Google-glog. However when I try to save the output to a file using the following commands: sh train_imagenet.sh | tee output.txt or sh…
ssierral
  • 8,537
  • 6
  • 26
  • 44
7
votes
4 answers

Python output on both console and file

I'm writing a code to analyze PDF file. I want to display the output on the console as well as to have a copy of the output in a file, I used this code save the output in a file: import sys sys.stdout = open('C:\\users\\Suleiman…
user3737563
  • 97
  • 1
  • 1
  • 4
7
votes
3 answers

Using argparse to create output file

I have been using argparse in a program I am writing however it doesnt seem to create the stated output file. My code is: parser.add_argument("-o", "--output", action='store', dest='output', help="Directs the output to a name of your choice") with…
Tom
  • 469
  • 4
  • 7
  • 16
7
votes
2 answers

Output file with one byte per line in hex format (under linux bash)

As the title says, here is an example: $ cat test.txt ABCD $ hd test.txt 00000000 41 42 43 44 0a |ABCD.| 00000005 my desired output would be: 41 42 43 44 I know that this is possible with sed, awk and stuff,…
Oliver R.
  • 283
  • 4
  • 6
7
votes
3 answers

Haskell - Printing Multiple Non-String Variables

I am writing a program that reads two integers from the command line, doubles them, and then prints them back out. So my program reads in the Args, casts them to Ints, and then doubles them. My question is about outputting: in Python, I could just…
Newb
  • 2,810
  • 3
  • 21
  • 35
7
votes
2 answers

How to solve this output in C?

I have to search a substring in a string & display the complete word as given below everytime the substring is found- eg: Input: excellent Output: excellent,excellently I cannot figure out how to make the output like the one above. My…
7
votes
2 answers

How to display a fixed number of digits in C++ without rounding

I have this code (very basic): #include #include using namespace std; int main() { float a = 0.0, b = 0.0, c = 0.0; cout<<"Input a: "; cin>>a; cout<<"input b: "; cin>>b; cout<
user2529011
  • 705
  • 3
  • 11
  • 21