Humidity and its effect

Question: We know that humidity degrades engine performance. Is there any charts or tables which quantify effect on engine performance due humidity?
The question is specific to helicopters.
Answer: Figure 11 in GE Gas Turbine Performance Characteristics estimates the impact of humidity on some of their turbine engines.  It shows a power loss of less than 1% over a large range of humidity.
Additionally, I've read that the effect of humidity on helicopter turboshaft engine performance is negligible.  This was in flight manuals for specific helicopters, which I unfortunately can't share here.  What I can say is that these manuals provide charts specifying the maximum power or torque available at various air temperatures and pressures.  For humidity, however, they tell you to ignore it.
This article on helicopter engines also indicates that humidity effects are small compared to temperature and pressure.

Humidity and its effect


Why did all the Characters in "Hugo" have English Accents?

Question: In Martin Scorsese's "Hugo", why did all the characters have English accents if the story is set in Paris, France? Wouldn't the characters have French accents?
Comment: In college I had a roommate who was born and raised in France, then moved to Canada for school.  She spoke English with a British accent, because (according to her) that's how the majority of English language teachers in France speak.
Comment: And honestly, having visited Paris multiple times, I can say that LOTS of British-accented people live/work/visit there. French may be dominant, but it doens't mean EVERYONE speaks with a French accent. Many are good at "flexing" or "changing" their accent to sound different too.
Answer: Why should they have an accent?
By your own logic, they should be speaking French, since that is what Parisian's would commonly speak amongst themselves.
However, translation convention and the fact that the movie is produced by an English speaking production company and targeted at English speaking audiences, the characters speak English.
As for accents - some movies do have the characters speak with accents influenced by their setting, but not all movies do. The problem comes when actors can't properly affect the accent and it can come across as a ridiculous pastiche. Hugo is played by a young English actor who, while quite talented, may not be up to the task of a good French accent.
So, to keep things consistent,  get all the characters speaking with English accents.


How do I ensure that my temper is not affecting my writing?

Question: Usually, when I read my old blog posts, one thing I evidently observe is that my posts are affected by my temper at that time. I feel like I could have written them in another way (maybe due to my current temper). This leads to my next question: how do I ensure that my current mood is not changing the blog post's plot and reducing its quality?
Comment: Do you mean "mood" rather than "temper?"  Temper is often used to refer to being angry about things.  Mood is more general, and can refer to many things: happy, sad, euphoric, depressed.  Mood is non-specific.  Temper is usually anger.
Answer: The tried and true method of "Write an angry letter today but mail it tomorrow" is the best preventative measure.   Trust me when I say this, there is something stress relieving about writing down everything causing you to rage against the target of your ire.   As Anton Ego observed in the Pixar Film "Ratatouille":

We thrive on negative criticism, which is fun to write and to read. But the bitter truth we critics must face, is that in the grand scheme of things, the average piece of junk is probably more meaningful than our criticism designating it so.

Sometimes things are said in the heat of the moment that, when looked at with a calm tone, make you seem disproportionately the "wrong" person in the fight and yes, it's often something you type to intentionally twist the knife.   It's also possible that the tone you convey in your mind isn't read (I've found so many people to be reasonable when I can talk over a voip then they are when I type at them in a chat).
The advice allows you to "get it out of  your system" but prevents you from committing it until you cool off and come to your senses and see if it's worth it.
Answer: The simple answer is, "don't write angry."
For person to person interactions, there was a rule (old when I was young, in the 1960s) to "count to ten" before speaking.  Some folks (possibly those who've seen a game of Hide and Seek and watched how fast a child can count) suggest doing so in a foreign language, or using some other method to slow down the count.  The point, however, is to give yourself time to calm down and think about what you're about to do/say.
The same method can be applied to writing.  If you have something you're writing about because you're angry, don't publish it immediately.  Leave it sit for at least twenty-four hours, maybe even a week.  Sure, it may lose timeliness, but if it does, you might well be better off not publishing it at all, rather than releasing words to the world that might cause hurt or even get you sued.
Answer: Read, re-read and re-read again if the primary matter is what you will intend to publish.  Still again, have someone else do so for you for clarity.
If your message is on social media, then the best choice is to wait some period of time which seems to work for you.   What you will state at a later date will likely be more measured and informative.  You might embellish a thought or clarify a position simply by having more time to do so.   Thoughts marinate, and the end result is better for it.


Use different taxonomies in different custom post types' permalinks?

Question: Is there any way to add %post_type% and %taxonomy% to permalinks? I want to have links from one custom post type have one taxonomy's terms in its permalink, and another post type to use another taxonomy's terms.
Comment: Can you please be more specific? Update your question with the names of your current custom post types and custom taxonomies. And then tell us what type of Custom Permalink you are trying to set for them.
Answer: I will try to answer the question in detailed but keeping it as short as possible considering you have achieved the basics.
Suppose our custom post type one is to be connected to taxonomy one.
Let's call them 'console'(custom post type) and 'brands'(taxonomy).
You want to achieve:
 http://example.com/console/brands/sony/
Steps:
Register the taxonomy first and attach it to custom post type console.
<code>$labels = array(
    'name'                          => 'Brands',
    'singular_name'                 => 'Brand',
    'search_items'                  => 'Search Brands',
    'popular_items'                 => 'Popular Brands',
    'all_items'                     => 'All Brands',
    'parent_item'                   => 'Parent Brand',
    'edit_item'                     => 'Edit Brand',
    'update_item'                   => 'Update Brand',
    'add_new_item'                  => 'Add New Brand',
    'new_item_name'                 => 'New Brand',
    'separate_items_with_commas'    => 'Separate Brands with commas',
    'add_or_remove_items'           => 'Add or remove Brands',
    'choose_from_most_used'         => 'Choose from most used Brands'
    );

$args = array(
    'label'                         => 'Brands',
    'labels'                        => $labels,
    'public'                        => true,
    'hierarchical'                  => true,
    'show_ui'                       => true,
    'show_in_nav_menus'             => true,
    'args'                          => array( 'orderby' => 'term_order' ),
    'rewrite'                       => array( 'slug' => 'consoles/brands', 'with_front' => false ),
    'query_var'                     => true
);

register_taxonomy( 'brands', 'consoles', $args );
</code>

Note here that the rewrite key in our $args array. That value is telling WordPress the slug to use in our Custom Taxonomy. We don't want it prepended with the WordPress permalink front base, which defaults to true, and we want the slug to include our Custom Post Type rewrite slug.

Step Two:
Now create the custom post type.I'm not writing the whole code but remember the important parameter here is the 'rewrite'
<code>'rewrite'               => array( 'slug' => 'consoles', 'with_front' => false ),
</code>
visit your Settings > Permalinks options screen in the WordPress admin to ensure your new permalinks are picked up
Repeat the steps for second custom post type and taxonomy 2.:)cheers..
    PS:You need to define has_archive key to have archive page.
Comment: Yes, I had made this more complicated than it was. An alternative way to frame my question would have been, "How do I insert the post_type (e.g., `consoles`) at the beginning of the permalink, before a custom taxonomy's terms. You answer solves that; the only thing this wouldn't work for is if you wanted to use the same taxonomy in more than one post type's permalinks.  Like—in addition to /consoles/brands/sony (using CPT `consoles`), having /reviews/brands/sony (using CPT `reviews`).


Display large chart inside a card in a Dashboard

Question: I'm going to design a Dashboard, I know how to show the information but my client said to me that a cohort chart is going to have a lot of information. I wonder if it's ok to add to the card that contains the chart an arrow to expand the chart on another page and there add a link to go back to the dashboard or what is the best way to do this (when we need to show more information for each card). Thanks!
Answer: The visual below is far more expressive than trying to explain. I'd recommend not to collapse the card that contains the chart and the visually presented data at least to be able to display more informative interface.


How do I install Termkit?

Question: I spend most of my time in the terminal. I heard something about TermKit, and I'm curious as to how I can install it on Ubuntu. So far, I haven't been able to find any good instructions on how to install it.
Comment: Thanks for this... Installing it myself, I will post an answer as soon as I make it work for me.
Answer: First, install the dependencies:
sudo apt-get install git libssl-dev

Now, download, build and install node, npm (a package manager for node) and TermKit itself:
Build Node.js:
trunk is a bit unstable so we check out a known-working version of node:
cd ~
mkdir TermKitProj
cd TermKitProj
git clone https://github.com/joyent/node.git
cd node
git reset --hard 1b8dd65d6e3b82b6863e
./configure
make
sudo make install
cd ..
git clone http://github.com/isaacs/npm.git
cd npm
sudo make install
cd ..

Build TermKit
git clone https://github.com/Floby/TermKit.git --recursive
cd TermKit/
npm install

Okay, everything is installed. Now lets launch it!
node Node/nodekit.js

You should see something like this:
18 Jun 20:12:45 - socket.io ready - accepting connections
server listening at http://localhost:2222

And now navigate to http://localhost:2222 in Chrome/Chromium (Firefox won't work, webkit needed!)
To launch it again, navigate to TermKitProj/TermKit and run  "node Node/nodekit.js" again.
Thanks to this guide.
Comment: I am getting the following error `node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick` `TypeError: Cannot call method 'apply' of undefined
    at EventEmitter.`

How do I install Termkit?


Linear regression explanations

Question: In explaining simple linear regression, isn't it a bit misleading for many examples to illustrate a straight line going through some scatterplot? This seems to suggest that linear regression only works if your independent and dependent variables have some sort of straight-line relationship, whereas the "linear" in linear regression really refers to linear in the parameters of the model right?
Answer: Well, it's also linear in the predictors.
For example, if you fit a quadratic you might say 'see, not linear!'... but it is! If $x_1 = x$ and $x_2 = x^2$, and you regress on $x_1$ and $x_2$, it's certainly linear in $(1,x_1,x_2)$. It's linear in the predictors you gave it.
If you regress on $x_1 = \sin(\pi x)$ and $x_2 = \cos(\pi x)$... well, it's still linear in $(1,x_1,x_2)$.
and so on.
By judicious choices of your $x$'s you can use it to fit curves, but it's still linear in what you give it.
Even a local polynomial (kernel-type) fit is actually linear in the predictors. You can write the whole thing as one large linear model.
If $E(y) = X\beta$, $X\beta$ is clearly linear in either $X$ (in the columns of X) or $\beta$.
But yes, the linear-in-the-parameters is what the 'linear' in linear regression 'means'.
Is it at least partly misleading that the elementary presentations are always drawing straight line relationships when regression can fit curves? Perhaps, but you pretty much have to start with lines.
Comment: +1, this is a nice way of putting it. It didn't occur to me to extend the discussion beyond a squared term.
Comment: My anecdotal experience is that most linear regressions are in fact straight lines. That said, it's common in some fields/applications to transform data before regressing, for example regressing on the log of your data. So yes, many people never move beyond the straight-line concept (both in understanding and application), and in that sense it's a disservice that the true nature of linear regression is not made clearer earlier on.
Answer: You're right that the "linear" in linear regression or linear models actually stands for linear in the parameters.  That means that the parameters you are estimating are coefficients.
For what it's worth however, a curvilinear-looking function that is modeled with a polynomial (e.g., $Y=\beta_0+\beta_1X_1+\beta_2X_1^2$) is actually a multiple regression model, even though we plot the model on a 2-dimensional scatterplot and even though we think of $X_1$ and $X_1^2$ as the same underlying variable.  When situated in the appropriate space though, it really is a straight line / flat plane.
It can be hard to see it in a 3-dimensional plot as well, because the relationship between $X_1$ and $X^2_1$ is curvilinear.  But imagine a perfectly flat plane that slices through a coke can; from the plane's point of view, the line where the plane intersects the can's wall is straight.  If you could arrange it such that you were looking at this perfectly edge-on through the plane, you would see that the function was linear.
Update: I have an example of this worked out in my answer here: Why is polynomial regression considered a special case of multiple linear regression?
Answer: Well, simple linear regression usually refers to a model with only a single predictor, so the relationship would be linear (if you transform a variable then the relationship is still linear between the transformed variables).
Many curved relationships are modeled using polynomials or splines which moves away from simple linear regression into multiple linear regression.
Though when I teach simple linear regression I also try to do a teaser saying that curved relationships can be modeled as well, but the students have to come back for another statistics course to learn the details (or they should consult with a statistician to fit these models).
Comment: It is a very small point, but my own guess is that across all the sciences, curved relationships involving exponentials, logarithms, trigonometric and hyperbolic functions, and more exotic functions outnumber polynomials and splines. Edit "Most" to "Numerous" or "Very many" and you are on completely safe ground.

Linear regression explanations


ESP8266 takes long time to connect

Question: I am using an ESP8266 for a project which requires the ESP to establish a connection to the Access Point , with as less delay as possible, but as of now it takes a minimum of 4-5 mins for establishing the connection which is too much delay. I have tried to set a static ip, gateway, subnet and DNS by passing them as parameter to WiFi.config() function, still no success. Would someone help me regarding this issue ?
Comment: A station connect on the ESP8266 should take at max 2.5 seconds. Something is horribly wrong on either your ESP8266 hardware, the software (though if you're using the arduino framework and the `WifI` class I don't think that's the case) or your network environment. Does the problem appear with all hotspots? You have tried connecting to, say, a hotspot from your smartphone?
Comment: Thankyou for your reply, I tested it earlier with my phone's hotspot and an ad-hoc hotspot from my laptop which didn't work, but now I connected with a hotspot from my mom's phone, it connected with a delay of 500milliseconds .
Comment: Weak signal maybe? Do a SSID scan with https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/WiFiScan/WiFiScan.ino and tell us the RSSI value. If the signal is good and you still can't connect, it must be something with the settings on the router.
Comment: RSSI value lies between -49 to -51 , mostly -50
Comment: Ensure you use 2.4Ghz Hotspot. 5Ghz not supported.
Answer: I have seen lengthy delays on ESP8266 WiFi connection if the WiFi is persisting its configuration to the flash memory.  Anywhere from a few seconds to a minute or so.
Try to call WiFi.persistent( false ) before you call WiFi.mode() and WiFi.begin().
At the very least, that will help you narrow down the cause of the problem.
Comment: When I tried with another hotspot, the connection was faster. But I'll try your solution with the previous hotspots which delayed the connection and let you know, if it helps..
Answer: I think the library <ESP8266WiFi.h> you are using have problems, you can use older versions of it.
Answer: Ensure access point frequency is 2.4Ghz (not 5Ghz). This will cause prolonged connection time (never connecting).

"The ESP8266 is not designed for 5 GHz." Source

NodeMCU V1.0 (as pictured) uses an ESP8266's (ESP-12E) chip, Antenna is configured for 2.4 Ghz only.

ESP8266 takes long time to connect


ArcCatalog Registering a Feature Class into Geodatabase: Getting an Error

Question: This is a SQL Server GeoDatabase. I have created a couple of tables using SSMS; then imported data to them. Then, inside ArcMAP, I created Layers and pointed their data to these tables via SDE. So now I have an MXD with Feature Classes.Then I defined Relationships between the Feature Classes.
So far so good. What I now need is to enable Attachments on a couple of these Feature Classes. I suppose I can't do that until I Register these Feature Classes into the GeoDatabase using ArcCatalog because the Enable Attachment option is not available?
Assuming that was the problem, I tried to do the 'Register with GeoDatabase' from ArcCatalog but am getting an error: 'Invalid Entity Type'? I have Googled but can't find anything which would help me. This is just a local test environment but I need to learn enough from it to implement an enterprise wide setup.
Any idea?
Answer: Never mind. I think I am getting the 'Invalid Entity Type' error because some Geometry data in my Feature Classes is invalid. The following page gave me the clue:
http://forums.esri.com/Thread.asp?c=158&f=2290&t=283546
So I deleted all rows from the Feature Classes and, voila, the error went away and I was asked to specify Geometry--which I did. And now I am able to Enable Attachments.


Spectral Decomposition of A and B.

Question: I was given the following question in my linear algebra course.

Let $A$ be a symmetric matrix, $c >0$, and $B=cA$, find the relationship between the spectral decompositions of $A$ and $B$.

From what I understand. If $A$ is a symmetric matrix, then $A=A^T$. A symmetric matrix has $n$ eigenvalues and there exist $n$ linearly independent eigenvectors (because of orthogonality) even if the eigenvalues are not distinct. Since $B=cA$ and $A=A^T$, then we can conclude that $B=cA^T$, which would imply that $B$ is also symmetric, meaning it also has a linearly independent eigenbasis.
Focusing on $A$, since it has a linearly independent eigenbasis, we have $A = PD_aP^{-1}$ by Spectral decomposition where $P$ is the eigenbasis and $D_a$ is the diagonal matrix of $A$ eigenvalues $\lambda_i$
\begin{array}
d D_a & = & \begin{bmatrix}
\lambda_1 & & \\
&\ddots&\\
& & \lambda_i
\end{bmatrix}
\end{array}
Now since $B=cA$, then we have $B=cPD_aP^{-1}$, which can be rewritten as $B = PD_bP^{-1}$, where
\begin{array}
d D_b & = & cD_a & =c\begin{bmatrix}
\lambda_1 & & \\
&\ddots&\\
& & \lambda_i
\end{bmatrix} & = &
\begin{bmatrix}
c\lambda_1 & & \\
&\ddots&\\
& & c\lambda_i
\end{bmatrix}
\end{array}
From this I can conclude that $B$ and $A$ actually have the same linearly independent eigenbasis. Furthermore, the eigenvalues of $B$ are a scalar multiple of the eigenvalues of $A$ by a factor of $c$.
Have I fully describe the relationship between $A$ and $B$?
Thank you for your time.
Answer: $\dfrac{\lambda}{c} I- A$ isn't invertible if and only if $\lambda I- cA$ isn't invertible.
Hence, $\lambda\in Sp(cA)$ if and only if $\dfrac{\lambda}{c}\in Sp(A)$
Answer: Yes, I would say that you have fully described the relationship between $A$ and $B$.

Spectral Decomposition of A and B.


AppleScript Editor : comment line shortcut?

Question: Is there a keyboard shortcut to comment lines in AppleScript Editor ?
The common Cmd+shift+/ does not work here.
Answer: I have used FastScripts to assign a shortcut to this script:
<code>set text item delimiters to linefeed
tell application "AppleScript Editor" to tell document 1
    set input to its text
    set {c1, c2} to character range of selection
    if c1 is 0 then
        set {p1, p2} to {1, 1}
    else
        set p1 to count paragraphs of text 1 thru c1 of input
        set p2 to count paragraphs of text 1 thru c2 of input
        if p1 is not p2 and {return, linefeed} contains item c2 of input then set p2 to p2 - 1
    end if
    set selection to paragraphs p1 thru p2
    do shell script "input=" & quoted form of (paragraphs p1 thru p2 of input as text) & "
if [[ -z $(sed -E '/^[[:space:]]*($|#|--)/d' <<< \"$input\") ]]; then
  sed -E 's/^([[:space:]]*)(#|--)[[:space:]]*/\\1/g' <<< \"$input\"
else
  sed -E 's/^([[:space:]]*)/\\1--/g' <<< \"$input\"
fi" without altering line endings
    set contents of selection to result
end tell
</code>


Do South African citizens need a visa to enter Dubai?

Question: Good day we have stopover for 12 hours @ Dubai Airport from Bali to South-Africa.  Do we need a visa to enter Dubai and if so where can it be obtained.
Comment: To enter Dubai you do need a visa since South Africa is on visa nationals list for UAE. Your airline can arrange the visa fairly easily
Answer: As stated in Timatic, the database used by airlines:

TWOV (Transit Without Visa):
  - Holders of confirmed onward tickets for a max. transit time of 24 hours.

So if staying in the Transit Zone, you do not Need a visa.
Otherwise, you need it, but it can be arranged by the airline for you to get on arrival


Can we use "who" by itself as a subject in spoken language?

Question: For example, I want to say " Students who didn't come here yesterday are lazy."
But I say " Who didn't come here yesterday are lazy" instead because I talk to students and  I don't want to say "students" again. Does it make sense?
Comment: Either use "Those who didn't..." or "Whoever didn't..."
Comment: In short: No, you can't.
Comment: If you're in the SAS, you can (in answer to your title question). _Who dares wins._ But this is probably best treated as an exception to the rule.
Comment: Who was that masked man?
Answer: This is called a "headless relative clause" or "fused relative clause". In English, the pronouns who and whom cannot normally be used as fused relative pronouns:

The categories 'person' or 'people' are [...] so general in meaning that they normally take a further qualification, as in The people who came were all enthusiastic. [...] the head noun people is almost redundant; still, it cannot be left out in English, i.e. we cannot speak of *Who came were all enthusiastic. Obviously humans are too important to be left unmentioned as a head. The grammatical solution English has found is using relative clauses headed by the demonstrative pronoun those for plural humans (25a) and the quantifier anyone (25b) or the personal pronoun he (25c) as heads for singular humans:

a. Those who say so are liars.
  b. Anyone who says so is a liar.
  c. He who says so is a liar.

(Cognitive English Grammar, by Günter Radden, René Dirven, p. 162)

So it is not correct. You need a noun or pronoun before "who".
In this case, the pronouns that would work are "those" and "anyone".

"Those who didn't come here yesterday are lazy."
You can say this if you know some people didn't come.
"Anyone who didn't come here yesterday is lazy."
 You should say this if you're not sure if there are some people who didn't come.

As MorganFR and 1006a said in comments,

"Whoever didn't come here yesterday is lazy"

is also possible.
Comment: As @MorganFR says in comments, you could also use *whoever* (or, I will add, *whosoever* if you want to be more archaically emphatic). It represents something of a middle path between the first and second suggestions: use it if you know some people didn't come, but not necessarily *which* people or even how many. (It's common in sentences like *whoever committed this crime will be caught and punished*.)
Answer: Yes you can avoid saying 'students' again, when your 'who' follows 'those' ( here a pronoun indicating to whom the who is pointing to)
Answer: Who didn't come here yesterday are lazy is fine if and only if you want to employ archaic or otherwise esoteric English. Otherwise, as sumelic explains, the construction is not used in contemporary English. But it was once and even now shows up in limited contexts. Consider
-Who rides at the tail of a Border thief, he sits not long at his meat.
Rudyard Kipling, 1892
-Who steales my purse, steals trash.
Wm Shakespeare, Othello
The Oxford English Dictionary cites uses as far back as the 13th century.
More recently
Who dares wins, (who hesistates is lost) has become a slogan and catch phrase. It's based on a word for word translation of the Latin qui audet adipiscitur.
The slogan is used by the British Special Forces (S.A.S.) and as such is attributed to S.A.S. founder Sir David Stirling (1915-90), one of whose biographies is titled Who dares wins. See also The New York Times:

Colonel Stirling's exploits were recounted in a book by Virginia Cowles, "The Phantom Major" (Harpers, 1958). The group he had formed became the S.A.S., a cloak-and-dagger operation that was recently employed, with some controversy, against the Irish Republican Army. Its motto: "Who Dares Wins."

(Sir David Stirling, 74, the Founder Of Britain's Elite Commando Unit)
The slogan has taken a life of its own and appears in many places, including songs, computer games, a 1982 UK film title, a 2015-present British "reality TV" show, and blogs of regular people. (Most of these uses fall within the sphere of British English, not American English.)
Wikipedia uses Who Hesitates is Lost as a poorly translated title of the 1960 Italian film Chi si ferma è perduto. I say 'poorly translated' because in contemporary English, as sumelic explains, native speakers don't use '"who" by itself as a subject in spoken language'--or written language. But it is not illegal to so, and you can cite Shakespeare and Kipling if someone challenges your usage.


Altering model after field validation

Question: I'm implementing a tagging system. Currently, the models look like this:
class Tag(models.Model):
    label = models.CharField(max_length=MAX_TAG_LENGTH)

class TagManager(models.Model):
    tags = models.ManyToManyField(Tag, related_name="referrers")

    def associate_tag(self, tag_label: str):
        . . .

And I have a custom field that cuts its input on commas so the user can enter tags as a comma-separated list:
class TagsField(forms.CharField):
    def to_python(self, value):
        if not value:
            return []
        return [tag.strip() for tag in value.split(',')]

Finally, I have the model and form where these are used:
class Thing(models.Model):
    tags = models.OneToOneField(TagManager, on_delete=models.SET_NULL, null=True)

class ThingForm(forms.ModelForm):
    tags = TagsField(widget=forms.TextInput(attrs={"placeholder": "Tags", "required": False}))

    class Meta:
        model = Thing
        fields = ["tags"]

Problem
My issue is that if I populate and validate the form:
form = ThingForm(data={"tags": ["One", "Two"]})
form.is_valid()

I get errors:
{'tags': [""["One", "Two"]" value must be an integer."]}

Which I'm guessing is because it's trying to place the stringified list in the OneToOneField, which isn't going to work.
What I really need to do is after validating the field, I need to iterate the results of to_python, and call thing_instance.tags.associate_tag on each of the validated tag strings.
Is there a "hook" method on forms that will allow me to do this cleanly? I've read over the docs and Form source and can't find any obvious candidates.
Answer: I realized as I was writing this that it's a clean_* method that I need. This didn't strike me as "cleaning" on first brush, so I ignored it.
The solution was to add a clean_tags method to the ThingForm class:
def clean_tags(self):
    tags = self.cleaned_data["tags"]
    for tag in tags:
        self.instance.tags.associate_tag(tag)
    return self.instance.tags.pk

It associates the cleaned tags, and then returns the PK of the TagManager they were added to.

Altering model after field validation


Is it faster to run or dodge roll?

Question: I'm having a tough time trying to determine which form of movement is faster in the game since I can't reliably hit the dodge-roll button exactly when it is off of cooldown. As you see in many speedruns, dodge-rolling is often quicker/better at covering distances. Is this also the case in Arceus?
Comment: Ahhh. The good ol "jumping is the faster form of waking" trope
Comment: Are you asking about the travel inside Jubilife Village? Of course it's faster to use a ride Pokémon outside of the village, so I assume so?
Comment: :O I'm not that far into the game yet! I guess then yes, it would apply to the village then. Although I can't see the movement to be different inside the village than the open world (non-riding).
Comment: The difference would come from non flat terrain - one or the other may be faster or slower at hills or small bumps.  But I think the village is the more relevant in terms of what amount of total time you spend running (and not riding).
Answer: I did the empirical way, from the stash to the trading post, and it takes:

~13.5s running
~16s dodge-rolling

But, considering that your character have a sort of stamina that you consume while running, you can dodge-roll while recovering. Mixing both techniques I got ~13s!
So it appears to be faster to run until you get tired, then dodge-roll a couple of times in order to recover and then run again.
Comment: Didn't notice you'd made this edit before I submitted mine - glad we agree here! So odd that the rolling resets the stamina meter.
Comment: @Joe that explains why you posted a different answer that was totally supporting mine :) better safe than sorry, empirical results may differ so good to know!
Answer: From my own empirical testing dodge rolling neither is slower nor faster than running so long as you are running in between.  A run from the item store by the gate to the trading post for me is just under 13,5s, and a run of the same distance with five dodge rolls but running in between is also about 13.5s.
One thing to note is that dodge rolls seem to reset your run stamina - I can start running, dodge roll periodically, and never have to reset the run even doing much more than one loop; while just running I lose stamina about halfway to the trading post.
As such, the fastest option is to run with a dodge roll interspersed often enough to not lose stamina. I can do the storage to trading post consistently in 12.5s that way, with two or three dodge rolls.

Is it faster to run or dodge roll?


Advanced Custom Syntax Coloring for Aptana Studio 3 (.less)

Question: I would like to add syntax highlighting for .less for Aptana Studio 3.  I found XText but it only seems to work with Eclipse.  Apatana doesn't seem to give too many leads into how to do this on their forums, so does anyone have any experience working with creating custom syntax highlighting or know of a solution for including .less syntax detection and highlighting already?
Comment: I have an idea, upgrade to Komodo. We used to use Eclipse PDT then Aptana and now we've grown up and started to use Komodo like all the cool guys... (Komodo has built in LESS / SASS code intelligence/syntax colouring, theres also a plugin that can compile LESS on save)
Answer: If you just want syntax highlighting, you could get Aptana to treat .less files as .css files.
To do this, open the Aptana preferences window and find the File Associations tab. You can do this by typing 'File Associations' into the search/filter bar, choose the opption listed under General > Editors.
From here, you can add a new file type, giving it the type: '*.less'. This will add the file type and may add some default associated editors.
Click on Add... to add a new associated editor, choosing the 'CSS Source Editor' option. When you press OK, it should be added to the list and be selected, click on Default to take it to the top of the list.
Now, when you open a .less file in Aptana, you'll have CSS syntax highlighting and autocomplete.
Comment: Strangely I had done something very similar but screwed up the adding the 'CSS Source Editor' for some reason.  Looks like you were mind reading and corrected that for me.  This for sure will be alot of help until it is officially supported by the IDE.


Bottling for sale

Question: I'm trying to bottle and sell a BBQ sauce from our restaurant and would like to know what is needed to do so. Health concerns and methods of doing so. What will I need ?
Comment: There are really quite a lot of questions here, from equipment to method to ingredients. Once you are started and have more specific questions (like "can these ingredients be shelf stable" or such) you should come back and ask us, though!
Answer: You will need to start with your local and/or regional health department to learn about the regulations for food safety.  Then you will need to determine how to bottle your sauce according to those regulations.  The regulations will likely ask you to identify the potential food safety risks in your recipe and your process, and help you consider the hurdles you must clear to make, package, and distribute your product.

Bottling for sale


A full wave rectifier with resistive load is a linear load or non-linear load?

Question: we know if the applied voltage across a load is sinusoidal and also the current drawn is also sinusoidal then we can say that the load is linear load.But we also know that diode is a non-linear device. in case of full wave rectifier with pure resistive load the both applied voltage and current waveforms are sinusoidal, then can we say that the full wave rectifier with resistive load is a linear load?
Answer: If you have ideal perfect diodes then you could make a good argument to say it was a linear load. Real world limitations means it's not a linear load especially when the AC voltage applied is small.


Mounting sdb as a secondary storage drive

Question: I have just finished a build with an Asus M4A88T-M, and an AMD Athlon 250 3.0gig cpu. The graphics are AMD and are in the board. Because of the great cost of new HDs, I used an older Maxtor 160 IDE as the boot (it had never been a boot drive) and a {I think!} WD 100 gig IDE as a storage drive. Both have been formatted in ext. 4. The system is completely Ubuntu 11.10 and very likely to remain same.
Years ago, when I wanted to gain access to the second (sdb) hd for storage, all I had to do was go into the GUI interface (on Gnome ... I know not what version ... ), identify myself as the root and then change permissions on the HD.
How do I get the system to recognize the secondary HD as a storage vessel and not as a boot disk? I don't remember seeing any questions regarding this issue as the OS was being installed on SDA. Help!
Answer: I guess you want to mount it? The fact that it might be bootable does not change anything. Btw. sdb is the whole drive, please do not mount the drive (sdb), mount the partition instead (sdb1)
As superuser edit your /etc/fstab and add a second list of this kind:
UUID=072aa6ac-20a8-4c76-84c2-d68173d98744 /foomountpoint ext4    errors=remount-ro 0       1

Replace foomountpoint by your mountpoint. This folder should exist and be empty!
The UUID you can find when invoking:
ls -la /dev/disk/by-uuid

mkr@mkrubuntu:~$ ls -la /dev/disk/by-uuid/
insgesamt 1
lrwxrwxrwx 1 root root  10 2012-01-16 07:53 072aa6ac-20a8-4c76-84c2-d68173d98744 -> ../../sda6


eigenstate of a system

Question:
There exists a physical operator F whose eigenvalues are a or b. Normalised eigenstate is A and B for each. The average value of F was f when measured from a certain system. Describe the eigenstate of this system in terms of A and B.
Comment: Hi and welcome to physics.SE! Please note that [homework-like questions](https://physics.meta.stackexchange.com/q/714/50583) and [check-my-work questions](https://physics.meta.stackexchange.com/q/6093/50583) are generally considered off-topic here. We intend our questions to be potentially useful to a broader set of users than just the one asking, and prefer *conceptual* questions over those just asking for a specific computation.
Answer: I am just a physics student so I could be wrong, just trying to help you: using Dirac bracket notation you can write your system state $ |psi \rangle $
as a superposition of the eigenstates, with complex coeficients α and β,
$$| \psi \rangle =\alpha |a\rangle + \beta |b\rangle, $$
and you can write the expected value as:
$$\langle \psi | \hat F | \psi \rangle =f.$$
Knowing that $\hat F |a\rangle =a|a\rangle,\ \hat F |b\rangle =b|b\rangle$ I think that you should be able to finish.

eigenstate of a system


Help me understand TradingView watchlist data

Question: I'm trying to figure out what is the meaning of the percentage value (comparing to 24-hours before?) and the small last digit?
Answer: The percent change refers to the current price versus the price 24 hours ago.
For the first one (USDTRY), the quote is 5.7082 and is up 0.1639 or 2.96%.  Because they are rounding the percent gain to 2 decimals, there's a small error introduced.  The actual gain is 2.9562%.
To determine yesterday's price:
5.7082 / (1+.029562) = 5.5443
Today's gain is 5.7082 - 5.5443 or 0.1639 (up 2.9562 %) or 2.96% when rounded.
I don't know what the small last digit notation represents.
Comment: I've found the meaning of the small last digit notation. It's calld pippet. 1/10th of a pip. https://www.babypips.com/learn/forex/pips-and-pipettes
Answer: The percentage refers to the difference between previous day close and current day close.
It's based on 1D timeframe not 24h
Comment: That would be true if this weren't the FX market which is a continuous market an only opens and closes once a week. I made the same mistake at first glance at the question BTW.


Number of deaths during flood events

Question: I am studying about flood events and its results. Because of that I need to find the number of people who die as a result of the flooding in the country scale. Is there any source that shows these statistics and numbers?
Comment: Do you want data for any specific country or the whole world?
Comment: Especially UK, but if there are global website, it would be better.
Answer: Emergency Events Database (EM-DAT) created by the Centre for Research on the Epidemiology of Disasters (CRED) has global disaster related data. It has free access to data of all kinds of disasters geophysical, hydrological, biological etc. in detail (including number of deaths). I think it would be helpful for you.
Visit the EM-DAT website for details. To access the database Click here

Number of deaths during flood events


How do I add a platform template to XCode?

Question: When you navigate to File>New Project it gives you the templates for iOS and Mac OS X. I want to add my own platform that has templates. So it would show iOS, Mac OS X, and MY_PLATFORM.
Thanks.
Answer: Although I am not sure you can "make your own platform", you can however make custom templates for use in Xcode 4.
Some Tutorials
http://blog.boreal-kiss.net/2011/03/11/a-minimal-project-template-for-xcode-4/
http://red-glasses.com/index.php/tutorials/making-custom-templates-for-xcode-4-march-2011/
Template Assembler: https://github.com/yonishin/XCode-4-Project-Template-Assembler-MSPS/


How to make Dock less sensitive

Question: I am having a problem with the Dock popping up when I have my mouse near the bottom.  Before, the Dock would pop up when the mouse was at the very bottom.  But the current behavior makes it difficult to access things like tabs on a spreadsheet because the Dock comes up and covers them.  What is to be done?
Comment: I only have the described behavior after upgrading to Big Sur. Your (old) post makes me think it may be something other than a new feature. What did you change before this behavior?
Answer: Try following in Terminal to adjust the Dock behavior.
defaults write com.apple.dock autohide-time-modifier -float 0.5

compliment that with killall Dock to make it active.
The number at the end is in seconds (delay) so choose what it suits you.
To return to original settings use
defaults delete com.apple.Dock autohide-time-modifier

Comment: This just adjusts the delay, mut doesn't lower the distance threshold to show the dock.
Answer: My personal solution?
a) Put the dock on the side of the screen, not at the bottom. Screens are generally wider than they are tall, and documents are generally taller than they are wide. Screen real estate is much more precious at the bottom than at the sides.
b) Never let the dock hide. Having the dock hide is not useful, because the space it covers isn't really available for anything else, as you've noticed. A hidden dock entices you to put things in places on your screen that you cannot reach.
But that's just my opinion. Yours may vary, or course. But you did ask....
Comment: Thanks, ganbustein. I don't agree with your second point, though: I generally have the terminal on the left side, and the keyboard dont trigger the dock.

How to make Dock less sensitive


How to pick reverse/inverted colours for logo variations?

Question: It is typical in logo design that an inverted/reversed version of the logo is provided in order to cater for use on opposing (darker/lighter) background than the normal predominant logo colour.
Is there a "generally accepted" technique in place for selecting the inverted/reversed colours? If it helps, you can assume I'm dealing with a logo that has defined Pantone colours.
Is it simply a case of "take a guess" using nothing but eyeballs or is there a more structured methodology I could follow?
Answer: Yes and no.
Always supply a version of the logo for use on dark backgrounds and a version for use on light backgrounds. But that doesn't necessarily mean inverting the colors.
If the brand colors include a range of colors, some dark and some light then obviously you can use those for different versions of the logo, no need to extrapolate different colors.
If that isn't the case then it's perfectly fine to supply one color version and then monochrome versions: one black and one white—for use on light and dark backgrounds respectively.
If you want to create a version of the logo with inverted or any other colors, that's fine. But don't think you need to do that. One thing I wouldn't do is simply invert the colors. Use existing brand colors or lighter/brighter variations thereof.
In any case, agree all of this (preferably in the form of a contract) before any work starts.


+ 12volt and -12volts from pc psu. Can I get 24 volts?

Question: I have an unused pc atx psu. I want to make a bench power supply. The usual ebay breakouts give 3v 5v and +12v and -12v. Can I use an LM317 and make a variable output up to 24v?
Any advice gratefully received.
Comment: you can, but the total current would be limited by the -12 V supply current, which is very low ... you would also not be able to use the resulting 24 V output in the same circuit as the 5 V output
Comment: If you look at the manual for your power supply, there is usually a list of the power supply's rails and if the supply is modular, often a list of which ports connect to which rail so you can balance loads better between the rails.  You might be better off running an isolated 12-24V boost converter off of a decently powerful 12V rail.
Comment: I'm a noob and tried to help a friend with his home-brew 3D printer. I suggested we re-purpose an ATX and while we learned a lot there was a heck of a lot of workarounds and he ended up buying a non-ATX. In my experience you'd be getting yourself a bunch of unexpected problems. If you can afford the $20 buy something designed for your project's needs.
Answer: Maybe, depending on your needs.
The first problem is that since the -12V is very limited in current, typically few hundred milliamperes tops, it will be the limiting factor, even if there is tens of amperes of +12V available.
Second problem is that the power supply 0V is connected to mains input earth, so the outputs really are +12V and -12V, even if the total voltage is 24V. So it is not a floating 24V power supply. If use it to power up a 24V device, remember that the negative lead is still -12V, and thus cannot be connected to any other earth-referenced device. If you do, it will short the -12V output to 0V via mains earth wires.
And no, making the supply float by disconnecting mains earth or modifying the internals to have floating output can be dangerous, even if some people do it.
Third problem is that it is still an ATX supply with multiple outputs. They may not be that stable when loading only one of the positive outputs, and when the load is suddenly disconnected. The power supply output may rise high enough that it hits the overvoltage protection limit and shuts down. So since it is an ATX power supply, power must be drawn from it as per the ATX specifications mandate how it must be used, or it may not work properly.
Basically, getting a proper lab power supply is better than making a makeshift lab power supply from ATX power supply.
Comment: 3rd problem: the classic workaround was to use a 6V incandescent bulb of several W to load down the 5V rail; that tends to be most sensitive to under-loading or at least that used to be the case
Comment: My needs are mostly experimenting with a desire to replicate some of the discoveries of pioneers in early radio. So running a current through a coil and looking for the results on my Pluto SDR is about my level. With my background in computer support I never really had a need to understand more fundamental considerations regarding power. Thanks for the advice.
Answer:
Can I use an LM317 and make a variable output up to 24v?

No. The LM317 has a voltage drop of ~2V, so the maximum you will get is ~22 V.
A better solution would be to boost the +12 V to +26 V using eg. an XL6009 based module, then regulate down to the voltage you want with the LM317.
To reduce power dissipation in the LM317 at lower output voltages you could turn the booster output voltage down, eg. to 14 V when the LM317 is regulating down to 12 V, or 12 V (minimum possible booster output) when regulating down to 10 V and lower.
Comment: I'm experimenting with TI MSP430 microcontrollers for which the power requirements are modest. But there is often a need to do something real such as automate my house climate control so higher power is required. It's interesting that you can play around with electronics at a signal level ie microcontrollers and get some useful results without really understanding the fundamental electrical properties. Sometimes you just want to experiment with a coil of wire and see what happens so this is where the higher voltage comes in.


How many unit tests should I write per function/method?

Question: Do you write one test per function/method, with multiple checks in the test, or a test for each check?
Comment: I'd say a function should have at least several tests. If it has only one test expecting a particular output, then

`output YourFunction(input) { return DEFAULT_OUTPUT; }`

will pass all the tests, but you don't want that
Answer: One test per check and super descriptive names, per instance:
@Test
public void userCannotVoteDownWhenScoreIsLessThanOneHundred() {
 ...
}

Both only one assertion and using good names gives me a better report when a test fails. They scream to me: "You broke THAT rule!".
Comment: In Java, I actually break the camelCase convention on my test methods for readability, and highlight important parts, such as subjects / objects with a capital letter. Example: `userCannotVoteDownWhenScoreIsLessThanOneHundred` -> `User_cannot_vote_down_when_Score_is_less_than_one_hundred`
Comment: thats basically BDD in a nutshell - although BDD puts the focus on writing those rules as descriptive assertions.
Comment: @Theodor I do that too. Since test method names are usually longer, I think that underlines are a better alternative.
Answer: I have a test per capability the function is offering. Each test may have several assertions, however.
The name of the testcase indicates the capability being tested.
Generally, for one function, I have several "sunny day" tests and one or a few "rainy day" scenario, depending of its complexity.
Answer: BDD (Behavior Driven Development)
Though I'm still learning, it's basically TDD organized/focused around how your software will actually be used... NOT how it will be developed/built.
Wikipedia
General Info
BTW as far as whether to do multiple asserts per test method I would recommend trying it both ways. Sometimes you'll see where one strategy left you in a bind and it'll start making sense why you normally just use one assert per method.
Answer: I think that the rule of single assertion is a little too strict. In my unit tests, I try to follow the rule of single group of assertions -- you can use more than one assertion in one test method, as long as you do the checks one after another (you don't change the state of tested class between the assertions).
So, in Python, I believe a test like this is correct:
def testGetCountReturnsCountAndEnd(self):
    count, endReached = self.handler.getCount()
    self.assertEqual(count, 0)
    self.assertTrue(endReached)

but this one should be split into two test methods:
def testGetCountReturnsOneAfterPut(self):
    self.assertEqual(self.handler.getCount(), 0)
    self.handler.put('foo')
    self.assertEqual(self.handler.getCount(), 1)

Of course, in case of long and frequently used groups of assertions, I like to create custom assertion methods -- these are especially useful for comparing complex objects.
Answer: A test case for each check. It's more granular. It makes it much easier to see what specific test case failed.
Answer: I write at least one test per method, and somtimes more if the method requires some different setUp to test the good cases and the bad cases.
But you should NEVER test more than one method in one unit test. It reduce the amount of work and error in fixing your test in case your API changes.
Answer: I would suggest a test case for every check.
The more you keep atomic, the better your results are!
Keeping multiple checks in a single tests will help you generate report for how much functionality needs to be corrected.
Keeping atomic test case will show you the overall quality !
Answer: In general one testcase per check. When tests are grouped around a particular function it makes refactoring (eg removing or splitting) that function more difficult because the tests also need a lot of changes. It is much better to write the tests for each type of behaviour that you want from the class. Sometimes when testing a particular behaviour it makes sense to have multiple checks per test case. However, as the tests become more complicated it makes them harder to change when something in the class changes.
Answer: In Java/Eclipse/JUnit I use two source directories (src and test) with the same tree.
If I have a src/com/mycompany/whatever/TestMePlease with methods worth testing (e.g. deleteAll(List<?> stuff) throws MyException) I create a test/com/mycompany/whatever/TestMePleaseTest with methods to test differente use case/scenarios:
@Test
public void deleteAllWithNullInput() { ... }

@Test(expect="MyException.class") // not sure about actual syntax here :-P
public void deleteAllWithEmptyInput() { ... }

@Test
public void deleteAllWithSingleLineInput() { ... }

@Test
public void deleteAllWithMultipleLinesInput() { ... }

Having different checks is simpler to handle for me.
Nonetheless, since every test should be consistent, if I want my initial data set to stay unaltered I sometimes have, for example, to create stuff and delete it in the same check to insure every other test find the data set pristine:
@Test
public void insertAndDelete() {
    assertTrue(/*stuff does not exist yet*/);
    createStuff();
    assertTrue(/*stuff does exist now*/);
    deleteStuff();
    assertTrue(/*stuff does not exist anymore*/);
}

Don't know if there are smarter ways to do that, to tell you the truth...
Answer: I like to have a test per check in a method and have a meaningfull name for the test-method. For instance:
testAddUser_shouldThrowIllegalArgumentExceptionWhenUserIsNull
Answer: A testcase per check. If you name the method appropriately, it can provide valuable hint towards the problem when one of these tests cause a regression failure.
Answer: I try to separate out Database tests and Business Logic Tests (using BDD as others here recommend), running the Database ones first ensures your Database is in a good state before asking your application to play with it.
There's a good podcast show with Andy Leonard on what it involves and how to do it, and if you'd like a bit more information, I've written a blog post on the subject (shameless plug ;o)


Help proving an specific subspace of all bounded and continuous functions over $[0, \infty)$ is closed?

Question: Let $C_{b}[0, \infty)$  the space of all continuous and bounded functions $f:[0, \infty) \to \mathbb{R}$ with the supreme norm. Let $I$ the space of all $f \in C_{b}[0, \infty)$ such the $\lim_{x \to  \infty}f(x)$ exist. Is this subspace of $I \subset C_{b}[0, \infty)$ closed? For being honest Im really struggling solving this problem.  I got the intuition I is not closed, so my idea is using the equivalence of a closed set as set containing all its limit points, this way showing and proving a sequence in $\lbrace f_{n} \rbrace \subset C_{b}[0, \infty)$ such the limit exist for every $f_{n} \in C_{b}[0, \infty) $ but $lim_{n \to \infty} f_{n} \notin I$ im done. The problem is I cannot show a sequence satisfying what I mentioned.
Comment: I think you should try to prove that it is closed. Think about why you couldn't find a counterexample.
Answer: The subspace $I$ is indeed closed.  To prove so, suppose that $\{ f_n \} \subset I$.  If
$f_n \to f$ in $C_b([0, \infty))$, then $\sup_{x \in [0, \infty)}|f_n(x) -f(x)| \to 0$.  In particular, for any $\varepsilon >0$, there exists $N \in \mathbb{N}$ so that if $n \geq N$, then $|f_n(x) -f(x)| \leq \frac{\varepsilon}{2}$. Since $f_N \in I$, there exist $L \in \mathbb{R}$ and $R > 0$ so that if $x \geq R$, then $|f_N(x) - L| \leq \frac{\varepsilon}{2}$.  Thus, by triangle inequality, it follows that if $x \geq R$, then
$$
|f(x) - L | \leq |f(x) - f_N(x)| + |f_N(x) - L| \leq \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon.
$$
That is, $\lim_{x \to \infty} f(x)$ is $L$.
Comment: Very clear and concise! Thanks a lot!
Answer: Hint: if $f \notin I$ there is $\epsilon > 0$ such that for every $N$ there exist $x, y > N$ with $|f(x) - f(y)| > \epsilon$.  What does this tell you about  $g$ where $\|g - f\|$ is small?
Answer: Usually, when we are stuck at a problem, we can try to investigate a simpler one. Here, maybe the fact that the limit at infinity of each $f_n$ depends on $n$ can be annoying. Therefore, we can have look at the space of the functions which vanish at infinity and show that it is indeed closed. The idea with sequences is good: let $\left(f_n\right)_{n\geqslant 1}$ be a sequence of functions such that $\sup_{x\geqslant 0}\left\lvert f_n(x)-f(x)\right\vert\to 0$ for a function $f\in C_b[0,\infty)$ and that for all $n$, $\lim_{x\to +\infty}f_n(x)=0$. We have to prove that $f$ vanishes at infinity. We can write for all $n\geqslant 1$ and all $x\gt 0$,
$$
\left\lvert f(x)\right\rvert\leqslant \left\lvert f(x)-f_n(x)\right\rvert+\left\lvert f_n(x)\right\rvert\leqslant \sup_{y\geqslant 0}\left\lvert f(y)-f_n(y)\right\rvert+\left\lvert f_n(x)\right\rvert.
$$
For a fixed $\varepsilon$, choose $n$ such that the first term in the last expression is smaller than $\varepsilon$. Then use the fact that for this fixed $n$, the function $f_n$ vanishes at infinity.
Now, in the general case, the assumption become $\sup_{x\geqslant 0}\left\lvert f_n(x)-f(x)\right\vert\to 0$ for a function $f\in C_b[0,\infty)$ and that for all $n$, $\lim_{x\to +\infty}f_n(x)=c_n$.

First show that the sequence $(c_n)$, by writing for a fixed $x$ and fixed $m,n$,
$$
\left\lvert f_n(x)-f_m(x)\right\vert\leqslant \sup_{y\geqslant 0}\left\lvert f_n(y)-f(y)\right\vert+ \sup_{y\geqslant 0}\left\lvert f_m(y)-f(y)\right\vert
 $$
and letting $x$ going to infinity.
Apply the result for the function vanishing at infinity to $g_n:=f_n-c_n$ instead of $f_n$.
Comment: Thanks for the tips and guidance! Muito Obrigado!


why lift is greater at wing root

Question: Is lift greater at the wing root of an horizontal wing,just like it's greater on a tapered wing?
Answer:
Is lift greater at the wing root of an horizontal wing,just like it's greater on a tapered wing

Well this is sort of definitional.
Generally speaking the idea of any sort of taper or shaping of the wing like the examples you posted above is to deliberately reduce the lift at the tips in order to reduce induced drag. In that case, no, the rectangular wing would be more even across the span - although there's all sorts of other effects that would likely come into play that would adjust that to some degree.
But really what you're asking about is the lift per span. If you really mean "is there more lift at the root" then the answer is "absolutely every time" for the simple reason that the lift force at the root is the lift force of the entire wing, whereas at the tip it's the force of only the tip. That's why the spars get thicker as you move in toward the root.

why lift is greater at wing root


Operator algebra for momentum and potential vector in second quantisation

Question: While reading about the interaction of matter with the quantised electromagnetic field I found that, after applying the minimal coupling $\hat{p_i}\rightarrow \hat{p_i}-\frac{e_i}{c}\hat{A}(\vec{r}_i,t)$ I arrive to terms involving $\hat{p_i}.\hat{A}$. It is suggested that we should apply these operators on a wavefunction $\psi$: $\hat{p}.\hat{A}\psi=(\hat{p}.\hat{A})\psi+\hat{A}.(\hat{p}\psi)$.
How does one arrive to this expression? $\psi$: $\hat{p}.\hat{A}\psi$ is just $\hat{A}$ acting on $\psi$, followed by the application of $\hat{p}$, right? Afterwards I wrote the expression like this:$\hat{p}.\hat{A}\psi-\hat{A}.(\hat{p}\psi)=[\hat{p},\hat{A}]\psi$, isn't it how it should be? What is $(\hat{p}.\hat{A})?$.
Thank you.
Comment: Quick Hint : Coulomb gauge.
Comment: $\vec{\nabla} .A=0$? I would use it after writing the momentum as $-i\hbar \vec{\nabla}$, but I can't seem to understand I get how one arrives to the expression I mentioned.
Answer: If you imagine $p$ behave like a derivative, $p\cdot (FG)=(p\cdot F)G+F(p\cdot G)$ is just the product rule. If we work in the position representation, and $A$ is just a function of $x$, then the answer follows.


how does rotation works in AVL trees and what is a good way to understand it?

Question:
If we consider this tree with T1 and T2 as subtrees, and we want to rotate on x (rotating the edge between T1 and x), what is the result? how does it work then? Does the x stay in its place and T1 switch with T2? I saw multiple examples online but they had too many nodes and i couldn't really understand the concept of rotating and that's why i chose this simple example so that i (hopefully) can apply it in all other situations.
Comment: Read a textbook. Look at the graphics.
Answer: One needs three subtrees to describe rotation, as the operation reconnects the three subtrees of a pair of nodes, one the child of the other.

The operation can be seen as a associative property: $T_1\;p\; (T_2\; q\; T_3) = (T_1\; p\; T_2)\; q\; T_3$ of the inorder traversal of the nodes in a binary tree.
Both the left and right diagram have the inorder $\mathrm{in}(T_1)\; p\; \mathrm{in}(T_2) \; q\; \mathrm{in}(T_3)$, where $\mathrm{in}(T)$ is the inorder of subtree $T$.
It is pretty well explained at wikipedia Tree rotation, even with animated pictures.
Comment: Oh so the example that I provided isn't rotatable?
Comment: Just look at Wikipedia. It has many illustrations that describe the process.


Why is the latency so high for Bluetooth audio?

Question: Referring to this, the lowest latencies achieved in Bluetooth audio streaming are around 30-40ms. Given the fact that Bluetooth physical layer data rate is of around 2-3 Mbps and today's Bluetooth chipsets support sufficiently high processing power, the source to playback device latencies should be much lower (e.g. within 10ms or so, even by keeping substantial buffering.)
The audio codecs like AptX claim to add latency by 1.8ms only.
What causes so high latency in Bluetooth audio streaming using Bluetooth A2DP profile?
Comment: Nothing to do with processing power, all to do with packet size and buffer size. If someone digs up the A2DP spec we can take a look.
Comment: Probably the fact that nobody cares about  implementing it as fast as possible
Comment: @PlasmaHH, sure, there's practical minimums and acceptable maximums for audio latency and it's been the subject of much Bluetooth investment and development. "the fact that nobody cares about implementing it as fast as possible" didn't quite capture that for me, though :-)
Comment: @PlasmaHH, you want it as fast as possible if you're watching TV with sound over Bluetooth, which an awful lot of people do. The observable speech lag becomes a problem.
Comment: @TonyM: 40ms isn't perceivable for the average person, it may push already bad synced audio just a bit beyond the limit of being recognizable, but then you already have another problem.
Answer: This is just an approximation to what is happening: -
Streaming bluetooth packet size is about 1 kByte. If you are sending MP3 music at 192 kbits per second that's about 24 kB per second so 1 kB represents about one-24th of a second or about 42 ms.
You have to receive the full packet in order to check for errors so latency is tens of ms.
See also this stack overflow question and answer relating to maximum packet size.
As to why there is a packet size limit, consider two opposing requirements: -

Small packet sizes have a payload data size that is inefficient compared to the actual packet length (including headers and checksums) BUT, a small packet stands a good chance of being received without error.
A large packet size has a much more efficient use of payload data but stands a bigger chance of failure over a radio link.

I think Goldilocks had the same problem with the three bears.
Comment: what you mean is the latency is heavily dependent on the time required to fill the packet buffer of 1kByte length. If that is the case then if some type of codec requires higher bit rate,[ [see the "aptX low latency" section](https://www.qualcomm.com/solutions/voice-and-music/features/aptx) ] then it should fill the 1kB buffer fast and so should result in reduced latency, which does not seem to be happening in "aptX low latency" which says the latency to be 40ms.
Comment: That should mean that there are some other important factors responsible for the latency, and not just the packet size, right?
Comment: Im not saying there are not other factors but, optimising the packet size to suit the best delivery throughput of data in a radio system is a trade off and is probably the most important factor except when latency becomes too long to be acceptable to the user.
Comment: On this basis it sounds impossible to expect live streamed audio until bluetooth 5 kicks off then? I'm wondering if audio is fast enough to be compressed on the fly at that speed, not sure of the feasibility of that. I'm hearing results of <0.1s from people here: https://www.reddit.com/r/AndroidQuestions/comments/9su8or/do_bluetooth_50_earphones_get_better_latency_less/
Comment: And in the meantime I can literally stream games with <30ms over Wifi. Bluetooth really sucks. I bet using Wifi we could stream audio with <5ms latency. Kind of weird that these technologies are so far apart and yet Bluetooth and Wifi are often provided by the exact same chip and even use the same frequency.
Answer: The Bluetooth latency is due to the design of the communications protocols.
Since, Bluetooth is a multi point connection system, it needs to buffer data (audio signal).
The physical radio delay is less than 5 ms. Thus, without the buffering, latency can be well below 5 ms.


Is anyone using Netzke in production?

Question: I'm building an Ext.js application, and I'm planning on using rails for the backend. I'm trying to decide whether to use Netzke, or roll my own. Is anyone using Netzke in production?
Answer: Yes we do for a mid-size backoffice application localized in French, English and Thaï. We started with Netzke 0.6 & ExtJS3 and just finished upgrading to Netzke 0.7 & ExtJS4 (upgrading took 4 days with a little pain sometimes, but all in all it went pretty well). The development time for the application is about ~3 months with 3 junior developpers and me (got 100% test coverage + acceptance testing with Cucumber).
I've been investigating before choosing Netzke (JQuery UI, Roll-our-own UI, pure ExtJS, ...) and i'm very happy with the results (the customer too, which is much more important).
We are now happily starting another customer project with Netzke & ExtJS4.
Bests,
Answer: Yes I do. For a smaller address management solution for <100 user with each >100k addresses.
My team also builded a larger application with extjs and rails (3 man years) and we used pure extjs and rails without any pre-build library.
I wouldn't suggest netzke for bigger projects. If you build something bigger, you better build your own framework that perfectly match your needs - not more not less. For smaller projects and prototypes neztke is really great.
If you have more detailed questions, feel free to contact me.
Answer: Netzke for admin interface very fast and rich solution.
At last release with ExtJS4 it became much useful and easy to build up.
Answer: At my company we've used it for a big internal application. We've built literally hundreds of components - a lot of them being inherited components from netzke-basepack, but we also rolled our own from the ground up.
I think as of now it's by far the best solution to RIA with rails. The creator is very helpful and managed to build a growing and helpful community around the project.
Working with it is very rewarding - once you understand the core concepts you will be very quick plugging your components together to build great and interactive web apps. It can be a bit tough to polish it later though, due to the complexity of Ext JS itself (it's a complete application framework after all) - but with growing Ext JS knowledge this wasn't an issue in our project after some time.
I suggest you give it a try - there is no alternative to use rails with Ext JS IMHO :-)

Is anyone using Netzke in production?


Trees won't grow in minecraft FTB

Question: I have created a 2x2 spruce tree farm in Feed The Beast and the trees won't grow at all. I have tried giving the saplings bonemeal and other things I found on the internet, but they still will not grow. Here's a picture of my tree farm:
Comment: Seems like you have mods, try to remove mods and try again, as mods can cause problems.
Comment: Spruce spawn leaves close to the ground and as crazy as this seems the chest and such could be causing you the issues. As a test try just moving a block of dirt to an area where you have 3-4 spaces around it clear on all sides and give it a go again.
Comment: @ardaozkal Well it's FTB so there are mods, what did you expect?
Answer: This Minecraft Wiki article about trees might be useful. I assume you are trying to grow a Mega Spruce Tree (2 blocks x 2 blocks).

To grow a 2×2 mega spruce tree variant, there must be no block other than air, wood, leaves or saplings either directly next to or diagonally to the northwest spruce sapling.

You have a block that I don't recognize next to the northwest sapling. This is most likely the problem; try removing that block.
If that doesn't work:

Do you have enough light? Try using the bonemeal during the daytime.
Have you tried applying bonemeal more than once? It's only successful sometimes.

Feel free to leave a comment below this post if you're still having problems.
Comment: Thanks! :D I did everything you guys suggested and I got it to work ;)

Trees won't grow in minecraft FTB


Full extent of a map

Question: Is there a way to get the full extent of a map? I am looking to use this extent to zoom out to whole world view on a button click.
Answer: the full extent of a particular layer can be retrieved by the aptly named 'fullExtent' property.  The value it returns can be passed to map.setExtent() in order to accomplish this dynamically if its not sufficient to pass static values to zoom out and view the entire world.
See the API reference for more information
https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#fullextent
https://developers.arcgis.com/javascript/jsapi/arcgistiledmapservicelayer-amd.html#fullextent
Comment: This is exactly what I was looking for.
Answer: I think the easiest way would be to use map.CenterAndZoom the following:
<code>button.on('click', function(){
    var location = [-155.79719, 14.03035];
    //Any location around the equator
    map.centerAndZoom(location, 2);
});
</code>
A zoom level of 2 will show the entire map.  If you dont want to use this a second option would be to use the Extent class.
Comment: Thanks, this solution worked when I changed the zoom level to 1.
Answer: With the 4.x API you just set the extent property on the map view object.

Full extent of a map


Exercises on dynamic play

Question: I feel I learn best from solving exercises and I'm looking for a resource that focuses on "dynamic play" such as going for dynamic advantages at the expense of static/material aspects and how to treat the resulting positions. Any recommendation for an exercise book or an online resource?
Comment: Exercises are usually more static, meaning the solution leads to a clear result.  I think what you are looking for exists more in the form of examples although some exist in exercise format throughout some of Dvoretsky's books.
Answer: I can recommend The Attacking Manual.
From the Quality Chess homepage: "British Champion Jacob Aagaard explains the rules of attack (the exploitation of a dynamic advantage) in an accessible and entertaining style. This groundbreaking work is well balanced between easily understandable examples, exercises and deep analysis."
To benefit from this book you should be an advanced player, maybe 1900 Elo or above.
The Attacking Manual contains explicit exercises. An alternative is to just play through dynamic games from a book and try to guess the next move. For example you could search the game on chessgames.com or on chessbase, make sure you can't see the moves and then go through it until you find an interesting position. Then you calculate and write down all your variations. Afterwards you go back to the book and find out how accurate your reasoning was.
Books with great dynamic chess are Life and Games of Mikhael Tal, Storming the barricades or Fire on Board.

Exercises on dynamic play


Arguments against incest

Question: Incest is forbidden in most countries because if there is a genetic disease in the family the child of a incestuous relationship will be at least holder of the gene of that disease. But lets say the members of a family dont  have a genetic disease and are not holders of any gene related to a genetic disease then theoretically would a child of a incestuous relationship not suffer from diseases by birth?
Comment: evolution is about probability, the probability of your hypothetical assumption is breathtakingly low. That's why an avoidance instinct exists, not because it it always holds true.
Comment: @JiminyCricket. Editted.There are dominant genes and less dominant genes for every trait of a human person for example lets say for the color of the eyes if someone inherits the gene which translates to the brown eyes from his dad and the gene which translates to the blue eyes from his mum then because the gene which translates to the brown eyes is more dominant than the gene which translates to the blue eyes , the kid will be born with having brown color eyes,yet he will be a holder or a carrier of the gene for blue eyes.
Comment: There is more to it than just the biological risk, there's also morale issues and the fact humans developed a family structure. (That's better discussed on a different site, or in chat.)
Answer: Incest doesn't necessarily mean that the partners are having unprotected sexual intercourse. It simply means sexual intercourse between closely related member of a family. In case of protected sexual intercourse, it doesn't matter whether or not the family has history of some genetic disorder.
But let's say they are practicing unprotected sexual intercourse. In that case, it does depend on the genetic history of the family. If either or both of the parthers has gene that result in a disorder, then thier offspring who gets that gene expressed in his/her body will suffer from that genetic disorder. And if it is not expressed, they become a carrier for that gene.
Now, coming to the case you mentioned, Yes, if neither of the partner have gene that causes certain genetic disorder, then the offspring will not suffer from the said gentic disorder.
But it only works if there's a no history of incest wihtin that family. In case they do have history of incest within thier family, they are likely to suffer from inbreeding depression. Inbreeding depression 'exposes' deleterious recessive genes by making them homozygous. This causes drop in fitness of the offspring and reduced fertility. Increased homozygosity is what causes issue, which increases chances of a harmful recessive gene getting expressed.
So it's not a big worry, if they don't have any such gene that cause obvious harm by resulting in a certain genetic disorder. But continuous incest in family may result in problems later on.
Anyway, it is possible to be able to determine compatibility of two people by checking thier genetic information [we may become even more advance in near future]. We can selectively edit a gene to make it so that it won't be present in the offspring. Gene editing at advance level will get really popular.

Arguments against incest


What is the physical significance of $\langle L_x\rangle=\langle L_y\rangle$ and $\langle L_x^2\rangle = \langle L_y^2\rangle$?

Question: If we find the expectation value $$\langle L_x\rangle = \langle L_y\rangle = 0$$ and $$\langle L_x^2\rangle = \langle L_y^2\rangle,$$ what is the physical significance that their values are equal?
Comment: Spherical symmetry.
Comment: If you write these in terms of raising and lowering operators, you note that all eigenstates of $L_z$ satisfy them.
Comment: @J.G. that was my 1st reaction, but on 2nd thought: cylindrical?
Comment: @JEB only if all higher-order moments are also equal, which is not guaranteed
Comment: To clarify, my comment was meant to explain why it happens in practice, but technically the given conditions don't imply the full symmetry *unless these conditions are invariant under a rotation*.
Comment: @CosmasZachos certainly a sufficient condition but not a necessary one
Answer: Use
\begin{align}
(\Delta L_z)^2(\Delta L_x)^2 &\ge \frac{1}{2}\vert \langle L_y\rangle\vert\, ,\\
(\Delta L_z)^2(\Delta L_y)^2 &\ge \frac{1}{2}\vert \langle L_x\rangle\vert
\end{align}
Thus, if a system is in an eigenstate of $L_z$, $\Delta L_z=0$ and immediately $\langle L_y\rangle=\langle L_x\rangle=0$
A system with this kind of symmetry is the angular momentum coherent state, where
\begin{align}
L_k\mapsto J_k= R(\Omega) J_k R^{-1}(\Omega)
\end{align}
where $R(\Omega)$ is any rotation.    The condition $\Delta J_x=\Delta J_y$ indicates that the state is not squeezed.
The Wigner function of an angular momentum coherent state with $L=8$ and $R(\Omega)=R_y(\pi/3)$ is shown below.  As a vector, the $J_z$ operator would go through the origin and the maximum of the distribution.  Clearly the rotational symmetry of the distribution is apparent: this follows from $\Delta J_x=\Delta J_y$.
Comment: @QuantumMechanic good point.  was thinking in terms of Pauli matrices, not in terms of higher dimensional reps…
Comment: This is definitely a sufficient condition - do you know if it is necessary to be an eigenstate of $L_z$? I can't immediately see it.
Comment: @QuantumMechanic intuitively it should be necessary, but I'm not wading in the muddy waters to find a proof.
Comment: I doubt it... take $(i|L;m\rangle+|L,m+2\rangle)/\sqrt{2}$ in the basis of $L_z$ eigenstates. This has $\langle L_x\rangle=\langle L_y\rangle=0$ and $\langle L_x^2\rangle=\langle L_y^2\rangle$ but is not an eigenstate of $L_z$.
Answer: One can always define a basis in which $\langle L_x\rangle=\langle L_y\rangle=0$ by an appropriate rotation of the coordinates. Then, the only nontrivial uncertainty relationship is
$$\mathrm{Var}(L_x)\mathrm{Var}(L_y)\geq \frac{1}{4}\left|\langle L_z\rangle\right|^2.$$ Since in this scenario the two variances are equal, we find that
$$\langle L_x^2\rangle=\langle L_y^2\rangle\geq\frac{1}{2}\left|\langle L_z\rangle\right|.$$
The next notion often considered is squeezing. In this basis, it is defined as when
$$\langle L_x^2\rangle<\frac{1}{2}\left|\langle L_z\rangle\right|<\langle L_x^2\rangle$$ or
$$\langle L_y^2\rangle<\frac{1}{2}\left|\langle L_z\rangle\right|<\langle L_x^2\rangle.$$ Neither of these sets of inequalities can hold with the present condition, so there is no squeezing in this basis.
Now, the above definitions are not SU(2)-invariant; a rotation about the $z$ axis leaves all of the $L_z$ moments unchanged and the expectation values of $L_x$ and $L_y$ unchanged while changing all of the other moments. So we can ask whether, for any value of $\theta$,
$$\mathrm{Var}(L_x\cos\theta+L_y\sin\theta)<\frac{1}{2}\left|\langle L_z\rangle\right|<\mathrm{Var}(-L_x\sin\theta+L_y\cos\theta)?$$ Expanding the variances, we find the conditions
\begin{aligned}
\langle L_x^2\rangle\cos^2\theta+\langle L_y^2\rangle\sin^2\theta+\langle L_x L_y+L_y L_x\rangle\cos\theta\sin\theta<\frac{1}{2}\left|\langle L_z\rangle\right|<\langle L_x^2\rangle\sin^2\theta+\langle L_y^2\rangle\cos^2\theta-\langle L_x L_y+L_y L_x\rangle\cos\theta\sin\theta\\
\langle L_x^2\rangle+\frac{1}{2}\langle L_x L_y+L_y L_x\rangle\sin2\theta<\frac{1}{2}\left|\langle L_z\rangle\right|<\langle L_x^2\rangle-\frac{1}{2}\langle L_x L_y+L_y L_x\rangle\sin2\theta.
\end{aligned} These correlations between $L_x$ and $L_y$ do not automatically vanish (if you assume that they do, which is a stronger assumption, you will guarantee no squeezing). If, for example, we have $\frac{1}{2}\left|\langle L_z\rangle\right|\approx\langle L_x^2\rangle$ and nonzero correlations between $L_x$ and $L_y$, then squeezing is definitely present for most choices of angles $\theta$. This cannot be directly accomplished, because $\frac{1}{2}\left|\langle L_z\rangle\right|=\langle L_x^2\rangle$ would here imply that those correlations are zero, so we can still wonder whether this squeezing can be accomplished.
Let's explore further. Using the Schwinger mapping $$L_x=(a^\dagger b+a b^\dagger)/2,\quad L_y=-i(a^\dagger b-a b^\dagger)/2,\quad L_z=(a^\dagger a+b^\dagger b)/2,$$ the assumed conditions are $$\boxed{\langle a^\dagger b\rangle=\langle a b^\dagger\rangle=0}$$ and $$\boxed{\langle a^{\dagger \,2} b^2+a^2 b^{\dagger \,2}\rangle=0}.$$ These imply that $$\langle L_x^2\rangle=\langle L_y^2\rangle=\frac{1}{2}\langle a^\dagger a b^\dagger b\rangle+\frac{1}{4}\langle a^\dagger a +b^\dagger b\rangle$$ and
$$\langle L_x L_y+L_y L_x\rangle=\frac{-i}{4}\langle a^{\dagger \,2} b^2- a^2 b^{\dagger \,2}\rangle=\frac{-i}{2}\langle a^{\dagger \,2} b^2\rangle.$$ Clearly any state with $\langle a^\dagger a\rangle=\langle b^\dagger b\rangle$ has $\langle L_z\rangle=0$ and thus cannot be squeezed. Without loss of generality, we can inspect $\langle a^\dagger a\rangle>\langle b^\dagger b\rangle$, for which the squeezing condition becomes
\begin{aligned}
\frac{1}{2}\langle a^\dagger a b^\dagger b\rangle+\frac{1}{4}\langle a^\dagger a +b^\dagger b\rangle-i\frac{\sin2\theta}{2}\langle a^{\dagger \,2} b^2\rangle<\frac{1}{4}\langle a^\dagger a-b^\dagger b\rangle\\
\langle a^\dagger a b^\dagger b\rangle+\langle b^\dagger b\rangle-i{\sin2\theta}\langle a^{\dagger \,2} b^2\rangle<0.
\end{aligned} We know that, since the covariance matrix with elements $\frac{1}{2}\langle L_i L_j+L_j L_i\rangle-\langle L_i \rangle\langle L_j\rangle$ is positive semidefinite,
$$\langle a^\dagger a b^\dagger b\rangle+\frac{1}{2}\langle a^\dagger a+ b^\dagger b\rangle>\left|\langle a^{\dagger \,2} b^2\rangle\right|$$ and we also know that, with our assumptions, $$\langle a^\dagger a b^\dagger b\rangle+\frac{1}{2}\langle a^\dagger a+ b^\dagger b\rangle>\langle a^\dagger a b^\dagger b\rangle+\langle b^\dagger b\rangle,$$ so I do not yet see a reason why there should be no states for which \begin{aligned}
\langle a^\dagger a b^\dagger b\rangle+\langle b^\dagger b\rangle-i{\sin2\theta}\langle a^{\dagger \,2} b^2\rangle<0\\
\Leftarrow \langle a^\dagger a b^\dagger b\rangle+\langle b^\dagger b\rangle<\left|\langle a^{\dagger \,2} b^2\rangle\right|.
\end{aligned} I wonder if this can be accomplished...
Anyway, using the boxed equations, we can specify some states satisfying the assumptions. Obviously the eigenstates of $L_z$, $$||L,m\rangle=|L+m\rangle_a\otimes|L-m\rangle_b,$$ will suffice, but so too will states that are not eigenstates of $L_z$, such as
$$\frac{||L,m\rangle+||L,m+2\rangle}{\sqrt{2}}.$$
Going back to the original angular momentum notation, if we use the standard raising and lowering operators $L_\pm=L_x\pm iL_y$ that enact $L_\pm||L,m\rangle\propto ||L,m\pm 1\rangle$, all of the conditions become
\begin{aligned}
\boxed{\langle L_\pm\rangle=0,\quad \langle L_+^2+L_-^2\rangle=0.}
\end{aligned} This makes it easy to find other exemplary states, such as $$||L,m\rangle+||L,m+k\rangle+||L,m+k+l\rangle+\cdots,\qquad k>2, l>2, \cdots.$$
Comment: Since averages of $a^\dagger a b^\dagger b$ and $b^\dagger b$ are real, can your guarantee that the term in $\sin\theta$ in your last inequality will also be real else you are comparing a complex number to $0$ :(
Comment: @ZeroTheHero yes of course! The first boxed equation (from one of the assumptions) implies that $\langle a^{\dagger\,2}b^2\rangle$ is purely imaginary


Roast chicken cooking time

Question: What is the best method for determining when a roast chicken is done cooking? Many of the methods I have seen online provide approximate time ranges for cooking dependent on the weight of the chicken. I don't usually have a scale handy when I cook, especially if I'm only cooking part of the chicken. Are there any precise approaches I can use that are easily accessible?
Answer: If you have an instant read thermometer in your kitchen, that can be particularly useful for determining when all kinds of meats are done cooking. For chicken, I would insert the thermometer into the inner thigh of the chicken (try to avoid the bone) and check for a temperature of 165 degrees F. Once the thermometer reads that temperature, the chicken should be ready.
Answer: Without a thermometer it is hard(er) to know if the chicken is cooked.
Whole chicken are forgiving you can over cook it a little bit without much harm (mostly being too dry).
one way to know if the chicken is cooked, is to check if the legs pull apart easily or if the meat feels firm (not precise)
another way is to pierce the meat and see if the liquid coming out is running clear (but it is not precise)
another way would be to slice into the meat and see if it is cooked.

Roast chicken cooking time


Return to my home country after visa expires, but leaving foreign country in time. OK?

Question: In my case, my home country is India, and I return to India from Germany. My Visa expires a day before I reach my home country. I leave the foreign country within the Visa valid period. Is there going to be a problem?
Comment: Why the downvote?
Answer: Your own country cannot refuse to admit you, and it is none of their business whether any foreign visas you have are valid. You are Indian, so you have an absolute right to enter India, period!
So no, there will be no problems, so long as your passport is valid.
Comment: @Kuba India requires their own passports to be valid. Of course they can't refuse a citizen entry, but they can delay and possibly fine them
Comment: I think the OP's concern is probably with making sure  the country he visited has record of his leaving before the visa expired (doesn't want an overstay record) and in his case there is nothing to worry about since Germany has exit controls.
Comment: "so long as your passport is valid." - I think even this isn't always the case, e.g. if you're Polish you can enter Poland with expired passport. Unless by "valid" you mean "original and issued by your country".
Comment: @Crazydre ok, I didn't know :)
Answer: According to this page on Frankfurt Airport:

If you are traveling to a country outside the Schengen Zone or you are not a citizen of an EU country, you will be checked when leaving Germany. You may be required to show that you have a visa.

If that is correct, and the German immigration checks your visa, you should get an exit stamp, assuming you are leaving directly from Germany to India.
If they don't for some reason you should be able to request a stamp- Germany requires that you declare cash in excess of EUR 10K on exit, for example, so there must be a customs and immigration station available.
Comment: ...directly from Germany to India or any other non-Schengen destination, of course.


How are we to understand the usages of "morning" and "evening" in the Genesis narrative?

Question: Is it more so "morning" as in the "morning" of one's life, intended proverbially to signify the beginning of an epoch or process? I would appreciate an answer with sources. The sun, which determines the arrival of morning and evening in the literal sense, had not been created. Thank you
Comment: yonah, [welcome to Mi Yodeya](//judaism.meta.stackexchange.com/a/3887), and thanks for bringing your question here! You might be interested in these related previous Q&As, and perhaps some others linked on the sidebar when you look at them: https://judaism.stackexchange.com/questions/10079/what-is-the-meaning-of-%d7%99%d7%95%d6%b9%d7%9d-yowm-in-bereshit?rq=1 https://judaism.stackexchange.com/questions/47609/age-of-universe-and-shabbat?rq=1
Answer: The Hebrew word "Erev" as used in Genesis 1:5, means "mixed up" in English or "confusion". This is because when things get darker, the human eye cannot properly identify forms; and reality is blurred.
The Hebrew word "Boker" means "clarity" or "break-through" (of light). This is because the coming of light will allow the human eye to once again recognize distinct forms and end all confusion.
This understanding and translation can be seen in the commentaries of Ibn Ezra, Radak, and Rav Shamshon Rafael Hirsch on Genesis 1:5.
Therefore, I simply like to translate the verse as:
There was chaos, and then there was order, one day.
If you follow the pattern of the creation account, you will see that the six days each have a starting point of "chaos" that is set right and becomes "orderly".
The seventh day, is "all light" since it had no chaos and was the culmination of the works of Creation. That's why the 7th day has no mention of "it was erev, and then it was boker" because the 7th day was perfect.
Another proof to this approach, is that Targum Onkelos (Aramaic Translation by Onkelos the Convert, lived 35CE - 120CE), translates "and it was good" throughout Gen. chapter 1, as "and it was good" in Aramaic ("Ar-ey Tav"). However, in Gen 1:31, when G-d says (at the end of Creation): "..it was very good", Onkelos translates that it was ("Takin Chadata") "a unified order".
I hope this helps.
Answer: Genesis 1:1–4 says that G-d created light on Day 1. The light was called "day" and the dark was called "night." Verse 5 follows: And there was evening and there was morning, one day.
How are we to understand this when the sun was not created until the fourth day? We know that light and darkness depend on the position of the sun. So, how is it possible to have light without a sun? The rabbis noted the problem. A Midrash answers that G-d created a "brighter and more enjoyable sun" on the first day but hid it for the righteous to enjoy in Heaven.[1] This is not explicit in the text. Another possible solution is that this is the biblical style (Ibn Ezra). For example, Chapter 1 informs us in a broad statement that G-d created a man and woman, humankind, and chapter 2 explains it in detail, Adam and Eve. Similarly, it is possible that G-d created the sun on the first day (verse 3) and improved this light on the fourth day. This improvement would not only grant light but also support life, allowing vegetation to grow (verses 1–4). Although this view is also not explicit, arguably it is a more reasonable view.
There is one more possibility. It is possible that the Torah account is not meant to be taken literally. It is a parable (Maimonides). The Torah could have used terms such as "light," "day," "morning," and "evening" as metaphors to mean there was an unidentified creation during an unspecified length of time that stopped for a new period of time to begin. Understanding the text this way, we might say that the six-days are to be understood as six periods of time. The Bible is saying that creation took place during a long process with different eras.[2] Thus, Judaism can accept evolution and that the world is millions of years old.
[1] This is also a Catholic tradition
[2] See Babylonian Talmud, Ketubot 57b, where yamim (days) could mean years


Best Lenses for Nikon D810?

Question: I just bought a D810, and I would greatly appreciate lens recommendations. I will primarily use it for landscape, wildlife, and occasionally portraits. However my priority at the time would be landscape and wildlife. I'd really prefer not to spend over $1,000, but I will if need be.
Comment: Two thoughts: 1) You should be spending more on lenses than the body 2) You shouldn't be dropping money on a D810 unless you already know what lenses you're going to be buying.
Comment: This is not "recommend me what to buy" site. Reword your question to be usefull for more people than just you. Otherwise it is off-topic here. And search EXIF information of images you want to mimic - there should be information what body and lens were used. And how the capture was set up. I doubt you are about to shoot anythig nobodu tried before - photography is old lady, you know.
Comment: Just buy all of them. Every.Single.One.
Comment: What's the point in being a jackass? I asked a reasonable question directed towards other photographers who have tried various lenses with a camera I have not yet used.
Comment: Without wishing to be insulting - you bought a hugely expensive camera & want to shoot three major styles, all probably requiring different lenses [unless you go for an ultra-zoom, which would seem a shame on that body] The general consensus these days is 'the body is disposable, the lens is for life' - because of the rapidly-changing tech within the bodies; yet lenses stay the same for years. So your lens choice ought to be made with a considerable amount of research. Either that or get a couple or three second hand & sell on the ones you don't like. They tend to hold their prices.
Answer: Quick answer as this is likely to be closed as a "shopping question" (which it is, and I'm not sure rewording can save it).
Your D810 is a full-frame camera, so only go for FX lenses. While you can shoot with DX (crop) lenses, you will be losing all the advantages of using a full-frame camera while doing so, because the image will be cropped to match the lens's projected image circle.
Secondly, because of this issue, a DX camera/lens is typically recommended for someone who likes wildlife shooting, because the cropping simulates a longer reach, and most wildlife tends to stay far away unless you are a phenom at field craft.  To get a 450mm equivalency on DX, you only need a 300mm lens. On FX, you need a 450mm lens. And the difference in price is more than your entire budget, if you buy new and OEM. Because critters move fast, you will probably want a lens with AF-S for speediest autofocus.
Landscape lenses are particularly difficult to recommend because different people have different tastes and techniques in what comprises a landscape photo for them. They can be shot with ultrawides, wide angles, normal, and telephoto lenses, depending on the taste and abilities of the photographer. Most recommendations would probably say an ultrawide zoom, but they exhibit distortion and are not particularly easy to master immediately. If you have a 24mm-something or 28mm-something kit lens that came with the camera, that's probably your best starting point. If you can learn to use a tripod, to stop down for sharpness and depth of field, and to use a cable release, that will probably work better than immediately "upgrading" a lens you haven't even used yet.  Bad technique will follow you no matter what gear you have. And it's you that's taking the shot, not the camera.
See also: Why are my photos not crisp?

Best Lenses for Nikon D810?


What are RFC's?

Question: I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice.
Answer: The term comes from the days of ARPANET, the predecessor to the internet, where the researchers would basically just throw ideas out there to, well, make a request for comments from the other researchers on the project.  They could be about pretty much anything and were not very formal at the time.  If you go read them, it's pretty comical how informal they were.
Now, there are more standards about what goes in RFC's and you can't get an RFC published until you have met strict guidelines and have done extensive research.  They are pretty much reserved for well researched network standards that have been approved by the IETF.
Comment: Googled 'funny RFC's' - can confirm - 70's people were funny.
Answer: From http://linux.about.com/cs/linux101/g/rfclparrequestf.htm

The name of the result and the process
  for creating a standard on the
  Internet. New standards are proposed
  and published on the Internet, as a
  Request For Comments. The proposal is
  reviewed by the Internet Engineering
  Task Force (http://www.ietf.org/), a
  consensus-building body that
  facilitates discussion, and eventually
  a new standard is established, but the
  reference number/name for the standard
  retains the acronym RFC, e.g. the
  official standard for e-mail message
  formats is RFC 822.

See also: RFC Wikipedia Article
Answer: This could also mean "Request for Change" in an Agile environment.  Just throwing that out there as everyone is so certain is just means "Request for Comments".
Comment: That's how it is used in my current place of work, even though they're not really agile, they pretend to be :)
Comment: I've always heard them called Change Requests probably because of the ambiguity
Answer: Wikipedia gives a good description of what [RFC] is about but in a nutshell it is a set of recommendation from the  Internet Engineering Task Force applicable to the working of the Internet and Internet-connected systems. They are used as the standards.
So if you're looking for a definitive source of the information about the implementation of FTP, LDAP, IMAP, POP etc you don't have to look further than the appropriate RFC documents.
Comment: I really wouldn't read the IMAP one unless you have some good sedatives to hand :)
Answer: It's a Request For Comments. That title is a little misleading though, as it's often used as a name for standards, mostly those by the IETF. See Wikipedia
Answer: As others have said, RFC is a term that was introduced by Arpanet. They are often used by standards bodies to invite stakeholders to provide feedback on proposals. They are also used internally in organizations of all shapes and sizes as part of the software development process. Here is a good resource to learn more: https://www.designdocs.dev/

What are RFC's?