If someone grows up bilingually, with what accent will they speak a third language they learn as an adult?

Question: If someone grows up bilingually (say, a Mexican-American who's a native speaker of both English and Spanish), and they learn a third language (say, Mandarin), what accent will they speak it with? (Or maybe it varies depending on the speaker.)
Comment: The truth is that everybody is different and learns their language(s) in their own way(s), with the result that it's really quite difficult to predict how well or quickly any individual will master the sound system of a new language, if they ever do. Many people don't, and many others do it almost instantaneously, without really noticing how different it is.
Answer: As the other poster indicated, accent is the application of native phonology to another language. However, if someone grows up speaking two languages, they will necessarily have less of an accent than someone who speaks just one language. Two languages necessarily have a larger phoneme inventory than just one, which means the speaker has more native phonemes to choose from.
The perfect example is from Portuguese. In my experience, monolingual Spanish speakers have a really hard time pronouncing European Portuguese sounds, particularly the reduced vowels and opened variations of E and O, and English speakers meanwhile have trouble pronouncing the rolled R and reduced consonants such as the approximates of B, V and D. But students who grew up speaking Spanish and English do wonderfully learning the Lisbon variant of Portuguese.
In the case of Mandarin, from what I've heard the Chinese usually classify foreigners differently. Since that language is so unrelated to Spanish and English, typically they just say someone had a Western accent, of which it is usually not easy to determine the origin.
Comment: In my own experience dabbling in German or French after having grown up speaking Uzbek, I had a lot of trouble with the /ʁ/ phoneme at first, but not because I was unfamiliar with it. Uzbek has that sound, but doesn't consider it a rhotic. To me, the /ʁ/ sounded like a type of g rather than an r.
Answer: Having an accent while speaking a foreign language is just applying the phonetics of the native language to the new one.
Having said that, I would assume that in a situation when a bilingual speaker is equally fluent in both his native languages, the phonetic system which is going to be applied depends on the language he uses more often.
But that is just my personal guess, feel free to criticise it with some references.


How does one explain to a non-Jew why we wash our hands 3 times after using the bathroom?

Question: How would you explain to a non-Jew why we wash our hands 3 times after using the bathroom ?
Comment: I don't think there is a halachic requirement that one must wash his hands (by using a cup, that is) after each rest room use. Perhaps, I'm inferring a requirement in your question rather than "some do this".
Comment: It largely depends on his intellectual and religious level, his understanding of the very idea of religious observance and tradition. Another point is his intentions to know, as we see examples in Gemmorah where the Sages answered seriously sometimes and sometimes scolded him.
Answer: I can't quite argue with @DoubleAA's comment about how to explain this to a Jew, let alone a Gentile. This article is a thorough discussion on the issue. You will see that - 1) It is debatable if one needs to wash at all. (Most would agree that one should, of course, for sanitary reasons, if not halachic ones.) 2 - If one does wash, does he need to use a cup?
I encourage you to read the full article, so that first, you can understand it, yourself. (Even after reading it, I have some trouble :) Only, then would I attempt to explain it to a Gentile. (There's little worse than trying to explain a halachic matter that you don't understand yourself to a Gentile. It would make you look foolish!) I'm excerpting what I think is the most relevant parts:

All the sources that mention a non-Beit Hamikdash-related washing
  after the bathroom are post-Talmudic.[4] These sources include the
  Tashbetz, Kolbo and Mordechai, all of whom are cited by the Beit Yosef
  (OC 4). Other than cleanliness, there are two reasons discussed for
  the washing. Similar to washing before davening (OC 92:4), some view
  it as a preparation for reciting the berachah Asher Yatzar after using
  the bathroom (see Tur OC 165 and commentaries). Additionally,
  according to the Mishnah Berurah (4:40; 227:11) and others, merely
  entering a beit hakisei (an old-fashioned as opposed to a modern
  bathroom) imposes a ruach ra, which must be removed by washing.[5]
  However, the mishnah regarding the Temple referred to above presumably
  refers to a Kohen who took care of his needs in a bathroom[6] and yet
  the Talmud makes no mention of a ruach ra. Furthermore, many
  authorities argue that a modern, clean, multi-purpose bathroom does
  not convey a ruach ra even if an old-fashioned bathroom does.[7]
The Aruch Hashulchan (OC 7:3) summarizes these sources as follows: If,
  while using the facilities, one did not touch anything dirty or any
  part of his body that is normally covered, there is no requirement to
  wash at all. Nonetheless, the custom is to wash, either because of
  cleanliness or because it is proper in order to say Asher Yatzar. He
  observes that some have the custom to wash thrice, but the Beit Yosef
  does not rule that way. The Aruch Hashulchan makes no mention of a
  keli or ruach ra.
According to those who hold that the washing is for cleanliness or in
  preparation for Asher Yatzar, there are few ritual requirements.
  Similar to the washing prior to davening, such a washing requires
  neither a keli nor three washings. According to the Mishnah Berurah
  (4:38), which holds that the washing is due to a ruach ra, the washing
  still has fewer rules than other ritual washings—such as for bread—and
  does not require a keli (Mishnah Berurah 165:2). The washing after
  using the bathroom is more akin to a washing for hygienic reasons,
  such as is required after removing one's shoes or cutting one's hair
  (Shulchan Aruch OC 4:18). Because the ruach ra of a bathroom is less
  potent than that which exists upon awakening (Sha'arei Teshuvah 4:12),
  only one washing is required for the former, while three are required
  for the latter (Magen Avraham 7:1).[8]

Of course, when explaining to a Gentile, use the "KISS" method. Don't try reciting multiple shitot.
Answer: It is forbidden to teach a gentile this, for it is part of Torah and one may not teach a gentile Torah.
The reasons for the mitzvos, minhagim etc. are all part of Torah, whether it is a mitzvah of the Torah, D'rabanan, (Rabbinical) or just a minhag yisrael. Minhag is also Torah.
So in answer to your question "How does one explain to a non-Jew...?" The answer is>> One doesn't!
Comment: You do not provide any sources for your assertion. And your assertion implies that there could never be a situation in which teaching Torah to non-Jews would be allowed, which is clearly not true,  see e.g. Bava Kamma 38a.
Comment: @alex it would also be prohibited to explain why you leave work early on Friday in the winter
Comment: @RibbisRabbiAndMore "@doubleAA not very likely. Something tells me that the answer I gave is EXACTLY the type of answer you are fond of commenting on all sorts of questions." If this had been posted as a comment it not be as objectionable.
Comment: @DoubleAA If the boss wants an explanation in order to allow him to leave early,  it is permitted, since it is not for the teaching of the non-Jew, but for allowing the Jew to leave in time.
Comment: So what if you need to explain to your boss why you need to wash three times after the bathroom in order to have bathroom rights?
Comment: @doubleAA not very likely. Something tells me that the answer I gave is EXACTLY the type of answer you are fond of commenting on all sorts of questions.


The axes when I move/rotate/scale is different from those of the world

Question:
I must've touched something wrong so my axes are acting weird. It seems like the axes are heading towards where the object is facing. How do I make them the same with the world axes?
Answer:
You can choose whatever transform orientation you want to use instead of Local. if you are constraining transforms to some axis with shortcuts x, y, z or middle mouse button, you can just hit it again with Local orientation set to temporarily use global orientation anyway:

This works the other way around if you have global orientation selected as well.
Comment: Thanks. I never knew you can do that. Previously in 2.79b, I used to press G + X if I want to move objects in x axle, R + Y if to rotate in y axle, S + Z to scale in z axle. I suppose shortcuts are the unchanged in 2.8x,


compute the probability that at least 2 have the same birthday?

Question: In a party of 5 persons compute the probability that at least 2 have the same birthday(month/day),assume a 365-day year.
Comment: want to find the probability that at least 2 have the same birthday?
Comment: Find the probability that none of them have same birthday and subtract it from 1
Answer:
Calculate the probability that each birthday is unique:

Choose $5$ unique birthdays: $\displaystyle\binom{365}{5}$
Multiply by the number of permutations for $5$ people: $\displaystyle\binom{365}{5}5!$
Divide by the total number of birthday-combinations for $5$ people: $\displaystyle\frac{\binom{365}{5}5!}{365^5}$

Calculate the probability of the opposite event, where at least $2$ birthdays are not unique:

$\displaystyle1-\displaystyle\frac{\binom{365}{5}5!}{365^5}=2.7$%

Finally, as a little exercise, find the minimum number of people for which the probability that at least $2$ have the same birthday is more than $50$% (and realize that it's less than what you'd expect).


Can I marinate chicken that has already been cooked?

Question: I have some chicken that was grilled. I want to put it back on the grill and cook it some more. I marinated it in a bag. Is it OK to marinate cooked chicken?
Comment: Can you clarify and add more information?  Cook...put back in bag...cook again?  Is the marinade refrigerated during first cook?  Is the chicken chilled after first cook and before second marinade? How long between first cook and second cook?  Is it refrigerated during this time?
Answer: I don't think you will get the same effect by marinating chicken after it's cooked. It will not absorb much of the marinade.


Would radioisotope thermoelectric generators be more effective on Titan than in space?

Question: Since radioisotope thermoelectric generators (RTGs) operate by turning the flow of heat into electricity, and Titan's atmosphere can absorb heat faster through conduction than a vacuum through radiation, would an RTG (or a set of them) produce enough power on the surface of titan, say, for a manned base?
Comment: What is an RTG?  As a casual observer I'd love to know even if I can't provide any help on the topic!
Comment: If you have a set of RTGs, at some mass of them the heat output increases significantly. We call this a "critical mass"....
Comment: Global warming on Titan could be quite a thing.
Answer: RTGs would be far more effective for the reason you describe: the job of a large radiator could be done with a small heat exchanger, and a larger heat exchanger could get the cold side temperature much lower. Taking the MHW-RTG used on the Voyager missions as an example, the cold junction temperature is ~600 K, an RTG designed for Titan could get it much closer to 100 K.
However, the MHW-RTG already has a Carnot efficiency of (1273-573)/1273 = 0.55. If you redesigned the thermocouples to keep the same hot-side temperature while the cold-side was dropped, you might get that up to ~0.9, but you aren't going to even double the electrical power output, all else being equal. Even if you improved the conversion efficiency independently of the Carnot efficiency, there's only ~500 W/kg of thermal power to work with. You can get a healthy boost to the power budget of a rover or something (provided they don't need even more for heating), but RTGs are still not a good option for heavy power demands like keeping a base running.
Comment: Nice answer. I think it could be improved by defining acronyms (RTG, MHW) the first time you use them.
Comment: I added a mention that the MHW-RTG was the RTG design used on the Voyager probes and linked to the Wikipedia article in case anyone wants to learn more. RTG is now defined in the question and MHW-RTG is just the name of the design, the exact meaning of MHW isn't relevant here. (Or anywhere, really, they just threw some technically-accurate but not terribly descriptive words together to make an acronym.)
Answer:
would an rtg (or a set of them) produce enough power on the surface of titan, say, for a manned base?

Maybe, but you've forgotten something fairly important.
That very cold, highly thermally conductive atmosphere that's boosting your Carnot efficiency is also going to be sucking a huge amount of heat out of your manned base and all of your surface equipment.
Moon rovers like Lunokhod 1 had to survive the chilly lunar nights, which get down to 140K for a couple of weeks. They used host radioisotopes not for power generation, but to stop them freezing to death, a risk even for electronic equipment at that temperature. The average surface temperature on Titan is under 100K... that's quite significantly colder.
Your base is going to need some pretty significant insulation and plenty of heating especially for anything that ventures out of the main insulated bubble. The savings you make in terms of heat engine power generation are likely to be offset by heat losses from everything you'd like to not die of cold.
It is also well worth remembering that the power density of RTGs isn't great, and their lifetime isn't amazing... their output drops continuously during their life, too. They're great for deep space probes that have to be launched from Earth, because engineering an economical compact lightweight nuclear reactor is a pretty tall order, even without the environmental concerns (real or otherwise) of an accident.
If you can drop an entire habitat on Titan, you won't be mucking about with short-lived RTGs coughing up a disappointing and shrinking amount of power, you're going to send them the real thing, because they'll need it.
Comment: True that the power output of an RTG is relatively small, but the half life is around 75 years, probably longer than the mission duration.  Also great point regarding the effect of cold on the life support needs.  Andy Weir touches on this in "The Martian."
Comment: @Jason, the isotope half-life isn't the limiting factor on RTG lifespan.  The limiting factor is radiation damage to the thermocouples.
Comment: @Mark part radiation and part thermal diffusion. SiGe thermocouples are made of a solid solution of germanium in silicon, and apparently at high temperatures the germanium slowly precipitates out. Dopant materials can similarly diffuse around and even sublimate out of the junction material. Long-lived junctions could be constructed of more stable materials, but there'd probably be a tradeoff in mass and/or efficiency.


Can I run a windows presentation foundation app the way I would run a aspnet app?

Question: Can I run a windows presentation foundation app on a webserver over the internet, or does it run like a windows app where I have to download the code to each pc?
Answer: As mgroves mentioned, Silverlight is one alternative to a desktop-based WPF app. You might also be interested in WPF Browser Applications. You get all of the features of WPF (Silverlight only gives you a subset) with the ease of deployment via a webserver and a traditional rich client development experience. See this MSDN article for more information.
Comment: This requires the user to use ActiveX, which I believe restricts them to using IE.  Silverlight, as you mentioned, is a subset, but has plugins (or will have plugins) for all major browsers.
Comment: @mgroves

XBAP and ActiveX are two different technologies. XBAPs will run in Firefox as well.
Answer: WPF apps are traditional "desktop" apps.  If you want a very similar experience on the web though, then use Silverlight.
Answer: Yes and no.  There is a method to run small WPF apps through the browser in the form of an XBAP executable.
This will still download some code to the pc, but then the app runs in the browser.
Answer: You can create a WPF app that runs through the browser. In visual studio 2008, go to new project, click to create a new windows project. You should see an option to create a WPF browser application. This is different then using silverlight but it plays in the same sandbox as silver light, meaning that it can not access the users harddrive among other things. More info can be found here
Silverlight is another option that is much like flash.
I do not know the pros/cons of running a WPF browser application off the top of my head but the link I posted should have some good info.
I was looking around for pros and cons of using a WPF browser app and stumbled across this. It is the pros and cons of WPF app, WPF browser app, and silver light.


Is the "needs more focus" close reason a catch-all?

Question: Is the close reason that says a question needs more focused always only used for questions that need more focus? Or is it sometimes used when no other close reason fits? Are some questions that are closed requiring more focus actually never going to be opened no matter how focused the question gets?
Answer: No
I do not believe it is being used as a catch all close reason on this site.
Your secondary question about re-opening is also quite hard to definitively answer, because it will depend on the circumstances of each one.
There's no conspiracy against certain questions or people here, but yes, some questions may not attract enough re-open votes no matter how focused they get. I guess that really depends on how interesting they are as much as anything.
Comment: I believe it is being applied to your question because the answer will differ for each person who has done this, and people don't believe there is a common reason - i.e. the question is too broad.
Comment: Regarding your comment, I've proposed that as an answer to my question about my specific question, and the community does not seem to agree: https://movies.meta.stackexchange.com/a/4860/96544


Defensive capabilities of a pyrokinesis using superhero?

Question: I'm creating a superhero story, and one of the heroes is a character named Joseph Kroger, AKA The Phoenix. He can create fire with mind, and manipulate it. He also has a high tolerance for heat and therefore cannot be severely burned. He also like black leather, motorcycling and whiskey. Fire manipulation, or pyrokinesis, is often exclusively used for offensive fighting. My question is, what possible ways could pyrokinesis be used defensively?
Comment: That sounds a lot like Nicholas Cage in Ghost Rider.
Comment: Some abilities just aren't good on the defense, just like some abilities (for example, the ability to build large reinforced concrete forts) aren't very good in the attack.
Comment: @RonJohn Unless you can *summon* large reinforced concrete forts. 20 feet above your enemies.
Comment: @Corey which is of course why I wrote "**build**", not "summon".
Answer: Wall of fire is usually pretty good.  Not as good as they hoped here, but still good.

https://www.youtube.com/watch?v=GAoShLmdxDE
A firestorm with high winds and fire tornadoes should give attackers pause.  They should pause because the wind is towards the fire, through the fire and up; a rough trip.  Besides being hot and super windy, there will not be much oxygen left there.

http://donaldsweblog.blogspot.com/2010/04/firestorm.html
Answer: Since Joseph has a high heat tolerance, he would be able to shield himself with a wall of fire. Not a shield in the traditional sense of blocking arrows or something, but nobody would want to get near that wall of fire. Assuming he can also control the temperature of the fire, his fire wall could be hot enough to instantly vaporize bullets, so even ranged attacks would be ineffective against him. Unfortunately, such high heat would probably cook anyone near him alive and things like furniture would combust. To remain as non-destructive as possible, he would have to create an energy spike as the bullet entered the fire shield.
Comment: You can check your math here:  https://worldbuilding.stackexchange.com/questions/87229/would-pyrokinesis-be-an-effective-defense
Comment: If you're interested, I can do some of the math for the "melt a bullet" thing and edit my answer. Let me know.
Comment: I know how to do the math and can edit my answer to include it, if anyone is interested.
Comment: I am always interested in reading math as applied to physics and made popularly comprehensible.  Please add!
Answer: A. Melting/Vaporizing objects
This is self-explanatory. He could radically raise the temperature of incoming projectiles.
B. Flashes/explosions
He could radically increase air temperature, creating bursts of plasma that result in explosions. These could distract the attacker. Simple heated air could also distort their vision.
C. Defensive heating
He could superheat the weapons of his foes, or the magazines of firearms.
Comment: Heating up incoming projectiles may melt or incinerate incoming projectiles but not stop them.  It surely reduces the lethality of the projectile but it is still likely to harm you if fast enough. (Also I guess the superhot projectile would incinerate your clothing). I would use this only as a last resort.
Comment: The vapor is still mass, with momentum, and is heading straight towards you.
Comment: Another issue with vaporizing objects: the amount of heat required to **instantly** (because bullets are incoming **fast**) is **tremendous**.  Of course, this is superpower fantasyland, so that's not a consideration unless OP wants the power to be limited.
Comment: @cashbee I was thinking more like vaporizing them, not just melting them.
Comment: @ronjohn A bullet's worth of gas will lose momentum almost immediately without a solid form.
Comment: Lead and copper are dense.  I'd like to see some physics on the momentum of such heavy molecules.
Comment: @ronjohn yeah, but the OP didn't, so I think we're good. As far as the lethality of vapor goes, I'm not at all worried. A bullet has the same explosive power as a firecracker, and lead *gas* is less dense than a proper aerosol, meaning that you're talking about a few degrees of lethality less than a gun that sprays grains of sand.
Answer: There are actually a few good options:

Replicating Thunder
The sound of thunder is caused by the sudden (and extreme) temperature rise caused by the release of potent energy we call a lightning strike. The sudden rise in heat within the surrounding air causes it to expand, quickly and violently. Thus, your pyromancer can do the same thing: by heating a small area very very quickly, he can create a concussive wave. The forceful thrust created by this explosive "bubble" will likely blast the pyromancer backwards, but you know what? It'd also repel his attackers, and could be a neat way to fly. Very loud, though.....not at all stealthy......though I have the feeling your pyromancer isn't the stealthy type.

Intimidation/Interruption
Intimidating enemies so they run away instead of fighting is a defensive tactic; it's flawed and can backfire easily, but it is a defensive tactic. Another is pure, simple interruption. Firing at a pyromancer is one thing; firing at a pyromancer when he's lobbing fireballs is quite another. For that matter, can't your pyromancer set fire to his enemy's hair? I guarantee you most people won't be able to aim and fire if their hair is on fire.

Repulsion
Very few people would touch a bonfire, right? Well, if your pyromancer raises the ambient temperature to bonfire levels, no sane person would want to be around him. This wouldn't be very helpful against gunmen, but you know what would be? Smoke-which could perfectly well fit into a pyromancer's domain. Clouds of toxic, obscuring smoke will deter attackers and allow your pyromancer to escape with a reasonable chance of avoiding gunfire. Jets of the same could knock back and blind gunmen.

Strategic Combustion
Heating the magazines of foes, as User49466 suggested, seems a waste of time and energy. Why do that when you can just ignite the gun powder inside it? Most modern guns, according to everydaycarryconcealed.com, carry the gun powder in the cartridge. Explode that and your opponent is out an entire cartridge, if not dead from the resulting flames and shrapnel.

That should cover it, hope this helps!
Answer: He could use the fire to make the gunpowder in a firearm explode, rendering it useless and possibly injuring/killing the person unlucky enough to be holding it. Or he could firebend an barrier of fire that will vaporize bullets, or wreath himself in flames so that melee attackers cannot land a hit without risking getting burned. Or use the heat of his fires to make his foes too exhausted to fight, and turn them off when they lose consciousness.


How do I defeat the Kayran in the first chapter of the Witcher 2?

Question: In the first chapter you are supposed to slay the Kayran, this enormous beast:

I'm having a hard time with it. I drank the Mongoose potion for poison resistance and I have the Kayran trap, but it just hits me too often with its tentacles. Especially when the Kayran swings a tentacle sideways, not from above, I have a very hard time evading it.
Is there any trick besides not getting hit by the tentacles?
With a lot of luck I'm getting as far as the point where it's throwing stones. Any idea what I'm supposed to do then?
Comment: From my experience with the Witcher Saga(Currently playing 3 and loving it) Youtube and google is your best friend, yes you can ask us and wait for an answer(Yes I know I'm lazy too!) but youtube can quickly show you a guide or tips and tricks on killing a boss!
Answer: After finally beating the Kayran, here are some tips on killing the beast.
You need to trap the tentacles using the Yrden sign (The 4 tentacles with the slightly glowing, thicker part). You can only trap the 4 rear tentacles with the glowing part, the front tentacles of the Kayran cannot be trapped!. If you crafted a Kayran trap, you can use that one for the first tentacle, the location is highlighted if you have the trap in your inventory. You need to place an Yrden trap at a location where the tentacle will hit the ground. The easiest way to achieve this is to stand in the same location as the trap, once the Kayran lifts its tentacles, immediately roll to the side. The tentacle will hit the trap and you can sever it.
Avoiding the tentacles is important, a direct hit can do a lot of damage. Watch the pattern, you'll quickly notice when the Kayran lifts its tentacles and it is time to evade. Sometimes it also hits you from the side with a tentacle, but I haven't found what triggers this attack. You also shouldn't stand directly in front of the Kayrans mouth, it can perform an attack that poisons you (if you didn't drink the Mongoose potion) and immobilizes you.
You can also use the Quen sign to protect yourself from damage, but you have to time the casting right or you'll just be hit by a tentacle while or shortly after casting it.
After severing the third tentacle you get a quicktime event (right click, repeated left clicks and space) which will cause parts of the old bridge to collapse. The Kayran now throws stones after you. You need to go to the left and go up the fallen down part of the bridge that now leads directly onto the Kayran. And then you've finished this fight. Don't forget to loot the Kayran for reagents and crafting material.
Comment: A good way to avoid the tentacles is to roll immediately when they are raise up (you'll see them twitching first then going up). If you wait till they're coming down, it's too late. Geralt is not Dante :)
Comment: Did you learn any new skills for a Boss Fights / Fighting 201 blog post? ;-)
Comment: @Ivo The boss fight is completely different from all the other fights, not much more to write about it than what I've written in the answer here.
Comment: The side swipe he does is when you are too far back, stay by the front tentacle on either side, the back one will work its way up to you after you severed the front one.
Comment: I was so close to finishing the fight every time the first time i did it, but id always die after knocking it down .. Didnt realise i had the climb the bridge that broke, took me way too long to figuee that out
Answer: I found it a bit tricky to place the Yrden traps at the right distance to be effective. I found an easy way to do it though. If you have crafted the Kayran trap there will be a marker where you are supposed to place it. If you use it right away the marker will disappear, so don't. Instead use it as a guide for where to drop Yrden, and only use the trap on the final tentacle. This made the fight much easier for me.
Answer: See this video:


Can't Upgrade from 14.04.5-LTS to 16.04-LTS

Question: Using the GUI Updater which has always showed "Upgrade available" but I have ignored it -- up until today. :) Then got the errors.
The only two packages that I am aware of are BackInTime (BiT) and Wine and both have their PPAs defined and checked. After the first go around of errors I disabled the PPAs for Wine and BiT and the ERROR1 message went away, but still got ERROR 2.
I tried this but same again...
Can't upgrade from 12.04LTS to 14.04LTS
How do I do the Upgrade?
OR, is there some way to push all my 14.04 programs and data over to a clean install of 16.04?

ERROR 1: Preparing to Upgrade
Third party sources disabled
  Some third party entries in your sources.list were disabled. You can re-enable them after the upgrade with the 'software-properties' tool or your package manager.
ERROR2: Setting new software channels
Could not calculate the upgrade
  An unresolvable problem occurred while calculating the upgrade.
   This can be caused by:
   * Upgrading to a pre-release version of Ubuntu
   * Running the current pre-release version of Ubuntu
   * Unofficial software packages not provided by Ubuntu
If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal.
Answer: Open "Software and Updates" and click the "Other Software" tab. Deselect any PPAs there and try again.
Screenshots coming soon.
Comment: Thanks, bit do not worry about pics. I had already done that, mentioned _After the first go around of errors I disabled the PPAs for Wine and BiT and the ERROR1 message went away, but still got ERROR 2._


How can I visualize Primal-Dual Hill climbing?

Question: In the text, How to Think About Algorithms by Jeff Edmonds, there's a section explaining Primal-Dual Hill Climbing in the Network Flows and Linear Programming chapter. I'm having trouble visualizing the exponential number of roofs and why the 'lowest and hence optimal roof is above the highest and hence optimal place to stand'
Answer: I'm not 100% sure this is right but this was my take: given a particular hilly topology that you're navigating, imagine its mirror image floating in the sky above you. The top of the tallest hill will reach up and come into contact with the bottom of the bottom most valley of the mirror, which is reaching down from the sky. Conversely, if you navigate down into the lowest valley you'll maximize the distance between you and the point directly above you in the mirror image. It's not explained very well in the book but this mirror image is the "exponential roofs" referred to in the book.
Anyways, this mirror image is used as the basis for the proof that you've reached a global maximum. Intuitively what the proof is saying is that, first of all, the mirror image is another instance of the original problem, just reversed. However, the presence of the mirror image above you in the sky is what allows you to distinguish between a local or global maximum. If you've reached a particular peak but your head isn't bumping up against its "mirror peak" in the sky then you've reached a local maximum. If, on the other hand, there's no room for you to stand because the peak is bumped up against its mirror image then you know you've reached a global maximum.
Going back to the original description in the book, I think its problematic because what the author describes as "exponential roofs" sounded to me like a series of hills with a bunch of gazebos on it, and that's not right. A better description would be a cave of stalagmites and stalactites that exactly mirror each other.


What is a contiguous memory block?

Question: Just like in the title, what is a contiguous memory block?
Answer: This is a contiguous memory block of five bytes, spanning from location 1 to location 5:

It represents bytes (colored light blue) that are together in memory with no gap bytes (white) between them.
This is a non-contiguous set of five bytes of interest:

It is fragmented into three groups of bytes (colored yellow) with gap bytes at locations 4 and 6. Starting at location 1 there is a contiguous block of three bytes, spanning from locations 1 to 3. There are two more blocks of one byte each at locations 5 and 7, respectively.
The unused block at location 0 as well as any subsequent blocks beyond location 7 can usually be ignored since they do interpose between the bytes of interest spanning from locations 1 to 7.
Comment: Nice visualization. What did you use to create those images?
Comment: @Michael you have the right mindset to share information. please let me know if you have content which i can read or view
Answer: One without any gaps in the addresses it occupies. You can probably just think of this as a "block", and think of something with a gap in the middle as "two blocks".
The term comes up in the definition of an array as being "contiguous". That means the elements are laid out end-to-end, with no discontinuities and no padding between them (there may be padding inside each element, but not between elements). So an array of 5 4-byte elements looks like this (1 underscore character per byte, the | symbols don't represent memory):
 ____ ____ ____ ____ ____
|____|____|____|____|____|

It doesn't look like this:
 ____ _ ____ _ ____ _ ____ _ ____
|____|_|____|_|____|_|____|_|____|

And neither does it look like this:
 ____ ____ ____                                           ____ ____
|____|____|____| ... somewhere completely different ...  |____|____|

In all cases, "looks like" means "as far as the addresses visible in C are concerned". Something could be contiguous in virtual address space, but not contiguous in physical RAM. For that matter, something could be contiguous in physical RAM address space, but not actually adjacent in physical RAM. Half of it could be on one RAM chip over here, and the other half on another RAM chip over there. But the C memory model can't "see" any of that.
Comment: Shouldn't it be 1 underscore character per 4-byte element?
Answer: A block of memory which isn't interrupted by other memory. Or to be more precise it requires an uninterrupted block of virtual address-space. The real RAM backing that address space doesn't need to be contiguous.
This is important if you allocate a large memory block. The OS has to give it to you as a contiguous block, but if memory is so fragmented that only smaller pieces are free then this memory allocation cannot be satisfied even if the total free memory is larger than the requested space.
This isn't such a big problem on 64 bit apps since the address space is large there. But in 32 bit processes it can happen that the heap gets so fragmented(between freed blocks there are still unfreed blocks) that larger allocations fail.
Answer: A memory block is contiguous exactly when it is defined by a start and an end address from a single linear address space and has no holes.
Answer: Answering in the context of allocating memory, when you invoke the memory allocator and request 24 bytes of memory, it must be able to locate a single block of at least 24 bytes of unallocated memory.
If it has 16 bytes of memory starting at one address x and another 8 bytes starting at an address y such that y > x + 16 or y < x - 8 (that would create a gap), then the allocator cannot satisfy your request for 24 bytes even though there is a total of 24 bytes free.
See also Fragmentation.
Answer: Memory consists of a large number of blocks of bytes. Each block has its own address.
When a process requests for memory, memory is allocated in two ways:

Contiguous Memory Allocation
Non-Contiguous Memory Allocation

In contiguous memory allocation, consecutive (one after Another) blocks are assigned which are called contiguous Memory blocks.
In non-contiguous memory allocation, separate blocks present at different locations are assigned.

What is a contiguous memory block?


wxSqlLite3 in wxWidgets

Question: I have a question how can I use wxSqlLite in my wxWidgets applications? I downloaded wxSqlite3 for wxWidgets 2.9x and build it but only static win32 debug win32 and static win32 release win32 compiled without errors. How can I add wxSqllite to my project? My ide is visual c++ 2008.
Comment: What configuration do you want to build with? What errors do you get?  What have you tried?  You should put some effort into your question!  I added the link to the package.
Answer: You don't NEED to use wxSQLite.  You can simply call the SQLite API directly from your code.  It takes an hour or two to get familiar with the API, but then it does everything you need without worrying about linking your build to yet another package.
The SQLite API is a library.  There are several ways you can 'install' it.  I have noticed that the SQLite site is a bit vague on this question.  Here is what I do.
Download the zip containing the prebuilt DLL from http://sqlite.org/sqlite-dll-win32-x86-3071000.zip
This will give you the DLL, which should go in the folder where your executable runs.
This will also give the the export deefinition file ( .def  ).  This has to be converted to a .lib file so that it can be linked to.  You do this using the lib utility.
You also need the sqlite3.h header file, which is included in the amalgamation downloaded from http://sqlite.org/sqlite-amalgamation-3071000.zip
If all this seems like a lot of trouble, you can alternatively use the amalgamation.  Simply download the amalgamation and add the two files to your project.  The downside with this is that you will have to build the SQLite code over and over again,slowing your build process, and the entire code will be statically linked to every executable.  Nowadays builds run on modern computers so quickly that the cost of using the amalgamation is well worth the gain in simplicity.  These days, I never use the DLL.
Comment: Thank you ravenspoint. Do i have to install anything to call SQLite API?
Comment: @fex I have describes what needs to be done to call the API in the body of my answer.  BTW, I no longer use the DLL since moderns compilers are so fast that the cost to compile the amalgamation in every build is well worth the simplicity of not worrying about installing a DLL.
Answer: Of course one could use the SQLite API directly as ravenspoint pointed out, but wxSQLite3 makes it easier to integrate SQLite databases with wxWidgets-based C++ applications. The wxSQLite3 API is similar to JDBC and ODBC. wxSQLite3 takes care of converting wxString objects to and from UTF-8, one of the 2 encodings (UTF-8 or UTF-16) expected by SQLite; wxSQLite3 supports creating user defined functions as C++ classes; and adds several other features like backup and restore of databases, value collections, support for different date and time value representations and so on. wxSQLite3 can load the SQLite DLL at runtime without requiring a link library if you prefer, it's just setting a compile time flag.
Adding wxSQLite3 to a project is simple: either create a DLL or static library using the build files (including VC++ 2008 solution) coming with wxSQLite3, or just add the single C++ source file and few header files to your own project.
In case of difficulties ask your questions on the wxWidgets developer forum.
Comment: I adjusted the formulation in my first answer. I didn't suggest a conversion between UTF-16 and UTF-8 is required, but it's certainly recommended to convert different encodings to/from UTF-8 (or UTF-16). For an ANSI build of wxWidgets wxSQLite3 does exactly this (I know it's not that important anymore for wxWidgets 2.9.x). Enforcing a portable encoding is just one feature of wxSQLite3. Providing a C++ like interface to SQLite is more important for most users of wxSQLite3. Certainly each developer may decide for himself whether to use or not use wxSQLite3.
Comment: " wxSQLite3 takes care of converting wxString objects to and from UTF-8 used by SQLite"  Why do you say that SQLite uses UTF-8?  It stores whatever is passed to it - Ascii, UTF-8, UTF-16, anything.  No conversions are ever required.  In a Unicode build you would, of course, use the UTF16 API for convenience.  IMHO wxSQLite3 is a solution to a non-existent problem.
Comment: SQLite expects that strings are encoded in UTF-8 or UTF-16. You are right that SQLite doesn't force you to use Unicode but if you don't take care of appropriate conversion you may end up with SQLite database files which can't be interchanged between different applications without problems. For a stand-alone application this might not impose a problem but quite often it does, i.e. if you use external tools for managing a SQLite database in addition to your own application. - wxSQLite3 can simplify accessing SQLite databases from wxWidgets applications. If you feel different just don't use it.
Comment: It is incorrect to say that SQLite uses UTF-8, and suggest that a conversion between UTF16 and UTF8 is required   Please edit your answer.

wxSqlLite3 in wxWidgets


Why is Entropy One-Directional?

Question: If the laws of physics work the same forward and backward in time, why does entropy grow in one direction?
Comment: Perhaps we are a little caught up in the thinking of the last century and the conditions of the earth. "The second law of thermodynamics states that the entropy of an isolated system never decreases with time". Take the example of mass aggregation into stars and black holes. Exploding stars allow heavy elements from the aggregation of hydrogen to enter the world. The process from hydrogen to heavy elements increases entropy.
Answer: It is actually not, the total entropy can in fact decrease, but it's just highly unlikely.
I will make an analogy to the statistical interpretation of entropy as counting the amount of microstates $\Omega$ according to some configuration in phase space.
$S = k \ln \Omega$
Consider a uniform gas of indistinguishable particles in a box. Each particle has a position in 3D space and a momentum vector, together they form the $6N$-dimensional phase space where each point labels a certain configuration:
We will now compare 2 particular states:

The gas is uniformly distributed over the entire box
All gas particles suddenly go to one corner of the box and reside there

Clearly, the first state can be realised in many more ways than the second. Therefore, $\Omega_1 \ggg \Omega_2$ and hence $S_1 \ggg S_2$. There is a higher probability to find the gas uniformly distributed than in one corner.
However, does this mean that the second case is unphysical as it would lower the entropy?
No, it is just extremely unlikely! The second law of thermodynamics is not absolute, it's just that processes where the total entropy decreases are highly improbable.
For other examples: look up negative temperatures, the entropy decreases when adding heat.
Comment: Yes. I get the statistical interpretation of entropy. I get that a high entropy state is far more likely than a low entropy state. This is intuitive for me at this point.  I see it every morning when I stir milk into my coffee. But if you think of the universe moving backwards in time. All of the physics would still be the same, but entropy would be globally reducing. Why is the probability one directional while the physics is two?
Comment: I am not sure about this answer. The entropy is given by the amount of knowledge you have about the system. If you dont know anything about the particle position the entropy will be S1 in your example. If you know all particles are in a corner the entropy will be S2. But the entropy is fixed by what you know it will not decrease like this. Because following your reasoning we could also say that the system is at all time in an exact position so the entropy would always be 0.
Comment: I thought entropy was related to knowledge only insofar as probability was related to knowledge. But given quantum mechanics the probability is inherent to the fundamental physics of the system. Somethings can not be known. Am I missing something?
Answer: The question you ask is one of the major open philosophical questions in science today.  Why does time appear to move "forward?"  Many great minds like Feynman have explored the question (and its dual "what if time doesn't just move forward?") As such, no answer can be completely satisfactory, but some statements can be made and they will hopefully help.
As we see in JulianDeV's answer, entropy and its inevitable statistical increase are baked into the problem statement.  They arise when dealing with systems where one can theoretically predict the past and future state of the system perfectly, given enough information, but where "enough" information is unacquirable.  For example, the velocity of particles cannot be known perfectly.  The best we can do is state some bounds on the velocity.
When you fill in the missing unknowns with randomness, in the truest mathematical sense of the word, your equations exhibit entropy.  The measurable "states" and the unmeasurable multitude of "microstates," which appear the same upon measurement but are fundamentally different in the phase space of the systems, inherently lead to entropic like behavior.  And in the direction of evolution of the system, we see entropy increasing (on average, as JulianDeV points out).  So long as you wish to use random variables to fill in for that which you do not know, this entropic behaviors will emerge as unknown compounds upon unknown.
The great philosophical question is why are these models typically applied to systems with time going in one direction.  Is there a fundamental concept of "forward" to the universe, or is it a side effect of the way the H. sapiens mind thinks about time?
And that is where the satisfactory answers must end.  When we step beyond "what models exhibit entropic behaviors?" and into "what aspects of reality should be modelable this way?", we quickly get into the fundamental philosophical meaning of time.  For an introduction into that question, I highly recommend the SEP article on Time.
Comment: @Jordan Time typically thought of as a dimension, but as a temporal dimension rather than a spatial one.  Even in relativity, time is different than a spatial dimension (even if its part of one big 4-d vector).  There are different symmetries for temporal and spatial dimensions (which becomes a big deal once you get to Nother's theorem)
Comment: I am tempted to think of time as a dimension just like space as relativity treats it. But space is symmetrical and it just seems really strange that time would have this probabilistic mechanism that makes it asymmetrical. I will read your recommended article.
Answer: Once you define entropy, such as Cort Ammon descibes, add completely symmetric laws of physics (which is the case, as you say), you still need some kind of initial or prior condition to deduce a single emergent arrow of time.
The prior condition is the big bang, and it was "large" enough and lower entropy than today. The laws of physics allow for trajectories in either entropic direction. But if you already have a relatively low entropy state, the most common trajectories will be toward a higher overall entropy state. And thus from one snapshot to the next, all the way to the big bang, entropy has increased overall. And thus a single emergent arrow of time, the second law.
There are other formulations and assumptions that can lead to multiple arrows of time, like shape dynamics of Julian Barbour. They do not assume a low entropy big bang, and one trade off is having multiple arrows of time.
There is much more to the story but I belive this is the bare logical arguement.

Why is Entropy One-Directional?


Trends in conductivity in groups 1 and 2

Question: I have read that the trend for conductivity in groups 1 and 2 is a decrease down the groups (generally). Apparently this is because the atoms of each element get larger, so while the number of electrons per atom stays the same, the number of electrons per unit volume decreases. But the amount of shielding between the outer electrons and the nucleus increases, so surely the outer electrons become easier to donate to the delocalised sea, and will experience less attraction to the positive ions around them. Which I would have thought made them more mobile and therefore made the metal a better conductor. Obviously I'm wrong but can someone please explain why?
Comment: The conductivity of metals depends quite fundamentally upon the temperature at which it is measured - and without clarifying what temperature(s) you are interested in this question is difficult to answer. You probably mean low temperatures as you are ignoring the contribution to the resistivity from lattice vibrations, but now I am guessing.
Answer: the alkali  metal ions in aqueous solution have high electrical conductance. the electrical conductance of Li+ ions expected to be highest, which is smallest ions in size, as ionic size increases down the group.
<code>               however, we find experimently that electric conductance increases down the group and Cs+ has the highest conductance while Li+ has lowest.
</code>
this is evidently the reverse of what we expect. This anomaly arises from the fact that alkali metal ions are hydrated to diffrent extents.The Li+ ion is hydrated to the maximum extent due to its  high charge/size ratio compared to other alkali metals the extent of hydration decrease down the group, thus Cs+ is least hydrated Li+ ion due to high hydration is the biggest while Cs+ ion due to smaller hydration is the smallest. thus, the ionic size in aqueous solutions, instead of increasing actually decreases on moving from Li+ to Cs+
as a result of which ionic mobility increases as we move from Li+ to Cs+. Hence, the ionic conductance, instead of decreasing, actually increases on moving from Li+ to Cs+
Comment: The question is about the elemental metals, not the ions in (aqueous) solution


How do you hide the mouse pointer under Linux/X11?

Question: How do I hide the mouse pointer under X11?  I would like to use the built in libraries in order to do this and not something like SDL (SDL_ShowCursor(0)) or glut (glutSetCursor(GLUT_CURSOR_NONE)).  Also, the mouse pointer should be hidden no matter the pointer location, not just in its own window.
Answer: Here's a description how unclutter utility does it.

Unclutter is a program which runs permanently in the background of an X11
  session.  It checks on the X11 pointer (cursor) position every few
  seconds, and when it finds it has not moved (and no buttons
  are pressed on the mouse, and the cursor is not in the root window)
  it creates a small sub-window as a child of the window the cursor is in.
  The new window installs a cursor of size 1x1 but a mask of
  all 0, ie an invisible cursor.  This allows you to see all the text in
  an xterm or xedit, for example.  The human factors crowd would agree it
  should make things less distracting.
Once created, the program waits for the pointer to leave the window
  and then destroys it, restoring the original situation.
  Button events are passed transparently through to the parent window.
  They will usually cause the cursor to reappear because an active grab
  will be made by the program while the button is down, so the pointer
  will apparently leave the window, even though its x y position doesnt change.
Comment: now I also know why unclutter is messing up my accelerated windows so badly. mplayer doesn't take kindly to child windows like that I believe.
Answer: There is a -no-cursor option for Xorg 1.7 and later. https://www.x.org/wiki/AdvancedTopicsFAQ/
xinit -- -nocursor or startx -- -nocursor could work.
Comment: with this option touchscreens with mouse driver (qemu, mastertouch, etc) not working!
Answer: I'd rather use simpler method:
unclutter -idle 0

You almost do not see cursor, still it is available.  To disable mouse:
rmmod psmouse

Or disable mouse module permanently somewhere in /etc/.  See your distribution manual.
Comment: with unclutter you can set -jitter flag to high value, and then you will not see the mouse at all, and you don't have to poll so often.
Answer: an alternative to unclutter
Unclutter didn't work for me, as it doesn't play well with hardware accelerated surfaces (such as for example those produced by intels' VA-API when decoding video). So I found a program that hid the mouse pointer in a less roundabout way, hhp, and rewrote it in C with minimal dependencies, the result is hhpc. I did this to obviate the need to have haskell to compile it and because hhp sometimes stopped hiding the mouse pointer.
hhpc, relies only on glibc and xlib, so it's easy to build, just do make release. You can get the code and instructions from my repository. It's very memory and CPU efficient (because it does almost nothing).
Comment: Hi Aktau, could you modify your hhpc to hide the mouse pointer immediately when a keyboard event happening instead of timer? That would be very useful.
Comment: @Iiridayn Thank you so much! I looked for this kind of feature for years! It seems works well.
Answer: You can create and set an invisible cursor theme.  This trick is used by maemo, because it's rather pointless to have a cursor on a touchscreen device.
Sadly, the ability to change the global cursor theme at runtime is not uniform across X11 applications and toolkits.  You can change the server resource Xcursor.theme, and nobody will notice (generally it's only queried at startup); you can inform xsettings which only seems to affect Gtk+ programs; KDE uses some sort of communication through properties on the root window; etc.
At least changing the cursor for your own application is as easy as XDefineCursor, and if you do that on the root window, some applications might follow along.
Comment: Do you have a link on how to create this, enable it when the application starts and disable it when the application exits?
Comment: It's easy to set the global cursor theme when X starts up, but to be able to manipulate other windows' cursors... that ability is not readily available.  Why do you want to do this?
Comment: Actually, come to think of it, I have control of all applications visible to the user, so I should be able to use XDefineCursor. Thanks.
Answer: I ended up using XDefineCursor like ephemient mentioned.  The control application changed the default root window cursor and the other applications (which are under my control) inherited it.
Code specifics look like:
// Hide the cursor

if (NULL==(display=XOpenDisplay(NULL)))
{
   printf("Unable to open NULL display\n");
   exit(1);
}
window = DefaultRootWindow(display);

Cursor invisibleCursor;
Pixmap bitmapNoData;
XColor black;
static char noData[] = { 0,0,0,0,0,0,0,0 };
black.red = black.green = black.blue = 0;

bitmapNoData = XCreateBitmapFromData(display, window, noData, 8, 8);
invisibleCursor = XCreatePixmapCursor(display, bitmapNoData, bitmapNoData,
                                     &black, &black, 0, 0);
XDefineCursor(display,window, invisibleCursor);
XFreeCursor(display, invisibleCursor);
XFreePixmap(display, bitmapNoData);

In order to hide the cursor and then after I'm done
// Restore the X left facing cursor
Cursor cursor;
cursor=XCreateFontCursor(display,XC_left_ptr);
XDefineCursor(display, window, cursor);
XFreeCursor(display, cursor);

To restore X's left handed cursor (Since it's the root window and I don't want it to stay invisible.  I'm not sure, but I might also be able to use
XUndefineCursor(display, window);

Comment: Comment from an anonymous user: *If you open it, close it. If you create it, destroy it. You didn't destroy the pixmap...*
Comment: I've just found that I need to call ``XSync(display, False)`` after the calls to ``XDefineCursor`` and ``XUndefineCursor`` for this to work. If your cursor does not disappear/reappear properly, you might want to try it too.
Answer: Use xbanish! It "banish the mouse cursor when typing"!
Start it with

xbanish &

and enjoy!
The source code for xbanish is here:
https://github.com/jcs/xbanish
Comment: This is really is great utility, easy to install and works fine. It should be more widespread.
Comment: Best and simplest solution so far. Fits great with i3!
Answer: To hide the mouse cursor, create an extra little file (I called mine blnk_ptr.xbm):
#define blnk_ptr_width 1
#define blnk_ptr_height 1
#define blnk_ptr_x_hot 0
#define blnk_ptr_y_hot 0
static unsigned char blnk_ptr_bits[] = {
    0x00 };

Then,

To hide the mouse pointer cursor,
  $ xsetroot -cursor blnk_ptr.xbm blnk_ptr.xbm

To show the mouse pointer cursor again,
  $ xsetroot -cursor_name left_ptr

You can use a mouse pointer cursor other than "left_ptr", but this one seems to be widely available across *nix systems.

Btw, I don't know yet how to get the name of the pointer currently used by the system using xsetroot. I guess I'll [as usual] digg that too, but I'd be happy to have someone who knows the how-to giving me the answer ( It'd be nice ;) )
Comment: @Gik, I think you need to type the blnk_ptr.xbm file exactly as it appears with newlines and everything.
Comment: I did exactly that but it says "xsetroot: bad bitmap format file: blnk_ptr.xbm" (on a Raspberry Pi)
Answer: This is my solution. It places the cursor where you can't see it (in my case, in the bottom-left corner) - then, it disables the mouse, so you can't move it.
Note You could parse data from xrandr, or put that data in an environmental on login, and then use it; that way, you won't have to have it hard coded. But, as for me, I never change my screen resolution, so 768 is OK :)
setmouse () {
   DISPLAY=":0" xinput $1 `DISPLAY=":0" xinput | grep Mouse |
           tr -d " " | tr "\t" " " |
           cut -d" " -f2 | cut -d"=" -f2`
}

offmouse () {
   DISPLAY=":0" xdotool mousemove 0 768 # use xrandr to find out
   setmouse disable
}

onmouse () {
   setmouse enable
}

Comment: It depends on `xdotool`, why? It also doesn't work on virtual devices (e.g. wireless mouse & keyboard) due to `grep Mouse`, and it disables the mouse entirely - as far as I understand the question is about hiding the pointer only.
Comment: You can shorten setmouse command as: `xinput $1 $(xinput | grep -oP "Mouse.*id=\K[0-9]+")`
Answer: Source code, xtoggle.c:
#include <signal.h>
#include <X11/extensions/Xfixes.h>

Display               *display;
volatile sig_atomic_t breakout = 0;

void toggle_cursor(int x) { breakout = x; }

int main(void) {
    int      hidden = 0;
    struct   sigaction act;
    sigset_t mask;

    if (!(display = XOpenDisplay(NULL))) { return(1); }
    act.sa_handler = toggle_cursor;
    sigaction(SIGUSR1, &act, NULL);
    sigemptyset(&mask);
    while (1) {
        if (hidden) { XFixesShowCursor(display, DefaultRootWindow(display)); }
        else        { XFixesHideCursor(display, DefaultRootWindow(display)); }
        XFlush(display);
        hidden = !hidden;
        breakout = 0;
        while (!breakout) { sigsuspend(&mask); }
    }
    return(0);
}

Depends on Xfixes. On Debian/Ubuntu,
apt install libxfixes-dev

Compile it and execute it in the background,
cc xtoggle.c -lX11 -lXfixes -o xtoggle
./xtoggle &

Toggle cursor visibility by sending it a USR1 signal,
pkill -USR1 -x xtoggle

Possibly useful exercise: Use XWarpPointer to move the
invisible mouse pointer out of the way when hidden.
Comment: Only solution I've found so far that works just for this purpose.
Answer: There is an X11 extension called Fixes which has a function one can use to hide the cursor. The advantage of this function is that this sends a message to the X server which hides the sprite. No trick (i.e. invisible cursor from a pixmap) and from what I understand it works on the entire screen.
#include <X11/extensions/Xfixes.h>

...

    XFixesHideCursor(dpy, window);
    XFlush(dpy); // not required unless you want an immediate effect

Source:
How to hide the mouse cursor in X11/Xorg
Answer: You can use xbanish. It is available on most major linux distributions or can be built from source.
The -a flag will keep the mouse hidden at all times until the program is stopped.
$ xbanish -a

If your distro uses systemd, you can run xbanish as a service by creating a file at /etc/systemd/system/xbanish.service with the following content:
[Unit]
Description=Xbanish - Hides the mouse cursor

[Service]
User=user # Replace with your current user
ExecStart=xbanish -a
Restart=always
RestartSec=5
Environment=DISPLAY=:0

[Install]
WantedBy=multi-user.target

You can then turn on the service:
$ systemctl daemon-reload xbanish
$ systemctl enable xbanish
$ systemctl start xbanish

To stop it momentarily:
$ systemctl stop xbanish


Regarding Facebook Registation/Login on website

Question: Is it possible to have the user "like" your page during the registration process using the Facebook Registration/log in function on my website.  I know you can have custom fields, but I don't see anything that talks about this.  Please tell me where I can find this information.  I don't want to be repetitive on my website by having them do this twice.
Answer: Authenticating an application is not the same as liking an application.  So they are two distinct things.  You can create something called a fan-gate to prevent the user from seeing the good stuff if they don't like your app.  Google fan-gate and you will see some examples of how to implement.
Comment: DMCS. Thanks so much for answering my questions.


Accounting for nuisance confounding variable in multi level model for crossed or multiple membership study

Question: I am trying to use a multi level model for a study where participants take part in 3 separate sessions where they complete a cognitive task and I measure reaction time. During each session, they complete 3 blocks of the task, so I have 3 measurements per session. Participants receive a different treatment condition each session: Placebo A, Drug B, and Drug C. It is a Latin Square design, and order is counter balanced to 6 orders: ABC, ACB, BAC, BCA, CAB, CBA. There are several participants that received each order, but it isn't perfectly balanced (i.e. some orders have 9 participants, others have 12, others have somewhere in between).  We had a washout period that was selected so there wouldn't be a carryover effect.
I want to know whether there is an effect of treatment condition on reaction time. One problem that I am having trouble accounting for is the fact that there is a large session effect. The version of the task they completed during session 2 has a reaction time that is much lower than the reaction time during sessions 1 and 3. I initially had planned to analyze using RM ANOVA, but when I was unblinded, I became aware of the session effect which has made it difficult to isolate whether a treatment effect is present because it instead picks up on the within-subjects session*treatment interaction.
I have been trying to learn about multi level modeling as I have heard it is better able to handle this. However, with my level of understanding, I am unsure whether I am on the right track. I have read many helpful answers on the site, but am concerned my limited understanding that I am making an obvious mistake or misunderstanding what the models I made are doing. I do not care about session order effect--only want to account for it so I can isolate the within-subjects effect of treatment.
Currently, I believe the following is capturing the simplest version what I want, which based on my understanding should be what I go with unless I have good reason to change to something more complex. Is this correct?
model1 <- lmer(formula=RT ~ Condition + (1|participant) + (1|session) + (1|Block), data=data)
I also considered whether this may be the right approach--if block should be nested in participant.
model2 <- lmer(formula=RT ~ Condition + (1|Block/participant) + (1|session), data=data, na.action=na.exclude)
Based on some reading, I wondered if I need to include session as a fixed factor. But again, I'm really not interested in it and am just trying to account for that session 2 issue. One thing that confuses me about this model is that I have convergence issues if I try to add condition or session as a random effect here. This has been one clue that I have a fundamental misunderstanding.
model3 <- lmer(formula=RT ~ Condition*session + (1|Block/participant), data=data, na.action=na.exclude)
From reading this...
Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?
I also considered whether this was the proper way. Thus, I keep going back and forth on the structure the random effect is capturing, and whether I need sometime like this instead. But, if I need to specify that blocks are nested in person, then this doesn't converge.
model4_fit <- lmer(formula= RT ~ Condition + (1|participant/Condition) + (1|session) + (1|Block), data=data)
I'm also considering whether all of these are wrong and I need to fit a multiple membership model as in here https://github.com/jvparidon/lmerMultiMember as each participant completes 3 sessions and 3 treatment conditions.
Thank you so much for any help anyone is willing to provide.
Answer: Note that:
model1 <- lmer(formula=RT ~ Condition + (1|participant) + (1|session) + (1|Block), data=data)

and
model2 <- lmer(formula=RT ~ Condition + (1|Block/participant) + (1|session), data=data, na.action=na.exclude)

are the same model, depending on how the data are coded, as explained in the first link in the OP.

I'm also considering whether all of these are wrong and I need to fit a multiple membership model

I don't see any multiple membership with this design, unless I have not understood the OP


Could I change my research direction after graduated master?

Question: For example, if I finished a topic on the computer science field and graduated as a master degree, could I change to a topic within the psychology or any other field. Just because I'm more interested in doing research in psychology.
Comment: Probably more context is needed, because unless there are local state or university rules that apply in your case, I see no reason why not. Over the years I've had one colleague who got an undergraduate degree in English (only, I believe) and later got a Ph.D. in math and is now a moderately well known historian of mathematics, and another colleague who got a Ph.D. in math and was tenured at an R1 doctorial university (a U.S. classification) who later did graduate work in English and is now a tenured English professor at another R1 university.
Answer: You can always change your field, but it may not be trivial to do so. Study in a new field, and getting accepted in to a program usually assumes certain prerequisites. If you don't already have those, you will need (a) to get them somehow and (b) to convince others that you have the skills.
People change their minds about what they want to do. Others recognize that, so there are no hard barriers. But there may be a long period of study to achieve what you want.
Also, study of some fields, like CS or mathematics or statistics may make some things in other fields easier as many of the tools used in research generally are based on one or more of those things.
But you may have an easier path overall if you spend some time exploring your options before you set out on the journey.


What are the practical uses of semaphores?

Question: Nonbinary ones..
I have never encountered a problem that required me to use a semaphore instead of mutex.
So is this mostly theoretical construct, or real sw like Office, Firefox have places where they use it?
If so what are the common use patterns for semaphores?
Comment: This article does not address your question, but is a very good tutorial on Mutexes and Semaphores: http://www.geeksforgeeks.org/mutex-vs-semaphore/
Comment: Check producer/consumer problem.
Comment: So when you are on you car, you don't crash with others
Answer: Non-binary semaphores are used in resource allocation. A semaphore might hold the count of the number of a particular resource.
If you have a pool of connections, such as a web browser might use, then an individual thread might reserve a member of the pool by waiting on the semaphore to get a connection, uses the connection, then releases the connection by releasing the semaphore.
You can emulate a semaphore by creating a counter and then establishing a mutual exclusion region around the counter. However, waiting for a resource such as above, requires a two-level mutex and is not quite so elegant as using the semaphore.
Answer: A semaphore can count.  Counting is fundamentally thread-unsafe, it is a read-modify-write operation on the processor and therefore not atomic.  There are lesser primitives available to count safely, Interlocked.Increment() is atomic.  But atomicity is a pretty weak threading primitive, in many cases you also have to block code when the count is at a critical value.
With 0 being "critical", all resources have been used.  A standard example is counting down processor cores to run threads, once you've used them all then you should not start another thread until one of them completes and doesn't need a processor core anymore.  As basic as it gets.
Binary semaphores often appear in literature about threading.  A standard text-book entry and closely tied to a fellow Dutchman called Edsger Dijkstra.  A pioneer in computer science that first started to think in the 1960s about what you'd do to get a processor to run multiple programs.  His P and V annotation only makes sense to a Dutch speaker like me.  Parkeer and Vrij are terms you use when you try to put your car somewhere :)  This was long before everybody started to think about having different kinds of threading primitives, like mutex and monitor.  Primitives that only require having support for a semaphore, once you got a binary semaphore then you do everything else.  Building abstractions on top of a basic facility, the way composition works in software.
Noodling on a bit, I'm on a roll, one thing that makes Semaphore quite different from other primitives like Mutex and Monitor and lock is that it doesn't have thread affinity.  That's a rather big deal when you write threaded code, the usual contract you try to implement is that only one thread can access a resource at the same time.  All of the other .NET synchronization objects are re-entrant, you cannot deadlock yourself by taking a lock more than once on the same thread.  They are very friendly and simply increment a counter when you acquire the lock.  And count down again when you release.  And only give up on the lock when the count reaches 0.  Semaphore doesn't work that way at all, it counts when you acquire regardless of which thread acquired it.  In some cases that really matters, like the count-down-the-thread-resources example I quoted earlier.
Which is really what is useful for.  Not exactly very common.  A monitor is the Swiss army-knife of threading, which is why it got its own keyword.  The lock keyword in C#, SyncLock in VB.NET
Answer: Quoting Doug Schmidt in http://www.cs.wustl.edu/~schmidt/win32-cv-1.html section 2.2:

Counting semaphores are a synchronization mechanism commonly used to serialize or coordinate multiple threads of control. Conceptually, counting semaphores are non-negative integers that can be incremented and decremented atomically. If a thread tries to decrement a semaphore whose value equals 0 this thread is suspended waiting for another thread to increment the semaphore count above 0.
Counting semaphores are often used to keep track of changes in the state of objects shared by multiple threads in a process. For instance, they can record the occurrence of a particular event. Unlike condition variables, semaphores maintain state. Therefore, they allow threads to make decisions based upon this state, even if the event has occurred in the past.

As for patterns, there are two as per http://www.freertos.org/Real-time-embedded-RTOS-Counting-Semaphores.html

Counting semaphores are typically used for two things:

Counting events.
In this usage scenario an event handler will 'give' a semaphore each time an event occurs (incrementing the semaphore count value), and a handler task will 'take' a semaphore each time it processes an event (decrementing the semaphore count value). The count value is therefore the difference between the number of events that have occurred and the number that have been processed. In this case it is desirable for the count value to be zero when the semaphore is created.

Resource management.
In this usage scenario the count value indicates the number of resources available. To obtain control of a resource a task must first obtain a semaphore - decrementing the semaphore count value. When the count value reaches zero there are no free resources. When a task finishes with the resource it 'gives' the semaphore back - incrementing the semaphore count value. In this case it is desirable for the count value to be equal the maximum count value when the semaphore is created.
Answer: I think you already know what a semaphore is and you are just wondering how it is used on "real software".
"real sw like Office, Firefox have places where they use it?"
Yes, "real software" use semaphores a lot, it is not just theoretical, e.g. Chromium source, windows semaphore handling code and the same code used by Virtual Box.
"What are the practical uses of semaphores" / "What are the common use patterns for semaphores?"
They are more suitable for producer-consumer synchronization problems. Situations that you have the number of producers and consumers both > 1.
The Fuhrmanator's reference of typical use of semaphores are good ones.
Answer: I've used a semaphore in a production setting a few times. Have a windows service running which will get a list of tasks to perform. These tasks can all run in parallel. So we initially just dropped them all in a .net Threadpool and set them to run.
After a short period a problem cropped up. The work performed in parallel was also using the threadpool. So if we started too many tasks on the threadpool, they would consume the entire pool, and then wait for their queued task to get a slot in the threadpool.
The leaky solution was to just keep a shared counter where tasks would increment and decrement it as they kept running. That worked for a while, but eventually the service would stop doing anything. Repeated race-conditions resulted in the counter showing that all allowed slots in the threadpool were taken even though nothing was running.
In the end a Semaphore solved the issue.
Answer: A possible practical example could be a fixed Thread pool: you don't want to waste all your system resources so you allow only a certain number of Threads to execute at a certain time; all remaining Threads will wait in a queue.
Now, I doubt that for instance Java Thread Pool are implemented using a bare resource like a semaphore, but whatever synchronization construct is used, it is theoretically equivalent. You can get a full explanation on Java Thread Pools (and Fixed Thread Pools) here: http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html


BASH: loop-reading a list creating a dynamic array

Question: I have a list formatted as below. If I replace the list by, say, "aaa bbb ccc", everything works fine. Anyone an idea?
list=$(echo -e "1.1 1.2 mgmt")

n=0
for i in $list; do
   let "array1_$i[$n]=$(date "+%N")"
   ((++n))
done

n=0
for i in $list; do
   var=array1_$i[$n]
   echo ${!var}
   ((++n))
done

thanks in advance for any ideas...
Answer: You can change the shebang line to
#!/bin/bash -xv

to see what bash tries to run. In fact, you are trying to create a variable named array1_1.1, which is not a valid variable name: dots are not allowed.
Comment: I am amazed at the usefulness of that information. I can *see* what bash tries to run? UPVOTE.  (On investigation, -xv also works for `dash` (my favored shell for scripts that have to run really fast), `zsh`, `ksh` and possibly all other major sh-variants.)
Answer: . is not a valid character in an identifier.
man bash:

       name   A word consisting only of alphanumeric characters and underscores, and
              beginning with an alphabetic character or an underscore.  Also
              referred to as an identifier


Is hard panning the best practise when double tracking?

Question: Apart from stereo width, why do people hard pan Left and Right when doing double tracking? Why not 50L & 50R or somewhere between? Is it because of phase cancellation?
Comment: What's the context? Stereo recording? Field recording with boom/lavalier?
Comment: Just recording two times for the same part (a mono guitar track).
Comment: ah ok I understand now. see answer below.
Answer: I think hard panning as opposed to 50%L/R is just personal preference - nothing to do with phase cancellation.
Obviously with hard L/R you will get a wider stereo sound-stage - I think it just depends on what you want in the mix. You can also try and introduce some chorus and delay to give you even more depth to the sound.


Should the Following Question be Flagged?

Question: I came across Pointers, Classes, Virtual Functions, and Abstract Classes, Dynamic Arrays today.  There isn't really a question and the person just wants code to finish what is apparently homework.  Should this be flagged and if so what flag should be used?
Comment: Probably a good half of the close reasons that exist apply to that question.  Take your pick.
Comment: It's a better question than some. After reading 'Write a class (largeIntgers) that supports the following functionalities', you can go straight to downCloseVote without reading the rest.  Many assignment questions are heavily disguised.
Comment: The custom close reason specified really shouldn't have been used though (I realize you weren't the one that first wrote it); that's not a reason to close the question (after all, there can be perfectly acceptable SO questions that are about homework), it should have just been a regular comment at most.
Answer: Questions like that are good candidates to be closed for being either too broad or unclear as to what is being asked.
In the general case, though, questions that are poor should simply be downvoted.  The system has measures in place to automatically clean up questions that are downvoted with relatively low views.
Comment: ... as long as they are not answered...


Why is pollard rho's expected runtime O(sqrt(n)) not O(sqrt(n) * log(n))?

Question: I understand by the birthday problem, the algorithm will expect to take $\mathcal{O}(\sqrt{N})$ times to find a cycle.  However, one of the steps involves computing the $\gcd(\mid x-y \mid, N)$, which, I assume, uses the euclidean algorithm, which is $\mathcal{O}(\log(N))$.  So shouldn't it run in $\mathcal{O}(\sqrt(N) * \log(N))$?
https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm
Comment: Each application of $g$ also has quite likely a similar cost as the gcd, since it also includes a modulo, which is a lot more complex than additions or multiplications. Going into that is a lot more complex than assuming the base cost 1 for $g$ and the gcd.
Answer: Ok, this needs a little deeper answer.
What Wikipedia gives as $\mathcal{O}(\sqrt(N))$ is the expected number of iterations to notice the repetition in $N$ element set. It is not about the actual cost of the algorithm. Just for the finding the first equality (epact).
If we look at the loop the base algorithm ( not the improvements)
<code>    while d = 1:
        x ← g(x)
        y ← g(g(y))
        d ← gcd(|x - y|, n)
</code>
It means that we have 3 evaluations of $g$ to the modulo and one GCD. The choice of $g$ affects this cost, too.
Galbraith, Steven D gave a  rigorous analysis of Pollard rho on their book,

(Heuristic 14.2.9). (This is based of the Harris'  analysis on the distribution of the cycles) The expected value for the first repetition (epact) is $\pi^2/ 12 \sqrt{\pi N /2} \approx 0.823 \sqrt{\pi N /2}$.

(Heuristic 14.2.10) The expected value of the epact is $ (0.823+\mathcal{o}(1)) \sqrt{\pi N /2}$

And the below theorem gives the result based on the above

Theorem. Let the notation be as above and assume Heuristic 14.2.10. Then the $rho$ algorithm with Floyd cycle finding has an expected running time of $(3.093 + \mathcal{o}(1))\sqrt{N}$ group operations. The probability the algorithm fails is negligible.

There are improvements of the algorithm and the analysis. One can see them on subsequent pages from the book.


What is the difference between sprain, dislocate and twist?

Question: What is the difference between sprain, dislocate and twist?
I am reading the definitions and I am honestly completely confused.
Can anyone explain the difference in a much simpler way?
Comment: You should at least tell us what definitions you've already read. Otherwise, someone might end up parroting them back to you, and no one will be better off than before.
Comment: Isn't this a medical question?
Answer: These all occur when a joint is overstressed.
A twist is generally a minor injury, involving hyperextension of muscles and tendons, and the like. A sprain occurs when the ligaments in a joint are injured, ranging anywhere from being overextended to being partially or completely torn. A dislocation occurs when bones are moved out of place, for example a shoulder being pulled out of its joint.


Do book drops happen in Adventure mode?

Question: Trying to pick up some achievements such as book drops, aside from some "same location different time" book drops, such as leah's diaries is it possible to find the books in adventure mode?
Answer: Many of them, yes, but not all of them. You will have to play in Story mode at least once if you want to find all of the lore books.
Answer: Yes, any of the books required for the achievement can be dropped in adventure mode, given that you are in the area where the book drop. Note that some of these books are more rare than others and might take several resets (leave game > create new game) before getting them.
Comment: There are a few other books that only appear during a specific quest (if my memory serves me right there is one of those in early act 4 in the basetown near the closed gate on the north side.)

Do book drops happen in Adventure mode?


How to make my own web comic site like xkcd?

Question: If you all are nerds like me then you are aware of xkcd.  If I wanted to go about creating my own web comic with a website layout similar to this one, then what would you recommend?  Drupal (if so, also refer me to any non-default modules that I would need), WordPress, straight up html?
Comment: I think it's fine here.
Comment: I believe that this question would be better suited for Stack Overflow.
Comment: I think he's looking for a platform and not a development stack (straight up html would be a nightmare).  Perhaps superuser would be the place to go.
Comment: I was migrated from serverfault, but since I didn't yet have a profile here, I don't own this question even though I wrote it.  That stinks.
Answer: Check out ComicPress, based on on Wordpress.
Answer: the simpler is Blogger, that you can custom to have the same layout.
Simpler because:

free (not like freedom)
easy to use
easy to custom (behavior, template, CSS...)
no installation
no worry about hosting
direct integration with Picasa for your pictures
you can use your own domain name
Useful widgets
Answer: You might consider Tumblr. Tumblr has most of what Blogger offers, plus it has a 'post-to-Twitter' feature. Also, Tumblr allows you to schedule when posts should be published (though to be fair, you can do this with Blogger too).


Indeterminate form $1^\infty$ vs. $0^\infty$

Question: Why is $1^\infty$ an indeterminate form while $0^\infty = 0$? If $0\cdot0\cdot0\cdots = 0$ shouldn't $1\cdot1\cdot1\cdots = 1$?
Comment: A very small number raised to a large power is even smaller.
Comment: $0^{+\infty}=0$, but $|0^{-\infty}|=+\infty$. [Here on Wikipedia](https://en.wikipedia.org/wiki/Indeterminate_form#Expressions_that_are_not_indeterminate_forms) it is mentioned that $0^{\infty}$ is not an indeterminate form because $0^{+\infty}$ is $0$ and $0^{-\infty}$ is $1/0$, which is not $0$, but still we know that $(0^+)^{-\infty}=+\infty$ and $(0^{-})^{-\infty}=-\infty$, or $|0^{-\infty}|=+\infty$.
Comment: @stevengregory $$\left(\frac1n\right)^n=\frac1{n^n}\stackrel{n\to\infty}\longrightarrow\frac1\infty=0$$
Comment: @stevengregory Yes... and why are you mentioning this?
Comment: Check out these two links:

https://math.stackexchange.com/questions/520795/is-0-infty-indeterminate?rq=1

https://math.stackexchange.com/questions/10490/why-is-1-infty-considered-to-be-an-indeterminate-form?rq=1
Comment: Or $0^{-\infty}$ could fail to exist. [See here on Wikipedia for more.](https://en.wikipedia.org/wiki/Indeterminate_form#Expressions_that_are_not_indeterminate_forms)
Comment: @user236182 Large and positive, if you will. (Assume $0$ refers to small and positive)
Comment: @SimplyBeautifulArt - sorry, I seem to be making a lot of mistakes lately.
Answer: To say that $1^\infty$ is an indeterminate form means that there is more than one object that can be $\lim\limits_{x\,\to\,\text{something}} f(x)^{g(x)}$ where $f(x)\to1$ and $g(x)\to\infty,$ so that the limit depends on which functions $f$ and $g$ are.
Thus
$$
\left.
\begin{align}
& \lim_{x\to\infty} \left(1+\frac 1 x\right) = 1 \quad\text{and} \quad \lim_{x\to\infty} \left( 1 + \frac 1 x \right)^x = e \\[10pt]
& \qquad \text{and} \\[10pt]
& \lim_{x\to\infty} \left( 1 - \frac 1 x\right) = 1 \quad \text{and} \quad \lim_{x\to\infty} \left( 1 - \frac 1 x\right)^x = \frac 1 e.
\end{align} \right\} \longleftarrow \text{two different numbers}
$$
Comment: Sir, I'm not sure if you can count, but that's three different numbers ;-)
Comment: @SimplyBeautifulArt : That depends on which numbers are referred to. However, there are of course three kinds of people in the world: those who can count and those who can't.
Comment: LMAO $\vphantom{....}$
Answer: I want to address two questions here:

1. What does we mean when we say $1^\infty$ is indeterminate?

First of all, we should understand what $1^\infty$ means. It is not the product $ 1 \cdot 1 \cdot 1 \cdots$. Instead, what it represents is that if you have two limits $\lim_{n \to \infty} x_n = 1$ and $\lim_{n \to \infty} y_n \to \infty$ then we cannot determine the value of $\lim_{n \to \infty} (x_n)^{y_n}$.
What does it mean not to be able to determine the value of a limit? It means that the value of the limit depends on the sequences we choose. That is, we could have two pairs of sequences $(x_n, y_n)$ and $(x_n', y_n')$ where $x_n, x_n' \to 1$ and $y_n, y_n' \to \infty$ but
$$ \lim_{n \to \infty} (x_n)^{y_n} \ne \lim_{n \to \infty} (x_n')^{y_n'}. $$
This is different than a determined form. For instance if $x_n \to 1$ and $y_n \to 2$ then we will always have
$$ \lim_{n \to \infty} x_n + y_n = 3, \qquad \lim_{n \to \infty} x_n y_n = 2 \quad\text{ and }\quad \lim_{n \to \infty} (x_n)^{y_n} = 1 $$
regardless of what the sequences $x_n$ and $y_n$ are.

2. What makes $1^\infty$ different than $0^\infty$?

For the form $0^\infty$ we are trying to find the limit of $(x_n)^{y_n}$ where $x_n \to 0$ and $y_n \to \infty$. By definition, $x_n \to 0$ means that for every $\varepsilon > 0$, $|x_n| < \varepsilon$ eventually (for all $n \ge$ some $N = N(\varepsilon)$). In particular, we can take $\varepsilon = 1/2$. Then if $n$ is large enough,
$$ 0 \le \left| (x_n)^{y_n} \right| \le \left| (1/2)^{y_n} \right| \to 0 $$
as $n \to \infty$. It follows that $\lim_{n \to \infty} (x_n)^{y_n} = 0$.
What you'll notice is that $1/2$ could have been any number between $0$ and $1$. That is, if $x_n$ is "close to $0$" in the sense that $|x_n| < r$ and $r < 1$ then we can conclude that $\lim_{n \to \infty} (x_n)^{y_n} = 0$.
Note that we cannot conclude this for $1^\infty$. That is, when we try to approximate $x_n$ by $1 +$ some error then it matters what the error is. For $0^\infty$ as long as the error is $< 1$ then we can conclude that the limit is $0$. But for $1^\infty$ if the error is

positive, then $(1 + \text{error})^{y_n} \to \infty$
zero, then $(1 + \text{error})^{y_n} \to 1$
negative, then $(1 + \text{error})^{y_n} \to 0$

This gives us no information about the value of $\lim_{n \to \infty} (x_n)^{y_n}$ and indeed, we can find sequences $x_n$ and $y_n$ where $(x_n)^{y_n}$ tends to $\infty$ or $1$ or $0$. In fact, we can make $(x_n)^{y_n}$ converges to any given real number $\ge 0$ or infinity.

Appendix: a sketch of a construction of sequences $x_n$ and $y_n$ such that $x_n \to 1$, $y_n \to \infty$ and $(x_n)^{y_n} \to r$ where $r \in (0, \infty)$. (Try finding sequences for $r = 0, \infty$ as an exercise.)

Let $p_n/q_n$ be a sequence of rational numbers converging to $\log(r)$ where the denominators, $q_n \to \infty$. For instance if $\log(r) = 2$ we could take the sequence $2/1, 20/10, 200/100, 2000/1000$ and so on.
Consider the limit
$$ \lim_{n \to \infty} \left( 1 + \frac{1}{q_n} \right)^{p_n} $$
which we can take logarithms and use a Taylor series for $\log(1 + x)$to get
\begin{align}
\log\left( \lim_{n \to \infty} \left( 1 + \frac{1}{q_n} \right)^{p_n} \right) &= \lim_{n \to \infty} p_n \log\left( 1 + \frac{1}{q_n} \right) \\
&= \lim_{n \to \infty} p_n \left( \frac{1}{q_n} - \frac{1}{2q_n^2} + \frac1{3q_n^3} - \frac{1}{4q_n^4} + \cdots \right) \\
&= \lim_{n \to \infty} \frac{p_n}{q_n}\left( 1 - \frac{1}{2q_n} + \frac1{3q_n^2} - \frac{1}{4q_n^3} + \cdots \right) \\
&= \lim_{n \to \infty} \frac{p_n}{q_n} \left( \lim_{n \to \infty} 1 - \lim_{n \to \infty} \frac{1}{2q_n} + \lim_{n \to \infty}\frac1{3q_n^2} - \cdots \right) \\
&= \log(r)(1 - 0 + 0 - \cdots) = r.
\end{align}
Therefore $\left( 1 + \frac{1}{q_n} \right)^{p_n} \to r$. (I am sweeping some details about swapping limits with summations under the rug.)
Comment: I like this answer because it makes a point at the very beginning that calling something an "indeterminate form" has a very particular meaning. The phrasing of the question suggests that OP has forgotten (or has never received) this meaning, so this seems to go at the heart of the matter.
Comment: Very nice answer. +1 the idea is represented via sequences and can be easily transformed into the limit of functions of a real variable. So the use of sequences makes no essential difference.
Answer: It is far easier to think about these indeterminate forms by taking logarithms.
$$  \ln\left( f(x)^{g(x)} \right) = g(x) \ln f(x)  $$
If $f \rightarrow 1$ and $g \rightarrow \infty$, you have an $\infty \cdot 0$ indeterminate form.
If $f \rightarrow 0$ and $g \rightarrow \infty$ you have an $\infty \cdot - \infty$ form, which is not indeterminate at all.  In fact $$  \exp \ln(f(x)^{g(x)} ) \xrightarrow{f(x) \rightarrow 0, g(x) \rightarrow \infty} \exp(- \infty) \rightarrow 0  \text{.}  $$

Without logarithms...
Here are three different $1^\infty$s:

$\lim_{n \rightarrow \infty} (2^{1/\ln n})^n = \infty$
$\lim_{n \rightarrow \infty} (2^{1/n})^n = 2$
$\lim_{n \rightarrow \infty} (2^{1/n^2})^n = 1$

Only the last one is doing what you seem to expect.  This is because $1/n^2$ is going to $0$ faster than $n$ can overpower.  When that doesn't happen we can arrange for other limits.
Now any indeterminate form $0^\infty$ is $f(x)^{g(x)}$ with $\lim_{x \rightarrow L} f(x) = 0$ and $\lim_{x \rightarrow L} g(x) = \infty$, where $L$ is either a real number or, if it is either of $\pm \infty$, adjust the following as appropriate.  Since $\lim_{x \rightarrow L} f(x) = 0$, there is a neighborhood of $L$, $(L-d, L+d)$, on which $|f(x)| < 1/2$.  So let's look at what happens to $(1/2)^{g(x)}$ as $x$ gets close to $L$.  For $\lim_{x \rightarrow L} g(x) = \infty$, there is an $e_1$ such that $g(x) > 1$ on $(L-e_1, L+e_1)$.  Similarly, $g(x) > 2$ on some $(L-e_2, L+e_2)$, and so on for some sequence of nested open sets collapsing toward $L$.  Eventually, there is some $N$ such that $(L-e_N, L+e_N) \subseteq (L-d, L+d)$, so talk about choices of $n > N$.  On $(L-e_n, L+e_n)$, $(1/2)^{g(x)} < (1/2)^n = 2^{-n}$.  That is, $(1/2)^{g(x)}$ shrinks to $0$ as $x$ approaches $L$.  If, instead of $1/2$, we use the actual, smaller magnitude values of $f$, $f(x)^{g(x)}$ approaches $0$ also.  There's no indeterminacy here.


How to store data to temp table from Stored Procedure With Output parameter?

Question: I have a stored procedure which return result by setting multiple output parameter. I want to store those output parameter values to temp table, how can I do that?
Answer: You can create a temp table as follows:
<code>create table #temp_table_name
(
    firstOutputParam int,
    secondOutputParam varchar(50),
    thirdOutputParam varchar(150)
)
</code>
Since the stored procedure is executing, the temp table will remain valid until the end of the execution.