Is there a way to tell what frequency I need a PWM to be?

Question: I have a 12V DC motor that turns at 60 RPMs or 1 Hz. Do I need a PWM that matches the frequency in order for it to work? Most of the ones I've seen are around 25 kHz for a 12V 20A motor.
Comment: Output speed has very little to do with PWM frequency. 25 kHz sounds like just out of the audible frequency band.
Comment: The basic tradeoff is that the faster you go, the less acoustic noise, but your drive circuit may get hotter. Also more radiated emissions (if that is a concern). The slower you go (to a point) the less heating in your drive circuit, and less radiated emissions. You will very likely find that switching in the audible range creates an irritating tone. So 20kHz is a good minimum frequency if acoustic noise is  a concern.
Comment: Why do you need PWM at all? Do you want to run it slower than the rated speed?
Answer: No. You don't match rotations per second to PWM frequency. It needs to be much higher. You want it high enough so the motor runs smoothly (motor inertia smooths out motion and motor inductance helps smooth out current), but not so high the switching losses in your electronics is excessive. Often at least 8-10kHz, but you might want >20kHz if audible noise is an issue. You have quite a bit of leeway before it becomes outright "the wrong" frequency.
Answer: You want the motor inductance to result in reasonably low ripple in current during the PWM cycle. Here is one drive maker's rule of thumb:
\$ f_{PWM} \ge \frac {0.6V_{SUPPLY} }{L_{MOTOR}\cdot I_{NOMINAL}} \$
This formula results in quite a bit of ripple, around 40% peak at the limit and D=50%, so a bit higher frequency might be desirable, especially if the motor will be operated with low duty cycle.
In any case, the optimum PWM frequency thus can be dependent on the motor design (for switching efficiency and low cost you don't want the PWM frequency to be higher than necessary. An unnecessarily high PWM frequency can cause excessive losses in the motor as well as in the driver. On the other hand, if the frequency is too low, the RMS driver and motor current will be excessive and will result in a lot of driver losses (and copper losses in the motor and wiring). There might also be acoustic effects like an annoying whine if the frequency is audible or if it excites vibrational modes that are audible, and at very low frequencies the torque ripple might even be objectionable.
For example, pancake motors with very low inductance may require an external series inductor in order to be able to use a reasonable PWM frequency.
Despite rules of thumb and so on, you'll likely have to test the motor and driver to get a good estimate of the efficiency. 20KHz-25kHz is probably a reasonable starting point for a conventional brushed DC motor with a gear head as I think you are describing.
Answer: The frequency to choose depends on the applied filter (e.g. like a RC filter). Your DC motor probably won't need any filters because its inertia will serve this purpose as long as the pwm frequency is high enough (some kHz should be sufficient). The motor eventually will produce some undesirable noise, in that case you might want to add a capacitor for smoothening.
Those 25 kHz you mentioned probably rely to the intel standard for PC fans. But note: the 25kHz are not proportional to rpm in any kind. When dimming with PWM it's the duty cycle that determines the motors power consumption. If you want to control the actual rpm, you need to implement a control loop. Unless you don't use one of those mentioned 4-pin pc fans, setting rpm just with PWM is not possible.
Comment: That's a pretty crazy computer fan if it draws 20A. Enough to fly a small model plane!
Comment: Its a wiper motor which I'm using to drive an auger bit for a filament extruder, I'll definitely look into what you've mentioned, Im just kind of busy otherwise i would respond sooner, thank you for the advice!
Comment: Even 4-pin PC fans require the motherboard to read the fan speed signal for closed loop control. The only advantage over 3-pin fans is that fan speed regulation is done with PWM - and lower losses - vs. directly changing the DC voltage with which the fan is driven.
Answer: Shepro's answer shows a way to estimate the lower limit for \$f_{PWM}\$. I'd like to add that the upper limit typically depends on your dead time, which introduces Dead Time Distortion (DTD). There are several aspects which come into play, including regulation error (which is usually compensated for), harmonics (which sometimes have to be filtered out) and increased MOSFET power dissipation (during dead time the motor current flows though the MOSFET body diodes which have a much higher voltage drop than a fully open MOSFET).
As a rule of thumb, you want your PWM period to be about 50 times larger than the dead time, so the dead time which occurs twice during a PWM cycle takes only 4% of the time. Then you will need to program the dead time compensation only if you need a good precision, and very simple compensation methods (like adding a constant offset to the duty cycle) will be sufficient.
Audible range was already mentioned. Usually you want \$f_{PWM}\$ to be higher than audible frequencies, to avoid noise. Typically, noise above 16kHz is considered to be faint enough so that most people won't distinguish it, especially behind a normal mechanical noise of a running motor.


EMF in Faraday's Law

Question: I am really confused in the definition of EMF $\varepsilon$ in Faraday's Law.
The example I saw was a loop of wire moving with velocity $\vec{v}$ inside a uniform magnetic field $\vec{B}$, which does not complete the whole area of the loop, hence leading to a change in magnetic flux through the wire $\Phi_B$.
The EMF is defined as the work per unit charge. In this case $\vec{F_B} = q \vec{v} \times \vec{B}$. Then the EMF is given by:
$$ \oint_C \frac{\vec{F_B}}{q} \cdot d\vec{s} =\oint_C (\vec{v} \times \vec{B}) \cdot d\vec{s} $$
Now Faraday's Law says:
$$\varepsilon = -\frac{d\Phi_B}{dt}$$
Until here, I understood everything, but here is the part I don't get. This equation is rewritten in terms of the electric and magnetic fields using the following relationships:
$$\Phi_B = \iint_S \vec{B} \cdot d\vec{A}$$
$$\varepsilon = \oint_C \vec{E}\cdot d\vec{s} $$
The part I don't understand is the definition of $\varepsilon$, the EMF. Why is it the closed integral of the electric field? As far as I know, the electric field is the electric force per unit charge, but in this case, the force is magnetic. How is this definition true?
Answer: That is just how we define the induced emf: It is just the integral of the electric field over the closed loop.
To see that this makes sense, consider the definition of emf: It is the work done on an electric charge over some path. Imagine a unit charge inside an electric field $\vec E$. To move this charge an infinitesimal distance $d\vec s$, we need energy $\vec E . d\vec s$. To get the energy over the whole loop, we simply integrate that term.
It also makes sense dimensionally: The unit of the electric field (in SI) is kg⋅m⋅s−3⋅A−1, and the unit of the volt is kg·m2·s−3·A−1, which is just the former multiplied by distance.
Comment: Yes that's correct.
Comment: Ok, I think I got it, but is this way of thinking about it good? : I would say that the changing magnetic flux creates an electric field that obeys Faraday's Law. Is this right?
Comment: Your answer is not fully correct. In the frame where the wire is moving in the presence of a static field $\bf B$ there is no electric field. Neither the changing flux induces an electric field in that frame. The electric field appears in the rest frame of the wire.
Comment: A bit of clarification is necessary. A changing magnetic field is not required, as you're saying, however from the frame of reference of the loop, you can indeed say that a changing magnetic field induces an electric field in the loop.

EMF in Faraday's Law


Windows Service performance vs. Windows Application performance

Question: I'm developing a piece of software that needs to be run in high-performance and I'm wondering if it should be run as Windows-Service or regular Windows-Application. The question is: is there any difference between both in terms of performance? means: will the OS scheduler give Windows-Service more CPU ticks than Windows-Application?
Answer: To answer the question, see Description of Performance Options in Windows:

You can use the performance options to set Windows be optimized for either foreground programs or background services. The assumptions are that background services are relatively few in number and would be more efficient with more CPU time, and that program servers or interactive programs on desktop computers would be more efficient with shorter time slices to allow them to be more responsive to keyboard input and to service more threads (many thousands on Terminal Services in Application Server mode.
...
The situation become more complex when you enable the Foreground Applications option. This introduces the "variable quantum" concept. In this case, background tasks receive a different quantum than the quantums received by the foreground tasks. Also, both sets of quantums are shorter than a thread would receive on a computer set for background services. Currently, a background process receives a quantum of 3 and a foreground process receives a quantum of 9. Therefore, you can calculate the length of time the thread will run before its timer expires.

Read the whole link for more details. TL/DR: background services receive longer quantas.
However, I highly doubt you need to worry about this setting. First and foremost 99.9999% of applications do nothing all the time, but wait for some IO to complete (disk, network). Unless you perform arithmetic in a tight loop, your code is, for all practical reasons, never running and always waiting. A boost helps you nothing. And I highly doubt you really need to deploy a service that does high CPU in a tight loop.
A much more relevant topic for you would be to go over the High Performance Windows Programs to learn how to write proper performance programs on Windows (ie. use IO queue completion status and friends).
And, if you need a CPU boost, just disable CPU power savings in BIOS.
Comment: Excellent answer. To add to this (although I can't find the reference now...) there is a similar variable quantum thing between server and non-server versions of Windows, regardless of user settings. Plus, of course, effects due to priority boost on events being signalled.
Comment: @Damon: perhaps [Inside the Windows Vista Kernel: Part 1](http://technet.microsoft.com/en-us/magazine/2007.02.vistakernel.aspx) : `By default, on client versions of Windows threads are permitted to run up to 2 clock ticks (6 if in the foreground)` (as opposed to 3 and 9 for server).
Comment: Indeed, that's it! :)


How can I install hotfixes silently to speed up a fresh Windows 7 installation?

Question: When installing Windows 7 there are close to or more than 200 hotfixes required for it to be up to date, even when installing Windows 7 SP1. How can I speed up the process of installing all these hotfixes?
Answer: You can download updates for Windows 7 from Microsoft here. Download the required updates and put them all in the same folder. Some updates must be kept in their original download folder since they contain several files - install these manually or via a separate script. These msu files are Windows Update Standalone Installer files. See refs: 1 and 2.
To run msu files silently without any interaction try the following:

Open an admin level command prompt. It is crucial that it is admin level
CD to the folder containing the hotfixes, make sure the prompt shows the full, correct path.
Then run one of these commands depending on your OS (first one for 64-bit computer, second one for older x86 computers. Not sure if a 64-bit computer also needs some x86 hotfixes. Just do a single star *.msu to install all hotfixes):

for %h in (*x64*.msu) do start /wait wusa "%cd%\%h" /quiet /norestart
for %h in (*x86*.msu) do start /wait wusa "%cd%\%h" /quiet /norestart
Some hotfixes have prerequisites, some hotfix are deprecated, and some are outdated. Especially those relating to IE. You can run the command a couple of times to account for some of these variables. Check in the event viewer (configuration view) what hotfixes installed and which failed by error code.
Trench tip: No responsibility accepted, but when I install a fresh computer I disable system restore to speed things up and avoid too many unnecessary system images from being created during hotfix installation. I would not recommend this, it is easy to forget to reactivate, but it does speed things up significantly. For a computer in use (as opposed to fresh build), I would never do this.
Comment: wusa is the slowest version to install Updates. extract the MSU to a CAB and use DISM to install them. This is MUCH faster.
Answer: There is a tool specifically made for this, called RTSe7enLite.
You can also use it to make your installation custom or unattended.
Check it out and don't hesitate to ask if you need other information.


How to represent no-detection in a confusion matrix

Question: So let's say we have a multi-class classification problem and we want to represent the outcomes as confusion matrix. All the examples I'm finding on the web asume that all the elements are detected. I understand the idea of the confusion matrix but I can't see how one can represent the non-detected elements on it.
Answer: You very well may want to abstain from classifying certain examples. It may be more costly to classify incorrectly than to state that you are uncertain and unwilling to classify, for example in a recommendation system.
Consider non-detection a new class that you never observe in the training data. You can build in a penalty for non-detection in your loss function, if you want to start at the very beginning. However, a simpler solution is just to set a probability cutoff beneath which you abstain from classifying--e.g. if the vector of estimated class membership probabilities has maximum less than 60%, don't classify. As long as the loss function is symmetric in the various classes, this corresponds to a implicit penalty on misclassification. You can even set a threshold for each class if failing to classify has higher/lower cost for certain classes.
Comment: But the q asks how can you then define/calculate a confusion matrix? Can you answer that?


What does an XXXX ident mean?

Question: A couple of guys who I met online yesterday claim to have been in the military. One of them was tracking flights earlier and saw a plane with a callsign of XXXX. He said that this was very bad and is seen only rarely, specifically during war. Is he right, or is it April Fools? What does 4X mean?
Comment: "The problem with the internet is that it is hard to tell the truth from the lies." -Abraham Lincoln
Comment: I think he's just messing with you. The "ident" you're referring to, is merely a field built into the transponder that allows the operator to enter their registration. My guess is either this was done wrong in the aircraft or the receiving equipment mangled it. Just to note this isn't something normally done by the pilots, either - it's pre configured as part of the installation
Comment: Do you mean "XXXX" literally or as a placeholder for something?
Comment: It means the pilot is hanging out for a very average Queensland mid-strength beer?
Comment: This is listed literally as its callsign and the people I spoke to approached it as a literal callsign, not a placeholder.
Answer: Either the person you are talking to is misleading you, or the software they are using to track aircraft is inserting "XXXX" as a placeholder because it does not know the true callsign.
ICAO Annex 10 Volume 2 Chapter 5 discusses the standards for aviation call signs:

126.96.36.199.2 Radiotelephony call signs for aircraft
220.127.116.11.2.1.1 Full call signs
An aircraft radiotelephony call sign shall be one of the following types:

Type a) — the characters corresponding to the registration marking of the aircraft; or
Type b) — the telephony designator of the aircraft operating agency, followed by the last four characters of the registration marking of the aircraft;
Type c) — the telephony designator of the aircraft operating agency, followed by the flight identification.

It is theoretically possible that "XXXX" could be the registration marking on a specific aircraft, but if you look at a list of registration prefixes you will see that "XX" is not a valid prefix.
Military callsigns will similarly be either a portion of the registration or inventory number of the aircraft itself (such as Navy 12058), or a "mission" callsign consisting of a pronounceable word and a number (such as DOOM41).
An aircraft's callsign can be transmitted via ADS-B, but in a combat scenario a military aircraft would not be transmitting at all.

What does an XXXX ident mean?


Cannot call ShellExecute "runas" from ClickOnce application

Question: I have a ClickOnce app that needs to execute regasm, to register an assembly that it just updated.
If UAC is turned off, it works fine. If UAC is turned on, however, regsam's exit code is 100.  If I run the same command in a cmd prompt, it fails with a message about needing admin privileges.  If I use the run as admin option when I open the cmd prompt, it succeeds.
I tried changing asInvoker to highestAvailable in the manifest, which works locally, but ClickOnce refuses to publish it that way.  I tried adding an imperative permissions demand for RegistryPermission, to no avail.  I tried setting
ProcessStartInfo.verb = "runas"

and .UseShellExecute = True

but still no love!
I've done a ton of reading about CAS, UAC and ClickOnce... I saw something about UAC being inconsistent with the ClickOnce dream (which strikes me as utter BS, but regardless) so I guess my question would be, is what I'm trying to do even possible?  And if so, how?

The rest is just background info, that doesn't strictly pertain:   The heinous part is, the project is done, except for this problem!
The purpose of the project is to automatically update a "shared" AddIn (IExtensibility2) for Outlook.  Since we opted out of VSTO we can't use native ClickOnce support, so I created a ClickOnce app in which we embed the updated DLL as a resource.  It's executed at startup, so when a new version of the ClickOnce app is available it automatically downloads; when it executes it compares the installed version to the version of the copy that's embedded, and prompts the user if its embedded version is newer.  The hope was that we would be able to leverage ClickOnce rather than roll our own (which is what we did for the legace VB6 version.)
Answer: If you need more than sandboxed privileges, you better opt for full-trust apps. In .Net 4.0, all the CAS is deprecated. A fulltrust click once app in .Net 4.0 can do pretty much anything.
Comment: Actually, it was my bad, UseShellExecute wasn't being set to True, that was the problem; with that and verb set to "runas", UAC is invoked.
Comment: I have the "this is a full trust application" radiobutton set, in the security tab.  It can do anything as long as UAC is disabled, but when it isn't, it fails/does not prompt for elevation.


What's the difference between Easy and Normal in Murder by Numbers?

Question: What are the differences between the Easy and Normal difficulty levels in the Picross-like puzzle game Murder by Numbers?
Answer: The game explains the difference after you complete the tutorial on a new game:

Easy: Completed rows are automatically crossed out. Hints are on by default.
Normal: No automatic completion of rows. Hints have to be toggled on.
If this is your first time playing this type of puzzle, we recommend starting on easy. Otherwise, challenge yourself to normal! You can change your difficulty at any time, and cases can always be replayed for a better rank.

Additionally, the difficulty will also affect how many case points you get for solving a puzzle.
Answer:
There are only two difficulty levels in this game. There's "Easy," which gives players hints for each puzzle right away, and it crosses out unused squares once players finish filling in a row. Then, there's "Normal," which just lets players do the puzzle on their own with the option to ask for hints if needed.

Game Rant


How does commercial banks handle transfer of deposit?

Question: In fractional reserve banking, the bank is obliged to have a minimum ratio of liquidity it have (to pay for customers' deposits) and the total money its customers have in their bank accounts.
But what happens when a customer of bank A transfers its deposits to a customer of bank B? In this case, the bank A's ratio of reserves to deposits increase and will be in a safer state (because it's far from a bank run). On the other hand, bank B would have less reserve to deposits ratio than before the transfer of deposits and thus, is more probable of a bank run.
How does banks handle these transfer of money between themselves?
Answer: First, your description is not necessarily correct because when banks transfer liabilities (e.g. including customer deposits) something has to happen to asset side of balance sheet. Theoretically that could involve transfer of reserves from bank A to bank B. This means that the description you talk about is not correct.
Second, banks had to abide by reserve requirements before they were set to zero recently, but they did not had to do it from second to second. Banks have constant inflows of reserves (e.g. from payments from other banks) and they simply have to check at the end of the day whether the inflows are larger or smaller than outflows. If they had too many outflows they could (see discussion in this world bank blog):

borrow from other banks on interbank market
borrow from central bank (especially post 2009, before that it was possible but heavily discouraged)
by liquidating some unencumbered assets on the asset side of balance sheet.


How to find V1 and V2 using Nodal Analysis?

Question: I would like to use Nodal Analysis to find the power absorbed by 2 Ω resistor, V1, V2, and V3. For V3, it clearly shows that it is -24V. I would like to ask is V1 the same as Vy, or they are different values?
Answer: To help you identify the nodes in the circuit:

If the label V1 had been written next to the dependent source 4Ix at the top(i.e., anywhere on the blue area), it would still be equal to VY because that is the same node.

The second part of your question is: solve my homework; For that you should show your work and ask for clarifications as needed.
Answer: I get the impression you are asking about the application of Kirchhoff's Voltage Law (KVL) when some of the potentials quoted aren't "voltages across something", but rather absolute potentials, as is the case for \$V_1\$ and \$V_3\$ here.
KVL doesn't care one bit about absolute potentials, it only concerns itself with the potential differences between the ends of each element in a loop. This means that you can't use the values \$V_1\$ and \$V_3\$ in isolation. You can only apply KVL in terms of the voltages across the 5A source and the 24V source.
The behaviour of this circuit is not  at all dependent on the absolute potential of the bottom node, which in this case is clearly indicated (by the "ground" symbol) to be 0V. That node could have any potential, and it would not affect its behaviour, because there are no other absolute, known potentials being "applied" anywhere else. If that ground potential were to rise by ten volts, the potentials at all other nodes would also rise by that amount.
In this case, the statement that the bottom node is at 0V is merely a fact that you can use to derive absolute potentials elsewhere, after you've solved for all the voltages across things using nodal analysis. The analysis itself is unconcerned with such absoluteness.
KVL requires you to state the potential differences as you traverse each element in a loop, and in that sense you are required to assign algebraic representions of all "voltages across things". It's possible to completely characterise this circuit without any reference to the 0V absolute ground potential, but the solutions will all be potential differences, across various things. When you have those "voltages across", you may then assign absolute potentials at each node with respect to any other.
After the solution is found, it should be clear that the bottom node, at 0V,  will be 24V higher in potential than the node at the top of the 24V source. That potential is called \$V_3\$ right now. Conversely, \$V_3\$ must be 24V lower in potential than 0V, or in other words \$V_3 = -24V\$. But, for now, that is irrelevant, since your application of KVL makes use of only the potential difference of 24V across that voltage source.
Similarly, applying KVL to the loop containing the 5A current source does not require you to know the absolute potential at either end of that source. Assign a variable name to that potential difference, like "\$V_{P}\$", and solve for that. Then later you may make the observation that \$V_1\$ is clearly \$V_{P}\$ volts different from the ground node, or in other words \$V_1 = 0V + V_P\$.
I hope that you noticed that \$V_1 = 0V + V_P = V_P\$, and so it's quite safe to apply KVL using the voltage across that 5A source as \$V_1\$ instead of \$V_P\$. They're obviously the same value. The point I'm trying to make here is that in this case you are right that you may assume that \$V_1\$ is the voltage across the 5A source, and also across the 4 resistor, but I want to be clear that KVL needs the voltages across things, not absolute potentials at any point. In this case the voltage across the source just happens to be \$V_1\$. And yes, you are right, \$V_Y = V_P = V_1\$. But what if the potential at the bottom wasn't 0V, what if it were +10000V? Would that make any difference? Not in the sense that the voltage across the 4Ω resistor and the voltage across the 5A source are identical, and haven't changed, and that's all you need to know when applying KVL.
The same goes for \$V_3\$. That absolute potential is of no interest to you, or KVL, or nodal analysis. What's important is the voltage across the 24V source, which is clearly 24V. You can solve this entire system without ever knowing that the bottom node is actually ground, at zero volts.
After you have all the voltages across the various elements, then you can say that \$V_1\$ is this, or \$V_3\$ is that, finally making use of the ground as a reference that every other potential is quoted relative to.
Answer:
I would like to ask is V1 the same as Vy, or they are different
values?

They are the same value because whenever a node voltage is shown and there is an obvious 0 volt reference point (such as ground) then the node voltage is relative to that ground voltage (0 volts).
Answer:
First, I will present a method that uses Mathematica to solve this problem. When I was studying this stuff I used the method all the time (without using Mathematica of course).

Well, we are trying to analyze the following circuit:

simulate this circuit – Schematic created using CircuitLab
When we use and apply KCL, we can write the following set of equations:
$$
\begin{cases}
\text{I}_4=\text{I}_0+\text{I}_5\\
\\
\text{I}_4=\text{I}_1+\text{I}_2\\
\\
\text{I}_3=\text{I}_2+\text{n}\cdot\text{V}_1\\
\\
\text{I}_5=\text{I}_3+\text{I}_6\\
\\
\text{I}_1=\text{I}_0+\text{I}_7\\
\\
\text{I}_7=\text{I}_6+\text{n}\cdot\text{V}_1
\end{cases}\tag1
$$
When we use and apply Ohm's law, we can write the following set of equations:
$$
\begin{cases}
\text{I}_1=\frac{\text{V}_1}{\text{R}_1}\\
\\
\text{I}_2=\frac{\text{V}_1-\text{V}_2}{\text{R}_2}\\
\\
\text{I}_3=\frac{\text{V}_2-\text{V}_3}{\text{R}_3}
\end{cases}\tag2
$$
And we also know that \$\text{V}_1-\text{V}_3=\text{k}\cdot\text{I}_2\$ and \$\text{V}_3=-\text{V}_\text{i}\$.
Now, we can put equations \$(1)\$ into \$(2)\$ to get:
$$
\begin{cases}
\text{I}_4=\text{I}_0+\text{I}_5\\
\\
\text{I}_4=\frac{\text{V}_1}{\text{R}_1}+\frac{\text{V}_1-\text{V}_2}{\text{R}_2}\\
\\
\frac{\text{V}_2-\text{V}_3}{\text{R}_3}=\frac{\text{V}_1-\text{V}_2}{\text{R}_2}+\text{n}\cdot\text{V}_1\\
\\
\text{I}_5=\frac{\text{V}_2-\text{V}_3}{\text{R}_3}+\text{I}_6\\
\\
\frac{\text{V}_1}{\text{R}_1}=\text{I}_0+\text{I}_7\\
\\
\text{I}_7=\text{I}_6+\text{n}\cdot\text{V}_1
\end{cases}\tag3
$$
Hence, we can solve for \$\text{V}_1\$ and \$\text{V}_2\$:

$$\text{V}_1=\frac{\text{V}_\text{i}\left(\text{R}_2+\text{R}_3-\text{k}\right)}{\text{k}\left(1-\text{nR}_3\right)-\text{R}_2-\text{R}_3}\tag6$$
$$\text{V}_2=\frac{\text{V}_\text{i}\left(\text{k}-\text{R}_2-\text{R}_3\left(1+\text{nR}_2\right)\right)}{\text{k}\left(\text{nR}_3-1\right)+\text{R}_2+\text{R}_3}\tag7$$

Where I used the following Mathematica-code:
In[1]:=Clear["Global`*"];
FullSimplify[
 Solve[{I4 == I0 + I5, I4 == I1 + I2, I3 == I2 + n*V1, I5 == I3 + I6,
   I1 == I0 + I7, I7 == I6 + n*V1, I1 == V1/R1, I2 == (V1 - V2)/R2,
   I3 == (V2 - V3)/R3, V1 - V3 == k*I2, V3 == -Vi}, {I1, I2, I3, I4,
   I5, I6, I7, V1, V2, V3}]]

Out[1]={{I1 -> ((k - R2 - R3) Vi)/(R1 (R2 + R3 + k (-1 + n R3))),
  I2 -> (n R3 Vi)/(R2 + R3 + k (-1 + n R3)),
  I3 -> (n (k - R2) Vi)/(R2 + R3 + k (-1 + n R3)),
  I4 -> ((k - R2 + (-1 + n R1) R3) Vi)/(R1 (R2 + R3 + k (-1 + n R3))),
   I5 -> -I0 + ((k - R2 - R3 + n R1 R3) Vi)/(
    R1 (R2 + R3 + k (-1 + n R3))),
  I6 -> -I0 - ((-1 + n R1) (k - R2 - R3) Vi)/(
    R1 (R2 + R3 + k (-1 + n R3))),
  I7 -> -I0 + ((k - R2 - R3) Vi)/(R1 (R2 + R3 + k (-1 + n R3))),
  V1 -> ((k - R2 - R3) Vi)/(R2 + R3 + k (-1 + n R3)),
  V2 -> -(((-k + R2 + R3 + n R2 R3) Vi)/(R2 + R3 + k (-1 + n R3))),
  V3 -> -Vi}}

Using your values:

$$\text{V}_1=-\frac{72}{19}\approx-3.78947\space\text{V}\tag7$$
$$\text{V}_2=-\frac{552}{19}\approx-29.0526\space\text{V}\tag8$$

And the rest using Mathematica-code:
In[2]:=Clear["Global`*"];
Vi = 24;
I0 = 5;
k = 4;
n = 2;
R1 = 4;
R2 = 5;
R3 = 2;
FullSimplify[
 Solve[{I4 == I0 + I5, I4 == I1 + I2, I3 == I2 + n*V1, I5 == I3 + I6,
   I1 == I0 + I7, I7 == I6 + n*V1, I1 == V1/R1, I2 == (V1 - V2)/R2,
   I3 == (V2 - V3)/R3, V1 - V3 == k*I2, V3 == -Vi}, {I1, I2, I3, I4,
   I5, I6, I7, V1, V2, V3}]]

Out[2]={{I1 -> -(18/19), I2 -> 96/19, I3 -> -(48/19), I4 -> 78/19,
  I5 -> -(17/19), I6 -> 31/19, I7 -> -(113/19), V1 -> -(72/19),
  V2 -> -(552/19), V3 -> -24}}

In[3]:=N[%2]

Out[3]={{I1 -> -0.947368, I2 -> 5.05263, I3 -> -2.52632, I4 -> 4.10526,
  I5 -> -0.894737, I6 -> 1.63158, I7 -> -5.94737, V1 -> -3.78947,
  V2 -> -29.0526, V3 -> -24.}}

And notice that:
$$\text{P}_{\text{R}_3}=\text{I}_3^2\cdot\text{R}_3=\left(-\frac{48}{19}\right)^2\cdot2=\frac{4608}{361}\approx12.7645\space\text{W}\tag9$$


Where should I install a wall heater?

Question: I have a house with no wall heater, and would like to install one.  What criteria should I use to help me determine the best place for the heater?  Is it better, for instance, to be on an inside wall?  Would it be better to have it beside the door of a room I want to get some of the heat, or on an adjacent wall, to "direct" the heat toward the door?
Comment: under a window.. mixes cold air with warm directly giving the best mixing ratio.
Comment: Why are you installing a new heater? Why a wall heater? What existing heat sources are there?
Comment: There was a wall heater originally, but the owner didn't like its location, removed it, filled in with drywall and painted, and used only space heaters.
Answer: Most HVAC's are designed with vents near areas or low insulation or drafts, which are typically windows and doors on exterior walls. I'd suggest the same should be done for any space heater, baseboard, or in your case, a wall heater. The reason is to equalize the temperature in the room and counter-balance any drafts.
That said, a wall heater will have different requirements from an HVAC vent, the main one being that you only have a single heater rather than lots of vents. You have to consider the power/fuel source and how you'll run the line to your selected wall. Be sure place it where combustible materials won't be placed near the heater (the specs on the heater will tell you how much clearance it needs).
One last consideration is to maximize the space that can receive heat, and in particular the spaces that you plan on using the most. So if you place it in a room and close the door, no other rooms will be heated, but that room will be heated really well. If you place it in a hallway, the whole home will get some heat, but each room will only get a little of that heat and only when their doors are left open.

Where should I install a wall heater?


what is the relationship between NFC and NDEF

Question: What exactly is the relationship between NFC and NDEF? Does any NFC device always have to have data in NDEF format? Or is it possible to have NFC but not NDEF (although I think vice versa is not possible is it?) ? What would an empty NFC card be like? Would it still have the NDEF header information but no payload? Or is it possible for the tag to be completely empty, that is, not have any header information either? In that case, would this still be detectable by an android phone or a card reader? What exactly makes a tag to be detected by a reader?
Comment: read about NFC here, it answers to all of your questions http://developer.android.com/guide/topics/connectivity/nfc/index.html
Answer: In NFC communication there are mainly three modes of operation

Reader/Writer Mode (PCD)
Peer-to-Peer Mode (NFC)
Tag/Card Emulation Mode (PICC)

The base of NFC is antenna coupling, whenever an NFC device approaches another one antenna coupling occurs, there is a Multiprotocol RF front-end IC chip connected to the reader/writer device, the other device can be a reader/writer device or simply a NFC tag (an nfc tag is nothing but an antenna and a data storage).  Communication takes place only when the ISO?IEC 18092 & ISO/IEC 14443 protocols are passed, otherwise no communication will take place.
What exactly is the relationship between NFC and NDEF?
In android all NFC devices are detected and processed as PICC devices, android.nfc package provides access to Near Field Communication (NFC) functionality, allowing applications to read  NDEF message in NFC tags
Does any NFC device always have to have data in NDEF format?
Yes and no, In this mode the NFC device emulates an ISO 14443 smart card or a smart card chip integrated in the mobile devices is connected to the antenna of the NFC module. A legacy reader cannot distinguish a mobile phone operating in tag emulation mode from an ordinary smart card.
This is an advantage of NFC technology as already existing reader infrastructures do not need to be replaced. The smart card chip used for tag emulation is also referred to as secure element.
Is it possible to have NFC but not NDEF?
Yes, it is fairly covered here : Advanced NFC
What would an empty NFC card be like? Would it still have the NDEF header information but no payload? Or is it possible for the tag to be completely empty, that is, not have any header information either?
NDEF is made of four parts
3-bit TNF (Type Name Format)
Indicates how to interpret the variable length type field.
Variable length type
Describes the type of the record. If using TNF_WELL_KNOWN, use this field to specify the Record Type Definition (RTD).
Variable length ID
A unique identifier for the record. This field is not used often, but if you need to uniquely identify a tag, you can create an ID for it.
Variable length payload
The actual data payload that you want to read or write. An NDEF message can contain one or none or multiple NDEF records, so don't assume the full payload is in the first NDEF record of the NDEF message.
In that case, would this still be detectable by an android phone or a card reader? What exactly makes a tag to be detected by a reader?
The tag dispatch system uses the Type Name Format(TNF) and type fields to try to map a MIME type or URI to the NDEF message. If successful, it encapsulates that information inside of a ACTION_NDEF_DISCOVERED intent along with the actual payload. However, there are cases when the tag dispatch system cannot determine the type of data based on the first NDEF record. This happens when the NDEF data cannot be mapped to a MIME type or URI, or when the NFC tag does not contain NDEF data to begin with. In such cases, a Tag object that has information about the tag's technologies and the payload are encapsulated inside of a ACTION_TECH_DISCOVERED intent instead.
For an empty message the TNF will be TNF_EMPTY(Indicates the record is empty. Type, id and payload fields are empty in a TNF_EMPTY record.) in such cases it falls back to ACTION_TECH_DISCOVERED.
Refer these links
Comment: Let me see if I get the gist of it: the fact that a tag gets discovered has nothing to do with the data on it, but the actual design of the tag and reader hardware themselves. If a tag device has been designed appropriately, it will get detected, and if it is detected, the reader will attempt to read it. If the reader is an android phone and it reads an NDEF message, `ACTION_NDEF_DISCOVERED` intent is generated. But if it turns out that it was not NDEF, then `ACTION_NDEF_DISCOVERED` is generated? Is this true? Please correct me if I am wrong.
Comment: In android there are provision for all types of NFC communication, but by default it uses PICC mode, if you made a device with another mode of communication you may need a separate application with further programming, else it will be discarded. For the above said further programming you might need to check the link I posted under the name Advanced NFC
Comment: Hope you understand now ?
Answer: NFC is a set of telecommunication standards, NDEF is a data format. So NFC and NDEF exist independantly of each other, for example an NDEF message can be a file.
The NDEF records directly define a message, so there is no such thing as an empty NDEF message (it would be 0 bytes). Many types of tags can however be formatted 'to be NDEF' because concepts like access keys and data areas must be agreed upon before writing the actual NDEF data, or the stored NDEF data would not be readable to a third party (defying the whole point of using standards).
Tags are never empty in themselves (like hard drives), but the data written to them can say that the amount of useful data is zero.
Passive (tags) NFC devices are powered by active (phone / reader) NFC devices. That is, active devices turn a magnetic field on an off (polling), which lets passive devices harvest power for their internal circuits and communication antennas.


Sharing volumes between pods on different clusters

Question: we have two independent kubernetes clusters that work like Main and it's high available one. and we have some stateful applications that store data within cluster's persistent volumes.
my question is .. can I share a PV between those two clusters, so I can have a final result of two pods running on the two clusters reading/writing on the same volume as if they're running on one same cluster.
I'm focusing on sharing data between the pods regardless how the pods would handle the data writing.
Answer: Can you share a PV, between clusters: in theory yes. You can mirror one PV object into another cluster, given you have similar storage classes and accesses to your storage backend.
Sharing PV between Pods, within one or more clusters: depends. First, on your storage backend. There may be some locking mechanism that would prevent you from attaching the same volume to more than one client at a time.
In addition of which: if your storage backend provides with block devices, your volumes would involve some file system, that may not support being mounted on two systems at once.
To work around those two points above, we could consider something like NFS, CephFS, EFS (aws), a samba share, ... Next, it depends on your application: what are the risks of those two Pods of yours writing the same file at once, and corrupting your data?
Short answer: in theory yes, you could. Although if possible: try to question this requirement. Sounds unusual, may be something wrong with design/architecture.
Comment: I got your point. I'm planning to have one master pod to write and the other pods sharing the storage would only read the data so I'm breaking the reading process which is the main big fat one over multiple pods on multiple clusters.

but to conclude it's only about mirroring the storage and not pointing to the same storage. did I get you correctly?
Comment: You could point your PV to the same storage, if your storage backend allows it (cephfs, nfs, ...). Although won't scale for ever: if you're struggling with reads, a single NFS server would eventually have the same limitation. Depending on your application: adding new processes on the same filesystem might not help at all.
Comment: @SherifHamdy If you're planning for one pod to write to this storage, what happens when the cluster with that pod becomes unavailable and your High Availability architecture switches to the other cluster?  Will your architecture stop writing to the storage until the writer pod is launched on the other cluster?
Comment: @Sotto then the other pod is promoted to be the master and start the write and the gtm record will failover to the HA cluster in the writing ingress


Is a Riemannian metric a $2$-form?

Question: In Lee's Riemannian Manifolds; An introduction to Curvature, he defines a Riemannian metric as an element of $\Gamma(T^2_0M)$, a $(2,0)$-tensor. Is this the same thing as a $2$-form? Is there a difference between being a section of $T^\ast M\times T^\ast M$ and a section of $T^2_0M$? A difference between a $(2,0)$-tensor and $2$-form?
Answer: There is a rather significant difference. I'm not sure how comfortable you are with various vector bundle constructions, but both 2-forms and metrics are special elements of $E = T^*M \otimes T^*M$ the second dual tensor power bundle, which is identified with the space of smooth varying bilinear maps (that is to say a section $q$ of the bundle $E$ is a bilinear map on each tangent space such that $q(X,Y)$ is smooth for every vector fields $X,Y$. 2-forms are the space of $q$ such that $q(X,Y) = -q(Y,X)$, while metrics are those which satisfy $q(X,Y) = q(Y,X)$ (symmetry vs antisymmetry) and also a condition that $q(X,X) \geq 0$ and is nonzero wherever $X$ is nonzero.
It might be helpful to think about this just as what these look like as bilinear maps on a tangent space. A metric looks like an inner product, whereas a form looks like $q(x,y) =  -q(y,x)$ which alternates, and has the (actually equivalent) property that $q(x,x) = 0$. This helps us capture the idea from our initial idea of Riemann integration that if we change the orientation of the integration we should change the sign of the integral.
Comment: @user162520: No, a *metric tensor* is a (2,0)-tensor which also has the properties of being symmetric and positive definite.
Comment: Thank you very much. I get it now, so a $2$-form just has the properties that $\omega(X,Y)=-\omega(Y,X)$ (at every point $p\in M$). It doesn't have to be that $\omega(X,Y)$ is smooth. While a $(2,0)$-tensor has the only property of being a smooth function on $M$ for every 2 tangent vectors?
Comment: No, a (2,0) also has  a very special property. Letting $X$ be any non-zero tangent vector at $p$, we must have $q(X,X) > 0$, and $q(X,Y) = q(Y,X)$ (note here we have no sign change). The difference can also be seen like this: let $(x_1,x_2) =x, (y_1,y_2) = y$ be two vectors in the plane: a metric is a bilinear map that looks a lot like $(x,y) \mapsto x \cdot y$ the Euclidean inner product, whereas a 2-form looks a lot like $$\det\begin{pmatrix} x_1 & x_2 \\ y_1 & y_2 \end{pmatrix}$$
Also, it doesn't make sense to say $q(X,Y)$ is smooth for tangent vectors $X,Y$ at a point p...
Comment: I meant that if $X,Y$ are two smooth vector fields (so they give a tangent vector at each point, then $q(X,Y)$ gives a smooth function.
Comment: Ok thank you. I meant that $q(X,Y)$ is a smooth function of $M$ for any two vector fields, not tangent vectors. Ok so a $(2,0)$ tensor is symmetric and satisfies $q(X,X)>0$ and a $2$-form satisfies just antisymmetry.

Is a Riemannian metric a $2$-form?


How to select multiple app icons in Launchpad to move them?

Question: Is it possible to select more than one app icon at a time in Launchpad and then drag them to a folder?
Comment: This is akin to something you can't unsee - it just seems like there should be a way to get at multiple selection, but the simple finder interaction seems to be unchangeable so far - even with code modifications.
Answer: Multiple selection is not implemented in LaunchPad. A work around: Drag individual icons into a folder (to make the first folder drag an icon over another and drop). Then move the folder to the new location and unpack it.
Answer: This kind of operation doesn't seem to be available. Based on how the interaction between the waggling icons and the gui is, I don't even think it would be possible with a reasonable usability.
Apple has chosen to reproduce the same feel as it is on iOS devices so that everybody familiar with that - extremely easy, btw - workflow can achieve the same in Lion.
Comment: My assessment too. However, it took me about an hour to rearrange my Launchpad icons into any semblance of the order and groupings I wanted them in, so Apple definitely have work to do here.
Comment: Please remember that this is version 1.0 of Lion. I guess that based on user feedback that now comes from a much wider spectrum of people using the system, Apple will have the input required to tweak the systems that at the moment don't work as good as users expect them to work.
Comment: @scottishwildcat - ditto on the time to re-arrange my Launchpad.
Comment: @mwidmann - I appreciate Apple blurring the lines between OS X and iOS as long as they don't forget that most OS X devices (i.e. MBPs) still use a mouse and that can still be a good thing.
Comment: Without having numbers at hand I'm pretty sure that most of the devices pointing at Lion are Trackpads integrated into a MacBook. And the feel of such devices is much more like a touchscreen device than the one of a mouse. The main issue imo is that Apple believes that people's minds can fill the gap between the content being directly under the tip of the finger and the content being disconnected. I'm not sure if this will work out in the end, we'll see.
Comment: Agreed. If getting use to the new "natural" scroll is any indication, it will take some time, but will be worth it in the end.


How strong exactly is a 3gbps booter?

Question: I heard some people talking about how they had a 3 gigabyte per second drddosser. That sounds all fine and dandy, but what can that actually do? Could it take down a website? To what extent?
Answer: Unfortunately your question is lacking some details, but I can give you some food for thought on this that will help put this in context. First of all there are different protocols that could be used for an attack such as ICMP, or UDP or TCP. Without knowing more about the target or type of traffic generated it's hard to truly predict what impact it would have.
Having to assume a generic type of traffic, this attack would effectively use up 3 Gbps of bandwidth. Depending on the server's configuration, resources, etc. this could be enough. If the server is connected to a 1 Gbps ethernet link (a typical configuration) it may actually be overloaded by this bandwidth. There are many mitigations for this that can be performed, again depending on the type of traffic. Most cloud providers would detect this traffic and mitigate it after a short amount of time, perhaps even automatically. If you want to comment on my answer with more specifics I'd be happy to update my answer with more details.
Comment: I asked them, it can do. DRDos, UDP, UDP-Lag, SYN, RUDY, Slowris, and ARME. The protocols are CHARGEN, Dns, NTP, SNMP, and SSDP.     So for instance, could any of these take down for example, a go daddy hosted website?
Comment: So, I still will have to be a little general here. You will want to look and research more on this subject, but SYN for example opens a lot of connections using the TCP SYN flag. They aren't terminated rapidly using normal TCP/IP configuration, so if you hold them open long enough a service can have its resources or ports exhausted. Slowloris is a specific attack against the HTTP which opens HTTP sessions but works very slowly to keep the connections open and useless. It's possible these attacks could take down a website, but a provider like Godaddy may have mitigations in place.

How strong exactly is a 3gbps booter?


Enable NUMLOCK when computer wakes for sleep mode using Task Scheduler

Question: I am from the Netherlands so apologies for my English in advance! I am doing everything that is mentioned in this post:click this link. The Powershell script works because when I go to the file and I right click it and then choose 'run with Powershell' the NUMLOCK is turned on. So far so good! However, I have tried for hours, but I can not get it to work with the task scheduler. I have tried literally everything. I have searched the web and tried all kind of things, but nothing works. When I go, in the task scheduler, to 'task status' it says that the task is being performed and under 'results' it says 'succeeded'. When I go, in the task itself, to 'history' it says 'task accomplished' with an OpCode (whatever this means?) of 2 and ID of 102. I hope I am translating all the terms correctly because I am using the Dutch version of Windows 10.
In the task itself I have tried the info that i refer to but that didn't work. I now have put under 'Program / script' : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Under 'Add parameters'(optional)'I have added : C:\Users\rmansel\Documents\powershellnumlock.ps1 Under 'start in (optional)'I have added : C:\Users\rmansel\Documents
Like I said, I have tried everything! From leaving 'start in' blank to putting different things in 'add parameters'. Nothing works. Like I wrote, it does start the task according to the task scheduler so I have set the triggers for the task correctly.
Who can help? I would be so thankful! Best regards, Roy
Comment: What about [formatting](https://superuser.com/help/formatting) your text to a more readable state?
Comment: It does not matter where you store the script. Your custom script should be in you Documents folder or a scripts folder. It's not common or recommended to place them in the default PowerShell modules, etc. locations. Now, you are not saying, what user this is set for, how that use is configured, what event Id you set this for, or other settings. Remember this can be impacted by the hardware vendor as well.
Answer: The localization of your OS is not the issue, well, I don't know / use Dutch, so....
Anyway, as long as your task schedule is set this way:
General Tab
 Run only when user is loggerd on
Trigger Tab
 Begin the Task One an event
 Basic
 Log: System
 Source: Kernel-Power
 Event ID: 42
 Enabled true
Action tab
 Program or script = powershell
 Add additional arguments = -noprofile -file d:\scripts\SetNumlock.ps1
The script only needs to contain one line
<code># Set Numlock
(New-Object -ComObject WScript.Shell).SendKeys('{NUMLOCK}')
</code>
You could have made this a .vbs file as well, with this content
<code>set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"
</code>
With this change to the
Action tab
 Program or script = d:\scripts\SetNumlock.vbs
 Add additional arguments =
I fully tested both of these on my LP70 laptop. So, I know they work. Yet, as I stated in my comment, you laptop hardware can be specific and cause issues with success depending on which you use and what that hardware vendor has in place.


Is there a Bayesian Non-Parametric one-way ANOVA?

Question: The rough idea is that I am trying to compare linguistic properties (e.g. readability) between pieces of texts from two authors essentially. For this, I thought using an ANOVA would be appropriate. But,
I know my data does not follow a Gaussian distribution. Whilst I know that there is a frequentist non-parametric ANOVA test (Kruskal-Wallis), I was wondering if a Bayesian alternative exists so that I can also get the effect size? I am looking for either a package in Python or R if possible. I know the JASP software exists but I don't think they have a Bayesian non-parametric one-way (or even two way ANOVA yet). Any advice would be much appreciated.
Answer: I think you are conflating two ideas here.
What is non-parametric and why do we use it?
First is that in the Frequentist realm people often appeal to "non-parametric" when they don't know the exact sampling distribution of the error term. This is less of a problem than people imagine. The operating characteristics of the alternatives to the t-test or ANOVA, usually are large sample results. But if we were dealing with large sample theory, we would accept that it is the asymptotic distribution of the error term with which we should be concerned: even with highly skewed error terms, the sampling mean may tend to normal by the CLT, which justifies using the t-test. This is made evident if you explore resampling test alternatives, like a bootstrap, or a permutation test. With a moderate sample size, you often find sampling distributions of the test statistic that exhibit a higher degree of normality than with the error term.
In fact, it is just such a resampling test that provides a viable alternative in many other scenarios. I see the permutation test as an ideal candidate for a non-parametric alternative to the ANOVA. The effects and CIs from the model based ANOVA can be reported, along with the robust p-value obtained from permutation. The mean is what we cared about a priori, it is the error which we must handle without distorting our investigation.
Kruskal Wallis introduces the issue that most analysts don't know how to state the null hypothesis or interpret the findings. We are given a p-value and little else. It is perplexing from a reviewer's perspective to understanding the meaning and impact of any analysis using a rank based test.
What is the impact of using a non-conjugate prior on a Bayesian analysis?
Given the nature of the investigation, I commend you on the choice of a Bayesian analysis! Bayesian probability is exactly the right paradigm to explore this kind of retrospective investigation and quantification of belief. If I compared the writings of Plato and Socrates quantitatively, it becomes really convoluted to imagine a $p$-value because there weren't many Socrates and Platos to compare, and yet finite population corrections are unobtainable here... we can't put a theoretic "cap" to the data we might find and say definitively that we would converge on a point estimate in a finite or infinite $n$.
So the error is non-normal but you're interested in the analogue to a linear regression (ANOVA with categorical effect(s)). If we were dealing with pen and paper math, we would specify that the regression parameters had a normal distribution, that the error term has an inverse gaussian distribution, and we could calculate by hand the distributional form of the posterior and do inference. That's too 1900s for our purposes. We use numerical solvers and, with Gibbs sampling, estimate the posterior using a suitable prior on the error term and parameters as before. Suppose the data are inconsistent with these distributional assumptions? We update the posterior accordingly. The posterior may have some interesting and difficult aspects to report and interpret, but that is exactly what you are charged to deal with as a statistician.
Non-parametric Bayes is still something quite different, quite a bit more sophisticated, and likely not applicable to this analysis.
Comment: Thank you very much for your reply! Since I am a relative beginner to Bayes and statistics in general (as you probably guessed from my post), if I am not mistaken then, you recommend I change my approach to doing a permutation test correct? This might be out of the scope of Cross Validated (forgive me it's my first post), but do you know if there is a package implementing a permutation test or a resource that can show me how to execute one, work out the effect size and confidence intervals? Thank you in advance.
Comment: @BeginnerByron I would prefer to go Bayes, but a Bayesian analysis is really high level stuff, I would say an MS stats level at least, but that's cuz when I got my MS we learned how to implement Gibb's Sampler in R before RStudio and before BUGS was ported to R... so who knows what's been boiled down since then. Permutation is easy, I haven't vetted the R packages, but I know they're out there.
Answer: There may be, but I haven't seen it.
I fear that there is a semantic confusion, as "non-parametric" means two different things (https://en.wikipedia.org/wiki/Nonparametric_statistics), depending on whether you look at the right-hand side of $y \sim f(x)$, or the left-hand side:
"Non-parametric" in the Bayesian machine-learning or Bayesian finite mixture context means that the model, i.e. the right-hand side, is non-parametric (e.g. https://blog.statsbot.co/bayesian-nonparametrics-9f2ce7074b97). In other words, the model structure $f(.)$ is not fixed and adapts to the data (think splines, Gaussian random fields).
When your response is non-Gaussian, you are looking at a "non-parametric" response, which is addressed in Kruskal-Wallis and alike. Here "parametric" refers to the parameters of the distribution from which you assume your data derive. For such a model you could have priors for the response terms, making it potentially Bayesian, but you still need a likelihood (or approximation) for the "non-parametric" response.
The idea of the rank-transformation (which, without ties, yields the Kruskal-Wallis when used in an ANOVA) is to get the response variable into something uniformly distributed. So if you are willing to assume a uniform distribution for your rank-transformed response, and present priors for your model terms, then you are in the land of "Bayesian non-parametric response".
One point of Bayesian priors is to use previous knowledge. If you rank-transform your data, this knowledge is largely eliminated, or at least reduced to something like "group A is larger than group B". I wonder whether it is worth going Bayes in this case.
Comment: +1 "For such a model you could have priors for the response terms" This seems to be the nub of the issue for KW and other nonparametric tests: the prior distributions would be about distributions of rank sums and similar, which are seldom of any substantive interest in themselves, being instrumental to specific inferences about the unranked data, and typically constructed as functions of $N$.


Best way to ask if a person lacks a criminal record in a form on a website

Question: I have a website and there's an online form to be filled out by people who visit the site. I want to make sure that a certain person lacks a criminal record (that he hasn't one). So I put this:
Lack of a criminal record   YES   NO
If a person chooses YES (default) then it means that he has no criminal record and if he chooses NO, then it means that he has one. Correct?
Also the reason why I'm asking is because at first I put it like this:
Clean criminal record    YES   NO
Then I thought that it's probably wrong. Because in this case even if a person chooses YES, it would mean that a person had a criminal record once, but not anymore. Though it's more of a legal question maybe.
Comment: Please be careful when asking questions on ELL. Questions like "Best way to..." are generally "primarily opinion-based" ([off-topic](http://ell.stackexchange.com/help/on-topic)) and might be closed.
Comment: I think the issue is solved more easily if you rephrase the form.  Why would you ask someone if they have a a *lack* of something?  Why not just ask "Do you have a criminal record?"  That's much less easily confused.
Comment: Have you ever been convicted of a felony? "Clean criminal record?" is asking for trouble, although it is perfectly idiomatic. It's argot that has made its way into the vernacular. The rap sheet was "clean", i.e. empty.
Comment: Or, *can you get a copy of your police records (police certificate)*?
Comment: Surely there's something on UX stackexchange for this kind of thing?
Answer: It is a legal question, but there's a more subtle issue here:
I know you want the answer to be "I don't have a criminal record", but you need to ask the opposite:

Do you have a criminal record?

This is because the opposite question can leave "wiggle room" for the answerer, just like you feared. They could say all sorts of things (after the fact) if you try to be "nice" in the way you ask the question.
And whatever you do, do NOT have a default answer! If you do, and someone submits "No", then they can complain that the website answered the question for them. You need them to positively click either "Yes" or "No".


What happens to my world when a Minecraft mod is uninstalled or overwritten?

Question: Lets say I install a Minecraft mod which adds new blocks and items. I then update to a newer version of Minecraft, which does not have these new blocks.
How does the game handle maps with what are now unrecognised items in inventory, unrecognised items in chests, and unrecognised placed blocks?
Answer: The world will just generate with air blocks replacing non-vanilla blocks, and your non-vanilla items will just disappear. Re-installing the mod will not bring the blocks or items back, unless you do so before loading the world again.
(As a side note, some mods used to render your world unplayable unless the mod was installed again, I'm pretty sure Notch fixed it though, but there might be a few that mess things up.)
Answer: The mod will make new item IDs, and items are stored by the item IDs. So, for example, I once had the portal gun and I updated the mod and I had a melon stem in one of my chests :). Any other items or blocks are just not there!
Answer: When I started to use a different minecraft version, it actually turned the blocks into what I guess must have been the closest texture. I think that the game gets confused and thinks that you're looking for (block thats texture Is most similar) and turns it into that. For example I used a type of glossy stone block, and when I changed versions, it turned into stone. The slime block turned into, well, a block from mo creatures of all things lol.
This is maybe what happens in later and more developed versions.
Comment: Another thing: when I uninstalled mo creatures for a while, the blocks DID turn into air IDs.


Custom threshold in logistic regression and interpretation of probabilities

Question: Let's say I choose threshold in logistic regression equals to $0.8$. If it is lower then class is $0$ else is $1$. Then, how do I interpret the outcome on test point $x$, $h(x)=0.6$, where $h$ is my logistic regression model. I think I cannot say that with probability equals $0.6$ class of $x$ is $1$? Is there any way to interpret this? Should I just scale appropriate intervals so in that case the outcome $0.6$ I can interpret as probability of $0.375$ that point is in class $1$?
Comment: Since logistic regression does not use any threshold by itself & using threshold for making hard classifications has no impact on the probabilities predicted by logistic regression, what exactly do you mean?
Comment: Yes. I understand that if I use threshold $0.5$ (usually it is default) then everything can be interpreted nicely. But how do I interpret things when I do not use $0.5$?
Answer: You have to be careful to distinguish the probability estimate from a logistic regression model from the probability cutoff you use when you apply the model in practice to make a decision.
Logistic regression results can be expressed in terms of the probability of class membership. I take your terminology $h(x) = 0.6$ to mean that your model $h$ predicts that case $x$ has probability of 0.6 of belonging to Class 1. That's the probability estimate from the model. It has nothing to do directly with a probability cutoff.
When you apply the probability model, practical considerations come into play. Say that false-positive decisions about membership in Class 1 cost more than do false-negative decisions. Then you would want to avoid a decision that places a true Class 0 case into Class 1. Using a high probability cutoff like 0.8 to make assignments of class membership for your purpose would accomplish that.
So if a case has $h(x) = 0.6$ that still means it has a 60% chance of actually being in Class 1. You just will have made a decision not to assign it to Class 1 for your purposes because you don't want to risk that it really is in Class 0.
Comment: Thanks. If I choose threshold $0.6$ because it minimizes error and gives the best predictions then it means that my model is not correct? Am I right that on the training set error is minimized for the threshold $0.5$ and changing threshold may minimize error only on the test set?
Comment: @amad it depends on what you mean by "best predictions." "Training error" in terms of fraction of cases correctly assigned is [_not_ a good choice](https://stats.stackexchange.com/q/58756/28500) for determining "best predictions."  A logistic regression model minimizes _overall log loss_, not necessarily the fraction of cases correctly assigned if you choose a probability cutoff of 0.5. The "best predictions" in practice that are based on a cutoff for a decision rule depend on the relative costs of false-negative and false-positive assignments to Class 1.


Special relativity and the Photoelectric effect

Question: I set up a usual photoelectric experiment in a laboratory that is movable. Let's say, when stationary, the metal I am working with has a large work function and the light I am shining cannot produce photons of sufficient energy. What if I now make the lab move at a relativistic speed and change nothing else about the experiment. Due to length contraction effects, will the energy of the photon now go up and photoelectric emission be observed? But that would mean physics is different in different inertial frames. What am I missing here? Thanks for any suggestions.
Comment: @JEB then we agree.  This is an SR _anti-pattern_, and should be dealt with _before_ attempting an answer.  Any question that starts with "length contraction" as an _initial premise_, with no consideration of the Lorentz Transform, falls under the label "gamma slinging" to my way of thinking.
Comment: Do you co-move the light source with the rest of the experiment?
Comment: @A.P. I interpret "I set up a usual photoelectric experiment in a laboratory that is movable. /.../ What if I now make the lab move /.../" as that all of the lab equipment - light source and metal - move together.
Comment: The lab you are working in is always considered stationary (you are moving with it). See [rest frame](https://en.wikipedia.org/wiki/Rest_frame).
Comment: Not sure why this has 3 downvotes, it's a decent question. It would help if you wrote down some four vectors in the lab frame, so we could then show you they are covariant.
Comment: @JEB I haven't downvoted it, but it is yet another "gamma slinging" argument.  You guys should be pointing this out and correcting it, not encouraging it by calling it a "decent question".
Comment: @m4r35n357 decent $\lt$ good, and there are some SR insights to be gain from boosting inherently non-relativistic things and seeing what happens. E.g, light coming out of a laser, or the ground state of a hydrogen atom...but idk how this one would pan out.
Comment: @m4r35n357 also, idk what "gamma slinging" is, but if it means willy nilly applying Lorentz factors and forgetting about the relativity of simultaneity, then this is the exact thing that trips up so many new students and need to be explained. But, again, I'm not sure this question is clear enough to go anywhere with that.
Answer: The meaning of saying, "The physics is the same in all inertial frame", means that the equation of motion does not change under Lorentz transformation (boost or rotation). But the hamiltonian is not conserved, hence the energy measured is different in every frame.
The work function is $\phi = h\nu_o$ is dependent on the nature of metal. The confusion here is with the doppler effect on the emitted light since if $\nu_1$ is observed in frame S, it can be $\nu_1'$ in frame S'. The case where the moving frame can observed higher frequency of light is when the movable stuff move towards the source since, $\nu = \nu_0 \sqrt{\frac{1+\frac{v}{c}}{1-\frac{v}{c}}}$. So Yes, it is possible to observed photoelectric emission.
In the moving frame S', one can observed photoelectric emission because in that frame, one can observed higher frequency of light emitted. In the stationary frame S, one can also observed photoelectric emission because with respect to that frame, the S' is moving at speed $v$ towards the stationary source which produce a light with frequency $\nu_1$,hence from the point of view of S, you are interacting with the light in an "altered frequency (greater) not equal to $\nu_1$ " because of your velocity $v$ towards the source.
Answer: For example, if the lab is in a galaxy so far away that it is receding from us, and is red-shifted, the photons of the experiment would be also red-shifted. The same for the H-spectra, but we don't say that the law of nature changes for different frames due to Doppler effect.
In this case, the photons are blue-shifted, but the reasoning is similar.
Answer: Let us consider a pulse of light, produced by a normal flashlight, said light pulse collides on a mirror that hangs on the front wall of a lab. The lab is moving in frame $F1$, and static in frame $F2$. (The flashlight is in the lab and co-moves with the lab)
In $F1$ light does work $F*d$ on the mirror, where d is the larger the faster the lab moves.
In $F2$ light does work $F*d$ on the mirror, where d is zero.
In $F1$ it is known that no part of the energy $F*d$ can be used to melt the mirror, because in $F2$ there is no such energy, but the melting of mirror would be noticed in $F2$.
It happens to be so that an object that moves distance $d$ while being pushed by force $F$, gains kinetic energy $F*d$. As that energy must be used to increase kinetic energy, it can not be used to anything else, like melting the object.
So everything works nicely in this case.
Answer: Kinetic energy does depend on the reference frame, whether it is for photons or massive particles. This is true even in classical physics. If you move towards a bullet, it impacts with more energy, if you move away it impacts with less.
Answer: Photons transport a quantum of energy from A to B at the speed of light. The amount of photon energy previously emitted by a subatomic particle depends on the prevailing gravitational potential at the point of emission. If the potential is higher than ours, the spectral lines are red-shifted, if lower, they are blue-shifted.
However, your test body is not very interested in where the photon comes from. The only thing that matters is its instantaneous energy content on impact AND the relative speed between the sample and the photon.
In case anyone has any objections, there is an example where the relative speed between the body and EM radiation is very relevant. In laser cooling of gases to achieve very low temperatures, the absorption of photons depends on the direction of movement of the molecules. If the particle moves towards the laser beam, the energy of the photon is sufficient to be absorbed.

What if I now make the lab move at a relativistic speed and change nothing else about the experiment.

Referring to the last paragraph, the photoelectric effect depends only on the energy of the photons used AND the velocity of your sample relative to the photon.
The energy of the photons used, however, depends on the relative velocity to your experimental setup. If both move together through space, nothing changes in the photoelectric effect. If both move away from each other, the source (in its rest system) must emit higher-energy photons. If they are moving towards each other, they must be lower-energy photons.


frontier node template fees

Question: I created a new frontier node template with frontier.
During each interaction I pay a gas fee, my question is where this gas fee is deposited and can it be collected by the validator ?
Answer: The Transaction Payment Pallet is the pallet that provides the basic logic needed to pay the fees.
In the Config of the pallet you can configure how the fees are paid via Config::OnChargeTransaction.
Take a look about it configuration of this pallet in the frontier node template here:
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;

You have to implement yourself how you want to deal with the fees.
A good idea is take a look of some implementations, a couple interesting I'd suggest you to look at are:

Polkadot. It has a configuration for fees that splits 80% to treasury and 20% to author. Check here how is the configuration of the Transaction Payment Pallet:

    type OnChargeTransaction = CurrencyAdapter<Balances, DealWithFees<Runtime>>;

And the implementation of DealWithFees that defines how to deal with the fees.

Rococo (Polkadot testnet), sends the fees to the author of the block. Check here how is its configuration of the Transaction Payment Pallet.

    type OnChargeTransaction = CurrencyAdapter<Balances, ToAuthor<Runtime>>;

And the implementation of ToAuthor that sends the fees to the author of the block.
Answer: When using frontier, you are mostly dealing with configurations of the various pallets, in this case, pallet-evm and maybe pallet-base-fee.
In addition to Alex's answer, the following may help provide you clarity:
pub struct EVMTransactionChargeHandler<OU>(PhantomData<OU>);
impl<OU> pallet_evm::OnChargeEVMTransaction for EVMTransactionChargeHandler<OU> {
  ...
}

This would be the currency adapter mentioned previously, as stated in the document for the trait: https://paritytech.github.io/frontier/rustdocs/pallet_evm/trait.OnChargeEVMTransaction.html
In the trait implementation you can put custom logic, for instance, what to do on_unbalanced. You can use https://paritytech.github.io/frontier/rustdocs/pallet_evm/struct.EVMCurrencyAdapter.html as a reference.
Note the generic arg <OU> which stands for the Imbalance handler. This is something that knows what to do with the NegativeImbalance that's generated on fee withdrawal. By providing an implementation for OnUnbalanced<NegativeImbalance<_>> you can determine what will ultimately be done with the fees collected. (i.e. whether it will go to a validator, be burned, or something else entirely)

frontier node template fees


How do you work out ripple current for a Power supply design

Question: I hear the ripple current rating of a cap is important because caps have internal resistence which can cause over heating of capacitors. I was wondering is there any general rules a professional engineer would follow when designing a linear supply?
Comment: This question may be of interest: http://electronics.stackexchange.com/q/27881/1609
Answer: The short answer is you calculate the RMS current the capacitor is going to see, and then choose a capacitor with an RMS current rating that is higher.  In some cases this is easy, in most others it is not exactly easy.
Here is easy:

Output capacitor for a buck regulator.  You can use V = \$\frac{L\text{ di} }{\text{dt}}\$ to determine the peak to peak current the capacitor will see.  With a little experience you know that the waveform is just a ramp-up and ramp-down sawtooth, from which you can estimate pretty accurately the RMS value.
Low Dropout (LDO) linear regulator.  These parts have pretty strict specifications on filter capacitors, otherwise they aren't stable.  So, the data sheet will define requirements for capacitor value, and often ESR (not too much, not too little, just right).

That about sums it up for easy.
The process to choose proper capacitors is just part of the design process:

Start with a design topology (a really top level or broad approach).
Make a simplified analytical model.  Actually, make several for different parts of the supply.  Analytical models are good to work on concept and think things through.  A really well done analytical model should get you about 80% of the way.  The form of the model will likely be Laplace equations that have been idealized just enough to still be meaningful and yet useful.  If switches are involved you will have two or three representations of the same circuit to account for the states of the switches, but these multiple representations will really help you think about how the circuit works and what kind of ripple currents the capacitors are likely to see.  If things don't look promising, throw the design away or make whatever changes needed to improve things and start over.
Make a numerical model.  Use something like SPICE or something with Modelica extensions (or SABER if you can afford it).  Make sure you know the basis of the models (you know where they are valid).  By the time you get this far you should know basically what to expect (and you have probably also started some circuit lab work), so you should be able to look at the numerical results and know if they are BS.  If the results look reasonable you can have the simulator calculate the RMS currents to guide your choice of capacitor.
Always verify with your first bread board or prototype.  The earlier the better.
Some lean much more heavily on lab work to get things worked out.  Just remember that there are a bazillion ways to get things wrong compared to only a few to get them right.

This is an iterative process.  Hopefully this will give you some idea of what lengths people go through to get good electronic designs (and good at designing).
Try a design.  Realize you are going to make lots of mistakes.  Get some specific results, either theoretical or in the lab, then you will have focused questions that can be given specific answers.
Answer: Yes, read and follow the datasheet, of course.  Capacitors intended for such applications wil have a ripple current spec.  Follow it.
Comment: Yes but how would you know that the 35ma of ripple the capacitor is rated at,  is what's on the circuit you're trying to filter? If it's 100ma then that won't  be good for the cap right?
Comment: @Aegis It's called "engineering". A proper design will include accurate ripple current calculation.
Comment: @Madmanguruman but the question is how to work that number out!
Comment: @Ageis: That's a separate question.  To explain that right requires more room than a comment allows.
Comment: Ok shall I start new question or can you refer ,me to some lititure I can read up?


How many neural networks can a GPU run simultaneously?

Question: I am developing an application that would take feed from multiple IP cameras and run 3 different neural networks on it. I want to determine the number of such IP cameras that can I process parallelly on my GPU.
Comment: It depends on how much your networks consume in terms of memory. For example, with my GPU of 12GB RAM, I can only train two networks at a time because at the peak consumption point, they takes over 11GB RAM of GPU. To check your GPU status, use `nvidia-smi`.
Answer: This is sort of like asking "how long is a rope?". To be able to answer how many neural networks you can run simultaniously on a single GPU one would require a lot of information. For example:

How much memory does your GPU have?
Are we talking training or inference?
If we are talking training, is there a performance requirements and demand for a specific number of samples per batch?
How big is each image that should be processed?
How big is the neural network?
Datatype: float16 or float32 or something else?
Deeplearning-framework used
E.t.c.

If you were to provide this information, one might be able to guess how many you can run in parallell, but it would still be hard.
Best way is if you simply try running your network and monitor the memory usage on your GPU, using for example nvidia-smi, and find the peak memory usage and then simply check of many of that fits on the total GPU-memory. However note that you need to check the specifications for the framework e.t.c. to verify how they allocate GPU-memory (for example many frameworks allocate all the memory that's avaliable)


Java AWT application window padding

Question: I'm trying to build a simple AWT application in Java. I want all of the containers in the main window to be separated by bit. I can accomplish this by setting the Hgap and Vgap in the BorderLayout constructor (see below.)
However, I can't figure out how to put a cap between the containers and the edges of the main window. How do I add a few pixels of padding to the main window?
import java.awt.*;
import java.applet.Applet;

public class LayoutTest extends Applet {

    public void init() {

        BorderLayout layout = new BorderLayout(8, 8);

        setLayout(layout);

        add(new Button("Left"), BorderLayout.CENTER);
        add(new Button("Right"), BorderLayout.EAST);
    }
}

Answer: I agree with the other answers and would recommend using Swing (use JApplet instead), which would make all kinds of things easier (you could just call setBorder and use BorderFactory to create a border, for example), but in your case you can set insets by overriding getInsets:
   @Override
   public Insets getInsets()
   {
      return new Insets(10,10,10,10);
   }

Replace 10 with whatever you like.
There doesn't appear to be a setter, or I would say to use that instead. If there is a better way to do this in the case of an AWT Applet, someone please correct me.
If you decide to use Swing, see: How to Use Borders
Comment: Thanks! That fix works great. I think I may end up going for Swing though, due to the various suggestions.
Comment: +1 works nice as padding like CSS. `JPanel test = new JPanel() { public insets getInsets() { return new Insets (10, 10, 10, 10); }  };`
Answer: AWT is not the newest technology on the block. So unless you have a specific requirement to do work in AWT, I would recommend you to check out the modern replacements Swing or SWT - much more comfortable, flexible customizable and predictable in their behaviour than AWT.
One reason behind developing them was exactly that the kind of visual fine-tuning you are trying to do here is unnecessarily difficult (if not impossible) with AWT.
Answer: Whilst you could probably get away with setting the insets of the applet, I suggest moving to Swing (extend javax.swing.JApplet). Then set a JPanel as the content pane with a EmptyBorder set of the appropriate widths.
Also note, you will probably quickly have to move up to a more sophisticated layout manager, such as GridBagLayout.

Java AWT application window padding


Delete Partition and Extend partition option disabled

Question: I used the "Delete Volume" option to delete my D drive so that I could extend my C drive into it but instead of becoming black coloured and unallocated in Disk Manager, it shows green coloured and "free space" and the "Extend partition" in C Drive is disabled. I also tried using Diskpart from the cmd but the deleted volume doesn't show in there. Please help!
Answer: The space that you freed is inside extended partition which is special type of partition - it can hold logical partitions. By default disk manager won't let you resize extended partition which contains other volumes. It needs to be empty, then it can be resized. That is the reason why windows won't let you expand your C volume.
You can use external tool, like gparted to do the resize of extended partition and then your C drive, however I strongly recommend to do a backup of your data first.
Answer: From your screencap, I can see that your D drive you deleted was a logical partition - that is, a partition within a partition.
The dark green frame represents the actual physical partition. Still from your screencaps, there are 3 other logical drives in it (E, F and G). Before you can delete the Extended Partition (the physical partition that contains them all), you have to completely empty it.
Your C drive being a physical partition, you need actual unallocated space next to it before you can extend it. In your case, the green "Free Space" next to C is allocated, because it is part of the extended partition.
Answer: in drive partition contain with two volume
 1. Primary Volume
 2. logical volume
Primary Volume Partition size cannot be extend which not contain in primary volume.
your drive in Deep Blue border Primary volumes.
and rest other in Green Frame which are Logical Volumes.
so you cannot be extend C: drive from Logical Volumes partition size.
You can extend from E: F: G: Any cause they are same group.
Hope you undersatnd if any doubt comment
Thanks


How do I install the latest Python version in Ubuntu?

Question: How to update to the latest Python version in Ubuntu? I tried sudo apt-get install python3 but it says that the current (3.3.1) is already the latest.
Comment: What Ubuntu version do you have? 12.04?
Comment: I have Ubuntu 13.04.
Comment: Any reason why you need 3.3.2 instead of 3.3.1?
Answer: Try adding this PPA (notice, I haven't tested it, but it looks fine): https://launchpad.net/~fkrull/+archive/deadsnakes
To do this, open a terminal, and run this:
sudo apt-add-repository ppa:fkrull/deadsnakes # Adds the PPA
sudo apt-get update # Updates the lists

And then run the system updates (I would recommend this over sudo apt-get install python3 because other packages may need to be updated for it to work fine):
sudo apt-get dist-upgrade # dist-upgrade might be needed if python3
                          # needs to install or remove packages
                          # for it to work

Comment: It didn't work.
Answer: Ubuntu 13.04 comes with pre-loaded python3 (3.3.2). So you may already have python3 (3.3.2) installed. try python3 in terminal instead of just python
Comment: It's 3.3.1 (with some backports from 3.3.2), but yeah, 3.3.x is already present.


SharePoint 2007 - 2010 DB Migration

Question: I'm about to perform a DB migration of an Intranet Publishing Site. Is it necessary to create the site collection before performing the DB restore?
Comment: FYI.. I'm removing the 2007/2010 tags from your Migration questions since you have that information elsewhere in the questions and these aren't necessarily version specific.
Answer: To be clearer, you actually only need an Web Application to which you would attach the database. I would highly recomand before doing that go through checking/testing at least by using:

Test-SPContentDatabase which will tell you if you got all other
dependencies installed, etc. (http://technet.microsoft.com/en-us/library/cc263026.aspx)
Run pre-upgrade checker (see here http://technet.microsoft.com/library/cc262231(office.14).aspx)

Also you would need at least MOSS with SP2 to be able to run these commands. There is so much documentation written on the subject. Start here http://technet.microsoft.com/en-us/library/cc262792
Comment: It seems preupgradecheck tool was updated with the Oct 2009 CU. So people would need to upgrade to at least that in their 2007 farm first: http://sharepointreporter.wordpress.com/2010/07/30/fix-pre-upgrade-check-errors/
Answer: Yes, typically the I usually do it is, provision a web application and a site collesction then I detach the content database, copy the database accross and attach db to the site collection.
Use this to mount DB to the existing sitecollection after attaching to the new server:
Mount-SPContentDatabase "" -DatabaseServer "" -WebApplication siteUrl

SharePoint 2007 - 2010 DB Migration


PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fmotors_fms.block_node_type' doesn't exist:

Question: This was working fine last night but when i login to my computer again I got this error now. What is this table {block_node_type} I cant find it in the database but it is in the drupal code in node.module. PLease help
Answer: If it was working last night, and now it doesn't and the table is missing, then the table has been deleted/renamed, or the database is partially corrupted. There isn't any other logical explanation.
As you rightly say that table is installed, unconditionally, by the node module upon installation of Drupal (see node_schema()).
If the table is really gone then your only option is to restore the DB from a backup; or if there was no data in that table, just manually create it (or copy from another Drupal install).


How many armies are there in Battle School?

Question: Ender encounters many different armies during his stay at battle school. Is there ever any indication of the number of Armies at Battle school?
How many armies were there in Battle School?
Comment: @HenryVarro 1)Bean shows everyone the Deadline after they've have "*a battle every day for more than four weeks*", the final battle was the following day. 2) During the final battle, Ender remarks that they've "*still got a month to go before*" the three month training period was supposed to end. Ender "*only had his any three and a half weeks*" before the first battle.
Comment: can you tell me where you find that you put in your conclusion? i mean ~5 weeks, where you get that number? can't remember where it show up in the story
Comment: The [Film concepts](http://jayse.tv/v2/?portfolio=enders-game) show only the armies mentioned in the book
Answer: At least 20 armies, possibly as much 40
Only twenty armies are actually mentioned in Ender's Game (if you include Dragon). (≥20)

Two teams, Manticore and Asp, had no recent score-- that box was flashing.

Ender tried to guess which ones went with which name. Scorpion and Spider were easy. So were Flame and Tide.
(Ender's Game - Chapter 5)

ENDER WIGGIN
ASSIGNED SALAMANDER ARMY
COMMANDER BONZO MADRID
EFFECTIVE IMMEDIATELY
CODE GREEN GREEN BROWN
NO POSSESSIONS TRANSFERRED
(Ender's Game - Chapter 5)

We have surprised Rat and Scorpion and Hound, and we are ready to play for leadership in the game.

"Go left out of the door," said the boy on the next bunk. "We share it with Rat, Condor, and Squirrel."

"Wait a minute," she said to Ender. "Rabbit Army just went in, and it takes a few minutes to change to the next battleroom."

The enemy was Leopard Army. It would be easy.
(Ender's Game - Chapter 7)

It was Centipede Army, and they only beginning to emerge from their door when Ender was halfway across the battleroom.
(Ender's Game - Chapter 8)

At the age of nine he was a toon leader in the Phoenix Army, with Petra Arkanian as his commander.
(Ender's Game - Chapter 9)

Dragon, said the form. There was no Dragon Army.
(Ender's Game - Chapter 10)

We worked our butts off in practice today. Not to mention beating the crap out of Ferret Army this morning.
(Ender's Game - Chapter 11)

It was Pol Slattery's Badger Army, and they refused to give up.

WILLIAM BEE, GRIFFIN ARMY, TALO MOMOE, TIGER ARMY, 1900
(Ender's Game - Chapter 12)

Eleven guys from Dragon Army (5 Toon Leaders + 5 Seconds + Bean) equals half the armies in Battle school (~23) (thanks to @HorusKol)

They graduated half the commanders, and transferred a lot of our guys to command their armies."
"Which guys?"
"It looks like -- every toon leader and every assistant."
(Ender's Game - Chapter 12)

Anderson's complaint to Graff about Football would seem to imply that there were at least twenty-nine armies. (≥29)

"Now that the wars are over, it's time to play games again. It'll be almost like vacation, anyway. Only twenty-eight teams in the league. Though after years of watching those children flying, football is like watching slugs bash into each other."
(Ender's Game - Chapter 15)

Also, if we assume that Dragon Army fought every Army exactly once (not sure why we would assume this) then we get about 35-40 armies. (~5 weeks of one battle per day plus Salamander, Griffin, and Tiger)
Comment: If I remember correctly Dragon is only active during Ender's time as a commander and then broken up again.
Answer: The Ansible wikia has it at a minimum of 15 armies - but I do think that number is a bit low (I also think the launchie count is very low - it'd make sense for at least one launch intake per year - with several years before being posted into an army).
Now, when Ender was graduated out of Battle School, almost half of the other army commanders were replaced with his toon leaders and seconds, along with Bean. That's 11 replacements - meaning at least 20 armies (Ender had 5 toons).
Your timeframe of 5 weeks is actually pretty good - Dragon's first game is 9 weeks early (p 197 - Orbit 2002), and the last game with the formation is a month before the regular training period (p 216).
However, they start throwing two battles a day at the Dragon army after only one week. Assuming this tempo is maintained for the whole period, we get 63 battles. On the other hand, this tempo might not have been kept up because of the other armies needing rest (though, there's nothing to say that the other armies were fighting each other regularly after Dragon started) - this would mean a minimum of about 35 games.
Although it isn't mentioned, it could also be that Dragon fights each other army more than once.
So - unless anyone can present more evidence, the best we can say is somewhere between 20 and 60. And probably more like about 40.
Comment: The only times Dragon Army fights more than one battle a day is day 8 (Ferret+ Salamander) and the last day (Badger+Griffin/Tiger). Confer the passage when Bean shows then the deadline, "*They were tired, yes--**a battle every day** for more than four weeks, often in situations that tested their abilities to the utmost*".
Comment: Their launchie count isn't that low as each group had a maximum of 20 kids, 40 would mean two groups at any given time.
Comment: it isn't clear how many launch groups there are each year - and it seems launchies spend 3-4 training before being in an army
Comment: Launchies usually spend 1 year training before being in an army. ("*This is room is your home for your first year or so here at the Battle School, so get the bunk you want and stay with it.*")