input

Load multiple files using HTML5 and PHP

I am trying to load multiple files using HTML5. This is my code I found on some site. In the PHP code it doesn't recognize it as an array. Am I doing something wrong? Can someone show me a working solution? Thanks. index.html <form action='save.php' method='post' enctype='multipart/form-data'> <input name="uploads" type="file" multip...

Use of [] in fscanf()

I've a text file with following contents: "abc","def","ghi" The following works to read the file contents properly: int main() { char name[1024] = {0}; FILE *file = fopen("file.txt", "r"); while(1) { if (fscanf(file, " %[\",]s ", name) == EOF) break; if (fscanf(file, " %[a-zA-Z]s ", name) ...

c++ openGL Continuous button pressing

Hi, I'm building some simple game with openGL on C++. I have some movement while pressing some key. I want it to be continuous but my problem is that on the first second after pressing the key (on the keyboard) the system refers to it as a single click, my game object makes one move and after a second it stats to move continuously. Some ...

Read input as array

I want to make something read from inputstream to store in an int[] when I type "read 1 2 3 4". what should i do? I do not know the size of the array, everything is dynamic... Here is the current code: BufferedReader stdin = new BufferedReader( new InputStreamReader(System.in)); String line = stdin.readLine(); StringTokenizer st = n...

Javascript manually firing .onchange() event

I have an input field I want to assign a new value and fire an .onchange() event. I did the following: document.getElementById("range").value='500'; document.getElementById("range").onchange(); Where range is my input Id. I get the following error: Uncaught TypeError: Cannot read property 'target' of undefined Is there a way to def...

Architecture: Where to sanitise uploaded file names?

I'm trying to change the way we handle uploaded files before storing them to disk. We have had some problems when users from non-windows operative systems upload files with characters that are illegal in windows file names. The idealist in me tells me that file names should be made legal as close to the web layer as possible. Thus we u...

HTML Field for 96,004 Characters

I'm writing a small asp app to query a server. In order to query the script posts 2 values. One is an identifier of the user, and the second contains encrypted data. I don't need to decrypt the data, but the user has to be able to paste a string thats 96,004 characters long (or upload a txt file containing it). I standard html textar...

html input file action after file selected

I am in a predicament with input files. The project I am working on has added a jQuery extension that masks all input types and makes them more 'vibrant'. However it has also caused a lot of trouble in the updating of what is listed in these inputs. One such problem is the input with type file. It currently will not change what is being ...

iPhone UIWebView - Can auto complete be turned off on a input text field?

Hi, I've searched high & low for an answer on this and I can't seem to find an answer or anybody else having the same issue. Hope some one can assist? I have a web page for signup which I'm viewing in an iPhone UIWebView. A user is asking if we can stop capitalization on the first letter of the email address being entered. I thought...

C#, DeviceIOControl: How to control mouse using it?

Hello, Does anybody could explain me how to use it to perform mouse input in driver level? I would like to know how to perform mouse (particular button) down/down/press events, also how to do move mouse and, finally, how scroll (horizontaly/verticaly) with mouse? I have already used SendInput, SendMessage and even MouseKeys (Windows a...

Reorder function arguments in Lisp

I'm interested in an operator, "swap-arg", that takes as input 1) a function f of n variables, and 2) index k, and then returns a the same function except with the first and kth input variables swapped. eg (in mathematical notation): (swap-arg(f,2))(x,y,z,w) = f(z,y,x,w) Now my first idea is to implement this using rotatef as follows, ...

$_Files[] array only showing first file uploaded

I currently have a form with a single file upload input on it. the original form input I've tried <input type="file" name="userFile[]" /> and <input type="file" name="userFile1" /> I also have a link to generate more input fields using If have tried methods of: a) counter = 1; function addInput(){ counter ++; $('#divName').app...

Force click event on input file or open choose file window

I have a form in my HTML with field. I'd like to show the file selection window when the user clicks somewhere else (for example, an image on other part of the screen). The reason I want to do this is that I have a form with many fields, posting to some action "x", and the file selection form on other part of screen, submiting to actio...

Read input using token

Possible Duplicate: Read input as array Hi i want to make something read from inputstream to store in array int[] inputInts when i type "read 1 2 3 4", what should i do? i do not know the size of the array, everything is dynamic... here is the current codes BufferedReader stdin = new BufferedReader( new InputStreamReader(S...

linux: dual mice - multiple mice with multiple mouse pointers?

is it possible to use more then one mouse in Linux so that there's two pointers controlled by two mice? or can i get raw data like x,y from a second mouse even if there's no pointer? ...

cursor is locked in the <input> when browsing in Nokia E72

I developed a simple web app in the browser where there are 3 input boxes . The first input box has a ajax search suggestion box drop down when user starts keying in something. For example, the first input box is for user to key in username, when user key in "alan", a dropdown-like suggestion box will show below the input box to show t...

Problem with jQuery

if ( !this.labelContainer.append(label).length ) this.settings.errorPlacement ? this.settings.errorPlacement(label, $(element) ) : label.insertAfter(element); (this code is from validate plugin, it repeats for each input) label is <label>text</label> element is <input /> This works good, it adds label directly after the element...

Update html text box while Javascript is running

Hi, I have an html file that accepts user inputs then uses Javascript to calculate a value based on those inputs. That result is then displayed in an input box after the program has finished. What I'd like to do is make it so that when you click on the button to run the javascript, the input box that displays the result will show 'Cal...

Direct access to memory devices under Windows / Linux

Hello I'm currently writing a software to test the integrity of flash-memory devices. (using c++ iostreams) To achieve this goal files with random content are written to the device, read back, copied, moved, compared ( I put the device under stress condition, and check if the data is valid from time to time)... Everything looks great on...

Android: InputMethodService how to set a view with setExtractView(View view)? [secret API bug?]

I'm trying to provide a modified view for a custom Android keyboard in fullscreen mode. Therefor I'm trying to replace the extract view. In the documentation I found the following method: setExtractView(View view) - so I assume it's a public API call. However, as you can see from the Android OS source code (snipped pasted below) it lets...