Localize shortcut menu in installshield

Question: I have shortcut Program menu -->Company Name --> Product name.
My requirement is the product name should be localized when locale language (operating system) is Japanese.
How is this possible in Install shield 2011?
Please help.
Answer: Windows Installer only supports localizing shortcut names in two ways. One is via language transform, which would then reflect the language chosen during installation as the sole name of a shortcut; this works with all versions of Windows Installer, but is only available in the Premier editions of InstallShield.
The other is through MUI properties. By setting the Display Resource setting of a shortcut to reference a multi-lingual resource dll, the name is updated to match the user's preferred language. This approach only works on machines with Windows installer 4.0 or later.

Localize shortcut menu in installshield


Where can I buy iMovie that is compatible with SL?

Question: I just upgraded my macbook to SL and wanted to upgrade iMovie too. But the system requirement for the version available on App Store is 10.7.4 or later. Where can I purchase one that would work on a SL 10.6.8? Thanks.
Answer: I found that on ebay you can buy iLife '09. If you look at the iLife '09 tech specs, you can see this:

Software:
Mac OS X v10.5.6 or later.

So that should work for you if you have SL. iLife '09 is also available on Amazon.
Comment: Thank you for the links. I didn't intend to buy the whole set, but guess I can't purchase iMovie individually?
Comment: @vul3 - The only ways you could bet it individually would be to go through illegitimate channels (torrents), so no I guess. Sorry. It's a marketing ploy by Apple to make you spend money on the entire set.
Comment: I see, think I'll just pay for it then! At least it's cheaper than Mac Box Set...thanks again!


nanogallery2 v0.9.2a (31 January 2017) bug with glass

Question: I use nanogallery2 (v0.9.2a - 31 January 2017).
There seems to be a bug.
When you click (quickly) 5 or more times on the magnifying glass "+", it is impossible to retrieve the basic image using the magnifying glass "-".
Same when zooming on a smartphone screen...
Can you help me to fix this bug please?
Is this a bug in the version?
Help me please.
Thank you in advance
Answer: When you click/tap quickly on the zoom in/out buttons, the lightbox interprets this as a double-tap.
Double-tap enables/disables zooming on the image. So the weird effect.
This issue is fixed in nanogallery2 v0.9.3 v1.0.0
[EDIT]
Zooming is not working in v0.9.3 in case of self hosted images.


War Chanter + Seeker of the Song = 3 Simultaneous Bardic Musics?

Question: If I'm a Seeker of the Song 2 (Complete Arcane, p. 56) and War Chanter 5 (Complete Warrior, p. 87), can I play 3 Bardic Musics at once?  I seemingly can.
Comment: For what it's worth, bear in mind that many bardic music effects linger for several rounds after you stop performing them, during which time you can start another form of bardic music. That allows layering several different bardic music effects, at least for a few rounds—enough for most combats. Lingering Song from *Song & Silence* or *Complete Adventurer* can also extend the overlap period.
Answer: The Potential Rule
I have actually done some more research and I think I found the answer in an unlikely place, Unearthed Arcana. It is Unearthed Arcana, so take it for what it is, but it has this passage in a sidebar:

Multiclassing And Variant Classes
Multiclassing between variants of the same class is a tricky subject. In cases where a single class offers a variety of paths (such as the totem barbarian or the monk fighting styles), the easiest solution is simply to bar multiclassing between different versions of the same class (just as a character can't multiclass between different versions of specialist wizards). For variants that are wholly separate from the character class—such as the bardic sage or the urban ranger—multiclassing, even into multiple variants of the same class, is probably okay. Identical class features should stack if gained from multiple versions of the same class (except for spellcasting, which is always separate).

It does include the caveat "from multiple versions of the same class" . But I think this is a suggestion that class features should stack, except spellcasting. It is possible that the text included in many prestige classes regarding the stacking of sneak attack, turn undead and Uncanny Dodge, is the version of this rule that they eventually ended up with given UA's playtest/pseudo-house rule status.
While UA certainly is fraught with dubious rulings, we have no ruling of how class features stack/don't stack in the general sense. We have certain specific instances, but no general rule. UA provides the closest thing to a general rule, and hints at RAI, but it is itself a specific rule as pointed out in the comments.

Applying it to the question
Here are the two instances of Combine Song, first from Seeker of Songs and then from War Chanter

Combine Songs (Ex): A seeker of the song of 2nd level or higher can combine two types of bardic music or seeker music to provide the benefits of both. The seeker chooses two music abilities and activates both using the same standard action. If either or both require concentration, the seeker can maintain concentration on both by using one standard action each round to concentrate. The normal stacking rules for bonus types apply to music abilities combined with this ability.
Combine Songs (Su): A war chanter of 5th level or higher with 12 or more ranks in any Perform skill can combine two types of bardic music or war chanter music to provide the benefits of both (normal stacking rules for bonus types apply).

In putting these side by side I notice two things, that I think actually make them different abilities that, unfortunately, have the same name.

Type of Ability: Seeker of Song's is an Extraordinary ability, where as War Chanter's is a Supernatural ability
Ability requirements: Both require levels but only War Chanter requires ranks in perform.

If they are separate abilities, they definitely stack. If not...
I would say that given the absence of a RAW for whether class features outside of those that have specificstack, we have to make judgement call based on RAI which is ultimately up to the DM.
I think that it is clear that they do stack, given that every specific rule we have says that the specified abilities stack.
Each adds the ability to combine a song from that class with bardic music or another song from that class. Notice that both abilities don't cancel out the bardic music, they simply add an aditional affect via another song. Thus allowing you to add both Warchanter music and Seeker Songs to the same bardic music.

Restrictions
The RAW do lead to some interesting restrictions on what musics can be combined.
The following combinations are legal

3 Bardic Musics,
1 Seeker Song, 2 Bardic Musics
2 Seeker Songs
2 Warchanter Songs
1 Warchanter Song, 2 Bardic Musics
1 Warchanter Song, 1 Bardic Music, 1 Seeker Song

But these are not legal, due to the fact that both specify combining Bardic Music and their respective songs.

1 Seeker Song, 1 Warchanter Song
2 Seeker Songs, 1 Warchanter Song
2 Warchanter songs, 1 Seeker Song
3 Seeker Songs
3 Warchanter Songs
Comment: Do they add one extra song, though? They both say they allow you to combine two songs, not one additional song.
Comment: *Unearthed Arcana* here is talking **only** about variant classes from within its own, optional, variant class system. It doesn't make any claim for other situations, and indeed, under the rules, it would have no authority to do so (partially because the *Player's Handbook* and/or *Dungeon Master's Guide* has the sole authority to do that, but more importantly because nothing in *Unearthed Arcana* is authoritative about anything but itself, being a book of optional ideas, often not even fully fleshed out). This answer deserves far more clarification on the source and its limitations.
Comment: (For example, I also reference the same rule in [this answer](https://rpg.stackexchange.com/a/140076/4563), where I take care to indicate the problems with trying to re-purpose it for some other situation. And that situation was a lot closer to the one the rule was written for than this is.)
Comment: @Miniman I agree with you that's not a straight add. I changed the wording to reflect a better description of what I think is happening
Answer: As a general rule, effects of the same name doesn't stack unless explicitly called out as doing so. Both Seeker of the Song and War Chanter can play and additional song when using the Combine Songs class feature (same name), so to my understanding they probably don't stack.
Whats stacks is  a tricky question.
Bonus Types of the same name explicitly doesn't stack, as descriped on page 171 of the Players Handbook and elaborated in the Dungeon Masters Guide on page 22. Some exceptions like Dodge Bonus though.
In the same vein, Magical effects is also called out on page 171 as not stacking, giving examples of overlapping and negating cases.
Feats aren't explicitly stated as not stacking ( In the books that i can find. The DND Wiki says If a character has the same feat more than once, its benefits do not stack unless indicated otherwise in the description. ), but i would argue that since some feats makes it explicit that they can be taken more than once, non-stacking is probably "Rules-As-Intended".
Nothing is explicitly calling out class features, but based on the above, i would say that "Rules-As-Intended" they do not stack.
However this is probably up to your DM since it isn't in any book i can find.
Comment: Do you have a source for *"As a general rule, effects of the same name doesn't stack unless explicitly called out as doing so."*? Not saying you are wrong but it would improve your answer if you can quote an official source as well.
Comment: Please don't use code formatting for emphasis (or other things that aren't marking code as code). Relevant metas: [Is there a functional purpose to putting things in code text here?](https://rpg.meta.stackexchange.com/questions/1483/is-there-a-functional-purpose-to-putting-things-in-code-text-here), [Is there a formatting guide around using code markup that must be followed?](https://rpg.meta.stackexchange.com/questions/3086/is-there-a-formatting-guide-around-using-code-markup-that-must-be-followed)
Comment: I'm going to go a step further than @linksassin and say that general rule *doesn't* exist. It's a widely-held consensus opinion on what stacks and doesn't, but the actual rule is only that "the same source" doesn't stack, without clarification as what constitutes the same source.


Wanting to Delete a pass onwers account on iphone 4

Question: Hi there i have recently purchased a iPhone from my cousin, whom had purchased it from trade me.When my cousin purchased it he couldn't download apps as it was still logged under the pass owner (cloud,apple id account).my cousin emailed him asking for his password so we can delete the account but he has not yet replied well over 2 weeks!!are u able to help me please???
Comment: We'd like to help you, but can't guess at some specifics.  What exact screen is showing an error message. Can you navigate to the settings app and choose reset, erase all content and settings?
Comment: Here are some specific questions you need to answer for us to help you: 1. What version of iOS is it running? It's listed under Settings>General>About This matters a lot if it is iOS 7 and Find My iPhone is enabled. 2. Do you have a Mac or PC running the current version of iTunes and the USB docking cable? You will need this. If it's running iOS 7 and Find My iPhone is enabled under Settings>iCloud you may be out of luck. That configuration is a new security mode that will resist attempts to use all the device's features and reset attempts. We need to know more.
Answer: you can restore your iPhone how to restore. This is the fast and easy way that all previous data it is delete. On step 3 you don't back up


Using Vassal on a small screen

Question: Related to this question, I'm wondering also whether using Vassal on a netbook (=small screen) is a good idea.  Are there any tricks helping in such a case, like zooming in/out etc.?
Answer: No, using Vassal on a netbook is not a good idea. The standard resolution on most netbooks is 1024x600. While this isn't a bad thing for reading most websites, consuming video, etc. it doesn't work particularly well with the high resolution game boards in Vassal. The problems you will face will differ from module to module, but some of them will be pretty standard.

Most boards will require scrolling. - You can help mitigate this issue somewhat by enabling scrolling with the keyboard arrows. The keyboard is a much better input device for quickly moving the board slightly up, down, left, or right than moving your mouse or built in touchpad to the scrollbar to click/drag the gameboard in the proper direction. You can enable this feature within File->Preferences for each individual game.
Additional Windows always overlay (are always On Top of) the main window. - This will only be an issue if your particular game requires multiple open windows, and each of those windows needs to be open constantly. You can attempt to give your self a little more room to see each of the individual windows by using the zoom controls for each particular window. Fit to Width/Fit to Height will fit the graphics within the current dimension of the window. Additionally, you can shrink the Windows Taskbar to a 5 pixel bar (it won't show the icons of your open programs) which should give you another 20 pixels of screen real estate.
The Vassal Toolbar isn't dockable or configurable within the module. - This means that you cannot remove elements from the toolbar and make them their own floating windows, hide them, or dock them to other windows or other locations on the application. This means that when the module designer creates a toolbar icon, it will always be displayed above your game board. (Example: I play D-Day Dice. This module has 7 buttons that open other windows, 2 that roll dice, and the standard Vassal toolbar controls. Because I cannot configure the toolbar, it takes up two rows of space (about 90 pixels). You can modify the game module yourself to remove unwanted items from the toolbar with Edit Module. Refer to the Help Guide within the Edit Module dialog for more information.
Comment: Thank you very much; alas, I'll probably have no choice (the battery in my laptop might not be enough for my use).  Fortunately, hopefully I'll be able to mitigate some of these problems (to some extent at least): I could put different windows on virtual desktops or use a tiling window manager (I don't use windows).  And I could insist on my friend to prepare a not-so-huge map, too;).  At least I know what to expect...

Using Vassal on a small screen


H-Bridge with emitter followers

Question: I am currently reverse engineering a circuit which requires controlling of a magnetic field. For that, the circuit has a pair of D882 and B772 each. The PCB traces suggest that the transistors are arranged as shown in the picture below:

This arrangement does not make any sense at all for me. Wouldn't applying a voltage to any of the control signals result in current through both transistors rather than through the coils?
Comment: reverse clamp zener or diodes are needed to protect Vbe reverse voltage on each
Comment: One is NPN, one is PNP. Both are emitter followers. This is a class B amplifier (times 2) with no correction for the crossover point.
Answer: That is called an "H-Bridge."
It is often used to drive motors forwards as well as backwards.
In your case, it allows you to generate a magnetic field whose polarity and intensity you can vary using "control signal 1" and "control signal 2."
When both are high (or both are low,)  no current flows through the coil.
If one is high and the other is low, then current will flow in a particular direction.
If you swap the high and lows, it will flow in the opposite direction.
Now, if you hold one steady  and pulse the other you will get a pulsed current through the coil.  It will be smoothed (somewhat) by the coil to a steady magnetic field whose strength is propotional to the duty cycle of the pulses.
Switching the polarity of the current also changes the polarity of the magnetic field.

That is very much a simplified description, but I think it contains enough key words that you should be able to locate more details on your own.
It is a common circuit with many uses - and plenty of tricks and traps that go into making, using, and controlling it.

A bit more on how it operates:
The key to the whole thing is how pnp and npn transistors function.
When the voltage on the base of an npn transistor is more than 0.7 volts above the voltage on the emitter, then current will flow through the collector to the emitter.
When the voltage on the base of a pnp transistor is more than 0.7 volts below the voltage on the collector, then current will flow through the collector to the emitter.
So, looking at the H-bridge, putting a high signal on one of the control signals will turn off the pnp and turn on the npn - that side of the bridge is connected to the positive supply voltage.
Now, if you put a low signal on the other control line the npn transistor will turn off and the pnp will turn on. That side of the bridge is connected to the ground.
Current can now flow from V+ on one side of the bridge, through the coils, to ground on the other side of the bridge.
So, which control signal is high and which is low dictates the direction of the current flow through the load in the middle of the bridge.

You also asked it is possible for both transistors on one side to turn on and cause a short circuit.
It can happen, and is called shoot through.  Part of the design and operation of an H-bridge goes into making sure that it doesn't happen.
In the design you've posted, I don't think it can happen.
It looks to me like the transistors on each side can never be on at the same time.  But, I'm not an engineer and may well have overseen something (though Tony is an engineer and doesn't think it can happen with this circuit.)
Comment: It might be helpful to mention that NPN transistors are on when base is higher than emitter, while PNP transistors are on when base is lower than emitter. Thus high control voltage switches on the NPN and low control voltage switches on the PNP.
Answer: NO
The Vbe has a dead-zone for drive levels of < |+/-0.7V|  however, back EMF during the time of load L/R=T(63%V) will occur where R is the DC resistance of coils.(DCR)
beware of the need to clamp inductive spikes to opposite rail with  zener+diode  pairs across motor or reverse Vce diodes across each transistor.  In more advanced designs they use active clamps. Beware of reactive energy and current loop area in the layout. Keep it tight pairs from driver, power, ground to L to minimize CM noise.
However when commutating left right for forward and reverse. You must stop by having both top or bottom drivers high ( or low) to shunt the L/R =T time constant with another brake dead-time before direction reversal. This is done by your smart controller using Sig1=Sig2 = either 0 or 1. If this is not a motor, disregard.
When regulating current if the left side is high, right side is used for PWM average voltage to control surge current or velocity at steady state. THen when reversing load polarity, the opposite is done.  Right side high and left side with ramped PWM towards full Vavg in the opposite polarity.  If this is a motor, then the same is true for deaccelerating.  Often a current shunt is used for current sensing, where the load inertia affects current during g time duration.
Also keep in mind these simple transistor switches have an hFE of about 10~5% of max hFE during saturation so input current and heat dissipation ought to be computed. while control signal ought to be above +12V or additional drop occurs due to Vbe.  This is why MOSFETs are preferred but have shoot thru issues just like if these were open-collectors instead of emitter followers. THen the 2 inputs must be separated to 4 inputs with controlled dead-time.
This is the simplest bridge driver, but compromises Vdrop on each switch but ok for small bridges at 12V. Even though it may work at 5V, not recommended for poor efficiency.
Answer: On each side you have an NPN and a PNP transistor.
If the control voltage levels are selected correctly, the NPN and PNP transistor will not be switched on at the same time.
Comment: if dV/dt is sufficiently high and there is trace inductance, it is possible during transitions in poor layouts for both to be on. But abnormal. Worst case is Vbe reverse is exceeded
Answer: Is a PWM signal on control or an analog design from OPAmp?
 This circuit resemble an analog Bridge class B Booster.
 An equivalent complementary H PWM generally need each transistor to be driven separately and to saturation, this one is forever in linear zone, VCE never can reach saturation. On PWM H bridges Common Emitter is preferred to common collector; it is more simple to saturate each bridge transistor without additional supply voltages.
 Common Collector has disadvantage of propagating BEMF to BASE driving, this can destroy driver.
Comment: I'm having some trouble parsing your sentences. Do you think you could organize your answer a little more, and perhaps add some detail?
Answer: Some of the previous answers make correct statements, but no single answer satisfactorily answers the question.
@JRE is correct that we call this circuit topology an H-bridge, that it is commonly used to control motors, and how you would set the control lines to operate a motor.
@TonyEErocketscientist is correct that you need something to dissipate the current when the inductive load is turned off.  His suggestion of back-to-back zener diodes, in parallel with the load, is the best solution.  If the current is small, you could also get away with a non-polarized capacitor.
In a comment, @immibis correctly states that each individual transistor is connected in an emitter follower.  In other words, the output is connected to the emitter of the transistor, rather than the collector.  The output follows the voltage of the input, within a diode voltage drop.
The transistors in emitter followers DO stay on, except when the input voltage is close to the supply rails.  Because of this, emitter followers are notorious for wasting power and needing heat sinks.  The heart of a linear voltage regulator is an emitter follower, and these regulators are notorious for being inefficient and requiring heat sinks.  Emitter-coupled logic (such as was used in Cray supercomputers) uses emitter followers to switch digital signals.  Heat production in the Cray was so bad that the refrigeration unit was larger than the electronics!  And the third example of emitter followers is a...
Class B amplifier, which @RRomano010 points out.  They are made by two emitter followers, with an NPN transistor pulling to the high rail and a PNP transistor pulling to the low rail.  That's what we have here.  They are commonly used as the output stage of audio amplifiers to drive loudspeakers, are inefficient, and require ample heat sinking.
If you absolutely must drive your inductive load with an analog signal (i.e. PWM is not acceptable), then the circuit presented in the question is a okay design will barely work (although I would add @TonyEErocketscientist's protection diodes).  You will get some crossover distortion because of the diode voltage offsets; these can be compensated the same way it's done in a class AB amplifier.
If you are driving your load on/off or with PWM, then it is an inefficient design.  The usual way to make an H bridge is with PNP transistors pulling to the high rail and NPN transistors pulling to the low rail.  In other words, swap the NPN transistors in this circuit with PNP, and vice versa.  However, you will then need resistors on each transistor base.  Perhaps the designer of this circuit was trying to avoid the extra components -- that would also explain the lack of protection diodes.  Make sure you put those protection diodes in, too.
Or you could just use an H bridge chip, where someone else has taken care of these problems for you.
Comment: That particular arrangement of PNP and NPN makes it pretty much impossible for shoot through to happen.  I expect that is the reason for the "upside down" setup.   When "off" (both control signals at the same level,) the coils will be shorted through the transistors - this takes care of the inductive spike that would otherwise occur when switching off the current through a coil.  This circuit is probably not worth spit for driving the coils with an analog signal.
Comment: @JRE: You're being too kind to the designer of the circuit.  Either (1) didn't know what they were doing, or (2) wanted to use as few components as possible.  As far as killing the inductive current during an off condition, that will fail if the circuit suddenly loses power.  I'd rather include back-to-back zeners.
Comment: @DrSheldon Please remove the comments from the answer, answers should not be a reply or for conversation but answer only the question.
Comment: @laptop2d: I don't understand what you're saying.  Can you give an example of what you would like removed?

H-Bridge with emitter followers


Behavior of MGF of Quadratic Combination of Dependent Multivariate Gaussians

Question: Sorry if the formatting is poor, this is my first time asking a question.  I'm investigating how squared gaussians behave, using the techniques provided here, which are giving me inconsistent results.  Here's the (simplified) setup:  I have four random variables, $Q_1, Q_2, Q_3, Q_4$, which are distributed as follows:
$$
\left[ \begin{array}{c}
Q_1\\
Q_2\\
Q_3\\
Q_4\\
\end{array} \right] \sim
N_4\left(\left[\begin{array}{c}
0\\
0\\
0\\
0
\end{array} \right],
\left[ \begin{array}{cccc}
1&0&\alpha&0\\
0&1&0&\beta\\
\alpha&0&1&0\\
0&\beta&0&1\\
\end{array} \right]\right)\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; \alpha,\beta \in [0,1]
$$
I'm dealing with the distribution $BQ_1^2 + CQ_2^2 - 2Q_1Q_2$ (D1) where $B,C$ are constants.  Furthermore I want to contrast the behavior of that distribution to distribution $\frac{1}{2}(BQ_1^2 + CQ_2^2 - 2Q_1Q_2 + BQ_3^2 + CQ_4^2 - 2Q_3Q_4)$ (D2), under the circumstances where $\alpha = \beta = 1$.  Ideally, and as I understand it, they are distributed the same way under that correlation assumption, as the repeated terms are perfectly correlated.    Using the techniques mentioned in the linked question, and an "A" matrix (again, see the question I linked to above) that looks like
$$
\left[ \begin{array}{cccc}
B&-1&0&0\\
-1&C&0&0\\
0&0&B&-1\\
0&0&-1&C\\
\end{array} \right]
$$
I get that (D2) as above is distributed according to $$\frac{1}{2}\left(\left(\frac{\sqrt{1 - \alpha}}{2} + \frac{\sqrt{1 + \alpha}}{2}\right)^2 BT_1 + \left(\frac{\sqrt{1 - \beta}}{2} + \frac{\sqrt{1 + \beta}}{2}\right)^2 CT_2 + \left(\frac{\sqrt{1 - \alpha}}{2} + \frac{\sqrt{1 + \alpha}}{2}\right)^2 BT_3 + \left(\frac{\sqrt{1 - \beta}}{2} + \frac{\sqrt{1 + \beta}}{2}\right)^2 CT_4\right)$$ where each $T_i$ is an independent chi square random variable with d.o.f. 1.  Under the assumption that $\alpha = \beta = 1$, this becomes
$$\frac{1}{2}\left(\frac{1}{2}BT_1 + \frac{1}{2}CT_2 + \frac{1}{2}BT_3 + \frac{1}{2}CT_4\right)$$
  However, using a truncated $A$ matrix to discern the distribution of $D1$,
$$
\left[ \begin{array}{cc}
B&-1\\
-1&C\\
\end{array} \right]
$$
And similarly a truncated covariance matrix that is just the 2X2 identity,
I get that $(D1)$ is distributed according to
$$\frac{1}{2}(B + C - \sqrt{4 + B^2 - 2 B C + C^2})Y_1 + \frac{1}{2}(B + C + \sqrt{4 + B^2 - 2 B C + C^2})Y_2$$
Where $Y_i$ are again independent chi square random variables with d.o.f. 1.
My issue is that $\frac{1}{2}(B + C - \sqrt{4 + B^2 - 2 B C + C^2})Y_1 + \frac{1}{2}(B + C + \sqrt{4 + B^2 - 2 B C + C^2})Y_2$ doesn't particularly look like $\frac{1}{2}\left(\frac{1}{2}BT_1 + \frac{1}{2}CT_2 + \frac{1}{2}BT_3 + \frac{1}{2}CT_4\right)$, even though we would expect that $BQ_1^2 + CQ_2^2 - 2Q_1Q_2 = \frac{1}{2}(BQ_1^2 + CQ_2^2 - 2Q_1Q_2 + BQ_3^2 + CQ_4^2 - 2Q_3Q_4)$ when $Q_1 = Q_3$ and $Q_2 = Q_4$.  I've tried massaging them to work out the same to no avail; it turns out the rest of my mathematics not shown here allows me to put these "into" moment generating functions.
The relevant term for $(D1)$ becomes $$(1- (B + C - \sqrt{4 + B^2 - 2 B C + C^2}))^\frac{1}{2}(1-(B + C + \sqrt{4 + B^2 - 2 B C + C^2}))^\frac{1}{2}$$
and the relevant term for (D2) becomes $$(1-\frac{1}{2}B)^\frac{1}{2}(1-\frac{1}{2}C)^\frac{1}{2}(1-\frac{1}{2}B)^\frac{1}{2}(1-\frac{1}{2}C)^\frac{1}{2}$$
$$=(1-\frac{1}{2}B)(1-\frac{1}{2}C)$$
which appears to have no hope of being equal just by virtue of dimensionality.
What am I doing wrong?  I am fairly convinced that these things should be equal in the perfectly correlated case, and yet here I am, and they are not at all equal.
Something else I noted was that the distribution for (D2) isn't sensitive to adjustments in the off diagonal values of the $A$ matrix, but the distribution for (D1) is.  That is to say, if we replace all the values of $-1$ in the matrices by $-\sqrt{2}$, the chi squared decomposition for (D2) remains the same but is different for (D1).
As I said at the top, I left some things out.  I can include them if this picture is not clear enough.
Answer: It turns out that I had incorrectly calculated the resulting distributions in Mathematica.  I discovered that when I went through by hand.


Possible to force new growth in Monterey Cypress Tree?

Question: Poorly pruned cypress are abundant.  Is there any way to stimulate growth in the lower portions of an adult cypress?
Answer: In bonsai, Monterey cypress are treated similarly to junipers. So, yes, you can grow new branches, but it is a many years long process and hit or miss about getting a bud where you want it.
Alternatively you/one could graft on a branch (or branches) just where you want it (or them). Even though this is faster than generating a branch from a bud, it is a several year long process - skill, some luck, and lots of patience are required.
Answer: With evergreens, Yews and Hemlocks are fair/poor at generating new growth from old wood, and almost everything else doesn't (except in rare cases when the stars align).
On the bright side, Cypress often lose their lower branches for a variety of natural reasons, including lack of wind resistance or animal presence.

Also, probably the most famous Monterey Cypress is "The Lone Cypress" in Monterey, CA  also with no lower branches.
Perhaps you should allow it to generate some vegetation and see what you can work with. Here's an example of a top heavy Monterey Cypress bonsai that I think is stunning:


Using an IP Address to Point to Amazon S3 Storage

Question: Is there a way to get an IP address to refer to Amazon S3 Storage location? The current solution my company is thinking of going with involves setting up a EC2 server with an Elastic IP and using Squid as a Proxy to the S3 location. Is there a better way?
Answer: I assume this is to work with geniuses who love static firewall rules.
There is probably not a better way, unfortunately. You simply have to put a proxy with a fixed IP address in front of S3 to present the client with a fixed IP. You could in theory pick an existing S3 IP, but it might change from underneath you if amazon changes their network.
We have similar trouble with some of our customers who insist that white-listing allowed sites by IP address is somehow "more secure" than using a filtering proxy (or even reasonable given the pace of change on the internet). We can't use CDNs because of this (although anycast-based CDNs such as MaxCDN or CacheFly might work out, we're testing).
I would not use squid unless you're a complete masochist. Nginx would be a much better option as a reverse-proxy: smaller, faster, more secure, easier to configure.
Comment: @davur in the last few years we've taken a firm stance, and gotten away with  "How do you whitelist Google? Or Salesforce.com? We need to be handled the same way. We do not provide a list of IP addresses because they change daily. Welcome to The Cloud." To my knowledge, we've not lost a single customer or prospect as a result.
Comment: Good answer. The "what IP should we whitelist" thing drives me bonkers.
Comment: This is for those geniuses. Actually customer geniuses. +1
Comment: The overall tone regarding these so called 'geniuses' made me question whether there's an alternative to providing IP addresses on request - http://serverfault.com/q/817818/87952  (@ceejayoz I welcome your thoughts also)


What's the difference between being awarded the Presidential Medal Of Freedom with distinction/without?

Question: I saw yesterday Joe Biden Jr, was awarded the presidential medal of freedom to which I'd never really saw anything about it before. So I was doing some reading around and noticed that awarded with distinction kept popping up. But without much explanation as to why.
What is the difference between receiving a normal presidential medal of freedom and one with distinction?
Answer: According to the Congressional Record Service the "with distinction" is just a higher degree of the medal:

Presidential Medal of Freedom.  The Presidential Medal of Freedom is considered the highest civilian award of the United States government.  President Truman first awarded the Medal of Freedom to reward war-connected acts or services during World War II.  It was later re-established by President Kennedy in Executive Order 11085 CRS-4 of February 22, 1963, to recognize persons who have made especially meritorious contributions to the security or national interests of the United States; to world peace; or to cultural or other significant public or private endeavors.  There are two degrees of the Medal, the higher being the Presidential Medal of Freedom with distinction.

Also the insignia is a little different:

The badge of the Presidential Medal of Freedom is in the form of a golden star with white enamel, with a red enamel pentagon behind it; the central disc bears thirteen gold stars on a blue enamel background (taken from the Great Seal of the United States) within a golden ring. Golden American bald eagles with spread wings stand between the points of the star. It is worn around the neck on a blue ribbon with white edge stripes.
A special, rarely given grade of the medal, known as the Presidential Medal of Freedom with Distinction,[4] has a larger execution of the same medal design worn as a star on the left chest along with a sash over the right shoulder (similar to how the insignia of a Grand Cross is worn), with its rosette (blue with white edge, bearing the central disc of the medal at its center) resting on the left hip. When the medal With Distinction is awarded, the star may be presented descending from a neck ribbon and can be identified by its larger size than the standard medal (compare size of medals in pictures below; President Reagan's was awarded With Distinction).
Comment: @BradleyWilson An award is nothing but appearance and grandeur.
Comment: @BradleyWilson if you wanted to get the sense of the difference, you could look at all past winners of both and contrast them to get a better idea of the difference. But it would be highly subjective
Comment: so the difference is really nothing but appearance and grandeur?
Comment: By all measures, yes.
Comment: That's more boring than I'd hoped for, but suffice to say it cleared it up for me.
Comment: No it is not just appearance and grandeur.  The distinction is something dramatic in the shift in the world.  Reagan was credited with the fall of the Berlin wall and winning the cold war.  That is why he got it with distinction.
Comment: @SoylentGray Biden got one as well, for being loyal.


What can you do with server-side includes & htaccess

Question: this issue just did not make sense to me, perhaps someone smart can help?
why is it that many hosts do not allow you to set htaccess or server-side includes?
specifically alot of the free hosting plans do not allow this, what are some situations that they are thinking of that makes them disable these features?
Answer: Income - You're not paying anything, the only money they get are from advertisements.
Resources - they take up additional resources.  Offering only the essentials reduces the amount of risk and maintenance.
Agreement violations / unethical practices - It may reduce the amount of people signing up for free accounts to redirect websites, rename, hog resources, etc.
That's just what comes to mind.
Comment: what i mean is I am not sure what these do exactly? what can editing htaccess or server-side includes do that i cannot do already, as i can already redirect/rename ect. without it?
Comment: sorry for the english, not my native lang
Answer: I am new to this as well, but one thing you can do with SSI is to make your web page design a lot easier.
You can seperate headers, footers, and nav divisions (or any HTML elements that are on every page of your site) into their own HTML files.  This means that when you add a page, or change one of those elements you only have to change them once, and then ensure they are included with an SSI include command into the correct spot on every page, nearly eliminating the chance of mistakes when putting the same element on every page.
SSI basically writes the referenced html file directly into the page wherever the include statement sits.
I know a lot less about .htaccess because I haven't played with it yet, but you can change which pages the server looks for SSI code in using different configuration commands.  It also looks like you can enable SSI.
I know there is a lot more to all this than I wrote here, but hopefully this gives you an idea.
Here is a website that probably better explains this: http://www.perlscriptsjavascripts.com/tutorials/howto/ssi.html


My country ( i.e. Bangladesh) is not listed on the billing information?

Question: My country is not listed in the billing system. I traveled from Saudi Arab to Bangladesh and i wanted to add the billing information with my Bangladeshi Number.  It seems that the Payment method doesn't have my country listed.How do i add my country ( i.e. Bangladesh)?
image
Answer: Apple lists the countries where services are available when you choose your location.

https://www.apple.com/choose-country-region/
https://www.apple.com/ios/feature-availability/
https://www.apple.com/macos/feature-availability/
https://www.apple.com/watchos/feature-availability/
etc...

As of January 2019, the only Apple Features offered in Bangladesh is Maps and Satellite Maps. Also, keep in mind that the features are enabled in almost all cases based on the region where you purchase the device, so if your phone was purchased in Saudi Arabia and then used in the US - you might retain all the Saudi restrictions despite your attempt to change. App Store and other services for billing purposes typically are more flexible and you can take advantage of them when you move about.

My speculation and research why Bangladesh isn't listed is due to Apple not obtaining some rights from the government or is in the process of obtaining them.

In order to run an iTunes store in any given country, Apple has to secure licensing rights for the content, legal rights from the local government, payment processes, and numerous other legal hurdles. Either Apple hasn't applied for those rights yet, or they're in progress, but the size of the user base as well as the ease (or otherwise) of doing business in any given country are the driving factors here.
You can add your voice via Apple's feedback page here: http://www.apple.com/feedback/itunesapp.html but at the end of the day you can be the most ardent, vocal fan in the world, but if the Bangladesh government don't give the licenses to operate, it all means nothing.

(Source)


What is the effect of solving short integer solution problem in Dilithium or any other post quantum signature scheme?

Question: I am trying to understand the post quantum based signature scheme Dilithium. I know what the hard problems are in the scheme, but I am having trouble in understanding the utilization of short integer solution in the scheme. Specifically speaking, I can't understand exactly where this problem is used in the scheme. Also, what would happen if someone finds a solution to this hard problem, besides finding collisions for the hash function??
Answer: The hardness of SIS (or more precisely, the hardness of the module version of SIS: MSIS) is the assumption used to demonstrated the Strong Unforgeability of Crystal Dilithium under Chosen Message Attacks (SUF-CMA). In other words if this problem is hard then even producing a new signature for a previously signed message is hard even if the adversary is allowed to request multiple signatures of other messages. This is seen in section 6.2.2 of the paper.
If one can solve MSIS, powerful attacks are possible: consider the key generation algorithm on page 4 of the specification:
Gen
01 $A←R^{k×l} q$
02 $(\mathbf s_1,\mathbf s_2)\leftarrow S_\eta^l \times S_\eta^k$
03 $\mathbf t := A\mathbf s_1 +\mathbf s_2$
04 return(pk=($A,\mathbf t$),sk=($A,\mathbf t,\mathbf s_1,\mathbf s_2$))
We are given the values $A$ and $\mathbf t$ and wish to recover $\mathbf s_1$ and $\mathbf s_2$ for a key recovery attack (top of the attack outcome hierarchy).
Note that the matrix
$$\begin{matrix}(A|I|-T)\end{matrix}$$
where $I$ is the $k\times k$ identity matrix and $T$ is the $k\times k$ diagonal matrix with entries taken from $\mathbf t$ has the short solution $(\mathbf s_1^T,\mathbf s_2^T,1,\cdots 1)^T$. A solution to this problem therefore allows recovery of the private key and complete impersonation of the owner.
Comment: But this answers the second half of the question that a person has found the solution and he uses that solution to impersonate as someone else. But, how SIS is being utilized here and in documentation, where have they specified SIS problem?
Comment: It's a bit too strong to say "A solution to this problem therefore allows recovery of the private key". The implication is the other way round. Recovering the key implies finding a short solution. A short solution will in general not be a valid secret key. So breaking SIS is necessary but not (obviously) sufficient for key recovery.
Comment: I've added an initial paragraph.
Comment: @Maeher true though I believe that Dilithium is parameterised to make non-causal solutions statistically unlikely.


How does the photon energy formula $E=h\nu$ mean the quantum nature of energy?

Question: The frequency v can be less than 1. So the energy is starting from zero, and is continuous.  The black body radiation is also continuous spectrum given an arbitrary temperature T.
Answer: The fact that $\nu$ is continuous and unbounded simply tells you that, for example, a 'free' photon(boundary conditions often enforce quantization, eg standing waves) can take up any frequency whatsoever, and so, it can have any real number for energy(as there will always be a corresponding $\nu$ for it).
Now if you consider a monochromatic beam of light, which is made up of photons, then the beam can only have energies of the form-$$E=nh\nu$$, where $n$ is the number of photons in the beam. In this sense, the energy of the beam is quantised.
Finally, this holds for any kind of electromagnetic radiation. You can think of it as being made up of a discrete number of photons, and once you have assigned a frequency $\nu$ to each of them, the energy of radiation is quantized by the number of photons. There was no restriction, however, on what $\nu$ you would assign to each photon. As energy exchange by radiation occurs via these photons, this energy is called 'quantised'.
Comment: The point is that light, previously assumed to be a wave, must be simultaneously thought to be made up of particles (photons) to explain the apparent quantisation of energy despite no quantisation of frequency. This wave particle duality is at the heart of quantum mechanics, and it is certainly not trivial.
Comment: Given a specific frequency, total energy of the light must be Nhv. This is a self evident math. Please see my words answering gary p in above floor. The total emissions of all cars running at 100km/s on road are the same quantum value. But we all know car emission is  continuous without discrete number.
Comment: The total weight of all 60kg body-weight people on earth MUST be 60kg multiplied by N.  Is this so-caled "discovery of the new quantum world"? Can this lead the physics to the conclusion that every man's body weight is quantised? Hard to believe.
Comment: GRrocks, yes it's not trivial, I agree. What I am saying is that the formula doesn't mean light energy is of quantum mature. It means light of given frequency is of quantum nature. Just the same as that total gravity of all 60kg body-weight men is quantised value,  which is self evident and simplest math. A lot of physics textbook misinterpreted the formula as energy has quantum nature.
Answer: You don't have that formula quite right.  It's really $$E=nh\nu$$ where $n$ is an integer and  $h$ is a constant. $\nu$ can take the value of any positive real number, so the black body curve is indeed continuous.  But $n$ is an integer.  So the energy can take only discrete values.
Comment: For a given frequency v, of course, the total energy is N times hv. But this is a always correct but meaningless conclusion. Take automobile emissions for example. Assume (just assume) that vehicle emissions are proportional to vehicle speed. Obviously, the emission of a single vehicle is continuous, because the vehicle speed is continuous from 0 to 200 km/s.
Comment: There are millions of cars on the road. If we look at the total emissions of these cars at specific speeds, it's quantum. If the emission of a 100 km vehicle is w, then two 100 km vehicles must be 2w, and a million 100 km  vehicles is 1000000w. The quantum nature discovered by Planck is the total emission value of specific speed cars.
Comment: The  emission value of selected 100km cars must be quantum. What I said always-correct but  meaningless is referring to this .
Answer: It can also be explained by the fishes in a lake. The weight of fish is not quantized. There are eggs, small fishes and adult fishes in the lake. They have been growing up bit by bit. So the weight of a fish is a continuous variable. But if we look at all five kilograms of adult fishes in the lake, their total weight is of quantum distribution. If there is only one in the lake, the total weight will be 5 kilograms, if there are two in the lake, it will be 10 kilograms, if there are N in the lake, the total weight will be 5N kilograms. The quantum nature discovered by Planck is the total weight of all five kilograms  fishes in the lake. This is, of course, a value with quantum distribution. This quantum property does not mean that the weight of fish is quantum value, but mean that the number of fishes is integers and the specific choice of the observer is 5 kilograms.
Comment: Total  energy of given frequency light is quantized, but light energy is not quantized. Total weight of all 5kg fishes is quantized,but fish weight is continuous. For anything, if we use a fixed amount as unit, the total summary of all that units must be quantized. This is a common sense, can't lead to quantum theory, and shouldn't be mistakenly interpreted.


Which statistical test tells which classifier performs better than the other?

Question: I have 3 classifiers: A, B and C. According to accuracy, specificity, sensitivity, f-score, and g-mean, say classifier B performs best. Now I want to statistically validate this claim. How should I do it? Will McNemar's test be enough to validate it? Which statistical test will tell me which classifier is better than the rest? And how?
Answer: Cochran's Q test
Is a generalisation of the McNemars test and can be used to see if there is a truly better classifier for the metric chosen. You can ofcourse also do pairwise Mcnemare test and draw conclusions from there.
NOTE:
These things are expensive
Comment: remember that the Cochran's Q test assumes dichotomous dependent variable. So for multi-class dependent variable >2 classes won't be supported.
Answer: Janez Demsar has published an article concerning comparison of different classifiers. When you're using multiple datasets to check which algorithm performs best, assuming, that quality measurements come from normal distribution can be risky, so ANOVA is not necessarily recommended. (With ~8k citations it's a canonical article about comparison of classifiers.)
Non-parametric tests (such as Friedmann test) can be used to obtain F-score. Then post-hoc can be applied to test whether one algorithm outperforms others. Bear in mind, that checking n different algorithms implies different tests than checking an algorithm against reference (well known algorithm). In the former case Nemenyi test performs well, in the latter Bonferroni-Dunn test (chapter 3.2.2).


MenuStrip in XNA 4.0

Question: Is it possible to place a MenuStrip into a XNA 4.0 project. This project is intended for PC-s only and I already have openFile dialogs, but I cant get the MenuStrip drawn. If this is not possible what would be a good alternative. I've been trying to get find it on create.msdn but it keeps redirecting me to the WinPhone/XBox selection page and I cant access the tutorials at all.
Comment: Is your game embedded in a WinForm or are you using a standard XNA project?
Comment: It is a XNA project
Answer: The way to do this is to embed it in a proper WinForms container. Here are the current links to the WinForms samples, since MS still haven't fixed up the old links :(

WinForms Series 1: Graphics Device
WinForms Series 2: Content Loading
Comment: Haha... yeah. When I was posting my answer I noticed my links were broken the first time around. -.-;
Answer: Use the official sample, depending on what you want you may need more functionality. You can find more information at the link below. It includes a link to the PC template and sample.
http://code.google.com/p/xna-game-menu/

MenuStrip in XNA 4.0


What will happen when bitcoin's popularity multiplies and the number of transactions explodes?

Question: As I understand, every transaction in the bitcoin network is stored into one huge "chain". What happens when bitcoin gets more popular and there will be millions of transactions per minute? Doesn't the blockchain grow "too big"?
Comment: Indeed, if it pretends to take over all global money flow and every PC must replicate/store every transaction, we will have millions of transactions per second and trillions per day. My hard drive and network cannot sustain even a single such day.
Answer: According to Bitcoin Block Size - What are the rules? each block can be up to 1MB per size and contain roughly 2400 transactions. As transaction blocks are supposed to be found every ten minutes, this would mean that 14400 transactions per hour or 4 transactions per second could be handled.
If there should be more transactions sent they would compete for inclusion into the blocks. Transactions with smaller fees would gain priority by aging and would at some point be included at times of fewer transactions. People that require their transactions to arrive quickly would attach bigger transaction fees for faster inclusion. At some point microtransactions would cost more than the amount of value they transport and/or would have to wait very long. Perhaps some transactions would move off the blockchain,  some e-wallet services already allow their users to transfer balances to other users of the service for free and without wait.
The protocol as it is today would not be able to sustain a transaction volume of millions per minute (although that is too big a number, even VISA only has 150 million transactions per day, which are about 100k per minute). The bitcoin network is currently averaging just above 60000 transactions per day, so this is already about 1/6 of what the network can handle with the current block size limit.
However, apparently a significant amount of transactions are generated by gambling, so I am unsure how pressing the matter really is for the network.
Edit:
Reading more about the scalability of the system I learned that the bitcoin network could scale to more than 40000 tps on today's hardware. The regular users would probably not store the complete blockchain anymore, but only the unspent outputs without the entire history of the transactions.
Comment: Thank you for information! I found useful link: [link](http://www.bitfreak.info/files/pp2p-ccmbc-rev1.pdf) As i understand - growing block chain is real issue that needs dealing with. [link](http://blockchain.info/charts/blocks-size) Soon blockchain size will reach 10G and when BitCoin becomes more popular it will grow even faster. So it will be thing to deal with.
Comment: That is correct, however, for the average user it is not necessary to have the complete blockchain. For them it is sufficient to have only all the addresses that have money in them, which is only a couple hundred MB.
Comment: This question might be interesting for readers of this one as well: [How would the Bitcoin protocol be impacted if nodes only stored the blocks they cared about?](http://bitcoin.stackexchange.com/questions/733/how-would-the-bitcoin-protocol-be-impacted-if-nodes-only-stored-the-blocks-they)


Query records using REST API and POST method

Question: Let's say I need to perform complex SOQL Query and there is unable to use GET with queryParams. Is it possible to use POST with query script inside the body? If so could anybody provide a simple example?
Answer: Yes, you can use the composite request API.
The URL for this is <code>/services/data/v50.0/composite</code>.
Example Payload
<code>{
  "compositeRequest": [{
    "method": "GET",
    "url": "/services/data/v50.0/query?q=select+id+from+account",
    "referenceId": "query1"
  }]
}
</code>
You can also use this to bundle multiple queries in to a single request, as well as other operations, like DML or describe calls.
Feel free to read more in the documentation.


Do riders bodies go numb after hours of riding?

Question: When talking to people who don't bicycle themselves, I've noticed that every time I mention bicycling long distances, people seem to think that your body goes numb, like it does when you run long distances. Does it? Is it in any way related to how fit the individual is?
Comment: I do not think it has to do as much with fitness as with the fit (and model) of the bike.
Comment: Yes and no.  Dedicated riders put a lot of effort into making the bike comfortable and in adopting a posture which minimizes fatigue and numbness.  Things like proper seat adjustment and frequently changing hand position are critical, and in most cases true "numbness" can be prevented with the proper fit and riding strategies.  However, it is certainly true that, after 8 hours in the saddle, your *brain* is pretty numb.
Comment: If your body went numb it would be hard to even control the bicycle. Does your body go numb when you bicycle long distances?
Answer: Yes - numbness denotes a problem with bike fit or a thermal problem.  Here's my personal experience.

Fingers - riding a MTB with "ergonomic" grips, the sort with a wee wing that rests under your palm.  With these I get numb fourth and fifth fingers on both hands.  It takes a three hour ride to start, and if I go 4+ hours then the numbness can last into the evening.
Feet/toes - I have road shoes that are perhaps too small.  If I wear thick socks by mistake, I can lose feeling in toes, again after a long ride.  Answer there is better-fitting shoes, but the interim fix is thin socks.
Neck - More sore than numb, but a generic helmet often has a brim or visor.  This is fine for a MTB but makes you lift your face more on a road bike, leading to a sore neck.  Unclipping the visor is a cheap and easy alievement.
Backside - an upright posture puts more weight on your saddle, via your bum.  A good saddle holds the sit-bones, and not the softer tissues.  A poor saddle presses the wrong things and makes a ride uncomfortable, and numb.  The fix is a saddle replacement, or temporarily spend more time on your feet/pedals and be less efficient but less sore.
`nads - this one is related to repeated friction inducing chafing more than numbness.  A ride under 20 km doesn't need special clothes generally.  Longer rides you'll appreciate padded pants.  A bad fit will leave somewhere scraping back and forth every pedal revolution.

Personal Story - A flat singletrack MTB course with minor ups and downs, made my padded pants drop a little so the pad's seam was rubbing on the top of the thigh.  I wore a blister that popped.  Since it was around the corner I couldn't see how bad it was, but the hot shower made it quite obvious.  The fix?  tighter pants and pull them up.  No underwear underneath, and last resort is to apply some kind of friction-reducing cream.

Cold - if you're cold you're going to go numb.  Earlobes, nose, cheeks, fingers/toes, and limbs.  I also notice a cold stomach when I stop.  This is exacerbated by the wet.

Personal story - I once rode through a deep unexpected puddle of snow-melt and got wet up to mid-calf.  My shoes were light "hard drive bag" open-weave.  And then I had to ride ~20km home through a cold easterly wind.  When I got off the bike, I could not feel one foot at all.  The numb sensation did not go away with a hot shower - it took a full 24 hours to vanish completely.
Thermal generally - be prepared to pull up or roll down your sleeves, unzip your top while riding.  If you have an uphill ahead, drink 2 minutes before the start and open all the vents.  If you have a fast downhill coming, button things so you don't get chilled on the way down while coasting.
Rain - if its predicted to rain, consider not riding, or take the wet-weather bike with mudguards/fenders and treadded tyres instead of the slick roadbike.  Take/Wear a waterproof outer layer and put it on if it does start to drizzle.
Comment: And a good question on hand positions would be worth having.
Comment: With ergo grips you may get some help from tweaking the position around the bar.  You can ride an easy stretch with quite a different hand position for a minute to get the blood flowing (perhaps less viable in MTB use than when using them on roads where riding one handed and flexing the free arm a few times can also help).  Mine have mini-bar-ends (if you wrap 2 fingers round them you hide them) which provide quite a range of minor varations in hand position.  This may or may not work depending on vegetation etc. I regard hand numbness as a warning sign to deal with - hand grip is important.
Comment: I never found myself using that many on my brief experience with drop bars (traffic meant I always had to be near the brakes, and I never liked starting in the drops awkward and poor vision), and found that even with decent gloves riding mainly on the hoods led to my hands starting to go numb quicker and in more important places.  Even on my beater bike (90s rigid MTB, round rubber grips) there are some "relief" hand positions that are enough to prevent numbness (my regular ride is only a few minutes now, but I've done longer)
Comment: @chrish Good point - I count 6 major hand positions on a drop bar road bike, and theres really only one on a normal flat MTB bar.  I might ask that as a new question.
Answer: I've never been a runner so I can't really comment on similarities, but certainly it is possible to experience numbness while riding.
I have poor circulation anyway, and for me it usually happens on long rides in low temperatures. Warm weather rides are fine.
Also note that there are various medical conditions (e.g. diabetes) which can give rise to poor circulation, so someone who for example is diabetic may be predisposed to numbness.
Answer: Not generally. Cyclists have points of contact - hands, feet, butt - where prolonged pressure is created. Pressure can cut off communication between nerves and the brain, making a body part or area feel numb. Something could happen with other areas, like the neck for example, if blood flow is impinged and the nerves don't receive oxygen. This is why wiggling things helps, keeps blood flowing and nerves firing.
Answer: The only numbness I have ever experienced on long rides (6+ hours) was due to poor fit or equipment failure.  The endurance cyclists I known have never described anything "going numb" as a regular occurrence with distance riding.
I can tell you that at the end of a very long ride (12+ hours) I am generally starting to get sore.  I have not great knees, and the tendons and ligaments in them tend to become inflamed after more than 12 hours or so of riding.  They hurt, I wish more than anything that they went numb.
There tends to be an odd phenomenon where after many hours on a bike doing anything except sitting or laying down I find horrible.  Walking and or moving is just uncomfortable, it's preferable to ride more, or not move at all.
Answer: Coming from the perspective of a cyclist commuter who also does cycle touring, but sometimes doesn't cycle for months:
Parts of your body can go numb, yes, but it's less about how fit you are, and more about how much practise you have had. For example if you haven't cycled regularly then an hour or two in the saddle can leave you with a numb feeling in your backside where it rests on the saddle. But if you keep doing regular rides then this will decrease and disappear. Numbness can also occur in the hands and arms, but tends to be over longer periods of time (more than 2 hours). As you were asking people who don't bicycle, their lack of practise will result in numb backsides if they don't cycle regularly.
A big factor is also the equipment you use. For example buy a saddle with a groove down the centre which will prevent your soft parts from becoming numb, buy handlebar grips with flat pads at the end to rest your hands on, because the best place to place pressure on your palm is the outside edge (see Tip#4 http://www.builtlean.com/2011/02/23/how-to-proper-push-up-form/). In my experience having a saddle with a groove and handlebar grips with flat pads makes a huge difference on long rides.
Example saddles: google bike saddle with groove
Example handlebar grips: http://www.downtheroad.org/Equipment/Bike_Parts/Bike_handlebars.htm


Can I connect an Arduino GSM Shield directly to a PC?

Question: Is it possible to communicate with and use the GSM shield directly from the computer, without using an arduino board?
Answer: You can connect a https://www.arduino.cc/en/Main/ArduinoGSMShield to your computer with a USB-TTL serial cable, but you need to make sure you supply enough 700-1000ma to drive the GSM when it is transmitting.

Power
  It is recommended that the board be powered with an external power supply that can provide between 700mA and 1000mA. Powering an Arduino and the GSM shield from a USB connection is not recommended, as USB cannot provide the required current for when the modem is in heavy use.
Comment: @sferaud A GSM shield is usually be controlled as a modem using AT commands. You don't need "libraries" to make an operating system control a modem. You may need an "application" or maybe a "driver" but never a "library".
Comment: Actually that depends a bit if you want the operating system to treat the modem as a general purpose network interface, or if you want to use it more explicitly, similar to how it would be used by an Arduino.  In the latter case library code (maybe even Arduino stuff backported to processing?) could be an option.
Comment: thanks. A follow up: I'm assuming I wont be able to use the existing Arduino libraries (gsm, softwareserial). Do you know of any that I could use?


Problem with Deriving work done by gravitational force and gravitational potential energy from the first principles

Question: Suppose we have a system with Two point masses of mass $M$ and mass $m$. And we want to derive Work done. Lets say M is fixed or $M>>m$. Initially assume mass m is at rest at a distance of $a$ from $M$ and after some time it reaches $b$. And we want to calculate work done. Since magnitude of Gravitational Force is $\frac{GMm}{r^2}$ and displacement of $m$ is towards the big mass so Force and dissplacement are in same direction so work done should we positive. But if we calculate $\int_a^b F\cos(\theta) \,dx$ you get a different answer its negative. Since $b<a$ (Gravity is a repulsive force and after some time distance decreases between masses final distance is b and initial is a by definition) and gravitational force is just $\int_a^b \frac{GMm}{r^2} \,dr$. This has to be right because both displacement and Force are in same direction so Force multiplied by dr is as I showed above. Now when you calculate this integral you get $GMm(\frac{1}{a}-\frac{1}{b})$ which is clearly negative. What am I doing wrong. If you continue with this working to calculate potential energy you get it as positive which is also wrong. whats the mistake. The same reasoning I did for spring force and other phenonmenon its correct but gravity something wrong is happening what is it.
Comment: $b < a$ is confusing. Maybe make it $r_1$ and $r_2$, with $r_1 < r_2$. It would make your reasoning easier to follow.
Comment: Your integral is simply bounded incorrectly. The integral from b to a is the negative of the integral from a to b. It's convention to have the lower bound less than the upper bound. This would fix your issue.
Answer: One way to look at what is going on is that when you do an integral like
$$
\int_a^b f(r) dr
$$
with $a>b$, then $dr$ is negative. More precisely, if you convert this integral into a Riemann sum,
$$
\sum_{i=1}^N f(r_i) \Delta r
$$
with $r_1=a>r_N=b$, then $\Delta r=\frac{b-a}{N}<0$.
So let's go back to how we would do the dot product to get to the integral for work. To do this carefully, we need a vector expression for the force (not just the magnitude). We introduce a unit vector $\hat{e}_r$ that points radially outward. Then
$$
\vec{F} = -\frac{GMm}{r^2}\hat{e}_r
$$
since the force points radially inward.
Now we come to the displacement vector -- this is the tricky part. What you would like to say is that the displacement is radially inward, so that
$$
d\vec{r} = -\hat{e}_r dr \ \ \ {\rm (WRONG)}
$$
However, this is wrong, because:

We know $-\hat{e}_r$ points radially inward
We know that $dr$ is negative, by the argument above.
Therefore, combining the above two points, $-\hat{e}_r dr$ points radially outward, but we know that the actual displacement $d\vec{r}$ must point radially inward.

Therefore, the correct equation here is
$$
d\vec{r} = {\color{red} +} \hat{e}_r dr
$$
With this substituion, we get
\begin{eqnarray}
W = \int \vec{F} \cdot d\vec{r} = - (\hat{e}_r \cdot \hat{e}_r) \int_a^b \frac{GMm}{r^2} dr = {\color{red}-}  \int_a^b \frac{GMm}{r^2} dr = GMm \left(\frac{1}{b}-\frac{1}{a}\right) > 0
\end{eqnarray}
as expected.
Another way to say this, which is perhaps less error prone, is that the displacement is
$$
d\vec{r} = \hat{e}_r |dr|
$$
You can avoid having to worry about the sign, if you remember that $|dr|$ means you should always choose the limits of integration to go from the smaller $r$ value to the larger $r$ value, so that $dr>0$ and $|dr|=dr$.


Why does ALTER COLUMN to NOT NULL cause massive log file growth?

Question: I have a table with 64m rows taking 4.3 GB on disk for its data.
Each row is about 30 bytes of integer columns, plus a variable NVARCHAR(255) column for text.
I added a a NULLABLE column with data-type Datetimeoffset(0).
I then UPDATED this column for every row and made sure all new inserts place a value in this column.
Once there were no NULL entries I then ran this command to make my new field mandatory:
ALTER TABLE tblCheckResult
ALTER COLUMN [dtoDateTime] [datetimeoffset](0) NOT NULL

The result was a HUGE growth in the transaction log size - from 6GB to over 36GB until it ran out of space!
Does anyone have any idea what on earth SQL Server 2008 R2 is doing for this simple command to result in such huge growth?
Answer: When you change a column to NOT NULL, SQL Server has to touch every single page, even if there are no NULL values. Depending on your fill factor this could actually lead to a lot of page splits. Every page that is touched, of course, has to be logged, and I suspect due to the splits that two changes may have to be logged for many pages. Since it's all done in a single pass, though, the log has to account for all of the changes so that, if you hit cancel, it knows exactly what to undo.

An example. Simple table:
DROP TABLE dbo.floob;
GO

CREATE TABLE dbo.floob
(
  id INT IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED,
  bar INT NULL
);

INSERT dbo.floob(bar) SELECT NULL UNION ALL SELECT 4 UNION ALL SELECT NULL;

ALTER TABLE dbo.floob ADD CONSTRAINT df DEFAULT(0) FOR bar

Now, let's look at the page details. First we need to find out what page and DB_ID we're dealing with. In my case I created a database called foo, and the DB_ID happened to be 5.
DBCC TRACEON(3604, -1);
DBCC IND('foo', 'dbo.floob', 1);
SELECT DB_ID();

The output indicated that I was interested in page 159 (the only row in DBCC IND output with PageType = 1).
Now, let's look some select page details as we step through the OP's scenario.
DBCC PAGE(5, 1, 159, 3);

UPDATE dbo.floob SET bar = 0 WHERE bar IS NULL;
DBCC PAGE(5, 1, 159, 3);

ALTER TABLE dbo.floob ALTER COLUMN bar INT NOT NULL;
DBCC PAGE(5, 1, 159, 3);

Now, I don't have all the answers to this, as I am not a deep internals guy. But it's clear that - while both the update operation and the addition of the NOT NULL constraint undeniably write to the page - the latter does so in an entirely different way. It seems to actually change the structure of the record, rather than just fiddle with bits, by swapping out the nullable column for a non-nullable column. Why it has to do that, I'm not quite sure - a good question for the storage engine team, I guess. I do believe that SQL Server 2012 handles some of these scenarios a lot better, FWIW - but I have yet to do any exhaustive testing.
Comment: This behaviour changed considerably in later versions of SQL Server. I've checked 2016 RC2 and found out that for this exact scenario and 1 million rows in the table only 29 log records are generated during change from NULL to NOT NULL if all values were already specified for the column.
Answer: When carrying out the command
ALTER COLUMN ... NOT NULL

This seems to be implemented as an Add Column, Update, Drop Column operation.

A new row is inserted into sys.sysrscols to represent a new column. The status bit for 128 is set indicating the column does not allow NULLs
An update is carried out on every row of the table setting the new columnn value to that of the old colum value. If the "before" and "after" versions of the row are exactly the same this does not cause any thing to be written to the transaction log otherwise the update is logged.
The original column is marked as dropped (this is a metadata only change in sys.sysrscols. rscolid updated to a large integer and status bit 2 set on to indicated dropped)
The entry in sys.sysrscols for the new column is altered to give it the rscolid of the old column.

The operation which has the potential to cause lots of logging is the UPDATE of all rows in the table however that does not mean that this will always occur. If the "before" and "after" images of the row are identical then this will be treated as a non updating update and not be logged from my testing so far.
So the explanation as to why you are getting lots of logging will depend upon why exactly the "before" and "after" versions of the row are not the same.
For variable length columns  stored in the FixedVar format I found that setting to NOT NULL always causes a change in the row that needs to be logged. The column count and the variable length column count both are incremented and the new column is added to the end of the variable length section duplicating the data.
datetimeoffset(0) is fixed length however and for fixed length columns stored in the FixedVar format the old and new columns both seem to be given the same slot in the fixed length data portion of the row and as they both have the same length and value the "before" and "after" versions of the row are the same. This can be seen in  @Aaron's answer. Both versions of the row before and after the ALTER TABLE dbo.floob ALTER COLUMN bar INT NOT NULL; are
0x10000c00 01000000 00000000 020000

This is not logged.
Logically from my description of events the row ought in fact to be different here as the column count 02 should be increased to 03 but no such change actually happens in practice.
Some possible reasons as to why this can occur in a fixed length column are

If the column was originally declared as SPARSE then the new column would be stored in a different part of the row from the original causing the before and after row images to be different.
If you are using any of the compression options then the before and after versions of the row will be different as the column count section in the CD array is incremented.
On databases with one of the snapshot isolation options enabled then the versioning information in each row is updated (@SQL Kiwi points out that this can also occur in databases without SI enabled as described here).
There may be some previous ALTER TABLE operation that was implemented as a metadata only change and has not yet been applied to the row. For example if a new nullable variable length column was added then this is originally applied as a metadata only change and it is only actually written out to the rows when they are next updated (the writing that actually occurs in this last instance is just updates to the column count section and the NULL_BITMAP as a NULL varchar column at the end of the row doesn't take up any space)
Answer: I faced the same problem regarding a table having 200.000.000 rows. Initially I added the column nullable, then updated all the rows, and finally altered the column to NOT NULL via an ALTER TABLE ALTER COLUMN statement.
This resulted in two huge transactions blowing up the logfile incredibly (170 GB growth).
The fastest way I found was the following:

Add the column using a default value
ALTER TABLE table1 ADD column1 INT NOT NULL DEFAULT (1)

Drop the default constraint by using dynamic SQL as the constraint has not been named before:
DECLARE
    @constraint_name SYSNAME,
    @stmt NVARCHAR(510);

SELECT @CONSTRAINT_NAME = DC.NAME
FROM SYS.DEFAULT_CONSTRAINTS DC
INNER JOIN SYS.COLUMNS C
    ON DC.PARENT_OBJECT_ID = C.OBJECT_ID
    AND DC.PARENT_COLUMN_ID = C.COLUMN_ID
WHERE
    PARENT_OBJECT_ID = OBJECT_ID('table1')
    AND C.NAME = 'column1';

Execution time went down from > 30 minutes to 10 minutes, including replicating the changes via Transactional Replication. I am running a SQL Server 2008 installation (SP2).
Answer: I ran the following test:
create table tblCheckResult(
        ColID   int identity
    ,   dtoDateTime Datetimeoffset(0) null
    )

 go

insert into tblCheckResult (dtoDateTime)
select getdate()
go 10000

checkpoint

ALTER TABLE tblCheckResult
ALTER COLUMN [dtoDateTime] [datetimeoffset](0) NOT NULL

select * from fn_dblog(null,null)

I believe that this has to do with the reserved space the log holds just in case you rollback the transaction. Look in the fn_dblog function at the 'Log Reserve' Column for the LOP_BEGIN_XACT row and see how much space it is trying to reserve.
Comment: If you try `select * FROM   fn_dblog(null, null) where AllocUnitName='dbo.tblCheckResult' AND Operation = 'LOP_MODIFY_ROW'` you can see the 10000 row updates.
Answer: The behavior for this is different in SQL Server 2012. See http://rusanu.com/2011/07/13/online-non-null-with-values-column-add-in-sql-server-11/
The number of log records generated for SQL Server 2008 R2 and below releases will be significantly higher than the number of log records for SQL Server 2012.
Comment: The question is why altering an existing column to `NOT NULL` causes logging. The change in 2012 is about adding a new `NOT NULL` column with a default.


Simple Speech Recognition

Question: Is there a simple speech recognition program where you can say a command and that that command will be executed in the terminal? It must be simple to install/setup/configure and it must be a small package because  don't have much space left. I am running Lubuntu 14.10 on my EEE PC 701.
Answer: Apparently not - there are recognition engines (Sphinx, Julius) but all require a library of speech / meanings - there are several expensive ones out there, and a project to crete an open-source one (which looks to be dead).
Apparently Julius works if you speak Japanese. Sphinx appears perhaps more promising, with updates this year. I don't think it looks simple though.
Disappointing...
Comment: I don't see why not - I'm not a current user of either, so YMMV, but that sort of use is pretty central to these things
Comment: The expensive library of speech is misinformation. CMUSphinx provides models for several languages. All available in downloads.
Comment: Ah - excellent news! I may go back for another look myself then.
Answer: You can use CMUSphinx for that. Tutorial with basics is here.
The simple way to configure this would be to use small Python program. You can find example of voice spotting with Python on CMUSphinx github.

Simple Speech Recognition


Do password derived encryption keys need to be salted?

Question: If I have a database where I store users' sensitive information, and encrypt that information, do I need to do something like PBKDF2(password,salt,10^5) for the encryption key as well as the hash?
Answer: Whenever you have a human password and want to process it into some format that "leaves traces", then you need to do it with a function that is resilient to brute force (e.g. PBKDF2). You thus need to do that when you hash the password to obtain a password verification token that you store; you also need to do that when you are turning the password into a key for symmetric encryption.
To make things clearer: if you turn password P into key K and then use K to encrypt some data D and store the encrypted result E, then an attacker, observing E, could "try passwords" by turning a potential password P' into key K' and then trying to decrypt E with K' and see if it yields some sensible data D. This is the offline dictionary attack situation, very similar to basic password hashing.
Strictly speaking, turning some data into a key is called Key Derivation, and "PBKDF" really means "Password-Based Key Derivation Function".
Comment: So...is that a "yes"? Because I understand that you need to use a key-derivation/slow-hashing function. My question is if I needed to salt the key.
Comment: Slowness and salts are two important elements of password hashing (and its brother password-based key derivation). If you need one then you need the other, and vice versa.


Dunkirk Little ship requisition documents

Question: I would like to know what authorisation, if any, the ministry of shipping or the navy carried with them when commandeering the "Little Ships". When the official presented themselves to the owner of a vessel, assuming they could find the owner, what documentation did they carry, if any?
Comment: Given the immediacy of the action and the fact that the people collecting the boats were ["various boat builders and {Ministry of Shipping} agents around the coast"](http://www.adls.org.uk/t1/content/history-association-dunkirk-little-ships), I'd guess that there was little official documentation available at the time.
Comment: [Seems like there is a fairly easy way to find out](http://www.adls.org.uk/t1/content/i-think-my-boat-took-part-operation-dynamo).  I'm willing to bet there was no documentation necessary - can you imagine saying, "No, I think I'll leave them to die there; I'm going fishing instead."?
Answer: According to the History of the Association of Dunkirk Little Ships the BBC announced a few weeks beforehand an Admiralty order that all small boat owners were to offer their ships.

On the 14th day of May, 1940, the BBC made the following announcement: "The Admiralty have made an Order requesting all owners of self-propelled pleasure craft between 30' and 100' in length to send all particulars to the Admiralty within 14 days from today if they have not already been offered or requisitioned".
Although this may have sounded something like a request, it was, in fact, an Order. These ships were required for harbour services and national defense and thus the idea of using private yachts as naval auxiliaries was quite well established by the time the emergency of Dunkirk broke upon the Nation.

So they had some warning. On the day, they telephoned around and sent Ministry and RN officers to collect the ships.

On the 26th May 1940, a secret cipher telegram was sent by the War Office to the Admiralty stating that the emergency evacuation of troops from the French coast was required immediately.... On the following day, May 27th, the Small Craft section of the Ministry of Shipping was telephoning various boat builders and agents around the coast requesting them to collect all small craft suitable for work in taking troops off the beaches where the larger ships could not penetrate.

And in many cases they just took them.

In many cases the owners could not be contacted and boats were taken without their knowledge - such was the speed and urgency of the Operation. Mr. Douglas Tough of Tough Brothers, Teddington, who, with Ron Lenthall, collected many of the boats on the upper reaches of the Thames, reported that the owner of one of the boats which was being commandeered could not be contacted but, hearing that his boat was being taken away, informed the Police that it was being stolen and pursued it to Teddington Lock. More than l00 craft from the Upper Thames were assembled at the Ferry Road Yard of Tough Bros.

The idea of private captains rushing off to Dunkrik is a myth.

The Mrs. Miniver story of owners jumping into their Little Ships and rushing off to Dunkirk is a myth. Very few owners took their own vessels, apart from fishermen and one or two others. The whole Operation was very carefully co-ordinated and records exist of most of the Little Ships and other larger vessels that went to Dunkirk.

A quick sampling from the Association of Dunkirk Little Ships shows many ways the Little Ships were acquired, but it doesn't shed much light on how the requisitioning happened, but it does show that there were many other ways a boat could end up at Dunkirk.

It was already an RN boat.
It was "requisitioned" or "commandeered".
You volunteered your craft.
Who knows? It's only known that the boat was a Dunkirk.

Bluebird
Requisitioned.

Bluebird had three more owners before the war and, like others of her kind, was requisitioned by the Admiralty. She made two false starts in getting to Dunkirk. The first time she developed engine trouble. Then, when she got as far as Sheerness, there were too many volunteers and she was left behind.

Caresana
Already an RN boat, Royal Navy lifeboat.

No lifeboat-style log was kept to record her service at Dunkirk. But we know that, on 1st June, found damaged and drifting off Margate with her four naval ratings aboard, she was herself rescued and towed back to the English coast by Margate lifeboat.

Count Dracula
Volunteered.

She was a private yacht until her owner, Carl Greiner, sent his son Alan to take her to Ramsgate, where Cmdr. Brookes took charge. He had already spent two days and a night at the beaches and his previous ship was sunk under him.
He was delighted at the speed and power of Count Dracula and he took two 35ft lifeboats in tow. They were loaded to the gunwales with troops and Count Dracula lifted 702 British as well as 10 Belgian soldiers. She ended up quite well armed, having collected, with her troops, three Brens and one French Hotchkiss machine gun, which enabled them to have a shot or two at the Stuka dive bombers.

Elizabeth Green
Unknown.

Elizabeth Green was one of the first of the privately owned rescue ships to help in the evacuation of Dunkirk and on her second trip she was one of the last to leave. Her role is exceptionally well documented. Not many of the skippers - especially the young naval crews hastily detailed to command these unfamiliar and unarmed civilian vessels, kept a detailed log. But Sub-Lieutenant E. T. Garside, RNVR, compiled an hour-by-hour account of his first nine days of active service. Not that he was ever likely to forget it.

Glala
Already an RN boat, requisitioned before Dunkirk.

The Admiralty requisitioned Glala in October 1939 and she became a
  Harbour Defence Patrol Yacht stationed at Sheerness on the Thames
  estuary. A photograph taken in 1940 shows a machine gun on the
  foredeck and depth charges on the stern. She appears in the naval
  records of Saturday, 13 January 1940, "Sloop BITTERN found a German
  mine which she towed towards Sheerness. It was secured to the Nord
  Buoy and harbour defence patrol yacht GLALA (51grt) beached the mine
  from there."
Like so many other vessels her moment came during Operation Dynamo.
  Commanded by Sub-Lieutenant John Alexander Dow, RNVR, she set out for
  Dunkirk at 0800 on 31st May 1940 in company with the yachts Amulree
  and Caleta.

Lady Lou
Already an RN boat. Commandeered in 1939.

In 1939 the Rampart Boat Building Company of Southampton (then Rampart Boatbuilding Works) had 9 of its ships commandeered for war service. It is believed that a Rampart was the last to leave Dunkirk; several remained there permanently.

Monarch
Unknown.

Her present owner who needed a sound hull on which to build a living boat then bought her as a semi-derelict. The hull was ferro-creted and the cabins added. It was not until this work had been completed that it was found that 'Monarch' had been part of 'Operation Dynamo'.

Rania
Already an RN boat. Requisitioned in 1939.

In 1939 Zelia was collected from Rampart Boat Building Works not by her intended owner, but by the Royal Navy who had need of her on H.M. service and re-named her Rania.

The King
Commandeered.

On 28th May 1940, The King was one of the 540 privately-owned vessels commandeered for the evacuation of the British Expeditionary Force from the beaches of Dunkirk. Her elegant shape and low freeboard were ill-suited to the open sea and even the wash from a destroyer would have swamped her, especially when she was fully laden with troops. But it was one of the miracles of Dunkirk that the sea was calm and she returned without mishap.
Comment: @PurplePilot They also needed money for fuel and provisions for the journey etc. It is important to remember that the boats were not needed to bring soldiers home. Because the harbours were blocked the troop ships had to lie offshore. The small boats were needed to get the soldiers off the beaches and to the ships. Though a number inevitably came home in the small boats.
Comment: As well as the myth of the boat owners going to Dunkirk is the ones that did demanded money to make the trip instead of just patriotically offering their  services to the nation. In fact those that did go were temporarily seconded to the (i think Merchant Marine) or at least a service that was under the control of the Navy and therefore drew basic seamans pay for the duration of service.
Answer: This may be slightly too remote from the original question, but I think if you are interested in that you will see the relevance of the following for the general context around requisitioning.
A major constitutional case developed after WW1 around the requisitioning of a hotel in London and the case went to the House of Lords. As part of the background, the lawyers studied the whole history of requisitioning by the government (often 'the Crown') right back to medieval times.
Much of that legal history was connected with the requisitioning of ships.
An entire book-length study of the case contains some of the evidence, and you can access that from the Internet Archive from here:
de Keyser case.
For a more general study of requisitioning during WW1, which also has a chapter on the requisitioning of ships, take a look at
Private Property, Government Requisition and Private Property 1914-1927 by G. R. Rubin. (You might get a cheaper copy on Amazon!).
The principles established in and after WW1 were adopted more or less wholesale for WW2, as far as I have been able to determine.
I hope this is of some interest and apologies if it is perceived to be off-topic.
Comment: Plus one just for the de Keyser case - the Introduction is an enlightening read just on its own.


Does nmkr.io provide public api?

Question: Does nmkr.io provide free usable cardano apis for NFTS or do we have to mint the nfts and build a project on their platform something like that ...and then we can use their api because in their apis it (projectuid, nftuid)?
Comment: Can you elaborate on your question about what the API should do? What actions are you looking to execute and what data are you looking for?
Comment: basically I want to fetch the "sold price" and "timestamp" of that txn if a user sells his nft
Answer: You have to register on their site, then create a project. If you have an existing nft project, you'll need the policy keys and a wallet. The items labeled as projectuid and nftuid are custom IDs you get from nmkr.io. So while you don't need to mint with them, you need to do all these setup steps before using their API. At least, I'm assuming you're looking at <code>/v2/UpdateMetadata/{projectuid}/{nftuid}</code> since those are the two params you mentioned.
Answer: To figure out if an NFT has been transferred to another wallet, you have to check the transactions the NFT was involved in. You can get that information from the blockchain using for example the koios API.
You can get all transactions (with timestamp) using: https://api.koios.rest/#get-/asset_txs
If you need more information, e.g. the addresses involved, you can get this information from another API endpoint:
https://api.koios.rest/#post-/tx_utxos
There are also other options like Blockfrost or DB sync.

Does nmkr.io provide public api?


Propositional Logic Reduction Operator

Question: So, I'm working with Knowledge Based Agents in an AI class, and we're deriving a proposition given a logic base in CNF. I've derived $\neg G$ using proof by resolution in the following partial chain:
$$G \rightarrow (\neg A \vee F \vee \neg G) \wedge (\neg B \vee F \vee \neg G) \rightarrow \cdots$$
Given $G$, $(\neg A \vee F \vee \neg G) \wedge (\neg B \vee F \vee \neg G)$ reduces to $(\neg A \vee F) \wedge (\neg B \vee F)$ which simplifies to $(\neg A \wedge \neg B) \vee F$. Is there a logic symbol to show a reduction, or should I just keep it in English?
Comment: Is F a variable, or a truth-value representing "false"? I immediately took it to denote a contradictory statement, but please clarify it you meant for $F$ to be a variable.
Comment: F is just a variable, I apologize for the confusion.
Answer: Some people use the $\LaTeX$ symbol <code>\rightsquigarrow</code> "$\large\rightsquigarrow$" for some kind of reduction. There is probably no universal convention, so you should define whatever notation you use.

Propositional Logic Reduction Operator


Migration from SQL SERVER 2008 R2 to 2019 with Log Shipping

Question: Is possible to run swing migration from SQL SERVER 2008 R2 to 2019 with Log Shipping?
Answer: Yes, It's possible.
You can migrate databases from older versions like SQL Server 2008 R2 to SQL Server 2019.
Check answer from here. Migrate to SQL Server 2019

Log shipping: Log shipping is supported if primary is running SQL
Server 2008 SP3 or later, or SQL Server 2008 R2 SP2 or later, and
secondary is running SQL Server 2019.
Warning:  If an automatic or manual failover happens and the SQL
Server 2019 instance becomes primary, SQL Server 2008 or SQL Server
2008 R2 instance becomes secondary and cannot receive changes from
primary.


Create same effect in Illustrator as Carhartt image below

Question: I've tried using the roughen tool in illustrator but not really getting the results I'm looking for. Any advice would be much appreciated.
Comment: Hi. Welcome to GDSE. Can you show an example of what you have tried to demonstrate why roughen isn't achieving the effect you want?  Thanks.
Answer: As asked above, I can't answer why the effect isn't working for you without examples of what you have tried.
However, while looking for something else today, I did find this font that looks just like the effect you are trying to replicate.  If you register with Creative Market, it is one of the free items for this week.
Calderock

the blurry effect on the edge however is from the rasterizing of the text.  You might be able to accomplish that with a feathering effect.
Answer: After some trying, I reached this result.
I used:

Roughen
Gaussian Blur
Rasterize
Stamp

See the image below for the reference values I used.


Is level 80 the max level?

Question: In Call of Duty Modern Warfare 3, I see people with level 80. I never see anyone passed 80, so is 80 the highest rank that you can obtain?
Answer: The highest rank you can achieve in Modern Warfare 3 is 80, before prestige. When you reach level 80, you can still gain exp to continue "levelling up", but instead of reaching level 81, you are given the choice to enter Prestige Mode.

When you reach max level, you unlock something known as "Prestige Mode." You have the choice of entering prestige mode and resetting your rank back to 1 and removing all Create-A-Class unlocks and Challenges. A special Prestige Emblem will take the place of your rank emblem, promoting you up a prestige, but lowering you down all levels. You can do this up to ten times for ten prestiges.

Here is a list of all the unlocks and level requirements for levelling up in COD: MW3
Comment: On lower levels you do get much less exp than on higher levels. It's to try and balance the levelling out a bit so the transition doesn't seem so radical.
Comment: That is to say it still requires some effort to level up on lower levels than on higher levels. If it was the same you would probably level up 5 times from one kill.
Comment: Wow! I noticed that after I entered prestige mode, I gain less match bonus points than before. Is this an effect of going into prestige mode?
Answer: Yes, Level 80 is the maximum level in multi player for this game. You can further rank up by starting prestige mode, where you level everything again for the sake of an upgraded icon.

Is level 80 the max level?


Getting data from SAP into salesforce

Question: I need to get the data from SAP and put it into salesforce. However, the access would be limited in the sense that the changes in salesforce will not be reflected in SAP but the changes in SAP will update the data in salesforce.
Can you give me a list of options/methods to implement this in salesforce? Is there any way to for salesforce to pull data from SAP only? (SAP will not PUSH data)
Answer: There are several third party solutions which offer a bi-directional sync between Salesforce and SAP. Some of these are

Mulesoft Anypoint Exchange
AppsConnect

As stated, these do a bi-directional sync - pull data from Salesforce and push into SAP as well as pull data from SAP and push into Salesforce. There's some flexibility to configure and define the data that you want to push/ pull each way.
Comment: does this still need http callouts?
Comment: yes it would. Even Costly Lightning connect is also a callout.
Answer: If you want to develop your own solution, follow the steps below:

Expose the api from the SAP system which will fetch data from the sap after receiving the request from client.
The client here will the salesforce which will request for the data to be fetched from the sap with the flag field which will help to search for the records which are updated in sap and not all the records.
So this requests will happen as per your frequency using the schedular class in sfdc and adding the asynchronous context to it(for making the callout).
After receiving the data parse the respone and add it list then Upsert the list.

Let me know if some more pointers are needed.
Comment: @gelay let me know you need more info..
Answer: There are couple of options that you have:

Use any Cloud ETL tool as mentioned above by Gaurav Kheterpal. Most of these tools charge you per connection.
Since it is single direction, you can put the data in a CSV in a sftp or ftp, and you can use any data loader (like Jitterbit ) to push that data into SFDC.  If you do not have any transformation in between, Couple of these tools can be free.
Use a free tool like Talend Open Studio, It's a free enterprise quality tool (most part of it is free). It's a on prem tool, so you may have to consider your IT strategy before you choose any on prem tool (as you may already know :-) ).

I have a quick question for you (food for thought), what is going to be your trigger point to initiate the integration.

Getting data from SAP into salesforce