I have a WordPress install on a dedicated server with decent memory (upwards of 8GB)  Since upgrading to 3.8, I started getting mysql disconnects/timeouts, better known as     MySQL server has gone away   I enabled error_log for a bit, i.e.  ini_set('log_errors',TRUE); ini_set('error_reporting', E_ALL); ini_set('error_log', dirname(__FILE__) . '/error_log.txt');   This resulted in an immense file - basically the error_log grows by about a GB every 4 minutes or so.  I AM caching queries  query_cache_type = 1 query_cache_limit = 8M query_cache_size = 512M   I was able to temporarily fix the issue by setting  max_allowed_packet = 16M   Then I installed  and checked queries on homepage. Debug Bar tells me there are 729 queries!  The slow ones are:  SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes'      require('wp-blog-header.php'), require_once('wp-load.php'),   require_once('wp-config.php'), require_once('wp-settings.php'),   wp_not_installed, is_blog_installed, wp_load_alloptions #1   7.5ms  UPDATE`wp_options`SET`option_value`...WHERE`option_name`= 'wpseo_titles'      require('wp-blog-header.php'),   require_once('wp-includes/template-loader.php'),   include('/themes/weaver-ii-pro/page.php'), weaverii_get_header,   get_header, locate_template, load_template,   require_once('/themes/weaver-ii-pro/header.php'), wp_title,   apply_filters('wp_title'), call_user_func_array,   WPSEO_Frontend->title, apply_filters('wpseo_title'),   call_user_func_array, WPSEO_Frontend->title_test_helper, update_option   55.0ms  UPDATE`wp_options`SET`option_value`...WHERE`option_name`= 'wpseo_titles'      require('wp-blog-header.php'),   require_once('wp-includes/template-loader.php'),   include('/themes/weaver-ii-pro/page.php'), weaverii_get_header,   get_header, locate_template, load_template,   require_once('/themes/weaver-ii-pro/header.php'), wp_head,   do_action('wp_head'), call_user_func_array,   Facebook_Open_Graph_Protocol::add_og_protocol,   apply_filters('fb_meta_tags'), call_user_func_array,   WPSEO_OpenGraph->facebook_filter, WPSEO_OpenGraph->og_title,   WPSEO_Frontend->title, apply_filters('wpseo_title'),   call_user_func_array, WPSEO_Frontend->title_test_helper, update_option   56.4ms  UPDATE`wp_options`SET`option_value`...WHERE`option_name`= 'wpseo_titles'      require('wp-blog-header.php'),   require_once('wp-includes/template-loader.php'),   include('/themes/weaver-ii-pro/page.php'), weaverii_get_footer,   get_footer, locate_template, load_template,   require_once('/themes/weaver-ii-pro/footer.php'), wp_footer,   do_action('wp_footer'), call_user_func_array,   WPSEO_Frontend->flush_cache, WPSEO_Frontend->title,   apply_filters('wpseo_title'), call_user_func_array,   WPSEO_Frontend->title_test_helper, update_option   56.0ms  SELECT option_value FROM wp_options WHERE option_name = 'dismissed_update_core' LIMIT 1      require('wp-blog-header.php'),   require_once('wp-includes/template-loader.php'),   include('/themes/weaver-ii-pro/page.php'), weaverii_get_footer,   get_footer, locate_template, load_template,   require_once('/themes/weaver-ii-pro/footer.php'), wp_footer,   do_action('wp_footer'), call_user_func_array, wp_admin_bar_render,   do_action_ref_array, call_user_func_array, wp_admin_bar_updates_menu,   wp_get_update_data, get_core_updates, get_site_option, get_option   9.6ms  I do have lots (~50) plugins installed, and I use  theme. Most of these plugins are essential to get what I need out of WordPress (I use WordPress as a CMS). This is a live install so I can't really disable everything and then enable one by one to see what's breaking things (if not core). Is there another way to figure out the problem by looking at the Debug Bar's output?
I have a WordPress install on a dedicated server with decent memory (upwards of 8GB).  The WordPress install includes many plugins - 50 active plugins. Most important to note is the  plugin to make WordPress multilingual. The theme is .  The stack is LAMP - CentOS 6.3, Apache 2.4.4, Percona MySQL, PHP-FPM.  I have been quite stupid, and didn't set up a test or staging server.  Everything was running fine till I updated to WordPress 3.8, and also updated several plugins at the same time.  I didn't pay attention at the time, but all my widgets got messed up, and so did any sort of navigation etc.  I enabled error_log for a bit, i.e.  ini_set('log_errors',TRUE); ini_set('error_reporting', E_ALL); ini_set('error_log', dirname(__FILE__) . '/error_log.txt');   This resulted in an immense file - basically the error_log grows by about a GB every 4 minutes or so.  The primary error I found in the error log was database server disconnect, better known as      MySQL server has gone away   The first priority was to patch the problem. So I installed  plugin. This mostly, though not completely solved the issue. Many of the widgets came back.  However, the special (non-English) characters are all messed up (converted to question marks). I tried to fix this by opening wp-mysql-ping.php and commenting out   if ( !DB_CHARSET &amp;&amp; version_compare(mysql_get_server_info($this-&gt;dbh), '4.1.0', '&gt;='))                                     {                                         $this-&gt;query("SET NAMES '" . DB_CHARSET . "'");                                     }   Didn't help.  Besides, the plugin is not a permanent or complete solution. So leaving the site in this messed up state, I started working on other possibilities:  As suggested at , I edited my.cnf to add  wait_timeout = 60   Didn't help.  Also added caching to my.cnf  query_cache_type = 1 query_cache_limit = 8M query_cache_size = 512M   Didn't help.  (and yes, I restarted mysql every time I edited my.cnf)  Also tried the method : In wp-db.php before  $this-&gt;select( $this-&gt;dbname, $this-&gt;dbh );   I added  $this-&gt;query("set session wait_timeout=600" );   Didn't help.  I'm at my wit's end. Please help!
Finding parenthesis via regular expression Is setting a higher nice level for a process an effective way to reduce its impact on system load/CPU time? I have an rsync cron job which is pushing the server load and triggering monitor alerts.  If I set the job to be run with a high nice level, would that effectively reduce the impact it has on system load values? Create unique number from 2 numbers is there some way to create unique number from 2 positive integer numbers? Result must be unique even for these pairs: 2 and 30, 1 and 15, 4 and 60. In general, if I take 2 random numbers result must be unique(or with very high probability unique)  Thanks a lot  EDIT: calculation is for computer program,so computational complexity is important I have this tex: \(\mu_{A}\left(x\right)\in \[0,1  \right\]\)  The issue here is that [ and ] are not showing around 0,1, why is that?  Thanks. Why should I use an Initialization Vector (IV) when I have unique keys? I took a look at  but my question is not the same.  I have unique keys encrypting each plaintext (in CBC mode, AES-256) and I do not use a key to encrypt more than one plaintext. Is it insecure to use null IVs in this case? If it is insecure, why? I'm looking for this really cool music video that involved monsters and kids The video starts off with two kids a boy and a girl—both are speaking Spanish. They wake up and find that not only are their parents gone but also everyone in their town, so they pack up and try to find people.  I know there's a scene where they destroy a car.  When they're traveling they come across a big furry Totoro-like monster in a cave, and the monster is cool. Then it shows us that there's a bunch of kids and they're all running around having a blast and there's also a bunch of other alien looking monsters, but they must be good 'cause they're not attacking anyone.  And that's all I really remember. I've looked everywhere for it and if you can help it would be awesome.  I watched the video 5 or 6 years ago at least. I don't remember any females singing; I'm pretty sure it was a band of guys. It wasn't heavy metal or anything; it was more like pop. I don't remember much about the actual sound of it to be honest. Mean of a Cauchy Distribution How do I calculate if a spell hits and how much damage it does? I'm not entirely sure I understand what the PHB is telling me about spell attacks.  Say I'm a wizard who's casting Fire Bolt (I could also be a Cleric casting Inflict Wounds or what-have-you), the spell itself doesn't say anything about making an attack roll or the enemy making a saving throw.    So do I make an attack roll and then add in my INT mod + proficiency bonus?  Or does the target have to make a saving throw against a DC of 8+ my INT mod + proficiency bonus?  And, assuming I hit, do I add my INT mod + proficiency bonus to the damage? As a result of  myself, the need arose to track other Stack Overflow-based research. The following is an attempt to list the academic papers mentioning Stack Overflow/Exchange or using Stack Exchange data. This also includes the works mentioned in  that started the trend, as well as two other questions on meta, , and . If you know of papers that are not listed, please edit the answer directly. I realised it might be useful to have all the BibTeX entries in a single file, so I started . A little look through an etymology dictionary shows that the root is Latin gigas with adjective form gigant.  So in its derivation to English, why did the second "g" get retained in gigantic but was dropped from giant?  I have an inkling that the word giant may have travelled through French on its way to English, where it may have been pronounced "gee-yant" or "jee-yant" with a change to the second "g" that was then dropped when taken into English.  However, the "g" is retained as a hard "g" in gigantic. So, I was messing around in the Skyrim console and increased my speed a lot. Now I want to reset my speed but the command player.setav speedmult 100 isn't working. Is there any way to reset this? How come Dropbox gets an icon in Finder sidebar? There are tons of questions I could maybe post this as an answer to, but before choosing the best one, I'll just post this as an announcement question that can be linked elsewhere. The short story From now on, intra-word emphasis is possible in our Markdown version. That means you can now write  The &quot;V&quot; is for Model**View**Controller. That's un*fricking*believable.  and it renders like this:  The &quot;V&quot; is for ModelViewController. That's unfrickingbelievable.  This only works for asterisks, not for underscores. It works in posts and comments. The reasons There are two big reasons for this. For one thing, this is more or less the behavior of , which we eventually . &quot;More or less&quot; because CommonMark's emphasis behavior is still in flux, and supports a few things that we don't support yet, but at least with this change we're closer. The other reason is languages that don't even have the concept of &quot;words separated by spaces&quot;. See  and  for two examples. This change allow posts in those languages to emphasize words without having to resort to HTML tags. To use an example from the first linked post,  **北京**和**上海**是直辖市。   now renders like this:  北京和上海是直辖市。  Possible issues In the 99% cases, this should only make things better; I've only found very few posts where this change causes unintended bolding/italicizing. And even in those cases, note that the rendered versions of questions and answers are not re-rendered until a post is edited, so this will not affect anything in posts retroactively. Unlike posts, comments are rendered , so this immediately applies to all comments. In most cases this doesn't change anything or actually fixes things. Should you discover a rare case where this breaks an important comment badly, we can always edit it to fix. There's one side effect that I'd like to mention: If you find a great quicksort implementation on GitHub that has a bug that causes a crash when sorting Windows versions, and the author doesn't want to fix it, you may be inclined to say  f**k this s**t   (i.e., &quot;fork this sort&quot;). With intraword emphasis, this would however look like this:  fk this st  So you would have to escape the asterisks (one of them would actually be enough). I'm not worried about this case too much, since if you must put censor-worthy words into a post, you might as well have to jump through a little hoop. Some details This being Meta, there are probably lots of people interested in a more detailed description of the new behavior (don't feel bad if you're not one of them; just skip this section). Here are the major rules regarding intraword-emphasis:  As mentioned, it only applies to asterisks, not underscores. Underscores  this restriction was in place at all; asterisks are much less of a problem.  If a single or double asterisk is supposed to be interpreted as intra-word emphasis, it cannot have punctuation on one side; it actually must be inside a word. An example of an edge case this solves is  It's a web*-based solution. *see Wikipedia for a definition of &quot;web&quot;  where the asterisks after &quot;web&quot; could cause unintended italicizing if there was a second asterisk in the same paragraph somewhere.  For italics, the &quot;inside a word&quot; part of rule 2 is even a bit stricter. For bolding, any word or digit character is allowed; for italics, digits don't work either. That's because the asterisk is often used as a multiplication symbol, so  The game worked in 320200 and 640480 resolution.  wouldn't look right without this restriction.  A minor addition that I made that's only tangentially related to intra-word emphasis is that a sequence of more than three underscores or more than three asterisks will no longer take part in any emphasis. This shouldn't really cause any problems, but fixes some (e.g. the underline in the second blockquote in , while not really visible, is a weird combination of bold and italic underscore characters; after this change, it would just be (more) underscore characters). This behavior also matches CommonMark. Where can I leave luggage in Frankfurt, either airport or train station? I need to find a place to leave my luggage in lockers for 2 days in Frankfurt, either the airport (Terminal 1) or at the train station. I have to go by train to Stuttgart for 2 days without luggage. The luggage is 5 bags, 28 inches. Minimum eigenvalue and singular value of a square matrix How to show that the relationship $\left | \lambda_{min} \right | \geq \sigma_{min}$ holds between the minimum eigenvalue and singular value of a square matrix $A \in \mathbb{C}^{n \times n}$? Probability that a quadratic polynomial with random coefficients has real roots The following is a homework question for which I am asking guidance.     Let $A$, $B$, $C$ be independent random variables uniformly distributed between $(0,1)$. What is the probability that the polynomial $Ax^2 + Bx + C$ has real roots?   That means I need $P(B^2 -4AC \geq 0$). I've tried calling $X=B^2 -4AC$ and finding $1-F_X(0)$, where $F$ is the cumulative distribution function.  I have two problems with this approach. First, I'm having trouble determining the product of two uniform random variables. We haven't been taught anything like this in class, and couldn't find anything like it on Sheldon Ross' Introduction to Probability Models.  Second, this strategy just seems wrong, because it involves so many steps and subjects we haven't seen in class. Even if I calculate the product of $A$ and $C$, I'll still have to square $B$, multiply $AC$ by four and then subtract those results. It's too much for a homework question. I'm hoping there might be an easier way. Question:  Show that $n^2 + 3n + 5$ is not divisible by $121$, where $n$ is an integer. Is the Dungeon Magazine 4e Adventure List spreadsheet still available? used to go to a spreadsheet with all the 4E adventures published in Dungeon Magazine (and possibly some others, IIRC) during that edition's duration. I remember it listed out each adventure by name, start/end level, adventure path, and maybe even a little summary blurb.  However, the spreadsheet behind that link seems to have disappeared into the digital ether, and I can't find a copy of it in my own google drive (implying I never made a copy of it).  Does anyone happen to have a copy of that spreadsheet that they could share, and/or other resources that would let me sort through the many adventures from 4E Dungeon Magazine? I am new to Linux and Ubuntu. When I don't know how to do something with this OS I search on the web and Ask Ubuntu and always find the answer.  But sometimes it's not a great answer nor complete tutorial. I follow the instructions anyway, but I don't know what all the commands mean.  So my question is:   When I follow a tutorial, am I 100% safe? If not, then how can I tell I am in danger? Give a one-to-one and onto function from $\mathbb{N} \times \mathbb{N}$ to $\mathbb{N}$