What do people use to hold an object in place while being worked on?

Question: I would like to know what people usually do when trying to solder wires together, and hold small things in place while you fasten them together, etc.  I can picture one or more vices attached to a swivel such that I can hold something in place at any orientation, perhaps with an array of alligator clips attached to stiff wires to hold things in place.  Does anything like this exist?  And if not, what do people usually do to hold two things together while busying your hands with wielding a tool?  (considering us poor humans have but two hands.)
Answer: There are a few zillion devices available that are just as you describe.
This is commonly known as a 3rd hand tool

(source: micromark.com)
They say

Triple Grip Third Hand Keeps Your Hands Free.  Used by jewelers, model builders, miniaturists, electronic hobbyists. Keeps your hands free for soldering, gluing, positioning, while work is held firmly at any angle required. Has 3 alligator-type spring clamps mounted in ball joints for flexibility. Nickel plated steel with heavy iron base for no-tip stability.

In my experience, such tools are less useful than they appear they may be. They have their place, but experience usually leads to  more normal tools being as easy or easier to use.
"Quite a few" more examples can be seen here - click images to see related web page
When soldering wires that are not mechanically connected or stabilised I may lie one on the work surface and place something suitably weighty on it to keep it in position. As I hold the soldering iron in my right hand (usually) having the  weighted down wire entering from the right usually is best, and I hold the other wire in my left hand or also lay it on the work surface - see below.
This still ideally requires 3 arms for iron , 2nd wire and solder. Often I tin the 1st wire and then add copious extra solder in a mini-blob.  The 2nd wires is then "offered up" and the excess solder used to complete the joint.
Where necessary I will also lay the 2nd wire on the work surface, wieght it as well and slide it against the first wire. Now only two arms are needed ! :-). This is easier to do that to describe.
In many cases, making some sort of mechanical join between two wires before soldering is advisable. Using solder alone is frowned on in some circles. Solder is not known for its superb mechanical properties but will in fact usually make an adequately mechanically strong join.
Be aware that a join that relies on mechanical strength WILL break if subject to enough vibration cycles.
Unlike ferrous metals, which have a lower limit below which they are not susceptible to vibration, non-ferrous metals are subject to creep failure regardless of vibration strength. Enough vibration cycles will break a solder join, no matter how low the amplitude - it just takes more cycles as magnitude decreases.
Related only: When inserting multistrand wires in a screw down connector never tin the whole exposed wire end - if done the solder will creep with time and the connector will release the wire. At most, the extreme wire bundle tip may be tinned to keep the strands together. Note that this is a legal requirement for mains wiring in any administration that has its act together.
.
Comment: Endolith - Please
1. Read the text
Viz:

In my experience, such tools are less useful than they appear they may be. They have their place, but experience usually leads to more normal tools being as easy or easier to use.

2. Give me my vote back :-)
Comment: I had one of those in the picture and it was terrible.  It's a hassle to reposition, it won't hold its position, the alligator clips aren't good at grabbing things, they bend and break, etc.  Nothing personal, but -1.
Comment: Wow, what a wealth of useful information.  Thanks for all the tips, and especially giving me the vocabulary to try out some of these tools.
Comment: Also see this answer on a high reliability but expensive way to join wires together. http://electronics.stackexchange.com/questions/11237/is-there-a-crimp-tool-or-something-for-when-youre-soldering-leads-to-leads/11271#11271
Comment: I have the exact same model pictured, except the middle grip is a magnifying glass.  Very useful - I couldn't live without it.
Answer: One useful trick is to cut off a foot of solder wire and wrap it around your index finger, with one end sticking out from the point of your finger.  Then you can hold the soldering iron with thumb, middle, and ring fingers and use your index finger to poke solder at the iron tip at will.  Alternately you can put the coil down with a point sticking up, like a cobra.  You still have to use a "third hand" (clamp) to hold one wire but your left hand is completely free to hold the other wire.
Comment: Thanks @Matt, this sounds like a clever technique.  Will have to give it a try.
Comment: This sounds like a good way to burn your index finger as the solder gets shorter.  Nonetheless, I will probably try this next time my vise is full...
Comment: Solder (especially lead/tin) is a pretty poor conductor of heat.  You should not feel it until the end is consumed to about 10mm (1/2") from your finger.
Comment: You can also use one of the solder dispensers with a guide tube.  Weller and RScomponents have sold such in the past. ----  http://www.ebay.com/itm/SD1000-WELLER-DISPENSER-SOLDER-REEL-HOLDER-/271772858868?hash=item3f46ecb9f4:g:zboAAOSwiCRUcj1B
Answer: These look intriguing as an upgrade for the crappy "third hands" you see everywhere:

I haven't tried it myself, though.
I generally use a small vice or just slide things around against the junk on my bench until they stop moving.
Comment: @endolith Nope, I mean that tubing that you can bend and it holds its shape when you left go. Apparrently it's called 'gooseneck'.
Comment: Those actually look pretty slick.  Reminds me of my gorillapod tripod for my camera.
Comment: YES! Now that looks promising! I've been thinking about getting hold of and try to convert a three hand short camera holder with similar arms, but this is much better.
Comment: I've been looking for something like this - though preferably with the fine metal flexible stuff rather than these slightly clumsy looking plastic ones - and I'm seriously puzzled why the standard 'third hand' tool is so unflexible.
Comment: @Nick: "[Fine meta flexible stuff](http://en.wikipedia.org/wiki/Wire)"?
Comment: Lots out there, eBay has one with a magnetic base and those without in sets of 1, 5 and 12  ---- http://www.ebay.com/itm/1-2-Adjustable-Flexible-Water-Oil-Coolant-Pipe-Hose-12inch-with-Magnetic-base-/281655992231 ----  http://www.ebay.com/itm/5X-Plastic-Round-Nozzle-Pt-Thread-Flexible-Oil-Coolant-Pipe-for-lathe-CNC-/181818000797?hash=item2a5532859d
Answer: The most useful tool I have in my arsenal is a pair of medical forceps.

They are not only invaluable for gripping and holding with, but fantastic for getting into tight spaces or routing wires through tight gaps.
Note that these latch closed to hold things in place.
Comment: Agreed these are superb tools.  I have half a dozen of them.  I feel like the medical profession has been hiding these from the rest of us all these years. :)
Answer: A pair of angled needle nose pliers with a rubber band wrapped around the handle does very well.
Comment: I see this is flaggd as a "low quality post". Can somebody explain why and how this happens. The answer is brief but seems like a good idea.
Comment: The poor man's medical latching forceps, I have used it when no forceps were available, very practical.
Answer: A lump of Blu-Tak can often make a useful & flexible hold-down
Comment: Here's a Wikipedia link: http://en.wikipedia.org/wiki/Blu-Tack I've always known it as poster putty.
Comment: And you expect me to know what you're talking about? A link, maybe?
Answer: There are PanaVise tools both at my university's labs and at my job.  For my home workbench, I got the low-profile head (304) and low-profile base (305).  It looks something like this:

They're mounted on a 3/4" thick tray holder in that picture, but I've got a piece of 1/4" plate steel.  I can rest my wrists on the bench, and solder to a PCB or wires held in the jaws just a few inches above the workbench, giving me very steady hands.
I use the nylon (insulated) jaws with a groove (to hold PCBs), but I'll warn you: when you're under the microscope, and the shaft of your soldering iron starts melting the plastic outside of the viewing window, there's a 3-4 second delay before the stench of burning plastic reaches your nose.  A razor or Xacto knife will clean it up.
PanaVise is a popular manufacturer right now (2011), but there are and probably always will be other small, tilt/turn vises available.  I feel that the sturdiness of a vise is of great utility when trying to do any work like this; those third hand tools can't hold any weight or pressure.  The tug of the wire would pull them over.  When tinning wires, you can insert a long row of them, instead of working one-at-a-time with the other tools mentioned.
Answer: Children - they can also react to guidance and move a wire closer:-)
Both my eldest kids are keen electronics enthusiasts so help out.
Answer: I've been using a heatsink lately.  Just slip whatever I need to hold into the grooves and I'm good to go usually.
Answer: Gravity.
Occasionally, if I'm lap-soldering wires connected to something that tries to pull them off my workbench (or a big multi-conductor wire where the connected wires pull the other about), I'll weigh one of the the wires down with a pair of wirecutters or similar tool.
I rarely, if ever use any kind of 3rd hand tool, and find them pretty much completely unnecessary. Generally, you should not really need to hold three things at once.
If you are trying to hold two wires against each other while tinning them, you are doing it wrong. Tin each wire end first, then simply hold one against the other, and heat the joint. This only requires two hands - one holding one wire end, the other the soldering iron.
Answer: Dremel makes a very handy hobby vise that is quite usable for electronics.  It even has soft jaws so you don't mar whatever you're holding, and notches that are useful for circuit boards.
I only use the alligator-clip vises for connectors--everything else is too unwieldy.


Have sequential Stern Gerlach experiments been actually conducted or are they purely thought experiments?

Question: Sequential Stern Gerlach experiments are treated in papers or books as mathematical exercises involving matrices, but I have not actually found papers or books which report experiments confirming these mathematical predictions of sequential Stern Gerlach experiments. I will be interested to know whether people have done experiments to verify these mathematical prediction. If not, how can we trust these mathematical predictions? Or are these sequential Stern Gerlach experiments normally treated as thought experiments only?
Comment: Although not a demonstration of sequential measurements, Porter, J., R. F. Pettifer, and D. R. Leadley. "Direct demonstration of the transverse Stern–Gerlach effect." American Journal of Physics 71.11 (2003): 1103-1108 goes in quite a lot of details.  The authors made an experimental map of the spatial magnetic field and have compared quite extensively theory and experiment.  You can appreciate that the physical size of the apparatus would make sequential measurements difficult to perform.  Sequential measurements of polarization have been done: same math as spin but not the same altogether.
Comment: @Mark Mitchison - The only answer given in the duplicate question was obviously deemed unsatisfactory by the questioner.
Answer: The experiment using a vapor beam of silver atoms has been performed and published in 1922 in the Zeitschrift für Physik by O. Stern and W. Gerlach, Zeitschrift f. Physik 9, 349, 1922.
Note: Several multi-stage Stern- Gerlach experiments have been performed starting in 1932 and 1933 following the suggestions of Einstein and of Heisenberg. See references in the recent Stern Gerlach experiments review.
PS: This question reflects a deplorable situation in much of contemporary physics courses. Original experiments are frequently not taught any longer and physics is in large part only described theoretically.
Comment: The OP is asking about *sequential* SG experiments.
Comment: I'm so tempted to decry the deplorable situation in reading comprehension classes these days :P :)
Comment: Yes, the paper mentioned by Freecharly (not Mark Mitchison) gives a history of various experiments. I had in fact came across that paper a few days ago but it is more a history paper. It does point to some old German papers on multi-stage experiments. Still, those experiments appear unclear to me. I have a particular question in mind but I do not think they address that question.
Comment: @MarkMitchison- This is a valid point! I overlooked the "sequential".
Comment: @MarkMitchison - I have added a link to a recent paper describing the multi stage Stern Gerlach experiments in published in 1932 and 1933.
Comment: @MarkMitchison - If your  German language comprehension score is sufficient, you can read the pertinent papers in German by Phipps & Stern and by Frisch & Segre   P :).
Comment: Thank you for all your responses. Yes, the previous answers to a similar question did not provide satisfactory solution. Mark Mitchison mentioned a link to a paper. Please let me know where the link is as I could not find it. Thanks.


Can HomePod be controlled using anything other than Siri?

Question: Siri seems to be targeted as the primary method to interact with HomePod other than some rudimentary touch controls that it has. Are there any other ways to interact with it? I'm specifically hoping for some sort of remote control app for iOS. I don't have a particularly good track record with Siri playing the correct song when I ask her to on my iPhone, partly because my music collection contains stuff in many languages; so I prefer to choose the right track manually from a list. I'm aware of the option to AirPlay to it, but I'd prefer the functionality the iTunes Remote iOS app offers: remote-controlling the device through a graphical UI. Any chance for that on HomePod?
Comment: I'm curious, once you have the AirPlay output of your iPhone set to a HomePod, how is controlling it through iTunes or Spotify that much different from using the iTunes Remote app? What features do you imagine you'd be missing?
Comment: It drains my iPhone's battery, it sort of occupies my iPhone and prevents it from playing other sounds (maybe? I only have experience with Bluetooth speakers…), it stops the music when the iPhone is otherwise occupied and/or when I leave the house (but my family might want to continue listening)… it's all sorts of inconvenient vs. letting it play autonomously.
Answer:
I'm specifically hoping for some sort of remote control app for iOS.

The standard Music app can be put into a mode where it acts as a HomePod remote control: the user can queue individual tracks and playlists, and the HomePod will play them using its own connection to Apple Music and the iTunes Music Library.
It is a little tricky getting the Music app into that mode.
One way is to open the Control Center, then long-press or force-touch on the music control. This reveals separate control panels for your iOS device and any other controllable devices, including AppleTV and HomePod. Tapping the HomePod will open the Music app in HomePod-control mode.
Answer: The HomePod User Manual tells you everything you need to know.

Control HomePod
You and anyone in your home can control HomePod using Siri, or by
tapping the top of HomePod.

To control the HomePod, you have three options only:

the top of the device
Siri
Apple Music (limited to playback control)

You can use the HomePod as:

speaker phone (make/receive calls through Siri - Siri, call Mom)
stream music from iTunes via AirPlay
Listen to Podcasts, News
Use Siri's personal assistant feature (Siri, set an appointment for dentist)
Control your home (HomeKit)

The HomePod App is used to change the settings, not to control it.

HomePod settings
The person who set up HomePod can use the Home app on their iOS device
to change HomePod settings. There are settings you specify for each
individual HomePod you have, and settings that apply to all of the
HomePod devices in your home.
Comment: Thanks for pointing to that, the relevant section is actually under *Apple Music*: *"You can use the Apple Music app on your iOS device to control the sound volume, play what you want to hear, and add or remove songs from the Up Next queue. [..] After choosing HomePod in the Apple Music app, tap Library, For You, Browse, Radio, or Search to find music to play. You can choose to play an item next or add it to the end of the Up Next queue."* – Sounds like a remote control, not AirPlay.
Comment: I meant to put in parenthetical notation (*limited **to** playback control*).  You can't control HomePod through music app other than to play, pause, vol up/down, etc.  In other words, you can't tell the HomePod to "dim lights" or "call Mom" through the music app.
Answer: According to Apple's HomePod site, it can be controlled using Siri and the Home app.
For example, here's one of the sections on that page:

Just say "Hey Siri, turn on the lights" or "Hey Siri, make the room cooler." You can even ask Siri to set scenes, like "Good morning," that put multiple accessories to work — all at once. A wide range of accessories work with Apple's HomeKit platform. Just add an accessory to the Home app, then control it with your voice on HomePod.

Apple doesn't mention any other type of control other than the buttons on top of the unit, Siri, and the Home app.
Comment: That Home app reference is pretty vague. I kind of doubt it contains an entire UI for controlling music selection and playback. But who knows…
Comment: Correct, we won't know until it's released and the app is updated.
Comment: Doesn't look like the Home app will do it: https://daringfireball.net/2018/02/homepod (under *Miscellaneous*).
Answer: The latest iTunes update says:

iTunes is now designed to work with HomePod. Use the improved AirPlay menu to easily choose HomePod and control what plays next with your Apple Music subscription.
https://support.apple.com/kb/DL1814?viewlocale=en_US&locale=en_US

I did not have a chance to try this yet and haven't heard anybody talk about it, but this could be the answer.


Sqlyog: copy table from localhost to remote server without duplicate records

Question: Hi guys i want to copy record from table which is stored in localhost into remote server but when i tried to copy there is pop up like below:

If i checked Drop if exists in target it would delete all of data in table, but if unchecked it would duplicate several record,that's why i want to copy record from table in localhost into remote server without duplicate data or delete existing data, so just adding new data from localhost table and ignoring existing data. Is there any way to use such a feature like that in sqlyog ? if not how could i to do this task ?
Answer: You can copy your table first into a temporary table in your source database, copy that table to the target database, and merge the data there.
That is, in your source database:
CREATE TABLE emails_temp AS
SELECT
    *
FROM
    emails ;

... copy this table to the target database using the Copy Database functionality; and drop it from the original:
 DROP TABLE emails_temp ;

Once you have your temporal table at the destination, add the new data to the existing table, doing something like:
INSERT INTO emails
SELECT
    *
FROM
    emails_temp
WHERE
    primary_key NOT IN (SELECT primary_key FROM emails) ;

(Obviously, you have to substitute primary_key by your actual PRIMARY KEY).
Or you can use also INSERT IGNORE.
After you have transferred all the new rows, you can
DROP TABLE emails_temp ; -- At the destination database


How to enable transmission-daemon start at startup?

Question: I have transmission-daemon installed and running. I have to go and start it manually after each restart, though. I have been reading up on upstart and such, but still am not able to get transmission-daemon to start at boot time automatically. Can anyone help with this?
Comment: Raspbmc is based on Raspbian. By running `sudo apt-get install transmission-daemon`, a start script should be installed in `/etc/init.d/transmission-daemon`. Can you see it?
Answer: If everything is installed correctly, you should just type:
sudo update-rc.d transmission-daemon defaults

Comment: I have used this, however it starts but with some kind of problem since it shows the UI but an error pop up. I always have to restart the service for working.
Comment: same here... I'll update if I'll find a solution
Answer: Even if you have transmission installed, you still might not have transmission-daemon installed. So you might need to run
sudo apt-get install transmission-daemon

before running
sudo update-rc.d transmission-daemon defaults

Answer: I was looking for a solution to this myself, and finally found it elsewhere. The problem is not with raspbian, it's in the interaction between transmission ans systemd. The latter considers the network to be up, and tells transmission-daemon to start. Transmission cannot start the RPC listener for the web ui, because the network is not properly up yet, by its definition of "up".
Transmission 2.90 fixes this by retrying to create the RPC listener. Raspbian stretch now contains Transmission 2.92, and with that, everything just works, with no manual interaction required. So if you're still on jessie, consider upgrading (either your entire system, or just the transmission packages).


Linear regression with constrained coefficient

Question: I have to perform a linear regression of the form $y=ax_1+bx_2+c$
where $b=(1-a)$ and I have errors both on the dependent variable y and on the predictors $x_1, x_2$. I am not sure how to handle the constraint on the second coefficient and the errors on the dependent variable. Any idea?
Comment: Your constraint implies that you are regressing $y$ on a single variable $x_1 + x_2$ and forcing its coefficient to be $1$. That doesn't solve the problem of errors in predictors. Errors in the dependent variable are what you expect with regression.
Comment: You can constrain things with least squares by reparameterizing (let y* = y-x2 and x* = x1-x2. Fit y* = ax* + c and then let b = 1-a. However, that won't deal with your errors-in-variables. In some cases at least, though,  reparameterizing might work there as well.
Comment: Ok, thanks. But I am not sure how should I force the coefficient of (x1+x2) to be 1.. Can I do that with a least square fitting?
Answer: General constrained OLS problem
Recall that the OLS problem, subject to linear constraints can be written as
$$
\begin{align}
\arg\min_{\boldsymbol{\beta}}\boldsymbol{Y}'\boldsymbol{Y} - \boldsymbol{Y}'\mathbf{X}\boldsymbol{\beta} - \boldsymbol{\beta}'\mathbf{X}'\boldsymbol{Y} + \boldsymbol{\beta}'\mathbf{X}'\mathbf{X}\boldsymbol{\beta}
\end{align}\\
\text{subject to  }\quad \mathbf{a}\boldsymbol{\beta} = \boldsymbol{c}
$$
where in the general case, $\mathbf{a}$ is a matrix, and $\boldsymbol{c}$ is a vector.
Since the first term does not depend on $\boldsymbol{\beta}$, that we can scale by a constant without changing the solution, and that a scalar is its own transpose, we get
$$
\begin{align}
\arg\min_{\boldsymbol{\beta}} - \boldsymbol{Y}'\mathbf{X}\boldsymbol{\beta} +\tfrac{1}{2} \boldsymbol{\beta}'\mathbf{X}'\mathbf{X}\boldsymbol{\beta}
\end{align}\\
\text{subject to  }\quad \mathbf{a}\boldsymbol{\beta} = \boldsymbol{c}
$$
Note: I do this so that it maps neatly into the way R solves constrained quadratic programming problems.
Specific case
In your case of three coefficients including the intercept and one constraint,
$$
\begin{align}
\mathbf{a} &= [0, 1, 1] \\
\boldsymbol{c} &= 1 \\
\text{so that}\\
\mathbf{a}\boldsymbol{\beta} &= \boldsymbol{c}\\
\implies \beta_2 + \beta_3 &= 1
\end{align}
$$
R
This is then a standard quadratic programming problem with a quadratic (in $\boldsymbol{\beta}$) objective function and linear constraints. You can easily solve this using any of the QP packages in R.
Here is an example:
library(quadprog)

# generate some data
mX = cbind(1, matrix(rnorm(100*2), nrow = 100, ncol = 2))
vBeta = c(3, 0.81, 0.19)  # note that the 2nd and 3rd elements add to one
vY = mX %*% vBeta + rnorm(100)

# solve the quadratic program
qpStackExchange = solve.QP(Dmat = t(mX)%*% mX,  # X'X
         dvec = t(vY) %*% mX,  # Y'X
         Amat = matrix(c(0, 1, 1), ncol = 1, nrow = 3),  # matrix a
         bvec = 1,  # vector c
         meq = 1)  # equality imposed, rather than inequality

qpStackExchange$solution # estimates constrained coefficients
   qpStackExchange$unconstrained.solution # estimates constrained coefficients

Answer: This problem can be formulated as a standard errors-in-variables problem.
Write:
\begin{equation}
    y - x_2 = a(x_1-x_2) + c
\end{equation}
now call $z = y-x_2$ and $w = x_1 -x_2$. Then you have the following problem
\begin{equation}
    z = aw + c
\end{equation}
Be careful, Error have changed and are now correlated.
If $\eta_k $ is the error of $x_k$ and $\varepsilon$ is the error for y. Now you have new errors $\phi=\varepsilon -\eta_2$ for $z$ and $\zeta= \eta_1 -\eta_2$ for w.
\begin{align*}
\mathrm{Var}[ \phi] & = \mathrm{Var}[\varepsilon]+\mathrm{Var}[\eta_2] -2\mathrm{Cov}[\varepsilon,\eta_2] \\
\mathrm{Var}[ \zeta] & = \mathrm{Var}[\eta_1]+\mathrm{Var}[\eta_2] -2\mathrm{Cov}[\eta_1,\eta_2] \\
\mathrm{Cov}[\phi,\zeta] & = \mathrm{Cov}[\varepsilon -\eta_2,\eta_1 -\eta_2] \\
                         & = \mathrm{Cov}[\varepsilon,\eta_1] - \mathrm{Cov}[\varepsilon,\eta_2] -\mathrm{Cov}[\eta_2,\eta_1]+ \mathrm{Var}[\eta_2]
\end{align*}
If all errors are uncorrelated  this is:
\begin{align*}
\mathrm{Var}[ \phi] & = \mathrm{Var}[\varepsilon]+\mathrm{Var}[\eta_2]  \\
\mathrm{Var}[ \zeta] & = \mathrm{Var}[\eta_1]+\mathrm{Var}[\eta_2] \\
\mathrm{Cov}[\phi,\zeta] & = \mathrm{Var}[\eta_2]
\end{align*}
In both cases this problem has a a closed form solution. You can find it Fuller Measurment Error Models (http://www.amazon.com/Measurement-Error-Models-Probability-Statistics/dp/0470095717). I belive it's explained in the introduction chapter.
Answer: This is an old question, but it may help you.
You can use ConsReg package.
See the example below:
Imagine you want the following constraints in your parameters:

All coefficients will be less than 1 and greater than -1
$x_4 < 0.2$
The coefficient of $x_3$ and $x_3^2$ must satisfied: $(x_3 + x_3^2 > 0.01$)

Your can put this constraints to the the function in a easy way:
constraints = '(x3 + `I(x3^2)`) > .01, x4 < .2'

LOWER = -1, UPPER = 1

And finally, set initial parameters that have to fulfill the constraints above:
ini.pars.coef = c(-.4, .12, -.004, 0.1, 0.1, .15)

Complete example:
require(ConsReg)
data("fake_data")
fit2 = ConsReg(formula = y~x1+x2+x3+ I(x3^2) + x4, data = fake_data,
            family = 'gaussian',
            constraints = '(x3 + `I(x3^2)`) > .01, x4 < .2',
            optimizer = 'mcmc',
            LOWER = -1, UPPER = 1,
            ini.pars.coef = c(-.4, .12, -.004, 0.1, 0.1, .15))

Comment: Can you expand on what this code is doing and how it works?


Access Token or User Id

Question: After logged in to application, why one should use "access token" instead of simply using "user name", to call further APIs ? How it is more secured with access token ?
Answer: Let's say you are logged in to application A, and you want to call an API of application B.
Application B, in general, doesn't know which users are logged in.
If that API was called using user_name, one could generate a request pretending to be another user, without proving to be logged in to application A.
The access token solves this issue.
Moreover, access tokens can expire, which mean that even authorized users can only access that API, say, from 9 to 17. Schemes that only use user_name are not that flexible.

Access Token or User Id


Are my cat and kitten fighting or playing?

Question: I have a new 7 week old kitten and a 1 year old cat. My cat has come to the point where she will clean my kitten (when he lets her) and plays with him. My kitten has not been neutered yet. When they play their tails are either up or aligned with their body (straight) and their ears are generally faced forward. They don't actively seek each other out but they also don't play or attack every time they see each other.  Sometimes they seem to play too rough and one of them squeaks or meows or hisses, but this doesn't happen often. How do I tell if they are fighting or playing? I don't want to discourage them from playing if I view it as fighting.
Answer: It's playing. You'll know when it's not. It's completely different. Ears will be back, eyes wide open, loud screaming noises, chunks of fur left behind (or stuck in their claws or mouth).
Especially if they groom each other at other times, they aren't enemies. If they didn't like each other, they definitely wouldn't be doing that, or even get within a foot of each other. And with one being so young, I don't think they would even be like that to each other yet.
Answer: Actually they're doing both!
A kitten will learn from an older cat like we all do in any species. Skills like being able to defend itself, hunt, kill a prey, social order and so on....
These play times build the foundation for your cat's adult health.
If they are grooming each other then all is well. However, at one point your kitten will come to an adult age and will want to mate with your older cat.
This could cause serious problems. Neutering is the best way.  Be aware that hormones for reproduction stay in your neutered cat for a while.
Believe me, when cats fight for real, you'll know! It doesn't last long!


Bitlbee and ZNC: is it possible to keep query history on all clients

Question: I have installed bitlbee to emulate all my contacts from various instant messaging services as IRC contacts. In order to keep history, and allow them to message me when I'm not connected to IRC, I also installed ZNC (an IRC bouncer).
However, while ZNC seems to work well for IRC channels (I properly get the previous messages when I connect with any IRC client), it doesn't really work for queries (direct chat with someone, i.e. not in a channel). But with my setup, I actually only have queries (excepted bitlbee control channel which I don't really care about).
I've tried disabling ZNC Auto Clear Query Buffer option, but it doesn't work well either, because IRC clients think they receive new messages (and bip and vibrate) each time I connect to ZNC. Also, they will reopen all query windows even for old conversations. And finally, some clients remember history for previously open query windows, so they append the same discussion again.
Is it possible to make bitlbee create a channel for each of my contacts so that ZNC would provide proper history? Or any other idea to get it to work?
I'm also open to alternative solutions to achieve the same goal (unifying multiple instant messaging services with a unique always-connected server, to which I can ponctually connect with a unique client and have history of all conversations ; I would ideally need the client(s) to be available on Windows, Linux and Android).
Answer:
Is it possible to make bitlbee create a channel for each of my
  contacts so that ZNC would provide proper history? Or any other idea
  to get it to work?

That would work. You could put the contacts you care about in individual groups. Then do channel <id> set fill_by group. Keep in mind, bitlbee remembers which method you use (/msg vs /query) on a per-contact basis.
Comment: Thanks for the answer ; however I can't test that right now because I'm migrating my server and bitlbee is far on the list of stuff to re-install. But I'll try to keep that in mind when/if the time comes :)


Alt+M to merge vertices is not working anymore

Question: I'm trying to merge vertices using the Alt+M keyboard shortcut, but instead I get an option to split. I never saw this menu before
Please help.
Comment: If you can't find the keyboard shortcut for something, you can access the search menu with f3, type in the name of the function, and it'll give you the keyboard shortcut.
Answer: The new shortcut to merge is M.
No Alt is needed no more.
You can use the right mouse button to bring up the Context Menu, and the shortcuts should be visible there.
Comment: Thank you! OMG, I've been using 2.8 for a while I guess this is the first time I used the merge vertex function.  Thanks a lot.
Answer: No need to use Alt before M.
Simply go to 3D view window. Press hotkey M and select your merge choice.
Here's something new about Merge: If you ever want to remove doubles before rendering, it is now hotkey M > Merge > By Distance.
Answer: You can also just press F between 2 selected vertices. It will automatically fill a line. Once they are connected by a line, select 3 or more vertices and press F once again to fill it.


Is there a difference between spirits and souls?

Question: I was thinking up a unique religion, and the religion was going to touch on humans being able to return to the here and now, at first they had a soul, but I found when I wrote about them coming back to talk to a loved one, I referred to them as a spirit. Is there a particular context, or environment that better suits one more than the other, or are they even all that different?
Comment: This doesn't sound like a worldbuilding question. It's rather about sematic.
Comment: @L.Dutch-ReinstateMonica Are semantics not an extremely import part of world building? I am writing a book, and I was worried that if I referred to the soul it be to Christian'y, I wanted another persons opinion. My book is my own world that I visit everyday. Besides I see a lot of philisophy and science questions on here, that your not nagging at, and they are way more off topic.
Comment: *"Is there a particular context, or environment that better suits one more than the other:"* The words are not interchangeable. For example, the Holy Spirit is never the Holy Soul. Can you think of a context in which the two words are interchangeable? If you cannot, then why ask the question?
Comment: @W3Dojo its opinion based because the difference is entirely up to you as the author, they don't exist or have rigorous definitions in the real world, so their definition is up to you, as is any question about them.  you question is basically "is Magic A different than Magic B," without telling us what either is.  Any answer is literally opinion.
Answer: Words, especially those which define entities which science has not yet categorized, are open to a wide range of interpretations.  Just look at what the last twenty years of pop-fiction has done to Stoker's vampire.
So the real answer here is that these words mean whatever you choose to make them mean for your religion.
For your purpose, I would suggest that "soul" and "spirit" are related to each other in the same way as "body" and "corpse".   The former describes the entity while it is being used by a living consciousness and the later, that same entity after death.
In this way, the sentence...
My soul was released during my death, becoming a spirit, free to roam though time and space without fetters.
...works.  Similarly...
The evil spirit poured itself into the coma patient, bound itself to that body's life force and thus became his new soul.  From that stolen helm, the evil soul was able to bring his diabolical machinations back to the living world.
Answer: In common tounge we interchange mostly spirit ghost as opposed to soul and spirit. Religion likes soul more then spirit. Witchcraft likes spirit over soul. Meidiumship likes spirt over soul. And everyone shifts between ghost and spirit taking this more as the departed lexicon then that for the living.
We do already link demon and spirt together rather then demon and soul unless we speak of the person's own soul is a demon. Yet fairies, ghost, and spirit are also linked as well.
According to breif etymology:
Soul - is defined as a substantial entity believed to be in every person which lives, feels, thinks and wills. based off the Old Enligsh Sawol which to them meant the spiritual & emotional part of a person, inanimate  or living being and it moves on from there.
Spirit - is the animating or vital principle in both man and animals, based on latin spiritus meaning more or less breathing of the gods. We get breathe of life from this concept.
Ghost - Is a supernatural immaterial creature, angel, demon, an apparition, a invisible corporeal being of airy nature. Stemming from only the mid to late 14th century.
There was a belief that light and sun where sperate things at one point.
To modern layman it's all the same soul, spirit, ghost it's incorporeal, you may or may not be able to interact with it (normally via mediums or your own senses), and it's considered airy or not wholly there (by non mediums) so as you can see it's linked up in our modern lexicon as similar enough.
You can make a religion if you wish that defines spirt and soul as separate. To them soul is housed in the body while spirit is free of fleshly confinement in human death or never had a body but was of a different composure we perceive as a similar to human spirit possibly helpful, possibly dangerous. Which if you differ to religion or witchcraft seems to be their take on it separate definitions for the state if it body house in life or not and devoid of it or outside of it all together like the laymen concept of demons are.
One thing to note witchcraft has the ethereal body/astral body still tied to the body of the living yet can become the new you should you wish for a time. Yet no one could confuse ethereal body for spirt, ghost, or soul language use wise.
Comment: "In common tongue we..." that's true only for some people. I know people who will tell you flat out that you're wrong, then give you a very different interpretation as if it were the only true one. And they generally don't agree on the interpretation, even though they all come from the same background and tightly connected religions. It's slippery :)
Comment: Mio, you know a lot about this!
Comment: Your reasoning is based on Christian tradition and the peculiarities of English. Other languages and other cultural traditions will provide very different distinction.
Answer: The words are totally open to interpretation, so I wouldn't worry too much about it. The possible interpretations are unbounded, but here are a few ideas that I've seen expressed in real life:

Humans have souls, spirits are evil (or just foreign) entities.
All life has a spirit. Souls are just stronger spirits that come from people.
Souls are spirits that are still linked to bodies, once the body dies the soul becomes a spirit.
Soul is just another word for Spirit.
Souls are parts of humans, spirits are just myths.

There are more. Importantly for your situation, you're not limited to what real humans want to read into the words. You can define them for your world however you wish.
One thought I've had is that a spirit is a soul that has the ability to interact with the material world in some way. When a person (or a creature if you like) dies then their soul is freed to roam the ethereal world. For souls that have the ability to interact with the material world then when they choose to do so their manifestation in the 'real' world is a spirit. Whether they are just showing up for a chat with a descendant, to enact revenge on their enemies from beyond the grave or because they're just crazy enough to use whatever power they can get to lash out at the world, they do it as spirits. Perhaps the spirit is a construct inhabited by the soul in the same way that the soul used to inhabit a living form of flesh.
Another idea is that a soul is a compound entity and that some portion of it is supposed to ascend to a new phase of existence - a heaven, paradise or afterlife of some kind - but when it does so it leaves behind the rest of itself as a spirit. The spirit retains a copy of the memories, personality, etc. that the soul gained during life. Maybe the residual spirit degrades over time, maybe it simply loses interest, etc. Perhaps only souls with particularly strong life force or emotional connections leave such a residue behind.
I could come up with a number of other options, but this is your story so you should do it your way. There is no absolute authority that we have access to that can reasonably mandate one interpretation over any other, so it seems like you have free reign over how the people in your world view things.
Although maybe the people of your world are no more united on the definitions than we are.
Comment: "The words are totally open to interpretation, ..." Spirits are what you drink, a sole is the part of your clothing that you stagger home on when you drink too many spirits.
Comment: I like the idea that a soul is a strong human spirit, but everything has a spirit. That's a really cool take IMO.


How is VaR calculated with mixed return-periods

Question: For example, if you have a dataset of returns that are not daily or yearly, but span 24 days, 1 day, 5 days, 7 days, etc., how do you calculate or interpret the VaR of that? I've tried linearly scaling each return to be daily. E.g., (24 day return / 24) or even doing (24 day return / round(24 * (252/365), 0) to account for trading days. Then I can calculate daily VaR, 10 day, 15 day, and 30 day. But I'm not sure what's correct. Is there a better way of interpreting or calculating the VaR of the original dataset?
Comment: Remember that garbage in = garbage out.  What you are attempting to do will result in garbage, unfortunately.  Try to get the price data over at least several months (3 at a minimum).  Calculate the log returns.  From here, you can generate the correlation matrix and volatilities for your VaR simulation.  I'm afraid your initial dataset won't get you to your intended solution.  Most VaR simulations use EWMA (0.06 decay) scaling so less returns are usually needed.  I've written VaR engines for 3 companies, just giving you the basics.  Get better data.  Hope that helps.
Answer: There are several aspects:
The holding period that you want to measure:
Usually, you want to calculate VaR for a specified holding period. For USCITS funds it is e.g. 20 days for bank pillar 2 regulations it is an annual holding period. What is your holding period?
Returns over periods
If you have daily returns for certain assets, then you can aggregate them to get e.g. 5 days (i.e. weekly) or monthly returns. You could transform to log-returns and then add as many returns as you need.
If your daily return is
$$
r_t = \frac{P_t-P_{t-1}}{P_{t-1}}
$$
then the log-return $R_t$ is
$$
R_t = \ln(1+r_t)
$$
Doing some maths you can see that the return over $n$ days is just the sum of $n$ log-returns. You can transform the final result back to the percentage return scale by
$$
r_t = \exp(R_t)-1.
$$
Portfolio returns
You could choose the lowest frequency (e.g. monthly) and calculate returns for all your assets using this frequency and a common period (e.g. monthly returns from 2011-2021). Then you can compare VaR estimates (VaR of the monthly return) for your assets or form a portfolio and measure its VaR.
Scaling VaR
Finally, it is quite usual to scale VaR from one holding period to another. There are many assumptions that come with this, but it is done - keeping the limitations of this approach in mind. E.g. under the assumption that returns follow a normal distribution, the VaR scales with the square-root of time. This means that
$$
VaR(\text{annual return}) = \sqrt(VaR( \text{monthly return})).
$$


Ubuntu - Allow access to subdirectory and files under a directory, but not give access to the directory itself?

Question: Good day. I have a Server that's running on Ubuntu 14.04 with a LAMP Stack.
So far, I've been able to host webpages on it and it's been working great. However, I want to limit what the users see.
I have a certain directory downloads where I upload files that my clients would need and then just send them the link. The link would look something like: mySite.com/downloads/file.zip.
This works fine, however, when the user goes to mySite.com/downloads, he or she will be able to see all the other folders and files there, and I don't want that to happen.
I went to FileZilla (easiest way for me to do this right now) to set the folder permission to 754, which allows the public to read the folder but not execute. After refreshing, I got a 403 Forbidden on the downloads folder which was expected. However, I can't download the files under it nor access the folders under it as well. I checked and I set the permission of the files and subdirectories to 755 but that did not help.
Is there a way to limit users from accessing the downloads folder while still being able to have access to the subdirectories and files under it?
Answer: Change directory permissions to default 755, create .htaccess file in the /downloads directory and put a line "Option -Indexes" there, as per https://stackoverflow.com/questions/1767785/htaccess-file-options-indexes-on-subdirectories
Comment: This will affect all subdirectories as well.


Why does water not leak from the bag?

Question: In the picture, the plastic bag is filled with water. The sharpened pencil penetrates through the bag. However, there is no leakage.
Could you please explain why this happens?
Comment: Something similar can be done with a balloon. See a description here https://www.stevespanglerscience.com/lab/experiments/skewer-through-balloon/
Comment: It seems that your water miniscus is below the pencil pierce point. Is this true?
Comment: Now wait for people to try it and spill water in their room. xD
Answer: This experiment is described in detail on this site and many others.
The explanation focuses on the flexibility of the polymer molecules of the bag, sealing the gap around the pencil.
To that I would add that, due to the surface tension, for the water to leak through a gap of a given size, a certain outward pressure is required - to overcome the inward pressure due to the surface tension.
An estimate of such pressure for a round hole is presented in this post and it shows that, for the water to leak through a $0.1$mm round hole (about the thickness of printing paper), an outward pressure corresponding to a $10$cm water column is required.
Assuming that this estimate is roughly applicable to the width of the gap around the pencil, we can easily see why this experiment works with common size plastic bags: there is virtually no gap to speak of and a more significant pressure would be required to stretch the plastic around the pencil in order to create one.
In a specific example of the experiment shown on the picture in the post, the water hardly covers the holes, so the excessive outward pressure is close to zero: the easiest case.
Comment: +1 The argument and the formula in the post to which you linked is incorrect. According to the formula in that post, there is a certain height of water which can be supported by a hole of any specified size at all. For example, according to that formula, even a big hole of radius 1 cm can support a water column of 1.5 mm height.
Comment: @Deep The formula is applicable to a spherical droplet, which does not fit the scenario you describe, i.e., there won't be any solution for a 1cm hole.
Comment: The argument in that answer requires only a hemisphere of liquid hanging from the hole, and not a full droplet.
Comment: @Deep 1.5mm still won't be a solution. I think we can agree that the argument and the formula in that post don't scale, but could be used as a reasonable approximation. For the problem in this post, the accuracy of the formula is even less important and I referred to it just to illustrate that for the water to penetrate small openings some pressure is required.

Why does water not leak from the bag?


Text alignment - CSS or HTML?

Question: I'm wondering what's the best way to do an alignement ?
Using CSS with the property : text-align or using HTML with align=""
Thanks !
Answer: http://www.w3.org/TR/html4/present/graphics.html says it's even deprecated to use align.
Answer: I'm of the opinion to do everything for design/layout in CSS. Keep your HTML for structure and let your design stay in the CSS. Both do the same thing but the CSS approach is neater (in my opinion anyway).
As mentioned by Marnix, it's deprecated in HTML4. It's not even supported in HTML5 so if you're structuring your HTML that way, you only have one choice.

As a rule for things I do:
Design:: Keep everything in external CSS files
Client Side Scripts: Keep everything in external JavaScript files
Content/Structure: This is what the HTML is for (I suppose we have to leave something in there)
Answer: CSS should be the way you do it really. Using inline styles usually creates more work for you in the long run.
Answer: giving it a class and specifying it in the css as text-align: right for instance is the best way according to me. With align="" you know the obvious problem of repeating....hope this helps
Answer: Use CSS if you will have several elements of a same kind in your page. Then give them a class and build a rule for that class.
CSS is there for helping you factoring your rules and avoiding assigning a style manually to every single element.

Text alignment - CSS or HTML?


How can I prove that Vce saturation lies below .2V?

Question: When I try to prove that Vce for saturation is below .2V and I take npn transistor I simply consider emitter to be at 0V and thus base emitter junction being forward biased base gets a voltage of (.7 V + x) where x is positive constant then to forward bias base collector junction I will have to have forward Voltage of at least .8V so collector voltage becomes .7v+x-.8v+z where z is a positive constant
and x is greater then z so collector voltage should become -.1V+(x+z) thus What I am getting is Vce should be greater then -.1V
When follow same procedure for PNP I get Vce greater then .1V
which is totally in coherent with <.2V What I am doing wrong please help
Comment: @Buzz bee - you are treating this like an algebra problem. BJTs are much more complicated than that. See the Wikipedia article:  https://en.wikipedia.org/wiki/Bipolar_junction_transistor
Comment: if you want to estimate Vce with a part number, it is helpful to use Vce(sat) @ Ic=10*Ib then go from there if you know the actual ratio and actual load current as the bulk resistance causes a linear rise in Vce/Ic  The actual Vbe depends on these values and could be  0.6V if Ic is 1mA and Vce=50mV
Comment: |Vce(sat)| is not necessarily less than 200mV. For example, for 2N4401 it will be >200mV typically if Ic >150mA for Ic/Ib = 10 and it will never get less than about 400mV at Ic = 500mA regardless of Ib.
Comment: This assumption is incorrect: ".7v+x-.8v+z where z is a positive constant". This expression incorrectly models the voltage and current relationships within an NPN BJT, and is the reason your analysis isn't working. (Unrelated comment: For numeric values less than 1, always put a leading zero to the left of the decimal point: CORRECT 0.7, INCORRECT, .7). (Unrelated comment: Please use punctuation marks like commas and periods in your written prose. Your message is very difficult to read and understand because it has no punctuation marks.)
Answer: **if you want to estimate Vce with a part number, it is helpful to use Vce(sat) @ Ic=10*Ib then go from there.
The hFE declines to about 10% of the max linear value at the rated Vce(sat).  The Vce(sat)/Ic = Rce is a computed term that is often useful to know for a switch characteristic when choosing a device or a collector load. Rce decreases with increasing  base current and collector current when saturated.
The actual Vbe depends on these values and could be 0.6V if Ic is 1mA and Vce=0.06V.
You can also see Rce (typ) @ 25'C  at full saturation with Ic/Ib=10 for this part;
Rce=60 Ohms @ Ic=1 mA   Vce= 60mV.
Rce= 5 Ohms @ Ic=10 mA   Vce= 50mV.
Rce= 1.3 Ohms @ 100mA    Vce = 130mV.
Rce = 0.8 Ohms @ 500 mA  Vce= 400mV.
This trend is common but the ohmic scale reduces for higher power switching transistors.
2N4401 example General Purpose Small signal TO92

When operating in the linear region the collector is a high impedance current sink.


Connect C++ app to JAVA web app with SOAP

Question: I have a C++ app that needs to connect to a JAVA web app, are there any good, open source SOAP packages for this, or would it be easier to just roll my own?
Answer: I'll vote up darkhelmet since gSoap would also be my recommendation. We're mostly a Java shop but with some C++ bits and gSoap has been our preferred SOAP integration way. It is indeed more work than your typical Java stacks but it seems solid.
Answer: A quick Google turned up this for a toolkit. While I have never used it, it seems to be quite popular and solid. Not exactly a package, and not really rolling your own, but sort of in the middle.
Answer: We went with gSOAP rather than Axis to avoid having a dependency on both a JRE and Axis just for building a C++ project.  It's worked ok, which is good since the gSOAP code is horrible and makes it very daunting to fix any bugs in it.
A warning about gSOAP linking though: you can never use more than one WSDL in a single link object (executable, dll, shared object).  This is because some of the generated WSDL-specific functions have general names (e.g. soap_getfault()).
Worse, with Unix ELF linking, these names will cause cross-linking between shared objects, so a FooService fault might be processed by the soap_getfault() for BarService, corrupting memory if the fault detail structures are different.
The workaround for that is to make sure that nothing gSOAP-related is exposed outside the SO they are linked into.  This can be solved by giving gcc these definitions _both when linking the gSOAP library itself and linking your code:
#define SOAP_FMAC2  __attribute__ ((visibility ("hidden")))
#define SOAP_FMAC4  __attribute__ ((visibility ("hidden")))
#define SOAP_FMAC6  __attribute__ ((visibility ("hidden")))
#define SOAP_NMAC   __attribute__ ((visibility ("hidden")))

I solved it by putting them into a header file and forcing gcc to include that before anything else with -include fixsoaplink.h.
A better way if you can take the effort might to change the default ELF visibility to hidden, and only export the symbols you want to (like dllimport/dllexport in VC).
Comment: Huh.  I actually thought I saw some nice stuff in gSOAP about putting all of the generated code behind a namespace.  Actually, I'm almost positive.  That would mean that the general name functions, like soap_getfault() wouldn't collide, even in a single link object.
Comment: You can in fact put more than one wsdl in a single link object, I am currently doing it!
Answer: Take a look at Apache's Axis project. It's well supported on C++ (and Java) and if you have the good fortune to start with a good WSDL for the target service you'll be home-free.
Answer: When I saw the generated code from gSOAP, I about had a heart attack.
The fact that the user is required to do all of the memory management for each object just boggled my mind.  So, I sat down and did something probably stupid in the long term, but fairly satisfying in the short term...
I wrote a program that wraps the gSOAP code with my own CPP classes that make the interface look more like I'd like it to look.
I used Scoped Guards within each service method to hold onto memory, and since I'm dealing with all sorts of different types, I used a std::list<boost::any> to do it.  I have functions that make each object type that I need, and they put the actual memory into my list<any>.  It's had a few problems - mostly just configuration changes.  I'm generating thousands of classes now, talking to dozens of web services.
I'm not sure I'd recommend my same path to anyone else...  I should probably bite the bullet and start trying to contribute to gSOAP, rather than maintain my own tool which is dependent on the output of gSOAP...
Comment: I did a similar thing then realized how stupid and unmaintainable it was.  After I refactored the code, I had a templated class that could work for any generated gSOAP C++ class.  I can send you the code if you like.
Comment: I'd appreciate that! - firstname.lastname@example.com or maybe you could post it on google code, or something similar.  :-)
Answer: Here's another issue with gSOAP we just discovered the hard way: it uses select() for all polling, so once you've got 1024 file descriptors open (64 on Windows?) it will trash the stack.  That results in either spurious errors where it is unable to send messages, to complete crashes of the application.
The workaround, unless you're prepared to patch gSOAP itself, is to write your own network code and hook it in with soap->fconnect, ->fsend, ->frecv etc.


Talking about historical events?

Question: I'm giving a presentation in my German class.
If I'm speaking about historical events, should I use the simple past tense or the past participle with an auxiliary verb?
Thanks :)
Comment: Perfekt is a past tense in German, unlike in English, where Perfect is a **present** tense. So in German, you are free to choose. Usually, people use Präteritum (German simple past tense) only in writing. When doing a presentation, you can switch between both just to vary your speech a bit.
Answer: In a historical presentation, you should usually use the simple past:

Das Deutsche Reich wurde 1871 begründet.

Using Perfekt would make it sound somewhat as if this had been just the other day, and as if it might still be around, both of which are wrong.
It's true that in colloquial speech, the Perfekt is preferred, but you're not chatting colloquially about recent events, you're going to be presenting about historical events. Those are two strong factors for preferring the simple past.
Answer: I have not seen any practical usage of the simple past tense (hatte, sprach, ging, machte) in everyday German. It is also called "narrative past" and used more in written (books, newspapers) German, while the present perfect tense (hat gehabt, ist gegangen, habe gesprochen, haben gemacht) is used more in conversational German.
If the presentation is important to you, you can watch a German documentary about a historical event, you can note what the narrator says there and imitate it in your presentation.

Talking about historical events?


Increase error font size in XCode

Question: Is it possible to make these tiny messages larger? I didn't find it preferences.
Answer: It is indeed: head over to Xcode - Preferences and find the Fonts and Colors section. Switch to the Console Tab and select an option you want to change (typically Executable Console Output and Debugger Console Output appear in the debugger).
Now click the tiny little T icon at the bottom and change the font to something more palatable. The default font is Menlo 11.
Alternatively you can switch to either of the Presentation presets, which will increase the font size for the debugger and your code font (good for screencasts).
Comment: That's not what the OP was asking for.
Answer: It appears that the font size of the tiny red error messages is governed by the space available: if you make the default font size larger (or the size of any of the elements on that line), the error message will expand to fit.
An alternative is to show the issue navigator on the left, which has larger type, especially if you fiddle around in the preferences and allow more than 3 lines per entry, or whatever the default setting is.

Increase error font size in XCode


Is it legal for undercover cops to pose as your friends?

Question: I recently saw a video on YouTube about a kid who was arrested after "selling" weed to an undercover cop who was pretending to be his friend at school, what I found even worse was that the kid had autism and the cop had manipulated the student into buying him the drugs. Is this legal at all? It seems more like a human rights violation. Just a side note this kid was not actually a drug dealer, the cop just kept persisting that the kid could "help him out" and find him some for him so, the kid gave in.
Comment: In which jurisdiction?
Comment: To expand on the "which jurisdiction" issue, different U.S. states, for example, have different laws on using deceit in law enforcement dealings with juveniles.
Answer: That the cop claims to be your friend is not more illegal than a salesman claiming that he has "the best offer" for you because he likes you (in fact didn't you see any film about the good cop/bad cop routine?)
The term you are looking for is Entrapment. The (very simplified) basic idea is that police officers can promote the comission of a crime to catch criminals but cannot "trap" innocent people into it; the difference being that their persuassion should not turn otherwise innocent people into criminals.
An extreme example would be if the cop threatens the target into commiting a crime.
For the more usual situation when a cop promotes a crime to catch the criminal, I saw it explained (just for illustration purposes, it is not that you are safe when the cop insists a third time) as it follows:

Legal:
Cop) Oh boy! The place where I work is full of cash and they don't even have alarms or store it in a safe box. If someone helps me, we could go this night and take all of it. Are you interested?
Target) I don't know.
Cop) Trust me, it will be easy, nobody is there at night and it will be just a couple of hours.
Target) Ok, count me in.
Illegal
Cop) Oh boy! The place where I work is full of cash and they don't even have alarms or store it in a safe box. If someone helps me, we could go this night and take all of it. Are you interested?
Target) I am not a thief.
Cop) Come on, it will be easy, the place is insured and nobody will be hurt.
Target) Not interested.
Cop) We can get 5000 US$ each one, just for a night of work. Didn't you told me that you had troubles with your bank? You could solve those overnight!
Target) Maybe you are right, but I have no experience with these things...
Cop) Do not worry, I will tell you what you need to do.
Target) Ok, count me in.

Note that it is not only "the cop insisted a lot". For the drug dealer example, if the cop insisted a lot but, when agreed, the boy produced the drug from his pocket, already packaged for sale, it would not be entrapment. OTOH, if the guy had told "I do not know where to buy drugs" and the cop had told him "go talk with X so he sells you the drug", then it could be considered entrampment.
In any case, this is generic information only, entrapment is difficult to prove and will depend on the views of the judge/jury so, no matter how enticing that criminal offer is, just don't do it.
Comment: Lying about not being a cop or about being your friend is legal. Showing you opportunities for crimes is legal. Convincing you to commit a crime that you otherwise wouldn't have committed is entrapment. There's a line between "legal" and "entrapment" that may be hard to draw. If someone is easily manipulated because they are not smart, or having mental health problems, something could be entrapment that otherwise wouldn't be.
Comment: Well that was the problem, this kid was not a drug dealer and did not have any drugs when first asked, the autistic kid just thought the cop was his friend so he didn't want to let him down so he went out and bought drugs for him.
Comment: Apart from the fact that "a youtube video" sheldom offers a complete and unbiased explanation of the facts, my guess is that the kid will have legal counsel and that his legal counsel will raise those issues, if it is appropiated; it would be really off-topic and missdirected for me or anyone else here to decide what the legal counsel, the judge or the jury should do. I am only providing a general comment about what are the limits on sting operations.
Answer: Its legal in the sense that the officer probably isn't committing a crime (although laws vary) , however it does open the door for a very strong entrapment defense. Also, if the officer isn't careful it could expose the department to civil action.


Trying to make tessellated vase

Question:
I made this tessellated vase, but now I want to create an inner body for it but so it connects with the outside, but I don't now how.
Comment: Hi, it's unclear what you mean. Please edit your question and explain it in more detail. Maybe you could share a sketch of what your goal is?
Comment: Hi Please use a title that reflects the content of the question. It should be descriptive but succinct, unique and identifying, summarizing the issue so that users can at a glance understand what your post is about. Use the [edit] link below your post and avoid anything not strictly essential to the post. Remember, your title is the first thing potential visitors will see, and makes your question findable for future users. See ["*What is the problem with posting an image or link and asking "How do I do this?"*"](https://blender.meta.stackexchange.com/questions/2449)
Answer: Perhaps it's not the best way, but you can try to duplicate the vase in a new object, then scale down a little to form inner body.
You shouldn't have any connection problems with the vase.
I hope I have helped you.

Trying to make tessellated vase


How to create a video banner?

Question: I need to know, how I can create a video banner in SharePoint Online? I tried to create by adding web-part but that is not in a format of banner. Each time I need to play video in order to see it, but I need like as an advertisement banner .
Answer: Does the video need sound? if not perhaps you can find a way to convert the video into an animated GIF. Then it will animate and could behave like a banner so users can click on it go somewhere.
Sorry SharePoint's video play back is rather basic so I don't believe you will find much in regards to customizing it.
Answer: I don't think there is any Autoplay feature present in SharePoint Online.
Videos from youtube or any other sites having autoplay feature can be embed
Comment: I found my answer. I needed just to check Start Media Automatically and Loop until stopped. That is simple answer for my question. Thanks for your help.
Answer: You can refer to this article.
You can add the video to a Document library, and follow the steps in the article, add it to the banner by the content search web part.

How to create a video banner?


Mold in my new vinegar batch

Question: I found this mold in my new vinegar batch. It has grown in the second refill of alcoholic soda when the mother of vinegar was already formed. Does anyone know why this mold has come out in the vinegar?
Thank you for your help..
Answer: Probably the pH was not low enough and/or the sugar content was too high. The recommended way to make vinegar has 2 steps:

turning the sugars into alcohol through yeast: this is an anaerobic process, so mold should not be a problem (mold needs oxygen) if you install the airlock properly (note: the link above does not mention the airlock, but I highly recommend it, this video explains why)
turning the alcohol into vinegar: at this point there should not be any sugar left in the liquid, otherwise at the start when the pH is not low enough, molds can form. This is an aerobic process because the acetic acid bacteria need oxygen

There is one more reason to use this process: if you do not have a separate step for the alcoholic fermentation, you will never know, when it is finished. If you bottle an unfinished batch, the alcoholic fermentation might continue, causing the bottle to explode (you could injure yourself). This should not be the case for unfinished vinegar fermentation, because the AAB run out of oxygen.
Comment: Thank yoy GB for your answer. I forgot to explain that this vinegar is made of Cinzano bitter soda, a beverage with a 8.5% vol alc, so the first step of fermentation to get alcohol is not needed. As you said, at this point there should not be any sugar left in the liquid, and there was sugar and caramel added in it. Probably that has been the problem. In the first batch the vinegar was succesfully created and I followed the same process in the second batch, thats why didn't understand what failed. Even with an 8.5% vol alcohol, this molds can appear? Thank you again
Comment: Thank you for the clarification. I updated the answer, then lost the changes when I signed in. Shortly: cinzano bitter contains sugar and sulphites, which does not favour the AAB when they have to compete against mold. Why your first batch succeeded, I can't say, maybe you had luck. To get rid of the sulphites, you could use some polymer wine filters, like Üllo or some say hydrogen peroxide also converts the sulphites to something less harmful. Then you could start the alcoholic fermentation by adding yeast and after that kick-start the AA fermentation by adding some of the old/live vinegar.

Mold in my new vinegar batch


Creating backups on Alwayson without differential backups

Question: I went through this link on stack exchange and also Brent Ozar's . I don't plan to create any differential backups for the AAG group. Can you please let me know if enabling this option should work. I will be adding a new database for an application, and I then plan to create and schedule Ola's scripts. Is it true that for new databases, only full backup happens and not the log backup? What can I do to resolve the issue? Please let know. Thanks!
Comment: Why won't you use a differential backup? What's your reasoning?
Comment: All the applications running on the SQL  server are 3rd party vendor apps which are not revenue critical. Therefore only log backups and full backups are been taken as of now
Answer:
. I don't plan to create any differential backups for the AAG group. Can you please let me know if enabling this option should work.

Yes, it'll work.

Is it true that for new databases, only full backup happens and not the log backup?

I don't understand the question. If it's specific to Ola's script then I do not know, if it's a SQL Server question then you must take at least one full backup and one log backup before adding the database to the AG, so the answer would be no it isn't true.

What can I do to resolve the issue?

I currently do not see an issue. It's a valid backup strategy, now where or not it meets your recovery SLA in a disaster is another question.
Answer: You can check out "How should I configure DatabaseBackup to back up an Availability Group?" on https://ola.hallengren.com/frequently-asked-questions.html
Comment: Thank you. So I followed what Brentozar mentioned with Olla hallengren and configured it on all the 3 modes. When I try to execute the job to test it, the job is failing. It says "unexpected parameter". The code I used in the job step is
Answer: I am posting what I tried because, the comment section is not allowing me to post what I tried due to the "@" symbols
My code :
This is the code : sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE [dbo].[DatabaseBackup] @Databases = 'USER_DATABASES', @Directory = N '\SQL02\backups', @BackupType = 'FULL', @Verify = 'Y', @CleanupTime = NULL, @Copyonly = 'Y', @LogToTable = 'Y'" -b
Comment: Could you script out the job and send that to me.
https://ola.hallengren.com/contact.html
Comment: Thank you for reaching out. I have emailed you the job script!


Predictive Models for the Soccer World Cup 2014

Question: The Goldman Sachs model was already discussed here. I wonder whether there are other statistical forecasts publicly available, or even better, models including raw data. Specifically, I thought that the Goldman Sachs model didn't work so well for the 2010 cup (see the original report on page 7). I also heard that actual or estimated transfer values of players have high predictive power, but they are not included in the Goldman Sachs model.
Answer: I like this approach: http://www.r-bloggers.com/home-victory-for-brazil-in-the-2014-fifa-world-cup/ (more formal description in the working paper here: http://econpapers.repec.org/paper/innwpaper/2014-17.htm)
The idea is to use a Bradley-Terry model where the team ability parameters are found using simulations of whole tournaments in order to match bookmaker probabilties of each team winning the tournament.
I suspect even better results could be achieved by using the implied probabilities of the Betfair market.
Comment: This is by far the most comprehensive piece of research I have seen so far, thanks. I also found an earlier paper interesting where they compare their approach to other forecasts methods (Leitner, Christoph, Achim Zeileis, and Kurt Hornik. "Forecasting sports tournaments by ratings of (prob)abilities: A comparison for the EURO 2008." International Journal of Forecasting 26.3 (2010): 471-481.).
Answer: I haven't tried it personally but there is this application, by a company name Bayesia, that is relevant to your question: http://worldcup.bayesialab.com/.
Comment: Not exactly what I looked for, but interesting nonetheless!


What is the difference between a transaction and a call?

Question: What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also do transactions and calls?
Comment: **NOTE** for avoiding confusion: `call` in this question is neither _EVM_ `CALL` opcode nor _Solidity_ `.call()`, which make changes in contract states, but _Web3.js_ API `web3.eth.call()`, which does not make any state changes.
Answer: Call
A call is a local invocation of a contract function that does not broadcast or publish anything on the blockchain.
It is a read-only operation and will not consume any Ether.  It simulates what would happen in a transaction, but discards all the state changes when it is done.
It is synchronous and the return value of the contract function is returned immediately.
Its web3.js API is web3.eth.call and is what's used for Solidity view, pure, constant functions.
Its underlying JSON-RPC is eth_call
Transaction
A transaction is broadcasted to the network, processed by miners, and if valid, is published on the blockchain.
It is a write-operation that will affect other accounts, update the state of the blockchain, and consume Ether (unless a miner accepts it with a gas price of zero).
It is asynchronous, because it is possible that no miners will include the transaction in a block (for example, the gas price for the transaction may be too low).  Since it is asynchronous, the immediate return value of a transaction is always the transaction's hash. To get the "return value" of a transaction to a function, Events need to be used (unless it's Case4 discussed below).  For ethers.js an example: listening to contract events using ethers.js?
Its web3.js API is web3.eth.sendTransaction and is used if a Solidity function is not marked constant.
Its underlying JSON-RPC is eth_sendTransaction
sendTransaction will be used when a verb is needed, since it is clearer than simply transaction.
Recommendation to Call first, then sendTransaction
Since a sendTransaction costs Ether, it is a good practice to "test the waters" by issuing a call first, before the sendTransaction.  This is a free way to debug and estimate if there will be any problems with the sendTransaction, for example if an Out of Gas exception will be encountered.
This "dry-run" usually works well, but in some cases be aware that call is an estimate, for example a contract function that returns the previous blockhash, will return different results based on when the call was performed, and when the transaction is actually mined.
Finally, note that even though a call does not consume any Ether, sometimes it may be necessary to specify the actual gas amount for the call: the default gas for call in clients such as Geth, may still be insufficient and can still lead to Out of Gas.
Case4: can contracts create transactions?
There are 4 cases for how a contract function can be invoked.
Here are the 4 cases, and the first 3 have been covered above:

direct invocation of a contract function, originated with call

direct invocation of a contract function, originated with sendTransaction

contract invocation of a contract function, originated with call

4. contract invocation of a contract function, originated with sendTransaction
Although Case4 sounds like a contract can "also do transactions", because it's within a transaction, the definition of a transaction is data signed by an External Actor.  Thus Case4 is not a transaction.
From the Yellow Paper:

Transaction: A piece of data, signed by an External Actor. It
represents either a Message or a new Autonomous Object. Transactions
are recorded into each block of the blockchain.

Earlier above, it was stated that Events had to be used to get the return value of a contract function, originated with sendTransaction.  That pertains and is true for Case2.  For Case4, the contract obtains the return value of a contract function directly and can use it.  Here's how the Yellow Paper says it in bold:

Message Call: The act of passing a message from one Account to
another. If the destination account is associated with non-empty EVM
Code, then the VM will be started with the state of said Object and
the Message acted upon. If the message sender is an Autonomous Object,
then the Call passes any data returned from the VM operation

With these definitions from the Yellow Paper, it can be seen that Case4 is a Message Call within a transaction (thus state changes), there is no nesting of transactions, and that a unit of activity on the Ethereum blockchain is all within a single transaction that may contain multiple Message Calls.
Update: Since calling a function can be ambiguous (is it an eth_call or an eth_sendTransaction?), there is a proposal for eth_simulateTransaction.
Comment: I would just add some final clarification/conclusion on the potential ambiguity between a web3 call() and a message call() between two contracts? The syntax would look very similar and thus it might be seen that if a contract calls another contract that it works similar to a web3 call, which is not the case. It doesn't simulate it in that environment. It results in state changes.
Comment: I nominate this answer as tag wiki for contract-invocation. Feel free to [review and contribute the wiki and excerpt](http://ethereum.stackexchange.com/tags/contract-invocation/info).
Comment: Thanks, upvoted and was able to tweak the very last paragraph.
Comment: Does any of this change with the "Abstraction" coming in Metropolis?
Comment: I see a message for a view function call in Remix that states "(Cost only applies when called by a contract)". I have an address balance checking function, which makes a call to an external token contract using the Erc20 `balanceOf` method. So in this case, the token contract is in fact called by my smart contract. Will this cost gas as stated, even though the entire process is read-only?
Comment: @GViz A transaction that invokes a `view` or `pure` function will never require payment for gas. You're correct that a simple way to tell is that an entire process that is read-only will not cost gas. Note that [gas is still used by `view` functions](https://ethereum.stackexchange.com/questions/9824/can-solidity-constant-functions-be-arbitrarily-complex).
Comment: @eth great point, gas is used temporarily–but not paid–when running view functions to prevent arbitrarily large routines (e.g. infinite loops) from executing.
Comment: is `call` an atomic operation ? other words if the `call` fails somewhere in middle does it rollback?
Comment: @user1870400 `eth_call` does not persist anything: "rollback" is its default behavior.
Comment: @eth when does state updates get written(persisted) into storage? from my understanding reading through code base it looks like state updates get written to storage when the block gets appended to Blockchain until then its all memory. is that correct?
Answer: The difference between in a call and a transaction is the following:

transactions are created by your client, signed and broadcasted to the network. They will eventually alter the state of the blockchain, for example, by manipulating balances or values in smart contracts.
calls are transactions executed locally on the user's local machine which alone evaluates the result. These are read-only and fast. They can't change the blockchain in any way because they are never sent to the network. Some examples "read-only/dry run/practice".

Calls are useful for debugging smart contracts as they do not cost transaction fees or gas.
Comment: Searched for a while; this finally explained it for me (I simply put the `constant` modifier on my function and it worked)


Membership inference based on confidence intervals

Question: We are triing to validate a sample for purity based on 2 chemical parameters. For pure sample chemical parameters, we don't have the raw data any more, only the population mean and the convariance matrix between the two parameters, from which we can construct a 95% confidence ellipse.
If the sample measurement lies outside the 95% confidence interval, is it right to conclude that the sample is contaminated?
Is the confidence interval's 95% boundary equivalent to the critical value of a t-test somehow?
Answer: I think you are mixing up confidence intervals and prediction intervals.
When you do an experiment to calculate the value of a parameter then a confidence interval describes the region where you expect to find a sample estimate of that parameter (e.g. confidence interval of the sample mean). If you are validating the purity of samples by taking many samples and comparing their mean to the population mean then you need to use a confidence interval.
On the other hand, prediction intervals aren't concerned with what the mean of a sample is. Prediction intervals give a region where you expect to find any individual sample. With the population mean and the covariance matrix of pure samples you can construct a prediction interval (or ellipse) where 95% of the future individual measurements from pure samples will be in the interval.
Prediction interval seems to be what you're looking for so I'll give more detail on that. If you measure pure samples many times 95% of them will be in the prediction interval. If you use this as a test for purity that means that you will reject 5% of the pure samples and being impure. The proportion of impure samples that you reject as impure will depend on how different the means and variances of the impure samples are compared to pure samples. In theory, if impure samples varied very little then maybe more than 95% of them are in the 95% prediction interval so this method would be ineffective at finding impure samples.
If you could take several measurements from each sample and test their mean against the population mean then you would catch more of the impure samples. This might not be possible in your situation, though.


Why is it recommended to create clusters with odd number of nodes

Question: There are several resources about distributed systems, like the mongo db documentation that recommend odd number of nodes in a cluster.
What are the benefits of having odd number of nodes?
Answer: Short answer: in this case of MongoDB, having an odd number of nodes increases your clustered system's availability (uptime).
Look at the table in the MongoDB documentation you linked:
<code>+-------------------+------------------------------------------+-----------------+
| Number of Members | Majority Required to Elect a New Primary | Fault Tolerance |
+-------------------+------------------------------------------+-----------------+
|         3         |                    2                     |        1        |
+-------------------+------------------------------------------+-----------------+
|         4         |                    3                     |        1        |
+-------------------+------------------------------------------+-----------------+
|         5         |                    3                     |        2        |
+-------------------+------------------------------------------+-----------------+
|         6         |                    4                     |        2        |
+-------------------+------------------------------------------+-----------------+
</code>
Notice that how when you have an odd number of members and add one more (to become even), your fault tolerance does not go up! (Meaning, your cluster cannot tolerate more failed members than it originally could)
This is because MongoDB requires a majority of members to be up in order to elect a primary. This property is not specific to MongoDB, but any clustered system that requires a majority of members to be up (for example, see also etcd).
Your system availability actually goes down when increasing to an even number of nodes because, although your fault tolerance remains the same, there are more nodes that can fail so the probability of a fault occurring goes up.
In addition, having an even number of members decreases the probability that if there is a network partition then some subset of your nodes will be able to continue running. For example, if you've got a 6 node cluster then it opens up the possibility that a network partition could partition your nodes into 2 3-node partitions. In such a case then neither partition will be able to communicate with a majority of members and your cluster becomes unavailable.
The counter-intuitive conclusion is that, if you have an even-membered cluster then it is actually beneficial (from a high-availability standpoint) to remove one of the members.
Answer: The odd number of nodes help and is not necessary to elect a leader in a cluster. It is essential to avoid multiple leaders getting elected, a condition known as split-brain problem. consensus algorithms use voting for electing the leader. i.e, elect the node with majority votes.
consider a cluster of 5 nodes. the majority required is 3 (5/2 or 2 + 2 + 1 - the deal breaker).
It is important to note that the majority of the cluster votes are required for leader election even under failure conditions.
consider 1 out of 5 nodes failed. we can still elect a leader with majority votes of 3. well, what if out of the 4 nodes, two nodes receive equal votes of 2? that's left to the consensus algorithm to resolve the contention (maybe, simply initiate re-election). This is not the problem a odd cluster solves. when the number of active nodes are even, there is a small overhead to achieve consensus. Again, this cannot be avoided with odd/ even number of nodes since under failure conditions, the nodes can be odd or even. One usually gets confused about achieving majority when one of the odd nodes fail, leaving them even in number. it should be clear by now, that a tie is not a problem and a majority is sufficient for leader election.
when 2 out of 5 nodes fail, we can still elect a leader with majority votes of 3 i.e when all 3 available nodes vote for the same node. The cluster cannot tolerate more than 2 node failures since majority cannot be achieved.
another point to add here is, how the odd number helps in case of network partitions. In the worst case, a network partition can split the cluster into exactly two equal halves which cannot happen in an odd-numbered cluster.
why does the leader election require the majority of the initial cluster size and not the majority of active nodes? say, 2 nodes failed in a 7-node cluster, leaving 5 nodes running. what is the problem if a leader is elected with majority of 3 votes?
the problem is you cannot assure that the two nodes are actually down or only partitioned. This is the very purpose of leader election, to avoid the split brain problem. A 7-node cluster could be partitioned into two parts with 3 and 4 nodes. And, two leaders could be elected on either side. a majority of 7/2 = 4 elects a single leader.
As long as the number of operating/ reachable nodes are greater or equal to floor(n/2)+1, to reach consensus based on majority w.r.t the initial cluster size, the cluster can continue to operate
Answer: Short Answer: Higher Fault Tolerance.
This is a general principle that applies to many other clusters that uses RAFT alike leader election algorithms such as Kubernetes ETCD clusters.
If it uses RAFT for leader selection, cluster needs a majority of nodes, a quorum, to agree on a leader. For a cluster with n members, quorum is (n/2)+1.
In terms of fault tolerance, adding an additional node to an odd-sized cluster decreases the fault tolerance. How? We still have the same number of nodes that may fail without losing quorum however we have more nodes that can fail which means possibility of losing quorum is actually higher than before.
For fault tolerance please check this official etcd doc for more information.


What are the different test scenarios to be checked for giving license to a client

Question: i have a web app .License is given to the customer to use it.What could be the possible test scenarios that has to be checked before deploying it.I have found out a few
1)Change the server time zone .
2)Make the server move across different time zones
Please help me with other scenarios
Comment: what kind of license you are distributing?whether license key was validated at server side/client side?
Comment: What effect does the licence have? If the user has no licence, should they be prevented from accessing the app at all? Or should they be given access to some functions but not others? Is the licence date-limited?
Comment: This might help: http://sqa.stackexchange.com/questions/2992/what-are-some-good-test-cases-in-order-to-do-license-key-authentication-while-so
Answer: Based on your question this were my
License Scenarios
You haven't mentioned what type of license it is,Based on that the license Scenario's will vary
In general the license key might be of three types

Text key
Key file
Hardware key

Text key
The trial period is often present in this scheme. We'll consider the check-list with it as it's more complicated – for the scheme without trial period some tests will be simply omitted.
It's recommended to check:

the limitations of the application functionality (if there is such during the trial period) and correspondingly the availability of the full functionality after the successful licensing.
the possibility of licensing during the trial period
application response to the input of the incorrect registration data (if the key consists of the several fields then you should make the separate test for the each of them):

а. Key is corrupted
b. Key is absent
c. Key is typed in the wrong case
d. Key contains the extra symbols at the end and/or at the beginning

application response to the input of the correct registration data
application response to the input of the registration data provided for the previous versions of the tested application
unlicensed application behavior after it has been reinstalled during the trial period
application behavior after the trial period is over
unlicensed application behavior after it has been reinstalled after the trial period is over
application response to the system time change forward/backward (the most important here is to keep the trial period correct). Take into account that the system time change should be performed in BIOS because the one performed in the operating system does not have much effect.
the possibility to register application after the trial period is over.
application behavior after the registration data has been deleted, for example from the registry (usually after registration the deletion of these data is disabled).
licensed application behavior after it was reinstalled.

Key file
Here you should pay attention on the aspects:

Using a file with the correct name but with incorrect content and vice versa.
Starting application after the file was deleted.
Saving the file while the application is being reinstalled.
Application behavior after the file has been replaced:

a. correct -> incorrect,
b. correct -> correct,
c. incorrect -> correct,
d. incorrect -> incorrect.
Hardware key
We should check:

Application functioning with no special software for hardware key installed.
Application functioning without hardware key.
Unplugging hardware key while the application is running (here we should take into account 2 situations: application has some process run and application is in the standby mode):

a. Permissible waiting time for the key plugging.
b. Correct application behavior after the unplugged key is returned.
с. Correct application behavior if the waiting time is over and the key was not plugged.

Application functioning if there are some other devices akin to the hardware key plugged (for example, if the key is USB device then it's good to check its functioning together with flash drive).
Comment: Most of these checks (while interesting for all web apps) have nothing to do with licensing.
Comment: @JoeStrazzere apologies sir,kindly review it, now i updated answer according to question


Monster Infusion says,"No Role Abilities"?

Question: I've found loads of guides online about monster infusion, but I don't really know what this message means. Every time I try to infuse one monster with another I get told that there are no role abilities to inherit. What does this mean? What am I missing?
Comment: Could you please provide a bit of clarification? You are asking how to unlock it, but once you have access to the Monster Menu following the tutorial on Monsters, you have access to the menu entry. You even say you try to infuse so I can only assume it's already unlocked. Could you please elaborate what you mean when you say you "get told it's essentially worthless?"
Comment: Yeah sure :) I forget the exact wording as I'm not near my console but if I try to infuse literally any monster into any other I get told something about it having no role and do I want to go ahead anyway? I always assumed I was missing some component...
Answer: All this message means is that no role abilities will be transfered. There are other reasons to infuse which make that warning relatively benign.
A monster of a specific role can only inherit role abilities for its own role. As a general rule, each monster can possibly pass on one role ability, but not all role abilities are infusable.
If your monster already has the role abilities that you are trying to infuse, there will be no role abilities that can be infused and you will be warned. If you are trying to infuse abilities from a different role, there will likewise be no role abilities to infuse and you will be warned. Abilities with red locks cannot be infused. If you are trying to infuse a role ability that cannot be infused, you will be warned.
Here's a solid list of role abilities, denoting which are infusable. These are the role abilities that are infusable:

<code> COM
    Active: Ruin, Ruinga
    Auto:   Adrenaline, Blindside, Bloodthirsty, Deathblow, Faultsiphon,
            Lifesiphon, Powerchain, Scourge

 RAV
    Active: Fire, Fira, Firaga, Blizzard, Blizzara, Blizzaga, Thunder,
            Thundara, Thundaga, Aero, Aerora, Aeroga
    Auto:   Fearsiphon, Overwhelm

 SEN
     Active: Challenge, Provoke, Mediguard, Element Guard, Entrench, Vendetta
     Auto:   Deathward, Fringeward

 MED
     Active: Cure, Cura, Curasa, Esuna, Esunada, Raise

 SAB
     Active: Deprotect, Deprotectga, Deshell, Deshellga, Poison, Poisonga,
             Imperil, Imperilga, Dispel, Dispelga, Curse, Cursega, Fog,
             Fogga, Pain, Painga, Wound, Woundga

 SYN
     Active: Bravery, Bravega, Faith, Faithga, Enfire, Enfrost, Enthunder,
             Enaero, Protect, Protectga, Shell, Shellga, Veil, Veilga,
             Vigilance, Vigilga
</code>

Even if no role abilities will be infused, this does not mean the infusion is useless. Passive abilities can still be infused, even when no role abilities will. Infusion can be used to soft lock some passive abilities, even when it looks like nothing is being infused at all. There are also hidden fusion abilities that can be granted from certain role combination infusions - If you infuse 99 levels worth of specific roles into specific other roles (COM<->RAV, SEN<->MED, SAB<->SYN), a hidden role auto-ability can be unlocked.
You can preview the results of your infusion before you infuse when selecting the second monster. If there really is nothing to infuse, then you probably shouldn't. You may need to use Monster Materials to level your monsters and learn them some new abilities in order to actually have something worth infusing.
Comment: What do you mean by "soft locking" a passive ability?


Can you refer to the callback function as an API?

Question: A system design is decoupled into two layers say layer A and layer B.
The interaction between layer A and layer B occurs through an interface that is exposed by layer B in form of an API. This interaction has an asynchronous design pattern. Layer A registers a callback function with the layer B API. Now can one technically refer to the callback function as exposed by layer A and refer to it as API of layer A?
Answer: Normally, no.  The callback is part of the API exposed by layer B.
The API of Layer B defines the form (prototype) of the callback, the API of Layer B defines the functions to register and unregister the callback, and Layer B defines the conditions under which the callback will be invoked. Furthermore, since the callback gets registered, it will work even if it is not publicly exposed by Layer A. (The callback can be a private method of the object that implements Layer A.)  Therefore, it is totally, completely, unquestionably, part of Layer B's API.
Now, if Layer A decides to also publicly expose the callback, then it also becomes part of Layer A's API, but that's twisted, and probably useless.  The chances of some third Layer X finding it useful to invoke the callback of A as part of the public API of A are very slim.  As a matter of fact, even on such an unlikely occasion, I would still avoid having Layer X invoke the callback, because it would cause confusion.  I would have A expose an entirely separate method for that.