I just started learning Java at school for cse142, but I've known a bit of programming so am considerably ahead of the class and have been trying my own little projects. Normally if I run into a problem I just work around it because I figure I just haven't learned that yet, but this one bugs me enough to make a whole thread about it.
I ...
Hi,
can you show me how to assign css properties to the button that is of type=file,say:
<input type="file" name="coolFile">
I know that in css you need to do this:
input[type=file]{
background:#ccf;
//and so on
}
How do I assign values for the button?
...
Does anyone know why there is some hesitation when you hold down a keyboard key and try to process it? I'm calling a function right in my WinProc(...) that will move an image on the screen (OpenGL) when a key is held down. I press it and get a single response, then there is about .5 seconds of nothing, then it behaves as normal (moves 1 ...
Preferably, answers will be in a .Net language. However, all answers are very welcome.
Thank you,in advance, for your assistance.
...
I need to automate FileMon.exe to startup with filters, save out the log it generates, and then exit.
My solution has been to write an assist application that will do all of this. Which has worked on starting up with specified filters and killing the process, but I still need it to save the log. Do you think it would be silly to send th...
I have several different submit buttons on my JSP in one form tag that all point to the same servlet. I need to know which submit button was clicked. Ho can I find out which button was clicked?
Regards
...
I'm working on a project where I need to know the amplitude of sound coming in from a microphone on a computer.
I'm currently using Python with the Snack Sound Toolkit and I can record audio coming in from the microphone, but I need to know how loud that audio is. I could save the recording to a file and use another toolkit to read in ...
Suppose I have the following HTML:
<form id="myform">
<input type='checkbox' name='foo[]'/> Check 1<br/>
<input type='checkbox' name='foo[]' checked='true'/> Check 2<br/>
<input type='checkbox' name='foo[]'/> Check 3<br/>
</form>
Now, how do I select the checked input fields with name 'foo[]'?
This is my try, but it doesn't work:
$('...
Do I need to manually call close() when I use a std::ifstream?
For example in the code:
std::string readContentsOfFile(std::string fileName) {
std::ifstream file(fileName.c_str());
if (file.good()) {
std::stringstream buffer;
buffer << file.rdbuf();
file.close();
return buffer.str();
}
throw std::runt...
I'll need to accept a string of 5 numbers from the user (only 5).
Should I use
istringstream
for the same ?
Can't I get away with something like this ?
int main()
{
char *InputMain;
InputMain=(char *)malloc(5+1);
cout << "Enter the number : " <<endl;
cin.getline ( InputMain, 5, '\n' ); // Input goes int...
This seems like kind of a silly question but is there a way to change the standard in in eclipse. If I was doing this from the windows console it would look like "java myprogram < stdin.txt"
...
Hi,
I reference the hidden field like:
var h = document.getElementById('myHiddenField');
How can I set the value to 100, and then output the value using a simple alert();?
...
Hello!
How do I learn currently selected keyboard layout / input language?
I was playing with NSInputManager but wasn’t able to achieve anything.
[NSInputManager currentInputManager]
returns (null) (as reported with %@) and thus
[[NSInputManager currentInputManager] localizedInputManagerName]
It would be the best for me to just g...
The project I am currently working on requires a lot of hexadecimal numbers to be entered into the code.
I once saw a pic of an old keyboard with a hexadecimal numpad (has A-F letters on it also) replacing the normal numpad. Anyone know where I can get one of these?
...
I may be wrong, but all(?) examples I've seen with Apache Hadoop takes as input a file stored on the local file system (e.g. org.apache.hadoop.examples.Grep)
Is there a way to load and save the data on the Hadoop file system (HDFS)? For example I put a tab delimited file named 'stored.xls' on HDFS using hadoop-0.19.1/bin/hadoop dfs -put...
I am creating a user input at one of the events:
var throwConnectBox = function() {
chat_box = document.getElementById('box');
div = window.parent.document.createElement('div');
input = window.parent.document.createElement('input');
input.type = "submit";
input.value = "Join chat";
input.onclick = "conn.send('$co...
Duplicate:
Submitting data from textarea by hitting “Enter”.
I've got a textarea and a submit button:
<textarea id="chat"></textarea>
<input type="submit" value="Submit" onclick="send_msg();">
The value of the of the texarea is submitted when Enter is hit:
textarea.onkeyup = function(e) {
alert(e.keyCode);
...
I have Javascript code that does this:
var oObjchbox = document.getElementById("CheckBox_" + countyId);
The countyId comes from an image map that is pre-made.
The checkboxes on the other hand are created by ASP.NET. My first try was to use an asp.repeater with asp:checkBox, but that did not do the trick since ASP.NET insists on crea...
I need to get the value that a user has entered in a textbox on a JSP. I used JavaScript to obtain the value, but then I need to access that same variable outside the JavaScript later on in the page.
Here's what I have:
<script type="text/javascript">
var sp;
function setPolicy(){
sp = document.getElementById('policy').value;
if...
I'm trying to write a game with support for Joypads as well as mouse/keyboard. I've tried finding information about that, but it's either outdated or not portable enough.
Does anybody know of any good, lightweight libraries that can abstract Joypad reading? I want to use the 360 controller, but I would like support for more than that.
...