Top "Stdin" questions

Standard input (stdin, file descriptor 0) is the input stream to a program.

How to clear stdin before getting new input?

I have read about 5-10 different advices how to clear stdin, but none of them suits my needs. The thing …

c stdin getchar
How to pipe InputStream to ProcessBuilder

Please move down to the 2nd update. I didn't want to change the previous context of this question. I'm using …

java stdin java-io wkhtmltopdf processbuilder
"StandardIn has not been redirected" error in .NET (C#)

I want to do a simple app using stdin. I want to create a list in one program and print …

c# .net stdin
Optional stdin in Python with argparse

I found the very useful syntax parser.add_argument('-i', '--input-file', type=argparse.FileType('r'), default='-') for specifying an …

python stdin argparse
Detecting end of input using std::getline

I have a code with the following snippet: std::string input; while(std::getline(std::cin, input)) { //some read only …

c++ while-loop stdin getline gedit
How to pass variables as stdin into command line from PHP

I am trying to write a PHP script that uses the pdftk app to merge an XFDF with a PDF …

php command-line stream stdin pdftk
How to use select() to read input from keyboard in C

I am trying to use select() to read keyboard input and I got stuck in that I do not know …

c keyboard stdin textinput select-function
Using istream_iterator and reading from standard input or file

I'm writing in Microsoft Visual C++ and I'd like my program to either read from standard input or a file …

c++ file stdin istream-iterator
How can I get a string from input without including a newline using fgets?

I'm trying to write an inputted string elsewhere and do not know how to do away with the new line …

c newline stdin fgets
Use of undefined constant STDIN - assumed 'STDIN' in C:\wamp\www\study\sayHello.php on line 5

I want to Learn php & mySQL and I purchased a book (php&mySql: the missing manuals 2edition) I …

php stdin trim fgets