Questions tagged [console-input]

Console-input is related to inputting data through the console, or command-line, instead of a GUI.

Console is currently the most basic application interface, commonly used for small applications, for which GUI is unnecessary. Often an output from another application can be redirected to a console input of another application - see Pipeline.

46 questions
0
votes
1 answer

How can I store user-input as a vector (for a certain range e.g. c(-10:1)?

I'm new to R. And I want to make a program that asks for console input and then does some things, including making a graph. And now I want the user to specify the x-values for the graph. And then I want to do that with a range, for example…
Piet
  • 3
  • 1
0
votes
0 answers

PhantomJS system.stdin.readLine without showing what user is typing

I'm using PhantomJS + CasperJS to do some headless web scraping. My application requires the user's login credentials, including an email and password. Currently, I'm getting the user's password in the following manner: system =…
geoff
  • 2,251
  • 1
  • 19
  • 34
0
votes
1 answer

Java Multi-Line Console Input and Cursor Handling

The following problem arised while building a REPL console application for a programming language. Essentially, the language relies on you being able to write multiple lines of text. However, the ENTER key should also be usable to evaluate an…
Clashsoft
  • 11,553
  • 5
  • 40
  • 79
0
votes
4 answers

Keep console input active without main thread? (Java)

I am writing a server in Java, which is multithreaded. I have three main active threads that I build and start from my main method: public class Run{ public static void main(String[] args){ try{ /* * Definition…
Code Doggo
  • 2,146
  • 6
  • 33
  • 58
0
votes
2 answers

Which way of using the Scanner is better, if any?

I'm talking about efficiency. I need to read an int from the console input. I know for sure that the input is the form of one int on each line and no other values. I have a Scanner object defined: Scanner scan = new Scanner(System.in); I can either…
Tim Southee
  • 51
  • 2
  • 6
0
votes
3 answers

how to create an array from one line of console input in C?

I want to create a two dimensional array where number of rows and columns are fixed and column values will be taken from console input. void main() { int myArray[3][5]; int i; int a, b, c, d, e; // for taking column values for (i =…
Esika
  • 31
  • 1
  • 3
  • 6
0
votes
2 answers

Java: The right way to make a scanner

First I'm a noob to Java so don't be mad at me if I'm acting stupid - Thanks. As I said I'm trying to learn Java. Right now I'm trying to learn the right scanner for this mini-game, but I'm getting confused because people tell me to do it in two…
Landscape
  • 249
  • 1
  • 2
  • 13
0
votes
1 answer

Wait for instruction without stopping while loop

I designed a C++ application that represents an mechanical arm. The simulation is running inside a while loop. I have the following class Motherboard that interacts with the simulation class Motherboard { public: void receiveInstruction(double…
Vincent
  • 1,616
  • 2
  • 16
  • 18
-1
votes
1 answer

Console only recognizes second input Java

I need to type a command twice into the Console, only then it recongnizes it as a input. I tried as the reader from the command file also a scanner instead of a bufferedReader. I hope you can help me! private File commandFile = new…
-1
votes
2 answers

Make this function synchronous?

I'm running the following bit of code to get input from the terminal in nodejs (I picked this method because it doesn't need dependencies) and I need it to work synchronously. It's inside a function that gets called repeatedly by a for loop and thus…
-1
votes
1 answer

i have to cin my name to enter my resources how do i do that

cin << name << endl; cout >> "my name is " << name << endl;
-1
votes
1 answer

Unable to read Inputs from Console in java

I need to read input test cases from console into a 2D array and a 1D array but unable to find the error in my code import java.util.*; import java.lang.*; import java.io.*; class Ideone { public static final int SIZE = 5; …
-2
votes
1 answer

Internals of ncurses: console input

How exactly does Ncurses capture input into the console? I would like to implement it myself instead of using ncurses due to the overhead that ncurses is causing. Thanks!
Nautilus
  • 105
  • 10
-2
votes
1 answer

why does this input validation error occur in my java code?

/* This code reacts negatively when the input is received in the format mm / dd/ yyyy or mm/dd/yyyy. I've asked for help but I think there's more to it than simply a String vs. int syntax dynamic going on. Can you help explain why this code is…
-3
votes
1 answer

In Visual Basic, how can you input something in the same line?

Sorry if my question isn't that clear. We usually write it like: dim num as integer Console.writeline("Input num") num = console.readline() How can you write that input num and the value on num on the same line, what I wrote will do it on two…