What's the correct way to discover what kind of thing an object is. I'm trying to debug a process which makes use of a lot of d3 object. I suspect that one object might not be the kind of thing that we expect it to be. I'd like to be able to log the name of the object. In python I could do:  foo.__class__.__name__   But what's the JavaScript equivalent? Given a mystery object I just want to know what kind of thing it is. In this example, I want to know that foo is actually a d3.map:  coffee&gt; foo = d3.map() { _: {} } coffee&gt; foo.prototype undefined coffee&gt; foo { _: {} } coffee&gt;   The method described in "" does not seem to work here because foo's prototype is undefined.
Is there a JavaScript equivalent of Java's class.getName()?
How to hide TabPage from TabControl How to prove that a continuous function, homotopic to the constant map $f:S^1\to S^1$  (a) has a fixed point and that (b) has a point $x$, such that $f$ maps $x$ to its antipodal point $-x$? Where can I see the source code of the Sun JDK? Apply brace expansion in "reverse order" I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus }); find pair of numbers whose difference is an input value 'k' in an unsorted array Is there a way to turn off an external Apple Cinema Display remotely and continue to use the computer? Here's the situation: I often access my Mac Pro remotely using Screen Sharing and sometimes TeamViewer. The problem is that when I do this, everything I'm doing can be seen by those near the physical computer. It also uses a considerable amount unnecessary power to have the displays on but not actually being used.  Is there a way to turn them off and not just blank if possible, while still using Screen Sharing or TeamViewer Free? In going through the review tool I often come across poor quality answers to poor quality questions. In particular, I will occasionally see questions that are simply asking for links to products, asking for tools, etc. Here are three examples that I've come across just this morning.        Clearly it's appropriate to go to the question and vote to close it (these are examples of not constructive) if they aren't already closed, but what should be done with the answers?    Should the answer be marked for deletion? Much of the normal reasoning for not providing link only answers is defeated if the question is simply asking for links. I'm tempted to mark them as 'looks good' for that reason, because it's the question that is flawed. Is that correct, or should I evaluate all answers as if they were responding to a quality question? Stitch first and edit later or vice versa? I have a set of three images imported in Lightroom 3.6 which I want to stitch into one panorama using Photoshop's CS5.5 Merge to Panorama tool. As I see it I have two options in doing so.   Doing all modifications (colour, brightness, contrast, etc...) first, syncing the changes between the three photos and then stitch them together. Stitching the photos first and then use Lightroom to apply modification to the whole image.   Which of these two methods is considered to be best practice? Is there a preinstalled or automatic firewall? Does Ubuntu come with a preinstalled or automatic firewall? If not, do I need one?   I've read some articles about the advantages of Linux over other operating systems about security (no need to have antivirus, ...) but would like to be sure. I'm talking about at least two juvenile sci-fi novels, read between second and fourth  public grades (U.S.A.) which for me places them around 1956-9.  The protagonists are a brother and sister, presumably my (then) age. They are friends  with a single man, a scientist who has built a rocket ship. The scientist is little fey,  physically; a (relatively) large, round head, balding, short in stature and striking long,  thin hands and fingers.  The rocket ship's final preparation is to slop a viscous, clear gloop over EVERYTHING, inside and out from a pail with a paintbrush. In flight, there is an encounter with the moon, and a very small planet with (non-threatening) inhabitants not physically unlike the fey rocket scientist. The planet orbits either the moon or the earth, not the sun, and strangely, some kind of mushroom(!) theme runs through the books. Really.  That's it. That's all I got (I was nine at the most, fer chrissake). My recollection tells me there was concealment from parents, a particular name for the planet and people  and flight through a spatial fog. I mention these things separately because I am less sure  of them than the previous two paragraphs. The author was blissfully unrepentant of the laws  of physics:  Earth gravity on a micro-planet, fog in space and super-gloop to ready the  ricketiest rocket. Worked for me.  I'm guessing even Richard, my previous mentor/savior might not be familiar with these.  Anybody? Author, titles? Or do you just recognize one of these? Question mark or period to end a rhetorical sentence Which makes more sense as end punctuation for the following rhetorical sentence—a period or a question mark?     Maybe you could be a security guard there and enforce whatever the WalMart policy is at that location How do you parse and process HTML/XML in PHP? Show that $\dim H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m)) = {n + m \choose n}$ if $m \geq 0$, and $0$ if $m &lt; 0$. This statement came up in an algebraic geometry text with no explanation provided, and I'm trying to understand why it's true.   Thoughts so far:   Since $H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m))$ is the vector space of regular sections of $\mathcal{O}_{\mathbb{P}^n}(m)$ over $\mathbb{P}^n$, we can try to find a basis. Since the regular sections are the degree $m$ polynomials in $x_0, \dots, x_n$, it seems like the collection of degree $m$ monomials in $x_0, \dots, x_n$ should work. But I don't see how there are ${n + m \choose n}$ of these. Is it just a basic counting argument that I'm struggling with?  On a side note, I think I understand what global sections of $\mathcal{O}_{\mathbb{P}^n}(m)$ look like, but how can we describe the regular sections over a distinguished open set $D(f)$? Is it something like degree $m$ polynomials with denominator $f$? This is a trivial problem, but it annoys me that I can't get to the bottom of it:  I'm running Windows 8, Powershell version 3.0. By right-clicking on the title bar I can go into the Properties and change the font, size, background colour etc without any problems.  After closing and restarting Powershell, all of the changes I've made stick except that if I've set the font to Lucida Console then on reopening I get the Raster font.  (Note that all of the above applies to when I run Powershell as Administrator.)  So:   If I set the font to Lucida, then it switches to Lucida for the remainder of the session. If I set the font to anything other than Lucida, then it stays as that after closing and reopening. If I alter the window sizes or text colours or anything else, the changes persist after reopening. The only thing that goes wrong is that if I set the font to Lucida, it switches to 'Raster fonts' when I reopen. But cmd and powershell ISE don't have this problem - only the powershell console.   Can anyone suggest what might be going wrong?  (One observation I've made is that upon re-opening Powershell after setting the font to Lucida, at first the width of the window is what it would be if the font were Lucida, but then after a second, it widens slightly to accommodate the raster font.) How to reduce the fan noise and how to increase battery life? I have a brand new Sony Vaio S series laptop.() It came factory installed with Windows 7 professional Edition 64bit. Runs Intel core i5, 500 GB HDD , 4GB Ram. First I installed ubuntu 11.10 64 bit along side Windows to dual boot. Later,since the problem did not solve, I installed ubuntu 12.04 64bit along side Windows to dual boot. However the problem keeps annoying me.  Problem: When running ubuntu 11.10/12.04, the battery lasts only about 1.5 hours. The Fan runs loud and continuously. And there is a lot of heat generated. System monitor shows less than 5% CPU used. My laptop enjoys hybrid graphic and I tried turning off ADM graphic card and keep Intel graphic card on. However I can not get the Fan noise or heat to go away and consequently the battery drain continues. BTW, in windows, the laptop gives 4-5 hours of battery power, Fan is silent and there is no heat problem. Any ideas on how to reduce the fan noise and how to increase battery life in ubuntu 11.10/12.04? How to fix invisible form fields in Firefox while using Adwaita Dark Theme (or any other dark theme) I have this issue with some form fields in Firefox and using the adwaita-dark theme. In some webpages where the field background is white, you cannot read the text because it is also white.   This question was edited in order to clarify that this kind of wording of the question might help people who are not familiar with what a GTK+ theme. I also thing that the wording will help to get more hits through search engines. If it's still considered a duplicate, I'll accept it. Dropping z dimension programmatically It seems there is no geoalgorithm to drop z values in the QGIS processing toolbox. Can this be done programmatically using the Python console? At the moment I have to save the layer with unchecked 'Include z-dimension' checkbox (non automatic geometry type): Add the ability to lock a question against edits Stop jQuery .load response from being cached I have the following code making a GET request on a URL:  $('#searchButton').click(function() {     $('#inquiry').load('/portal/?f=searchBilling&amp;pid=' + $('#query').val());             });   But the returned result is not always reflected. For example, I made a change in the response that spit out a stack trace but the stack trace did not appear when I clicked on the search button. I looked at the underlying PHP code that controls the ajax response and it had the correct code and visiting the page directly showed the correct result but the output returned by .load was old.  If I close the browser and reopen it it works once and then starts to return the stale information. Can I control this by jQuery or do I need to have my PHP script output headers to control caching?