When the load_upload() function gets executed, I want an explorer window to automatically open, so the user can select a file ($(imageFileInput).click();), and when a file is selected, I want the form to submit automatically.  The problem is that, when the form is generated dynamically as seen below, changes are somehow not detected. This seems to make it impossible to automatically submit the form when the value of imageFile changes.  How could I automatically submit the form this way? Any help is much appreciated!  function load_upload() {     var form = document.createElement('form');     form.method = "POST";     form.action = "image_upload_process.php";     form.id = 'imageForm';      var imageFileInput = document.createElement('input');     imageFileInput.type = "file";     imageFileInput.id = 'imageFile';     $(imageFileInput).click();     form.appendChild(imageFileInput);      document.body.appendChild(form); };   My change event:  jQuery(document).ready(function($) {     document.getElementById("imageFile").onchange = function() {         document.getElementById("imageForm").submit();     }; });
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
I'm using  and trying to switch from Web Applications to Stack Overflow.   I enter sta into "Switch sites" field, but search showing unrelated results first (3D Printing, 3D Printing Meta, Software Engineering ...): BJT in Reverse Active Mode of Operation What will happen if for a BJT transistor, it's emitter terminal is treated as collector and collector as emitter in a common emitter amplifier circuit? I know someone who just got an Atrix 4G and previously had an iPhone 3GS. I was asked how he could move his contacts from the iPhone/iTunes onto the Android device. I have never owned an iPhone and have had limited interaction with them. Does anyone know the simplest method of getting iPhone contacts onto an Android device? I want to put the section title in the left margin using titlesec. However, it results to a superfluous empty line when using list environment. How should I remove it without using vspace?  Minimal example:  \documentclass{article}  \usepackage{geometry} \geometry{   a4paper,   top=2cm,   bottom=2cm,   left=4.5cm,   right=1.5cm, }  \usepackage{titlesec} \titleformat{\section}[leftmargin]{\large\scshape\sffamily}{}{0cm}{} \titlespacing{\section}{2.5cm}{2ex}{0.5cm}  \usepackage{enumitem}  \usepackage{mwe}  \begin{document}  \section{Section A}  This line is aligned with the section title.  \blindtext  \section{Section B}  \begin{itemize}[nosep]   \item This line is not aligned with the section title. \end{itemize}  \end{document} Can I delete unnecessary device simulators of Xcode? I found that Xcode on my laptop consumes much of its storage, so I am trying to delete unnecessary files in Xcode.  There are four directories under Application/Xcode.app/Contents/Developer/Platforms/. I feel that WatchSimulator.platform and AppleTVSimulator.platform are not necessary, because I use Xcode almost only for basic iOS development.  I would like to know if I can delete those platforms directories directly? What is the point of the `cd` external command? I stand up and I look at two parallel railroad tracks. I find that converge away from me. Why? Can someone explain me why parallel lines seem to converge, please? Pivot rows into multiple columns Recovering added/staged file after doing git reset --hard HEAD^? Where to ask "subjective and argumentative" questions on programming? What should I do when the GETDEB repository is down? I'm trying to install programs/files from the getdeb repo but get a "check your internet connection" error.  Programs than I've tried include Qbittorrent and Mozilla-Plugin-VLC.    Through the terminal I get the following errors:  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps qbittorrent amd64 2.8.2-1~getdeb2   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/q/qbittorrent/qbittorrent_2.8.2-1~getdeb2_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   &amp;  Err http://archive.getdeb.net/ubuntu/ natty-getdeb/apps mozilla-plugin-vlc amd64 1.1.10-1~getdeb1   Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host) E: Failed to fetch http://archive.getdeb.net/ubuntu/pool/apps/v/vlc/mozilla-plugin-vlc_1.1.10-1~getdeb1_amd64.deb: Could not connect to archive.getdeb.net:80 (209.105.191.78). - connect (113: No route to host)   I'm not having any problems adding/removing other programs/files from my machine.  Is there a problem with GETDEB repo (and if so, is there any way to fix it on my end) or is there something wrong with my computer's configuration? Positive operator has a positive spectrum? Why is the sample distribution the Exponential distribution Gamma distributed? How do I kill mobs using /kill without them dropping loot? I have a spawn area I am hoping to make a safe haven, so I have a command block on a clock that kills each hostile mob type. This works to keep the place free of any hostile mobs, however every night I see rotten flesh, bones, arrows, and string everywhere.  I would like to add something to my command blocks so that they are killed without dropping loot. How can I accomplish this?  Note that I want mobs to drop loot generally elsewhere in the world, so /gamerule doMobLoot false will not do the trick for me. I'm hoping for a command that only applies to the mobs killed by the command block, and not anything else. Can someone please verify my proof?     Is the collection $\tau_\infty = \{U:X-U$ is infinite or empty or all of $X\}$ a topology on $X$?   No. Let $X = \mathbb{R}$.  Clearly, $\{x\} \in \tau_\infty$ for all $x \in X$.  Set $\displaystyle{B = \cup_{x \neq 0} \{x\}}$. Clearly, $X - B = \{0\}$, but $\{0\} \notin \tau_\infty$. Since $\tau_\infty$ is not closed under arbitrary unions, it does not define a topology on $X$. How often do ewoks eat sentients? In Return of the Jedi, the ewoks plan on eating Luke, Han and Chewie.     THREEPIO: I'm rather embarrassed, General Solo, but it appears you are to be the main course at a banquet in my honor.   At this point, the tribe had already met and befriended Leia, and had encountered the Imperials in the past, making it fairly likely that they knew humans were .  This raises the question of how often they ate sentients. Was it a one-off thing, to honor an extremely rare visit from a god, or was this fairly common? How much hard drive space do I need to install Windows 7 on my Mac via Boot Camp? I have a Macbook Air and would like to install Windows 7 on it via Boot Camp. How much hard drive space should I make sure to have free before doing this? Using induction to prove that $\sum_{r=1}^n r\cdot r! =(n+1)! -1$ Use induction to prove that    $\displaystyle\sum_{r=1}^n r\cdot r! =(n+1)! -1$   I first showed that the formula holds true for $n=1$.  Then I put n as $k$ and got an expression for the sum in terms of $k$.  I then found the sum till the $(k+1)$th term by adding the $(k+1)$th term to both sides of the equation and compared it to the sum expression I get by plugging $k+1$ into the sum expression given in the question - they don't match. An instructor has an exam of 5 questions and a question bank of 50 questions. Are there $50\choose 5$ or $(50)_5$ possible exams? I'm reading a lot of documentation on sed, and am still stumped on my particular use case.  I want to replace this line in a conf file with my own line:  Replace this line: #maxmemory &lt;bytes&gt; with: maxmemory 26gb  This is what I tried:  sed s/maxmemory.*bytes.*/maxmemory 26gb/ /etc/redis/redis.conf  I get the error: sed: -e expression #1, char 30: unterminated `s' command  Which stumps me because I don't know what that means. So my question is:  How can I accomplish what I want? What does that error mean? (so I can learn from it)