Xamarin: Setting text for a TextView programmatically

Question: This is probably a mistake or lack of comprehension on my part, but I am quite confused right now. I'm trying to set a TextView in my Xamarin Android application programmatically. Here's my code:

TextView currentCharacterName =
  FindViewById(Resource.Id.characterName);
  currentCharacterName.SetText("test");

Unfortunately, this does not work, as I get the error "Argument 1: cannot convert from 'string' to 'int'". After reading in the available methods for SetText, I noticed the method I'm trying to call demands a ResId. I don't really understand why I would need a ResId to modify the text of a TextView.
I tried searching on Google for answers, and I came across this answer from 2014 that had the exact same problem as I do. The solution was to use the Text() method instead to set the TextView. Unfortunately, when I try this solution, I get the error "Non-invocable member 'TextView.Text' cannot be used like a method". When I try to check the Text method description, I see "string TextView {get/set} To be added."
Does this mean there's no implementation yet to set the text of a TextView? I am really reluctant to believe this, as it baffles me that such a big framework like Xamarin wouldn't even have get/set functions for something as simple as setting the text of TextView. I feel like there's a very simple solution for my problem, but I can't seem to find it.
Comment: generally java style get* and set* methods are replaced with C# style Properties.  So getText() and setText() would be replaced by a single Property named Text.
Answer: TextView.SetText(X) allows you to set the text from a Resource id:
currentCharacterName.SetText(Resources.Id.MyString);

You are looking for the Text property:
currentCharacterName.Text = "test";

Xamarin: TextView class

Android.Widget.TextView.Text Property
Syntax:
public String Text { get; set; }
Comment: Ah I saw my mistake! I wrote Text("test") instead of Text = "test"! Thank you so much, that was really silly of me.
Answer: Test this code:
TextView currentCharacterName = FindViewById<TextView>(Resource.Id.characterName);
currentCharacterName.Text = "Your Text";


Striking pedals on a full suspension bike

Question: I just change my old hardtail (Marlin 5-TREK) for a full-suspension bike (Siskiu D7). The bike runs smoothly, but I notice how frequently strike my pedals with the ground and other obstacles. I already adjusted the SAG and checked the pressure of my rear shock, but still happens. I have found that some people have experienced the same problems when they change to full suspension, but I did not have found a clear explanation why is this happening. Is the technique so different? the geometry?
Using the website 99spokes.com I noticed that even the full-suspension bike is higher from the floor than my previous bike. However, with the hardtail, to strike my pedals just happened occasionally. Thanks
Comment: What is your Crank length, and height of BB above ground, and pedal axle length on both bikes, when loaded?
Comment: Same pedals on both? I think it's a lot less common with clip-in pedals.
Answer: Yes, while it is a common enough problem for people moving from hardtail to softtail, it can also happen when people change bikes of the same type but different geometries. The lowering of the BB when the front and rear suspension are compressed is more pronounced than when you are on a hardtail. The BB height becomes more dynamic, and to begin with pedal strikes occur when the suspension is compressed while cornering or going over obstacles. (Compressing though corners is a good thing - don't stop doing it to avoid pedal strike)
I had this issue when I moved to softtail. The good news is you quickly learn the characteristics of you new bike, and instinctively manage the loading of the suspension long with bike lean and terrain to avoid strikes. If you still suffer pedal strikes, its likely technique - learning correct techniques (plenty of videos online to help) will practically eliminate pedal strike.
Pay attention to when its happening, adding more damping may help, as will increasing shock pressure. While adding pressure is really only masking the problem, as a temporary measure as you transition to the ride and feel of a softtail I am not against it.
As far as shock tuning - hit a local trail you love to ride and know well, pick a short (50-100meter) sweet section, and session it, changing pressure and damping/rebound to get a feel for what works for you and not. If the book says "Set sag to 25%" and you like it at 10%, then 10% is correct. Likewise, if it says "Set pressure to 120psi" and you like 90psi with lots of damping, 90 with lots of damping it is. Main thing is as you get used to the bike you preferred settings are likely to change, shock settings are not a 'set and forget' thing.
Comment: OK, so this seems to be a learning curve, thanks for you detailed explanation
Comment: @Jonathan Pacheco  There was definitely some getting used to the lower BB of my Stumpjumper full suspension to avoid pedal strikes.  The first week the strikes were 2-3 times a ride. By three weeks in, they were very rare AND I was faster and more daring on the single tracks. I rode almost daily after work for a couple hours. A good suspension set up is integral to your performance and enjoyment.  mattnz advice of repeating a short section with a variety of features while you experiment with the tune is solid. It helps to change one parameter at a time.


F# and Visual Studio 2010 Express Edition?

Question: Is there any way to work with F# on Visual Studio 2010 Expression Edition. I am having Visual Studio 2010 Express Edition Beta 2.
Answer: There won't be Visual F# Express but you can use the free Visual Studio Shell (wich is available for 2008 and 2010) with F#. It works perfectly for 2008 but I have not tested it with 2010.
Update:
The release of F# 2.0 works with the 2010 Integrated shell as well; see Don Syme's blog post "Announcing the F# 2.0 Free Tools Update".
Update:
Visual F# tools 3.1.1 now support VS Express for Desktop and VS Express for Web
Answer: Unfortunately, there are no plans to include an F# Express edition for Visual Studio 2010.  The express editions for 2010 are:

Visual Basic 2010 Express
Visual Web Developer 2010 Express
Visual C# 2010 Express
Visual C++ 2010 Express

Source of above.
Comment: Also see this: http://talbottc.spaces.live.com/Blog/cns!A6E0DA836D488CA6!485.entry
Comment: @Richard - Thanks. Much better reference as it also mentioned the future
Answer: While F# is not included in VS2010 Express, it appears to be supported in VS2012 Express Web Edition.

Visual Studio Express 2012 for Web ... is a free
  development environment that programmers can use to build projects
  such as ASP.NET applications and Windows Azure cloud services. This F#
  Tools release adds in F# 3.0 components, such as the F# 3.0 compiler,
  F# Interactive, IDE support, and new F# features such as type
  providers and query expressions.

- MSDN
Comment: I am using F# in VS2010 just fine - I believe it is included in the default install.
Comment: My mistake, I meant VS2010 Express. Fixed.


What plants have random drops as of version 2.031 in cookie clicker?

Question: I don't know what plants to farm for the drops, i already got the wheat thins from baker's wheat, but what are the others and what do they drop? also E cuz achievement.
Answer: From the wiki, there are 7 upgrades that can drop from harvesting mature plants.  They are:

Elderwort: 1% chance of Elderwort biscuits - +2% cookie production and grandma production
Bakeberry: 1.5% chance of Bakeberry cookies - +2% cookie production
Duketater: 0.5% chance of Duketater cookies - +10% cookie production
Green rot: 0.5% chance of Green yeast digestives - +1% golden cookie gains, effect duration, and frequency; also +3% random drops
Baker's wheat: 0.1% chance of Wheat slims - +1% cookie production
Drowsyfern: 1% chance of Fern tea - +3% cps while the game is closed
Ichorpuff: 0.5% chance of Ichor syrup - +7% cps while the game is closed, sugar lumps mature 7 minutes sooner

Of these, the most important to get first is probably Green yeast digestives because it increases the chance of all other drops by 3%.  You can also use the Mind Over Matter aura to increase the chances of obtaining these random drops by 25% (multiplicatively, not additively).
Comment: @Parkerdaboss216 if this answers your question, please upvote and mark the answer as accepted.
Comment: im not that far into game, only about 400 prestige level, i was just wondering because i was farming meddleweed for drops but then on the wiki, it said there was only 7 drops
Comment: Thanks m8, much appreciated, i have so many questions cuz i just found this site on a school chromebook and it somehow wasn't blocked, so it seemed like the perfect site to ask questions. i dont have any of those particular plants unlocked but i can actually get them, i have the right plants to breed, but my luck is absolute garbage. so thank you for responding.
Comment: idk how to close it so...
Comment: imma just upvote and check it


Is Superman the same species as humans?

Question: Lois can interbreed with Superman in Superman Returns.
Does that mean Superman is a subspecies of Homo Sapien?
Comment: @JimmyShelter: That's *one* working definition of "species"; there are several others.
Comment: If they can produce viable offspring, that is the biological definition of "species".
Comment: I believe there's a false assumption in this question though.  Superman Returns was a pseudo-sequel to Superman II, where Clark undergoes a treatment to become human so he can be with Lois, but eventually reverses the process to return to his Kryptonian biology.  Therefor during conception, both parents where for all intents and purposes human.
Comment: @JimmyShelter (and whoever upvoted that comment): Darwin called. He wants his 19th century biology textbooks back.
Comment: @Adeetya That's not true. From the wiki page: http://en.wikipedia.org/wiki/Hybrid_%28biology%29 "Hybrids between different genera (such as between sheep and goats) are known as intergeneric hybrids. Extremely rare interfamilial hybrids have been known to occur (such as the guineafowl hybrids).[3] No interordinal (between different orders) animal hybrids are known."
Comment: Classification is always a problem in science. There are always exceptions because these designations are being applied to incomplete and/or non-segmented pools of data. This problem doesn't just apply to what constitutes a species, it also is a problem for what constitutes life. And what is really a crystal. And what is really a planet. And what is really a star. And so on..
Comment: The core problem is that we simply don't know what "species" (or "genera", or "phyla") are, or if they even exist.  These are all fairly arbitrary concepts invented by humans and superimposed over the world around us to make it easier to describe things.  A bit like Pluto, actually.  Pluto is what it was before we discovered it, regardless of whether we call it a planet, or a planetoid, or a smallish space rock.
Comment: @JimmyShelter the key word in your definition is 'viable'. In all the quotes I have seen that word is replaced with 'fertile'. I have not seen the film, but are Supermans children fertile?
Comment: If two organisms can interbreed they must be of the same Genus ATLEAST.. therefore superman must be homo something whereas humans are homo sapiens
Comment: Yep, the phylogenetic tree and scientific taxonomy have been through many changes throughout their history; branches are moved/merged/split, taxonomic ranks changed, and a new domain has been created. Even concepts like race and gender are not what we once thought them to be.
Comment: Superman is not human. This has been specified many times in the comics. Many aliens seem to be able to interbreed with humans, but hey, comics.
Answer: In the 'Superman Returns' continuity, the answer is MAYBE.
"Superman Returns" implied there is a measure of compatible genetic material between Humans and Kryptonians of a sufficient nature to allow offspring between the two. How viable the offspring of the two of them would be is never discussed.

Since it is possible to breed two animals and produce non-viable offspring (not able to reproduce in the future) there is the possibility their son was sterile. He would be similar to a mule. A mule is the offspring of a male donkey and a female horse. Horses and donkeys are different species, with different numbers of chromosomes. A mule is sterile.

Caveat:

Each movie continuity should be treated separately unless otherwise stated as a continuation of a previous movie or series.

While the idea of Human/Kryptonian hybrids was very popular in the Silver Age, the development of offspring between Humans and Kryptonians has been off the table since the DC Post-Crisis Man of Steel series by John Byrne.

In the DC Universe
NO, Humans and Kryptonians are not the same species, and given the genetic enhancements to the Kryptonian genome, it is unlikely (no matter what Superman Returns has shown) there could be any form of successful interbreeding between the two species without the help of advanced genetic manipulation technology.

Superman and Kryptonians in general, only share one characteristic with human beings; our external physical, bilaterally symmetrical appearance.

Kryptonians sufficiently resemble Humans enough for them to be able to pass as Human but only from a cursory physical inspection.

Any trained medical personnel should be able to determine a Kryptonian is not Human with only a modest toolkit of scientific equipment.

The only possible exception to this would be if the Kryptonians applied their transgenetic superhuman abilities once the child exited the womb/test tube. Then the possibility could exist that Humans and Kryptonians could be of similar species at the genetic level.

This idea is not as far-fetched as it initially might sound; the Kryptonians were inclined to develop their offspring in vitro (outside of the womb) using genetic technology. This has been part of the mythos since the very early Superman movies.

Speculation

Despite the comic industry's belief that the Kryptonians would have developed their powers naturally, I stand by the idea that such powers were the result of technological enhancement in the distant Kryptonian past.

The technology which gives Kryptonians superpowers under a yellow sun were engineered, not born, no matter what has been written in texts because the range of such powers, the diversity and the specific defensive nature of those powers indicate a significant genetic enhancement program, not the random development of mutation, even after tens of thousands of years.

Such powers would make for formidable scouts, explorers and warriors. Since the worlds compatible with Kryptonians would likely be found around yellow stars, it is a logical development to ensure the successful establishment of colonies around such worlds.

Since 80% of the stars in our galaxy are red, it means around most stars, Kryptonians would have no superhuman abilities, increasing the possibility their powers were DESIGNED to give them an advantage on worlds compatible with their genome.
Comment: With regard to your last points, that is perhaps the way they *should* have written it, not the way they *did* write it, sadly. I've always had issues with genetic powers in general, though, since they tend to create lots of fridge logic issues, but they're a popular way to add a veneer of "science" to basically supernatural phenomena. Even heritable powers can pose a bit of an issue for worldbuilding (depending of degree of heritability and when it manifests), but genetic powers are the worst.
Comment: The two questions I think everyone writing heritable (or especially genetic) powers should ask themselves are 1) Does this describe a stable situation? Highly heritable powers (let alone the ever-popular 100% heritability) offering a heavy survival advantage would very quickly become the dominant genome. 2) If this can be engineered, why hasn't it? Right now, we have a limited understanding of genetics, but the main obstacles to "improving" humanity via genetics are a justifiable fear of eugenics, and tradeoff. Those objections would melt away if there were a free gene for teleportation, say.
Comment: I like your (implied) solution to the second issue, though. The Kryptonians can, and *did* engineer their entire species to have super-powers.
Comment: is there evidence that they have DNA? if so, this is not DNA that would be damaged by radiation? or perhaps protected by skin?
Answer: http://en.wikipedia.org/wiki/Man_of_Steel,_Woman_of_Kleenex details the actual problems the two would have to overcome during sexual intercourse.
http://www.rawbw.com/~svw/superman.html is the actual text.
To summarise: it ain't gonna happen.

But that doesn't answer the question whether Kryptonians and humans are the same species. Of course being able to interbreed (which Niven states isn't possible) doesn't mean the two are of the same species. Interspecies crossbreeding is often performed in order to create hybrids between species. All it requires is a high enough level of genetic similarity between the species, which usually indicates a common ancestor not too far down the inheritance tree (e.g. a lion and a tiger afaik can be bred together, despite being different species).
So if the movie is correct in postulating that cross breeding the two is possible (despite the counter arguments as to the actual problems of performing such an act as presented by Niven), all we can ascertain is that they have a relatively recent common ancestor (which could hint at panspermia, the idea that life on different planets originates at the same point).
Comment: "a lion and a tiger afaik can be bred together" — indeed, [mostly for the offspring's skills in magic](https://en.wikiquote.org/wiki/Napoleon_Dynamite#Dialogue). Did you know that if the father is a lion, it's a [liger](https://en.wikipedia.org/wiki/Liger), but if the father is a tiger, it's a [tigon](https://en.wikipedia.org/wiki/Tigon)?
Answer: TL;DR: Most likely, the answer is "NO, different species", if we consider it in light of modern biology and "Species Problem".

Details:
Depends entirely on your definition of "species" (see "Species Problem" Wikipedia entry in detail).
Let's start with Wikipedia definition of "species" (emphasis and ellipses mine - DVK):

In biology, a species is one of the basic units of biological classification and a taxonomic rank. A species is often defined as a group of organisms capable of interbreeding and producing fertile offspring (Note: often, not always. Discussed below).
While in many cases this definition is adequate, the difficulty of defining species is known as the species problem. Differing measures are often used, such as similarity of DNA, morphology, or ecological niche.

Now, if we take simplistic a group of organisms capable of interbreeding and producing fertile offspring definition, then Superman MAY be considered the same species as Lois... IF their children are fertile. As far as I'm aware from canon, merely having a child was the extent of the information, we don't know whether the child is fertile or sterile, so a weak "MAYBE" is the best we can do as an answer.

Now, that's of course not really how the messy science (and reality) of biology works. For example, we have genetic evidence that Homo Sapiens likely actually interbred with a different species, Homo neanderthalensis.

In addition, other interspecies hybrids are known to be fertile: Ligers (and even Tigons though the latter is iffy) are tiger+lion hybrids that can be fertile. Nevertheless, tigers and lions aren't even remotely the same species - meaning, even our original naive "MAYBE" answer turns to "likely NO, different species" if we consider what we know of modern biology.

If we take DNA (clearly Kryptonian DNA is different), morphology (the cells are WAY different since they give him non-human powers) or ecological niche (Krypton vs Earth), the answer is a firm "NO, different species"
Answer: It means that the writers wanted Lois and Clark to make babies, biological considerations be damned.
There's no reason to expect Kryptonian life to use the same molecular machinery for heredity that Earth life does; they may not use DNA at all, or if they do, their DNA may use different bases, or if they use the same bases, their genetic code may be different, etc., etc., etc.
There's no reason to expect that their naughty bits would be compatible with ours, or that their mechanism of reproduction would resemble ours in any way.
Now, convergent evolution is certainly possible; based on my very limited knowledge of physics and chemistry, I believe that any other life out there would at least be carbon-based and use many of the same compounds we do (we've found sugars, alcohols, and even amino acids floating around in space).  There's a strong likelihood that, at the molecular level, things wouldn't be too alien.  But replicating each other's evolutionary history to the point where we'd produce life forms that are similar enough to breed with each other?  I don't want to think how many zeros are in that probability value.
Star Trek has the same problem all over the place (Spock, K'Ehleyr, Alexander, B'Elanna, all the Romulan-Klingon hybrids Worf found that one time, etc.).  They tried to address it in canon, but frankly it's a mess all the way around.
Answer: To answer your question truthfully.   Yes and no.  Kryptonian and most humaniod race in fiction are essential evolved from the homo gene which technically make them sub species of humans.   But the catch is kryptonian are advanced humans.  That has been the origin since day one.  Alien doesn't mean different species.   It mean from outside that area.  Thats why most humanoids can breed.  Because they are essentially the same, meaning of the homo gene.  But it doesn't always work out like that as dog and cats are said to come from the same ancestors.   Its a loaded question.   Also they have a son in comics too so that is canon.
Comment: we're descended from monkeys not cryptonians. that I know for sure.
Answer: It may be worth noting that in one comic continuity the Kryptonian Adam and Eve myth, which may or may not be true, has the Kryptonian people descended from astronauts from two different worlds.
Specifically Superman #238 (1971) tells the myth about Kryp meeting Tonn.  See details at https://www.geekgirlauthority.com/nerdy-love-letters-superman-planet-krypton/
So this would leave open the possibility of a Battlestar Galactica style origin for both humans and Kryptonians being not from here but somewhere out there.
This story has some similarities to the Twilight Zone episode "Two" starring Charles Bronson and Elizabeth Montgomery.
Of course if Star trek can treat interplanetary hybrids as trivial despite the biological absurdity certainly Superman can too.

Is Superman the same species as humans?


Why can two functions represent the same preferences?

Question: I wonder why two functions can represent the same preferences?
Comment: Well what does it mean that a function represents a preference?
Answer: Suppose I strictly prefer Apple ($A$) to Banana ($B$) and that these are the only two goods in existence.
Consider the following functions:†

The function $u$ with $u(A)=1$, $u(B)=0$.
The function $v$ with $v(A)=-99$, $v(B)=-100$.
The function $w$ with $w(A)=0.1$, $w(B)=0.01$.

Each of the above functions correctly represents my preference because in each case, the function's value at $A$ exceeds that at $B$.
A utility function (representation) is merely a (very) convenient way to numerically encode my preference. Here there are only two goods and I prefer $A$ to $B$. So, any function whose value at $A$ is greater than that at $B$ would correctly represent my preference.
In this example, we have only two goods, so a utility function isn't particularly useful or convenient.
But with more goods (and sometimes also more assumptions), utility functions can help to produce useful results that tell us something about the real world.

†Real-valued, with domain $\{A,B\}$.
Answer: We say that two utility functions represent the same preferences because the current utility theory is ordinal, rather than cardinal, which means that we do not care about the specific number that a consumption bundle gives us when we plug it into the function, we only care about the order of preferences, i.d. whether u(A)>u(B), u(A)=u(B) or u(A)


What happens when there is a 5k unpaid water bill in pa on a home you are looking to buy? No title insurance allowed until 4months after the buy

Question: The home I am currently looking to buy has an unpaid water/sewage bill of 5k. The previous owner had not paid on. The seller I am buying the home off of has only had it under a year so no title insurance was had. The seller had never received any paperwork of the past due bill, this bill was never put under to be considered a "lei." Yet. Is there a certain also time frame to where this should be wiped from record ? The water company also said as a potential buyer I would not be able to subdue a payment plan nor get any information further because I am not the owner.
Comment: Unless the seller pays the lien as part of closing the deal...
Comment: There are several things about this post that suggests the poster should engage a real estate lawyer (or equivalent in his/her jurisdiction) for this transaction.
Comment: What do you mean by title insurance not being "allowed"?
Comment: usually, such a bill would be a lien on the property, making sale impossible till it is resolved.
Comment: the worst case is if you buy it the water company expects you to pay before you can get water service.  I would not buy a house with this problem.
Comment: I think there's a good question in here about the legality of a public utility denying future service to a new owner, owed money by a previous owner.  If the OP would edit to make this non-personal, not asking for legal advice, and not voiding the existing answer, I would vote to reopen.
Answer: We can't give you specific advice on your case, but we can say what the general situation is w.r.t. the law. When you buy real estate, you may also acquire an obligation to pay the debts of another. This is usually implemented via a property lien, where a creditor may file paperwork asserting a claim against the property, which allows the creditor to seize the property as part of the process of satisfying the debt (the creditor files papers, the sheriff sells the property). A person who is not the debtor can potentially lose their property if the lien is not satisfied. Non-payment of utilities is one kind of debt that can involve a lien.
Real estate sales differ substantially from the sale of a bushel of apples, where you can hand over $10 in exchange for the bushel of apples and be done with it. Observing proper formalities is important for real estate sales. Handing over a wad of cash in exchange for the keys to a house does not make you the legal owner. Hiring a lawyer and having title insurance is a standard way for buyers to protect their interest in real estate. You should note that if the government makes a mistake in reporting liens against a property, the government is not liable for your loss, therefore you have to be certain that there is no lien (not just "don't think there is"), which is what title insurance is about.


Is an algebra homomorphism between two finitely generated algebras over a field automatically an integral morphism?

Question: I'm having a bit of trouble with the idea of an integral morphisms, and algebra homomorphisms for that matter. I'm wondering if the above is just "automatically" true. Does an algebra over a field always carry a "copy" of the field? I have seen that "if $m$ is a maximal ideal of $A$ then $A/m$ is a finite field extension" which makes me think yes, but then are trivial algebras allowed like "$A=\{0\}$"? thank you for your help, km very confused.
Answer: No, it is not true. For example $k$ and $k[x]$ are two finitely-generated $k$-algebras, but the inclusion $k \to k[x]$ is not integral ($x$ is not the root of any monic polynomial, pretty much by definition of the polynomial ring $k[x]$).
Answer: As for your second question, note that any $k$-algebra $A$ has, by definition, a homomorphic image of $k$ in $Z(A)$, the center of $A$. However, if $A \neq 0$, then since non-trivial field homomorphisms are actually embeddings, therefore a copy of $k$ does indeed sit inside $A$.
Comment: Unless $A=0$ is the zero algebra.
Comment: Yes of course, I just wanted to clarify that it's possible for the unit $k \to A$ to actually be a trivial homomorphism (iff $A = 0$, in fact).
Comment: That's why I said non-trivial field homomorphisms.


Can you store a spell that takes longer than 1 action into a glyph of warding?

Question: Can you store a spell that takes longer than 1 action into a glyph of warding? One example would be magic circle with a casting time of 1 minute. Would it be possible to store the spell and if so, will the magic circle be produced once the glyph triggers or will it take the 1 minute casting time?
Answer: All the conditions for storing a valid spell are met, there is no such restriction that requires the spell stored needs to cost 1 Action.
As for the second question, it will trigger immediately since the text in Glyph of Warding: Spell glyph says

You can store a prepared spell of 3rd level or lower in the glyph by casting it as part of creating the glyph.

You've already spent the 1 minute to cast Magic Circle as part of the 1 hour to cast Glyph of Warding but the energy is held until the trigger occurs.
Comment: Sorry to necro this answer, but what if the spell has a higher casting time than 1 hour? Simulacrum takes 12 hours to cast, for example.
Comment: I think this would merit a question on its own, RallozarX. It is an interesting question...my intuition would say it takes the longer amount between the two spells, otherwise you could cheese long casting times into a Glyph of Warding, then trigger the long casting time spell by simply stepping into the glyph.
Answer: You can store spells of any casting time, as long as they are legal
The only condition about the spells to be stored are

The spell must target a single creature or an area.

(There also is a condition that the spell must be of third level or lower, but you can circumvent it by casting the glyph on an aproppriately higher level). Since there is no condition about the spell's casting time, you can store a spell of any casting time.
What is the casting time?
Glyph of Warding's text says

You can store a prepared spell (...) in the glyph by casting it as part of creating the glyph.

When you create the glyph, the overall casting time is thus 1 hour (the casting time of glyph of warding), plus the time it takes to cast the stored spell. If you cast a 1 action spell into the glyph, the overall process will take you one hour and one action. If you cast a spell with a casting time of one minute (for example, Geas) the overall process will take you one hour and one minute. If you  store a Simulacrum spell in the glyph, the process will take 13 hours.
Is there a delay when triggering based on casting time?

When you cast this spell, you inscribe a glyph that later unleashes a magical effect. (...) The spell being stored has no immediate effect when cast in this way. When the glyph is triggered, the stored spell is cast.

The meaning of "is cast" (confirmed by the accepted answer) in this context is that the time to cast the stored spell was already spent during process creating the glyph, triggering now finishes the casting of the spell, and it is released. There is no additional casting time, not even an action. The effect is immediate.


Inductor choice for passive filter

Question: I need to design a band-pass passive filter with pass band 10kHz~150KHz. One of the needed inductor is 2.2mH. I find there are two choice: Axial type or Can type. But it seems they are designed mainly for EMI filter. May I use them in signal chain filter?
Comment: Look at Stackpole Ferrite Core, with low-loss materials.
Comment: Are you dealing with tiny signals? The self-shielding (can-type) might reject stray magnetic fields better than axial. A high self-resonant frequency would be preferable.
Comment: Why 2.2mH? What source/load impedance + AC current?  This range tends to have low SRF and high DCR or are too big.  Any specs on phase shift? or group delay or bandstop slope?
Comment: The input signal is low signal of several mVs to 20V. Source impedance about 50Ohms, input impedance of the back end is about 1 MOhms. Yes, the above two inductor both have relative low SRF, only around 1MHz
Comment: The Q is usually poor at 2.2mH, which also tend to have high leakage capacitance, unless it is a huge toroid with heavy gauge wire. But it may be ok with the tiny current your working with.
Answer: For a 50 Ohm filter, the 2.2mH choke you linked has 7.5Ohm "may" shift a breakpoint up 1 order of magnitude near 1kHz, resulting in 20dB less attenuation below that.   Other chokes are available (at higher current ratings not needed) with 0.25 Ohm that will work better for low-frequency rejection.  https://uk.farnell.com/hammond/1537n/rf-choke-500uh-5-3-2a-axial/dp/2759969
BTW you can get a perfectly flat Bessel PB response with a 50 Ohm load, albeit -6dB unless you  buffer the input to ~ 0 Ohms
Here's a simple 4th order approximation.
You could also make it an 8th order active filter. with a quad OA with no chokes.

Inductor choice for passive filter


Can signals be caught and handled in python in-between reference counting operations?

Question: Obviously the GIL prevents switching contexts between threads to protect reference counting, but is signal handling completely safe in CPython?
Answer: Signals in Python are caught by a very simple signal handler which, in effect, simply schedules the actual signal handler function to be called on the main thread. The C signal handler doesn't touch any Python objects, so it doesn't risk corrupting any state, while the Python signal handler is executed in-between bytecode op evaluations, so it too won't corrupt CPython's internal state.
Answer: A signal could be delivered and handled in the middle of a reference counting operation. In case you wonder why CPython doesn't use atomic CPU instructions for reference counting: They are too slow. Atomic operations use memory barrier to sync CPU caches (L1, L2, shared L3) and CPUs (ccNUMA). As you can imagine it prevents lots of optimizations. Modern CPU are insanely fast, so fast that they spend a lot of time doing nothing but waiting for data. Reference increment and decrement are very common operations in CPython. Memory barriers prevent out-of-order execution which is a very important optimization trick.
The reference counting code is carefully written and takes multi-threading and signals into account. Signal handlers cannot access a partly created or destroyed Python object just like threads can't, too. Macros like Py_CLEAR take care of edge cases. I/O functions take care of EINTR, too. 3.3 has an improved subprocess module that uses only async-signal-safe function between fork() and execvpe().
You don't have to worry. We have some clever people that know their POSIX fu quite well.


Quoting another poem in your own

Question: I wanted to intentionally reference a famous Dylan Thomas poem in a poem of my own.
I wondered whether there is a convention for how to do this or if it is 'allowed' at all.
Answer: You can quote the line or words from Thomas using quotation marks or italics. Mentioning Thomas in the poem is one possibility. You can also reference Thomas in the title or in a note afterward.
Answer: Helena, you can quote in a poem. Use inverted commas to make sure that the reader knows that they aren't your words. Say something like 'as Thomas said' or 'as the poet said', so it makes it very clear.
Answer: rolfedh's concise answer seems sufficient, but the following long answer may add some value.
The question of how to quote another's work in one's poetry has two components: how the quotation should be demarcated and how attribution should be expressed.
Demarcation of Quotations
Using quotation marks is the most straightforward way of indicating a quotation and is the most appropriate for expressing a distinction between the quoted material and the statements of the poem's speaker. This separation may be desired when the quoted text is argued against, used an appeal to authority, or set up for more abstract consideration. Quotation marks, like other punctuation, can also influence the pacing of the poem, slowing the reader. This slowing is desirable if one wishes the reader to consider the quote briefly and natural when placed at an intended pause but would be particularly problematic in the middle of an intense, rapid flow.
Italics provide a subtler demarcation. Italics are commonly used in fiction to distinguish thoughts from speech and thus can provide a sense of internal connection. Italics are also more likely to be appropriate for very short quotations (e.g., two words), especially when such are broadly distributed throughout the poem. Italics do introduce the danger of implying emphasis more than just distinction; this is particularly likely for very short quotations. Moderating the implied emphasis can be accomplished by earlier establishing the use (e.g., length or familiarity can establish italicized words as quotes) or ensuring that the tone and flow would not naturally support interpretation as emphasis. Interpretation as mere light emphasis may not detract substantially from the poem since italicized quotations are generally more internalized; the distinction between a moving quotation and the speaker's own passionate thoughts is not critical.
The use of single quotation marks — outside of nested quotations — seems to provide a separation and formality intermediate between italics and double quotation marks. Single quotation marks might be preferred for quoting a folk saying when using such as statement of truth; the folk saying is less formal and likely more internalized than a classic quotation but is meant to have an authority.
Not specifically indicating a quotation is an attractive option when the quotation is familiar, deeply integrated into the speaker's expression, or paraphrased or otherwise not strictly quoted. Allusions and paraphrases (unless the source is in a different language) should not use quotation marks since such indicates precise quotation. Italics or single quotation marks might be acceptable for casual, approximate quotations, especially when the speaker is using such as a reference or the difference from the true quote is being emphasized. Even use of double quotation marks may be appropriate if used as an ironic indication of accuracy, for example:

I learned a lot from Hamlet's solemn plea:
"to live a life in tights or not to be"

This mangling might, with adequate context (possibly beyond the "solemn plea"/"soliloquy" wordplay and "life in tights"), be recognized as a humorous misquotation, possibly thought by the speaker to be accurate.
Extensive inclusion of quotations can also argue against specific demarcation; peppering one's poem with quotation marks is more likely to be distracting than edifying. Even moderate but regular use of quotations may justify lack of markings. For example, if the fourth line of every eight line stanza is a quotation, even italics may be too prominent, especially if the intended effect is to subtly unify the quotations and the poem.
Poetry is granted significant license to violate conventional grammar, but this freedom should be used to enhance expression —  emotion, context, pacing, art — not as an indulgence for sloppiness.
Attribution of Quotations (and Allusions)
Attributions serve multiple purposes. They endorse the source, hinting that the reader may enjoy the source or other works by the source's author. The enthusiasm of this endorsement influences the reader's perception of the poem. If reader is familiar with the author or the specific source, the reader's positive or negative attachments to that source are linked to the writer of the poem and to the poem itself.
Attributions influence the tone with which the poem is perceived. Using the title "Wonderment: Considerations on Gerard Manley Hopkins' 'The Windhover'" gives a very different impression from "Wonderment¹" with the footnote "¹ Composed after reading Gerard Manley Hopkins 'The Windhover'". Excluding explicit citation can present a subtly intimate tone with readers familiar with the source, like accidentally learning that one shares a special interest with an acquaintance. Leaving out a citation, especially when other works are cited, may be taken as a slight, especially if appreciation is not expressed in the poem or a quotation is easily mistaken as one's own creation.
Attributions also borrow associations from the source or the source's author. Beyond the tone implied in the form — or absence — of citation, an attribution may appeal to authority ("I am only repeating what Homer wrote"), stir affection ("like Elizabeth Barrett Browning, I will speak of love"), or hint of beauty ("John Keats' bright words flow into my not unlovely stream"). Citation emphasizes the connection. This emphasis may seem arrogant, fatuous, reverent, precisely correct, or formally dull, substantially depending on how the relationship to the source is handled in the work.
Finally, attributions give credit for inspiration or content. This formal purpose of attribution is somewhat less a matter of artistic choice; attribution may be required by licensing, publication policies, or mere courtesy. This aspect also often constrains the expression of attribution
The purposes of attributions provide some guidance for how attributions should be handled.
Including attributions in the text of a poem is often contrary to the expression of the poem, potentially drawing the reader out of the text (which is usually undesired). However, such can be natural expression when the quote is presented by the speaker as a quotation, especially when the identification of the source is significant for the speaker. Self-talk and speech among those with common interests typically elides citation, so explicit citation may introduce significant emphasis.
Externalizing the subject in thought or address provides opportunity for citation. "Miss Barrett's words still stand that love, mere love,/is beautiful indeed and worthy of" and "Shakespeare, were you so dull as to believe/that love can be 'an ever fixed mark/That looks on tempests and is never shaken'?" are somewhat natural inclusions of attributions.
Including attribution in the title is less likely to interfere with the poetry and may provide appropriate context for the poem, which is one role of titles anyway. This attribution can be precise and clear ("On Reading Shakespeare's 13th Sonnet"), general and vague ("Byronic Wit"), or even cryptic and playful ("Comfort from Liberty's Poet" — referring to Emma Lazarus' "Assurance").
A common technique for establishing context is to use an opening quotation distinct from the poem. While such can be used merely to provide general context, it can also indicate the source for more subtle references or quotations without attribution within the poem. For example:

         Wonderment

     Brute beauty and valour and act, oh, air, pride, plume, here
        Buckle! AND the fire that breaks from thee then, a billion
     Times told lovelier, more dangerous, O my chevalier!
               Gerard Manley Hopkins
               "The Windhover"

The use of a footnote attached to the title — if all references are to a single source — is perhaps the least obtrusive of methods of attribution.
More explicit attribution is more important when the quotation may be unfamiliar to the reader or the source less easily discovered via web search. Brief quotes, particularly using common words, quotes which are not explicitly marked as such, and quotes from less prominent sources are more difficult to identify.
Whether attribution should be included is a question similar to whether translation of words from other languages should be included. Attributions are less important for many quotations of classics; the quotation may be broadly recognized or at least the source be easily discovered, just as one would typically not need to translate mon ami or sic transit gloria mundi. Unlike translation, attribution involves credit and, sometimes, endorsement (in either direction) and not just identification. In addition, like translation, the broader one's readership in time or culture, the more helpful clear attribution becomes.
Publication Context and Attribution
Publication context significantly influences the form that attribution can and should take when it is not integrated into the poem or its title. On one's personal website, reduced space and formatting constraints facilitate extensive notes on works: inspirations, artistic critiques, personal significance, etc. Using links, hide/show buttons, or sidebars (when targeting wider displays) can keep extensive comments from distracting from the poetry itself.
For one's own printed publication, while length is only money and formatting is limited only by the medium, one still should consider the effect on the reader. For a poem meant only to be read and enjoyed, one would prefer not to draw attention away from the text. Attaching a footnote to the title of the text would be preferred for this use; e.g., [title]'Feeling the D.T.s°', [at the foot of the page]'° Quotations and references are from Dylan Thomas' ""'. In a scholarly presentation, drawing attention away from the text on the first reading is unexceptional.
On a poetry sharing forum, length is usually not a significant constraint, but formatting often prevents reducing the prominence of commentary. Such contexts often also lack support for internal linking. For shortish single poem postings, end-of-post comments have sufficient proximity to the relevant text of a poem that this is not especially problematic. For longer poems, the use of unlinked endnotes may be the best choice, with endnote references and clarifications placed before more extensive and more general commentary.
For a printed poetry journal, space, pagination, and formatting style significantly restrict the length and placement of comments. On the other hand, journals may have formal policies about attribution. If all the quotations are from a single text or a single author, one attributing footnote for the first quotation or attribution in the title may suffice.
An online poetry journal, while free from most physical constraints, will have stylistic formatting constraints and expectations about attribution.
Poetry journals, being more formal, are likely to have established policies with respect to attribution. If such policies are not found or are unclear, a brief email exchange can answer questions about a journal's policies and preferences.
Examples
Consider the following fragment:

My case I thus did firmly press;
She questioned then my eagerness,
"The grave's a fine and private place,
But none I think do there embrace?"
I answered with my bounded wit,
"If you could make our sun but sit,
I would not love at lower rate.
I can but on your bidding wait.
Time's wingèd chariot hurrying near
Should never be a cause for fear;
Beyond all hasty worldly strife,
Past heaven's golden gate of life,
Gardens of vast eternity
Can but enshrine your rich beauty.
Yet love in truth can know a haste
Which would see no time left to waste."

This is so crammed with quotes and references to Andrew Marvell's famous "To His Coy Mistress" that no one would think the references accidental, incidental, or mere plagiarism. ("The grave's a fine and private place,/But none, I think, do there embrace."; "Thus, though we cannot make our sun/Stand still, yet we will make him run."; "Nor would I love at lower rate."; "Time's wingèd chariot hurrying near;"; "Through the iron gates of life:"; "Deserts of vast eternity.") Because Marvell's poem is so well known and the references so extensive — though not marked as such — explicit attribution is less necessary, but the title could easily provide attribution — e.g., "After Sharing 'To His Coy Mistress'" (which sets the context and explains the density of the references for both speakers as well as clearly providing attribution).
Note that none of the quotes are marked by quotation marks or italics. Quotation marks would have been awkward given the quoting of speech in the fragment. In addition, the conversational and somewhat playful tone make formal quoting less appropriate. This integration also points to a natural use of poetic references for the speakers. If an argument rather than an appeal was being made, marking quotations would give some sense of appeal to an authority.
The next fragment uses italics:

*But that which fairest is, but few behold,*
Why then should I be granted this bright gold
Whose heart is iron and clay, all intermixed?

Using italics to mark the quotation (from Edmund Spencer's, Amoretti, Sonnet 15), presents it as a remembrance in the speaker's thoughts. The use of quotation marks would have introduced a greater sense of distance ([it is said that] "..."); italics present the quote as an intimate, tender heart-truth. The length (and demarcation) of the quote make web search easy, but the reference is probably too obscure (even if the work was a Spencerian sonnet) for attribution to be omitted. In some publication contexts a brief side note, likely in a reduced font, would be sufficient: (Amoretti). A title such as "I am not Edmund Spencer" might be sufficient attribution while also providing the usual function of a title.
Here is another example of using italics:

Now steadfast husband, fate-tried hero stand
Be *strong in will to strive, to seek, to find,*
*and not to yield* nor quarter ever grant

Italics are used in this case to avoid the disruption of pacing quotation marks would introduce while also indicating the inclusion of a quotation. The poem would presumably make other references to Alfred Lord Tennyson's "Ulysses" and use that connection to enhance the tone, so denoting such references is important to the expression.
In this case, using a fully attributed quotation from the source before the poem text would probably be most appropriate for communicating attribution. Such establishes some context and marks the significance of that source to the poem's text. This can be especially powerful and clear when the quotation preceding the text is partially repeated in the poem text, assuming sufficient separation that the reuse is subtly resonant rather than dully repetitive. While a title such as "Encouragement from Tennyson's 'Ulysses'" would also work, a preceding quotation gives greater significance to the source as an inspiration and as a great work. The latter significance may also be added in part to the poem itself.
The following example uses quotation marks:

"What oft was thought," but that is not quite true;
The author must be given her full due.
...
The nature of a few might so be dressed,
But love, before, was "ne'er so well expressed."

The quotation in the first line is clearly presented as both authoritative ('it is well known that') and distinct. Using italics would have given such a softer tone (both less distinct and less argumentative).
The quotation in the last line forms a closing agreement and intensification of the body. By closing the work with the latter half of the quotation, the writing experiences a compression, as if the intervening lines were but a light digression on a well-established truth. Beginning with "Alexander Pope did not go far enough in this case when he wrote 'True wit is nature to advantage dressed/What oft was thought but ne'er so well expressed.'" and ending with "Nevertheless, Pope rightly states that extraordinary expression of meaning, as exemplified in our subject, distinguishes the excellent poem." — this parenthesis gives a sense of weight to the internal content.
The lesser familiarity of the source also urges the use of quotation marks. The quote is sufficiently unique that explicit attribution could be avoided. (On my website, attribution is provided in the comments on the work.) Internal attribution of the quote would have weakened the presentation both by length and by lessening such to merely one source indicating a truth rather than a bald statement of fact. Poetry often favors vigor over rigor.
This fragment inlines explicit attribution and uses quotation marks:

The Bard wrote well and true: "love is not love
Which alters when it alteration finds".
Affection like a spring-clock downward winds,
But true love knows no stay nor stop. Above
All movements of the human heart its end
Is set eternally and will not bend.

In this case, the speaker is using the quotation as a well-known, authoritative statement. The explicit internal attribution contributes to the argument and the demarcation sets apart the quote as a mathematician might set apart the statement of a base theorem before presenting proofs of its derived lemmas.
This fragment uses no demarcation of the quotation:

To be, or not to be, I will not ask;
Outrageous fortune's not my enemy.
Though troubles rage about me like the sea,
I will not turn from my appointed task.

Because the source is extremely well known, at least for "To be, or not to be", attribution is unnecessary. Since the quotes are short (and intermingled with the text), demarcation of the quotes would be more distracting than helpful. The lack of demarcation also personalizes the quotations. Formal quotation would be awkward, even silly:

"To be, or not to be," I will not ask;
"Outrageous fortune"'s not my enemy.
Though "troubles" rage about me like the "sea",
I will not turn from my appointed task.

The following example likewise lacks demarcation:

I doubt and hope: Is love as strong as death?
And oaths of love, do they retrieve as well?

The work's title, "Reading Sonnets after Loss", hints at the source (Elizabeth Barrett Browning's Sonnets from the Portuguese, specifically Sonnet 27 — "That Love, as strong as Death, retrieves as well.") but does not declare it. The attribution of the reference is important to more fully appreciating the work, and a web search is more likely to link to Song of Songs. However, any rabid fan of Sonnets from the Portuguese — for whom the significance would be greater — would recognize the reference and feel a more intimate appreciation.
Attribution does not add substantially to the emotion of this work, particularly if the reader does not have a fondness for Sonnets from the Portuguese. I do include attribution on my website both because I encourage people to read Sonnets from the Portuguese and because I generally provide some commentary for better understanding or appreciating the work.
In this case explicit demarcation, besides being somewhat awkward, would mar the sad but strong tone and distance the words that she treats as her lover's own, bound deeply in her heart.
Conclusion
The manner in which quotations are indicated influences the formality, importance, and separation from the speaker with which they are perceived. Poetry is allowed to violate conventions for the sake of emotional or artistic expression, but conventions establish expectations and influence the reader's perception.
Attribution is not always necessary but increases in importance based on expected unfamiliarity, which is influenced by the breadth of the expected audience. The form that attribution takes influences the reader's perception of the poem; attributions can flow naturally in the poem itself, but often such would detract from the poem and be better placed in the title or a footnote.
Comment: @Helena Johnson Thanks for the incentive to generate some interesting fragments — "After Sharing 'To His Coy Mistress'" may even work as a complete work —, which was fun, and the opportunity to share fragments from previously written works. Despite the excessive length, this answer still seems incomplete!

Quoting another poem in your own


Would using an underscore in a domain name have a negative effect on ranking?

Question: What do you think the effect on search engine ranking will be if one uses an underscore in a domain name?
Comment: This question already exists here, more specific to [digits](http://webmasters.stackexchange.com/questions/774/are-there-any-downsides-to-starting-a-domain-name-with-a-digit) and [hyphens](http://webmasters.stackexchange.com/questions/410/is-it-better-to-put-hyphens-in-a-domain-name). You cannot use underscores in domain names.
Comment: Your original question has been edited as you included a couple of questions that has already been discussed on Pro Webmasters. @dan has listed those similar questions above.
Answer: Underscores in Domain Names
While it may be perfectly valid by RFC 2181 (section 11) to have underscores in a domain name, you will not find any domain type i.e TLD, ccTLD or gLTD  that supports registering domains with underscores in, you are therefore restricted to hyphens as an separator.

The DNS itself places only one restriction on the particular labels that can be used to identify resource records. That one
  restriction relates to the length of the label and the full name.
  [...] Implementations of the DNS protocols must not place any
  restrictions on the labels that can be used. In particular, DNS
  servers must not refuse to serve a zone because it contains labels
  that might not be acceptable to some DNS client programs.

You can however use underscores in the hostname, sub domain or URL but this is very subjective as its agreed that in most cases, the hyphen serves the purpose better, especially in the hostname environment.
Comment: Although it would seem to be [RFC1123](http://www.ietf.org/rfc/rfc1123.txt) (which modifies [RFC952](http://www.ietf.org/rfc/rfc952.txt)) that defines the "syntax of a legal _Internet host name_", which states just _letters, digits and hyphens_ (with some additional restrictions on their placement).
Answer: Host names cannot contain an underscore (RFC 1123). This seems a bit counter-intuitive since domain names can contain underscores...but remember, the domain name is a label pointing to a series of records. Several of those records contain host names (A and MX for example). The records that contain host names can't use underscores.
IF your domain registrar let you create a domain name with an underscore, you wouldn't be able to add any valid host names to it, but you could add other types of records (TXT, SRV, CNAME, etc.). Since most people want to have host names in their DNS records, domain registrars won't accept domain names that contain an underscore.
Comment: A host name and domain name are two separate things and do not occupy the same space. Host names are not valid on the Internet unless used as part of a domain name. I realize that linux installs want to use the host name as a sub-domain, however, that is completely optional and often wrong to do. The question is in regard to domain names having an underscore (_) and the effect on search performance. What does a host name have to do with the domain name having an underscore and search performance?


Difference between return from interrupt(RTI) and return from subroutine(RTS)

Question: I would like to know what is difference between return from interrupt(RTI) and return from subroutine(RTS). Are both are the same or there is any difference between these two?
Answer: Usually return from interrupt restores the flags so that the interrupted code can continue to execute properly.  Return from subroutine does not need to do that instruction is used intentionally in that flow of code and known that the flags are or are not destroyed depending on the architecture.   In architectures that use a stack for the return address it is very apparent.  A return from interrupt will pop the flags then the return address where a return from subroutine will pop only the return address.
Comment: @AMIT: the flags (content of Processor Status Word) poped at RTI are the ones that were pushed at the start of the interrupt by the processor. This is, however, not automatically the case for all archtetures: Good old Z80 or 8051 architecture do NOT push the PSW at interrupts. In those cases the code of the iterrupt handler has to take care of it.
Comment: Thakns for you response @dwelch .....the flag that  return from interrupt pop out is related to what???
Comment: @AMIT @Curd That is why I started with the word Usually, I should have been a little less subtle.  You did not specify an architecture so I had to be a bit general.  Architectures that do not have a difference between return from interrupt and return from subroutine often do not have separate instructions.  when they do it is usually something like popping the status word or for changing an internal processor protection state or something like that.
Answer: When a hardware interrupt occurs on an x86 the flags and return code segment+offset are pushed onto the stack. Then interrupts are disabled. This is to set the stage for the interrupt routine to service the interrupt: switch stacks or whatever it wants to do before either re-enabling interrupts and processing some more before/or returning from the interrupt. The iret instruction pops the previously saved flags (including the interrupt flag which was originally enabled) and the return location so that the interrupted routine can continue processing none the wiser.
Answer: The fact that a processor is handling an interrupt is marked in one or more flags in the status register of a CPU.
This is needed, e.g. to mask other potential interrupts.
In order to tell the processor that interrupt handling is over and the flag can be reset, the RTI instruction is used instead of just RTS.
Of course the details depend on the particular CPU.
Comment: I would like to add that in many architectures additional information is pushed on the stack and so the stack frame has a slightly different layout in the interrupt routine.
Comment: It is not "marked" as you call it. If it is a hardware interrupt the interrupt bit will be set to disabled. However this can be caused by "normal" processing so it is no reliable indicator of an interrupt in progress.
Comment: @Olof Forshell: Seems you are thinking about one particular architecture. Since AMIT didn't refer to a particular architecture I just outlined the general behaviour that is common or similar to all architecures I know. Of course there are more details, as I mentioned.
Answer: Well, interrupts are stored in a different code segment, so RTI are called with a far-call, while subroutines usually stays in the same code segment as the main program, so they're called with a near-call. The difference is that far-calls push the segment and the offset as return address, while near-calls push only the offset.
Answer: RET will just pop the two bytes to PC (Addr low and Addr High)
RETI will reset the interrupt enable flipflop and two bytes will be poped from the stack
Answer: <code>RET:  pop ip ; its "brother" is *near* CALL - to the same segment

RETF: pop ip ; *far* CALL - there's return path of segment and offset on the
      pop cs ;  stack

IRET: pop ip ; INT - this instruction PUSHes *three* registers on stack:
      pop cs ; IP, CS, and FLags
      pop fl ; well, in fact as for the stack operation INT is similiar
             ; to far CALL but with the FL put on the stack
</code>
Comment: Question was about RTI and RTS, they are for architectures other than x86. RET/IRET are x86/x86-64
Answer: RTE or RTI takes minimal context from top of the stack, while RTS takes return address (from top of the stack)


Unable to update linked MySQL table from SQL Server with MySQL Connector/ODBC 8.0

Question: I'm using a linked server on a SQL 2016 server to read and write data in different MySQL tables.
With MySQL Connector/ODBC 5.3 everything works fine, after updating the MySQL Connector/ODBC to latest version 8.0.26 due to security reasons updating the MySQL data causes an error! Selecting MySQL data still works fine, as well as inserting new data; updating and deleting MySQL data is not possible any longer.
In different threads I found hints for correct structure of MySQL tables as requirement to maintain the data via linked server. Tables must have a primary key column (with no auto increment) and at least one column with type timestamp must exist. So I created following simple test table:
    CREATE TABLE `test_odbc_3` (
      `TDBC_ID` int(11) NOT NULL,
      `TDBC_DESC` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
      `TDBC_TSU` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
      PRIMARY KEY (`TDBC_ID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_c

For maintenance of MySQL data I use the OPENQUERY syntax as follows:
Inserting a new row:
    INSERT OPENQUERY(TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3')
    VALUES (24,'row 4','2019-05-19 14:22:41)

works fine!
Selecting all rows:
    SELECT *
    FROM   OPENQUERY( TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3')

works fine – result is:
TDBC_ID   TDBC_DESC   TDBC_TSU
21   row 1   2009-04-17 14:11:41.0000000
22   row 2   2009-04-17 14:11:41.0000000
23   row 3   2009-04-17 14:11:41.0000000
24   row 4   2019-05-19 14:22:41.0000000
Trying to update a row in this table causes the following error:
    UPDATE OPENQUERY( TDBAMYSQLTEST, 'SELECT TDBC_ID, TDBC_DESC, TDBC_TSU FROM admin_db.test_odbc_3 WHERE TDBC_ID = 23')
    SET    TDBC_DESC = 'mydesc'
    WHERE  TDBC_ID = 23

    Msg 7343, Level 16, State 4, Line 10
    The OLE DB provider "MSDASQL" for linked server "TDBAMYSQLTEST" could not UPDATE table "[MSDASQL]". Unknown provider error

Based on different threads I checked and set the configuration of environment as well.
MySQL Connector/ODBC configuration:
ODBC driver information
ODBC connector configuration
Enabled Provider Options:
Dynamic parameter
Nested queries
Level zero only
Allow inprocess
Index as access path

Linked Server Properties set to True:
Data Access
RPC
RPC Out

Anybody has an idea about how to get running with update MySQL data again? Thnx in advance for any help!
Answer: Instead of using QPENQUERY it's necessary to use EXEC ... AT syntax as follows:

For selecting data:
EXEC('SELECT * FROM  admin_db.test_odbc_3 WHERE TDBC_ID = 3') AT TDBAMYSQLTEST

For updating data:
EXEC('UPDATE admin_db.test_odbc_3 set TDBC_DESC = ''mynew_value'' WHERE TDBC_ID = 3') AT TDBAMYSQLTEST

Comment: This saved my bacon. Didn't realize this alternative way of doing it existed. Thank you!


Secure Boot State is OFF although it is turned on in UEFI Firmware Settings

Question: Please help me the following problems:
While checking system information using msinfo32, I see that Secure Boot State is OFF although I enabled it in UEFI Firmware Settings before.
I also accessed registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecureBoot\State and changed value of UEFISecureBootEnabled to 1 instead 0 as initial.
Then I checked again with msinfo32 is that Secure Boot State was ON and I also tried using Confirm-SecureBootUEFI command in Windows PowerShell to check this but status returned is False.
On the other hand, after rebooting my computer, Secure Boot State is still OFF.
I'm running Windows 10 Pro on Acer Aspire E1-472.
Comment: It would only be off despite being enable if Windows 10 is being booted with Legacy Mode enabled.  Yes;  Its entirely possible the UEFI would allow you to enable Secure Boot, but still boot into Legacy Mode which of course would automatically disable Secure Boot.
Comment: Why exactly are you trying to disable Secure Boot?
Comment: Are you sure the default Microsoft keys are installed? I had this issue when I tried to enable Secure Boot on my laptop (which, for some reason, shipped with Secure Boot disabled). (@Ramhound: The OP is trying to *enable* Secure Boot.)
Comment: @bwDraco: I tried resetting to factory default setting in UEFI Firmware Settings but the problems still happen.
Answer: You need to set Platform in "User Mode", Secure Boot in "Standard Mode" and Load Setup Defaults.
You could do it by Restoring Factory Keys:

BIOS - Security - Secure Boot - Restore Factory Keys - Enter
BIOS - Restart - OS Optimized Defaults - Enabled
BIOS - Restart - Load Setup Defaults - Enter
Go to BIOS - Main and check if UEFI Secure Boot is ON.
Answer: You might be in Setup Mode because you have deleted the Platform Key in your BIOS. Enabling Secure Boot in this state enables your OS to write a new Platform Key (possibly useful for securing a Linux installation). But if you don't do that, you remain in Setup Mode and the Secure Boot State, indicating the Platform Key has been used to secure the system, will remain off.
Your BIOS might have an option to restore the default Platform Key, possibly called "Restore Default Secure Boot Keys", which restores the Microsoft Key.
After doing that, your Secure Boot State will be On when booting Windows.
Comment: Thanks for your answer. In my BIOS, I have an option which is "restore to factory default settings". After choosing this option, however, the problems is still the same as before.
Comment: And do you now see another option, possibly in the security area of your BIOS setup, to delete your Secure Boot Keys ? If you do, you are not in Setup Mode and the assumption in my answer is wrong. Otherwise, if you don't see it and do not see the option to restore the keys either, those options might be hidden in an expert mode or the like. Which options do you have in the UEFI part of your BIOS setup ?
Answer: Get into BIOS > Security Tab > Secure Boot Mode - Custom > Key Management > Restore Secure Boot to Factory Settings - Enable > Save n Exit .
Answer: I had secure boot turned on my bios, but Windows 10 said it is off
so what solved the problem is

reset the bios
turn on legacy mode and restart .........that will say no os
go back to bios turn on uefi and reboot...still secure boot off
go to bios disable secure boot and reboot .....secure boot is off
go back to bios and turn on secure boot this time and reboot ......in windows hopefully like me your secure boot option will be on


What happens if you drop a 30-foot cube of water from a height of 30+ feet on someone's head using the Create or Destroy Water spell?

Question: In D&D 5e, what would happen if you dropped a 30-foot cube of water from a height of 30 feet (or more depending on elevation and positioning) on someone's head, using the Create or Destroy Water spell?
Comment: @IlmariKaronen the difference here is falling water will have been affected by the airflow as it falls, possibly breaking the surface tension already. So it wouldn't be exactly the same as falling into a still water.
Comment: Hey, welcome to [rpg.se]! Take a look at our [tour]. Hopefully this question has an answer, and if not, maybe it can be adjusted to be answerable. Welcome again, and have fun.
Comment: FWIW, in real life the initial impact would be equivalent to jumping head first into water from a height of 30ft, i.e. not too bad if you're ready and braced for it. However, depending on local terrain and exactly where you happened to be standing relative to the falling water cube, you'd probably then be swept off your feet by a torrent of water spreading in all directions after hitting the ground, and might get thrown against a solid obstacle or pummeled by debris picked up the water. Not recommended.
Comment: I was going to suggest making it frozen or just under boiling for additional effect, but apparently the part I am remembering about the temperature being up to the caster is from another edition, since this one doesn't seem to say anything like that.
Comment: in physics terms? The person gets wet. 30 feet (~9 meters) or 1000 feet - water falling in liquid form doesn't kill people
Answer: Create or destroy water doesn't do that.
The spell description of create or destroy water states (PHB, p. 229; emphasis mine):

Create Water. You create up to 10 gallons of clean water within range in an open container. Alternatively, the water falls as rain in a 30-foot cube within range, extinguishing exposed flames in the area.

It makes it rain, which does zero damage.
Answer: In addition to @Thomas Markov's excellent and correct answer: even if it just raining weren't spelled out explicitly, spells only do what they say. This means that, unless explicitly spelled out, a spell's effect will not do any damage whatsoever.
That's why some of the world-manipulating spells have concrete mechanical effects on monsters/NPCs/PCs spelled out: because otherwise you cannot obtain any mechanical benefit from a spell in combat by the rules as written. That applies especially with regard to damage.
Comment: My issue with this answer is that "spells only do what they say" is only half the equation. The other half is _"and anything else is left up to the DM."_ Practically every time this "wisdom" shows up on RPG.SE, it shows up with only the first half. DMs should never feel constrained to adjudicate spells mechanistically at the expense of the narrative, which is what answers like this imply. Spell descriptions are a floor on what a spell does, not a ceiling. The ceiling is up to the DM.
Comment: For my money, the "anything else is up to the DM" piece _is_ RAW. It's just another way of phrasing #3 under "How to Play" in the _PHB_: "The DM narrates the results of the adventurers' actions." Or as the _DMG_ puts it on page 1: "The D&D rules help you and the other players have a good time, but the rules aren't in charge. You're the DM, and you are in charge of the game." As for whether this point has a place on RPG.SE, I emphatically say yes. DMs who want to run a good game -- who want to know _how best_ to use their fiat powers -- should be able to get good guidance here.
Comment: That said, there's a *massive* difference between "10 gallons of water distributed within a 30-foot cube", and "a 30-foot cube completely full of water" (as OP seems to imagine). DM fiat normally does not cover a factor of ~20,000 in effect size.
Comment: FYI, there's an excellent discussion of this whole issue on Meta: [Shouldn't we move past repeating "rules do what they say and nothing more?"](https://rpg.meta.stackexchange.com/q/11401/43484).
Comment: This is true as well, but for DM fiat there is no need to ask this page, or the internet, because only the DM's opinion matters in the slightest. That's why my answers here are far more RAW-centric than when I play myself or talk to people I play with IRL. But yeah, an important reminder that the rules are mere guidelines how the game can be played, there's no RAW-police irl
Comment: @screamline thanks for that rabbit hole :)  Very interesting discussion indeed
Answer: Here's what the rules say:

Create or Destroy Water
1st-level transmutation
Casting Time: 1 action
Range: 30 feet
Duration: Instantaneous
You either create or destroy water.
Create Water. You create up to 10 gallons of clean water within range in an open container. Alternatively, the water falls as rain in a 30-foot cube within range, extinguishing exposed flames in the area.
At Higher Levels. When you cast this spell using a spell slot of 2nd level or higher, you create or destroy 10 additional gallons of water, or the size of the cube increases by 5 feet, for each slot level above 1st.

You're asking what happens beneath the cube when you use the alternate form of create water.  The rules say open flames are extinguished, but don't specify beyond that, so lets think it out.
The rules indicate that you're creating 10 gallons of water in a 30ft (27,000 cu. ft or ~20k gal) cube, either over 6 seconds or instantaneously (the rules say the latter).  This is the equivalent of throwing two large buckets of water into a fairly large area.  Things will get wet, but not drenched.  Bare dirt or stone might become slick, but grass or wood would not.  An embankment might become very difficult to climb.  A guard might be distracted (although their vision would not be obscured).
If a GM were to rule that this makes the area slick, compare to the Grease spell.  Grease is also 1st-level.  It affects a 10-ft square, creates difficult terrain, and introduces a save-or-fall-prone effect.  It would be logical for Create Water to act like Grease with a larger area and longer duration, but very limited terrains it would effect.  My gut says that difficult terrain and save-or-fall-prone is appropriate for a wetted dirt road, while only difficult terrain is appropriate for stone.  Sand or grassland would not be any harder to traverse.
To me that feels like a creative use of the spell, rather than a munchkin-y exploit.
Casting at higher levels allows you to create 10 gallons across a larger area (70-ft cube at 9th-level) or create more water in a 30-ft cube (90 gal. at 9th).  90 gallons is enough to get things in the area pretty wet, but not enough to deal damage.  I would be very hesitant to expand any Grease-like effects with higher casting.  Grease does not change when cast at higher levels, and I think that's intentional.
Answer: You asked what could be two different questions.

What happens when you use the second option in Create Water. That was answered.
What happens when you (however you do it) create a 30-foot cube of water 30 feet above someone, then let it drop.

You cannot do that with Create Water (at any level), but you could do it with much higher-level spells, not least is Wish or some sort of portal to a water plane.
1 cubic foot of water is just under 7.5 gallons, which is just under 62.5 pounds. A cube of water 30-feet a side is 27,000 cubic feet, or 302,500 gallons, or a little under 1.7 million pounds (roughly 843 tons). If that were to fall on people, it would wash them away. It would likely wash away anything including giants and dragons. That's literally 360 inches of rain in 6 seconds. Because it's "just water," it won't necessarily cause any damage, but it will likely cause blunt-force damage by smashing creatures into walls and trees and stuff. The water will likely cause a flash flood in whatever direction is down (and most towns were built on hills). This amount of water will damage houses, break down doors (which were often flimsy if unlatched), rip up small trees, and create a huge mess.


IPhone SDK - How to detect variable type (float or double)?

Question: How do I detect whether a variable is float, double, int, etc.?
Thanks.
Answer: Objective-C is not like PHP or other interpreted languages where the 'type' of a variable can change according to how you use it. All variables are set to a fixed type when they are declared and this cannot be changed. Since the type is defined at compile time, there is no need to query the type of a variable at run-time.
For example:
<code>float var1; // var1 is a float and can't be any other type
int var2;  // var2 is an int and can't be any other type
NSString* var3;  // var3 is a pointer to a NSString object and can't be any other type
</code>
The type is specified before the variable name, also in functions:
<code>- (void)initWithValue:(float)param1 andName:(NSString*)param2
{
    // param1 is a float
    // param2 is a pointer to a NSString object
}
</code>
So as you can see, the type is fixed when the variable is declared (also you will notice that all variables must be declared, i.e. you cannot just suddenly start using a new variable name unless you've declared it first).
Answer: In a compiled C based language (outside of debug mode with symbols), you can't actually "detect" any variable unless you know the type, or maybe guess a type and get lucky.
So normally, you know and declare the type before any variable reference.
Without type information, the best you can do might be to dereference a pointer to random unknown bits/bytes in memory, and hopefully not crash on an illegal memory reference.
Added comment:
If you know the type is a legal Objective C object, then you might be able to query the runtime for additional information about the class, etc.  But not for ints, doubles, etc.
Answer: Use sizeof. For double it will be 8. It is 4 for float.
double x = 3.1415;
float y = 3.1415f;
printf("size of x is %d\n", sizeof(x));
printf("size of y is %d\n", sizeof(y));
Comment: This answer is not at all what the question was about and it does not allow you to distinguish between types with the same size.


What are the powers of a retail security guard compared to a police officer?

Question: I watched a video about the legality of security guards doing random compulsory receipt and bag checks and it raised a question for me. So of course they can stop you in the act to prevent an imminent theft but the video never covered the exent of their powers of detention. For instance, you fill a bag with items and run for the door and the security guard intercepts you and prevents you from leaving. You realised you've failed and so drop the bag and go to walk out the door. Can they physically restrain and detain you to hand over to the police can they only protect the property and prevent imminent theft?
Answer: A security guard does not have special police privileges, but in the US the shopkeeper has a privilege known as the shopkeeper's privilege to detain a suspected shoplifter for a reasonable time, and the guard can exercise the privilege on behalf of his employer. Depending on the state, that can mean detaining the suspect until the police arrive. This does include reasonable non-deadly force to prevent the suspect from fleeing.
Answer: The power of arrest is not limited to police
new-south-wales

A person who is not a police officer may, without a warrant, arrest a person if they:

are in the act of committing an offence
have just committed an offence
have committed a serious indictable offence for which they have not been tried

So, in the circumstances you describe where the person has "just committed an offence", anyone, including a retail security guard can effect an arrest and may use reasonable force to do so.
There is a small exception - members of the armed forces who are on duty may not effect an arrest unless authorised under the Defence Powers Act (which is a whole thing on its own); that's why military bases are guarded by Federal Police Officers, not soldiers, sailors, or aviators.
Answer: canada
If an owner of property or someone authorized by the owner observes another committing a crime in relation to that property, the owner or person authorized can make a citizen's arrest (see Criminal Code, s. 494).
They are then required to call the police and turn the arrested person over to police as soon as possible.
Answer: In the UK their power is the same as any other ordinary citizen. In the example you describe, it would be wise to let that person leave and call the police. Detaining them risks breaking the law, once there is no imminent crime taking place. Attempts to restrain them would likely amount to assault.
Generally speaking, unless you are being attacked yourself, you have very little power to restrain other people, and should instead rely on the police.
Comment: S3 Criminal law act 67 allows detention in these circumstances i think. And s24A pacea 1985 allowed citizens arrest.
Comment: While true, those rights are very limited and unless you are extremely certain that there is a serious crime happening at that very moment, open you up to a lot of legal risk. Even the police would find it difficult to justify detention in the example given.


Consequences or Benefits of a Binary Planet?

Question: I'm curious to the affect a planet would have if it orbited around, or was orbited by another planet of equal, slightly larger mass. Say if Earth had, not the moon, but a planetary object the same size as the Earth. What would life be like on the planet? How would time be affected? Could life be sustained?
Comment: The question is very broad in its current wording. Perhaps you might consider editing it to make the question more specific. As well, take a quick look at previous questions and you might find some answers already. Enjoy!
Comment: I'm pretty sure there is a duplicate of this question out there, couldn't find it yet.
Answer: It seems that binary planets are possible.
What are the consequences? Firstly, the planets will be tidally locked, this is pretty much inevitable. If they are far enough apart to not get tidally locked, they are far enough apart to not actually orbit each other. I suppose in a system with no other inner planets it might be possible for the binary planets to orbit each other at a great distance, and both rotate independently - in this scenario they would both still suffer significant tidal effects. But the tidally locked scenario sounds most likely, and more interesting, because it puts the planets closer together.
So being tidally locked, they always show the same face to each other. If there are creatures on a planet, they don't know what the far side of the other planet looks like.
Being tidally locked, their day is equal to their orbital period (more or less). If their orbital period is more than a week or so, very long days and nights will start to be a big problem - perhaps not insurmountable for life, but I think for intelligent life it's good to bet on a day of not more than a week. But I'll go with a orbital period of 1 day, in other words the two planets are about a distance of an Earthly geosynchronous orbit. Earth has a diameter of 12,000km and Geosynchronous orbit is 42,000km. This means looking at the system from above, it looks like this - the image is to scale:

At this distance, the planets are extremely large in each other's skies. In fact, about 300x larger than the Moon, because brightness is proportional to area, a "full planet" is thus 90,000 times brighter than a full moon on Earth, potentially up to about 8% the brightness of the Sun.
In the above image, you can see the day and night side. One of the planets has a "planet lit" night, the other planet is having a dark night.
Day Cycles and Mythologies
Solar and "lunar" eclipses will occur once on each planet per orbital period (this does depend on the exact orbital geometry, but we'll go with the system being perfectly aligned). One of the curious things is, because of being tidally locked, people on the "far side" of the planet, will actually never see their sister planet. They will thus also never enjoy a planet lit night or an eclipse. If the planets are mostly water, with continents, then a civilization on a far side continent might not even know or believe in the existence of the sister planet or it may have a mythical status. On Earth, the Moon features prominently in certain mythologies, and so the far side and near side will be in a way quite different worlds, with different mythologies.
A near siders day
A near sider would not enjoy a clear-cut day/night cycle, they would instead essentially experience two nights - a short dark one at Noon of about 1 hour, and a long bright one after the sun has set, with a period of extra dark at midnight.

Midnight: It is dark, the other planet is eclipsed as in a lunar eclipse, greatly reducing the light from it.
3am: The other planet has emerged from the eclipse and is glowing brightly in the night sky, in three-quarter phase.
6am: The sun is rising, and the other planet is still glowing brightly, it is now at half phase.
9am: The sun is bright, and the other planet is now at quarter phase - it is still visible in the sky, but is washed out by the brightness of the sun.
Noon: The sun is eclipsed by the other planet. It is very dark, potentially even darker than night, depending where you are on the near side.
3pm: The sun has emerged from eclipse, and the planet is now at quarter phase again.
6pm: Twilight, the planet is now in half phase again.
9pm: The other planet is high and bright in the sky, in three-quarter phase.

In contrast, a far-sider will experience a day night cycle a lot like on Earth, except without a moon. This will give near siders and far siders very different world views. When near siders travel to the far side, the far siders will think they are bonkers, with whacky religious beliefs and all this talk of "little nights" and such. A far sider who travels to the near side, will have their mind blown.
If one of the planets has an entirely watery near side, with continents only existing on the far side, then that planet may be entirely oblivious of the sister planet. However in the scientific era, even far side scientists will be able to recognize that their planets motion is odd, and so be able to deduce the existence of the sister world, even without sending a ship to see it.
Transfer of Life
The two planets could transfer life on rocks thrown up by large impacts. Bacterial life, spores, seeds and possibly creatures like tardigrades could be transferred this way. This could, up to a very limited point, keep the development of life on both planets in sync. The limit is that any creature more advanced than a tardigrade is unlikely to make the trip.
This means that both planets will probably develop the same kind of atmosphere, and compatible flora and fauna. But unless there is some kind of extraterrestrial seeding of higher life forms (by aliens, or some kind of directed evolution by intelligent spiritual beings) then there is no physical/biological mechanism to synchronize the evolution of intelligent life.
Modern Era
Because the two planets are at geosynchronous distance, communication by radio will not be difficult. Unfortunately going with a Darwinian evolution model there is little scope for "first contact" occurring in such a manner. If however the world has "directed evolution" then this could occur, as both civilizations more or less simultaneously discover telescopes and radio.
Space Flight
Space flight between the two planets will be relatively easy for one way trips. Thanks to areobraking it would be easier to send humans to the other planet than it was to send humans to the Moon, but it would be much harder to perform a return trip due to the requirement to send a rocket large enough to lift out of the gravity well and atmosphere of the other planet. In fact with apollo level technology a return trip would simply be impossible. With a level of technology enabling colonization of Mars (i.e. 2020 technology) then a return trip would be possible, by exploiting resources in-situ to fuel a return rocket - but the trip would still be very difficult.
If only one of the planets has a intelligent life, it would be relatively easy to colonize the other planet, requiring only Apollo level tech. This is assuming that the two planets have shared life via meteorites, so the other planet has an abundance of edible (and naive) life, the animal life could be quite different to that of the home planet, but should still be edible thanks to the common genetics. Colonists might have to be trained as survivalists, but should survive without technology.
It would take a while to build up to a space industry on the other planet, but it would be much, much easier than doing so on Mars (except perhaps, for the lack of motivation).
If both planets evolved advanced civilizations, or after one planet has colonized the other, then two way trips would be possible by using the other planets rockets - however travel between the two planets would still be very, very expensive.
GPS satellites, communication satellites, and so on, should all be possible. They wouldn't tend to orbit exactly as they do on Earth, and instead would tend to exploit libration points where the gravity of the two planets are balanced. Note that for near siders, radio transmissions could be send directly from the other planet as they are tidally locked. These would not however enjoy the clear vacuum of space, permanent sunlight and so on, but could still be done with apollo level tech.
Space Elevator
Because the two planets are tidally locked, it would be possible to build a space elevator bridging them with no more or even less difficulty than building a space elevator on Earth. This may be most useful for delivering stuff to the "L1" point between the two planets as it would still be a very expensive means of travel and unlikely to be economical for trade or tourism, except in the case of the super-wealthy.
Answer: If both planets are identical in size/mass I don't believe such a system would be stable for long (as measured in terms of stellar evolution).
Firstly since both worlds are supposed to have developed Earth like ecology's and life forms must be orbiting a star within the Goldilocks zone.  So its a three body problem not a 2 body problem.
The setup also means both worlds are going to be varying the distance between themselves and their primary each time they complete an orbit around their common center of gravity. And they cant be in a tight orbit (think a few thousand K apart) either. The laws of gravity and motion dictate a pretty wide distance between them. (Greater than that separating Earth and the Moon by an order of magnitude or more).
So the climatic impacts are going to be dramatic. If it takes 10 days for them to complete one orbit of each other they are going to experience mini summers and winters as they approach and then recede from their star.  And this is on top of normal seasonal variations as they complete their annual cycle around the star like all its other planets.
What you could just as easily do is put both planets in the same general orbit on opposite sides of the star. Using Apollo level technology launches to Mars or Venus were 'doable' if extremely difficult. The problem is in real life the payoff for trying it has never been worth the risk.  That would change immediately if the other planet had a earth like atmosphere and ecology.
Comment: Your last paragraph seems to be suggesting a "counter-Earth" - this isn't remotely possible naturally as explored in https://worldbuilding.stackexchange.com/questions/21479/making-a-counter-earth
Comment: I used the term  'general'  to mean an orbit within the Goldilocks zone that would give both planets similar environments. Hadn't read that previous question. I just assumed that statistically the likelihood of two worlds ending up as exact counterparts was so remote as to verge on impossible.


Synthesising types of galaxies using various stellar spectra

Question: I have been given the task of synthesising an elliptical galaxy, a starburst galaxy and a spiral galaxy (considering the arms and the bulge separately and adding them) using stellar spectra which I have classified. I need to add different weightings of five types of stars to produce a normalised spectrum of each of these galaxies. I have spectra for giants, main sequence stars and sub-giants with varying stellar types (O, B, A, F, G, K, M). I know that Spiral arms and the starburst are going to be primarily young stars, while the spiral bulge and the elliptical will be of older stars, but I have no idea which types or luminosity classes of stars I would use and their weightings in each. Can anyone offer any information or resources where I would find good information on adding different types of star to 'create' a galaxy?
Answer: This is an old one, but just in case you still need an answer, or someone else does:
The key realization here seems to be: what are the typical lifetimes of different stellar types? You might know that the hot and big (O/B) type stars are short-lived (their main sequence lifetime is in the order of a couple of million years) but the smaller, cooler stars (such as G stars like our Sun) can live for much longer - typically, $10$ billion years in the case of a Sun-like star.
In ellipticals (and likewise the spiral bulge), not many stars are created (low Star Formation Rate, SFR). As such, O/B stars will soon cease to exist in these. This causes reddening of the spectrum, since not the hot, blue stars will dominate, but rather cooler, redder stars. And in general, the older, the redder.
This is of course a consequence of Wienn's law / the Planck spectrum: cooler stars peak at greater wavelength.
Now, synthesising galaxy spectra is a whole field of astronomy in itself, dating back to the '60s and starting to make significant progress after the work of Tinsley (and others) in the '80s. All sorts of things need to be assumed, such as the Initial Mass Function (how many stars of each kind are created), Star Formation History (do stars form in bursts, or continuously? At what rate?), but also things like the dust content and temperature. This is actually a topic of ongoing research.
For your purposes, I would select an age for each of your galaxy types, and look up which stars will be still on the main sequence and which ones will not: if they're not on the main sequence I would set their weight to zero*. If they're still on the MS, you can couple first the number of stars of a given type (which you can get from an IMF; a Salpeter IMF is easiest to work with) to their average luminosity, to get a weight factor.
*Setting the post-MS luminosity to zero would be a very poor approximation in a proper SPS model, but again: to me this seems to be coursework where a general outline is of foremost importance.


mysqldump locks all tables even when specifically grabbing a few?

Question: I'm using a mysqldump command pulling data from 3 tables of 7. Are the other 4 locked as well?
Answer: Use <code>--single-transaction</code> option, and it won't lock any, provided you are using a transaction-aware storage engine (pretty much anything except MyISAM and MEMORY engines)
Comment: I'm aware of --single-transaction to not lock any, I'm just wondering if the default set up is to lock _every single table_ in the database until the mysqldump is complete, regardless of the fact that I'm only pulling a finite number of them.