I tried to write ajax with jquery to fetch data from database butajax doesn't return any data. I put that code in header and it return the whole html content in response. What is the code need to write in admin-ajax.php to use ajax?
I'm wondering what the preferred method is for dealing with AJAX calls. Should one use the same plugin php file to process the POST or a separate one? Which is cleaner or safer?
Let $R$ be an rng. (There may be no unity)  Then, does there always exist a ring(with unity) $A$ such that $R$ is a subrng of $A$? i want to create new event in SharePoint calendar list in which I have some custom columns,i tried below code but it is not working      function bookingRoomForMeeting() {         var ctx = new SP.ClientContext(appWebUrl);//Get the SharePoint Context object based upon the URL           var list = ctx.get_web().get_lists().getByTitle("MyCalendarList"); //Get the List based upon the Title         var listCreationInformation = new SP.ListItemCreationInformation(); //Object for creating Item in the List         listItem = list.addItem(listCreationInformation);         listItem.set_item('Title', $("#txt_Title").val());         var date = $("#txt_startTime").val();         var dateTime = moment(date, 'DD/MM/YYYY HH:mm a').format("MM/DD/YYYY HH:mm a");         listItem.set_item('EventDate', dateTime);         var enddate = $("#txt_endTime").val();         var enddateTime = moment(enddate, 'DD/MM/YYYY HH:mm a').format("MM/DD/YYYY HH:mm a");         listItem.set_item('EndDate', enddateTime);         listItem.set_item('EmailId1', $("#txt_EmailId1").val());         listItem.set_item('EmailId2', $("#txt_EmailId2").val());         listItem.update();         ctx.load(listItem);         ctx.executeQueryAsync(             Function.createDelegate(this, success),             Function.createDelegate(this, fail)            );     } function success() {     alert("Completed"); } function fail() {     alert("operation failed"); }   list am using is SharePoint hosted app list,can any one tell me where am going wrong? What exactly fries the chip when you invert power supply? I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case. How can I get help on terminal commands? I often see things like     read man xyz   For more information read xyz's man page.   see info xyz    so I wonder:   How can I get help on terminal commands generally? What exactly are these man and info pages?   How can I find and view them? Proving if $a$ is not a multiple of prime $p$, then an integer $b$ exists such that $p^b - 1$ is a multiple of $a$ I tried many approaches but none of them really worked I treated $p^b-1$ as a Geometric progression but it didn't work and that is about as far as I have been able to go I have no clue how to move forward Which is better: Employer-sponsored HSA or opening an HSA individually? So I know that:   Employer-sponsored HSA's allow you to deduct contributions directly from your paycheck, pre-tax With individual HSAs, you must contribute using post-tax dollars, then deduct those contributions from your taxable income when you do your taxes   Given those facts, I guess it's marginally better to use an employer-sponsored HSA because it means the government doesn't temporarily hold on to your taxed income, only to return it later after you do your taxes; you could theoretically put that money to work in an investment vehicle instead of having the government hold it hostage for a while.  But are there any other benefits (either way) that I'm not aware of? The  kind of threw me with the following statement:     The main advantage of making pre-tax contributions is the Federal Insurance Contributions Act tax (FICA) and Medicare Tax deduction, which amounts to a savings of 7.65% each to the employer and employee (subject to limits of the Social Security Wage Base).   But I'm not really sure what that's telling me.  My employer is offering an HSA, but is not offering to contribute to the HSA or match my contributions. So if it's all pretty much the same, I'd rather use the bank of my choosing and manage it privately.  Thanks. How do I know if an ability is magical? Often confusion arises when the  spell is used, an  is worn, or the 's anti-magic ray is employed, whether a given character's ability will still function.   The spell does give you some guidelines on how to adjudicate the effects of the loss of magic but says very little about how to determine what is affected.  In short, how do I tell if an ability is magical? String manipulation with & or + in VB.NET How to center a listing? I'm trying to get some console output in my homework. I put it in a listings environment but I want it to be centered horizontally on the page.  The only thing I get centered is the caption ;-/  \begin{minipage}{1\textwidth} \begin{center} \begin{lstlisting}[caption={Ausgabe des C-Programms},label={ggt_c_ausgabe}] a  |  b  |  q  |  u  |  s  |  v  |  t   ---------------------------------------- 78 |  21 |   1 |     |   1 |   1 |  -1  21 |  15 |   3 |   1 |  -3 |  -1 |   4  15 |   6 |   1 |  -3 |   4 |   4 |  -5   6 |   3 |   2 |   4 | -11 |  -5 |  14   3 |     |   2 | -11 |  26 |  14 | -33  ---------------------------------------- \end{lstlisting} \end{center} \end{minipage} How to merge multiple Internet connections into one? My PC has a total of 4 NICs, 2 wired Gigabit Ethernet network cards and also 2 wireless network cards. (One Broadcom with proprietary drivers and Ralink with open source software, which works much better than Broadcom.)  My cellphone can share its connection wirelessly to my PC, but I also have a wired Internet connection. So I have multiple Internet connections to access the Internet. How can I merge 2 or more connections together and balance them to enjoy one unified Internet experience that it is the sum of all Internet connections connected to it.  For example if I have a modem with an Internet connection of 1024kB/s and another one that offers 512kB/s and one small one that offers 128kB/s, after load balancing and merging all connections (Bonding or Teaming), I could download at a speed of 1664kB/s using all 3 Internet connections as one for example.  This question has always intrigued me. How to Drag and Drop files to open application? Since Ubuntu 18.04 I can't drag a file e.g. image file to an open application such as Inkscape or  email message window. In Ubuntu 17.10 I was able to select the image file by clicking on it, and while holding down left mouse button I would hit the supper key displaying all open windows where for there I could then drop the file in any open app or folders. This is no longer possible/default behaviour since Ubuntu 18.04. Is there a workaround that would allow me to achieve this or even a way to recreate the same behaviour like in 17.10? I thought it was The Tommyknockers by Stephen King, but after a check with Wikipedia, it appears that's not the case.  What I remember about the story (a TV movie I think, but definitely based on a book) was that the world is created anew every night, and that the old, used up, Earth was eaten nightly by some scary creatures.  The major plot point involved some protagonists not getting onto the new world at midnight, and having to escape from the monsters that were eating up yesterday's planet.  Does this ring a bell for anyone? I'm finding it very hard to Google for. It is well know that $SO(n)$ is connected and $O(n)$ has two connected components: $O^+(n)=\{A\in O(n):\det A=+1\}$ and $O^-(n)=\{A\in O(n):\det A=-1\}$.   In what book can I find this property? How can I find more music similar to the ones I like? Why square the difference instead of taking the absolute value in standard deviation? Flag pop-up hidden beneath answer box (and it's still transparent!) I have a table with a column for ID, Date and Frequency of occurrence for that particular date and ID.  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-20      1 4     2014-05-18      6   I'm looking to insert the dates for each ID that aren't currently there (assuming that the date ranges from 2014-05-18 to 2014-05-20) and add a value of 0 in Frequency for those.  For example, you can see that  ID 1 has an observation for all three dates;  ID 2 is missing 2014-05-18 and 2014-05-19;   ID 3 is missing 2014-05-19;   ID 4 is missing 2014-05-19 and 2014-05-20.  Therefore, the output should look like this  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-18      0 2     2014-05-19      0 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-19      0 3     2014-05-20      1 4     2014-05-18      6 4     2014-05-19      0 4     2014-05-20      0   I've attempted the following from . However, that will only add dates with 0 Frequency that aren't present throughout the entire table instead of on an ID level.   DECLARE @s DATE = '20140518', @e DATE = '20140520';  SELECT c.date, Frequency = COALESCE(a.Frequency,0) FROM dbo.Calendar AS c LEFT OUTER JOIN dbo.table AS a ON c.date = s.[date] WHERE c.d &gt;= @s AND c.d &lt; DATEADD(DAY, 1, @e); Making adult decisions are/is really not fun.     What is the proper answer and why? My gut says "is" but I can't explain why. Device : Moto X Play ( Rooted, Stock, Android 6.0.1, msm8916 Board, XT1562)  Why do I want to limit charging ?  ( Let's leave out whether my reasons are valid or not and accept that I want to, if you disagree with my reasons)  To improve the longevity of battery , I wish to limit charging when it reaches 90%, as explained here    Is it possible?  Yes, at least on my previous device Honor 6, as brought out here , with two different ways of doing it  I have tried  unsuccessfully to identify the file responsible in which changing values would limit charging  I am looking for the system file responsible for stopping charging, with it's true path (without symlinks)  (as I saw on on my previous device, locating the path of file was a big challenge after identifying it)