How to make a disk mounted automatically when Ubuntu launches?
How to make partitions mount at startup?
Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request) I am having trouble debugging an issue with a plugin that I'm writing. I want to do an Ajax request when a user changes the option on a select input. The thing is it was fully working as expected yesterday, then when I test the website today (no code changes were made at all since yesterday) I'm getting an:   domain.com/wp-admin/admin-ajax.php 400 (Bad Request)  message in my Chrome console. If I try in Internet Explorer/FireFox it doesn't give the error in console but the Ajax request is still not working.  The plugin I'm creating is on a DigitalOcean droplet which was made using their one click app for WordPress.  Here is the barebones code I'm using on the plugin for the ajax:  //This is in a class' constructor method add_action('wp_enqueue_scripts', array($this, 'plugin_prefix_scripts'));  //PLUGIN_URL is a constant created earlier in the plugin public function plugin_prefix_scripts() { wp_enqueue_script('plugin_prefix_scripts', PLUGIN_URL . 'scripts/frontend_script.js'); wp_localize_script('plugin_prefix_scripts', 'js_object',   array(     'ajax_url' =&gt; admin_url('admin-ajax.php')   ) );   }  frontend_script.js:  $('#plugin-prefix-option-one, #plugin-prefix-option-two').on('change', function() {     var data = {         'action': 'plugin_prefix_page_change',         'option_val': 'some_val',     }      $.post(js_object.ajax_url, data, function(response) {         console.log(response); });   Back in the class:  add_action('wp_ajax_plugin_prefix_page_change', array($this, 'plugin_prefix_page_change'));  public function plugin_prefix_page_change() {     $arr = array(1, 2, 3, 4, 5);      wp_send_json($arr);      //I've also tried wp_die() and no die call at all but same outcome     die(); }   I'm unsure how to debug this further. Any help is much appreciated.  Thanks Why do we need both using namespace and include directives in C++ programs?  For example,   #include &lt;iostream&gt;  using namespace std;  int main() {  cout &lt;&lt; "Hello world"; }   Why is it not enough to just have #include &lt;iostream&gt; or just have using namespace std and get rid of the other?  (I am thinking of an analogy with Java, where import java.net.* will import everything from java.net, you don't need to do anything else.) How can I prove the formula for calculating successive entries in a given row of Pascal's triangle? I've found in Wikipedia the formula for calculating an individual row in Pascal's Triangle: $$v_c = v_{c-1}\left(\frac{r-c}{c}\right).$$ where $r = \mathrm{row}+1$, $c$ is the column starting from $0$ on left and $v_0 = 1$.  Now, I've tried to do by hand and it works,  but I don't understand how to find this magic formula when I don't have access to Wikipedia...:) Why is brace expansion not supported? Do I have to do any configuration to start brace expansion? When I run mkdir {1..10}, it just creates a dir naming {1..10}. Suppose that $X$ is a topological space equipped with a delta-complex structure. Prove that $X$ is Hausdorff.  I can actually "see" why it should be Hausdorff after the hint from Hatcher asks to "think of a delta-complex X as a quotient space of a collection of disjoint simplices".  I would appreciate if somebody can write out a full formal argument showing this proof. I'm trying to start from the definition of Hausdorff but I don't know how to carry on. Two "if"s in a row Selecting features with NULL attributes in QGIS How do I identify which features have NULL attributes in the attribute table of a shapefile?  When i try [field]= 'NULL' it selects the features with value = 0 (see picture) How can we communicate short messages long-distance? In our 5e game, we stole a boat. And a horse carriage. And a lot of other stuff for moving things between cities.   Our DM meant for this to be a way to skip road encounters. We decided to fund a shipping company and hire managers (Knights retainers, etc.) to turn a profit. The DM ruled that these would cover lifestyle expenses, provide us with easy smuggling, etc.   However, we want to keep tabs on the treasure we're moving back and forth.   What can we use for communicating with our managers from anywhere in the world? What about from say, across the city?  We don't need to communicate often or for long - a single round will work. All we need is for the manager to say "we need you back" Everything I've seen points to no (and I would love that to be true since applying for a visa online costs money) but I'm worried about getting refused due to the length of time I wish to stay, which is 6 months.  I went to university in the UK on a Tier 4 visa, but have never just been a tourist which is what I would like to do now. Since graduating, I have started working but am underwhelmed and would love to travel again. My original plan was Australia but now I would like to see the rest of the UK as well beforehand.  If I arrived with the following, would I be refused entry simply for not applying online?: an approved Australian work &amp; holiday visa, a mini itinerary, bank statements for the last 6 months. Why is AES resistant to known-plaintext attacks? Windows 10: How to change a theme slideshow time interval? It's all int the title; I find myself unable to set a precise time interval defining how often the background pictures of the theme I am currently using change.  The only similar option available in Windows 10 settings applies only to single background images and not to multiple background images included in a theme.  Thanks in advance,  N. Why are my SVG imports so small? C-3PO frequently speaks of “the Maker.” Is this a true droid religion, or is this a religious reverence by droids for their specific creators (in this case, Anakin, even though C-3PO has forgotten who he is)? Is this even a droid thing or is it just C-3PO? What else do we know about this “Maker”-worship? ceiling fan from a switch with only black and red wires? The current switch controls an outlet in the corner of the room for a lamp. I pulled it out and noticed three sets of individual wires: two set of wires coming up into the box from the bottom, and one set with a red wire coming down into box.  All the white and grounding wires are capped.  Also all the black wires are capped; one set I’m assuming is the hot since I see it contains a red wire. On the back of the switch, the top two ports have black wires and the bottom right has the one red wire.  There are two black pigtail wires coming off the black capped wires. I tried to connect a separate switch to control a ceiling fan with remote. I ran new wire making the old switch box into a two switch. I ran 14/2 gauge wire to ceiling for fan / light remote combo. Fan didn’t work after multiple re-wiring  combinations. The breaker did pop and half click when it popped. Then I thought to re-wire the ceiling fan wires as if I was going to make it into outlet only and use a tester to indicate an open ground, or a wiring error but the two light on tester are both orange indicating correct wiring. I heard that sometimes the ceiling fan remote transformer goes bad. Should I check batteries and/or unit placement? I’m really confused at this point why the light is not working at least with remote after follow wiring installation instructions that were included with the fan. I think it’s my wiring with the switch. The way I left the wiring is that it has constant power. As if we’re a outlet the current switch does not turn it off. Ex-dividend date: How long do I have to hold a stock in order to get the next dividend? I want to be a stockholder on record for a dividend. So lets assume I bought stock before the ex dividend date. Can I immediately sell the stock after the ex-dividend date to collect the dividend, or do I need to hold for a few weeks to collect the dividend?  Lets say the ex-dividend date is the 15th of the month. I buy stock on the 14th (I think this is soon enough to be a shareholder on record) and then I sell on the 15th. Do I get the dividend in my account when it is distributed?  Don't worry &ndash; I have a proprietary way of hedging the stock's post-dividend price adjustment, and it costs less than the actual dividend so all is well.  I just don't know what the shortest time I can hold a position is. I'd like to know the shortest theoretical time possible in order to get the dividend.  Insight appreciated. How to check if this limit exists: $$\lim_{(x,y)\rightarrow (0,0)}{ \frac{x^4y^4}{(x^2 + y^4)^3}}$$  Can I convert it to polar form ? $$\frac{r^8 (\cos^4 (\theta)\sin^4(\theta)}{r^6 (\cos^6 (\theta) + r^6 \sin^{12} (\theta))} = \frac{r^2}{\cos^6(\theta) + 0} = 0$$ about Linux's zip utility says this about the -u flag:     Replace (update) an existing entry in the zip archive only if it has been modified more recently than the version already in the zip archive. For example:          zip -u stuff *   will add any new files in the current directory, and update any files which        have been modified since the zip archive stuff.zip was last created/modified.   My question is, if a particular file has been removed since the last time it was zipped, whether -u will recognize that the file has been removed and thus remove it from the *.zip file?  Or, lacking timestamp information (since the file is now removed), it will leave the backed up file in *.zip, since there is no "newer" file? Difference between LiveCD, LiveUSB, full-install, and persistence? I am currently running Ubuntu as a guest vm on a Win 7 host via VirtualBox, but I would like to have a portable version of Ubuntu when I am not using my laptop.   I am unsure as to the difference between the following:  1)LiveCD with persistence; 2)LiveCD without persistence; 3)LiveUSB with persistence; 4)LiveUSB without persistence; 5)Full-install.   I have a USB flash drive (32GB), and I also have empty DVDs lying around. I know that persistence means that data can be saved, but I am unsure as to which option to choose. What is the difference between a LiveUSB and a full-install on a USB thumbdrive and why would I want to pick one over the other? Thanks for any help. How to integrate $\int_0^{\pi/2}\frac{\sin^nx}{\sin^nx+\cos^nx}dx$? Possible Duplicate:          How can we integrate $$\int_0^\frac{\pi}2\frac{\sin^nx}{\sin^nx+\cos^nx}\,\mathrm dx , \,\,\,\,\,\,\,\,\, n\in N \quad?$$ Thanks for any hint. The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?