normalizer of algebras and groups

Question: Hi,
I am looking at inclusion of discrete groups $H\subset G$ such that $H$ is abelian and $(hgh^{-1},h\in H)$ is infinite if $g\in G-H$. If you have this, $LH\subset LG$ is a maximal abelian subalgebra of a finite von Neumann algebra.
Suppose that $LH\subset LG$ is a Cartan subalgebra, i.e. the group of unitary of $LG$ that normalize the algebra $LH$ generates $LG$. Do we have necessarily that $H$ is a normal subgroup of $G$?
Thanks for your help.
Comment: I also think the title should perhaps be edited to make it clear that the question is (probably) specifically focused on von Neumann algebras -- the fact that they have big unitary groups seems like it would be relevant to the difficulty of the question
Comment: Arnaud, I think you had H and G backwards in the first inclusion, so I edited it.
Answer: This is true, and in fact more has been shown in the recent preprint http://arxiv.org/abs/1005.3049 of Fang, Gao, and Smith.  One can also give the following alternative argument based on ideas of Popa:
If $LH \subset LG$ is a MASA then it follows from the condition $ ( hgh^{-1} \ | \ h \in H ) = \infty$ for all $g \in G \setminus H$, that the normalizer of $H$ in $G$ is the same as the set of elements $g \in G$ such that $[H: H \cap gHg^{-1}] < \infty$.  (This set is not in general closed under inversion but in this case it is since it coincides with the normalizer.)
Suppose we fix $g \in G$ such that $[H: H \cap gHg^{-1}] = \infty$ and let's show that $u_g$ is orthogonal to $\mathcal N_{LG}(LH)''$.  Since $\mathcal N_{LG}(LH)''$ is spanned by $\mathcal N_{LG}(LH)$ it is enought to show that $u_g$ is orthogonal to this set and so let's fix $v \in \mathcal N_{LG}(LH)$.
Before we show that $u_g$ and $v$ are orthogonal let's rewrite the condition $[H: H \cap gHg^{-1}] = \infty$ in a more von Neumann algebraic friendly context which states that there are always "large" subalgebras of $LH$ which are almost moved orthogonal to $LH$.
Lemma:
For all $n \in \mathbb N, \delta > 0$ there exists a finite dimensional subalgebra $A_0 \subset LH$ such that if $p$ is any minimal projection in $A_0$ then $\tau(p) = 1/2^n$ and $| \langle x, u_g^* p u_g - \tau(p) \rangle | < \delta \|x \|_2$ for all $x \in LH$.
Proof.  This essentially follows from Popa's intertwining techniques since the condition $[H: H \cap gHg^{-1}] = \infty$ translates in this context to $LH \not\prec_{LH} L(H \cap gHg^{-1})$ (See Popa's paper http://www.ams.org/mathscinet-getitem?mr=2231961).
Let's show this by induction on $n$.  For the case when $n = 1$ consider the group $\mathcal G = ( u \in \mathcal U(LH) \ | \ u = 1 - 2p, p \in \mathcal P(LH), \tau(p) = 1/2 ) \cup (1)$.  Since $\mathcal G$ generates $LH$ as a von Neumann algebra and since $LH \not\prec_{LH} L(H \cap gHg^{-1})$ it follows from Popa's intertwining Theorem that there exists a sequence $p_k \in \mathcal P(LH)$ with $\tau(p_k) = 1/2$ such that $\lim_{k \to \infty} \| E_{L(H \cap gHg^{-1})}(1 - 2p_k ) \|_2 = 0$ (see Popa, op. cit.).  In particular, for some $k$ this is less than $2\delta$ and so if $x \in LH$, $\| x \|_2 < 1$ we have $| \langle x, u_g^*p_ku_g - \tau(p) \rangle | \leq \| E_{LH}(u_g^* p u_g - \tau(p) ) \|$ $_2 = \| E_{L(H \cap gHg^{-1})} (p_k - 1/2) \|_2 < \delta$.  The same inequality holds for the other minimal projection $1 - p_k$.
Once we have produced such an $A_0$ for $1/2^n$ then given any minimal projection $p \in A_0$ we again have that $pLH \not\prec_{pLH} pL(H \cap gHg^*)$ and so the argument above shows that there exists $p_1$ and $p_2$ in $\mathcal P(LH)$ such that $p_1 + p_2 = p$, each has half the trace and $| \langle x, u_g^* p_j u_g - \tau(p_j) \rangle | < \delta$.  This proves the induction step.  QED
Now that we have established the above lemma, the fact that $u_g$ and $v$ are orthogonal follows from a lemma of Popa's in http://www.ams.org/mathscinet-getitem?mr=703810.  Let's give the proof here.
Let $\varepsilon > 0$ be given and take $n \in \mathbb N$ such that $1/2^n < \varepsilon/2$.  From the above lemma let's consider a finite dimensional subalgebra $A_0 \subset LH$ such that if $p$ is any minimal projection in $A_0$ then $\tau(p) = 1/2^n$ and $| \langle x, u_g^*pu_g - \tau(p) \rangle | < \| x \|_2 \varepsilon/2^{n + 1}$.  Let's denote the minimal projections in $A_0$ by $p_k$ where $1 \leq k \leq 2^n$.
Denote by $B_0$ the commutant of $A_0$ in $LG$.
Since $v \in \mathcal N_{LG}(LH)$ we have that $vLHv^* = LH$, hence $v^* p_k v \in LH$ for each $k$.  Therefore
$| \langle v, u_g \rangle |^2 \leq \| E_{B_0} ( vu_g^*) \|_2^2$ $=
\| $ $\Sigma_k$ $ p_k v u_g^* p_k \|_2^2 = \Sigma_k \langle v^* p_k v,  u_g^* p_k u_g \rangle < (\Sigma_k \tau(p_k)^2 )  + \Sigma_k \varepsilon/2^{n + 1} < \varepsilon$.
Since $\varepsilon$ was arbitrary we conclude that $u_g$ and $v$ are orthogonal.  Hence since $v$ was arbitrary we conclude that $\mathcal N_{LG}(LH)'' = L(\mathcal N_G(H))$.
Comment: Thanks Jesse. It is nice to have this direct proof in a Popa's way.
Comment: Apparently I can not get some to the tex to compile correctly.  I'm not sure how to fix this though.
Answer: So I don't think it is known in full generallity but there are some partial results. For example if additionally we assume that for any $c,d\in G\setminus H$ the stabilizer subgroups are either equal of noncommensurable then it is true. Much of the results rely on the Pukanzki invarient for $L(H)$ (and if $L(H)$ is cartan then the invarient is {1}), which in some cases you can calculate by the number of left-right cosets.
This is mostly from memory, but Sinclair and Smith have a book "Finite von Neumann algebras and MASAS", and there is a chapter about the pukanzki invarient and masas coming from groups. So check that as well as references therein
Comment: Hey Arnaud, unfortunately I don't know any other good references, and in fact I don't think much else is known.
Comment: "Pukanzki" ---> "Pukanszky" in most sources I know of, just for reference.
Comment: Thanks Owen for your answer. Unfortunately, in the book of Sinclair and Smith they are proving what you are talking about but don't discuss more about. Do you have an idea of an other reference for this topic?
Answer: EDIT: On re-reading the question, I see that I misread 'at' as 'for' in the first line.  This led me to read the first line as a question.  Apologies!  My answer is retracted.
Comment: At a quick glance, the subtlety/difficulty is that a priori the Cartan subalgebra condition doesn't tell us that individual elements of $G$ normalize $LH$ (but I may have misunderstood)

normalizer of algebras and groups


What is a good source of vitamin C in the wild?

Question: I know I could just carry a bottle, but scavenging is much more fun. What is a good source of vitamin C in the wild? Have spruce needles really got enough?
Comment: Unless you are in the wild for weeks or months eating nothing but meat, you will be just fine.
Answer: Pine needle tea is a good solution which is available year round in areas where pines grow.  Do be careful to identify properly, and take care to not guzzle the stuff down... too much is bad for you.  However this is the easiest to find and pine needle tea has a ton of vitamin C.
Dandelion greens are plentiful in many areas and good for vitamin C, though I detest the flavor.
Chicory is a decent source, though I find it to be too easy to misidentify.
Answer: All types of berries are your answer here! Pretty much any (edible) variety contains a large amount of vitamin C - blueberries, strawberries, raspberries, blackberries for instance. (Blackberries and raspberries seem to be especially prevalent at the right time of the year here in the UK.) And they're tasty too.
Of course, it goes without saying if you're not 100% sure what a plant is then don't risk eating it.
Comment: In the States where I am (Rockies) I rarely see more than the occasional berry in the wild. The best option out here is rose-hips, but that is usually a fall/winter option. Delicious and nutritious (just scrape out the fuzzy insides)!
Comment: In most areas berries have a pretty short season, limiting their use.
Answer: There are many sources of vitamin C in the wild. Some of the tricks that I have come across is to know how to extract it in ways that do not destroy the vitamin C. Berries are great in vitamin C and may be eaten raw. However there are a great variety of other sources of vitamin C in the wild.

Let's take a look at a few wild sources of vitamin C from plants available in my habitat (Southwestern Pennsylvania).  For reference, the orange – at 100 grams – contains approximately 53 mg of vitamin C.
Species (100 g), parts of plant, vitamin C content (1, 2, 3)

Dog rose (Rosa canina), fruit, 1252 mg
Balsam fir (Abies balsamea), needles, 270 mg
Eastern white pine (Pinus strobus), bark and needles, 200 mg and 32 mg respectively
Garlic mustard (Alliaria petiolata), aerial parts, 190 mg
Red spruce (Picea rubens), needles, 169 mg
Wild garlic (Allium vineale), leaves, 130 mg
Garden yellow-rocket (Barbarea vulgaris), basal leaves, 130 mg
Common blue violet (Viola sororia), basal leaves, 130 mg
Lamb's quarters (Chenopodium album), whole young plants, 130 mg
Elderberry (Sambucus nigra), fruit, 116 mg
Shepherd's purse (Capsella bursa-pastoris), basal leaves of first year plants, 91 mg
Wild leeks (Allium tricoccum), leaves, 80 mg
Woodland strawberry (Fragaria vesca), fruit, 80 mg
Mock strawberry (Duchesnea indica), leaves, 79 mg
Eastern redbud (Cercis canadensis), flowers, 69 mg
Mountain ash (Sorbus aucuparia), fruit, 68 mg
Common yellow woodsorrel (Oxalis stricta), leaves, 59 mg
Northern white cedar (Thuja occidentalis), needles, 45 mg

Looking at this list, it's quite evident that vitamin C is ubiquitous in nature.  And it's not just found in plants.  One can acquire vitamin C by consuming animals; the heart, liver, and adrenals are all good sources of vitamin C.
This list also hints at another important implication:  our hunter and gatherer ancestors surely were ingesting vitamin C in levels greater than what is recommended today.  After all, the average indigenous diet was far more diverse than the modern dietary amalgamation of corn, wheat, and soy; this traditional heterogeneity ensured that vitamin C was easily acquired.  Additionally, research has shown that animal organs, rich in vitamin C, were favored over muscle meats in traditional diets. - Finding Vitamin C Outside The Grocery Store – Looking Into Wild Sources

The number one on the list is "rose hips" and this is my personal favorite due to its' history in Britain during World War II.

During World War II in Britain, the general public were encouraged to return to (or re-learn) the art of foraging in order to supplement or augment rationed foodstuffs.  Most of the emphasis was on wild vegetation, there not being a great deal of wild game accessible to the ordinary person. The concept was not just tossed out to the population to follow-up as they saw fit, it was actively promoted and resourced by the government. The Ministry of Food published several leaflets on how to find and use the "Hedgerow Harvest" and County Herb Committees were set up to organize collections on a large scale. The latter was directed particularly towards wild foods with health benefits – many of the sources of fruit no longer being available – and also included foods for livestock feeding, such as horse-chestnuts ('conkers.')
One item singled out for particular attention was the rose-hip - a valuable source of vitamin C. The national diet was at some risk of shortage of Vitamin C due to the cessation of importation of fruit such as oranges during the war. The solution was to ask the public to collect rose hips from wild or cultivated bushes, the harvest then to be processed by commercial companies into syrup which could then be made available in the shops. The details and success of the campaign are eloquently told in two articles in The Times [London, England] in autumn of 1941, and mid-winter 1942. - The Rose Hip Collection Campaign (WW II).

At one time people could read articles on how rose hips saved the British during the World War II. It makes great tea and syrup! In fact, Recipes Past and Present has some fun recipes for ways to use rose hips, including written and video instructions. Much of it was taken from a Ministry of Food leaflet, Hedgerow Harvest, published in 1943.

Wartime Rose Hip Collecting in Britain
Comment: +1 for the interesting fact from WW2. I did not know that. :)
Answer: Scurvy Grass Sorrell has leaves rich in Vitamin C, and got its name from sailors travelling round Cape Horn who would eat the leaves to avoid scurvy.
It tastes pretty good, despite what the Wikipedia page says, but I'm not sure how widespread it is outside South America.
Comment: Same genus different species: the common wood sorrel (https://en.wikipedia.org/wiki/Oxalis_acetosella) has a nice, refreshing sour-ish taste, easy to pick and to recognize, and it is also rich in Vitamin C


Animated wallpapers for Windows 7?

Question: Is it possible to have an animated wallpaper for a Windows 7 64 bit computer?
Answer: Windows 7 supports video backgrounds and even offers some samples of their own.
UPDATE new (old) info:
Dreamscene requires the Ultimate Edition of Windows Vista. I don't run it myself but had when I used Vista and had conflated memories in my mind. Apologies.
However, you can still install Dreamscene in Windows 7, though it does require registry edits and such: http://windows7center.com/tutorials/how-to-enable-dreamscene-in-windows-7/
This solution will allow you to right-click on .mpg and .wmv files (any video file that will play in Windows Media Player) and select "Set as desktop background" and the video will play on endless loop.
In my experience with Vista, this did not slow the computer down so long as the computer was capable of handling Aero effects easily.
Comment: It works!!!! Thank you so much- I really really REALLY like it!
Comment: It is pretty cool. For me a dark, slightly undulating video with dim splashes of rich colors would make for quite the desktop background if I left this running.
Answer: I don't believe Windows 7 supports video wallpapers inherently, you need to either hack (Vista's) DreamScene into it (see here or here), or use a third party utility (apparently VLC will do this).
Comment: It's called dreamscene, that's right, but it's no hack to use it. You can turn any video that is encoded properly, simply by right clicking on it, into a background. The rule of thumb for compatible encoding types is that if the video will play in windows media player, it should work with dreamscene.
Comment: @music2myear DreamScene is not part of Windows 7; from my understanding it was dropped after Vista in favour of the new auto-changing wallpaper effect. Is there a way to use/access DreamScene in Windows 7 without doing anything special?
Comment: If "doing anything special" includes any registry edits, then no. But looking at the guide at the link I pasted in the update to my answer, they're included a package that does the work for you.
Comment: Yeah, as I said, Windows 7 doesn't support animated wallpapers inherently, it needs a hack (or a 'package' or 'activator', etc. as also supplied by the links in my answer, just different sites), or a  3rd party utility.  The screwy thing is, you aren't really licensed to run DreamScene under Windows 7, it's only for Vista Ultimate. You give up the right to use it when you upgrade to 7. :)
Comment: That's true. I ran Ultimate Edition in both Vista and 7 and so sometime forget what other people may not have gotten.
Comment: @music2myear - Yeah, same here. :)

Animated wallpapers for Windows 7?


Is it "end quote" or "unquote"?

Question: When reading something that has a quote in the middle of it, is it proper to say "end quote" or "unquote" to signal the end of the quote? I've heard both ways.
Comment: ["Unquote" is what I'm accustomed to when quoting somebody *verbatim*.](http://www-personal.umich.edu/~jlawler/aue/quote.html)
Comment: Also "close quote" especially in programming circles. This is parallel to the use of "open" and "close" parenthesis, braces, and brackets.
Comment: Someone tell me where I got "en quote" from, which is what I have thought it was my entire life....when my 11 year old told me it was unquote, I thought that was the most ridiculous thing I had ever heard. Did I have a bad instructor or something?
Comment: @user7802 You probably got it from Lady Mondegreen: https://www.uh.edu/~mbarber/mondegreens.html
Answer: Based on my experience:

If accompanied by air quotes, the term is definitely unquote.
If it's referring to the punctuation mark, end quote is definitely correct.
If it directly follows the word "quote", it's unquote. (In other words, the phrase is "quote unquote", not "quote end quote".)
In a formal context, if you must use the words (rather than using punctuation and formatting to mark quotations), stick to end quote.

Otherwise, either term is fair game.
Comment: Magnificent answer.
Answer: Both are fine and have been used for decades, as far as I know. The OED on "unquote":

intr. Used as a formula in
  dictation, etc.: terminate the
  quotation. See quote v. 4c.
1935 E. E. Cummings Let. Mar.
  (1969) 139 But he said that if I'd
  hold up publication of No Thanks for
  15 days he'd kill unquote a page of
  Aiken.
1935, etc. [see quote v. 4c].
1969 New Yorker 11 Oct. 48/2 Then Mr.
  Tanks announced the last downtown
  stop. He said, 'Madison Square Garden,
  Penn Station+et cetera, et cetera, et
  cetera, unquote'.

The OED on "quote (v.)":

...
[4.]c. quote ... unquote: a
  formula used in dictation to introduce
  and terminate a quotation. Freq.
  transf., in speech or writing,
  introducing and terminating words
  quoted (or ironically imagined to be
  quoted) from the speech or writing of
  another.
1935 E. E. Cummings Let. 3 Oct. (1969)
  145 The Isful ubiquitous
  wasless&-shallbeless quote
  scrotumtightening unquote omnivorously
  eternal thalassa pelagas or Ocean.
1950 'S. Ransome' Deadly Miss Ashley
  xvii. 198 She says, quote, 'What girl
  wouldn't?' unquote.
1956 Times 5 Dec. 1/5 (Advt.), Today,
  America, you sure are quote in the Big
  Time unquote.
1958 B. Hamilton Too Much of Water xi.
  245 But he did have, quote, a jolly
  good reason for bumping off one
  special person, unquote.
1961 P. Ustinov Loser viii. 140 He
  expressed the personal opinion that
  the picture was quote great for
  America unquote.
1973 D. Robinson Rotten with Honour 8
  The British…see too many people like
  you in London.+ East Germans,
  Bulgarians, and Rumanians, all of them
  quote diplomats unquote
Answer: This question was the source of a heated debate with a friend so some additional research had to be done.  We determined that both "end quote" and "unquote" co-evolved with the telegram (1861-1901) and the Dictaphone (1881-1907).  (Dates are the approximate period of evolution from early implementation of the technology to first documented use of "end quote" or "unquote" associated with the technology.)  Neither term existed before these technologies.
Western Union provided these instructions to secretaries, circa 1907:

"As punctuation-marks are neither counted nor sent except on written instructions to send them, these marks may be omitted, with the exception of the period and interrogation-point.
  But in important telegrams, where a direct quotation is to be transmitted, the safest method is to name the marks of punctuation, including the quotation-marks, as in the following example:
Insert in mortgage on page nine, end of first paragraph, these words quote in case of default in payment of the bonds comma...retain possession of the property period end quote.

The earliest examples we could find in print were in transcripts of official government telegrams circa 1901 and all of those examples were "end quote."
The earliest examples of "unquote" in print were also in transcripts of official government telegrams circa 1910 with the notable distinction that they were all trans-Atlantic telegrams.
It seems that two standards had evolved. "End quote" was being used in domestic telegrams and "unquote" was being used by the operators of the trans-Atlantic cables.  Usage of both terms were approximately equal in rarity until the mid-1930's when there was a sudden up-tick in the volume of trans-Atlantic communication of an official nature due to the war.  "Unquote" suddenly became much more common although "End quote" did not become less common than it had been.  The combined usage of the two terms increased dramatically with nearly all of the new instances "unquote."
As a standard in telegrams, "end quote" definitely came first but it was completely supplanted by "unquote."  When punctuation was spelled out for transmission, it was transmitted as written (in words rather than symbols)  Based on the practice of charging by the word, "unquote" is one word cheaper to transmit.  Both widespread exposure to cable operators during the war and the one-word cost economy may have influenced the switch.  By 1954, a similar manual to business users as the 1907 instruction pamphlet advises the use of "unquote."
Both terms have lived on outside of their narrow functional purpose essentially interchangeable.  "Unquote" is now far more common; "end quote" is a bit of an anachronism perhaps charming for that reason.
Comment: Unquote also has the major advantage of being a word which would be unlikely to appear within quoted material.  If instructed to change some text to QUOTE I THINK IT SHOULD END QUOTE, should the text include or not include the word "END"?  Not sure if that's the main reason, since telegrams for whatever reason show transmission breaks the same as the word "stop" [what does "HE SHOULD STOP GOING TO VISIT HER" mean?], but it would seem a logical argument in favor of "UNQUOTE".
Answer: I've heard people say "unquote" but always assumed it was a corruption of end-quote. Wiktionary backs up this assertion. A quick search of the Corpus of Conteporary American English finds 288 instances of unquote near "quote", typically in a phrase such as

He was, quote, unquote, busy.

So unquote is definitely a word that people are using.
Comment: I'm not sure how I'd punctuate "quote unquote", but I'm pretty sure there shouldn't be a comma *within* the phrase. Perhaps "He was --quote unquote-- busy."
Comment: @Martha: I copied the punctuation from the COCA. But I do like your way better.
Comment: @Rhodri: I agree.
Answer: Both "unquote" and "end quote" are more than a century old, but "end quote" is certainly the older term for closing a verbatim quotation in situations where regular quotation marks cannot (or could not) be used.

The early days of 'unquote'
Merriam-Webster's Eleventh Collegiate Dictionary (2003) dates the first print occurrence of unquote to 1915:

unquote n (1915) used orally to indicate the end of a direct quotation

An Elephind newspaper database search finds an instance of "unquote" from three years earlier. From "Funeral Ship Now Nearing the Port: It Is Possible the Body of Major Butt May Have Been Recovered," in the Richmond [Indiana] Palladium (April 25, 1912):

The ship adds this message: Confirm the names of W. H. Marriott, Mrs. A. H. Robbins, Louis M. Hoffmn, George Rosenshine, John H. Chapman, W. Carbines, ... Mrs. N McNames, Catvatas Zassilios, W. Vear (possibly Wm." T. Stead), Mary Mangen, William Sage, James Farrell, Henry D. Hansen, James Kelly, Moritz Adahl, W. D. Douglas, J. R. Rice, G. Hinckley, hospital steward, W. Butt, (unquote), (Possibly MaJ. A. W. Butt).

The use of "unquote" here seems to have been intended as an internal editing note—to end the quotation from the ship before moving on to the speculation about whether "W. Butt" was "Major A. W. Butt"—that was not intended for publication.
A Google Books search turns up an instance of unquote in a cable from October 1914 (although the cable was not published in its original form until February 1915). From a cable dated Sunday, October 11, 1914, reproduced in Charles Crane, "Mobilizing News: How the War Reports Come by Cable, and Are Distributed by the News Associations," in Scientific American (February 6, 1915):

PARIS 235 SUNDAY ADD 1255 PENNANT WHICH DROPPED SAME TIME BOMBS BORE INSCRIPTION IN GERMAN QUOTE WE HAVE TAKEN ANTWERP YOUR TURN WILL SOON COME UNQUOTE FOUR CORRECT KILLED BY BOMB TWENTY INJURED OF WHOM TWELVE WOMEN OR GIRLS SOME SERIOUSLY

Multiple instances appear in Google Books search results from 1916 forward.
From a cablegram sent by Robert Borden in Ottawa on March 29, 1916, to the British Minister of Militia and Defence in London, reproduced in Official Reports of the Debates of the House of Commons of the Dominion of Canada (March 30, 1916):

On June nineteenth last a contract was made between the Shell Committee and this company [the American Ammunition Company] for the purchase of two million five hundred thousand fuses. It was signed by E. B. Cadwell as president of company, by General Bertram for Shell Committee and ratified and confirmed by General Hughes quote in accordance with authority duly conferred upon me by His Britannic Majesty's Government unquote.

From a series of telegrams sent or received by Adjutant General Hall in 1916, reprinted in Biennial Report of the Adjutant General of the State of Nebraska for 1915–1916 (1916):

Chicago, Ill., June 25, 1916. ... Following telegram repeated for your information and guidance quote commanding general Central Department. Grave necessity for additional troops on border. Various requests are being made to delay movement of state organizations until the larger tactical units are organized at state camps. Organization of these units will be perfected on border. Meanwhile secretary war repeats previous order that organizations move as soon as each is ready, regardless of additional recruits which will follow organization to border. McCain, Unquote.
...
Chicago, Ill., June 30, 1916. ... Following repeated for your information guidance and transmission to all concerned quote Commanding General Central Department, Chicago, Ill., in view of the fact that general knowledge of troop movements enroute to Texas border or in Texas might result in some malicious act that might seriously hamper these movements and also might result in unnecessary loss of life among troops, Secretary of War directs that all concerned in your department be instructed to effect that no information as to movements of troops is to be given to representatives of the press, to any individual other than the officials of the railroad concerned or the representatives of the American railway association located at the various department headquarters and mobilization and concentration points McCain unquote.
...
Chicago, Ill., July 3, 1916. ... Following from War Department today quote if new oath to comply with sections seventy and seventy-one national defense act has been taken there is no necessity for repeating it or taking any other. ...Men refusing should be held to federal service as organized militia and mustered as contemplated in section seven Dick bill McCain unquote.
Lincoln, Nebr., July 4, 1916. ... Nebraska Aero Company fully organized according to Tables of Organization. All men have taken required oath. Chief, Division Militia Affairs informs us quote Before application for Aero Company can be considered, it will be necessary for the State's quota of troops called for to be raised to war strength unquote.
...
Chicago, Ill., July 16, 1916. ... War Department instructions sent July 5th to all mustering officers are repeated for all camp quartermasters. Quartermaster supplies for militia reaching mobilization camps after departure of troops will be forwarded to organizations at their present stations and invoices covering same forwarded to respective regimental quartermasters. Commanding general southern department should be advised of each shipment unquote department commander directs compliance.
...
Lincoln, Nebr., July 17, 1916. ... The following telegram received these headquarters. Quote Private H. C. Stingley, Company K, 4th Infantry residence Silver Creek, Nebr. father's name C. J. Stingley, Silver Creek drowned while bathing. Body no yet recovered unquote.
...
Lincoln, Nebr., July 18, 1916. ... Reference National Defence oath of men not already signed up attention invited to Section seventy National defense act period R. S. Neb. Par. 3919 sec. 21 provides quote I do solemnly swear or affirm that I will bear true allegiance to the United States and to the state of Nebraska that I will serve them ho0nestly and faithfully against all their enemies and opposers whomsoever, and that I will observe and obey the orders of the President of the United States, the Governor of this State and the orders of the officers appointed over me according to the rules and articles of the government of the army of the United States and this state. Unquote. explain this to captains and men concerned.

I note that the July 16 telegram, as reprinted in the report, lacks a "quote" marker to serve as a bookend to the unquote at the end—an error that renders the "unquote" marker very nearly useless.
From "Reuters Telegram: Latest Particulars: Biaches Fort Taken: Captured by Eight Men," in the Rutherglen [Victoria] Sun and Chiltern Valley Advertiser (July 21, 1916):

A German company, which occupied the fort, resisted all day. A French officer with seven men crept up to the fort without being detected. The French officer and one man rushed up throwing grenades, and shouting quote charge with bayonet unquote. The enemy, consisting of 113 men/became panic stricken and surrendered The enemy believed that the other six French men who were charging up furiously were forerunners of many more.

From various telegrams and cables originally sent in 1916, reprinted in The Papers of Woodrow Wilson: November 20, 1916-January 23, 1917 (1982):

Ft. Sam Houston, Texas, November 30, 1916.
Number 3819. Following received from General Bell. Quote: Replying to your eight fifty five shall keep you posted. Have been sending General Pershing whatever information came into our possession. ... Whether Villa has a force at Sauz or not there is a large body of bandits estimated at about one thousand between Sauz and Juarez. It is not believed that Villa himself will attempt to come to Juarez. It has just been reported a number of people are shouting viva Villa in the streets of Juarez and are not being disturbed. Unquote. Bell. Funston.
...
Fort Sam Houston, Texas, December 9, 1916.
Following received from General Pershing: Quote: Villistas gathering cattle, horses, Santa Clara Valley. Entire district said now to be for Villa. ... In the light of Villa's operation during the past two weeks, further inactivity of this command does not seem desirable, and there is no longer doubt as to the facts. As stated in previous communications, aggressive action would probably meet no resistance by Carrancist{a}s and should meet their approval. Civilian elements would welcome us, as they now wonder at out inactivity. Unquote.
...
{London} December 29th 1916.
5390 Very Confidential and Urgent for the President ... He [Lloyd George] went on to speak most earnestly and eloquently of the relations of our to governments and peoples, saying, quote, "We are friends. We are kinsmen. We have common ideals and a common destiny. A capital danger to one is a capital danger to the other. ... We must forget incidental irritations and forgive mistakes. The future of the whole world depends on our understanding one another." Unquote. He added, quote, "Do I make myself quite clear? We do make mistakes. We do have irritations. They will be forgotten if we are both conciliatory. But the harm done to all mankind if we drift apart will never be forgotten nor forgiven." Unquote.

This last note reads oddly because it uses the "quote"/"unquote" conventions of contemporaneous trans-Atlantic cables, but also includes actual quotation marks. I don't know whether these were included in the original text of the message or not.

The early days of 'end quote'
For its part, "end quote," in the sense of "end (or close) quotation mark, has appeared in published works since at least 1894. From "The Late Dr. Norman Chevers" in The Medical Reporter (October 16, 1894):

We have a peculiar weakness for inverted commas, or as printers call them "begin and end quote," and it is only fair that when anything is "lifted" out of our columns, to which we have no objections whatever, our contemporaries should comply with the custom observed by all honest journalists—that is, not to omit the commas we have referred to.

From "Newspaper Proof-Reading," in The Writer (July 1901):

The only pause a proof-reader knows is the pause to take breath. It is better to take moderately deep inspirations and read five or six lines than to take a shallow breath that needs renewing at every comma. A parenthesis may be signified by dropping the voice three or four notes while passing through it. Quotation marks, where they are not obvious, are indicated by the reader by using the expression "quote" and "end quote." Where but one or two words are inclosed in quotation marks, it is the quicker way to call off the number of words quoted, as: "They were 'in sweet accord' (three quote) on this point." Any punctuation, whether unusual or obscure, is indicated by naming it and not by any inflection of the voice. "He is dead (period)," "He is dead (quære)," and "He is dead (screamer)" serve to make it clear to the copy holder whether the sentence is a statement, an interrogatory, or an exclamation.

And from "Helpful Hints and Suggestions," in The Writer (December 1903):

For Writers Who Dictate.—When you are dictating to a typewriter or to any copyist, if you want to have a word written with a capital letter, say, for instance: "State, capped." If you want to have the whole word printed in capitals, say: "State, in capitals." If you want to have a short phrase put in quotation marks, say, for instance,: "These (pause) boodlers and grafters quoted (pause) of whom I have spoken." If you wish to have a long extract put in quotation marks, say at the beginning: "Begin quote," and at the end: "End quote." Always indicate a new paragraph to the copyist by saying, "Paragraph."

The use of "end quote" in the same sense as "unquote" was current by 1900.
From George Horton, A Fair Brigand (1899):

Two of my countrymen are in the clutches of Takis, the most fiendish and implacable demon since the days of Nero. Quote: 'If the ransom demanded is not in my hands in one week,' he said in his letter to the American Consul, 'I will send these Americans back piecemeal.' End quote. Perhaps he is even now carrying out his hideous threat. Horrible!

From a telegraph message dated April 11, 1900, from the Quartermaster-General in Washington D.C., to the quartermaster in Seattle, Washington, reprinted in Moran Brothers Company v. the United States (May 16, 1904):

Following instructions received by me form the Assistant Secretary of War (quote)—"You are authorized to purchase the steamer G.W. Dickinson, now in process of construction at the shipyard of Messrs. Moran & Bros., Seattle, Washington, at the price at which she is offered for sale by Mr. E. E. Caine, viz, one hundred and forty-five thousand dollars, upon the conditions hereinafter contained. ... third, that the ship shall be inspected and examined by a board of examiners consisting of General George M. Randall, commanding the Department of Alaska, one representative of the Quartermaster's Department, and an officer of the Navy Department, with a favorable report thereon to be approved by the Secretary of War upon the recommendation of the Quartermaster-General' (end quote).

From a telegram dated March 14, 1902, reprinted in "Letter from the Secretary of War, Transmitting to the Senate Information Relating to the Free Transportation of Goods for Private Firms to and from the Philippine Islands in Government Transports" (April 3, 1902):

Resolution Senate calls for information (quote) relating to the free shipment or transportation of goods for private firms or individuals to or from the Philippine Islands in Government transports (end quote).

And from a telegram sent from Manila, Philippines on April 23, 1908, reprinted in Dean Worcester, A History of Asiatic cholera in the Philippine Islands (1908):

Following telegram received from provgov Capiz quote. Proboard believes services cholera expert necessary believes prevent general epidemic municipality Sapian forty cases twenty-nine deaths Ivisan twenty-two cases twenty deaths Capiz three cases two deaths. Take up with bureau health. End quote.

By 1911, the convention for using "quote" and "end quote" to indicate a quotation seems to have been fairly well established in wire service journalism. From Charles Ross, The Writing of News: A Handbook with Chapters on Newspaper Correspondence and Copy Reading (1910):

When an extract from a speech or a document is sent by wire, indicate the beginning of the quoted matter with the word "quote" and the end with the words "end quote."

And from Eleanora Banks, Correct Business and Legal Forms: A Reference Manual for Stenographers, Secretaries, and Reporters (1912/1916):

As punctuation-marks are neither counted nor sent [in telegrams] except on written instructions to send them, these marks may be omitted, with the exception of the period and interrogation point.
But in important telegrams, where a direct quotation is to be transmitted the safest method is to name the marks of punctuation, including the quotation-marks, as in the following example:

Insert in mortgage on page nine, end of first paragraph, these words quote in case of default in payment of the bonds comma or any coupon thereto belonging comma the trustee shall retain possession of the property period end quote.

This last cited references appears to be the same one that Aaron K cites in his answer—but he attributes it to a guide that Western Union published for secretaries (or teletype operators) around 1907. I haven't been able to find an earlier instance of the text than the first edition of Banks's book from 1912.

Assessment
The support for "end quote" as an instruction or typographical note meaning "end the quotation here" or "the quotation ends here" was widely understood and seemingly firmly established in the United States among journalists, editors, and telegraph operators. How it came to be eclipsed by the then-unknown term "unquote" within the next thirty years is not obvious from the print record—but an Ngram cahart of "end quote" (blue line) versus "unquote" (red line) for the period 1890–2019 leaves no question that it did happen:

The earliest instance of "unquote" that I could find was from a late breaking news flash published in an Indiana newspaper about the identification of bodies recovered from the Titanic disaster in April 1912—an article that seems to have been hurriedly added to the newspaper and not carefully edited or proofread. Nevertheless, it suggests that at least some people were already using "unquote" instead of "end quote" before the start of World War I.
That war saw the first burst of widespread use of "unquote" in cables to and from Europe and in internal communications within the U.S. military. in the aughts, the U.S. government had been at the forefront of nonjournalistic use of "end quote" but in the 1910s it gravitated toward "unquote." It may well be that "unquote" began as a mishearing of "end quote," but it had a couple of advantages over the more-established term: it was slightly shorter; and it was an unmistakable as a marker, whereas "end quote" might be ambiguous in certain contexts.
A couple of usage commentators within the past sixty years have weighed in on "unquote" versus "end quote." From Wilson Follett, Modern American Usage: A Guide (1966):

The broadcaster's practice of using the words quote and unquote in lieu of visual quotation marks is often copied by lecturers and persons reading aloud informally. Unquote is from the jargon of newspaper cables, and some who realize that it is not a word in the ordinary sense take pains to substitute end quote, which is perhaps better in one way but worse in another. We have all had to get used to hearing such a sentence as The White House spokesman said there would be a further announcement "in a matter of hours" read: [He] said there would be a further announcement quote in a matter of hours unquote. But this is an affliction no one should be required to get used to. For one thing, the quotation marks around such phrases ought not to be there for anyone to read. It is implicit in spokesman said that another's words are being reproduced in indirect discourse and it often makes no difference whether they are being exactly reproduced or not. For another, men so accomplished as those who broadcast should be able to make their pauses and intonation convey quotation marks whenever these are needed around such mere scraps and shards of utterance. When a quotation is read in extenso, there i no need to to say quote after one has said General B. made the following explanation. When the end is reached, a perceptible pause and a change of pitch will do the business of unquote without that clumsy and affected intruder into speech.

Writing almost forty years after Follett, Paul Brians, Common Errors in English Usage (2003) has a very different take on the merits of "unquote" versus "end quote":

endquite/unquote Some people get upset at the common pattern by which speakers frame a quotation by saying "quote ... unquote," insisting that the latter word should logically be "endquote"; but illogical as it may be, "unquote" has been used in this way for about a century, and "endquote" is nonstandard.

My own view is that the opportunity for reasoned opposition to "unquote" sailed (and sank) with the Titanic (which had no sails). A hundred and ten years later, English has a thoroughly established marker word that is as useful in some contexts as "exclamation point" sometimes is, and as pointless in others as an ill-considered "[sic]." Meanwhile, "end quote" still enjoys more widespread use than you might suppose from Brians's characterization of it as "nonstandard."
If you fear that your hearers would be baffled by "end quote," then by all mans use "unquote." If "unquote" makes you queasily ponder what the world would be like if the signal phrase "end transmission" were suddenly supplanted by "untransmission," then feel free to resort to the quasi-nonstandard "end quote." Most people, I think, will have a pretty good idea of what you mean regardless of which option you choose.
Answer: In general, I have always heard "quote-unquote" used in direct sequence before a single word, often one which is being questioned.
Example:
He insists that low fat products are quote-unquote healthy!
Of course you would never actually write the "quote-unquote". It is for spoken word only.  When writing you just put quotations around the word "healthy"
As for "quote" and "end quote", they are used around the body of an actual quotation.
He insists that quote low fat prooducts are the way to go for those trying to persue a healty diet. end quote
Here again, these things are never written, just used during spoken communication to clarify the part of the sentence which is a quotation.
Answer: One cannot "unquote" a phrase or word if it is being quoted, unless of course you want to remove the word or phrase being quoted. Doesn't that make sense? To "seal" a quote, one must "end quote", or, "end of quote" which satifies and finalizes the context stated.  The term "unquote" must have become common when it was accidently misconstrued with "end quote".
I value what my eighth grade teacher taught the lot of us upon a student "quoting" and "unquoting" something said that I've long forgotten.  But I will always remember his  lesson to be shared immediately there after on a quoted word or phrase...
If anyone can search historically where this term might have become transformed to it's hideous present (save many reporters and announcers on NPR), I would appreciate the info!

Is it "end quote" or "unquote"?


How to configure Carrierwave to use multiple CDN CNAME urls

Question: In Rails I can serve assets from a CDN, and set up multiple CNAMES for simultaneous loading.
For example I put config.action_controller.asset_host = "http://assets-%d.myappp.com" in config/environments/production.rb, and then my assets are served from
http://assets-0.myapp.com
http://assets-1.myapp.com
http://assets-2.myapp.com

This is great, and dramatically increases page load time.
My app contains a lot of user generated images handled via Carrierwave. I would like to apply the same approach for these images. I've set up the CDN, and in config/initializers/carrierwave.rb I've added the following:
config.asset_host = "http://images.myapp.com"
Now I have two questions:

How do I ensure this CDN is only used in production?
How do I use multiple URLS (e.g. images-0.myapp, images-1.myapp, etc). The %d
method does not appear to work in the initializer.
Answer: I had the same problem today and came up with this:
# staging
ENV['S3_CLOUDFRONT_DOMAIN'] = "//s3.amazonaws.com/bucket"

# production
ENV['S3_CLOUDFRONT_DOMAIN'] = "//assets%d.domain.com"

And in your initializer:
# config/initializers/carrierwave.rb
if ENV['S3_CLOUDFRONT_DOMAIN'] =~ /%d/
  config.asset_host = proc do |file|
    "#{ENV['S3_CLOUDFRONT_DOMAIN'] % (Zlib.crc32(file.filename) % 4)}"
  end
else
 config.asset_host = ENV['S3_CLOUDFRONT_DOMAIN']
end

Note that I'm using ENV variables for my domains and that I have file.filename which corresponds to my mounted column. I didn't have time to find a way to access the mountable column through a helper so I'll have to come back to that, for now it works.
This will handle both multiple CDN endpoints and a single endpoint for staging or development.  Make sure that the protocol or at least "//" is provided for your endpoints otherwise Carrierwave thinks it's a folder an ends up with /images/s3.amazonaws.com/site/path/to/file.jpg
Hope that works for you too.
Also, I'm using Carrierwave 0.9.0
Comment: Maybe you could add info where you set the `ENV['S3_CLOUDFRONT_DOMAIN'] = "//s3.amazonaws.com/bucket"`
This might be obvious to you, but not everyone who happens upon your answer.
Answer: Johnkoht's answer got me looking at the carrierwave reference docs.  They suggest
CarrierWave.configure do |config|
  config.asset_host = proc do |file|
  identifier = # some logic (note: I used "images-#{rand(3)}
  "http #{identifier}.cdn.rackspacecloud.com"
  end
end

I combined this with a dedicated initializer for carrierwave production and got it working


Laplace and unit step- multiplication vs convolution

Question: Please be gentle if the question is stupid.
When using the laplace transform, you often multiply the function of interest by a shifted unit step function to operate on the positive portion of the function since the Laplace transform is defined from time=0 to infinity.
Why can we do this multiplication?  Why is it not a convolution?
Answer:
Your questions are not stupid questions. In fact, they are the most important questions, which you should not forget when making an analysis of signals and systems. This is because if you apply erroneously the unit step function to a particular signal, the analysis will surely be wrong (in engineering, can make drop a bridge, almost without exaggeration ...).
If you are not completely internalized or do not understand the answers here, check my answer to the following question that explains a little more detailed the matter: Unilateral Laplace Transform vs Bilateral Fourier Transform.

1. Why can we do this multiplication?
This multiplication is done to make a system acquires the behavior of a physical system, or more specifically, the behavior of a causal system, since:
$$
h(t) \mbox{ is a casual system} \quad\Leftrightarrow\quad \forall t\in\mathbb{R},\, t < 0:\quad h(t) = 0
$$
$$
\therefore\quad h(t)u(t) \mbox{ is always a casual system}
$$
Note that you should not always multiply a system for the unit step function. In fact, if a system is not causal, then you never should multiply the system function $h(t)$ by the unit step function. In summary:

Causal System (Non-anticipative System): always multiply by the unit step.
No-Causal System (Anticipative System): never multiply by the unit step.

The reason for this is explained in my answer in the link above.

2. Why is it not a convolution?
Because the objective of the Laplace transform is just avoid convolution. Convolution is difficult to calculate and needs a lot of computing power, while a transformed simplifies the process of convolution to a simple multiplication.
$$
y(t) = h(t) \ast x(t) \quad\xrightarrow{\mathcal{L}}\quad Y(s) = H(s) X(s)
$$
Again, the reason for this is explained in my answer in the link above.
Comment: Ok ,got it.  I know the definition of the unit step, my intent was to try to determine if the reason we could multiply by it had something to do with the fact that it is a constant, 1, for t>0- hence the change in its definition for the sake of asking the question.  I now understand that that is not the reason.  The reason is that the u(t) is not the **input signal**, but a mathematical **mechanism** to force the system to be causal.--Thank you!
Comment: Thank you.  However, my fundamental doubt remains-- why is it that it that the time domain function can be multiplied by a unit step instead of convolved by it when making the system causal?  Why is that operation in time domain a multiplication and not a convolution?  Is it because the unit step does not alter the function in any way and only shifts it (or truncates it) to be non zero at t>0?
Comment: You must understand (and perhaps is what has confused) that *convolution is an operation* (which becomes a multiplication in the frequency domain). While *the unit step function alters the function (truncates it) to be **zero at t<0***, **to force mathematically a system to be causal.**

However, in essence, causality and the convolution are two totally different concepts.
Comment: Thanks for hanging in there with me!  Let me try to frame my misunderstanding in a different way.  If u(t) (hypothetically) were not a unit step , but were instead, say, u(t)=3t^2+t+1,  we would not be be able to multiply h(t) by u(t) (**in the time domain**), because u(t) actually convolves with h(t) in this example with u(t)=3t^2+t+1.  Assuming this is correct, my fundamental question is why then can we then multiply h(t) by u(t) (**in the time domain**)when u(t) is the unit step? Under what conditions do we convolve vs multiply when combining functions in the time domain?
Comment: I got it. Let me explain: **You are mistaking the input signal system with the unit step function.** The unit step function *only serves to force (mathematically) to the system function $h(t)$ to behave as a causal system.*

In these terms, the right thing would be to define:
$$\mbox{input signal }\rightarrow x(t)=3t^2+t+1$$
$$\mbox{system function }\rightarrow h(t)=\cdots$$
$$\mbox{system function (forced to be causal) }\rightarrow h(t)u(t) = h_2(t)$$

And only now you can make the convolution between $x(t)$ and $h(t)$ (or $x(t)$ and $h_2(t)$, if your original $h(t)$ is a causal system).
Comment: I forgot to say in the previous answer that **the unit step function $u(t)$ is always defined** as:
$$
u(t) = \left\{ \begin{matrix} 1, & t>0 \\ \mbox{indefinite}, & t=0 \\ 0, & t<0 \end{matrix} \right.
$$
The definition for $t = 0$ can change according to the convention, but does not alter or affect (in continuous time) the convolution process, so for all practical purposes is the same.


How to insert a large number of list entries into sqlite statements

Question: Ok, I am using apsw with sqlite, and have a large list of entries.Each entry contains a new row to be inserted. The number of entries is sometimes 20, sometimes 21. Since apsw supports multiple sql statements in curser.execute(), I was wondering if there would be a less confusing way of inserting all my list entries into the database than just doing something like
for entry in foo:
    cursor.execute(INSERT OR UPDATE INTO database.main ("{0}".format(entry))

I want to do it in all one thread because sqlite auto-commits to the database each time the execute finishes. Is there an easier, more efficient, and less confusing way?
Answer: apsw cursors have an executemany method:
cursor.executemany('INSERT OR UPDATE INTO database.main values (?)',foo)


Can I use the Google Weather API in a commercial project?

Question: Can I use the Google Weather API in a commercial project, if I just added a "weather powered by Google" link?
Comment: **The Google weather API was shut down in 2012.** See http://stackoverflow.com/questions/12145820/google-weather-api-gone/35943521
Answer: It looks like the Google Weather API is not even an officially supported API, but a 'hack' found and documented by other people. So there is no terms of use that defines if you can use it commercially.
But if you look at a similar API offered by Yahoo, its terms of use explicitly prohibit commercial use, so I wouldn't gamble on using Google's API in your project.
Answer: As far as I know the Google weather API is not an officially supported public Google API. It's internally used e.g. by Google Calendar or iGoogle. Therefore I think, the legal status is somehow indefinite.


crawlspace insulation

Question: I have crawlspace with an earth floor. it is approx. 24" from the ground to the floor joist. I have  6 mil poly on the ground. I have vents that will be opened in the summer and closed during the winter. There are no heating or a/c ductwork in the crawlspace and the water lines are insulated to keep condensation from being a problem. What is the thought on installing insulation between the joist and if so what is the best type of insulation to use to keep it from keep insulation from hanging down over a period of time.
Answer: When I've done this in the past, I've put in fiberglass between the floor joists, and then covered it with sheets of extruded polystyrene insulation board (XPS) to add a bit more R value and keep it in place.  If you're worried about critters chewing around, you can do the same thing with thin plywood or fiberglass reinforced plastic panels.
Comment: R-19 is required in Maryland, it may be different in batalor's area. Nice touch with the foam board, it keeps the area clean, although his needed access is minimal. I have the joist sections of my home insulated, built in 1989. The insulation is installed with the paper side to the floor, fiberglass exposed. I used wire supports to hold it in place, still holds today. I have had need to go into the crawlspace and run updated wiring from time to time and removing the wire supports came in handy for access of the floor from below. Please pardon my embellishment of your answer with more options.
Comment: @Jack - Not a problem at all, nice embellishment.
Comment: @Jack, good comments . What are your thoughts on no insulation if the crawlspace vents are closed up in the winter. I am in eastern Virginia
Comment: I'd still insulate.  Keep in mind that you insulate against *heat transfer*, so floor insulation will also help your A/C in the summer.
Comment: Comintern is spot on, insulate. In our area, (I am near Annapolis) code requires R-19 for floors. For what its worth, there is debate on whether foundation vents do any good or not. I could see their purpose in a damp crawlspace. I know it is not part of the question, just part of your situation, I thought I would throw it out there anyway. In homes I have built, the crawlspace walls have been insulated with 2 lb spray foam. Any other kind I would worry about a handy insect path to your wood. Just getting that out there too.

crawlspace insulation


Secure contents of an SD Card in Android

Question: I have some sensitive content data that I provide with my Android application and this data (almost say 1 gb of it) is stored on an SD Card. I want to prevent users from using this card in other places other than the tab itself and reading/copying content off it on a computer or another tablet. I've thought about encryption mechanisms but for the amount of data I have these are very slow and not an option. Are there any hardware settings I could change or file data formats I could use to achieve this? Basically when I remove the card and put into another device I should not be able to copy data from it unless say I have a Pin number or some security mechanism. Most of the content is either pdf files or mp4 videos and I need a sort of software/hardware DRM mechanism.
Answer: I haven't done anything of this sort, but THIS might be your best bet.
If you can't implement an online service for your content, you could try creating a proxy local service which will handle the DRM Info Requests for you.


Regarding first name and last name

Question:
When a professor is Michael Ernst (I suppose Michael is first name, and Ernst is last name), we call him Prof. Ernst or Prof. Michael?
When his close friends call him, should they call him Michael, or Ernst?
I see that he has called himself Mike, what is the reason?
Answer: You are correct that Michael is his first name, and Ernst is his last name, also known as surname or family name.

When addressing someone using a formal title, such as "Professor", you would typically use the last name.  In this case, it would be "Professor Ernst", or "Prof. Ernst".  Note the use of a period to indicate the abbreviation of "Professor" as "Prof.".
Close friends typically address each other by their first name, which in this case is "Michael".  However, the last name is sometimes used informally among friends, as a nickname.  As an aside, you mistakenly wrote "closed friends" in your question, instead of "close friends".
"Mike" is an informal alternative to "Michael".  This is technically referred to as a diminutive, but may also be called a nickname.  Similarly, someone named "Robert" may go by the less formal alternative, "Bob".  However, as a matter of politeness, you should typically start out with the more formal version of the name, unless you are fairly certain that they typically prefer the diminutive.  In this case, if Professor Ernst has referred to himself as Mike, it is safe to assume that you should, too.
Comment: *However, as a matter of politeness, you should typically start out with the more formal version of the name* I disagree. I think you should start out with whatever they introduce themselves to you as. I know Matts that would be annoyed to be called Matthew and a Matthew who hates the nickname Matt. If they say, "Hi, I'm Matt," then I don't think you should jump to calling them Matthew.
Comment: (+1 anyway though as I think this is generally a good answer.)
Comment: @starsplusplus, I agree: if someone introduces themselves using the diminutive form of their name, it's perfectly natural and polite to use the diminutive, and would be awkward to do otherwise.  When I wrote "unless you are fairly certain that they typically prefer the diminutive", I meant for that to include the scenario where they introduce themselves using the diminutive.  I guess I could have made that clearer!
Answer:
Yes, in the name Michael Ernst, Michael is the first name, while Ernst is the last name, family name, or surname (all three mean the same).  Generally when referring to someone by title you will use their surname. In this case, Professor Ernst. However, some persons wishing to retain informality with their title may prefer to be called by their first name, as in Professor Michael.  More often than not, however, it is Title Surname. Therefore, except in matters of personal preference by the person you are addressing, the formality is best: Professor Ernst.

Most people prefer go by their first names among their friends, but it is a matter of preference. So usually Michael is what his friends would call him. However, people that have been in a lot of sports, the military, or other professions that require specificity in naming may choose to use their surname as the name their friends call them.  Or they may choose another name entirely, sometimes based on their formal first name, and sometimes not. This is called a nickname, which I'll explain more in #3.

"Mike" is a shortened form of "Michael" often used informally, called a nickname. Many who have long formal names will be called by a shorter name. For example, someone named "Joseph" might be called "Joe". However, one cannot assume that just because people call a person Mike that their formal name, or given name, is Michael. Some people were given the shorter version of the name at birth.
Complicating the matter, Americans often take nicknames which are sometimes easy to tell from the formal name, and sometimes not. For instance, a person whose
name is "Richard" may go by "Dick" as a nickname. It's just how
these nicknames have evolved over time--they don't all make perfect
sense. There are also often many nicknames that can be derived from
a given name. You may have to look them up on an individual basis to see how they relate.
Answer: Well, I'll answer them as they are asked...

a) Generally, it's Prof. Ernst i.e. Prof. [last name].   b) It depends on his close friends what they call him!   c) The most popular nickname for Michael is Mike.

Regarding first name and last name


If an iPhone is out of power will it receive msgs?

Question: I am sending a message to my son who has an iphone6s. I have done it previously with no problem. I sent him one which was marked " delivered " and about 18 hrs sent a couple which were marked " message not delivered". Could this be the result of his battery running out of charge? I have phoned him a few times and went right to the answering machine. Thank You to anyone that can shed any light on this question Thanks  Nick, btw I am sending the msg from an iphone6.     Thanks Again.    Nick
Comment: You wouldn't get a "message not delivered" error due to his phone being off, since the message is still going to his account (no different from how you can send an email regardless if the recipient's computer is on or off).
Answer: The device is in a state that cannot receive messages, so probably off. The messages are still going to the iMessage account/phone number because they are still active, despite the device being inactive.
Comment: I'll add that a phone having no service counts too. Like if you are in Plane Mode, under a tunnel, in a plane, etc. Just no network.
Answer: You receive the messages when your phone is recharged
Comment: We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.


Pass data to redirect page when redirecting on netlify

Question: I have a netlify site built with just html, css, js.
I understand I can add a _redirect file to my project root that handles the routes that redirects all routes to a given page like so.
/* /index.html 200

If the user navigates to /brad it should redirect to /index.html.
My aim is to avoid creating a .Html file for every route.
However I want to be able to keep the path as a variable (brad) or pass the path to the page. I want to access the variable (brad) in the js in index.html .
My intention is to make a different action based on the path name. So /brad will work differently from /susan (where susan might be a user on the site).
An example would be if the user is not logged in log them in and send them to /brad (brad's profile page) after they log in or 404 page if no user brad exists. Here I need to keep track of which path the user originally accessed to know where to send them afterwards.
I know in server side code like php, laravel you can pass a redirect->with($variable) based on which route was accessed which can be accessed on the page that the user is redirected to.
Is it possible to pass the path of redirects on netlify as a variable to the js in the /index.html?
If no, would netlify be a bad option for sites that need to display dynamic routes such as www.example.com/profile/1 ? Should I go for a traditional server solution with a separate backend?
I use firebase for authentication and storing user data.
Comment: A trick you can use is to make the 404 page redirect the routs instead of the _redirect file, so you can redirect users from /brad to /?from=brad.
Comment: If I get you right I am going to get the url parameters from window.location.href on my site 404 page and redirect to my routes page with the path as a parameter. I will give it a go.
Answer: Following the comment from @ChalanaN, I created a 404.html page at the root of my project. Netlify displays this page for all non-existent routes.  The page contains a script that gets the last parameter in the url and adds it as a query parameter on the link to the redirected page.
In 404.html

In index.html

Here the variable redirectPath will contain the original path the user accessed.
So www.example.com/brad.html will redirect to '...index.html?q=brad.html' with 'brad.html' as the final content in the redirectPath variable and now you have the redirect path in a js variable.
A warning: using 'index.html/?q=' will give a cannot get index.html/ 404 on your local machine when using live server so make sure there is no / before the page to be redirected if you intend to test locally.
As a sidenote, you could use window.location.pathname to get the path but that returns the path with the '/' attached to the path the user entered.


How can I get href links from HTML using Python?

Question: import urllib2

website = "WEBSITE"
openwebsite = urllib2.urlopen(website)
html = getwebsite.read()

print html

So far so good.
But I want only href links from the plain text HTML. How can I solve this problem?
Answer: Try with Beautifulsoup:
from BeautifulSoup import BeautifulSoup
import urllib2
import re

html_page = urllib2.urlopen("http://www.yourwebsite.com")
soup = BeautifulSoup(html_page)
for link in soup.findAll('a'):
    print link.get('href')

In case you just want links starting with http://, you should use:
soup.findAll('a', attrs={'href': re.compile("^http://")})

In Python 3 with BS4 it should be:
from bs4 import BeautifulSoup
import urllib.request

html_page = urllib.request.urlopen("http://www.yourwebsite.com")
soup = BeautifulSoup(html_page, "html.parser")
for link in soup.findAll('a'):
    print(link.get('href'))

Comment: A reminder for people came across this answer recently, BeautifulSoup3 is no longer supported in Python 3, the latest version would be BeautifulSoup4, you can import it with `from bs4 import BeautifulSoup`
Comment: BeautifulSoup can not automatically close `meta` tags, for example. The DOM model is invalid and there is no guarantee that you'll find what you are looking for.
Comment: another problem with bsoup is, the format of the link will change from its original. So, if you want to change the original link to point to another resource, at the moment I still have no idea how yo do this with bsoup. Any suggestion?
Comment: Not all links contain `http`. E.g., if you code your site to remove the protocol, the links will start with `//`. This means just use whatever protocol the site is loaded with (either `http:` or `https:`).
Answer: You can use the HTMLParser module.
The code would probably look something like this:
from HTMLParser import HTMLParser

class MyHTMLParser(HTMLParser):

    def handle_starttag(self, tag, attrs):
        # Only parse the 'anchor' tag.
        if tag == "a":
           # Check the list of defined attributes.
           for name, value in attrs:
               # If href is defined, print it.
               if name == "href":
                   print name, "=", value

parser = MyHTMLParser()
parser.feed(your_html_string)

Note: The HTMLParser module has been renamed to html.parser in Python 3.0. The 2to3 tool will automatically adapt imports when converting your sources to 3.0.
Comment: I likte this solution best, since it doesn't need external dependencies
Comment: @swdev - I realize this is a few years late, but url encoding/decoding is how to handle that.
Comment: I come to realize that, if a link contains the special HTML character such as `&`, it get converted into its textual representation, such as `&` in this case. How do you preserve the original string?
Comment: @Stephen How to find ahref links inside a tag table
Answer: Look at using the beautiful soup html parsing library.
http://www.crummy.com/software/BeautifulSoup/
You will do something like this:
import BeautifulSoup
soup = BeautifulSoup.BeautifulSoup(html)
for link in soup.findAll("a"):
    print link.get("href")

Answer: Using BS4 for this specific task seems overkill.
Try instead:
website = urllib2.urlopen('http://10.123.123.5/foo_images/Repo/')
html = website.read()
files = re.findall('href="(.*tgz|.*tar.gz)"', html)
print sorted(x for x in (files))

I found this nifty piece of code on http://www.pythonforbeginners.com/code/regular-expression-re-findall and works for me quite well.
I tested it only on my scenario of extracting a list of files from a web folder that exposes the files\folder in it, e.g.:

and I got a sorted list of the files\folders under the URL
Answer: Here's a lazy version of @stephen's answer
import html.parser
import itertools
import urllib.request

class LinkParser(html.parser.HTMLParser):
    def reset(self):
        super().reset()
        self.links = iter([])

    def handle_starttag(self, tag, attrs):
        if tag == 'a':
            for (name, value) in attrs:
                if name == 'href':
                    self.links = itertools.chain(self.links, [value])

def gen_links(stream, parser):
    encoding = stream.headers.get_content_charset() or 'UTF-8'
    for line in stream:
        parser.feed(line.decode(encoding))
        yield from parser.links

Use it like so:
>>> parser = LinkParser()
>>> stream = urllib.request.urlopen('http://stackoverflow.com/questions/3075550')
>>> links = gen_links(stream, parser)
>>> next(links)
'//stackoverflow.com'

Answer: Using requests with BeautifulSoup and Python 3:
import requests
from bs4 import BeautifulSoup

page = requests.get('http://www.website.com')
bs = BeautifulSoup(page.content, features='lxml')
for link in bs.findAll('a'):
    print(link.get('href'))

Answer: This is way late to answer but it will work for latest python users:
from bs4 import BeautifulSoup
import requests

html_page = requests.get('http://www.example.com').text

soup = BeautifulSoup(html_page, "lxml")
for link in soup.findAll('a'):
    print(link.get('href'))

Don't forget to install "requests" and "BeautifulSoup" package and also "lxml". Use .text along with get otherwise it will throw an exception.
"lxml" is used to remove that warning of which parser to be used. You can also use  "html.parser" whichever fits your case.
Answer: My answer probably sucks compared to the real gurus out there, but using some simple math, string slicing, find and urllib, this little script will create a list containing link elements. I test google and my output seems right. Hope it helps!
import urllib
test = urllib.urlopen("http://www.google.com").read()
sane = 0
needlestack = []
while sane == 0:
  curpos = test.find("href")
  if curpos >= 0:
    testlen = len(test)
    test = test[curpos:testlen]
    curpos = test.find('"')
    testlen = len(test)
    test = test[curpos+1:testlen]
    curpos = test.find('"')
    needle = test[0:curpos]
    if needle.startswith("http" or "www"):
        needlestack.append(needle)
  else:
    sane = 1
for item in needlestack:
  print item

Answer: This answer is similar to others with requests and BeautifulSoup, but using list comprehension.
Because find_all() is the most popular method in the Beautiful Soup search API, you can use soup("a") as a shortcut of soup.findAll("a") and using list comprehension:
import requests
from bs4 import BeautifulSoup

URL = "http://www.yourwebsite.com"
page = requests.get(URL)
soup = BeautifulSoup(page.content, features='lxml')
# Find links
all_links = [link.get("href") for link in soup("a")]
# Only external links
ext_links = [link.get("href") for link in soup("a") if "http" in link.get("href")]

https://www.crummy.com/software/BeautifulSoup/bs4/doc/#calling-a-tag-is-like-calling-find-all
Answer: Simplest way for me:
from urlextract import URLExtract
from requests import get

url = "sample.com/samplepage/"
req = requests.get(url)
text = req.text
# or if you already have the html source:
# text = "This is html for ex Google Yahoo"
text = text.replace(' ', '').replace('=','')
extractor = URLExtract()
print(extractor.find_urls(text))

output:
['http://google.com/', 'http://yahoo.com/']


Using certificates for authentication in a web site

Question: Today i faced a web site related to government that showed me all of my certificates in a combobox for authentication on that web site.
What were those certificates?
How can i show them in a asp.net web site?
Can browser access to those certificates?
If yes, Why there is such that access?
Can some body steal them and use them for Man In The Middle attack?
I Found this about stealing digital certificates :
Why Steal Digital Certificates?
Please give me some advice on this.
Answer: The website didn't show you anything. The server invoked a rarely-used option in the SSL/TLS protocol -- nowadays TLS1.2 RFC5246 7.4.4 or TLS1.3 RFC8446 4.3.2 -- asking the client, which is the browser, to authenticate using a certificate. The browser displayed a list of suitable certificates -- those installed in your system or browser for which you have a privatekey, and which are from a CA specified by the server (if it does so) -- for you to select from. Often browsers can be configured to skip this dialog if there is only one suitable choice (and just use it), and if there is no suitable choice they always skip the dialog and tell the server 'no cert for you', after which the server decides whether to let you connect with no cert (possibly allowing only restricted functionality in this case) or to reject the connection entirely.

How can i show them in a asp.net web site?

You can cause the browser to show them by requesting client authentication aka client certificate. I don't use asp.net, and questions about programming specific software are offtopic here anyway, but a quick search finds Microsoft doc and the following 'down the hall':
https://stackoverflow.com/questions/35582396/how-to-use-a-client-certificate-to-authenticate-and-authorize-in-a-web-api
https://stackoverflow.com/questions/53761660/net-core-web-api-with-client-certificate-authentication
https://stackoverflow.com/questions/60477579/certificate-authentication-implementation-in-asp-net-core-3-1

Can browser access to those certificates?
If yes, Why there is such that access?

Absolutely. The browser must access the cert (including the privatekey which is associated with but not strictly speaking part of the cert) in order to carry out the authentication procedure as defined in the SSL/TLS protocol and requested by the server. That's the way the server determines you are who you claim to be.

Can some body steal them and use them for Man In The Middle attack?

Not by themselves. Someone who steals your cert and privatekey can impersonate you. For example if this government website allows citizens to sign up for military service, someone could use your cert-and-key to enlist you without you knowing anything about it, and when the bus shows up at your house at 5am one morning to take you to basic training you'll be unpleasantly surprised.
But having your cert doesn't enable someone to impersonate any website, including the government one, to you, which is the goal of a MitM. For that they must either insert, or get you (or some other authorized person) to insert, a Certificate Authority (CA) certificate in your system or browser. Now, any malefactor who has enough access to steal your cert probably has enough access to also insert a CA cert, so you are at risk from that attacker, just not from the attack you asked about.
Comment: I doubt that they are rarely used - they're quite common in internal networks.
Comment: @MechMK1: The source for that is also 11 years old. Back then, Internet Explorer was more common than Google Chrome.
Comment: Even if the question is about websites, TLS is also used by a ton of other things, and lots of other protocols do need mutual authentication in which case client certificates may/can be used.


Verizon USB551L 4G Stick on Linux

Question: I have been trying to get a Verizon USB551L 4G USB Stick working on Debian Linux.  I have been able to get it to connect, but it always disconnects after 10 secs to 2.5 minutes, then it cannot connect again without a power cycle or reconnecting the stick.  I know it is not a signal strength issue because I do not have the same problem under Windows, where the Verizon client shows 4 bars.
Does anybody have an idea about what the problem can be?  More details follow.
With the same stick on Windows XP, I could establish a stable connection using Verizon's VzAccessManager, but using a manually configured DUN over the serial port, I experienced the same disconnect symptoms as on Linux.
I did the following with a Raspberry Pi with Debian GNU/Linux wheezy 3.2.27+.  I also tried it with a Ubuntu Linux VirtualBox VM on my Mac, but I never got very far because the drivers did not recognize the card properly.
With the Raspberry Pi, the stick was recognized and the "cdc_ether" driver created a wwan0 interface for it, and the "option" driver created a /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, and /dev/ttyUSB3.  Details are shown below.
In order to set up the connection on Linux, I gleemed some info from the VZAccessManager and from sniffing the Windows COM port using a program called HHD Free Serial Port Monitor to show me the commands that Verizon is sending over the serial port to the modem:

ATS0=0
OK
AT
OK
AT&F&D2&C1E0V1S0=0
OK
AT+IFC=2,2
OK
AT+CGDCONT=3,"IP","vzwinternet","0.0.0.0",0,0
OK
ATD*99***3#
CONNECT EDGE

There was additional non-textual communication after this that I could not read, some of it may have been CHAP or PAP authentication providing credentials I could not see.  Some of it was my internet access.
From the above and from the info I could get from the VZAccessManager screens, I cobbled together the following /etc/pppd/verizon-gprs and /etc/pppd/verizon-gprs-connect chat scripts that enabled me to connect on Linux.
verizon-gprs: (the ?????????? is the 10-digit phone number for my stick)

hide-password
noauth
user ??????????@vzw4g.com
password vzw
connect "/usr/sbin/chat -v -t3 -f /etc/ppp/peers/verizon-gprs-connect-chat"
debug
/dev/ttyUSB0
noipdefault
defaultroute
replacedefaultroute
persist
usepeerdns
nodetach

verizon-gprs-connect-chat:

TIMEOUT 35
ECHO    ON
ABORT   '\nBUSY\r'
ABORT   '\nERROR\r'
ABORT   '\nNO ANSWER\r'
ABORT   '\nNO CARRIER\r'
ABORT   '\nNO DIALTONE\r'
ABORT   '\nRINGING\r\n\r\nRINGING\r'
''  ATZ
OK  'ATS0=0'
OK  'AT&F&D2&C1E1V1S0=0'
OK  'AT+IFC=2,2'
OK  'AT+CGDCONT=3,"IP","vzwinternet","0.0.0.0",0,0'
OK  'ATD*99***3#'
CONNECT ''

I played with the above parameters, but could never get anything to connect for more than 2.5 minutes.  And after it disconnected, it would never connect again -- I had to disconnect and reconnect the stick before it the above connect scripts would work. I had similar experience with Windows XP with a DUN set to dial 99***3# using the same username and password as above, and setting 'AT+CGDCONT=3,"IP","vzwinternet","0.0.0.0",0,0' as the extra init parameter to be sent to the modem.
On my Rasbpery Pi, I also tried making the wwan0 connect directly by configuring it in /etc/networking/interfaces and then calling sudo ifup wwan0.  But it never got an IP address.  This was true regardless of whether I had first tried to connect the modem using pppd with the technique above.
At this point I have nothing else to try.  I can't find anybody online who has been successful with this on Linux.

$ lsusb | grep Novatel
Bus 001 Device 005: ID 1410:b001 Novatel Wireless
$ ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2  /dev/ttyUSB3
$ ifconfig wwan0
wwan0     Link encap:Ethernet  HWaddr 00:a0:c6:00:00:00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:684 (684.0 B
$ dmesg
...
[   13.325406] usbcore: registered new interface driver usbserial
[   13.513047] cdc_ether 1-1.3.2:1.6: wwan0: register 'cdc_ether' at usb-bcm2708_usb-1.3.2, Mobile Broadband Network Device, 00:a0:c6:00:00:00
[   13.903537] USB Serial support registered for generic
[   13.998983] usbcore: registered new interface driver cdc_ether
[   14.039185] usbcore: registered new interface driver usbserial_generic
[   14.163290] usbserial: USB Serial Driver core
[   14.193011] cfg80211: Calling CRDA to update world regulatory domain
[   14.282386] USB Serial support registered for GSM modem (1-port)
[   14.435364] option 1-1.3.2:1.0: GSM modem (1-port) converter detected
[   14.536530] usb 1-1.3.2: GSM modem (1-port) converter now attached to ttyUSB0
[   14.610970] option 1-1.3.2:1.1: GSM modem (1-port) converter detected
[   14.680940] usb 1-1.3.2: GSM modem (1-port) converter now attached to ttyUSB1
[   14.733917] option 1-1.3.2:1.2: GSM modem (1-port) converter detected
[   14.778622] usb 1-1.3.3: reset high-speed USB device number 6 using dwc_otg
[   14.798339] usb 1-1.3.2: GSM modem (1-port) converter now attached to ttyUSB2
[   14.846967] option 1-1.3.2:1.4: GSM modem (1-port) converter detected
[   14.917340] usb 1-1.3.2: GSM modem (1-port) converter now attached to ttyUSB3
[   15.011231] usbcore: registered new interface driver option
...
Answer: I believe I am running these on Debian. Try installing wvdial, and edit /etc/wvdial.conf to look like below. Then run wvdial and see what it says.
[Dialer Defaults]
Stupid mode = 1
Dial Command = atdt
Carrier Check = no
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = *99***3#
ISDN = 0
Password = 1
New PPPD = yes
Username = 1
Modem = /dev/ttyACM0
Baud = 460800

Answer: I think your problem is a lack of kernel support for the drivers and everything else around your Verizon 4G USB key. Debian is a cool OS, but it is very late when supporting cutting-edge devices. You may want to try the same with Arch Linux. The main advantage of Arch Linux is the AUR. It's a repository where everybody can add his package in the database, and then you can download it and build it. So if your driver is not present in main repo, it probably is in AUR. Btw, here is Arch Linux page about USB 3G Modem : https://wiki.archlinux.org/index.php/USB_3G_Modem. That's all
Comment: If anybody can stick anything in there, how do you know everything is "safe and effective"?
Comment: @fixer1234 Because I use Archlinux all the time ! Right now, I'm using it to answer you.

Verizon USB551L 4G Stick on Linux


Is it ok to say you want to come to campus interview another day?

Question: I'm shortlisted for a campus interview. I am asked if I can do it in few days. I'm nervous because it is very little time to prepare my research talk and teaching lesson. Can I tell them that the proposed date is too soon and would it be possible to do it at a later day? Would it go against me?
Comment: What position is this for?
Comment: Yes, you can certainly request to move the interview a few days from that proposed interview date. BTW, you can also post this question on Stack Exchange Workplace at : https://workplace.stackexchange.com
Comment: Which country are you from? In the subcontinent, it might go against you.
Answer: You can ask for a different date. You dont necessarily need to tell them that it is because its not enough time for you to prepare. I actually asked for a different date because the proposed one was not too convenient for me and they said another date will not be possible as they will be very busy later. I think you can always just try and ask, if they say not you can just say that you will adjust your plans then and no harm done.
Answer: You can always ask, but there are often many candidates that need to be interviewed and as a consequence, asking for a different date is an inconvenience to the department. It may also not be possible to move the date by any substantial amount: there is typically a deadline by which everyone has to be interviewed, and that deadline is typically at the end of the period during which candidates are scheduled to show up. As a consequence, you might be able to move an interview date by a week, but probably not by a month.
Of course, it might also be useful to point out that you will never be perfectly prepared. All anyone can ask you is to do your best -- so get on with getting prepared, and do what you can in the time allowed.


4' double fluorescent lights fixture

Question: I want to mount 4 feet double fluorescent light fixture in my room celling. The celling is made of drywall, my question : is it safe to use drywall anchor in celling which is rated for 75 lbs to mount fixture or whatelse should i use to reinforce to support fixture on drywall celling? Drywall thickness is 3/4 inches.
Comment: There are probably joists supporting that drywall. Use a stud-finder to locate them, and you'll be able to drive real screws into real wood.
Comment: Anything listed [here](http://diy.stackexchange.com/questions/16771/what-benefit-do-plasterboard-drywall-screws-have/16787#16787), except those marked 'light duty'.
Answer: Drywall anchors are used in vertical walls and the rating is based on a combination of shear load (downward on the screw and anchor) and some tension load outward (based on an assumption of a load close to the wall).
Ceiling mounts are pure tension loads downward and the weak spot is the drywall, not the anchor. A thin diameter of crumbly plaster around the anchor is all that holds them in. Even flared, they form a narrow cone that is easily compromised.
For ceiling mounting, try very hard to find framing members. If that is not possible, use anchors that have significant perpendicular members, such as molly bolts or toggles. I favor strap toggles like these

But I really urge screwing into framing if at all possible.
<code> Images and links are examples only, not endorsements of products or sources.
</code>
Answer: Most drywall anchors are meant to be used vertically not horizontally. Walls yes ceilings NO. If you bought the anchors look at the box it should tell you. As for me I use toggle bolts and washers. Find the weight of the fixture and get the toggle bolt and washer to match.

4' double fluorescent lights fixture


Sharing Simple Products between Configurable Products

Question: I have Magento 1.8.1.  I wanted to know if I could share the same 3 Simple Products with 2 different Configurable products.  And if this is possible how would I go about doing it.?
Answer: This is fine as long as the configurable options on the simple products are unique per configurable product.
You can add the same simple to as many configurable products as you like - but you can't add two simple products with the same size, for instance, if size is the configurable attribute.
Is that what you were after?
In regards to achieving it - just log in to admin, create a configurable product and start adding the simple products to it.  When you're in the tab that allows adding simple products, you will see that when you select one simple product - say size 'S', all other simple products with size 'S' will be greyed out and you won't be able to add them.


Current Mirror Gain 1.5 with discrete components

Question: I was trying to simulate the circuit mentioned in https://wiki.analog.com/university/courses/electronics/text/chapter-11 under paragraph 11.4.1.
I need to make a current amplifier with a current gain of 1.5. Thus I made the following circuit:

As you can see the current mirror does not work as supposed to work.
The current gain is not 1.5 times the input current.
Is there any reasoning behind this or it is just a simulation error.
Thank you.
Comment: Hint: have a look at section 11.5 of the document you link. My bet is on early effect, the input transistors Vce is ~650 mV, while the output transistors Vce is 24 V. Try adding some emitter resistance, or reducing Vcc.
Comment: Do you need to make this circuit, *in reality*, with real parts and perform a design that will get you reasonably close to expectations? Or is this all about getting a simulated result using parts which have zero variation to them and operate at a fixed (and identical across all parts) temperature? If the latter, are you allowed to select the BJTs used for simulation? Are you allowed to vary their model parameters to anything you please?
Answer: I simulated your circuit in LT Spice and got a ratio of 1.79.  You only need 2 transistors for this circuit, so I revised the circuit using only 2 transistors but put resistors between emitter and ground. (I kept the 1k resistor in Q2.)  So referring to your circuit, eliminate Q1, Q4, and Q5.  Place a 30 ohm resistor between emitter of Q2 and ground and a 20 ohm between emitter of Q3 and ground.  I now simulate a ratio of 1.5. As I decreased the 30 and 20 ohm resistors it diverged from the current ratio of 1.5.  If you change the collector resistor from 1k you will have to make adjustments in the emitter resistor.  When building this circuit with real transistors you may need to do some trimming.
Comment: I am curious why you put a current source and voltage source in series with Q1 and Q2.  Remove the current source and change the 1k to 5825 ohms.  (24-0.7)/0.004 = 5825.   You will get a current ratio of 1.8, therefore you will need to add emitter resistors to balance it out.  No, the transistors are not getting too hot.  The power is not 24V * 4mA, the 1k is absorbing the power.  Q1 and Q2 are seeing 4mA *652mV = 2.6mW.   A 2N222 is good up to 800mA.
Comment: Also PSpice does not model thermal runaway unless you have purchased good models, the free component models do not have thermal components in them.  I still don't understand how you got 25mA in Q3 -Q5.
Answer: The transistors get HOT (25v * 4mA), and the Vbe needed to support 4mA is reduced, so you get even more current.
In other words, you are seeing nascent thermal runaway.