user-input

how to get input from user at runtime

↘锁芯ラ 提交于 2019-11-29 03:57:57
i want to take runtime input from user in oracle 10g pl/sql blocks(i.e. interactive communication with user), is it possible? declare x number; begin x=&x; end this code gives error as & can't be used in oracle 10g. To read the user input and store it in a variable, for later use, you can use sqlplus command ACCEPT . Accept <your variable> <variable type if needed [number|char|date]> prompt 'message' example accept x number prompt 'Please enter something: ' And then you can use the x variable in a PL/SQL block as follows: declare a number; begin a := &x; end; / Working with a sting example:

Disable Text Entry in <input type=“number”>

五迷三道 提交于 2019-11-29 02:06:44
I am making a simple web app. At one part of it, I have included an input box of type="number" <input type="number" min="0"> Anyhow, when I run the code in my latest Google Chrome Browser, I am able to enter text too: I do not want users to be able to do that. How should I rectify this? You can use JavaScript (e.g. with jQuery) to allow only specific characters: // Catch all events related to changes $('#textbox').on('change keyup', function() { // Remove invalid characters var sanitized = $(this).val().replace(/[^0-9]/g, ''); // Update value $(this).val(sanitized); }); Here is a fiddle. Same

jmeter testcases which can handle captcha?

强颜欢笑 提交于 2019-11-29 01:42:32
问题 We are trying to build a jmeter testcase which does the following: login to a system obtain some information and check whether correct. Where we are facing issues is because there is a captcha while logging into the system. What we had planned to do was to download the captcha link and display, and wait for user to type in the value. Once done, everything goes as usual. We couldnt find any plugin that can do the same? Other than writing our own plugin, is there any option here? 回答1: Since

Lua - get command line input from user?

心不动则不痛 提交于 2019-11-29 01:26:28
In my lua program, i want to stop and ask user for confirmation before proceeding with an operation. I'm not sure how to stop and wait for user input, how can it be done? Take a look at the io library, which by default has standard-input as the default input file: http://www.lua.org/pil/21.1.html local answer repeat io.write("continue with this operation (y/n)? ") io.flush() answer=io.read() until answer=="y" or answer=="n" Scythe I've worked with code like this. I will type this in a way it will work: io.write("continue with this operation (y/n)?") answer=io.read() if answer=="y" then --(put

Escaping user input from database necessary?

女生的网名这么多〃 提交于 2019-11-29 01:11:38
问题 So I know about MySQL injection and always escape all my user input before putting it in my database. However I was wondering, imagine a user tries to submit a query to inject, and I escape it. What if I then at a later moment take this value from the database, and use it in a query. Do I have to escape it again? So: ( sql::escape() contains my escape function) $userinput = "'); DROP `table` --"; mysql_query("INSERT INTO `table` (`foo`,`bar`) VALUES ('foobar','".sql::escape($userinput)."')");

DataInputStream deprecated readLine() method

感情迁移 提交于 2019-11-28 21:09:26
I am on java 6. Using DataInputStream in = new DataInputStream(System.in); to read user input. When the readLine() is deprecated. What is the work around for reading user value? DataInputStream in = new DataInputStream(System.in); int num; try { num = Integer.parseInt(in.readLine()); //this works num = Integer.parseInt(in); //just in doesnt work. } catch(Exception e) { } please explain as it should when the readLine() is deprecated. InputStream is fundamentally a binary construct. If you want to read text data (e.g. from the console) you should use a Reader of some description. To convert an

PHP - HTML Purifier - hello w<o>rld/world tutorial striptags

三世轮回 提交于 2019-11-28 20:38:44
I am just looking into using HTML Purifier to ensure that a user-inputed string (that represents the name of a person) is sanitized. I do not want to allow any html tags, script, markup etc - I just want the alpha, numeric and normal punctuation characters. The sheer number of options available for HTML Purifier is daunting and, as far as i can see, the docs do not seem to have a beggining/middle or end see: http://htmlpurifier.org/docs Is there a simple hello world tutorial online for HTML Purifier that shows how to sanitize a string removing all the bad stuff out of it. I am also considering

How does jsFiddle allow and execute user-defined JavaScript without being dangerous?

泄露秘密 提交于 2019-11-28 20:25:42
I've been working on a JS library and would like to setup a demo page on Github that allows, for example, users to define their own callbacks and execute commands. I know " eval() is evil" and I can see how blind eval() of scripts could lead to XSS and other security issues. I'm trying to cook up some alternative schemes. I really enjoy the interactivity of jsFiddle. I've taken a look at their source but was hoping someone could lay out here how jsFiddle allows and executes user-defined JavaScript without being dangerous. So long as it doesn't involve a 3rd party echo server, I'm hoping I can

How to get graphic tablet pen pressure value?

依然范特西╮ 提交于 2019-11-28 19:58:01
I'm using a Wacom Bamboo Pen tablet and I'd like to be able to get its pen pressure value in my application written in C#. How do I do that? Is there maybe an API that allows one to get pen values on Windows 7? Wacom provides an extensive API to get data directly from the tablet.The API includes example code for detecting pressure, tilt and other interactions: Tilt Test : Demonstrates pressure, use of the eraser and pen tilt properties Pressure Test : Demonstrates how to detect and display pen pressure These code samples are in C, but there are also examples that in c#.net that include code to

“Safe” markdown processor for PHP?

一笑奈何 提交于 2019-11-28 15:44:06
Is there a PHP implementation of markdown suitable for using in public comments? Basically it should only allow a subset of the markdown syntax (bold, italic, links, block-quotes, code-blocks and lists), and strip out all inline HTML (or possibly escape it?) I guess one option is to use the normal markdown parser, and run the output through an HTML sanitiser, but is there a better way of doing this..? We're using PHP markdown Extra for the rest of the site, so we'd already have to use a secondary parser (the non-"Extra" version, since things like footnote support is unnecessary).. It also