Need a big favor! I'm trying to send uploaded file using JavaScript &amp; Ajax, however not getting any success.   I want that when I upload the file, it will call the function myFunction(), and send the file to the PHP path(ajax.php) I've set.  Below is the code I've so far.  &lt;script&gt;    function myFunction() {       var x = document.getElementById("up");       $.ajax({          type: 'GET',          url: 'ajax.php',          data: {},          beforeSend: function() {},          success: function(data) {             alert(data);          }       });    } &lt;/script&gt; &lt;input type="file" name="images" id="up" onchange="myFunction()" /&gt;
I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); }); &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"&gt;&lt;/script&gt; &lt;span&gt;File&lt;/span&gt; &lt;input type="file" id="file" name="file" size="10"/&gt; &lt;input id="uploadbutton" type="button" value="Upload"/&gt;     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?
How can I extract menthol powder from fresh mint/peppermint? Script for display wrapper class Account list of records? Hi i am trying to write script for display list of records from wrapper class.   @remoteaction     public static wrappercls getaccounts(){         string account = 'select id,name,accountnumber from account';         listacc = database.query(account);         count = listacc.size();         system.debug('#####'+count);         wrappercls wra = new wrappercls(count,listacc);         return wra;     }      public class wrappercls{         public integer count11;         public list&lt;account&gt; account;          public wrappercls(integer count11,list&lt;account&gt; account){             this.count11 = count11;             this.account = account;         }     }    This class returns list of account records and record count parameter.Need to display these records in page.Is it possible if possible Please help me on this..  Script  &lt;script&gt;   function getallaccounts(){     exremote.getaccounts(         function(result,event){             if(event.status){              }             else {              }        },{escape:true}     ); } &lt;/script&gt;   Thanks in Advance... Calculate difference between two dates (number of days)? How to make generated classes contain Javadoc from XML Schema documentation How to enumerate with small roman capitals (not lowercases)? Although I have seen many similar questions, none has been useful.   The question is quite simple: How do I reproduce the highlighted numerals in the image below?    Note that the form of the numerals addressed in questions as  is different from this one.  Thank you in advance! Why does an conditionally convergent infinite series, when deranged, have a different limit? $\sum u_n = 1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\dots$ conditionally converges to $\log 2$; and, when deranged to $\sum u'_n = 1-\frac{1}{2}-\frac{1}{4}+\frac{1}{3}-\frac{1}{6}-\frac{1}{8}+\dots,$ converges to $\frac{1}{2}\log 2$. Why does a deranged conditionally convergent series have a different limit? First Course in Math Anal, p.93, by Burkill, explains that the sums $s_n, t_n$ of the first n terms of the two series are different functions of $n$. This reasoning is incomplete, because different functions of $n$ can converge to the same limit; for example, let $r_n$ be the first $2n$ terms of $\sum u_n$, then $s_n$ and $r_n$ are different functions; besides, by differently defining terms, i.e. clustering pieces of a series, e.g. \begin{align*} 1-\tfrac{1}{2}-\tfrac{1}{4}+\tfrac{1}{3}-\tfrac{1}{6}-\tfrac{1}{8}+\dots = \left(1-\tfrac{1}{2}-\tfrac{1}{4}\right)+\left(\tfrac{1}{3}-\tfrac{1}{6}-\tfrac{1}{8}\right)+\dots \\ = \left(1-\tfrac{1}{2}-\tfrac{1}{4}+\tfrac{1}{3}-\tfrac{1}{6}-\tfrac{1}{8}\right)+\dots,\\ 1-1+1-1+\dots = (1-1)+(1-1)+\dots \\ =(1-1+1-1)+\dots,\\ 1+1+1+1+\dots = (1+1)+(1+1)+\dots \\ = (1+1+1+1)+\dots, \end{align*} one gets the sum of first n terms as different functions, but the series's limit remains. One could view a changed limit from the perspective of the changed number of terms, Denote 'countably many', the size of natural number, as $\lvert\mathbb{N}\rvert$, then $\lvert\mathbb{N}\rvert = \lvert k\mathbb{N}\rvert = \lvert\mathbb{N}\times\mathbb{N}\rvert$. Then two series with different numbers (e.g. $\lvert \mathbb{N}\rvert$, $\lvert k\mathbb{N}\rvert$) of terms– and so having different limits– paradoxically have same number of terms–and so are possibly formed by the same terms. The paradox could be the fundamental reason. Are there other explanations? Is the use here of 'countably many' is proper? Is it a good practice to place C++ definitions in header files? My personal style with C++ has always to put class declarations in an include file, and definitions in a .cpp file, very much like stipulated in . Admittedly, part of the reason I like this style probably has to do with all the years I spent coding Modula-2 and Ada, both of which have a similar scheme with specification files and body files. I have a coworker, much more knowledgeable in C++ than I, who is insisting that all C++ declarations should, where possible, include the definitions right there in the header file. He's not saying this is a valid alternate style, or even a slightly better style, but rather this is the new universally-accepted style that everyone is now using for C++. I'm not as limber as I used to be, so I'm not really anxious to scrabble up onto this bandwagon of his until I see a few more people up there with him. So how common is this idiom really? Just to give some structure to the answers: Is it now The Way™, very common, somewhat common, uncommon, or bug-out crazy? What are the 'types' of parametric down conversion? As, the above link shows, other countries have similar murder rates but they are not in the radar of international travelers.  For example, as seen in the list, Puerto Rico has similar statistics. But, personally, I never heard of Puerto Rico to be a dangerous place to travel.  Why is it considered so dangerous to travel in South Africa? Is that due to the incompetent law enforcement agencies? LaTeX Classes or Styles for Schedules and/or Calendars? Maybe TeX isn't the best for this particular problem, but any teachers out there use a particular class or package to plan lessons?  Right now I'm just using a spreadsheet, but I always find myself wishing there was a 'lessonplan.sty' or 'classschedule.sty' file out there somewhere so I could still use the LaTeX for equations, tables, lists etc.    A bit of searching yielded a few results, but there doesn't seem to be a consensus.  Anyone used any of these:        Any recommendations from anyone on best way to make calendar-based class schedules and/or lesson plans? How do I setup user autostart and properly configure systemd user services? On my arch server, I was setting up users restricted to their home directories. I ran:  useradd -m -s /bin/bash username and passwd username  I've read   I figured I should use systemd user services to make each user run a node server on startup. So i logged into one user account su username and created a file ~/.config/systemd/user/serve.service containing:  [Unit] Description=One of the servers  [Service] ExecStart=/usr/bin/node /home/username/server.js  [Install] WantedBy=default.target   then I ran systemctl --user enable serve.service which responded with Failed to connect to bus: Permission denied  As far as I understand I should run systemctl --user ... command logged in as a user and not as root.  So what did I miss in this configuration? Can I enter the Schengen area with a German long-term visa through a different country? I am an Indian national. Right now I am staying in Israel. I will be moving to Germany on the last week of this month with german national visa directly from tel aviv. Ticket price of direct flight is high. So I am thinking to buy either Air France or LOT for travelling having layover at Paris or Poland. Am I allowed to do that? I mean is it mandatory to enter in Germany first? May I travel with these airlines with proper transit visa? How do I get rid of this unwanted bar from Eclipse? TikZ: multiple decorations on a path. Search with Auto-Complete (like Gmail / Intellisense) I have 3 folders with large amount of data in each which has to be maintained seperately. Can I create a sym link or shortcut.in windows which should show me the merged contents of the 3 folders. I am not looking for library conf in Win7.   Any suggestion is highly appreciated. JavaScript post request like a form submit I accidentally disabled my admin account.  After I login to another account I found I can not get admin rights, because all admin accounts on my computer are disabled.  I clicked on 'run as administrator' but only see a smart card choice (all the admin accounts are disabled so no choice provided)    I don't want to re-install my OS, help!    Details:  I have account A on my computer.    I got a new computer so I want to give the old one to my mother.    Creating a new user account B for her and disable account A.    Logout and restart.    Successfully login B, now I found I could not get admin rights because no account choice is provided.    More informations about my machine:  OS is Windows 10 and my admin account is a Microsoft Account.  I have an arch-linux installed on my computer and dual-boot it using GRUB, so maybe I can not use safe mode. Closure of $\{\frac{1}{n}\}:=M$ In $\mathbb{R}$ with standard topology the closure of the above set $M$ is $M \cup 0$. I fail showing this by purely topological means. I.e. not using the fact that this holds in the reals as a metric space and deduce it for the induced topology.  I assumed that there exist a closed subset $A$ containing $M$ but not 0. Hence, the complement of $A$ is an open subset containing 0. Does this already yield a contradiction or do I need a different approach?  Could you help me on this? It is a known fact that if $R$ is a UFD, then $R[X_1,X_2,\dots]$ is also a UFD, but there is a subtlety that is making me uncomfortable.  The standard approach essentially goes something along the lines of...let $f$ be a polynomial, so it only involves finitely many variables, say up to $X_1,\dots,X_n$. Then since $R[X_1,\dots,X_n]$ is a UFD, $f$ has a factorization into irreducibles. Then $f$ cannot have a factorization involving indeterminates $X_N$ not in $R[X_1,\dots,X_n]$. If it did, then $f$ would have two factorizations in the UFD $R[X_1,\dots,X_n,\dots, X_N]$, a contradiction.  This seems to assume that the prime factorization in $R[X_1,\dots,X_n]$ is still a prime factorization in $R[X_1,\dots,X_n,\dots,X_N]$. But how can you see that irreducibles in $R[X_1,\dots,X_n]$ are still irreducibles in $R[X_1,\dots,X_m]$ for $m&gt;n$? This does not seem obvious.  Let $R_k=R[X_1,\dots,X_k]$. The explanantion I found is this: Suppose $p\in R[X_1,\dots,X_n]$ is irreducible in $R_n$. Suppose $p=ab$ for $a,b\in R_m$. Evaluating $X_1,\dots,X_n$ at $1$, you get  $$ \bar{p}=\overline{ab}\in R[X_{n+1},\dots,X_m] $$ But $\bar{p}\in R$, which implies that $a$ and $b$ do not involve any variables $X_{n+1},\dots,X_m$. So $a,b\in R_n$, and thus one is a unit, hence a unit in $R_m$.   The part I don't follow is how evaluation at $1$, implies $a$ and $b$ do not have indeterminates other than $X_1,\dots,X_n$. Isn't it possible that some of the higher indexed indeterminates disappear when you evaluate? Suppose for instance $p\in R_1$, and $a\in R_2$ is $a=-X_1X_2+X_2$. Then evaluting at $1$ gives $\bar{a}=0$ so we may not get the desired contradiction since $\overline{ab}=0\in R$?