Let's assume the following class Foo.  struct Foo {   int i;   bool j; };   Why do I get different results from the following lines?  int main(void) {     //I thought the default constructor would be called     Foo foo1;     cout &lt;&lt; foo1.i &lt;&lt; " : " &lt;&lt; foo1.j &lt;&lt; endl; // " 4196352 : 0 " --&gt; ctor not called?      //if calling the default constructor explicitly     foo1 = Foo();      cout &lt;&lt; foo1.i &lt;&lt; " : " &lt;&lt; foo1.j &lt;&lt; endl; // " 0 : 0" --&gt; ctor called. }    Shouldn't the default ctor be implicitly called?  According to :     If no user-declared constructors of any kind are provided for a class type (struct, class, or union), the compiler will always declare a default constructor as an inline public member of its class.
In the book I'm reading at the moment () it says that if you don't declare a default constructor for a class, the compiler supplies one for you, which "zeroes out each data member". I've experimented with this, and I'm not seeing any zeroing -out behaviour. I also can't find anything that mentions this on Google. Is this just an error or a quirk of a specific compiler?
Over the course of time here on TSE, I have observed individuals whose pattern of visa applications is best described as ''...     serial refusals - Two or more consecutive visa refusals issued by the same regime to the same person. Commonly for the same, or nearly the same, reasons. In some visa regimes Serial refusals can have a cumulative effect wherein the applicant's credibility is increasingly eroded, especially when the application pattern suggests a secondary agenda.   A common thread appears to be the need to visit the destination country (especially Schengen, the USA, or the UK) with a special sense of urgency. Also common in these cases are the following types of questions...   Should I just reapply once again? What are my chances? What can I do to improve my odds in the future? Can I somehow address the previous refusals to avoid them being a burden on all future applications? How can I break the pattern?      NB: This question is intended as a canonical about serial refusals. I have never been personally denied a visa. Related questions with over 99 score display incorrectly I've installed a version of Ubuntu Server and although I'm fairly still fresh with Ubuntu, I'm trying to create a bash file to run a program in the background. More importantly, I'm trying to get a file nameto display correct and create it before I start running the program (I like my debug stuff).  However, here is my bash script:    #!/bin/bash  PATH="/var/log/servers/Game/"  FILENAME="startup"  EXT=".log"  DATE=$(date +%d-%m-%Y)  NEWFILE=${PATH}${FILENAME}_${DATE}${EXT}   I have verified that the file does exist in the PATH directory. However, the issue is with the date command. When I run the script bash -x game.sh this is what is displays.   + PATH=/var/log/servers/Game/  + FILENAME=startup  + EXT=.log  ++ date +%d-%m-%Y  game.sh: line 5: date: command not found  + DATE=  + NEWFILE=/var/log/servers/Game/startup_.log  + echo /var/log/servers/Game/startup_.log   I don't understand why it would say the command doesn't work, when I can go to the main console and run date and get a valid response.  Any help is greatly appreciated! Remove line containing certain string and the following line Please help me out with this problem:  Let $f_n(x) : [0,1] \to \mathbb R$ be a sequence of continuous functions convergent at every $x \in [0,1]$ to a continuous function $f: [0,1]  \to \mathbb R$ . Does $f_n$ converge uniformly to $f$?  My first solution: I read this example in  posted earlier and I think it works: Take a sequence $f_n:[0,1] \to \mathbb R$ such that $f_n$ increases linearly from $0$ to $1$ on the interval $\left[ 0,\frac{1}{n} \right]$, decreases linearly from $1$ to $0$ on the intreval $\left[ \frac{1}{n}, \frac{2}{n} \right]$, and is $0$ on $\left[ \frac{2}{n},1 \right]$. Then $f_{n} \to 0$ nonuniformly.  Is this answer true? Also, if anyone can give some examples of such function with detailed proof, I will very appreciative? Parameterize an SQL IN clause How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that. I think the answer is yes but I know a lot of people disagree. So, I would like to ask these people when exactly does it stop being me.  Let's say I want to upload my brain into a computer using the following procedure:  I have each of my neurons replaced by electronic neurons. By electronic neurons I mean chips with the necessary hardware and software to perform the exact same function that the neuron being replaced was performing. This means that given the same inputs that the biological neuron was given it would produce the same outputs. Then I connect that electronic neuron to all the neurons that former biological neuron was connected to.   At the end of this process is it still me? If not when did it stop being me? When one neuron was replaced? When 1,000 were replaced? When 1,000,000 were replaced?  (assuming it is still me)  Then, I divide these electronic neurons into groups and for each group I perform the following:   Write software to simulate the group of electrical neurons in my computer such that given the same inputs that go into the group of electronic neurons in my brain, it will produce the same outputs. Replace each group of neurons with another chip that communicates with my computer. Each of the chips will communicate to the corresponding software module in order to determine how to transform its inputs into the necessary outputs. Connect all of the inputs and outputs of the group of electronic neurons to that new chip.   At the end of this process is it still me? If not when did it stop being me? When one group was replaced? When 1,000 were replaced? When 1,000,000 were replaced?  (assuming it is still me) Now, what I have is a bunch of these new chips in my head, connected to each other and for each of these chips I have a small neural network software module in my computer. So, now for each pair of chip/software module I do this:   Transfer all connections going into and out of the chip into the computer version (i.e. connect the software module to the other software modules that represent the other chips that this chip is connected to) Disconnect the chip from the other chips and remove it   At the end of this process is it still me? If not when did it stop being me? When one of the new chips was replaced? When 1,000 were replaced? When 1,000,000 were replaced?  If it is still me then I have successfully moved my brain into a computer without ceasing being myself.  So, again the question is if at the end it is not me anymore when exactly does it stop being me and why does it stop being me?  EDIT: This question assumes that our universe and everything in it (including ourselves) follows the (testable) laws of physics. As it stands it also assumes that neuroscience is mostly right, although the question could also be considered without that requirement if instead of neural simulations we were to implement physics simulation of the brain. Of course this is a lot less practical. However, if your view is that our minds have a supernatural component then the question does not make any sense.  It was also pointed out that this is related to the Ship of Theseus, i.e. is something still the same if all its parts have been changed. With regards to that I think it is useful to consider that most of the cells in our body (not including brain cells) are regularly replaced anyway and some people even get entire organs replaced. Yet, we don't say that they stopped being themselves. Note, however, that if you are assuming a supernatural component of the mind that this explanation is not really adequate or relevant. I'm having some troubles understanding the solution (going from step $2$ to step $3$) of this linear congruence equation. Here's the problem with the solution:   Solve the congruence $2x + 11 \equiv 7 \pmod 3$.   First, we reduce all the coefficients $\pmod 3$:  $$2x + 2 \equiv 1 \pmod 3. \tag{1}$$  Next, we add $1$ to both sides, using the fact that $2 + 1 \equiv 0 \pmod 3$:  $$2x \equiv 2 \pmod 3. \tag{2}$$  Finally, we multiply both sides by $2$, using the fact that $2 · 2 = 4 \equiv 1 \pmod 3$:  $$x \equiv 1 \pmod 3. \tag{3}$$  That is, any number in the set $\{\ldots, −5, −2, 1, 4, \ldots\}$ will solve the original congruence.    Like I said my problem is the step between $(2)$ and $(3)$. If I multiply both sides of $(2)$ by $2$ I get:  $$4x \equiv 4 \pmod 3.$$  Now, I understand that $4$ is congruent to $1 \pmod 3$ so the RHS "simplifies" to $1 \pmod 3$ but I don't understand why the LHS "simplifies" to $x$. Can someone help me with this? How much time is too much time playing educational computer games? I recently bought an iPad primarily for my 3-year-old daughter. I put nothing on it but educational apps and children's books. No YouTube, no Internet, no (non-educational) games. I've decided to let her use it as much as she wants, for now, and see how it goes. That was a few weeks ago.  So far she's been using the iPad maybe 2 to 5 hours each day. She still enjoys other activities -- playing outside, playing with dolls and blocks, interacting with friends, being read to, etc. And I think she might be learning a thing or two from the apps. Still, several hours a day seems like a lot. How do I know if it's too much?  I've searched the web, and there's lots of info on limiting TV time and video games, but I can't find any recommendations on limiting use if it's only educational games.  Relevant: I have installed bootable ubuntu on hard disks but now I can not format them with Disk Utility program. When I try to format it says "One or more partitions are busy on /dev/sdb" for both hard disks. Is there any way to format these drives?  EDIT: With "Disk Utility" program when I select one of the hard drives It shows 3 volumes;  99 MB FAT 111 GB EXT4 9 GB UNKNOWN   I can not format this unknown volume.  With Gparted program, It doesn't shows Unknown volume only shows 111GB EXT4. Can I "fill" an empty object? In many experiments in quantum mechanics, a single photon is sent to a mirror which it passes through or bounces off with 50% probability, then the same for some more similar mirrors, and at the end we get interference between the various paths. This is fairly easy to observe in the laboratory.  The interference means there is no which-path information stored anywhere in the mirrors. The mirrors are made of 10^20-something atoms, they aren't necessarily ultra-pure crystals, and they're at room temperature. Nonetheless, they act on the photons as very simple unitary operators. Why is it that the mirrors retain no or very little trace of the photon's path, so that very little decoherence occurs?  In general, how do I look at a physical situation and predict when there will be enough noisy interaction with the environment for a quantum state to decohere? I am reviewing take aways. I am having trouble  How do I do $342 - 58$?  For the ones column I made the $2$ into a $12$ so I can do $12 - 8 = 4$ but I must take away one tens. So I get $3 - 5$ in tens column but I cant do $3 - 5$. What do I do now do I borrow something else? Email Deliverbility How can I enable permissions to edit Email Deliverability access level? Currently it is not editable and in system mode. I need to edit it and set it to "All Email so I can test Approval and workflow functionality. Analytic solution for $x=\ln(x+1)$ Fast way to come up with solutions to $x(x-1)(x-2)(x-3)=1$? I can solve this equation $x(x-1)(x-2)(x-3)=1$ using the usual method but I am looking for a fast analytical method to solve this. Any hints ? When you call the object.__repr__() method in Python you get something like this back:    &lt;__main__.Test object at 0x2aba1c0cf890&gt;     Is there any way to get a hold of the memory address if you overload __repr__(), other then calling super(Class, obj).__repr__() and regexing it out? I am making a Dwarf Warpriest Cleric of Shelyn wielding a Glaive. I expect to use Medium armor. I am planning this character out through level 20.   I'm looking for a build of feats, skills (if applicable) and spells that maximize my damage in melee and healing with spells. Other character choices are locked in.  If it matters, my allies in this group are: rogue, sorcerer, barbarian, monk, and fighter(longbow).   My original plan includes:    (Zeal Domain)     What Feats, Skills, and Spells (through level 20) will allow this character to do its highest DPR with a glaive and heal the most with its spell slots? How many research interests should be included in a statement of purpose/objective I am wondering how many research interest should be included in a statement of purpose. Is it better to include just one core interest or to include up to three as in my case? It is well known from Noether's Theorem how from continuous symmetries in the Lagrangian one gets a conserved charge which corresponds to linear momentum, angular momentum for translational and rotational symmetries and others.  Is there any elementary argument for why linear or angular momentum specifically (and not other conserved quantities) are conserved which does not require knowledge of Lagrangians? By elementary I mean, "if this is not so, then this unreasonable thing occurs".   Of course, we can say "if we want our laws to be the same at a different point in space then linear conservation must be conserved", but can we derive mathematically the expression for the conserved quantity without using the Lagrangian?  I want to explain to a friend why they are conserved but he doesn't have the background to understand the Lagrangian formalism.