Prove complement of this 12-vertex graph is a tree

Question: Let G12 be a simple graph of 12 vertices, and H12 its complement. It is known that G12 has 7 vertices of degree 10, 2 vertices of degree 9, 1 vertex of degree 8 and 2 vertices of degree 7. Prove or disprove H12 is a tree.
Answer: In the complement graph, every vertex is adjacent to the vertices it was not adjacent to originally, so from the degree sequence of $G_{12}$ we can obtain the degree sequence of $H_{12}$. For example each of the 7 degree 10 vertices in $G_{12}$ are adjacent to only one vertex in $H_{12}$ (remember that their degree is at most 11, as they can't be adjacent to themselves).
So in $H_{12}$ we have seven vertices of degree 1, two vertices of degree 2, one vertex of degree 3 and two vertices of degree 4.
Given this sequence we now want to know if $H_{12}$ is a tree. If we knew that $H_{12}$ was connected, we could just count the number of edges (a connected graph on $n$ vertices with exactly $n-1$ edges is a tree - not a bad exercise in itself), so if we assume $H_{12}$ is connected, we can count the edges (half the sum of the degrees) and see that it is a tree. We can go a little further by actually drawing the graph, which we can do by (going back small step) asking whether the degree sequence is graphic. In this case we have the sequence $\{4,4,3,2,2,1,1,1,1,1,1,1\}$. This sequence is graphic if and only if the sequence $\{3,2,1,1,1,1,1,1,1,1,1\}$ is graphic - what this implies is that we can construct the graph by taking the vertex of largest degree $d$ and assuming it is adjacent the next $d$ vertices of largest degree. Then one vertex is taken care of, and $d$ of the remaining vertices have one of their edges taken care of. Applying this to our sequence we get:

However this is not the only graph with this degree sequence, there are other possibilities, at least one of which (I checked) has a cycle. So really what we have is that there is at least one possible graph fitting the description of $G_{12}$ that has a complement graph $H_{12}$ that is a tree.
If you want a more arcane test, you can construct a multinomial with the degree sequence that has integer solutions if and only if the sequence can be realized as a tree (Gupta, Joshi & Tripathi, 2007).
Answer: This is a matter of whether you can create a complement graph that is disconnected or not: when the number of edges is 1 less than the number of nodes as in your $Q$, the complement graph is a tree iff it is connected.
Whenever you can come up with a complement graph that is a tree
with these numbers, you can modify it to be a disconnected graph with the same
number of nodes and edge distribution among nodes:
take two leaves in the tree where they have different parents. remove these leaves
and connect them with an edge so that the two are connected with one another
and disconnected from the rest. Put an edge connecting the parents of these
two leaves. The disturbed nodes preserve their degree in the resulting graph and
the resulting graph is disconnected with the same number of edges. A disconnected graph with 11 edges can be turned into a tree in a similar way.
Your $Q$ has no solution for disproving or proving it on one side. the resulting
graph can be either.
Comment: @martini which part of my answer have you edited ? i don't see any changes if you haven't worked on a puctuation mark somewhere
Comment: I added LaTeX-\$ for your $Q$s.
Answer: We can exhaustively enumerate (up to isomorphism) the trees on $12$ vertices and vertex degrees between $1$ and $4$ using geng which comes with nauty.
geng 12 11:11 -c -d1 -D4

Trees on $12$ vertices have $11$ edges (hence 11:11 above); the -c implies we count only connected graphs.
This generates 355 trees, and using a script we can exclude the ones that don't have the degree sequence $(1,1,1,1,1,1,1,2,2,3,4,4)$.  This results in the following $28$ graphs:

Using a similar process, we can find there are $106$ graphs (up to isomorphism) that satisfy the constraints on $H_{12}$.  The disconnected ones are:


Used code bought on internet to unlock Galaxy S3 from 3 UK to O2-UK. Will rooting the device harm it?

Question: My Galaxy S3 was locked to 3-UK when I got it.  So I used a code I bought on the internet to unlock it.  When buying the code the form asked which network I wanted to unlock the handset for.  I said O2-UK as that's the SIM I want to use.  No other SIM cards work on the handset except 3 and O2.  If I root my handset will O2-UK still work on it?  Thanks to anyone that can help.
Answer: Rooting the phone won't change SIM-lock settings, they're saved in a separate part of the phone, please see these previous questions for more info on that: Where are the SIM Lock settings stored on an Android phone?  and Does Unlocking bootloader affect network lock?
You can find more explaining these different terminologies here: What is the difference between: Rooting, Jailbreak, ROM, Mod, etc.?


Was Locke right that analytic knowledge is vacuous?

Question: According to Locke, it is impossible to obtain substantive knowledge from analytic propositions. Statements like "triangle has three sides" are analytic, but one cannot derive the Pythagorean Theorem analytically. However, Frege says that mathematical (arithmetical) truths are analytic. This raises a problem that although Locke's thesis about analytic knowledge is very convincing, analytic arithmetic knowledge is possible. How is this possible?
Comment: his views of space and time are irrelevant. And who established that his notion is wrong (people may not agree with them, but they certainy have not been refuted completely).
Comment: It would be nice to have a source for this; as generally I associate this distinction with Kant rather than Locke; if you browse the site you will find some refutations of the simple critiques of Kantian space-time
Comment: Kant has handled this issue, and argues that mathematical knowledge is synthetic instead of analytic, aiming. Just some food for thought
Comment: but doesnt his notion of space and time wrong?
Comment: Hello. What is the source of what you say about Locke?
Answer: Frege is the founder of a program called logicism that aimed to reduce all of mathematics to logic. In order to reduce mathematics to logic Frege had to expand what is meant by logic. Before him Locke, Kant and others understood by logic only Aristotle's syllogistic, which is a manipulation of simple implications (syllogisms). Frege's Logic went much further, and encompassed all of arithmetic in particular, if not all of set theory. But derivable from logic alone is what all three meant by "analytic". Under logicism all of mathematics would be analytic, including much of what Kant called "synthetic a priori" (but not the parts related to geometry and physics). So both Locke and Frege were right, they just meant different things by "analytic".
"Frege's conception of the analytic was suitably broader than Kant's. Kant required that conceptual containments be evident within the sentence, rather than that the sentence be displayed as a conclusion following logically from axioms whose own logical or conceptual truth was self-evident, and which might contain expressions not occurring in the sentence in question... Kant did not regard '7 + 5 = 12' as an analytic truth. The Fregean, by contrast, is able to exploit the internal structure of the numerals, and to invoke the recursion axioms for addition (which themselves would have to have been derived in logicist fashion). So, for the Fregean, even if not for Kant, '7 + 5 = 12' is an analytic truth."
The best attempt to realize the logicism program was Russell and Whitehead's book Principia Mathematica. However, after Gödel's results on incompleteness the program came to be viewed as a dead end, and was largely abandoned. Later, Quine argued convincingly that the analytic/synthetic distinction itself, even in a revised form adopted by logical positivists, can not be maintained at all. According to Quine, all knowledge, including the laws of logic, is synthetic, and ultimately empirical, this dealt a further blow to logicism. Although it is no longer believed that "all of mathematics" reduces to logic, the modern mathematical logic is much closer to Frege's conception of logic than to Kant's or Locke's.
Answer: Frege's thesis was not that mathematics as a whole was analytic, just that arithmetic (the theory of whole numbers) was so. Frege criticized Kant about arithmetic, but he agreed with Kant that geometry was synthetic. As to that Pythagoras' theorem cannot be deduced from the definition of a triangle alone, there is surely no dispute.

We shall do well in general not to overestimate the extent to which arithmetic is akin to geometry . . . For purposes of conceptual thought we can always assume the contrary of some one or other of the geometrical axioms, without involving ourselves in any self-contradictions . . . The fact that this is possible shows that the axioms of geometry are independent of one another and of the primitive laws of logic, and consequently are synthetic. (Frege, The Foundations of Arithmetic §13)
Comment: I agree with the point, but I want to point out that Frege's reasoning here is questionable. "For purposes of conceptual thought" we can, and do,  assume the contrary of the axioms of arithmetic as well, without self-contradictions. Kant presented arithmetic as a priori synthesis in time, and geometry as a priori synthesis in space. He may have been wrong about space and time as forms of a priori perception, but he was not wrong about the affinity of arithmetic and geometric reasoning. Quine showed that both Kant's and Frege's lines between analytic and synthetic are drawn by convention alone.
Comment: @Conifold Hi. 1) Where do we "assume the contrary of the axioms of arithmetic as well"? 2) How do you know that Kant "was not wrong about the affinity of arithmetic and geometric reasoning"? The relation between geometry and space is obvious. The relation between arithmetic and time is not obvious, and many (like Frege) did not acknowledge it.
Comment: It turns on "assume" and "obvious". We can reason about non-Euclidean geometry, we can visualize Euclidean models of it, even form mental intuition on how it works, but we can do all that with modular arithmetic too. The process Kant describes of invoking schemes of 7 and 5 and counting 7+5 as 12 is akin to invoking the scheme of triangle and mentally manipulating it. Either we schematize the experience of counting empirical objects or 7+5 can be 2 mod 10, and counting is related to time as obviously as shapes to space.
Comment: But even logic proper is not immune to assuming otherwise, intuitionists rejected excluded middle, Heraclitus even rejected a=a with "you can't enter the same river twice". And Frege's Logic reached well beyond arithmetic of whole numbers, indeed he ran into trouble with Russell's paradox because unrestricted comprehension for classes was "obvious" http://plato.stanford.edu/entries/russell-paradox/#HOTP Quine's point was that "obvious" is in the eye of the beholder and of impure a posteriori origins, nothing is truly analytic.


Ubuntu 12.10+ optimus nvidia 635m and CUDA installation?

Question: I am trying to install CUDA on my ubuntu 12.10 as my computer has Optimus Graphic card 635m. I was able to use the card by bumblebee till I tried to install CUDA. After that I cannot run optirun. I tried to install CUDA by the installation file from nvidia site also use the software manager as the second try. All my shots are failed. Currently I am crazy about the mixure of the card, bumblebee and cuda at 12.10. Is there any one solved that kind of problem at his configuration?
Answer: I suggest you to read this post here: Nvidia Bumblebee + CUDA
Use the script you find in here. Is the most advanced step further I made untill now, to get the Nvidia card work. After having configured Bumblebee, during the CUDA installation take care not to install again the Nvidia driver as asked by the CUDA installer: if you say 'yes' this will break your Desktop resolution.


Are trap games a good plan versus rated chess players or not?

Question: A lot of times I used to play trap games in chess; most of the times I won the game. But the my question is this: is it good strategy to play a trap game when facing a rated chess player?
Comment: Can you post an example of a trap game? I do not know what it is.
Comment: What rating are we taking about?
Comment: Depending on the rating, depending on the trap. Bobby Fischer coined his own at expert level play. They aren't always that solid and I don't often fall victim at my rating since I analyze unusual moves. Gambits are better in my opinion since it's noticed by both sides and trades something like pieces for position.
Comment: @TonyEnnis: I am not the OP but have posted an example of a trap game, per your request, according to my understanding of the OP's question. In fact, however, while searching for an example to post, what I learned is that high-quality examples are hard to find—which goes to OP's point, doesn't it?
Answer: I will assume that a "trap game" is an opening that contains a devastating trap if your opponent plays the wrong move.
What happens if your opponent does not fall for the trap? As long as you can still have a good game, it's ok to play a trap game.
Comment: If you have a good game when the opponent doesn't fall into the trap, it's not called a trap.
Comment: @ferit just because they don't fall for the trap move doesn't mean the opening was not a "trap opening".
Comment: I didn't say otherwise. I'm saying that trap openings are called trap openings because if the opponent doesn't fall into the trap you end up disadvantageous.
Comment: @ferit see my last sentence in the answer.
Comment: Maybe we don't understand each other, nevermind.
Answer: Playing traps is never a good plan if you want to improve yourself. It won't help you to improve your skills. Also experienced players won't buy it.
Answer: I am not fond of opening traps. If an opening you like to play happens to have a trap in it, that's fine; by all means exploit the trap. What I don't like is going out of one's way to learn a variation just because it has a trap in it. For example, the Queen's Gambit Accepted with 3.e3 has this well known trap:
<code>[fen ""]

1.d4 d5 2.c4 dxc4 3.e3 b5 4.a4 c6 5.axb5 cxb5 6.Qf3
</code>
...and now black's only option to save his rook is to give up his knight. It's a lovely little trap, and if you like 3.e3 no matter how black responds, then by all means you should learn the trap. But you shouldn't play 3.e3 just because you hope your opponent falls for the trap; I personally prefer 3.e4 to try to grab the center, but that's just my personal preference.
I don't like winning via an opening trap because there isn't really any skill involved other than memorization. If you start winning a large portion of your games through opening traps, your rating will go up... and then you will face opponents who know your traps and you won't know how to beat them, because you didn't learn any actual skills on the way up.
Trying to draw or even win a lost game with a swindle is a different matter. I occasionally do this, and it's fun when it works (though your opponent will have a different opinion!), but I only do this if I would otherwise resign.
Answer: In my experience I feel the only way that I can play a 'ranked'(assuming considerable higher rating) than myself is to play wild, attacking lines in the hopes of trapping them to victory(assuming that is what you mean by 'trap games').  I usually tie this in with the term I've read, "hope chess".  Hoping your opponent doesn't see what you are trying to do for a win without having a plan when it fails.
Using positional strategy the ranked player is simply going to be beat me.  There's a reason they are ranked.  They have the understanding, knowledge and experience I have not obtained yet.  When I start getting around the 100 pt. rating difference and I'm on the low end I've only got about a 30% chance of winning so I'm putting my money on the wild, attacking games in the hopes of trapping them for a win by them blundering.
While I do believe the best way to get better is to play people who are better than you, I don't necessarily believe this is a good long term strategy with playing like this.  I would always bet a ranked player is going to see the traps more often than not and I would be concerned the position would be lost after the trap fails.
Answer: Each and every ranked player knows about most of the traps and defences, while playing to each other (as the both players know the trap) traps are useless, that's why you see in professional matches also, high rated players start by developing pieces. If you want to give a good fight to a ranked player it is better that you not use that trap because it is sure that he might have seen it somewhere and will know how to use it for his profit....
Answer: The occasional trap game is entertaining and can even be illuminating but, at normal time controls, experience suggests that such traps seldom prosper against opponents stronger than FIDE 1800.
Here is a typical example.
<code>[fen ""]
[title "Krystl (1795) v Travnicek (1975), Czechia, 1997"]

1. g4 d5 2. Bg2 Bxg4 3. c4 Nf6 4. cxd5 Nxd5 5. Qb3 Be6 (5... Nb6? 6. Bxb7) 6. Qxb7 Nb6 7. Nc3 Qd7  8. d3 c6 9. Qxd7+ Bxd7 10. Be3 e6 11. Bd4 c5 12. Be5 Nc6 13. Bc7 Rc8 14. Nb5  Nb4 15. Nd6+ Bxd6 16. Bxd6 Bc6 17. Nf3 Nc2+ 18. Kd2 Nxa1 19. Rxa1 Kd7 20. Bg3  f6 21. Rc1 Rhd8 22. Rxc5 Bxf3 23. Rxc8 Bxg2 24. Rc7+ Ke8 25. Rxg7 Rd7 26. Rg4  Bd5 27. b3 a5 28. Rg8+ Kf7 29. Rb8 Bb7 30. e4 e5 31. f4 f5 32. Bf2 Nc8 33. fxe5  fxe4 34. d4 Ke6 35. Ke3 Kd5 36. Be1 Kc6 37. e6 Rd5 38. Bh4 Kc7 39. e7 Bc6 40.  Bg3+ Nd6 41. Bxd6+ Kxd6 42. e8=Q Bxe8 43. Rxe8 Rh5 44. Kxe4 Rxh2 45. a4 Re2+  0-1
</code>
Counterexamples exist but good counterexamples are hard to find.
<code>[fen ""]
[title "Jovanovic (2330) v Milanovic (2480), online, 2005"]

1. e4 e5 2. d4 exd4 3. f4 Nc6 4. Nf3 Bc5 5. Bd3 Nf6 6. O-O Qe7 7. a3 a5 8. Nbd2  O-O? 9. e5 Ng4 10. Bxh7+ Kh8 11. Ng5 d6 12. Bd3 dxe5 13. Qe1 exf4 14. Qh4+ Nh6  15. Nde4 Ne5 16. Bxf4 Ng6 17. Qg3 Nxf4 18. Rxf4 Bd6 19. Nxd6 Qxd6 20. Qf2 Qd5  21. Qh4 c5 22. Rf6 Kg8 23. Bh7+ Kh8 24. Rxh6 gxh6 25. Qxh6 Qxg5 26. Qxg5 Kxh7  27. Rf1 f5 28. Rf4 1-0
</code>
Trap games remain a part of the game of chess and a part of chess lore—a minor part, but a part nevertheless. At the lower ratings, trap games even serve a salutary purpose insofar as they serve to teach their victims to sidestep the traps!
At the lower ratings at which the traps actually work, the occasional trap game can be fun to play for both sides; but at the higher ratings, even games like the diagrammed Jovanovic v Milanovic (in which Black plays not very but only somewhat badly) rarely occur.
At any rating, if trap games are too often tried, trap games tend to warp and stunt a player's understanding of the game of chess. The player who plays a trap game must be prepared to lose if his or her trap is detected, so even at the lower ratings, more than occasional use can hardly be recommended.
And at the higher ratings? Sorry, but over FIDE 1800, experience appears to contradict the trap game. The attempt just doesn't work.
Because opponents rated much higher will seldom lose in any case, the conjecture that a trap game might maximize one's meagre chances does seem reasonable, so your question is a good one. However, the answer seems to be this: over-the-board experience teaches that one can maximize meagre chances against much-higher-rated opponents by just playing good moves.


What are the steps in recapping overcarbonated beer?

Question: What are the steps involved in recapping a bottle of beer for any reason (e.g. if too much priming sugar is added, if a cap appears to be defective or failing, etc)?
Answer: Here's the best method I've found after trying a few different approaches:

Cool the bottle to 38-40 degrees (this prevents the beer from foaming much)
Prepare your replacement caps and have them at the ready, as well as your capper
Handle the bottle gently
Place the bottle on a counter or other sturdy surface and very gently pry off the cap.  Minimize any movement of the bottle and remove the cap slowly so as to not rapidly depressurize the bottle
Quickly swap the old cap for the new one, and immediately seal with the capper
Answer: If a cap is defective and you notice it soon enough then you can just remove and replace.  If its been  awhile then your priming sugar is probably spent and that bottle is a loss IMO.  Its not worth the effort of trying to add more sugar again.
If you added too much priming sugar, it sort of depends on how much extra.
Some people have luck with prying off one edge to release the excess pressure, then recrimping in down with the capper.  I am not sure you get a good seal in that case.
For me I just tend to chalk these issues up as a loss and correct it next time/batch.


How to troubleshoot gas supply not making it to some appliances

Question: I recently purchased a home and once utilities were turned on I've been having issues with certain gas appliances. Some appliances required a normal amount of time to get the gas flowing after being off for some time. One water heater was finally able to light, as well as one furnace and the stove. However, a second water heater, second furnace, and the gas-log fireplace will not light. The individual gas valves to each appliance are in the on position but I never smell any gas. Is it possible for there to be restrictions in the gas supply lines that would affect all of these appliances? How can I troubleshoot this issue?
Comment: Is this a single family home or a converted 2 unit apartment? You won't smell gas from the water heater or furnace but you should from the fireplace. There may be an additional valve somewhere that you need to open.
Comment: Are these older appliances that use pilot lights or newer ones that have igniters? Older versions with pilot lights will not allow gas to flow until the pilot light is lit and it can heat up the thermocouple.
Answer: It sounds like the gas system was never purged after a nitrogen test. The appliances in question are probably farther down the line and still have non-combustables in them. It will take a very long time to purge through a pilot tube. You need to close the gas line valve on one of the appliances, remove the drip leg, open the valve to vent non-combustables and close it when the sound changes or you smell gas. Replace the drip leg, open the valve and start the appliance.
Do not do this alone. Someone needs to be with you in case you pass out, have a stroke, faint etc. It's very unlikely but if you are rendered incapable of closing the valve a second person can. This is important. Explosions happen because of this.
Answer: There may be other valves in the piping. When my house was built , they forgot to run gas for the dryer ( It also had an electric supply). They added a valve in the attic for the pipe run to the dryer. Later , I added another valve in the attic for gas line to a outside grill.


How can I solve the Gear Cube Extreme?

Question: The Gear Cube Extreme is another Mechanical Puzzle. I ordered it not so long ago and a friend of mine "accidentally" scrambled it. Now I want to solve it again but I have no idea how or even where to start as it is my first non standard Rubik's cube to solve.
Answer: Here's how I solve it:

Solve the middle layer
Solve the corners
2.1 Resolve middle layer parity and centers (if there is a problem)
Move the edges to the correct layers
Move the edges into the correct positions
Rotate the edges into the correct orientations

0. Notation
I'm using R, L, B, F to indicate a 180-degree turn of each side. This is because, as you know, you cannot rotate each side except in increments of 180. U, D, however, will refer to 90 degree turns of the upper and lower layers.
If I refer to a corner using three letters, those letters indicate the faces that corner touches. For instance, the UFL corner is the upper front left corner.

1. Solve the middle layer
This step is pretty easy, honestly, and you should be able to do this intuitively using the side moves. However, a couple algorithms that can help if you're truly stuck on this: use R B R to move the edges to a more understandable position, and R2 or L2 to rotate the middle slice 180 degrees to solve the centers.

2. Solve the corners
For now, keep one hand firmly on two pieces of the center layer, and don't move it. If you do, you'll need to restore it, which isn't a difficult problem, but I'm not going to cover how to do it because it shouldn't happen. We'll restore the middle layer at the end of this step.
I solve this in two steps: first, by solving the bottom layer corners; then, by solving the top layer corners.
The algorithm I use to solve bottom layer corners is pretty simple: R U R U' R' This moves the UFL corner into the DFL position without disturbing the other pieces on the bottom layer. The process for solving the bottom layer pieces is simple:

Find a bottom-layer corner on the top layer, and find where it should go. Use U to place the piece in the UFL position, and use D to place its target location in the DFL position. Then, execute the algorithm.
Here, 'target location' refers to a spot relative to other properly-placed pieces.
If there are no top-layer pieces on the bottom layer, then just move a piece there for reference.
If there are no bottom-layer pieces on the top layer, find an incorrectly-positioned piece on the bottom layer and swap it with any top-layer piece.

After this, you're on to the top layer corners. One algorithm should be sufficient here: R U R U' R' (U' D) R U' R U R'. This swaps the UFL and UBL corners. Executing this strategically should lead you to a solved upper layer.
2.1 Resolve middle layer parity (if it exists)
If the two middle layer pieces you've been holding onto are flipped, then execute the following algorithm: D' R D R (D' R)2 D' R' U' D R'. At this point, there will be one yellow corner on the top, and a corresponding purple corner on the bottom. Proceed from the beginning of Step 2 - this shouldn't take long to complete.
If there's a problem with a particular center, just rotate an adjacent L/R or
F/B slice 180 degrees and check again.

3. Move the edges to the correct layers
This step takes only one algorithm: (R U R' U')5. This swaps the UF and BR edges. Use this as many times as needed, placing an incorrect edge in each place and swapping them.

4. Move the edges into the correct positions
For this, you need two algorithms. These images are courtesy of Ruwix.

Left: R2 U R2 U; Right: R D R U2 R2 U2 R D' R'
This should cover most cases intuitively. Use U and D to move the pieces in position.
If you end up with three pieces on one layer that need to be swapped, then do not solve the middle of the three first and you'll be alright. To do this, use the second algorithm twice - the first time will flip two edges on the other layer, but the second time will flip them back.

5. Rotate the edges into the correct orientations
Next, you'll need the following two algorithms:

(R U)2 (R )4 (U' R')2 (CCW)
(R U)2 (R')4 (U' R')2 (CW)

These two algorithms will do strange things. They both turn the bottom front edge piece in different directions, which is really the focus of them, but they also turn the UL, UB, and UR edges as well.
The first step is to solve the bottom-layer edges. If the top layer has a solved edge, move it into the UF position. If it doesn't have one, do so immediately after you solve the first bottom-layer piece. For each unsolved edge on the bottom layer, execute the appropriate algorithm above.
If the cube is not solved, flip it over. Repeat this process for all the edges again.
If the cube is still not solved, flip it over again. Once you repeat the process again, the edges are guaranteed to be solved.
Answer: This document provides a much simpler solution!
In brief:

Solve corners
Solve as much as possible of the edges
Solve the rest using simple moves exchanging edges and centres

Here is an extract from the document:

Restore puzzle to be flat (easy - do flips as needed).
Solve the corners (easy - faces cannot rotate 90 degrees).
Use step A to solve as much as possible, use Step B, and repeat until solved (repositioning
the cube as appropriate):
A. Flip the right face clockwise 6 times.
(Exchanges front/rear and top/bottom of the vertical center layer).
B. Flip the bottom face clockwise, flip the right face twice clockwise, flip the bottom face
counter clockwise, flip the right face twice counter clockwise.
(Exchanges front/rear of vertical center layer and left/right centers.)

Really easy!
Comment: It should be noted that this is a solution document for the Gear Cube, and not the Gear Cube Extreme; therefore, this doesn't answer the question. Does that source have a solution for the Gear Cube Extreme that could be edited into this answer?
Comment: That is true, my bad. Don't see a solution to the Extreme there, sorry guys!
Comment: No worries! It happens.
Answer: Jaap's Puzzle Page has lots of helpful twisty solutions. Here's the link for the Gear Cube Extreme:
http://www.jaapsch.net/puzzles/gearcube2.htm
This site also has steps to a solution, with some pictures to assist:
http://ruwix.com/twisty-puzzles/gear-cube-extreme-ultimate-how-to-solve-gearcube-solution/
Comment: Welcome to Puzzling! Whilst this may answer the question, [it would be preferable](http://meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. I understand this may be difficult, especially with content from Jaap, but it really is something we look for and appreciate. Thanks!
Comment: I just realized (after reading a different Stack Exchange site) that posting links only was not the preferred thing to do, and then I saw that you've politely pointed out the same thing. It is acceptable to post the applicable content from a page (RuWix doesn't seem to prohibit it) along with a link, or do I need to paraphrase it?
Comment: The standard advice I'd give is: do what you think would be most helpful. Jaap's puzzle tutorials are notoriously difficult to read, despite their thoroughness. In this particular case, I might suggest summarizing the steps and algorithms used, but it's really up to you. Just be sure to cite your sources and you'll be alright! And, thanks for taking the time to improve your post.

How can I solve the Gear Cube Extreme?


$post->id vs $post->ID problem after using Wordpress config bootstrap

Question: I'm developing with Wordpress in a multi environment scenario. I develop on my local machine, test on a server and so on.
I was using the "trick" of having a local-config.php file to have different configurations based on the environment. Today I discovered this:
Wordpress config bootstrap.
It's just a simple improvement of the default wp-config.php file. It's working fine, but on my local environment appeared this error:
Notice: Undefined property: stdClass::$id in /home/carlo/public_html/altrababele/wp-content/themes/wp-foundation/index.php on line 21

The code generating the error is this:
<?php echo get_the_post_thumbnail( $post->id); ?>
<time datetime="<?php echo the_time('y-m-j'); ?>" pubdate><?php the_time('j'); ?>
<?php the_time('M'); ?>
<?php the_time('y'); ?></time>

I set the debug option to false, but nothing changes. The problem appears to be that id is lowercase, so writing $post->ID actually solves the issue. It's strange because if I use the local-config.php it works just fine, but all the options are the same.
any suggestions?
Answer: The WordPress-Config-Bootstrap is setting DEBUG to true on a local installation. If you try to define DEBUG again later you should get another error. The solution is not to use the non-existent property $id. Notices should be fixed not suppressed.


How to check all threads are free in fixed thread pool?

Question: I need to check all threads free in fixed thread pool. depends on that i'll do some other task with thread... is there any way to find it?
Comment: GetAvailableThreads minus GetMaxThreads
Answer: Just implement the pool as a stack.
When you need a thread, pop it from the stack and use it.
When you are done with the thread, push it back to the stack.
If the stack is empty then block until a thread is available.
I would recommend though, to use a library (in the language that you use) that creates/manages the thread pool instead of creating your own.


Can you charge an electric motorcycle at an electric car charging station?

Question: Do electric motorcycles and cars use the same type of chargers? Can we charge a Zero motorcycle at a Tesla supercharger station? How about at an electric car parking?
Answer: 2015 and newer Zero Motorcycles have a "Charge Tank" option that allows you to use standard chargers:
Zero Motorcycles Charging Options.

For fast charging on the go, Zero offers the Charge Tank accessory. It effectively triples on-board charging speed, typically allowing riders to recharge their power pack in as little as 2-3 hours. The Charge Tank works with the rapidly expanding network of Level 2 public and home charging stations using the popular J1772 standard. The Charge Tank is a dealer-installed option available on 2015 and later Zero S, Zero SR, Zero DS and Zero DSR models.

I also found this blog post that states Tesla Superchargers are meant only for Tesla cars and they have a proprietary connector.  However, you might be able to build or purchase an "off brand" adapter that will let you suck some juice from the Tesla pumps.
Correction:  The blog post linked above is talking about "Tesla HPWC charging stations" which are different from Superchargers.   The Zero supports the J1772 standard which is fast AC charging.  A Supercharger is a Tesla-only fast DC charger, so the two would never be compatible.  The Tesla HPWC is a fast AC charger which may or may not be able to be converted for J1772 standard usage (The video in the above blog could even be faked...  It's the internet...).
Comment: That would of course be up to the building that you are parking at or whoever owns the charger, but it is compatible, and I really doubt anyone would be unimpressed enough with an _electric motorcycle_ to ask you to move.  I'd be busy looking at it and taking pictures.
Comment: Could you park a Zero motorcycle at a designated electric car parking slot with a charger, and use the charger?
Answer: You won't be able to charge at a Tesla Supercharger, no matter what. Not even all Model Ss can do this. The charger inquires from the car, probably its serial number, and validates it in a database.
Unless someone has reverse engineered the protocol and put in a valid S/N, it isn't going to work.
Answer: I have a 2015 Zero S and I charge at electric vehicle stations frequently! A Zero can charge from many (but not all) EV stations. It's possible to use:

Any station that provides a normal 110V wall plug. Same as plugging in at home.
J1772 (L2) stations with a J1772 to wall adapter. Even though this provides 240V to the bike, it won't charge any faster because you're limited by the onboard charger (1.3kW max).
Tesla Destination Chargers (not Superchargers) with a custom adapter. These are just J1772 with a different connector, so they work with an adapter. Just like L2 stations, you'd be limited by the onboard 1.3kW charger.

As you can see, with anything bigger than a wall plug, you quickly run into the limits of the onboard charger. It's possible to drastically increase the amount of power the bike can pull down (and decrease the charging time) by adding larger chargers:

The official Charge Tank accessory (2.5kW) that @JPhi1618 mentioned, or the official offboard Quick Charger (1kW).
A number of 3rd party chargers, such as the Elcon (2.5kW) or the Diginow Supercharger (3.3kW - 9.9kW). The unofficial manual has more details.

As @DoxyLover mentioned, Tesla Superchargers (and any DC fast chargers like CCS or CHAdeMO) won't work, because the bike's voltage is not compatible with these stations.
Comment: hey Zero owner! maybe you can answer this other question? https://mechanics.stackexchange.com/questions/54014/can-zero-motorcycles-batteries-be-charged-independently-by-removing-them-first thanks!


Does today's Yom Kippur observance atone for all sins?

Question: I find the liturgical and rabbinic descriptions of the atonement process on Yom Kippur challenging.  Without a Sanhedrin to mete out punishments for intentional sins, and no altar to bring offerings to atone for unintentional or un-witnessed sins, the chance of ever starting the year with a clean slate seems bleak.  But we are also led to believe that sincere repentence wipes out all sins. Can we ever start with a truly clean slate? Or will we still be held liable for sins we don't get punished for in this world?
Comment: I suggest [Igeres HaTeshuva](http://www.chabad.org/library/tanya/tanya_cdo/aid/7877/jewish/Igeret-HaTeshuva.htm) for a lengthy discussion on this very topic.
Comment: The misdeed is not wiped clean on the slate by G-d. Yom Kippur does not suggest this. Think of an archer who shoots an arrow and misses his target. Does he beat his chest and cry or attempt to know why he missed his target, reach into his quiver, and try again. This is the rational concept for repentance.
Answer: To summarize Rambam Hilkhot Teshuva ch. 1 and ch. 2.
Repentance absolves all sins. However, depending on the nature of the sin, full atonement may be immediate or may be contingent on something else.

Violation of a positive commandment (that does not carry karet) is forgiven immediately upon repentance. (1:9)
Violation of a negative commandment (that does not carry karet) is partially forgiven upon repentance, but only fully forgiven on Yom HaKippurim. (1:10)
Violation of capital offenses or offenses that carry the penalty of karet, are partially forgiven through repentance and Yom HaKippurim, and are fully forgiven through suffering. (1:11)
Violations that cause desecration of God's name are only fully forgiven upon death. (1:12). These are sins which are done to anger God (Hilkhot Yesodei HaTorah 5:13).
Interpersonal sins require restitution to the damaged party as well as his forgiveness. (Hilkhot Teshuvah 2:11)

So as far as positive and negative commandments, one will indeed start the year with a clean slate (provide that he repents). Even the more severe sins carrying the death penalty or karet do not require the Sanhedrin or the sacrificial service to achieve atonement.
Comment: What's the difference between "absolv[ing] sins" and "full atonement"?
Comment: @DoubleAA Good question. Rambam himself does not clarify this (obviously using the Henrew terms תולה and מכפר; not my English translations). At the minimum, even if repentance alone accomplishes nothing, it is the primary source of forgiveness **when** coupled with Yom Kipur + suffering + death, as applicable. I suspect that Rambam means more than this; that partial forgiveness is achieved even alone, but the minimal interpretation would be as I stated.
Comment: What about Yom Kippur effects the atonement? If I do teshuva in December does the teshuva happen on Yom Kippur simply by dint of calendar? Do I have to wait and complete (or repeat) my teshuva on Y"K for it to count? If I am liable to karet (category 3) might that be levied against me between December and Y"K before Y"K has done it's "part"?
Answer: In summary, no, not ALL sins.
There are several aspects to answering your question, and I couldn't get to all of them, here.
But to start, Talmud Yevamot (don't know exact page) explains that Yom Kippur never atones for sins between one person and another until that person requests forgiveness, personally. The method becomes a bit more complex if the wronged person is unreachable or dead.
Another more difficult example is atonement for lashon hara and rechilut (gossip, slander). How would you now how many people got the bard word about someone, and how could you really recover the damage already done?
Yet another concept is inferred from your mentioning that we don't have a Bet Hamikdash and we carry the sins of our ancestors. This concept is hinted to in a few places in our daily prayers (esp. Tachanun) and the fact that we still don't have a Bet Hamikdash is an indication that we have not yet been forgiven.
Finally, what about all those sins that we did during the year, but on Yom Kippur, we forgot about them and didn't mention them in our confession? We're still responsible.
Comment: http://hebrewbooks.org/shas.aspx?mesechta=6&daf=85b&format=text and later
Answer: The first perek of Shevuos, summarized in Rambam's first perek of Hilchos Teshuvah, says that certain sins are atoned for immediately by teshuvah, certain ones are atoned for by Yom Kippur, though Teshuvah delays the punishment in Olam HaBa, and certain sins are atoned for with suffering, though Teshuvah and Yom Kippur delay the ultimate punishment. Chillul Hashem is the harshest of all; its atonement comes only with death, and the above three delay the punishment until then.
Also, as discussed in the last Mishnah in Yoma, there's another requirement for sins between man and his friend, which is asking for forgiveness.
As the Rambam (ibid.) notes, none of these sources say anything about karbanos. To the contrary, our Teshuvah takes the place of the karbanos, and, as the Midrash (Vayikra Rabbah 7:2) points out, is even better than karbanos:

One who does Teshuvah is as if he went to Yerushalayim, built the Beis HaMikdash, built the Mizbeiach, and offered upon it all the karbanos in the Torah, as the passuk says, "The offerings of Hashem are a broken heart."

Emphasis mine: not just the applicable karbanos to the sin in question, but every last one of them.
Comment: `As the Rambam (ibid.) notes, none of these sources say anything about karbanos. To the contrary, our Teshuvah takes the place of the karbanos, and, as the Midrash (Vayikra Rabbah 7:2) points out, is even better than karbanos:` Not sure what you mean. The Se'ir HaMishtaleh atones for minor sins even if a person does not repent. Rambam writes this in the first chapter of  Hilkhot Teshuva. Where does Rambam note that "none of the sources say anything about korbanos"?
Comment: I read that as referring to when the Bayis stood, but that when it was destroyed, "we have no path to atonement besides Teshuvah," which, possibly accompanied by Yom Kippur, suffering, and death c"v, will accomplish atonement.
Comment: Not sure what you mean (`I read that as referring` read what as referring? If you mean that the korbanot offered in the beit hamikdash were only effective while they existed, that goes without saying. It in no way deemphasizes the role of korbanot). And I still don't know which Rambam notes that "none of these sources say anything about karbanos". At the minimum, your implication that korbanot have no role in teshuva is misleading, for as I noted, sometimes the korban removes the need to even do teshuva.
Comment: @mevaqesh He doesn't note it explicitly. In respect to b'zman hazeh, it's possible to do Teshuvah even without karbanos. And, as you noted, it's obvious that non-existent karbanos have no role in a Teshuvah process during the times in which they can't be brought.
Comment: If he does not note it, then consider clarifying that, and that the korbanot _do_ make repentance easier, but even without them it is still possible to do teshuvah.
Comment: I still don't understand, how can one do full Teshuva with all the sins we accumulate. If we must go to everyone we wronged
Comment: @raul Yom Kippur only atones if you've received forgiveness from those you've wronged.


Why does gold and other metals conglomerate

Question: When gold, or some other metals, such as copper, are found, they are often found in large nuggets. But, from what I understand, gold is produced in quite stochastic stellar processes. As such, shouldn't the distribution of gold and other elements be rather uniform, or at least conglomerated according to the stellar process by which they were created? Why do we see large gold nuggets? Shouldn't we find gold mixed uniformly with all the other elements created along side it in its stellar process?
Comment: Because they are often precipitated, e.g., at/around hydro-thermal vents.
Comment: See Also; http://earthscience.stackexchange.com/questions/391/in-what-geological-situations-can-i-find-gold
Comment: Short answer atoms and particles of the same element  have the same chemical and physical properties and react ot processes in the environment in the same way.
Answer: Some things to consider. Even if elements are formed randomly in stars that does not necessarily imply that the elements will be distributed evenly and randomly when the star explodes. Following the explosion of a star there will be a gravitational attraction between the elements created within the star which will cause clumping/agglomeration of the elements.
The other thing to consider is chemical attraction due to ionic charges and the lack or excess of electrons in the outer shells of atoms which causes atoms to chemically combine with other atoms to form molecules.
Many elements and molecules are soluble in water. When conditions change, such as temperature, pressure or chemical attraction, metals can precipitate out of solution and collect en-mass, sometimes forming nuggets.
Answer: In addition to Fred's comments, there is growing evidence that some metallic elements, including gold, are bio-concentrated to billions of times the concentration in ambient solutions. In addition, once a minute 'nugget' or grain is established, it acts as a nucleating agent for further deposition. Another factor is the mico-environment's position on a 'pH-redox fence'. If the right combination of acidity/alkalinity and electrical potential is encountered, than extraordinary precipitation can occur, even where and when one would not normally expect it. This is particularly the case in which buried organic carbon (reducing agent) comes into contact with circulating groundwater. Over time remarkable concentrations, including sizeable gold nuggets, can precipitate from vanishingly small aqueous concentrations. Also recall that in quite mild geothermal - hydrothermal conditions, of 100 to 300 deg C, for example, the rates of chemical precipitation of 'insoluble' elements like gold, can be tens of thousands of times faster than would be seen under normal meteoric temperatures.
Answer: There are processes that can move certain elements around (including gold) when you take water, pressurise and heat it up, such as happens in the Earth's crust. These processes will preferentially take one element relative to another. Some will take gold and leave other stuff behind. When this gold-bearing water accumulates in some place, the gold will stay there.
As an example, let's take a mixture of salt and sand. If you let water flow over it, the sand will stay behind but it will dissolve the salt and redeposit it wherever the water are going to. So in principle it's the same thing.
I made a drawing for another answer some time ago:
Why do gold deposits form only in certain areas of the earth?

When gold, or some other metals, such as copper, are found, they are often found in large nuggets.

That's not actually correct. They are not "often found in large nuggets". Whenever they are found in large nuggets it is indeed spectacular, but this is extremely rare (and becomes rares as more of those are found). Most gold is mined in very low concentrations. A good estimate for how much gold is in the rocks that are mined for is is 1 gram of gold per 1 tonne of rock mined. That's very little.
Comment: Agreed, that most gold is extracted from deposits in which the metallic particles are so small as to be invisible to the naked eye. But I think Terry's question was particularly about visible chunks of gold, from milimetre sized flakes and upwards.


Is there any difference between そこで and それで?

Question: I know that they can both mean "so, therefore, because of that" etc., so what is the difference when I use them with that meaning?
Answer: I wll try to explain this without translating the words themselves as, I feel, wanting to translate should be the major reason that you are experiencing difficulty in understanding these words.

「それで」 is generally used to express a simple "cause and effect" relationship between two events or situations.  "B happens as a (natural) result of A."  It is close to 「ですから」 in meaning.

「ウィスキーを[一本飲]{いっぽんの}んだ。それで[頭]{あたま}が[痛]{いた}い。」 Drinking a whole bottle of whiskey has caused your headache.
「[朝]{あさ}から[大雨]{おおあめ}です。それでピクニックを[中止]{ちゅうし}しました。[残念]{ざんねん}です。」  Heavy rain since morning has caused the cancellation of the picnic.

「そこで」 is used to describe an action that is performed in response to an existing situation. "Measure B is taken to solve/alleviate Situation A."

「[日本語]{にほんご}のテストで40[点]{てん}しか[取]{と}れなかった。そこで[勉強方法]{べんきょうほうほう}を[変]{か}えてみたら、70点取れた。」 You had done poorly on the previous test.  This time, you tried a new method of studying and it worked.
「[社員]{しゃいん}が[増]{ふ}え、オフィスが[狭]{せま}くなった。そこで[今]{いま}より[大]{おお}きいオフィスを[探]{さが}すことにしました。」 The fact that you have more employees now and it is making the office feel too small necessitates searching for a new space to rent.
Finally, there will be cases where the distinction is not as clear as one would like it to be.  My last sentence about office space is an example of that.  In those cases, the speaker/writer would need to decide which one would better express what s/he wanted to express.
Generally speaking, it would look or sound like a bigger mistake to use そこで where それで should be used than to go the other way around.
Answer: そこで feels more like "at that place, therefore"
それで has a sense of continuity, and in spoken Japanese is probably perceived more softly because it lacks the "k" consonant sound.
Very rarely have I heard soko_de used in this meaning, and almost always as "at that place, (something occurred)."
それで Definitely connects two fragments.  A それで B.  It is not precisely "therefore" but more like "and so"
Answer: A Dictionary of Intermediate Japanese Grammar has a section for そこで (page 401), it states:

Sore de and soko de are similar and are interchangeable in many
situations.

Sore de, however, differs from soko de in several ways. First, sore de can connect a cause and a result while soko de cannot.
Second, sore de is used to mean 'that's why.' Soko de cannot replace sore de in this use.
Third, when sore de is used, the situation does not have to be a special one.
Fourth, when sore de is used, the situation does not have to be controllable.

In real life usage, of course these distinction are more blurred.


How many monitors can the 13" retina MacBook Pro output to?

Question: The 15" retina can do three (and itself) via daisychaining two Thunderbolts (or just using the two ports) and with the HDMI port. Is the 13" retina able to do this as well?
Comment: I am running 3 external plus built in on a 15" right now as I type. Here is the article: http://forums.macrumors.com/showthread.php?t=1391042. And a video: And a great video: http://www.youtube.com/watch?v=qJhvyLB_Tbw I don't know about the 13" though.
Comment: Where did you find the link that shows a 15" retina can drive three simultaneous external displays (4 total)? Apple's specs list two external displays as max for the retina line at http://support.apple.com/kb/HT5219#dispnum
Comment: It's possible with the 2015's, see @ http://mkn.us/blog/how-to-use-3-external-monitors-on-macbook-pro-2015/.   Not sure why Apple hasn't recognize this yet.
Comment: Incase the mkn.us link goes away, the basic gist is at least one of your Mini Display Port cables must be "active". The GPU can only drive two external "passive" displays, but it can do a third one if it's got an "active" cable.
Comment: @MKN Are you sure it works with 13" Macbook? That article appears to be about the 15" Macbook with discrete AMD GPU, this question is about the 13" which is only available with integrated Intel GPU.
Answer: You can drive 3 including the internal on the 13". However, you cannot run 3 external displays even if not using the internal.
source: I have one and have tested this.
Answer: According to Apple (http://support.apple.com/kb/ht5219):

4 MacBook Pro (Retina, Mid 2012), MacBook Pro (Retina, 13-inch, Late
  2012), and Mac Mini (Late 2012) computers can use an HDMI-compatible
  device on it's HDMI port while using one Thunderbolt display, or they
  can use two Thunderbolt displays.
Comment: This answer is correct for OS X because three external displays is not an Apple approved configuration, but the 13" retina hardware is capable of driving three external displays and it works fine under Linux.
Comment: It actually is possible, see my answer below.  Link copied here - http://mkn.us/blog/how-to-use-3-external-monitors-on-macbook-pro-2015/
Answer: The hardware of the 13" Macbook Pro Retina can drive three external displays simultaneously via 2x DisplayPort and 1x HDMI. The laptop display must be off, since the Intel GPU can only drive three displays simultaneously. There is a big caveat though - this is not an "Apple approved" configuration, and  hence will not work under OS X. It works fine under Linux, and will probably work fine under Windows, but OS X will only allow two external displays to be active simultaneously, even with the laptop display off and the lid closed. This is true regardless of whether the DisplayPort adaptors are active or passive.
Comment: This is my current setup. It works on Windows but only 2 external can be active at a time on el capitan. Its 2016, anyone know if there is a fix around this?
Answer: The new Retina 13 is able to daisychain and drive two thunderbolt cinema displays, as explained in this very nice article:

Since the 13" MacBook Pro uses the same Intel HD Graphics 4000, DSL3510L Thunderbolt controller, and single physical Thunderbolt port as the new MacBook Air, it should be able to push a total of three monitors using daisy-chained Thunderbolt Displays.

source: Ars Technica
However, it's not clear if they can at the same time drive an extra display though the HDMI port (for a total of four including the laptop's display) like the 15 inches model can do. The 15 inches can drive 3 external and the retina display, but it has a very powerful discrete video card.
Considering that there are a lot of pixels in that configuration, I highly doubt that the integrated Intel 4000 can do it. It's a very limited video card with shared memory. But again, we'll need to find someone who can try it :)
Comment: OS X does not support daisy chaining as of Yosemite 10.10.2. It should work on Windows.
Answer: A 13" MacBook Pro Retina late 2013 can power three external displays plus its own screen which would make four total. Here is a video showing the external displays working; 1 HDMI, 1 MiniDisplay Port, and 1 thru a USB3.0 Port using a Startech external video card to DVI adapter. All the external displays are old Apple Cinema Displays hooked up thru each monitor's Apple Display Connector (ADC), then to Apple ADC to DVI adapters, then to the relevant third adapter plugged into the MacBook. The screens are 1920 x 1200, 23 inch screens. The monitors are around 10 years old, the USB to DVI video card/adapter is around $65 Amazon.
http://youtu.be/ys_Glzkh0aE
Answer: Actually it is possible using Active connectors.  I ran into this issue and solved it.  I've written a full article @ http://mkn.us/blog/how-to-use-3-external-monitors-on-macbook-pro-2015/
Comment: Does this apply for 13" Macbook Pros?  Your blog post describes what worked for your 15" Macbook Pro
Comment: @Readonly only works for the 15" w/ the additional GPU; the Intel GPU won't support on both 13" or 15".
Answer: You can run 3 to 4 external monitors (4 or 5 including the main screen). This is done through USB. This video explains everything. No discrete graphics card needed, just stock macbook.
https://youtu.be/w8gE-ckBwjE


How do you discipline someone else's child?

Question: We have friend who is living with us and he has a 5-year old boy. The child has been disrespectful and distructive. He tore a ceiling fan down, and has been breaking stuff and writing on the walls.
 Today, he didn't want to clean up a mess and he said "James (my husband) had made the mess." He even said it to my husband's face and maintained that James was lying (his word). His father does nothing - I do mean nothing about his behaviour. So, how much can we do about discipline?
Comment: " He tore a ceiling fan down"...uh...you don't discipline that kid. You kick him and his parent our of your house.
Comment: UNLESS the parent has a good reason for not being able to take care of the kid. But in that case you need to treat the child as your own, as you are then the effective caregiver.
Comment: how long are the two already living in your household and how long will they stay?
Comment: Agree with the first comment, guests like that don't stay long nor are they ever invited to return.
Answer: You don't. Your issue is with the parent, not the child. If the parent is not willing to step in and do their job, then why would you put up with either of them? Unfortunately, disciplining an adult is rather more difficult.
Comment: +1 for seeing the child as merely the *symptom* while the actual *problem* seems to be the adult. Good luck Cheryl!
Comment: @BBM - Possibly, but a nanny has been given authority by the child's parents to care for and discipline that child. I would avoid overstepping boundaries without explicit authorisation from the parents otherwise you can get in weird situations. Even asking of that authorisation may be considered a slap in the face for the parents. We lost a long term friend last year when she decided to interject herself into a school yard disagreement between my 9yo and her friend. Dealing with others' offspring is fraught with danger.
Comment: Sure, the lack of discipline of the child is quite probably caused by his father's lack of "authority". However, a friend of ours is a day nanny and I see, how children behave differently in the presence of different people (In many situations she seems to have more "authority" than the parents.). So I think that the direct intervention of Cheryl and James could also help to make the child behave better in their house. Thus, IMHO, as important as it is to pull the dad on their side first, they can and also should speak to the child directly (as Lauren proposes in her answer).
Comment: @dave: I agree with you that this is a very difficult issue which can break friendships etc. I did not want to say, that one should try to parent kids of others on its own account! I thought to have read between the lines of your answer that the one and only way should be to make the dad "do his job" rather than talking to the child (or acting) directly and wanted to emphasize that the intervention of others might help the helpless (or maybe just ignorant or resigned) dad.
Answer: There are two problems here: the adult who doesn't discipline, and the child who needs discipline.
You must react to both.

Discuss with the adult alone (after the kid's bedtime) about disciplining the child.  Provide some reference material if you think it would help (perhaps the dad doesn't know how??).  Otherwise, state: "We need to get on the same page re: Little Johnny's behavior.  I recommend that we all agree on house rules and then figure out our approach to discipline."
The child: ALL adults should be present.  As a UNITED front, they should present the house rules; I would recommend you do this, as it is your house.  "Johnny, we're so glad you are able to stay with us, and we want everyone to always feel welcome in our home.  However, we have some rules that everyone must follow.  I don't think we have told you them.  Let's do this now."  Also have the rules printed and posted (on the fridge).  This helps cement the consistency and minimize on-the-fly rule making-up.

Secondly, be consistent in discipline.  We follow a "3 strikes, you're out" approach.
1st strike= warning with explanation if needed.
2nd strike= timeout (one minute per years of age; 5yo= 5 minute time out)
3rd strike= loss of toy/ loss of activity/ loss of privilege (no computer, no movie, no dessert- but to be effective, the treat must be pretty soon)
Thirdly, set up a reward system.  Be very spefic in praising the behaviors you want ("Johnny, I noticed how you sat all through dinner! That takes a lot of focus.  Excellent!"). Couple short term praise with long term goals (ex: earn a sticker for specific behavior X, Y, Z, then trade in 20 stickers for a trip to the ice cream store).  At the beginning you need to train the child to look towards positive reinforcement and away from negative reinforcement (at this point, attention is attention).  So reward/ praise frequently.  Give verbal praise every 5-10 minutes and a sticker each hour.
Good luck!
Comment: +1 for addressing the parent AND the child. It surely is important to have or get the parent on your side, but IMHO if the child is misbehaving in Cheryl's house, she and her husband can also directly explain their rules to the child (while the child's dad is present, if he supports them - if he is not able or willing, to support them, it will be difficult.)
Comment: Rewarding expected behavior is counterproductive.  "You didn't punch a hole in the wall, little Jonny?  Have a cookie!"
Comment: I love the general idea here, but I don't think the father has to agree to your rules.  "We need to get on the same page re: Little Johnny's behavior. I recommend that we all agree on house rules and then figure out our approach to discipline."  If he doesn't like your rules or how you start interacting with the son in your own home he can choose to leave and take his son with him.  I also disagree that the punishment/reward system is likely to work.  Natural consequences - like now he has to work to pay you back for the ceiling fan makes a lot more sense.
Answer: I do the same with other kids as I would mine.  If they make a mess they clean it up.  If they write on something they shouldn't then the crayons, markers, etc get taken away and put up high.  If they use disrespectful language I don't acknowledge that they are talking to me.  I may just say something a couple minutes later about how I am a worthy person due respect and acknowledge those that use respect with me.  You have to have standards in your home for everyone.
Comment: Yes, you need to command your own respect.
Answer: Obviously the child knows he can be destructive and disrespectful and his father won't do anything about it.  From your question, it sounds like he may know you won't do anything about it either.  I think you need to be the adult and affirm you and your husband's roles as the owners of your residence.
There is no reason you should not be able to take a firm voice with the child.  You don't need to yell or scream, just assert your control over the situation.
If that doesn't work, do not be afraid to institute a timeout (we like having our son stand in the corner).  You have every right to create a calm, safe environment in your home.
I can't go so far to recommend physical punishment for someone else's child.  Not that I'm against it, but unfortunately there are those that believe authorities should get involved with spanking.
As far as how to deal with the father, I think you need to take the same attitude as with the child and assert your control in your home.
Answer: If his father is going to be a father, and you can't kick them out, then the child is going to have to learn to live by your rules.
If the father doesn't accept that, then the father can choose to leave. Treat the child with the SAME LOVE AND DISCIPLINE as you would treat your own. If you lack the love for the child, then you shouldn't be disciplining him, but if you care for the well-being of your house, home and his life, then you need to discipline him at whatever level he dishes out.
Answer: Well, the problem here is the parent, and not the child; the childs behaviour is because of the parents attitude towards discipline.
We have one particular friend, who's kids are, let's keep it neat by just saying 'unruly'.  I have made it very clear, that we only look after the children, if we can treat them as our own i.e. we discipline them as we do our own.  This seems to work, the kids operate by our rules when in our house, or under our supervision.
I do warn you, however, that there is an 'adjustment' period where things are all a bit tense, but this does work, and work well.
As for talking to the parent.  One thing I have learned, and learn more and more each passing day, is that as parents, we all have different ways that we bring our kids up, and I have long avoided saying our way is better, for it may not be; our way is best for us, and someone else's may not be for us, as much as our way for others; with obvious exceptions, there is no right or wrong, only our way and other ways.
This also works  both ways; I detest violence, and no child of mine wil be physically punished.  I make it clear to whoever looks after my kids that this rule is inviolate.  They may punish them and make sure they behave, but never physically.
Comment: -1 particularly for the point, that there is no general right and wrong.
Comment: +1 particularly for the point, that there is no general right and wrong.
Comment: I am bit shocked there @j.rightly, are you stating that generally there is a right and wrong way?  if so, please, I am all ears...
Comment: I believe the quote, also, was:  with obvious exceptions, there is no right or wrong [in parenting].  For me, different ways work for different kids, and for different families; I'd never be that arrogant I believed I knew the right and wrong way to bring upa  parent, as I don't believe there actualy is; if there's a perfect set of parents, who've ever walked the face of this earth, I'd lovve to see who they were.  Utter madness.
Comment: @Hairy, there may not be one "right way" to parent but there are definitely a few wrong ways.  Ignoring the child and never doing anything to address the situation would not be called parenting at all - it is neglect.  It may not be physical neglect warranting of the state becoming involved, but it is neglect none-the-less.  I'm not down voting over it - the gist of the message is agreeable, but I wouldn't say j.rightly is crazy either.
Answer: Best story I heard in this regard was of a guest visiting his adult friend at the friend's home. Friend's children were all over the place misbehaving etc. Friend just let it go on. Guest made it clear to the children that he would not let it go on, first with verbal warning, secondly by moving to the edge of his seat. In short, he was clear and credible that he would follow through. And it wasn't even his own house. Surely you can do similar in your own home.


Transfer bitcoins from an address to another

Question: I want to transfer the bitcoins I have from one address to another one, however I can't acces the account but I only know the address. I made this once but I forgot how, it was some sort of program which I selected from what address I wanted to transfer the bitcoins and it was done easily. I tried some programs now and I can't do that anymore. It was something like "add bitcoins" and I just typed the address from which I had bitcoins on and the bitcoins transfered automatically.
Answer: It sounds like you used a Bitcoin wallet to move money before. You need to know more about the account than just the address, in order to move the money out of that address. With the address, you can look at how much money the address has, and add more money to it, but you can't take money out.
If you had the private key, which should be kept by the Bitcoin wallet, or written down somewhere, you could spend this. A private key looks like 5SD8ak... .
Unfortunately, I don't know which program you used, so I can't tell you anything more specific. I can point you to this list of Bitcoin wallets. Maybe you used one from there.


Sharepoint 2010 site stopped working. Database "needs upgrading". Upgrade fails

Question: One of my Sharepoint 2010 Site Collections has stopped functioning this morning and presents the following in the browser.

Server error: http://go.microsoft.com/fwlink?LinkID=177673

When I look at the "Manage Databases Upgrade Status" for the content database in Central Administration, it tells me

Database is too old and upgrade is required

Other content databases are fine and the other site collections work.
After Googling, several sites have suggested to run:
<code>psconfig -cmd upgrade -inplace b2b -wait -force
</code>
But this also fails on task 2 of 4 saying

An exception of type Microsoft.Sharepoint.Administration.SPUpdatedConcurrencyException was thrown. Additional exception information: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20130307-113655-410 was updated by MYDOMAIN\Administrator, in the PSCONFIG (7228) process, on machine MYSERVER.

I am running out of options, short of doing a restore from backup which isn't the preferred solution as this is our company intranet.
Answer: Try doing the follwing and then re-running the upgrade command above:

stsadm -o setproperty -pn command-line-upgrade-running -pv No
IISReset
Restart the Windows SharePoint Timer

Sharepoint 2010 site stopped working. Database “needs upgrading”. Upgrade fails


Why is this question getting no notice?

Question: I wrote this question a few days ago. I spent a lot of time being very detailed and writing down everything that might be needed to solve my problem. In the first 5 minutes, it got 4 views, and since then it has only got a total of 18 views (as I am writing this). Aside from views, which may or may not be totally accurate, it has no votes, no flags, no comments or answers, no anything! By posting this question on Meta I am not trying to get people to view my post, I am just genuinely curious about why this question got inactive so quickly, something you don't see often on a Stack Exchange post.
Comment: There are generally certain times of day where the site doesn't experience as much traffic, so don't try to judge interest by the first few hours.  The question is generally pretty good.  One thing I noticed, though, is that the title doesn't really explain the problems, and people needed to read through a long section of detail and commentary to get to the actual question.  Some readers may lose interest without a framework or context of why and how everything is relevant; what problem does it all deal with.  (cont'd)
Comment: That detail is also what shows up on the main page, which could fail to attract readers.  I moved the questions section to the beginning so that people see the key info on the main page, and have context for reading the detail.  That may help a little.
Answer: One problem might be a lack of Mac users on Super User. While Macs are perfectly on topic here many fans of Apple devices may have migrated over to Ask Different and not check our site often. As a result your question may not get as many views as it would require knowledge of the vagaries of Mac hardware compared to PC hardware.
That said you should not cross-post questions, you can request it to be migrated or you can delete it yourself and repost there.
Comment: Thank you. This is probably the case. How can I request it to be migrated?
Comment: As it is not in the standard list of migration targets you can raise a flag on your question and give a custom reason asking for it to be migrated.

Why is this question getting no notice?


Baked normal maps getting altered on save

Question: When baking normal maps in Cycles, the map comes out correct if baked "selected to active", otherwise it comes out too bright and blown-out.
The real problem begins when I try to save the map to PNG, after which even the correct normal map gets brightened and blown-out. The Color Space in the image texture panel also gets changed automatically to sRGB regardless of how I had it set before saving.
This brightened, incorrect normal map CAN be used in blender by setting the color space of the image texture node to "Color" as opposed to the usual "Non-Color Data" associated with normal maps, but it is practically useless for any other application. It certainly does not work in Unity for example.
Has anyone else seen this happen and how would I go about fixing it?
Answer: The problem was solved by checking the "Save as render" option on the Save Image page.


On the hunt for a new pair of ears

Question: Hey. I'm looking  for a new pair of lightweight and compact (ideally closed back) headphones for field recording as my DT100s are a little bulky and I'm not happy with the quality with any other pair I have. Does anyone have a recommendation?
Comment: Dear James, there are many headphone questions in the site, and most of the answers have very good suggestions for different budgets.

I recommend you to quick search those. May be some would answer your question directly.
Answer: The Sony MDR-7506 headphones could be considered something of a de facto standard. You see them show up all the time on film sets, at live sound mixing consoles, used by ENG news teams, in recording studios for monitoring, etc.
I haven't tried all of the headphones out there, but if you run across a pair of headphones on a gig, there's a reasonable chance it will be these.
You wouldn't want to listen to them all day long, but they can really shine a microscope on things in your mix that your monitors may overlook.
Answer: I'm a fan of the Sennheiser HD280 headphones. Good isolation and they are comfortable. They fold up for easy transportation too. I've seen these guys used during multiple applications.
Comment: Got myself a pair of HD380's. Couldn't be happier.
Comment: Cheers - that looks pretty much what I'm after. I don't drive so like to keep my kit as compact as possible for walking around.
Answer: I'm very fond of the DT 250! I may be mistaken as I havn't actually tried out the DT 100 myself, but I've got the impression 250, though still covering the ears perfectly and isolating from the outside world very well, is a lot smaller than 100?
I can't imagine myself going to work without my DT 250 :-)
No matter what I'd say that's as compact as it get as long as you want truly professional headphones. If it doesn't cover the ears completely you'll probably have a lot of muffled direct sound disturbing the monitoring.
Answer: Everyone I know seems to rave about Sennheiser HD-25s, never tried them myself, but I've heard great things about them. They have on-the-ear cups rather than over/in ear, so they can become uncomfortable after long periods of use though.
My personal preference are Beyerdynamic DT770s. They have over-the-ear cups, are super comfortable and sound really good (good low end reproduction). However, I often find that voices are really sibilant on them, but I still love them to bits.
Hope this helps,
Cheers.
Answer: Wow, everybody is loving their Senny's huh? I used a pair of 280 Pro's for a while, then upgraded to 25's. I liked them ok, much better and more comfortable than the 280's. Still found myself getting a lot of the old sweaty ear rather quickly, and I didn't care much for the way they fit - which could be down to my sorta small head. Not sure, but in general I just found myself wanting to take them off way too often.
I just sold those and grabbed a pair of AIAIAI TMA-1's. Really loving these things. Super duper comfortable, two kinds of swappable ear pads, great sound, not to mention they look pretty darn cool. I can sense some coloration, and are probably best suited for DJ use, but it's not obtrusive and doesn't hide anything that I've noticed so far. Perhaps they present a bit on the bassy side. My main thing in the field is comfort and having something that kills a decent amount of ambient noise while not weighing down my head. I had them on for a good 6 hours straight last week and didn't get sweaty or uncomfortable once. Like these cans a lot.
http://www.aiaiai.dk/all-products/tma-1.html

On the hunt for a new pair of ears


Couldn't something be done to stimulate voting at the English Language Learners site?

Question: English language learners seem reluctant to cast a vote even after receiving a thorough, time-consuming answer. This is rather discouraging for teachers or English speakers who wish to contribute. Unlike other sites (e.g. Spanish language), where the tendency is to receive several answers as well as votes and there is a much higher predisposition for exchanges between questioners and answerers, English language learners ask lots of questions and only receive a few answers, most probably from people who don't care about wasting their time or are not aware about questioners' laziness to at least cast a vote or say "thank you."
Comment: When I ask a question on ELL, as a learner, it implies that I don't know the answer. Now, in some ideal cases, it might be possible for me to decide whether an answer is correct or not (one virtue of a useful answer, in my humble opinion, is that it's correct), If that's the case, I wouldn't be hesitate to cast my vote. However, in many other cases, I wouldn't know whether it's correct or not, and I sometimes regret casting my vote when I find out later that I've up-voted the wrong answer. Last but not least, I don't think we should encourage our learners to cast votes to mean thank you.
Comment: RE: Suggesting that a newer user upvote an accepted answer: Sure, you can suggest that, but I think it seems more altruistic when you do that for an answer other than your own. Maybe it's just me, but I've never liked seeing the _"You can upvote my answer if it was helpful"_ comment under someone's own answer. It comes off as rep-grubbing.
Comment: Having said that, I agree that we need people voting good answers more often. I always wish to see teachers, rather than learners, vote answers by others more often than we do. Then again, I understand that we're all have only limited amount of time to contribute to the site.
Comment: Of course a lot of things can be done to increase the amount of votes on ELL. What's important is whether any changes would actually improve the current situation, or you would end up with a lot of bad answers being upvoted.
Comment: Good quality questions attract more interest and therefore are more likely to have their answers voted on. If you find an interesting question, you may want to make sure that the tags and title reflect its content, and that the body is formatted and touched up so it's easy to understand what is being asked.
Comment: I get your point. However, it is unfair on those of us who invest time in producing the best possible answer to no avail. Would a thank-you note as a comment be asking for too much? We'll see how this develops. I might not feel like answering any more questions, except those of participants I regard at least grateful (not necessarily upvoting).
Comment: I suggested to a-new-to-the-site OP who accepted an answer, that s/he upvote the answer as well. I think we need to teach as we go along. As long as we are polite, we can teach how 'we' want things done. I know I appreciate help. I need it and like it when someone suggests a better way -- or even the way the site members prefer.
Comment: That's interesting, suggesting upvoting accepted answers.
Answer: I disagree with quite a few of your sentiments.
Here's what I've learned after about 5 years on the Stack Exchange, mostly in language forums:
1) Don't expect there to be a proportional relationship between the work you put into an answer and the number of upvotes it gets.  More often than not, some of the more highly-upvoted answers are a result of a question getting a lot of views. (A question might make the "Hot Question List" and subsequently get a lot of traffic, and many of those viewers will see an answer that pretty much mirrors what they would have written had they seen the question earlier. Click. Upvote. Meanwhile, the question you spent 45 minutes answering is collecting proverbial dust. Oh, well, all's not fair in love, war, and the Stack Exchange.)
2) Don't let Lesson #1 dissuade you from writing a good answer. The opportunity to help learners around the globe should be rewarding enough in and of itself.
3) Many good answers WILL attract upvotes – although maybe not as quickly as you might have hoped. I just took a screenshot of some upvotes I've had in the past week; most of these questions were asked over a month ago, and some of them were asked more than a year ago! Yet people still find these questions, and upvote answers.

4) Not everyone is as addicted to the Stack Exchange as you are. Sometimes I'll spend a lot of time writing something I think was a pretty good answer, and then hear nothing. But a couple weeks later, my answer gets accepted! (Or maybe another answer will get accepted, right around the time when I get an upvote.) Accept that some people might ask a question and then wait a few weeks to look at the answers.
5) Comments that say "Thank you!" are generally discouraged on the Stack Exchange. Not everyone agrees with this cultural phenomenon, but enough do that it's a widespread and prevalent sentiment. (See the relevant discussions here and here, e.g.). You may feel underappreciated when you don't get such comments, but it might help you to realize that some users might be refraining from leaving a comment deliberately and as a matter of politeness, wanting to adhere to SE customs.
Personally, I don't see a need to exhort users to upvote more. As was said in a comment here, I'm afraid that such encouragement might result in more mediocre answers getting upvoted, and, generally speaking, I'm more disappointed with a bad answer that gets upvoted than I am with a great answer that's not being upvoted – even when that answer is my own.
Comment: Thank you for being so frank and for taking the time to share your experience with me. I'm quite new here and was surprised not to see at least one vote after writing a full page about different past tenses, as well as after writing other shorter answers. My expectations about getting at least some sign of gratitude or recognition were perhaps fed by what I've experienced at the Spanish Language site, where you always get, if not an upvote, at least a comment. However, as the saying goes, all sorts make the world, right?
Comment: I've found that many longer answers never got too many upvotes, perhaps because the rank-and-file didn't want to read through such a long answer before voting. But I'm not going to go into less depth just to try and game the system and get more upvotes. Some questions need a lengthy explanation, whether there are upvotes at the end or not, and I'll step up to the plate if I feel like I can write a very helpful answer.
Comment: The answer I'm particularly referrring to was in reply to a question asking about the use of different past tense forms in around ten sets of sentences, which being different from one another required a long collection of short explanations. However, after reading what J.R. wrote above, I'm still hopeful they will be of use, if not to the questioner, to somebody else.
Answer: It is unclear if you are criticising questioners or answerers, or both.
Very few on-topic questions are left unanswered in ELL. If some questions receive only one answer, it may be because they are rather basic and one (obviously correct) answer is sufficient to meet a questioner's needs. Also, a lot of questions are answered with comments, and if they are basic, no one may feel that it is worthwhile providing a formal answer.
If questions are not up-voted, it may be because they are very basic. I must admit that I do not up-vote basic questions. Perhaps I should if they are well-presented. Of course, if I suspect that they are homework questions (which are not explicitly off-topic), perhaps I shouldn't.
Answers to basic questions may also not receive any up-votes. However, I find that a well-worded and properly referenced answer generally receives one or two upvotes.
As for questioners not accepting answers, there may be several reasons for this:

The first (and fairly obvious) reason is that they may be pushed for time, and if they have asked the same question on another site, they may not return here if they have already got an answer elsewhere. Bad manners, I know, but what would you do if you were in a desperate rush to complete an essay?
Another reason is that users may (mistakenly) think that the accept button is to be used only for selecting the best answer when there is more than one, and if there is only one answer, then this action is not appropriate.
Finally, SE generally recommends that you do not accept answers straight away, but rather leave it for at least a day. More savvy users may know this and simply forget to come back.

I don't think that the regular answerers mind too much if their answers are not accepted. If they did, they would quit the site. The one behaviour that is irksome, at least to me, is when questioners delete their questions once they have got what they want, but that doesn't happen too often.
Finally, if questioners do not thank answerers for their work, remember that this is SE policy, and thank-you messages are generally considered to be "noise".
Comment: I was actually criticizing questioners who sometimes don't seem to appreciate one's hard work, but we can't expect others to always act as we would or as we wish they would, can we? I guess this question and the comments and answers I received helped me vent a little bit. Thanks.


How to convert an HTML tree to PDF?

Question: How to convert an HTML tree (actually this one) to PDF?
Answer: Using wget (use -r for download recursive) and htmldoc for convert html tree to pdf.
apt-get install htmldoc

Answer: If I understand your question correctly, you wish to convert HTML pages on your site to a single PDF file.
I guess the total HTML files are around 20. So rather than use a tool, you can manually open the pages in Chrome, choose the Print option & "Save as PDF". If you want to merge them into a single PDF, you can use one of the many free online or desktop PDF merging tools.
Comment: I thought of going over page after page and then using PDFtk, but this sparked the more general question. Thanks.
Answer: Acrobat Professional does the job. Haven´t found anything really freeware, that can do this.
Answer: The most accurate and quick HTML->PDF converter I found is http://pdfcrowd.com/
You need to pay to a license, but it is pretty cheap. As for following the links in the PDF, you could build a simple script that would query their API.
Answer: 1.Select a conversion site, which can be found with a basic web search. Criteria for selecting a site include cost (many are free; some you must pay for), speed (some sites are faster than others), reliability (some sites are often overwhelmed with requests) and whether or not the conversion places an ad on your PDF pages.
2.Enter the website address or HTML file (if you have access to it on your computer) into the converter.
3.Convert the file to PDF.
4.Save the PDF file to your computer and check it for errors.
Answer: For a generic solution of converting a html tree to pdf, see this SU answer:

I use wget to recursively download websites (normally online html
  manuals) then once I have the html all in a folder I convert to the
  format of my choice using Calibre.

How to convert an HTML tree to PDF?


Is there a need to define "language safety"?

Question: Language safety is not clearly defined while there're warnings about for instance Java. So how can you say that language is not safe while language safety is not clearly defined? If Java is unsafe now, is Java version 7 "safer" than Java version 2?
Comment: I don't know that what you're referencing is actually language safety. In the Java example, the rash of recent vulnerabilities are not intrinsic to, or an indictment of the Java language, but flaws in the Java Runtime Environment.
Comment: This question is a bit of a rant, and seems to treat "safe" as if it were a binary (it's either safe or unsafe).  In practice, safety is a matter of shades of grey: some systems may be riskier than others, and no computer system is ever completely safe.
Comment: Ok so what we mean is Java as an environment rather than a language. I can accept and understand that.
Comment: @D.W. Yes, I expect to be asked the binary black and white yes-or-no question `Is it safe?` Answer only yes or only no. I've added what are the "shades" of safety between version 2 and version 7.
Answer: A language can be said to be "safe" if it is possible to implement its interpreter/compiler/runtime environment efficiently, in full respect of the language specification, and still forcibly preventing "bad things" to happen. Then it depends on what "bad things" you are talking about.
Java is "safe" if you want to protect the machine from the code written by the developer. Array bounds are checked, types are unescapable, and memory deallocation is handled by a garbage collector, which means that it is not theoretically feasible to make a Java applet, however poorly written, execute attacker-chosen native code. In the same conditions, C is "unsafe" because it cannot be fully implemented with checks which prevent arbitrary code execution.
Of course, in practice, things change a bit: C code can be made "safer" with various techniques (like DEP and ASLR) and the OS can "contain" native code under some specific access rights (a "normal user" process is not root). And Java actuality shows us that while Java is theoretically safe, the implementation of the Java Virtual Machine and its runtime environment can have holes. To some extent, the exact JVM specification ensures that implementing Java safely is hard (that's a misfeature of the Applet model: it forces per-method control throughout the whole standard library).
You cannot have a one-size-fits-all definition of language safety, unless you are content with a subjective slogan (COBOL sucks ! F# rules ! Prolog forever !). It all depends on the context.
Answer: There may be some confusion here. A programming language does not inherently include vulnerabilities. It is the programs written in those languages that do.
Higher level languages (like Perl, Java, JavaScript, C#, but not C or C++) help simplify your programming code, and will allow you to write your code such that a buffer overflow is not possible which is better for security, but the security difference between high level languages is very small.
In the case of Java, there is a sandbox which has not proven to be entirely effective. This sandbox was intended to allow a program to be written in Java, and then to run in the browser, without having access to the computer it was running on. It is the Java sandbox that has had security problems, not Java itself. I cannot speak to the comparison between Java 7 and Java 2.
Comment: The java sandbox is a construct of the jvm and has nothing to do with a browser other than that browser utilizing a jvm. Also, the majority of the problems that have been uncovered with java have very little to the with the 'sandboxing mechinism' but have exposed inconsistent and/incompatible implementations of the security manager.
Comment: @grauwulf: Isn't the security manager supposed to control what the sandboxed software is allowed to do? If the security manager is broken, the sandbox won't work as expected either.
Comment: Fair enough @jarnbjo but they are two distinct aspects of the VM and each has a discrete utility. Hence; comment and not dv :-P
Answer: Languages are classified as safe and unsafe based upon a few properties. A safe language as you say include at least the following properties:

Type safety: All the variables are of a particular type (int, float,
string etc) and have clearly defined minimum and maximum length
values.
Bound Checking: Array bounds are checked before performing array
operations. This means no operation is allowed to access an array
object beyond the minimum array location (which is zero) and maximum
array location
Automatic Memory Management: Memory management such as
allocation/deallowcation is performed automatically by the runtime.
This is also called garbage collection. When a block of code is out
of scope, all the variables are automatically freed.
Sandbox Environment: The programs are run in a restricted
environment and can't interact with the OS and/or file system
directly.

Java language has all these properties and hence can be easily classified as a "safe" language. The insecurity you mentioned is not because of the language itself but due to insecure sandbox environment and insecure library calls. Take apart any recent Java exploit code and all it does is bypassing security restrictions to call privileged class code. It has nothing to do with the insecurity of the language itself but with the complex and insecure design of the java libraries.
Answer: Language safety can be interpreted more broadly than affecting merely security. But as this is a security site, let's just restrictive ourselves to security.
Clearly language selection has a significant on whether you will get certain types of vulnerability. Write a non-trivial program in C and it will be full of memory corruption errors (buffer overflow, use-after-free, etc).
There a couple of useful definitions:
Memory-safe - This means a program within the language cannot access memory outside of allocations. No running beyond a buffer or using a allocation after it has been freed. That's tricky to automatically prove for a language like C. Memory-safety is typically achieved through garbage collection and using the more restrictive type-safety.
Type-safe - Don't confuse this with just not messing up your types in unsafe languages. This is a guarantee which goes beyond memory-safety in that you cannot use a type in a way inappropriate to the actual type of the object. You can't treat a pointer as an integer, for example.
Interestingly, from 1.5 Java is not vanilla type-safe. It is type-safe with respect to raw types, as used by the JVM and Java language 1.4 and earlier. It is unsafe with respect the full language type system including generics. This doesn't seem to matter at all, largely because in order to access an object the bytecode must perform a raw type check.
For non-memory corruption vulnerabilities libraries become more important. For instance, injection is an incredibly popular class of vulnerability, but there's not really any excuse in having any at all.
Mobile code (that is code that is mobile and untrusted) is an altogether different thing. Safety can be achieved via a sandbox (as Google's NaCl), an Object-Capability Model (jargon essentially meaning OOP in a type-safe environment) or some combination of the other two.
As for Java SE 1.7 vs 1.2. There hasn't been much change. 1.2 is very different to 1.1, and 1.0 was a bit different again (although really before I was paying attention to these sorts of things).
Specific issues in the Java language which do cause vulnerabilities:

static (for fields, when not immutable) is a one keyword way of introducing vulnerabilities and wrecking code quality.
Incredibly poor support for (immutable) value types.
Methods in Object and Java Serialisation (I'm including as part of the language due to transient keyword and an implementation that isn't even possible in bytecode) are dodgy.
Allowing fields to be seen uninitialised (though zerod) which may be given an unsafe interpretation.
All integer types overflow. Although as Java is memory safe this rarely matters. It does matter for validating arguments to native/intrinsic code or resource management.