I'm trying install a lamp to my apartment but it didn't light up as I expected. I recently moved in and this is the first time I'm trying to install a lamp here. The spot where I'm trying to install the lamp is just a hole in the ceiling with three wires hanging out: Two brown (live?) and one blue (neutral?). Some Googling revealed to me that the separate live wires can be used to control specific bulbs in a multi-bulb lamp. Nearby there is a switch on the wall with two buttons which I assume is for these wires. So apparently the idea is that current flows from each live wire through the bulbs to the common neutral wire when to buttons are toggled on. One live wire and the neutral were connected in parallel to a connection strip, while the other live wire was connected alone to its own connection strip.  My lamp has a spring-powered connection strip with L and N labeled holes so I simply took one of the brown wires to L and the blue wire to N.  I removed the connection strips and tried to measure the voltage to see if the problem was somewhere else in the circuit, and I noticed that each of the live wires measures around 50-54 volts with respect to the neutral, even though the AC line voltage in my country is 240 volts. Even stranger, I measured this voltage regardless of the positions of the switch buttons! Only when I removed the fuse I got 0 volts.  So I assume the reason why the lamp didn't light up was that the voltage was way too low. Could somebody point what is it that I'm doing wrong, or is there something wrong with the wiring on my apartment?
I just replaced a broken light fixture in my closet. (The switch in the light fixture broke when I pulled too hard on the chain.)   When replacing the light fixture I noticed that there is only 30 V AC between the white and black wires. The ground wire is cut back and is not being used. By the way, the wiring in my house is all aluminum.   I know the new light fixture works. I checked it out with my multimeter, and I tried it in a different closet. But the light bulb won't turn on because there is only 30 V. (Even if I disconnect the light fixture completely there is still only 30 V.   It seems to me that it must be a problem with the wiring.  My attic does provide some (difficult) access to the wiring, but I am not sure where to start looking for the problem or what to look for. Can anyone offer some suggestions?
Examples of Bayesian and frequentist approach giving different answers Note: I am aware of  differences between Bayesian and frequentist statistics. For example &quot;what is the probability that the coin on the table is heads&quot; doesn't make sense in frequentist statistics, since it has either already landed heads or tails -- there is nothing probabilistic about it. So the question has no answer in frequentist terms. But such a difference is specifically not the kind of difference I'm asking about. Rather, I would like to know how their predictions for well-formed questions actually differ in the real world, excluding any theoretical/philosophical differences such as the example I mentioned above. So in other words: What's an example of a question, answerable in both frequentist and Bayesian statistics, whose answer is different between the two? (e.g. Perhaps one of them answers &quot;1/2&quot; to a particular question, and the other answers &quot;2/3&quot;.) Are there any such differences?  If so, what are some examples?  If not, then when does it actually ever make a difference whether I use Bayesian or frequentist statistics when solving a particular problem? Why would I avoid one in favor of the other? Unable to mount /dev/loop0 during install C non-blocking keyboard input Find the value of $\sum_{k=1}^{n}k\binom{n}{k}$ ?    I know that $\sum_{k=0}^{n}\binom{n}{k}= 2^{n}$ and so, $\sum_{k=1}^{n}\binom{n}{k}= 2^{n}-1$ but how to deal with $k$ ? How do I get an animated gif to work in WPF? Closing a window The user who first created a tag wiki is treated as owner for suggested edits Setting up LVM Snapshot as a backup/restore point in ubuntu. Why? Well, as I see it, with all the great usefulness of Linux, its biggest drawback is with its mixed up way of installing apps. All the dlls go to one directory. All the configuration files to another. And the binaries are also put in a bunch. Yes, Windows works the same way more or less, but with the nature of system/server software installed on Linux, being that most of the software installed is only about 95% mature at any given time, messing up your system twice a month is very probable.. Of course, we can backup the system before and after each installation, but that takes a million years. System backups (as oppose to just data/files backup) requires you to turn off you computer and use some form of bootable live CD and a backup media. And, if the drive is more than 15% full, it might take a long time to do the backup, even with modern hardware. So, how can this be done? What other languages have features and/or libraries similar to Perl's format? Intersection of all $p$-Sylow subgroups is normal 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! Create a variable in .CSS file for use within that .CSS file Possible Duplicate:          We have some "theme colors" that are reused in our CSS sheet.  Is there a way to set a variable and then reuse it?  E.g.  .css OurColor: Blue  H1 {   color:OurColor; } Benefits of using QQ-plots over histograms In , Nick Cox wrote:     Binning into classes is an ancient method. While histograms can be useful, modern statistical software makes it easy as well as advisable to fit distributions to the raw data. Binning just throws away detail that is crucial in determining which distributions are plausible.   The context of this comment suggests using QQ-plots as an alternative means to evaluate the fit. The statement sounds very plausible, but I'd like to know about a reliable reference supporting this statement. Is there some paper which does a more thorough investigation of this fact, beyond a simple “well, this sounds obvious”? Any actual systematic comparisons of results or the likes?  I'd also like to see how far this benefit of QQ-plots over histograms can be stretched, to applications other than model fitting. Answers on  agree that “a QQ-plot […] just tells you that "something is wrong"”. I am thinking about using them as a tool to identify structure in observed data as compared to a null model and wonder whether there exist any established procedures to use QQ-plots (or their underlying data) to not only detect but also describe non-random structure in the observed data. References which include this direction would therefore be particularly useful. Urgent Sydney transit visa question How do I connect to a MySQL Database in Python? How do I connect to a MySQL database using a python program? Proof that every metric space is normal I am trying to use squared loss to do binary classification on a toy data set. I am using mtcars data set, use mile per gallon and weight to predict transmission type. The plot below shows the two types of transmission type data in different colors, and decision boundary generated by different loss function. The squared loss is $\sum_i (y_i-p_i)^2$ where $y_i$ is the ground truth label (0 or 1) and $p_i$ is the predicted probability $p_i=\text{Logit}^{-1}(\beta^Tx_i)$. In other words, I am replace logistic loss with squared loss in classification setting, other parts are the same. For a toy example with mtcars data, in many cases, I got a model &quot;similar&quot; to logistic regression (see following figure, with random seed 0).  But in somethings (if we do set.seed(1)), squared loss seems not working well.  What is happening here? The optimization does not converge? Logistic loss is easier to optimize comparing to squared loss? Any help would be appreciated.  Code d=mtcars[,c(&quot;am&quot;,&quot;mpg&quot;,&quot;wt&quot;)] plot(d$mpg,d$wt,col=factor(d$am)) lg_fit=glm(am~.,d, family = binomial()) abline(-lg_fit$coefficients[1]/lg_fit$coefficients[3],        -lg_fit$coefficients[2]/lg_fit$coefficients[3]) grid()  # sq loss lossSqOnBinary&lt;-function(x,y,w){   p=plogis(x %*% w)   return(sum((y-p)^2)) }  # this random seed is important for reproducing the problem set.seed(0)  x0=runif(3) x=as.matrix(cbind(1,d[,2:3])) y=d$am opt=optim(x0, lossSqOnBinary, method=&quot;BFGS&quot;, x=x,y=y)  abline(-opt$par[1]/opt$par[3],        -opt$par[2]/opt$par[3], lty=2) legend(25,5,c(&quot;logisitc loss&quot;,&quot;squared loss&quot;), lty=c(1,2)) How do I share a folder on SAMBA? How do I copy to the clipboard in JavaScript? What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData(&quot;Text&quot;, text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege(&quot;UniversalXPConnect&quot;);         const clipboardHelper = Components.classes[&quot;@mozilla.org/widget/clipboardhelper;1&quot;].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using : The keyboard on my laptop seems to be typing by itself:   It sometimes types characters like 134, whether by itself or when I hit certain keys. Repeating characters may appear unexpectedly. The system volume may change by itself, or windows like the Print dialog or Web browser may appear.   This can happen without any input or as I type, and may occur more often when certain keys are pressed. Sometimes, the keyboard fails to respond altogether. This is happening regardless of the software involved.  Is there a ghost in my keyboard—is my keyboard broken?  A sample of text from the keyboard might look like this (normal QWERTY...ASDF...ZXC... sequence is expected):   QWERTYUIOPASDF)(G@*HKLZXCVBN QWERTYIOPASDFGL!#ZXCVB13 QWERTYUIOPASDFGHJKLZXCVB!#N qwertyu41iopasdf19g13h28j113k4113zxcvb4n qwerty4u1iopasdf0g7h1jklzxcvb13m qwert13uuuuuuuuuuuuuuuiopasdf87091134ghhhhhhhhhhhhhhhhhhhhhhh13jk13zxcvb14      This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.