Shift in energy levels of transistors

Question: As I was reading basic electronics, PN-junction diodes and two terminal MOSFETs, I understood the position of the fermi energy level and position of valence and conduction band in those devices. But I would like an explanation on how the bending of the valence or conduction bands occurs with the application of proper forward bias for either an N- or P-type PN-junction diode or a two-terminal MOSFET.
Comment: both of the above
Comment: Are you doing your research online, or are you a student with text books on the subject? This is very basic stuff in text books, so if you are a student I would highly recommend reading ahead a bit.
Comment: actually the book i have only states that there is a bend in energy bands, moreover the diagram shows that the fermi energy level is constant but the intrinsic fermi level bends too in case of a 2 terminal mosfet with p-substrate and forward bias
Comment: When you say "i would like an explanation on how the bending of the valence or conduction bands occurs...", do you mean "in what fashion do they bend" or "why do they bend"?
Answer: AFAIK the statement that energy levels actually bend is wrong. We are just extrapolating diagrammatically to show how the two conduction bands and valence bands are linked with a space charge region in between.
Lets just consider the case of a pn-junction.
First, when the two parts, p and n are not forming a junction, then, you will agree that the fermi level shifts upwards and downwards in the p and n type materials from the middle position of energy band gap? How?
Take the case of an intrinsic material where number of electrons in the conduction band will be equal to the number of holes in the valence band. This means that the overall energy balances somewhere in the middle of the forbidden band gap. Thus, for an intrinsic semiconductor, the fermi level lies approximately at (Ec+Ev)/2.
Now, when we dope it with a pentavalent impurity, thus creating an n-type semiconductor, we are effectively adding more electrons in the conduction band than there are holes in the valence band (owing to the extra discrete energy level inserted by the dopant near the conduction band) Thus, the balance of energies tilts in favor of the conduction band and the fermi level now lies somewhere closer to the valence band. Similarly, the fermi level for a p-type semiconductor lies near the valence band.
Now, let us create a junction with these two types of semiconductors. By creating a junction, we create a concentration gradient and that results in diffusion. How long would this continue? As long as there is graident, or there is some force that can equally oppose this process of diffusion across the junction. But what does that equilibrium condition mean in terms of energy? When no more diffusion can take place, it basically means that the fermi levels of both p-type and n-type materials are now equal (since unequal energy levels creates a gradient?) Thus, the Fermi levels of the two materials are equal. But what we did there was to reduce the fermi level from the center of band gap in case of p-type and raise it above in case of n-type. Thus, for an electron to jump from the valence band of the p-type material to the conduction band of the n-type material, it now needs energy that is equal to the total displacement of fermi levels, i.e. downward shift on p-type fermi level plus upward shift in n-type fermi level. This is the minimum energy that must be provided to the electron through external bias (forward bias) for the junction to conduct and would be called the barrier potential.
So, I think, it is not the forward bias that causes the bend, forward bias just helps cross this small barrier or hill. The bend is due to the shift of fermi levels and as a consequence, the entire energy profile of the n-type material shifts downwards, relative to the p-type material (because both will have the same fermi level)
I hope this helps, it is a little difficult to visualize things in text.

Shift in energy levels of transistors


How many devices can connect to this Wireless USB Adapter on Raspberry Pi?

Question: I want to create a WiFi hotspot(access point) using Raspberry Pi. This is for my college project and I wanted to know how many devices can simultaneously access the WiFi hotspot on Raspberry Pi. I want to know the exact number.
I want to use TP-LINK TL-WN823N 300Mbps Mini Wireless N USB Adapter (link: http://www.tp-link.com/en/products/details/cat-11_TL-WN823N.html).
Answer: No one can give you an exact number for "maximum connected devices" here, except perhaps if it is a limitation of the adapter (which has nothing to do with the pi).  Such a figure would be meaningless anyway, since it is probably far higher than than could be actively serviced.  There is no point assuming you can connect 20 devices if you only have the throughput to service 4 of them.
Network service is generally evaluated on throughput, not number of connections.  You could have a large number of connected devices doing nothing, but if all of a sudden they all want to engage in transmissions as fast as they can, you might be down to a very small number (including zero1) of functional connections.   The in-and-out-again throughput on the pi's USB bus will be half the maximum (~2240 Mbps), which is still greater than 300 Mbps / 2, so your pass-through max here will be 150 Mbps total for all devices.  That is an optimistic number.
In theory, that means you could connect 150 devices at 1 Mbps.  I am dubious the adapter itself will really allow for that (but again, this has nothing to do with the pi and you should investigate elsewhere, e.g., our larger sibling site Super User).  If it did, you would have to severely rate limit them to prevent the problem I mentioned in the last paragraph regarding functional connections.

1. As you approach the maximum total throughput of the router bottleneck, the per connection latency grows without bound, meaning all devices on a busy network may grind to a halt and remain that way until some of them give up.


Is it safe to use the Abandoned Shack for storage?

Question: Is it safe to leave things in the abandoned shack chest and dresser after you join the dark brotherhood?
Answer: I've tried storing items in the shack too; it has not disappeared until now, though I highly doubt it will remain there forever like it does for houses.
I read that the game engine is resetting stuff once in seven days (in Skyrim time), so if you're not revisiting the shack in seven days, the stuff would disappear.
It is safer to keep the items in the guild instead. Or more preferably, in your own house.
Comment: alright thanks i was confused because ingots and assorted jewelry and stuff was gone but the daedric artifacts i had were still there so i didnt know if it was possible to get robbed or something crazy was happening. house=bought lol


If I direct my website pages via Javascript (not links), will my pages become Orphan Pages?

Question: If I direct my website pages via JavaScript (not links), will my pages become Orphan Pages? Because we have website filters that would like to move the functionality by API call.
Comment: By "direct your website" do you mean that users clicking between pages will be handled by JavaScript without using classic `` links?
Comment: Yes @StephenOstermiller
Answer: According to this post from SeoProfiler JavsScript can be problemetic.  They cite John Mueller of Google (and an occasional contributor here).

If your website uses JavaScript links, not all pages of your website
might be indexed by Google. In general, your website should not rely
on JavaScript.

They provide the following four examples of hyperlinks and whether Google would typically crawl them.
This is a regular a href link that will be crawled by Google.
Will be crawled

Google will not crawl this link because it is not an anchor.
Not crawled

This link is in an anchor, but it does not use the href attribute. That's why Google won't crawl it.
Not crawled

This link will be crawled by Google because it is an anchor with a href attribute.
 Will be crawled

While Google can crawl JavaScript, it seems the problem lies in the format of the link.  If your API doesn't present something that Google will recognize as a link, it's a strong possibility that Google will not be able to traverse your files.
Comment: **Use real links!** Fake links (like that span) are impossible for some users to navigate, namely those who use a keyboard or especially a screenreader. (This isn't a coincidence; Googlebot works similarly.) And you'll annoy people like me who want to shift+click or drag and drop or right click on the "link".
Answer: If you don't use  links, Googlebot will not be able to crawl your site.  All of your pages will look like orphan pages to search engines.
It is fine to handle navigation with JavaScript, as long as you use regular links that are visible to search engines.   You would typically do something like:

From that, search engines can find links to foo.html while users only execute the JavaScript.  Returning false from the onclick handler prevents default action specified by the href from happening for users.


Why was the 11th Doctor flying the 10th's TARDIS?

Question: In Day of The Doctor, why was the 11th Doctor flying the 10th's TARDIS? They get in 10's TARDIS, but 11 starts flying it.
Comment: Same software, different case.
Answer: The 11th Doctor appeared to the 10th through a time fissure:

10th Doctor: Back, both of you, now! That's a time fissure. A tear in the fabric of reality. Anything could happen.

The 11th Doctor is the newest regeneration of the Doctor, and 10 believes that 11 should remember what's going on:

10th Doctor: Okay, you used to be me, you've done all this before. What happens next?
  11th Doctor: I don't remember.
10th Doctor: How can you forget this?
11th Doctor: Hey, hang on. It's not my fault. You're obviously not paying enough attention.

When the 3 Doctors get to the Tardis it starts having problems:

10th Doctor: Ow! The desktop is glitching.
War Doctor: Three of us from different time zones. It's trying to compensate.
11th Doctor: Hey, look. The round things.
10th Doctor: I love the round things.
11th Doctor: What are the round things?
10th Doctor: No idea.
11th Doctor: Oh dear, the friction contrafibulator. Ha! There, stabilised. (The Tardis changes again.)
10th Doctor: Oh, you've redecorated. I don't like it.

11 stabilized the Tardis to his "desktop", 10 doesn't like it. It may be akin to going from one Linux distribution to another or from Windows 7 to Windows 10, everything is there but maybe not where you expect, so it made sense for 11 to pilot his "desktop".
In Summary:

Eleven instigated the adventure when he met Ten through the time
fissure.
The fissure was happening to Eleven, not Ten who was a
bystander  .
Eleven was the furthest point in the Doctor's time line
so he should have the best chance of remembering what is occurring  .
The Tardis was set to Eleven's desktop.

Out of universe, Matt Smith was the incumbent Doctor, so he got to take the lead over David Tennant.
Comment: @user24601 technically it happened to all of the Doctors, but from 10s perspective in Elizabethan England, 11 came through it.
Comment: In-universe, wouldn't the time fissure be happening to the War Doctor?
Comment: That makes sense..thanks
Answer: Plus, it does always compensate to the LATEST Doctor's incarnation (conviniently fitting with the out-of-universe reality, where the latest doctor should take the lead...)
I do like how they did give Hurt the stellar. Sort of. He was in and out-universe main character after all. He was hurting, a terrible choice thrusted upon him. And the moment was just that. A moment to make the right choice; to get help, to think it through and solve it.
Anyway, that last part was just poetic, not adding much to the answer :P.
Comment: Does this add anything to the existing answer? Your first paragraph is a point already made by NikolaiDante, and the second, while a nice bit of wordplay, doesn't answer the question.
Comment: Should I delete it?

Why was the 11th Doctor flying the 10th’s TARDIS?


greene and krantz, function of one complex variable, Theorem 3.1.3

Question: Why is it that
$$
f(z)=\frac{1}{2\pi i}\oint_{\partial D(0,1)}\frac{\overline\zeta}{\zeta-z}d\zeta=0,\forall z\in D(0,1) ?
$$
Answer: We may parametrize the circle as $t\mapsto e^{it}$, $0<t<2\pi$, then
$$f(z)=\frac{1}{2\pi i}\int_0^{2\pi}\frac{e^{-it}}{e^{it}-z}ie^{it}dt=\frac{1}{2\pi }\int_0^{2\pi}\frac{1}{e^{it}-z}dt =\frac{1}{2\pi }\int_0^{2\pi}\sum_{n\geq0} z^ne^{-(n+1)it}dt=0$$
since $|z|<1$ (which by the M-test ensures that the last sum converges uniformly, and we may switch the order of integration and summation).
Comment: Thank you very much, AD. This is a very nice and clear proof. Especially I like the series expansion.
Comment: I am happy to help.
Answer: Here is a different approach, circumventing the use of infinite series. We know that
$$\frac{\zeta^*}{\zeta-z} = \frac{\zeta\zeta^*}{\zeta(\zeta-z)} = \frac{1}{\zeta(\zeta-z)}$$
for $\zeta \in \partial D(0,1)$. If $z = 0$, we have $z^{-2}$ and when we integrate via A.D.'s parametrization, we immediately obtain 0. Otherwise, by partial fractions we have
$$\frac{1}{\zeta(\zeta-z)} = \frac{1}{z (\zeta -z)}-\frac{1}{\zeta  z}$$
And the integral becomes
$$\frac{1}{2\pi iz}\int_{\partial D}\frac{1}{\zeta -z}d\zeta - \frac{1}{2\pi iz}\int_{\partial D}\frac{1}{\zeta}d \zeta$$
Each of these integrals gives you $2\pi i$ and after subtracting, we have 0.
Comment: Great! This is a very smart solution. Aleks, thank you very much. Intelligence is unlimited!


Why are the neutrino flavour eigenstates and mass eigenstates different?

Question: Why does this happen for neutrinos and not for say, electrons and muons. Is there some way to predict which particles might oscillate amongst their flavour and which won't?
Comment: Related: http://physics.stackexchange.com/q/22151/
Comment: Related: http://physics.stackexchange.com/q/2949/2451 and links therein.
Answer: To make it short, you need "proper" Mass/Energy Eigenstates and "proper" flavour Eigenstates.
The mixing theory means that you have real coherent states. This works very well since the mass differences of Neutrinos are extremely small and the Energy is high.
For the charged leptons this is not the case. For an electron to turn into a Tau it needs a lot of energy. Consider a beam of e- with an energy just above the $\tau$- rest mass and along its path some of the e- turn into $\tau$-
The other e- would quickly overtake and the distance between the particles would be huge.
This makes it difficult to get a coherent state.
In the ultrarelativistic limit this could work in principle. But has not been observed. AFAIK the mixing angle is a function of the mass difference and thus, it is extremely small for charged leptons.
Because of all this, we just pretend that the charged lepton mass Eigenstates are equal to the flavour Eigenstates and we thus give those three masses the Name "Electron", "Muon" and "Tau"


Keep roaming Outlands or move to Northrend?

Question: I just dinged 69, and I've only quested in three of the Outlands zones. Should I keep questing in Outland, or should I move on to Northrend?
Comment: Do you want to level-up quickly, or do you want to experience the full content?
Answer: If you have never leveled through the Outland content before it is certainly worth your time if you have an interest in the lore.
Also if you get a lot of this content and levels before going to Northrend, then when you get to to Northrend you will reach level 80 faster. And then when you're 80 you will still have a lot of quests in Northrend to left to do and doing all all of them at maximum level turns into cold hard cash.
Comment: Of course, you could wait until Cataclysm and use those quests to level up, but since Cataclysm only adds 5 more levels, you're probably better off with the money.
Answer: That depends on what you really want. If you want to get to 80 fast and experience the WotLK content, go to Northrend. If you would like to get the most of the game however, definetly stay in Outland.
Another thing is - are you on a PvP server? If so, you might consider staying in Outland for a while as people leveling in Northrend (and being level 71+) will definitely want to gank you a bit ;) And if you are a PvP player you will probably want to be 80 asap, since then you will be able to fight in the Arenas. If you enjoy PvE more, try the Outland dungeons too, they are nice (i liked them even more than those in Northrend, especially Coilfang Reservoir dungeons).
Answer: Personally I would (and did) go to Northrend.
I found the levelling experience to much quicker - more XP from mobs and quests, plus quests are in definite "hubs", making it quicker to pickup and hand-in quests.
On my Paladin I made sure to complete all the quests in both WOTLK starting zones. This put me to ~73/74 from 68, without too much effort. It was also a great way to pickup rep, gear, and gold!
Answer: Later Outland questing content is filled with "Elite" quests, especially Shadowmoon. I wouldn't waste much time in outlands, just do some easy quests and then get ready for Northrend
Comment: Most "elite" quests were removed tho. The only "Elite" remaining quests are the dragons, but then again, quests have been simplified and "nerfed" a lot since the BC.
Answer: If you want to see the content, staying in Outlands is nice, but questing experience has improved a lot in WOTKL and the gold/XP reward will be higher too. It's cheaper to fly in Outlands too (and impossible to do in Northrend unless you are level 77 or have an 80 and 1000gp). Flying makes questing faster and less prone to be ganked by mobs or players when applicable.
I'd go to northrend. But that's because I've done all the outland quests at least on two different chars. Some up to 10 times ! :)
Answer: i shorted myself and basically did the leveling from 70-80 via battleground XP (before it got nerfed, Alterac Valley was a cavalcade of XP). if you're looking to get Raid Ready and see ICC before Cataclysm comes out (and Raiding moves on to the next big thing), I would recommend a) queueing for whichever BG seems to net you the most XP, b) running your daily RDFs, and c) questing in Northrend so you can also get your professions up to snuff. sure, you'll miss out on the lore and story. personally, going back and overpowering it is still satisfying and the money from quests is just as good.
Answer: Northrend if you're level 69. You will level a lot faster. Bigger XP for the trash mobs. and the quests are more plentiful.
It depends on your objective. You want to get to 80 in a hurry. Then start in Northrend. You'll get larger XP rewards for quests. If you just want to take your time with the Lore/Legend, Then keep complete Outlands.


Limiter, compressor, AGC, dynamics processor?

Question: What are the primary differences between the usage or definitions of the terms "AGC", "compressor", "limiter", and dynamics processor? They all seem to be forms of playing with gain knobs.
Comment: *"dynamics processor"*, IMO, is a catch-all class that includes compressors, limiters, and AGC.  A **limiter** is sometimes called a "ducker" and is meant to change gain quite rapidly to prevent a spike from clipping.  A **compressor** (not to be confused with *data compression* nor *time compression*) has a more musical application in which signals with amplitude above a specified threshold have the gain adjusted according to a **compression ratio**.  An **AGC** sorta has the purpose of a limiter but with the speed (or lack of speed) comparable to a compressor.  That's my spin on it.
Comment: you left out CFAR receiver
Comment: it's a good question, hot.
Answer: one category has a protection property and has a very fast response to large amplitude transients.
another category attempts to maximize sensitivity.
another group tries to put the receiver in a predictable "sweet spot" or operating point.
some can be "slow" and others are "fast".
none of these are mutually exclusive.
advances in converter bit resolution (dynamic range) moves these techniques along.
One might consider schemes that adapt to be related.


LM317 potentiometer

Question: I'm designing a voltage regulator using the LM317, and I've seen people using 2 different configurations when it comes to the potentiometer. I tested both on a simulator and on a breadboard, and both worked. So, is there a best way to use such regulator?
Comment: Worth mentioning the difference in behavior should the potentiometer wiper lose contact: The top one will output it's maximum voltage, the bottom one close to 1.25V...
Comment: The datasheet shows your 240 ohms resistor only for the more expensive LM117. Use 120 ohms and re-calculate the value for the pot so that the output voltage does not rise when there is no load.
Answer: I've never seen the second circuit recommended in any datasheet. In the TI one, you will find this note:

the LM317-N was designed to minimize \$I_{ADJ}\$ and make it very constant with line and load changes.

Which means that the resistor in series with the ADJ pin will not make the load and line regulation noticeable worse. On the other hand, from the same datasheet, you see that the ADJ pin current varies considerably with temperature:

and ST datasheet also documents this:

Both datasheets list 100 \$uA\$ as a worst case. TI shows a typical 50 \$uA\$ and ST a typical 65 \$uA\$.
The ADJ pin current is an error term in the output voltage calculation (see below, from the TI datasheet). Putting a large resistor in series with this current changes the formula and also makes the output voltage adjustment drift more with temperature. Even with small temperature differences (10 - 20 deg.), a couple of % change in the output voltage should be expected.

Summary: if you don't mind the small non-linearity while adjusting the voltage and also having to fine tune the voltage adjustment every time you change the load and the component heats up or cools down, the second circuit is ok.
Answer: The second one does not draw the minimum required current for regulation (3.5mA typical, 10mA maximum) from the LM317, so the output voltage without sufficient load will tend to rise to near the input voltage.
Also the relatively small (< 100uA) ADJ current will cause the voltage to drift significantly as the regulator heats (and with ambient changes). Vangelo has posted an answer showing the typical temperature variation. It will also degrade the line regulation since the ADJ pin current varies with Vin.
The first one, if R1 is sufficiently low for the LM317 in use, will draw a constant current that exceeds that minimum, which also minimizes the wasted power at higher voltage settings compared to a simple resistive load.
As @Audioguru mentions in a comment, the commonly-shown 240 ohm value results  in 5.2mA nominal (5mA minimum) which is okay typically but does not meet datasheet worst-case conditions. It's probably okay with 9V in according to the original NS datasheet:
Comment: I mentioned a 120 ohm s resistor because one of the pots will create a voltage range as high as 37VDC where some LM317 ICs must have a minimum operating current of 10mA when the output voltage is set low.
Comment: @Audioguru Agreed, there is no guarantee with > 120 ohms. Worst-case is high Vin, minimum load and cold temperature.
Answer: The first is correct.
Infact, under any potentiometer condition/position, R1 is always greater than zero and closes the mandatory, for the LM317, negative feedback circuit.
Answer: Both are ok, but the one above has the advantage of not giving unnecessary resistance to the bias current of pin ADJ. In thee second one, in extreme case, the resistance seen by ADJ may go to 0.
Then I would look at two points:

You should consider changes with temperature and tolerances: potentiometers have usually a significant temperature coefficient, so that you may want to minimize the amount that is trimmed with a potentiometer in favor of more stable chip resistors. That means putting a resistor in series towards the ground, and trimming only a smaller resistance value.
Bias current into pin ADJ and ways to minimize the consequential voltage drop or to keep it constant, so it can be compensated in the overall transfer ratio.
Comment: Both are ok even when it comes to a full load operation e.g. a load draining 1A? They both changed the voltage when I spin the potentiometer, but I was testing on a no-load scenario.
Comment: I honestly do not see a problem at full load. Only, the second scheme can go to 0 ohm seen by ADJ and that may be a problem; then accuracy of output voltage is influenced by the amount of resistance seen by DJ ad how this resistance changes with temperature. If you do not need full range of adjustment, use  smaller potentiometer and put a slack resistor beneath it. If you need full rage changes, but accurate, you can think of a rotary switch changing a fixed value resistor ad the potetiometer take care of fie adjustment.

LM317 potentiometer


Does waiting for bread to rise before baking change its nutrient composition?

Question: Does waiting for bread to rise before baking change the amount of standard macro- or micronutrients present? I imagine that baking would evaporate any alcohols produced by the yeast fermentation. So the final product would simply have less sugar. Is this correct? Or is there more to it?
Comment: Hi, nutrition is usually off topic here. We do allow a very narrowly defined part of it, which is concerned with the numerical measurement of concrete nutrients present in food, and I think your question can be seen as falling within this exception. But I had to edit it because we cannot talk about any broad nutritional properties here, just about things like "x percent less sugar" or similar.
Answer: No difference in nutritional properties. It is just the difference between bread and hardtack. The "fermentation" isn't to make ethanol, but rather to release carbon dioxide in the bread which creates "air" bubbles making the product soft.


Hardwood floor - how to avoid different levels between rooms

Question: We removed travertine tile from the kitchen to extend hardwood floors through out the house.  Underneath the travertine was plywood on top of the 1x6s. Can we also remove the plywood and lay the hardwoods directly on the subfloor? I'd like to avoid transitions and different levels between the rooms.
Comment: That's how it was done back in the day. Diagonal softwood (fir) shiplap was set, then hardwood perpendicular to the joists. It's more likely to squeak, though, unless you screw down the entire subfloor well. The plywood acts as a modern stabilizing layer.
Answer: Was the plywood and 1x6 both on top of the subfloor?  If this is the case and the subfloor is solid and at least 3/4" I don't see why not. Just make sure to resecure and replace any damaged areas cause this can cause squeaking and affect the performance of the finished product. Remember to let the wood acclimate 4 to 7 days before installing. Use a moisture barrier and leave the proper expansion gap around perimeter and fixed objects.
Comment: I assume that the 1x6 boards were the lower subfloor, and were probably laid diagonally. The plywood was the upper subfloor.


is my car battery bad?

Question: At 6am this morning the car battery was dead. (It snowed all night and temperature was 3 degrees this morning.) 3 hours later I went to check it out and it started right up so I let it run for 20 minutes.  Now 3 hours later the battery is dead again. Everything is shut off!  So is my battery bad or is it something else?
Comment: How old is your battery?  Are you having any other problems?  Headlights dimming at a stop, for instance?
Comment: When it didn't start did you have lights, clicks or slow turning?
Answer: First I'd clean your battery terminals, since even a cold battery at fullish charge will try to start. After cleaning, make sure they're clamped tight and there's no corrosion.
Also, describe "won't start" - clicks, nothing, slow turnover, turns and stops, etc.

is my car battery bad?


WMI querying issues in Python

Question: I've recently been working on a Squish test script, and trying to do something like what's described in the solution at:
Total memory used by Python process?
The relevant snippets from my code are as follows:
<code>def measureMemory():
    w = wmi.WMI('.')
    result = w.query("SELECT WorkingSet FROM Win32_PerfRawData_PerfProc_Process WHERE Name=\"some_program\"")
    print result
    for WorkingSet in result:
        print WorkingSet
    subset = result[0]
    print subset['WorkingSet']
    # return result[0]['WorkingSet']

for i in range(50):
    memory = measureMemory()
    if memory:
        # test.passes("%d memory used during undo." % memory)
        print memory
</code>
Unfortunately, I've run into an error whenever I actually try to run the thing, as can be seen below.
<code>[<_wmi_object: \\USER-PC\root\cimv2:Win32_PerfRawData_PerfProc_Process.Name="some_program">]

instance of Win32_PerfRawData_PerfProc_Process
{
    Name = "some_program";
    WorkingSet = "19386368";
};

Traceback (most recent call last):
  File "C:\Python26\Test scripts\Testify", line 25, in -toplevel-
    memory = measureMemory()
  File "C:\Python26\Test scripts\Testify", line 19, in measureMemory
    print subset['WorkingSet']
  File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 242, in __getitem__
    raise TypeError("This object does not support enumeration")
TypeError: This object does not support enumeration
</code>
I'm not sure why this should be throwing an error, as I don't think I've changed anything significant from the example I took code from.
I'm using Python 2.4.4, if that's significant, and unfortunately I can't really upgrade, no matter how much it might help.
Answer: The WMI syntax seems to have changed from the examples. Try using subset.WorkingSet instead of subset['WorkingSet']

WMI querying issues in Python


what is the equivalent circuit for battery in charging process?

Question: OK I know a little bit about battery discharging process that is, I know that the open circuit voltage of battery decreases as SOC goes down, and the voltage is less than the Voc when connected to a load (so we have an internal resistance which rises as the battery gets emptied) I also searched and found more complex equivalent circuits (considering diffusion voltages). but these all model a battery acting as a source but How does a battery behave (in terms of circuit elements) in charging process (as a load) and what is it's voltage? I mean is it the open circuit voltage (disconnected from charger) or the charging voltage?
I'm asking because I'm a bit confused about solar charge controllers. as we all know they are not voltage sources and behave somehow like current source so if we connect a battery directly to a solar panel (like Self-regulating PV systems) how can we determine the operating point of the system?
Thanks
Answer: A battery connected directly to the output of a solar panel will hold the solar panel's output at the battery voltage.  If you look at the I-V curve of a panel, you most likely will find that the maximum output power does not occur at the battery voltage.  This means that you will not be able to extract the maximum power from the panel.  Also, you wouldn't be able to control the charge profile of the battery, which can cause ill effects to the battery.  This is the reason for a device called a Maximum Power Point Tracker (MPPT), which you can google.  I know this doesn't answer the question asked in the post, but will hopefully help to set you in the right direction.
Comment: I've read a bit about working principle of PWM and MPPT charge controllers but how do we know that the voltage of the panel would be the same as battery voltage? (in the case that we connect them directly), as far as i know the charging voltage can (and must) be different from battery's nominal voltage


geo-synchronous orbits not over the equator

Question: I need to know if a satellite with onboard power can maintain a geo-synchronous orbit at, for example, 45 degree latitude?
Comment: A powered vehicle could travel in such a path, but I wouldn't describe it with the words "satellite" or "orbit".
Comment: It is simply impossible. Orbits don't work like that.
Answer: Because the potential is central, the motion of the satellite is necessarily in a plane with the Earth at its centre.  This therefore excludes any constant latitude other than the Equator.
Geo-stationary orbits will remain over the same points above the equator.  This orbit will take 23 hrs 56 mins to complete.
Geo-synchronous orbits will also take 23 hrs 56 mins  to complete, and the orbit will be along a full great circle, although not of constant latitude, unless it is along the Equator.
[Hat tip to @Joshua for the distinction between sideral and solar day.]
Comment: Geo-stationary and geo-synchronous orbits take *23 hrs 56 mins* to complete, approximately.  Earth rotates in about 23 hrs 56 mins, not 24 hrs (a sidereal day vs. a solar day).
Comment: @Joshua yes this is an important distinction.  I made the change.
Comment: @CDCM corrected for a 2nd time.  :D
Comment: @ZeroTheHero you were corrected, but you've chosen to keep the phrasing "Obviously, ..."? Clearly wasn't obvious ;)
Answer: First about terminology.
Geosynchronous orbit [1] is any orbit with period matching Earth sidereal day. Now you can have such orbit with any inclination and with any eccentricity, no problem. Geostationary orbit [2] is the one for which the satellite stays over the single point at the surface. Generally geosynchronous orbits are not geostationary. Only the circular and equatorial geosynchronous orbit is geostationary. I assume that you are actually referring to the latter.
The simple reason why you can't have true inclined geostationary orbit is in the word "inclined". The whole orbit lays in the plane that goes through the center of the earth. The inclination means that this plane is at an angle with equatorial plane. As consequence the sattelite will neccessarily change the latitude going both over northern and southern hemispheres.
If you try to use the engine to keep your spacecraft over the same region you will have to burn it constantly compensating gravity pull. The constant force you need to provide will depend on your altitude and latitude but to understand what you basically doing imagine that you try to keep your sattelite over the north pole. You will then have to stop the sattelite completely and constantly fire your engine downwards. The moment you turn off the engine you will simply fall on the north pole...
What you can do in real life is to use the orbit at which the sattelite will be approximately stationary for majority of the time. You can then put a small constellation of sattelites on such orbits that will substitute each other and provide in this way some imitation of the geostationary sattelite.
You can do that with the so-called Tundra orbit [3] named after Russian military satellites. This orbit is geosynchronous i.e. having the period of one sidereal day but not geostationary. It's highly elliptical, so that most of the time the satellite stays in the apogee. The resulting ground track is something like this figure of eight (from here),

The small loop in the northern hemisphere here actually represents the apogee where the sattelite stays the majority of the day. The wider loop will be passed much faster.
Similar option is the Molniya orbit [4] (named after Russian satellites again) that's also highly elliptic orbit but with period of half of sidereal day. Each day it stays for several hours approximately over one region in the western hemisphere and for several hours over the region in the eastern hemisphere. Again the wide paths in the souther hemisphere actually take only a couple of hours. (image from here)

Of course this is not the ideal solution but the working one, used in real life.
Comment: Great answer! I've just asked a follow-up question [Difference between Tundra and Molniya orbits?](https://space.stackexchange.com/q/24248/12102)


Difference between dataloader and dataloader CLIq and dataloader.io?

Question: Can any one explain difference between normal data loader and data loader CLIq and dataloader.io? and What are the governor limits?
Comment: All three products load data into Salesforce. They have somewhat different interfaces and minor limitations. dataloader.io is a [paid product](https://dataloader.io/pricing) above some threshold for free use. What specifically do you want to know?
Comment: @DavidReed thanks for your reply , i want to know import records limit at a time in Bussiness account/person account and schedule data limit in windows task scheduler....etc
Answer: There is not a limit on the number of records you can import via a data loader application as such. There are limits that apply to data load activity that will indirectly limit the number of records you're able to load in one pass, with a specific batch size, or over a given 24 hour period.
In particular, you should be aware of the API call limit for your organization, which varies based upon your license total and edition. You can find the full  calculation matrix at API Request Limits and Allocations. Note that this is an org-wide, rolling 24 hour limit. It is not Data Loader specific, but shared across all clients connecting to your org via the API.
If you are using a data loader in bulk mode, you should note that there are a number of limits specific to the Bulk API, including a cap of 10,000 batches per rolling 24 hour period.
Additionally, use of data loaders tends to expose issues with your existing code base. For example, if your code is poorly bulkified and you try to load data with a batch size of 200, you may see SOQL or DML limit errors. You can resolve this in the best case by fixing your code or in the worst by reducing the data loader's batch size, which will make your load take longer.
These limits are not product-specific. They apply to any product loading data into Salesforce via the API, including the standard Salesforce Data Loader and dataloader.io. Note that the latter is a paid product with a 10,000 record limit for its free tier.


Weird Batch File Issue

Question: Can someone help me with this one?   I have a batch file, where I am trying to connect a couple network drives based on my current internal IP address.  Problem is, it is outputting the following:
Home 192.168.2.99
Basement
Where it should be just outputting:
Home 192.168.2.99
Here's the code:
@echo off

@for /F "tokens=2 delims=:" %%i in ('"ipconfig | findstr IP | findstr 192."') do SET LOCAL_IP=%%i

@if ("%LOCAL_IP%" == "192.168.2.99") Call ConnectHome else (Call ConnectBasement)

:ConnectHome
@echo Home %LOCAL_IP%

:ConnectBasement
@echo Basement
@REM net use R: \\192.168.2.98\Storage
@REM net use S: \\192.168.2.98\MyStuff
@REM net use T: \\192.168.2.98\Server

I've also tried replacing the IF statement with:
@if ("%LOCAL_IP%" == "192.168.2.99") goto ConnectHome else (goto ConnectBasement)

and:
@if ("%LOCAL_IP%" == "192.168.2.99") goto :ConnectHome else (goto :ConnectBasement)

and the results are always the same...
OS is Windows 7 Pro
Answer: Call is intended to call a different batch file from the one you're currently in (see here).  If it's passed a label, it will execute from that label, but it'll execute to the end of the file, so it won't stop when it hits the :ConnectBasement line.
What you probably need is to add a label :END at the bottom of the file, and Goto :END just before your :ConnectBasement line.  For consistency I'd probably suggest using Goto instead of Call throughout.  (You can also use Goto :EOF without defining a label, if you wish.)
(Or, learn PowerShell and use its functioning capability to implement this more cleanly ;-))
Answer: After going to :ConnectHome, it just goes to :ConnectBasement. Add goto :eof just below @echo Home %LOCAL_IP%.
Answer: Aren't you forgetting to stop execution after the :ConnectHome part ?  I'm not sure, but I think the batch simply continues after that, printing "Basement".
edit: Jeroen beat me to it :)

Weird Batch File Issue


CSV becomes unavailable after planned node shutdown

Question: We run a 3-node hyperconverged storage spaces direct cluster with 3-way mirror resiliency. When one node is put into maintenance mode, everthing is still working fine (no errors or inaccessible resources). Shortly after the node is then shutdown, the CSV goes offline with event IDs 5142 and 5150. It seems to me that maintenance mode only affects cluster roles but not the actual physical disks. On the other hand, that shouldn't be a problem in the first place, since 2 more copies are online. Has anyone experienced a similar behaviour or even has a solution/workaround?
Comment: Microsoft started their hyperconverged game with 4-node as a minimal deployment for a good reason: anything below 4 nodes isn't really reliable. My suggestion would be a) add +1 node to your 3-node S2D HCI cluster, and b) add external SMB3 share as a witness.
Answer: It looks like S2D issue specified here:
https://social.technet.microsoft.com/Forums/en-US/74dbd313-741e-424e-8acb-d7d68e22174c/two-node-s2d-cluster-disk-volume-fails-when-one-host-goes-down?forum=ws2016 and here:
https://social.technet.microsoft.com/Forums/windows/en-US/4fc1fb86-61fa-4976-8b3f-9e314586fef8/storage-spaces-direct-cluster-virtual-disk-goes-offline-when-rebooting-a-node?forum=winserverClustering
So, please check the Witness configuration as well as if you have installed the latest Microsoft updates.


bn256 and Boneh-Boyen digital signature in solidity

Question: I am looking to have a full-fledged implementation of bn256 in solidity. And  Boneh-Boyen digital signature. Is there is any available built-in libraries or implementation in solidity to bn256 and Boneh-Boyen digital signature?
Comment: What is bn256???
Comment: A BN-curve (Barreto-Naehrig curve) [paper] defines an elliptic curve which can be used for pairings that allow for a high security and efficiency level. This article uses pairings over a 256-bit BN curve and derives a signature for a message, and also outlines a method for where Bob, Alice and Carol can generate a shared key.https://medium.com/coinmonks/having-fun-with-bn-curves-37fb5b816f67
Answer: Take a look at this repo https://github.com/HarryR/solcrypto/ which includes some example how to use alt-bn256 primitives from solidity.


Are mechanical walking vehicles useful in combat?

Question: This is a highly contested issue on this site, and I have seen many different opinions on this topic. Are mechanical legged vehicles (or mechs) useful in combat in a near future scenario? If so where?
Comment: Legged Vehicles are all terrain vehicles. They can walk over rocks, climb mountains, jump up buildings, jump over gaps, etc.
 See https://worldbuilding.stackexchange.com/questions/112144/advantages-of-spider-mechs-over-tanks
Comment: I'd consider a "legged vehicle" and a "mech" different things, personally. Although I can see some overlap, at the very least a mech is a *subcategory* of legged vehicles. A legged vehicle I'd assume is something like the [AT-ATs in Star Wars](https://i.imgur.com/6RRJOrB.jpg). Although they are quite big, I guess you could have them smaller, too. While a mech is a humanoid looking on two legs with (usually) two arms and is definitely very big.
Comment: You can check Boston Dynamics' "Spot", a four legged robot that could be used as a load carrier in combat situation (where wheels could easily be a problem).
Comment: VLAZ, that is not how I interpret mech and legged vehicle, but I can see how your point of view makes sense. probably good to clear up the difference.
Comment: Although the Metal Gear series is all about walking tanks, I believe in MGS3 they actually mention how totally impractical the idea really is.
Comment: I had a whole comment written about was about to hit add comment when I realized that OP isn't necessarily talking about bipedal, humanoid, robots. This question needs context and specificity. I have strong thoughts regarding bipedal locomotion and the answer will always be wholeheartedly "no" from me unless the specific goal in mind is Rule of Cool, for a simple reason; Have you ever fallen down? It sucks
Comment: Yes they are. See Cowlinators link to see why I think so. Something to consider is that people think "a leg has disadvantages, so it is useless". Yet when you compare tracks versus wheels almost every single disadvantage for legs is also present on the tracks side with a few places where the track is better or the legs. Tracks are MORE RELIANT on low ground pressure as they need it to turn for example. "Legs are complex and can fail!" Is also a common one, yet if you look at tanks they've become magnitudes more complex than their WWII counterparts because it has enough advantages.
Comment: Mechanical walking vehicles are slow, noisy, complex, fragile and easy to detect from the air.  All it would take is a few agile, armed drones to neutralise them.
Comment: @VinceO'Sullivan - same with wheeled or tracked vehicles. There's an alternative not under consideration here (yet). A hybrid system - wheeled or tracked for speed with legs that can be deployed in terrain where appropriate. I can see a tachikoma-like tank with tracks underneath it (and the ability to switch from one type of locomotion to another.)
Answer: There's an interesting case for 'legged' vehicles that have wheels and treads rather than feet. DARPA's Ground Vehicle-X Technology program makes an interesting case for agile, fast, and lightweight ground vehicles.

They make the case that our current approach of survivability through heavy armor has some problems. The first is that armor makes vehicles heavy and difficult to transport into the battlefield. If vehicles could be made light enough to load onto planes or helicopters, then they could be deployed into the battlefield much faster, which is huge. Vehicles are starting to become so heavy that they can no longer go offroad, which makes them vulnerable to IEDs. They also make the case that weapons are improving faster than armor is, so the advantage of armor is becoming less.
They claim the solution to this is to achieve survivability through mobility rather than more armor. A vehicle doesn't need much armor if it can avoid being hit, avoids detection, and avoids engagement. Extreme mobility enables the vehicle to access terrain that other vehicles cannot access making it possible to avoid detection and engagement. Putting the wheels on legs so that they can adapt to terrain is a great way to attain high mobility. They make the case that it's not unreasonable for a vehicle to duck or jump to avoid getting hit. This would have to be accomplished by putting the body on some form of legs so that we may move it around. In addition, it has even been suggested that jumping may be advantageous in urban combat, to jump over road blocks.
Comment: This actually reminds me of a more accurate version of the Tachikomas of Ghost in the Shell, which use what are effectively wheeled legs for a highly mobile platform.
Comment: "They also make the case that weapons are improving faster than armor is, so the advantage of armor is becoming less." History requires that to be taken with a hefty helping of salt. They've been saying this for decades about everything from the man-portable anti-tank missile to the attack helicopter to drones and armor has responded. "Speed is armor" has been tried from the battlecruiser to the Leopard 1 to the Mobile Gun System. These are successful as specialist, support, and scout vehicles, but do not replace the staying power of armor.
Comment: Ducking/ dodging seems very unplausible to me. Just consider the speed a typical anti tank missile moves at. Note that these are also targetting so they can adjust their course at least somewhat. Dodging that would require an acceleration that might be mechanically possible but any humans inside the vehicle won't survive it.
Comment: "weapons are improving faster than armor" is no longer true.  In the 16th-20th century this was definitely the case, but over the past few decades, modern material sciences have been producing alloys, ceramics, synthetic fibers, carbon nanostructures, and a whole plethora of various countermeasures that have been making armor technology advance much faster than weapon tech.  This is a big part of why modern tank cannons keep having to be made proportionally bigger.
Comment: This reminds me of Batman's Tumbler. https://www.youtube.com/watch?v=jZicrp_p4BE  I'll take 2, please.
Comment: @Shalvenay You've hit on what's been nagging me. "Wheels-on-legs" is called [independent suspension](https://en.wikipedia.org/wiki/Independent_suspension). This suspension is smart enough and has long enough travel to keep the vehicle upright on slopes. That's cool, but it isn't walking. Oh, and [Beware The Wheelers](https://www.youtube.com/watch?v=WM0RFE3QGAU)!
Comment: this is a really cool concept. Although what year was that DARPA slideshow from?  it looked fairly ancient.
Comment: @meaninglessname 2014, it's on the first slide
Comment: I really like this answer. It reminds me of the cartoon "Heavy Gear" where the humanoid mechanical robots had wheels in the feet and mostly moved by driving (looked like skiing) not walking.
Comment: @quarague I agree completely that once they have fired the missile then dodging is completely impossible. In fact, once they have seen you dodging is a long shot. But that is not at all what they are going for here. The idea is to get in/do what you need to do/get out before they see you. You are never in the same place long enough for them to work out where that is. To quote the answer: "A vehicle doesn't need much armor if it can avoid being hit, avoids detection, and avoids engagement"
Comment: @Schwern -- indeed, although all the same, this sort of wheels-on-legs system seems like it'd be ideal for scout vehicles...
Answer: Almost certainly not. The problem that cannot be countered is the inherent mechanical inefficiency of using legs. The amount of complex engineering that would have to go into this process is not worth the benefits. From a physical standpoint, it is inherently inefficient. There are too many moving parts under a dynamic load, with a center of mass that is far too high.
Consider what the act of walking takes in comparison to a more conventional ground vehicle. Each time you lift the leg, you are wasting energy to fight gravity in order to physically lift that leg off the ground. You then have the issue of ground pressure when you put that foot down and shift weight on top of it. Wheels or especially treads will have a much lower ground pressure because the load is always balanced.
Put it this way, would you ever challenge a bicycle to a race on foot? They are inherently physically inefficient. Technology won't change this. Whatever technology that makes them possible would also make conventional ground and naval vehicles more effective. Just like the fact that even an extremely fast runner would be even faster on a bike.
You might counter that there are places you can't take a bicycle, like stairs, but those aren't places where you want to take heavy mechanized vehicles in the first place. No one drives tanks into truly mountainous terrain or dense forests, as even if it is physically possible to move them they would be too vulnerable for it to be worth it. If you take ground pressure into account, you're going to find more places you can't take your mechs but can take tanks than the other way around.
In addition to the inherent mechanical inefficiency, you have a vastly worse target profile. Relative to mechs, tanks are essentially lying down, giving the smallest possible target profile for their size. This is also reflected in the higher ground pressure of something like a mech compared to a tank, which means they are more likely to get stuck in soft ground or be less capable in the kinds of rough terrain that they might theoretically be better at.
I haven't even gotten to the worst problem, that of the square cube law. Humanoid shapes are effective at the scale of humans. So this means powered armor is somewhat plausible but mechs aren't.
EDIT: This isn't directly relevant to my earlier points, but I just found this clip about AT-AT speed and thought it was an interesting issue. While the official speed of an AT-AT is fast enough to actually be effective as a combat vehicle, there is almost certainly no way this is actually physically possible given the model we see.
Comment: "would you ever challenge a bicycle to a race on foot?" – YES – for example, a race up any hill which requires scrambling; a race with a significant sideways gradient; a race over boggy ground where wheels will easily sink; a race which includes hurdles; a race on paving slabs where you're not allowed to step on the cracks... legs are more effective on many annoying types of ground, but society has organised itself largely in places which have flat ground and roads because they make wheels more efficient, so we rarely have wars in those places.
Comment: "From a physical standpoint, it is inherently inefficient." It's a big engineering challenge, but not impossible. Energy is only wasted when turned to heat, else it's just converted: Lifting a leg creates potential energy, accelerating it creates kinetic energy, etc.. You could design a system with springs, masses and/or electromagnetic actuators that recover these energies. Hard, but not inherently impossible.
Comment: I like your answer. But you seem to be focusing on humanoid shapes for walkers. If you consider four-, six- or eightfooted walkers, some of your points become less valid.
Comment: Your answer seems to be build on the premise that the "road" is flat and horizontal, maybe going downward, or only slightly upwards. Climbing (e.g.) a mountain while avoiding (or fighting) trees and rocks / boulders, makes the "bicycle" argument useless. The original question seems to be more about efficacy, rather than efficiency.
Comment: > The amount of complex engineering that would have to go into this process is not worth the benefits.

This seems to be strongly pegged to the limitations of current technology. For the purposes of world building, one could realistically assume that technology has advanced well enough to consider such things as "problem solved."
Comment: "No one drives tanks into truly mountainous terrain or dense forests, as even if it is physically possible to move them they would be too vulnerable for it to be worth it" wouldn't the WW2 German assault through the Ardennes be a counterexample? Even if it's impractical to fight in that terrain, the mobility advantage of being able to move through it is potentially valuable.
Comment: @luis.espinal Because it's a question of efficiency of design, any sci-fi technology you need to make walkers feasible (so long as we don't drift into magic) can be applied to tracked vehicles with greater benefit. Multiple legs each with multiple powered and exposed points of articulation will never be as compact and robust as an engine/transmission power pack using two wheels to drive two tracks.
Comment: @Elia because that was just forest. There were few geographical limitations and they had a THICC engineering corps with them to build bridges and cut trees etc.

They didn't go through the forest. They just took a rout where a forest was before them
Comment: It is interesting to consider why an axled wheel has never evolved in a living creature given the efficiency improvements that could be made. There is no obvious way to allow blood flow to a fully rotating body part and no intermediate advantageous evolutionary steps to get to a full wheel.
Answer: Yes!

This is a full functional John Deere walking tractor and tree harvester.  On flat terrain (eg Hoth :)), wheels and treads may be more energy efficient, but in obstacle filled terrain, legged tanks may well be more useful.  However, legs should be short and bent to keep the center of gravity low and the profile small, allowing the tank to not tip over and to take advantage of cover.
Comment: While exceedingly awesome, the primary benefit of the Plustech Walking Tractor over tracks is minimal impact on the forest floor. This allows it to harvest deep in the forest without roads nor damage. Not a great concern in combat.
Comment: @Schwern Actually... You could make a case for legs allowing for "stealth tanks". Need to get forces in position w/out satellites/plans spotting you? Movement through thick forest on legs might be the answer.
Comment: Not obvious from this picture is that this vehicle is incredibly slow.  At the speed it moves, it's hard to argue that any kind of mech would have a real advantage over infantry.
Comment: fantastic answer, thanks!
Answer: Surely...
everyone here has seen the utterly terrifying dog-like robots the US military is working on?
https://www.youtube.com/watch?v=W1czBcnX1Ww

(Hilariously, they have more recently done stuff like paint them yellow and pink in a pathetic effort to tone down the "utterly terrifying" aspect.)

Are mechanical legged vehicles (or mechs) useful in combat in a near future scenario?

It's probably the single most intense desire of the US ground military at the moment.
You've completely hit the nail on the head.

If so where?

Every single region in which the US fights (ie, the overall planet other than I think Tasmania).
4 is easier than 2
4-legged death robots are incredibly easier to achieve than 2-legged ones.
Consider the case of Honda's totally amazing "Asimo" - while it's amazing (A) it can do nothing and (B) no matter how many decades they pour money in to it, it can do almost nothing else.  Whereas, Boston Dynamics terror-dog makes huge advances every few months.
Four or six leg locomotion is incredibly easier than two (not easy, but easier). It's getting closer to being a solved problem.
Comment: but @Davidmh , people said exactly the same about the first cannons, drones, clubs, aircraft, etc.  Note that you can take *an elite commando* out of action with small arms fire or a net.
Comment: Another key point is that these robots are not expensive to mass produce.  It costs the US about 850,000-1,400,000 dollars to train, board, and pay an average soldier who is only really good for a few years of active service. In contrast, these 4 legged mechs typical cost less than a car.  When you stop thinking of them as little tanks, and start thinking of them as expendable soldiers, their utility value goes through the roof.
Comment: @user560822 put a gun on one of those and suddenly it is a terrifying war machine. They don't do that because when minimising collateral damage it is safer to have humans doing the shooting; but in a all out battle, a walking autonomous machine gun makes sense.
Comment: I can't say I agree with you about it being "utterly terrifying". BigDog isn't any more scary than their mule, cheetah, or wildcat robots, which weren't scary at all. They aren't cute and cuddly, but you wouldn't want a military robot to be that, would you?
Comment: @user560822 they look less vulnerable than a squishy human. Small arms fire _anywhere on the body_ will put a human out of action, this things can probably take a few bullets to the legs and body and still fire.
Comment: As cool (and terrifying) as these things are, I don't think they're designed for combat. AFAIK, they're basically pack mules.
Comment: @Davidmh They look extremely vulnerable. You could probably take one out of action with small arms fire, or even a net.
Comment: Do you write popsci articles?
Answer: The top two answers are absolutely wrong!
This debate is always the same. And always you have some dense smartasses wobbling up with their "nu-uh wheels and tracks are always better!", which is about on the level of toddlers.
Yes, you will NEVER see Star-Wars style walkers, because they're impractical. and you will almost certainly not see any walker vs tank combat ever, because tanks win that easily.
Now, where WILL you see walkers?
Simply any and everywhere where tanks are not viable.

Urban combat (here small walkers, bigger than humans but still small enough for most urban openings and walkways. Aka you have a tank where you normally can't fit a tank.
Mountainous terrain. Where tanks and generally any regular vehicles fail. Did you know that 21st century armies still have dedicated donkey handlers? And guidelines for horses? And what are horses but medieval walkers? So as soon as it becomes viable, they will be replaced (or at first supplemented) by walkers. However that as well will only happen within the narrow mission specifications they are used in today.
Comment: +1 The example of horses and donkeys is a really good one.
Comment: "here small walkers, bigger than humans but still small enough for most urban openings and walkways" AKA Power Armor.
Comment: @MorrisTheCat to your first objection, most images I have seen from urban warzones show collapsed buildings and rubble. I think a walker would have an advantage over wheeled vehicles.
Comment: Good answer, but you might add the jungle among the environments where legs are required.
Comment: @nick012000 yeah, imho there isn't a clear distinction between a small walker and power armor (and you can argue that power armor itself is always just a minimum-sized walker)
Comment: Objection the first: I can't see any reason you would ever use feet and legs in an urban environment instead of wheels. Unless you're trying to move around inside buildings, at which point you should just be using infantry anyway, urban environments are specifically designed for wheels. An armored box on wheels is still going to be the most efficient engineering solution for urban combat, you just need it to be smaller. You might use more articulated wheels that let you use things like four-wheel steering and rotation in place, but there's no reason for hips and knees and ankles in the city.
Comment: Objection the second: Your example regarding horses and donkeys addresses transport vehicles, not combat vehicles. Nobody fights on horse or donkeyback. This is a solution (like the Boston Dynamics solutions) that takes load off the back of a human soldier and lets a robot carry it.
Comment: Objection the third: You have not by any stretch proven the top two answers wrong, you've just identified some limited caveats and/or exceptions. You've made a valid point in a very click-bait-y way, and that leaves a bad taste.
Comment: @MorrisTheCat and infantry is INFERIOR to power armor. And what is power armor? A very small mech. So your "Unless" is EXACTLY what I meant
Comment: @MorrisTheCat also yes, I have proven them wrong, at least the answer that claimed that there is 0 use for walkers.
Comment: @MorrisTheCat also regarding your second objection: Yeah, nobody is fighting ON horseBACK, but I bet you that if you could train horses to fight efficiently they absolutely would. And what are walkers but perfectly traineable horses?
Comment: @MorrisTheCat also you Write Objection yet either fail to understand my point, or by ditching it using caveats in a very click-bait-y way, and that leaves a bad taste.
Answer: Nailing my colours to the mast, I'd say that the answer is no; in the near future, there is no real use of a combat mech that can't be (better) met by a wheel or tracked vehicle. I was going to point to the fact that there ARE no mechs currently in development by defence industries, and that this is a sector which would be all over such a design if there was a benefit to it, but then I did a little extra research and found out that there is a Russian combat walker currently under development. I recommend you actually read the article as it covers a lot of the arguments for and against such a vehicle in a combat situation.
For my own part though, I've always been of a mind that walkers give you the same vulnerabilities that a human combatant has when it comes to legs; if you shoot at them and damage them, your mobility is screwed. Sure, they ride higher, giving the pilot better visibility, but that also comes at the cost of higher centre of gravity, meaning that balance is more of an issue for a vehicle you need to keep upright at all costs. The idea of walking over obstacles and the like that other vehicles can't get over does sound appealing, but then I came across another Russian invention...

Meet the Sherp, a Russian ATV that is designed to go almost anywhere. If you look them up you can see that these things can pretty much cover any terrain, still have reasonable visibility, and the low pressure tires make short work of pretty much anything that the walker above could get over, probably more. Sure, the wheels are a vulnerability just like legs, but you can still move one of these on 3 wheels (probably) and as the tyres are low pressure, they can take more damage before becoming inoperable.
Mount a 50 cal on the top of this thing and you have an interesting weapons platform that to my mind is cheaper to build, easier to develop as we've been using a lot of this tech for a century already, and (perhaps most importantly) is going to be a lot faster.
This is the final point I'd make in the argument between the two platforms - there is going to be a maximum speed possible for the walker due to the fact that you have joints moving backwards and forwards, rather than building up solid angular momentum in the same way a wheel can. This means that the legs actually have to surge energy in an alternating sequence instead of just letting an engine apply it constantly. This makes legs more complex, harder to maintain and puts a limit on how fast they can go by comparison to a wheel, which is also more efficient.
So, for mine, I don't think that combat walkers will be seen on battlefields in the near future, but if they are the only reason I can think of is to break the morale of the enemy and instill fear in them when they see a combat mech running at them, chain guns pointed their way.
Comment: `a Russian combat walker` - I like the idea of Russian battle robots destroying the world, but _that_ thing on the picture, is it even serious?
Comment: That thing will still flip on a deep slope or sufficiently difficult terrain. I kinda like EstimatorNoiseless's answer.
Comment: "there is no real use of a combat mech that can't be (better) met by a wheel or tracked vehicle."
yeah sure, because tracks work so well on mountain paths...
Answer: Yes, but probably not the things you see in Star Wars. The most useful legged transport would be over very rough terrain where wheeled vehicles would not be feasible, and they would probably use 6 or 8 legs like a spider. This would likely be in hilly, heavily wooded, or mountainous terrain. They could be carrying supplies. They also could incorporate wheels if needed, when they reached roads or terrain that would accommodate wheels, and then switch back and forth like a Transformer. The AI that would be needed is probably available now, so by the time that these legged transports are needed that would not be a problem. Power supplies are currently a problem for this concept. They would probably need to incorporate their own power replenishing sources, such as rolling out solar arrays before their batteries are depleted.
Answer: Yes and no. Depends on your definition of combat really.
The Defense Advanced Research Projects Agency (DARPA) had the LS3 Legged Squad Support System project going for a while. The project is essentially the military version of Boston Dynamics' BigDog, and the goal was to serve as a mechanical pack mule for US infantry. The LS3 was used in combat exercises succesfully, and it served its purpose of resupplying units in placed where traditional vehicles had trouble reaching them. It performed admirably, was capable to follow soldiers through rough terrain, was capable to pick itself up when it fell. There was just one minor detail: it's LOUD. So loud in fact the USMC couldn't see themselves using it in battle.
In the end, the Achilles heel of BigDog was its gas-powered engine. Boston Dynamics also developed Spot, a lighter, silenter, electric-powered version of BigDog, but its carrying capacity wasn't sufficient. Fiction can help your case however. With the development of electric vehicles comes the development of battery technology, it's not hard to imagine that, in the near future, we'd have batteries good enough for a fully electric BigDog without sacrificing its capabilities.
Now here is where the yes and no applies.
As the name squad support system suggests, it is designed to carry equipment and supplies, like extra ammunition, heavy ordinance, medical supplies or whatever you deem useful to take in battle that you'd rather not carry yourself. While this can be used to support units in combat, this isn't quite a combat role.
Outside of that particular application, you could integrate support systems to it, like an antenna to serve as a walking comm link, or some kinda of radar or detection system to serve as a spotter for artillery or just to scout an area. Basically anything that you can bolt on a jeep, you could bolt on a BigDog and it would follow a squad just about anywhere.
You could even imagine a specialised version camouflaged as an actual dog and filled with spying equipment that you could send for reconnaissance as a less conspicuous alternative to a flying drone. And of course, in a pinch, you can always jury-rig it with explosives and kamikaze it against the nearest tank or entranched position.
Outside of combat it could be quite useful in disaster relief or rescue operations in mountains, forests, rubble, or basically anywhere where roads are impracticable (or anywhere without roads to begin with) as a much cheaper alternative to helicopters.
If you're looking for a more offensive role than that, don't. There isn't much of a use case for a mechanical mule with a canon. Anything it could do, a tank or UCAV could probably do better.
Comment: I'd suggest that anything that is going to be shot at is probably better off with wheels or treads than legs, but if you need flexibility rather than durability or speed, a legged scout robot may well be more versatile than a wheeled one across different types of terrain. Wheels and treads tend to have difficulty with stairs for example.
Answer: Nicholas Moran aka The Chieftain, former US Army tank commander and Wargaming America's historian, covered "Giant Stompy Things" (GST) vs tracked vehicles in his Q&A #7 at about the 10:47 mark.
His opinion was no, "mechs are stupidity inefficient designs" for reasons mostly covered in other answers but l'll reiterate. GSTs come out worse in height, weight, frontage, complexity, and ground pressure.
With any armored vehicle you want to get the most out of your weight. More bang per pound means more range, more speed, more maneuverability, less strain on the drivetrain, more capacity, and lower cost.
Modern armor are basically an armored box which makes them fairly compact. GSTs are not. All that extra surface area means more to armor which means more weight for the same volume or reducing the useful volume to compensate.
Modern armor have small frontal cross sections making them harder to hit. They concentrate their armor in the front; that's where they're likely to be shot at. GSTs have very large frontal cross sections making them easier to hit and requiring a greater percentage of its surface to be armored: more weight.
Ground pressure is a critical measure of the mobility of a vehicle, it's the vehicle's weight distributed over its contact with the ground. Riding a bicycle on sand illustrates this nicely. Tracks spread the weight of the vehicle over a large area consistently resulting in an 80 ton tank being able to go places much lighter wheeled vehicles cannot. GST must lift their feet off the ground increasing their ground pressure. This defeats the main touted benefit of a GST: mobility.
On a related note, a while back I calculated the weight of a Star Wars AT-SE walker using ground pressure. It came out heavy, but not unreasonable.
GST require multiple points of articulation per leg. Each must be powered. This is a maintenance nightmare, as well as a challenge to transmit power to all those joints. Those complex joints will all be exposed to incoming fire. All this means more weight. In contrast, modern tanks have an all-in-one engine/transmission power pack safely at the rear of the vehicle. Only the rear two wheels are powered. The tracks are relatively simple. Most maintenance can be done in the field.
The best way to protect a vehicle is for it not to be seen. Modern armor is low to the ground making it harder to spot. GSTs are tall making them easier to spot. Modern armor can hide behind terrain and take advantage of hull down positions to fight with only the turret exposed. GSTs can also use terrain, but being tall they will have less opportunities to do so.
What if you made a crawler, basically take a tank and replace the treads with stubby legs? This solves the surface area, frontal area, and height problems, but the ground pressure and complexity issues remain. It still has to lift its feet. Its legs still need extra motors and hydraulics adding weight and complexity.
Because these are essentially geometry issues, they remain no matter what sci-fi technologies you propose. Any advances in armor or power or propulsion or weaponry to make GSTs more feasible can be applied more efficiently to a tracked tank.
To sum up, for similar volume and protection, walkers are heavier, larger, taller, more complex, and less mobile than a modern tank.
Answer: Picture where an armed and armored horse would be useful in modern combat, and I think that will be 90% of your answer.  Uneven yet solid terrain with good cover, likely for recon and small-scale engagements.  Less useful than tracked vehicles where the ground is soft (mud, sand), probably get smoked in open terrain where wheels are faster than legs for the same mass (and missiles are faster yet).
Personally, I don't think we'll ever bother with legged vehicles or shooting platforms - there's a point past which legs don't scale very well (there's a reason elephants don't gallop).  Instead, we'd build man-sized legged drones and 'bots for recon, support, and some close-in combat.  Picture Boston Dynamics' Atlas or Spot, but armed.
Answer: Yes, in a combat sport.
Legged fighting machines are discussed so often because we find them so cool. So they will have a place in any scenario where coolness can take precedence over practicality. That won't be the battlefield, but it could certainly be a sports arena where we go to watch Pepsi Pummeler take on the Red Bull Brutalizer.
Comment: Something like [RCL](https://en.wikipedia.org/wiki/Robot_Combat_League)?
Answer: Two legs would be utterly pointless in ANY scenario I can imagine, inflexible, difficult to hide, single point of failure, ....
A spider tank could be fantastic. Redundancy, speed, power, all-terrain, etc.
A millipede-style tank might be even better:
I'm imagining Tiny, barely articulate legs with a single bend and very little internal control, maybe just a "Muscle" lever to operate the knee--all the hardware is safe inside the vehicle

Under partial load you would only need a few legs and could be very quick and efficient.
it could instantly scale to a full load by using more legs.
tiny simple legs could be pulled into the body for safety
New legs could be printed while moving to replace damaged ones.
Would be amazingly sturdy and support any terrain
Could probably walk upside-down on many surfaces due to the distributed footing and ability to apply opposing force.
Very light "step", pressure per foot distributed over very large area.
Very smooth travel.
Could be adapted to nearly any vehicle.  (You could probably put this kind of feet on a house and have something that could run down the freeway without disturbing the contents!)

Actually it would probably have a large load vs speed swing (Heavily loaded it would just be able to crawl) so maybe that house doesn't climb up on the freeway...but it would still look pretty cool..
Comment: "Could probably walk upside-down on many surfaces" - what size are we talking about here?
Comment: Size doesn't matter too much, just weight per foot and the strength of the surface.  If a surface can support a vehicle, then the vehicle could hang from the bottom assuming each foot can support its fraction of the weight with a little hook or angular pressure or suction...  with a two legged robot each leg must support the entire vehicle in the area covered by one foot's surface while it is stepping.  I could see something the weight of a car walking right up and over a house without damaging it.
Answer: Ghost in the Shell may have the right idea... Tachikomas have four legs, but they also have wheels on the legs, which gives them some of the benefits of both. For level terrain, they roll like wheeled vehicles, bypassing the efficiency problems of walkers. For rough terrain, they can retract the wheels and gain the mobility advantage of walkers.
Answer: It depends on the threat model
With drones and missiles becoming sufficiently smart and ubiquitous, heavy armor and a low profile will no longer be adequate protections for a manned ground vehicle. You'll need active defenses, at least some anti-air and electronic warfare capabilities and a versatile sensor and communications suite.
Even if you manage to make room for all of this (e.g. by replacing most of the crew with technology) in a traditional tank, positioning especially the defensive weapons in a way that doesn't restrict their arcs of effect or interfere with other systems is difficult, at least in my experience. This issue will be exacerbated if you need more than one offensive weapon for whatever reason.
For a vehicle favoring sensors, active defenses and utilizing a wide range of possible cover over heavy armor, the variable ground clearance and flexibility of legs (whether they're attached to feet or wheels) can be a major advantage.
Bonus points for a sectioned design that can take a penetrating hit to noncritical areas and remain somewhat operational.
(No, not humanoid. Funnily enough, aircraft-like designs - without the wings/rotors - seem to do well in simulations.)
It depends on the tech level
Among the most often voiced concerns are complexity and energy efficiency, and they're 100% valid when talking about current day technology. However, complexity is relative, and what seems challenging today might be child's play in a couple of generations. And while e.g. the wheel is unlikely to significantly change in the future, mechanical legs and their control systems are potentially capable of feats that a car just can't replicate.
For example, imagine an AI that knew exactly where to step and how hard, could track any number of threats and optimize each movement to maximize cover against them, while moving across difficult terrain without slowing down. Put the same AI in a traditional vehicle and, well, 90% of its capabilites are wasted. But will we perfect a walker's balance, mobility and ease of repair before ground combat vehicles are made obsolete by some other technology? That's entirely up to the writer.
It depends on the size
A roughly human-sized design is possible, although expensive, with current day technology and may be used to support infantry. More importantly though, if technology advances to the point where drones and anti-missile weapons are cheap and ubiquitous, you'll quickly find out that a lot of those weapons are also frighteningly effective against infantry (e.g. if you have lasers able to disrupt an incoming missile, permanently blinding enemy infantry will be trivial), so it stands to reason that soldiers will mostly be replaced by (or at least operate exclusively in or near) highly mobile vehicles. It's possible, whether for ethical reasons or because your AI just isn't quite good enough, that those will still be operated by humans, and to keep that human in one piece, they can't be much smaller than a current day tank (though probably much lighter).
Scaling up from there heavily depends on what technologies emerge in what order, and has diminishing returns (so no "land battleships", ever), but realistically, the limit is determined as much by doctrine as by physics. For example, in one of my settings, making the walkers larger made them worse at combat, but able to carry bigger reactors, computers and sensors and thus more of a force multiplier.


How to configure NAT between 2 private network ? CISCO routers

Question:
If anyone can help with configurations it will be helpful
Comment: We're not here to build entire configurations for you. If you share the current configuration, what you've tried and what problems you ran into we can help solving the problem.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: If you want transparent access both ways you need to avoid NAT and set up a tunnel to connect the networks, preferably a VPN connection. Make sure each side knows the networks/routes for the other side.
Answer: As Zac67 said, a tunnel suits your use case better. Here is an example with GRE on your router1:
<code> interface tunnel0
   tunnel source 184.108.40.206
   tunnel destination 184.108.40.206
   ip address 192.168.3.1 255.255.255.252
   no shutdown
 ip route 192.168.2.0 255.255.255.0 tunnel 0
</code>
Remember that GRE does not provides encryption. You can use IPsec for that purpose.
Answer: The best and possible option are

connect two networks with point to point leased line and Configure static route on both sites

connect two networks with ISP can configure IPsec site -Site tunnel to smoothly exchange traffic between two sites .

3 ) connect two networks with ISP can configure ipsec- GRE tunnel .
Even natting can be done at both ends to access resource of 192.168.2.0/24 from 192.168.1.0/24
Destination natting should be configured at server hosted sites . And PAT need to be configured on 192.168.1.0/24 subnet end
So with destination natted public ip address  servers resources can be access from 192.168.1.0/24 subnet network.


Sending notifications from the desktop to an android device

Question: I'd like to be able to be able to send alert from my PC to my phone, preferably via wifi.
The only related app I found was Android Notifier, but it does the other way: android to PC.
Answer: You should check out Google's Cloud To Device Messaging (C2DM) framework. If you just want to send stuff from your browser to your phone try Chrome to Phone (it's a kind of reference implementation of the C2DM framework).
Good luck!
Comment: Thanks, I'll check it out. It seems to be the right direction toward what I need. I had hoped there was already a simple app/command line that implements it as I need it not as a feature inside a bigger mobile app I'm building, but as the app itself.


Scan clients on WiFi network

Question: I want to see all clients on network that i'm connected.I know,that is possible on Android,but i don't know how to do it on standalone Linux.I tried searching anywhere,but no result.
Comment: Just to chime in with a Windows solution: [inSSIDer](http://www.metageek.net/products/inssider/) is awesome!
Answer: Presumably you don't have access to the router's web interface, as all pretty much all routers have a page that will show a list of client devices.
Anyway, this should be possible with a command-line tool called arp-scan.
You will either need to build it from source or use a package manager to install it. So on something like Ubuntu it would normally be:
sudo apt-get install arp-scan

The command you need for scanning would be something like this:
arp-scan --interface=wlan0 --localnet

There is more information in the user guide.
I would add that tools like these are in a bit of a grey area though as they can potentially be used for nefarious purposes.
Comment: Can you please add these,that "can potentially be used for nefarious purposes" ?I'm just curious,what can be done. I would like to learn something new :-) .
Comment: @Smax: It is related to ARP spoofing (http://en.wikipedia.org/wiki/Arp_spoofing) where a computer pretends to be something it is not, in order to disrupt and/or intercept network traffic.
Comment: With systemd/udev names I found an alias to `sudo arp-scan -l -t 200 -I $(ls /sys/class/net | grep -o "wl[^\t]\+")` extremely useful. _en_ instead of _wl_ for wired interfaces.
Answer: If you just need the IP/MAC/HOSTNAME of the clients in your network than arp-scan will do the trick. But if you need more details like operating system, open ports, etc. than I would suggest nmap/zenmap instead :
nmap -T4 -A -v 192.168.1.0/24

You can get more information about nmap here.
You can also use Fing which is known to be an app for android but that is available for linux too.
Answer: This is such a broad question that I figure it deserves a broad answer. If you really want to get to know the computers around you it'll take more than just an arp tool. In fact, there are several Linux distributions dedicated to this task. One of my favorites is one of the originals: http://www.backtrack-linux.org

Scan clients on WiFi network


Finding the value of $\tan 20^\circ$.

Question: Just a small thought popped up in my mind; and now I'm stuck on it. Any idea on how to find the value of $\tan 20^\circ$? I tried doing it by using the multiple angle formulas, but I didn't get an answer... How do I proceed?
Comment: Is your $20$ in degrees or radians?
Comment: It is well-known that this cannot be written in terms of square roots, this being equivalent to the fact that the regular nonagon is not constructible with ruler and compass.
Comment: Aditya, I assume you mean $20\circ$ and I have edited your question. Please correct me if I am wrong.
Comment: Thanks Thomas,.It is degrees
Answer: $\sin(20^\circ)$ and $\cos(20^\circ)$ can both be found using the triple-angle formulas. (I'm assuming your "20" was in degrees, not radians.)
Unfortunately, both of those will end up with you having to solve a cubic; you can use Cardano's formula to do that.
You can't solve it with just quadratics and algebra, for if you could, it'd be possible to trisect a 60-degree angle; but that is in fact exactly the example used generally to show that trisection is impossible, because $\cos(60^{\circ})$ is not a surd.
Comment: Are you sure Cardano's formula will work? You might need to take the cube root of a complex number, which is something of at least equivalent difficulty to trisecting an angle.
Comment: What you say about $\cos(60^\circ)$ is correct, but a little weird since people who don't know Galois theory will not understand why it not being a surd means that trisection is impossible!
Comment: @Keith: It's generally allowed to take roots of complex numbers, otherwise there is no closed form for the roots of those cubics.
Comment: You can also write down the cubic directly; $\tan 20^\circ$ is the positive $x$ such that the real part of $(1+ix)^3$ is $\frac12(1+x^2)^{3/2}$, which simplifies to a cubic equation in $x^2$.
Comment: @Keith: And by the way, taking cube roots of a complex number is not at all equivalent in power to trisection. Trisection is equivalent to finding roots of irreducible cubics in general, including $\sqrt[3]{2}$.
Comment: @user21820 That's why I said "at least equivalent."
Comment: @Keith: Even if you interpret "finding the value" physically, it's not because it's a complex cube root that it is not possible but because the cubic is irreducible over $\mathbb{Q}$.
Answer: We have that $\tan 20^{\circ} = \dfrac{\sin 20^{\circ}}{\cos 20^{\circ}} = \dfrac{\sin 20^{\circ}}{\sin 70^{\circ}}$.
This list here, gives you the exact value of the sine of every integer angle between $1$ and $90$. This allows you to compute $\tan 20^{\circ}$.

Whilst this section doesn't answer your question the way you want it, it does prove an alternative from brutally disgusting surds or horrible calculators.
You can construct a $20$-$70$-$90$ triangle yourself using a protractor and a ruler. Then take the ratio of the sides to get $\tan 20^{\circ}$. This won't be accurate, but you may find it amusing to do. :-)
Comment: Haha your linked pdf is amusing. I think he just churned it out using some computer algebra system.
Comment: @user21820 - He most certainly did, that would explain the horrid formatting. ;-)
Comment: Though the list provides closed forms for all angles multiple of $1°$, when the angle isn't a multiple of $3°$, cubic roots of complex numbers appear. To effectively compute these, you need... trigonometric functions, radicals aren't enough, and the solution is somewhat circular.
Comment: @YvesDaoust the $I$ that appears is the complex $i$ so.
Comment: @YvesDaoust nothing, just it took me a minute to realise it when I was looking at the linked pdf! Just weird formatting :P
Comment: @snulty: that's exactly what I mean. So what ?
Answer: $\cos(3t) = 4 \cos(t)^3 - 3 \cos(t)$
$\sin(3t) = 3 \sin(t) - 4 \sin(t)^3$.
Substituting $t = 20^\circ$ gives cubics that can be solved in closed form if you allow the operation of taking cube roots.
Answer: $20°$ is a third of $60°$, for which the value of the tangent is well known to be $\sqrt3$. Let us denote $x:=\tan(20°)$.
Then, by the addition formula,
$$\tan(40°)=\frac{2x}{1-x^2},$$
and
$$\tan(60°)=\frac{x+\dfrac{2x}{1-x^2}}{1-x\dfrac{2x}{1-x^2}}=\frac{3x-x^3}{1-3x^2}=\sqrt3,$$
or
$$x^3-3\sqrt3x^2-3x+\sqrt3=0.$$
It turns out that this cubic equation cannot be solved by real radicals, so  you need to use numerical methods such as Newton's.
Starting from $x=\dfrac\pi9$ ($20°$ in radians), the iterates are
$0.349065850399\cdots\\
0.364116885850\cdots\\
0.363970248087\cdots\\
0.363970234266\cdots\\
0.363970234266\cdots\\
0.363970234266\cdots\\
\cdots$
Comment: You misunderstood the meaning of the Wikipedia article. Specifically, it does not mean that it cannot be solved by radicals but that it cannot be solved without roots of complex numbers. Radicals **include** taking roots of complex numbers. But yes in any case to numerically find such values we end up having to use something like Newton's approximation.
Answer: I'm assuming you mean via multiple angle formulas, and I'm assuming you want an exact answer. The simple answer is, it would require a ridiculous amount of work. You can write:
$$ \tan \left(45-30+5\right)$$
You could perform the double angle formula twice, and reduce the problem to finding tan(5), which still isn't easily solvable. Heres a fun site to give you an idea of how bad these things can get :)
http://www.jdawiseman.com/papers/easymath/surds_tan.html
Note that if you are happy with an approximate solution, you should look into the CORDIC algorithm, which is how many hand-held calculators still do trigonometry :P
Comment: Yeah, I get it.... Complex equations. Any generalisation for finding roots of a cubic equation? (If there is any)
Answer: Since, obviously, numerical calculations would be required, I cannot resist the pleasure of reusing a 1400 years old approximation proposed by Mahabhaskariya of Bhaskara I, a seventh-century Indian mathematician $$\sin(x) \simeq \frac{16 (\pi -x) x}{5 \pi ^2-4 (\pi -x) x}$$ A similar one $$\cos(x)\simeq \frac{\pi^2-4x^2}{x^2+\pi^2}$$ Applied to $x=\frac \pi 9$, this leads to $$\tan(\frac \pi 9)\simeq \frac{10496}{28721} \approx 0.365447$$ Using this as a starting point $x_0$ for Newton method, as Yves Daoust proposed, the iterative scheme will converge in a couple of iterations $$x_1 \approx 0.363971632203$$ $$x_2\approx0.363970234267$$ $$x_3\approx0.363970234266$$.
Another solution would be to use Taylor expansion around $x=a$ $$\tan(x)=\tan (a)+(x-a) \left(\tan ^2(a)+1\right)+(x-a)^2 \left(\tan ^3(a)+\tan
   (a)\right)+$$ $$(x-a)^3 \left(\tan ^4(a)+\frac{4 \tan
   ^2(a)}{3}+\frac{1}{3}\right)+$$ $$(x-a)^4 \left(\tan ^5(a)+\frac{5 \tan
   ^3(a)}{3}+\frac{2 \tan (a)}{3}\right)+O\left((x-a)^5\right)$$ and to use $a=\frac \pi 8$ for which the tangent is $\sqrt 2 -1$ ( easily obtained using the double angle formula). Using one term, the result is $\approx 0.363094$; with two terms  $\approx 0.364018$; with three terms  $\approx 0.363969$; with four terms $\approx 0.363970$.
Another solution is based on Pade approximants. The simplest would be
$$\tan(x)\simeq \frac{(x-a)+\tan (a)}{1-(x-a) \tan (a)}$$ Using $a=\frac \pi 8$ would give $\approx 0.364002$.
The next Pade approximant would be $$\tan(x)\simeq \frac{(x-a)+\tan(a)-\frac{1}{3} (x-a)^2 \tan (a)}{1-(x-a) \tan
   (a)-\frac{1}{3} (x-a)^2}$$ which would give $\approx 0.363970238$.

Finding the value of $\tan 20^\circ$.


Is it possible to eradicate a tree in Stardew Valley?

Question: So I got rid of a ton of trees in my farm in Stardew Valley. I also removed all the acorns and used them all in a bunch of different things. And now I can't find any more Oak Trees anywhere in the world and it's spring year 2.
Answer: I don't think it's possible to completely eliminate trees from the game, but you might have to wait a while. Some things to check:

Just wait for the seasons to turn; I believe you may randomly spawn new oak saplings even if there's not a mature oak around to seed it.
Make sure you didn't overlook the trees in the Forest, which you can also cut down and which also respawn eventually.
Comment: You were right! They showed up in front of the bus stop during spring and seem to be regrowing.
Answer: Sure enough, immediately after posting this question, I find three oak trees at the bus stop you can knock down. I think they're there and respawn forever, but I would need to have that be verified elsewhere to be certain.
Answer: Oaks may respawn on your farm as the seasons pass. This typically happens from Winter to Spring, by my observations.
You can also find them scattered around the maps outside of your farm. These trees can be tapped or cut down, and I'm pretty sure that they re-grow much faster than the trees on your farm if you do cut them down. They may drop Acorns, which may be used to plant new Oaks.
Finally, if all else fails, the traveling merchant (found in the north-western part of the forest, which is south of your farm) occasionally sells Acorns for a random amount of gold, between 100 and 1000g per seed. This is the game's fail-safe to ensure that oaks cannot go 'extinct', though even 100g for an Acorn is quite outrageous under normal conditions. (I never throw 'seed' type items away, personally!)


How to Override default update_count_callback for category

Question: Is it possible to override default update_count_callback for category? The default function counts published posts while I want to count private posts. I do not want to register a new taxonomy.
Answer: In your update_count_callback function do a check for $post->post_status and don't increment your count if post_status is not private.
See this excellent answer on writing a custom update_count_callback callback function.
Edit:
Misread the question. To override the existing default for the category taxonomy you can create a function that overrides the global $wp_taxonomies variable
function change_category_arg() {
    global $wp_taxonomies;
    if ( ! taxonomy_exists('category') )
        return false;

    $new_arg = &$wp_taxonomies['category']->update_count_callback;
    $new_arg->update_count_callback = 'your_new_arg';

}
add_action( 'init', 'change_category_arg' );

Comment: @afnrf Category is a taxonomy. And you'll notice that he targets 'category' in his answer
Comment: Thanks, but thats for custom taxonomy. I want to override `category`s callback. I mentioned this in the question.


Custom Metabox with Ajax in Edit Post - Stuck

Question: I'm trying to create a custom meta box with multiple text fields. The idea is that there is initially one text box, then you can click the button 'Add New' and a another text box is added (using Ajax; no need to publish or update the post for the text box to be created). I'm using the following code (below), but it just doesn't work. I'm completely stuck; really need some help. I'm even willing to donate some cash if anyone can help me figure this out.
http://pastebin.com/usRhiJJ4
Comment: Either you don't understand what AJAX does/how it works or you haven't posted all the relevant code. Where is the global `$values` declared?
Comment: don't use globals unless you have no choice. I really doubt you need to considering what you're trying to acomplish...
Answer: If you end goal is to add text boxes dynamically, but still require the user to save/update the post, you don't need to use AJAX at all.
Just name the text fields appropriately so an array of values is POSTed, then handle it in your save action.
It may be helpful to save this array in a single post meta key, so you can just loop through it to output the meta box.
Give an ID to the enclosing
, something like 'slideshow_metabox'
Set your initial text boxes as so:
<input type="text" style="position: relative; right: 0; width: 85%;" name="slideshow[]" value="<?php echo $value; ?>" />

And change your 'add button' onclick to be:
function() {
    jQuery('#slideshow_metabox').append('<input type="text" style="position: relative; right: 0; width: 85%;" name="slideshow[]" value="" />');
}

Hope this helps.
Answer: Here's a script I wrote that I've used in 5-6 custom different types of meta boxes. I love having the add/remove fields option, makes things much faster since WP can be very slow when you save/publish posts, even tho it could just post to the admin-ajax.php file in the background and be much faster.
http://new2wp.com/snippet/jquery-add-remove-extra-input-form-fields/


Drywall mud to patch bubbled veneer?

Question: The veneer on this shelf's plywood bubbled up.  I imagine there is not much expansion and contraction, so can I simply use drywall joint compound to fill this void once I cut the veneer away?  I purchased some Bondo wood filler, but I am not sure I want to deal with using it.
Comment: Gypsum will absorb water and dry out repeatedly if the humidity is high.  That will affect the bonding of the gypsum to the substrate and the paint to the gypsum over time.  It might be better to choose a filler that is not as sensitive to water.
Answer: If you must remove some bubbled laminate and then make flush by filling, then the Bondo would be a much better bet for you if the choice is only between these two options.
In addition to sanding dead flush far better (because of its hardness) it'll also be far easier to make flush in the first place since it doesn't shrink back like drywall compound (and almost all similar water-based fillers). So in essence it'll reduce filling time, and sanding time despite being so much harder.
There are other options as well, including but not limited to:

epoxy putties;
DIY thickened epoxy (epoxy + filler material);
Durham's Water Putty or similar.

Drywall mud to patch bubbled veneer?