FAQ Database Discussion Community


NodeJs Gulp - confirm before starting task

node.js,gulp,prompt,confirm
I have a very heavy gulp task that I want to ask the user if he really wants to start the task. I already saw the gulp-confirm and gulp-prompt but it's not helping me: I don't want to pipe the 'confirm' I just don't want to start the heavy task...

How to handle browser prompts in CasperJS

javascript,phantomjs,casperjs,prompt
The scenario is, when I click a button browser would show an alert which accepts user input field with OK and cancel buttons. Now please tell me how to handle this type of alert. As we know CasperJS doesn't displays the alert windows. This is the casperJS code casper.then(function ()...

Making a .bat in to find a public folder location. trouble making it ask the user to enter mailbox address

powershell,batch-file,prompt
As I said in the title, I am trying to make a .bat that will simply prompt the user to enter the email address of the public folder they are looking for. So far, I use the following command in exchange shell to do it manually: Get-Recipient -Identity "[email protected]" |...

zsh inserts extra spaces when performing searches and completion

shell,command-prompt,zsh,prompt,ansi-escape
I have written a small program that emits a command line prompt with some Git info. I use ANSI escape sequences to color it, and it looks something like this: However, whenever I do tab completion or a search, zsh inserts several spaces after the prompt: It seems to be...

Echo command cuts new lines

bash,echo,command-prompt,prompt,cat
I'm trying this command in my prompt to get all results into one file: $ echo $(apt-cache search nano) > search But, they are writing in a one line: $ cat search alpine-pico - Simple text editor from Alpine, a text-based email client libboost-chrono-dev - C++ representation of time...

Excel VBA: Creating a confirmation prompt when a cell is edited

excel,excel-vba,prompt
I am trying to create a confirmation so that when the cell is blank a prompt launches. If the user clicks confirm, the cell remains blank, else the cell returns to the original value. I have the following but it is not working, I hope that someone can solve this:...

Python - Passing input (prompt) into Function

python,input,prompt
I am trying to create a function that receives input from a user, re-prompts until one character is entered. Strip() is used to removed whitespace so only characters are counted. Here is my current code: def inputSomething(prompt, errorMessage = 'Atleast one character must be used'): while True: value = (prompt)...

Looping prompt on onclick

javascript,for-loop,prompt
So I have a php file that loops contents from MySQL into different divs. and every div has an id of "name".$j++. I've put a button in the loop that whenever it's clicked a prompt display woulds show. Every button also has an id of "button".$i++. I want the input...

Open terminal/prompt and pass a comand (ping)

java,bash,cmd,terminal,prompt
I need some help with my Java desktop application. I have a button that calls (is my intention) the terminal (Linux) or prompt/cmd (Windows) and pass some command (I'm trying to use the ping command). I just know how to open the terminal, but I can't pass the command. How...

Prompt for 5 words then display longest word javascript

javascript,string,function,split,prompt
I am trying to prompt for a 5 words then separate the words to find the longest word then display the longest word using java script. I am able to get anything to work, it wont even prompt for the words. function longestWord(string) { var word = prompt("Enter a string...

How to write an R function that displays plots sequentially?

r,plot,prompt,interactive,sequential
I want something similar to the 'plot.lm' functionality. y <- rnorm(100, 0, 1) x <- rnorm(100, 0, 1.5) mod <- lm(y ~ x) plot(mod) Hit <Return> to see next plot: Hit <Return> to see next plot: Hit <Return> to see next plot: Hit <Return> to see next plot: I want...

How to “if not an integer , alert and repeat prompt” ? the same with isNAN

javascript,alert,prompt,fizzbuzz
i m struggling with this. How to "if not an integer , alert and repeat prompt" ? I have the alert working , but i cant make it to prompt again. The same with isNAN which is not working at all! Thank you $(document).ready(function () { var fizzBuzz = function...

adding text after prompt for input

java,input,cmd,prompt
I'm new to Java & I don't even know if what I'm trying to do is actually doable in cmd but I want to know if there's a way to ask the user for an input while displaying something at the right of the input, something like: enter weight: _...

Bash Prompt Wrapping Issue

bash,prompt
I seem to be running into a situation with my custom Bash Prompt, very similar to this one here: Bash prompt line wrapping issue I'm thinking escaping might be my issue (as mentioned in the url above) I've tried moving things around and removing my brackets, but all that does...

Java: Add Place Holder on JTextField

java,swing,jtextfield,prompt
Guys is there a way or method in which we can add placeholder in j text field.I want to add placeholder "Enter Your Number" in field but how can i do this.I check all methods but didn't working. Code: public class Loop extends JFrame{ private JTextField t1; public L(){ getContentPane().setLayout(null);...

Animated PS1 prompt BASH [duplicate]

linux,bash,unix,prompt,ps1
This question is an exact duplicate of: How to make an animated bash shell prompt for the terminal? 2 answers I'm aware that this has been asked before but I couldn't find the answer I wanted anywhere. What I need (would like to have) is a BASH prompt that...

Windows prompt content variable as variable name

windows,prompt
It is possible in windows command line refer to a content variable like a pointer? Example: SET envTEST=FOO SET envPROD=BAR SET CURR=envTEST SET data=%%CURR%% I want to data contains FOO but it contains %envTEST% Thanks...

CMD/Batch Prompting for Input loop without goto command

windows,loops,batch-file,cmd,prompt
I have a loop scanning for the files of a folder and I want to ask for each file if it should be moved or not. As I am already in that loop I can't use goto commands. How can I prompt a input loop (yes / no) without using...

Javascript Prompt keeps appearing

javascript,prompt
The prompt that asks "Enter number of Ounces" keeps reappearing, eve after a value has been entered in the prompt.... What do I do to remove the looping prompt... I just need it to appear once. <html> <body> <script type="text/javascript"> // // ****************************** // Program: LAB3ALT.htm // Created by: Tanner...

sqlite3 weird behaviour after error

windows,sqlite3,prompt
Something strange happens when I use sqlite3 from command prompt in Windows. If I do something that gives an error, it keeps echoing "...>" and I can't even quit using the ".quit", the only solution is to close the prompt. Is it normal? ...

javascript prompt box without the cancel button?

javascript,jquery,javascript-events,prompt
Is there a way to create a input prompt box that doesn't have the cancel button, or doesn't allow the user to close the prompt until some value is entered?

how to reject duplicate values [closed]

python,duplicates,prompt
I'm making a program whereby the user has two enter 10 integers: a = input('Enter an integer: ') b = input('Enter an integer: ') c = input('Enter an integer: ') d = input('Enter an integer: ') e = input('Enter an integer: ') f = input('Enter an integer: ') g =...

Ordinals java - Java I class

java,prompt,ordinals
Stuck on getting the prompt to enter a number 1 to 10 - and results should add the st, rd, th, and nd to the number. Write a program that prompts the user to enter any integer from 1 to 10 and then displays the integer in ordinal form with...

How to hide password in phonegap prompt

android,cordova,passwords,hide,prompt
I'm building a phonegap app and I want to use prompt. Here is my code from index.js navigator.notification.prompt( 'Please enter your password', // message startSmsPrompt, // callback 'Login', // title ['Ok','Cancel'], // buttonName 'Password' // hint ); The problem is when the prompt opens and I enter the password, its...

Write a Script to respond to prompts with specified text

osx,unix,ftp,terminal,prompt
I am writing a script which will automatically capture a screenshot and trigger iSight to take a still photo when the script is run, then upload it to FTP. Everything is perfect other then one thing, my FTP requires a username and password to be entered when prompted (after both...

Simplifying IF statement when comparing userInput from a prompt [duplicate]

javascript,if-statement,prompt,capitalization,capitalize
This question already has an answer here: JavaScript case insensitive string comparison 7 answers I'm writing a simple Rock, Paper, Scissors program from scratch and I have an IF statement that seems bloated. I know it can be trimmed down but I can't find the answer anywhere. I first...

Error assigning value to JavaScript class property

javascript,node.js,asynchronous,synchronization,prompt
I am getting an error while setting a class property in javascript class. I am using nodejs prompt module to get user input and setting it to the class property. But i am getting following error. TypeError: Cannot read property 'resultAge' of undefined I figured it out that it has...

Angular display's literal in confirmation prompt

angularjs,syntax,prompt,confirmation
I'm creating a localization prompt <a href='#' rel="nofollow" ng-click=" confirmClick('{{lang.shopping_cart.clear_sc_prompt}}') && deleteShoppingCart()" confirm-click>{{lang.shopping_cart.clear_shopping_cart}}</a> But on-click it prompts the literal: {{lang.shopping_cart.clear_sc_prompt}} How do I display this value?...

Checking if user has unsaved data in JQuery?

javascript,jquery,exit,prompt
I have the following code... var leave_page_confirm=false; if ($(':input.common_class').val().length !== 0) { var leave_page_confirm=true; } window.onbeforeunload = save_data_check; function save_data_check() { if (leave_page_confirm) { return "You have unsaved information on the page."; } } I'm trying to see if any inputs on the page have value. If they don't then...

How to make a prompt box input invoke a function?

javascript,function,if-statement,prompt
How do I get rid of the button onclick="clickMe()" and just have the input from the prompt box execute the function? I need the input from a prompt box to invoke the if statement, i think? <!DOCTYPE html> <html> <head> <title>Demo</title> <script> function clickMe(){ var valueInput=prompt("Please input weekday, weekend?"); var...

VBA - on click - generate a prompt to confirm which workbook / spreadsheet to look at

excel,vba,onclick,copy,prompt
I am fairly certain I know how to select data from a different workbook / sheet but I'm a little clueless as to how I would go about generating a VBA question box that would prompt the user on click to input the relevant workbook / sheet. For example: Workbook...