The issue is quite simple, I've got a form which targets an iframe. When the form is submitted the load event fires off, so I can use it as a ajax fallback for upload picture functionality for IE8/IE9.  $('#iframe').load(function () {     // do something });   This works ok, however the load event fires off even if I get 415 http code back and no response.  How can I retrieve the HTTP status code from the loaded iframe? A solution that doesn't need any server-side adjustments would be really helpful.
I used the jQuery Form plugin for asynchronous form submission. For forms that contain files, it copies the form to a hidden iframe, submits it, and copies back the iframe's contents. The problem is that I can't figure out how to find what HTTP status code was returned by the server. For example, if the server returns 404, the data from the iframe will be copied as normal and treated as a regular response.  I've tried poking around in the iframe objects looking for some sort of status_code attribute, but haven't been able to find anything like that.    The $.ajax() function can't be used, because it does not support uploading files. The only way to asynchronously upload files that I know of is using the hidden iframe method.
Can helium disappear from Earth? Helium is lighter than air, so it should fly off from Earth. Is it possible that in the future we will run out helium? How to programmatically close a JFrame Is there a way to convert a List(of Object) to a List(of String) in c# or vb.net without iterating through all the items? (Behind the scenes iteration is fine – I just want concise code)  Update: The best way is probably just to do a new select  myList.Select(function(i) i.ToString()).ToList();   or  myList.Select(i =&gt; i.ToString()).ToList(); spawn - command not found! I am using Mac OS X 10.9.4, following is my script to copy files from local machine to different host  #!/bin/bash #!/usr/bin/expect  echo "I will fail if you give junk values!!" echo " " echo "Enter file name: " read filePath echo " " echo "Where you want to copy?" echo "Enter" echo "1. if Host1" echo "2. if Host2" echo "3. if Host3" read choice echo " " if [ $choice -eq "1" ] then   spawn scp filePath uname@host1:/usr/tmp      expect "password"      send "MyPassword\r"   interact elif [ $choice -eq "2" ] then   spawn scp filePath uname@host2:/usr/tmp      expect "password"      send "MyPassword\r"   interact elif [ $choice -eq "3" ] then   spawn scp filePath uname@host3:/usr/tmp      expect "password"      send "MyPassword\r"   interact else   echo "Wrong input" fi   when running this script i am getting following  ./rcopy.sh: line 21: spawn: command not found couldn't read file "password": no such file or directory ./rcopy.sh: line 23: send: command not found ./rcopy.sh: line 24: interact: command not found "debconf: DbDriver "config": config.dat is locked by another process: Resource temporarily unavailable" while installing packages I'm trying to install the flashybrid but when I enter the apt-get install flashybrid command, I get this error:  root@user-desktop:/home/user# apt-get install flashybrid Reading package lists... Done Building dependency tree Reading state information... Done flashybrid is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up flashybrid (0.15+nmu2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing flashybrid (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: flashybrid E: Sub-process /usr/bin/dpkg returned an error code (1)   I also tried this one to find what is already using that file:  root@user-desktop:/home/user# lsof | grep /var/cache/debconf/config.dat lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/user/.gvfs Output information may be incomplete. dpkg-prec 4672 root 4rW REG 8,6 39658 1697827 /var/cache/debconf/config.dat   But I don't know how to fix this. Installing a 16-bit Windows 95 game on 64-bit Windows 7 Home Premium What determines the number of comments that are displayed? I'm curious how it is decided how many comments to display before the "Show more comments" link. Sometimes I see a dozen comments on a question and no "Show more comments" link, in other occasions no comments are visible at all, only the link. I received $1000 and was asked to send it back. How was this scam meant to work? Possible Australianism - netbank = a website + app by which an Aussie can do their banking, including transferring money to other people.  A while ago, I ended up with $1000 transferred into my account, which in the description looked like a netbank transfer, not like a cheque, cash deposit etc, and which looked like it had already cleared and landed in my account. Usually when something is still working through the bank's system it displays as 'pending', but did not in this case.  I received a phone call from someone, saying that they had accidentally typed in the wrong account number, and wanting me to send them the same amount of money back via netbank.   Surely bank account numbers have a checksum, which make it relatively difficult for a typo to result in a payment going to the wrong person? What are likely sources of them being able to find my phone number to call me? Obviously, the bank either being hacked, or giving it out in response to a query from this person (but surely the bank is unlikely to tell me my own mobile number if I claim to have forgotten it?). Presumably either my phone, or the phone of someone I have sent money to/received money from could be compromised. Has anyone heard of any instances of this happening?  I then went to my bank, explained the situation and said that I did want to refund the money through the officially sanctioned methodology. After the laughter died down, the bank told me to ask the person to fill out a form, then they would get me to fill out a form that would authorize undoing that exact payment.  I rang up the person to tell them this, and over the course of about a week received an increasingly elaborate story about how that wasn't working, they needed the money immediately, there was a fee to fill out that form and they couldn't afford to pay it etc.  After that, I never heard back from them again. I check my netbank for several weeks after, expecting the money to magically disappear, but it did not. This was probably a year ago, and I'm pretty vague with money so may not have noticed if it disappeared more recently. How were they expecting to benefit?  Were they hoping to get the transfer from me, and undo the transfer to me, to leave them $1k up? If so, how can an internet banking transfer be 'undone' once it has already shown as 'received'. Or was this to do with money laundering? The account they requested me to send money to was the same as the one that the money appeared to come from. This was a scam, right? Shells have a useful feature where pressing the keyboard UP arrow replaces the contents of the current command line with the previous command that was entered. (And if you do it again, the command before that, and so on.)  I would like a similar feature, where pressing (some other button) replaces the contents of the current command line with the last line of output from the previous command (and if you do it again, the previous line of output , and so on.)  Is there any shell that provides a feature like this?  The motivation is that you often want to run a command, and then run another command with part of the previous commands's output as input. (No, I don't want to do anything involving piping the output of one command into the next. I'm looking for an interactive experience, where you run the first command, see its output, and then get a line of that output into your next command, without having to reach for the mouse to do a clumsy copy-and-paste.) Is my sugar daddy scamming me Is it bad behavior to add filler words such as "so", "um" in business speak? How exactly does curved space-time describe the force of gravity? What are the TeX definitions for the hyphen and dashes -, --, and ---? I've tried latexdef which does not handle --- as the operand. And \texemdash is defined as a character. So that leaves me once again leaning on the collective wisdom of the group :) Prove universal morphism is unique up to unique isomorphism. I'm following along Wikipedia page() on universal property, and this seems it should be trivial, but I couldn't finish the proof.  The definition I am working with:   The problem   So I want to prove that if $(A, u)$ and $(A', u')$ are universal morphism from $X$ to $F$, then there exists unique isomorphism $k: A \rightarrow A'$ such that $u' = F(k) \circ u$.   My attempt:   For any $B \in C$ and $f: X \rightarrow F(B)$, there exists unique $h: A \rightarrow B$ such that $f = h \circ u$.  Letting $B = A'$ and $f = u'$, we see that there exists unique $k: A \rightarrow A'$ such that $Fk \circ u = u'$.  This shows existence and uniqueness. We only need that $k$ is isomorphism, but this is the part I cannot prove.   Similarly, there exists unique $k': A' \rightarrow A$ such that $Fk' \circ u' = u$.  Plugging into each equation, we get  $$Fk \circ Fk' \circ u' = F(k \circ k') \circ u' = u'$$  $$Fk' \circ Fk \circ u = F(k' \circ k) \circ u = u$$  but this of course doesn't imply $F(k \circ k') = id$, so it seems useless.   Thanks for your help! How to get ObjectContext to compile? Proof by induction of summation inequality: $1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\dots+\frac1{2^n}\ge 1+\frac{n}2$ Sugar daddy wants my online banking login info to make deposits — is it a scam? How to change the light grey text that many web sites seem to use these days? Of late, I've noticed that many web sites seem to be using light grey text for many sections of their sites. Some such sections include - the text (link, usually) that shows in the status bar at the bottom of the browser when you hover the mouse over a link on their page, the indicator text in form fields to be filled in (e.g. the word "email" in the email address field), and many other elements on the page.  That light grey makes it much less readable.    Not sure whether is a new trend, or something to do with my browser settings (I haven't changed them lately, AFAIK), or Google Chrome, which is my browser. This is on Windows 7 running on a Dell Vostro laptop. I added the info about the laptop because I suspect the problem may even be due to my hardware settings, since I found the default brightness to be too high after I bought it, and changed it via Control Panel.  Would like to know what are some of the things I can check or change to solve this.  Thanks. How to execute a JavaScript function when I have its name as a string I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]). Suppose I have an Atwood machine, that is, two different masses connected with an inextensible, massless rope over a pulley. Assuming no friction between the rope and the pulley, the heavier mass will accelerate towards the ground, the lighter mass will accelerate towards the pulley, and the rope will accelerate towards the heavier mass. These three accelerations will be equal in magnitude. But this makes no sense to me. Force causes acceleration. But there is no force acting on the rope. And even if there was, the acceleration of the rope would be infinite because its mass is 0. So why does the rope accelerate? And how can the magnitude of this acceleration be finite?