What is the maximum entropy distribution given values for several quantiles of one sample?

Question: Suppose I know the value of n specific quantiles from a large sample. What is the maximum entropy distribution over the real line given those values?
Comment: Have you tried formulating and solving this as an optimization problem of maximizing entropy subject to equality constraints on the n known quantiles? I think you should be able to get the idea of things by Googling and looking at similar problems.
Comment: I'll poke about and see what I can find. But if g1ul10's response, below, is correct -- and I think it is -- then that approach will not work without further constraints.
Comment: Here is a similar problem with answers:  https://stats.stackexchange.com/questions/361476/what-is-the-maximum-entropy-distribution-given-the-median-instead-of-the-mean/361796#361796
Answer: Maximum entropy problems do not always admit a solution. The generic expression for the maximum entropy density $f(x)$ given a set of integral constraints
\begin{equation}
\int dx \, h_i(x) \, f(x) = c_i
\end{equation}
with $i=1\ldots N$ is
\begin{equation}
f(x) = e^{\mu + \sum_{i=1}^N \lambda_i h_i(x)} \;.
\end{equation}
The values of the parameter $\mu$ and $\lambda_i$ have to be found by imposing the fulfillment of the constraints and the fact the $f(x)$ integrates to one, that is it is a proper density. I left the boundaries of the integral in the constraints unspecified on purpose. The reason will become clear in a moment.
The quantile constraints $F(x_i)=q_i$ where $F$ is the distribution function (the integral of the $f(x)$), translate in having $h_i(x)=1-\theta_{x_i}(x)$ and $c_i=q_i$, where $\theta_z(x)$ is the Heaviside theta function, which is equal to $1$ if $x>z$ and zero otherwise. The problem is that now the expression for $f(x)$ given above is not an (improper) integrable function on the real line. Summarizing, your problem does not have a solution. If however you add further constraints, like a finite support or some specified moment, than the problem might become solvable.
Comment: So, that follow-up question was meaningless. The maximum entropy distribution would be the candidate distribution if there was one. Sorry. Here is a question that makes more sense: Would the observed quantiles suffice for a strictly positive distribution?
Comment: @andrewH No. The solution would have a constant behavior for large $x$ and the integral on the positive half-line would not exist. You could find a solution if you consider a finite domain, like $[0,1]$. In this case, however, the solution will be rather trivial, with a step-wise shape.
Comment: I don't have moments, etc., because high and low values are censored. Would it be sufficient if I had a candidate functional form?
Comment: @g1ul10 can the quantiles be used to estimate the information entropy of the sample?


Why does 差餉 signify "rates", a type of property tax?

Question: Cambridge and Collins translates "tax" as 稅款.
Wikipedia and HKSAR Government's Rating and Valuation Department define 差餉.

Why  差? What differs? What's lacking?

Why 餉? How's "tax" related to soldier's victuals like provisions or salary?
Comment: you can buy a booklet (香 港 差 餉 稅 收 歷 史) to know the history here: https://www.rvd.gov.hk/tc/publications/index.html#property_rates
Answer: TL;DR - because rates are a specific form of tax under common law, and the nomenclature comes from the history of the rates in the colonial Hong Kong legal system, which was related to police pay.
Disclaimer: I am not a qualified financial adviser nor an expert in financial law.
The first Rating Ordinance, Ordinance No.2 of 1845, was collected with the express purpose of paying the expenses and upkeep of the police force.
The Hong Kong police at that time was called the 香港差役. with 差役 referring to a bailiff sent from a 衙門 yámén. Hence the 差 is pronounced chāi in Standard Mandarin and caai1 in Cantonese, and refers to being "sent out" or "dispatched".
Thus, the provisions for these forces were given the name 差餉 caai1 hoeng2, and equated to the British version of the common law concept of rates.
Note that Singapore and Malaysia follow US custom in calling it property tax and 房地产税, whereas Macau, Taiwan and PR China all use civil law systems and do not have the common law concept of rates.
Also, it must be said that like in the UK, property tax and 物業稅 are not the same as rates and 差餉 in HK; the former includes the latter.
Answer: 差饷

…… 差饷是香港对地税的说法,承袭自中国的古文。中国内地并没有差饷。差饷是一种源于英国的税款, 在英国、美国、澳大利亚以及很多国家和地区都存在 ……

It's not from ancient Chinese. It's a translation of English word (maybe rate), though I don't know how it was translated, seems only circulated among Hong Kong region.  差餉 to rate is just kind of translation back.


Multiple Category Search with and operator in Wordpress

Question:
I need category base search where qulification and state are match i have tried but and condition not work it show both category dat
Answer: You are headed down the right path, but your syntax I think is a tiny bit off.
cat is in fact a public queryable variable. https://codex.wordpress.org/WordPress_Query_Vars#List_of_Query_Vars
Rather than the +, you'll need to use a , instead and you'll need a & in there to split them up. You should see results on your search page with something like:
Slug domain/?s=&cat=1999,2148

Assuming you are using post as the post_type and a category taxonomy.
Hope that helps!
Edit:
Here is a form that tries to include your  fields like you have shown above:
<form role="search" method="get" id="searchform" action="">
    <select class="js-cat-one-field" required>
        <option value="">State</option>
        <option value="1293">North Carolina</option>
        <option value="1999">Virginia</option>
    </select>

    <select class="js-cat-two-field" required>
        <option value="">Qualificationn</option>
        <option value="1092">HTML</option>
        <option value="8321">CSS</option>
        <option value="2148">WordPress</option>
    </select>

  <input type="hidden" value="" name="s" />
  <input type="hidden" value="" name="cat" class="js-combined-cat" />
  <input type="submit" id="searchsubmit" value="Search" />
</form>

Few things to note:

You are not searching anything other than your filters, you can use type="hidden" on the actual search field.
You have two filters, with each needing their own unique name attributes. Because we want both values of them to be passed as one query string, we need to do some work behind the scenes to make that happen on form submission.
This is a rough idea to help get you where you need to be. But I did test things on my end and it's giving me what we are expecting to see.
I used Vanilla JS just to show some basic concepts.
Comment: can you please provide me the code
Comment: @OmPal, see above....


Django migration: django.db.utils.OperationalError: (1824, "Failed to open the referenced table 'classroom_user'")

Question: I am trying to deploy a Django app from a development server to a production server
I have set up a virtualenv with python 3.8.10, created the mysql database, I am running in the virtualenv. I get no errors from python manage.py check, get "no changes detected" when running python manage.py makemigrations, but when I run ```python manage.py migrate`` I get the following:
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying admin.0001_initial...Traceback (most recent call last):...
final line of the traceback:
Django.db.utils.OperationalError: (1824, "Failed to open the referenced table 'classroom_user'")
("classroom" is the name of the app within the project "codex") I just recently rebuilt all of the tables in this database on my development server with no issues.
The database on the production server is empty. models.py is in place and complete. I have tried it both with an empty migrations folder and the migration folder removed. The migration does create django_admin_log, django_content_types, django_migrations, but no other tables.
All of the other posts I have seen on this have been about have foreign key constraints, but in my models.py all of the tables that have foreign keys are specified after the tables where the keys are.
Answer: OK, solved.
I was able to get a different error with a slightly older version of Django (3.2.6 instead of 3.2.8) and on a Windows server instead of Linux. This gave me an error regarding foreign key restraints that I have seen in other posts, but was not an error I had seen before.
I had to perform the migrations for my app first (where classroom is the app within the  project.):
python manage.py makemigrations classroom
python manage.py migrate
Answer: This worked for me!
Try to check your table ENGINE with this command:

MySQL: SHOW TABLE STATUS WHERE NAME='XXX';

Then find its Engine (It's either MyISAM on InnoDB)
After that, change the engine of your newly created table (which throw the error) and match it with your classroom_user table with this command:

MySQL: ALTER TABLE classroom_user ENGINE='XXXX';

Then run migrate again and you're good to go!
Comment: you saved my life with this one :)


How to convert from wchar_t to LPSTR?

Question: How can I convert a string from wchar_t to LPSTR.
Comment: Do you mean from `LPWSTR` to `LPSTR`?
Answer: A wchar_t string is made of 16-bit units, a LPSTR is a pointer to a string of octets, defined like this:
typedef char* PSTR, *LPSTR;

What's important is that the LPSTR may be null-terminated.
When translating from wchar_t to LPSTR, you have to decide on an encoding to use. Once you did that, you can use the WideCharToMultiByte function to perform the conversion.
For instance, here's how to translate a wide-character string into UTF8, using STL strings to simplify memory management:
#include <windows.h>
#include <string>
#include <vector>

static string utf16ToUTF8( const wstring &s )
{
    const int size = ::WideCharToMultiByte( CP_UTF8, 0, s.c_str(), -1, NULL, 0, 0, NULL );

    vector<char> buf( size );
    ::WideCharToMultiByte( CP_UTF8, 0, s.c_str(), -1, &buf[0], size, 0, NULL );

    return string( &buf[0] );
}

You could use this function to translate a wchar_t* to LPSTR like this:
const wchar_t *str = L"Hello, World!";
std::string utf8String = utf16ToUTF8( str );
LPSTR lpStr = utf8String.c_str();

Comment: It should be noted that the 16 bits is specific for windows, and that other implementation may (and will) have different sizes for wchar_t and/or char.
Comment: @nidahl: To do that, you can use the `MultiByteToWideChar` function.
Comment: thank you, and to convert a LPSTR to wstring how can i do this?
Comment: @PlasmaHH: Yes, that's true - I was strictly speaking with Windows in mind (since it was tagged as visual-c++).
Comment: @Frerich: i just replace WideCharToMultiByte with MultiByteToWideChar?
Answer: I use this
wstring mywstr( somewstring );
string mycstr( mywstr.begin(), mywstr.end() );

then use it as mycstr.c_str()
(edit, since i cannot comment) this is how i used this, and it works fine:
#include <string>

std::wstring mywstr(ffd.cFileName);
std::string mycstr(mywstr.begin(), mywstr.end());
pRequest->Write(mycstr.c_str());

Comment: and what are those functions?

How to convert from wchar_t to LPSTR?


Does a maximal inscribed square in a regular polygon have a side parallel to a side of the polygon?

Question: Suppose $P$ is a regular (i.e.,equiangular equilateral) polygon in the Euclidean plane, and the number sides of $P$ is not a multiple of $4$. Then $P$ contains an inscribed square. (Citation.) Of all the squares inscribed in $P$, some are largest. (Proof, the boundary of $P$ is compact, so a subsequence of vertices of increasing inscribed squares has a limit.) Among all such largest squares, does at least one of them have a side parallel to a side of $P$? It looks like it should, so I suspect it does, but that's not worth much.
Comment: Prompted by http://judaism.stackexchange.com/questions/10443.
Answer: Please consult this reference:
Dilworth, S. J.; Mane, S. R., On a problem of Croft on optimally nested regular polygons, J. Geom. 99, No. 1–2, 43–66 (2010). ZBL1231.68264.
Let P be a regular n-gon.
If n is even not divisible by 4, the paper shows that the largest inscribed square has edges parallel with edges of P.
(In this case the largest inscribed square is also the largest square contained in P.)
So suppose n is odd.
The case n=3 is well known (e.g. Martin Garder in Scientific American).
The inner square shares an edge with the outer triangle.
The above paper shows that an inscribed square shares a common symmetry axis with P.
Every symmetry axis of P passes through a vertex and bisects an opposite edge of P (because n is odd).
If that axis is a diagonal of the square, the square cannot have 4 points of contact with P
(it would have to share a vertex with P).
So the common symmetry axis must bisect opposite edges of the square.
Then the square has two edges parallel to an edge of P.
So the answer to your question is yes.
BTW, note that the largest square contained in an n-gon is not always an inscribed square.
For n=5 and n=9, the largest square shares a vertex with the outer polygon, and there are only 3 points of contact with the outer polygon.
Addendum
If n is divisible by 4, it is evident that the maximal inscribed square shares all 4 vertices with the outer polygon P. By inspection, it is obvious that the square has edges in parallel with P if n = 4, 12, 20, ... and not if n = 8, 16, 24, ...
So the complete answer to your question is this:
A maximal inscribed square in a regular n-gon P has edges in parallel with P if and only if n is not divisible by 8.
Answer: No. Consider regular octagon. Then largest inscribed square will be this one:

It's not hard to prove this. Consider the circumcircle of octagon. Then, largest square inside octagon cannot be larger than largest square inscribed in circle. But in that case, they're the same, so this square is the largest inside octagon.
Comment: This paper: http://www.math.sc.edu/~dilworth/preprints_files/DilworthManeJOGpublished.pdf  has some suggestive diagrams and perhaps useful ideas.
Comment: Quite right, thanks. +1. I'll edit my question to restrict to a polygon with number of sides not divisible by $4$.
Comment: @JosephMalkevitch, thanks. I've seen it. (In fact, that's how I found Emch, whom I linked to in the question.) But I think the best that does for me is showing that there is a square inscribed in $P$ wish a side parallel to a side of $P$, without showing it's maximal.
Comment: `s/wish/with/`. Apparently, I don't have enough rep here to edit my comments.
Comment: @msh210, No rep is required (?) for editing comments...just  you can't after 5min.
Comment: @Swapan: Interesting. I can on [judaism.se]. Maybe because I'm a ♦ mod?
Comment: It seems, that answer for other regular n-gons is is Yes, though I don't know how to prove it right now. For non-regular polygons answer is obviously No.


Is there ultra HD support in Linux?

Question: I wonder what the current state of this is? Any distro that supports very high ppi as of today? I have read that mageia offers support, but I wonder if that is truly the case? i find it strange specially because the most relevant DEs apparently don't work well yet?
Comment: This has nothing to do with the distro, if mageia can do it, then so can everyone else.
Answer: As Linux uses X11 to do graphical rendering, this question is really about whether X11 supports it.
The answer is yes, X11 supports arbitrary sizes. One example with 4K HD is here.
Comment: Thanks!  I don't understand, though... How is it possible that such massive resolution apparently does not imply more pixels and a higher pixel density? I can clearly see pixels in that image...
Comment: Resolution in the computer world correlates directly to pixel count. PPI/DPI/pixel density exists only in the real world.

Consider 1080p TVs for example... a 19" 1080p TV has a much higher pixel density than a 60" 1080p TV, but the resolution (and signal on the wire) is still identical.
Comment: Exactly, that's why, given the fact computer monitors are not that big, pixel density should be amazing in that picture... Probably around 300 ppi for a twenty inches monitor. So yeah, confused that it's not like that at all in that screen.
Comment: The image is 3840x2160 - if you "see pixels" you're looking at your own display. The pixel density is only dependent on the physical hardware (on my 27" 2560x1440 screen, I can't see them at a normal viewing distance).

Is there ultra HD support in Linux?


difference between propagation speed and bandwidth in digital communication

Question: I want to know difference between propagation speed and bandwidth in digital communication.I know bandwidth is no of bits in one second and propagation speed of signal is distance traveled by signal is one second.Is there any relation between them or they are totally different.Can anyone tell me exact definition to differentiate these twos.
Comment: Jumbo jet full of DVDs: high bandwidth, low propagation speed. Person doing Morse code: low bandwidth, high propagation speed.
Comment: What do you want to say?
Answer: They are unrelated.
The bandwidth is, as you correctly said, the number of bits per second. The propagation speed is the time until the first bit arrives (this is also called the latency).
Imagine you have an army of snails that can carry SD cards along a straight line. Their propagation speed is very slow, so it takes a long time until a snail arrives after you send it. However, you can send a snail every second, so that after the initial delay your snails deliver one SD card of data every second. That's high bandwidth.
Comment: But if we increase propagation speed will bandwidth also increase?
Comment: No, the number of snails per second stays the same, only the time between setting a snail on the trail and it reaching the destination decreases.


Is there a sub-StackExchange for Widget questions?

Question: Widgets are the new sub-Apps within the Flexmapping system by ESRI. I have questions about Widgets that I'm fairly certain would be a familiar topic for most GIS members here at StackExchange/Geographic Information Systems. Can I just ask these questions in the main forum or is there a specific location to ask them?
Answer: According to our help, such questions are on topic at GIS.
Answer: If you are unsure whether anything is on-topic for GIS Stack Exchange that you wish to ask about, then often the best way to find out is by posting an exploratory Question or two on the topic.
You will soon see whether the community chooses to close them as off-topic, and if they do, and it seems to you unfairly so, then bringing your "case" here to Meta is a way to try and influence community opinions in the other direction.
In the case of widgets in the ArcGIS API for Flex, I suspect being on-topic would attract few dissenting opinions.


facebook API: any public way to get the count of followers for a specific page within a global page hierarchy?

Question: In the facebook API, for a page, fan_count gives the number of users who like the Page. For Global Pages this is the count for all Pages across the brand. ( https://developers.facebook.com/docs/graph-api/reference/page/) To get the specific count of fans of a particular global page (not the sum across the brand), we have used /{page-id}/insights/page_fans_country to get the count of followers of the specific page, via this public insights metric.
I see that "starting on February 5th, 2018, a Page access token with the read_insights permission will be required for Page-owned Post insights" (https://developers.facebook.com/docs/graph-api/reference/v2.10/insights) -- including the two metrics that have long been public, page_fans_country and page_storytellers_by_country.
Moving forward, is there any other public way to get the count of followers for a specific page within a global page hierarchy, i.e. without having a read_insights token for the page?
I see the country_page_likes field for pages, but it doesn't seem to be publically available either (requires a token with, i believe, admin access).
Thanks!
Answer: This is not publicly available, unfortunately!


Ground state(s) of electron and dependence from temperature and gravitational potential

Question: Reading this question What happens to an electron in a molecule once it has absorbed a photon and transitioned? it occurs the question to me is the ground state say of a hydrogen electron the only one? Why I ask? Because under normal conditions by 24°C the electron is exposed by thermal radiation, means it is influenced by EM radiation all the time. So does the ground state depends from the surrounding temperature and to be exact THE ground state has to be mentioned always with the temperature for which is it meant? The same holds for the gravitational potential?
Comment: Isn't the ground state always at zero temperature?
Comment: @jinawee Perhaps yes but this was not clear to me in the last consequence:-)
Answer: When we talk about the ground state of hydrogen we generally mean the lowest energy eigenfunction of the time independent Schrodinger equation. Strictly speaking no hydrogen atom is ever in that state because time independence means it would have had to be in that state for an infinite time and continue in that state for an infinite time into the future. However under most circumstances this is an unnecessarily pedantic viewpoint.
A real hydrogen atom is bathed in a sea of EM radiation - even if floating in space it interacts with the cosmic microwave background. This will indeed perturb the ground state and we can calculate the effects using perturbation theory. However this doesn't have any significant effect unless the energy of the radiation is large enough to stimulate a transition. On average the ground state remains so close to the theoretical ground state as to be indistinguishable.
One example of where environmental effects are important is in very strong magnetic fields where the ground state can be significantly altered. We can shift the energies of the eigenfunctions in the lab by applying magnetic fields, and we expect that there are natural examples like neutron stars where the magnetic filds are large enough to have a big effect on the atomic states.
It isn't obvious what you mean by gravitational interactions. A hydrogen atom would only be affected by tidal forces, and on the atomic scale these are negligably small unless the poor atom happens to be right next to a black hole singularity.
Comment: @HolgerFiedler: An external gravitational potential does not change the size of the atom. It does not mean, to use your words, that *the electron will be closer to the nucleus and far away from huge masses the atoms radius will be bigger*.
Comment: John, about gravitational potential it is clear that in a higher one the electron will be closer to the nucleus and far away from huge masses the atoms radius will be bigger. But have I to ask in a different question how looks the ground state nearby zero temperature and what is the behaviour of the electric field of the electron and what is the behaviour of its magnetic dipole moment?
Comment: I will ask about gravitational potential influence in a different question. It was not well thought of mine to mesh this with the maun question :-)
Comment: Terminology nitpick: Equations don't have eigenfunctions, *operators* do. The time-independent Schrödinger equation is precisely the equation *for eigenfunctions of the Hamiltonian*.


Connecting Huawei Comet via USB -- shows as CDFS?

Question: I'm trying to install a custom ringtone to my Huawei Comet, and when I connect it to my computer via USB it shows me a drive named "Mobile Partner" that is CDFS and has 0 MB free of 6.59 MB (not the 2GB MicroSD card I have installed). Do i have to use a separate SD card adaptor to plug it into my computer? Or how do I get my phone to show me the SD card?
Comment: You probably have it in Media mode or something, onik's answer should help in that case.
Comment: @MatthewRead I'd say it's in "tethering mode", since Huawei's 3G USB Modems use a software called Mobile Partner to manage the connection.
Answer: T-Mobile Comet Manual, p.14:
Using the microSD Card as USB Mass Storage
To transfer all your favorite music and pictures from your PC to your mobile phone's microSD card, set the microSD card as USB mass storage.

Connect your mobile phone to your PC with the USB cable. Your PC will detect the microSD card as a removable disk.
Open the notification bar, and then touch USB connected.
Touch Turn on USB storage in the dialog box that opens to confirm that you want to transfer files. You can now transfer files from your PC to your mobile phone's microSD card.


Chopped onion storage

Question: I want to know how I can store chopped onions for 2 weeks?  I have a cook-out coming up and I need to get ahead of things.
Answer: How much onion?  It doesn't take much time to chop onion.  The only way to store chopped onion for 2 weeks is to freeze.  However, once thawed, the texture will not be good.  The best answer partly depends on what you are going to use them for.  I would say a day in  advance is the most you will probably want to do.  If they are going to be a raw condiment or part of a salad, you will want them freshly chopped.
Answer: Oh my... no.
I routinely chop onions, wrap tightly in plastic wrap, not to smush anything, but to remove as much air as possible before sealing, then put them in a sandwich bag, the kind with the line across seal, not a loser zipper, again removing as much are as possible before final seal.
They last easily two weeks, no sign of anything until at least three and that's just puckering in the surfaces. Even that holds off if I open them once or twice and redo the plastic wrap and sealed bag.
If the onions are bigger pieces:  "large dice" (typical cook-out style) or cut rings making lengths one might plan to caramelize for soup or steaks, I wager getting almost all the obvious air out could be tough though, so might be difficult to stretch two weeks with no sign of anything at all. But perhaps opening and resealing a few extra times would solve that.
I will say though, the air removal seems critical to me, and the use of a non-zipper locking bag, also airless. The opening, I believe, and re-removing air actually removes not air that seeped in somehow, but outgassing from the onions themselves. Almost as important to remove, but likelier to cause the kind of cosmetic damage I mentioned, not provide both bacteria and the air for them to breathe.

Chopped onion storage


Runny nose while biking

Question: Now that the weather's cold, my nose gets plugged up after about a mile and inevitably some runs down my throat and I have to pull over and spit. I feel like stopping all the time is probably confusing to the cars behind me and seek a better solution. What's the best (safest?) way to deal with this?
Comment: Anyhow, it's funny or at least interesting in how there so many well considered answers on spitting.
Comment: Someone down-voted earlier which I also don't understand...It's gross but I don't see any difference between this and a question like "how to minimize sweating on commute"
Comment: my problem is mostly running nose, but not to the point of having mucus. i can't even 'snot rocket' it. i blame it mostly on LA's air quality than cold weather.
Comment: What a great question :-) I have this problem all the time but never thought to ask it here
Comment: Why the close vote? It be icky, but the question is clear.
Comment: (since you mentioned your throat) It may feel disgusting, but ingesting mucus is perfectly ok - you actually swallow most of it unconsciously all the time.
Answer: Well, this probably sounds gross and I'm kind of reluctant to say it, but I'm able to blow the snot out of my nose without hitting myself or my bike.  I try to only do it when there's no one around, but occasionally that isn't possible.  Basically, I turn my head so my nostrils are towards the ground and exhale forcibly through my nose.  I'm not sure it will work for everyone--perhaps I have remarkably straight nasal passages?
Comment: Some nasty old lady verbally abused me for doing this once. She was across 4 lanes of road, there was no-one within 10m of me, I blew my nose on the footpath, she said I was 'disgusting' and people had to walk there. She was walking a dog. I wonder where that pisses? That is typical of Sydney though, radio listeners, newspaper readers, TV watchers are all trained to hate cyclists. Upvote though, because no cranky old tabloid reading, shock-jock listener is gonna stop me blowing my nose. For my own safety, I might take your tip of doing it when no-one can see me though.
Comment: whoa, you can clear both nostrils at once? I always do the one nostril at a time technique.
Comment: Another approach is to put some sort of something (eg, an oversized wrist sweat band) on your wrist to blow/wipe with.  And, of course, many bike gloves have "nose wipers" on the backs of them.
Comment: I can clear both at once.  And I definitely use the "nose wipers" on my gloves to make sure I don't have snot wandering down my face.  That's more of a paranoid move though.  It's not usually too bad.
Comment: Informally, this is called blowing a snot rocket or snot bomb in the US. To my knowledge, most people cover one nostril and blow the other one, then repeat on the other side. If in a pace line, you should do this when you get to the rear, or pull out of line and move to the rear. Otherwise, I believe this is a generally accepted practice among endurance athletes,
Comment: @DanielRHicks: True, but personally I find "blowing out" is more effective at clearing the passage.
Answer: There's no great way.  The main problem is that inhaled cold air causes an automatic reaction in the nasal passages to create more mucous.  And to a degree simply having cold air blowing against the face around the sinuses creates the problem.  Some people will experience this worse than others.
You can try using some sort of scarf or maybe a surgical mask over your nose to sort of warm the air going in.  The problem with this, of course, is that if your nose is running you can't wipe it without removing the scarf/mask.
Or you can use various drugs (OTC decongestants and nasal sprays) to try to control it.
Comment: In general, I'm a notorious proponent of the snot-rocket technique. I find that when I wear a scarf or neck gaiter over my nose that this tends to increase my nose running.
Comment: Re: decongestants, nasal sprays, I'd avoid prolonged use. I find that a saline solution applied with a neti-pot is all that's necessary to shrink my sinuses in about 20 minutes.
Comment: Plus anything over your face will tend to collect condensation from your breath.
Comment: Yes, please pull out of the paceline.  I had a guy do this at a bike tour earlier this year.  He missed me, but really disgusting to have that come anywhere near you.
Comment: +1 for the snot rocket. 1) Press on the left side of your nose with your finger; 2) Blow. This actually clears both sides for me 95% of the time. Just pull out of the paceline before you do this. :)
Comment: Hey, it has a name!
Comment: @StephenTouset In Australia this is sometimes known as the [Bushman's Blow](http://www.urbandictionary.com/define.php?term=Bushmans%20Blow)
Comment: Agree, definitely don't do it if you like the person directly behind you. If you don't like them...well, we do still have to worry about Covid around here, so I'm being extra careful and wearing a bandanna around my neck to wipe my face with.
Answer: Yeesh! Why stop? Spit down and to the side. Keep going.
Main thing is to avoid spitting on the cyclist(s) behind you.
I really don't know why this is a problem. Common sense usually works well.
2 Common Sense Rules

Don't spit or blow snot on the folks behind you. (Such as a pace line or other commuters)
Avoid spitting or blowing snot on public places such as sidewalks or bike paths, etc.

On to peeing, I guess...Out in the country, find a tree and go behind it...in the city, find a bathroom at Starbucks or whatnot..
Comment: Yeah, certainly I spit while riding -- whenever a bug flies into my mouth, which seems to be amazingly often.
Comment: What I hate is when you go to spit and realise you're being drafted by someone. *Then* what do you do?
Comment: The question on here about drafting came to the conclusion not to do it unless you make your presence known.  Sounds like a problem for the guy behind.
Answer: In cold weather, having a runny nose can make you want to stop and spit, but the runny nose itself is an issue too. If you're like me, having mucus constantly overflowing your nostrils, dripping down your face is extremely uncomfortable. One can stop and blow one's nose and wipe the face every couple minutes to alleviate it, but that's time-consuming and is problematic in traffic and on hills.
A solution I discovered is to use a short folded scarf which wraps around the head, a strip snug against the face that covers from the upper lip to the middle of the nose. This way, even if one's nose gets stuffed up, the nostrils aren't directly exposed to the cold wind, and drips will be absorbed by the scarf for the duration of the ride instead of going down the face. By covering only the nose and not the mouth, you'll be able to spit as needed too.
It's gross, looks odd, and you'll have to wash the scarf each time, but you'll be able to bike without stopping, and without the persistent uncomfortable feeling of running snot on your face. This one technique improved my quality of winter cycling dramatically.
Answer: Keep your mouth closed when you breathe. Holding the tongue against the roof of the mouth can make it easier to keep those passages warm and humid while you breathe through your nose.
Answer: Fisherman's friend or some other strong pepermint candy is a common remedy against such annoyances. I like Fisherman's cause it lasts quite long in the mouth - takes me 10 minutes to "eat" it.
Comment: "mint cake" is another option, with similar effect.
Answer: A lot of gloves designed for running or biking have a little bit of fabric on the index and thumb specifically for wiping snot off. You may want to consider using one of these, such as this one.
Comment: I think these wipers are for sweaty forehead, but still.
Comment: The fabric is fleece-y, so it should be nose more so than forehead - the location + material choice + way you wipe your forehead normally doesn't really help for forehead. Under Armour explicitly states their running gloves have them as nose wipes (http://www.underarmour.com/shop/us/en/coldgear-liner-gloves/pid1234587). This is reasonably common to ski gloves as well (and at least one company, Snot Spot, makes after market glove wipers: https://www.youtube.com/watch?v=-75ColsoVoM).
Answer: I have the same problem, which I solve by blowing to the side, and then wiping my nose on my shirt sleeve. When my wife found out what I was doing, she crafted a velcro "snot rag" that wraps around my forearm. Works well and easier to launder.
Answer:
Blow it away out of your nose while riding, to the side;
Carry a cloth (handkerchief) to wipe your nose thereafter, so that it doesn't continue to be uncomfortable;
If you come to a full stop, clean as much as you can with the two previous manoeuvers, so as to increase mucus-free time.
Answer: I guess I'm on my own not wanting to see people, whether pedestrians or cyclists, flobbing out phlegm. Take one of @Idigas' Fisherman's friends and use old school cotton hankies. Even one-handed should be fine in many places (possibly not whilst running a red).
(Also not good is the sound of phlegm snorting.)

Runny nose while biking


Is nothing a theoretical possibility unless it actually happens?

Question: If determinism is true, would that mean that in a scientific theory, everything that is a theoretical possibility actually happens? I apologize if this question is similar to previous questions of mine.
Comment: The answer to this question has nothing to do with whether determinism is true. It depends on one's position on modality, see [actualism vs possibilism](https://en.wikipedia.org/wiki/Actualism).
Comment: No. you could imagine a universe with a single non-moving particle. That's deterministic but not every possible thing happens in that universe. In any deterministic universe, there is a specific list of things that happen. An accurate scientific theory may predict other things *could* happen, but the conditions in the deterministic universe are never valid for that to *actually* happen.
Answer: If determinism is true it does not follow that everything that is logically possible happens. Determinism at least on one reading rules out any events other than those that actually (deterministically) occur. This does not exhaust the realm of logical possibility. It is logically possible that Donald Trump is a robot; the possibility is coherently conceivable = logically possible. This is so even though he is not actually a robot and if determinism is true, cannot be or have been anything other than he is, namely a human being.
Posssible worlds introduce another angle. In the actual world, or this actual world, if determinism is true then given the laws of nature and initial conditions, if X doesn't happen then X could not have happened and in this sense is not or was not a theoretical possibility. A modal realist about possible worlds can hold that there are other worlds, real and therefore possible, in which the laws of nature or initial conditions are different and an event, deterministically and theoretically impossible in our actual world, is possible and actually happens.
Answer: I think if determinism is true it means that everything is fact, the past, present and the future. We normally only associate fact with our observed history through memory of it. But Determinism means that we experience the eternal fact by the passage time we are subject to. If we were able to remember the future though our journey would be unnecessary as when we are brought into this world the passage of time would be unnecessary since our life of experience would be known if indeed things are determined and that fact is allready a determining factor. So I think what we experience is a function of memory and fact, and time simply allows us to experience the fact of our lives. Well that's my two pennies worth and humble opinion
Comment: @Geoffrey Thomas it is certain in a deterministic world that someone will have a theory about how the method in which it is determined. And it is certain that this theory will be never correctly proved by testing it because it would result in a method of determining the future and gaining knowledge of events by it before those events happened. Surely that knowledge would result in contradicting the world's deterministic nature by being able to falsify the deterministic nature by the use of it and ultimately disprove the method you have come across . Its a logical tye up.
Answer: "Is nothing a theoretical possibility unless it actually happens?"
Is this a question about what "theory" means? The philosophic meaning of theory is, very roughly speaking: orientation, something to meditate over concerning what the world is. From Plato up to the modern age. When the sciences took over the word theory, it began to mean something that can be applied. So, if one has, say, some reliable data about probabilities, say, actuarial tables, one can then apply them. There they give reliable predictions. The phrase "theoretical possibility" has to connect to a Sample Space where data points can occur during experimentation. So, if you want to say that Determinism means everything will happen, you must add to the conception of determinism an infinite time, or, whatever the conditions for everything to happen must be. That will be your Sample Space. In which all events are understood through the conception.


Need suggestions for covering up rough cut on tile above niche

Question: DIY. Tiled everything except for the top underside of the niche. The tile on the wall above the niche has a rough cut so I was  thinking to cover up with some tiling trim. I was thinking to either mortar a Shluter Reno T trim between this area or silicone an angled corner trim. The tile on the wall above the trim hangs over the inch by about 1/4 of an inch. I bought a Shluter bullnose edge trim but unfortunately it does not work for this situation. Was seeing if anyone has any suggestions on how to cover this up. Thanks!

Comment: Why not just finish the underside of that niche with a piece of normal wall tile?  That's what I did with a similar niche.
Comment: I don't see this as a decorating question but one of "how to do this right".
Comment: If I'm not mistaken, the problem is that the bottom edge of the tile on the face above the niche is rough-cut, and the OP is looking for advice on how to make it look better.  Personally, I'd consider using a piece similar to what was used on the *bottom* of the niche and let it be a couple mm proud of the tile face.  Then use some silicone caulk (match grout color) to hide the rough edge of the tile.
Answer: Maybe its an optical illusion.  But to me, it looks like the underneath is not tiled.  You should tile it, which may explain why the tile is jutting down.
If you dont tile and grout it, then water is going to get behind the tiles!!!


Do you need permission from the gov't of a town to conduct a questionnaire survey there?

Question: I'm conducting a study in which people from a particular town will fill out an opinion questionnaire (Likert scale stuff, questions about road signs). I was going to do this in front of a grocery store, but the owner refused me when I asked for permission to do so. This is a small town, so there are only so many other businesses I could ask, and if they all say no, I'd be left with trying to conduct the survey on sidewalks. So, if I did need to simply stand on sidewalks to find respondents, would I need to get permission from the town? For further context, this is in the US.
Comment: Ask at city/town hall.
Comment: Whether the city/town approves or not, the owner of the business has a right to control what's going on inside the property lines of the business venue.  You ***could*** park yourself just outside the parking lot on street right-of-way and the business would have no right to shoo you away.  And I don't think the city could either because of 1st Amendment rights regarding speech and freedom of association.
Comment: It is the usual practice of major survey organizations to inform the local police and sheriff that they are conducting interviews. It is not usual to seek permission of civil authorities. An exception would be Indian reservations. Access is often restricted by the tribal government.
Answer: Towns and other municipalities can have their own regulations that could infringe on what you are doing. For example, because you are using paper, the local trash regulation might ask you to obtain permission. Similar with states and counties.
These restrictions might be unconstitutional, but that would have to be tested in court, a situation you should try to avoid.
You might ask the local police first, since they know what laws and regulations they are supposed to enforce. Also, they might have some feed-back on where to best conduct your research. After them, the local municipal authorities should know, but since they are split in departments according to their functions, you might still violate a rule the person you are asking is not aware of. Or your question will be put to the city lawyer who is not likely to answer you within five minutes.


Client added an image to WordPress header and not aligning properly

Question: my client has added an image to their WordPress header. I am having difficulty (I'm still learning CSS) getting the image to align where we want it.
This is the site here
You can see the Options House graphic on the right. I want it to be to the right of the word "stocks" in the tagline. Help?
====Edits based upon suggestions below====
@Beardminator made a suggested answer, but this is what the site header looked like after including that code:
Answer: Relatively position that options_house div like so:
<code>#options_house {
    float: right;
    position: relative;
    top: 40px;
    left: 52px;
}
</code>
And take off the overflow hidden from the header class.
Answer: Here is the 2 div which you should replace with this code:
<code>.slogan {
    color: #EBEBEB;
    font-size: 17px;
    left: 200px;
    line-height: 25px;
    position: absolute;
    text-shadow: 0 2px 4px #0F243E;
    top: 59px;
}

.logo_mmj, .logo_mmj:visited, .logo_mmj:hover, .logo_mmj:visited:hover {
    background: url("../images/logo_marijuana.png") no-repeat scroll 0 0 transparent;
    display: block;
    float: right;
    height: 95px;

    position: absolute;
    right: 0;
    text-decoration: none;
    top: 23px;
    width: 392px;
}
</code>
You need to put the logo to the right, so the <code>.logo_mmj</code> should contain
<code>  right:0px;
</code>
Or if you use position:relative;
You can use like this:
<code>.logo_mmj
{
 position:relative;
 float:right;
}
</code>
update:
The site you linked have very different logo that's why It only made it worse. You only need to adjust
.slogan  left property. And add
to .logo_mmj div top:30px or much more.
Comment: Hi, thanks, but that makes the problem worse. I have edited my post and added a screenshot of what happens when I add the above code.
Comment: i updated my answer. the site you linked have much different logo then what i see.


Heat Transfer during Phase Change

Question: When ice is melting, we know that the temperature stays constant at 0 ℃. If we were to place ice at 0 ℃ in a sufficient amount of water at ambient temperature, would the temperature of the water itself also stay constant during the time the ice is melting, or is it only the temperature of the ice that stays constant? Does the actual cooling of the water occur after or during phase change?
Comment: See, there is a substantial amount of heat transferred from water to ice. In effect, you are asking whether water can give off heat, while staying unchanged at constant temperature. I wish it would; then we would not need heaters in the winter.
Comment: If temperature of water stayed constant, where in the world the heat would be coming from?
Comment: But constant temperature does not imply that there is no temperature difference (between the ice and water). There is still a temperature difference, but my question is whether this difference remains constant or not.
Answer: No, as the ice is melting, the water is cooling down. Ice melts in water because the water molecules in solution collide with those in the ice, giving them energy. In exchange, the water molecules in solution slow down a little during the collision. While the Ice does not change temperature as it is melting, the energy from the water is going into breaking the crystal structure of the ice, turning it into water. This process consumes energy, and the energy to fuel this process comes from the water in solution. Another factor to consider is conservation of energy - if energy is being put into breaking the ice, where else could that energy come from but from the water?

Heat Transfer during Phase Change


How do you make page numbers in Google Docs?

Question: I really need to know how to make the page numbers in Google Docs look like a real book. I know how to do the page numbers, but how do you do them half on the right side and half on the left (like an actual book has them so that the pages on the don't have a page number in the crease of the book)?
Comment: I'm voting to close this question as off-topic because it is about software use, not writing.
Comment: While it could be argued that this is on-topic here, I think it would get better answers and be better maintained on Superuser.
Comment: I know this is an old question, but it is on topic now and I would like to see it reopened (+1 reopen vote from me).
Answer: I've attempted to address this problem before, and I double-checked both Google help files and Google Add-Ons in hope of finding a solution for you (and me), but I've had no luck.
Google Docs does not distinguish between odd and even pages that, in a book, would become the recto and verso pages. Without recto and verso, one cannot place a gutter margin on the page (as usually required by printers) or position the page number on the upper outside corner.
I hoped that some add-on might retrofit the odd/even distinction onto a document, but I found nothing that would help.
I wonder if you might find some sort of PDF file editor that would do this for you: you'd download your Google Doc as a PDF then feed it to the converter which would add a gutter margin and the page numbers in the appropriate places. It isn't uncommon to see physical books represented electronically as PDF files before they go to press, so this seems to be the next best place to look.
I'm sorry I don't have better news for you.
Comment: Considering specific needs like the odd/even distinction for numbering pages, you seem to have a serious use of your tools.
Wouldn't be a serious program, like LaTeX be a better approach then ?
(I came here because Google doc doesn't even seem capable of numbering the pages with their total number, i.e. "1/2" & "2/2", rather than simple "1" & "2".  Simple of use... but so limited !)


How do I jailbreak my iPhone 4?

Question: I'm looking to go rogue. Where do I jailbreak my iPhone 4.
Comment: I'm going to close this for re-work or perhaps re-asking with more specific details so someone can determine if a jailbreak will work for their iPhone 4 on iOS 4 or iOS 5. This question has served it's purpose near the time of iOS 4.0 release, but has grown stale and misleading as currently stated.
Answer: Open up Safari on your iPhone 4 and go to jailbreakme.com.
Sit tight for couple minutes and your iPhone is jailbroken. You'll see that Cydia app is installed.
It uses PDF security flaw on mobile Safari. It will be patched soon, so jailbreak now while it's available. It's by far the easiest way to jailbreak your iPhone.
It jailbreaks iOS 4.0.1 which is the latest at the moment.
Edit (8/11/2010): Apple has just releases iOS 4.0.2 to fix the PDF exploit that jailbreakme.com uses. Jailbreakme.com should still work for iOS 4.0.1 and below.
Edit (8/13/2010): PDF Patch is available for download in Cydia. Search for "PDF Patch." You can jailbreak 4.0.1 and then just patch PDF bug instead of upgrading to 4.0.2 and wait for jailbreak to be available.
Answer: EDIT: Disregard this, it's no longer true. There are jailbreaks - http://jailbreak.me works before 4.0.2, and (apparently) redsn0w works with 4.0.2 on 2G and 3G.
AFAIK, there is no released jailbreak for the iphone4 just yet. The iPhone Dev Team is working on it though; they have a jailbreak but haven't released it yet.
I'm sure they will release it when they think it's ready.
Comment: The conventional wisdom is that it'll be released once iOS 4.1 is released (since it's been seeded to developers). No sense releasing it and giving Apple a chance to plug any holes any faster than necessary.
Comment: This answer should be deleted/ignored, as it is no longer true.
Answer: You can always check out http://jailbrea.kr

How do I jailbreak my iPhone 4?


Is Pokemon Sun and Moon vip and guest list tied to the cartridge?

Question: If I put my Pokemon Moon game into a different 3DS than the one I started filling the VIP and guest list on, will my game's VIP and guest list be the same on the new 3DS, or will they be lost? (Like how in Pokemon X and Y changing the 3DS would forget all friends.)
Comment: If there are any questions don't be afraid to ask, this isn't urgent but would hope for a quick answer.
Answer: Yes, you should keep them.
All 3DS physical games are saved to the cartridges they are played on. Only digital version games are saved to the system memory.
Some games do save SpotPass and StreetPass information to the system memory, so you may lose only those random users in your Festival Plaza.
Source, Nintendo support.


Clear anand-carlsen-2014 up

Question: I think that the final form should be carlsen-vs-anand-2014, for three reasons.

Carlsen is the champion, he should stay first
Carlsen-Anand-2014 isn't really clear
Anand-vs-Carlsen-2014-wc is really long
Answer: I think (2) is fine, and would be clear to anyone who is familiar with the WC cycle or the fact that those two players at some point played for the title.
I agree that (3) is too long, but that doesn't really bother me because it's not as though you often have to type the whole thing in. Another option would be to go for something along the lines of 'World Championship 2014', which then provides the format for any future matches as well.
EDIT: Actually, on reflection any format that is used can be reused for future cycles, and I suggest that whatever is chosen that we do so.
Answer: I've just changed the tag to carlsen-anand-2014. The vs is unnecessary, as it is common in chess shorthand to refer to a game or a match as "White-Black" (insert player's names).

Clear anand-carlsen-2014 up


Magento 1.9 - How to get final product price on add to cart?

Question: Final Update
Apparently I just needed the pressure of posting the questions on here. On the off chance anyone else comes along with this same problem, this seems to work and covers the case of catalog price rules being used. Specifically for the official Facebook Ads Magento plugin for Magento 1.9, you have to add this code to the app/code/community/Facebook/AdsExtension/Block/AddToCart.php file
public function getValue() {
    $latestItem = Mage::getSingleton('checkout/session')
   ->getQuote()
   ->getItemsCollection()
   ->getLastItem()
   ->getProduct();
    return $latestItem->getFinalPrice();
  }

Original Question
I know it's EOL, but I'm stuck running Magento 1.9 for a few more months. I'm trying to fix Facebook's official Pixel module because it's missing the product value on the add to cart event. The method to return a value is missing completely. I'm struggling to figure out how to get the price of the individual product when it gets added to the cart though since it seems to fire after leaving the product page.
public function getValue() {
    $collection = Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection();
    $collection->getSelect()->order('created_at DESC');
    $latestItem = $collection->getLastItem();
    $product = $latestItem->getProduct();
    return $product->getPrice();
  }

This is what I came up with. I'm pulling the last item added to the cart and taking the price from that, but it returns the full product price ignoring any catalog price rules that are being applied. I also feel like I'm overcomplicating the process to get the value too with all of these calls and pulling in the entire set of quote items to then sort it and extract one single product from it.
Anyone have suggestions on the best way to get the price of the item that was just added to the cart? There seem to be plenty of questions on how to update the price for an item during the add to cart process, but I haven't had luck finding finding someone asking this same questions with an answer that works. TIA
Update: I found this, which seems to be a cleaner way to return the product, but the price is still full retail and doesn't reflect any catalog price rules that may discount the price. Credit: Magento get last product added to cart
  public function getValue() {
    $latestItem = Mage::getSingleton('checkout/session')
   ->getQuote()
   ->getItemsCollection()
   ->getLastItem()
   ->getProduct();
    return $latestItem->getPrice();
  }

Answer: Answered and added this into the original question, but this seems to work
public function getValue() {
    $latestItem = Mage::getSingleton('checkout/session')
   ->getQuote()
   ->getItemsCollection()
   ->getLastItem()
   ->getProduct();
    return $latestItem->getFinalPrice();
  }


issue while zooming content of UIScrollView

Question: i am developing an application in which i am placing a set of images on a scrollView.i could place the images and given the contentSize as required to fit all the number of images.each imageView is of size 768,1024.i set the property  of pagingEnabled to YES on the scrollview,to move to next image as the user swipes. i am loading each image into the imageview on scrolling the scrollView. i.e - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
issue:
the issue i face is when i zoom a UIImageView the imageView is getting zoomed but the zoomed imageView is being overlapped by its next imageView with its size assigned i.e 768,1024. i included the delegate methods as below.
<code>- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
return [scrollView viewWithTag:tempTag-1];
</code>
}
<code>- (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view{
scrollView.pagingEnabled=NO;
[scrollView viewWithTag:tempTag].frame=CGRectMake(scrollView.contentSize.width-768, [scrollView viewWithTag:tempTag].frame.origin.y, [scrollView viewWithTag:tempTag].frame.size.width, [scrollView viewWithTag:tempTag].frame.size.height);
}
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale{
if (scrollView.zoomScale<=1) {
    scrollView.pagingEnabled=YES;
}
}
</code>
i tried to change the frame of the next imageView to current ImageView depending on the content size but it didn't work.
can some one help me in this regard..
TNX in advance
Comment: Did you get anything on this?
Answer: You need to create a scrollView of sub-scrollviews to hold the imageViews. Then configure zoom on each sub-scrollviews.


Can sheetrock be put in for fire barrier over existing ductwork and plumbing in drive under garage?

Question: I am in the process of buying a house and the home inspection brought up some interesting issues.  The house is in the Atlanta area and was built in 1979 with a drive-under garage.  The garage ceiling looked strange in that it was insulated but sheet rock was never put over the ductwork or plumbing.  The inspector mentioned that the house doesn't have a proper fire barrier between the house and the garage.  It was a building code that wasn't present at the time that the house/garage were built. We wanted to finish the ceiling to have that barrier but mostly know that it would probably be an issue in trying to sell the house later.  We're trying to determine if the cost would be too high for this project since there are a lot of other small but expensive items that would need to be repaired.  I first was trying to figure out two things which are if it is even possible to do and if so a range for the project.  I took a couple of pictures during the inspection so you can get an idea of what the state of the garage is. The water shutoff is on the ceiling of the garage so we would at least need to have it redirected to be on the side wall so it is easier to reach.  The inspector seemed to think that the only thing we could do is add sprinklers which would be fine but we only plan on being in the house for 4-5 years so the re-sale ability is important.  I've attached the images and would love an opinion from those that may have tried to attempt similar projects or from those that have worked with sheetrock. It is something that I would definitely have a professional assist with if we do it but if the cost is too much we might just keep looking for a different house.
Thanks,
Cindy
Answer: It looks like about the only thing you can do is add a drop ceiling in this area. Code here would require the drywall to be 5/8ths between a garage area and a living area. Basically this means putting in a frame to support that drywall. It wouldn't have to be finished except on the joints, and if you have an area you need to leave access to, you can make that a removable panel (leaving access to the screws that hold that drywall panel up, or creating a hinged door for it.) On the bonus side, it would hide all the plumbing, AC, etc that is now exposed. On the down side, yes, it's expensive, about $400 per 4X8 foot area to do this properly, with the frame-in, unless you do it yourself...
Part of the consideration for this is also fumes and not just fire, otherwise you could probably install a drop acoustic panel ceiling, which is much easier, and slightly less cost.
Also, I'm surprised the inspection found that door to the stairway acceptable, it should be a 20-minute rated fire door, even if one is installed at the top of the stairway, with proper self-closing mechanism!
Answer: This would not impossible to sheetrock and probably your cheapest alternative. By the looks of it there is room between most of the vent work and framing. Since it is a garage you only need to fire tape it so you can cut the sheetrock up anyway you see fit and then fire tape around all of the duct penetrations. Two sheetrockers could knock it out in a day.


Page cannot be reached in Google Rich snippet test

Question: When i test my webpage in google rich test, it say page cannot be reached. My website is on shopify so i guess there should be no issue from server side.
I need your help please... I cannot figure out why this cannot be reached.Page cannot be reached in Google Rich snippet test.
Comment: Welcome to Webmasters! These things happen from time to time, even to Google. If your site can be reached by users, just try again later. Sometimes these types of errors can be seen for a few days. There are probably a thousand (slight exaggeration) reasons why this happens. It could be one or more of many. If your site is working okay, do not panic, be patient, it will all work out in the end. Cheers!!
Answer: I've got the same trouble with bot user agents of the test tool. The site at its own is successfully loaded.
To debug it i would do the following:
Afaik robots.txt is case-sensitive. I don't exactly know, whether case-sensitivy should be maintained on naming of user agents. In case of yes, your robots.txt contains an error: Google defines user agent of adsbot as AdsBot-Google - you write it as adsbot-google. I would change it at first to become d'accord with Google.


What is the best way to convert or copy an VM image into an lvm?

Question: I have a couple of VMs running on images instead of lvms. I am not concerned about downtime but just about convenience of the process.
Comment: Do you want to keep snapshots or such?  Because otherwise you can use the same tools you would use to copy any other image or its contents (= backup & restore)...
Answer: There is a short discussion at serverfault, hope it helps :-)


Maximum likelihood not working in QGIS SCP?

Question: I was trying to use maximum likelihood in SCP QGIS, but a warning come out "Information [18]: Select at least one signature", and when I selected all signature, it still won't run.
Answer: After reading here and talk with the developer, finally, managed to resolve this.
It is because I was using drone imagery with a normal and IR camera as sensors. With this kind of camera, there is this alpha band which have all same value. When I remove alpha band from raster file, leaving RGB only, the problem is resolved.


How to escape extended pathname expansion patterns in quoted expressions?

Question: In addition to the basic *, ? and [...] patterns, the Bash shell provides extended pattern matching operators like !(pattern-list) ("match all except one of the given patterns"). The extglob shell option needs to be set to use them. An example:
~$ mkdir test ; cd test ; touch file1 file2 file3
~/test$ echo *
file1 file2 file3
~/test$ shopt -s extglob  # make sure extglob is set
~/test$ echo !(file2)
file1 file3

If I pass a shell expression to a program which executes it in a sub-shell, the operator causes an error. Here's a test which runs a sub-shell directly (here I'm executing from another directory to make sure expansion doesn't happen prematurely):
~/test$ cd ..
~$ bash -c "cd test ; echo *"
file1 file2 file3
~$ bash -c "cd test ; echo !(file2)"  # expected output: file1 file3
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `cd test ; echo !(file2)'

I've tried all kinds of escaping, but nothing I've come up with has worked correctly. I also suspected extglob is not set in a sub-shell, but that's not the case:
~$ bash -c "shopt -s extglob ; cd test ; echo !(file2)"
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `cd test ; echo !(file2)'

Any solution appreciated!
Answer: bash parses each line before executing it, so "shopt -s extglob" won't have taken effect when bash is validating the globbing pattern syntax.  The option can't be enabled on the same line.  That's why the "bash -O extglob -c 'xyz'" solution (from Randy Proctor) works and is required.
Answer:
$ bash -O extglob -c 'echo !(file2)'
file1 file3
Answer: Here's another way, if you want to avoid eval and you need to be able to turn extglob on and off within the subshell. Just put your pattern in a variable:
bash -c 'shopt -s extglob; cd test; patt="!(file2)"; echo $patt; shopt -u extglob; echo $patt'

gives this output:
file1 file3
!(file2)

demonstrating that extglob was set and unset. If the first echo had quotes around the $patt, it would just spit out the pattern like the second echo (which probably should have quotes).
Answer: Well, I don't have any real experince with extglob, but I can get it to work by wrapping the echo in an eval:
$ bash -c 'shopt -s extglob ; cd  test ; eval "echo !(file2)"'
file1 file3


Constant bot probing on my website

Question: Looking at my IIS logs from Godaddy, I can get hundreds of 404 errors a day, where either some script kiddies or bots are constantly looking for vulnerabilities or pages/directories to exploit. Besides a lot of directory search attempts and non existent php pages, I see an unusual number of probings for a file called ".env" in various directories. Does anyone know what this file is for that is being searched for?
Comment: Get used to it. Every single IPv4 address is constantly probed for every conceivable vulnerability. It's a waste of time to try finding out what they are after. It could be an old vulnerability of some appliance you never even heard about, or some old CMS that has long gone out of fashion. The script kiddies just don't care about the noise they generate. They will happily send out billions of probes on the off-chance that one of them will hit home. Your best bet is to turn that against them and block any source address producing too many 404s in quick succession.
Comment: You should consider enabling Request Filtering so that malicious requests don't even make it to the application. Depending on your application you could block particular file extensions from being requested, or excessive url lengths or whatever. There's probably a newer doc somewhere, but this is the one I found: https://docs.microsoft.com/en-us/iis/manage/configuring-security/configure-request-filtering-in-iis
Comment: I'll have to call GoDaddy. It doesn't seem to be available from their Plesk Administration. I'd like to filter out all PHP requests as well.
Answer: Usually a .env file is a plain text file used to store environment variables to configure certain software. It looks like this:
<code>APP_NAME="My app"
APP_ENV=production
</code>
It is useful to avoid mixing secrets (like passwords, tokens, etc) and source code.

Constant bot probing on my website


Is there something like an "f-regular" $K$-theory?

Question: Let $R$ be a ring and $f\in R$. Is there something like an $f$-regular $K$-theory group of $R$ based on the category of $f$-regular $R$-modules, i.e. modules that do not have any $f$-torsion? If needed, I could assume that $R$ is an integral domain.
Comment: An infinite projective resolution does not naturally "live in" K-theory. The comparison between K-theory of finitely generated modules and projective modules needs the assumption that $R$ is regular (which translates into existence of finite free resolutions).
Comment: For K-theory you consider projective modules, which are direct summands of free, hence don't have torsion if the ring is integral.
Comment: I think the $K$-theory of the entire category $R-Mod$ is also considered. By taking projective resolutions, it equals the $K$-theory coming from projective modules. For this latter, I think it is necessary to assume Noetherian.
Answer: If $f$ is a non-zero-divisor in $R$ and $R$ is noetherian, then any finitely generated $R$-module has a resolution of length 1 by finitely generated modules upon which $f$ acts as a non-zero-divisor.  One sees that by starting the resolution with a free module and then observing that a submodule of a free module has $f$ acting it as a non-zero-divisor.  Now Quillen's resolution theorem applies to show that that the K-theory of the category of finitely generated $R$-modules is the same as the K-theory of the category of finitely generated $R$-modules on which $f$ acts as a non-zero-divisor.


Do quantum algorithms and classical algorithms of the same complexity have the same time consumption?

Question: The classical computer field likes to use the complexity O(x) to represent the complexity of an algorithm. Is this concept applicable to quantum computers, if quantum algorithm A with the same complexity O is as fast as classical algorithm B? Or is there an additional discussion of the hardware elements?
Comment: Related https://quantumcomputing.stackexchange.com/questions/25676/how-do-we-know-a-quantum-function-call-is-worth-the-same-amount-of-time-as-a/25702#25702
Comment: It would be good to think carefully about what you mean by "time consumption". If you mean literally the clock time it takes to run two algorithms on the same input, they may not have the same time consumption even if they are two classical algorithms.
Answer: Yes, complexity notation has the same meaning in quantum computation as it does in classical computation.
In particular, comparing a classical and a quantum algorithm for the same problem that are both $O(n)$, for example, has exactly the same interpretation as comparing two classical algorithms for the same problem that both have running times $O(n)$. In that case, the actual running time on a particular instance of the problem can be very different for several reasons:

Just because two algorithms scales as $O(n)$, they can have very different running times, say $n$ or $10^{10}n$
Complexity theory only talks about asymptotic behaviour. For a specific instance, you may not be in the asymptotic regime and so you know very little about the specific run time of that case.
Complexity theory only talks about the worst-case scaling of a particular instance size. A specific instance may not be the worst case, and what is the worst case for one algorithm may not be the worst case for another.
If the two algorithms run on different hardware, then the hardware may have different "clock rates" (or some equivalent measure of speed) that makes the absolute run time different. This is pretty much the same effect as my first point about different scaling coefficients.
Note that there are also different computational methods for different hardware. These are usually deemed to be "equivalent" if there's a polynomial overhead in converting between them. That polynomial can also make a big difference to the running time.

All of that said, the only meaningful statement of being able to say two algorithms as "as fast" as each other is to look at the $O()$ scaling and see that they're the same. This is equally true for quantum versus classical comparisons.


Computing the limits of integration when doing a nontrivial coordinate transform

Question: In Aigner, Ziegler: Proofs_from_THE_BOOK they explain an elegant derivation of $\zeta(2)$ given by Beukers, Calabi and Kolk. One starts from the integral
$$
J = \int_0^1 \int_0^1 \frac{1}{1-x^2y^2}dxdy = \frac{3}{4}\zeta(2)
$$
To compute the integral they use the following non-trivial coordinate transform
$$
x = \frac{\sin u}{\cos v}, y = \frac{\sin v}{\cos u}
$$
The reason for this transform is that the Jacobi determinate of this transformation turns out to be
$$
|D| = 1-\frac{\sin^2u\sin^2v}{\cos^2u\cos^2v} = 1 - x^2y^2
$$
So after the transformation the integral becomes magically
$$
\int_{f_1(u,v)}^{f_2(u,v)} \int_{g_1(u,v)}^{g_2(u,v)} 1 dudv
$$
Now they argue that the limits of the integration are
$$
f_1(u,v) = g_1(u,v) = 0 \\
f_2(u,v) = \frac{\pi}{2}\\
g_2(u,v) = \frac{\pi}{2}-v
$$
so that the integral turns out to be
$$
J = \frac{\pi^2}{8}
$$
But I have problems understanding how one comes up with the limits of integration for such a coordinate transform (especially I wonder about the "$-v$"). Can someone give maybe a step-by-step solution for computing the limits of integration here? I would also be interested how the limits would look like, if I would want to compute $\zeta(4)$ from the corresponding quadruple integral.
Comment: Maybe related: https://math.stackexchange.com/questions/7807/a-limit-and-a-coordinate-trigonometric-transformation-of-the-interior-points-of
Answer: First note that the limits are not functions of two variables but in fact we have for every double integral
$$
J = \int_{v=f_1}^{v=f_2} \int_{u=g_1(v)}^{u=g_2(v)} 1 dudv
$$
So the outer limits are constants, and the limits of the inner integral are functions of $v$ only.
To compute the limits in a systematic way, I suggest the following "algorithm":

From the limits of the integral form the following system of inequalities
$$
\begin{align}
0 \leq x \leq 1 && 0 \leq y \leq 1
\end{align}
$$
Substitute the coordinate transform and solve for the inner integration variable $u$:
$$
\begin{align}
0 \leq \frac{\sin u}{\cos v} \leq 1 && 0 \leq \frac{\sin v}{\cos u} \leq 1  \\
0 \leq u \leq \arcsin(\cos v) && 0 \leq v \leq \arcsin(\cos u) \\
0 \leq u \leq \arcsin(\sin (\frac{\pi}{2}-v) && 0 \leq v \leq \arcsin(\sin (\frac{\pi}{2}-u) \\
0 \leq u \leq \frac{\pi}{2}-v && 0 \leq u \leq \frac{\pi}{2}-v
\end{align}
$$
From this you can read off $g_1(u,v)=0$ and $g_2(u,v)=\frac{\pi}{2}-v$.
Repeat step two, but this time solve for the outer integration variable $v$ and set $u=0$ at the end, because the outer limits $f_1$ and $f_2$ must be independent of $u$:
$$
\begin{align}
\ldots && \ldots \\
0 \leq v \leq \frac{\pi}{2}-u && 0 \leq v \leq \frac{\pi}{2}-u \\
0 \leq v \leq \frac{\pi}{2} && 0 \leq v \leq \frac{\pi}{2}
\end{align}
$$
From the last line you can read off the outer limits $f_1=0$ and $f_2=\frac{\pi}{2}$.

P.S.: I'm answering my own question here. So take this with a grain of salt.
Comment: If there a source that you can point to that explains how the limit are computed after a change of variables? I am looking for a procedure that can be applied "mechanically" in multiple dimensions (>>3)  without having to "draw" or "infer"etc.  Many thanks


Using TV as monitor for Macbook Pro while running Boot Camp

Question: I have a mid-2010 MacBook Pro (has Thunderbolt port) and I would like to use a TV as my monitor. I understand this is possible if you are running OS X but what about Windows?
Answer: Apple provides Windows drivers (via Boot Camp) for all aspects of the hardware it is running on, so yes you can.
You'll need a TV with an HDMI input, a Thunderbolt to HDMI adapter and an HDMI cable. After that the Mac, regardless of whether it is running Mac O/S or Windows will see the monitor as a display device and should be able to detect the optimum resolution, allowing you to use it as a monitor.
Note that some HDTVs don't have great definition and displaying the Mac or Windows desktop and apps might result in a blurry result. Only one way to know though, give it a try.


Poker, number of three of a kind, multiple formulaes

Question: I wanted to calculate some poker hands, for a three of a kind I infered, 1) every card rank can form a 'three of a kind' and there are 13 card ranks, 2) there are $\binom{4}{3}$ ways to choose three cards out of the four suits of every card rank, and 3) for the remaining card I can choose two out of 49 cards, i.e. $\binom{49}{2}$. Together the formulae is
$$
  13 \cdot \binom{4}{3} \cdot \binom{49}{2} = 61152
$$
But on Wikipedia I found a different formulae, namely
$$
  \binom{13}{1} \binom{4}{3} \binom{12}{2} \left( \binom{4}{1} \right)^2 = 54912
$$
which makes also totally sense to me (1. card rank, 2. subset of suits, 3. choose form the left card ranks, 4. assign suits). But I can't see why my first formulae is wrong, can anybody explain this to me?
Comment: For the remaining cards, you cannot choose the same face value as that of the cards comprising the three of the kind. Nor could you choose two cards of the same suit. So, you do not have 49 cards from which to choose...
Answer: In counting the number of hands with three of a kind we must not include those that have four of a kind or a full house.
As @Jean-Sébastien notes in the comments, your formula counts
$$\# (\textrm{three of a kind})
+ 4\# (\textrm{four of a kind})
+ \# (\textrm{full house})$$
or
$$54,912 + 4\times 624 + 3,744.$$
The factor of four arises since
$\rm AAA{\underline A} = AA{\underline A}A = A{\underline A}AA = {\underline A}AAA$.
Comment: Originally, I did $\binom{13}{1}\binom{4}{3}\binom{49}{2} - |four of a kind|- |full house|$. However, it is not entirely clear to me your reasoning as to how it counts the factor of $4$. Could you try something else for me?
Comment: @CodeKingPlusPlus: Notice that $\binom{13}{1}\binom{4}{3}\binom{49}{2}$ counts hands consisting of three of a kind and any two other cards. The shufflings of the three of a kind have been accounted for by the factor $\binom{4}{3}$, but if the fourth card creates four of a kind we must correct for the fact that A1 A2 A3 **A4** and A1 A2 A4 **A3** are treated as distinct hands.
Comment: Ok, I can see that now.
Comment: He counts the four of a kind $4$ times each, but I dont see why. So it suffices not to remove the $4$ of a kind and full houses.
Comment: @Jean-Sébastien: Thanks for the comment. I've added something above.
Comment: Guess I woke up too early +1
Comment: @CodeKingPlusPlus: Glad to help. Cheers!
Answer: We can count more or less like you did, using $\dbinom{13}{1}\dbinom{4}{3}\dbinom{48}{2}$ (note the small change), and then subtracting the full houses.
Or else after we have picked the kind we have $3$ of, and the actual cards, we can pick the two "useless" cards. The kinds of these can be chosen in $\dbinom{12}{2}$ ways. Once the kinds have been chosen, the actual cards can be chosen in $\dbinom{4}{1}^2$ ways, for a total of
$$\binom{13}{1}\binom{4}{3}\binom{12}{2}\binom{4}{1}^2.$$
Comment: One can do it by subtraction. However, if we want to subtract the $4$ of a kind, starting from your expression, we have to be careful. For your $\binom{4}{3}$ gives us say King of spades, hearts, diamonds, and then your $\binom{49}{2}$ includes the possibility of King of clubs. However, your $\binom{13}{1}\binom{4}{3}\binom{49}{2}$ also allows for the possibility of King of hearts, diamonds, clubs, followed by King of spades. So your formula counts each "four of a kind" hand $4$ times. We want to count them no times, so we need to subtract $4$ tims the number of $4$ of a kind hands.
Comment: Look at my comment on the other answer. Could you explain why $\binom{49}{2}$ does not work even if you subtract the number of 4 of a kinds and full houses? I don't quite see how the factor of 4 arises?


Why isn't $\frac1{3p} =$ the probability that the strategy of always switching succeeds, given that Monty opens door 2?

Question:

Consider the Monty Hall problem, except that Monty enjoys opening door 2 more
than he enjoys opening door 3, and if he has a choice between opening these two doors, he opens door 2 with probability p, where $1/2 \le  p \le 1$.

To recap: there are three doors, behind one of which there is a car (which you want),
and behind the other two of which there are goats (which you don't want). Initially,
all possibilities are equally likely for where the car is. You choose a door, which for concreteness we assume is door 1. Monty Hall then opens a door to reveal a goat, and offers you the option of switching. Assume that Monty Hall knows which door has the
car, will always open a goat door and offer the option of switching, and as above assume that if Monty Hall has a choice between opening door 2 and door 3, he chooses door 2 with probability p (with $1/2 \le  p \le 1$).
(b) Find the probability that the strategy of always switching succeeds, given that Monty
opens door 2.

Blitzstein, Introduction to Probability (2019 2 edn), Chapter 2, Exercise 40, p 91.
My wrong approach
Let $C_i$ be the event that car is behind the door $i$,
$O_i$ be the event that Monty opened door $i$ and $X_i$ be the event that intially I chose door $i$. Here $i=1,2,3$.
$P(O_2|C_1, X_1) = p$
$P(O_2|C_2, X_1) = 0$
$P(O_2|C_3, X_1) = 1$
Now, we are to find $P(C_3|O_2, X_1)$.
$P(C_3|O_2, X_1) = \dfrac{P(O_2|C_3, X_1) . P(C_3|X_1)}{P(O_2|X_1)}$
$= \dfrac{1 . \frac{1}{3}}{p}$
$= \dfrac{1}{3p}$
This is not the correct answer. Can anybody comment on what I am missing in my approach here.
Comment: related — https://math.stackexchange.com/q/4031140
Answer: Let $C_i$ be the event that car is behind the door $i$,
$O_i$ be the event that Monty opened door $i$ and $X_i$ be the event that intially I chose door $i$. Here $i=1,2,3$.
$P(O_2|C_1, X_1) = p$
$P(O_2|C_2, X_1) = 0$
$P(O_2|C_3, X_1) = 1$
Now, we are to find $P(C_3|O_2, X_1)$.
$P(C_3|O_2, X_1) = \frac{P(O_2|C_3, X_1) . P(C_3|X_1)}{P(O_2|X_1)}$
$= \frac{P(O_2|C_3, X_1) . P(C_3|X_1)}{P(O_2|C_3, X_1) . P(C_3|X_1) + P(O_2|C_2, X_1) . P(C_2|X_1) + P(O_2|C_1, X_1) . P(C_1|X_1)}$
$= \frac{1 . \frac{1}{3}}{1.\frac{1}{3} + 0.\frac{1}{3} + p.\frac{1}{3}}$
$= \frac{1}{1+p}$
This is the correct answer.
Comment: $\checkmark$ In short: $P(O_2\mid X_1) \neq p = P(O_2\mid C_1, X_1)$  .  Rather, use the law of total probability.
Comment: This also works if $0 \le p \lt \frac12$.  And since $\frac{1}{2} \le \frac{1}{1+p} \le 1$ for all possible $p$ with $0 \le p \le 1$, it is still a good idea to always switch, no matter how biased Monty is and whether or not you know how biased he is.


What is the relation between polarization and wave front?

Question: I'm reading about the angular momentum of light, in which wave fronts are like helix. When I checked for a circular polarization on the web, shapes look very similar to these helical structures, So I'm curious to know is it possible for a wave to be linearly or circularly polarized but also have angular momentum. In another way, is there any relation between polarization and wave front or these are two different concepts?
Comment: The linearly polarized wave cannot be simultaneously circuarly polarized. Circularly polarized carries a nonzero angular momentum, linearly carries 0 angular momentum (at least in quantum average). The helix is the simplest left-right-asymmetric picture so it appears in graphs of circular polarization as well as other places.
Comment: @Luboš The OP seems to be referring to the *orbital* angular momentum of light, which does stem from helical wavefronts that stem from the spatial dependence of the beam, and which is independent of the polarization degree of freedom.
Answer: There are two types of angular momentum of light, which are exactly analogous to their counterparts for massive particles.

Light can have orbital angular momentum (OAM), which is associated with helical wavefronts, that is, with a nontrivial rotational structure in the spatial dependence of the beam. Usually this comes in the form of Laguerre-Gaussian beams, or occasionally Bessel beams.
Light can also have spin angular momentum, and this is the kind of angular momentum carried by circularly-polarized light.

The distinction between the two types of angular momentum is that the amount of orbital angular momentum in a system depends on the coordinate origin (i.e. if you shift the origin by $\mathbf r_0$, the angular momentum of a massive particle $\mathbf L=\mathbf r\times\mathbf p$ will shift to
$$\mathbf L=\mathbf r\times\mathbf p+\mathbf r_0\times\mathbf p,$$
to account for the angular momentum of the centre of mass), whereas spin angular momentum does not (i.e. the amount of angular momentum in the Earth's rotation is independent of where you observe it from). The angular momentum in the spatial and polarization degrees of freedom obey precisely that distinction.
It's also important to emphasize that both types of angular momentum are pretty much completely independent. Thus you can have a beam with orbital angular momentum and linear or circular polarization equally well, and you can even have superposition beams with more complicated properties such as a right-circular beam of $-1$ OAM plus a left-circular beam of $+1$ OAM, which will make a pretty complex spatial polarization dependence across the beam but which will nevertheless have quite definite angular momentum properties.


Linux Mint root app theming breaks when changing controls

Question: So, this is a strange occurrence, which seems similar to other questions but which I've not been able to find a reference for. Maybe my Google-Fu is not strong right now.
It seems to be a common complaint that user's root apps (sudo'd apps like Synaptic) are falling back on default themes. Usually the solution is given as "copy themes from ~/.themes to /usr/share/themes or /root/.themes," for example. This hasn't worked for me, because there's nothing listed in ~/.themes for me.
Then I figured out that changing the controls setting in the Appearance dialog breaks root app theming instantly. See the following screenshots.
Before

After

Installing another themeset (such as grey-theme from Synaptic) appears to break this somehow too, although it goes away when uninstalled. I have not tested this extensively and it may be a fluke related to the controls changing.
On a hunch, I tried running sudo mate-appearance-properties and/or gksudo mate-appearance-properties. Notably, nothing changed when I selected different controls, not even the root app. Also, sudo had only the default theme selected, but gksudo had "Custom Theme" selected, which was identical to the default and also could not be changed. Unsure what this means, if anything.
So, long story short, I doubt this is a bug per se, but I would like to be able to change my default theme/controls and have root apps follow it somehow.
Comment: Can we assume you're using the MATE desktop environment?
Answer: You're probably looking for the -E option of sudo which causes it to keep your user's environment variables:
 -E, --preserve-env
             Indicates to the security policy that the user wishes to pre‐
             serve their existing environment variables.  The security
             policy may return an error if the user does not have permis‐
             sion to preserve the environment.

I just tested this on my Cinnamon LMDE and running sudo -E eom preserves the theme.


why does a person feel weightless during free fall?

Question: I want to ask why does a person feel weightless during free fall?
Please give a specific  and clear answer, without making it complex.
Comment: Sorry I didn't knew that the same quetion exists.
Answer: "Weightlessness" occurs when there is no support on your body. When your body is effectively in "free fall", accelerating downward at the acceleration of gravity, then you are not being supported.
The perception of apparent weight comes from the support that you feel from the floor, from the seat in a bus or plane. Different sensations of apparent weight can occur on a roller-coaster or in an aircraft because they can accelerate either upward or downward.
In other words, turn your question around and ask yourself, why do I feel weight when I walk across the floor? It's because of the the support force the floor gives you.
Comment: Dang, I think you beat me to it by a few tens of seconds :-)
Answer: It is a result of how we feel weight.
Stand up. What is happening to you at the moment is that the ground is exerting an upward force on your feet. The planet below you is exerting a downward force on the hamburger in your stomach. This causes compression in your knees which is sensed by nerves in your knees.
Now put yourself into free fall. Good. What is happening now is that your feet, knees and hamburger are all being accelerated together in the same direction so that there is no resultant compression in your knees that the nerves there can sense.
Comment: Can I  now ask why do we feel weightless when we go over the hump?
Comment: @AMAN - because you are momentarily in freefall. Or at least the hamburger is. Or nearly so.


Starcraft II Attack-Move as default "mouse-click"

Question: Are there hidden setting in Starcraft 2 to set the mouse button to default to "attack-move" instead of the standard move command, where the enemies are ignored and the units are running blind into their dead just to reach the point on the map, you clicked on?
Comment: "a" left click has always been the way to do it
Comment: To set attack move to left click would kill alot of your own units...
Comment: I'm with Nick...you could easily set up an AutoHotKey script that substitutes hitting "a" and then left clicking for normal left click...but you won't be happy with the results if you, say, select your marines, tell them to move to your ramp, then select your Orbital Command to build another worker. Oops, I mean, you tell your marines to "attack move" your Orbital Command, because that's what left click does now.
Comment: maybe right-click then?
Comment: @Paralytic "t" + left click, if you're on the grid layout :) Anyway, click-attack is certain death 90% of the time, why would you want that? If you want it for scouting purposes, then "a/t" click is your best option. You don't want it as your default behaviour
Comment: If you are controlling your units in a battle (micro) then i think it is annoyint to press A every time. So a macro would be nice. I will try to program one of my **extra mouse buttons**
Answer: Consider using a keyboard-mouse macro. If you are using a proper gaming mouse and keyboard you could program a simple conditional like: IF Left-Click then Enter Character 'A'
Thus, every time you you left-click you would automatically enter attack move mode if you have one or more units selected. But as Nick122 has warned, there may be unforeseen consequences such as attacking a gas refinery that you intended to harvest from if you are selecting SCVs, although when you mine minerals or gas you usually right-click... but still...
If you are serious about this I recommend programming a macro like the one I described, and testing this for yourself if you have a gaming keyboard and mouse which have this as a native feature. Otherwise, you would need to get third-party macro software for your mouse and keyboard which would need to run in the background while you play Starcraft II.
My verdict: an interesting notion but not worth the effort. If you want to optimize your game-play there are other useful things you can do. I play Zerg and have set my space-bar key to rotate between hatcheries for faster injecting, for example. If you do test this out, post the results here. I for one, would be interested.
Comment: see my last comment in the first answer: "I can program some of the extra mousebuttons on my Logitech to do a macro **Key A and then left-mouse-click**. then I would have the normal functionality obtained" i think that is a better solution
Comment: Downvote my answer then and let us know if you have any success with your solution.
Answer: No, there isn't. Third party software just won't help because you need to left click other items in the game so setting up the mouse button to do something wouldn't work. Besides that, there is just so much wrong with having left click be an attack move.
Comment: and right click?
Comment: that could be swapped with the attack command option
Comment: Right click wouldn't work either. You need a move command option.
Comment: If you wanted to try it that would be your choice. But its not a good solution and there really shouldn't be a need to try and find this solution... it will screw you up more then it will ever help.
Comment: so is there a thirdparty software, that switches those two commands? ... and what exactly would it screw up for me if I would? I am a newbie in Starcraft and could never adapt to aways clicking A before going somewhere
Comment: Now that I think of it even with third party software it wouldn't work. Because you would need to tell your mouse to act as the "A" button and then also do its normal right click option. There basically just isn't a way to do this. It would also screw up 90% of micro. If you don't know what micro is, I suggest you learn.
Comment: I know what micro is. Maybe I can program some of the extra mousebuttons on my Logitech to do a macro **Key A and then left-mouse-click**. Then I would have the normal functionality obtained
Answer: I GOT IT ! (sorry for reviving old thread, is short and useful)
use autohotkey and write the folowing script
Control & RButton::
    Send a{LButton}
Return

Comment: This is brilliant. I wonder if there's a way to also solve the no orders to subgroups problem. I really liked Warcraft 3 way of handling that.
Answer: Buy a Razer Naga or some other similar gaming mouse, bind A+Lft Click to one of the several side keys, use that key as attack move.
Comment: I'm fairly sure any mouse or mouse utility that supports button remapping would do the trick.


Did the Buyids emerge as allies of the Abbasid Caliphate?

Question: The Buyid dynasty were Shia sympathizers. However, I might have read somewhere that the Buyids came to power as allies of the Abbasids. This would have been as an anti Tabaristan or anti Ziyarid policy. In other words, the Buyid ancestry
would have been pitted against the Ziyarids. This would have been a temporary stop gap measure of dealing with the Persians.
I haven't exhausted wikipedia articles on Ziyards yet. Its possible that I'm confusing it with a Buyid-Samanid alliance. I may just be completely wrong by confusing it with another period of history.
Answer: The Wikipedia article on the Buyid dynasty is clear about the fact that the Buyids conquered the Abbasids and made them into a vassal state. So they did not "emerge as allies", but rather as ememies.
At the same time however, the Buyid did depend on the Abbasid to rule, particularly in Baghdad. Here is a relevant footnote from an article which spells that out more explicitly:

The Buyids probably never seriously considered abolishing the Abbasid caliphate. Like all the other Muslim rulers of this period, the Buyids relied on the caliph to confirm them in their new positions as rulers over their conquered territories. Especially the Buyids, condottieri of humble origins, were dependent on such forms of legitimation.

Another quote from a different source:

The Abbasid caliphs proved to be fierce defenders of their prerogatives in Baghdad even when representatives and troops from the Buyids and Saljuqs were able to control many of the city's functions. Almost without exception the various Buyid and Saljuq rulers were never able to establish concrete bases of support within Baghdad
  itself.

The question makes a lot of the Ziyarids as well. My understanding is that there was a kind of three-way rivalry going on there. They were indeed vying for some of the same territories in the late 10th to early 11th centuries.


What is the relation between the eigenvectors of a sample covariance matrix and those of the true covariance matrix?

Question: As is known, the covariance matrix of a set of random vectors $\{\mathbf{x}_i\}_{i=1}^N$ can be estimated by their sample covariance matrix:
$\mathbf{\hat R}:=\frac{1}{N}\sum_{n=1}^N\mathbf{x}_n\mathbf{x}_n^T$
In popular subspace methods such as PCA and MUSIC, the eigenvectors of $\mathbf{\hat R}$ is used to estimate the signal subspace and noise subspace.
As far as I know, there are mainly two streams of results about the relation between the sampled eigenvectors $\mathbf{\hat U}:=[\mathbf{\hat u}_1,\mathbf{\hat u}_2,\cdots]$ of $\mathbf{\hat R}$ and the true eigenvectors $\mathbf{U}:=[\mathbf{u}_1,\mathbf{u}_2,\cdots]$ of $\mathbf{R}$,
Firstly, under Gaussian assumption, the sampled eigenvectors $\mathbf{\hat U}$ obey an asymptotic normal distribution (in the sense of large samples N)
$$\mathbf{\hat U}\simeq \mathcal{N}(\mathbf{U},\mathbf{\Sigma})$$
these results were conducted by T.W. Anderson, P. Stoica, etc.
And secondly, the sampled eigenvectors $\mathbf{\hat U}$ can be modeled as a perturbation version of the true eigenvectors $\mathbf{U}$, that is
$$\mathbf{\hat U}=\mathbf{U} + \delta\mathbf{U}$$
where the perturbation $\delta\mathbf{U}$ is related with the perturbation caused by finite samples,
these results were conducted by G Stewart, F Li, etc.
 My question is, how should we evaluate these two kinds of analysis, I mean, which one is better from what aspect, and why?
 And, are there new and more advanced results about the relationship between the $\mathbf{\hat U}$ and $\mathbf{U}$ mentioned above? Is there any general theoretical background lying behind these analyzes?
Answer: It seems to me that the two bounds tell you two different, almost unrelated things.
The first focuses on what happens when the number of samples tends to infinity, and focuses on the distribution of the eigenvectors (assuming a specific underlying distribution of the $\boldsymbol{x}_i$). It is a probabilistic bound; you could get any estimated covariance matrix $\tilde{R}$ from the observations, and any set of eigenvectors, but some are more likely than others.
The second bound focuses on how the eigenvalues react to a perturbation in $R$. It tells you how you should expect the eigenvalues to change if you have a different matrix $\tilde{R}$ rather than $R$. This different matrix might come from the estimation process, but the bound has nothing probabilistic in nature. We have one matrix $\tilde{R}$, close to $R$, and we are interested in how distant and in which direction its eigenvectors are with respect to those of $R$.
If anything, the second bound can be useful in proving the first one, as the final part of the proof: first you prove that the sample covariance $\tilde{R}$
 is asymptotically normal, then apply a delta method-type argument, using the fact that the eigenvectors are a linear (in first-order) function of the perturbation (which is essentially what the Stewart-Li-type bounds state, under the assumption that the eigenvalues are simple).
I am not sure if this is the kind of answer that you expect or if you are thinking that I am simply restating something obvious. Your question is rather generic; if you have something else in mind please clarify.