Creation of Singleton class in Java has been discussed and debated in various communities multiple times. Even after all the discussions, the debaters aren't satisfied with array of provided solutions.  My question is simply to find out the best &amp; most effective way to create any class Singleton in Java &amp; C++.
What is an efficient way to implement a singleton pattern in Java?
Is "Is it a girl or a boy?" really calling the infant an "it"? So, my boss comes in, railing that "English is a stupid language!" Since this is pretty much a thrice-weekly occurrence 'round these parts, I barely raised an eyebrow, and waited for him to continue.   "Mary just wrote to tell us that she's back from maternity leave, and I want to congratulate her and ask whether she had a girl or a boy, but I can't do it without calling the child an 'it'!" I blinked, then confirmed that yes, he believes the it in "Is it a boy or a girl" is the impersonal pronoun, the same word you'd apply to an apple or a house.  Is it the 'thing' pronoun, really? Or is it just a placeholder of some sort? I used to believe the latter: I gave the boss a mini-lecture about  and the . He wasn't convinced, however, and now he's got me doubting too. (Harumph. I really should know better than to listen to the boss.)  I'm not asking about politeness, here; the former title was to be taken somewhat facetiously. I'm wondering about the grammar: what role is that "it" playing in that sentence? Is it a personal pronoun (and thus the infant has grounds for feeling offended) or a dummy pronoun (and thus those who perceive a politeness issue are just misunderstanding the grammar)? I have seen many ways to make a USB an installer for about any Windows OS. But how can I (using grub or something like that) make it bootable to all editions on Windows XP and 7?   I have tried Googling it and researching, I've even tried to do it, But I dont understand much about GRUB or linux at all.  Please keep in mind that I am not very good with linux, so please use as many details as possible. I would like to know if it's possible to win in Don't Starve? Or is it just the matter of how long until you die? What does the "Alternative Character Sheet" mean when it asks you for the "Maximum Hit Dice" and the "Remaining Hit Dice"? I am trying to fill in the "Alternative Character Sheet" (one of the ). It asks me for my "Maximum Hit Dice" and the "Remaining Hit Dice". What do these terms mean? Taking a screenshot (within X) How can I take a screenshot in X.org?  I am unsure if the Print Screen button will "just work" and I don't know how I would go about testing it. Interpretation of log transformed predictor and/or response I'm wondering if it makes a difference in interpretation whether only the dependent, both the dependent and independent, or only the independent variables are log transformed.  Consider the case of  log(DV) = Intercept + B1*IV + Error    I can interpret the IV as the percent increase but how does this change when I have   log(DV) = Intercept + B1*log(IV) + Error   or when I have   DV = Intercept + B1*log(IV) + Error   ? SC2272-M4 Behaviour when using relay SRD-05VDC-SL-C 5V DC I'm currently encountering a problem when using a relay switch with a 5v receiver. When using the same receiver with a row of LEDS it works flawlessly. I've noticed that the relay keeps making the switching noise over and over like I'm pressing the transmitter really fast apart from the fact I'm not. Also, when the transmitter is moved closer to the receiver from 20" to around 1" the problem stops. Below is some circuits to help show you my setup.  Any help appreciated thanks.  Setup Specs   USB 5v DC (2AMPS) Receiver (XY-DJM-5V - SC2272-M4) Relay (SRD-05VDC-SL-C 5V DC) Transmitter (XY-04) Diode (1N4001) Transistor (2N2222A) Resistor (1.8K Ohms)          &ndash; Schematic created using   Antenna Signal Workaround or Booster  I believe this issue is related to wireless signal on D0. Basically above 20" inches the output to the relay drops from 5.05v to 0.5v and is obviously causing the problem. I think I need to boost the signal or replace the transistor with something that triggers at low and high current but have no clue. Any help appreciated, I'm new at this.  Board Setup How to add a custom field to the media screen (image/gallery)? I’m trying to add a custom field to image and gallery edit screen.  I’m aware there are similar questions here, although answers either don’t work with the current version or they add field only to upload screen while I need a field to be visible in all edit screens (see below).  For this, I believe, you’ll have to mess with backbone.js as attachment_fields_to_edit only adds to upload screen.  Adding field with attachment_fields_to_edit    ↑ This is upload image screeen. Here Style is added with attachment_fields_to_edit filter, and my_field is added with ACF plugin.   But they are missing in edit screen in the post    ↑ Click edit on the actual post    ↑ No style &amp; my_field fields!  The question  How to add fields to still have them on the edit screen? Ideally answer will include adding fields to gallery edit screen if it’s a similar process  This question is really important for me so I’ll be adding a 100 rep bounty when it’s available.   Thanks! How do I add PHP code/file to HTML(.html) files? Can I create a TIN from contours lines (shp) in QGIS? I need to do a slope analysis, and would like to make a TIN from 2m contours lines.  Or do a slope analysis directly from contours? The only DEM available is not precise enough.  I do not have any elevation raster files.  And how do I then make slope classes?  The TIN properties does not seem to be able to classify anything other than elevation. I was trying to think but cannot figure it out. For instance, if the interaction is small, for instance limited to a windows, the observers in each universe will see that the other goes in reverse. But what if they can start a more meaningful interaction? (for instance, if one observer crosses the window and moves to the other universe, will anything change? why and how fast? (at least at the beginning his thinking will move in the same time arrow than in his universe, but the physical processes around him will still violate the second law? Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome. I've been building my own emacs because I want to fix some issues in it and get the bug fixes upstream. However, Ubuntu keeps automatically removing my own built emacs and I have to keep rebuilding and reinstalling it.  Here's my output of apt-cache policy emacs when I went to bed last night:  ~/emacs$ sudo apt-cache policy emacs emacs:   Installed: 26.0.50.aaron-1   Candidate: 46.1   Version table:      46.1 500         500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages         500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages  *** 26.0.50.aaron-1 100         100 /var/lib/dpkg/status   Here it is when I wake up:  ~/emacs$ sudo apt-cache policy emacs [sudo] password for excelsiora: emacs:   Installed: 46.1   Candidate: 46.1   Version table:  *** 46.1 500         500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages         500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages         100 /var/lib/dpkg/status   Why is this package being versioned at 46 instead of 24 or 25? 26 is the currently the highest major emacs version you can get.   I can see that this is a meta-package:   Why is Ubuntu updating software without asking?  Main Question: What am I supposed to do - assign my package version a number higher than 46 just to make it stick?   That seems like a horrible hack, or maybe that's how it's supposed to work? Other types of vector multiplication. As far as I've seen, there are only two types of vector multiplication defined, dot product/inner product which is defined in a vector space of any dimension, even infinite, and cross product, which is only defined in three dimensions. Are there more definitions of vector products? Access is denied because the NTFS volume is already exclusively opened How to disable copy in shared folder I am trying to make folder that everyone can view and can't copy,modify.    For all answers.I thinking about specially ms office files. I tried following methods  Software  - copy protect    - anti copy    This method can't protect save as and upload  MS office macro    Users can enable,disable macros.  MS office restriction    This is best choice but can't protect from file uploading.   Almost I found the solution. Way is combination of MS office restriction and restrict access from browsers using firewall or antivirus. But I don't exact how to do this. How do I make Subversion (SVN) send email on checkins? I've always found checkin (commit) mails to be very useful for keeping track of what work other people are doing in the codebase / repository. How do I set up SVN to email a distribution list on each commit?  I'm running clients on Windows and the Apache Subversion server on Linux. The answers below for various platforms will likely be useful to other people though. Entry to the US with an expired Nexus Is it possible to enter the US through the Nexus lane while my Nexus card is being renewed? And how? How to insert an item into an array at a specific index (JavaScript)? I am looking for a JavaScript array insert method, in the style of:  arr.insert(index, item)   Preferably in jQuery, but any JavaScript implementation will do at this point. Continuity of a convex function I'm trying to solve the following problem:  Let $f:K\rightarrow \mathbb{R} $, $f$ convex and $K \subseteq \mathbb{R}^n$ convex. Then $f$ is continuous on $K$.   I have proved the only case $n=1$, but for an arbitrary $n$??