How large must an object be to be seen through a telescope?

Question: I've studied this in a few optics classes before, but I'm drawing a blank at the moment.  If I know the aperture size and focal length of a telescope, as well as how far away the object I want to view is, can I calculate how large/wide/big that object must be in order to be seen?
Comment: I would assume that albedo matters just as much as size.
Comment: @HDE226868 What's the albedo of the sun?
Comment: I was attempting to suggest it in the context of objects that don't emit their own light, @Michael. I should have provided that context.
Answer: A few clarifications.
Telescopes in general operate at very large distances - "at infinity" is the term used in optics parlance.
A bright enough object can be seen from any distance, no matter what its size is. All that matters is that:

It's bright enough to produce an impression on whatever sensor
you're using (or your eye)
The background is dark enough to produce sufficient contrast

But then it would be just a bright but tiny spot.
I believe what you're really asking for is: what is the combination of factors that shows the object as bigger than a simple dot? In that case, it's two factors: aperture of the telescope, and angular size of the object.
Assuming a flawless telescope, its aperture is what determines its resolving power. The resolving power is the angle at which two dots can be separated by the telescope. The formula is:
resolving power = 1 / (10 * aperture)

where resolving power is in arcseconds, and aperture is in meters. Examples:
aperture         resolving power
10 cm            1 arcsec
20 cm            0.5 arcsec
1 m              0.1 arcsec

As long as the object's angular size is bigger than the resolving power, it will appear bigger than a dot.
That's all. In astronomy, we don't speak of an object's absolute size, we only speak of the angular size. But that should be enough. As soon as you have the angular size, and say the distance, then you could deduce the absolute size, it's a simple matter of trigonometry.
absolute size = distance * tangent(angular size)

E.g., this is the size of an object of 1 arcsec angular size, situated at 384,000 km (the orbit of the Moon):
http://www.wolframalpha.com/input/?i=384000+km+*+tangent%281+arcsec%29
It's 1.8 km (in case the link above is unavailable).
In other words, that's the minimum absolute distance resolved by a telescope 10 cm in aperture, for objects on the Moon. Any two dots closer together than 1.8 km, placed on the Moon, are seen as one dot in a 10 cm telescope.
Comment: "at infinity" is a funny expression, since stuff look larger the further away they are, at z++. In astronomy, where else.
Comment: Right. Well, as someone who makes telescope optics for fun, I can only say that, unless you're doing something quite special, anything beyond a few kilometers away might as well be at infinity, it makes no difference.
Comment: This is exactly what I was looking for.  Thank you for all the detail, and clear explanation!
Comment: And, since `angular size` is quite small, `tangent(angular size)` can is approximately `angular size`, so `absolute size = distance * angular size`.


Unable to get a system variable work for manuals

Question: I have the following system variable in .zshrc
manuals='/usr/share/man/man<1-9>'

I run unsuccessfully
zgrep -c compinit $manuals/zsh*

I get
zsh: no matches found: /usr/share/man/man<1-9>/zsh*

The command should be the same as the following command which works
zgrep -c compinit /usr/share/man/man<1-9>/zsh*

How can you run the above command with a system variable in Zsh?
Answer: Try:
$> manuals=/usr/share/man/man<0-9>
$> zgrep -c compinit ${~manuals}/zsh*

The '~' tells zsh to perform expansion of the <0-9> when using the variable. The zsh reference card tells you how to do this and more.
Comment: @sykora: Do you know how you can put these folders to be run for run-help, such that I can search the help files by just typing $ compinit Esc-h?
Answer: From my investigations, it looks like zsh performs <> substitution before $ substitution. That means when you use the $ variant, it first tries <> substitution (nothing there) then $ substitution (which works), and you're left with the string containing the <> characters.
When you don't use $manuals, it first tries <> substitution and it works. It's a matter of order. The final version below shows how to defer expansion so they happen at the same time:
These can be seen here:
> manuals='/usr/share/man/man<1-9>'

> echo $manuals
  /usr/share/man/man<1-9>

> echo /usr/share/man/man<1-9>
  /usr/share/man/man1 /usr/share/man/man2 /usr/share/man/man3
  /usr/share/man/man4 /usr/share/man/man5 /usr/share/man/man6
  /usr/share/man/man7 /usr/share/man/man8

> echo $~manuals
  /usr/share/man/man1 /usr/share/man/man2 /usr/share/man/man3
  /usr/share/man/man4 /usr/share/man/man5 /usr/share/man/man6
  /usr/share/man/man7 /usr/share/man/man8

Comment: I this time accept Pax's answer because of great examples. Thank you for your answer!


On how many different systems can you download your games?

Question: I though I knew how this work, but, after doing a bit of research I´m really confused. I have a PS3 and a PS4 where I use my regular account. If I bought another PS3 and PS4 I can use that account with those systems, and when I mean use my account, I mean to download my purchase games. So, that will be my limit right? 2 consoles per account. But, what if all those system brokes? I can't download my games anymore? I read something about going to the website and you remove the assing system to your account and you can continue using your account to download games in the future in other systems. So, as long as you have assing just two consoles to your account,it will be ok? Is this true?
Comment: At one point you could have up to 5 PS3s activated and people were using it to share content, pretty sure they changed it but I'm not sure what the exact rules are these days. You definitely can deactivate a console and then activate a new one though if that's what you're asking, not that clear...
Comment: @Probst Yeah, something like that was my question too. So, I can deactive and active any number of consoles I want? The only cons is that I can have only 2 active at the same time, is that right?
Comment: As far as I understand yes, however I've moved to PC gaming the past couple years so maybe there is someone with more recent experience who knows.
Comment: In case you registered max number of consoles and need to deactivate them you can go to https://account.sonyentertainmentnetwork.com/liquid/cam/devices/device-media-list.action and login. There is a button "deactivate all systems"
Comment: @Zarathustrax not quite. There is a limit to how many times you can activate/deactivate a system over time. I think the PS4 has a 6 month wait between activation switches.
Answer: As of right now (March 2016), you can have two Primary active PS3 systems and one Primary active PS4 system according to the PSN FAQ page.
You can sign into additional devices and download your games to play while logged in, but as soon as you log out the games become unlicensed for play by other users. I'm not sure how that works with concurrency though... eg, can you play against your self between two systems? IDK.
Note, even this page isn't always current but it's a good guide. For instance you can have three activations across PSP, Vita, and PS TV, not the two listed.
Comment: That's right, As of now (Jun2017) its' two primary PS3 max, and up to 5 overall (that means three more secundary), As of concurreny, you can't, to my knowlege, be signed in on more than one same device (ie two PS3), you can be signed in one PS3 and one PS4 but not two PS3 or 4; so you can't play against yourself. Furthermore, if you have an older PS acc (pre the 2007 hack) you can share all the games you bought back then in al five devices for all the users on those devices to play, even online (I still play my buddie's Burnout Paradise and Tekken Dark Ressurrecction with all my pals online)


Need help on deployed contract!

Question: I have a token contract that is already deployed in the mainnet, Is it possible for me to inherit the properties of that contract for my new contract that is going to implement the use-cases for the deployed token.
My doubts are,

Is it possible to write a new use-case contract inheriting the properties of the old contract..?
Do I need to deploy the token contract again to achieve it..? Or is it possible by deploying the new contract from the same address where the token contract got deployed..?

Please let me know the best approach..
Answer: i am not sure if you mean that;
you can use interface contract to inherit pre-contract

Need help on deployed contract!


How to say "lay on one side" in Spanish?

Question: I was wondering how do people say "lay on one side" in Spanish. I need it as an imperative to use at gym or something(not while you're sleeping).
I searched "tumbarse a un lado" but couldn't find any specific result.
Answer: You can use different approaches:

Tumbarse de lado
Tumbarse del lado derecho / izquierdo
Acostarse de lado
Acostarse del lado derecho / izquierdo

Since "acostarse" has the connotation of laying for a long time, you can also use the verb "recostar", which means Acostarse durante un breve período de tiempo - laying for a short period which is more related to what you would do in a gym.
As an imperative it would be:

Túmbate (tú) / túmbese (usted) / tumbaos (vosotros) ...
Acuéstate / acuéstese / acostaos ...
Recuéstate / recuéstese / recostaos ...
Comment: Perhaps worth pointing out in case any Hispanophones use this to translate in the other direction is that @fedorqui has translated lie on one side not lay. However, no harm done as that is probably what the OP meant. I lie on my side but I would lay you down on your side.


Finding record of US name change in 1920s in New York?

Question: My Grandmother immigrated to the US from England in 1911. She appears as Sophie Charney in the 1920 US census, but in 1924 she appears as Shirley Charney in the New York State marriage record to my grandfather, Herman Emelock. I'm trying to find the record of her name change which would have occurred between 1920 and 1924.
Comment: ... or the 1920 information was provided by a neighbor, or the enumerator misheard, or the Sophie Charney in the census is a different Sophie Charney (there is one who married an Isack L Summer in 1927) ...
Comment: Are you sure she recorded a name change, and didn't just start using "Shirley"?
Comment: I can only add my experience - my GG Aunt emigrated from Scotland to the USA and changed her name formally when she acquired US citizenship some years later. IIRC, it's possible to do it on the one form. However, she'd started using her new name some years after arrival in the US, but some years before the formal record of that change on gaining citizenship.
Answer: Try looking in local courts in the areas where she was living.  They may not be in a collection which is titled as such -- for one example, see the FamilySearch Research Wiki article New York Names, Personal which cites a collection Miscellaneous Filed Papers Index, 1812–1934 for New York County.
The period you're looking at is post-Consolidation (see: Wikipedia, City of Greater New York), so be aware that records for New York City are often kept separately from the rest of the counties in New York State.
For an overview of name changes for immigrants, see the New York State Archives' research guide Naturalization and Related Records: Records of Name Changes.  Their guide says:

The State Archives holds the lists of name changes filed in the Secretary of State's Office for the period 1899-1940 (series B0070; not indexed).

Another possibility for a formal record of a name change might be in naturalization records. Since she married in 1924, her naturalization status would not depend on her husband's status (it is after September 22, 1922, when Congress passed the Married Women's Act, also known as the Cable Act).  Petitions for Naturalization sometimes say what name an immigrant had on the passenger list as well as the name that they were going by at the time of the petition.  The US National Archives' online guide Clues in Census Records, 1850 - 1930 shows how you can find clues to her citizenship status in different census years (including 1940, despite the title of the page).
While Naturalization records are Federal records, they need not be in Federal courts. Petitions can be found in local courts well into the 20th century.  See
Directory of courts having jurisdiction in naturalization proceedings (1932).
For an overview of US Naturalization laws pertaining to women, see Marian L. Smith's article from Prologue Magazine, Summer 1998, Vol. 30, No. 2 | Genealogy Notes "Any woman who is now or may hereafter be married . . ."
Women and Naturalization, ca. 1802–1940.
For current rules on name changes, see Name Change Basics at the website of the New York State Unified Court System (NYCourts.gov).  The section Where to Go says:

A name change request can be made in the County Court or Supreme Court of the county where you live. If you live in New York City, you can go to the New York City Civil Court or the Supreme Court in the county where you live. The Civil Court costs less money than the Supreme Court.

You could start with the County Courts and the Supreme Courts, if you want to assume the records might be found in those courts as they are now.  But if you want to find the law for name changes at the time you're considering, it is possible to find the current statute and then walk backwards using the references in the statutes to the historical period in question. See NY State Codes & Statutes at NYCourts.gov.
Have you searched FamilySearch for docket books or index cards created by local courts?  The court index to naturalizations from Hampden County, Massachusetts, linked below, lists the name changes documented in naturalization records on the index cards.
Naturalization petitions index (Hampden County, Massachusetts): 1906-1989 for Clara Heirbaut Hoyer's naturalization petition has as its header "Hoyer, Clara Heirbaut (name changed from Clara Celesta Augusta Hoyer by decree of Court)" so the clerk can see at a glance both of the names Clara was known by.
Search the area courts close to where your grandmother lived to see what docket books and indexes might be available.


Software or library which can be used for sorting PDF files

Question: I'm sorting a lot of PDFs files(most of them are academic papers) and am looking for a software which can atuomatically detect and extract titles, authors, and refrences. Is there any software or library like this?
Comment: I suggest that "cataloguing" (or similar) may be a more precise term to include in the question, as opposed to sorting which implies rearranging your files.
Comment: For which operating system?
Answer: Mendeley is specifically designed for this sort of work that you are doing with online & desktop clients.
Comment: Thank you for your answer. This is what I have been looking for!
Answer: Zotero is excellent for this purpose, since it automatically extracts metadata from PDFs and organizes them for you in a library.

Unlike Mendeley, it is open source. You can use it either as a Firefox add-on or a standalone application:
https://www.zotero.org/download/
Answer: If the titles, authors, references contain any strings that indicate what they are, you might be able to use the pdf2text library, which simply extracts all strings from PDF files.
Answer: I am using All My Books program for managing my e-books including e-books in PDF format. May be this program can help you. However, it does not analyzing the contents, it extracts meta-data (title, author) automatically if it is available. Also, it uses the first page of the document as a cover thumbnail. Use menu item "Book - Scan drive for books..." to find your PDF files and add them in a batch mode. After that, you you can browse the documents either by cover thumbnails or by title list. You can sort by any field if they are not empty.


Parallel universe 80s movie

Question: All I remember is a woman in a convertible coming through a portal to a parallel universe. Lots of sand/desert. Running into a Conan/Beastmaster mostly loincloth outfitted guy.
Answer: This certainly could be Beastmaster 2:  Through the Portal of Time, from 1991.  Take a look.

Per Wikipedia:

Dar, the Beastmaster, learns of a previously-unknown half-brother, Arklon, who plans to conquer the land with the help of a sorceress named Lyranna. Both escape to present day Los Angeles through a dimensional portal. Dar and his animal companions, Ruh, Kodo, Podo and Sharak, must follow them through the portal and stop them from obtaining a neutron bomb. During his visit, Dar meets a rich girl named Jackie Trent, and they become friends.

There is plenty of sandy terrain in the fantasy world part of the story; Marc Singer returns as the Beastmaster (looking, Joe Bob Briggs pointed out when they showed the film on TNT MonsterVision, quite a bit more buff than in the first film); and the female lead, Jackie Trent, has a really sweet convertible.
The whole thing is on YouTube.  Here's the scene with the sports car in the desert.
Comment: Ill give it a shot. Sounds about right. I asked once if it was beast master and I was told i was ridiculous. So thanks for helping me feel alittle more sane. Lol
Answer: Could it be Outlaw of Gor? It was featured on Mystery Science Theater 3000. That had two men who were transported to another dimension but there were also two female characters, evil and good. Much of it was shot in the desert.
One scene famously repeats characters saying, "Cabot" about a thousand times.
Comment: Cabot?  Cabot.  Cabot?  Cabot!  Cabot! Cabot?  Cabot.  https://youtu.be/Os-gE6rgmKI?t=983
Comment: Ill definitely have to watch! Thanks.

Parallel universe 80s movie


SXA Search functionality works only with the whole search query

Question: I'm using Sitecore 9.1 and SXA 1.8, I implemented search functionality using Search box and Search results OOB SXA components, When I search with a sentence, it only returns the exact match for the whole sentence, If I have search results that contains part of the sentence not the whole, they aren't returned.
For example, if I search with "Dragon cars", the returned results must contains the whole query, the results that contains "Dragon" or "cars" are not returned.
Comment: Do you search in a RTE field? or Single Line? Is it Title or Display Name field?
Comment: I'm searching at only single or multi line fields like Title or Description.
Comment: Does partial search work in multiline Description field?
Comment: Yes it works well
Answer: If you are using SXA search renderings, then you are not exactly searching by Title or Description fields. The SXA search is using AggregatedContent computed field (sxacontent in the index) and is using Contains method on it like this:
predicate = predicate.And(i => i.AggregatedContent.Contains(t));

where t is the text phrase, you are looking for.
The AggregatedContent will contain the text from Title and Description field so the Contains should give you the results and I'm pretty sure it is working fine. But once again you are searching in the AggregatedContent filed, not Title or Description itself.
Take a look at the item fields and how it looks like in the index:


Where can I find a longitudinal study with a binary response?

Question: I've spent the last couple of months trying to find real data (not simulated) of a longitudinal study, but I can't seem to find one. Any topic and time frame is fine, but the dependent variable must be binary, and a few covariables are also desirable. I appreciate any help immensely!
Comment: People tend to be very protective of their raw data.  Your best bet would be to hunt down a paper that is of interest to you, contact the authors, and see if they will give you permission to analyze their data set.  Theoretically, if a study is funded by a federal agency (e.g., NIH) the investigator should at least have to produce something, but in practice this is not always the case.
Answer: (1) The statistic software R comes with a number of datasets. You can see which datasets are available with the command data(). Here is an overview.
Among the datasets that came with my distribution of R is the dataset Titanic, which includes the binary variable "Survived", which gives information about which passengers survived the Titanic's maiden voyage.
Another dataset, UCBAdmissions, gives information about which applicants were admitted or rejected to UC Berkeley.
The data in both datasets is grouped (by sex etc.). Both are not longitudinal, though.
You can get information on each dataset with ?datasetname, e.g. ?Titanic. Maybe more datasets include binary variables.
(2) As Jeromy Anglim noted, many statistics text books offer an online data repository. Here is the one for Applied Regression Analysis and Generalized Linear Models (2nd ed.) by John Fox. Here is the one for Statistik (7th ed.) by Fahrmeir et al. (in German).
(3) Here is a linklist to free datasets, here is another. I guess there are more.
Comment: Wow, thanks for the great sources!
Answer: Perhaps have a look at chapter 14 of Gelman and Hill http://www.stat.columbia.edu/~gelman/arm/
Chapter 14 is on multilevel logistic regression and the website provides access to all data files used.
I just don't have access to the book right now to tell you which of the many datafiles used in the book correspond to the examples in chapter 14.
More generally, textbooks are a good way of directing your search. Many provide practice datasets. So  you just need to find textbooks on longitudinal analysis of binary response data.


How can I use a Meta Data column in a SharePoint Designer Workflow for a Condition

Question: I have written a workflow in SharePoint Designer 2013 to send an email once 60 days before a contract date expires.  I would like to use my managed meta data column to set a condition to only send the email if Business Function = IT (In image I have used the term ID).  I cannot get this to work.  It has been suggested the problem arises due to meta data.  Looking for some help to understand how to add stages to my workflow to allow the use of the managed meta data column.
Answer: The workaround i can think of is to create new columns to hold the plain text of the managed metadata tag. Use a workflow to be triggered when the managed metadata column has been updated. Convert the metadata into text and store it in the new column.  And use the value in the new column for you If condition.
Reference link:https://sympmarc.com/2012/11/09/displaying-managed-metadata-column-values-in-an-email-sent-from-a-sharepoint-designer-workflow/
Update: I will paste the main steps for you. Strangely the blog works in my end.
Here's the meat of it:

Start with your managed metadata column (Column1Name)
Create a 2nd column (Column2Name) in the list of type string
Create a workflow that fires on create and/or on modify (depending
on your needs) that copies the value from Column1Name into
Column2Name.
Create a 3rd calculated column (Column3Name) on the list. The
formula for that column should be
=LEFT([Column2Name],FIND("|",[Column2Name])-1) The calculation finds the pipe character and trims the value to a clean text value
Any emails where you need to display the value of Column1Name should
use the value of Column3Name instead to send the plain text
Comment: Thanks Jerry, unfortunately the link to the solution blog on the page has been removed.  I had thought there was a way using a 2013 workflow to parse the meta term using some extra stages.  I am positive a came across this solution previously, but can no longer find it.
Comment: @StewartCampbell Hi Stewart, i paste the main steps from the blog, have a check.
Comment: Thanks Jerry,  I will give it a go.


What is the purpose of the emitter resistor in a common emitter amplifier?

Question: I'm struggling to understand the purpose of the resistor circled in red, I know it has something to do with DC biasing and the feedback on the circuit (as the capacitor will cause AC bypass). But I'm struggling to understand the exact circumstance where this would be needed. Is it a change in supply voltage, or change in transistor beta? And the exact mechanism that would cause the resistor to solve the problem.
Comment: Just a couple of words to look up "emitter degeneration". Whole books could be written on the subject.
Comment: Can I suggest changing the title to something like "Purpose of the emitter resistor". The fact that you have circled a component in your diagram is not really relevant to the title of the question, which people will see when browsing or searching.
Answer:
I'm struggling to understand the exact circumstance where this would
be needed.

What most folk want with a common emitter amplifier is for the DC collector voltage to be about half the supply voltage. So, when you have an AC signal present at the input, the amplifier's output (collector) doesn't clip the signal asymmetrically. Another way of phrasing it is that you are aiming for a good linear dynamic range capability.
To achieve this, you need to create a situation where the DC quiescent collector current is held fairly constant. So, if Vcc is (say) 12 volts and Rc is (say) 2200 Ω then you want the quiescent current through Rc to be about 2.73 mA (2.73 mA through a 2k2 resistor drops 6.006 volts).
To ensure that a DC current of 2.73 mA flows through Rc consistently requires an emitter resistor. If the emitter resistor is 220 Ω (for example), a DC current of 2.73 mA flows from the collector into the emitter and then through the resistor and, it would drop about 0.601 volts across it.
It then follows that the base-bias voltage would need to be about 0.601 volts plus about 0.7 volts (internal base-emitter volt-drop). So, around 1.301 volts on the base will ensure that there is approximately 6 volts DC at the collector.
Knowing this allows you to calculate the base-bias resistor values. Here's a simulation where I've tweaked R4 to show what I mean: -

In this example I used a BC547 BJT and the base voltage to ground is 1.269 volts (implying that the base-emitter volt-drop is 0.669 volts). So, it's easy to follow and you should nearly always get predictable results but you'll never get exact results from a single BJT amplifier.
So, that's the normal case when an emitter resistor is used.
If you didn't have an emitter resistor, how can you properly define the current flowing in the emitter (and the collector)? Well, you can if you know the maths surrounding a CE configuration but, then you'll find that temperature effects will be surprisingly high and the desired 6 volts at the collector may drift with temperature a few volts this way and that way.
So, do you want a 5h1tty circuit that drifts around or, do you want a stable circuit?

But I'm struggling to understand the exact circumstance where this would be needed. Is it a change in supply voltage, or change in transistor beta?

It's both and, it's also temperature and, it's also circuit repeatability. Here's a side by side comparison: -

And, if I increased R4 in the left circuit and R8 in the right circuit by 5% we would see this: -

Can you see that a very small change in the biasing condition hasn't really altered the quiescent DC voltage on the left-hand circuit but, on the right-hand circuit, the collector voltage has dropped from 6 volts to 188 mV. The right-hand circuit is very susceptible to component drift.
If I restore the resistor values and increase the power supply voltage from 12 volts to 13 volts here's what we see: -

In other words, the right-hand circuit is very susceptible to power voltage changes (and also component value changes). If I restore the supply voltage to 12 volts and change the ambient temperature in my simulation from 27°C to 37°C we see this change: -

In other words, the right-hand circuit is very susceptible to power voltage changes, component value changes and ambient temperature changes. But, what if I swapped out the transistor with a 2N3904: -

The above has restored ambient back to 27°C but swapped the BC547s for 2N3904s. The circuit on the left is clearly more robust at dealing with this situation.
Answer: The emitter resistor serves mutiple purposes. It improves the linearity of the amplifier, raises the input impedance, and simplifies biasing. Let us look at each characteristic individually.
In the following I will refer to variation of the circuit with \$R_E\$ omitted as the 'grounded common-emitter amplifier'.
Linearity
The gain of the grounded common-emitter amplifier is \$G=-R_C/r_e=-R_CI_C/{25\mathrm{mV}}\$. Here, \$r_e\$ is the intrinsic emitter resistance, ie the reciprocal of the transconducance. If the input signal is large enough, it will substantially modulate the collector current \$I_C\$, and hence the gain. If the gain depends on input signal level, that is precisely a non-linearity!
The added emitter resistor changes the gain to \$G=-R_C/(r_e+R_E)\$. Clearly, the gain does not nearly depend as much on small changes in \$r_e\$ now.
Input impedance
The input impedance looking into the base of the grounded common-emitter amplifier is approximately \$Z_\mathrm{in} = \beta (r_e + R_E)\$. For \$I_C=1\mathrm{mA}\$, \$r_e\$ is just 25 Ohms. By making \$R_e\$ larger than this, the input impedance can be increased significantly. Remember that if the input signal is a voltage, a high input impendace is usually desirable.
Biasing
Say you trimmed the input bias divider such that just the right collector current flows through the transistor. For the grounded emitter variant, the biasing will not be stable. Any change in temperature will create a variation in the base-emitter voltage (at fixed \$I_C\$) of the transistor. Conversely, when we keep the actual \$V_\mathrm{BE}\$ constant, this creates an exponential change in the collector current. A change of just a few °C can saturate the output.
The situation is the same for variations in the power supply voltage. A change of as little as 25mV at the base will increase/decrease the quiescent current by a factor \$e\$.
Adding the emitter resistor gives some compliance to the emitter voltage, reducing this problem. If it is much larger than \$r_e\$, the perturbing voltage can drop across \$R_E\$, rather than actually changing \$I_C\$ too much.
Conclusion
Adding the emitter resistor greatly improves all these properties, at the expense of gain.
If you are still struggling with these concpets, have a look at chapter 2.3.4 of The Art of Electronics (3rd edition) by Horowitz & Hill. The single best reference on this topic around.
Note about the emitter capacitor
In the schematic in the OP there is a capacitor parallel to the emitter resistor. This way, \$R_E\$ is bypassed at signal frequencies. This yields the same high gain as for the grounded emitter amplifier (including the degraded linearity and input impedance), but sill offers reliable biasing.
Comment: What about the output impedance for those AC signals? Isn't lowered (not a rhetorical question)?
Comment: The output impedance is always equal to the collector resistor Rc. The collector itself looks like a current source, i.e. high imepdance, limited by the Early effect only.
Answer: RE is needed to cope with the power supply voltage fluctuation, and it keeps the operating point stable.
For small signals, it will reduce the gain so a capacitor bypasses it for small signals. In other modes you have the same considerations.

If you look at the static load line you will see that a variation of VCE does not result in a large variation of IC, so when the power supply fluctuates VCE changes, but the operating point does not move a lot.
Comment: @circuitfantasist you are right and that is exactly what I wrote. "Does not result in a large variation of Ic" maybe you didn't read the "not". I wrote also that Vce changes.
Comment: But that's where I don't understand how it is kept stable
Comment: I edited it to add more explanation.
Comment: @Paul, I can't agree with your last edit. When the power supply fluctuates, Vce follows its variations since the voltage drop across Rc is constant (because of the constant collector current). Re keeps stable only the collector current; it is not responsible for Vc. That is why this negative feedback is named "current-type".
Comment: @ElliotAlderson done.
Comment: Is there a difference between "V CE" and "V ce" (e.g., DC vs. AC signals or small vs. large signals) or are they the same thing? Can you clarify somehow?
Comment: I think "small signals" need to be qualified. It is not entirely clear what you refer to. E.g., [small-signal modeling](https://en.wikipedia.org/wiki/Small-signal_model),  the AC part of the signal (e.g., above a certain frequency, not just non-DC), or something else.
Comment: @PeterMortensen it is about the operating point so it does not concern small signals. The dynamic load line is for small signals when the emitter resistor is bypassed.
Answer: Look at the emitter circuit.

simulate this circuit – Schematic created using CircuitLab
As soon the base-emitter diode reaches its forward voltage, the bias runs away. You cannot completely solve this problem as you want to have current running into the base. But you don't want to have a diode characteristic at that place. You want it linear. That's what the emitter resistor does. It lineriarizes the current through the BE diode. Same as a series resistor does it for any other diode. The circuit is now more stable against fluctuations of V+.
Comment: Interesting explanation... but one very important detail is missing in this conceptual circuit diagram - the collector current that flows through the emitter resistor Re and creates a "lifting voltage drop". So there is not only a resistor in series to the "diode" but a resistor supplied by a current, i.e , a "lifting" voltage source with Ve = Ic.Re.
Answer:
And the exact mechanism that would cause the resistor to solve the problem?

The name of this mechanism is "negative feedback" (more precisely, "current-type negative feedback") and this specific transistor implementation is known as "emitter degeneration". As far as I can remember (not sure), one of the legends says that it ("cathode degeneration") was invented by Otto Schmitt in the 30s. Whoever invented this trick, it is an example of "ingenious simplicity" - only a resistor attached to the existing transistor stage.
Instead of repeating well-known explanations from the web, I will share with you a new insight of mine from yesterday. I had the inspiration to think about the great circuit in the case when Vcc varies.
My observations are that despite the presence of negative feedback, the circuit still responds to Vcc changes (for example, increase) because of two reasons:
1. The bias voltage VRb2 (Vb) increases because the voltage divider Rb1-Rb2 is directly supplied by Vcc (it acts as an input voltage attenuated by the divider and applied to the base). The transistor tries to make its emitter voltage equal to Vb; so the collector current Ic increases, the voltage drop VRc increases, and its complement - the collector voltage Vc, decreases. Figuratively speaking, the transistor "pulls down" the collector output.
2. We can think of Rc as some "battery" that "produces" the voltage VRc = Ic.Rc and it is connected in series to Vcc. So when Vcc increases, it "pulls up" the collector output through the "battery". This is the well-known "voltage shifting" technique widely used in op-amp internal structures.
My conclusion is that the two voltage changes are in opposite directions and can be mutually neutralized.
Indeed, it is not so important for this AC amplifier stage but there may be (DC) applications, in which it would be important. For example, such a "neutralized stage" can be considered as a voltage stabilizer ("Zener diode").
But above all, it is useful as a mental exercise for a deep understanding of the circuit operation.
Comment: We have subscript on this platform (``) - poor man's MathJax. For example, `VCC` and `RC`.
Comment: @Peter Mortensen, Thanks for the reminder... and maybe, for the upvote... You are right, formatting should be used. I am meticulous myself and I refine my materials. But I just got tired already (I have been uploading materials to the web since 2000) and started saving some repetitive actions. In short, I focused more on the content than on the form. The truth is that I do not get an adequate response to what I offer, especially in this platform, and because of this reason I frequently lose desire... I think that some others here experience this too...
Answer: The quick answer. The NPN transistor switches on when the base voltage is about a diode drop above the emitter. So without that resistor to raise the emitter voltage it would be on all the time, or off all the time when the capacitor was charged.


In Japan, is it possible to have a tourist visa converted to a work visa?

Question: Let's say, while you're on vacation (within the 3-month limit for tourist stay), that you got a job offer from a Japanese company. Is it possible to have your tourist visa converted to a work visa without leaving Japan?
Comment: work visa questions are off topic, this site is only regarding travel
Answer: It is not possible to "convert" travel visa you have, but you are able to look for a job that provides visa sponsorship.
Once employer agrees to hire you, you or they will have to apply for Certificate of Eligibility. Having that issued you can get a work visa, change your immigrant status and be hired.
The whole process takes much time (several months), which would probably exceed the time allowed by travel visa. It is not problem because most important thing is to get hired, then it's just a paper work and waiting time.
You could also look for a job remotely, but if you think there're more chances to get hired when you're onsite, then consider getting study visa first (e.x. Japanese language schools), which allows you to be in Japan for 3 to 12 months or even more.
Comment: A CoE is neither required nor helpful when applying for a change of status.
Comment: @fkraiem this was the only document together with offer I had to get a work visa.
Comment: Except that here we are not talking about visas but about changing your status; obtaining a visa requires leaving Japan, which OP does not want to do.
Comment: The question is clearly about visa. Actually, the short answer on that question is _no_ you will have to get another visa.
Comment: The question uses the word "visa" because OP, like many people probably including you, does not know the difference between visas and statuses of residence. What he really means is the latter.


What is this plant? Is it edible? Poisonous? Thank you

Question: I was in my garden when I noticed a weed that I'd never seen before. I looked on the internet and maybe it's a nightshade??? The inside of the fruit had lots of tiny seeds that reminded me of pomegranate seeds. It has white flowers with five points that are yellow on the inside. Anyway, I hope someone can identify it. Thanks.
Comment: Yeah, as Bamboo said, black nightshade (not to be confused with deadly nightshade) is a likely candidate (but there are other possibilities); definitely looks like a Solanaceae plant. They look a lot like wonderberries, too, except the calyxes are bigger. Let me know if you want wonderberry seeds for something that is definitely edible when ripe (I saved loads of them, this year); you can do that on my website link since there's no private messaging here. Wonderberry plants smell a lot like gourd plants (Lagenaria siceraria).
Answer: It might be Solanum nigrum, common name black nightshade, though the  single leaf you show looks a little narrow. Anecdotally, it is thought to be highly toxic, but how poisonous it actually is is not entirely clear, see here https://pfaf.org/user/plant.aspx?LatinName=Solanum+nigrum. It is neither woody nightshade (Solanum dulcamara) nor deadly nightshade (Atropa belladonna), both of which are toxic; of the two, Atropa is the most toxic.


How do I tie a slackline with only carabiners and webbing?

Question: Commercial slackline solutions seem bulky, heavy, overpriced, and a little too industrial for my liking. I have 6 carabiners and 50m of tubular webbing. What knots do you recommend for building, anchoring and tightening a slackline?
Comment: I haven't rigged one myself, but one point -
I believe that you need to use locking carabiners when rigging a slackline because the tension on the system can exceed the open gate strength of a carabiner.  If you look at the pictures of rigs in the answers, you'll see that the gates often lay on top of each other.  If you're rigging a slackline for a lot of people to use, with all that moving around, there's a definite chance that the carabiners might push on each other's gates.  And you wouldn't want a biner to shatter when you're on the slackline.  :)
Comment: Not sure that it makes that much difference - but I removed the non-locking specificity from the question. (Side note: I've slacklining for years with non-locking 'biners and never had one open, break, etc...)
Comment: What do you find missing from my current answer?  I believe all the information is provided in the linked videos and articles, and illustrated in the pictures.
Comment: @Mr.Wizard -- Your answer is pretty good - but if I want the answer to my question, I have to a) go off this site, b) watch a lengthy video (I read/digest diagrams faster than watch a video) and c) think for myself ;)
Comment: I used to know a method using only webbing and carabiners because that is what I did, but it's been so long now that I can't remember what I did well enough to depict it as an answer yet. I'll get my gear out one day when it's not freezing and try to work it out.
Answer: I am not (yet) a slackliner, but I have been impressed with the methodology of testing and development of Adam Burtle of NWslackline.org.  His site has a number of videos that demonstrate different anchoring and tensioning systems.  He also does line tension measurements and break testing on different setups and materials.
When you watch his videos make sure you have annotations turned on as they often contain important details, corrections or revisions.
I cannot recall seeing an anchor/tensioning system using only carabiners but the line-locker system using a forged rappel ring is simple, light and inexpensive.  Chain links are even less expensive but need to be deburred to protect your webbing.  One of his basic tensioning systems looks like this (the load cell is only for testing of course):

Further illustration and efficiency testing (video).
Videos:
Using line lockers.
Rigging a primitive slackline
Rigging a 2″ line without a ratchet.
In Strength of 3 men, for only $20 (article and video) he rigs a basic pulley system:

More advanced equipment and techniques will be needed for long lines.
Comment: +1 I used those same videos to learn my "primitive" setup. With just carabiners it is easy, you just have to tie it off where you would use the line lockers. Having said that, the line-lockers are very cheap and *really* worth it, they make it easy to untie, decrease the wear on the slackline and makes it look more elegant :)
Comment: @yarian thanks for the vote.  I guess that's what Adam was showing at the beginning of the "Using line lockers" video but an actual setup using that method was not shown (that I have seen).
Comment: Most primitive setups do not use double carabiners like in the photo above. Also, the pulleys are not necessary for shorter slacklines rigged in this way.
And regarding the forged ring; you can actually use a carabiner instead of the ring too. Although it will be much bulkier, and might be bad for your webbing.
Answer: You have probably already seen the excellent resource at www.slackline.com but they have an excellent page on how to tie your slackline to a tree using ordinary webbing and carabiners.
Key image from their sequence:

Then just add a carabiner (with webbing wrapped round it to protect) to the metal ring and you are set.
Total kit required:

length of webbing at each end
4 carabiners
2 metal rings
You could also add some padding to protect the tree

For tensioning, people use 3:1 or even 6:1 pulley systems with some success, but you'll find it hard to get enough tension to avoid bottoming out.
This guy tries a few pulley setups, but still has a fair amount of drop in his line.
Realistically, you'll want a ratchet like this one - it's the only way to get enough tension in your line!
Comment: This addresses making an anchor, but not tying a slackline. Updated the question to make it a little more clear. (Also, I don't have a metal ring.)
Comment: Updated regarding tension - that will be your biggest problem, unless you get a ratchet. Also - metal rings can take the tension, but carabiners may not :-)
Comment: Tensioning is no problem with a primitive system (the rigging method asked about in the question). The multiple wrappings of the webbing works as a primitive pulley-system, multiplying the pulling force. Primitives work for slacklines of up to 50 meters in length.
Comment: With a 30' length of new webbing, I wasn't able to get enough mechanical advantage (using many different materials and configurations) without a ratchet/come-along. After a few days under tension outdoors, it became easy to adjust by hand with a simple 3:1 or 4:1 setup. Clove hitching another biner to the anchor webbing is an easy way to add another "pulley" point to the system. Old climbing rope is a poor anchor material because it's so stretchy, bulky, and high-friction. Webbing and accessory cord both work far better, but still benefit from pre-stretching.
Comment: Please don't set up a slack line without a layer of protective padding between your rope/webbing/ and the tree. It can damage the tree!


Are boxed PC retail copies of Skyrim region-locked?

Question: I've heard that all PC copies of Skyrim require Steam activation and am wondering if this is forcing region locking. I want to buy a UK copy of Skyrim and be able to activate/play it in the USA. Can this be done without modifying the game?
Comment: All I can find is that boxed versions of the game -are- region locked (and so are just about every version of the game really as they all come back to Steam keys).. but no one really answers the question of can you play a game targeted at region A while being at region B (though most of the questions are about people in non-english speaking countries preferring the non-translated version of the game due to how crappy and inconsistent most translations are).
Answer: I am located in India, and the only way I could purchase the retail edition was a version that is imported. All imported editions of Skyrim in the Indian market available are imported from the UK under license.
But the actual retail box does not display the license, the importer's packaging displays the license number of import.
I also have friends who have purchased Skyrim while on business in the USA. They are able to play Skyrim in India.
But India is not specifically a market where Bethesda officially released the game AFAIK. So do not know if it is considered a "region" in the strict sense. But Steam activation worked for me and my friends.
HTH
Comment: This seems about right. I downloaded my copy online, but I did it from Japan with a US-based VPN (one month release date differential = no thanks). Prior to Japan's official release I had to use the VPN before starting Steam, but now I can have it on or off, that is, be detected in US or Japan. I can also use the Japanese translation. In other words, no region-locking has prevented me from playing the game or using localized content, and I've done about every combination possible that would set off the alarms.


Doppler SFX on voice

Question: Hi Gang,
Have a brief for a doppler SFX on a voice throughout a 30 second read and than will pass by on a key couple of words at the end of the read.
Whats the best way to approach this?
Comment: What is the context?
Answer: Off the top of my head, i'd say use a very mild doppler pass at the end, in the key-word pass-by. Doppler plug ins affect pitch, which is fine for cars and whatnot, but the effect of a pitch change on a human voice will stick out like a sore thumb, and potentially sound silly.
If you're after the effect of the voice coming closer and closer, and then whooshing by, you could use eq/panning/reverb/performance to create this effect, and bolster the effect of your slight doppler shift at the end.
Answer: Doppler plug ins such as the Waves Doppler give you the option to bypass any combination of elements that make up the effect, or alternatively adjust the 'strength' of those elements.    As Roger points out, the pitch element generally has an adverse effect on voices and I would also suggest a very low application of pitch or bypassing it altogether.
I imagine the short length of some words will cause problems and it might be worth adding a reverse reverb tail building into the word, allowing the intelligible part of the word to be at the center of the doppler and then reverbing out again.  Depending on your brief this may or may not be useful as it will obviously mess with the natural flow of the read, but on the other hand will assist in highlighting those key words.

Doppler SFX on voice


Can I charge a computer through its USB port?

Question: Can I charge computers by inducing 5-volt into their USB connectors? Is this possible? I noticed that when my EeePC 900 is off but plugged in charger, there is power coming out of the USB port. Can this be a sustainable way of charging a PC, or a flaw in design?
Comment: To answer your side question, power comes out of the USB port when the computer is off for the convenience of those devices that use USB for charging (such as an MP3 player). This means that you can charge the external device without having to turn the computer on. As for your primary question, I've never heard of a computer that's charged via USB.
Comment: This is an old question, but the answers are out of date. Type C USB connections carry enough power, and I know for a fact that some fujitsu laptops allow USB charging on their laptops when you plug into the right place. For instance at my work we have usb based docking stations and that USB connection will charge my laptop.
Comment: @MichaelTodd [Google's new HP-made Chromebook: sleek, lightweight, and micro USB-powered](http://venturebeat.com/2013/10/08/googles-new-hp-made-chromebook-sleek-lightweight-and-microusb-powered/) - now you have. However, although it is possible with Chromebook 11, I have no idea if this works with any other laptop.
Comment: In general, no, it's not possible (for a laptop or similar computer).  Not unless the device is specifically designed to charge through it's USB port (and it states so in the unit's documentation) and the appropriate cable is provided.
Answer: I have an EEE PC with an additional charger which I can use inside my car. It plugs into the cigarette lighter thingie that seems to be standard in every car. When on the move, it does allow me to charge my laptop that way. Very practical.
But charging through an USB port is only possible at one side of the USB connection, not on both sides. Basically, the USB ports on a laptop are used to send a signal out, thus they can be used to power up something. Many rechargable USB devices are designed to get a signal in, thus they are waiting until they receive power through the port. Technically, this is all just a one-direction street.
Still, they could make a laptop that can be recharged through the USB port, if they add a receiving end to it. Basically, that would mean that you can't connect a device to your laptop, but you would be connecting your laptop, as if it's just another device, to another PC. Would this be practical? Maybe if you want to do this to set up a special network or whatever but no one has seen some true value in such a setup. Basically, you'd be downgrading your laptop to a portable hard disk.
Still, as mentioned by the others, an average laptop will require a bit more power to fully charge than other devices. Especially the big screen and the disks are big energy consumers, although the CPU itself also puts some strain on the system. The power a device receives through the USB port is just a fraction of the power that a device would receive through a direct power connection.
The closest thing to a computer that can be recharged through an USB port would be a Smartphone with Windows Mobile. Or perhaps an UMPC system, but I don't know any good UMPC that is recharged this way. I assume you also have a few wishes concerning operating system, diskspace and memory.
Comment: This answer is dated now, right?  Pretty sure there are usb ports that can 'flip' between master/slave status.
Comment: @TheGrimmScientist And USB-C is a thing now too.
Answer: Applying power to a USB port while the computer is powered off sounds like a method of damaging something.
To charge the computer, you need a direct connection to the battery.
A USB port won't give you that. The 5V which comes out of the USB is (more or less) carefully regulated by electronics. Electronics doesn't work backwards.
Comment: Some electronics do work backwards, but not in this case. :)
Answer: I'm aware of no computer that can be charged using the USB port.  The capacity of a USB connection is only up to 500 mA (milli-Amperes) at 5 volts, or 2.5 Watts per powered port. This is not sufficient to actually run a typical laptop these days. Its worthy to note that USB1.1 ports only 100mA.
(Source: our host Jeff Atwood's blog.)
In principle you might be able to get a separate external charger for laptop batteries that was USB-powered, but it would be very slow, and I've never heard of one.
Comment: this is actually not true (capacity of USB being 100mA).  you're correct that USB supplies 5V.  USB1 only supplied 100mA *per port*.  USB2 supplies current in 100mA increments, up to a maximum of 500mA *per port*.  the battery charging spec increases this to 1.8A if the device is only charging and not communicating (tho i don't know if that spec is part of USB2 or USB3).  see http://en.wikipedia.org/wiki/Universal_Serial_Bus#Power
Comment: Fair enough.  However, that still limits one port to 9w, or not enough to run even a relatively low-power laptop.  And no laptop still seems to support USB charging.
Comment: true, but irrelevant; the question's about charging via usb, not running.  theoretically you could trickle-charge a laptop battery over USB, given the circuitry to support that.  i don't know of a product that actually supplies that, however.  (mostly i was just posting a correction to your numbers; i probably should've just edited that in to begin with...)
Answer: While this probably is probably not what you're looking for the HP Chromebook 11in that was released a few months (and recalled recently) charged using a mirco usb port. Its apparently will happily run off a 3 amp usb charger. There isn't a real physical limitation to usb, just like there isn't a real physical limitation to using 3.5mm aux jack to charge a small device (like the iPod Shuffle), but generally its a very bad idea to transfer charge in a direction its not expected to go.
Answer: Go to Amazon.com (or elsewhere) because you can find items such as this one.  It's just over $20.  Well worth it.
http://www.amazon.com/inverter-adapter-charger-notebook-MRI1511U/dp/B003ODVN88#productDetails
Comment: How does this answer *"Can I charge a computer through its USB port?"*?
Answer: I found an answer to this question for myself. I just received it and it is well worth worth it. I ran Dell Latitude E5400 off it last night for 4 hrs and worked great. Check out Targus.com.
Comment: This charger charges Notebooks by usual 19 V and a dedicated charging connector. It only has an additional charging/powering USB port as conventional USB chargers/power supplies. So this does not answer the question at all. See the [User Guide](http://cdn.targus.com/web/uk/downloads/apd046eu_user_guide.pdf). I am flagging the answer as low quality.
Comment: BTW, this is in the UK..


Johnny Ola's cut finger in The Godfather 2 - accident or what?

Question: I noticed something in The Godfather: Part II when, during Hyman Roth's birthday cake presentation, Johnny Ola seems to cut his finger when preparing to cut the cake.  He grabs a napkin to wrap the finger, and holds the finger to his mouth. The next scene, he's leaning on the rail as though it never happened, and nothing more is ever made of the event.
Was this a plot point I missed, or a real accident, or what?
Answer: He didn't cut himself, he got some white icing on his finger after messing around with the cake (taking the sparkler off and rearranging it) and he licked it off and then wiped it with his napkin.
Source: I watched the scene in HD just now. :) It's definitely white and not blood.
Comment: Thanks, Walt.  That makes a lot more sense than what I thought I saw.  Appreciate the fast response!
Comment: +1 I'm still curious about why this moment was included. Was it scripted, or just something that happened spontaneously and was subsequently included? (not that I expect an answer... just interesting to ponder)
Comment: I could easily see it either way. Certainly it makes the scene look authentic. You probably know that Luca Brassi's rehearsal of his speech to Vito was something the actor was doing and FFC decided to include it in the film.


Compatibility of the processor with the motherboard

Question: I have a motherboard Hi-Fi a70u3p (http://www.biostar.com.tw/app/ru/mb/introduction.php?S_ID=773) and I need to buy an intel core i5 6600 or equivalent processor. Does this motherboard support this processor model? If not, then advise similar processor that this motherboard supports.
Comment: "Supported Socket FM2+/FM2 processors AMD A-series/ E2-series processor" - No, this board doesn't support Intel CPUs at all. You need an AMD.
Answer: Your mainboard takes AMD Socket FM2/FM2+ CPUs.  That's a fairly old socket, designed for AMD's APU-series processors, so modern high-power CPUs aren't available for it.
The closest you're going to get to the performance of an i5-6600 is the A10-7890K, currently available from Newegg for $150.  It benchmarks about 10% slower than the i5-6600 for single-threaded work, and about 30% slower for multi-threaded.  This may or may not be sufficient for your purposes.
Answer: As Andy mentioned in the comments, this is an old AMD board. The FM2 socket is a few generations old at this point. You're going to have to find a used CPU that is compatible with the board, as AMD no longer manufactures any CPU that is compatible with it.
You can find a list of supported CPU models by looking for your motherboard's user manual online, or viewing a compiled list on the wikipedia article regarding the FM2 socket, or by using a site such as www.pcpartpicker.com. Good places to look for old hardware are Ebay and a community on Reddit called "r/hardwareswap" (without quotes).


Brand New Monitor Won't Get Input From Computer

Question: I have an old Dell 2350. I found a HD a few months ago and plugged it in and it booted up. So I just purchased a monitor and plugged it in, and put the HD inside and connected the two connections (Bus, and a four pronged connector) and no signal is being sent to monitor.
is this a monitor issue or the HD is just dead? HD is spinning. CPU is turned on :) Yet no signal.. any thoughts?
Answer: Found the solution.
RAM was not in all the way.


Introducing EigenModes from 2D FEM into 3D FEM

Question: This particular FEM question concerns waveguides and FEM 3D simulation. To excite a waveguide with waveport (TE10 and so on), we typically have to solve for eigenvalues ($k$) of helmholtz equation using FEM 2D.$$ \bigtriangledown^{2}\phi_{2D}+k^{2}\phi_{2D}=0 ,\quad\phi_{2D}=E_{z}(TM)\quad or \quad H_{z}(TE)$$ Upon solving, $k$ gives the permissible modes for the particular waveport dimensions and $\phi_{2D}$ gives the field patterns. I have got everything working and understood till this point but I am not sure of how to include these  results into FEM 3D simulation. This document from researchgate (pdf downloads on clicking) says that the mode patterns $\phi_{2D}$ found using FEM 2D are used as the excitation for FEM 3D. However, I dont quite understand how to include this source into FEM 3D.
What I think I must do is incorporate $\phi_{2D}$ (FEM2D) into the in-homogeneous helmholtz equation for FEM 3D as the source $g$ as given below.$$\bigtriangledown^{2}\phi+k^{2}\phi=g$$ But, I am not quite sure if this is correct. I haven't found good sources for waveports either.
Comment: The 2D solution can be used as a Dirichlet boundary condition on the input waveport
Comment: @Steve so you mean like assigning nodal values of 3D problem based on eigenvector of 2D problem? But then I would need to just solve the homogeneous case even for 3D right (g=0) since I would already have the nodal values for $\phi$ on the waveport to start with ? I think i'll give it a try. Out of curiosity, if I don't need "g" for waveports, when is it used?
Comment: The way I've seen this done is to introduce a sheet current $\mathbf{J}= \mathbf{\hat{z}} \times \mathbf{H}$, (where $\mathbf{H}$ is your calculated mode) inside the waveguide and terminate the waveguide with a PML. It's important that energy reflected from your geometry back to the waveport is absorbed, not re-reflected back inside, which is why the PML (or some other absorbing termination) is necessary. For that reason, I don't think a Dirichlet BC is what you want, but I'm happy to be corrected on this point.
Answer: You're looking for waveguide port boundary conditions. I think the most accessible treatment is within Jin & Riley's Finite Element Analysis of Antennas and Arrays, Chapter 5. It's available on Amazon, see https://www.amazon.com/dp/0470401281/. A lot of these formulations were first introduced by Jin-Fa Lee, you can find his works in IEEE Microwave theory and techniques, see http://ieeexplore.ieee.org/abstract/document/85399/ for example. This is a surprisingly complicated feature, you need to choose your discretization approach in the 2D solver rather carefully (mixed elements) if you need to deal with inhomogeneous cross sections that support hybrid modes.
I tend to think about this formulation almost like a domain decomposition approach, where in the main computational domain you expand ${\vec E}$ in subsectional FEM basis (Nedelec) and in the adjacent "port" or "infinite waveguide" domain, you expand ${\vec E}$ in a basis of waveguide modes. The modal solution ${\vec E_{2D}}$ plays two roles, it gives you the "shape" of the excitation currents ${\vec J}$/${\vec M}$, but it also provides the change-of-basis coefficients to establish tangential field continuity between the two domains. You don't need to use PML to match, the "absorption" behavior is built into the modal expansion (in fact, I would advise against using PML here, it's less accurate for modes near cutoff and doesn't absorb evanescent waves, but terminating with a modal expansion can handle both of these).
You are free to either compute these modes numerically by solving the 2D eigenproblem, or represent them analytically (with tensor products of sines and cosines for rectangular waveguides, or Bessel functions for cylindrical waveguides, and so on). While the numerical solution is the most general, there can be advantages to the analytic expansions as well, mainly when it comes to robustly separating/orienting degenerate modes (modes that differ in polarization state or TE vs TM structure, but still propagate with the same k, so the numerical solver can't help but mix them all together). This is particularly acute for circular waveguides.
There's a surprisingly long tail of code to implement this correctly/robustly for the general case: Code to detect canonical shapes and match them with analytic expansions, code to detect the presence of multiple conductors and invoke a 2D poisson solver to find TEM modes (which are also possibly degenerate, think common mode versus differential mode), and finally the general 2D eigensolver for extracting TE/TM modes on non-canonical shapes.
All that said, even though the 2D eigensolve is portrayed as the "last line of defense", you can get pretty far using it alone, at least on simple structures (TE10 waveguides, coaxial cable). So I do think it's a good place to start.


Setup PFSense as a router with 3 WANs, 2 NICs, and an unmanaged switch

Question: So I have been trying to set this up for days and cannot get it to work properly.  I am trying to replace our home router (a crappy Thomson router provided by our ISP) with a PFSense box repurposed from a laptop with a dead screen.  Here is what I have:

PFSense box running 2.1.1-RELEASE(amd64)

2 NICs: an ethernet and wireless card

A cheap 8-port unmanaged switch
3 different routers, each with a separate internet connection (each cheap and none very fast on its own)

What I am ideally trying to achieve is a single wireless network in the house, to which all of the family's devices could connect. This unified network would then load balance all of the requests, keeping everything fast for everyone. I found a post detailing how to do basically what I want here but I can't get the VLANing to work.
I am currently testing with 2 of the three WANs. On my LAN, the PFSense box is the DHCP server for a 192.168.0.1/24 network. This is also my WLAN running from the wireless NIC on the PFSense box. The ethernet NIC and each of the WAN routers is plugged into the unmanaged switch. One WAN is on a 192.168.1.1/24 network where the PFSense box has a static IP of 192.168.1.1 and the WAN router has an IP of 192.168.1.2. This is assigned to the re0 (ethernet) interface of the PFSense box. The other WAN is on a 192.168.2.1/24 network where the PFSense box has a static IP of 192.168.2.1 and the WAN router has an IP of 192.168.2.3.  This is assigned to a VLAN interface on the re0 NIC.
Both the 192.168.1.2 and 192.168.2.3 routers have been set as gateways for their respective networks and interfaces. However, while the 192.168.1.2 route works fine, I cannot even ping 192.168.2.3. I can ping the PFSense box on all of its addresses though.
I'm sure there is something simple that I am missing, but I can't figure it out.  Any ideas?
Answer: Try setting up a static route on the problem router? Wan (as another subnet) cant ping any hosts on the other subby unless you nat it. But to get around nat you can setup a static route.


What was the Nietzsche's argument against theory of evolution?

Question: I had read about it a decade ago, but it looks like now I have forgotten his point. Can I know what was his argument against Darwin?
Comment: Found this as well as many other links in response to the google query, "Nietzsche criticism of Darwin." https://digitalcommons.lsu.edu/cgi/viewcontent.cgi?article=1018&context=prs_pubs
Answer: Nietzsche apparently believed that evolution by natural selection accounted for species diversity, but he also believed that the quality of various lifeforms was differentiated by the degree to which they possess a 'vitalistic force'.
He maintained that life was not only impelled by a struggle for survival, but by a drive towards 'ever-greater complexity, diversity, multiplicity and creativity'.
Reference: https://philosophynow.org/issues/29/Nietzsche_and_Evolution
Comment: I think you make an accurate, concise statement of Nietzsche's dissatisfaction with Darwin. One upvote.
Answer: I can offer only a derivative response.
On a side note:
How much did Nietzsche know?

Nietzsche, all agree, is unlikely to have read either  Darwin's  The Origin of Species  (1859) or his  Descent of Man  (1871).  However, he had a basic if not entirely  accurate  grasp  of  Darwinism  derived  from  popularizers  and  synthesizers, and his direct engagement with the evolutionary theory of [Herbert] Spencer, in the latter's three-volume  System of Synthetic Philosophy  (1862–67), is evident.  He mentions  Darwin,  Darwinism, and  Darwinians in works ranging from his early  Untimely Meditations  (1873) on the rationalist critic of Christianity,  David  Strauss,  to the notes  of the late  1880s  that were  assembled into a book by his sister and later published under the title  Der Wille zur Macht. (Catherine Wilson, 'Darwin and Nietzsche: Selection, Evolution, and Morality', Journal of Nietzsche Studies,  Vol. 44, No. 2 (Summer 2013), pp. 354-370: 355.)

The clash of viewpoints

To summarize,  Nietzsche  was  engaged  in  a three-cornered  argument.  In  one corner stood the traditional Christians with their commitment to the repression of sensuality as evil and sin, and their supernaturalism.  In another corner were the agnostic or atheistic philosophers who wanted to assert, preserve, and even extend  Christian values in the face of science, including Kant,  Schopenhauer, Darwin,  Strauss, and  Spencer. In the third corner, there was  Nietzsche himself, aesthetically repelled by the masses and their unhealthy propensities, distressed by the suffering of superior  individuals, and hostile to traces  of asceticism and Orientalism  in  his  contemporaries.

In some respects, then, Nietzsche is a Darwinian. He believes that the history of humanity is part of natural history and that there is no sacred history as opposed to a history of sacerdotalism, and he believes (except in his idealist moments) that mental powers supervene on physical organization. Like Darwin, he believes that  individuals  vary  in  their  intrinsic  quality: some  are  superior  to  others. He is also much closer to the view of the modern, neo-Darwinian biologist than were the nineteenth-century  Darwinians. It is the individual that matters to itself, regardless of the fate of the "species" to which it belongs. But he rejects the basic Darwinian picture, according to which all differences between members of the  same  species  are  necessarily  minute  and  often  invisible  and  at  the same time cumulatively significant in the production of new "races" and ultimately, new species. He rejects as well the Darwinian postulate that altruism and self-abnegation are human traits acquired in the course of evolution and further refined in the highest forms of civilization, identifying instead an unnatural and sinister  origin  for  them  in  archaic  resentment [ressentiment: GT]. (Wilson: 366-7.)

It doesn't affect the substance of her statement of Nietzsche's views about Darwin but the blithe reference to 'the agnostic or atheistic philosophers who wanted to assert, preserve, and even extend Christian values in the face of science, including Kant, Schopenhauer, Darwin, Strauss, and Spencer' lacks historical nuance.


Multiple triggered send definitions using same data extension

Question: I have 5 scenarios where I want to send a triggered email.  Each scenario has 1 unique variable that will be dynamically populated.  Would it be problematic to create one data extension that has the 5 necessary fields and attach that data extension to each of the 5 triggered send definitions?  I'd make each field nullable.  The developer responsible for the upstream process that generates the values for the 5 variables is doing it in a manner that makes me think I need to take this approach.
Answer: Yes, you can use the same data extension for multiple triggered send definitions. There is no issue.
Just make sure that the subscriber key is unique from the upstream for all the scenarios. If the subscriber key is same, then the email address is overwritten in all subscribers with the latest email address.
Also if your triggered send data extension contains a primary key, make sure it is unique across all scenarios, otherwise the data record is not inserted and no email is sent.


Is there an easy way to cut out white background in Illustrator?

Question: I have to process 120 images, I already did it with fireworks but the quality is depressingly low, I see that Illustrator only lets me cut the white background with the Pen tool, it doesn't have Magic Wand, with the Pen tool it will take me two days to cut out the white of 120 images. Is there any other way to do it? The sad thing is that I already had transparent GIFs saved with Fireworks, but each time I import one in Illustrator the background returns white. Any advice please? Thank you..
Comment: If the images are **raster**, as in GIF.. then Illustrator is the wrong tool. Photoshop is better suited for background removal of raster images. If the images *already* have a transparent background, then the issue may be GIF.. using PNG may allow that transparency to be recognized within Illustrator. Illustrator generally doesn't support a great deal where GIF is concerned.
Answer: Illustrator places ok GIFs which have colored pixels and totally transparent pixels. I tried it:

The result is converted to RGB, but the transparency stays (the grey gradient below is for testing it)
Pasting GIFs from another program removes the transparency, so import with File > Place.
If you want only to remove backgrounds with no other reason to visit in Illustrator, try GIMP. There you can change one color to full transparency and you have a bunch of other background removal tools, for ex. you can draw paths, edit them if needed and make with them selections. There's also well working edge following selection lasso.
I guess you should have also Photoshop if you have Illustrator. If true, use it. Its background removal tools are something we see as the standard.
Comment: Although I kinda feel like anyone who imports a gif into a vector application should be fined.
Comment: @Joonas how much and where I should pay to?
Comment: I think I would say $10 per gif to a good charity. So OP's 120 gifs would amount to $1200.


In a conflict between Guru and Shastra, what should be precedent?

Question: It is often observed subjectively in various instances, teachings of many Gurus may contradict Shastra. In such a case, what should be considered superior? What does Shastra itself say about this?
Comment: A Guru whose teachings contradicts Shastras especially Shrutis is no real Guru. If they supplement, that alone is the test of real Guru. In Kaliyuga, number of fake Gurus are very high and most of the people think anyone with mere external religious symbols to be a real guru as they themselves are unaware of their scriptures.
Comment: I think new philosophies emerged when someone disagreed with his Guru.. for example, Ramanuja didn't agree with his guru Yadav Prakash's interpretation (**Advaita Vedānta**) on few Upanisads and new philosophy **Vishishtadvaita Vedanta** emerged...
Comment: Follow _your_ guru. Ask clarification from him. Not many other. If many are contradicting Shastra, how are they gurus?
Comment: @YDS Ramanuja did not disagree with the Shastras, but simply the Advaitic INTERPRETATION of the Shastras.
Comment: @HayagreevRam that's what i commented above... :)
Comment: Obviously, the Shastras are considered to be superior, as the Shastras (especially the Shruti (Vedas), but also the Puranas and Smritis) are the main source of all knowledge. They are the very foundations of our Dharma. If the teachings of Gurus go against the Shastras, then these people ***may*** not be proper, real, and bonafide Gurus. Their teachings must not be accepted at all. By the way, which Gurus have you seen, whose teachings go against Shastra?
Comment: Guru is one who has studied and realized all scriptures. He knows his disciple and what instructions and best for him. If there is some apparent contradictions, ask your Guru. Express your doubts because if you don't clear them, you may loose faith and stop pursuing spiritual life. You may make offenses to your Guru and that is a very bad thing and dangerous.
Answer:
In a conflict between Guru and Shastra, what should be precedent?

The shastra takes precedence.
From the Manusmriti:

2.6 - The entire Veda is the root-source of Dharma; also the Conscientious Recollection of righteous persons versed in the Veda [Smritis], the Practice of Good (and learned) Men [Achara], and their self-satisfaction [ātmanastuṣṭi].

The order of precedence is given above in that verse, with shruti taking precedence over smriti, smriti taking precedence over achara, and achara taking precedence of ātmanastuṣṭi.
The teachings of the guru falls under "Achara".
The reason Shruti and Smriti take precedence, is because they are more reliable than one's guru's teachings, and also because the guru's duty is to teach the scriptures, so if he says to go murder, then that's wrong, because it conflicts with scriptural statements that say not to murder.
Answer: The meaning of Shastra;

Shastra (शास्त्र) is a Sanskrit word that means "precept, rules, manual, compendium, book or treatise" in a general sense. The word is
  generally used as a suffix in the Indian literature context, for
  technical or specialized knowledge in a defined area of practice.
Shastra has a similar meaning to English -logy, e.g. ecology, psychology, meaning scientific and basic knowledge on particular
  subject. Examples in terms of modern neologisms include
  bhautikashastra "physics", rasayanashastra "chemistry", jīvashāstra "biology", vastushastra "architectural science", shilpashastra "science of mechanical arts and sculpture", arthashastra "science of politics, economics" and nitishastra "compendium of ethics or right policy".
https://en.wikipedia.org/wiki/Shastra

Any Shastra will evolve over a period of time, by the observation of many issues relating to one particular subject, as a result of discussions, etc.  It may involve many experts of that particular subject. Let us call the experts of that field with reverence  as Gurus.  However, compilation of a Shastra may be done at a later date by a single Guru and that Shastra will go alongwith the name of that Guru only.
For example: The theories of Economics were in vogue in India for long.  However, Chanakya codified in to Artha Sastra.
Similar is the case with any Shastra.

Now let us visit the question: what should be considered superior - Guru or Shastra, if teachings of Gurus contradict Shastra?
A genuine question indeed.
One person read an authoritative book on Vaidya shastra - Medical treatise. That person got some doubts in respect of a particular issue.
Here we have to consider 2 situations.

the Professors of the college could not clear those doubts.

Here, the situation is that the book read was authoritative one, but no one nearby could clarify those doubts.  In this case, it is better to stick to the book, though not understood completely, as Professors nearby cannot be relied upon.

There is atleast one Professor, who could not only clarify doubts, but could teach an extensive part of the issue also.

In this case, the Professor or Guru is the Ultimate.  Without hesitation, he should be followed, even if that Guru may say something differently than that was recorded in the authoritative book.

ईश्वरो गुरुरात्मेति - Iswara is Guru and Atman ( Dakshinamurthy Stotram - 7th Sloka)
Sri Krishna said in B.G.

तद्विद्धि प्रणिपातेन परिप्रश्नेन सेवया।
उपदेक्ष्यन्ति ते ज्ञानं ज्ञानिनस्तत्त्वदर्शिनः।।4.34।।
Know that through prostration, iniry and service. The wise ones who
  have realized the Truth will impart the Knowledge to you.
Answer: Shastra is a general term. If you mean sruti, then a true guru cannot contradict sruti. A true guru is living sruti. If you mean smriti, or any other meaning to scripture, than a guru can contradict, for two reasons. First, not being sruti, they are by definition written by man, not by God. Second, different sects accept different smritis as smriti. The real question is what is a 'true' guru. Swami Vivekananda writes (Complete Works, Volume 3, Bhakti Yoga, Qualifications of the Aspirant and Teacher, available here - https://advaitaashrama.org/cw/content.php):

In regard to the teacher, we must see that he knows the spirit of the scriptures. The whole world reads Bibles, Vedas, and Korans; but they are all only words, syntax, etymology, philology, the dry bones of religion. The teacher who deals too much in words and allows the mind to be carried away by the force of words loses the spirit. It is the knowledge of the spirit of the scriptures alone that constitutes the true religious teacher. The network of the words of the scriptures is like a huge forest in which the human mind often loses itself and finds no way out.  — "The network of words is a big forest; it is the cause of a curious wandering of the mind." "The various methods of joining words, the various methods of speaking in beautiful language, the various methods of explaining the diction of the scriptures are only for the disputations and enjoyment of the learned, they do not conduce to the development of spiritual perception"
— Those who employ such methods to impart religion to others are only desirous to show off their learning, so that the world may praise them as great scholars. You will find that no one of the great teachers of the world ever went into these various explanations of the text; there is with them no attempt at "text-torturing", no eternal playing upon the meaning of words and their roots. Yet they nobly taught, while others who have nothing to teach have taken up a word sometimes and written a three-volume book on its origin, on the man who used it first, and on what that man was accustomed to eat, and how long he slept, and so on.
Bhagavân Ramakrishna used to tell a story of some men who went into a mango orchard and busied themselves in counting the leaves, the twigs, and the branches, examining their colour, comparing their size, and noting down everything most carefully, and then got up a learned discussion on each of these topics, which were undoubtedly highly interesting to them. But one of them, more sensible than the others, did not care for all these things. and instead thereof, began to eat the mango fruit. And was he not wise? So leave this counting of leaves and twigs and note-taking to others. This kind of work has its proper place, but not here in the spiritual domain. You never see a strong spiritual man among these "leaf counters". Religion, the highest aim, the highest glory of man, does not require so much labour. If you want to be a Bhakta, it is not at all necessary for you to know whether Krishna was born in Mathurâ or in Vraja, what he was doing, or just the exact date on which he pronounced the teachings of the Gitâ. You only require to feel the craving for the beautiful lessons of duty and love in the Gita. All the other particulars about it and its author are for the enjoyment of the learned. Let them have what they desire. Say "Shântih, Shântih" to their learned controversies, and let us "eat the mangoes".
The second condition necessary in the teacher is — sinlessness. The question is often asked, "Why should we look into the character and personality of a teacher? We have only to judge of what he says, and take that up." This is not right. If a man wants to teach me something of dynamics, or chemistry, or any other physical science, he may be anything he likes, because what the physical sciences require is merely an intellectual equipment; but in the spiritual sciences it is impossible from first to last that there can be any spiritual light in the soul that is impure. What religion can an impure man teach? The sine qua non of acquiring spiritual truth for one's self or for imparting it to others is the purity of heart and soul. A vision of God or a glimpse of the beyond never comes until the soul is pure. Hence with the teacher of religion we must see first what he is, and then what he says. He must be perfectly pure, and then alone comes the value of his words, because he is only then the true "transmitter". What can he transmit if he has not spiritual power in himself? There must be the worthy vibration of spirituality in the mind of the teacher, so that it may be sympathetically conveyed to the mind of the taught. The function of the teacher is indeed an affair of the transference of something, and not one of mere stimulation of the existing intellectual or other faculties in the taught. Something real and appreciable as an influence comes from the teacher and goes to the taught. Therefore the teacher must be pure.
The third condition is in regard to the motive. The teacher must not teach with any ulterior selfish motive — for money, name, or fame; his work must be simply out of love, out of pure love for mankind at large. The only medium through which spiritual force can be transmitted is love. Any selfish motive, such as the desire for gain or for name, will immediately destroy this conveying median. God is love, and only he who has known God as love can be a teacher of godliness and God to man.
When you see that in your teacher these conditions are all fulfilled, you are safe; if they are not, it is unsafe to allow yourself to be taught by him, for there is the great danger that, if he cannot convey goodness to your heart, he may convey wickedness. This danger must by all means be guarded against.  — "He who is learned in the scriptures, sinless, unpolluted by lust, and is the greatest knower of the Brahman" is the real teacher.


Can I apply for a subsidized health insurance plan when I lose my job?

Question: Up till now I've been paying for my own insurance as my employer did not offer it. I was paying $500 / Month which was not ideal but manageable while I was working ( my employer did not cover me ). I just found out I'm losing my job in 2 weeks, and I'm not going to have enough income to pay the $500. Can I change my insurance to a subsidized insurance until I am able to get insurance through an employer again? If my income goes from $60k to $0k, what do I put down for my income? Is it based on my previous income or future income?
Comment: You don't apply for "Obamacare". You apply for health insurance.
Answer: Yes.  While there are the normal annual enrollment periods, you are also granted a "special enrollment period" triggered by certain "qualifying life events."  You'll typically have 60 days to make your election once you lose your prior coverage or have a different life event that would allow you to make a change.
Some common qialifying life events are:

Loss of health coverage

Job loss
Insurance company failure
Losing medicaid (or similar) eligibility
Turning age 26 (removal from parent's coverage)

Marriage
Divorce
Childbirth/adoption
Change in home address (coverage may only apply to certain counties or zip codes, if you move out of the coverage area you get a special enrollment period)

You should go to www.healthcare.gov and see what your options are using you new expected annual income after the job loss.  Good luck!
Comment: You would report your expected total annual income for this year.  When you file taxes one of the things you will report is the amount of subsidy you've received, if your income changes such that your subsidy would have been different that will all shake out when you file your taxes.
Comment: I did some research, the thing that seems unclear is the following, Making 70k a year, I would get no help, I already paid for my own insurance for half the year. Now my AGI will go from 70k to 15k ( unemployment ). So which would I report when I give them my expected AGI when re-applying.... 15k? or 47k ( 6 months of 70k and 6 months of 15k ) I want to be honest, but it's unclear if they want the expected income for a year following when you apply, or the actual tax year.
Comment: Are you expecting to be unemployed for an extended period of time?  The market is pretty good right now for engineers.
Comment: ok I found the answer to that too "Yes. Savings on a Marketplace plan are based on your estimate of income for everyone in your tax household for the full calendar year you want coverage." but that seems unfair .... I 've already paid a bunch for insurance, and now that I don't have a job my concern is affording rent, food, and insurance. I didn't save up extra money for health .....
Comment: @PeteB. I certainly hope not, but I'm just trying to plan, I really wasn't expecting this .... the company went out of business


Spell check with multiple dictionaries

Question: How can I use multiple dictionaries with the Emacs spell checker? Specifically I want to use a British English dictionary and a medical English dictionary at the same time.
Comment: The solution can use `flyspell` but doesn't have to. That way the answers can be relevant to more people.
Comment: Are you using `flyspell`?
Comment: Yes, I'm using `flyspell`.
Answer: Hunspell can spell check with multiple dictionaries, and you can configure this to work with Emacs. This is how I do it on OS X 10.11, with Emacs 25.0. It will not work with older Emacsen.
Install Hunspell
brew install hunspell

Download Hunspell dictionaries from LibreOffice and OpenMedSpel.
cd ~/Downloads/

curl http://extensions.libreoffice.org/extension-center/english-dictionaries/releases/2016.04.01/dict-en.oxt > dict-en.oxt
unzip dict-en.oxt en_GB.aff en_GB.dic

curl -L https://addons.mozilla.org/en-US/firefox/downloads/latest/6526/addon-6526-latest.xpi > openmedspel.xpi
unzip openmedspel.xpi dictionaries/OpenMedSpel.{aff,dic}
mv dictionaries/OpenMedSpel.dic en_US-med.dic
mv dictionaries/OpenMedSpel.aff en_US-med.aff

Put the dictionaries in ~/Library/Spelling/.
mv *.aff *.dic ~/Library/Spelling/

Add this to ~/.emacs/init.el:
    (with-eval-after-load "ispell"
      (setq ispell-program-name "hunspell")
      (setq ispell-dictionary "en_GB,en_US-med")
      ;; ispell-set-spellchecker-params has to be called
      ;; before ispell-hunspell-add-multi-dic will work
      (ispell-set-spellchecker-params)
      (ispell-hunspell-add-multi-dic "en_GB,en_US-med"))

Comment: I realized it was my `ispell.el` in `/usr/share/emacs/site-lisp/` shadowing the newer `ispell.el` in Emacs25... See http://unix.stackexchange.com/questions/28483/whats-the-difference-between-usr-share-emacs-site-lisp-directory-and-usr/289124#289124 for anybody who might be encountering the same issue.
Comment: Note that the function `ispell-hunspell-add-multi-dic` seems to be not present in older versions of `ispell.el`, even the one in Emacs 24.5. I had to download the newest file at https://github.com/emacs-mirror/emacs/blob/master/lisp/textmodes/ispell.el and byte-compile it again to make it work.
Comment: I'm using Emacs 25.0. I added a note about it working only on Emacs >= 25.0.
Comment: I installed Emacs 25. However, strangely I met the following error: `Symbol's function definition is void: ispell-hunspell-add-multi-dic`, though I'm sure in `/usr/share/emacs/25.1.50/lisp/textmodes/ispell.elc`, the function is present. Any idea how it might have happened? Thanks.
Answer: Suppose you already downloaded en_US-med.dic and en_US-med.aff and installed hunspell
Step 1, run hunspell -D in shell, which will tell the directory where hunspell  searches for dictionaries, copy en_US-med.dic and en_US-med.aff to that directory.
Step 2, insert below code into ~/.emacs,
    (setq ispell-program-name "hunspell")
    ;; you could set `ispell-dictionary` instead but `ispell-local-dictionary' has higher priority
    (setq ispell-local-dictionary "en_US")
    (setq ispell-local-dictionary-alist '(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US,en_US-med") nil utf-8)))
    ;; new variable `ispell-hunspell-dictionary-alist' is defined in Emacs
    ;; If it's nil, Emacs tries to automatically set up the dictionaries.
    (when (boundp 'ispell-hunspell-dictionary-alist)
      (setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist))

We actually pass the option "-d en_US,en_US-med" to the hunspell CLI so it can use TWO  dictionary "en_US" and "en_US-med" at the same time.
The "-d" options is documented in hunspell manual (man hunspell in shell)
Here is the quoted text from hunspell manual:
-d en_US,en_geo,en_med,de_DE,de_med

       en_US  and  de_DE  are  base dictionaries, they consist of aff and dic
       file pairs: en_US.aff, en_US.dic and  de_DE.aff,  de_DE.dic.   En_geo,
       en_med,  de_med  are  special dictionaries: dictionaries without affix
       file. Special dictionaries are optional extension of the base  dictio‐
       naries  usually  with  special (medical, law etc.)  terms. There is no
       naming convention for special dictionaries, only the ".dic" extension:
       dictionaries  without affix file will be an extension of the preceding
       base dictionary (right order of the parameter list needs for good sug‐
       gestions). First item of -d parameter list must be a base dictionary.

Tested on Emacs 24.3, Debian 7 with the word "fibrochondritis".
Should work at Emacs 23+ on any OS.
Please note on Windows the easiest way to let hunspell know the search path is to setup environment variable DICPATH (it's documented in hunspell manual).
BTW, it's very possible the hunspell executable from Cygwin/MSYS2 only recognises path in UNIX format.
Comment: That method doesn't allow me to use *multiple* dictionaries.
Comment: The code I gave IS multi-dictionary.
Comment: I see, thanks for pointing that out – I didn't notice the `-d` option.
Comment: Well this doesn't seem to be working for some reason. When I use the -d option in the command line it works, but in Emacs, `helm-flyspell` seems to somehow only use the dictionary with the system language.
Comment: helm-flyspell might use aspell.

Spell check with multiple dictionaries