Python decorator breaks when mutating parameters?
UnboundLocalError on local variable when reassigned after first use
Is it OK to call a professor by his first name when he/she signs emails by only first name? If a professor in a North American country presents his- or herself by his/her first name in email messages, does this mean that students can refer to him/her by his/her first name? Or is this generally not a good idea, unless the professor has explicitly mentioned that he/she can be referred to by first name? I've noticed that most professors, who prefer to be referred to more formally, do not sign their emails with just their first names, but usually initials or first and last name. Centrifugal force acting on ring Take for example the case of a rod rotating about an axis passing through its centre of mass and perpendicular to it. It has a ring hung from one of its sides. The rotation of the rod causes the ring to move out wards and ultimately fall off the rod.   I asked my teacher what causes the ring to move out wards and he said the centrifugal force acting in the frame of reference of the ring causes motion. What exactly is the ring reference frame? Is it a rotating frame? How would u visualize motion in this frame of reference? Why does Windows 7 ask for additional drivers when installing from a USB 3.0 drive? How do I join two separate objects so I can edit them as one mesh? nginx: Redirect https traffic without subdomain to subdomain (non-www to www) My current ssl certificate covers the subdomains www.example.com and static.example.com  So if a users try to access my site via  I want to redirect him to  .   How can I do that within in my nginx conf?  I know that similiar questions have been asked here, but I could not find the solution here. Notepad ignoring linebreaks Most documents I'm opening in notepad.exe under windows 7 lately, there are no linebreaks... everything just runs together.  The same documents in any other program, even previewed directly in Explorer, will show the linebreaks correctly.  this is happening with many .info files, .css, .js.. but not all of them.   I am guessing it's some kind of character encoding unix line endings something or other, but wondering if there's anything I can do or if anyone else has experienced similar and if I can make notepad work correctly. I prefer it to notepad++/other text editors for certain uses. What determines the direction of precession of a gyroscope? I understand how torque mathematically causes a change to the direction of angular momentum, thus precessing the .  However, the direction, either clockwise or counterclockwise, of this precession seems to me a bit arbitrary beyond mathematical definitions. (What if torque were defined by a "left hand rule", for example?).  What's the fundamental physical reason that the precession of a gyroscope would be directed in a certain direction? I know that each new tab on Google Chrome have its own process, but I have 14 chrome.exe processes running actually as I can see it on the Task Manager, and only two tabs are opened on Google Chrome.    Could it be due to Chrome extensions? What other reason can open more chrome.exe process and how to avoid it? Calculating extent of custom tiles? Problem  The picture is just an example of my case, but I am left with blank space on the left when I load all the tiles and I get error message in the console:   Failed to load resource: the server responded with a status of 404 (Not Found) http://path/to/the/tile//base/8/6/53.png  etc.     I could guess and limit the extent of the layer, but I would really like to know is there any way to calculate it and also be able to get rid of the error message.  What I know about the tiles?   Originally they are served as TMS They represent png images 256*256 They are in projection: EPSG:3857 In OpenLayers2 they were called like TMS layer In OpenLayers3 (v.3.8.2) they are called like XYZ layer (that includes -y):     var baseLayer = new ol.layer.Tile({   source: new ol.source.XYZ({     url: 'http://path/to/the/tiles/base/{z}/{x}/{-y}.png'   }) });   Thoughts and questions   How can I calculate extent of the tiles? Or in another words how can I find out zmin zmax xmin ymin xmax ymax or whole range of x/y?  What does x/y really represent? Are they coordinates of the left bottom corner or center of the tile? In which direction does x/y increase? How can I figure out x/y of at least one of the tile, for example left bottom one?    (I have modified the question for better understanding of the problem) robots meta not blocking indexing We have a staging version of our website to test changes on at trailheadpaddleshack.ca/staging1. This never appeared in search before. Recently the staging site has appeared on Google and is affecting our search results.  I'm trying to figure out how the pages got there and how to remove them. The pages have always had &lt;meta name="robots" content="noindex, nofollow"&gt; in the head.  I am kinda new at this but was under the impression this should prevent Google from showing my site in results. I am pretty sure the results appeared in google after I accidently copy pasted some codes from the staging site to the live site that contained links to pages on the staging site. If anyone can point me in the right direction to figure out what happened and prevent it from happening again would be much appreciated.  robots.txt looks like this:  User-agent: * Disallow: /calendar-2/action~posterboard/ Disallow: /calendar-2/action~agenda/ Disallow: /calendar-2/action~oneday/ Disallow: /calendar-2/action~month/ Disallow: /calendar-2/action~week/ Disallow: /calendar-2/action~stream/ #Begin Attracta SEO Tools Sitemap. Do not remove sitemap: http://cdn.attracta.com/sitemap/4035112.xml.gz #End Attracta SEO Tools Sitemap. Do not remove   I also tried adding an X-Robots-Tag header and submited the site to be re-crawled. Did that a few days ago and I still see no changes. Here are the HTTP headers according to "Fetch as Google":  HTTP/1.1 200 OK X-Robots-Tag: noindex,nofollow Vary: Accept-Encoding Transfer-Encoding: chunked Date: Sun, 24 May 2015 16:26:49 GMT Server: LiteSpeed Connection: close X-Pingback: http://trailheadpaddleshack.ca/staging1/xmlrpc.php Content-Type: text/html; charset=UTF-8 Link: &lt;http://trailheadpaddleshack.ca/staging1/?p=170&gt;; rel=shortlink   I am now faced with a bunch of results I need to remove from Google asap as they contain out of date information and are affecting our search results. Webmaster Tools has something for removal of a single URL but I am looking to remove the entire /staging1/ subfolder. Any tips? At this moment there are 4 meta-site questions on the HNQ list:    (World Building Meta)  (Meta StackOverflow)  (Workplace Meta)  (Mathematica Meta)   When I first saw it, I only saw the SO Moderator question, so I assumed that this was a one-off special thing for the election; but now we've got four questions crept in. Was this an intentional change, or a bug? How can I resize an LVM partition? (i.e: physical volume) I want to shrink my second (LVM) partition, in order to create a new partition in the newly freed space. I am using the Live CD to do so, because I know I can't resize/move this partition while it is in use. When I opened GParted in the Live CD, I realized that I could not resize the partition, because when I right-click it, the option "resize/move" is disabled.  I tried to unmount it, to "lazy" unmount it (umount -l /dev/sda2) but it didn't work.  A screenshot from GParted: May I use a question mark in the middle of a sentence? Examples:  Would you like the drapes to be white? or perhaps something off-white? Would you like the logo to be centered? at the bottom? left off entirely? Phone keeps rebooting on Volume Up + Power (trying to install ROM) I tried to install Android's ROM and got ERROR 7, then I wiped out cache, data, internal storage, where was twrp.apk installed. After that I cant get into boot menu (with Install, Wipe... buttons). Then I copied twrp to the phone: sudo fastboot flash recovery &lt;twrp.img&gt; Tried versions 3.2.1-0 and 3.4.0-0, because I heard for certain phone (I have Xiaomi Mi4) it's necessary to use proper version, though I don't know which. What's going on now: I can successfully can get to the nice splash screen using Volume Down + Power, then on my PC I give sudo fastboot reboot command and press Volume Up + Power and here is the problem: It has no effect, it just keeps rebooting (I see only Xiaomi's logo). How do I replace the *first instance* of a string in .NET? I want to replace the first occurrence in a given string.   How can I accomplish this in .NET? Disable Ctrl+Alt+Del on Windows 7 Height of colorbox Improper integral $\sin(x)/x $ converges absolutely, conditionaly or diverges?  We have that $$\int_1^{\infty}\frac{\sin x}{x}dx$$ $$u=\frac{1}{x}$$ $$du=-\frac{1}{x^2}dx$$ $$dv=\sin xdx$$ $$v=-\cos x$$ $$\int_1^{\infty}\frac{\sin x}{x}dx=-\cos(1)-\int_1^{\infty}\frac{\cos x}{x^2}dx$$ $$\int_1^{\infty}\frac{\cos x}{x^2}dx&lt;\int_1^{\infty}\frac{1}{x^2}dx$$ So it converges. Now I need to find out if $\int_1^{\infty}|\frac{\sin x}{x}|dx$ converges or diverges. Writing a character N times using the printf command I found the following command to repeat a character in Linux:  printf 'H%.0s' {1..5000} &gt; H.txt   I want, for example, H to repeat 5000 times. What does %.0s mean here? These should work by adding spaces or removing spaces from the beginning of the current line or every line between the start and end of a text selection (inclusive).  (edited this question to supplement )