Is there any other market like stock market

Question: Is there any other market like stock market where people each other buy or sell something? Where sellers also buy and buyers also sell at same palace.
Comment: eBay? Etsy? Craigslist? Facebook market?
Comment: This question is not about finance.
Comment: Farmers market? Fish market? Smithfield?
Answer: A  stock market such as NYSE or Nasdaq is an organized exchange where there are rules usually on the characteristics of the products being traded, trading mechanics, information flow, settlement, and custody. There is a middle-man between the trading parties to reduce the counter-party risk in most of the organized exchanges.
There are many organized exchanges all over the world for commodities (LME, CBOT, etc), debt instruments, or currencies in addition to stocks. However, unlike stocks, the spot/cash trading for the other categories above, especially for debt instruments and currencies, usually takes place in over-the-counter (OTC) markets in which there are much fewer pre-set rules than in organized exchanges and usually no middle-man. (See this article by the IMF for more on organized exchanges vs OTC markets.) Yet, financial products such as the derivatives (futures, options, etc.), based on spot prices of the products in any of the categories above, including stocks, are frequently traded through organized exchanges.
Nowadays, the same organization frequently provides organized exchanges for more than one of the categories above or multiple organizations, each providing an organized exchange in one of the categories above, are owned by the same group (CME, ICE, Deutsche Börse, LSEG).


Excel 2013: "The picture is too large and will be truncated."

Question: This error message started popping up in Excel as soon as I hit cut or copy.  I don't know when it started or why and it happens every time.  Running Windows 7, with Office 2013 Pro.
Answer: When researching this issue, I found a bunch of solutions which I may update here later.
None however, worked for me, personally.
In the end, the culprit was Actual Windows Manager / Actual Multiple Monitors which has an option for "enabling a [system-wide] clipboard history" which you can set as deep at 25 entries.

Upon more research, I've come to the conclusion that other/any 3rd party program that hooks into the windows clipboard could cause the same issue.  So, I suggest you look at this option before any others, as it's a quick test/fix:

I disabled the clipboard history option in Actual Windows Manager
then tried the cut or copy in Excel again, the error was gone
In my case, I did not need to restart either Excel or AWM, but I would suggest trying both if this solution doesn't work for you right off the bat
If there's no simple option for disabling, try closing or killing (in task manager) any process related to the suspected 3rd party program
Obviously, you can re-enable the 3rd party program/option again when you're not using excel, or just live with the error.

Further info: I've also read about this occurring with TeamViewer, when enabling the "syncing clipboard between the local host and the remote session" option
Comment: Actual Windows Manager / Actual Multiple Monitors was the culprit for me.
Comment: This pointed me in the right direction. This occurred while I was connected to another machine via RDP. Disabling the clipboard sharing for the RDP session (under local resources) resolved.

Excel 2013: “The picture is too large and will be truncated.”


Make a template accept a specific class/family of classes?

Question: I have a template method that is designed to work with a specific set of classes. Since I have no real need for runtime polymorphism, I've decided to not use pointers to the parent class, but rather will have the compiler put everything together for me.
I want to either restrict the type that can be passed to the template, or make GCC issue sensible errors when an incorrect type is passed.
Is this possible?
Answer: Yes.  It is possible using a number of different techniques depending on the specific needs of the day.  There's boost::enable_if.  There's MPL and static_assert...(use BOOST_STATIC_ASSERT if you're not using a C++0x compiler).  There's Boost.Concepts.
Yes.  It is possible.
Answer: On the other hand, you can also NOT use a template.
Let's say you'd like the method to operate only on Car and Dog. Obviously the two are completely unrelated... but they can still move.
// move.h
#include <boost/variant.hpp>

class Car;
class Dog;

typedef boost::variant<Car*,Dog*> move_type;

void move(move_type m);

// move.cpp
#include <boost/apply_visitor.hpp>

#include "car.h"
#include "dog.h"
#include "move.h"

struct Mover: boost::static_visitor<>
{
  void operator()(Car* c) const { c->advance(); }
  void operator()(Dog* d) const { d->run(); }
};

void move(move_type m)
{
  boost::apply_visitor(Mover(), m);
}

And that's even better than a typical template, because the implementation is in the source file :)
Answer: You can do something like what Matthieu said, write out separate functions for each type you support (it can still call a template function in the backend), or use dynamic polymorphism and inheritance. Those should be the only kinds of options you should consider to do what you want to do.
However, the question you're asking leads me to believe that's a misunderstanding of templates and static polymorphism. A function/class template imposes restriction on the types that it can work with through the actual code being generated. The public interface that's used in such functions/classes are what define the constraints on the types that can be accepted. There is no need to superfluously impose additional constraints over that. Why would you want to restrict the types a class/function template can support more than the restrictions placed already?
Let's say you write a function template which can only work on types that implement a public interface which consists of a life accessor, a kill function, and an eat function (basically any living organism). That's the constraint it places: you don't need to limit the flexibility by reducing the number of types that will work with the function template beyond that or define any specific organism types that will work that way. The template already requires this living organism-type interface to be implemented.


Detach the *other* tmux client(s)

Question: I use tmux when working on my desktop, and then if I want to work outside on my laptop I ssh over to the desktop and attach to the same session. Then when I close my laptop and go back inside, the session visible on my desktop is shrunken to show only the rows/columns available on my smaller laptop screen. Without opening up my laptop again, is there some way to force the laptop to detach from the session? Or at least to resize tmux to use all the available space on my desktop screen?
Answer: By default<prefix> D gives you a list of connected clients, and which ever you select is disconnected.
You can also use choose-client from the command line as an augment to tmux, or at tmux's command line <prefix> :
where prefix is C-b by default
NOTE: The 'D' is a capital D
Comment: @ThomasAhle the 'D' is capital. A lower case 'd' detaches your current connection.
Comment: Yes, I know ` d`, but I rarely do that because if I'm getting up for lunch or to stretch, I may not know whether I'm going to resume work from my office or the back porch. :-)
Comment: Wow, it's kind of fun being able to detach myself! ` D` works great.
Comment: The way you say that, and the phrasing of your question makes me wonder if you know about ` d`, the normal way of detaching? (before you close your laptop, you could just detach normally)
Comment: In case this might be helpful for byobu users, it seems that de default tmux prefix under byobu is `ctrl-a`.
Comment: When I do ` D` it just detaches my current terminal
Comment: Is there a way to know in that list which one is the "current client"? I don't want to detach myself :)
Answer: You can also do
tmux attach -t <tmux_session_name> -d

This will detach all other attached clients, and attach this new client.
Comment: If there is only one session, `tmux a -d` is fine.
Answer: If are not already inside a tmux session, you can detach the "other" clients like so:
tmux detach-client

from tmux man page:
detach-client [-P] [-a] [-s target-session] [-t target-client]
               (alias: detach)
         Detach the current client if bound to a key, the client specified with -t,
or all clients currently attached to the session specified by -s.  The
         -a option kills all but the client given with -t.  If -P is given, send
SIGHUP to the parent process of the client, typically causing it to exit.

Detach the *other* tmux client(s)


Make SQL Server Agent retry failed script with Try/Catch

Question: I have a script that has a try catch in it so that if it fails I can roll back the transaction. It runs on a job scheduled through SQL Server Agent. But when it fails SQL Server Agent does not see that it failed, I'm assuming because I catch the error. I want it to still retry the job even if I catch the error. I put in the RAISEERROR command in my catch part of the script to try and throw the error up to SQL Server Agent but it did not work. Any solutions?
Comment: What `RAISERROR` are you using?  The `severity` is relevant.  If it's too low it will be interpreted as informational only.
Answer: Did you use RAISERROR with severity 16?
This is "user defined error" and should be picked up by SQL Server agent
Did you set the job step to retry (Retry Interval and Retry Attempts)
Finally, is the error terminating (severity 20) such that the CATCH block isn't hit?


Determine current roomba state / operating mode

Question: Using the SCI messages, I would like to determine the current operating mode or state of a iRobot Roomba 780. Finally, I would like to detect and separate four states:

Cleaning
In docking station
Returning to docking station
Error (e.g. trapped on obstacle)

What is a fast and reliable way to detect those states using SCI data?
The Roomba SCI Sensor packets "Remote Control Command" and "Buttons" seem to return the currently called commands and not the currently executed ones.
Answer: The manual you linked to is not for the Roomba 780. You'll want to reference the one on this page: http://www.irobot.com/create
You can tell if the robot is on the dock by checking the "Home Base" bit in the charging sources available packet (#34).
There is currently no way to know via the OI if Roomba is trying to find the dock.
Comment: Quite a good hint, thanks. I try to find correlations between different sensor States in order to determine the overall Roomba state, incl. "error".
Answer: I found a partial answers to my question:
The "current" sensor message indicates if the roomba is operating (< 0) or in the docking station (> 0).
Open remains error handling and "searching for docking station".
I'll adapt my answers if I get further.
EDIT 2015-05-05:
The solution which seems to work looks in pseudo code as follows:
<code>if ( charging_state == 5 ) {
  return ERROR;
}
else if ( charging_state == 2 ) {
  return CHARGING;
}
else {
  if ( charger_available == 2 ) {
    return INDOCK;
  }
  else {
    if ( main_brush_current != 0 && current < 0 ) {
      return WORKING;
    }
    else {
      return ERROR;
    }
  }
}
</code>
The "variables" within the if statements are corresponding sensor messages given in the document, linked by @Andrea.
The "return values" indicate the corresponding Roomba states.
Comment: Roomba doesn't *always* draw current while sitting on the dock. It stops charging to allow the battery to cool off.


Nature of system taken in thermodynamics

Question: Why is thermodynamic system always taken as macroscopic ? What will be the changes if one considers the same as microscopic ?
Answer: For "macroscopic" systems, the law of large numbers then prevails, thanks to the atomic composition of thermodynamic materials. At thermodynamic equilibrium, this means that the probability of finding a system in a state whose particles have a distribution of energies much different from the maximum likelihood one is vanishingly small. This also answers how things differ for microscopic systems, i.e. ones with a small number of particles.
To illustrate these points, let's think of the binomial distribution, which describes, say, the probability of drawing a sample of size $N$ containing $m\leq N$ red balls when the overall population is proportion $p$ red. Let's say that $p=0.43$. If we take a small sample, say 10, then mostly you'll draw 4 or 5 balls, but the likelihood of drawing 10 or 0 is not vanishingly small. The distribution is broad and the observed sample (system) is quite likely to be found a long way from its maximum likelihood sample.
Now draw a million balls. The probability of drawing 420 000 or fewer, or 440 000 or greater red balls out of that million works out to be of the order of $10^{-90}$. Just to make sure you understand this is not a typo, that's ten to the power of minus NINETY. The probability of getting a sample with a proportion of red balls significantly different from 0.43 is vanishingly small. This effect is even stronger when you begin dealing with systems comprising Avagadro sized numbers of particles. The probability of observing a system with energy distribution of particles significantly different from the maximum likelihood one of $p(E) \propto \exp\left(-\frac{E}{k\,T}\right)$ is miniscule.
So when you deal with microscopic systems, the maximum likelihood distribution of energies doesn't automatically prevail at high probability. Another way of saying this is that there is a non-negligible for a system's entropy to spontaneously decrease significantly. The various Fluctuation Theorems allow one to estimate the probability of a spontaneous entropy drop of a given size as a function of system  size. Naturally, the size of likely spontaneous drops decreases swiftly with increasing system size.
See my answer to Why are the laws of thermodynamics "supreme among the laws of Nature"? for further discussion of these ideas.
Comment: Many thanks for this answer, I m bit struggling to understand the 2nd paragraph with the balls, i think is very crucial part of the answer, would you mind clarifiying what p is and how you came up with those numbers? Much appreciated in advance. BTW it would be fantastic to have your opinion on this recent post: http://physics.stackexchange.com/questions/219391/distinction-between-various-system-evolution-regimes-in-condensed-matter-systems if time allows
Comment: @user929304 This is using the binomial distribution $P(x,n,p) = \left(\begin{array}{c} n\\x\end{array}\right) p^x (1-p)^{(n-x)};x,\,n\in\mathbb{Z};\;p\in[0,1]$ which is the probability of x successes in $n$ independent trials, each with probability $p$. I have calculated the above using the normal (Gaussian) approximation to the binomial distribution for $n=10^6$ and $p=0.43$. The $0.43$ is a figure I plucked out of the air, being something roughly a half with two significant figures to show that the actual sample will almost certainly have the same proportion of successes as $p$ to within ...
Comment: ... two decimal places, in contrast with the $n=10$ example where the number of successes varies wildly. By the time we reach $n=10^{23}$, the proportional variation is of the order of $10^{-12}$.


Screen angle and brightness

Question: I experienced the same on some Android devices: when changing the angle the screen is looked at, I see that the image gets darker or brighter.
I would like to know if it is so on all devices or just some of them.
Comment: What particular device are you talking about. Are you using glasses? I never experienced something like you described on *any* of my devices (granted they are all Samsung devices with 3 out of 4 being former flagships).
Answer: This is affected by the manufacturer of your device, as well as your own device settings. Different manufacturers use different types of screens for different devices. Some of the different types are: TFT-LCD screens, as well as different kinds of AMOLEDs. I have had one Sony and one Samsung, and have noticed that even though the Sony has higher pixel density and brightness, it cannot be viewed from certain tilts and when natural sun light reflects on the screen, its content goes practically invisible until shaded.
Comment: here is a link which explains some of the differences of screen types: http://www.androidauthority.com/amoled-vs-lcd-differences-572859/

Screen angle and brightness


How plot a waterfall of Frequency with python

Question: I have Frequency vs Magnitude, in a time. r.g.
plt.plot(Frequency[0],Magnitude[0])

Now, I want to see all my Frequency vs Magnitude for each step of time, like the next image.
Any framework suggestion?
Thanks

The image was taken from Here
Comment: matplotlib's `pcolormesh()` also works.
Comment: You're looking for a [spectrogram](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.spectrogram.html)
Comment: Wait no, you have 2D data already? You're looking for [imshow](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html) then
Comment: Yes, I have 400 arrays of Frequencies and 400 arrays of Magnitude.
Answer: You can use imshow or pcolormesh as already commented (differences explained here).
Here is an example, the spectrogram is made with scipy.signal.stft, which creates the dft array for us. I'm not detailling helper functions in order to shorten the code, feel free to ask for details if you need to.

STFT spectrogram + FFT for the red region

import numpy as np
from scipy.io import wavfile
from scipy.signal import stft, hamming
from scipy.fftpack import fft, fftfreq, fftshift
from matplotlib import pyplot as plt

#def init_figure(titles, x_labels, grid=False): ...
#def freq_idx(freqs, fs, n, center=0): ...
#def sample_idx(samples, fs): ...

# Parameters
window = 'hamming' # Type of window
nperseg = 180 # Sample per segment
noverlap = int(nperseg * 0.7) # Overlapping samples
nfft = 256 # Padding length
return_onesided = False # Negative + Positive
scaling = 'spectrum' # Amplitude

freq_low, freq_high = 600, 1780
time_low, time_high = 0.103, 0.1145

# Read data
fs, data = wavfile.read(filepath)
if len(data.shape) > 1: data = data[:,0] # select first channel

# Prepare plot
fig, (ax1, ax2) = init_figure([f'STFT padding={nfft}', 'DFT of selected samples'], ['time (s)', 'amplitude'])

# STFT (f=freqs, t=times, Zxx=STFT of input)
f, t, Zxx = stft(data, fs, window=window, nperseg=nperseg, noverlap=noverlap,
                 nfft=nfft, return_onesided=return_onesided, scaling=scaling)
f_shifted = fftshift(f)
Z_shifted = fftshift(Zxx, axes=0)

# Plot STFT for selected frequencies
freq_slice = slice(*freq_idx([freq_low, freq_high], fs, nfft, center=len(Zxx)//2))
ax1.pcolormesh(t, f_shifted[freq_slice], np.abs(Z_shifted[freq_slice]), shading='gouraud')
ax1.grid()

# FFT on selected samples
sample_slice = slice(*sample_idx([time_low, time_high], fs))
selected_samples = data[sample_slice]
selected_n = len(selected_samples)
X_shifted = fftshift(fft(selected_samples * hamming(selected_n)) / selected_n)
freqs_shifted = fftshift(fftfreq(selected_n, 1/fs))
ax1.axvspan(time_low, time_high, color = 'r', alpha=0.4)

# Plot FFT
freq_slice = slice(*freq_idx([freq_low, freq_high], fs, len(freqs_shifted), center=len(freqs_shifted)//2))
ax2.plot(abs(X_shifted[freq_slice]), freqs_shifted[freq_slice])
ax2.margins(0, tight=True)
ax2.grid()
fig.tight_layout()


Scalability of uPort for millions of users scenarios

Question: I am currently working on a project using Ethereum, IPFS off-chain storage and uPort for identity management in a private Blockchain.
I fail to find any study/project that analyzes the scalability of uPort with data for scenarios when millions of people need to give some personnal information through uPort. How many servers would be required? How would it scale with data size? Time overhead? etc.
Thank you.
Answer: You can find here an answer for this question (scalability section):
https://www.researchgate.net/publication/351675111_NovidChain_Blockchain-based_privacy-preserving_platform_for_COVID-19_testvaccine_certificates
Comment: It would be nice if you can put a sentence or two about the results, so if the link breaks the answer will still be helpful.


Maximum area of rectangle circumscribed about another rectangle.

Question: While studying, I came upon this problem: "Find the maximum area of a rectangle circumscribed about a fixed rectangle of length 8 and width 4." I looked at the answer key, which showed that the maximum area possible was 72 inches squared. Also, it stated to use cosine and sine functions to solve the problem. However, I do not get how to apply these two functions to this problem. Could someone explain how to achieve this answer?
Answer: Hint: Drawing a picture is usually helpful. So draw a rectangle centered at the origin, and draw a ray emanating from the origin at an angle $\theta$ from the positive $x$-axis (for simplicity, take $0<\theta<\pi/2$, and take $\theta$ just slightly less than $\pi/2$ so the ray is just a little less than vertical).
Now draw the circumscribed rectangle whose sides are parallel/perpendicular to this ray (two will be parallel, two perpendicular). The interior of the circumscribed rectangle contains the original rectangle and four right triangles. The angles in these right triangles will be $\pi/2$, $\theta$, and $\pi/2-\theta$. The hypotenuse of each of these right triangles is a side of the  original triangle. You can determine area of each of the right triangles as $\frac12\times$base$\times$height, and the base and height of each of them can be determined using the hypotenuse (a side of the original rectangle) and the sine or cosine (as appropriate according to your drawing) of one of the angles ($\theta$ or $\pi/2 - \theta$ as appropriate according to your drawing).
Now find which $\theta$ produces the greatest total area.
Answer: In the figure below, the black rectangle is circumscribed around the blue
rectangle:

The edges of the two rectangles make an angle $\theta$, as shown in the figure.
Now see if you can tell what the lengths of $p$, $q$, $r$, and $s$ are in this figure, and if you can see what that has to do with the cosine and sine functions.
(Note that if you draw any blue rectangle and circumscribe a rectangle around it, the sizes of the two rectangles do not change when you rotate the entire
figure in the plane. I have chosen to rotate the figure so that the black rectangle is "straight", both because it was easier to draw this way and
because I think it helps in understanding the hint above. But if you don't like the orientation of this figure, rotate it again so that the blue rectangle is back exactly where it was in the first place; the lengths of the labeled segments will still be the same as they are now.)
Answer: The circumscribed rectangle is the union of the original $a\times b$-rectangle and four similar right triangles with hypotenuses $a$, resp. $b$. The total area is maximal when one of these triangles, and therewith all of them, have maximal area, and this is the case when they are all isosceles.
Answer: Two vertices of the circumscribed rectangle
are located on the semicircles
centered at $O_1$ and $O_2$:

The area of a rectangle $S$, circumscribed
around the rectangle $ABCD$, consists of the
fixed part $S_{ABCD}=8\cdot 4=32$ plus
doubled sum of $S_{CED}$ and $S_{ADF}$,
controlled by the angle $\phi$.
Also, $\triangle CED$ is congruent to $\triangle ADF$.
With the base of $\triangle CED$ fixed,
the maximum of the area is reached
when the height $|EG|$ is maximal, that is,
$|EG|=r_1=\frac12|CD|=4$, when
$\phi=\frac{\pi}{4}$.
$S_{\max}=8\cdot4+2(\frac12 8\cdot4+\frac12 4\cdot2)=72.$


he_normal (Keras) is truncated when kaiming_normal_ (pytorch) is not

Question: Thanks for having a look at my post.
I had an extensive look at the difference in weight initialization between pytorch
and Keras, and it appears that the definition of he_normal (Keras)
and kaiming_normal_ (pytorch) is different across the two platforms.
They both claim to be applying the solution presented in He et al. 2015 (https://arxiv.org/abs/1502.01852) :
https://pytorch.org/docs/stable/nn.init.html,
https://www.tensorflow.org/api_docs/python/tf/keras/initializers/HeNormal.
However, I found no trace of truncation in that later paper.
To me truncation makes a lot of sense.
Do I have a bug in my simple code that follows, or indeed these two platforms claim
to apply a solution from a paper, but differ in their implementation.
Then how is correct? What is best?

import numpy as np
import matplotlib.pyplot as plt

import torch

import keras
import keras.models as Model
from keras.layers import Input
from keras.layers.core import Dense

real = 100

### pyTorch
params = np.array([])
for _ in range(real):
    lin = torch.nn.Linear(in_features=16, out_features=16)
    torch.nn.init.kaiming_normal_(lin.weight)
    params = np.append(params,lin.weight.detach().numpy())
params = params.flatten()
plt.hist(params,bins=50,alpha=0.4,label=r'PyTorch')

### Keras
params = np.array([])
for _ in range(real):
    X_input = Input([16])
    X = Dense(units=16, activation='relu', kernel_initializer='he_normal')(X_input)
    model = Model.Model(inputs=X_input,outputs=X)
    params = np.append(params,model.get_weights()[0])
params = params.flatten()
plt.hist(params,bins=50,alpha=0.4,label=r'Keras')

###
plt.xlabel(r'Weights')
plt.ylabel(r'#')
plt.yscale('log')
plt.legend()
plt.grid()
plt.show()

Comment: Tensorflow also doesn't have the option to specify the nonlinearity. Would be nice to have an explanation of these differences as well.
Answer: I think you're correct that the two initializers are different; this difference is consistent with the description in the documentation.
For Keras, the documentation says

It draws samples from a truncated normal distribution centered on 0 with stddev = sqrt(2 / fan_in) where fan_in is the number of input units in the weight tensor.

Where by contrast, for Torch, the documentation says

Fills the input Tensor with values according to the method described in Delving deep into rectifiers: Surpassing human-level performance on ImageNet classification - He, K. et al. (2015), using a normal distribution. The resulting tensor will have values sampled from $\mathcal{N}(0, \text{std}^2)$ where
$$\text{std} = \frac{\text{gain}}{\sqrt{\text{fan_mode}}}$$

Choosing $\text{gain}=\sqrt{2}$ and $\text{fan_mode}=\text{fan_in}$ makes the standard deviations the same, but the Keras function is using a truncated distribution while the Torch function is not, so the resulting distributions will be different. Again, this is consistent with your findings.
So the Torch function isn't truncating, while the Keras function is.
When we look to the paper, again, you're correct: the He 2015 paper does not describe a truncation in the text. Since the cited article doesn't seem to support the initialization for the Keras function, it could be reasonable to create an issue on the library's Github or another official Keras channel. It's also possible that the Keras authors meant to cite a different article, or something like that.
As for your last question,

What is best?

Best for what? Does one of the initializations suit your task well? If so, use that one. If not, use a different one. The He paper describes a network design and finds that this initialization works well, and provides some commentary and theoretical justification. But the network that you want to build may not match the models He was examining, or it may not conform to some of the assumptions that He made in the theoretical analysis. In particular, the He paper is focused on ReLU and PReLU networks; if you're using a different activation function, your results may require an alternative initialization scheme.
Comment: @Luke It comes from the discussion about equation 15 in the He paper. He first shows how to enforce unit variance in the case of a ReLU activation (eq. 10). Then in discussing Eq. 15, He shows the same in the case of a PReLU activation. My inference is that this distinction is why the software supports an "activation" argument: different activations will have different consequences for the variance of their outputs.
Comment: Any sense on the rational for the different initializations based on nonlinearities? I don't see that in the He paper. It's got to come from somewhere.


Display the temperature using the LCD

Question: In order to display the temperature in three integral and one fractional digits using the LCD over the range of the temperature sensor and updating the display data five times per second, what critical data should I obtain? I have a successive approximation ADC and the e clock of the MCU is 24 MHz. I have used a scaling circuit to connect the sensor to MCU. The sensor has a 10 mv/C voltage slope between its output voltage and temperature. I do not know how to calculate the temperature from the vout that I see.
Answer: From the information you provided, the answer is very simple.  If the sensor has an output of 10 mv/C, then the indicated temperature is found by dividing the sensor output (in millivolts) by 10.  For example, if the sensor output is 100 mv, then the temperature is 10C. You may need to scale your ADC output to obtain the sensor output in millivolts depending on the ADC reference voltage and resolution.
Comment: In the text book it says that " to convert the A/D conversion result to the corresponding temperature we need to divide the conversion result by 6.2. I honestly don't know where this number comes from
Comment: The range of the voltage connected to AN7 pin is between 9 and 5.
Comment: I think The A/D conversion results should be converted to the actual analog voltages
Comment: I had to use scalers to feed the signal to the MCU so it won't be a simple dividing by 10 I guess.

Display the temperature using the LCD


Device to train abs while sitting

Question: I was looking today and I saw that there is a device to train abs without exercising. I'd like to know if should I buy something like this to strengthen and define my abs? I have a normal body fat value with little visible abs. Is a good idea to buy this? I am just sitting in a chair and this is doing like "massage", will this help to define my abs?
Comment: Nope, don't buy this crap, it's not working
Comment: Principes there is the same as in EMS training. EMS came from therapy for paralized people, to force their muscles to find out how to work by stimulate'em by electricity, so in this way it really useful. But if you expect some hyperthrophy and (whats most important here) losing fat on your belly - it would not work
Comment: Seriously? gtfooh
Answer: Exercise Rule #1
If you're not moving your not exercising!
This is also called the Rule of Inertia
When was the last time you sat in a chair, strapped a machine to yourself and then magically received a Million dollars...?
If recently, then yes I highly recommend you buy the device.
Otherwise despite what anyone trying to sell you something might say, Rule #1 holds true.
There is no mythical device that can lower your belly fat and give you killer abs (or a million dollars).
Instead invest your money in a competent personal trainer or home video workout program. (My suggestion as a competent personal trainer would be the AthleanX Programs)

Device to train abs while sitting


Paraphrasing an ancient proverb, but has been recently translated copyright in a novel question

Question: Ok, so this is originally attributed to Chuang Tzu who was around in the BC era. However, all the sources I can really find on it are from a translation in 1965. So what are the rules on this one? Is it ok to paraphrase the proverb?
Answer: Copyright does not protect ideas, only forms of expression. Thus paraphrasing a copyright-protected work is not infringement, unless the paraphrase is so close that the result is a derivative work.
A "proverb " is often so short that it has no copyright at all, or lesser protection. In the case of a normal proverb, a paraphrase is unlikely to be considered infringement.
If this is under US law, such a paraphrase might well be fair use, an exception to copyright, and so not infringement. But whether something is fair use or not is a highly-fact-driven determination, and can not be finally made except by the court. There is not enough detailed context here to make even a rough determination.
You might want to post on LAW.SE with significantly more context, including the translated proverb and where it is used. Copyright and fair use questions come up there quite often. Or you might read existing answers under those tags on that site.
Comment: Go to the Chinese Text Project website, see if you can trace the original text, and come up with your own translation. (https://ctext.org/)
Answer: You are free to retell any of the stories from the Chuang Tzu in your own words, but a translation published in 1965 may still be under copyright. Websites like "The Gutenburg Project", "Sacredtexts.com" or "Amazon Classics" stick to works in the public domain, which anyone can use without restriction.
I am fairly sure that James Legge's 19th cent. translation (published in "Sacred Works Of The East") is in the public domain. Look in the "Internet Sacred Texts Archive".


Why is my question off-topic?

Question: The question doesn't involve the application of any physical principles to the design or manufacture of any real-world product, nor does it involve any consideration for practical utility*, costs, material availability, or existing technologies. Additionally, the creation of nano-scale hook and loop fasteners is a profoundly stupid idea, as adhesion via intermolecular, electrostatic, and/or magnetic interaction is infinitely easier (and presumably less costly) to achieve at this scale than mechanical adhesion**, so if this were intended as an engineering question it wouldn't be a very good one. It would make very little sense for me to ask the question except out of pure, academic curiosity.
The linked meta post regarding the distinction between physics and engineering questions explicitly states that questions inspired by engineering considerations may be considered on-topic. In particular, questions regarding physical limits of man-made systems (e.g. telescopes, computers, wires) are considered relevant. My question concerns the [estimation of the] theoretical lower limit of the diameter of the fibers/wires used in the construction of hook and loop fasteners. I believe that this should be considered an engineering-inspired question, rather than an engineering question, in the same manner as the listed examples.
Considered at the level of a single hook and loop, the question is quite nearly "what is the smallest possible diameter for a spring?" The reason I didn't ask that question is that 1) I already know the answer (either "smaller than we can resolve" or "define spring") and 2) that isn't what I'm concerned with. The entire reason for asking the question is that I don't have a neat form-fitting model for the seemingly simple system under consideration, and I want to make an educated guess. It's a physical Fermi problem which I find particularly interesting for its occupation of the unknown (to me) space between "quantum" and "classical."
Now I can understand if the writing is misleading, so I will try to clarify the things that look the most engineery or otherwise non-physicsy to me:

I included some details regarding the hypothetical (and potentially impossible) construction of atomic-scale fasteners using graphene, and maybe this made it seem that I was genuinely proposing the creation of such a "product." This was not my intention, the point was to illustrate a scale at which I am confident that hook and loop fasteners can't work, and to give some justification for my thinking. I named graphene as a material because carbon compounds are exceptionally well-studied, and it would be the easy to find any information I might need for an estimate of, say, the rate of formation of chemical bonds between the strips. I could have assumed sheets of an arbitrary two-dimensional material instead, but that would make the problem harder than it already is. The whole point of the introduction was to establish that there is probably some limit to the size of hook and loop fasteners, so attempting to account for every possible version of the atomic setup would only make sense if I thought it would produce a positive result.

Of course, I could be entirely wrong. Maybe interactions between atom-thick hooks and loops are predominantly mechanical; but that's why I'm asking the question.

Likewise, I bring up that certain biological structures can become tangled. The point of this was to indicate that classical effects (e.g. stiffness, friction, other stress/strain type stuff) persist at the μm scale.

I later mentioned biological activity as a source of deterioration. This second reference to biology is unrelated to the first, and was not meant to indicate something to be accounted for in the problem, rather to illustrate that macroscopic hook and loop fasteners are not immune to chemical, thermodynamic, etc. effects and to provide an example of such an effect - as well as to illustrate why such effects can generally be neglected in the macroscopic case. I wanted to distinguish mechanical failure from failure due to chemical decomposition, because the latter becomes increasingly significant at smaller scales. The point I was trying to make is that while deteriation through means other than mechanical failure does occur even in the macroscopic case, it is less significant. To still count as "hook and loop fasteners" the same relation should hold at the microscopic scale - we need the hooks and loops to remain intact for at least as long at takes to undergo structural failure. If molecular interactions overtake mechanical ones before structural failure, then the system shouldn't be considered an example of hook and loop fasteners.

This is probably the least clear of my points, and I can see how it might be counterintuitive. At the macroscopic scale, we don't usually think about chemical interaction at all, we just assume that everything is made out of pure geometry, and immune to thermodynamics. But at the microscopic scale, chemical interactions are often more significant than mechanical ones. In order to count as a hook and loop fastener, interaction between the hook and loop needs to be primarily mechanical and the structures need to remain stable long enough for this interaction to occur multiple times.

I suppose that the use of the academic "we" and the specific naming of Velcro (a registered trademark of the of Velcro IP Holdings LLC) could make it seem that I am representing Velcro or some other company. This is certainly not the case, I used the term "velcro" (note the lack of capitalization) colloquially in place of "hook and loop fastener" because 1) it is a commonly understood name for the mechanical system in question and is more likely to be recognized by the casual reader than the technically correct "hook and loop fastener" 2) it is shorter and less tedious than "hook and loop fastener" 3) it carries the denotation of a surface with many individual hooks and loops, whereas "hook and loop fastener" is ambiguous and could refer to a single hook-loop pair. Similarly, my use of "we" was meant in the usual sense to refer to the speaker/writer (myself) and the listener/reader following the convention of scientific and mathematical literature when posing hypotheticals, definitions, or conventions, as in "we adopt the $(+,-,-,-)$ sign convention."

The additional use of "Atomic Velcro (TM)" was intended to be humorous and does not, to my knowledge, refer to any existing, planned, or proposed product or trademark of Velcro or any other company. As stated previously, the creation of literal atomic scale hook and loop fasteners is wildly impractical, if not wholly impossible, and, more significantly, entirely pointless given the existence of much better alternatives.
If the use of the term "velcro" is in violation of any site rule and/or negatively impacts the clarity of the question, I am happy to change it.
Aside from these issues, I'm not sure how the question could be misinterpreted. Is there some other reason that the question is off-topic? Is there anything I can do to improve it?

*Beyond "the structure in question must remain physically stable for long enough that its classification as 'hook and loop fastener' makes sense". If we regard this as an engineering concern, rather than a definition, then the retention of elasticity in a spring is likewise an engineering concern and should neither motivate nor be included in the discussion of mass-spring systems. That is to say, we should regard the long-term retention of elasticity - operationalized analogously to my question as "not undergoing degradation through non-mechanical means in less time than is required for structural failure (permanent deformation and/or loss of elasticity through mechanical means)" or equivalently as "doesn't turn to dust after a single cycle" - as an engineering concern. (Taken to its logical conclusion, the continued consideration of "springiness" as a physical property, rather than engineering concern, then either makes anything capable of deformation (for example, a steel chair) a "spring," or leaves the term "spring" undefined. Or it renders our categorization of things as "of concern primarily to physics" and "of concern primarily to engineering" arbitrary.)
**In fact some of the world's most brilliant engineers have recently proposed an innovative design for a new kind of adhesive surface which operates on precisely these principles. They're calling it "adhesive tape." While it's still experimental, it could become commercially by the early 1920s.
Answer: I see your question as difficult to answer using physics principles, but easier to answer using engineering principles.  I'm not an engineer and I could be wrong of course.  So it seems it's better suited for an engineering SE subsite (or possibly even chemistry).
It is good that you read in details the closure reason, but maybe your reading is somewhat overly narrow and excludes my (possibly erroneous) understanding of engineering principles.
At any rate, it is a good question, just possibly not such a good fit for Physics SE, and you might find better answers on an engineering subsite.

Why is my question off-topic?


The Model in MVC

Question: I am just starting on ASP.NET MVC trying to understand the philosophy first. I think I am pretty clear on the roles played by the controller and the view but I am a little confused on the model part. Some sources say its the domain model, some say its the data model, some say its the objects that are bound to the view.
IMHO these are very different things. So please can someone clear this up once and for all?
Answer: The model is "the domain-specific representation of the information on which the application operates".  It's not just the data model, as that's a lower level than the MVC pattern thinks about, but (for example) it's the classes that encapsulate the data, and let you perform processing on them.
Scott Guthrie from MS uses this definition in his announcement:

"Models" in a MVC based application
  are the components of the application
  that are responsible for maintaining
  state.  Often this state is persisted
  inside a database (for example: we
  might have a Product class that is
  used to represent order data from the
  Products table inside SQL).

Further reading:

the MVC Wikipedia article
the MVC pattern on C2
Comment: Who/What manipulates and operates on the state if the model exists only to maintain state. I hope you don't say controller or else I'll be confused about them as well :|
Comment: "Controller: Processes and responds to events (typically user actions) and may indirectly invoke changes on the model."  The user invokes an action and that will change the model, causing an update to the view.
Answer: I like to actually add an additional layer to make things clearer.  Basically, the "Model" is the thing that is domain specific, and knows how to persist itself (assuming persistence is part of the domain).
IMO, the other layer I referred to I call the ViewModel ... sometimes, the "model" that gets passed to the view really has nothing to do with the domain ... it will have things like validation information, user display info, lookup list values for displaying in the view.
I think that's the disconnect you're having :-)
Answer: Your sources of advice are correct when they say it is the domain model. In many instances, it will be quite closely aligned your data model as well.
Where the domain and data models differ is that the data model is relatively static in form (not content) whereas your domain model adds the specific constraints and rules of your domain. For example, in my data model (database) I represent blood pressure as smallints (systolic and diastolic).  In my domain model, I have a "blood pressure reading" object that holds values for each of the two readings and that also imposes additional restrictions on the range of acceptable values (e.g. the range for systolic is much smaller than that for smallints).  It also adds qualitative judgments on these values (a BP of 150/90 is "high").
The addition of these aspects of the problem domain is what makes the domain model more than just the data model.  In some domains (e.g. those that would be better rendered with a fully object-oriented data model and that map poorly on the relational model) you'll find that the two diverge quite significantly. However, all the systems I've created feature a very high degree of overlap.  Indeed, I often push a fair number of domain constraints into the data model itself via stored procedures, user-defined types, etc.
Answer: You should have a look at this it a step by step tutorial.
From one of the chapters: page 26
In a model-view-controller framework the term "model" refers to the objects that represent the data of
the application, as well as the corresponding domain logic that integrates validation and business rules
with it.  The model is in many ways the "heart" of an MVC-based application, and as we'll see later
fundamentally drives the behavior of it.
Hope its useful.
Answer: For example, if you're building a web site to, say, manage operations of a nuclear plant, than the model is the model of the plant, complete with properties for current operating parameters (temperature etc.), methods to start/stop power generation, etc. Mmmm... in this case the model is a actually a projection of a real plant vs. an isolated mode but you got the idea.

The Model in MVC


Is it ok to share/show(for review) the proof that you made for your research paper on stackexchange

Question: Some time I have to use some mathematical proofs in my research papers. In many situations it happens that the proof is my own and I have not seen it in the literature. In these situations the proof works fine for me but I can not say for sure that its 100% correct (because there may be some fundamental errors which I do not realize). In this case is it ok to have it reviewed from the experts on the stackexchange. If I submit it through a research paper then it may be very late. Does sharing it on stackexchange risks its originality (if there is some) and subsequent lesser chance of being accepted as the research article?
Comment: Read these: http://meta.math.stackexchange.com/q/1878/11323 and http://meta.math.stackexchange.com/q/4597/11323
Comment: I'm no expert, but I was told many times not to share any of my research if it wasn't not published! Why can't you ask professors in your dept.? Your colleagues? Advisor?
Answer: You've done some original research, you get very exited, and you want someone to share it with. Often MSE is the easiest place to find an audience. I am often tempted to post parts of my research there, but try not to.  For one thing my discoveries always seem obvious after I've made them, and I worry about being scooped.  That's my biggest fear.  And your posts on this site stay up FOREVER. Most journals will probably not care because most accept papers after they have been posted on Arxiv.  But, if you end up using part of someone's answer in your paper, ethically you should cite them. I would rather torture myself for a few more days and come up with a perfectly clear and logical proof on my own than cite some guy on SE.
That being said, if you really want to use MSE for proof checking here's what I suggest.  Try to find the specific part of your proof you are unsure about, and then craft a question that is as general as possible but such that an answer will let you know if you were correct.
Comment: "I would rather torture myself ... than cite some guy on SE." --Why? How it's different from communications with your colleagues in your university?
Comment: It's not different, I just prefer to work alone.
Comment: @ForeverMozart I agree that one can torture himself to find a proof but what if a similar proof is already provided by somebody on SE but the person who torture himself does not know about this. In this case what will be the originality of the proof in the eyes of a reviewer of the research paper?
Comment: @FrankMoses Well, I assume your overall research problem has not been solved.  To find this out, you should search SE, google, MathSciNet, etc.  If there is just a small piece of your argument that you want to check, then you can probably phrase it in a very general way and post that on SE.


How do I complete the "Get hit by a car" challenge in Goat Simulator?

Question: I'm playing the newly-updated 1.1 version of Goat Simulator.  One of the new challenges in the game is to "Get hit by a car".  I have mercilessly thrown my goat into every type of car and truck I could find, but to no avail.  What department of goat do I need to register with in order to get rewarded for my reckless behavior?
Answer: Sadly enough, this appears to be a bug as reported here:

"Car Accident" quest in the Goat Bay does not work. I get hit by those cars driving down the road, but the resulting 20 points lists no source. Trucks work fine, it reads those, but it doesn't read those cars as capable of inflicting "Hit by a car".
Answer: It is definitely possible in goatville (I've done it before), but I'm not sure about Goat Bay. Maybe you have a different version of the game (I have goat simulator: the goaty on Nintendo switch).
Comment: Welcome to gaming.se - this post is very old, and there wasn't a Nintendo Switch when it was originally posted, let alone a Goat Simulator release for the Switch.  There was only the Steam store version. I'd update the question, but it hasn't significantly changed since it was posted, so I'll just suggest you update this answer to reflect that it is specifically providing information relevant to the Switch release.


Web server with or without Panel

Question: I start a Web server for my company for hosting about 15 website and I didn't install a Control Panel, I do everything by command and i'm pretty comfortable with it but do you think i'm losing time by doing all the task by command ???
Answer: To be honest, No.
I am currently helping out friends setup their hosting using different CPs and also manage the webserver for my organization.
I find that doing things the console way is way faster once you get the hang of it. A CP ensures that you do not shoot yourself in the foot when you are on the console.

Web server with or without Panel


Autocompete using phpDoc

Question: I heard you can use phpDoc to help IDE with autocomplete. Can someone show how to use it with Doctrine?
For example, I have a JobTable class that extends Doctrine_Table with a bunch of methods and would like to have autocompletion when i type: Doctrine::getTable('Job')-> ... Is it possible? Is there a way to do it without phpDoc?
Answer: phpDoc comments assist autocompletion mechanism because the IDE then knows the types of the parameters.
<code>/**
 * @param $foo FudgingBreakingImpl
 */
function doStuff($foo) { ... }
</code>
This way, the IDE knows that $foo is of type FudgingBreakingImpl, so it can autocomplete anything related to $foo, e.g. <code>$foo->someMet</code>.
Comment: But that is just another way of saying function doStuff(FudgingBreakingImpl $foo) isn't it?
Answer: In your example need of your code extending a Doctrine class, your IDE will need to know where that Doctrine code is in order to know what that object looks like.
In Eclipse, this is a matter of having the Doctrine code locally on your machine and telling your Eclipse project's "Build Path" / "Include Path" where to find it.
Unless the IDE is capable of inspecting that Doctrine code, there's no way it can know things your own code is inheriting from the Doctrine class.

Autocompete using phpDoc


Is it possible to get step-by-step information about qiskit transpilation?

Question: Is it possible to get the information about the step by step transpilation? I have circuits that I know how it is more or less structured after the transpilation, but when I join them to create a bigger circuit it's difficult to see how qiskit arrives at the final result.
Answer: The standard way to debug transpile is via the callback option. From the documentation:

A callback function that will be called after each pass execution. The function will be called with 5 keyword arguments,    * pass_: the
pass being run.

dag: the dag output of the pass.
time: the time to execute the pass.
property_set: the property set.
count: the index for the pass execution.

[...] For example:
def callback_func(**kwargs):
    pass_ = kwargs['pass_']
    dag = kwargs['dag']
    time = kwargs['time']
    property_set = kwargs['property_set']
    count = kwargs['count']

transpile(circ, callback=callback_func)

You can use callback to inspect intermediate states of the DAGCircuit, which is the internal representation of your circuit.
Example
My usual workflow starts with detecting the interesting "jump". Most of the time count_ops does the trick.
def callback_func(**kwargs):
    dag = kwargs['dag']
    pass_ = kwargs['pass_']
    count = kwargs['count']
    print(count, pass_.name(), dag.count_ops())

When executing with this callback, the output looks something like this:
0 ContainsInstruction {'quantum_volume_[3,4,42]': 1}
1 UnitarySynthesis {'quantum_volume_[3,4,42]': 1}
2 HighLevelSynthesis {'quantum_volume_[3,4,42]': 1}
3 UnrollCustomDefinitions {'u': 32, 'cx': 12}
4 BasisTranslator {'cx': 12, 'rz': 96, 'sx': 64}
...

I might notice that, say, UnrollCustomDefinitions changes the basis is a way I was not expected. Then, I focus on that one, getting the circuit before and after:
from qiskit.converters import dag_to_circuit

def callback_func(**kwargs):
    dag = kwargs['dag']
    count = kwargs['count']
    if 2 <= count <= 3:
        print(dag_to_circuit(dag))

This will print the circuit at count 2 and 3 (before and after UnrollCustomDefinitions).
Important note: Consider setting transpile(..., seed_transpiler=) to make sure the transpilation process is always the same.
Other tools
Alternatively, you can set a breakpoint inside the callback_func definition to explore the transpilation with your usually debugger. For some situations, this might be the prefer way, instead of rerunning transpile several times, like in the example.
There are other tools, like Harshit Gupta's https://github.com/TheGupta2012/qiskit-timeline-debugger which provide you a more user friendly way to see your circuit evolution.
Comment: example added. Let me know if it helps.
Comment: Is it possible to ask for an example? I just want to print all the pipeline from the beginning to the final circuit presented in the notebook.
Comment: Many thanks for the example (callbacks is something, since ns3) I wasn't expected to find too often.

It seems everything will work pretty well, thanks a lot!


Kids wont potty train

Question: I have 2 kids, ages 6 and 7. Neither of them have ever been completely potty trained. Neither of them pee themselves but both poop themselves. Both of them are in therapy, we've seen doctors and they say nothing is wrong, we've tried numerous forms of rewards and punishments, and parenting seminars. If something does work, it only latst a little while. They are making the choice to poop themselves and/or not wipe themselves. I don't know what to do anymore. I can't do this anymore. Almost every day we are getting a call from one of their teachers or the school nurse. Bullying has started already. Neither of them seem to care that they are doing this. My 6yo actually got mad yesterday and went into the corner of the classroom and pooped herself. She had just been asked if she needed to go bc she said that her stomach hurt and she said no. She actually lied and said that she had gone that morning. Any advice would be greatly appreciated.
Comment: Please  search the site for the tag *encopresis*. There is a lot of information about this frustrating problem.
Answer: Here's the first paragraph in an article from the National Institute of Health on Encopresis.

Encopresis or fecal incontinence is defined as the involuntary passing of stool into inappropriate places such as the underwear in children older than four years of age. It represents severe psychological distress on children and their families. This activity reviews the evaluation and management of encopresis and highlights the role of the interprofessional team, including pediatricians, child psychiatrists, and pediatric gastroenterologists in approaching and treating children with this condition.

Since you don't go into detail about the doctors that your children have seen, I thought this article might be helpful in that it describes the team of providers that they recommend be involved with a child's care.
The article states that for the majority of children with Encopresis, chronic constipation is the root cause.  If that were true for your children, it might explain why your parentimg interventions work for only a short time.
For sure, poop is not the most pleasant topic of discussion, for example, when the family is gathered around the dinner table, yet pooping is a critical bodily function.  My experience was that my children didn't know what was "normal" and healthy until I told them in clear plain language.
It seems likely that you have already covered that topic with your kids, but just in case you haven't, you might consider putting poop/pooping/digestion on the family discussion agenda.
My family has a history of digestive issues, and my mother never talked about poop, and as a result I suffered the constipation-diarrhea cycle until I was in my early 20s.  Having suffered for so long, when I had kids I made sure that we openly and repeatedly talked about poop, and what I found was that my kids had questions, but ones that they only shared after I brought up the topic.
Comment: One other thing is to get a simple childs body book (I used the usborne "My first body book") and go over the digestive system that shows how the food moves through the body. I read this book to my daughter from quite early (like 2) and she never had a fear of pooping
Answer: I believe that it is due to your children's fear of pooping. My 4-year-old son pooped in his pants one time at his preschool, but only one time. Here is my personal advice:
First, it is highly recommended to make your child have a firm belief in you, not as a parent but as a sympathizer. Second, you should train your kid to pay attention to and be aware of pooping in the potty (when you feel your kid wants to poop, you just take his potty and patiently sit near it, just saying "it's time to poop so that your belly won't feel hurt"). Third, you should either encourage or reward him after he can poop "What do you feel now? Is your belly comfortable? Well done". Last but not least, you need to let him eat enough fruits and vegetables, and drink sufficient water.

Kids wont potty train


How do I control for a level-2 time-invariant covariate in a multilevel growth curve?

Question: I am analyzing a repeated measures experiment with a multilevel growth curve in SPSS. I want to control for a potential confound (baseline social support) when looking at differences in depressive symptoms between my groups. My measure of social support is a level-2, time-invariant variable (only measured at baseline). To control for this variable, is it sufficient to just enter it as a main effect in the fixed effects portion of the model? Or do I also need to enter a time*social support interaction to control for its influence on depressive symptoms across all timepoints?
Answer: You can control for social support by including it as a predictor in the fixed effect part of your model. Then all other coefficients are telling you about outcome differences when comparing two individuals with the same value of social support.
The issue of a time by social support interaction addresses a different issue, which you alluded to. Such an interaction would indicate whether changes in your outcome are at all different for individuals with higher/lower social support. This could serve a similar covariate role in the case that you were interacting other level 2 variables with time. This is consistent with Raudenbush & Bryk's notion of a "slopes as outcome" model.
Most folks would likely do the first (social support as predictor) and only do the second (interaction) if they had a hypothesis about the moderating role of social support on outcome changes.
Comment: For clarity's sake, I would add that including social support as a predictor in the fixed part of the model not only controls for the effect of social support in the beta's for other predictors, but also includes an effect of social support on average depression scores across time points. Adding the support*time interaction effect tells you whether depression trajectories change as a function of social support (and vice versa).


InDesign Source file access

Question: My manager wants to give our account managers access to my InDesign source files to make last-minute text changes to client brochures. I have been asked to create a 2nd source file and save the file within the manager's folder on our server for them to access. She thinks keeping a master 1st version of the InDesign source file within my folder is a good idea, just in case the managers mess up the formatting within the 2nd version of the source files. I disagree, thinking they will not make any formatting mistakes so drastic that we will have to revert back to my "Master source file" and that we should only have 1 InDesign source file and not 2. This entire process is upper management's idea. What do you all think? Is 2 source files a good idea or a bad idea?
Comment: ALWAYS keep a master source file. You have no idea how badly accounts managers will mess up your files. Even better: if possible, use InCopy so the scope of what the account managers can screw up is limited (but still keep an extra master source file as backup).
Comment: How good is your backup strategy otherwise? You only need someone to irrevocably screw up your only copy of a source once.
Comment: Thank you all for the feedback. I have never used InCopy. How would I utilize it within this process? I guess I will research, but any additional advice would be helpful. Thanks again!
Comment: Well, in reality what is being suggested is a poor mans version control system. It would be better if you used some sort a version control system for this instead, since it would allow you to track changes made and eliminate guesswork when copying since it will just correctly copy everything needed in new file structure. But yes keeping a backup is the thing to do again version control maks it easy for you to make this backup.
Answer: You'd be amazed at what can happen in the hands of untrained InDesign users.
Your manager is correct.
Keep a solid original version of the file — either yourself or via a stable, reliable backup system.

Although the manager is correct here, it shouldn't really matter if the manager is correct or not. That's what the boss wants you to do.
Answer: Your manager is correct. Share the files, but keep your own copy intact, to protect the original work from accidental damage.

InDesign Source file access


How can you do romantic character development without writing romantic dialogues?

Question: How can you do romantic character development without writing romantic dialogues? I am bad at writing romantic dialogues, so I was wondering if it was possible to make so that two characters develop genuine and romantic feelings to each other without writing romantic dialogues that are Twilightesque. Is it possible to keep it to a minimum and just imply that romantic relationships are slowly developing without showing what's causing these romantic feeling to develop or is this some kind of plot hole?
Comment: Well, they do say "Actions speak louder than words." You can imply a growing bond with growing trust, caring and protectiveness, etc.
Answer: Oh this one is my favorite.

they understand each other in vulnerable moments

they can control each other. (now I do not mean this in a manipulative way but rather in a "stay put!" kinda way. Does that make sense?)

they listen to each. (you don't need to make them have deep exchanges, just when the times comes they actually take each others advice)

4)they PROTECT EACH OTHEr (this one is probably the most cliché but yes it's necessary)
Now this was the first part of your questions. And for the Second part I would say.  Yes.  It's absolutely possible. Have you read the detective novel Tokyo zodiac murders? In there the romantic tension between the detective and his side kick was huge. But never once did they exchange any corny dialogues.
From reading that book I can yield some advices for you.

make one of the characters desperate for trying to understand the other to the point that they are obsessively thinking only about the other

one the romantic interests would go lengths and break out of there own comfort zone so that their love interest's goals can happen.

As the plot advances make one of them observe little things about the other, like suddenly they are observing how their lips curve into a puffy little pout when they are upset,  or how they look really mad when eating good food. Or how they fold their clothes neatly and perfectly taking all the time in the world or how they tuck their hair behind their ears or how delicately they would work towards they goal. I could go on TBH.

Make one of the characters show off, like for example.
mc : "he will always chose me"
He : chooses mc
Mc: told you.  sly smile

mc : he used to cook for me secretly when everyone was sleeping
He : gets shy

they like to hold hands. Through the forest,  through their adventures they hold hand. Why? mc comes up with excuses but they never ask any questions or make any sound when it happens. It's like a little moment between the two of them that slows down their breathing as they feel the softness of each other palm. Mc: gets embarrassed "your palms are so sweaty like a old man" hahah . Which brings me to my next point which is -

teasing. They tease each other a lot and it is mutual and perfect.

That's all I can think of right now


Do constructed languages need to have their own letters, words, & sounds?

Question: In order for me to ask a higher quality question, I need to know, do constructed languages need to have their own letters, words, & sounds?
Comment: It depends on the definition, I think. A spoken language definitely needs sounds, other kinds of languages don't.
Comment: No. There are no rules, nor anyone who could set them.
Comment: Why didn't you just put that as the answer?
Comment: As for the letters, I might suggest adding a glottal stop _ʔ_ OR _ɂ_ for silent but consonantal pauses in speech, a schwa _ə_ for a U-like noise, or if you want to add a bit of Old English, an ampersand _&_, which I do and will probably ever be one of the only ones to do so.
Answer: No, a conlang does not need any of it. You can construct a language based on gestures (a sign language) or on whistles, or on other signals transporting information. You can construct a Pasigraphy, i.e., a written-only language.
But for a more conventional design that meets our intuition of language, you will probably use sounds and words, and letters to write the language. It is up to your creativity to come up with original sounds and letters, but there is definetely no need to do so. Many conlang designs rely on sounds (and complete phonologies) that occur in natural languages, and use usual letters (mostly Latin, but also Cyrillic or other existing writing systems like Runes) for writing. The words of a conlang are most often original but I even can imagine a conlang without original words: Draw existing words for natural languages in an eclectic way or create a conlang closely based on a natural language or a group of natural languages. The vocabulary of IALA Interlingua is hardly original.
Comment: One more thing: an auxiliary language *benefits* from having recognizable and recycled script and vocabulary, but a language set in an alternate universe might stretch credibility if it happened to have the same writing system and vocabulary as one of earth's languages
Comment: Even for pasigraphies, _letters_, _per se_, aren't required - consider, for example, languages like Chinese or Japanese, which use ideograms to represent words or syllables.
Answer: As has already been said, the answer is, generally no. However, I'd like to look into it a bit deeper:
Letters
Many (most?) constructed languages are written with the Latin script, i.e. what I'm using right now to write this answer. However, many conlangers find the base set of 26 characters it provides too restrictive, and will make use of things like diacritics (áèñħ…), special characters used in some languages or the IPA (ŋß…) or letters from other alphabets (εφϑ…). This is a choice, and by no means a necessity. Some conlangers, in particular those creating languages for a constructed world, also like to invent entire writing systems and consider the representation with the Latin script ("romanisation") merely a tool for easy representation online. Again, this is optional, but depending on your goals might be a good idea. It would not make sense to create a new writing system for an auxiliary language though, for example.
Words
There's three ways one might interpret this question:

Do I have to make my words sound different (from English / any other language)? Certainly not: auxiliary languages often take heavy inspiration from existing languages, as familiarity makes it easier to learn a language. Similarly, if you want to toy around with grammar but don't really care about the actual outcome, you might as well just use placeholder words taken straight from English and focus on what you really care about.
Do I have to make words which mean different things than the words in English/any other language? Here I am inclined to say yes. If you simply copy an English dictionary and replace all the words by other sounding words, then you've created what is called a relex. Whether relexes are considered conlangs or not is up for debate, in my eyes they are ciphers. However, there's layers upon layers to this - is a conlang still a relex if you copy the lexicon but use completely different grammar? Perhaps not, but it's not as interesting as if you also made a custom lexicon. In fact, I'd go so far as to say that doing so takes away most of what makes a conlang unique.
Do I have to follow the idea of having sentences broken down into words? Absolutely not: it's actually surprisingly hard (read: an unsolved problem) to define the concept of a word in a way that works for every language. Look into the (just as loosely defined) concept of polysynthesis if you're intrigued.

Sounds
Language doesn't have to rely on sound. There's sign languages as a primary counterexample that also shows up "in real life", and on top of that, graphical (written only), touch based and many other kinds of languages have been created.
But let's assume you're going to be making a spoken language. Two questions:

Do I have to make new sounds? Well… no. There's only so many sounds our mouths can make and most of them already occur in some language (and those that don't, e.g. smacking ones teeth together don't occur for good reasons), so it's rather hard to even make new sounds. But if you're making a language meant for aliens/sapient animals/whatever nonhuman you can come up with, then maybe you might want to. But many conlangers don't bother, as it is really hard.
Do I have to make a new sound system or can I just use the sounds of English/other language? Same point as with the words above: You don't have to, and if your goal is to focus on other parts of the conlang you might as well ignore it, but if your goal is to make a good, interesting and unique conlang, then… yea you should.

Summary
In short, what you do and don't do depends entirely on your design goals. If you wanna toy with a particular grammar concept, then focus on the essentials. If you wanna make the new big international auxlang then keep things familiar to the target audience. If you want to make a natural looking conlang, then go all in and be creative.
Answer: Yes -- after a fashion.
The main issue I have with your question lies in the specific terms used: words, letters & sounds.
So far, the answers have gotten around these things by pointing out whistle or sign languages. And I agree: technically speaking, in a sign language, there are no words and certainly no sounds.
The reason the answer is actually yes, I contend, is because I am sure what you actually mean by "words" is "discrete meaning carrying units of language" and by "sounds" & "letters" you probably mean "some way to convey said meaning through an interpersonal medium of communication".
When taken at the broader level, of course, language has to have "meaning carrying units" and it has to have "medium of communication". Else, language ceases to have meaning.
I would say that yes, ever invented language must have "words" (whether those words are spoken, signed, thought or written) as tokens of meaningful communication; and they must have "sounds" (whether spoken by mouth through the air or sent via radio waves between antennae) as a native & non-technological way of conveying meaning.
"Letters" indicate a specifically technological advancement to communication via language. An invented language's culture does not need to be that advanced. And even if it were, it would not need "its own" letters. It could borrow either someone else's writing system; for example the way Persian borrowed Arabic writing. Even though Persians had been writing for centuries already.
Comment: "in a sign language, there are no words" is strictly wrong. Sign languages are not that different from spoken ones. The medium allows for some very interesting differences like signing two signs in parallel, or having the location of signing be relevant, but otherwise it's much of the same. They certainly have words.
Comment: And, as I've mentioned in my own answer, the idea of "words" itself cannot easily be generalized enough to capture every single language. Most have some notions which correspond to "words", but there may be e.g. differences between phonetic and grammatical "word boundaries" (which mostly align in European languages, or at least are subsets of each other)
Comment: A "word" is a spoken token of meaning. And by extension, a written token. Sign languages use "signs". Which is why I shift away from terms specific to spoken or signed (or whistled) languages by reducing those terms to "discrete meaning carrying units of language".
Comment: That is an overly restrictive definition. There is no difference between expressing a word through mouth or hands. An really, a "sign" is much more of an analogue of a phoneme, or perhaps a morpheme.
Comment: Okay. We can disagree on that!
Answer: Yes and no.  Every language spoken by humans has its own way of dividing the universe of possible speech-sounds into a few dozen phonemes, and its own restrictions on how phonemes can go together to make syllables and words (phonotactics).
If the language is written, there must be a way of mapping phonemes (or syllables) to characters.
But you're not required to make any of these different from those of all other languages!
You're not required to define the phonology first; likely it will not settle down until you're well into composing sample sentences and think "hm, that consonant-cluster or this diphthong doesn't fit the intended flavor."  Similarly, you might make a full grammar and dictionary in Latin script (or Cyrillic or hiragana or ...) before deciding that your fictional culture needs its own writing system.
Comment: Just to be a pedant: you can also map meanings to written symbols, as is partly the case with Egyptian hieroglyphics. While some of them represent sounds or sound combinations, others (eg the determinatives) have no sound vaue and only indicate meaning.


Air: Write to application storage directory during installation?

Question: I'm writing an Adobe Air HTML app. I want to write to the application storage directory during installation, and thought you could point me in the right direction.
I've got a set of example "profiles" (text files) to include with our application. I would like to put the examples into Application Storage (or Document Storage), since the user is free to delete them, modify them, etc. Also, I don't want to re-write the files during Updates, only an initial installation.
But as far as I can figure out, the installer only writes to the application directory. Is there a simple command line change to ADT to send files to the application storage directory?
Here's my thought so far for a workaround:

Include the files in the application directory "Examples"
On startup, check if the "Examples" folder is in the Application Storage/Document Storage directory
If it doesn't exist, copy app:/Examples folder into the Application Storage/Document storage directory

But it would be a lot easier if this was part of the installer. Let me know if any other information would be helpful. Thanks!
Answer: There isn't any way to customize the normal AIR installer. Your workaround is the way to do it.


Vox Populi isn't applied retroactively?

Question: A new badge Vox Populi was introduced, but isn't this applied retroactively? I had hit 40-vote limit earlier. Or is this applicable to those votes after the new changes were done?
Comment: I can confirm that it's definitely not retroactive. I hit 40 votes yesterday (as apparently became an interesting [topic of discussion here](http://meta.stackexchange.com/questions/90384/voting-more-than-40-times-on-first-day-of-the-week-a-bug)), but I was forced to hit that limit *again* today in order to earn the Vox Populi badge.
Comment: @Cody Gray - Sad day, being forced to vote and all.  Sarcasm aside, I don't think this is problem...
Comment: @reem: I didn't mean to imply that it was a bad thing, nor that I was unhappy about having to vote. I was simply providing confirmation of Sathya's observations that the badge in question did not appear to be applied retroactively. I agree there's no reason it should be.
Answer: This is by design, I explicitly cut out anything that happened earlier than yesterday.
This is not purely an evil scheme to get people to vote more. The rules changed, its a bit trickier to get the badge now. Also I wanted to avoid old account merges resulting in people getting the badge. The meta flood would be huge.
Comment: Question superseded one year later by http://meta.stackexchange.com/a/123172/248268 :)

Vox Populi isn't applied retroactively?


Meaning of Homoscedasticity

Question: I'm doing a simple linear regression project (only one feature), and I am checking the assumptions, however, I don't really understand the reasoning behind our homoscedasticity assumption. I've looked all over for a solution, but all of the answers are hard for me to understand. Could someone please explain to me why the residuals need to have constant variance in layman's terms. Thank you in advance if anyone can help me.
Comment: Homoscedasticity affects the standard error of the estimated coefficients.  If homoscedasticity, the confidence intervals for the estimated effects might be too narrow and our p values too small.
Answer:
why the residuals need to have constant variance in layman's terms

The assumption of homogeneity of variance is important for inference on the coefficients of the model (which are interpreted as the average effects of the variable on the outcome).
The sampling variance of the coefficient $\beta_1$ (the slope) in a linear regression involves the estimated variance
$$ \mathrm{Var}\left(\hat{\beta}_1\right)=\sigma^2 /\left[\mathrm{SST}_1\left(1-R_1^2\right)\right]$$
If $\sigma^2$ is not constant (e.g. is a function of the predictor), then the variance is misspecified and hence the standard error (and consequently confidence intervals and p values) will also be incorrect.
When homogeneity of variance is violated, there exist methods for correcting the standard errors.  See "robust standard errors" or "the sandwich estimator"
Comment: @user1059114207 if you think either Dave's or Demetri's post helped you providing clarification, consider upvoting them and [accept](https://stats.stackexchange.com/help/accepted-answer) either of them by clicking the tick alongside the respective post.
Comment: thank you so much
Answer: Without doing any math, when we calculate p-values and confidence intervals, we are calculating them based on wrong distributions. If we assume constant variance, those p-values and confidence intervals are calculated a certain way to give the properties that we expect them to have, and without constant variance, those properties will not hold.
Consequently, while a (say) $95\%$ confidence intervals is supposed to contain the true value $95\%$ of the time, we might wind up in a position where such a confidence interval contains the true value $90\%$ of the time, maybe $80\%$ or $60\%$ of the time. However it happens, we wind up being more confident than we should be, since what we think is a $95\%$ confidence interval is really a $90\%$ (or $80\%$ or $60\%$) confidence interval.
Answer: The variance of the residuals is constant.
At each residual (true value - predicted value), the difference is about the same.
Variance is generally: $(x_{i}-\bar{x})^{2}$ which is the difference of value of the observation from the average of all observations, squared, showing you how much all the points differ from their average. With a high value meaning they differ a lot, and a low value meaning that they generally are about the same.
You can kind of think of a graph of these residuals as one with dots representing the residual at each prediction (n predictions = n dots), and for each of those dots, another dot illustrating the mean value of the residuals. So you have 2 dots for each prediction: the residual for the prediction and the mean residual for all predictions. If the dots are all about uniformly the same distance apart from one another at each prediction, then you've got constant variance. If the dots are all kinds of different distances apart, they vary a lot, and so you've variation (potentially heteroskedasticty).
If the variance of the residuals is constant($var(true value - predicted value)$), or very small in applied circumstances, then the estimator predicts or fits a curve of the data that is constantly about the same amount off for each prediction. If that's the case, then on average, your model predicts each data point with about the same performance. Your estimator performs about the same at each predicted point (for that data).
So, homoskedastcity means the variance of the residuals is constant. If the variance of the residuals is constant, then your model may generalize the data you have well.
The other assumptions of linear regression, or GLMs, are what make the homskedastic assumption also contribute to having a model that represents your data well.

Meaning of Homoscedasticity


can a snap package depend on a .deb package provided by the distro?

Question: Can a snap be built in a way such as, when the user tries to install it, the snap also installs another package? For example, wget. Thanks.
Answer: The short answer to your question is: no, snaps cannot depend upon .debs in such as way that, when the snap is installed, the .deb is installed as well.
However, the longer answer is that, when building the snap, you can bundle whatever .debs you want within it. To use your example, here's the snapcraft.yaml for a snap that bundles wget within it:
name: my-snap-name # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict # 'strict' confinement means fully confined

parts:
  my-part:
    plugin: nil
    # Include the wget .deb from the Ubuntu package archive
    stage-packages: [wget]

apps:
  # expose wget to end-users
  wget:
    command: usr/bin/wget
    plugs: [network, home, removable-media]

Run snapcraft on that and you end up with a snap that has a wget app. It doesn't pull wget in at install-time like you asked, but by pulling it in at build-time perhaps it accomplishes your end goal.
Comment: thanks! this is for a binary, but what if I also need libs from usr/lib?
Comment: for example: gtk2 libs?
Comment: Same thing, just add it to stage-packages and they'll end up in the snap.
Comment: Note that as snap files are self-contained every dependency you use will increase the size of the snap and resources needed in the target system. If end user is running some other apps that would need the same libraries, the snap environment prevents sharing the libraries between different apps.
Answer: Snap packages are self contained and need no outside dependencies to run.
See here for more information Linux Commando: Snaps
Comment: that may be true but the whole Idea of the snap is that it will work across many distros so if the developer require a dependency outside the snap that may not be the case because different distros may place files in different locations.  JMHO.
Comment: A snap that depends upon a deb is non-portable, can be confusing to some users, and adds an unnecessary support burden to the developer. A more immediate problem is that snaps have no way to communicate a deb dependency to apt. This makes the install non-standard, and another pain point for support: We all know that humans sometimes aren't great at following simple directions.
Comment: that guide is only written from the user point of view, not from the developer that wants to create the snap; I mean, I know that a snap **can** be self contained and include all dependencies inside, but if a .deb package already provides a version that is compatible with the app contained in the snap, and the snap builder decides it's good enough, can the snap depend on the .deb?
Comment: This conical guide should answer your question more throughly : https://docs.snapcraft.io/the-snap-format/698
Comment: @user535733: ok even if it's non-portable, I'm aware of the disadvantage of this, how can I do it?


Sharepoint 2013 and managed Paths

Question: I am new to SharePoint and accidently deleted the managed path to my site collection (and in the process of trying to fix I think I might have changed a few more things as now when I create a new site collection I get the 500 internet error) I was wondering is there a way to restore/recreate a managed pathway or is the best bet just to reinstall?
Comment: What happens when you try to create a managed path with the same name that you deleted?
Comment: I can recreate the path but that doesn't seem to allow me to access the old site collection.

Is there a way to find out what the proper path is (in case I am creating incorrect ones)?
Answer: Try to access the site collection from Central Administration -> Application Management -> View all site collections. And try creating the managed path after that link.
Comment: Well I ended up just restoring it from a backup. However if this happens again I will give this a go. Thanks.

Sharepoint 2013 and managed Paths


Negative part of the integrand in an iterated integral

Question: Hi everyone: Suppose that $(X,\mathfrak{M},\mu)$ and  $(Y,\mathfrak{N},\nu)$ are two measure spaces and $f(x,y)$ is an extended real valued measurable function on $X\times Y$. Suppose we can not apply Fubini to $f$ but we know that the two iterated integrals
$$\int_{X} \int_{Y}fd\nu d\mu$$ and
$$\int_{Y} \int_{X}fd\mu d\nu$$
exist in $(-\infty,+\infty]$. Can we conclude that the iterated integrals (or at least one of them) of $f^{-}$ is less that $+\infty$, i.e.
$$\int_{X} \int_{Y}f^{-}d\nu d\mu<+\infty?$$
Thanks for your help.
Comment: Thanks for your reply. Are you saying that the existence of the iterated integrals doesn't say anything about the integral of the positive and negative parts? Can we have a case where both iterated integrals are finite but the product integral is $\infty-\infty$?
Comment: You should have commented on my answer, so I'd be notified. As I wrote there, every time the iterated integrals are unequal, the  $\infty-\infty$ situation occurs. For a concrete example with finite iterated integrals, see Wikipedia: [Failure of Fubini's theorem for non-integrable functions](http://en.wikipedia.org/wiki/Fubini's_theorem#Failure_of_Fubini.27s_theorem_for_non-integrable_functions).
Answer: No, it's rather the opposite. Assuming the spaces are $\sigma$-finite and $f$ is measurable, Tonelli's theorem applies to both $f^+$ and $f^-$, and asserts the equalities
$$ \iint_{X\times Y} f^+=\int_X\int_Y f^+  =\int_Y\int_X f^+ \tag1$$
$$\iint_{X\times Y} f^-=\int_X\int_Y f^-  =\int_Y\int_X f^-\tag2$$
(where the integrals could be $+\infty$).
So, how can equality fail for $f$? Only because of both (1) and (2) being infinite, so that their subtraction produces "$+\infty-\infty$" which can mean anything or nothing. If just one of the integrals in (1)-(2) is finite, we have the conclusion of Fubini's theorem already.
Stated as a contrapositive: if the equality of iterated integrals fails (be they finite or infinite), all integrals in (1)-(2) are infinite.
Here is a concrete example, taken from Wikipedia article Failure of Fubini's theorem for non-integrable functions:
$$\int_0^1\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} $$
Both iterated integrals are finite and they are unequal. Both the positive and negative parts of the function integrate to $\infty$.
Comment: @Katie Long story. The answer is correct.
Comment: The downvotes are entirely in regards to your 'vigilance' mission? I don't understand how someone could disagree with deleting terrible questions(I likely have a few myself), even if they have attached good answers. Keep up the good work with both your answers and your efforts.
Comment: Why is this strongly downvoted, but with no comments? Is it wrong?


How does subsidiary protection differ from Convention-refugee status in terms of concrete rights granted?

Question: Why did the EU adopt another terminology (i.e. subsidiary protection) for non-1951-Convention refugees? Does subsidiary protection confer fewer right in practice than refugee/asylum status under the 1951 Convention? Or is it a distinction without a (practical) difference?
Answer: EU law typically aims at "harmonising" (that's the technical term) national law and does it in several ways. Regarding asylum, it's only a partial harmonisation, defining a minimum set of rights which member states can build upon but not ignore. Importantly, before this harmonisation effort, EU member states already had different regimes, with some states readily granting refugee status to people fleeing armed conflicts (and therefore going beyond the UN convention definition) and others preferring ad hoc national protection regimes. The EU directive retains both through this concept of "subsidiary protection", presumably because some member states would not have accepted an extension of the refugee definition.
There are indeed important practical consequences. For example, the family reunification directive gives some rights to refugees (forbidding states to impose accommodation or income requirements for family reunification) which do not automatically apply to people benefiting from subsidiary protection. Similarly, the protection from criminal prosecution for crossing a border irregularly that exists in the 1951 convention and in the EU asylum directive only applies to refugees. Both refugees and people benefiting from subsidiary protection have access to the job market and to some welfare benefits, but only refugees must be granted benefits on a par with other legal residents. Refugees' residence permit have to be valid for three years, whereas permits for subsidiary protection only have to be valid for a year.
Importantly, the EU directive does not prevent a state from providing more extensive rights to people under subsidiary protection nor does it prevent states from treating anyone as a refugee even if they do not meet the more restrictive definition. So in some countries, this distinction does not have many practical consequences whereas in others it does. Interestingly, if you look at Eurostat's data for first instances decision on asylum applications in 2018, you will see that most EU countries grant some form of protection to 40-50% of applicants but the specific status granted varies widely.
Finally, note that even for refugees, there are differences between the concrete rights granted by the UN Convention and those defined in the asylum directive. The directive acknowledges the convention but does not repeat or further spell out some of the convention rights (which still apply in principles but aren't anchored in EU law).


AWS Lambda Constructor Overloading Java POJOs

Question: I created a Lambda based on this URL: https://docs.aws.amazon.com/lambda/latest/dg/java-handler-io-type-pojo.html. There are three main classes:
package example;

import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;

public class HelloPojo implements RequestHandler<RequestClass, ResponseClass>{

public ResponseClass handleRequest(RequestClass request, Context context){
    String greetingString = String.format("Hello %s, %s.", request.firstName, request.lastName);
    return new ResponseClass(greetingString);
}
}

is the Lambda handler.
package example;

 public class RequestClass {
    String firstName;
    String lastName;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public RequestClass(String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
    }

    public RequestClass() {
    }
}

is the requestClass.
package example;

 public class ResponseClass {
    String greetings;

    public String getGreetings() {
        return greetings;
    }

    public void setGreetings(String greetings) {
        this.greetings = greetings;
    }

    public ResponseClass(String greetings) {
        this.greetings = greetings;
    }

    public ResponseClass() {
    }

}

is the response class.
Input is something along the lines of:
{ "firstName": "John", "lastName": "Doe" }

That being said, I do have some questions regarding the RequestClass. Right now, it is dependent on there being a firstName and lastName provided as part of the input. However, let's say only a firstName is provided, and I want to have another constructor in the RequestClass with just a firstName parameter and initialize the lastName to a default lastName, something like
public RequestClass(String firstName) {
        this.firstName = firstName;
        this.lastName = "defaultLastName";
    }

When I try doing something along these lines and access the variables in the handleRequest, I'm able to get the firstName but lastName is always null (guessing because I do not provide it as part of the input). Any reason as to why this happens and what I can do so that when accessing lastName in the handler class, I am able to get "defaultLastName" instead of null?
Please let me know if there are further clarifications I should add, I don't post to StackOverflow very often and want to make sure my question is appropriate!
Answer: you could set some default values in your default constructor.
public RequestClass() {
  firstName = "defaultFirstName";
  lastName = "defaultLastName;
}

And then call your parameterized constructor with this.
public RequestClass(String firstName) {
  this();
  this.firstName = firstName;
}

Readings for constructor overloading:
https://beginnersbook.com/2013/05/constructor-overloading/


How do I prevent my husband's emails from combining with my Mail.app account?

Question: My husbands emails from his gmail account show up in my Apple Mail account.  We both have separate gmail accounts, but all his emails show up in my Apple Mail inbox.  How to stop?
Comment: Open preferences, accounts. Uncheck the box for his email address.
Answer: You don't specify if this is on a Mac or an iPhone etc? Also knowing what version of macOS or iOS you're running would be helpful.
However, the solution is to remove his gmail email account from your Mail app. The steps for doing this will depend on whether you're using a Mac or an iPhone etc.
EDIT
Edited answer to provide some step-by-step instructions for removing gmail accounts from Apple mail in macOS and iOS.
Steps for macOS:

Open the Mail app
Go to: Mail > Accounts...
In the Internet Accounts window that pops up you will see a list of all email addresses being used by Mail
Click on the address you no longer want
At the bottom click on the minus (-) sign to remove the account
Click OK when you are asked if you're sure
Close the Internet Accounts window

Steps for iOS:

Go to Settings > Mail > Accounts
Tap on the account you want to remove
Scroll to the bottom of the screen and tap on Delete Account
Tap Delete Account when you are asked if you're sure
Exit your settings

Hope this helps!

How do I prevent my husband’s emails from combining with my Mail.app account?