Windows API function equivalents (SetCursorPos, GetCursorPos, mouse_event, keybd_event ...) for Linux (X11)?
I was wondering if there were equivalents of the above mentioned functions for Linux (X11) - I can't seem to find them. ...
I was wondering if there were equivalents of the above mentioned functions for Linux (X11) - I can't seem to find them. ...
hi, is there a module to read midi input (live) with python? ...
I'm obviously not quite getting the 'end-of-file' concept with C++ as the below program just isn't getting past the "while (cin >> x)" step. Whenever I run it from the command line it just sits there mocking me. Searching through SO and other places gives a lot of mention to hitting ctrl-z then hitting enter to put through an end-of-fi...
I am new to jquery and am trying to fire a function on a keyPress if there are NO inputs selected. but I am having trouble with testing for focus. Below is what I currently have but it isn't working correctly. Any advice? var inputHasFocus = false; $('#myForm :input').each(is(":focus")){ inputHasFocus = true; }; if (inputHasFoc...
I have been trying to get a function working with JQuery to add or subtract form input fields. I have been using an example I found as a starting point. Here is what I have so far: <script type="text/javascript"> $(function(){ // start a counter for new row IDs // by setting it to the number // of existing rows ...
I am creating a web form for uploading small movie clips to a HTTP server. However, while my HTML file input control gets shown on an ipod touch, the button is completely disabled and I cannot click it to upload files. What do I have to do to use the input control to upload files (e.g. movie clips or pictures) to my HTTP server. My page...
I have an issue with my C++ code for college. I can't seem to understand why my sRecSort() method isn't working. Any help? This is really confusing me! #include <iostream> #include <algorithm> #include <string> #include <fstream> #include <sstream> using namespace std; void sRecSort(string n[], int s[], string e[], int len){ for (in...
I know I can use the ActionView helper strip_tags method in my views to sanitize output, but what is the best way to sanitize user input before I persist it to my db? Should I find a way to include the view helper in my controller and reuse the strip_tags method? I thought rails would have something available globally to do something l...
I've got a problem with using the io_add_watch monitor in python (via gobject). I want to do a nonblocking read of the whole buffer after every notification. Here's the code (shortened a bit): class SomeApp(object): def __init__(self): # some other init that does a lot of stderr debug writes fl = fcntl.fcntl(0, fcntl.F_G...
I've debugged my program and the arrays seem to be allocated well. However for some strange and stupid reason, the code doesn't output the arrays into the file. Please help me spot my bug or such! #include <iostream> #include <algorithm> #include <string> #include <fstream> using namespace std; void sRecSort(string *n, int *s, string...
I am familiar with the input() function, to read a single variable from user input. Is there a similar easy way to read two variables? I'm looking for the equivalent of: scanf("%d%d", &i, &j); // accepts "10 20\n" One way I am able to achieve this is to use raw_input() and then split what was entered. Is there a more elegant way? T...
I have a function (in C) that gets input from the user, (using scanf) stores it in an unsigned int, and returns the input to other functions that handle it: unsigned int input(void) { unsigned int uin; scanf("%u", &uin); return val; } I was wondering, being as I ought to flush stdin, I'd want to use a while loop using get...
Hey guys, I have a table setup like below: <table> <tr> <td class="url"> <a href="http://www.domainname.com/page1.html" /> </td> </tr> <tr> <td class="url"> <a href="http://www.domainname.com/page2.html" /> </td> </tr> <tr> <td class="url"> <a href="http://www.domainname.com/page3.html...
I'm trying to create a generic <input type="button"> button in ASP.Net using an ASP.Net control and I'm unfortunately stuck using ASP.Net 1.1 right now. I know you can use the UseSubmitBehavior="False" attribute in later versions of ASP.Net but I can't seem to find a way to do this in ASP.Net 1.1. Is there a way to do this or will I ne...
Writing a widget to be able to rename files by clicking on the text name and entering the new name. I didn't find any ready-to-use solutions, maybe you can point me to one? Here is where I ended up and it doesn't work: for some reason, only the last input box is changing, and the first and second aren't referenced: <span id="text_name...
I would like to have a submit button which contains text and an image. Is this possible? I can get the exact look I want with code that looks like: <button type="button"> <img src="save.gif" alt="Save icon"/> <br/> Save </button> ... but I haven't found a way to have one of those for my forms. Is there a way to do that with an <inp...
Hello, I was learning flex for a few days now and suddenly noticed that input of unicode / foreign characters on Linux into TextInput, TextArea or RichTextEditor gives you unreadable text composed of several characters (seems like utf-8 is making things bad). On the other hand, output is flawless. I was trying hard to find anything for...
I'm in the process of migrating code from a classic ASP site to an ASP.NET site. One problem that I'm running into is an <input type="file" name="upload"/> form field. <form id="classicASPform" method="post" EncType="Multipart/Form-Data" action="http://domain2/formReciver.aspx"> <input type="file"...
I clicked on it and the form is submited, along with a query string appended like x=1&y=2 to the url targetted by the form's action. Why? ...
I am trying to reset the actual value attribute of an input so that it can be reset back to that value if reset, not necessarily the original value when the form was loaded. The problem is these changes don't seem to take effect. I have tried both: $(this).attr('value', $(this).val()); as well as.... $(this).val($(this).val()); Neit...